@clockworkdog/cogs-client 3.0.0-alpha.13 → 3.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var kt = /* @__PURE__ */ ((e) => (e.Setup = "setup", e.Preshow = "pre-show", e.InProgress = "in progress", e.Finished = "finished", e))(kt || {});
1
+ var At = /* @__PURE__ */ ((e) => (e.Setup = "setup", e.Preshow = "pre-show", e.InProgress = "in progress", e.Finished = "finished", e))(At || {});
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -13,21 +13,21 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
15
  ***************************************************************************** */
16
- var Se = function(e, t) {
17
- return Se = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, o) {
16
+ var Te = function(e, t) {
17
+ return Te = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, o) {
18
18
  n.__proto__ = o;
19
19
  } || function(n, o) {
20
20
  for (var i in o) o.hasOwnProperty(i) && (n[i] = o[i]);
21
- }, Se(e, t);
21
+ }, Te(e, t);
22
22
  };
23
- function Et(e, t) {
24
- Se(e, t);
23
+ function St(e, t) {
24
+ Te(e, t);
25
25
  function n() {
26
26
  this.constructor = e;
27
27
  }
28
28
  e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
29
29
  }
30
- function on(e) {
30
+ function un(e) {
31
31
  var t = typeof Symbol == "function" && e[Symbol.iterator], n = 0;
32
32
  return t ? t.call(e) : {
33
33
  next: function() {
@@ -35,7 +35,7 @@ function on(e) {
35
35
  }
36
36
  };
37
37
  }
38
- function rn(e, t) {
38
+ function cn(e, t) {
39
39
  var n = typeof Symbol == "function" && e[Symbol.iterator];
40
40
  if (!n) return e;
41
41
  var o = n.call(e), i, a = [], u;
@@ -52,12 +52,12 @@ function rn(e, t) {
52
52
  }
53
53
  return a;
54
54
  }
55
- function sn() {
55
+ function ln() {
56
56
  for (var e = [], t = 0; t < arguments.length; t++)
57
- e = e.concat(rn(arguments[t]));
57
+ e = e.concat(cn(arguments[t]));
58
58
  return e;
59
59
  }
60
- var Ct = (
60
+ var Tt = (
61
61
  /** @class */
62
62
  /* @__PURE__ */ function() {
63
63
  function e(t, n) {
@@ -65,27 +65,27 @@ var Ct = (
65
65
  }
66
66
  return e;
67
67
  }()
68
- ), an = (
68
+ ), dn = (
69
69
  /** @class */
70
70
  function(e) {
71
- Et(t, e);
71
+ St(t, e);
72
72
  function t(n, o) {
73
73
  var i = e.call(this, "error", o) || this;
74
74
  return i.message = n.message, i.error = n, i;
75
75
  }
76
76
  return t;
77
- }(Ct)
78
- ), un = (
77
+ }(Tt)
78
+ ), pn = (
79
79
  /** @class */
80
80
  function(e) {
81
- Et(t, e);
81
+ St(t, e);
82
82
  function t(n, o, i) {
83
83
  n === void 0 && (n = 1e3), o === void 0 && (o = "");
84
84
  var a = e.call(this, "close", i) || this;
85
85
  return a.wasClean = !0, a.code = n, a.reason = o, a;
86
86
  }
87
87
  return t;
88
- }(Ct)
88
+ }(Tt)
89
89
  );
90
90
  /*!
91
91
  * Reconnecting WebSocket
@@ -93,10 +93,10 @@ var Ct = (
93
93
  * https://github.com/pladaria/reconnecting-websocket
94
94
  * License MIT
95
95
  */
96
- var cn = function() {
96
+ var fn = function() {
97
97
  if (typeof WebSocket < "u")
98
98
  return WebSocket;
99
- }, ln = function(e) {
99
+ }, hn = function(e) {
100
100
  return typeof e < "u" && !!e && e.CLOSING === 2;
101
101
  }, M = {
102
102
  maxReconnectionDelay: 1e4,
@@ -106,7 +106,7 @@ var cn = function() {
106
106
  connectionTimeout: 4e3,
107
107
  maxRetries: 1 / 0,
108
108
  maxEnqueuedMessages: 1 / 0
109
- }, dn = (
109
+ }, _n = (
110
110
  /** @class */
111
111
  function() {
112
112
  function e(t, n, o) {
@@ -285,7 +285,7 @@ var cn = function() {
285
285
  var n, o, i = this._listeners[t.type];
286
286
  if (i)
287
287
  try {
288
- for (var a = on(i), u = a.next(); !u.done; u = a.next()) {
288
+ for (var a = un(i), u = a.next(); !u.done; u = a.next()) {
289
289
  var l = u.value;
290
290
  this._callEventListener(t, l);
291
291
  }
@@ -306,7 +306,7 @@ var cn = function() {
306
306
  }, e.prototype._debug = function() {
307
307
  for (var t = [], n = 0; n < arguments.length; n++)
308
308
  t[n] = arguments[n];
309
- this._options.debug && console.log.apply(console, sn(["RWS>"], t));
309
+ this._options.debug && console.log.apply(console, ln(["RWS>"], t));
310
310
  }, e.prototype._getNextDelay = function() {
311
311
  var t = this._options, n = t.reconnectionDelayGrowFactor, o = n === void 0 ? M.reconnectionDelayGrowFactor : n, i = t.minReconnectionDelay, a = i === void 0 ? M.minReconnectionDelay : i, u = t.maxReconnectionDelay, l = u === void 0 ? M.maxReconnectionDelay : u, p = 0;
312
312
  return this._retryCount > 0 && (p = a * Math.pow(o, this._retryCount - 1), p > l && (p = l)), this._debug("next delay", p), p;
@@ -330,12 +330,12 @@ var cn = function() {
330
330
  var t = this;
331
331
  if (!(this._connectLock || !this._shouldReconnect)) {
332
332
  this._connectLock = !0;
333
- var n = this._options, o = n.maxRetries, i = o === void 0 ? M.maxRetries : o, a = n.connectionTimeout, u = a === void 0 ? M.connectionTimeout : a, l = n.WebSocket, p = l === void 0 ? cn() : l;
333
+ var n = this._options, o = n.maxRetries, i = o === void 0 ? M.maxRetries : o, a = n.connectionTimeout, u = a === void 0 ? M.connectionTimeout : a, l = n.WebSocket, p = l === void 0 ? fn() : l;
334
334
  if (this._retryCount >= i) {
335
335
  this._debug("max retries reached", this._retryCount, ">=", i);
336
336
  return;
337
337
  }
338
- if (this._retryCount++, this._debug("connect", this._retryCount), this._removeListeners(), !ln(p))
338
+ if (this._retryCount++, this._debug("connect", this._retryCount), this._removeListeners(), !hn(p))
339
339
  throw Error("No valid WebSocket class provided");
340
340
  this._wait().then(function() {
341
341
  return t._getNextUrl(t._url);
@@ -346,12 +346,12 @@ var cn = function() {
346
346
  });
347
347
  }
348
348
  }, e.prototype._handleTimeout = function() {
349
- this._debug("timeout event"), this._handleError(new an(Error("TIMEOUT"), this));
349
+ this._debug("timeout event"), this._handleError(new dn(Error("TIMEOUT"), this));
350
350
  }, e.prototype._disconnect = function(t, n) {
351
351
  if (t === void 0 && (t = 1e3), this._clearTimeouts(), !!this._ws) {
352
352
  this._removeListeners();
353
353
  try {
354
- this._ws.close(t, n), this._handleClose(new un(t, n, this));
354
+ this._ws.close(t, n), this._handleClose(new pn(t, n, this));
355
355
  } catch {
356
356
  }
357
357
  }
@@ -368,16 +368,16 @@ var cn = function() {
368
368
  }, e;
369
369
  }()
370
370
  );
371
- const At = 12095;
372
- function pn(e) {
371
+ const zt = 12095;
372
+ function mn(e) {
373
373
  const t = typeof window < "u" ? window.location : void 0, n = `/assets/${encodeURIComponent(e)}`;
374
- return `${t?.protocol}//${t?.hostname}:${At}${n}`;
374
+ return `${t?.protocol}//${t?.hostname}:${zt}${n}`;
375
375
  }
376
- async function ka(e) {
376
+ async function Ca(e) {
377
377
  const t = await fetch(e);
378
378
  return URL.createObjectURL(new Blob([await t.arrayBuffer()]));
379
379
  }
380
- class fn {
380
+ class vn {
381
381
  _items;
382
382
  #e = new EventTarget();
383
383
  constructor(t) {
@@ -385,8 +385,8 @@ class fn {
385
385
  }
386
386
  handleDataStoreItemsMessage(t) {
387
387
  this._items = { ...this._items, ...t.items }, Object.entries(t.items).forEach(([n, o]) => {
388
- this.dispatchEvent(new We(n, o));
389
- }), this.dispatchEvent(new qe(t.items));
388
+ this.dispatchEvent(new qe(n, o));
389
+ }), this.dispatchEvent(new Ke(t.items));
390
390
  }
391
391
  get items() {
392
392
  return this._items;
@@ -396,8 +396,8 @@ class fn {
396
396
  }
397
397
  setItems(t) {
398
398
  return this._items = { ...this._items, ...t }, Object.entries(t).forEach(([n, o]) => {
399
- this.dispatchEvent(new We(n, o));
400
- }), this.dispatchEvent(new qe(t)), this;
399
+ this.dispatchEvent(new qe(n, o));
400
+ }), this.dispatchEvent(new Ke(t)), this;
401
401
  }
402
402
  // Type-safe listeners
403
403
  addEventListener(t, n, o) {
@@ -410,20 +410,20 @@ class fn {
410
410
  this.#e.dispatchEvent(t);
411
411
  }
412
412
  }
413
- class We extends Event {
413
+ class qe extends Event {
414
414
  constructor(t, n) {
415
415
  super("item"), this.key = t, this.value = n;
416
416
  }
417
417
  _cogsConnectionEventType = "item";
418
418
  }
419
- class qe extends Event {
419
+ class Ke extends Event {
420
420
  constructor(t) {
421
421
  super("items"), this.items = t;
422
422
  }
423
423
  _cogsConnectionEventType = "item";
424
424
  }
425
425
  const te = globalThis.Date;
426
- function hn(e) {
426
+ function gn(e) {
427
427
  const t = e - te.now();
428
428
  function n(...i) {
429
429
  return i.length === 0 ? new te(n.now()) : new te(...i);
@@ -433,25 +433,25 @@ function hn(e) {
433
433
  return te.now() + t;
434
434
  }, globalThis.Date = n;
435
435
  }
436
- let _n = 0;
437
- function mn() {
438
- return ++_n;
436
+ let yn = 0;
437
+ function bn() {
438
+ return ++yn;
439
439
  }
440
- const vn = 5, gn = 1e4;
441
- function yn({ interval: e, send: t, onChange: n = hn, syncSampleSize: o = vn, syncRequestTimeout: i = gn }) {
440
+ const wn = 5, kn = 1e4;
441
+ function En({ interval: e, send: t, onChange: n = gn, syncSampleSize: o = wn, syncRequestTimeout: i = kn }) {
442
442
  const a = {};
443
443
  async function u() {
444
444
  const y = [];
445
445
  for (let s = 0; s < o; s++) {
446
446
  const c = new Promise((d) => {
447
- const f = mn(), v = Date.now(), _ = performance.now();
447
+ const f = bn(), v = Date.now(), _ = performance.now();
448
448
  t({ timesync: { id: f } });
449
449
  const w = (k, E) => d({ sentAt: _, receivedAt: k, serverNow: E, clientNow: v });
450
450
  a[f] = { complete: w }, setTimeout(() => d(null), i);
451
451
  });
452
452
  y.push(c), await c;
453
453
  }
454
- const g = (await Promise.all(y)).filter((s) => s !== null), r = bn(g);
454
+ const g = (await Promise.all(y)).filter((s) => s !== null), r = Cn(g);
455
455
  isNaN(r) || n(Date.now() + r);
456
456
  }
457
457
  const l = (y) => {
@@ -467,22 +467,22 @@ function yn({ interval: e, send: t, onChange: n = hn, syncSampleSize: o = vn, sy
467
467
  }
468
468
  };
469
469
  }
470
- function bn(e) {
470
+ function Cn(e) {
471
471
  return e.map(({ sentAt: t, receivedAt: n, clientNow: o, serverNow: i }) => {
472
472
  const a = (n - t) / 2;
473
473
  return i - o - a;
474
474
  }).reduce((t, n) => t + n, 0) / e.length;
475
475
  }
476
- class Ea {
477
- constructor(t, { hostname: n = document.location.hostname, port: o = At } = {}, i, a) {
478
- this.manifest = t, this.currentState = { ...i }, this.store = new fn(a ?? {});
479
- const { useReconnectingWebsocket: u, path: l, pathParams: p } = wn(document.location.href);
476
+ class Aa {
477
+ constructor(t, { hostname: n = document.location.hostname, port: o = zt } = {}, i, a) {
478
+ this.manifest = t, this.currentState = { ...i }, this.store = new vn(a ?? {});
479
+ const { useReconnectingWebsocket: u, path: l, pathParams: p } = An(document.location.href);
480
480
  this.urlParams = new URLSearchParams(p), this.urlParams.set("screenWidth", window.screen.width.toString()), this.urlParams.set("screenHeight", window.screen.height.toString()), this.urlParams.set("screenPixelRatio", window.devicePixelRatio.toString());
481
481
  const h = `ws://${n}:${o}${l}?${this.urlParams}`;
482
- this.websocket = u ? new dn(h) : new WebSocket(h);
482
+ this.websocket = u ? new _n(h) : new WebSocket(h);
483
483
  let y;
484
484
  this.websocket.onopen = () => {
485
- this.currentConfig = {}, this.currentState = {}, this.dispatchEvent(new kn()), this.setState(this.currentState), y = yn({
485
+ this.currentConfig = {}, this.currentState = {}, this.dispatchEvent(new Sn()), this.setState(this.currentState), y = En({
486
486
  interval: 6e4,
487
487
  send: (g) => {
488
488
  this.websocket.send(JSON.stringify(g));
@@ -499,18 +499,18 @@ class Ea {
499
499
  console.error(r);
500
500
  }
501
501
  }), this.websocket.onclose = () => {
502
- y?.destroy(), this.dispatchEvent(new En());
502
+ y?.destroy(), this.dispatchEvent(new Tn());
503
503
  }, this.websocket.addEventListener("message", ({ data: g }) => {
504
504
  try {
505
505
  const r = JSON.parse(g);
506
506
  try {
507
507
  if (r.config)
508
- this.currentConfig = r.config, this.dispatchEvent(new An(this.currentConfig));
508
+ this.currentConfig = r.config, this.dispatchEvent(new On(this.currentConfig));
509
509
  else if (r.updates)
510
- this.currentState = { ...this.currentState, ...r.updates }, this.dispatchEvent(new Sn(r.updates));
510
+ this.currentState = { ...this.currentState, ...r.updates }, this.dispatchEvent(new In(r.updates));
511
511
  else if (r.event && r.event.key)
512
512
  this.dispatchEvent(
513
- new Tn(r.event.key, r.event.value)
513
+ new $n(r.event.key, r.event.value)
514
514
  );
515
515
  else if (typeof r.message == "object") {
516
516
  const s = r.message;
@@ -523,19 +523,19 @@ class Ea {
523
523
  };
524
524
  break;
525
525
  case "show_phase":
526
- this._showPhase = s.phase, this.dispatchEvent(new In(s.phase));
526
+ this._showPhase = s.phase, this.dispatchEvent(new Zn(s.phase));
527
527
  break;
528
528
  case "media_config_update":
529
529
  this._mediaConfig = s;
530
530
  for (const c of ["preferOptimizedAudio", "preferOptimizedVideo", "preferOptimizedImages"])
531
531
  s[c] ? this.urlParams.set(c, "true") : this.urlParams.delete(c);
532
- this.dispatchEvent(new zn(s));
532
+ this.dispatchEvent(new Pn(s));
533
533
  break;
534
534
  case "data_store_items":
535
535
  this.store.handleDataStoreItemsMessage(s);
536
536
  break;
537
537
  }
538
- this.dispatchEvent(new Cn(s));
538
+ this.dispatchEvent(new zn(s));
539
539
  }
540
540
  } catch (s) {
541
541
  console.warn("Error handling data", g, s);
@@ -568,7 +568,7 @@ class Ea {
568
568
  get state() {
569
569
  return { ...this.currentState };
570
570
  }
571
- _showPhase = kt.Setup;
571
+ _showPhase = At.Setup;
572
572
  get showPhase() {
573
573
  return this._showPhase;
574
574
  }
@@ -584,7 +584,7 @@ class Ea {
584
584
  * Return asset URLs using the information about the client and server support for HTTP/2
585
585
  */
586
586
  getAssetUrl(t) {
587
- return `${pn(t)}?${this.urlParams?.toString() ?? ""}`;
587
+ return `${mn(t)}?${this.urlParams?.toString() ?? ""}`;
588
588
  }
589
589
  /**
590
590
  * Cached audio outputs use to look up the device/sink ID when a different device label is requested
@@ -655,7 +655,7 @@ class Ea {
655
655
  this.eventTarget.dispatchEvent(t);
656
656
  }
657
657
  }
658
- function wn(e) {
658
+ function An(e) {
659
659
  const t = new URL(e), n = new URLSearchParams(t.searchParams), o = n.get("local_id"), i = n.get("simulator") === "true", a = n.get("display") ?? "", u = t.pathname.startsWith("/plugin/") ? decodeURIComponent(t.pathname.split("/")[2]) : void 0;
660
660
  if (o) {
661
661
  const l = n.get("t") ?? "";
@@ -691,49 +691,49 @@ function wn(e) {
691
691
  }
692
692
  }
693
693
  }
694
- class kn extends Event {
694
+ class Sn extends Event {
695
695
  _cogsConnectionEventType = "open";
696
696
  constructor() {
697
697
  super("open");
698
698
  }
699
699
  }
700
- class En extends Event {
700
+ class Tn extends Event {
701
701
  _cogsConnectionEventType = "close";
702
702
  constructor() {
703
703
  super("close");
704
704
  }
705
705
  }
706
- class Cn extends Event {
706
+ class zn extends Event {
707
707
  constructor(t) {
708
708
  super("message"), this.message = t;
709
709
  }
710
710
  _cogsConnectionEventType = "message";
711
711
  }
712
- class An extends Event {
712
+ class On extends Event {
713
713
  constructor(t) {
714
714
  super("config"), this.config = t;
715
715
  }
716
716
  _cogsConnectionEventType = "config";
717
717
  }
718
- class Sn extends Event {
718
+ class In extends Event {
719
719
  constructor(t) {
720
720
  super("state"), this.state = t;
721
721
  }
722
722
  _cogsConnectionEventType = "state";
723
723
  }
724
- class Tn extends Event {
724
+ class $n extends Event {
725
725
  constructor(t, n) {
726
726
  super("event"), this.name = t, this.value = n;
727
727
  }
728
728
  _cogsConnectionEventType = "event";
729
729
  }
730
- class zn extends Event {
730
+ class Pn extends Event {
731
731
  constructor(t) {
732
732
  super("mediaConfig"), this.mediaConfig = t;
733
733
  }
734
734
  _cogsConnectionEventType = "mediaConfig";
735
735
  }
736
- class In extends Event {
736
+ class Zn extends Event {
737
737
  constructor(t) {
738
738
  super("showPhase"), this.showPhase = t;
739
739
  }
@@ -779,23 +779,23 @@ class K extends Error {
779
779
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
780
780
  }
781
781
  }
782
- class St extends Error {
782
+ class Ot extends Error {
783
783
  constructor(t) {
784
784
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
785
785
  }
786
786
  }
787
- const Tt = {};
787
+ const It = {};
788
788
  function j(e) {
789
- return Tt;
789
+ return It;
790
790
  }
791
- function On(e) {
791
+ function xn(e) {
792
792
  const t = Object.values(e).filter((o) => typeof o == "number");
793
793
  return Object.entries(e).filter(([o, i]) => t.indexOf(+o) === -1).map(([o, i]) => i);
794
794
  }
795
- function Te(e, t) {
795
+ function ze(e, t) {
796
796
  return typeof t == "bigint" ? t.toString() : t;
797
797
  }
798
- function $e(e) {
798
+ function Pe(e) {
799
799
  return {
800
800
  get value() {
801
801
  {
@@ -805,14 +805,14 @@ function $e(e) {
805
805
  }
806
806
  };
807
807
  }
808
- function Pe(e) {
808
+ function Ze(e) {
809
809
  return e == null;
810
810
  }
811
- function Ze(e) {
811
+ function xe(e) {
812
812
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
813
813
  return e.slice(t, n);
814
814
  }
815
- function $n(e, t) {
815
+ function Ln(e, t) {
816
816
  const n = (e.toString().split(".")[1] || "").length, o = t.toString();
817
817
  let i = (o.split(".")[1] || "").length;
818
818
  if (i === 0 && /\d?e-\d?/.test(o)) {
@@ -822,13 +822,13 @@ function $n(e, t) {
822
822
  const a = n > i ? n : i, u = Number.parseInt(e.toFixed(a).replace(".", "")), l = Number.parseInt(t.toFixed(a).replace(".", ""));
823
823
  return u % l / 10 ** a;
824
824
  }
825
- const Ke = Symbol("evaluating");
825
+ const He = Symbol("evaluating");
826
826
  function C(e, t, n) {
827
827
  let o;
828
828
  Object.defineProperty(e, t, {
829
829
  get() {
830
- if (o !== Ke)
831
- return o === void 0 && (o = Ke, o = n()), o;
830
+ if (o !== He)
831
+ return o === void 0 && (o = He, o = n()), o;
832
832
  },
833
833
  set(i) {
834
834
  Object.defineProperty(e, t, {
@@ -855,18 +855,18 @@ function B(...e) {
855
855
  }
856
856
  return Object.defineProperties({}, t);
857
857
  }
858
- function He(e) {
858
+ function Je(e) {
859
859
  return JSON.stringify(e);
860
860
  }
861
- function Pn(e) {
861
+ function Rn(e) {
862
862
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
863
863
  }
864
- const zt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
864
+ const $t = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
865
865
  };
866
866
  function pe(e) {
867
867
  return typeof e == "object" && e !== null && !Array.isArray(e);
868
868
  }
869
- const Zn = $e(() => {
869
+ const jn = Pe(() => {
870
870
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
871
871
  return !1;
872
872
  try {
@@ -885,10 +885,10 @@ function H(e) {
885
885
  const n = t.prototype;
886
886
  return !(pe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
887
887
  }
888
- function It(e) {
888
+ function Pt(e) {
889
889
  return H(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
890
890
  }
891
- const xn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
891
+ const Nn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
892
892
  function J(e) {
893
893
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
894
894
  }
@@ -909,17 +909,17 @@ function b(e) {
909
909
  }
910
910
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
911
911
  }
912
- function Ln(e) {
912
+ function Dn(e) {
913
913
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
914
914
  }
915
- const Rn = {
915
+ const Un = {
916
916
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
917
917
  int32: [-2147483648, 2147483647],
918
918
  uint32: [0, 4294967295],
919
919
  float32: [-34028234663852886e22, 34028234663852886e22],
920
920
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
921
921
  };
922
- function jn(e, t) {
922
+ function Mn(e, t) {
923
923
  const n = e._zod.def, o = B(e._zod.def, {
924
924
  get shape() {
925
925
  const i = {};
@@ -934,7 +934,7 @@ function jn(e, t) {
934
934
  });
935
935
  return D(e, o);
936
936
  }
937
- function Nn(e, t) {
937
+ function Fn(e, t) {
938
938
  const n = e._zod.def, o = B(e._zod.def, {
939
939
  get shape() {
940
940
  const i = { ...e._zod.def.shape };
@@ -949,7 +949,7 @@ function Nn(e, t) {
949
949
  });
950
950
  return D(e, o);
951
951
  }
952
- function Dn(e, t) {
952
+ function Vn(e, t) {
953
953
  if (!H(t))
954
954
  throw new Error("Invalid input to extend: expected a plain object");
955
955
  const n = e._zod.def.checks;
@@ -964,7 +964,7 @@ function Dn(e, t) {
964
964
  });
965
965
  return D(e, i);
966
966
  }
967
- function Un(e, t) {
967
+ function Bn(e, t) {
968
968
  if (!H(t))
969
969
  throw new Error("Invalid input to safeExtend: expected a plain object");
970
970
  const n = {
@@ -977,7 +977,7 @@ function Un(e, t) {
977
977
  };
978
978
  return D(e, n);
979
979
  }
980
- function Mn(e, t) {
980
+ function Gn(e, t) {
981
981
  const n = B(e._zod.def, {
982
982
  get shape() {
983
983
  const o = { ...e._zod.def.shape, ...t._zod.def.shape };
@@ -991,7 +991,7 @@ function Mn(e, t) {
991
991
  });
992
992
  return D(e, n);
993
993
  }
994
- function Fn(e, t, n) {
994
+ function Wn(e, t, n) {
995
995
  const o = B(t._zod.def, {
996
996
  get shape() {
997
997
  const i = t._zod.def.shape, a = { ...i };
@@ -1016,7 +1016,7 @@ function Fn(e, t, n) {
1016
1016
  });
1017
1017
  return D(t, o);
1018
1018
  }
1019
- function Vn(e, t, n) {
1019
+ function qn(e, t, n) {
1020
1020
  const o = B(t._zod.def, {
1021
1021
  get shape() {
1022
1022
  const i = t._zod.def.shape, a = { ...i };
@@ -1066,7 +1066,7 @@ function N(e, t, n) {
1066
1066
  }
1067
1067
  return delete o.inst, delete o.continue, t?.reportInput || delete o.input, o;
1068
1068
  }
1069
- function xe(e) {
1069
+ function Le(e) {
1070
1070
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
1071
1071
  }
1072
1072
  function re(...e) {
@@ -1078,25 +1078,25 @@ function re(...e) {
1078
1078
  inst: o
1079
1079
  } : { ...t };
1080
1080
  }
1081
- const Ot = (e, t) => {
1081
+ const Zt = (e, t) => {
1082
1082
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
1083
1083
  value: e._zod,
1084
1084
  enumerable: !1
1085
1085
  }), Object.defineProperty(e, "issues", {
1086
1086
  value: t,
1087
1087
  enumerable: !1
1088
- }), e.message = JSON.stringify(t, Te, 2), Object.defineProperty(e, "toString", {
1088
+ }), e.message = JSON.stringify(t, ze, 2), Object.defineProperty(e, "toString", {
1089
1089
  value: () => e.message,
1090
1090
  enumerable: !1
1091
1091
  });
1092
- }, $t = /* @__PURE__ */ m("$ZodError", Ot), Pt = /* @__PURE__ */ m("$ZodError", Ot, { Parent: Error });
1093
- function Bn(e, t = (n) => n.message) {
1092
+ }, xt = /* @__PURE__ */ m("$ZodError", Zt), Lt = /* @__PURE__ */ m("$ZodError", Zt, { Parent: Error });
1093
+ function Kn(e, t = (n) => n.message) {
1094
1094
  const n = {}, o = [];
1095
1095
  for (const i of e.issues)
1096
1096
  i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : o.push(t(i));
1097
1097
  return { formErrors: o, fieldErrors: n };
1098
1098
  }
1099
- function Gn(e, t = (n) => n.message) {
1099
+ function Hn(e, t = (n) => n.message) {
1100
1100
  const n = { _errors: [] }, o = (i) => {
1101
1101
  for (const a of i.issues)
1102
1102
  if (a.code === "invalid_union" && a.errors.length)
@@ -1117,21 +1117,21 @@ function Gn(e, t = (n) => n.message) {
1117
1117
  };
1118
1118
  return o(e), n;
1119
1119
  }
1120
- const Le = (e) => (t, n, o, i) => {
1120
+ const Re = (e) => (t, n, o, i) => {
1121
1121
  const a = o ? Object.assign(o, { async: !1 }) : { async: !1 }, u = t._zod.run({ value: n, issues: [] }, a);
1122
1122
  if (u instanceof Promise)
1123
1123
  throw new K();
1124
1124
  if (u.issues.length) {
1125
1125
  const l = new (i?.Err ?? e)(u.issues.map((p) => N(p, a, j())));
1126
- throw zt(l, i?.callee), l;
1126
+ throw $t(l, i?.callee), l;
1127
1127
  }
1128
1128
  return u.value;
1129
- }, Re = (e) => async (t, n, o, i) => {
1129
+ }, je = (e) => async (t, n, o, i) => {
1130
1130
  const a = o ? Object.assign(o, { async: !0 }) : { async: !0 };
1131
1131
  let u = t._zod.run({ value: n, issues: [] }, a);
1132
1132
  if (u instanceof Promise && (u = await u), u.issues.length) {
1133
1133
  const l = new (i?.Err ?? e)(u.issues.map((p) => N(p, a, j())));
1134
- throw zt(l, i?.callee), l;
1134
+ throw $t(l, i?.callee), l;
1135
1135
  }
1136
1136
  return u.value;
1137
1137
  }, _e = (e) => (t, n, o) => {
@@ -1140,58 +1140,58 @@ const Le = (e) => (t, n, o, i) => {
1140
1140
  throw new K();
1141
1141
  return a.issues.length ? {
1142
1142
  success: !1,
1143
- error: new (e ?? $t)(a.issues.map((u) => N(u, i, j())))
1143
+ error: new (e ?? xt)(a.issues.map((u) => N(u, i, j())))
1144
1144
  } : { success: !0, data: a.value };
1145
- }, Wn = /* @__PURE__ */ _e(Pt), me = (e) => async (t, n, o) => {
1145
+ }, Jn = /* @__PURE__ */ _e(Lt), me = (e) => async (t, n, o) => {
1146
1146
  const i = o ? Object.assign(o, { async: !0 }) : { async: !0 };
1147
1147
  let a = t._zod.run({ value: n, issues: [] }, i);
1148
1148
  return a instanceof Promise && (a = await a), a.issues.length ? {
1149
1149
  success: !1,
1150
1150
  error: new e(a.issues.map((u) => N(u, i, j())))
1151
1151
  } : { success: !0, data: a.value };
1152
- }, qn = /* @__PURE__ */ me(Pt), Kn = (e) => (t, n, o) => {
1153
- const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
1154
- return Le(e)(t, n, i);
1155
- }, Hn = (e) => (t, n, o) => Le(e)(t, n, o), Jn = (e) => async (t, n, o) => {
1152
+ }, Yn = /* @__PURE__ */ me(Lt), Qn = (e) => (t, n, o) => {
1156
1153
  const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
1157
1154
  return Re(e)(t, n, i);
1158
- }, Qn = (e) => async (t, n, o) => Re(e)(t, n, o), Yn = (e) => (t, n, o) => {
1155
+ }, Xn = (e) => (t, n, o) => Re(e)(t, n, o), eo = (e) => async (t, n, o) => {
1156
+ const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
1157
+ return je(e)(t, n, i);
1158
+ }, to = (e) => async (t, n, o) => je(e)(t, n, o), no = (e) => (t, n, o) => {
1159
1159
  const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
1160
1160
  return _e(e)(t, n, i);
1161
- }, Xn = (e) => (t, n, o) => _e(e)(t, n, o), eo = (e) => async (t, n, o) => {
1161
+ }, oo = (e) => (t, n, o) => _e(e)(t, n, o), ro = (e) => async (t, n, o) => {
1162
1162
  const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
1163
1163
  return me(e)(t, n, i);
1164
- }, to = (e) => async (t, n, o) => me(e)(t, n, o), no = /^[cC][^\s-]{8,}$/, oo = /^[0-9a-z]+$/, ro = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, io = /^[0-9a-vA-V]{20}$/, so = /^[A-Za-z0-9]{27}$/, ao = /^[a-zA-Z0-9_-]{21}$/, uo = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, co = /^([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})$/, Je = (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)$/, lo = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, po = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1165
- function fo() {
1166
- return new RegExp(po, "u");
1164
+ }, io = (e) => async (t, n, o) => me(e)(t, n, o), so = /^[cC][^\s-]{8,}$/, ao = /^[0-9a-z]+$/, uo = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, co = /^[0-9a-vA-V]{20}$/, lo = /^[A-Za-z0-9]{27}$/, po = /^[a-zA-Z0-9_-]{21}$/, fo = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ho = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Ye = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, _o = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, mo = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1165
+ function vo() {
1166
+ return new RegExp(mo, "u");
1167
1167
  }
1168
- const ho = /^(?:(?: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])$/, _o = /^(([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}|:))$/, mo = /^((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])$/, vo = /^(([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])$/, go = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Zt = /^[A-Za-z0-9_-]*$/, yo = /^\+(?:[0-9]){6,14}[0-9]$/, xt = "(?:(?:\\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])))", bo = /* @__PURE__ */ new RegExp(`^${xt}$`);
1169
- function Lt(e) {
1168
+ const go = /^(?:(?: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])$/, yo = /^(([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}|:))$/, bo = /^((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])$/, wo = /^(([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])$/, ko = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Rt = /^[A-Za-z0-9_-]*$/, Eo = /^\+(?:[0-9]){6,14}[0-9]$/, jt = "(?:(?:\\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])))", Co = /* @__PURE__ */ new RegExp(`^${jt}$`);
1169
+ function Nt(e) {
1170
1170
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
1171
1171
  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+)?)?`;
1172
1172
  }
1173
- function wo(e) {
1174
- return new RegExp(`^${Lt(e)}$`);
1173
+ function Ao(e) {
1174
+ return new RegExp(`^${Nt(e)}$`);
1175
1175
  }
1176
- function ko(e) {
1177
- const t = Lt({ precision: e.precision }), n = ["Z"];
1176
+ function So(e) {
1177
+ const t = Nt({ precision: e.precision }), n = ["Z"];
1178
1178
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
1179
1179
  const o = `${t}(?:${n.join("|")})`;
1180
- return new RegExp(`^${xt}T(?:${o})$`);
1180
+ return new RegExp(`^${jt}T(?:${o})$`);
1181
1181
  }
1182
- const Eo = (e) => {
1182
+ const To = (e) => {
1183
1183
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
1184
1184
  return new RegExp(`^${t}$`);
1185
- }, Co = /^-?\d+$/, Ao = /^-?\d+(?:\.\d+)?/, So = /^null$/i, To = /^[^A-Z]*$/, zo = /^[^a-z]*$/, $ = /* @__PURE__ */ m("$ZodCheck", (e, t) => {
1185
+ }, zo = /^-?\d+$/, Oo = /^-?\d+(?:\.\d+)?/, Io = /^null$/i, $o = /^[^A-Z]*$/, Po = /^[^a-z]*$/, $ = /* @__PURE__ */ m("$ZodCheck", (e, t) => {
1186
1186
  var n;
1187
1187
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
1188
- }), Rt = {
1188
+ }), Dt = {
1189
1189
  number: "number",
1190
1190
  bigint: "bigint",
1191
1191
  object: "date"
1192
- }, jt = /* @__PURE__ */ m("$ZodCheckLessThan", (e, t) => {
1192
+ }, Ut = /* @__PURE__ */ m("$ZodCheckLessThan", (e, t) => {
1193
1193
  $.init(e, t);
1194
- const n = Rt[typeof t.value];
1194
+ const n = Dt[typeof t.value];
1195
1195
  e._zod.onattach.push((o) => {
1196
1196
  const i = o._zod.bag, a = (t.inclusive ? i.maximum : i.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
1197
1197
  t.value < a && (t.inclusive ? i.maximum = t.value : i.exclusiveMaximum = t.value);
@@ -1206,9 +1206,9 @@ const Eo = (e) => {
1206
1206
  continue: !t.abort
1207
1207
  });
1208
1208
  };
1209
- }), Nt = /* @__PURE__ */ m("$ZodCheckGreaterThan", (e, t) => {
1209
+ }), Mt = /* @__PURE__ */ m("$ZodCheckGreaterThan", (e, t) => {
1210
1210
  $.init(e, t);
1211
- const n = Rt[typeof t.value];
1211
+ const n = Dt[typeof t.value];
1212
1212
  e._zod.onattach.push((o) => {
1213
1213
  const i = o._zod.bag, a = (t.inclusive ? i.minimum : i.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
1214
1214
  t.value > a && (t.inclusive ? i.minimum = t.value : i.exclusiveMinimum = t.value);
@@ -1223,14 +1223,14 @@ const Eo = (e) => {
1223
1223
  continue: !t.abort
1224
1224
  });
1225
1225
  };
1226
- }), Io = /* @__PURE__ */ m("$ZodCheckMultipleOf", (e, t) => {
1226
+ }), Zo = /* @__PURE__ */ m("$ZodCheckMultipleOf", (e, t) => {
1227
1227
  $.init(e, t), e._zod.onattach.push((n) => {
1228
1228
  var o;
1229
1229
  (o = n._zod.bag).multipleOf ?? (o.multipleOf = t.value);
1230
1230
  }), e._zod.check = (n) => {
1231
1231
  if (typeof n.value != typeof t.value)
1232
1232
  throw new Error("Cannot mix number and bigint in multiple_of check.");
1233
- (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : $n(n.value, t.value) === 0) || n.issues.push({
1233
+ (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Ln(n.value, t.value) === 0) || n.issues.push({
1234
1234
  origin: typeof n.value,
1235
1235
  code: "not_multiple_of",
1236
1236
  divisor: t.value,
@@ -1239,12 +1239,12 @@ const Eo = (e) => {
1239
1239
  continue: !t.abort
1240
1240
  });
1241
1241
  };
1242
- }), Oo = /* @__PURE__ */ m("$ZodCheckNumberFormat", (e, t) => {
1242
+ }), xo = /* @__PURE__ */ m("$ZodCheckNumberFormat", (e, t) => {
1243
1243
  $.init(e, t), t.format = t.format || "float64";
1244
- const n = t.format?.includes("int"), o = n ? "int" : "number", [i, a] = Rn[t.format];
1244
+ const n = t.format?.includes("int"), o = n ? "int" : "number", [i, a] = Un[t.format];
1245
1245
  e._zod.onattach.push((u) => {
1246
1246
  const l = u._zod.bag;
1247
- l.format = t.format, l.minimum = i, l.maximum = a, n && (l.pattern = Co);
1247
+ l.format = t.format, l.minimum = i, l.maximum = a, n && (l.pattern = zo);
1248
1248
  }), e._zod.check = (u) => {
1249
1249
  const l = u.value;
1250
1250
  if (n) {
@@ -1296,11 +1296,11 @@ const Eo = (e) => {
1296
1296
  inst: e
1297
1297
  });
1298
1298
  };
1299
- }), $o = /* @__PURE__ */ m("$ZodCheckMaxLength", (e, t) => {
1299
+ }), Lo = /* @__PURE__ */ m("$ZodCheckMaxLength", (e, t) => {
1300
1300
  var n;
1301
1301
  $.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
1302
1302
  const i = o.value;
1303
- return !Pe(i) && i.length !== void 0;
1303
+ return !Ze(i) && i.length !== void 0;
1304
1304
  }), e._zod.onattach.push((o) => {
1305
1305
  const i = o._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1306
1306
  t.maximum < i && (o._zod.bag.maximum = t.maximum);
@@ -1308,7 +1308,7 @@ const Eo = (e) => {
1308
1308
  const i = o.value;
1309
1309
  if (i.length <= t.maximum)
1310
1310
  return;
1311
- const u = xe(i);
1311
+ const u = Le(i);
1312
1312
  o.issues.push({
1313
1313
  origin: u,
1314
1314
  code: "too_big",
@@ -1319,11 +1319,11 @@ const Eo = (e) => {
1319
1319
  continue: !t.abort
1320
1320
  });
1321
1321
  };
1322
- }), Po = /* @__PURE__ */ m("$ZodCheckMinLength", (e, t) => {
1322
+ }), Ro = /* @__PURE__ */ m("$ZodCheckMinLength", (e, t) => {
1323
1323
  var n;
1324
1324
  $.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
1325
1325
  const i = o.value;
1326
- return !Pe(i) && i.length !== void 0;
1326
+ return !Ze(i) && i.length !== void 0;
1327
1327
  }), e._zod.onattach.push((o) => {
1328
1328
  const i = o._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1329
1329
  t.minimum > i && (o._zod.bag.minimum = t.minimum);
@@ -1331,7 +1331,7 @@ const Eo = (e) => {
1331
1331
  const i = o.value;
1332
1332
  if (i.length >= t.minimum)
1333
1333
  return;
1334
- const u = xe(i);
1334
+ const u = Le(i);
1335
1335
  o.issues.push({
1336
1336
  origin: u,
1337
1337
  code: "too_small",
@@ -1342,11 +1342,11 @@ const Eo = (e) => {
1342
1342
  continue: !t.abort
1343
1343
  });
1344
1344
  };
1345
- }), Zo = /* @__PURE__ */ m("$ZodCheckLengthEquals", (e, t) => {
1345
+ }), jo = /* @__PURE__ */ m("$ZodCheckLengthEquals", (e, t) => {
1346
1346
  var n;
1347
1347
  $.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
1348
1348
  const i = o.value;
1349
- return !Pe(i) && i.length !== void 0;
1349
+ return !Ze(i) && i.length !== void 0;
1350
1350
  }), e._zod.onattach.push((o) => {
1351
1351
  const i = o._zod.bag;
1352
1352
  i.minimum = t.length, i.maximum = t.length, i.length = t.length;
@@ -1354,7 +1354,7 @@ const Eo = (e) => {
1354
1354
  const i = o.value, a = i.length;
1355
1355
  if (a === t.length)
1356
1356
  return;
1357
- const u = xe(i), l = a > t.length;
1357
+ const u = Le(i), l = a > t.length;
1358
1358
  o.issues.push({
1359
1359
  origin: u,
1360
1360
  ...l ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -1382,7 +1382,7 @@ const Eo = (e) => {
1382
1382
  });
1383
1383
  }) : (o = e._zod).check ?? (o.check = () => {
1384
1384
  });
1385
- }), xo = /* @__PURE__ */ m("$ZodCheckRegex", (e, t) => {
1385
+ }), No = /* @__PURE__ */ m("$ZodCheckRegex", (e, t) => {
1386
1386
  ve.init(e, t), e._zod.check = (n) => {
1387
1387
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1388
1388
  origin: "string",
@@ -1394,11 +1394,11 @@ const Eo = (e) => {
1394
1394
  continue: !t.abort
1395
1395
  });
1396
1396
  };
1397
- }), Lo = /* @__PURE__ */ m("$ZodCheckLowerCase", (e, t) => {
1398
- t.pattern ?? (t.pattern = To), ve.init(e, t);
1399
- }), Ro = /* @__PURE__ */ m("$ZodCheckUpperCase", (e, t) => {
1400
- t.pattern ?? (t.pattern = zo), ve.init(e, t);
1401
- }), jo = /* @__PURE__ */ m("$ZodCheckIncludes", (e, t) => {
1397
+ }), Do = /* @__PURE__ */ m("$ZodCheckLowerCase", (e, t) => {
1398
+ t.pattern ?? (t.pattern = $o), ve.init(e, t);
1399
+ }), Uo = /* @__PURE__ */ m("$ZodCheckUpperCase", (e, t) => {
1400
+ t.pattern ?? (t.pattern = Po), ve.init(e, t);
1401
+ }), Mo = /* @__PURE__ */ m("$ZodCheckIncludes", (e, t) => {
1402
1402
  $.init(e, t);
1403
1403
  const n = J(t.includes), o = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
1404
1404
  t.pattern = o, e._zod.onattach.push((i) => {
@@ -1415,7 +1415,7 @@ const Eo = (e) => {
1415
1415
  continue: !t.abort
1416
1416
  });
1417
1417
  };
1418
- }), No = /* @__PURE__ */ m("$ZodCheckStartsWith", (e, t) => {
1418
+ }), Fo = /* @__PURE__ */ m("$ZodCheckStartsWith", (e, t) => {
1419
1419
  $.init(e, t);
1420
1420
  const n = new RegExp(`^${J(t.prefix)}.*`);
1421
1421
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((o) => {
@@ -1432,7 +1432,7 @@ const Eo = (e) => {
1432
1432
  continue: !t.abort
1433
1433
  });
1434
1434
  };
1435
- }), Do = /* @__PURE__ */ m("$ZodCheckEndsWith", (e, t) => {
1435
+ }), Vo = /* @__PURE__ */ m("$ZodCheckEndsWith", (e, t) => {
1436
1436
  $.init(e, t);
1437
1437
  const n = new RegExp(`.*${J(t.suffix)}$`);
1438
1438
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((o) => {
@@ -1449,12 +1449,12 @@ const Eo = (e) => {
1449
1449
  continue: !t.abort
1450
1450
  });
1451
1451
  };
1452
- }), Uo = /* @__PURE__ */ m("$ZodCheckOverwrite", (e, t) => {
1452
+ }), Bo = /* @__PURE__ */ m("$ZodCheckOverwrite", (e, t) => {
1453
1453
  $.init(e, t), e._zod.check = (n) => {
1454
1454
  n.value = t.tx(n.value);
1455
1455
  };
1456
1456
  });
1457
- class Mo {
1457
+ class Go {
1458
1458
  constructor(t = []) {
1459
1459
  this.content = [], this.indent = 0, this && (this.args = t);
1460
1460
  }
@@ -1477,13 +1477,13 @@ class Mo {
1477
1477
  `));
1478
1478
  }
1479
1479
  }
1480
- const Fo = {
1480
+ const Wo = {
1481
1481
  major: 4,
1482
1482
  minor: 1,
1483
1483
  patch: 13
1484
1484
  }, A = /* @__PURE__ */ m("$ZodType", (e, t) => {
1485
1485
  var n;
1486
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Fo;
1486
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Wo;
1487
1487
  const o = [...e._zod.def.checks ?? []];
1488
1488
  e._zod.traits.has("$ZodCheck") && o.unshift(e);
1489
1489
  for (const i of o)
@@ -1546,17 +1546,17 @@ const Fo = {
1546
1546
  e["~standard"] = {
1547
1547
  validate: (i) => {
1548
1548
  try {
1549
- const a = Wn(e, i);
1549
+ const a = Jn(e, i);
1550
1550
  return a.success ? { value: a.data } : { issues: a.error?.issues };
1551
1551
  } catch {
1552
- return qn(e, i).then((u) => u.success ? { value: u.data } : { issues: u.error?.issues });
1552
+ return Yn(e, i).then((u) => u.success ? { value: u.data } : { issues: u.error?.issues });
1553
1553
  }
1554
1554
  },
1555
1555
  vendor: "zod",
1556
1556
  version: 1
1557
1557
  };
1558
- }), je = /* @__PURE__ */ m("$ZodString", (e, t) => {
1559
- A.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Eo(e._zod.bag), e._zod.parse = (n, o) => {
1558
+ }), Ne = /* @__PURE__ */ m("$ZodString", (e, t) => {
1559
+ A.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? To(e._zod.bag), e._zod.parse = (n, o) => {
1560
1560
  if (t.coerce)
1561
1561
  try {
1562
1562
  n.value = String(n.value);
@@ -1570,10 +1570,10 @@ const Fo = {
1570
1570
  }), n;
1571
1571
  };
1572
1572
  }), z = /* @__PURE__ */ m("$ZodStringFormat", (e, t) => {
1573
- ve.init(e, t), je.init(e, t);
1574
- }), Vo = /* @__PURE__ */ m("$ZodGUID", (e, t) => {
1575
- t.pattern ?? (t.pattern = co), z.init(e, t);
1576
- }), Bo = /* @__PURE__ */ m("$ZodUUID", (e, t) => {
1573
+ ve.init(e, t), Ne.init(e, t);
1574
+ }), qo = /* @__PURE__ */ m("$ZodGUID", (e, t) => {
1575
+ t.pattern ?? (t.pattern = ho), z.init(e, t);
1576
+ }), Ko = /* @__PURE__ */ m("$ZodUUID", (e, t) => {
1577
1577
  if (t.version) {
1578
1578
  const o = {
1579
1579
  v1: 1,
@@ -1587,13 +1587,13 @@ const Fo = {
1587
1587
  }[t.version];
1588
1588
  if (o === void 0)
1589
1589
  throw new Error(`Invalid UUID version: "${t.version}"`);
1590
- t.pattern ?? (t.pattern = Je(o));
1590
+ t.pattern ?? (t.pattern = Ye(o));
1591
1591
  } else
1592
- t.pattern ?? (t.pattern = Je());
1592
+ t.pattern ?? (t.pattern = Ye());
1593
1593
  z.init(e, t);
1594
- }), Go = /* @__PURE__ */ m("$ZodEmail", (e, t) => {
1595
- t.pattern ?? (t.pattern = lo), z.init(e, t);
1596
- }), Wo = /* @__PURE__ */ m("$ZodURL", (e, t) => {
1594
+ }), Ho = /* @__PURE__ */ m("$ZodEmail", (e, t) => {
1595
+ t.pattern ?? (t.pattern = _o), z.init(e, t);
1596
+ }), Jo = /* @__PURE__ */ m("$ZodURL", (e, t) => {
1597
1597
  z.init(e, t), e._zod.check = (n) => {
1598
1598
  try {
1599
1599
  const o = n.value.trim(), i = new URL(o);
@@ -1625,32 +1625,32 @@ const Fo = {
1625
1625
  });
1626
1626
  }
1627
1627
  };
1628
- }), qo = /* @__PURE__ */ m("$ZodEmoji", (e, t) => {
1629
- t.pattern ?? (t.pattern = fo()), z.init(e, t);
1630
- }), Ko = /* @__PURE__ */ m("$ZodNanoID", (e, t) => {
1631
- t.pattern ?? (t.pattern = ao), z.init(e, t);
1632
- }), Ho = /* @__PURE__ */ m("$ZodCUID", (e, t) => {
1633
- t.pattern ?? (t.pattern = no), z.init(e, t);
1634
- }), Jo = /* @__PURE__ */ m("$ZodCUID2", (e, t) => {
1635
- t.pattern ?? (t.pattern = oo), z.init(e, t);
1636
- }), Qo = /* @__PURE__ */ m("$ZodULID", (e, t) => {
1637
- t.pattern ?? (t.pattern = ro), z.init(e, t);
1638
- }), Yo = /* @__PURE__ */ m("$ZodXID", (e, t) => {
1639
- t.pattern ?? (t.pattern = io), z.init(e, t);
1640
- }), Xo = /* @__PURE__ */ m("$ZodKSUID", (e, t) => {
1628
+ }), Yo = /* @__PURE__ */ m("$ZodEmoji", (e, t) => {
1629
+ t.pattern ?? (t.pattern = vo()), z.init(e, t);
1630
+ }), Qo = /* @__PURE__ */ m("$ZodNanoID", (e, t) => {
1631
+ t.pattern ?? (t.pattern = po), z.init(e, t);
1632
+ }), Xo = /* @__PURE__ */ m("$ZodCUID", (e, t) => {
1641
1633
  t.pattern ?? (t.pattern = so), z.init(e, t);
1642
- }), er = /* @__PURE__ */ m("$ZodISODateTime", (e, t) => {
1643
- t.pattern ?? (t.pattern = ko(t)), z.init(e, t);
1644
- }), tr = /* @__PURE__ */ m("$ZodISODate", (e, t) => {
1645
- t.pattern ?? (t.pattern = bo), z.init(e, t);
1646
- }), nr = /* @__PURE__ */ m("$ZodISOTime", (e, t) => {
1647
- t.pattern ?? (t.pattern = wo(t)), z.init(e, t);
1648
- }), or = /* @__PURE__ */ m("$ZodISODuration", (e, t) => {
1634
+ }), er = /* @__PURE__ */ m("$ZodCUID2", (e, t) => {
1635
+ t.pattern ?? (t.pattern = ao), z.init(e, t);
1636
+ }), tr = /* @__PURE__ */ m("$ZodULID", (e, t) => {
1649
1637
  t.pattern ?? (t.pattern = uo), z.init(e, t);
1650
- }), rr = /* @__PURE__ */ m("$ZodIPv4", (e, t) => {
1651
- t.pattern ?? (t.pattern = ho), z.init(e, t), e._zod.bag.format = "ipv4";
1652
- }), ir = /* @__PURE__ */ m("$ZodIPv6", (e, t) => {
1653
- t.pattern ?? (t.pattern = _o), z.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1638
+ }), nr = /* @__PURE__ */ m("$ZodXID", (e, t) => {
1639
+ t.pattern ?? (t.pattern = co), z.init(e, t);
1640
+ }), or = /* @__PURE__ */ m("$ZodKSUID", (e, t) => {
1641
+ t.pattern ?? (t.pattern = lo), z.init(e, t);
1642
+ }), rr = /* @__PURE__ */ m("$ZodISODateTime", (e, t) => {
1643
+ t.pattern ?? (t.pattern = So(t)), z.init(e, t);
1644
+ }), ir = /* @__PURE__ */ m("$ZodISODate", (e, t) => {
1645
+ t.pattern ?? (t.pattern = Co), z.init(e, t);
1646
+ }), sr = /* @__PURE__ */ m("$ZodISOTime", (e, t) => {
1647
+ t.pattern ?? (t.pattern = Ao(t)), z.init(e, t);
1648
+ }), ar = /* @__PURE__ */ m("$ZodISODuration", (e, t) => {
1649
+ t.pattern ?? (t.pattern = fo), z.init(e, t);
1650
+ }), ur = /* @__PURE__ */ m("$ZodIPv4", (e, t) => {
1651
+ t.pattern ?? (t.pattern = go), z.init(e, t), e._zod.bag.format = "ipv4";
1652
+ }), cr = /* @__PURE__ */ m("$ZodIPv6", (e, t) => {
1653
+ t.pattern ?? (t.pattern = yo), z.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1654
1654
  try {
1655
1655
  new URL(`http://[${n.value}]`);
1656
1656
  } catch {
@@ -1663,10 +1663,10 @@ const Fo = {
1663
1663
  });
1664
1664
  }
1665
1665
  };
1666
- }), sr = /* @__PURE__ */ m("$ZodCIDRv4", (e, t) => {
1667
- t.pattern ?? (t.pattern = mo), z.init(e, t);
1668
- }), ar = /* @__PURE__ */ m("$ZodCIDRv6", (e, t) => {
1669
- t.pattern ?? (t.pattern = vo), z.init(e, t), e._zod.check = (n) => {
1666
+ }), lr = /* @__PURE__ */ m("$ZodCIDRv4", (e, t) => {
1667
+ t.pattern ?? (t.pattern = bo), z.init(e, t);
1668
+ }), dr = /* @__PURE__ */ m("$ZodCIDRv6", (e, t) => {
1669
+ t.pattern ?? (t.pattern = wo), z.init(e, t), e._zod.check = (n) => {
1670
1670
  const o = n.value.split("/");
1671
1671
  try {
1672
1672
  if (o.length !== 2)
@@ -1691,7 +1691,7 @@ const Fo = {
1691
1691
  }
1692
1692
  };
1693
1693
  });
1694
- function Dt(e) {
1694
+ function Ft(e) {
1695
1695
  if (e === "")
1696
1696
  return !0;
1697
1697
  if (e.length % 4 !== 0)
@@ -1702,9 +1702,9 @@ function Dt(e) {
1702
1702
  return !1;
1703
1703
  }
1704
1704
  }
1705
- const ur = /* @__PURE__ */ m("$ZodBase64", (e, t) => {
1706
- t.pattern ?? (t.pattern = go), z.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1707
- Dt(n.value) || n.issues.push({
1705
+ const pr = /* @__PURE__ */ m("$ZodBase64", (e, t) => {
1706
+ t.pattern ?? (t.pattern = ko), z.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1707
+ Ft(n.value) || n.issues.push({
1708
1708
  code: "invalid_format",
1709
1709
  format: "base64",
1710
1710
  input: n.value,
@@ -1713,15 +1713,15 @@ const ur = /* @__PURE__ */ m("$ZodBase64", (e, t) => {
1713
1713
  });
1714
1714
  };
1715
1715
  });
1716
- function cr(e) {
1717
- if (!Zt.test(e))
1716
+ function fr(e) {
1717
+ if (!Rt.test(e))
1718
1718
  return !1;
1719
1719
  const t = e.replace(/[-_]/g, (o) => o === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1720
- return Dt(n);
1720
+ return Ft(n);
1721
1721
  }
1722
- const lr = /* @__PURE__ */ m("$ZodBase64URL", (e, t) => {
1723
- t.pattern ?? (t.pattern = Zt), z.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1724
- cr(n.value) || n.issues.push({
1722
+ const hr = /* @__PURE__ */ m("$ZodBase64URL", (e, t) => {
1723
+ t.pattern ?? (t.pattern = Rt), z.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1724
+ fr(n.value) || n.issues.push({
1725
1725
  code: "invalid_format",
1726
1726
  format: "base64url",
1727
1727
  input: n.value,
@@ -1729,10 +1729,10 @@ const lr = /* @__PURE__ */ m("$ZodBase64URL", (e, t) => {
1729
1729
  continue: !t.abort
1730
1730
  });
1731
1731
  };
1732
- }), dr = /* @__PURE__ */ m("$ZodE164", (e, t) => {
1733
- t.pattern ?? (t.pattern = yo), z.init(e, t);
1732
+ }), _r = /* @__PURE__ */ m("$ZodE164", (e, t) => {
1733
+ t.pattern ?? (t.pattern = Eo), z.init(e, t);
1734
1734
  });
1735
- function pr(e, t = null) {
1735
+ function mr(e, t = null) {
1736
1736
  try {
1737
1737
  const n = e.split(".");
1738
1738
  if (n.length !== 3)
@@ -1746,9 +1746,9 @@ function pr(e, t = null) {
1746
1746
  return !1;
1747
1747
  }
1748
1748
  }
1749
- const fr = /* @__PURE__ */ m("$ZodJWT", (e, t) => {
1749
+ const vr = /* @__PURE__ */ m("$ZodJWT", (e, t) => {
1750
1750
  z.init(e, t), e._zod.check = (n) => {
1751
- pr(n.value, t.alg) || n.issues.push({
1751
+ mr(n.value, t.alg) || n.issues.push({
1752
1752
  code: "invalid_format",
1753
1753
  format: "jwt",
1754
1754
  input: n.value,
@@ -1756,8 +1756,8 @@ const fr = /* @__PURE__ */ m("$ZodJWT", (e, t) => {
1756
1756
  continue: !t.abort
1757
1757
  });
1758
1758
  };
1759
- }), Ut = /* @__PURE__ */ m("$ZodNumber", (e, t) => {
1760
- A.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Ao, e._zod.parse = (n, o) => {
1759
+ }), Vt = /* @__PURE__ */ m("$ZodNumber", (e, t) => {
1760
+ A.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Oo, e._zod.parse = (n, o) => {
1761
1761
  if (t.coerce)
1762
1762
  try {
1763
1763
  n.value = Number(n.value);
@@ -1775,10 +1775,10 @@ const fr = /* @__PURE__ */ m("$ZodJWT", (e, t) => {
1775
1775
  ...a ? { received: a } : {}
1776
1776
  }), n;
1777
1777
  };
1778
- }), hr = /* @__PURE__ */ m("$ZodNumberFormat", (e, t) => {
1779
- Oo.init(e, t), Ut.init(e, t);
1780
- }), _r = /* @__PURE__ */ m("$ZodNull", (e, t) => {
1781
- A.init(e, t), e._zod.pattern = So, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (n, o) => {
1778
+ }), gr = /* @__PURE__ */ m("$ZodNumberFormat", (e, t) => {
1779
+ xo.init(e, t), Vt.init(e, t);
1780
+ }), yr = /* @__PURE__ */ m("$ZodNull", (e, t) => {
1781
+ A.init(e, t), e._zod.pattern = Io, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (n, o) => {
1782
1782
  const i = n.value;
1783
1783
  return i === null || n.issues.push({
1784
1784
  expected: "null",
@@ -1787,9 +1787,9 @@ const fr = /* @__PURE__ */ m("$ZodJWT", (e, t) => {
1787
1787
  inst: e
1788
1788
  }), n;
1789
1789
  };
1790
- }), mr = /* @__PURE__ */ m("$ZodUnknown", (e, t) => {
1790
+ }), br = /* @__PURE__ */ m("$ZodUnknown", (e, t) => {
1791
1791
  A.init(e, t), e._zod.parse = (n) => n;
1792
- }), vr = /* @__PURE__ */ m("$ZodNever", (e, t) => {
1792
+ }), wr = /* @__PURE__ */ m("$ZodNever", (e, t) => {
1793
1793
  A.init(e, t), e._zod.parse = (n, o) => (n.issues.push({
1794
1794
  expected: "never",
1795
1795
  code: "invalid_type",
@@ -1800,7 +1800,7 @@ const fr = /* @__PURE__ */ m("$ZodJWT", (e, t) => {
1800
1800
  function Qe(e, t, n) {
1801
1801
  e.issues.length && t.issues.push(...F(n, e.issues)), t.value[n] = e.value;
1802
1802
  }
1803
- const gr = /* @__PURE__ */ m("$ZodArray", (e, t) => {
1803
+ const kr = /* @__PURE__ */ m("$ZodArray", (e, t) => {
1804
1804
  A.init(e, t), e._zod.parse = (n, o) => {
1805
1805
  const i = n.value;
1806
1806
  if (!Array.isArray(i))
@@ -1825,12 +1825,12 @@ const gr = /* @__PURE__ */ m("$ZodArray", (e, t) => {
1825
1825
  function fe(e, t, n, o) {
1826
1826
  e.issues.length && t.issues.push(...F(n, e.issues)), e.value === void 0 ? n in o && (t.value[n] = void 0) : t.value[n] = e.value;
1827
1827
  }
1828
- function Mt(e) {
1828
+ function Bt(e) {
1829
1829
  const t = Object.keys(e.shape);
1830
1830
  for (const o of t)
1831
1831
  if (!e.shape?.[o]?._zod?.traits?.has("$ZodType"))
1832
1832
  throw new Error(`Invalid element at key "${o}": expected a Zod schema`);
1833
- const n = Ln(e.shape);
1833
+ const n = Dn(e.shape);
1834
1834
  return {
1835
1835
  ...e,
1836
1836
  keys: t,
@@ -1839,7 +1839,7 @@ function Mt(e) {
1839
1839
  optionalKeys: new Set(n)
1840
1840
  };
1841
1841
  }
1842
- function Ft(e, t, n, o, i, a) {
1842
+ function Gt(e, t, n, o, i, a) {
1843
1843
  const u = [], l = i.keySet, p = i.catchall._zod, h = p.def.type;
1844
1844
  for (const y in t) {
1845
1845
  if (l.has(y))
@@ -1858,7 +1858,7 @@ function Ft(e, t, n, o, i, a) {
1858
1858
  inst: a
1859
1859
  }), e.length ? Promise.all(e).then(() => n) : n;
1860
1860
  }
1861
- const yr = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1861
+ const Er = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1862
1862
  if (A.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1863
1863
  const l = t.shape;
1864
1864
  Object.defineProperty(t, "shape", {
@@ -1870,7 +1870,7 @@ const yr = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1870
1870
  }
1871
1871
  });
1872
1872
  }
1873
- const o = $e(() => Mt(t));
1873
+ const o = Pe(() => Bt(t));
1874
1874
  C(e._zod, "propValues", () => {
1875
1875
  const l = t.shape, p = {};
1876
1876
  for (const h in l) {
@@ -1901,13 +1901,13 @@ const yr = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1901
1901
  const c = g[r]._zod.run({ value: h[r], issues: [] }, p);
1902
1902
  c instanceof Promise ? y.push(c.then((d) => fe(d, l, r, h))) : fe(c, l, r, h);
1903
1903
  }
1904
- return a ? Ft(y, h, l, p, o.value, e) : y.length ? Promise.all(y).then(() => l) : l;
1904
+ return a ? Gt(y, h, l, p, o.value, e) : y.length ? Promise.all(y).then(() => l) : l;
1905
1905
  };
1906
- }), br = /* @__PURE__ */ m("$ZodObjectJIT", (e, t) => {
1907
- yr.init(e, t);
1908
- const n = e._zod.parse, o = $e(() => Mt(t)), i = (r) => {
1909
- const s = new Mo(["shape", "payload", "ctx"]), c = o.value, d = (w) => {
1910
- const k = He(w);
1906
+ }), Cr = /* @__PURE__ */ m("$ZodObjectJIT", (e, t) => {
1907
+ Er.init(e, t);
1908
+ const n = e._zod.parse, o = Pe(() => Bt(t)), i = (r) => {
1909
+ const s = new Go(["shape", "payload", "ctx"]), c = o.value, d = (w) => {
1910
+ const k = Je(w);
1911
1911
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
1912
1912
  };
1913
1913
  s.write("const input = payload.value;");
@@ -1917,7 +1917,7 @@ const yr = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1917
1917
  f[w] = `key_${v++}`;
1918
1918
  s.write("const newResult = {};");
1919
1919
  for (const w of c.keys) {
1920
- const k = f[w], E = He(w);
1920
+ const k = f[w], E = Je(w);
1921
1921
  s.write(`const ${k} = ${d(w)};`), s.write(`
1922
1922
  if (${k}.issues.length) {
1923
1923
  payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
@@ -1942,12 +1942,12 @@ const yr = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1942
1942
  return (w, k) => _(r, w, k);
1943
1943
  };
1944
1944
  let a;
1945
- const u = pe, l = !Tt.jitless, h = l && Zn.value, y = t.catchall;
1945
+ const u = pe, l = !It.jitless, h = l && jn.value, y = t.catchall;
1946
1946
  let g;
1947
1947
  e._zod.parse = (r, s) => {
1948
1948
  g ?? (g = o.value);
1949
1949
  const c = r.value;
1950
- return u(c) ? l && h && s?.async === !1 && s.jitless !== !0 ? (a || (a = i(t.shape)), r = a(r, s), y ? Ft([], c, r, s, g, e) : r) : n(r, s) : (r.issues.push({
1950
+ return u(c) ? l && h && s?.async === !1 && s.jitless !== !0 ? (a || (a = i(t.shape)), r = a(r, s), y ? Gt([], c, r, s, g, e) : r) : n(r, s) : (r.issues.push({
1951
1951
  expected: "object",
1952
1952
  code: "invalid_type",
1953
1953
  input: c,
@@ -1955,7 +1955,7 @@ const yr = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1955
1955
  }), r);
1956
1956
  };
1957
1957
  });
1958
- function Ye(e, t, n, o) {
1958
+ function Xe(e, t, n, o) {
1959
1959
  for (const a of e)
1960
1960
  if (a.issues.length === 0)
1961
1961
  return t.value = a.value, t;
@@ -1967,14 +1967,14 @@ function Ye(e, t, n, o) {
1967
1967
  errors: e.map((a) => a.issues.map((u) => N(u, o, j())))
1968
1968
  }), t);
1969
1969
  }
1970
- const wr = /* @__PURE__ */ m("$ZodUnion", (e, t) => {
1970
+ const Ar = /* @__PURE__ */ m("$ZodUnion", (e, t) => {
1971
1971
  A.init(e, t), C(e._zod, "optin", () => t.options.some((i) => i._zod.optin === "optional") ? "optional" : void 0), C(e._zod, "optout", () => t.options.some((i) => i._zod.optout === "optional") ? "optional" : void 0), C(e._zod, "values", () => {
1972
1972
  if (t.options.every((i) => i._zod.values))
1973
1973
  return new Set(t.options.flatMap((i) => Array.from(i._zod.values)));
1974
1974
  }), C(e._zod, "pattern", () => {
1975
1975
  if (t.options.every((i) => i._zod.pattern)) {
1976
1976
  const i = t.options.map((a) => a._zod.pattern);
1977
- return new RegExp(`^(${i.map((a) => Ze(a.source)).join("|")})$`);
1977
+ return new RegExp(`^(${i.map((a) => xe(a.source)).join("|")})$`);
1978
1978
  }
1979
1979
  });
1980
1980
  const n = t.options.length === 1, o = t.options[0]._zod.run;
@@ -1996,15 +1996,15 @@ const wr = /* @__PURE__ */ m("$ZodUnion", (e, t) => {
1996
1996
  l.push(h);
1997
1997
  }
1998
1998
  }
1999
- return u ? Promise.all(l).then((p) => Ye(p, i, e, a)) : Ye(l, i, e, a);
1999
+ return u ? Promise.all(l).then((p) => Xe(p, i, e, a)) : Xe(l, i, e, a);
2000
2000
  };
2001
- }), kr = /* @__PURE__ */ m("$ZodIntersection", (e, t) => {
2001
+ }), Sr = /* @__PURE__ */ m("$ZodIntersection", (e, t) => {
2002
2002
  A.init(e, t), e._zod.parse = (n, o) => {
2003
2003
  const i = n.value, a = t.left._zod.run({ value: i, issues: [] }, o), u = t.right._zod.run({ value: i, issues: [] }, o);
2004
- return a instanceof Promise || u instanceof Promise ? Promise.all([a, u]).then(([p, h]) => Xe(n, p, h)) : Xe(n, a, u);
2004
+ return a instanceof Promise || u instanceof Promise ? Promise.all([a, u]).then(([p, h]) => et(n, p, h)) : et(n, a, u);
2005
2005
  };
2006
2006
  });
2007
- function ze(e, t) {
2007
+ function Oe(e, t) {
2008
2008
  if (e === t)
2009
2009
  return { valid: !0, data: e };
2010
2010
  if (e instanceof Date && t instanceof Date && +e == +t)
@@ -2012,7 +2012,7 @@ function ze(e, t) {
2012
2012
  if (H(e) && H(t)) {
2013
2013
  const n = Object.keys(t), o = Object.keys(e).filter((a) => n.indexOf(a) !== -1), i = { ...e, ...t };
2014
2014
  for (const a of o) {
2015
- const u = ze(e[a], t[a]);
2015
+ const u = Oe(e[a], t[a]);
2016
2016
  if (!u.valid)
2017
2017
  return {
2018
2018
  valid: !1,
@@ -2027,7 +2027,7 @@ function ze(e, t) {
2027
2027
  return { valid: !1, mergeErrorPath: [] };
2028
2028
  const n = [];
2029
2029
  for (let o = 0; o < e.length; o++) {
2030
- const i = e[o], a = t[o], u = ze(i, a);
2030
+ const i = e[o], a = t[o], u = Oe(i, a);
2031
2031
  if (!u.valid)
2032
2032
  return {
2033
2033
  valid: !1,
@@ -2039,15 +2039,15 @@ function ze(e, t) {
2039
2039
  }
2040
2040
  return { valid: !1, mergeErrorPath: [] };
2041
2041
  }
2042
- function Xe(e, t, n) {
2042
+ function et(e, t, n) {
2043
2043
  if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), q(e))
2044
2044
  return e;
2045
- const o = ze(t.value, n.value);
2045
+ const o = Oe(t.value, n.value);
2046
2046
  if (!o.valid)
2047
2047
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
2048
2048
  return e.value = o.data, e;
2049
2049
  }
2050
- const Er = /* @__PURE__ */ m("$ZodTuple", (e, t) => {
2050
+ const Tr = /* @__PURE__ */ m("$ZodTuple", (e, t) => {
2051
2051
  A.init(e, t);
2052
2052
  const n = t.items;
2053
2053
  e._zod.parse = (o, i) => {
@@ -2098,7 +2098,7 @@ const Er = /* @__PURE__ */ m("$ZodTuple", (e, t) => {
2098
2098
  function ae(e, t, n) {
2099
2099
  e.issues.length && t.issues.push(...F(n, e.issues)), t.value[n] = e.value;
2100
2100
  }
2101
- const Cr = /* @__PURE__ */ m("$ZodRecord", (e, t) => {
2101
+ const zr = /* @__PURE__ */ m("$ZodRecord", (e, t) => {
2102
2102
  A.init(e, t), e._zod.parse = (n, o) => {
2103
2103
  const i = n.value;
2104
2104
  if (!H(i))
@@ -2156,10 +2156,10 @@ const Cr = /* @__PURE__ */ m("$ZodRecord", (e, t) => {
2156
2156
  }
2157
2157
  return a.length ? Promise.all(a).then(() => n) : n;
2158
2158
  };
2159
- }), Ar = /* @__PURE__ */ m("$ZodEnum", (e, t) => {
2159
+ }), Or = /* @__PURE__ */ m("$ZodEnum", (e, t) => {
2160
2160
  A.init(e, t);
2161
- const n = On(t.entries), o = new Set(n);
2162
- e._zod.values = o, e._zod.pattern = new RegExp(`^(${n.filter((i) => xn.has(typeof i)).map((i) => typeof i == "string" ? J(i) : i.toString()).join("|")})$`), e._zod.parse = (i, a) => {
2161
+ const n = xn(t.entries), o = new Set(n);
2162
+ e._zod.values = o, e._zod.pattern = new RegExp(`^(${n.filter((i) => Nn.has(typeof i)).map((i) => typeof i == "string" ? J(i) : i.toString()).join("|")})$`), e._zod.parse = (i, a) => {
2163
2163
  const u = i.value;
2164
2164
  return o.has(u) || i.issues.push({
2165
2165
  code: "invalid_value",
@@ -2168,7 +2168,7 @@ const Cr = /* @__PURE__ */ m("$ZodRecord", (e, t) => {
2168
2168
  inst: e
2169
2169
  }), i;
2170
2170
  };
2171
- }), Sr = /* @__PURE__ */ m("$ZodLiteral", (e, t) => {
2171
+ }), Ir = /* @__PURE__ */ m("$ZodLiteral", (e, t) => {
2172
2172
  if (A.init(e, t), t.values.length === 0)
2173
2173
  throw new Error("Cannot create literal schema with no valid values");
2174
2174
  const n = new Set(t.values);
@@ -2181,10 +2181,10 @@ const Cr = /* @__PURE__ */ m("$ZodRecord", (e, t) => {
2181
2181
  inst: e
2182
2182
  }), o;
2183
2183
  };
2184
- }), Tr = /* @__PURE__ */ m("$ZodTransform", (e, t) => {
2184
+ }), $r = /* @__PURE__ */ m("$ZodTransform", (e, t) => {
2185
2185
  A.init(e, t), e._zod.parse = (n, o) => {
2186
2186
  if (o.direction === "backward")
2187
- throw new St(e.constructor.name);
2187
+ throw new Ot(e.constructor.name);
2188
2188
  const i = t.transform(n.value, n);
2189
2189
  if (o.async)
2190
2190
  return (i instanceof Promise ? i : Promise.resolve(i)).then((u) => (n.value = u, n));
@@ -2193,50 +2193,50 @@ const Cr = /* @__PURE__ */ m("$ZodRecord", (e, t) => {
2193
2193
  return n.value = i, n;
2194
2194
  };
2195
2195
  });
2196
- function et(e, t) {
2196
+ function tt(e, t) {
2197
2197
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
2198
2198
  }
2199
- const zr = /* @__PURE__ */ m("$ZodOptional", (e, t) => {
2199
+ const Pr = /* @__PURE__ */ m("$ZodOptional", (e, t) => {
2200
2200
  A.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", C(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), C(e._zod, "pattern", () => {
2201
2201
  const n = t.innerType._zod.pattern;
2202
- return n ? new RegExp(`^(${Ze(n.source)})?$`) : void 0;
2202
+ return n ? new RegExp(`^(${xe(n.source)})?$`) : void 0;
2203
2203
  }), e._zod.parse = (n, o) => {
2204
2204
  if (t.innerType._zod.optin === "optional") {
2205
2205
  const i = t.innerType._zod.run(n, o);
2206
- return i instanceof Promise ? i.then((a) => et(a, n.value)) : et(i, n.value);
2206
+ return i instanceof Promise ? i.then((a) => tt(a, n.value)) : tt(i, n.value);
2207
2207
  }
2208
2208
  return n.value === void 0 ? n : t.innerType._zod.run(n, o);
2209
2209
  };
2210
- }), Ir = /* @__PURE__ */ m("$ZodNullable", (e, t) => {
2210
+ }), Zr = /* @__PURE__ */ m("$ZodNullable", (e, t) => {
2211
2211
  A.init(e, t), C(e._zod, "optin", () => t.innerType._zod.optin), C(e._zod, "optout", () => t.innerType._zod.optout), C(e._zod, "pattern", () => {
2212
2212
  const n = t.innerType._zod.pattern;
2213
- return n ? new RegExp(`^(${Ze(n.source)}|null)$`) : void 0;
2213
+ return n ? new RegExp(`^(${xe(n.source)}|null)$`) : void 0;
2214
2214
  }), C(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, o) => n.value === null ? n : t.innerType._zod.run(n, o);
2215
- }), Or = /* @__PURE__ */ m("$ZodDefault", (e, t) => {
2215
+ }), xr = /* @__PURE__ */ m("$ZodDefault", (e, t) => {
2216
2216
  A.init(e, t), e._zod.optin = "optional", C(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => {
2217
2217
  if (o.direction === "backward")
2218
2218
  return t.innerType._zod.run(n, o);
2219
2219
  if (n.value === void 0)
2220
2220
  return n.value = t.defaultValue, n;
2221
2221
  const i = t.innerType._zod.run(n, o);
2222
- return i instanceof Promise ? i.then((a) => tt(a, t)) : tt(i, t);
2222
+ return i instanceof Promise ? i.then((a) => nt(a, t)) : nt(i, t);
2223
2223
  };
2224
2224
  });
2225
- function tt(e, t) {
2225
+ function nt(e, t) {
2226
2226
  return e.value === void 0 && (e.value = t.defaultValue), e;
2227
2227
  }
2228
- const $r = /* @__PURE__ */ m("$ZodPrefault", (e, t) => {
2228
+ const Lr = /* @__PURE__ */ m("$ZodPrefault", (e, t) => {
2229
2229
  A.init(e, t), e._zod.optin = "optional", C(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => (o.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, o));
2230
- }), Pr = /* @__PURE__ */ m("$ZodNonOptional", (e, t) => {
2230
+ }), Rr = /* @__PURE__ */ m("$ZodNonOptional", (e, t) => {
2231
2231
  A.init(e, t), C(e._zod, "values", () => {
2232
2232
  const n = t.innerType._zod.values;
2233
2233
  return n ? new Set([...n].filter((o) => o !== void 0)) : void 0;
2234
2234
  }), e._zod.parse = (n, o) => {
2235
2235
  const i = t.innerType._zod.run(n, o);
2236
- return i instanceof Promise ? i.then((a) => nt(a, e)) : nt(i, e);
2236
+ return i instanceof Promise ? i.then((a) => ot(a, e)) : ot(i, e);
2237
2237
  };
2238
2238
  });
2239
- function nt(e, t) {
2239
+ function ot(e, t) {
2240
2240
  return !e.issues.length && e.value === void 0 && e.issues.push({
2241
2241
  code: "invalid_type",
2242
2242
  expected: "nonoptional",
@@ -2244,7 +2244,7 @@ function nt(e, t) {
2244
2244
  inst: t
2245
2245
  }), e;
2246
2246
  }
2247
- const Zr = /* @__PURE__ */ m("$ZodCatch", (e, t) => {
2247
+ const jr = /* @__PURE__ */ m("$ZodCatch", (e, t) => {
2248
2248
  A.init(e, t), C(e._zod, "optin", () => t.innerType._zod.optin), C(e._zod, "optout", () => t.innerType._zod.optout), C(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => {
2249
2249
  if (o.direction === "backward")
2250
2250
  return t.innerType._zod.run(n, o);
@@ -2263,7 +2263,7 @@ const Zr = /* @__PURE__ */ m("$ZodCatch", (e, t) => {
2263
2263
  input: n.value
2264
2264
  }), n.issues = []), n);
2265
2265
  };
2266
- }), xr = /* @__PURE__ */ m("$ZodPipe", (e, t) => {
2266
+ }), Nr = /* @__PURE__ */ m("$ZodPipe", (e, t) => {
2267
2267
  A.init(e, t), C(e._zod, "values", () => t.in._zod.values), C(e._zod, "optin", () => t.in._zod.optin), C(e._zod, "optout", () => t.out._zod.optout), C(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, o) => {
2268
2268
  if (o.direction === "backward") {
2269
2269
  const a = t.out._zod.run(n, o);
@@ -2276,26 +2276,26 @@ const Zr = /* @__PURE__ */ m("$ZodCatch", (e, t) => {
2276
2276
  function ue(e, t, n) {
2277
2277
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
2278
2278
  }
2279
- const Lr = /* @__PURE__ */ m("$ZodReadonly", (e, t) => {
2279
+ const Dr = /* @__PURE__ */ m("$ZodReadonly", (e, t) => {
2280
2280
  A.init(e, t), C(e._zod, "propValues", () => t.innerType._zod.propValues), C(e._zod, "values", () => t.innerType._zod.values), C(e._zod, "optin", () => t.innerType?._zod?.optin), C(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, o) => {
2281
2281
  if (o.direction === "backward")
2282
2282
  return t.innerType._zod.run(n, o);
2283
2283
  const i = t.innerType._zod.run(n, o);
2284
- return i instanceof Promise ? i.then(ot) : ot(i);
2284
+ return i instanceof Promise ? i.then(rt) : rt(i);
2285
2285
  };
2286
2286
  });
2287
- function ot(e) {
2287
+ function rt(e) {
2288
2288
  return e.value = Object.freeze(e.value), e;
2289
2289
  }
2290
- const Rr = /* @__PURE__ */ m("$ZodCustom", (e, t) => {
2290
+ const Ur = /* @__PURE__ */ m("$ZodCustom", (e, t) => {
2291
2291
  $.init(e, t), A.init(e, t), e._zod.parse = (n, o) => n, e._zod.check = (n) => {
2292
2292
  const o = n.value, i = t.fn(o);
2293
2293
  if (i instanceof Promise)
2294
- return i.then((a) => rt(a, n, o, e));
2295
- rt(i, n, o, e);
2294
+ return i.then((a) => it(a, n, o, e));
2295
+ it(i, n, o, e);
2296
2296
  };
2297
2297
  });
2298
- function rt(e, t, n, o) {
2298
+ function it(e, t, n, o) {
2299
2299
  if (!e) {
2300
2300
  const i = {
2301
2301
  code: "custom",
@@ -2310,8 +2310,8 @@ function rt(e, t, n, o) {
2310
2310
  o._zod.def.params && (i.params = o._zod.def.params), t.issues.push(re(i));
2311
2311
  }
2312
2312
  }
2313
- var it;
2314
- class jr {
2313
+ var st;
2314
+ class Mr {
2315
2315
  constructor() {
2316
2316
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2317
2317
  }
@@ -2345,18 +2345,18 @@ class jr {
2345
2345
  return this._map.has(t);
2346
2346
  }
2347
2347
  }
2348
- function Nr() {
2349
- return new jr();
2348
+ function Fr() {
2349
+ return new Mr();
2350
2350
  }
2351
- (it = globalThis).__zod_globalRegistry ?? (it.__zod_globalRegistry = Nr());
2351
+ (st = globalThis).__zod_globalRegistry ?? (st.__zod_globalRegistry = Fr());
2352
2352
  const ce = globalThis.__zod_globalRegistry;
2353
- function Dr(e, t) {
2353
+ function Vr(e, t) {
2354
2354
  return new e({
2355
2355
  type: "string",
2356
2356
  ...b(t)
2357
2357
  });
2358
2358
  }
2359
- function Ur(e, t) {
2359
+ function Br(e, t) {
2360
2360
  return new e({
2361
2361
  type: "string",
2362
2362
  format: "email",
@@ -2365,7 +2365,7 @@ function Ur(e, t) {
2365
2365
  ...b(t)
2366
2366
  });
2367
2367
  }
2368
- function st(e, t) {
2368
+ function at(e, t) {
2369
2369
  return new e({
2370
2370
  type: "string",
2371
2371
  format: "guid",
@@ -2374,7 +2374,7 @@ function st(e, t) {
2374
2374
  ...b(t)
2375
2375
  });
2376
2376
  }
2377
- function Mr(e, t) {
2377
+ function Gr(e, t) {
2378
2378
  return new e({
2379
2379
  type: "string",
2380
2380
  format: "uuid",
@@ -2383,7 +2383,7 @@ function Mr(e, t) {
2383
2383
  ...b(t)
2384
2384
  });
2385
2385
  }
2386
- function Fr(e, t) {
2386
+ function Wr(e, t) {
2387
2387
  return new e({
2388
2388
  type: "string",
2389
2389
  format: "uuid",
@@ -2393,7 +2393,7 @@ function Fr(e, t) {
2393
2393
  ...b(t)
2394
2394
  });
2395
2395
  }
2396
- function Vr(e, t) {
2396
+ function qr(e, t) {
2397
2397
  return new e({
2398
2398
  type: "string",
2399
2399
  format: "uuid",
@@ -2403,7 +2403,7 @@ function Vr(e, t) {
2403
2403
  ...b(t)
2404
2404
  });
2405
2405
  }
2406
- function Br(e, t) {
2406
+ function Kr(e, t) {
2407
2407
  return new e({
2408
2408
  type: "string",
2409
2409
  format: "uuid",
@@ -2413,7 +2413,7 @@ function Br(e, t) {
2413
2413
  ...b(t)
2414
2414
  });
2415
2415
  }
2416
- function Gr(e, t) {
2416
+ function Hr(e, t) {
2417
2417
  return new e({
2418
2418
  type: "string",
2419
2419
  format: "url",
@@ -2422,7 +2422,7 @@ function Gr(e, t) {
2422
2422
  ...b(t)
2423
2423
  });
2424
2424
  }
2425
- function Wr(e, t) {
2425
+ function Jr(e, t) {
2426
2426
  return new e({
2427
2427
  type: "string",
2428
2428
  format: "emoji",
@@ -2431,7 +2431,7 @@ function Wr(e, t) {
2431
2431
  ...b(t)
2432
2432
  });
2433
2433
  }
2434
- function qr(e, t) {
2434
+ function Yr(e, t) {
2435
2435
  return new e({
2436
2436
  type: "string",
2437
2437
  format: "nanoid",
@@ -2440,7 +2440,7 @@ function qr(e, t) {
2440
2440
  ...b(t)
2441
2441
  });
2442
2442
  }
2443
- function Kr(e, t) {
2443
+ function Qr(e, t) {
2444
2444
  return new e({
2445
2445
  type: "string",
2446
2446
  format: "cuid",
@@ -2449,7 +2449,7 @@ function Kr(e, t) {
2449
2449
  ...b(t)
2450
2450
  });
2451
2451
  }
2452
- function Hr(e, t) {
2452
+ function Xr(e, t) {
2453
2453
  return new e({
2454
2454
  type: "string",
2455
2455
  format: "cuid2",
@@ -2458,7 +2458,7 @@ function Hr(e, t) {
2458
2458
  ...b(t)
2459
2459
  });
2460
2460
  }
2461
- function Jr(e, t) {
2461
+ function ei(e, t) {
2462
2462
  return new e({
2463
2463
  type: "string",
2464
2464
  format: "ulid",
@@ -2467,7 +2467,7 @@ function Jr(e, t) {
2467
2467
  ...b(t)
2468
2468
  });
2469
2469
  }
2470
- function Qr(e, t) {
2470
+ function ti(e, t) {
2471
2471
  return new e({
2472
2472
  type: "string",
2473
2473
  format: "xid",
@@ -2476,7 +2476,7 @@ function Qr(e, t) {
2476
2476
  ...b(t)
2477
2477
  });
2478
2478
  }
2479
- function Yr(e, t) {
2479
+ function ni(e, t) {
2480
2480
  return new e({
2481
2481
  type: "string",
2482
2482
  format: "ksuid",
@@ -2485,7 +2485,7 @@ function Yr(e, t) {
2485
2485
  ...b(t)
2486
2486
  });
2487
2487
  }
2488
- function Xr(e, t) {
2488
+ function oi(e, t) {
2489
2489
  return new e({
2490
2490
  type: "string",
2491
2491
  format: "ipv4",
@@ -2494,7 +2494,7 @@ function Xr(e, t) {
2494
2494
  ...b(t)
2495
2495
  });
2496
2496
  }
2497
- function ei(e, t) {
2497
+ function ri(e, t) {
2498
2498
  return new e({
2499
2499
  type: "string",
2500
2500
  format: "ipv6",
@@ -2503,7 +2503,7 @@ function ei(e, t) {
2503
2503
  ...b(t)
2504
2504
  });
2505
2505
  }
2506
- function ti(e, t) {
2506
+ function ii(e, t) {
2507
2507
  return new e({
2508
2508
  type: "string",
2509
2509
  format: "cidrv4",
@@ -2512,7 +2512,7 @@ function ti(e, t) {
2512
2512
  ...b(t)
2513
2513
  });
2514
2514
  }
2515
- function ni(e, t) {
2515
+ function si(e, t) {
2516
2516
  return new e({
2517
2517
  type: "string",
2518
2518
  format: "cidrv6",
@@ -2521,7 +2521,7 @@ function ni(e, t) {
2521
2521
  ...b(t)
2522
2522
  });
2523
2523
  }
2524
- function oi(e, t) {
2524
+ function ai(e, t) {
2525
2525
  return new e({
2526
2526
  type: "string",
2527
2527
  format: "base64",
@@ -2530,7 +2530,7 @@ function oi(e, t) {
2530
2530
  ...b(t)
2531
2531
  });
2532
2532
  }
2533
- function ri(e, t) {
2533
+ function ui(e, t) {
2534
2534
  return new e({
2535
2535
  type: "string",
2536
2536
  format: "base64url",
@@ -2539,7 +2539,7 @@ function ri(e, t) {
2539
2539
  ...b(t)
2540
2540
  });
2541
2541
  }
2542
- function ii(e, t) {
2542
+ function ci(e, t) {
2543
2543
  return new e({
2544
2544
  type: "string",
2545
2545
  format: "e164",
@@ -2548,7 +2548,7 @@ function ii(e, t) {
2548
2548
  ...b(t)
2549
2549
  });
2550
2550
  }
2551
- function si(e, t) {
2551
+ function li(e, t) {
2552
2552
  return new e({
2553
2553
  type: "string",
2554
2554
  format: "jwt",
@@ -2557,7 +2557,7 @@ function si(e, t) {
2557
2557
  ...b(t)
2558
2558
  });
2559
2559
  }
2560
- function ai(e, t) {
2560
+ function di(e, t) {
2561
2561
  return new e({
2562
2562
  type: "string",
2563
2563
  format: "datetime",
@@ -2568,7 +2568,7 @@ function ai(e, t) {
2568
2568
  ...b(t)
2569
2569
  });
2570
2570
  }
2571
- function ui(e, t) {
2571
+ function pi(e, t) {
2572
2572
  return new e({
2573
2573
  type: "string",
2574
2574
  format: "date",
@@ -2576,7 +2576,7 @@ function ui(e, t) {
2576
2576
  ...b(t)
2577
2577
  });
2578
2578
  }
2579
- function ci(e, t) {
2579
+ function fi(e, t) {
2580
2580
  return new e({
2581
2581
  type: "string",
2582
2582
  format: "time",
@@ -2585,7 +2585,7 @@ function ci(e, t) {
2585
2585
  ...b(t)
2586
2586
  });
2587
2587
  }
2588
- function li(e, t) {
2588
+ function hi(e, t) {
2589
2589
  return new e({
2590
2590
  type: "string",
2591
2591
  format: "duration",
@@ -2593,14 +2593,14 @@ function li(e, t) {
2593
2593
  ...b(t)
2594
2594
  });
2595
2595
  }
2596
- function di(e, t) {
2596
+ function _i(e, t) {
2597
2597
  return new e({
2598
2598
  type: "number",
2599
2599
  checks: [],
2600
2600
  ...b(t)
2601
2601
  });
2602
2602
  }
2603
- function pi(e, t) {
2603
+ function mi(e, t) {
2604
2604
  return new e({
2605
2605
  type: "number",
2606
2606
  check: "number_format",
@@ -2609,25 +2609,25 @@ function pi(e, t) {
2609
2609
  ...b(t)
2610
2610
  });
2611
2611
  }
2612
- function fi(e, t) {
2612
+ function vi(e, t) {
2613
2613
  return new e({
2614
2614
  type: "null",
2615
2615
  ...b(t)
2616
2616
  });
2617
2617
  }
2618
- function hi(e) {
2618
+ function gi(e) {
2619
2619
  return new e({
2620
2620
  type: "unknown"
2621
2621
  });
2622
2622
  }
2623
- function _i(e, t) {
2623
+ function yi(e, t) {
2624
2624
  return new e({
2625
2625
  type: "never",
2626
2626
  ...b(t)
2627
2627
  });
2628
2628
  }
2629
- function at(e, t) {
2630
- return new jt({
2629
+ function ut(e, t) {
2630
+ return new Ut({
2631
2631
  check: "less_than",
2632
2632
  ...b(t),
2633
2633
  value: e,
@@ -2635,15 +2635,15 @@ function at(e, t) {
2635
2635
  });
2636
2636
  }
2637
2637
  function be(e, t) {
2638
- return new jt({
2638
+ return new Ut({
2639
2639
  check: "less_than",
2640
2640
  ...b(t),
2641
2641
  value: e,
2642
2642
  inclusive: !0
2643
2643
  });
2644
2644
  }
2645
- function ut(e, t) {
2646
- return new Nt({
2645
+ function ct(e, t) {
2646
+ return new Mt({
2647
2647
  check: "greater_than",
2648
2648
  ...b(t),
2649
2649
  value: e,
@@ -2651,81 +2651,81 @@ function ut(e, t) {
2651
2651
  });
2652
2652
  }
2653
2653
  function we(e, t) {
2654
- return new Nt({
2654
+ return new Mt({
2655
2655
  check: "greater_than",
2656
2656
  ...b(t),
2657
2657
  value: e,
2658
2658
  inclusive: !0
2659
2659
  });
2660
2660
  }
2661
- function ct(e, t) {
2662
- return new Io({
2661
+ function lt(e, t) {
2662
+ return new Zo({
2663
2663
  check: "multiple_of",
2664
2664
  ...b(t),
2665
2665
  value: e
2666
2666
  });
2667
2667
  }
2668
- function Vt(e, t) {
2669
- return new $o({
2668
+ function Wt(e, t) {
2669
+ return new Lo({
2670
2670
  check: "max_length",
2671
2671
  ...b(t),
2672
2672
  maximum: e
2673
2673
  });
2674
2674
  }
2675
2675
  function he(e, t) {
2676
- return new Po({
2676
+ return new Ro({
2677
2677
  check: "min_length",
2678
2678
  ...b(t),
2679
2679
  minimum: e
2680
2680
  });
2681
2681
  }
2682
- function Bt(e, t) {
2683
- return new Zo({
2682
+ function qt(e, t) {
2683
+ return new jo({
2684
2684
  check: "length_equals",
2685
2685
  ...b(t),
2686
2686
  length: e
2687
2687
  });
2688
2688
  }
2689
- function mi(e, t) {
2690
- return new xo({
2689
+ function bi(e, t) {
2690
+ return new No({
2691
2691
  check: "string_format",
2692
2692
  format: "regex",
2693
2693
  ...b(t),
2694
2694
  pattern: e
2695
2695
  });
2696
2696
  }
2697
- function vi(e) {
2698
- return new Lo({
2697
+ function wi(e) {
2698
+ return new Do({
2699
2699
  check: "string_format",
2700
2700
  format: "lowercase",
2701
2701
  ...b(e)
2702
2702
  });
2703
2703
  }
2704
- function gi(e) {
2705
- return new Ro({
2704
+ function ki(e) {
2705
+ return new Uo({
2706
2706
  check: "string_format",
2707
2707
  format: "uppercase",
2708
2708
  ...b(e)
2709
2709
  });
2710
2710
  }
2711
- function yi(e, t) {
2712
- return new jo({
2711
+ function Ei(e, t) {
2712
+ return new Mo({
2713
2713
  check: "string_format",
2714
2714
  format: "includes",
2715
2715
  ...b(t),
2716
2716
  includes: e
2717
2717
  });
2718
2718
  }
2719
- function bi(e, t) {
2720
- return new No({
2719
+ function Ci(e, t) {
2720
+ return new Fo({
2721
2721
  check: "string_format",
2722
2722
  format: "starts_with",
2723
2723
  ...b(t),
2724
2724
  prefix: e
2725
2725
  });
2726
2726
  }
2727
- function wi(e, t) {
2728
- return new Do({
2727
+ function Ai(e, t) {
2728
+ return new Vo({
2729
2729
  check: "string_format",
2730
2730
  format: "ends_with",
2731
2731
  ...b(t),
@@ -2733,27 +2733,27 @@ function wi(e, t) {
2733
2733
  });
2734
2734
  }
2735
2735
  function ee(e) {
2736
- return new Uo({
2736
+ return new Bo({
2737
2737
  check: "overwrite",
2738
2738
  tx: e
2739
2739
  });
2740
2740
  }
2741
- function ki(e) {
2741
+ function Si(e) {
2742
2742
  return ee((t) => t.normalize(e));
2743
2743
  }
2744
- function Ei() {
2744
+ function Ti() {
2745
2745
  return ee((e) => e.trim());
2746
2746
  }
2747
- function Ci() {
2747
+ function zi() {
2748
2748
  return ee((e) => e.toLowerCase());
2749
2749
  }
2750
- function Ai() {
2750
+ function Oi() {
2751
2751
  return ee((e) => e.toUpperCase());
2752
2752
  }
2753
- function Si() {
2754
- return ee((e) => Pn(e));
2753
+ function Ii() {
2754
+ return ee((e) => Rn(e));
2755
2755
  }
2756
- function Ti(e, t, n) {
2756
+ function $i(e, t, n) {
2757
2757
  return new e({
2758
2758
  type: "array",
2759
2759
  element: t,
@@ -2763,7 +2763,7 @@ function Ti(e, t, n) {
2763
2763
  ...b(n)
2764
2764
  });
2765
2765
  }
2766
- function zi(e, t, n) {
2766
+ function Pi(e, t, n) {
2767
2767
  return new e({
2768
2768
  type: "custom",
2769
2769
  check: "custom",
@@ -2771,8 +2771,8 @@ function zi(e, t, n) {
2771
2771
  ...b(n)
2772
2772
  });
2773
2773
  }
2774
- function Ii(e) {
2775
- const t = Oi((n) => (n.addIssue = (o) => {
2774
+ function Zi(e) {
2775
+ const t = xi((n) => (n.addIssue = (o) => {
2776
2776
  if (typeof o == "string")
2777
2777
  n.issues.push(re(o, n.value, t._zod.def));
2778
2778
  else {
@@ -2782,56 +2782,56 @@ function Ii(e) {
2782
2782
  }, e(n.value, n)));
2783
2783
  return t;
2784
2784
  }
2785
- function Oi(e, t) {
2785
+ function xi(e, t) {
2786
2786
  const n = new $({
2787
2787
  check: "custom",
2788
2788
  ...b(t)
2789
2789
  });
2790
2790
  return n._zod.check = e, n;
2791
2791
  }
2792
- const $i = /* @__PURE__ */ m("ZodISODateTime", (e, t) => {
2793
- er.init(e, t), O.init(e, t);
2792
+ const Li = /* @__PURE__ */ m("ZodISODateTime", (e, t) => {
2793
+ rr.init(e, t), I.init(e, t);
2794
2794
  });
2795
- function Pi(e) {
2796
- return ai($i, e);
2795
+ function Ri(e) {
2796
+ return di(Li, e);
2797
2797
  }
2798
- const Zi = /* @__PURE__ */ m("ZodISODate", (e, t) => {
2799
- tr.init(e, t), O.init(e, t);
2798
+ const ji = /* @__PURE__ */ m("ZodISODate", (e, t) => {
2799
+ ir.init(e, t), I.init(e, t);
2800
2800
  });
2801
- function xi(e) {
2802
- return ui(Zi, e);
2801
+ function Ni(e) {
2802
+ return pi(ji, e);
2803
2803
  }
2804
- const Li = /* @__PURE__ */ m("ZodISOTime", (e, t) => {
2805
- nr.init(e, t), O.init(e, t);
2804
+ const Di = /* @__PURE__ */ m("ZodISOTime", (e, t) => {
2805
+ sr.init(e, t), I.init(e, t);
2806
2806
  });
2807
- function Ri(e) {
2808
- return ci(Li, e);
2807
+ function Ui(e) {
2808
+ return fi(Di, e);
2809
2809
  }
2810
- const ji = /* @__PURE__ */ m("ZodISODuration", (e, t) => {
2811
- or.init(e, t), O.init(e, t);
2810
+ const Mi = /* @__PURE__ */ m("ZodISODuration", (e, t) => {
2811
+ ar.init(e, t), I.init(e, t);
2812
2812
  });
2813
- function Ni(e) {
2814
- return li(ji, e);
2813
+ function Fi(e) {
2814
+ return hi(Mi, e);
2815
2815
  }
2816
- const Di = (e, t) => {
2817
- $t.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2816
+ const Vi = (e, t) => {
2817
+ xt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2818
2818
  format: {
2819
- value: (n) => Gn(e, n)
2819
+ value: (n) => Hn(e, n)
2820
2820
  // enumerable: false,
2821
2821
  },
2822
2822
  flatten: {
2823
- value: (n) => Bn(e, n)
2823
+ value: (n) => Kn(e, n)
2824
2824
  // enumerable: false,
2825
2825
  },
2826
2826
  addIssue: {
2827
2827
  value: (n) => {
2828
- e.issues.push(n), e.message = JSON.stringify(e.issues, Te, 2);
2828
+ e.issues.push(n), e.message = JSON.stringify(e.issues, ze, 2);
2829
2829
  }
2830
2830
  // enumerable: false,
2831
2831
  },
2832
2832
  addIssues: {
2833
2833
  value: (n) => {
2834
- e.issues.push(...n), e.message = JSON.stringify(e.issues, Te, 2);
2834
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, ze, 2);
2835
2835
  }
2836
2836
  // enumerable: false,
2837
2837
  },
@@ -2842,14 +2842,14 @@ const Di = (e, t) => {
2842
2842
  // enumerable: false,
2843
2843
  }
2844
2844
  });
2845
- }, Z = /* @__PURE__ */ m("ZodError", Di, {
2845
+ }, Z = /* @__PURE__ */ m("ZodError", Vi, {
2846
2846
  Parent: Error
2847
- }), Ui = /* @__PURE__ */ Le(Z), Mi = /* @__PURE__ */ Re(Z), Fi = /* @__PURE__ */ _e(Z), Vi = /* @__PURE__ */ me(Z), Bi = /* @__PURE__ */ Kn(Z), Gi = /* @__PURE__ */ Hn(Z), Wi = /* @__PURE__ */ Jn(Z), qi = /* @__PURE__ */ Qn(Z), Ki = /* @__PURE__ */ Yn(Z), Hi = /* @__PURE__ */ Xn(Z), Ji = /* @__PURE__ */ eo(Z), Qi = /* @__PURE__ */ to(Z), I = /* @__PURE__ */ m("ZodType", (e, t) => (A.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(B(t, {
2847
+ }), Bi = /* @__PURE__ */ Re(Z), Gi = /* @__PURE__ */ je(Z), Wi = /* @__PURE__ */ _e(Z), qi = /* @__PURE__ */ me(Z), Ki = /* @__PURE__ */ Qn(Z), Hi = /* @__PURE__ */ Xn(Z), Ji = /* @__PURE__ */ eo(Z), Yi = /* @__PURE__ */ to(Z), Qi = /* @__PURE__ */ no(Z), Xi = /* @__PURE__ */ oo(Z), es = /* @__PURE__ */ ro(Z), ts = /* @__PURE__ */ io(Z), O = /* @__PURE__ */ m("ZodType", (e, t) => (A.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(B(t, {
2848
2848
  checks: [
2849
2849
  ...t.checks ?? [],
2850
2850
  ...n.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
2851
2851
  ]
2852
- })), e.clone = (n, o) => D(e, n, o), e.brand = () => e, e.register = (n, o) => (n.add(e, o), e), e.parse = (n, o) => Ui(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => Fi(e, n, o), e.parseAsync = async (n, o) => Mi(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => Vi(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => Bi(e, n, o), e.decode = (n, o) => Gi(e, n, o), e.encodeAsync = async (n, o) => Wi(e, n, o), e.decodeAsync = async (n, o) => qi(e, n, o), e.safeEncode = (n, o) => Ki(e, n, o), e.safeDecode = (n, o) => Hi(e, n, o), e.safeEncodeAsync = async (n, o) => Ji(e, n, o), e.safeDecodeAsync = async (n, o) => Qi(e, n, o), e.refine = (n, o) => e.check(qs(n, o)), e.superRefine = (n) => e.check(Ks(n)), e.overwrite = (n) => e.check(ee(n)), e.optional = () => ft(e), e.nullable = () => ht(e), e.nullish = () => ft(ht(e)), e.nonoptional = (n) => Us(e, n), e.array = () => Es(e), e.or = (n) => G([e, n]), e.and = (n) => Ts(e, n), e.transform = (n) => _t(e, xs(n)), e.default = (n) => js(e, n), e.prefault = (n) => Ds(e, n), e.catch = (n) => Fs(e, n), e.pipe = (n) => _t(e, n), e.readonly = () => Gs(e), e.describe = (n) => {
2852
+ })), e.clone = (n, o) => D(e, n, o), e.brand = () => e, e.register = (n, o) => (n.add(e, o), e), e.parse = (n, o) => Bi(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => Wi(e, n, o), e.parseAsync = async (n, o) => Gi(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => qi(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => Ki(e, n, o), e.decode = (n, o) => Hi(e, n, o), e.encodeAsync = async (n, o) => Ji(e, n, o), e.decodeAsync = async (n, o) => Yi(e, n, o), e.safeEncode = (n, o) => Qi(e, n, o), e.safeDecode = (n, o) => Xi(e, n, o), e.safeEncodeAsync = async (n, o) => es(e, n, o), e.safeDecodeAsync = async (n, o) => ts(e, n, o), e.refine = (n, o) => e.check(Ys(n, o)), e.superRefine = (n) => e.check(Qs(n)), e.overwrite = (n) => e.check(ee(n)), e.optional = () => ht(e), e.nullable = () => _t(e), e.nullish = () => ht(_t(e)), e.nonoptional = (n) => Bs(e, n), e.array = () => Ts(e), e.or = (n) => G([e, n]), e.and = (n) => $s(e, n), e.transform = (n) => mt(e, Ns(n)), e.default = (n) => Ms(e, n), e.prefault = (n) => Vs(e, n), e.catch = (n) => Ws(e, n), e.pipe = (n) => mt(e, n), e.readonly = () => Hs(e), e.describe = (n) => {
2853
2853
  const o = e.clone();
2854
2854
  return ce.add(o, { description: n }), o;
2855
2855
  }, Object.defineProperty(e, "description", {
@@ -2862,96 +2862,96 @@ const Di = (e, t) => {
2862
2862
  return ce.get(e);
2863
2863
  const o = e.clone();
2864
2864
  return ce.add(o, n[0]), o;
2865
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Gt = /* @__PURE__ */ m("_ZodString", (e, t) => {
2866
- je.init(e, t), I.init(e, t);
2865
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Kt = /* @__PURE__ */ m("_ZodString", (e, t) => {
2866
+ Ne.init(e, t), O.init(e, t);
2867
2867
  const n = e._zod.bag;
2868
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(mi(...o)), e.includes = (...o) => e.check(yi(...o)), e.startsWith = (...o) => e.check(bi(...o)), e.endsWith = (...o) => e.check(wi(...o)), e.min = (...o) => e.check(he(...o)), e.max = (...o) => e.check(Vt(...o)), e.length = (...o) => e.check(Bt(...o)), e.nonempty = (...o) => e.check(he(1, ...o)), e.lowercase = (o) => e.check(vi(o)), e.uppercase = (o) => e.check(gi(o)), e.trim = () => e.check(Ei()), e.normalize = (...o) => e.check(ki(...o)), e.toLowerCase = () => e.check(Ci()), e.toUpperCase = () => e.check(Ai()), e.slugify = () => e.check(Si());
2869
- }), Yi = /* @__PURE__ */ m("ZodString", (e, t) => {
2870
- je.init(e, t), Gt.init(e, t), e.email = (n) => e.check(Ur(Xi, n)), e.url = (n) => e.check(Gr(es, n)), e.jwt = (n) => e.check(si(_s, n)), e.emoji = (n) => e.check(Wr(ts, n)), e.guid = (n) => e.check(st(lt, n)), e.uuid = (n) => e.check(Mr(le, n)), e.uuidv4 = (n) => e.check(Fr(le, n)), e.uuidv6 = (n) => e.check(Vr(le, n)), e.uuidv7 = (n) => e.check(Br(le, n)), e.nanoid = (n) => e.check(qr(ns, n)), e.guid = (n) => e.check(st(lt, n)), e.cuid = (n) => e.check(Kr(os, n)), e.cuid2 = (n) => e.check(Hr(rs, n)), e.ulid = (n) => e.check(Jr(is, n)), e.base64 = (n) => e.check(oi(ps, n)), e.base64url = (n) => e.check(ri(fs, n)), e.xid = (n) => e.check(Qr(ss, n)), e.ksuid = (n) => e.check(Yr(as, n)), e.ipv4 = (n) => e.check(Xr(us, n)), e.ipv6 = (n) => e.check(ei(cs, n)), e.cidrv4 = (n) => e.check(ti(ls, n)), e.cidrv6 = (n) => e.check(ni(ds, n)), e.e164 = (n) => e.check(ii(hs, n)), e.datetime = (n) => e.check(Pi(n)), e.date = (n) => e.check(xi(n)), e.time = (n) => e.check(Ri(n)), e.duration = (n) => e.check(Ni(n));
2868
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(bi(...o)), e.includes = (...o) => e.check(Ei(...o)), e.startsWith = (...o) => e.check(Ci(...o)), e.endsWith = (...o) => e.check(Ai(...o)), e.min = (...o) => e.check(he(...o)), e.max = (...o) => e.check(Wt(...o)), e.length = (...o) => e.check(qt(...o)), e.nonempty = (...o) => e.check(he(1, ...o)), e.lowercase = (o) => e.check(wi(o)), e.uppercase = (o) => e.check(ki(o)), e.trim = () => e.check(Ti()), e.normalize = (...o) => e.check(Si(...o)), e.toLowerCase = () => e.check(zi()), e.toUpperCase = () => e.check(Oi()), e.slugify = () => e.check(Ii());
2869
+ }), ns = /* @__PURE__ */ m("ZodString", (e, t) => {
2870
+ Ne.init(e, t), Kt.init(e, t), e.email = (n) => e.check(Br(os, n)), e.url = (n) => e.check(Hr(rs, n)), e.jwt = (n) => e.check(li(ys, n)), e.emoji = (n) => e.check(Jr(is, n)), e.guid = (n) => e.check(at(dt, n)), e.uuid = (n) => e.check(Gr(le, n)), e.uuidv4 = (n) => e.check(Wr(le, n)), e.uuidv6 = (n) => e.check(qr(le, n)), e.uuidv7 = (n) => e.check(Kr(le, n)), e.nanoid = (n) => e.check(Yr(ss, n)), e.guid = (n) => e.check(at(dt, n)), e.cuid = (n) => e.check(Qr(as, n)), e.cuid2 = (n) => e.check(Xr(us, n)), e.ulid = (n) => e.check(ei(cs, n)), e.base64 = (n) => e.check(ai(ms, n)), e.base64url = (n) => e.check(ui(vs, n)), e.xid = (n) => e.check(ti(ls, n)), e.ksuid = (n) => e.check(ni(ds, n)), e.ipv4 = (n) => e.check(oi(ps, n)), e.ipv6 = (n) => e.check(ri(fs, n)), e.cidrv4 = (n) => e.check(ii(hs, n)), e.cidrv6 = (n) => e.check(si(_s, n)), e.e164 = (n) => e.check(ci(gs, n)), e.datetime = (n) => e.check(Ri(n)), e.date = (n) => e.check(Ni(n)), e.time = (n) => e.check(Ui(n)), e.duration = (n) => e.check(Fi(n));
2871
2871
  });
2872
- function Q(e) {
2873
- return Dr(Yi, e);
2874
- }
2875
- const O = /* @__PURE__ */ m("ZodStringFormat", (e, t) => {
2876
- z.init(e, t), Gt.init(e, t);
2877
- }), Xi = /* @__PURE__ */ m("ZodEmail", (e, t) => {
2878
- Go.init(e, t), O.init(e, t);
2879
- }), lt = /* @__PURE__ */ m("ZodGUID", (e, t) => {
2880
- Vo.init(e, t), O.init(e, t);
2872
+ function Y(e) {
2873
+ return Vr(ns, e);
2874
+ }
2875
+ const I = /* @__PURE__ */ m("ZodStringFormat", (e, t) => {
2876
+ z.init(e, t), Kt.init(e, t);
2877
+ }), os = /* @__PURE__ */ m("ZodEmail", (e, t) => {
2878
+ Ho.init(e, t), I.init(e, t);
2879
+ }), dt = /* @__PURE__ */ m("ZodGUID", (e, t) => {
2880
+ qo.init(e, t), I.init(e, t);
2881
2881
  }), le = /* @__PURE__ */ m("ZodUUID", (e, t) => {
2882
- Bo.init(e, t), O.init(e, t);
2883
- }), es = /* @__PURE__ */ m("ZodURL", (e, t) => {
2884
- Wo.init(e, t), O.init(e, t);
2885
- }), ts = /* @__PURE__ */ m("ZodEmoji", (e, t) => {
2886
- qo.init(e, t), O.init(e, t);
2887
- }), ns = /* @__PURE__ */ m("ZodNanoID", (e, t) => {
2888
- Ko.init(e, t), O.init(e, t);
2889
- }), os = /* @__PURE__ */ m("ZodCUID", (e, t) => {
2890
- Ho.init(e, t), O.init(e, t);
2891
- }), rs = /* @__PURE__ */ m("ZodCUID2", (e, t) => {
2892
- Jo.init(e, t), O.init(e, t);
2893
- }), is = /* @__PURE__ */ m("ZodULID", (e, t) => {
2894
- Qo.init(e, t), O.init(e, t);
2895
- }), ss = /* @__PURE__ */ m("ZodXID", (e, t) => {
2896
- Yo.init(e, t), O.init(e, t);
2897
- }), as = /* @__PURE__ */ m("ZodKSUID", (e, t) => {
2898
- Xo.init(e, t), O.init(e, t);
2899
- }), us = /* @__PURE__ */ m("ZodIPv4", (e, t) => {
2900
- rr.init(e, t), O.init(e, t);
2901
- }), cs = /* @__PURE__ */ m("ZodIPv6", (e, t) => {
2902
- ir.init(e, t), O.init(e, t);
2903
- }), ls = /* @__PURE__ */ m("ZodCIDRv4", (e, t) => {
2904
- sr.init(e, t), O.init(e, t);
2905
- }), ds = /* @__PURE__ */ m("ZodCIDRv6", (e, t) => {
2906
- ar.init(e, t), O.init(e, t);
2907
- }), ps = /* @__PURE__ */ m("ZodBase64", (e, t) => {
2908
- ur.init(e, t), O.init(e, t);
2909
- }), fs = /* @__PURE__ */ m("ZodBase64URL", (e, t) => {
2910
- lr.init(e, t), O.init(e, t);
2911
- }), hs = /* @__PURE__ */ m("ZodE164", (e, t) => {
2912
- dr.init(e, t), O.init(e, t);
2913
- }), _s = /* @__PURE__ */ m("ZodJWT", (e, t) => {
2914
- fr.init(e, t), O.init(e, t);
2915
- }), Wt = /* @__PURE__ */ m("ZodNumber", (e, t) => {
2916
- Ut.init(e, t), I.init(e, t), e.gt = (o, i) => e.check(ut(o, i)), e.gte = (o, i) => e.check(we(o, i)), e.min = (o, i) => e.check(we(o, i)), e.lt = (o, i) => e.check(at(o, i)), e.lte = (o, i) => e.check(be(o, i)), e.max = (o, i) => e.check(be(o, i)), e.int = (o) => e.check(dt(o)), e.safe = (o) => e.check(dt(o)), e.positive = (o) => e.check(ut(0, o)), e.nonnegative = (o) => e.check(we(0, o)), e.negative = (o) => e.check(at(0, o)), e.nonpositive = (o) => e.check(be(0, o)), e.multipleOf = (o, i) => e.check(ct(o, i)), e.step = (o, i) => e.check(ct(o, i)), e.finite = () => e;
2882
+ Ko.init(e, t), I.init(e, t);
2883
+ }), rs = /* @__PURE__ */ m("ZodURL", (e, t) => {
2884
+ Jo.init(e, t), I.init(e, t);
2885
+ }), is = /* @__PURE__ */ m("ZodEmoji", (e, t) => {
2886
+ Yo.init(e, t), I.init(e, t);
2887
+ }), ss = /* @__PURE__ */ m("ZodNanoID", (e, t) => {
2888
+ Qo.init(e, t), I.init(e, t);
2889
+ }), as = /* @__PURE__ */ m("ZodCUID", (e, t) => {
2890
+ Xo.init(e, t), I.init(e, t);
2891
+ }), us = /* @__PURE__ */ m("ZodCUID2", (e, t) => {
2892
+ er.init(e, t), I.init(e, t);
2893
+ }), cs = /* @__PURE__ */ m("ZodULID", (e, t) => {
2894
+ tr.init(e, t), I.init(e, t);
2895
+ }), ls = /* @__PURE__ */ m("ZodXID", (e, t) => {
2896
+ nr.init(e, t), I.init(e, t);
2897
+ }), ds = /* @__PURE__ */ m("ZodKSUID", (e, t) => {
2898
+ or.init(e, t), I.init(e, t);
2899
+ }), ps = /* @__PURE__ */ m("ZodIPv4", (e, t) => {
2900
+ ur.init(e, t), I.init(e, t);
2901
+ }), fs = /* @__PURE__ */ m("ZodIPv6", (e, t) => {
2902
+ cr.init(e, t), I.init(e, t);
2903
+ }), hs = /* @__PURE__ */ m("ZodCIDRv4", (e, t) => {
2904
+ lr.init(e, t), I.init(e, t);
2905
+ }), _s = /* @__PURE__ */ m("ZodCIDRv6", (e, t) => {
2906
+ dr.init(e, t), I.init(e, t);
2907
+ }), ms = /* @__PURE__ */ m("ZodBase64", (e, t) => {
2908
+ pr.init(e, t), I.init(e, t);
2909
+ }), vs = /* @__PURE__ */ m("ZodBase64URL", (e, t) => {
2910
+ hr.init(e, t), I.init(e, t);
2911
+ }), gs = /* @__PURE__ */ m("ZodE164", (e, t) => {
2912
+ _r.init(e, t), I.init(e, t);
2913
+ }), ys = /* @__PURE__ */ m("ZodJWT", (e, t) => {
2914
+ vr.init(e, t), I.init(e, t);
2915
+ }), Ht = /* @__PURE__ */ m("ZodNumber", (e, t) => {
2916
+ Vt.init(e, t), O.init(e, t), e.gt = (o, i) => e.check(ct(o, i)), e.gte = (o, i) => e.check(we(o, i)), e.min = (o, i) => e.check(we(o, i)), e.lt = (o, i) => e.check(ut(o, i)), e.lte = (o, i) => e.check(be(o, i)), e.max = (o, i) => e.check(be(o, i)), e.int = (o) => e.check(pt(o)), e.safe = (o) => e.check(pt(o)), e.positive = (o) => e.check(ct(0, o)), e.nonnegative = (o) => e.check(we(0, o)), e.negative = (o) => e.check(ut(0, o)), e.nonpositive = (o) => e.check(be(0, o)), e.multipleOf = (o, i) => e.check(lt(o, i)), e.step = (o, i) => e.check(lt(o, i)), e.finite = () => e;
2917
2917
  const n = e._zod.bag;
2918
2918
  e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
2919
2919
  });
2920
2920
  function P(e) {
2921
- return di(Wt, e);
2921
+ return _i(Ht, e);
2922
2922
  }
2923
- const ms = /* @__PURE__ */ m("ZodNumberFormat", (e, t) => {
2924
- hr.init(e, t), Wt.init(e, t);
2923
+ const bs = /* @__PURE__ */ m("ZodNumberFormat", (e, t) => {
2924
+ gr.init(e, t), Ht.init(e, t);
2925
2925
  });
2926
- function dt(e) {
2927
- return pi(ms, e);
2926
+ function pt(e) {
2927
+ return mi(bs, e);
2928
2928
  }
2929
- const vs = /* @__PURE__ */ m("ZodNull", (e, t) => {
2930
- _r.init(e, t), I.init(e, t);
2929
+ const ws = /* @__PURE__ */ m("ZodNull", (e, t) => {
2930
+ yr.init(e, t), O.init(e, t);
2931
2931
  });
2932
- function gs(e) {
2933
- return fi(vs, e);
2932
+ function ks(e) {
2933
+ return vi(ws, e);
2934
2934
  }
2935
- const ys = /* @__PURE__ */ m("ZodUnknown", (e, t) => {
2936
- mr.init(e, t), I.init(e, t);
2935
+ const Es = /* @__PURE__ */ m("ZodUnknown", (e, t) => {
2936
+ br.init(e, t), O.init(e, t);
2937
2937
  });
2938
- function pt() {
2939
- return hi(ys);
2938
+ function ft() {
2939
+ return gi(Es);
2940
2940
  }
2941
- const bs = /* @__PURE__ */ m("ZodNever", (e, t) => {
2942
- vr.init(e, t), I.init(e, t);
2941
+ const Cs = /* @__PURE__ */ m("ZodNever", (e, t) => {
2942
+ wr.init(e, t), O.init(e, t);
2943
2943
  });
2944
- function ws(e) {
2945
- return _i(bs, e);
2944
+ function As(e) {
2945
+ return yi(Cs, e);
2946
2946
  }
2947
- const ks = /* @__PURE__ */ m("ZodArray", (e, t) => {
2948
- gr.init(e, t), I.init(e, t), e.element = t.element, e.min = (n, o) => e.check(he(n, o)), e.nonempty = (n) => e.check(he(1, n)), e.max = (n, o) => e.check(Vt(n, o)), e.length = (n, o) => e.check(Bt(n, o)), e.unwrap = () => e.element;
2947
+ const Ss = /* @__PURE__ */ m("ZodArray", (e, t) => {
2948
+ kr.init(e, t), O.init(e, t), e.element = t.element, e.min = (n, o) => e.check(he(n, o)), e.nonempty = (n) => e.check(he(1, n)), e.max = (n, o) => e.check(Wt(n, o)), e.length = (n, o) => e.check(qt(n, o)), e.unwrap = () => e.element;
2949
2949
  });
2950
- function Es(e, t) {
2951
- return Ti(ks, e, t);
2950
+ function Ts(e, t) {
2951
+ return $i(Ss, e, t);
2952
2952
  }
2953
- const Cs = /* @__PURE__ */ m("ZodObject", (e, t) => {
2954
- br.init(e, t), I.init(e, t), C(e, "shape", () => t.shape), e.keyof = () => $s(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: pt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: pt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ws() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Dn(e, n), e.safeExtend = (n) => Un(e, n), e.merge = (n) => Mn(e, n), e.pick = (n) => jn(e, n), e.omit = (n) => Nn(e, n), e.partial = (...n) => Fn(qt, e, n[0]), e.required = (...n) => Vn(Kt, e, n[0]);
2953
+ const zs = /* @__PURE__ */ m("ZodObject", (e, t) => {
2954
+ Cr.init(e, t), O.init(e, t), C(e, "shape", () => t.shape), e.keyof = () => Ls(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: ft() }), e.loose = () => e.clone({ ...e._zod.def, catchall: ft() }), e.strict = () => e.clone({ ...e._zod.def, catchall: As() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Vn(e, n), e.safeExtend = (n) => Bn(e, n), e.merge = (n) => Gn(e, n), e.pick = (n) => Mn(e, n), e.omit = (n) => Fn(e, n), e.partial = (...n) => Wn(Jt, e, n[0]), e.required = (...n) => qn(Yt, e, n[0]);
2955
2955
  });
2956
2956
  function T(e, t) {
2957
2957
  const n = {
@@ -2959,48 +2959,48 @@ function T(e, t) {
2959
2959
  shape: e ?? {},
2960
2960
  ...b(t)
2961
2961
  };
2962
- return new Cs(n);
2962
+ return new zs(n);
2963
2963
  }
2964
- const As = /* @__PURE__ */ m("ZodUnion", (e, t) => {
2965
- wr.init(e, t), I.init(e, t), e.options = t.options;
2964
+ const Os = /* @__PURE__ */ m("ZodUnion", (e, t) => {
2965
+ Ar.init(e, t), O.init(e, t), e.options = t.options;
2966
2966
  });
2967
2967
  function G(e, t) {
2968
- return new As({
2968
+ return new Os({
2969
2969
  type: "union",
2970
2970
  options: e,
2971
2971
  ...b(t)
2972
2972
  });
2973
2973
  }
2974
- const Ss = /* @__PURE__ */ m("ZodIntersection", (e, t) => {
2975
- kr.init(e, t), I.init(e, t);
2974
+ const Is = /* @__PURE__ */ m("ZodIntersection", (e, t) => {
2975
+ Sr.init(e, t), O.init(e, t);
2976
2976
  });
2977
- function Ts(e, t) {
2978
- return new Ss({
2977
+ function $s(e, t) {
2978
+ return new Is({
2979
2979
  type: "intersection",
2980
2980
  left: e,
2981
2981
  right: t
2982
2982
  });
2983
2983
  }
2984
- const zs = /* @__PURE__ */ m("ZodTuple", (e, t) => {
2985
- Er.init(e, t), I.init(e, t), e.rest = (n) => e.clone({
2984
+ const Ps = /* @__PURE__ */ m("ZodTuple", (e, t) => {
2985
+ Tr.init(e, t), O.init(e, t), e.rest = (n) => e.clone({
2986
2986
  ...e._zod.def,
2987
2987
  rest: n
2988
2988
  });
2989
2989
  });
2990
2990
  function L(e, t, n) {
2991
2991
  const o = t instanceof A, i = o ? n : t, a = o ? t : null;
2992
- return new zs({
2992
+ return new Ps({
2993
2993
  type: "tuple",
2994
2994
  items: e,
2995
2995
  rest: a,
2996
2996
  ...b(i)
2997
2997
  });
2998
2998
  }
2999
- const Is = /* @__PURE__ */ m("ZodRecord", (e, t) => {
3000
- Cr.init(e, t), I.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
2999
+ const Zs = /* @__PURE__ */ m("ZodRecord", (e, t) => {
3000
+ zr.init(e, t), O.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
3001
3001
  });
3002
- function Os(e, t, n) {
3003
- return new Is({
3002
+ function xs(e, t, n) {
3003
+ return new Zs({
3004
3004
  type: "record",
3005
3005
  keyType: e,
3006
3006
  valueType: t,
@@ -3008,7 +3008,7 @@ function Os(e, t, n) {
3008
3008
  });
3009
3009
  }
3010
3010
  const Ie = /* @__PURE__ */ m("ZodEnum", (e, t) => {
3011
- Ar.init(e, t), I.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
3011
+ Or.init(e, t), O.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
3012
3012
  const n = new Set(Object.keys(t.entries));
3013
3013
  e.extract = (o, i) => {
3014
3014
  const a = {};
@@ -3038,7 +3038,7 @@ const Ie = /* @__PURE__ */ m("ZodEnum", (e, t) => {
3038
3038
  });
3039
3039
  };
3040
3040
  });
3041
- function $s(e, t) {
3041
+ function Ls(e, t) {
3042
3042
  const n = Array.isArray(e) ? Object.fromEntries(e.map((o) => [o, o])) : e;
3043
3043
  return new Ie({
3044
3044
  type: "enum",
@@ -3046,8 +3046,8 @@ function $s(e, t) {
3046
3046
  ...b(t)
3047
3047
  });
3048
3048
  }
3049
- const Ps = /* @__PURE__ */ m("ZodLiteral", (e, t) => {
3050
- Sr.init(e, t), I.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
3049
+ const Rs = /* @__PURE__ */ m("ZodLiteral", (e, t) => {
3050
+ Ir.init(e, t), O.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
3051
3051
  get() {
3052
3052
  if (t.values.length > 1)
3053
3053
  throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
@@ -3056,16 +3056,16 @@ const Ps = /* @__PURE__ */ m("ZodLiteral", (e, t) => {
3056
3056
  });
3057
3057
  });
3058
3058
  function R(e, t) {
3059
- return new Ps({
3059
+ return new Rs({
3060
3060
  type: "literal",
3061
3061
  values: Array.isArray(e) ? e : [e],
3062
3062
  ...b(t)
3063
3063
  });
3064
3064
  }
3065
- const Zs = /* @__PURE__ */ m("ZodTransform", (e, t) => {
3066
- Tr.init(e, t), I.init(e, t), e._zod.parse = (n, o) => {
3065
+ const js = /* @__PURE__ */ m("ZodTransform", (e, t) => {
3066
+ $r.init(e, t), O.init(e, t), e._zod.parse = (n, o) => {
3067
3067
  if (o.direction === "backward")
3068
- throw new St(e.constructor.name);
3068
+ throw new Ot(e.constructor.name);
3069
3069
  n.addIssue = (a) => {
3070
3070
  if (typeof a == "string")
3071
3071
  n.issues.push(re(a, n.value, t));
@@ -3078,142 +3078,142 @@ const Zs = /* @__PURE__ */ m("ZodTransform", (e, t) => {
3078
3078
  return i instanceof Promise ? i.then((a) => (n.value = a, n)) : (n.value = i, n);
3079
3079
  };
3080
3080
  });
3081
- function xs(e) {
3082
- return new Zs({
3081
+ function Ns(e) {
3082
+ return new js({
3083
3083
  type: "transform",
3084
3084
  transform: e
3085
3085
  });
3086
3086
  }
3087
- const qt = /* @__PURE__ */ m("ZodOptional", (e, t) => {
3088
- zr.init(e, t), I.init(e, t), e.unwrap = () => e._zod.def.innerType;
3087
+ const Jt = /* @__PURE__ */ m("ZodOptional", (e, t) => {
3088
+ Pr.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
3089
3089
  });
3090
- function ft(e) {
3091
- return new qt({
3090
+ function ht(e) {
3091
+ return new Jt({
3092
3092
  type: "optional",
3093
3093
  innerType: e
3094
3094
  });
3095
3095
  }
3096
- const Ls = /* @__PURE__ */ m("ZodNullable", (e, t) => {
3097
- Ir.init(e, t), I.init(e, t), e.unwrap = () => e._zod.def.innerType;
3096
+ const Ds = /* @__PURE__ */ m("ZodNullable", (e, t) => {
3097
+ Zr.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
3098
3098
  });
3099
- function ht(e) {
3100
- return new Ls({
3099
+ function _t(e) {
3100
+ return new Ds({
3101
3101
  type: "nullable",
3102
3102
  innerType: e
3103
3103
  });
3104
3104
  }
3105
- const Rs = /* @__PURE__ */ m("ZodDefault", (e, t) => {
3106
- Or.init(e, t), I.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3105
+ const Us = /* @__PURE__ */ m("ZodDefault", (e, t) => {
3106
+ xr.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3107
3107
  });
3108
- function js(e, t) {
3109
- return new Rs({
3108
+ function Ms(e, t) {
3109
+ return new Us({
3110
3110
  type: "default",
3111
3111
  innerType: e,
3112
3112
  get defaultValue() {
3113
- return typeof t == "function" ? t() : It(t);
3113
+ return typeof t == "function" ? t() : Pt(t);
3114
3114
  }
3115
3115
  });
3116
3116
  }
3117
- const Ns = /* @__PURE__ */ m("ZodPrefault", (e, t) => {
3118
- $r.init(e, t), I.init(e, t), e.unwrap = () => e._zod.def.innerType;
3117
+ const Fs = /* @__PURE__ */ m("ZodPrefault", (e, t) => {
3118
+ Lr.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
3119
3119
  });
3120
- function Ds(e, t) {
3121
- return new Ns({
3120
+ function Vs(e, t) {
3121
+ return new Fs({
3122
3122
  type: "prefault",
3123
3123
  innerType: e,
3124
3124
  get defaultValue() {
3125
- return typeof t == "function" ? t() : It(t);
3125
+ return typeof t == "function" ? t() : Pt(t);
3126
3126
  }
3127
3127
  });
3128
3128
  }
3129
- const Kt = /* @__PURE__ */ m("ZodNonOptional", (e, t) => {
3130
- Pr.init(e, t), I.init(e, t), e.unwrap = () => e._zod.def.innerType;
3129
+ const Yt = /* @__PURE__ */ m("ZodNonOptional", (e, t) => {
3130
+ Rr.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
3131
3131
  });
3132
- function Us(e, t) {
3133
- return new Kt({
3132
+ function Bs(e, t) {
3133
+ return new Yt({
3134
3134
  type: "nonoptional",
3135
3135
  innerType: e,
3136
3136
  ...b(t)
3137
3137
  });
3138
3138
  }
3139
- const Ms = /* @__PURE__ */ m("ZodCatch", (e, t) => {
3140
- Zr.init(e, t), I.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3139
+ const Gs = /* @__PURE__ */ m("ZodCatch", (e, t) => {
3140
+ jr.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3141
3141
  });
3142
- function Fs(e, t) {
3143
- return new Ms({
3142
+ function Ws(e, t) {
3143
+ return new Gs({
3144
3144
  type: "catch",
3145
3145
  innerType: e,
3146
3146
  catchValue: typeof t == "function" ? t : () => t
3147
3147
  });
3148
3148
  }
3149
- const Vs = /* @__PURE__ */ m("ZodPipe", (e, t) => {
3150
- xr.init(e, t), I.init(e, t), e.in = t.in, e.out = t.out;
3149
+ const qs = /* @__PURE__ */ m("ZodPipe", (e, t) => {
3150
+ Nr.init(e, t), O.init(e, t), e.in = t.in, e.out = t.out;
3151
3151
  });
3152
- function _t(e, t) {
3153
- return new Vs({
3152
+ function mt(e, t) {
3153
+ return new qs({
3154
3154
  type: "pipe",
3155
3155
  in: e,
3156
3156
  out: t
3157
3157
  // ...util.normalizeParams(params),
3158
3158
  });
3159
3159
  }
3160
- const Bs = /* @__PURE__ */ m("ZodReadonly", (e, t) => {
3161
- Lr.init(e, t), I.init(e, t), e.unwrap = () => e._zod.def.innerType;
3160
+ const Ks = /* @__PURE__ */ m("ZodReadonly", (e, t) => {
3161
+ Dr.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
3162
3162
  });
3163
- function Gs(e) {
3164
- return new Bs({
3163
+ function Hs(e) {
3164
+ return new Ks({
3165
3165
  type: "readonly",
3166
3166
  innerType: e
3167
3167
  });
3168
3168
  }
3169
- const Ws = /* @__PURE__ */ m("ZodCustom", (e, t) => {
3170
- Rr.init(e, t), I.init(e, t);
3169
+ const Js = /* @__PURE__ */ m("ZodCustom", (e, t) => {
3170
+ Ur.init(e, t), O.init(e, t);
3171
3171
  });
3172
- function qs(e, t = {}) {
3173
- return zi(Ws, e, t);
3172
+ function Ys(e, t = {}) {
3173
+ return Pi(Js, e, t);
3174
3174
  }
3175
- function Ks(e) {
3176
- return Ii(e);
3175
+ function Qs(e) {
3176
+ return Zi(e);
3177
3177
  }
3178
3178
  const ge = T({
3179
3179
  t: P().gte(0),
3180
3180
  rate: P().gte(0)
3181
- }), Y = T({
3181
+ }), Q = T({
3182
3182
  opacity: P().gte(0).lte(1),
3183
3183
  zIndex: P().default(0)
3184
3184
  }), X = T({
3185
3185
  volume: P().gte(0).lte(1)
3186
- }), Hs = T({
3186
+ }), Xs = T({
3187
3187
  type: R("image"),
3188
- file: Q(),
3188
+ file: Y(),
3189
3189
  fit: G([R("contain"), R("cover"), R("none")])
3190
- }), Js = T({
3190
+ }), ea = T({
3191
3191
  type: R("audio"),
3192
- file: Q(),
3193
- audioOutput: Q()
3194
- }), Qs = T({
3192
+ file: Y(),
3193
+ audioOutput: Y()
3194
+ }), ta = T({
3195
3195
  type: R("video"),
3196
- file: Q(),
3197
- audioOutput: Q(),
3196
+ file: Y(),
3197
+ audioOutput: Y(),
3198
3198
  fit: G([R("contain"), R("cover"), R("none")])
3199
- }), Ne = L([P(), gs()]), Ys = L([
3199
+ }), De = L([P(), ks()]), na = L([
3200
3200
  P(),
3201
3201
  T({
3202
3202
  set: T({
3203
- ...Y.shape
3203
+ ...Q.shape
3204
3204
  }).partial()
3205
3205
  }).partial()
3206
- ]), Xs = L([
3206
+ ]), oa = L([
3207
3207
  P(),
3208
3208
  T({
3209
3209
  set: T({
3210
- ...Y.shape
3210
+ ...Q.shape
3211
3211
  }).partial(),
3212
3212
  lerp: T({
3213
- ...Y.shape
3213
+ ...Q.shape
3214
3214
  }).partial()
3215
3215
  }).partial()
3216
- ]), ea = L([
3216
+ ]), ra = L([
3217
3217
  P(),
3218
3218
  T({
3219
3219
  set: T({
@@ -3221,7 +3221,7 @@ const ge = T({
3221
3221
  ...X.shape
3222
3222
  }).partial()
3223
3223
  }).partial()
3224
- ]), ta = L([
3224
+ ]), ia = L([
3225
3225
  P(),
3226
3226
  T({
3227
3227
  set: T({
@@ -3232,60 +3232,60 @@ const ge = T({
3232
3232
  ...X.shape
3233
3233
  }).partial()
3234
3234
  }).partial()
3235
- ]), na = L([
3235
+ ]), sa = L([
3236
3236
  P(),
3237
3237
  T({
3238
3238
  set: T({
3239
3239
  ...ge.shape,
3240
3240
  ...X.shape,
3241
- ...Y.shape
3241
+ ...Q.shape
3242
3242
  }).partial()
3243
3243
  }).partial()
3244
- ]), oa = L([
3244
+ ]), aa = L([
3245
3245
  P(),
3246
3246
  T({
3247
3247
  set: T({
3248
3248
  ...ge.shape,
3249
3249
  ...X.shape,
3250
- ...Y.shape
3250
+ ...Q.shape
3251
3251
  }).partial(),
3252
3252
  lerp: T({
3253
3253
  ...X.shape,
3254
- ...Y.shape
3254
+ ...Q.shape
3255
3255
  }).partial()
3256
3256
  }).partial()
3257
- ]), ra = T({
3258
- ...Hs.shape,
3259
- keyframes: L([Xs], G([Ys, Ne]))
3260
- }), ia = T({
3261
- ...Js.shape,
3262
- keyframes: L([ta], G([ea, Ne]))
3263
- }), sa = T({
3264
- ...Qs.shape,
3265
- keyframes: L([oa], G([na, Ne]))
3266
- }), aa = Os(Q(), G([ra, ia, sa])), Ht = {
3257
+ ]), ua = T({
3258
+ ...Xs.shape,
3259
+ keyframes: L([oa], G([na, De]))
3260
+ }), ca = T({
3261
+ ...ea.shape,
3262
+ keyframes: L([ia], G([ra, De]))
3263
+ }), la = T({
3264
+ ...ta.shape,
3265
+ keyframes: L([aa], G([sa, De]))
3266
+ }), da = xs(Y(), G([ua, ca, la])), Qt = {
3267
3267
  opacity: 1,
3268
3268
  zIndex: 0
3269
- }, De = {
3269
+ }, Ue = {
3270
3270
  t: 0,
3271
3271
  rate: 1,
3272
3272
  volume: 1
3273
- }, Jt = {
3273
+ }, Xt = {
3274
3274
  t: 0,
3275
3275
  rate: 1,
3276
3276
  volume: 1,
3277
3277
  opacity: 1,
3278
3278
  zIndex: 0
3279
- }, Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3279
+ }, Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3280
3280
  __proto__: null,
3281
- MediaSurfaceStateSchema: aa,
3282
- defaultAudioOptions: De,
3283
- defaultImageOptions: Ht,
3284
- defaultVideoOptions: Jt
3281
+ MediaSurfaceStateSchema: da,
3282
+ defaultAudioOptions: Ue,
3283
+ defaultImageOptions: Qt,
3284
+ defaultVideoOptions: Xt
3285
3285
  }, Symbol.toStringTag, { value: "Module" }));
3286
- var ke = {}, mt;
3287
- function ua() {
3288
- return mt || (mt = 1, function(e) {
3286
+ var ke = {}, vt;
3287
+ function pa() {
3288
+ return vt || (vt = 1, function(e) {
3289
3289
  var t = {};
3290
3290
  /*! howler.js v2.2.1 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com */
3291
3291
  (function() {
@@ -3465,16 +3465,16 @@ function ua() {
3465
3465
  if (k >= ie) return void c._ended(_);
3466
3466
  var S = _._node;
3467
3467
  if (c._webAudio) {
3468
- var Ve = function() {
3468
+ var Be = function() {
3469
3469
  c._playLock = !1, ye(), c._refreshBuffer(_);
3470
3470
  var W = _._muted || c._muted ? 0 : _._volume;
3471
3471
  S.gain.setValueAtTime(W, o.ctx.currentTime), _._playStart = o.ctx.currentTime, S.bufferSource.start === void 0 ? _._loop ? S.bufferSource.noteGrainOn(0, k, 86400) : S.bufferSource.noteGrainOn(0, k, E) : _._loop ? S.bufferSource.start(0, k, 86400) : S.bufferSource.start(0, k, E), x !== 1 / 0 && (c._endTimers[_._id] = setTimeout(c._ended.bind(c, _), x)), s || setTimeout(function() {
3472
3472
  c._emit("play", _._id), c._loadQueue();
3473
3473
  }, 0);
3474
3474
  };
3475
- o.state === "running" && o.ctx.state !== "interrupted" ? Ve() : (c._playLock = !0, c.once("resume", Ve), c._clearTimer(_._id));
3475
+ o.state === "running" && o.ctx.state !== "interrupted" ? Be() : (c._playLock = !0, c.once("resume", Be), c._clearTimer(_._id));
3476
3476
  } else {
3477
- var Be = function() {
3477
+ var Ge = function() {
3478
3478
  S.currentTime = k, S.muted = _._muted || c._muted || o._muted || S.muted, S.volume = _._volume * o.volume(), S.playbackRate = _._rate;
3479
3479
  try {
3480
3480
  var W = S.play();
@@ -3486,19 +3486,19 @@ function ua() {
3486
3486
  r !== "__default" || _._loop ? c._endTimers[_._id] = setTimeout(c._ended.bind(c, _), x) : (c._endTimers[_._id] = function() {
3487
3487
  c._ended(_), S.removeEventListener("ended", c._endTimers[_._id], !1);
3488
3488
  }, S.addEventListener("ended", c._endTimers[_._id], !1));
3489
- } catch (nn) {
3490
- c._emit("playerror", _._id, nn);
3489
+ } catch (an) {
3490
+ c._emit("playerror", _._id, an);
3491
3491
  }
3492
3492
  };
3493
3493
  S.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (S.src = c._src, S.load());
3494
- var tn = window && window.ejecta || !S.readyState && o._navigator.isCocoonJS;
3495
- if (S.readyState >= 3 || tn) Be();
3494
+ var sn = window && window.ejecta || !S.readyState && o._navigator.isCocoonJS;
3495
+ if (S.readyState >= 3 || sn) Ge();
3496
3496
  else {
3497
3497
  c._playLock = !0;
3498
- var Ge = function() {
3499
- Be(), S.removeEventListener(o._canPlayEvent, Ge, !1);
3498
+ var We = function() {
3499
+ Ge(), S.removeEventListener(o._canPlayEvent, We, !1);
3500
3500
  };
3501
- S.addEventListener(o._canPlayEvent, Ge, !1), c._clearTimer(_._id);
3501
+ S.addEventListener(o._canPlayEvent, We, !1), c._clearTimer(_._id);
3502
3502
  }
3503
3503
  }
3504
3504
  return _._id;
@@ -3830,9 +3830,9 @@ function ua() {
3830
3830
  })();
3831
3831
  }(ke)), ke;
3832
3832
  }
3833
- var vt = ua();
3834
- const ca = typeof navigator < "u" && typeof navigator.standalone < "u";
3835
- class Aa {
3833
+ var gt = pa();
3834
+ const fa = typeof navigator < "u" && typeof navigator.standalone < "u";
3835
+ class Ta {
3836
3836
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3837
3837
  constructor(t) {
3838
3838
  this.cogsConnection = t, this.addEventListener("audioClipState", ({ detail: o }) => {
@@ -3881,7 +3881,7 @@ class Aa {
3881
3881
  audioClipPlayers = {};
3882
3882
  sinkId = "";
3883
3883
  setGlobalVolume(t) {
3884
- this.globalVolume = t, vt.Howler.volume(t), this.notifyStateListeners();
3884
+ this.globalVolume = t, gt.Howler.volume(t), this.notifyStateListeners();
3885
3885
  }
3886
3886
  playAudioClip(t, { playId: n, volume: o, fade: i, loop: a }) {
3887
3887
  t in this.audioClipPlayers || (this.audioClipPlayers[t] = this.createClip(t, { preload: !1, ephemeral: !0 })), this.updateAudioClipPlayer(t, (u) => {
@@ -3940,7 +3940,7 @@ class Aa {
3940
3940
  ), a));
3941
3941
  }
3942
3942
  stopAudioClip(t, { fade: n }, o, i) {
3943
- la("Stop audio clip", { activeClips: this.audioClipPlayers[t]?.activeClips }), Object.keys(this.audioClipPlayers[t]?.activeClips ?? {}).length !== 0 && this.updateAudioClipPlayer(t, (a) => (a.activeClips = Object.fromEntries(
3943
+ ha("Stop audio clip", { activeClips: this.audioClipPlayers[t]?.activeClips }), Object.keys(this.audioClipPlayers[t]?.activeClips ?? {}).length !== 0 && this.updateAudioClipPlayer(t, (a) => (a.activeClips = Object.fromEntries(
3944
3944
  Object.entries(a.activeClips).map(([u, l]) => {
3945
3945
  const p = parseInt(u);
3946
3946
  return (o === void 0 || o === p) && (i && l.state.type === "stop_requested" || l.state.type === "playing" || l.state.type === "pausing" || l.state.type === "paused" || l.state.type === "stopping" ? ne(n) && l.state.type !== "paused" ? (a.player.off("fade", p), oe(a.player, 0, n * 1e3, p), a.player.once(
@@ -4042,7 +4042,7 @@ class Aa {
4042
4042
  this.eventTarget.dispatchEvent(new CustomEvent(t, { detail: n }));
4043
4043
  }
4044
4044
  createPlayer(t, n) {
4045
- const o = new vt.Howl({
4045
+ const o = new gt.Howl({
4046
4046
  src: this.cogsConnection.getAssetUrl(t),
4047
4047
  autoplay: !1,
4048
4048
  loop: !1,
@@ -4064,10 +4064,10 @@ class Aa {
4064
4064
  return n.config.preload !== o.preload && (i.player.unload(), i.player = this.createPlayer(t, o)), i;
4065
4065
  }
4066
4066
  }
4067
- function la(...e) {
4067
+ function ha(...e) {
4068
4068
  }
4069
4069
  function ne(e) {
4070
- return !ca && typeof e == "number" && !isNaN(e) && e > 0;
4070
+ return !fa && typeof e == "number" && !isNaN(e) && e > 0;
4071
4071
  }
4072
4072
  function Ee(e, t) {
4073
4073
  t !== void 0 && (e._html5 ? e._sounds?.forEach((n) => {
@@ -4080,8 +4080,8 @@ function Ce(e, t, n) {
4080
4080
  function oe(e, t, n, o) {
4081
4081
  e.fade(e.volume(o), t, n, o);
4082
4082
  }
4083
- var Oe = /* @__PURE__ */ ((e) => (e.Paused = "paused", e.Playing = "playing", e))(Oe || {});
4084
- class Sa {
4083
+ var $e = /* @__PURE__ */ ((e) => (e.Paused = "paused", e.Playing = "playing", e))($e || {});
4084
+ class za {
4085
4085
  constructor(t, n = document.body) {
4086
4086
  this.cogsConnection = t, this.parentElement = n, this.addEventListener("videoClipState", ({ detail: i }) => {
4087
4087
  t.sendMediaClipState(i);
@@ -4185,7 +4185,7 @@ class Sa {
4185
4185
  }
4186
4186
  setAudioSink(t) {
4187
4187
  for (const n of Object.values(this.videoClipPlayers))
4188
- yt(n, t);
4188
+ bt(n, t);
4189
4189
  this.sinkId = t;
4190
4190
  }
4191
4191
  updateConfig(t) {
@@ -4195,11 +4195,11 @@ class Sa {
4195
4195
  return Object.keys(o).filter((p) => !(p in n)).forEach((p) => {
4196
4196
  this.activeClip?.path === p && o[p]?.config.ephemeral === !1 ? this.updateVideoClipPlayer(p, (h) => (h.config = { ...h.config, ephemeral: !0 }, h)) : (this.unloadClip(p), delete i[p]);
4197
4197
  }), Object.entries(n).filter(([p]) => !o[p]).forEach(([p, h]) => {
4198
- i[p] = this.createClipPlayer(p, { ...h, preload: gt(h.preload), ephemeral: !1, fit: "contain" });
4198
+ i[p] = this.createClipPlayer(p, { ...h, preload: yt(h.preload), ephemeral: !1, fit: "contain" });
4199
4199
  }), Object.entries(o).filter(([p]) => p in n).forEach(([p, h]) => {
4200
4200
  h.config.preload !== n[p].preload && this.updateVideoClipPlayer(p, (y) => (y.config = {
4201
4201
  ...y.config,
4202
- preload: gt(n[p].preload),
4202
+ preload: yt(n[p].preload),
4203
4203
  ephemeral: !1
4204
4204
  }, y.videoElement.preload = y.config.preload, y));
4205
4205
  }), i;
@@ -4212,7 +4212,7 @@ class Sa {
4212
4212
  clips: { ...this.videoClipPlayers },
4213
4213
  activeClip: this.activeClip ? {
4214
4214
  path: this.activeClip.path,
4215
- state: this.videoClipPlayers[this.activeClip.path].videoElement?.paused ? Oe.Paused : Oe.Playing,
4215
+ state: this.videoClipPlayers[this.activeClip.path].videoElement?.paused ? $e.Paused : $e.Playing,
4216
4216
  loop: this.videoClipPlayers[this.activeClip.path].videoElement?.loop ?? !1,
4217
4217
  volume: this.videoClipPlayers[this.activeClip.path].videoElement?.muted ? 0 : this.videoClipPlayers[this.activeClip.path].videoElement?.volume ?? 0
4218
4218
  } : void 0
@@ -4262,7 +4262,7 @@ class Sa {
4262
4262
  videoElement: this.createVideoElement(t, n, { volume: 1 }),
4263
4263
  volume: 1
4264
4264
  };
4265
- return yt(i, this.sinkId), i;
4265
+ return bt(i, this.sinkId), i;
4266
4266
  }
4267
4267
  unloadClip(t) {
4268
4268
  if (this.activeClip?.path === t) {
@@ -4272,37 +4272,37 @@ class Sa {
4272
4272
  this.videoClipPlayers[t]?.videoElement.remove(), this.updateVideoClipPlayer(t, () => null);
4273
4273
  }
4274
4274
  }
4275
- function gt(e) {
4275
+ function yt(e) {
4276
4276
  return typeof e == "string" ? e : e ? "auto" : "none";
4277
4277
  }
4278
- function yt(e, t) {
4278
+ function bt(e, t) {
4279
4279
  t !== void 0 && typeof e.videoElement.setSinkId == "function" && e.videoElement.setSinkId(t);
4280
4280
  }
4281
4281
  function de(e, t) {
4282
4282
  e.volume = t, e.muted = t === 0;
4283
4283
  }
4284
- function Ue(e, t) {
4284
+ function Me(e, t) {
4285
4285
  if (!e.keyframes.filter((o) => o[1] === null).some((o) => o[0] <= t))
4286
4286
  switch (e.type) {
4287
4287
  case "image": {
4288
4288
  if (e.keyframes[0][0] > t)
4289
4289
  return;
4290
4290
  const i = e.keyframes.filter((u) => u[1] !== null), a = Ae(i, t);
4291
- return { ...Ht, ...a };
4291
+ return { ...Qt, ...a };
4292
4292
  }
4293
4293
  case "audio": {
4294
- const o = e.keyframes.filter((u) => u[1] !== null), i = bt(o, t);
4294
+ const o = e.keyframes.filter((u) => u[1] !== null), i = wt(o, t);
4295
4295
  if (!i)
4296
4296
  return;
4297
4297
  const a = Ae(o, t);
4298
- return { ...De, ...a, ...i };
4298
+ return { ...Ue, ...a, ...i };
4299
4299
  }
4300
4300
  case "video": {
4301
- const o = e.keyframes.filter((u) => u[1] !== null), i = bt(o, t);
4301
+ const o = e.keyframes.filter((u) => u[1] !== null), i = wt(o, t);
4302
4302
  if (!i)
4303
4303
  return;
4304
4304
  const a = Ae(o, t);
4305
- return { ...Jt, ...a, ...i };
4305
+ return { ...Xt, ...a, ...i };
4306
4306
  }
4307
4307
  }
4308
4308
  }
@@ -4334,11 +4334,11 @@ function Ae(e, t) {
4334
4334
  }
4335
4335
  ), o;
4336
4336
  }
4337
- function bt(e, t) {
4337
+ function wt(e, t) {
4338
4338
  const n = e[0];
4339
4339
  if (!n || n[0] > t)
4340
4340
  return;
4341
- let o = 0, { t: i, rate: a } = De;
4341
+ let o = 0, { t: i, rate: a } = Ue;
4342
4342
  for (const [h, y] of e) {
4343
4343
  if (h > t) break;
4344
4344
  const { set: g } = y;
@@ -4359,9 +4359,17 @@ function bt(e, t) {
4359
4359
  t: p
4360
4360
  };
4361
4361
  }
4362
- class Me {
4362
+ const Se = (e) => {
4363
+ try {
4364
+ const { pathname: t } = new URL(e, window.location.href);
4365
+ return t;
4366
+ } catch {
4367
+ return;
4368
+ }
4369
+ };
4370
+ class Fe {
4363
4371
  constructor(t, n, o, i, a, u) {
4364
- this.surfaceElement = t, this.clipElement = n, this.constructAssetURL = i, this.getAudioOutput = a, this.mediaPreloader = u, this._state = o, setTimeout(this.loop);
4372
+ this.surfaceElement = t, this.clipElement = n, this.constructAssetURL = i, this.getAudioOutput = a, this.mediaPreloader = u, this._state = o;
4365
4373
  }
4366
4374
  isConnected(t) {
4367
4375
  return !(!this.surfaceElement || !this.clipElement || !this.surfaceElement.contains(this.clipElement) || t && !this.clipElement.contains(t));
@@ -4372,94 +4380,102 @@ class Me {
4372
4380
  }
4373
4381
  timeout;
4374
4382
  loop = async () => {
4375
- this.isConnected() ? (this.update(), this.timeout = setTimeout(this.loop, 0)) : this.destroy();
4383
+ clearTimeout(this.timeout), this.isConnected() ? (this.update(), this.timeout = setTimeout(this.loop, nn)) : this.destroy();
4376
4384
  };
4377
4385
  }
4378
- function Fe(e, t, n, o, i) {
4386
+ function Ve(e, t, n, o, i) {
4379
4387
  let a;
4380
- const u = o(n.file);
4388
+ const u = o(n.file), l = Se(u);
4381
4389
  switch (n.type) {
4382
4390
  case "image":
4383
- a = e instanceof HTMLImageElement ? e : document.createElement("img"), a.src.includes(u) || (a.src = u);
4391
+ a = e instanceof HTMLImageElement ? e : document.createElement("img"), Se(a.src) !== l && (a.src = u);
4384
4392
  break;
4385
4393
  case "audio":
4386
- e instanceof HTMLAudioElement && e.src.includes(u) ? a = e : a = i.getElement(n.file, n.type);
4387
- break;
4388
- case "video":
4389
- e instanceof HTMLVideoElement && e.src.includes(u) ? a = e : a = i.getElement(n.file, n.type);
4394
+ case "video": {
4395
+ if (e !== void 0) {
4396
+ const p = Se(e.src);
4397
+ e.tagName.toLowerCase() === n.type && p !== void 0 && p === l && (a = e);
4398
+ }
4399
+ a || (a = i.getElement(n.file, n.type));
4390
4400
  break;
4401
+ }
4391
4402
  }
4392
4403
  return (t.children.length !== 1 || t.childNodes[0] !== a) && t.replaceChildren(a), a.style.position = "absolute", a.style.width = "100%", a.style.height = "100%", a;
4393
4404
  }
4394
- function Qt(e, t, n) {
4405
+ function en(e, t, n) {
4395
4406
  const o = String(t.opacity);
4396
4407
  e.style.opacity !== o && (e.style.opacity = o);
4397
4408
  const i = Math.round(t.zIndex ?? 0);
4398
4409
  parseInt(e.style.zIndex) !== i && (e.style.zIndex = String(i)), e.style.objectFit !== n && (e.style.objectFit = n);
4399
4410
  }
4400
- function Yt(e, t, n) {
4401
- if (e.volume !== t.volume && (e.volume = t.volume), e.sinkId !== n)
4411
+ function tn(e, t, n, o) {
4412
+ const i = t.volume * o;
4413
+ if (e.volume !== i && (e.volume = i), e.sinkId !== n)
4402
4414
  try {
4403
4415
  e.setSinkId(n).catch(() => {
4404
4416
  });
4405
4417
  } catch {
4406
4418
  }
4407
4419
  }
4408
- const wt = 50, da = 5, Xt = 1e3, pa = 5, fa = 5, ha = 0.3, _a = 0.1;
4409
- function ma(e) {
4410
- return Math.sign(e) * Math.pow(Math.abs(e) / Xt, ha) * _a;
4420
+ const kt = 50, _a = 500, nn = 5, on = 1e3, ma = 5, va = 5, ga = 0.3, ya = 0.1;
4421
+ function ba(e) {
4422
+ return Math.sign(e) * Math.pow(Math.abs(e) / on, ga) * ya;
4411
4423
  }
4412
- function en(e, t, n, o) {
4424
+ function rn(e, t, n, o, i) {
4413
4425
  if (e.paused && t.rate > 0 && e.play().catch(() => {
4414
4426
  }), e.duration) {
4415
- const l = n.filter(([p, h]) => p > t.t && (h?.set?.t !== void 0 || h?.set?.rate !== void 0))[0];
4416
- if (l?.[1]?.set?.t === 0) {
4417
- const p = (e.duration - t.t) / t.rate, h = l[0] - t.t, y = Math.abs(p - h) <= fa;
4418
- e.loop !== y && (e.loop = y);
4427
+ const p = n.filter(([h, y]) => h > t.t && (y?.set?.t !== void 0 || y?.set?.rate !== void 0))[0];
4428
+ if (p?.[1]?.set?.t === 0) {
4429
+ const h = (e.duration - t.t) / t.rate, y = p[0] - t.t, g = Math.abs(h - y) <= va;
4430
+ e.loop !== g && (e.loop = g);
4419
4431
  }
4420
4432
  }
4421
- const a = e.currentTime * 1e3 - t.t, u = Math.abs(a);
4433
+ const u = e.currentTime * 1e3 - t.t, l = Math.abs(u);
4422
4434
  switch (!0) {
4423
- case (o.state === "idle" && t.rate > 0 && u <= wt):
4435
+ case (o.state === "idle" && t.rate > 0 && l <= kt):
4436
+ return e.playbackRate !== t.rate && (e.playbackRate = t.rate), { state: "idle" };
4437
+ case (o.state === "idle" && t.rate > 0 && i === !0 && l <= _a):
4424
4438
  return e.playbackRate !== t.rate && (e.playbackRate = t.rate), { state: "idle" };
4425
- case (o.state === "idle" && t.rate > 0 && u > wt && u <= Xt): {
4426
- const l = ma(a), p = Math.max(0, t.rate - l);
4427
- return e.playbackRate !== p && (e.playbackRate = p), { state: "intercepting" };
4439
+ case (o.state === "idle" && i !== !0 && // Never adjust playback rate if disabled for this clip
4440
+ t.rate > 0 && l > kt && l <= on): {
4441
+ const p = ba(u), h = Math.max(0, t.rate - p);
4442
+ return e.playbackRate !== h && (e.playbackRate = h), { state: "intercepting" };
4428
4443
  }
4429
- case (o.state === "intercepting" && t.rate > 0 && u <= da):
4444
+ case (o.state === "intercepting" && t.rate > 0 && l <= nn):
4430
4445
  return e.playbackRate !== t.rate && (e.playbackRate = t.rate), { state: "idle" };
4431
- case (o.state === "intercepting" && Math.sign(a) === Math.sign(e.playbackRate - t.rate)):
4432
- return console.warn(a, "missed intercept"), { state: "idle" };
4446
+ case (o.state === "intercepting" && Math.sign(u) === Math.sign(e.playbackRate - t.rate)):
4447
+ return { state: "idle" };
4433
4448
  case o.state === "intercepting":
4434
4449
  return { state: "intercepting" };
4435
4450
  case o.state === "seeking":
4436
4451
  return { state: "seeking" };
4437
4452
  default:
4438
- return e.playbackRate !== t.rate && (e.playbackRate = t.rate), e.currentTime = (t.t + t.rate * pa) / 1e3, { state: "seeking" };
4453
+ return e.playbackRate !== t.rate && (e.playbackRate = t.rate), e.currentTime = (t.t + t.rate * ma) / 1e3, { state: "seeking" };
4439
4454
  }
4440
4455
  }
4441
- class va extends Me {
4456
+ class wa extends Fe {
4442
4457
  imageElement;
4443
4458
  update() {
4444
- const t = Ue(this._state, Date.now());
4445
- t ? this.imageElement = Fe(
4459
+ const t = Me(this._state, Date.now());
4460
+ t ? this.imageElement = Ve(
4446
4461
  this.imageElement,
4447
4462
  this.clipElement,
4448
4463
  this._state,
4449
4464
  this.constructAssetURL,
4450
4465
  this.mediaPreloader
4451
- ) : this.imageElement && this.destroy(), !(!t || !this.imageElement) && Qt(this.imageElement, t, this._state.fit);
4466
+ ) : this.imageElement && this.destroy(), !(!t || !this.imageElement) && en(this.imageElement, t, this._state.fit);
4452
4467
  }
4453
4468
  destroy() {
4454
4469
  this.imageElement && (this.imageElement.remove(), this.imageElement.src = "", this.imageElement = void 0);
4455
4470
  }
4456
4471
  }
4457
- class ga extends Me {
4472
+ class Et extends Fe {
4458
4473
  syncState = { state: "idle" };
4459
4474
  audioElement;
4475
+ volume = 1;
4460
4476
  update() {
4461
- const t = Ue(this._state, Date.now());
4462
- if (t ? this.audioElement = Fe(
4477
+ const t = Me(this._state, Date.now());
4478
+ if (t ? this.audioElement = Ve(
4463
4479
  this.audioElement,
4464
4480
  this.clipElement,
4465
4481
  this._state,
@@ -4467,8 +4483,14 @@ class ga extends Me {
4467
4483
  this.mediaPreloader
4468
4484
  ) : this.destroy(), !t || !this.audioElement) return;
4469
4485
  const n = this.getAudioOutput(this._state.audioOutput);
4470
- Yt(this.audioElement, t, n);
4471
- const o = en(this.audioElement, t, this._state.keyframes, this.syncState);
4486
+ tn(this.audioElement, t, n, this.volume);
4487
+ const o = rn(
4488
+ this.audioElement,
4489
+ t,
4490
+ this._state.keyframes,
4491
+ this.syncState,
4492
+ this._state.disablePlaybackRateAdjustment
4493
+ );
4472
4494
  this.syncState.state !== "seeking" && o.state === "seeking" && this.audioElement.addEventListener(
4473
4495
  "seeked",
4474
4496
  () => {
@@ -4478,15 +4500,16 @@ class ga extends Me {
4478
4500
  ), this.syncState = o;
4479
4501
  }
4480
4502
  destroy() {
4481
- this.audioElement?.remove(), this.audioElement = void 0;
4503
+ this.audioElement && (this.audioElement.pause(), this.audioElement.remove(), this.audioElement.volume = 0, this.audioElement.currentTime = 0, this.mediaPreloader.releaseElement(this.audioElement)), this.audioElement = void 0;
4482
4504
  }
4483
4505
  }
4484
- class ya extends Me {
4506
+ class Ct extends Fe {
4485
4507
  syncState = { state: "idle" };
4486
4508
  videoElement;
4509
+ volume = 1;
4487
4510
  update() {
4488
- const t = Ue(this._state, Date.now());
4489
- if (t ? this.videoElement = Fe(
4511
+ const t = Me(this._state, Date.now());
4512
+ if (t ? this.videoElement = Ve(
4490
4513
  this.videoElement,
4491
4514
  this.clipElement,
4492
4515
  this._state,
@@ -4494,8 +4517,14 @@ class ya extends Me {
4494
4517
  this.mediaPreloader
4495
4518
  ) : this.destroy(), !t || !this.videoElement) return;
4496
4519
  const n = this.getAudioOutput(this._state.audioOutput);
4497
- Qt(this.videoElement, t, this._state.fit), Yt(this.videoElement, t, n);
4498
- const o = en(this.videoElement, t, this._state.keyframes, this.syncState);
4520
+ en(this.videoElement, t, this._state.fit), tn(this.videoElement, t, n, this.volume);
4521
+ const o = rn(
4522
+ this.videoElement,
4523
+ t,
4524
+ this._state.keyframes,
4525
+ this.syncState,
4526
+ this._state.disablePlaybackRateAdjustment
4527
+ );
4499
4528
  this.syncState.state !== "seeking" && o.state === "seeking" && this.videoElement.addEventListener(
4500
4529
  "seeked",
4501
4530
  () => {
@@ -4505,10 +4534,10 @@ class ya extends Me {
4505
4534
  ), this.syncState = o;
4506
4535
  }
4507
4536
  destroy() {
4508
- this.videoElement?.remove(), this.videoElement = void 0;
4537
+ this.videoElement && (this.videoElement.pause(), this.videoElement.remove(), this.videoElement.volume = 0, this.videoElement.currentTime = 0, this.mediaPreloader.releaseElement(this.videoElement)), this.videoElement = void 0;
4509
4538
  }
4510
4539
  }
4511
- class ba {
4540
+ class ka {
4512
4541
  _state;
4513
4542
  _elements = {};
4514
4543
  _constructAssetURL;
@@ -4564,20 +4593,29 @@ class ba {
4564
4593
  const n = this._elements[t];
4565
4594
  n && (n.inUse = !1);
4566
4595
  } else
4567
- Object.entries(this._elements).forEach(([n, o]) => {
4568
- o.element === t && delete this._elements[n];
4596
+ Object.values(this._elements).forEach((n) => {
4597
+ n.element === t && (n.inUse = !1);
4569
4598
  });
4570
4599
  }
4571
4600
  }
4572
- const wa = "data-clip-id";
4573
- class Ta {
4574
- constructor(t, n, o, i = new ba(t)) {
4601
+ const Ea = "data-clip-id";
4602
+ class Oa {
4603
+ constructor(t, n, o, i = new ka(t)) {
4575
4604
  this.constructAssetUrl = t, this.getAudioOutput = n, this.mediaPreloader = i, this._element = document.createElement("div"), this._element.className = "surface-manager", this._element.style.width = "100%", this._element.style.height = "100%", this._state = o || {}, this.update();
4576
4605
  }
4577
4606
  _state = {};
4578
4607
  setState(t) {
4579
4608
  this._state = t, this.update();
4580
4609
  }
4610
+ _volume = 1;
4611
+ get volume() {
4612
+ return this._volume;
4613
+ }
4614
+ set volume(t) {
4615
+ this._volume = t, Object.values(this.resources).forEach(({ manager: n }) => {
4616
+ (n instanceof Et || n instanceof Ct) && (n.volume = t);
4617
+ });
4618
+ }
4581
4619
  _element;
4582
4620
  get element() {
4583
4621
  return this._element;
@@ -4593,7 +4631,7 @@ class Ta {
4593
4631
  return o.element;
4594
4632
  {
4595
4633
  const i = document.createElement("div");
4596
- return i.setAttribute(wa, n), this.resources[n] = { element: i }, i;
4634
+ return i.setAttribute(Ea, n), this.resources[n] = { element: i }, i;
4597
4635
  }
4598
4636
  });
4599
4637
  this._element.replaceChildren(...t), Object.keys(this._state).toSorted().forEach((n) => {
@@ -4605,17 +4643,17 @@ class Ta {
4605
4643
  else
4606
4644
  switch (o.type) {
4607
4645
  case "image":
4608
- i.manager = new va(
4646
+ i.manager = new wa(
4609
4647
  this._element,
4610
4648
  i.element,
4611
4649
  o,
4612
4650
  this.constructAssetUrl,
4613
4651
  this.getAudioOutput,
4614
4652
  this.mediaPreloader
4615
- );
4653
+ ), i.manager.loop();
4616
4654
  break;
4617
- case "audio":
4618
- i.manager = new ga(
4655
+ case "audio": {
4656
+ const a = new Et(
4619
4657
  this._element,
4620
4658
  i.element,
4621
4659
  o,
@@ -4623,9 +4661,11 @@ class Ta {
4623
4661
  this.getAudioOutput,
4624
4662
  this.mediaPreloader
4625
4663
  );
4664
+ i.manager = a, a.volume = this._volume, a.loop();
4626
4665
  break;
4627
- case "video":
4628
- i.manager = new ya(
4666
+ }
4667
+ case "video": {
4668
+ const a = new Ct(
4629
4669
  this._element,
4630
4670
  i.element,
4631
4671
  o,
@@ -4633,32 +4673,35 @@ class Ta {
4633
4673
  this.getAudioOutput,
4634
4674
  this.mediaPreloader
4635
4675
  );
4676
+ i.manager = a, a.volume = this._volume, a.loop();
4636
4677
  break;
4678
+ }
4637
4679
  }
4638
4680
  });
4639
4681
  }
4640
4682
  }
4641
- const za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4683
+ const Ia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4642
4684
  __proto__: null
4643
4685
  }, Symbol.toStringTag, { value: "Module" }));
4644
4686
  export {
4645
- Aa as CogsAudioPlayer,
4646
- An as CogsConfigChangedEvent,
4647
- Ea as CogsConnection,
4648
- En as CogsConnectionCloseEvent,
4649
- kn as CogsConnectionOpenEvent,
4650
- Tn as CogsIncomingEvent,
4651
- zn as CogsMediaConfigChangedEvent,
4652
- Cn as CogsMessageEvent,
4653
- In as CogsShowPhaseChangedEvent,
4654
- Sn as CogsStateChangedEvent,
4655
- Sa as CogsVideoPlayer,
4656
- We as DataStoreItemEvent,
4657
- qe as DataStoreItemsEvent,
4658
- za as ManifestTypes,
4659
- Ca as MediaSchema,
4660
- Ta as SurfaceManager,
4661
- pn as assetUrl,
4662
- Ue as getStateAtTime,
4663
- ka as preloadUrl
4687
+ Ta as CogsAudioPlayer,
4688
+ On as CogsConfigChangedEvent,
4689
+ Aa as CogsConnection,
4690
+ Tn as CogsConnectionCloseEvent,
4691
+ Sn as CogsConnectionOpenEvent,
4692
+ $n as CogsIncomingEvent,
4693
+ Pn as CogsMediaConfigChangedEvent,
4694
+ zn as CogsMessageEvent,
4695
+ Zn as CogsShowPhaseChangedEvent,
4696
+ In as CogsStateChangedEvent,
4697
+ za as CogsVideoPlayer,
4698
+ qe as DataStoreItemEvent,
4699
+ Ke as DataStoreItemsEvent,
4700
+ Ia as ManifestTypes,
4701
+ ka as MediaPreloader,
4702
+ Sa as MediaSchema,
4703
+ Oa as SurfaceManager,
4704
+ mn as assetUrl,
4705
+ Me as getStateAtTime,
4706
+ Ca as preloadUrl
4664
4707
  };