@nuclearplayer/plugin-sdk 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -27,6 +27,23 @@ class $t {
27
27
  }
28
28
  }
29
29
  class Zt {
30
+ #t;
31
+ constructor(t) {
32
+ this.#t = t;
33
+ }
34
+ #e(t) {
35
+ const r = this.#t;
36
+ if (!r)
37
+ throw new Error("Discovery host not available");
38
+ return t(r);
39
+ }
40
+ getRecommendations(t, r, n) {
41
+ return this.#e(
42
+ (o) => o.getRecommendations(t, r, n)
43
+ );
44
+ }
45
+ }
46
+ class St {
30
47
  #t;
31
48
  constructor(t) {
32
49
  this.#t = t;
@@ -41,7 +58,7 @@ class Zt {
41
58
  return this.#e((n) => n.on(t, r));
42
59
  }
43
60
  }
44
- class St {
61
+ class It {
45
62
  #t;
46
63
  constructor(t) {
47
64
  this.#t = t;
@@ -92,7 +109,7 @@ class St {
92
109
  return this.#e((r) => r.subscribe(t));
93
110
  }
94
111
  }
95
- const It = (e) => {
112
+ const Ot = (e) => {
96
113
  if (e instanceof Headers) {
97
114
  const t = {};
98
115
  return e.forEach((r, n) => {
@@ -101,9 +118,9 @@ const It = (e) => {
101
118
  }
102
119
  return Array.isArray(e) ? Object.fromEntries(e) : e;
103
120
  };
104
- function Ot(e) {
121
+ function Et(e) {
105
122
  return async (t, r) => {
106
- const n = String(t instanceof Request ? t.url : t), o = r?.headers ? It(r.headers) : void 0, i = typeof r?.body == "string" ? r.body : void 0, s = await e.fetch(n, {
123
+ const n = String(t instanceof Request ? t.url : t), o = r?.headers ? Ot(r.headers) : void 0, i = typeof r?.body == "string" ? r.body : void 0, s = await e.fetch(n, {
107
124
  method: r?.method,
108
125
  headers: o,
109
126
  body: i
@@ -114,27 +131,27 @@ function Ot(e) {
114
131
  });
115
132
  };
116
133
  }
117
- const Et = {
134
+ const Pt = {
118
135
  fetch: async () => ({
119
136
  status: 501,
120
137
  headers: {},
121
138
  body: "HTTP host not configured"
122
139
  })
123
140
  };
124
- class Pt {
141
+ class Tt {
125
142
  fetch;
126
143
  constructor(t) {
127
- this.fetch = Ot(t ?? Et);
144
+ this.fetch = Et(t ?? Pt);
128
145
  }
129
146
  }
130
- const Tt = {
147
+ const At = {
131
148
  log: () => {
132
149
  }
133
150
  };
134
- class At {
151
+ class Nt {
135
152
  host;
136
153
  constructor(t) {
137
- this.host = t ?? Tt;
154
+ this.host = t ?? At;
138
155
  }
139
156
  trace(t) {
140
157
  this.host.log("trace", t);
@@ -155,7 +172,7 @@ class At {
155
172
  this.host.log(t, r);
156
173
  }
157
174
  }
158
- class Nt {
175
+ class jt {
159
176
  #t;
160
177
  constructor(t) {
161
178
  this.#t = t;
@@ -195,7 +212,7 @@ class Nt {
195
212
  return this.#e((n) => n.fetchAlbumDetails(t, r));
196
213
  }
197
214
  }
198
- class jt {
215
+ class Rt {
199
216
  #t;
200
217
  constructor(t) {
201
218
  this.#t = t;
@@ -252,7 +269,7 @@ class jt {
252
269
  return this.#e((r) => r.setRepeatMode(t));
253
270
  }
254
271
  }
255
- class Rt {
272
+ class Ct {
256
273
  #t;
257
274
  constructor(t) {
258
275
  this.#t = t;
@@ -294,7 +311,7 @@ class Rt {
294
311
  return this.#e((r) => r.subscribe(t));
295
312
  }
296
313
  }
297
- class Ct {
314
+ class Dt {
298
315
  #t;
299
316
  constructor(t) {
300
317
  this.#t = t;
@@ -321,7 +338,7 @@ class Ct {
321
338
  return this.#e((r) => r.subscribe(t));
322
339
  }
323
340
  }
324
- class Dt {
341
+ class xt {
325
342
  #t;
326
343
  constructor(t) {
327
344
  this.#t = t;
@@ -381,7 +398,7 @@ class Dt {
381
398
  return this.#e((r) => r.subscribeToCurrentItem(t));
382
399
  }
383
400
  }
384
- class xt {
401
+ class Ft {
385
402
  #t;
386
403
  #e;
387
404
  #r;
@@ -417,7 +434,7 @@ class xt {
417
434
  this.#e.unregister(this.#r, t);
418
435
  }
419
436
  }
420
- class Ft {
437
+ class Mt {
421
438
  #t;
422
439
  constructor(t) {
423
440
  this.#t = t;
@@ -432,7 +449,7 @@ class Ft {
432
449
  return this.#e((r) => r.openExternal(t));
433
450
  }
434
451
  }
435
- class Mt {
452
+ class Ut {
436
453
  #t;
437
454
  constructor(t) {
438
455
  this.#t = t;
@@ -450,7 +467,7 @@ class Mt {
450
467
  return this.#e((r) => r.resolveStreamForCandidate(t));
451
468
  }
452
469
  }
453
- class Ut {
470
+ class Jt {
454
471
  host;
455
472
  constructor(t) {
456
473
  this.host = t;
@@ -474,7 +491,7 @@ class Ut {
474
491
  return this.host.getPlaylist(t);
475
492
  }
476
493
  }
477
- class Jt {
494
+ class Lt {
478
495
  Settings;
479
496
  Providers;
480
497
  Queue;
@@ -485,38 +502,39 @@ class Jt {
485
502
  Favorites;
486
503
  Logger;
487
504
  Dashboard;
505
+ Discovery;
488
506
  Playback;
489
507
  Playlists;
490
508
  Events;
491
509
  Shell;
492
510
  constructor(t) {
493
- this.Settings = new xt(
511
+ this.Settings = new Ft(
494
512
  t?.settingsHost,
495
513
  t?.widgetRegistry,
496
514
  t?.pluginId
497
- ), this.Providers = new Ct(t?.providersHost), this.Queue = new Dt(t?.queueHost), this.Streaming = new Mt(t?.streamingHost), this.Metadata = new Nt(t?.metadataHost), this.Http = new Pt(t?.httpHost), this.Ytdlp = new Ut(t?.ytdlpHost), this.Favorites = new St(t?.favoritesHost), this.Logger = new At(t?.loggerHost), this.Dashboard = new $t(t?.dashboardHost), this.Playback = new jt(t?.playbackHost), this.Playlists = new Rt(t?.playlistsHost), this.Events = new Zt(t?.eventsHost), this.Shell = new Ft(t?.shellHost);
515
+ ), this.Providers = new Dt(t?.providersHost), this.Queue = new xt(t?.queueHost), this.Streaming = new Ut(t?.streamingHost), this.Metadata = new jt(t?.metadataHost), this.Http = new Tt(t?.httpHost), this.Ytdlp = new Jt(t?.ytdlpHost), this.Favorites = new It(t?.favoritesHost), this.Logger = new Nt(t?.loggerHost), this.Dashboard = new $t(t?.dashboardHost), this.Discovery = new Zt(t?.discoveryHost), this.Playback = new Rt(t?.playbackHost), this.Playlists = new Ct(t?.playlistsHost), this.Events = new St(t?.eventsHost), this.Shell = new Mt(t?.shellHost);
498
516
  }
499
517
  }
500
- class Ti extends Jt {
518
+ class Ai extends Lt {
501
519
  }
502
- class Ai extends Error {
520
+ class Ni extends Error {
503
521
  constructor(t, r) {
504
522
  super(
505
523
  `Missing capability: Provider "${r}" declared capability "${t}" but does not implement it`
506
524
  ), this.name = "MissingCapabilityError";
507
525
  }
508
526
  }
509
- const Ni = (e, t) => {
527
+ const ji = (e, t) => {
510
528
  const [r, n] = wt(void 0);
511
529
  zt(() => {
512
530
  if (!e)
513
531
  return;
514
532
  let i = !0, s = !1;
515
- const c = e.subscribe(t, (u) => {
516
- i && (s = !0, n(u));
533
+ const c = e.subscribe(t, (a) => {
534
+ i && (s = !0, n(a));
517
535
  });
518
- return e.get(t).then((u) => {
519
- i && (s || n(u));
536
+ return e.get(t).then((a) => {
537
+ i && (s || n(a));
520
538
  }), () => {
521
539
  i = !1, c && c();
522
540
  };
@@ -529,7 +547,7 @@ const Ni = (e, t) => {
529
547
  );
530
548
  return [r, o];
531
549
  };
532
- function ji(e, t, r) {
550
+ function Ri(e, t, r) {
533
551
  if (!e?.items?.length)
534
552
  return;
535
553
  const n = e.items.filter((c) => !(c.purpose && c.purpose !== t || !c.url));
@@ -549,25 +567,25 @@ function ji(e, t, r) {
549
567
  }
550
568
  })(t);
551
569
  return n.map((c) => {
552
- const u = Math.min(c.width || 0, c.height || 0), l = Math.abs(o(c) - s), f = Math.abs(u - r), m = u < r ? r / u : 1;
570
+ const a = Math.min(c.width || 0, c.height || 0), l = Math.abs(o(c) - s), f = Math.abs(a - r), m = a < r ? r / a : 1;
553
571
  return {
554
572
  artwork: c,
555
573
  score: (m > 1.5 ? -1e3 : 0) + -l * 50 + -f * 0.1
556
574
  };
557
- }).sort((c, u) => u.score - c.score)[0]?.artwork;
575
+ }).sort((c, a) => a.score - c.score)[0]?.artwork;
558
576
  }
559
- function a(e, t, r) {
560
- function n(c, u) {
577
+ function u(e, t, r) {
578
+ function n(c, a) {
561
579
  if (c._zod || Object.defineProperty(c, "_zod", {
562
580
  value: {
563
- def: u,
581
+ def: a,
564
582
  constr: s,
565
583
  traits: /* @__PURE__ */ new Set()
566
584
  },
567
585
  enumerable: !1
568
586
  }), c._zod.traits.has(e))
569
587
  return;
570
- c._zod.traits.add(e), t(c, u);
588
+ c._zod.traits.add(e), t(c, a);
571
589
  const l = s.prototype, f = Object.keys(l);
572
590
  for (let m = 0; m < f.length; m++) {
573
591
  const d = f[m];
@@ -579,9 +597,9 @@ function a(e, t, r) {
579
597
  }
580
598
  Object.defineProperty(i, "name", { value: e });
581
599
  function s(c) {
582
- var u;
600
+ var a;
583
601
  const l = r?.Parent ? new i() : this;
584
- n(l, c), (u = l._zod).deferred ?? (u.deferred = []);
602
+ n(l, c), (a = l._zod).deferred ?? (a.deferred = []);
585
603
  for (const f of l._zod.deferred)
586
604
  f();
587
605
  return l;
@@ -628,12 +646,12 @@ function he(e) {
628
646
  const t = e.startsWith("^") ? 1 : 0, r = e.endsWith("$") ? e.length - 1 : e.length;
629
647
  return e.slice(t, r);
630
648
  }
631
- function Lt(e, t) {
649
+ function Vt(e, t) {
632
650
  const r = (e.toString().split(".")[1] || "").length, n = t.toString();
633
651
  let o = (n.split(".")[1] || "").length;
634
652
  if (o === 0 && /\d?e-\d?/.test(n)) {
635
- const u = n.match(/\d?e-(\d?)/);
636
- u?.[1] && (o = Number.parseInt(u[1]));
653
+ const a = n.match(/\d?e-(\d?)/);
654
+ a?.[1] && (o = Number.parseInt(a[1]));
637
655
  }
638
656
  const i = r > o ? r : o, s = Number.parseInt(e.toFixed(i).replace(".", "")), c = Number.parseInt(t.toFixed(i).replace(".", ""));
639
657
  return s % c / 10 ** i;
@@ -674,7 +692,7 @@ function N(...e) {
674
692
  function ve(e) {
675
693
  return JSON.stringify(e);
676
694
  }
677
- function Vt(e) {
695
+ function Ht(e) {
678
696
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
679
697
  }
680
698
  const Ue = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
@@ -682,7 +700,7 @@ const Ue = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
682
700
  function K(e) {
683
701
  return typeof e == "object" && e !== null && !Array.isArray(e);
684
702
  }
685
- const Ht = le(() => {
703
+ const Bt = le(() => {
686
704
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
687
705
  return !1;
688
706
  try {
@@ -704,7 +722,7 @@ function L(e) {
704
722
  function Je(e) {
705
723
  return L(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
706
724
  }
707
- const Bt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
725
+ const Wt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
708
726
  function X(e) {
709
727
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
710
728
  }
@@ -725,17 +743,17 @@ function h(e) {
725
743
  }
726
744
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
727
745
  }
728
- function Wt(e) {
746
+ function Gt(e) {
729
747
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
730
748
  }
731
- const Gt = {
749
+ const Kt = {
732
750
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
733
751
  int32: [-2147483648, 2147483647],
734
752
  uint32: [0, 4294967295],
735
753
  float32: [-34028234663852886e22, 34028234663852886e22],
736
754
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
737
755
  };
738
- function Kt(e, t) {
756
+ function Yt(e, t) {
739
757
  const r = e._zod.def, n = r.checks;
740
758
  if (n && n.length > 0)
741
759
  throw new Error(".pick() cannot be used on object schemas containing refinements");
@@ -753,7 +771,7 @@ function Kt(e, t) {
753
771
  });
754
772
  return j(e, i);
755
773
  }
756
- function Yt(e, t) {
774
+ function Qt(e, t) {
757
775
  const r = e._zod.def, n = r.checks;
758
776
  if (n && n.length > 0)
759
777
  throw new Error(".omit() cannot be used on object schemas containing refinements");
@@ -771,7 +789,7 @@ function Yt(e, t) {
771
789
  });
772
790
  return j(e, i);
773
791
  }
774
- function Qt(e, t) {
792
+ function qt(e, t) {
775
793
  if (!L(t))
776
794
  throw new Error("Invalid input to extend: expected a plain object");
777
795
  const r = e._zod.def.checks;
@@ -789,7 +807,7 @@ function Qt(e, t) {
789
807
  });
790
808
  return j(e, o);
791
809
  }
792
- function qt(e, t) {
810
+ function Xt(e, t) {
793
811
  if (!L(t))
794
812
  throw new Error("Invalid input to safeExtend: expected a plain object");
795
813
  const r = N(e._zod.def, {
@@ -800,7 +818,7 @@ function qt(e, t) {
800
818
  });
801
819
  return j(e, r);
802
820
  }
803
- function Xt(e, t) {
821
+ function er(e, t) {
804
822
  const r = N(e._zod.def, {
805
823
  get shape() {
806
824
  const n = { ...e._zod.def.shape, ...t._zod.def.shape };
@@ -814,35 +832,35 @@ function Xt(e, t) {
814
832
  });
815
833
  return j(e, r);
816
834
  }
817
- function er(e, t, r) {
835
+ function tr(e, t, r) {
818
836
  const o = t._zod.def.checks;
819
837
  if (o && o.length > 0)
820
838
  throw new Error(".partial() cannot be used on object schemas containing refinements");
821
839
  const s = N(t._zod.def, {
822
840
  get shape() {
823
- const c = t._zod.def.shape, u = { ...c };
841
+ const c = t._zod.def.shape, a = { ...c };
824
842
  if (r)
825
843
  for (const l in r) {
826
844
  if (!(l in c))
827
845
  throw new Error(`Unrecognized key: "${l}"`);
828
- r[l] && (u[l] = e ? new e({
846
+ r[l] && (a[l] = e ? new e({
829
847
  type: "optional",
830
848
  innerType: c[l]
831
849
  }) : c[l]);
832
850
  }
833
851
  else
834
852
  for (const l in c)
835
- u[l] = e ? new e({
853
+ a[l] = e ? new e({
836
854
  type: "optional",
837
855
  innerType: c[l]
838
856
  }) : c[l];
839
- return x(this, "shape", u), u;
857
+ return x(this, "shape", a), a;
840
858
  },
841
859
  checks: []
842
860
  });
843
861
  return j(t, s);
844
862
  }
845
- function tr(e, t, r) {
863
+ function rr(e, t, r) {
846
864
  const n = N(t._zod.def, {
847
865
  get shape() {
848
866
  const o = t._zod.def.shape, i = { ...o };
@@ -914,14 +932,14 @@ const Ve = (e, t) => {
914
932
  value: () => e.message,
915
933
  enumerable: !1
916
934
  });
917
- }, He = a("$ZodError", Ve), Be = a("$ZodError", Ve, { Parent: Error });
918
- function rr(e, t = (r) => r.message) {
935
+ }, He = u("$ZodError", Ve), Be = u("$ZodError", Ve, { Parent: Error });
936
+ function nr(e, t = (r) => r.message) {
919
937
  const r = {}, n = [];
920
938
  for (const o of e.issues)
921
939
  o.path.length > 0 ? (r[o.path[0]] = r[o.path[0]] || [], r[o.path[0]].push(t(o))) : n.push(t(o));
922
940
  return { formErrors: n, fieldErrors: r };
923
941
  }
924
- function nr(e, t = (r) => r.message) {
942
+ function or(e, t = (r) => r.message) {
925
943
  const r = { _errors: [] }, n = (o) => {
926
944
  for (const i of o.issues)
927
945
  if (i.code === "invalid_union" && i.errors.length)
@@ -935,8 +953,8 @@ function nr(e, t = (r) => r.message) {
935
953
  else {
936
954
  let s = r, c = 0;
937
955
  for (; c < i.path.length; ) {
938
- const u = i.path[c];
939
- c === i.path.length - 1 ? (s[u] = s[u] || { _errors: [] }, s[u]._errors.push(t(i))) : s[u] = s[u] || { _errors: [] }, s = s[u], c++;
956
+ const a = i.path[c];
957
+ c === i.path.length - 1 ? (s[a] = s[a] || { _errors: [] }, s[a]._errors.push(t(i))) : s[a] = s[a] || { _errors: [] }, s = s[a], c++;
940
958
  }
941
959
  }
942
960
  };
@@ -947,7 +965,7 @@ const pe = (e) => (t, r, n, o) => {
947
965
  if (s instanceof Promise)
948
966
  throw new M();
949
967
  if (s.issues.length) {
950
- const c = new (o?.Err ?? e)(s.issues.map((u) => C(u, i, R())));
968
+ const c = new (o?.Err ?? e)(s.issues.map((a) => C(a, i, R())));
951
969
  throw Ue(c, o?.callee), c;
952
970
  }
953
971
  return s.value;
@@ -955,7 +973,7 @@ const pe = (e) => (t, r, n, o) => {
955
973
  const i = n ? Object.assign(n, { async: !0 }) : { async: !0 };
956
974
  let s = t._zod.run({ value: r, issues: [] }, i);
957
975
  if (s instanceof Promise && (s = await s), s.issues.length) {
958
- const c = new (o?.Err ?? e)(s.issues.map((u) => C(u, i, R())));
976
+ const c = new (o?.Err ?? e)(s.issues.map((a) => C(a, i, R())));
959
977
  throw Ue(c, o?.callee), c;
960
978
  }
961
979
  return s.value;
@@ -967,54 +985,54 @@ const pe = (e) => (t, r, n, o) => {
967
985
  success: !1,
968
986
  error: new (e ?? He)(i.issues.map((s) => C(s, o, R())))
969
987
  } : { success: !0, data: i.value };
970
- }, or = /* @__PURE__ */ ee(Be), te = (e) => async (t, r, n) => {
988
+ }, sr = /* @__PURE__ */ ee(Be), te = (e) => async (t, r, n) => {
971
989
  const o = n ? Object.assign(n, { async: !0 }) : { async: !0 };
972
990
  let i = t._zod.run({ value: r, issues: [] }, o);
973
991
  return i instanceof Promise && (i = await i), i.issues.length ? {
974
992
  success: !1,
975
993
  error: new e(i.issues.map((s) => C(s, o, R())))
976
994
  } : { success: !0, data: i.value };
977
- }, sr = /* @__PURE__ */ te(Be), ir = (e) => (t, r, n) => {
995
+ }, ir = /* @__PURE__ */ te(Be), cr = (e) => (t, r, n) => {
978
996
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
979
997
  return pe(e)(t, r, o);
980
- }, cr = (e) => (t, r, n) => pe(e)(t, r, n), ur = (e) => async (t, r, n) => {
998
+ }, ar = (e) => (t, r, n) => pe(e)(t, r, n), ur = (e) => async (t, r, n) => {
981
999
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
982
1000
  return me(e)(t, r, o);
983
- }, ar = (e) => async (t, r, n) => me(e)(t, r, n), lr = (e) => (t, r, n) => {
1001
+ }, lr = (e) => async (t, r, n) => me(e)(t, r, n), fr = (e) => (t, r, n) => {
984
1002
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
985
1003
  return ee(e)(t, r, o);
986
- }, fr = (e) => (t, r, n) => ee(e)(t, r, n), hr = (e) => async (t, r, n) => {
1004
+ }, hr = (e) => (t, r, n) => ee(e)(t, r, n), dr = (e) => async (t, r, n) => {
987
1005
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
988
1006
  return te(e)(t, r, o);
989
- }, dr = (e) => async (t, r, n) => te(e)(t, r, n), pr = /^[cC][^\s-]{8,}$/, mr = /^[0-9a-z]+$/, gr = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, _r = /^[0-9a-vA-V]{20}$/, vr = /^[A-Za-z0-9]{27}$/, br = /^[a-zA-Z0-9_-]{21}$/, yr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, wr = /^([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})$/, be = (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)$/, zr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, kr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
990
- function $r() {
991
- return new RegExp(kr, "u");
1007
+ }, pr = (e) => async (t, r, n) => te(e)(t, r, n), mr = /^[cC][^\s-]{8,}$/, gr = /^[0-9a-z]+$/, _r = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, vr = /^[0-9a-vA-V]{20}$/, br = /^[A-Za-z0-9]{27}$/, yr = /^[a-zA-Z0-9_-]{21}$/, wr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, zr = /^([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})$/, be = (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)$/, kr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, $r = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1008
+ function Zr() {
1009
+ return new RegExp($r, "u");
992
1010
  }
993
- const Zr = /^(?:(?: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])$/, Sr = /^(([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}|:))$/, Ir = /^((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])$/, Or = /^(([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])$/, Er = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, We = /^[A-Za-z0-9_-]*$/, Pr = /^\+[1-9]\d{6,14}$/, Ge = "(?:(?:\\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])))", Tr = /* @__PURE__ */ new RegExp(`^${Ge}$`);
1011
+ const Sr = /^(?:(?: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])$/, Ir = /^(([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}|:))$/, Or = /^((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])$/, Er = /^(([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])$/, Pr = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, We = /^[A-Za-z0-9_-]*$/, Tr = /^\+[1-9]\d{6,14}$/, Ge = "(?:(?:\\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])))", Ar = /* @__PURE__ */ new RegExp(`^${Ge}$`);
994
1012
  function Ke(e) {
995
1013
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
996
1014
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
997
1015
  }
998
- function Ar(e) {
1016
+ function Nr(e) {
999
1017
  return new RegExp(`^${Ke(e)}$`);
1000
1018
  }
1001
- function Nr(e) {
1019
+ function jr(e) {
1002
1020
  const t = Ke({ precision: e.precision }), r = ["Z"];
1003
1021
  e.local && r.push(""), e.offset && r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
1004
1022
  const n = `${t}(?:${r.join("|")})`;
1005
1023
  return new RegExp(`^${Ge}T(?:${n})$`);
1006
1024
  }
1007
- const jr = (e) => {
1025
+ const Rr = (e) => {
1008
1026
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
1009
1027
  return new RegExp(`^${t}$`);
1010
- }, Rr = /^-?\d+$/, Cr = /^-?\d+(?:\.\d+)?$/, Dr = /^(?:true|false)$/i, xr = /^[^A-Z]*$/, Fr = /^[^a-z]*$/, I = /* @__PURE__ */ a("$ZodCheck", (e, t) => {
1028
+ }, Cr = /^-?\d+$/, Dr = /^-?\d+(?:\.\d+)?$/, xr = /^(?:true|false)$/i, Fr = /^[^A-Z]*$/, Mr = /^[^a-z]*$/, I = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
1011
1029
  var r;
1012
1030
  e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
1013
1031
  }), Ye = {
1014
1032
  number: "number",
1015
1033
  bigint: "bigint",
1016
1034
  object: "date"
1017
- }, Qe = /* @__PURE__ */ a("$ZodCheckLessThan", (e, t) => {
1035
+ }, Qe = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
1018
1036
  I.init(e, t);
1019
1037
  const r = Ye[typeof t.value];
1020
1038
  e._zod.onattach.push((n) => {
@@ -1031,7 +1049,7 @@ const jr = (e) => {
1031
1049
  continue: !t.abort
1032
1050
  });
1033
1051
  };
1034
- }), qe = /* @__PURE__ */ a("$ZodCheckGreaterThan", (e, t) => {
1052
+ }), qe = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
1035
1053
  I.init(e, t);
1036
1054
  const r = Ye[typeof t.value];
1037
1055
  e._zod.onattach.push((n) => {
@@ -1048,14 +1066,14 @@ const jr = (e) => {
1048
1066
  continue: !t.abort
1049
1067
  });
1050
1068
  };
1051
- }), Mr = /* @__PURE__ */ a("$ZodCheckMultipleOf", (e, t) => {
1069
+ }), Ur = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, t) => {
1052
1070
  I.init(e, t), e._zod.onattach.push((r) => {
1053
1071
  var n;
1054
1072
  (n = r._zod.bag).multipleOf ?? (n.multipleOf = t.value);
1055
1073
  }), e._zod.check = (r) => {
1056
1074
  if (typeof r.value != typeof t.value)
1057
1075
  throw new Error("Cannot mix number and bigint in multiple_of check.");
1058
- (typeof r.value == "bigint" ? r.value % t.value === BigInt(0) : Lt(r.value, t.value) === 0) || r.issues.push({
1076
+ (typeof r.value == "bigint" ? r.value % t.value === BigInt(0) : Vt(r.value, t.value) === 0) || r.issues.push({
1059
1077
  origin: typeof r.value,
1060
1078
  code: "not_multiple_of",
1061
1079
  divisor: t.value,
@@ -1064,12 +1082,12 @@ const jr = (e) => {
1064
1082
  continue: !t.abort
1065
1083
  });
1066
1084
  };
1067
- }), Ur = /* @__PURE__ */ a("$ZodCheckNumberFormat", (e, t) => {
1085
+ }), Jr = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
1068
1086
  I.init(e, t), t.format = t.format || "float64";
1069
- const r = t.format?.includes("int"), n = r ? "int" : "number", [o, i] = Gt[t.format];
1087
+ const r = t.format?.includes("int"), n = r ? "int" : "number", [o, i] = Kt[t.format];
1070
1088
  e._zod.onattach.push((s) => {
1071
1089
  const c = s._zod.bag;
1072
- c.format = t.format, c.minimum = o, c.maximum = i, r && (c.pattern = Rr);
1090
+ c.format = t.format, c.minimum = o, c.maximum = i, r && (c.pattern = Cr);
1073
1091
  }), e._zod.check = (s) => {
1074
1092
  const c = s.value;
1075
1093
  if (r) {
@@ -1125,7 +1143,7 @@ const jr = (e) => {
1125
1143
  continue: !t.abort
1126
1144
  });
1127
1145
  };
1128
- }), Jr = /* @__PURE__ */ a("$ZodCheckMaxLength", (e, t) => {
1146
+ }), Lr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
1129
1147
  var r;
1130
1148
  I.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
1131
1149
  const o = n.value;
@@ -1148,7 +1166,7 @@ const jr = (e) => {
1148
1166
  continue: !t.abort
1149
1167
  });
1150
1168
  };
1151
- }), Lr = /* @__PURE__ */ a("$ZodCheckMinLength", (e, t) => {
1169
+ }), Vr = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
1152
1170
  var r;
1153
1171
  I.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
1154
1172
  const o = n.value;
@@ -1171,7 +1189,7 @@ const jr = (e) => {
1171
1189
  continue: !t.abort
1172
1190
  });
1173
1191
  };
1174
- }), Vr = /* @__PURE__ */ a("$ZodCheckLengthEquals", (e, t) => {
1192
+ }), Hr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
1175
1193
  var r;
1176
1194
  I.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
1177
1195
  const o = n.value;
@@ -1194,7 +1212,7 @@ const jr = (e) => {
1194
1212
  continue: !t.abort
1195
1213
  });
1196
1214
  };
1197
- }), re = /* @__PURE__ */ a("$ZodCheckStringFormat", (e, t) => {
1215
+ }), re = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
1198
1216
  var r, n;
1199
1217
  I.init(e, t), e._zod.onattach.push((o) => {
1200
1218
  const i = o._zod.bag;
@@ -1211,7 +1229,7 @@ const jr = (e) => {
1211
1229
  });
1212
1230
  }) : (n = e._zod).check ?? (n.check = () => {
1213
1231
  });
1214
- }), Hr = /* @__PURE__ */ a("$ZodCheckRegex", (e, t) => {
1232
+ }), Br = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
1215
1233
  re.init(e, t), e._zod.check = (r) => {
1216
1234
  t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
1217
1235
  origin: "string",
@@ -1223,11 +1241,11 @@ const jr = (e) => {
1223
1241
  continue: !t.abort
1224
1242
  });
1225
1243
  };
1226
- }), Br = /* @__PURE__ */ a("$ZodCheckLowerCase", (e, t) => {
1227
- t.pattern ?? (t.pattern = xr), re.init(e, t);
1228
- }), Wr = /* @__PURE__ */ a("$ZodCheckUpperCase", (e, t) => {
1244
+ }), Wr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
1229
1245
  t.pattern ?? (t.pattern = Fr), re.init(e, t);
1230
- }), Gr = /* @__PURE__ */ a("$ZodCheckIncludes", (e, t) => {
1246
+ }), Gr = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
1247
+ t.pattern ?? (t.pattern = Mr), re.init(e, t);
1248
+ }), Kr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
1231
1249
  I.init(e, t);
1232
1250
  const r = X(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
1233
1251
  t.pattern = n, e._zod.onattach.push((o) => {
@@ -1244,7 +1262,7 @@ const jr = (e) => {
1244
1262
  continue: !t.abort
1245
1263
  });
1246
1264
  };
1247
- }), Kr = /* @__PURE__ */ a("$ZodCheckStartsWith", (e, t) => {
1265
+ }), Yr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
1248
1266
  I.init(e, t);
1249
1267
  const r = new RegExp(`^${X(t.prefix)}.*`);
1250
1268
  t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
@@ -1261,7 +1279,7 @@ const jr = (e) => {
1261
1279
  continue: !t.abort
1262
1280
  });
1263
1281
  };
1264
- }), Yr = /* @__PURE__ */ a("$ZodCheckEndsWith", (e, t) => {
1282
+ }), Qr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
1265
1283
  I.init(e, t);
1266
1284
  const r = new RegExp(`.*${X(t.suffix)}$`);
1267
1285
  t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
@@ -1278,12 +1296,12 @@ const jr = (e) => {
1278
1296
  continue: !t.abort
1279
1297
  });
1280
1298
  };
1281
- }), Qr = /* @__PURE__ */ a("$ZodCheckOverwrite", (e, t) => {
1299
+ }), qr = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
1282
1300
  I.init(e, t), e._zod.check = (r) => {
1283
1301
  r.value = t.tx(r.value);
1284
1302
  };
1285
1303
  });
1286
- class qr {
1304
+ class Xr {
1287
1305
  constructor(t = []) {
1288
1306
  this.content = [], this.indent = 0, this && (this.args = t);
1289
1307
  }
@@ -1306,13 +1324,13 @@ class qr {
1306
1324
  `));
1307
1325
  }
1308
1326
  }
1309
- const Xr = {
1327
+ const en = {
1310
1328
  major: 4,
1311
1329
  minor: 3,
1312
1330
  patch: 6
1313
- }, y = /* @__PURE__ */ a("$ZodType", (e, t) => {
1331
+ }, y = /* @__PURE__ */ u("$ZodType", (e, t) => {
1314
1332
  var r;
1315
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Xr;
1333
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = en;
1316
1334
  const n = [...e._zod.def.checks ?? []];
1317
1335
  e._zod.traits.has("$ZodCheck") && n.unshift(e);
1318
1336
  for (const o of n)
@@ -1323,7 +1341,7 @@ const Xr = {
1323
1341
  e._zod.run = e._zod.parse;
1324
1342
  });
1325
1343
  else {
1326
- const o = (s, c, u) => {
1344
+ const o = (s, c, a) => {
1327
1345
  let l = F(s), f;
1328
1346
  for (const m of c) {
1329
1347
  if (m._zod.def.when) {
@@ -1332,7 +1350,7 @@ const Xr = {
1332
1350
  } else if (l)
1333
1351
  continue;
1334
1352
  const d = s.issues.length, p = m._zod.check(s);
1335
- if (p instanceof Promise && u?.async === !1)
1353
+ if (p instanceof Promise && a?.async === !1)
1336
1354
  throw new M();
1337
1355
  if (f || p instanceof Promise)
1338
1356
  f = (f ?? Promise.resolve()).then(async () => {
@@ -1345,16 +1363,16 @@ const Xr = {
1345
1363
  }
1346
1364
  }
1347
1365
  return f ? f.then(() => s) : s;
1348
- }, i = (s, c, u) => {
1366
+ }, i = (s, c, a) => {
1349
1367
  if (F(s))
1350
1368
  return s.aborted = !0, s;
1351
- const l = o(c, n, u);
1369
+ const l = o(c, n, a);
1352
1370
  if (l instanceof Promise) {
1353
- if (u.async === !1)
1371
+ if (a.async === !1)
1354
1372
  throw new M();
1355
- return l.then((f) => e._zod.parse(f, u));
1373
+ return l.then((f) => e._zod.parse(f, a));
1356
1374
  }
1357
- return e._zod.parse(l, u);
1375
+ return e._zod.parse(l, a);
1358
1376
  };
1359
1377
  e._zod.run = (s, c) => {
1360
1378
  if (c.skipChecks)
@@ -1363,29 +1381,29 @@ const Xr = {
1363
1381
  const l = e._zod.parse({ value: s.value, issues: [] }, { ...c, skipChecks: !0 });
1364
1382
  return l instanceof Promise ? l.then((f) => i(f, s, c)) : i(l, s, c);
1365
1383
  }
1366
- const u = e._zod.parse(s, c);
1367
- if (u instanceof Promise) {
1384
+ const a = e._zod.parse(s, c);
1385
+ if (a instanceof Promise) {
1368
1386
  if (c.async === !1)
1369
1387
  throw new M();
1370
- return u.then((l) => o(l, n, c));
1388
+ return a.then((l) => o(l, n, c));
1371
1389
  }
1372
- return o(u, n, c);
1390
+ return o(a, n, c);
1373
1391
  };
1374
1392
  }
1375
1393
  _(e, "~standard", () => ({
1376
1394
  validate: (o) => {
1377
1395
  try {
1378
- const i = or(e, o);
1396
+ const i = sr(e, o);
1379
1397
  return i.success ? { value: i.data } : { issues: i.error?.issues };
1380
1398
  } catch {
1381
- return sr(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
1399
+ return ir(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
1382
1400
  }
1383
1401
  },
1384
1402
  vendor: "zod",
1385
1403
  version: 1
1386
1404
  }));
1387
- }), ge = /* @__PURE__ */ a("$ZodString", (e, t) => {
1388
- y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? jr(e._zod.bag), e._zod.parse = (r, n) => {
1405
+ }), ge = /* @__PURE__ */ u("$ZodString", (e, t) => {
1406
+ y.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Rr(e._zod.bag), e._zod.parse = (r, n) => {
1389
1407
  if (t.coerce)
1390
1408
  try {
1391
1409
  r.value = String(r.value);
@@ -1398,11 +1416,11 @@ const Xr = {
1398
1416
  inst: e
1399
1417
  }), r;
1400
1418
  };
1401
- }), v = /* @__PURE__ */ a("$ZodStringFormat", (e, t) => {
1419
+ }), v = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
1402
1420
  re.init(e, t), ge.init(e, t);
1403
- }), en = /* @__PURE__ */ a("$ZodGUID", (e, t) => {
1404
- t.pattern ?? (t.pattern = wr), v.init(e, t);
1405
- }), tn = /* @__PURE__ */ a("$ZodUUID", (e, t) => {
1421
+ }), tn = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
1422
+ t.pattern ?? (t.pattern = zr), v.init(e, t);
1423
+ }), rn = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
1406
1424
  if (t.version) {
1407
1425
  const n = {
1408
1426
  v1: 1,
@@ -1420,9 +1438,9 @@ const Xr = {
1420
1438
  } else
1421
1439
  t.pattern ?? (t.pattern = be());
1422
1440
  v.init(e, t);
1423
- }), rn = /* @__PURE__ */ a("$ZodEmail", (e, t) => {
1424
- t.pattern ?? (t.pattern = zr), v.init(e, t);
1425
- }), nn = /* @__PURE__ */ a("$ZodURL", (e, t) => {
1441
+ }), nn = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
1442
+ t.pattern ?? (t.pattern = kr), v.init(e, t);
1443
+ }), on = /* @__PURE__ */ u("$ZodURL", (e, t) => {
1426
1444
  v.init(e, t), e._zod.check = (r) => {
1427
1445
  try {
1428
1446
  const n = r.value.trim(), o = new URL(n);
@@ -1454,32 +1472,32 @@ const Xr = {
1454
1472
  });
1455
1473
  }
1456
1474
  };
1457
- }), on = /* @__PURE__ */ a("$ZodEmoji", (e, t) => {
1458
- t.pattern ?? (t.pattern = $r()), v.init(e, t);
1459
- }), sn = /* @__PURE__ */ a("$ZodNanoID", (e, t) => {
1460
- t.pattern ?? (t.pattern = br), v.init(e, t);
1461
- }), cn = /* @__PURE__ */ a("$ZodCUID", (e, t) => {
1462
- t.pattern ?? (t.pattern = pr), v.init(e, t);
1463
- }), un = /* @__PURE__ */ a("$ZodCUID2", (e, t) => {
1475
+ }), sn = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
1476
+ t.pattern ?? (t.pattern = Zr()), v.init(e, t);
1477
+ }), cn = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
1478
+ t.pattern ?? (t.pattern = yr), v.init(e, t);
1479
+ }), an = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
1464
1480
  t.pattern ?? (t.pattern = mr), v.init(e, t);
1465
- }), an = /* @__PURE__ */ a("$ZodULID", (e, t) => {
1481
+ }), un = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
1466
1482
  t.pattern ?? (t.pattern = gr), v.init(e, t);
1467
- }), ln = /* @__PURE__ */ a("$ZodXID", (e, t) => {
1483
+ }), ln = /* @__PURE__ */ u("$ZodULID", (e, t) => {
1468
1484
  t.pattern ?? (t.pattern = _r), v.init(e, t);
1469
- }), fn = /* @__PURE__ */ a("$ZodKSUID", (e, t) => {
1485
+ }), fn = /* @__PURE__ */ u("$ZodXID", (e, t) => {
1470
1486
  t.pattern ?? (t.pattern = vr), v.init(e, t);
1471
- }), hn = /* @__PURE__ */ a("$ZodISODateTime", (e, t) => {
1487
+ }), hn = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
1488
+ t.pattern ?? (t.pattern = br), v.init(e, t);
1489
+ }), dn = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
1490
+ t.pattern ?? (t.pattern = jr(t)), v.init(e, t);
1491
+ }), pn = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
1492
+ t.pattern ?? (t.pattern = Ar), v.init(e, t);
1493
+ }), mn = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
1472
1494
  t.pattern ?? (t.pattern = Nr(t)), v.init(e, t);
1473
- }), dn = /* @__PURE__ */ a("$ZodISODate", (e, t) => {
1474
- t.pattern ?? (t.pattern = Tr), v.init(e, t);
1475
- }), pn = /* @__PURE__ */ a("$ZodISOTime", (e, t) => {
1476
- t.pattern ?? (t.pattern = Ar(t)), v.init(e, t);
1477
- }), mn = /* @__PURE__ */ a("$ZodISODuration", (e, t) => {
1478
- t.pattern ?? (t.pattern = yr), v.init(e, t);
1479
- }), gn = /* @__PURE__ */ a("$ZodIPv4", (e, t) => {
1480
- t.pattern ?? (t.pattern = Zr), v.init(e, t), e._zod.bag.format = "ipv4";
1481
- }), _n = /* @__PURE__ */ a("$ZodIPv6", (e, t) => {
1482
- t.pattern ?? (t.pattern = Sr), v.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (r) => {
1495
+ }), gn = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
1496
+ t.pattern ?? (t.pattern = wr), v.init(e, t);
1497
+ }), _n = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
1498
+ t.pattern ?? (t.pattern = Sr), v.init(e, t), e._zod.bag.format = "ipv4";
1499
+ }), vn = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
1500
+ t.pattern ?? (t.pattern = Ir), v.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (r) => {
1483
1501
  try {
1484
1502
  new URL(`http://[${r.value}]`);
1485
1503
  } catch {
@@ -1492,10 +1510,10 @@ const Xr = {
1492
1510
  });
1493
1511
  }
1494
1512
  };
1495
- }), vn = /* @__PURE__ */ a("$ZodCIDRv4", (e, t) => {
1496
- t.pattern ?? (t.pattern = Ir), v.init(e, t);
1497
- }), bn = /* @__PURE__ */ a("$ZodCIDRv6", (e, t) => {
1498
- t.pattern ?? (t.pattern = Or), v.init(e, t), e._zod.check = (r) => {
1513
+ }), bn = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
1514
+ t.pattern ?? (t.pattern = Or), v.init(e, t);
1515
+ }), yn = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
1516
+ t.pattern ?? (t.pattern = Er), v.init(e, t), e._zod.check = (r) => {
1499
1517
  const n = r.value.split("/");
1500
1518
  try {
1501
1519
  if (n.length !== 2)
@@ -1531,8 +1549,8 @@ function Xe(e) {
1531
1549
  return !1;
1532
1550
  }
1533
1551
  }
1534
- const yn = /* @__PURE__ */ a("$ZodBase64", (e, t) => {
1535
- t.pattern ?? (t.pattern = Er), v.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
1552
+ const wn = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1553
+ t.pattern ?? (t.pattern = Pr), v.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
1536
1554
  Xe(r.value) || r.issues.push({
1537
1555
  code: "invalid_format",
1538
1556
  format: "base64",
@@ -1542,15 +1560,15 @@ const yn = /* @__PURE__ */ a("$ZodBase64", (e, t) => {
1542
1560
  });
1543
1561
  };
1544
1562
  });
1545
- function wn(e) {
1563
+ function zn(e) {
1546
1564
  if (!We.test(e))
1547
1565
  return !1;
1548
1566
  const t = e.replace(/[-_]/g, (n) => n === "-" ? "+" : "/"), r = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1549
1567
  return Xe(r);
1550
1568
  }
1551
- const zn = /* @__PURE__ */ a("$ZodBase64URL", (e, t) => {
1569
+ const kn = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1552
1570
  t.pattern ?? (t.pattern = We), v.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (r) => {
1553
- wn(r.value) || r.issues.push({
1571
+ zn(r.value) || r.issues.push({
1554
1572
  code: "invalid_format",
1555
1573
  format: "base64url",
1556
1574
  input: r.value,
@@ -1558,10 +1576,10 @@ const zn = /* @__PURE__ */ a("$ZodBase64URL", (e, t) => {
1558
1576
  continue: !t.abort
1559
1577
  });
1560
1578
  };
1561
- }), kn = /* @__PURE__ */ a("$ZodE164", (e, t) => {
1562
- t.pattern ?? (t.pattern = Pr), v.init(e, t);
1579
+ }), $n = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1580
+ t.pattern ?? (t.pattern = Tr), v.init(e, t);
1563
1581
  });
1564
- function $n(e, t = null) {
1582
+ function Zn(e, t = null) {
1565
1583
  try {
1566
1584
  const r = e.split(".");
1567
1585
  if (r.length !== 3)
@@ -1575,9 +1593,9 @@ function $n(e, t = null) {
1575
1593
  return !1;
1576
1594
  }
1577
1595
  }
1578
- const Zn = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1596
+ const Sn = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1579
1597
  v.init(e, t), e._zod.check = (r) => {
1580
- $n(r.value, t.alg) || r.issues.push({
1598
+ Zn(r.value, t.alg) || r.issues.push({
1581
1599
  code: "invalid_format",
1582
1600
  format: "jwt",
1583
1601
  input: r.value,
@@ -1585,8 +1603,8 @@ const Zn = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1585
1603
  continue: !t.abort
1586
1604
  });
1587
1605
  };
1588
- }), et = /* @__PURE__ */ a("$ZodNumber", (e, t) => {
1589
- y.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Cr, e._zod.parse = (r, n) => {
1606
+ }), et = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
1607
+ y.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Dr, e._zod.parse = (r, n) => {
1590
1608
  if (t.coerce)
1591
1609
  try {
1592
1610
  r.value = Number(r.value);
@@ -1604,10 +1622,10 @@ const Zn = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1604
1622
  ...i ? { received: i } : {}
1605
1623
  }), r;
1606
1624
  };
1607
- }), Sn = /* @__PURE__ */ a("$ZodNumberFormat", (e, t) => {
1608
- Ur.init(e, t), et.init(e, t);
1609
- }), In = /* @__PURE__ */ a("$ZodBoolean", (e, t) => {
1610
- y.init(e, t), e._zod.pattern = Dr, e._zod.parse = (r, n) => {
1625
+ }), In = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
1626
+ Jr.init(e, t), et.init(e, t);
1627
+ }), On = /* @__PURE__ */ u("$ZodBoolean", (e, t) => {
1628
+ y.init(e, t), e._zod.pattern = xr, e._zod.parse = (r, n) => {
1611
1629
  if (t.coerce)
1612
1630
  try {
1613
1631
  r.value = !!r.value;
@@ -1621,9 +1639,9 @@ const Zn = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1621
1639
  inst: e
1622
1640
  }), r;
1623
1641
  };
1624
- }), On = /* @__PURE__ */ a("$ZodUnknown", (e, t) => {
1642
+ }), En = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1625
1643
  y.init(e, t), e._zod.parse = (r) => r;
1626
- }), En = /* @__PURE__ */ a("$ZodNever", (e, t) => {
1644
+ }), Pn = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1627
1645
  y.init(e, t), e._zod.parse = (r, n) => (r.issues.push({
1628
1646
  expected: "never",
1629
1647
  code: "invalid_type",
@@ -1634,7 +1652,7 @@ const Zn = /* @__PURE__ */ a("$ZodJWT", (e, t) => {
1634
1652
  function ye(e, t, r) {
1635
1653
  e.issues.length && t.issues.push(...Le(r, e.issues)), t.value[r] = e.value;
1636
1654
  }
1637
- const Pn = /* @__PURE__ */ a("$ZodArray", (e, t) => {
1655
+ const Tn = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1638
1656
  y.init(e, t), e._zod.parse = (r, n) => {
1639
1657
  const o = r.value;
1640
1658
  if (!Array.isArray(o))
@@ -1647,11 +1665,11 @@ const Pn = /* @__PURE__ */ a("$ZodArray", (e, t) => {
1647
1665
  r.value = Array(o.length);
1648
1666
  const i = [];
1649
1667
  for (let s = 0; s < o.length; s++) {
1650
- const c = o[s], u = t.element._zod.run({
1668
+ const c = o[s], a = t.element._zod.run({
1651
1669
  value: c,
1652
1670
  issues: []
1653
1671
  }, n);
1654
- u instanceof Promise ? i.push(u.then((l) => ye(l, r, s))) : ye(u, r, s);
1672
+ a instanceof Promise ? i.push(a.then((l) => ye(l, r, s))) : ye(a, r, s);
1655
1673
  }
1656
1674
  return i.length ? Promise.all(i).then(() => r) : r;
1657
1675
  };
@@ -1669,7 +1687,7 @@ function tt(e) {
1669
1687
  for (const n of t)
1670
1688
  if (!e.shape?.[n]?._zod?.traits?.has("$ZodType"))
1671
1689
  throw new Error(`Invalid element at key "${n}": expected a Zod schema`);
1672
- const r = Wt(e.shape);
1690
+ const r = Gt(e.shape);
1673
1691
  return {
1674
1692
  ...e,
1675
1693
  keys: t,
@@ -1679,7 +1697,7 @@ function tt(e) {
1679
1697
  };
1680
1698
  }
1681
1699
  function rt(e, t, r, n, o, i) {
1682
- const s = [], c = o.keySet, u = o.catchall._zod, l = u.def.type, f = u.optout === "optional";
1700
+ const s = [], c = o.keySet, a = o.catchall._zod, l = a.def.type, f = a.optout === "optional";
1683
1701
  for (const m in t) {
1684
1702
  if (c.has(m))
1685
1703
  continue;
@@ -1687,7 +1705,7 @@ function rt(e, t, r, n, o, i) {
1687
1705
  s.push(m);
1688
1706
  continue;
1689
1707
  }
1690
- const d = u.run({ value: t[m], issues: [] }, n);
1708
+ const d = a.run({ value: t[m], issues: [] }, n);
1691
1709
  d instanceof Promise ? e.push(d.then((p) => Y(p, r, m, t, f))) : Y(d, r, m, t, f);
1692
1710
  }
1693
1711
  return s.length && r.issues.push({
@@ -1697,34 +1715,34 @@ function rt(e, t, r, n, o, i) {
1697
1715
  inst: i
1698
1716
  }), e.length ? Promise.all(e).then(() => r) : r;
1699
1717
  }
1700
- const Tn = /* @__PURE__ */ a("$ZodObject", (e, t) => {
1718
+ const An = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1701
1719
  if (y.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1702
1720
  const c = t.shape;
1703
1721
  Object.defineProperty(t, "shape", {
1704
1722
  get: () => {
1705
- const u = { ...c };
1723
+ const a = { ...c };
1706
1724
  return Object.defineProperty(t, "shape", {
1707
- value: u
1708
- }), u;
1725
+ value: a
1726
+ }), a;
1709
1727
  }
1710
1728
  });
1711
1729
  }
1712
1730
  const n = le(() => tt(t));
1713
1731
  _(e._zod, "propValues", () => {
1714
- const c = t.shape, u = {};
1732
+ const c = t.shape, a = {};
1715
1733
  for (const l in c) {
1716
1734
  const f = c[l]._zod;
1717
1735
  if (f.values) {
1718
- u[l] ?? (u[l] = /* @__PURE__ */ new Set());
1736
+ a[l] ?? (a[l] = /* @__PURE__ */ new Set());
1719
1737
  for (const m of f.values)
1720
- u[l].add(m);
1738
+ a[l].add(m);
1721
1739
  }
1722
1740
  }
1723
- return u;
1741
+ return a;
1724
1742
  });
1725
1743
  const o = K, i = t.catchall;
1726
1744
  let s;
1727
- e._zod.parse = (c, u) => {
1745
+ e._zod.parse = (c, a) => {
1728
1746
  s ?? (s = n.value);
1729
1747
  const l = c.value;
1730
1748
  if (!o(l))
@@ -1737,15 +1755,15 @@ const Tn = /* @__PURE__ */ a("$ZodObject", (e, t) => {
1737
1755
  c.value = {};
1738
1756
  const f = [], m = s.shape;
1739
1757
  for (const d of s.keys) {
1740
- const p = m[d], $ = p._zod.optout === "optional", z = p._zod.run({ value: l[d], issues: [] }, u);
1758
+ const p = m[d], $ = p._zod.optout === "optional", z = p._zod.run({ value: l[d], issues: [] }, a);
1741
1759
  z instanceof Promise ? f.push(z.then((H) => Y(H, c, d, l, $))) : Y(z, c, d, l, $);
1742
1760
  }
1743
- return i ? rt(f, l, c, u, n.value, e) : f.length ? Promise.all(f).then(() => c) : c;
1761
+ return i ? rt(f, l, c, a, n.value, e) : f.length ? Promise.all(f).then(() => c) : c;
1744
1762
  };
1745
- }), An = /* @__PURE__ */ a("$ZodObjectJIT", (e, t) => {
1746
- Tn.init(e, t);
1763
+ }), Nn = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1764
+ An.init(e, t);
1747
1765
  const r = e._zod.parse, n = le(() => tt(t)), o = (d) => {
1748
- const p = new qr(["shape", "payload", "ctx"]), $ = n.value, z = (T) => {
1766
+ const p = new Xr(["shape", "payload", "ctx"]), $ = n.value, z = (T) => {
1749
1767
  const S = ve(T);
1750
1768
  return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
1751
1769
  };
@@ -1798,7 +1816,7 @@ const Tn = /* @__PURE__ */ a("$ZodObject", (e, t) => {
1798
1816
  return (T, S) => bt(d, T, S);
1799
1817
  };
1800
1818
  let i;
1801
- const s = K, c = !Fe.jitless, l = c && Ht.value, f = t.catchall;
1819
+ const s = K, c = !Fe.jitless, l = c && Bt.value, f = t.catchall;
1802
1820
  let m;
1803
1821
  e._zod.parse = (d, p) => {
1804
1822
  m ?? (m = n.value);
@@ -1823,7 +1841,7 @@ function we(e, t, r, n) {
1823
1841
  errors: e.map((i) => i.issues.map((s) => C(s, n, R())))
1824
1842
  }), t);
1825
1843
  }
1826
- const Nn = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1844
+ const jn = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1827
1845
  y.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
1828
1846
  if (t.options.every((o) => o._zod.values))
1829
1847
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
@@ -1839,8 +1857,8 @@ const Nn = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1839
1857
  return n(o, i);
1840
1858
  let s = !1;
1841
1859
  const c = [];
1842
- for (const u of t.options) {
1843
- const l = u._zod.run({
1860
+ for (const a of t.options) {
1861
+ const l = a._zod.run({
1844
1862
  value: o.value,
1845
1863
  issues: []
1846
1864
  }, i);
@@ -1852,12 +1870,12 @@ const Nn = /* @__PURE__ */ a("$ZodUnion", (e, t) => {
1852
1870
  c.push(l);
1853
1871
  }
1854
1872
  }
1855
- return s ? Promise.all(c).then((u) => we(u, o, e, i)) : we(c, o, e, i);
1873
+ return s ? Promise.all(c).then((a) => we(a, o, e, i)) : we(c, o, e, i);
1856
1874
  };
1857
- }), jn = /* @__PURE__ */ a("$ZodIntersection", (e, t) => {
1875
+ }), Rn = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1858
1876
  y.init(e, t), e._zod.parse = (r, n) => {
1859
1877
  const o = r.value, i = t.left._zod.run({ value: o, issues: [] }, n), s = t.right._zod.run({ value: o, issues: [] }, n);
1860
- return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([u, l]) => ze(r, u, l)) : ze(r, i, s);
1878
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, l]) => ze(r, a, l)) : ze(r, i, s);
1861
1879
  };
1862
1880
  });
1863
1881
  function ce(e, t) {
@@ -1901,14 +1919,14 @@ function ze(e, t, r) {
1901
1919
  for (const c of t.issues)
1902
1920
  if (c.code === "unrecognized_keys") {
1903
1921
  o ?? (o = c);
1904
- for (const u of c.keys)
1905
- n.has(u) || n.set(u, {}), n.get(u).l = !0;
1922
+ for (const a of c.keys)
1923
+ n.has(a) || n.set(a, {}), n.get(a).l = !0;
1906
1924
  } else
1907
1925
  e.issues.push(c);
1908
1926
  for (const c of r.issues)
1909
1927
  if (c.code === "unrecognized_keys")
1910
- for (const u of c.keys)
1911
- n.has(u) || n.set(u, {}), n.get(u).r = !0;
1928
+ for (const a of c.keys)
1929
+ n.has(a) || n.set(a, {}), n.get(a).r = !0;
1912
1930
  else
1913
1931
  e.issues.push(c);
1914
1932
  const i = [...n].filter(([, c]) => c.l && c.r).map(([c]) => c);
@@ -1919,10 +1937,10 @@ function ze(e, t, r) {
1919
1937
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
1920
1938
  return e.value = s.data, e;
1921
1939
  }
1922
- const Rn = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1940
+ const Cn = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1923
1941
  y.init(e, t);
1924
1942
  const r = Me(t.entries), n = new Set(r);
1925
- e._zod.values = n, e._zod.pattern = new RegExp(`^(${r.filter((o) => Bt.has(typeof o)).map((o) => typeof o == "string" ? X(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1943
+ e._zod.values = n, e._zod.pattern = new RegExp(`^(${r.filter((o) => Wt.has(typeof o)).map((o) => typeof o == "string" ? X(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1926
1944
  const s = o.value;
1927
1945
  return n.has(s) || o.issues.push({
1928
1946
  code: "invalid_value",
@@ -1931,7 +1949,7 @@ const Rn = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1931
1949
  inst: e
1932
1950
  }), o;
1933
1951
  };
1934
- }), Cn = /* @__PURE__ */ a("$ZodTransform", (e, t) => {
1952
+ }), Dn = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1935
1953
  y.init(e, t), e._zod.parse = (r, n) => {
1936
1954
  if (n.direction === "backward")
1937
1955
  throw new xe(e.constructor.name);
@@ -1946,7 +1964,7 @@ const Rn = /* @__PURE__ */ a("$ZodEnum", (e, t) => {
1946
1964
  function ke(e, t) {
1947
1965
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1948
1966
  }
1949
- const nt = /* @__PURE__ */ a("$ZodOptional", (e, t) => {
1967
+ const nt = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1950
1968
  y.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
1951
1969
  const r = t.innerType._zod.pattern;
1952
1970
  return r ? new RegExp(`^(${he(r.source)})?$`) : void 0;
@@ -1957,14 +1975,14 @@ const nt = /* @__PURE__ */ a("$ZodOptional", (e, t) => {
1957
1975
  }
1958
1976
  return r.value === void 0 ? r : t.innerType._zod.run(r, n);
1959
1977
  };
1960
- }), Dn = /* @__PURE__ */ a("$ZodExactOptional", (e, t) => {
1978
+ }), xn = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1961
1979
  nt.init(e, t), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (r, n) => t.innerType._zod.run(r, n);
1962
- }), xn = /* @__PURE__ */ a("$ZodNullable", (e, t) => {
1980
+ }), Fn = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1963
1981
  y.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
1964
1982
  const r = t.innerType._zod.pattern;
1965
1983
  return r ? new RegExp(`^(${he(r.source)}|null)$`) : void 0;
1966
1984
  }), _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (r, n) => r.value === null ? r : t.innerType._zod.run(r, n);
1967
- }), Fn = /* @__PURE__ */ a("$ZodDefault", (e, t) => {
1985
+ }), Mn = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1968
1986
  y.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1969
1987
  if (n.direction === "backward")
1970
1988
  return t.innerType._zod.run(r, n);
@@ -1977,9 +1995,9 @@ const nt = /* @__PURE__ */ a("$ZodOptional", (e, t) => {
1977
1995
  function $e(e, t) {
1978
1996
  return e.value === void 0 && (e.value = t.defaultValue), e;
1979
1997
  }
1980
- const Mn = /* @__PURE__ */ a("$ZodPrefault", (e, t) => {
1998
+ const Un = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1981
1999
  y.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => (n.direction === "backward" || r.value === void 0 && (r.value = t.defaultValue), t.innerType._zod.run(r, n));
1982
- }), Un = /* @__PURE__ */ a("$ZodNonOptional", (e, t) => {
2000
+ }), Jn = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1983
2001
  y.init(e, t), _(e._zod, "values", () => {
1984
2002
  const r = t.innerType._zod.values;
1985
2003
  return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
@@ -1996,7 +2014,7 @@ function Ze(e, t) {
1996
2014
  inst: t
1997
2015
  }), e;
1998
2016
  }
1999
- const Jn = /* @__PURE__ */ a("$ZodCatch", (e, t) => {
2017
+ const Ln = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
2000
2018
  y.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
2001
2019
  if (n.direction === "backward")
2002
2020
  return t.innerType._zod.run(r, n);
@@ -2015,7 +2033,7 @@ const Jn = /* @__PURE__ */ a("$ZodCatch", (e, t) => {
2015
2033
  input: r.value
2016
2034
  }), r.issues = []), r);
2017
2035
  };
2018
- }), Ln = /* @__PURE__ */ a("$ZodPipe", (e, t) => {
2036
+ }), Vn = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
2019
2037
  y.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (r, n) => {
2020
2038
  if (n.direction === "backward") {
2021
2039
  const i = t.out._zod.run(r, n);
@@ -2028,7 +2046,7 @@ const Jn = /* @__PURE__ */ a("$ZodCatch", (e, t) => {
2028
2046
  function W(e, t, r) {
2029
2047
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, r);
2030
2048
  }
2031
- const Vn = /* @__PURE__ */ a("$ZodReadonly", (e, t) => {
2049
+ const Hn = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
2032
2050
  y.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (r, n) => {
2033
2051
  if (n.direction === "backward")
2034
2052
  return t.innerType._zod.run(r, n);
@@ -2039,7 +2057,7 @@ const Vn = /* @__PURE__ */ a("$ZodReadonly", (e, t) => {
2039
2057
  function Se(e) {
2040
2058
  return e.value = Object.freeze(e.value), e;
2041
2059
  }
2042
- const Hn = /* @__PURE__ */ a("$ZodCustom", (e, t) => {
2060
+ const Bn = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
2043
2061
  I.init(e, t), y.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
2044
2062
  const n = r.value, o = t.fn(n);
2045
2063
  if (o instanceof Promise)
@@ -2063,7 +2081,7 @@ function Ie(e, t, r, n) {
2063
2081
  }
2064
2082
  }
2065
2083
  var Oe;
2066
- class Bn {
2084
+ class Wn {
2067
2085
  constructor() {
2068
2086
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2069
2087
  }
@@ -2092,20 +2110,20 @@ class Bn {
2092
2110
  return this._map.has(t);
2093
2111
  }
2094
2112
  }
2095
- function Wn() {
2096
- return new Bn();
2113
+ function Gn() {
2114
+ return new Wn();
2097
2115
  }
2098
- (Oe = globalThis).__zod_globalRegistry ?? (Oe.__zod_globalRegistry = Wn());
2116
+ (Oe = globalThis).__zod_globalRegistry ?? (Oe.__zod_globalRegistry = Gn());
2099
2117
  const J = globalThis.__zod_globalRegistry;
2100
2118
  // @__NO_SIDE_EFFECTS__
2101
- function Gn(e, t) {
2119
+ function Kn(e, t) {
2102
2120
  return new e({
2103
2121
  type: "string",
2104
2122
  ...h(t)
2105
2123
  });
2106
2124
  }
2107
2125
  // @__NO_SIDE_EFFECTS__
2108
- function Kn(e, t) {
2126
+ function Yn(e, t) {
2109
2127
  return new e({
2110
2128
  type: "string",
2111
2129
  format: "email",
@@ -2125,7 +2143,7 @@ function Ee(e, t) {
2125
2143
  });
2126
2144
  }
2127
2145
  // @__NO_SIDE_EFFECTS__
2128
- function Yn(e, t) {
2146
+ function Qn(e, t) {
2129
2147
  return new e({
2130
2148
  type: "string",
2131
2149
  format: "uuid",
@@ -2135,7 +2153,7 @@ function Yn(e, t) {
2135
2153
  });
2136
2154
  }
2137
2155
  // @__NO_SIDE_EFFECTS__
2138
- function Qn(e, t) {
2156
+ function qn(e, t) {
2139
2157
  return new e({
2140
2158
  type: "string",
2141
2159
  format: "uuid",
@@ -2146,7 +2164,7 @@ function Qn(e, t) {
2146
2164
  });
2147
2165
  }
2148
2166
  // @__NO_SIDE_EFFECTS__
2149
- function qn(e, t) {
2167
+ function Xn(e, t) {
2150
2168
  return new e({
2151
2169
  type: "string",
2152
2170
  format: "uuid",
@@ -2157,7 +2175,7 @@ function qn(e, t) {
2157
2175
  });
2158
2176
  }
2159
2177
  // @__NO_SIDE_EFFECTS__
2160
- function Xn(e, t) {
2178
+ function eo(e, t) {
2161
2179
  return new e({
2162
2180
  type: "string",
2163
2181
  format: "uuid",
@@ -2168,7 +2186,7 @@ function Xn(e, t) {
2168
2186
  });
2169
2187
  }
2170
2188
  // @__NO_SIDE_EFFECTS__
2171
- function eo(e, t) {
2189
+ function to(e, t) {
2172
2190
  return new e({
2173
2191
  type: "string",
2174
2192
  format: "url",
@@ -2178,7 +2196,7 @@ function eo(e, t) {
2178
2196
  });
2179
2197
  }
2180
2198
  // @__NO_SIDE_EFFECTS__
2181
- function to(e, t) {
2199
+ function ro(e, t) {
2182
2200
  return new e({
2183
2201
  type: "string",
2184
2202
  format: "emoji",
@@ -2188,7 +2206,7 @@ function to(e, t) {
2188
2206
  });
2189
2207
  }
2190
2208
  // @__NO_SIDE_EFFECTS__
2191
- function ro(e, t) {
2209
+ function no(e, t) {
2192
2210
  return new e({
2193
2211
  type: "string",
2194
2212
  format: "nanoid",
@@ -2198,7 +2216,7 @@ function ro(e, t) {
2198
2216
  });
2199
2217
  }
2200
2218
  // @__NO_SIDE_EFFECTS__
2201
- function no(e, t) {
2219
+ function oo(e, t) {
2202
2220
  return new e({
2203
2221
  type: "string",
2204
2222
  format: "cuid",
@@ -2208,7 +2226,7 @@ function no(e, t) {
2208
2226
  });
2209
2227
  }
2210
2228
  // @__NO_SIDE_EFFECTS__
2211
- function oo(e, t) {
2229
+ function so(e, t) {
2212
2230
  return new e({
2213
2231
  type: "string",
2214
2232
  format: "cuid2",
@@ -2218,7 +2236,7 @@ function oo(e, t) {
2218
2236
  });
2219
2237
  }
2220
2238
  // @__NO_SIDE_EFFECTS__
2221
- function so(e, t) {
2239
+ function io(e, t) {
2222
2240
  return new e({
2223
2241
  type: "string",
2224
2242
  format: "ulid",
@@ -2228,7 +2246,7 @@ function so(e, t) {
2228
2246
  });
2229
2247
  }
2230
2248
  // @__NO_SIDE_EFFECTS__
2231
- function io(e, t) {
2249
+ function co(e, t) {
2232
2250
  return new e({
2233
2251
  type: "string",
2234
2252
  format: "xid",
@@ -2238,7 +2256,7 @@ function io(e, t) {
2238
2256
  });
2239
2257
  }
2240
2258
  // @__NO_SIDE_EFFECTS__
2241
- function co(e, t) {
2259
+ function ao(e, t) {
2242
2260
  return new e({
2243
2261
  type: "string",
2244
2262
  format: "ksuid",
@@ -2258,7 +2276,7 @@ function uo(e, t) {
2258
2276
  });
2259
2277
  }
2260
2278
  // @__NO_SIDE_EFFECTS__
2261
- function ao(e, t) {
2279
+ function lo(e, t) {
2262
2280
  return new e({
2263
2281
  type: "string",
2264
2282
  format: "ipv6",
@@ -2268,7 +2286,7 @@ function ao(e, t) {
2268
2286
  });
2269
2287
  }
2270
2288
  // @__NO_SIDE_EFFECTS__
2271
- function lo(e, t) {
2289
+ function fo(e, t) {
2272
2290
  return new e({
2273
2291
  type: "string",
2274
2292
  format: "cidrv4",
@@ -2278,7 +2296,7 @@ function lo(e, t) {
2278
2296
  });
2279
2297
  }
2280
2298
  // @__NO_SIDE_EFFECTS__
2281
- function fo(e, t) {
2299
+ function ho(e, t) {
2282
2300
  return new e({
2283
2301
  type: "string",
2284
2302
  format: "cidrv6",
@@ -2288,7 +2306,7 @@ function fo(e, t) {
2288
2306
  });
2289
2307
  }
2290
2308
  // @__NO_SIDE_EFFECTS__
2291
- function ho(e, t) {
2309
+ function po(e, t) {
2292
2310
  return new e({
2293
2311
  type: "string",
2294
2312
  format: "base64",
@@ -2298,7 +2316,7 @@ function ho(e, t) {
2298
2316
  });
2299
2317
  }
2300
2318
  // @__NO_SIDE_EFFECTS__
2301
- function po(e, t) {
2319
+ function mo(e, t) {
2302
2320
  return new e({
2303
2321
  type: "string",
2304
2322
  format: "base64url",
@@ -2308,7 +2326,7 @@ function po(e, t) {
2308
2326
  });
2309
2327
  }
2310
2328
  // @__NO_SIDE_EFFECTS__
2311
- function mo(e, t) {
2329
+ function go(e, t) {
2312
2330
  return new e({
2313
2331
  type: "string",
2314
2332
  format: "e164",
@@ -2318,7 +2336,7 @@ function mo(e, t) {
2318
2336
  });
2319
2337
  }
2320
2338
  // @__NO_SIDE_EFFECTS__
2321
- function go(e, t) {
2339
+ function _o(e, t) {
2322
2340
  return new e({
2323
2341
  type: "string",
2324
2342
  format: "jwt",
@@ -2328,7 +2346,7 @@ function go(e, t) {
2328
2346
  });
2329
2347
  }
2330
2348
  // @__NO_SIDE_EFFECTS__
2331
- function _o(e, t) {
2349
+ function vo(e, t) {
2332
2350
  return new e({
2333
2351
  type: "string",
2334
2352
  format: "datetime",
@@ -2340,7 +2358,7 @@ function _o(e, t) {
2340
2358
  });
2341
2359
  }
2342
2360
  // @__NO_SIDE_EFFECTS__
2343
- function vo(e, t) {
2361
+ function bo(e, t) {
2344
2362
  return new e({
2345
2363
  type: "string",
2346
2364
  format: "date",
@@ -2349,7 +2367,7 @@ function vo(e, t) {
2349
2367
  });
2350
2368
  }
2351
2369
  // @__NO_SIDE_EFFECTS__
2352
- function bo(e, t) {
2370
+ function yo(e, t) {
2353
2371
  return new e({
2354
2372
  type: "string",
2355
2373
  format: "time",
@@ -2359,7 +2377,7 @@ function bo(e, t) {
2359
2377
  });
2360
2378
  }
2361
2379
  // @__NO_SIDE_EFFECTS__
2362
- function yo(e, t) {
2380
+ function wo(e, t) {
2363
2381
  return new e({
2364
2382
  type: "string",
2365
2383
  format: "duration",
@@ -2368,7 +2386,7 @@ function yo(e, t) {
2368
2386
  });
2369
2387
  }
2370
2388
  // @__NO_SIDE_EFFECTS__
2371
- function wo(e, t) {
2389
+ function zo(e, t) {
2372
2390
  return new e({
2373
2391
  type: "number",
2374
2392
  checks: [],
@@ -2376,7 +2394,7 @@ function wo(e, t) {
2376
2394
  });
2377
2395
  }
2378
2396
  // @__NO_SIDE_EFFECTS__
2379
- function zo(e, t) {
2397
+ function ko(e, t) {
2380
2398
  return new e({
2381
2399
  type: "number",
2382
2400
  check: "number_format",
@@ -2386,20 +2404,20 @@ function zo(e, t) {
2386
2404
  });
2387
2405
  }
2388
2406
  // @__NO_SIDE_EFFECTS__
2389
- function ko(e, t) {
2407
+ function $o(e, t) {
2390
2408
  return new e({
2391
2409
  type: "boolean",
2392
2410
  ...h(t)
2393
2411
  });
2394
2412
  }
2395
2413
  // @__NO_SIDE_EFFECTS__
2396
- function $o(e) {
2414
+ function Zo(e) {
2397
2415
  return new e({
2398
2416
  type: "unknown"
2399
2417
  });
2400
2418
  }
2401
2419
  // @__NO_SIDE_EFFECTS__
2402
- function Zo(e, t) {
2420
+ function So(e, t) {
2403
2421
  return new e({
2404
2422
  type: "never",
2405
2423
  ...h(t)
@@ -2443,7 +2461,7 @@ function se(e, t) {
2443
2461
  }
2444
2462
  // @__NO_SIDE_EFFECTS__
2445
2463
  function Ae(e, t) {
2446
- return new Mr({
2464
+ return new Ur({
2447
2465
  check: "multiple_of",
2448
2466
  ...h(t),
2449
2467
  value: e
@@ -2451,7 +2469,7 @@ function Ae(e, t) {
2451
2469
  }
2452
2470
  // @__NO_SIDE_EFFECTS__
2453
2471
  function ot(e, t) {
2454
- return new Jr({
2472
+ return new Lr({
2455
2473
  check: "max_length",
2456
2474
  ...h(t),
2457
2475
  maximum: e
@@ -2459,7 +2477,7 @@ function ot(e, t) {
2459
2477
  }
2460
2478
  // @__NO_SIDE_EFFECTS__
2461
2479
  function Q(e, t) {
2462
- return new Lr({
2480
+ return new Vr({
2463
2481
  check: "min_length",
2464
2482
  ...h(t),
2465
2483
  minimum: e
@@ -2467,15 +2485,15 @@ function Q(e, t) {
2467
2485
  }
2468
2486
  // @__NO_SIDE_EFFECTS__
2469
2487
  function st(e, t) {
2470
- return new Vr({
2488
+ return new Hr({
2471
2489
  check: "length_equals",
2472
2490
  ...h(t),
2473
2491
  length: e
2474
2492
  });
2475
2493
  }
2476
2494
  // @__NO_SIDE_EFFECTS__
2477
- function So(e, t) {
2478
- return new Hr({
2495
+ function Io(e, t) {
2496
+ return new Br({
2479
2497
  check: "string_format",
2480
2498
  format: "regex",
2481
2499
  ...h(t),
@@ -2483,24 +2501,24 @@ function So(e, t) {
2483
2501
  });
2484
2502
  }
2485
2503
  // @__NO_SIDE_EFFECTS__
2486
- function Io(e) {
2487
- return new Br({
2504
+ function Oo(e) {
2505
+ return new Wr({
2488
2506
  check: "string_format",
2489
2507
  format: "lowercase",
2490
2508
  ...h(e)
2491
2509
  });
2492
2510
  }
2493
2511
  // @__NO_SIDE_EFFECTS__
2494
- function Oo(e) {
2495
- return new Wr({
2512
+ function Eo(e) {
2513
+ return new Gr({
2496
2514
  check: "string_format",
2497
2515
  format: "uppercase",
2498
2516
  ...h(e)
2499
2517
  });
2500
2518
  }
2501
2519
  // @__NO_SIDE_EFFECTS__
2502
- function Eo(e, t) {
2503
- return new Gr({
2520
+ function Po(e, t) {
2521
+ return new Kr({
2504
2522
  check: "string_format",
2505
2523
  format: "includes",
2506
2524
  ...h(t),
@@ -2508,8 +2526,8 @@ function Eo(e, t) {
2508
2526
  });
2509
2527
  }
2510
2528
  // @__NO_SIDE_EFFECTS__
2511
- function Po(e, t) {
2512
- return new Kr({
2529
+ function To(e, t) {
2530
+ return new Yr({
2513
2531
  check: "string_format",
2514
2532
  format: "starts_with",
2515
2533
  ...h(t),
@@ -2517,8 +2535,8 @@ function Po(e, t) {
2517
2535
  });
2518
2536
  }
2519
2537
  // @__NO_SIDE_EFFECTS__
2520
- function To(e, t) {
2521
- return new Yr({
2538
+ function Ao(e, t) {
2539
+ return new Qr({
2522
2540
  check: "string_format",
2523
2541
  format: "ends_with",
2524
2542
  ...h(t),
@@ -2527,33 +2545,33 @@ function To(e, t) {
2527
2545
  }
2528
2546
  // @__NO_SIDE_EFFECTS__
2529
2547
  function U(e) {
2530
- return new Qr({
2548
+ return new qr({
2531
2549
  check: "overwrite",
2532
2550
  tx: e
2533
2551
  });
2534
2552
  }
2535
2553
  // @__NO_SIDE_EFFECTS__
2536
- function Ao(e) {
2554
+ function No(e) {
2537
2555
  return /* @__PURE__ */ U((t) => t.normalize(e));
2538
2556
  }
2539
2557
  // @__NO_SIDE_EFFECTS__
2540
- function No() {
2558
+ function jo() {
2541
2559
  return /* @__PURE__ */ U((e) => e.trim());
2542
2560
  }
2543
2561
  // @__NO_SIDE_EFFECTS__
2544
- function jo() {
2562
+ function Ro() {
2545
2563
  return /* @__PURE__ */ U((e) => e.toLowerCase());
2546
2564
  }
2547
2565
  // @__NO_SIDE_EFFECTS__
2548
- function Ro() {
2566
+ function Co() {
2549
2567
  return /* @__PURE__ */ U((e) => e.toUpperCase());
2550
2568
  }
2551
2569
  // @__NO_SIDE_EFFECTS__
2552
- function Co() {
2553
- return /* @__PURE__ */ U((e) => Vt(e));
2570
+ function Do() {
2571
+ return /* @__PURE__ */ U((e) => Ht(e));
2554
2572
  }
2555
2573
  // @__NO_SIDE_EFFECTS__
2556
- function Do(e, t, r) {
2574
+ function xo(e, t, r) {
2557
2575
  return new e({
2558
2576
  type: "array",
2559
2577
  element: t,
@@ -2564,7 +2582,7 @@ function Do(e, t, r) {
2564
2582
  });
2565
2583
  }
2566
2584
  // @__NO_SIDE_EFFECTS__
2567
- function xo(e, t, r) {
2585
+ function Fo(e, t, r) {
2568
2586
  return new e({
2569
2587
  type: "custom",
2570
2588
  check: "custom",
@@ -2573,8 +2591,8 @@ function xo(e, t, r) {
2573
2591
  });
2574
2592
  }
2575
2593
  // @__NO_SIDE_EFFECTS__
2576
- function Fo(e) {
2577
- const t = /* @__PURE__ */ Mo((r) => (r.addIssue = (n) => {
2594
+ function Mo(e) {
2595
+ const t = /* @__PURE__ */ Uo((r) => (r.addIssue = (n) => {
2578
2596
  if (typeof n == "string")
2579
2597
  r.issues.push(V(n, r.value, t._zod.def));
2580
2598
  else {
@@ -2585,7 +2603,7 @@ function Fo(e) {
2585
2603
  return t;
2586
2604
  }
2587
2605
  // @__NO_SIDE_EFFECTS__
2588
- function Mo(e, t) {
2606
+ function Uo(e, t) {
2589
2607
  const r = new I({
2590
2608
  check: "custom",
2591
2609
  ...h(t)
@@ -2636,8 +2654,8 @@ function k(e, t, r = { path: [], schemaPath: [] }) {
2636
2654
  const m = e._zod.parent;
2637
2655
  m && (s.ref || (s.ref = m), k(m, t, f), t.seen.get(m).isParent = !0);
2638
2656
  }
2639
- const u = t.metadataRegistry.get(e);
2640
- return u && Object.assign(s.schema, u), t.io === "input" && Z(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((n = s.schema).default ?? (n.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
2657
+ const a = t.metadataRegistry.get(e);
2658
+ return a && Object.assign(s.schema, a), t.io === "input" && Z(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((n = s.schema).default ?? (n.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
2641
2659
  }
2642
2660
  function ct(e, t) {
2643
2661
  const r = e.seen.get(t);
@@ -2647,8 +2665,8 @@ function ct(e, t) {
2647
2665
  for (const s of e.seen.entries()) {
2648
2666
  const c = e.metadataRegistry.get(s[0])?.id;
2649
2667
  if (c) {
2650
- const u = n.get(c);
2651
- if (u && u !== s[0])
2668
+ const a = n.get(c);
2669
+ if (a && a !== s[0])
2652
2670
  throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2653
2671
  n.set(c, s[0]);
2654
2672
  }
@@ -2669,12 +2687,12 @@ function ct(e, t) {
2669
2687
  }, i = (s) => {
2670
2688
  if (s[1].schema.$ref)
2671
2689
  return;
2672
- const c = s[1], { ref: u, defId: l } = o(s);
2690
+ const c = s[1], { ref: a, defId: l } = o(s);
2673
2691
  c.def = { ...c.schema }, l && (c.defId = l);
2674
2692
  const f = c.schema;
2675
2693
  for (const m in f)
2676
2694
  delete f[m];
2677
- f.$ref = u;
2695
+ f.$ref = a;
2678
2696
  };
2679
2697
  if (e.cycles === "throw")
2680
2698
  for (const s of e.seen.entries()) {
@@ -2711,7 +2729,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2711
2729
  }
2712
2730
  }
2713
2731
  }
2714
- function ut(e, t) {
2732
+ function at(e, t) {
2715
2733
  const r = e.seen.get(t);
2716
2734
  if (!r)
2717
2735
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -2719,28 +2737,28 @@ function ut(e, t) {
2719
2737
  const c = e.seen.get(s);
2720
2738
  if (c.ref === null)
2721
2739
  return;
2722
- const u = c.def ?? c.schema, l = { ...u }, f = c.ref;
2740
+ const a = c.def ?? c.schema, l = { ...a }, f = c.ref;
2723
2741
  if (c.ref = null, f) {
2724
2742
  n(f);
2725
2743
  const d = e.seen.get(f), p = d.schema;
2726
- if (p.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (u.allOf = u.allOf ?? [], u.allOf.push(p)) : Object.assign(u, p), Object.assign(u, l), s._zod.parent === f)
2727
- for (const z in u)
2728
- z === "$ref" || z === "allOf" || z in l || delete u[z];
2744
+ if (p.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(p)) : Object.assign(a, p), Object.assign(a, l), s._zod.parent === f)
2745
+ for (const z in a)
2746
+ z === "$ref" || z === "allOf" || z in l || delete a[z];
2729
2747
  if (p.$ref && d.def)
2730
- for (const z in u)
2731
- z === "$ref" || z === "allOf" || z in d.def && JSON.stringify(u[z]) === JSON.stringify(d.def[z]) && delete u[z];
2748
+ for (const z in a)
2749
+ z === "$ref" || z === "allOf" || z in d.def && JSON.stringify(a[z]) === JSON.stringify(d.def[z]) && delete a[z];
2732
2750
  }
2733
2751
  const m = s._zod.parent;
2734
2752
  if (m && m !== f) {
2735
2753
  n(m);
2736
2754
  const d = e.seen.get(m);
2737
- if (d?.schema.$ref && (u.$ref = d.schema.$ref, d.def))
2738
- for (const p in u)
2739
- p === "$ref" || p === "allOf" || p in d.def && JSON.stringify(u[p]) === JSON.stringify(d.def[p]) && delete u[p];
2755
+ if (d?.schema.$ref && (a.$ref = d.schema.$ref, d.def))
2756
+ for (const p in a)
2757
+ p === "$ref" || p === "allOf" || p in d.def && JSON.stringify(a[p]) === JSON.stringify(d.def[p]) && delete a[p];
2740
2758
  }
2741
2759
  e.override({
2742
2760
  zodSchema: s,
2743
- jsonSchema: u,
2761
+ jsonSchema: a,
2744
2762
  path: c.path ?? []
2745
2763
  });
2746
2764
  };
@@ -2819,25 +2837,25 @@ function Z(e, t) {
2819
2837
  }
2820
2838
  return !1;
2821
2839
  }
2822
- const Uo = (e, t = {}) => (r) => {
2840
+ const Jo = (e, t = {}) => (r) => {
2823
2841
  const n = it({ ...r, processors: t });
2824
- return k(e, n), ct(n, e), ut(n, e);
2842
+ return k(e, n), ct(n, e), at(n, e);
2825
2843
  }, q = (e, t, r = {}) => (n) => {
2826
2844
  const { libraryOptions: o, target: i } = n ?? {}, s = it({ ...o ?? {}, target: i, io: t, processors: r });
2827
- return k(e, s), ct(s, e), ut(s, e);
2828
- }, Jo = {
2845
+ return k(e, s), ct(s, e), at(s, e);
2846
+ }, Lo = {
2829
2847
  guid: "uuid",
2830
2848
  url: "uri",
2831
2849
  datetime: "date-time",
2832
2850
  json_string: "json-string",
2833
2851
  regex: ""
2834
2852
  // do not set
2835
- }, Lo = (e, t, r, n) => {
2853
+ }, Vo = (e, t, r, n) => {
2836
2854
  const o = r;
2837
2855
  o.type = "string";
2838
- const { minimum: i, maximum: s, format: c, patterns: u, contentEncoding: l } = e._zod.bag;
2839
- if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), c && (o.format = Jo[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), l && (o.contentEncoding = l), u && u.size > 0) {
2840
- const f = [...u];
2856
+ const { minimum: i, maximum: s, format: c, patterns: a, contentEncoding: l } = e._zod.bag;
2857
+ if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), c && (o.format = Lo[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), l && (o.contentEncoding = l), a && a.size > 0) {
2858
+ const f = [...a];
2841
2859
  f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
2842
2860
  ...f.map((m) => ({
2843
2861
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
@@ -2845,27 +2863,27 @@ const Uo = (e, t = {}) => (r) => {
2845
2863
  }))
2846
2864
  ]);
2847
2865
  }
2848
- }, Vo = (e, t, r, n) => {
2849
- const o = r, { minimum: i, maximum: s, format: c, multipleOf: u, exclusiveMaximum: l, exclusiveMinimum: f } = e._zod.bag;
2850
- typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof f == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = f, o.exclusiveMinimum = !0) : o.exclusiveMinimum = f), typeof i == "number" && (o.minimum = i, typeof f == "number" && t.target !== "draft-04" && (f >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = l, o.exclusiveMaximum = !0) : o.exclusiveMaximum = l), typeof s == "number" && (o.maximum = s, typeof l == "number" && t.target !== "draft-04" && (l <= s ? delete o.maximum : delete o.exclusiveMaximum)), typeof u == "number" && (o.multipleOf = u);
2851
2866
  }, Ho = (e, t, r, n) => {
2852
- r.type = "boolean";
2867
+ const o = r, { minimum: i, maximum: s, format: c, multipleOf: a, exclusiveMaximum: l, exclusiveMinimum: f } = e._zod.bag;
2868
+ typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof f == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = f, o.exclusiveMinimum = !0) : o.exclusiveMinimum = f), typeof i == "number" && (o.minimum = i, typeof f == "number" && t.target !== "draft-04" && (f >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = l, o.exclusiveMaximum = !0) : o.exclusiveMaximum = l), typeof s == "number" && (o.maximum = s, typeof l == "number" && t.target !== "draft-04" && (l <= s ? delete o.maximum : delete o.exclusiveMaximum)), typeof a == "number" && (o.multipleOf = a);
2853
2869
  }, Bo = (e, t, r, n) => {
2854
- r.not = {};
2870
+ r.type = "boolean";
2855
2871
  }, Wo = (e, t, r, n) => {
2872
+ r.not = {};
2856
2873
  }, Go = (e, t, r, n) => {
2874
+ }, Ko = (e, t, r, n) => {
2857
2875
  const o = e._zod.def, i = Me(o.entries);
2858
2876
  i.every((s) => typeof s == "number") && (r.type = "number"), i.every((s) => typeof s == "string") && (r.type = "string"), r.enum = i;
2859
- }, Ko = (e, t, r, n) => {
2877
+ }, Yo = (e, t, r, n) => {
2860
2878
  if (t.unrepresentable === "throw")
2861
2879
  throw new Error("Custom types cannot be represented in JSON Schema");
2862
- }, Yo = (e, t, r, n) => {
2880
+ }, Qo = (e, t, r, n) => {
2863
2881
  if (t.unrepresentable === "throw")
2864
2882
  throw new Error("Transforms cannot be represented in JSON Schema");
2865
- }, Qo = (e, t, r, n) => {
2883
+ }, qo = (e, t, r, n) => {
2866
2884
  const o = r, i = e._zod.def, { minimum: s, maximum: c } = e._zod.bag;
2867
2885
  typeof s == "number" && (o.minItems = s), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = k(i.element, t, { ...n, path: [...n.path, "items"] });
2868
- }, qo = (e, t, r, n) => {
2886
+ }, Xo = (e, t, r, n) => {
2869
2887
  const o = r, i = e._zod.def;
2870
2888
  o.type = "object", o.properties = {};
2871
2889
  const s = i.shape;
@@ -2874,51 +2892,51 @@ const Uo = (e, t = {}) => (r) => {
2874
2892
  ...n,
2875
2893
  path: [...n.path, "properties", l]
2876
2894
  });
2877
- const c = new Set(Object.keys(s)), u = new Set([...c].filter((l) => {
2895
+ const c = new Set(Object.keys(s)), a = new Set([...c].filter((l) => {
2878
2896
  const f = i.shape[l]._zod;
2879
2897
  return t.io === "input" ? f.optin === void 0 : f.optout === void 0;
2880
2898
  }));
2881
- u.size > 0 && (o.required = Array.from(u)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = k(i.catchall, t, {
2899
+ a.size > 0 && (o.required = Array.from(a)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = k(i.catchall, t, {
2882
2900
  ...n,
2883
2901
  path: [...n.path, "additionalProperties"]
2884
2902
  })) : t.io === "output" && (o.additionalProperties = !1);
2885
- }, Xo = (e, t, r, n) => {
2886
- const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((c, u) => k(c, t, {
2903
+ }, es = (e, t, r, n) => {
2904
+ const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((c, a) => k(c, t, {
2887
2905
  ...n,
2888
- path: [...n.path, i ? "oneOf" : "anyOf", u]
2906
+ path: [...n.path, i ? "oneOf" : "anyOf", a]
2889
2907
  }));
2890
2908
  i ? r.oneOf = s : r.anyOf = s;
2891
- }, es = (e, t, r, n) => {
2909
+ }, ts = (e, t, r, n) => {
2892
2910
  const o = e._zod.def, i = k(o.left, t, {
2893
2911
  ...n,
2894
2912
  path: [...n.path, "allOf", 0]
2895
2913
  }), s = k(o.right, t, {
2896
2914
  ...n,
2897
2915
  path: [...n.path, "allOf", 1]
2898
- }), c = (l) => "allOf" in l && Object.keys(l).length === 1, u = [
2916
+ }), c = (l) => "allOf" in l && Object.keys(l).length === 1, a = [
2899
2917
  ...c(i) ? i.allOf : [i],
2900
2918
  ...c(s) ? s.allOf : [s]
2901
2919
  ];
2902
- r.allOf = u;
2903
- }, ts = (e, t, r, n) => {
2920
+ r.allOf = a;
2921
+ }, rs = (e, t, r, n) => {
2904
2922
  const o = e._zod.def, i = k(o.innerType, t, n), s = t.seen.get(e);
2905
2923
  t.target === "openapi-3.0" ? (s.ref = o.innerType, r.nullable = !0) : r.anyOf = [i, { type: "null" }];
2906
- }, rs = (e, t, r, n) => {
2924
+ }, ns = (e, t, r, n) => {
2907
2925
  const o = e._zod.def;
2908
2926
  k(o.innerType, t, n);
2909
2927
  const i = t.seen.get(e);
2910
2928
  i.ref = o.innerType;
2911
- }, ns = (e, t, r, n) => {
2929
+ }, os = (e, t, r, n) => {
2912
2930
  const o = e._zod.def;
2913
2931
  k(o.innerType, t, n);
2914
2932
  const i = t.seen.get(e);
2915
2933
  i.ref = o.innerType, r.default = JSON.parse(JSON.stringify(o.defaultValue));
2916
- }, os = (e, t, r, n) => {
2934
+ }, ss = (e, t, r, n) => {
2917
2935
  const o = e._zod.def;
2918
2936
  k(o.innerType, t, n);
2919
2937
  const i = t.seen.get(e);
2920
2938
  i.ref = o.innerType, t.io === "input" && (r._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2921
- }, ss = (e, t, r, n) => {
2939
+ }, is = (e, t, r, n) => {
2922
2940
  const o = e._zod.def;
2923
2941
  k(o.innerType, t, n);
2924
2942
  const i = t.seen.get(e);
@@ -2930,53 +2948,53 @@ const Uo = (e, t = {}) => (r) => {
2930
2948
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2931
2949
  }
2932
2950
  r.default = s;
2933
- }, is = (e, t, r, n) => {
2951
+ }, cs = (e, t, r, n) => {
2934
2952
  const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2935
2953
  k(i, t, n);
2936
2954
  const s = t.seen.get(e);
2937
2955
  s.ref = i;
2938
- }, cs = (e, t, r, n) => {
2956
+ }, as = (e, t, r, n) => {
2939
2957
  const o = e._zod.def;
2940
2958
  k(o.innerType, t, n);
2941
2959
  const i = t.seen.get(e);
2942
2960
  i.ref = o.innerType, r.readOnly = !0;
2943
- }, at = (e, t, r, n) => {
2961
+ }, ut = (e, t, r, n) => {
2944
2962
  const o = e._zod.def;
2945
2963
  k(o.innerType, t, n);
2946
2964
  const i = t.seen.get(e);
2947
2965
  i.ref = o.innerType;
2948
- }, us = /* @__PURE__ */ a("ZodISODateTime", (e, t) => {
2949
- hn.init(e, t), b.init(e, t);
2950
- });
2951
- function as(e) {
2952
- return /* @__PURE__ */ _o(us, e);
2953
- }
2954
- const ls = /* @__PURE__ */ a("ZodISODate", (e, t) => {
2966
+ }, us = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2955
2967
  dn.init(e, t), b.init(e, t);
2956
2968
  });
2957
- function fs(e) {
2958
- return /* @__PURE__ */ vo(ls, e);
2969
+ function ls(e) {
2970
+ return /* @__PURE__ */ vo(us, e);
2959
2971
  }
2960
- const hs = /* @__PURE__ */ a("ZodISOTime", (e, t) => {
2972
+ const fs = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2961
2973
  pn.init(e, t), b.init(e, t);
2962
2974
  });
2963
- function ds(e) {
2964
- return /* @__PURE__ */ bo(hs, e);
2975
+ function hs(e) {
2976
+ return /* @__PURE__ */ bo(fs, e);
2965
2977
  }
2966
- const ps = /* @__PURE__ */ a("ZodISODuration", (e, t) => {
2978
+ const ds = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2967
2979
  mn.init(e, t), b.init(e, t);
2968
2980
  });
2969
- function ms(e) {
2970
- return /* @__PURE__ */ yo(ps, e);
2981
+ function ps(e) {
2982
+ return /* @__PURE__ */ yo(ds, e);
2971
2983
  }
2972
- const gs = (e, t) => {
2984
+ const ms = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2985
+ gn.init(e, t), b.init(e, t);
2986
+ });
2987
+ function gs(e) {
2988
+ return /* @__PURE__ */ wo(ms, e);
2989
+ }
2990
+ const _s = (e, t) => {
2973
2991
  He.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2974
2992
  format: {
2975
- value: (r) => nr(e, r)
2993
+ value: (r) => or(e, r)
2976
2994
  // enumerable: false,
2977
2995
  },
2978
2996
  flatten: {
2979
- value: (r) => rr(e, r)
2997
+ value: (r) => nr(e, r)
2980
2998
  // enumerable: false,
2981
2999
  },
2982
3000
  addIssue: {
@@ -2998,21 +3016,21 @@ const gs = (e, t) => {
2998
3016
  // enumerable: false,
2999
3017
  }
3000
3018
  });
3001
- }, O = a("ZodError", gs, {
3019
+ }, O = u("ZodError", _s, {
3002
3020
  Parent: Error
3003
- }), _s = /* @__PURE__ */ pe(O), vs = /* @__PURE__ */ me(O), bs = /* @__PURE__ */ ee(O), ys = /* @__PURE__ */ te(O), ws = /* @__PURE__ */ ir(O), zs = /* @__PURE__ */ cr(O), ks = /* @__PURE__ */ ur(O), $s = /* @__PURE__ */ ar(O), Zs = /* @__PURE__ */ lr(O), Ss = /* @__PURE__ */ fr(O), Is = /* @__PURE__ */ hr(O), Os = /* @__PURE__ */ dr(O), w = /* @__PURE__ */ a("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
3021
+ }), vs = /* @__PURE__ */ pe(O), bs = /* @__PURE__ */ me(O), ys = /* @__PURE__ */ ee(O), ws = /* @__PURE__ */ te(O), zs = /* @__PURE__ */ cr(O), ks = /* @__PURE__ */ ar(O), $s = /* @__PURE__ */ ur(O), Zs = /* @__PURE__ */ lr(O), Ss = /* @__PURE__ */ fr(O), Is = /* @__PURE__ */ hr(O), Os = /* @__PURE__ */ dr(O), Es = /* @__PURE__ */ pr(O), w = /* @__PURE__ */ u("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
3004
3022
  jsonSchema: {
3005
3023
  input: q(e, "input"),
3006
3024
  output: q(e, "output")
3007
3025
  }
3008
- }), e.toJSONSchema = Uo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(N(t, {
3026
+ }), e.toJSONSchema = Jo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(N(t, {
3009
3027
  checks: [
3010
3028
  ...t.checks ?? [],
3011
3029
  ...r.map((n) => typeof n == "function" ? { _zod: { check: n, def: { check: "custom" }, onattach: [] } } : n)
3012
3030
  ]
3013
3031
  }), {
3014
3032
  parent: !0
3015
- }), e.with = e.check, e.clone = (r, n) => j(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => _s(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => bs(e, r, n), e.parseAsync = async (r, n) => vs(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => ys(e, r, n), e.spa = e.safeParseAsync, e.encode = (r, n) => ws(e, r, n), e.decode = (r, n) => zs(e, r, n), e.encodeAsync = async (r, n) => ks(e, r, n), e.decodeAsync = async (r, n) => $s(e, r, n), e.safeEncode = (r, n) => Zs(e, r, n), e.safeDecode = (r, n) => Ss(e, r, n), e.safeEncodeAsync = async (r, n) => Is(e, r, n), e.safeDecodeAsync = async (r, n) => Os(e, r, n), e.refine = (r, n) => e.check(bi(r, n)), e.superRefine = (r) => e.check(yi(r)), e.overwrite = (r) => e.check(/* @__PURE__ */ U(r)), e.optional = () => Re(e), e.exactOptional = () => ii(e), e.nullable = () => Ce(e), e.nullish = () => Re(Ce(e)), e.nonoptional = (r) => hi(e, r), e.array = () => A(e), e.or = (r) => dt([e, r]), e.and = (r) => ri(e, r), e.transform = (r) => De(e, oi(r)), e.default = (r) => ai(e, r), e.prefault = (r) => fi(e, r), e.catch = (r) => pi(e, r), e.pipe = (r) => De(e, r), e.readonly = () => _i(e), e.describe = (r) => {
3033
+ }), e.with = e.check, e.clone = (r, n) => j(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => vs(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => ys(e, r, n), e.parseAsync = async (r, n) => bs(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => ws(e, r, n), e.spa = e.safeParseAsync, e.encode = (r, n) => zs(e, r, n), e.decode = (r, n) => ks(e, r, n), e.encodeAsync = async (r, n) => $s(e, r, n), e.decodeAsync = async (r, n) => Zs(e, r, n), e.safeEncode = (r, n) => Ss(e, r, n), e.safeDecode = (r, n) => Is(e, r, n), e.safeEncodeAsync = async (r, n) => Os(e, r, n), e.safeDecodeAsync = async (r, n) => Es(e, r, n), e.refine = (r, n) => e.check(yi(r, n)), e.superRefine = (r) => e.check(wi(r)), e.overwrite = (r) => e.check(/* @__PURE__ */ U(r)), e.optional = () => Re(e), e.exactOptional = () => ci(e), e.nullable = () => Ce(e), e.nullish = () => Re(Ce(e)), e.nonoptional = (r) => di(e, r), e.array = () => A(e), e.or = (r) => dt([e, r]), e.and = (r) => ni(e, r), e.transform = (r) => De(e, si(r)), e.default = (r) => li(e, r), e.prefault = (r) => hi(e, r), e.catch = (r) => mi(e, r), e.pipe = (r) => De(e, r), e.readonly = () => vi(e), e.describe = (r) => {
3016
3034
  const n = e.clone();
3017
3035
  return J.add(n, { description: r }), n;
3018
3036
  }, Object.defineProperty(e, "description", {
@@ -3025,96 +3043,96 @@ const gs = (e, t) => {
3025
3043
  return J.get(e);
3026
3044
  const n = e.clone();
3027
3045
  return J.add(n, r[0]), n;
3028
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (r) => r(e), e)), lt = /* @__PURE__ */ a("_ZodString", (e, t) => {
3029
- ge.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, o, i) => Lo(e, n, o);
3046
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (r) => r(e), e)), lt = /* @__PURE__ */ u("_ZodString", (e, t) => {
3047
+ ge.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, o, i) => Vo(e, n, o);
3030
3048
  const r = e._zod.bag;
3031
- e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(/* @__PURE__ */ So(...n)), e.includes = (...n) => e.check(/* @__PURE__ */ Eo(...n)), e.startsWith = (...n) => e.check(/* @__PURE__ */ Po(...n)), e.endsWith = (...n) => e.check(/* @__PURE__ */ To(...n)), e.min = (...n) => e.check(/* @__PURE__ */ Q(...n)), e.max = (...n) => e.check(/* @__PURE__ */ ot(...n)), e.length = (...n) => e.check(/* @__PURE__ */ st(...n)), e.nonempty = (...n) => e.check(/* @__PURE__ */ Q(1, ...n)), e.lowercase = (n) => e.check(/* @__PURE__ */ Io(n)), e.uppercase = (n) => e.check(/* @__PURE__ */ Oo(n)), e.trim = () => e.check(/* @__PURE__ */ No()), e.normalize = (...n) => e.check(/* @__PURE__ */ Ao(...n)), e.toLowerCase = () => e.check(/* @__PURE__ */ jo()), e.toUpperCase = () => e.check(/* @__PURE__ */ Ro()), e.slugify = () => e.check(/* @__PURE__ */ Co());
3032
- }), Es = /* @__PURE__ */ a("ZodString", (e, t) => {
3033
- ge.init(e, t), lt.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ Kn(Ps, r)), e.url = (r) => e.check(/* @__PURE__ */ eo(Ts, r)), e.jwt = (r) => e.check(/* @__PURE__ */ go(Bs, r)), e.emoji = (r) => e.check(/* @__PURE__ */ to(As, r)), e.guid = (r) => e.check(/* @__PURE__ */ Ee(Ne, r)), e.uuid = (r) => e.check(/* @__PURE__ */ Yn(G, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ Qn(G, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ qn(G, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ Xn(G, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ ro(Ns, r)), e.guid = (r) => e.check(/* @__PURE__ */ Ee(Ne, r)), e.cuid = (r) => e.check(/* @__PURE__ */ no(js, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ oo(Rs, r)), e.ulid = (r) => e.check(/* @__PURE__ */ so(Cs, r)), e.base64 = (r) => e.check(/* @__PURE__ */ ho(Ls, r)), e.base64url = (r) => e.check(/* @__PURE__ */ po(Vs, r)), e.xid = (r) => e.check(/* @__PURE__ */ io(Ds, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ co(xs, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ uo(Fs, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ ao(Ms, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ lo(Us, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ fo(Js, r)), e.e164 = (r) => e.check(/* @__PURE__ */ mo(Hs, r)), e.datetime = (r) => e.check(as(r)), e.date = (r) => e.check(fs(r)), e.time = (r) => e.check(ds(r)), e.duration = (r) => e.check(ms(r));
3049
+ e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(/* @__PURE__ */ Io(...n)), e.includes = (...n) => e.check(/* @__PURE__ */ Po(...n)), e.startsWith = (...n) => e.check(/* @__PURE__ */ To(...n)), e.endsWith = (...n) => e.check(/* @__PURE__ */ Ao(...n)), e.min = (...n) => e.check(/* @__PURE__ */ Q(...n)), e.max = (...n) => e.check(/* @__PURE__ */ ot(...n)), e.length = (...n) => e.check(/* @__PURE__ */ st(...n)), e.nonempty = (...n) => e.check(/* @__PURE__ */ Q(1, ...n)), e.lowercase = (n) => e.check(/* @__PURE__ */ Oo(n)), e.uppercase = (n) => e.check(/* @__PURE__ */ Eo(n)), e.trim = () => e.check(/* @__PURE__ */ jo()), e.normalize = (...n) => e.check(/* @__PURE__ */ No(...n)), e.toLowerCase = () => e.check(/* @__PURE__ */ Ro()), e.toUpperCase = () => e.check(/* @__PURE__ */ Co()), e.slugify = () => e.check(/* @__PURE__ */ Do());
3050
+ }), Ps = /* @__PURE__ */ u("ZodString", (e, t) => {
3051
+ ge.init(e, t), lt.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ Yn(Ts, r)), e.url = (r) => e.check(/* @__PURE__ */ to(As, r)), e.jwt = (r) => e.check(/* @__PURE__ */ _o(Ws, r)), e.emoji = (r) => e.check(/* @__PURE__ */ ro(Ns, r)), e.guid = (r) => e.check(/* @__PURE__ */ Ee(Ne, r)), e.uuid = (r) => e.check(/* @__PURE__ */ Qn(G, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ qn(G, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ Xn(G, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ eo(G, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ no(js, r)), e.guid = (r) => e.check(/* @__PURE__ */ Ee(Ne, r)), e.cuid = (r) => e.check(/* @__PURE__ */ oo(Rs, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ so(Cs, r)), e.ulid = (r) => e.check(/* @__PURE__ */ io(Ds, r)), e.base64 = (r) => e.check(/* @__PURE__ */ po(Vs, r)), e.base64url = (r) => e.check(/* @__PURE__ */ mo(Hs, r)), e.xid = (r) => e.check(/* @__PURE__ */ co(xs, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ ao(Fs, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ uo(Ms, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ lo(Us, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ fo(Js, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ ho(Ls, r)), e.e164 = (r) => e.check(/* @__PURE__ */ go(Bs, r)), e.datetime = (r) => e.check(ls(r)), e.date = (r) => e.check(hs(r)), e.time = (r) => e.check(ps(r)), e.duration = (r) => e.check(gs(r));
3034
3052
  });
3035
3053
  function g(e) {
3036
- return /* @__PURE__ */ Gn(Es, e);
3054
+ return /* @__PURE__ */ Kn(Ps, e);
3037
3055
  }
3038
- const b = /* @__PURE__ */ a("ZodStringFormat", (e, t) => {
3056
+ const b = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
3039
3057
  v.init(e, t), lt.init(e, t);
3040
- }), Ps = /* @__PURE__ */ a("ZodEmail", (e, t) => {
3041
- rn.init(e, t), b.init(e, t);
3042
- }), Ne = /* @__PURE__ */ a("ZodGUID", (e, t) => {
3043
- en.init(e, t), b.init(e, t);
3044
- }), G = /* @__PURE__ */ a("ZodUUID", (e, t) => {
3045
- tn.init(e, t), b.init(e, t);
3046
- }), Ts = /* @__PURE__ */ a("ZodURL", (e, t) => {
3058
+ }), Ts = /* @__PURE__ */ u("ZodEmail", (e, t) => {
3047
3059
  nn.init(e, t), b.init(e, t);
3048
- }), As = /* @__PURE__ */ a("ZodEmoji", (e, t) => {
3060
+ }), Ne = /* @__PURE__ */ u("ZodGUID", (e, t) => {
3061
+ tn.init(e, t), b.init(e, t);
3062
+ }), G = /* @__PURE__ */ u("ZodUUID", (e, t) => {
3063
+ rn.init(e, t), b.init(e, t);
3064
+ }), As = /* @__PURE__ */ u("ZodURL", (e, t) => {
3049
3065
  on.init(e, t), b.init(e, t);
3050
- }), Ns = /* @__PURE__ */ a("ZodNanoID", (e, t) => {
3066
+ }), Ns = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
3051
3067
  sn.init(e, t), b.init(e, t);
3052
- }), js = /* @__PURE__ */ a("ZodCUID", (e, t) => {
3068
+ }), js = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
3053
3069
  cn.init(e, t), b.init(e, t);
3054
- }), Rs = /* @__PURE__ */ a("ZodCUID2", (e, t) => {
3055
- un.init(e, t), b.init(e, t);
3056
- }), Cs = /* @__PURE__ */ a("ZodULID", (e, t) => {
3070
+ }), Rs = /* @__PURE__ */ u("ZodCUID", (e, t) => {
3057
3071
  an.init(e, t), b.init(e, t);
3058
- }), Ds = /* @__PURE__ */ a("ZodXID", (e, t) => {
3072
+ }), Cs = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
3073
+ un.init(e, t), b.init(e, t);
3074
+ }), Ds = /* @__PURE__ */ u("ZodULID", (e, t) => {
3059
3075
  ln.init(e, t), b.init(e, t);
3060
- }), xs = /* @__PURE__ */ a("ZodKSUID", (e, t) => {
3076
+ }), xs = /* @__PURE__ */ u("ZodXID", (e, t) => {
3061
3077
  fn.init(e, t), b.init(e, t);
3062
- }), Fs = /* @__PURE__ */ a("ZodIPv4", (e, t) => {
3063
- gn.init(e, t), b.init(e, t);
3064
- }), Ms = /* @__PURE__ */ a("ZodIPv6", (e, t) => {
3078
+ }), Fs = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
3079
+ hn.init(e, t), b.init(e, t);
3080
+ }), Ms = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
3065
3081
  _n.init(e, t), b.init(e, t);
3066
- }), Us = /* @__PURE__ */ a("ZodCIDRv4", (e, t) => {
3082
+ }), Us = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
3067
3083
  vn.init(e, t), b.init(e, t);
3068
- }), Js = /* @__PURE__ */ a("ZodCIDRv6", (e, t) => {
3084
+ }), Js = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
3069
3085
  bn.init(e, t), b.init(e, t);
3070
- }), Ls = /* @__PURE__ */ a("ZodBase64", (e, t) => {
3086
+ }), Ls = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
3071
3087
  yn.init(e, t), b.init(e, t);
3072
- }), Vs = /* @__PURE__ */ a("ZodBase64URL", (e, t) => {
3073
- zn.init(e, t), b.init(e, t);
3074
- }), Hs = /* @__PURE__ */ a("ZodE164", (e, t) => {
3088
+ }), Vs = /* @__PURE__ */ u("ZodBase64", (e, t) => {
3089
+ wn.init(e, t), b.init(e, t);
3090
+ }), Hs = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
3075
3091
  kn.init(e, t), b.init(e, t);
3076
- }), Bs = /* @__PURE__ */ a("ZodJWT", (e, t) => {
3077
- Zn.init(e, t), b.init(e, t);
3078
- }), ft = /* @__PURE__ */ a("ZodNumber", (e, t) => {
3079
- et.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, o, i) => Vo(e, n, o), e.gt = (n, o) => e.check(/* @__PURE__ */ Te(n, o)), e.gte = (n, o) => e.check(/* @__PURE__ */ se(n, o)), e.min = (n, o) => e.check(/* @__PURE__ */ se(n, o)), e.lt = (n, o) => e.check(/* @__PURE__ */ Pe(n, o)), e.lte = (n, o) => e.check(/* @__PURE__ */ oe(n, o)), e.max = (n, o) => e.check(/* @__PURE__ */ oe(n, o)), e.int = (n) => e.check(je(n)), e.safe = (n) => e.check(je(n)), e.positive = (n) => e.check(/* @__PURE__ */ Te(0, n)), e.nonnegative = (n) => e.check(/* @__PURE__ */ se(0, n)), e.negative = (n) => e.check(/* @__PURE__ */ Pe(0, n)), e.nonpositive = (n) => e.check(/* @__PURE__ */ oe(0, n)), e.multipleOf = (n, o) => e.check(/* @__PURE__ */ Ae(n, o)), e.step = (n, o) => e.check(/* @__PURE__ */ Ae(n, o)), e.finite = () => e;
3092
+ }), Bs = /* @__PURE__ */ u("ZodE164", (e, t) => {
3093
+ $n.init(e, t), b.init(e, t);
3094
+ }), Ws = /* @__PURE__ */ u("ZodJWT", (e, t) => {
3095
+ Sn.init(e, t), b.init(e, t);
3096
+ }), ft = /* @__PURE__ */ u("ZodNumber", (e, t) => {
3097
+ et.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, o, i) => Ho(e, n, o), e.gt = (n, o) => e.check(/* @__PURE__ */ Te(n, o)), e.gte = (n, o) => e.check(/* @__PURE__ */ se(n, o)), e.min = (n, o) => e.check(/* @__PURE__ */ se(n, o)), e.lt = (n, o) => e.check(/* @__PURE__ */ Pe(n, o)), e.lte = (n, o) => e.check(/* @__PURE__ */ oe(n, o)), e.max = (n, o) => e.check(/* @__PURE__ */ oe(n, o)), e.int = (n) => e.check(je(n)), e.safe = (n) => e.check(je(n)), e.positive = (n) => e.check(/* @__PURE__ */ Te(0, n)), e.nonnegative = (n) => e.check(/* @__PURE__ */ se(0, n)), e.negative = (n) => e.check(/* @__PURE__ */ Pe(0, n)), e.nonpositive = (n) => e.check(/* @__PURE__ */ oe(0, n)), e.multipleOf = (n, o) => e.check(/* @__PURE__ */ Ae(n, o)), e.step = (n, o) => e.check(/* @__PURE__ */ Ae(n, o)), e.finite = () => e;
3080
3098
  const r = e._zod.bag;
3081
3099
  e.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), e.isFinite = !0, e.format = r.format ?? null;
3082
3100
  });
3083
3101
  function D(e) {
3084
- return /* @__PURE__ */ wo(ft, e);
3102
+ return /* @__PURE__ */ zo(ft, e);
3085
3103
  }
3086
- const Ws = /* @__PURE__ */ a("ZodNumberFormat", (e, t) => {
3087
- Sn.init(e, t), ft.init(e, t);
3104
+ const Gs = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
3105
+ In.init(e, t), ft.init(e, t);
3088
3106
  });
3089
3107
  function je(e) {
3090
- return /* @__PURE__ */ zo(Ws, e);
3108
+ return /* @__PURE__ */ ko(Gs, e);
3091
3109
  }
3092
- const Gs = /* @__PURE__ */ a("ZodBoolean", (e, t) => {
3093
- In.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Ho(e, r, n);
3110
+ const Ks = /* @__PURE__ */ u("ZodBoolean", (e, t) => {
3111
+ On.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Bo(e, r, n);
3094
3112
  });
3095
3113
  function ht(e) {
3096
- return /* @__PURE__ */ ko(Gs, e);
3114
+ return /* @__PURE__ */ $o(Ks, e);
3097
3115
  }
3098
- const Ks = /* @__PURE__ */ a("ZodUnknown", (e, t) => {
3099
- On.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Wo();
3116
+ const Ys = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
3117
+ En.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Go();
3100
3118
  });
3101
- function ue() {
3102
- return /* @__PURE__ */ $o(Ks);
3119
+ function ae() {
3120
+ return /* @__PURE__ */ Zo(Ys);
3103
3121
  }
3104
- const Ys = /* @__PURE__ */ a("ZodNever", (e, t) => {
3105
- En.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Bo(e, r, n);
3122
+ const Qs = /* @__PURE__ */ u("ZodNever", (e, t) => {
3123
+ Pn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Wo(e, r, n);
3106
3124
  });
3107
- function Qs(e) {
3108
- return /* @__PURE__ */ Zo(Ys, e);
3125
+ function qs(e) {
3126
+ return /* @__PURE__ */ So(Qs, e);
3109
3127
  }
3110
- const qs = /* @__PURE__ */ a("ZodArray", (e, t) => {
3111
- Pn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Qo(e, r, n, o), e.element = t.element, e.min = (r, n) => e.check(/* @__PURE__ */ Q(r, n)), e.nonempty = (r) => e.check(/* @__PURE__ */ Q(1, r)), e.max = (r, n) => e.check(/* @__PURE__ */ ot(r, n)), e.length = (r, n) => e.check(/* @__PURE__ */ st(r, n)), e.unwrap = () => e.element;
3128
+ const Xs = /* @__PURE__ */ u("ZodArray", (e, t) => {
3129
+ Tn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => qo(e, r, n, o), e.element = t.element, e.min = (r, n) => e.check(/* @__PURE__ */ Q(r, n)), e.nonempty = (r) => e.check(/* @__PURE__ */ Q(1, r)), e.max = (r, n) => e.check(/* @__PURE__ */ ot(r, n)), e.length = (r, n) => e.check(/* @__PURE__ */ st(r, n)), e.unwrap = () => e.element;
3112
3130
  });
3113
3131
  function A(e, t) {
3114
- return /* @__PURE__ */ Do(qs, e, t);
3132
+ return /* @__PURE__ */ xo(Xs, e, t);
3115
3133
  }
3116
- const Xs = /* @__PURE__ */ a("ZodObject", (e, t) => {
3117
- An.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => qo(e, r, n, o), _(e, "shape", () => t.shape), e.keyof = () => pt(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: ue() }), e.loose = () => e.clone({ ...e._zod.def, catchall: ue() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Qs() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => Qt(e, r), e.safeExtend = (r) => qt(e, r), e.merge = (r) => Xt(e, r), e.pick = (r) => Kt(e, r), e.omit = (r) => Yt(e, r), e.partial = (...r) => er(mt, e, r[0]), e.required = (...r) => tr(gt, e, r[0]);
3134
+ const ei = /* @__PURE__ */ u("ZodObject", (e, t) => {
3135
+ Nn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Xo(e, r, n, o), _(e, "shape", () => t.shape), e.keyof = () => pt(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: ae() }), e.loose = () => e.clone({ ...e._zod.def, catchall: ae() }), e.strict = () => e.clone({ ...e._zod.def, catchall: qs() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => qt(e, r), e.safeExtend = (r) => Xt(e, r), e.merge = (r) => er(e, r), e.pick = (r) => Yt(e, r), e.omit = (r) => Qt(e, r), e.partial = (...r) => tr(mt, e, r[0]), e.required = (...r) => rr(gt, e, r[0]);
3118
3136
  });
3119
3137
  function E(e, t) {
3120
3138
  const r = {
@@ -3122,30 +3140,30 @@ function E(e, t) {
3122
3140
  shape: e ?? {},
3123
3141
  ...h(t)
3124
3142
  };
3125
- return new Xs(r);
3143
+ return new ei(r);
3126
3144
  }
3127
- const ei = /* @__PURE__ */ a("ZodUnion", (e, t) => {
3128
- Nn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Xo(e, r, n, o), e.options = t.options;
3145
+ const ti = /* @__PURE__ */ u("ZodUnion", (e, t) => {
3146
+ jn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => es(e, r, n, o), e.options = t.options;
3129
3147
  });
3130
3148
  function dt(e, t) {
3131
- return new ei({
3149
+ return new ti({
3132
3150
  type: "union",
3133
3151
  options: e,
3134
3152
  ...h(t)
3135
3153
  });
3136
3154
  }
3137
- const ti = /* @__PURE__ */ a("ZodIntersection", (e, t) => {
3138
- jn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => es(e, r, n, o);
3155
+ const ri = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
3156
+ Rn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ts(e, r, n, o);
3139
3157
  });
3140
- function ri(e, t) {
3141
- return new ti({
3158
+ function ni(e, t) {
3159
+ return new ri({
3142
3160
  type: "intersection",
3143
3161
  left: e,
3144
3162
  right: t
3145
3163
  });
3146
3164
  }
3147
- const ae = /* @__PURE__ */ a("ZodEnum", (e, t) => {
3148
- Rn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, o, i) => Go(e, n, o), e.enum = t.entries, e.options = Object.values(t.entries);
3165
+ const ue = /* @__PURE__ */ u("ZodEnum", (e, t) => {
3166
+ Cn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, o, i) => Ko(e, n, o), e.enum = t.entries, e.options = Object.values(t.entries);
3149
3167
  const r = new Set(Object.keys(t.entries));
3150
3168
  e.extract = (n, o) => {
3151
3169
  const i = {};
@@ -3154,7 +3172,7 @@ const ae = /* @__PURE__ */ a("ZodEnum", (e, t) => {
3154
3172
  i[s] = t.entries[s];
3155
3173
  else
3156
3174
  throw new Error(`Key ${s} not found in enum`);
3157
- return new ae({
3175
+ return new ue({
3158
3176
  ...t,
3159
3177
  checks: [],
3160
3178
  ...h(o),
@@ -3167,7 +3185,7 @@ const ae = /* @__PURE__ */ a("ZodEnum", (e, t) => {
3167
3185
  delete i[s];
3168
3186
  else
3169
3187
  throw new Error(`Key ${s} not found in enum`);
3170
- return new ae({
3188
+ return new ue({
3171
3189
  ...t,
3172
3190
  checks: [],
3173
3191
  ...h(o),
@@ -3177,14 +3195,14 @@ const ae = /* @__PURE__ */ a("ZodEnum", (e, t) => {
3177
3195
  });
3178
3196
  function pt(e, t) {
3179
3197
  const r = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e;
3180
- return new ae({
3198
+ return new ue({
3181
3199
  type: "enum",
3182
3200
  entries: r,
3183
3201
  ...h(t)
3184
3202
  });
3185
3203
  }
3186
- const ni = /* @__PURE__ */ a("ZodTransform", (e, t) => {
3187
- Cn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Yo(e, r), e._zod.parse = (r, n) => {
3204
+ const oi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
3205
+ Dn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Qo(e, r), e._zod.parse = (r, n) => {
3188
3206
  if (n.direction === "backward")
3189
3207
  throw new xe(e.constructor.name);
3190
3208
  r.addIssue = (i) => {
@@ -3199,14 +3217,14 @@ const ni = /* @__PURE__ */ a("ZodTransform", (e, t) => {
3199
3217
  return o instanceof Promise ? o.then((i) => (r.value = i, r)) : (r.value = o, r);
3200
3218
  };
3201
3219
  });
3202
- function oi(e) {
3203
- return new ni({
3220
+ function si(e) {
3221
+ return new oi({
3204
3222
  type: "transform",
3205
3223
  transform: e
3206
3224
  });
3207
3225
  }
3208
- const mt = /* @__PURE__ */ a("ZodOptional", (e, t) => {
3209
- nt.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => at(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3226
+ const mt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
3227
+ nt.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ut(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3210
3228
  });
3211
3229
  function Re(e) {
3212
3230
  return new mt({
@@ -3214,28 +3232,28 @@ function Re(e) {
3214
3232
  innerType: e
3215
3233
  });
3216
3234
  }
3217
- const si = /* @__PURE__ */ a("ZodExactOptional", (e, t) => {
3218
- Dn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => at(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3235
+ const ii = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
3236
+ xn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ut(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3219
3237
  });
3220
- function ii(e) {
3221
- return new si({
3238
+ function ci(e) {
3239
+ return new ii({
3222
3240
  type: "optional",
3223
3241
  innerType: e
3224
3242
  });
3225
3243
  }
3226
- const ci = /* @__PURE__ */ a("ZodNullable", (e, t) => {
3227
- xn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ts(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3244
+ const ai = /* @__PURE__ */ u("ZodNullable", (e, t) => {
3245
+ Fn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => rs(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3228
3246
  });
3229
3247
  function Ce(e) {
3230
- return new ci({
3248
+ return new ai({
3231
3249
  type: "nullable",
3232
3250
  innerType: e
3233
3251
  });
3234
3252
  }
3235
- const ui = /* @__PURE__ */ a("ZodDefault", (e, t) => {
3236
- Fn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ns(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3253
+ const ui = /* @__PURE__ */ u("ZodDefault", (e, t) => {
3254
+ Mn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => os(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3237
3255
  });
3238
- function ai(e, t) {
3256
+ function li(e, t) {
3239
3257
  return new ui({
3240
3258
  type: "default",
3241
3259
  innerType: e,
@@ -3244,11 +3262,11 @@ function ai(e, t) {
3244
3262
  }
3245
3263
  });
3246
3264
  }
3247
- const li = /* @__PURE__ */ a("ZodPrefault", (e, t) => {
3248
- Mn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => os(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3265
+ const fi = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
3266
+ Un.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ss(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3249
3267
  });
3250
- function fi(e, t) {
3251
- return new li({
3268
+ function hi(e, t) {
3269
+ return new fi({
3252
3270
  type: "prefault",
3253
3271
  innerType: e,
3254
3272
  get defaultValue() {
@@ -3256,82 +3274,82 @@ function fi(e, t) {
3256
3274
  }
3257
3275
  });
3258
3276
  }
3259
- const gt = /* @__PURE__ */ a("ZodNonOptional", (e, t) => {
3260
- Un.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => rs(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3277
+ const gt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
3278
+ Jn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ns(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3261
3279
  });
3262
- function hi(e, t) {
3280
+ function di(e, t) {
3263
3281
  return new gt({
3264
3282
  type: "nonoptional",
3265
3283
  innerType: e,
3266
3284
  ...h(t)
3267
3285
  });
3268
3286
  }
3269
- const di = /* @__PURE__ */ a("ZodCatch", (e, t) => {
3270
- Jn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => ss(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3287
+ const pi = /* @__PURE__ */ u("ZodCatch", (e, t) => {
3288
+ Ln.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => is(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3271
3289
  });
3272
- function pi(e, t) {
3273
- return new di({
3290
+ function mi(e, t) {
3291
+ return new pi({
3274
3292
  type: "catch",
3275
3293
  innerType: e,
3276
3294
  catchValue: typeof t == "function" ? t : () => t
3277
3295
  });
3278
3296
  }
3279
- const mi = /* @__PURE__ */ a("ZodPipe", (e, t) => {
3280
- Ln.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => is(e, r, n, o), e.in = t.in, e.out = t.out;
3297
+ const gi = /* @__PURE__ */ u("ZodPipe", (e, t) => {
3298
+ Vn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => cs(e, r, n, o), e.in = t.in, e.out = t.out;
3281
3299
  });
3282
3300
  function De(e, t) {
3283
- return new mi({
3301
+ return new gi({
3284
3302
  type: "pipe",
3285
3303
  in: e,
3286
3304
  out: t
3287
3305
  // ...util.normalizeParams(params),
3288
3306
  });
3289
3307
  }
3290
- const gi = /* @__PURE__ */ a("ZodReadonly", (e, t) => {
3291
- Vn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => cs(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3308
+ const _i = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
3309
+ Hn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => as(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3292
3310
  });
3293
- function _i(e) {
3294
- return new gi({
3311
+ function vi(e) {
3312
+ return new _i({
3295
3313
  type: "readonly",
3296
3314
  innerType: e
3297
3315
  });
3298
3316
  }
3299
- const vi = /* @__PURE__ */ a("ZodCustom", (e, t) => {
3300
- Hn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Ko(e, r);
3317
+ const bi = /* @__PURE__ */ u("ZodCustom", (e, t) => {
3318
+ Bn.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, n, o) => Yo(e, r);
3301
3319
  });
3302
- function bi(e, t = {}) {
3303
- return /* @__PURE__ */ xo(vi, e, t);
3320
+ function yi(e, t = {}) {
3321
+ return /* @__PURE__ */ Fo(bi, e, t);
3304
3322
  }
3305
- function yi(e) {
3306
- return /* @__PURE__ */ Fo(e);
3323
+ function wi(e) {
3324
+ return /* @__PURE__ */ Mo(e);
3307
3325
  }
3308
3326
  const ne = E({
3309
3327
  provider: g(),
3310
3328
  id: g(),
3311
3329
  url: g().optional()
3312
- }), wi = E({
3330
+ }), zi = E({
3313
3331
  url: g(),
3314
3332
  width: D().optional(),
3315
3333
  height: D().optional(),
3316
3334
  purpose: pt(["avatar", "cover", "background", "thumbnail"]).optional(),
3317
3335
  source: ne.optional()
3318
3336
  }), _t = E({
3319
- items: A(wi)
3320
- }), zi = E({
3337
+ items: A(zi)
3338
+ }), ki = E({
3321
3339
  name: g(),
3322
3340
  roles: A(g()),
3323
3341
  source: ne.optional()
3324
- }), ki = E({
3342
+ }), $i = E({
3325
3343
  title: g(),
3326
- artists: A(zi),
3344
+ artists: A(ki),
3327
3345
  durationMs: D().optional(),
3328
3346
  source: ne
3329
- }).passthrough(), $i = E({
3347
+ }).passthrough(), Zi = E({
3330
3348
  id: g(),
3331
- track: ki,
3349
+ track: $i,
3332
3350
  note: g().optional(),
3333
3351
  addedAtIso: g()
3334
- }), Ri = 1, Zi = E({
3352
+ }), Ci = 1, Si = E({
3335
3353
  id: g(),
3336
3354
  name: g(),
3337
3355
  description: g().optional(),
@@ -3342,11 +3360,11 @@ const ne = E({
3342
3360
  origin: ne.optional(),
3343
3361
  isReadOnly: ht(),
3344
3362
  parentId: g().optional(),
3345
- items: A($i)
3346
- }), Ci = E({
3363
+ items: A(Zi)
3364
+ }), Di = E({
3347
3365
  version: D(),
3348
- playlist: Zi
3349
- }), Si = E({
3366
+ playlist: Si
3367
+ }), Ii = E({
3350
3368
  id: g(),
3351
3369
  name: g(),
3352
3370
  createdAtIso: g(),
@@ -3356,45 +3374,46 @@ const ne = E({
3356
3374
  itemCount: D(),
3357
3375
  totalDurationMs: D(),
3358
3376
  thumbnails: A(g()).default([])
3359
- }), Di = A(Si), Ii = E({
3377
+ }), xi = A(Ii), Oi = E({
3360
3378
  uuid: g().optional(),
3361
3379
  artist: g().optional(),
3362
3380
  name: g().optional(),
3363
3381
  album: g().optional(),
3364
3382
  thumbnail: g().optional(),
3365
3383
  duration: dt([D(), g().transform(Number)]).refine((e) => Number.isFinite(e), { message: "Invalid duration" }).optional()
3366
- }), Oi = E({
3384
+ }), Ei = E({
3367
3385
  name: g(),
3368
- tracks: A(Ii)
3369
- }), xi = E({
3370
- playlists: A(ue())
3386
+ tracks: A(Oi)
3387
+ }), Fi = E({
3388
+ playlists: A(ae())
3371
3389
  }).refine(
3372
3390
  (e) => e.playlists.some(
3373
- (t) => Oi.safeParse(t).success
3391
+ (t) => Ei.safeParse(t).success
3374
3392
  ),
3375
3393
  { message: "No valid legacy playlists found" }
3376
3394
  );
3377
3395
  export {
3378
3396
  $t as DashboardAPI,
3379
- Zt as EventsAPI,
3380
- St as FavoritesAPI,
3381
- Pt as HttpAPI,
3382
- At as LoggerAPI,
3383
- Ai as MissingCapabilityError,
3384
- Jt as NuclearAPI,
3385
- Ti as NuclearPluginAPI,
3386
- Ri as PLAYLIST_EXPORT_VERSION,
3387
- jt as PlaybackAPI,
3388
- Rt as PlaylistsAPI,
3389
- Ft as ShellAPI,
3390
- Ut as YtdlpAPI,
3391
- xi as legacyConfigSchema,
3392
- Oi as legacyPlaylistSchema,
3393
- Ii as legacyTrackSchema,
3394
- ji as pickArtwork,
3395
- Ci as playlistExportSchema,
3396
- Si as playlistIndexEntrySchema,
3397
- Di as playlistIndexSchema,
3398
- Zi as playlistSchema,
3399
- Ni as useSetting
3397
+ Zt as DiscoveryAPI,
3398
+ St as EventsAPI,
3399
+ It as FavoritesAPI,
3400
+ Tt as HttpAPI,
3401
+ Nt as LoggerAPI,
3402
+ Ni as MissingCapabilityError,
3403
+ Lt as NuclearAPI,
3404
+ Ai as NuclearPluginAPI,
3405
+ Ci as PLAYLIST_EXPORT_VERSION,
3406
+ Rt as PlaybackAPI,
3407
+ Ct as PlaylistsAPI,
3408
+ Mt as ShellAPI,
3409
+ Jt as YtdlpAPI,
3410
+ Fi as legacyConfigSchema,
3411
+ Ei as legacyPlaylistSchema,
3412
+ Oi as legacyTrackSchema,
3413
+ Ri as pickArtwork,
3414
+ Di as playlistExportSchema,
3415
+ Ii as playlistIndexEntrySchema,
3416
+ xi as playlistIndexSchema,
3417
+ Si as playlistSchema,
3418
+ ji as useSetting
3400
3419
  };