@golemui/gui-lit 1.0.0-rc.3 → 1.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { filterTap as At, standardValidate as Ye, isStandardValidateSuccess as Ge } from "@golemui/core";
1
+ import { filterTap as zt, standardValidate as Ge, isStandardValidateSuccess as Ke } from "@golemui/core";
2
2
  import "@golemui/gui-shared";
3
3
  import "@golemui/lit";
4
- import { LitElement as St, html as zt } from "lit";
5
- import { property as Ke, query as Et, customElement as $t } from "lit/decorators.js";
4
+ import { LitElement as Et, html as $t } from "lit";
5
+ import { property as me, query as Ot, customElement as Zt } from "lit/decorators.js";
6
6
  const qe = {
7
7
  LAYOUTS: "LAYOUTS",
8
8
  DISPLAYS: "DISPLAYS"
9
9
  };
10
- function Ot(e) {
10
+ function Pt(e) {
11
11
  return function(t, n = () => !0) {
12
12
  return {
13
13
  kind: "leaf",
@@ -20,19 +20,19 @@ function Ot(e) {
20
20
  function w(e, t) {
21
21
  return typeof e == "function" ? e : { type: t, ...e ?? {} };
22
22
  }
23
- const Zt = (e, t) => ({
23
+ const Ct = (e, t) => ({
24
24
  type: "ITEMS",
25
25
  itemType: qe.DISPLAYS,
26
26
  items: [{ render: e }],
27
27
  tags: t ?? []
28
- }), K = /* @__PURE__ */ new Map();
28
+ }), q = /* @__PURE__ */ new Map();
29
29
  function Xe(e, t) {
30
- if (K.has(e))
30
+ if (q.has(e))
31
31
  throw new Error(`Item type "${e}" is already registered.`);
32
- K.set(e, t);
32
+ q.set(e, t);
33
33
  }
34
- function q(e) {
35
- const t = K.get(e);
34
+ function X(e) {
35
+ const t = q.get(e);
36
36
  if (!t)
37
37
  throw new Error(
38
38
  `No handler registered for item type "${e}". Did you forget to import the registration module?`
@@ -40,7 +40,7 @@ function q(e) {
40
40
  return t;
41
41
  }
42
42
  function He(e) {
43
- return K.has(e);
43
+ return q.has(e);
44
44
  }
45
45
  function h(e) {
46
46
  const t = (a) => {
@@ -49,8 +49,8 @@ function h(e) {
49
49
  let u = { ...e.sensibleDefaults.base };
50
50
  for (const c of a) {
51
51
  const p = c.config;
52
- for (const m of e.sensibleDefaults.fields) {
53
- const f = m;
52
+ for (const d of e.sensibleDefaults.fields) {
53
+ const f = d;
54
54
  p[f] != null && (u = { ...u, [f]: p[f] });
55
55
  }
56
56
  }
@@ -78,7 +78,7 @@ function h(e) {
78
78
  ...e.getChildren ? { getChildren: e.getChildren } : {}
79
79
  };
80
80
  Xe(e.itemType, o);
81
- const s = Ot(e.itemType);
81
+ const s = Pt(e.itemType);
82
82
  return { gsl: s, gslByUid: (a, u) => s(u, ((c) => c.uid === a)) };
83
83
  }
84
84
  function y(e) {
@@ -93,39 +93,39 @@ function y(e) {
93
93
  type: u,
94
94
  size: c,
95
95
  onLoad: p,
96
- onChange: m,
96
+ onChange: d,
97
97
  onFilter: f,
98
98
  on: z,
99
99
  states: P,
100
- include: V,
101
- exclude: _e,
102
- validator: ve,
100
+ include: B,
101
+ exclude: ve,
102
+ validator: ke,
103
103
  ...C
104
104
  } = e;
105
105
  return C;
106
106
  }
107
- function Pt(e) {
107
+ function It(e) {
108
108
  return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (t) => t.toUpperCase()) : "";
109
109
  }
110
110
  function v(e, t) {
111
- return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Pt(e.path) };
111
+ return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: It(e.path) };
112
112
  }
113
113
  function Z(e, t) {
114
114
  return e.placeholder != null || t.suppressAutomaticPlaceholders || !e.path ? e : { ...e, placeholder: e.path };
115
115
  }
116
- function Ct(e) {
116
+ function Lt(e) {
117
117
  switch (e.type) {
118
118
  case "text":
119
- return Lt(e);
119
+ return Mt(e);
120
120
  case "number":
121
- return Dt(e);
121
+ return Nt(e);
122
122
  case "boolean":
123
- return It(e);
123
+ return Dt(e);
124
124
  default:
125
125
  throw new Error(`Unsupported field type "${e.type}"`);
126
126
  }
127
127
  }
128
- function It(e) {
128
+ function Dt(e) {
129
129
  const t = y(e);
130
130
  return {
131
131
  uid: e.uid ?? "",
@@ -139,7 +139,7 @@ function It(e) {
139
139
  props: t
140
140
  };
141
141
  }
142
- function Lt(e) {
142
+ function Mt(e) {
143
143
  const t = y(e);
144
144
  return {
145
145
  uid: e.uid ?? "",
@@ -156,7 +156,7 @@ function Lt(e) {
156
156
  validator: w(e.validator, "string")
157
157
  };
158
158
  }
159
- function Dt(e) {
159
+ function Nt(e) {
160
160
  const t = y(e);
161
161
  return {
162
162
  uid: e.uid ?? "",
@@ -187,7 +187,7 @@ h({
187
187
  return n = Z(n, t), n;
188
188
  }
189
189
  },
190
- mapToWidget: Ct
190
+ mapToWidget: Lt
191
191
  });
192
192
  h({
193
193
  itemType: "SELECT",
@@ -498,11 +498,11 @@ h({
498
498
  props: y(e)
499
499
  })
500
500
  });
501
- function Mt(e) {
501
+ function xt(e) {
502
502
  const t = {};
503
503
  return e.addLabel != null && (t.addLabel = e.addLabel), e.removeLabel != null && (t.removeLabel = e.removeLabel), e.limit != null && (t.limit = e.limit), e.title != null && (t.title = e.title), e.addButtonIcon != null && (t.addButtonIcon = e.addButtonIcon), e.removeButtonIcon != null && (t.removeButtonIcon = e.removeButtonIcon), t;
504
504
  }
505
- function Nt(e) {
505
+ function Rt(e) {
506
506
  return {
507
507
  uid: e.uid ?? "",
508
508
  kind: "input",
@@ -513,7 +513,7 @@ function Nt(e) {
513
513
  ...e.readonly != null ? { readonly: e.readonly } : {},
514
514
  ...e.validator != null ? { validator: w(e.validator, "array") } : {},
515
515
  props: {
516
- ...Mt(e),
516
+ ...xt(e),
517
517
  template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
518
518
  }
519
519
  };
@@ -527,7 +527,7 @@ function ae(e, t) {
527
527
  o?.template?.children && Array.isArray(o.template.children) && ae(o.template.children, t);
528
528
  }
529
529
  }
530
- function Rt(e, t) {
530
+ function Ft(e, t) {
531
531
  const n = t.walkChildren(t.children ?? []), r = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
532
532
  r && ae(n, r + ".items.");
533
533
  const o = {
@@ -553,32 +553,42 @@ function Rt(e, t) {
553
553
  };
554
554
  });
555
555
  }
556
- function xt(e) {
556
+ function Wt(e) {
557
557
  return {
558
558
  baseDef: e.def,
559
559
  path: e.key,
560
560
  children: e.children
561
561
  };
562
562
  }
563
- function Ft(e) {
563
+ function Ut(e) {
564
564
  return e.children;
565
565
  }
566
- const Wt = {
567
- parseEntry: xt,
566
+ const jt = {
567
+ parseEntry: Wt,
568
568
  rollUpSensibleDefaults: () => ({}),
569
569
  applySensibleDefaults: (e) => e,
570
- mapToWidget: Nt,
571
- buildCustomWidget: Rt,
572
- getChildren: Ft
570
+ mapToWidget: Rt,
571
+ buildCustomWidget: Ft,
572
+ getChildren: Ut
573
573
  };
574
- Xe("REPEATER", Wt);
574
+ Xe("REPEATER", jt);
575
575
  const Je = {
576
576
  onLoad: "load",
577
577
  onChange: "change",
578
578
  onFilter: "filter",
579
579
  onBlur: "blur"
580
- }, Ut = Object.keys(Je);
581
- class jt {
580
+ }, Vt = Object.keys(Je);
581
+ function Qe(e) {
582
+ if (e.length > 0)
583
+ return null;
584
+ try {
585
+ const t = e();
586
+ return typeof t == "string" ? t : null;
587
+ } catch {
588
+ return null;
589
+ }
590
+ }
591
+ class Bt {
582
592
  // ── Action-specific: onClick ───────────────────────────────────
583
593
  extractOnClickFromMergeResult(t, n, r) {
584
594
  if (t.kind === "dynamic") {
@@ -614,21 +624,27 @@ class jt {
614
624
  const o = { ...t.on || {} };
615
625
  let s = !1;
616
626
  const i = { ...t };
617
- for (const a of Ut) {
627
+ for (const a of Vt) {
618
628
  const u = t[a];
619
629
  if (u == null) continue;
620
630
  const c = Je[a];
621
631
  if (typeof u == "function") {
622
- const p = r.next();
623
- n.set(p, u), o[c] = p, s = !0;
632
+ const p = Qe(u);
633
+ if (p != null)
634
+ o[c] = p;
635
+ else {
636
+ const d = r.next();
637
+ n.set(d, u), o[c] = d;
638
+ }
639
+ s = !0;
624
640
  } else typeof u == "string" && (o[c] = u, s = !0);
625
641
  delete i[a];
626
642
  }
627
643
  return s && (i.on = o), i;
628
644
  }
629
645
  }
630
- const me = new jt();
631
- function Vt(e) {
646
+ const he = new Bt();
647
+ function Yt(e) {
632
648
  const {
633
649
  uid: t,
634
650
  label: n,
@@ -640,7 +656,7 @@ function Vt(e) {
640
656
  type: u,
641
657
  tags: c,
642
658
  size: p,
643
- include: m,
659
+ include: d,
644
660
  exclude: f,
645
661
  states: z,
646
662
  ...P
@@ -659,14 +675,14 @@ function Vt(e) {
659
675
  h({
660
676
  itemType: "ACTIONS",
661
677
  entryShape: "bare",
662
- mapToWidget: Vt,
663
- afterMerge: (e, t) => me.extractOnClickFromMergeResult(
678
+ mapToWidget: Yt,
679
+ afterMerge: (e, t) => he.extractOnClickFromMergeResult(
664
680
  e,
665
681
  t.eventRegistry,
666
682
  t.eventIdGenerator
667
683
  )
668
684
  });
669
- function Bt(e) {
685
+ function Gt(e) {
670
686
  const {
671
687
  uid: t,
672
688
  widgetName: n,
@@ -688,7 +704,7 @@ function Bt(e) {
688
704
  children: []
689
705
  };
690
706
  }
691
- function Yt(e, t) {
707
+ function Kt(e, t) {
692
708
  const n = t.walkChildren(t.children ?? []);
693
709
  if (e.kind === "static")
694
710
  return { ...t.mapStaticDef(e.def, "LAYOUTS"), children: n };
@@ -698,17 +714,17 @@ function Yt(e, t) {
698
714
  return { ...t.mapStaticDef(s, "LAYOUTS"), children: n };
699
715
  });
700
716
  }
701
- function Gt(e) {
717
+ function qt(e) {
702
718
  return e.children;
703
719
  }
704
720
  h({
705
721
  itemType: "LAYOUTS",
706
722
  entryShape: "compound",
707
- mapToWidget: Bt,
708
- buildCustomWidget: Yt,
709
- getChildren: Gt
723
+ mapToWidget: Gt,
724
+ buildCustomWidget: Kt,
725
+ getChildren: qt
710
726
  });
711
- function we(e) {
727
+ function Te(e) {
712
728
  return {
713
729
  errors: void 0,
714
730
  touched: void 0,
@@ -717,7 +733,7 @@ function we(e) {
717
733
  $form: e?.$form ?? {}
718
734
  };
719
735
  }
720
- function Kt(e) {
736
+ function Xt(e) {
721
737
  return {
722
738
  uid: "",
723
739
  kind: "display",
@@ -725,7 +741,7 @@ function Kt(e) {
725
741
  props: { render: e.render }
726
742
  };
727
743
  }
728
- function qt(e, t) {
744
+ function Ht(e, t) {
729
745
  if (e.kind === "static") {
730
746
  const r = e.def;
731
747
  return ((o) => ({
@@ -734,7 +750,7 @@ function qt(e, t) {
734
750
  type: "renderer",
735
751
  ...r.include != null ? { include: r.include } : {},
736
752
  ...r.exclude != null ? { exclude: r.exclude } : {},
737
- props: { render: r.render(we(o)) }
753
+ props: { render: r.render(Te(o)) }
738
754
  }));
739
755
  }
740
756
  const n = e.fn;
@@ -746,15 +762,15 @@ function qt(e, t) {
746
762
  type: "renderer",
747
763
  ...o.include != null ? { include: o.include } : {},
748
764
  ...o.exclude != null ? { exclude: o.exclude } : {},
749
- props: { render: o.render(we(r)) }
765
+ props: { render: o.render(Te(r)) }
750
766
  };
751
767
  });
752
768
  }
753
769
  h({
754
770
  itemType: "DISPLAYS",
755
771
  entryShape: "bare",
756
- mapToWidget: Kt,
757
- buildCustomWidget: qt
772
+ mapToWidget: Xt,
773
+ buildCustomWidget: Ht
758
774
  });
759
775
  h({
760
776
  itemType: "ALERTS",
@@ -781,7 +797,7 @@ h({
781
797
  }
782
798
  })
783
799
  });
784
- function Xt(e) {
800
+ function Jt(e) {
785
801
  return {
786
802
  uid: e.uid ?? "",
787
803
  kind: "layout",
@@ -794,7 +810,7 @@ function Xt(e) {
794
810
  children: []
795
811
  };
796
812
  }
797
- function Ht(e, t) {
813
+ function Qt(e, t) {
798
814
  const n = t.walkChildren(t.children ?? []);
799
815
  if (e.kind === "static")
800
816
  return { ...t.mapStaticDef(e.def, "TABS"), children: n };
@@ -804,17 +820,17 @@ function Ht(e, t) {
804
820
  return { ...t.mapStaticDef(s, "TABS"), children: n };
805
821
  });
806
822
  }
807
- function Jt(e) {
823
+ function en(e) {
808
824
  return e.children;
809
825
  }
810
826
  h({
811
827
  itemType: "TABS",
812
828
  entryShape: "compound",
813
- mapToWidget: Xt,
814
- buildCustomWidget: Ht,
815
- getChildren: Jt
829
+ mapToWidget: Jt,
830
+ buildCustomWidget: Qt,
831
+ getChildren: en
816
832
  });
817
- function Qt(e) {
833
+ function tn(e) {
818
834
  return {
819
835
  uid: e.uid ?? "",
820
836
  kind: "layout",
@@ -828,7 +844,7 @@ function Qt(e) {
828
844
  children: []
829
845
  };
830
846
  }
831
- function en(e, t) {
847
+ function nn(e, t) {
832
848
  const n = t.walkChildren(t.children ?? []);
833
849
  if (e.kind === "static")
834
850
  return { ...t.mapStaticDef(e.def, "ACCORDION"), children: n };
@@ -838,15 +854,15 @@ function en(e, t) {
838
854
  return { ...t.mapStaticDef(s, "ACCORDION"), children: n };
839
855
  });
840
856
  }
841
- function tn(e) {
857
+ function rn(e) {
842
858
  return e.children;
843
859
  }
844
860
  h({
845
861
  itemType: "ACCORDION",
846
862
  entryShape: "compound",
847
- mapToWidget: Qt,
848
- buildCustomWidget: en,
849
- getChildren: tn
863
+ mapToWidget: tn,
864
+ buildCustomWidget: nn,
865
+ getChildren: rn
850
866
  });
851
867
  h({
852
868
  itemType: "CUSTOM_INPUT",
@@ -886,7 +902,7 @@ h({
886
902
  tags: u,
887
903
  size: c,
888
904
  include: p,
889
- exclude: m,
905
+ exclude: d,
890
906
  states: f,
891
907
  props: z,
892
908
  ...P
@@ -901,7 +917,7 @@ h({
901
917
  props: { ...z, ...P }
902
918
  };
903
919
  },
904
- afterMerge: (e, t) => me.extractOnClickFromMergeResult(
920
+ afterMerge: (e, t) => he.extractOnClickFromMergeResult(
905
921
  e,
906
922
  t.eventRegistry,
907
923
  t.eventIdGenerator
@@ -917,7 +933,7 @@ h({
917
933
  props: e.props ?? {}
918
934
  })
919
935
  });
920
- function nn(e) {
936
+ function on(e) {
921
937
  return {
922
938
  uid: e.uid ?? "",
923
939
  kind: "layout",
@@ -926,7 +942,7 @@ function nn(e) {
926
942
  children: []
927
943
  };
928
944
  }
929
- function rn(e, t) {
945
+ function sn(e, t) {
930
946
  const n = t.walkChildren(t.children ?? []);
931
947
  if (e.kind === "static")
932
948
  return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: n };
@@ -936,15 +952,15 @@ function rn(e, t) {
936
952
  return { ...t.mapStaticDef(s, "CUSTOM_LAYOUT"), children: n };
937
953
  });
938
954
  }
939
- function on(e) {
955
+ function an(e) {
940
956
  return e.children;
941
957
  }
942
958
  h({
943
959
  itemType: "CUSTOM_LAYOUT",
944
960
  entryShape: "compound",
945
- mapToWidget: nn,
946
- buildCustomWidget: rn,
947
- getChildren: on
961
+ mapToWidget: on,
962
+ buildCustomWidget: sn,
963
+ getChildren: an
948
964
  });
949
965
  h({
950
966
  itemType: "TAGS",
@@ -966,7 +982,7 @@ h({
966
982
  props: y(e)
967
983
  })
968
984
  });
969
- const Qe = {
985
+ const et = {
970
986
  INPUTS: /* @__PURE__ */ new Set([
971
987
  "INPUTS",
972
988
  "TEXTAREA",
@@ -992,11 +1008,11 @@ const Qe = {
992
1008
  DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
993
1009
  LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
994
1010
  };
995
- function sn(e, t) {
996
- const n = Qe[e];
1011
+ function un(e, t) {
1012
+ const n = et[e];
997
1013
  return n ? n.has(t) : e === t;
998
1014
  }
999
- class an {
1015
+ class cn {
1000
1016
  resolve(t, n) {
1001
1017
  const r = [];
1002
1018
  for (const s of n)
@@ -1013,7 +1029,7 @@ class an {
1013
1029
  this.collectFromLeaf(o, n, r);
1014
1030
  }
1015
1031
  collectFromLeaf(t, n, r) {
1016
- sn(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1032
+ un(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1017
1033
  }
1018
1034
  rollUpSensibleDefaults(t) {
1019
1035
  const n = /* @__PURE__ */ new Map(), r = (s, i) => {
@@ -1021,7 +1037,7 @@ class an {
1021
1037
  a.push(i), n.set(s, a);
1022
1038
  };
1023
1039
  for (const s of t) {
1024
- const i = Qe[s.selectorType];
1040
+ const i = et[s.selectorType];
1025
1041
  if (i)
1026
1042
  for (const a of i) r(a, s);
1027
1043
  else
@@ -1029,12 +1045,12 @@ class an {
1029
1045
  }
1030
1046
  const o = {};
1031
1047
  for (const [s, i] of n)
1032
- He(s) && (o[s] = q(s).rollUpSensibleDefaults(i));
1048
+ He(s) && (o[s] = X(s).rollUpSensibleDefaults(i));
1033
1049
  return o;
1034
1050
  }
1035
1051
  }
1036
- const un = new an();
1037
- class cn {
1052
+ const ln = new cn();
1053
+ class pn {
1038
1054
  /**
1039
1055
  * Deep merges two objects, with right taking precedence over left when properties conflict.
1040
1056
  * Arrays are replaced, not merged.
@@ -1053,8 +1069,8 @@ class cn {
1053
1069
  return r;
1054
1070
  }
1055
1071
  }
1056
- const ln = new cn();
1057
- class pn {
1072
+ const dn = new pn();
1073
+ class mn {
1058
1074
  constructor(t) {
1059
1075
  this.objectUtils = t;
1060
1076
  }
@@ -1107,7 +1123,7 @@ class pn {
1107
1123
  applySensibleDefaults(t, n, r) {
1108
1124
  if (!He(n)) return t;
1109
1125
  const o = r.sensibleDefaults[n] ?? {};
1110
- return q(n).applySensibleDefaults(t, o);
1126
+ return X(n).applySensibleDefaults(t, o);
1111
1127
  }
1112
1128
  // ── Create promoted FunctionWidget ──
1113
1129
  createPromotedFunction(t, n, r, o, s) {
@@ -1135,8 +1151,8 @@ class pn {
1135
1151
  };
1136
1152
  }
1137
1153
  }
1138
- const dn = new pn(ln);
1139
- class mn {
1154
+ const hn = new mn(dn);
1155
+ class fn {
1140
1156
  mapToWidget(t, n) {
1141
1157
  if (t.kind === "dynamic") {
1142
1158
  const r = t.fn;
@@ -1148,7 +1164,7 @@ class mn {
1148
1164
  return this.mapStaticDef(t.def, n);
1149
1165
  }
1150
1166
  mapStaticDef(t, n) {
1151
- const r = q(n).mapToWidget(t);
1167
+ const r = X(n).mapToWidget(t);
1152
1168
  return this.applyBaseWidgetFields(r, t);
1153
1169
  }
1154
1170
  /**
@@ -1159,8 +1175,8 @@ class mn {
1159
1175
  return n.size != null && (t.size = n.size), n.defaultValue != null && t.kind === "input" && (t.defaultValue = n.defaultValue), n.on != null && (t.on = n.on), n.include != null && (t.include = n.include), n.exclude != null && (t.exclude = n.exclude), t;
1160
1176
  }
1161
1177
  }
1162
- const hn = new mn();
1163
- class fn {
1178
+ const gn = new fn();
1179
+ class bn {
1164
1180
  /**
1165
1181
  * Ensures the output is always a uniform GslSelector[] of aggregated selectors.
1166
1182
  *
@@ -1185,18 +1201,18 @@ class fn {
1185
1201
  };
1186
1202
  }
1187
1203
  }
1188
- const bn = new fn(), gn = {
1204
+ const yn = new bn(), _n = {
1189
1205
  input: /* @__PURE__ */ new Set(["disabled", "readonly", "label", "validator", "size"]),
1190
1206
  action: /* @__PURE__ */ new Set(["disabled", "label", "size"]),
1191
1207
  layout: /* @__PURE__ */ new Set(["size"]),
1192
1208
  display: /* @__PURE__ */ new Set([])
1193
- }, Te = {
1209
+ }, Ae = {
1194
1210
  onChange: "change",
1195
1211
  onLoad: "load",
1196
1212
  onFilter: "filter",
1197
1213
  onClick: "click"
1198
1214
  };
1199
- class yn {
1215
+ class vn {
1200
1216
  /**
1201
1217
  * Extracts `states` from a merge result, combining with state-targeted
1202
1218
  * GSL leaf selectors from `_gslStates`.
@@ -1216,7 +1232,7 @@ class yn {
1216
1232
  const a = t.fn;
1217
1233
  return {
1218
1234
  cleanedResult: { kind: "dynamic", fn: (c) => {
1219
- const p = a(c), { states: m, ...f } = p;
1235
+ const p = a(c), { states: d, ...f } = p;
1220
1236
  return f;
1221
1237
  } },
1222
1238
  stateData: { stateOverrides: r }
@@ -1246,11 +1262,11 @@ class yn {
1246
1262
  const { stateOverrides: s } = n;
1247
1263
  if (Object.keys(s).length === 0)
1248
1264
  return t;
1249
- const i = { ...t }, a = t.kind, u = gn[a] || /* @__PURE__ */ new Set();
1265
+ const i = { ...t }, a = t.kind, u = _n[a] || /* @__PURE__ */ new Set();
1250
1266
  t.props && (i.props = { ...t.props }), t.on && (i.on = { ...t.on });
1251
1267
  for (const [c, p] of Object.entries(s))
1252
- for (const [m, f] of Object.entries(p))
1253
- m === "visible" ? this.applyVisibility(i, c, f) : Te[m] ? this.applyStateEvent(i, c, m, f, r, o) : u.has(m) ? i[`${m}.${c}`] = f : (i.props || (i.props = {}), i.props[`${m}.${c}`] = f);
1268
+ for (const [d, f] of Object.entries(p))
1269
+ d === "visible" ? this.applyVisibility(i, c, f) : Ae[d] ? this.applyStateEvent(i, c, d, f, r, o) : u.has(d) ? i[`${d}.${c}`] = f : (i.props || (i.props = {}), i.props[`${d}.${c}`] = f);
1254
1270
  return i;
1255
1271
  }
1256
1272
  hasStateData(t) {
@@ -1268,24 +1284,29 @@ class yn {
1268
1284
  }
1269
1285
  // ── State-suffixed event helpers ──
1270
1286
  applyStateEvent(t, n, r, o, s, i) {
1271
- const a = Te[r];
1287
+ const a = Ae[r];
1272
1288
  if (t.on || (t.on = {}), typeof o == "function") {
1273
- const u = i.next();
1274
- s.set(u, o), t.on[`${a}.${n}`] = u;
1289
+ const u = Qe(o);
1290
+ if (u != null)
1291
+ t.on[`${a}.${n}`] = u;
1292
+ else {
1293
+ const c = i.next();
1294
+ s.set(c, o), t.on[`${a}.${n}`] = c;
1295
+ }
1275
1296
  } else typeof o == "string" && (t.on[`${a}.${n}`] = o);
1276
1297
  }
1277
1298
  }
1278
- const _n = new yn();
1279
- function vn() {
1299
+ const kn = new vn();
1300
+ function wn() {
1280
1301
  let e = 0;
1281
1302
  return { next: () => `event_${e++}` };
1282
1303
  }
1283
- class kn {
1304
+ class Tn {
1284
1305
  constructor(t, n, r, o, s) {
1285
1306
  this.resolver = t, this.merger = n, this.mapper = r, this.eventWiring = o, this.stateExpansion = s;
1286
1307
  }
1287
1308
  walkAndMap(t, n, r) {
1288
- const o = /* @__PURE__ */ new Map(), s = vn(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
1309
+ const o = /* @__PURE__ */ new Map(), s = wn(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
1289
1310
  return { widgets: this.walkItems(
1290
1311
  t,
1291
1312
  n,
@@ -1314,12 +1335,12 @@ class kn {
1314
1335
  });
1315
1336
  }
1316
1337
  processItem(t, n, r, o, s, i, a, u, c) {
1317
- const p = n, m = q(n), f = m.parseEntry(t), z = this.buildBaseDef(f), P = this.buildDecoratorForMatching(z, p, r), V = this.resolver.resolve(P, o), _e = V.leafSelectors.filter((T) => T.targetState != null), ve = {
1318
- leafSelectors: V.leafSelectors.filter((T) => T.targetState == null),
1319
- sensibleDefaults: V.sensibleDefaults
1338
+ const p = n, d = X(n), f = d.parseEntry(t), z = this.buildBaseDef(f), P = this.buildDecoratorForMatching(z, p, r), B = this.resolver.resolve(P, o), ve = B.leafSelectors.filter((T) => T.targetState != null), ke = {
1339
+ leafSelectors: B.leafSelectors.filter((T) => T.targetState == null),
1340
+ sensibleDefaults: B.sensibleDefaults
1320
1341
  };
1321
- let C = this.merger.merge(z, p, ve);
1322
- m.afterMerge && (C = m.afterMerge(C, {
1342
+ let C = this.merger.merge(z, p, ke);
1343
+ d.afterMerge && (C = d.afterMerge(C, {
1323
1344
  eventRegistry: s,
1324
1345
  formConfig: i,
1325
1346
  eventIdGenerator: a
@@ -1328,12 +1349,12 @@ class kn {
1328
1349
  s,
1329
1350
  a
1330
1351
  );
1331
- const { cleanedResult: ke, stateData: se } = this.stateExpansion.extractFromMergeResult(
1352
+ const { cleanedResult: we, stateData: se } = this.stateExpansion.extractFromMergeResult(
1332
1353
  C,
1333
- _e
1354
+ ve
1334
1355
  );
1335
1356
  let O;
1336
- if (m.buildCustomWidget) {
1357
+ if (d.buildCustomWidget) {
1337
1358
  const T = this.buildCustomWidgetContext(
1338
1359
  f.children,
1339
1360
  o,
@@ -1343,9 +1364,9 @@ class kn {
1343
1364
  u,
1344
1365
  c
1345
1366
  );
1346
- O = this.buildCustomWidget(m, ke, T);
1367
+ O = this.buildCustomWidget(d, we, T);
1347
1368
  } else
1348
- O = this.mapper.mapToWidget(ke, p);
1369
+ O = this.mapper.mapToWidget(we, p);
1349
1370
  if (typeof O != "function") {
1350
1371
  const T = O;
1351
1372
  T.uid || (T.path && !c.has(T.path) ? (T.uid = T.path, c.add(T.path)) : T.uid = `dx_${u.value++}`);
@@ -1353,10 +1374,10 @@ class kn {
1353
1374
  if (this.stateExpansion.hasStateData(se))
1354
1375
  if (typeof O == "function") {
1355
1376
  const T = O;
1356
- O = ((wt) => {
1357
- const Tt = T(wt);
1377
+ O = ((At) => {
1378
+ const St = T(At);
1358
1379
  return this.stateExpansion.applyToWidget(
1359
- Tt,
1380
+ St,
1360
1381
  se,
1361
1382
  s,
1362
1383
  a
@@ -1407,7 +1428,7 @@ class kn {
1407
1428
  return { itemType: n, tags: o, uid: s, type: i };
1408
1429
  }
1409
1430
  }
1410
- class wn {
1431
+ class An {
1411
1432
  constructor(t, n) {
1412
1433
  this.selectorNormalizer = t, this.walker = n;
1413
1434
  }
@@ -1435,7 +1456,7 @@ class wn {
1435
1456
  */
1436
1457
  prepareForm(t, n, r) {
1437
1458
  const s = (Array.isArray(t) ? [...t] : [t]).map(
1438
- (u) => typeof u == "function" ? Zt(u) : u
1459
+ (u) => typeof u == "function" ? Ct(u) : u
1439
1460
  ), i = this.selectorNormalizer.normalizeSelectors(n), a = {
1440
1461
  ...this.selectorNormalizer.extractFormConfig(),
1441
1462
  ...r
@@ -1474,8 +1495,8 @@ class wn {
1474
1495
  if (i) {
1475
1496
  const a = (c) => {
1476
1497
  if (c && typeof c == "object" && "path" in c && !("type" in c)) {
1477
- const { path: p, ...m } = c;
1478
- for (const [f, z] of Object.entries(m))
1498
+ const { path: p, ...d } = c;
1499
+ for (const [f, z] of Object.entries(d))
1479
1500
  s.callback({
1480
1501
  type: "OVERRIDE_WIDGET_PROP",
1481
1502
  payload: { path: p, prop: f, value: z }
@@ -1492,37 +1513,46 @@ class wn {
1492
1513
  }), r.dependencies && (o.dependencies = r.dependencies), r.widgetLoaders && (o.widgetLoaders = r.widgetLoaders), r.validateOn && (o.validateOn = r.validateOn), r.itemRenderers && (o.itemRenderers = r.itemRenderers), o;
1493
1514
  }
1494
1515
  }
1495
- const Tn = new kn(
1496
- un,
1497
- dn,
1516
+ const Sn = new Tn(
1517
+ ln,
1498
1518
  hn,
1499
- me,
1500
- _n
1501
- ), An = new wn(bn, Tn);
1502
- function Sn(e) {
1503
- return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every(Ae) : Ae(e);
1504
- }
1505
- function Ae(e) {
1519
+ gn,
1520
+ he,
1521
+ kn
1522
+ ), zn = new An(yn, Sn);
1523
+ function tt(e) {
1524
+ return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every(Se) : Se(e);
1525
+ }
1526
+ function Se(e) {
1506
1527
  if (typeof e == "function") return !0;
1507
1528
  if (e === null || typeof e != "object") return !1;
1508
1529
  const t = e;
1509
1530
  return t.type === "ITEMS" && typeof t.itemType == "string";
1510
1531
  }
1511
- const Se = Object.freeze({}), zn = Object.freeze({}), ze = /* @__PURE__ */ new WeakMap();
1532
+ function En(e) {
1533
+ if (!e || typeof e != "object" || Array.isArray(e))
1534
+ return;
1535
+ const t = e.form;
1536
+ if (tt(t))
1537
+ throw new Error(
1538
+ "[GolemUI] The gui.* form definition was wrapped in an extra `{ form: ... }` object, so its fields were never resolved. Pass the gui.* array DIRECTLY as formDef (`config={{ formDef: form }}`) and put any named `states` in `formConfig`: `config={{ formDef: form, formConfig: { states } }}`. Do NOT wrap them as a `{ form: [...] }` object."
1539
+ );
1540
+ }
1541
+ const ze = Object.freeze({}), $n = Object.freeze({}), Ee = /* @__PURE__ */ new WeakMap();
1512
1542
  function ie(e, t) {
1513
1543
  return e == null ? t : typeof e == "object" ? e : {};
1514
1544
  }
1515
- function En(e, t, n) {
1516
- if (!Sn(e))
1517
- return { formDef: e };
1518
- const r = ie(e, Se), o = ie(t, Se), s = ie(n, zn);
1519
- let i = ze.get(r);
1520
- i || (i = /* @__PURE__ */ new WeakMap(), ze.set(r, i));
1545
+ function On(e, t, n) {
1546
+ if (!tt(e))
1547
+ return En(e), { formDef: e };
1548
+ const r = ie(e, ze), o = ie(t, ze), s = ie(n, $n);
1549
+ let i = Ee.get(r);
1550
+ i || (i = /* @__PURE__ */ new WeakMap(), Ee.set(r, i));
1521
1551
  let a = i.get(o);
1522
1552
  a || (a = /* @__PURE__ */ new WeakMap(), i.set(o, a));
1523
1553
  const u = a.get(s);
1524
1554
  if (u) return u;
1525
- const c = An.processDxFacade(
1555
+ const c = zn.processDxFacade(
1526
1556
  e,
1527
1557
  t,
1528
1558
  n
@@ -1549,8 +1579,8 @@ function l(e, t, n) {
1549
1579
  return;
1550
1580
  a._zod.traits.add(e), t(a, u);
1551
1581
  const c = i.prototype, p = Object.keys(c);
1552
- for (let m = 0; m < p.length; m++) {
1553
- const f = p[m];
1582
+ for (let d = 0; d < p.length; d++) {
1583
+ const f = p[d];
1554
1584
  f in a || (a[f] = c[f].bind(a));
1555
1585
  }
1556
1586
  }
@@ -1575,32 +1605,32 @@ class N extends Error {
1575
1605
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
1576
1606
  }
1577
1607
  }
1578
- class et extends Error {
1608
+ class nt extends Error {
1579
1609
  constructor(t) {
1580
1610
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
1581
1611
  }
1582
1612
  }
1583
- const $n = {};
1613
+ const Zn = {};
1584
1614
  function I(e) {
1585
- return $n;
1615
+ return Zn;
1586
1616
  }
1587
1617
  function ue(e, t) {
1588
1618
  return typeof t == "bigint" ? t.toString() : t;
1589
1619
  }
1590
- function he(e) {
1620
+ function fe(e) {
1591
1621
  return e == null;
1592
1622
  }
1593
- function fe(e) {
1623
+ function ge(e) {
1594
1624
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
1595
1625
  return e.slice(t, n);
1596
1626
  }
1597
- const Ee = /* @__PURE__ */ Symbol("evaluating");
1598
- function b(e, t, n) {
1627
+ const $e = /* @__PURE__ */ Symbol("evaluating");
1628
+ function g(e, t, n) {
1599
1629
  let r;
1600
1630
  Object.defineProperty(e, t, {
1601
1631
  get() {
1602
- if (r !== Ee)
1603
- return r === void 0 && (r = Ee, r = n()), r;
1632
+ if (r !== $e)
1633
+ return r === void 0 && (r = $e, r = n()), r;
1604
1634
  },
1605
1635
  set(o) {
1606
1636
  Object.defineProperty(e, t, {
@@ -1611,7 +1641,7 @@ function b(e, t, n) {
1611
1641
  configurable: !0
1612
1642
  });
1613
1643
  }
1614
- function On(...e) {
1644
+ function Pn(...e) {
1615
1645
  const t = {};
1616
1646
  for (const n of e) {
1617
1647
  const r = Object.getOwnPropertyDescriptors(n);
@@ -1619,34 +1649,34 @@ function On(...e) {
1619
1649
  }
1620
1650
  return Object.defineProperties({}, t);
1621
1651
  }
1622
- function Zn(e) {
1652
+ function Cn(e) {
1623
1653
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1624
1654
  }
1625
- const tt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1655
+ const rt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1626
1656
  };
1627
- function $e(e) {
1657
+ function Oe(e) {
1628
1658
  return typeof e == "object" && e !== null && !Array.isArray(e);
1629
1659
  }
1630
1660
  function ce(e) {
1631
- if ($e(e) === !1)
1661
+ if (Oe(e) === !1)
1632
1662
  return !1;
1633
1663
  const t = e.constructor;
1634
1664
  if (t === void 0 || typeof t != "function")
1635
1665
  return !0;
1636
1666
  const n = t.prototype;
1637
- return !($e(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1667
+ return !(Oe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1638
1668
  }
1639
- function nt(e) {
1669
+ function ot(e) {
1640
1670
  return ce(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
1641
1671
  }
1642
1672
  function be(e) {
1643
1673
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1644
1674
  }
1645
- function rt(e, t, n) {
1675
+ function st(e, t, n) {
1646
1676
  const r = new e._zod.constr(t ?? e._zod.def);
1647
1677
  return (!t || n?.parent) && (r._zod.parent = e), r;
1648
1678
  }
1649
- function d(e) {
1679
+ function m(e) {
1650
1680
  const t = e;
1651
1681
  if (!t)
1652
1682
  return {};
@@ -1659,7 +1689,7 @@ function d(e) {
1659
1689
  }
1660
1690
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
1661
1691
  }
1662
- const Pn = {
1692
+ const In = {
1663
1693
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
1664
1694
  int32: [-2147483648, 2147483647],
1665
1695
  uint32: [0, 4294967295],
@@ -1674,27 +1704,27 @@ function M(e, t = 0) {
1674
1704
  return !0;
1675
1705
  return !1;
1676
1706
  }
1677
- function Cn(e, t) {
1707
+ function Ln(e, t) {
1678
1708
  return t.map((n) => {
1679
1709
  var r;
1680
1710
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
1681
1711
  });
1682
1712
  }
1683
- function B(e) {
1713
+ function Y(e) {
1684
1714
  return typeof e == "string" ? e : e?.message;
1685
1715
  }
1686
1716
  function L(e, t, n) {
1687
1717
  const r = { ...e, path: e.path ?? [] };
1688
1718
  if (!e.message) {
1689
- const o = B(e.inst?._zod.def?.error?.(e)) ?? B(t?.error?.(e)) ?? B(n.customError?.(e)) ?? B(n.localeError?.(e)) ?? "Invalid input";
1719
+ const o = Y(e.inst?._zod.def?.error?.(e)) ?? Y(t?.error?.(e)) ?? Y(n.customError?.(e)) ?? Y(n.localeError?.(e)) ?? "Invalid input";
1690
1720
  r.message = o;
1691
1721
  }
1692
1722
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
1693
1723
  }
1694
- function ge(e) {
1724
+ function ye(e) {
1695
1725
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
1696
1726
  }
1697
- function W(...e) {
1727
+ function U(...e) {
1698
1728
  const [t, n, r] = e;
1699
1729
  return typeof t == "string" ? {
1700
1730
  message: t,
@@ -1703,7 +1733,7 @@ function W(...e) {
1703
1733
  inst: r
1704
1734
  } : { ...t };
1705
1735
  }
1706
- const ot = (e, t) => {
1736
+ const it = (e, t) => {
1707
1737
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
1708
1738
  value: e._zod,
1709
1739
  enumerable: !1
@@ -1714,14 +1744,14 @@ const ot = (e, t) => {
1714
1744
  value: () => e.message,
1715
1745
  enumerable: !1
1716
1746
  });
1717
- }, st = l("$ZodError", ot), X = l("$ZodError", ot, { Parent: Error });
1718
- function In(e, t = (n) => n.message) {
1747
+ }, at = l("$ZodError", it), H = l("$ZodError", it, { Parent: Error });
1748
+ function Dn(e, t = (n) => n.message) {
1719
1749
  const n = {}, r = [];
1720
1750
  for (const o of e.issues)
1721
1751
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
1722
1752
  return { formErrors: r, fieldErrors: n };
1723
1753
  }
1724
- function Ln(e, t = (n) => n.message) {
1754
+ function Mn(e, t = (n) => n.message) {
1725
1755
  const n = { _errors: [] }, r = (o) => {
1726
1756
  for (const s of o.issues)
1727
1757
  if (s.code === "invalid_union" && s.errors.length)
@@ -1742,77 +1772,77 @@ function Ln(e, t = (n) => n.message) {
1742
1772
  };
1743
1773
  return r(e), n;
1744
1774
  }
1745
- const H = (e) => (t, n, r, o) => {
1775
+ const J = (e) => (t, n, r, o) => {
1746
1776
  const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
1747
1777
  if (i instanceof Promise)
1748
1778
  throw new N();
1749
1779
  if (i.issues.length) {
1750
1780
  const a = new (o?.Err ?? e)(i.issues.map((u) => L(u, s, I())));
1751
- throw tt(a, o?.callee), a;
1781
+ throw rt(a, o?.callee), a;
1752
1782
  }
1753
1783
  return i.value;
1754
- }, Dn = /* @__PURE__ */ H(X), J = (e) => async (t, n, r, o) => {
1784
+ }, Nn = /* @__PURE__ */ J(H), Q = (e) => async (t, n, r, o) => {
1755
1785
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1756
1786
  let i = t._zod.run({ value: n, issues: [] }, s);
1757
1787
  if (i instanceof Promise && (i = await i), i.issues.length) {
1758
1788
  const a = new (o?.Err ?? e)(i.issues.map((u) => L(u, s, I())));
1759
- throw tt(a, o?.callee), a;
1789
+ throw rt(a, o?.callee), a;
1760
1790
  }
1761
1791
  return i.value;
1762
- }, Mn = /* @__PURE__ */ J(X), Q = (e) => (t, n, r) => {
1792
+ }, xn = /* @__PURE__ */ Q(H), ee = (e) => (t, n, r) => {
1763
1793
  const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
1764
1794
  if (s instanceof Promise)
1765
1795
  throw new N();
1766
1796
  return s.issues.length ? {
1767
1797
  success: !1,
1768
- error: new (e ?? st)(s.issues.map((i) => L(i, o, I())))
1798
+ error: new (e ?? at)(s.issues.map((i) => L(i, o, I())))
1769
1799
  } : { success: !0, data: s.value };
1770
- }, it = /* @__PURE__ */ Q(X), ee = (e) => async (t, n, r) => {
1800
+ }, ut = /* @__PURE__ */ ee(H), te = (e) => async (t, n, r) => {
1771
1801
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1772
1802
  let s = t._zod.run({ value: n, issues: [] }, o);
1773
1803
  return s instanceof Promise && (s = await s), s.issues.length ? {
1774
1804
  success: !1,
1775
1805
  error: new e(s.issues.map((i) => L(i, o, I())))
1776
1806
  } : { success: !0, data: s.value };
1777
- }, at = /* @__PURE__ */ ee(X), Nn = (e) => (t, n, r) => {
1778
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1779
- return H(e)(t, n, o);
1780
- }, Rn = (e) => (t, n, r) => H(e)(t, n, r), xn = (e) => async (t, n, r) => {
1807
+ }, ct = /* @__PURE__ */ te(H), Rn = (e) => (t, n, r) => {
1781
1808
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1782
1809
  return J(e)(t, n, o);
1783
- }, Fn = (e) => async (t, n, r) => J(e)(t, n, r), Wn = (e) => (t, n, r) => {
1810
+ }, Fn = (e) => (t, n, r) => J(e)(t, n, r), Wn = (e) => async (t, n, r) => {
1784
1811
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1785
1812
  return Q(e)(t, n, o);
1786
- }, Un = (e) => (t, n, r) => Q(e)(t, n, r), jn = (e) => async (t, n, r) => {
1813
+ }, Un = (e) => async (t, n, r) => Q(e)(t, n, r), jn = (e) => (t, n, r) => {
1787
1814
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1788
1815
  return ee(e)(t, n, o);
1789
- }, Vn = (e) => async (t, n, r) => ee(e)(t, n, r), Bn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Oe = (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)$/, Yn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Gn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Kn = /^(([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}|:))$/, qn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, ut = "(?:(?:\\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])))", Xn = /* @__PURE__ */ new RegExp(`^${ut}$`);
1790
- function ct(e) {
1816
+ }, Vn = (e) => (t, n, r) => ee(e)(t, n, r), Bn = (e) => async (t, n, r) => {
1817
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1818
+ return te(e)(t, n, o);
1819
+ }, Yn = (e) => async (t, n, r) => te(e)(t, n, r), Gn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ze = (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)$/, Kn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, qn = /^(?:(?: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])$/, Xn = /^(([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}|:))$/, Hn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, lt = "(?:(?:\\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])))", Jn = /* @__PURE__ */ new RegExp(`^${lt}$`);
1820
+ function pt(e) {
1791
1821
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
1792
1822
  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+)?)?`;
1793
1823
  }
1794
- function Hn(e) {
1795
- return new RegExp(`^${ct(e)}$`);
1824
+ function Qn(e) {
1825
+ return new RegExp(`^${pt(e)}$`);
1796
1826
  }
1797
- function Jn(e) {
1798
- const t = ct({ precision: e.precision }), n = ["Z"];
1827
+ function er(e) {
1828
+ const t = pt({ precision: e.precision }), n = ["Z"];
1799
1829
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
1800
1830
  const r = `${t}(?:${n.join("|")})`;
1801
- return new RegExp(`^${ut}T(?:${r})$`);
1831
+ return new RegExp(`^${lt}T(?:${r})$`);
1802
1832
  }
1803
- const Qn = (e) => {
1833
+ const tr = (e) => {
1804
1834
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
1805
1835
  return new RegExp(`^${t}$`);
1806
- }, er = /^-?\d+$/, tr = /^-?\d+(?:\.\d+)?/, nr = /^(?:true|false)$/i, rr = /^[^A-Z]*$/, or = /^[^a-z]*$/, S = /* @__PURE__ */ l("$ZodCheck", (e, t) => {
1836
+ }, nr = /^-?\d+$/, rr = /^-?\d+(?:\.\d+)?/, or = /^(?:true|false)$/i, sr = /^[^A-Z]*$/, ir = /^[^a-z]*$/, S = /* @__PURE__ */ l("$ZodCheck", (e, t) => {
1807
1837
  var n;
1808
1838
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
1809
- }), lt = {
1839
+ }), dt = {
1810
1840
  number: "number",
1811
1841
  bigint: "bigint",
1812
1842
  object: "date"
1813
- }, sr = /* @__PURE__ */ l("$ZodCheckLessThan", (e, t) => {
1843
+ }, ar = /* @__PURE__ */ l("$ZodCheckLessThan", (e, t) => {
1814
1844
  S.init(e, t);
1815
- const n = lt[typeof t.value];
1845
+ const n = dt[typeof t.value];
1816
1846
  e._zod.onattach.push((r) => {
1817
1847
  const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
1818
1848
  t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
@@ -1827,9 +1857,9 @@ const Qn = (e) => {
1827
1857
  continue: !t.abort
1828
1858
  });
1829
1859
  };
1830
- }), ir = /* @__PURE__ */ l("$ZodCheckGreaterThan", (e, t) => {
1860
+ }), ur = /* @__PURE__ */ l("$ZodCheckGreaterThan", (e, t) => {
1831
1861
  S.init(e, t);
1832
- const n = lt[typeof t.value];
1862
+ const n = dt[typeof t.value];
1833
1863
  e._zod.onattach.push((r) => {
1834
1864
  const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
1835
1865
  t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
@@ -1844,12 +1874,12 @@ const Qn = (e) => {
1844
1874
  continue: !t.abort
1845
1875
  });
1846
1876
  };
1847
- }), ar = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, t) => {
1877
+ }), cr = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, t) => {
1848
1878
  S.init(e, t), t.format = t.format || "float64";
1849
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = Pn[t.format];
1879
+ const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = In[t.format];
1850
1880
  e._zod.onattach.push((i) => {
1851
1881
  const a = i._zod.bag;
1852
- a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = er);
1882
+ a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = nr);
1853
1883
  }), e._zod.check = (i) => {
1854
1884
  const a = i.value;
1855
1885
  if (n) {
@@ -1901,11 +1931,11 @@ const Qn = (e) => {
1901
1931
  inst: e
1902
1932
  });
1903
1933
  };
1904
- }), ur = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, t) => {
1934
+ }), lr = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, t) => {
1905
1935
  var n;
1906
1936
  S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1907
1937
  const o = r.value;
1908
- return !he(o) && o.length !== void 0;
1938
+ return !fe(o) && o.length !== void 0;
1909
1939
  }), e._zod.onattach.push((r) => {
1910
1940
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1911
1941
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -1913,7 +1943,7 @@ const Qn = (e) => {
1913
1943
  const o = r.value;
1914
1944
  if (o.length <= t.maximum)
1915
1945
  return;
1916
- const i = ge(o);
1946
+ const i = ye(o);
1917
1947
  r.issues.push({
1918
1948
  origin: i,
1919
1949
  code: "too_big",
@@ -1924,11 +1954,11 @@ const Qn = (e) => {
1924
1954
  continue: !t.abort
1925
1955
  });
1926
1956
  };
1927
- }), cr = /* @__PURE__ */ l("$ZodCheckMinLength", (e, t) => {
1957
+ }), pr = /* @__PURE__ */ l("$ZodCheckMinLength", (e, t) => {
1928
1958
  var n;
1929
1959
  S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1930
1960
  const o = r.value;
1931
- return !he(o) && o.length !== void 0;
1961
+ return !fe(o) && o.length !== void 0;
1932
1962
  }), e._zod.onattach.push((r) => {
1933
1963
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1934
1964
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -1936,7 +1966,7 @@ const Qn = (e) => {
1936
1966
  const o = r.value;
1937
1967
  if (o.length >= t.minimum)
1938
1968
  return;
1939
- const i = ge(o);
1969
+ const i = ye(o);
1940
1970
  r.issues.push({
1941
1971
  origin: i,
1942
1972
  code: "too_small",
@@ -1947,11 +1977,11 @@ const Qn = (e) => {
1947
1977
  continue: !t.abort
1948
1978
  });
1949
1979
  };
1950
- }), lr = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, t) => {
1980
+ }), dr = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, t) => {
1951
1981
  var n;
1952
1982
  S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1953
1983
  const o = r.value;
1954
- return !he(o) && o.length !== void 0;
1984
+ return !fe(o) && o.length !== void 0;
1955
1985
  }), e._zod.onattach.push((r) => {
1956
1986
  const o = r._zod.bag;
1957
1987
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
@@ -1959,7 +1989,7 @@ const Qn = (e) => {
1959
1989
  const o = r.value, s = o.length;
1960
1990
  if (s === t.length)
1961
1991
  return;
1962
- const i = ge(o), a = s > t.length;
1992
+ const i = ye(o), a = s > t.length;
1963
1993
  r.issues.push({
1964
1994
  origin: i,
1965
1995
  ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -1970,7 +2000,7 @@ const Qn = (e) => {
1970
2000
  continue: !t.abort
1971
2001
  });
1972
2002
  };
1973
- }), te = /* @__PURE__ */ l("$ZodCheckStringFormat", (e, t) => {
2003
+ }), ne = /* @__PURE__ */ l("$ZodCheckStringFormat", (e, t) => {
1974
2004
  var n, r;
1975
2005
  S.init(e, t), e._zod.onattach.push((o) => {
1976
2006
  const s = o._zod.bag;
@@ -1987,8 +2017,8 @@ const Qn = (e) => {
1987
2017
  });
1988
2018
  }) : (r = e._zod).check ?? (r.check = () => {
1989
2019
  });
1990
- }), pr = /* @__PURE__ */ l("$ZodCheckRegex", (e, t) => {
1991
- te.init(e, t), e._zod.check = (n) => {
2020
+ }), mr = /* @__PURE__ */ l("$ZodCheckRegex", (e, t) => {
2021
+ ne.init(e, t), e._zod.check = (n) => {
1992
2022
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1993
2023
  origin: "string",
1994
2024
  code: "invalid_format",
@@ -1999,11 +2029,11 @@ const Qn = (e) => {
1999
2029
  continue: !t.abort
2000
2030
  });
2001
2031
  };
2002
- }), dr = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, t) => {
2003
- t.pattern ?? (t.pattern = rr), te.init(e, t);
2004
- }), mr = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, t) => {
2005
- t.pattern ?? (t.pattern = or), te.init(e, t);
2006
- }), hr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, t) => {
2032
+ }), hr = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, t) => {
2033
+ t.pattern ?? (t.pattern = sr), ne.init(e, t);
2034
+ }), fr = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, t) => {
2035
+ t.pattern ?? (t.pattern = ir), ne.init(e, t);
2036
+ }), gr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, t) => {
2007
2037
  S.init(e, t);
2008
2038
  const n = be(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
2009
2039
  t.pattern = r, e._zod.onattach.push((o) => {
@@ -2020,7 +2050,7 @@ const Qn = (e) => {
2020
2050
  continue: !t.abort
2021
2051
  });
2022
2052
  };
2023
- }), fr = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, t) => {
2053
+ }), br = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, t) => {
2024
2054
  S.init(e, t);
2025
2055
  const n = new RegExp(`^${be(t.prefix)}.*`);
2026
2056
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
@@ -2037,7 +2067,7 @@ const Qn = (e) => {
2037
2067
  continue: !t.abort
2038
2068
  });
2039
2069
  };
2040
- }), br = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, t) => {
2070
+ }), yr = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, t) => {
2041
2071
  S.init(e, t);
2042
2072
  const n = new RegExp(`.*${be(t.suffix)}$`);
2043
2073
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
@@ -2054,17 +2084,17 @@ const Qn = (e) => {
2054
2084
  continue: !t.abort
2055
2085
  });
2056
2086
  };
2057
- }), gr = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, t) => {
2087
+ }), _r = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, t) => {
2058
2088
  S.init(e, t), e._zod.check = (n) => {
2059
2089
  n.value = t.tx(n.value);
2060
2090
  };
2061
- }), yr = {
2091
+ }), vr = {
2062
2092
  major: 4,
2063
2093
  minor: 1,
2064
2094
  patch: 13
2065
2095
  }, _ = /* @__PURE__ */ l("$ZodType", (e, t) => {
2066
2096
  var n;
2067
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = yr;
2097
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = vr;
2068
2098
  const r = [...e._zod.def.checks ?? []];
2069
2099
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
2070
2100
  for (const o of r)
@@ -2077,13 +2107,13 @@ const Qn = (e) => {
2077
2107
  else {
2078
2108
  const o = (i, a, u) => {
2079
2109
  let c = M(i), p;
2080
- for (const m of a) {
2081
- if (m._zod.def.when) {
2082
- if (!m._zod.def.when(i))
2110
+ for (const d of a) {
2111
+ if (d._zod.def.when) {
2112
+ if (!d._zod.def.when(i))
2083
2113
  continue;
2084
2114
  } else if (c)
2085
2115
  continue;
2086
- const f = i.issues.length, z = m._zod.check(i);
2116
+ const f = i.issues.length, z = d._zod.check(i);
2087
2117
  if (z instanceof Promise && u?.async === !1)
2088
2118
  throw new N();
2089
2119
  if (p || z instanceof Promise)
@@ -2127,17 +2157,17 @@ const Qn = (e) => {
2127
2157
  e["~standard"] = {
2128
2158
  validate: (o) => {
2129
2159
  try {
2130
- const s = it(e, o);
2160
+ const s = ut(e, o);
2131
2161
  return s.success ? { value: s.data } : { issues: s.error?.issues };
2132
2162
  } catch {
2133
- return at(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
2163
+ return ct(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
2134
2164
  }
2135
2165
  },
2136
2166
  vendor: "zod",
2137
2167
  version: 1
2138
2168
  };
2139
- }), ye = /* @__PURE__ */ l("$ZodString", (e, t) => {
2140
- _.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Qn(e._zod.bag), e._zod.parse = (n, r) => {
2169
+ }), _e = /* @__PURE__ */ l("$ZodString", (e, t) => {
2170
+ _.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? tr(e._zod.bag), e._zod.parse = (n, r) => {
2141
2171
  if (t.coerce)
2142
2172
  try {
2143
2173
  n.value = String(n.value);
@@ -2151,8 +2181,8 @@ const Qn = (e) => {
2151
2181
  }), n;
2152
2182
  };
2153
2183
  }), E = /* @__PURE__ */ l("$ZodStringFormat", (e, t) => {
2154
- te.init(e, t), ye.init(e, t);
2155
- }), _r = /* @__PURE__ */ l("$ZodUUID", (e, t) => {
2184
+ ne.init(e, t), _e.init(e, t);
2185
+ }), kr = /* @__PURE__ */ l("$ZodUUID", (e, t) => {
2156
2186
  if (t.version) {
2157
2187
  const r = {
2158
2188
  v1: 1,
@@ -2166,13 +2196,13 @@ const Qn = (e) => {
2166
2196
  }[t.version];
2167
2197
  if (r === void 0)
2168
2198
  throw new Error(`Invalid UUID version: "${t.version}"`);
2169
- t.pattern ?? (t.pattern = Oe(r));
2199
+ t.pattern ?? (t.pattern = Ze(r));
2170
2200
  } else
2171
- t.pattern ?? (t.pattern = Oe());
2201
+ t.pattern ?? (t.pattern = Ze());
2172
2202
  E.init(e, t);
2173
- }), vr = /* @__PURE__ */ l("$ZodEmail", (e, t) => {
2174
- t.pattern ?? (t.pattern = Yn), E.init(e, t);
2175
- }), kr = /* @__PURE__ */ l("$ZodURL", (e, t) => {
2203
+ }), wr = /* @__PURE__ */ l("$ZodEmail", (e, t) => {
2204
+ t.pattern ?? (t.pattern = Kn), E.init(e, t);
2205
+ }), Tr = /* @__PURE__ */ l("$ZodURL", (e, t) => {
2176
2206
  E.init(e, t), e._zod.check = (n) => {
2177
2207
  try {
2178
2208
  const r = n.value.trim(), o = new URL(r);
@@ -2204,18 +2234,18 @@ const Qn = (e) => {
2204
2234
  });
2205
2235
  }
2206
2236
  };
2207
- }), wr = /* @__PURE__ */ l("$ZodISODateTime", (e, t) => {
2208
- t.pattern ?? (t.pattern = Jn(t)), E.init(e, t);
2209
- }), Tr = /* @__PURE__ */ l("$ZodISODate", (e, t) => {
2210
- t.pattern ?? (t.pattern = Xn), E.init(e, t);
2211
- }), Ar = /* @__PURE__ */ l("$ZodISOTime", (e, t) => {
2212
- t.pattern ?? (t.pattern = Hn(t)), E.init(e, t);
2213
- }), Sr = /* @__PURE__ */ l("$ZodISODuration", (e, t) => {
2214
- t.pattern ?? (t.pattern = Bn), E.init(e, t);
2215
- }), zr = /* @__PURE__ */ l("$ZodIPv4", (e, t) => {
2216
- t.pattern ?? (t.pattern = Gn), E.init(e, t), e._zod.bag.format = "ipv4";
2217
- }), Er = /* @__PURE__ */ l("$ZodIPv6", (e, t) => {
2218
- t.pattern ?? (t.pattern = Kn), E.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
2237
+ }), Ar = /* @__PURE__ */ l("$ZodISODateTime", (e, t) => {
2238
+ t.pattern ?? (t.pattern = er(t)), E.init(e, t);
2239
+ }), Sr = /* @__PURE__ */ l("$ZodISODate", (e, t) => {
2240
+ t.pattern ?? (t.pattern = Jn), E.init(e, t);
2241
+ }), zr = /* @__PURE__ */ l("$ZodISOTime", (e, t) => {
2242
+ t.pattern ?? (t.pattern = Qn(t)), E.init(e, t);
2243
+ }), Er = /* @__PURE__ */ l("$ZodISODuration", (e, t) => {
2244
+ t.pattern ?? (t.pattern = Gn), E.init(e, t);
2245
+ }), $r = /* @__PURE__ */ l("$ZodIPv4", (e, t) => {
2246
+ t.pattern ?? (t.pattern = qn), E.init(e, t), e._zod.bag.format = "ipv4";
2247
+ }), Or = /* @__PURE__ */ l("$ZodIPv6", (e, t) => {
2248
+ t.pattern ?? (t.pattern = Xn), E.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
2219
2249
  try {
2220
2250
  new URL(`http://[${n.value}]`);
2221
2251
  } catch {
@@ -2228,7 +2258,7 @@ const Qn = (e) => {
2228
2258
  });
2229
2259
  }
2230
2260
  };
2231
- }), $r = /* @__PURE__ */ l("$ZodCustomStringFormat", (e, t) => {
2261
+ }), Zr = /* @__PURE__ */ l("$ZodCustomStringFormat", (e, t) => {
2232
2262
  E.init(e, t), e._zod.check = (n) => {
2233
2263
  t.fn(n.value) || n.issues.push({
2234
2264
  code: "invalid_format",
@@ -2238,8 +2268,8 @@ const Qn = (e) => {
2238
2268
  continue: !t.abort
2239
2269
  });
2240
2270
  };
2241
- }), pt = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
2242
- _.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? tr, e._zod.parse = (n, r) => {
2271
+ }), mt = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
2272
+ _.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? rr, e._zod.parse = (n, r) => {
2243
2273
  if (t.coerce)
2244
2274
  try {
2245
2275
  n.value = Number(n.value);
@@ -2257,10 +2287,10 @@ const Qn = (e) => {
2257
2287
  ...s ? { received: s } : {}
2258
2288
  }), n;
2259
2289
  };
2260
- }), Or = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2261
- ar.init(e, t), pt.init(e, t);
2262
- }), Zr = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2263
- _.init(e, t), e._zod.pattern = nr, e._zod.parse = (n, r) => {
2290
+ }), Pr = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2291
+ cr.init(e, t), mt.init(e, t);
2292
+ }), Cr = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2293
+ _.init(e, t), e._zod.pattern = or, e._zod.parse = (n, r) => {
2264
2294
  if (t.coerce)
2265
2295
  try {
2266
2296
  n.value = !!n.value;
@@ -2274,13 +2304,13 @@ const Qn = (e) => {
2274
2304
  inst: e
2275
2305
  }), n;
2276
2306
  };
2277
- }), Pr = /* @__PURE__ */ l("$ZodAny", (e, t) => {
2307
+ }), Ir = /* @__PURE__ */ l("$ZodAny", (e, t) => {
2278
2308
  _.init(e, t), e._zod.parse = (n) => n;
2279
2309
  });
2280
- function Ze(e, t, n) {
2281
- e.issues.length && t.issues.push(...Cn(n, e.issues)), t.value[n] = e.value;
2310
+ function Pe(e, t, n) {
2311
+ e.issues.length && t.issues.push(...Ln(n, e.issues)), t.value[n] = e.value;
2282
2312
  }
2283
- const dt = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2313
+ const ht = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2284
2314
  _.init(e, t), e._zod.parse = (n, r) => {
2285
2315
  const o = n.value;
2286
2316
  if (!Array.isArray(o))
@@ -2297,12 +2327,12 @@ const dt = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2297
2327
  value: a,
2298
2328
  issues: []
2299
2329
  }, r);
2300
- u instanceof Promise ? s.push(u.then((c) => Ze(c, n, i))) : Ze(u, n, i);
2330
+ u instanceof Promise ? s.push(u.then((c) => Pe(c, n, i))) : Pe(u, n, i);
2301
2331
  }
2302
2332
  return s.length ? Promise.all(s).then(() => n) : n;
2303
2333
  };
2304
2334
  });
2305
- function Pe(e, t, n, r) {
2335
+ function Ce(e, t, n, r) {
2306
2336
  for (const s of e)
2307
2337
  if (s.issues.length === 0)
2308
2338
  return t.value = s.value, t;
@@ -2314,14 +2344,14 @@ function Pe(e, t, n, r) {
2314
2344
  errors: e.map((s) => s.issues.map((i) => L(i, r, I())))
2315
2345
  }), t);
2316
2346
  }
2317
- const Cr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2318
- _.init(e, t), b(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), b(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), b(e._zod, "values", () => {
2347
+ const Lr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2348
+ _.init(e, t), g(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
2319
2349
  if (t.options.every((o) => o._zod.values))
2320
2350
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
2321
- }), b(e._zod, "pattern", () => {
2351
+ }), g(e._zod, "pattern", () => {
2322
2352
  if (t.options.every((o) => o._zod.pattern)) {
2323
2353
  const o = t.options.map((s) => s._zod.pattern);
2324
- return new RegExp(`^(${o.map((s) => fe(s.source)).join("|")})$`);
2354
+ return new RegExp(`^(${o.map((s) => ge(s.source)).join("|")})$`);
2325
2355
  }
2326
2356
  });
2327
2357
  const n = t.options.length === 1, r = t.options[0]._zod.run;
@@ -2343,12 +2373,12 @@ const Cr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2343
2373
  a.push(c);
2344
2374
  }
2345
2375
  }
2346
- return i ? Promise.all(a).then((u) => Pe(u, o, e, s)) : Pe(a, o, e, s);
2376
+ return i ? Promise.all(a).then((u) => Ce(u, o, e, s)) : Ce(a, o, e, s);
2347
2377
  };
2348
- }), Ir = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
2378
+ }), Dr = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
2349
2379
  _.init(e, t), e._zod.parse = (n, r) => {
2350
2380
  const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
2351
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Ce(n, u, c)) : Ce(n, s, i);
2381
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Ie(n, u, c)) : Ie(n, s, i);
2352
2382
  };
2353
2383
  });
2354
2384
  function le(e, t) {
@@ -2386,7 +2416,7 @@ function le(e, t) {
2386
2416
  }
2387
2417
  return { valid: !1, mergeErrorPath: [] };
2388
2418
  }
2389
- function Ce(e, t, n) {
2419
+ function Ie(e, t, n) {
2390
2420
  if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), M(e))
2391
2421
  return e;
2392
2422
  const r = le(t.value, n.value);
@@ -2394,10 +2424,10 @@ function Ce(e, t, n) {
2394
2424
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
2395
2425
  return e.value = r.data, e;
2396
2426
  }
2397
- const Lr = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2427
+ const Mr = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2398
2428
  _.init(e, t), e._zod.parse = (n, r) => {
2399
2429
  if (r.direction === "backward")
2400
- throw new et(e.constructor.name);
2430
+ throw new nt(e.constructor.name);
2401
2431
  const o = t.transform(n.value, n);
2402
2432
  if (r.async)
2403
2433
  return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
@@ -2406,50 +2436,50 @@ const Lr = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2406
2436
  return n.value = o, n;
2407
2437
  };
2408
2438
  });
2409
- function Ie(e, t) {
2439
+ function Le(e, t) {
2410
2440
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
2411
2441
  }
2412
- const mt = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
2413
- _.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", b(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), b(e._zod, "pattern", () => {
2442
+ const ft = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
2443
+ _.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
2414
2444
  const n = t.innerType._zod.pattern;
2415
- return n ? new RegExp(`^(${fe(n.source)})?$`) : void 0;
2445
+ return n ? new RegExp(`^(${ge(n.source)})?$`) : void 0;
2416
2446
  }), e._zod.parse = (n, r) => {
2417
2447
  if (t.innerType._zod.optin === "optional") {
2418
2448
  const o = t.innerType._zod.run(n, r);
2419
- return o instanceof Promise ? o.then((s) => Ie(s, n.value)) : Ie(o, n.value);
2449
+ return o instanceof Promise ? o.then((s) => Le(s, n.value)) : Le(o, n.value);
2420
2450
  }
2421
2451
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
2422
2452
  };
2423
- }), Dr = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
2424
- _.init(e, t), b(e._zod, "optin", () => t.innerType._zod.optin), b(e._zod, "optout", () => t.innerType._zod.optout), b(e._zod, "pattern", () => {
2453
+ }), Nr = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
2454
+ _.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
2425
2455
  const n = t.innerType._zod.pattern;
2426
- return n ? new RegExp(`^(${fe(n.source)}|null)$`) : void 0;
2427
- }), b(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
2428
- }), Mr = /* @__PURE__ */ l("$ZodDefault", (e, t) => {
2429
- _.init(e, t), e._zod.optin = "optional", b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2456
+ return n ? new RegExp(`^(${ge(n.source)}|null)$`) : void 0;
2457
+ }), g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
2458
+ }), xr = /* @__PURE__ */ l("$ZodDefault", (e, t) => {
2459
+ _.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2430
2460
  if (r.direction === "backward")
2431
2461
  return t.innerType._zod.run(n, r);
2432
2462
  if (n.value === void 0)
2433
2463
  return n.value = t.defaultValue, n;
2434
2464
  const o = t.innerType._zod.run(n, r);
2435
- return o instanceof Promise ? o.then((s) => Le(s, t)) : Le(o, t);
2465
+ return o instanceof Promise ? o.then((s) => De(s, t)) : De(o, t);
2436
2466
  };
2437
2467
  });
2438
- function Le(e, t) {
2468
+ function De(e, t) {
2439
2469
  return e.value === void 0 && (e.value = t.defaultValue), e;
2440
2470
  }
2441
- const Nr = /* @__PURE__ */ l("$ZodPrefault", (e, t) => {
2442
- _.init(e, t), e._zod.optin = "optional", b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
2443
- }), Rr = /* @__PURE__ */ l("$ZodNonOptional", (e, t) => {
2444
- _.init(e, t), b(e._zod, "values", () => {
2471
+ const Rr = /* @__PURE__ */ l("$ZodPrefault", (e, t) => {
2472
+ _.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
2473
+ }), Fr = /* @__PURE__ */ l("$ZodNonOptional", (e, t) => {
2474
+ _.init(e, t), g(e._zod, "values", () => {
2445
2475
  const n = t.innerType._zod.values;
2446
2476
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
2447
2477
  }), e._zod.parse = (n, r) => {
2448
2478
  const o = t.innerType._zod.run(n, r);
2449
- return o instanceof Promise ? o.then((s) => De(s, e)) : De(o, e);
2479
+ return o instanceof Promise ? o.then((s) => Me(s, e)) : Me(o, e);
2450
2480
  };
2451
2481
  });
2452
- function De(e, t) {
2482
+ function Me(e, t) {
2453
2483
  return !e.issues.length && e.value === void 0 && e.issues.push({
2454
2484
  code: "invalid_type",
2455
2485
  expected: "nonoptional",
@@ -2457,8 +2487,8 @@ function De(e, t) {
2457
2487
  inst: t
2458
2488
  }), e;
2459
2489
  }
2460
- const xr = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2461
- _.init(e, t), b(e._zod, "optin", () => t.innerType._zod.optin), b(e._zod, "optout", () => t.innerType._zod.optout), b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2490
+ const Wr = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2491
+ _.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2462
2492
  if (r.direction === "backward")
2463
2493
  return t.innerType._zod.run(n, r);
2464
2494
  const o = t.innerType._zod.run(n, r);
@@ -2476,39 +2506,39 @@ const xr = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2476
2506
  input: n.value
2477
2507
  }), n.issues = []), n);
2478
2508
  };
2479
- }), Fr = /* @__PURE__ */ l("$ZodPipe", (e, t) => {
2480
- _.init(e, t), b(e._zod, "values", () => t.in._zod.values), b(e._zod, "optin", () => t.in._zod.optin), b(e._zod, "optout", () => t.out._zod.optout), b(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2509
+ }), Ur = /* @__PURE__ */ l("$ZodPipe", (e, t) => {
2510
+ _.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2481
2511
  if (r.direction === "backward") {
2482
2512
  const s = t.out._zod.run(n, r);
2483
- return s instanceof Promise ? s.then((i) => Y(i, t.in, r)) : Y(s, t.in, r);
2513
+ return s instanceof Promise ? s.then((i) => G(i, t.in, r)) : G(s, t.in, r);
2484
2514
  }
2485
2515
  const o = t.in._zod.run(n, r);
2486
- return o instanceof Promise ? o.then((s) => Y(s, t.out, r)) : Y(o, t.out, r);
2516
+ return o instanceof Promise ? o.then((s) => G(s, t.out, r)) : G(o, t.out, r);
2487
2517
  };
2488
2518
  });
2489
- function Y(e, t, n) {
2519
+ function G(e, t, n) {
2490
2520
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
2491
2521
  }
2492
- const Wr = /* @__PURE__ */ l("$ZodReadonly", (e, t) => {
2493
- _.init(e, t), b(e._zod, "propValues", () => t.innerType._zod.propValues), b(e._zod, "values", () => t.innerType._zod.values), b(e._zod, "optin", () => t.innerType?._zod?.optin), b(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2522
+ const jr = /* @__PURE__ */ l("$ZodReadonly", (e, t) => {
2523
+ _.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2494
2524
  if (r.direction === "backward")
2495
2525
  return t.innerType._zod.run(n, r);
2496
2526
  const o = t.innerType._zod.run(n, r);
2497
- return o instanceof Promise ? o.then(Me) : Me(o);
2527
+ return o instanceof Promise ? o.then(Ne) : Ne(o);
2498
2528
  };
2499
2529
  });
2500
- function Me(e) {
2530
+ function Ne(e) {
2501
2531
  return e.value = Object.freeze(e.value), e;
2502
2532
  }
2503
- const ht = /* @__PURE__ */ l("$ZodCustom", (e, t) => {
2533
+ const gt = /* @__PURE__ */ l("$ZodCustom", (e, t) => {
2504
2534
  S.init(e, t), _.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
2505
2535
  const r = n.value, o = t.fn(r);
2506
2536
  if (o instanceof Promise)
2507
- return o.then((s) => Ne(s, n, r, e));
2508
- Ne(o, n, r, e);
2537
+ return o.then((s) => xe(s, n, r, e));
2538
+ xe(o, n, r, e);
2509
2539
  };
2510
2540
  });
2511
- function Ne(e, t, n, r) {
2541
+ function xe(e, t, n, r) {
2512
2542
  if (!e) {
2513
2543
  const o = {
2514
2544
  code: "custom",
@@ -2520,11 +2550,11 @@ function Ne(e, t, n, r) {
2520
2550
  continue: !r._zod.def.abort
2521
2551
  // params: inst._zod.def.params,
2522
2552
  };
2523
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(W(o));
2553
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(U(o));
2524
2554
  }
2525
2555
  }
2526
2556
  var Re;
2527
- class Ur {
2557
+ class Vr {
2528
2558
  constructor() {
2529
2559
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2530
2560
  }
@@ -2558,63 +2588,63 @@ class Ur {
2558
2588
  return this._map.has(t);
2559
2589
  }
2560
2590
  }
2561
- function jr() {
2562
- return new Ur();
2591
+ function Br() {
2592
+ return new Vr();
2563
2593
  }
2564
- (Re = globalThis).__zod_globalRegistry ?? (Re.__zod_globalRegistry = jr());
2565
- const G = globalThis.__zod_globalRegistry;
2566
- function Vr(e, t) {
2594
+ (Re = globalThis).__zod_globalRegistry ?? (Re.__zod_globalRegistry = Br());
2595
+ const K = globalThis.__zod_globalRegistry;
2596
+ function Yr(e, t) {
2567
2597
  return new e({
2568
2598
  type: "string",
2569
- ...d(t)
2599
+ ...m(t)
2570
2600
  });
2571
2601
  }
2572
- function Br(e, t) {
2602
+ function Gr(e, t) {
2573
2603
  return new e({
2574
2604
  type: "string",
2575
2605
  format: "email",
2576
2606
  check: "string_format",
2577
2607
  abort: !1,
2578
- ...d(t)
2608
+ ...m(t)
2579
2609
  });
2580
2610
  }
2581
- function Yr(e, t) {
2611
+ function Kr(e, t) {
2582
2612
  return new e({
2583
2613
  type: "string",
2584
2614
  format: "uuid",
2585
2615
  check: "string_format",
2586
2616
  abort: !1,
2587
- ...d(t)
2617
+ ...m(t)
2588
2618
  });
2589
2619
  }
2590
- function Gr(e, t) {
2620
+ function qr(e, t) {
2591
2621
  return new e({
2592
2622
  type: "string",
2593
2623
  format: "url",
2594
2624
  check: "string_format",
2595
2625
  abort: !1,
2596
- ...d(t)
2626
+ ...m(t)
2597
2627
  });
2598
2628
  }
2599
- function Kr(e, t) {
2629
+ function Xr(e, t) {
2600
2630
  return new e({
2601
2631
  type: "string",
2602
2632
  format: "ipv4",
2603
2633
  check: "string_format",
2604
2634
  abort: !1,
2605
- ...d(t)
2635
+ ...m(t)
2606
2636
  });
2607
2637
  }
2608
- function qr(e, t) {
2638
+ function Hr(e, t) {
2609
2639
  return new e({
2610
2640
  type: "string",
2611
2641
  format: "ipv6",
2612
2642
  check: "string_format",
2613
2643
  abort: !1,
2614
- ...d(t)
2644
+ ...m(t)
2615
2645
  });
2616
2646
  }
2617
- function Xr(e, t) {
2647
+ function Jr(e, t) {
2618
2648
  return new e({
2619
2649
  type: "string",
2620
2650
  format: "datetime",
@@ -2622,204 +2652,204 @@ function Xr(e, t) {
2622
2652
  offset: !1,
2623
2653
  local: !1,
2624
2654
  precision: null,
2625
- ...d(t)
2655
+ ...m(t)
2626
2656
  });
2627
2657
  }
2628
- function Hr(e, t) {
2658
+ function Qr(e, t) {
2629
2659
  return new e({
2630
2660
  type: "string",
2631
2661
  format: "date",
2632
2662
  check: "string_format",
2633
- ...d(t)
2663
+ ...m(t)
2634
2664
  });
2635
2665
  }
2636
- function Jr(e, t) {
2666
+ function eo(e, t) {
2637
2667
  return new e({
2638
2668
  type: "string",
2639
2669
  format: "time",
2640
2670
  check: "string_format",
2641
2671
  precision: null,
2642
- ...d(t)
2672
+ ...m(t)
2643
2673
  });
2644
2674
  }
2645
- function Qr(e, t) {
2675
+ function to(e, t) {
2646
2676
  return new e({
2647
2677
  type: "string",
2648
2678
  format: "duration",
2649
2679
  check: "string_format",
2650
- ...d(t)
2680
+ ...m(t)
2651
2681
  });
2652
2682
  }
2653
- function eo(e, t) {
2683
+ function no(e, t) {
2654
2684
  return new e({
2655
2685
  type: "number",
2656
2686
  checks: [],
2657
- ...d(t)
2687
+ ...m(t)
2658
2688
  });
2659
2689
  }
2660
- function to(e, t) {
2690
+ function ro(e, t) {
2661
2691
  return new e({
2662
2692
  type: "number",
2663
2693
  check: "number_format",
2664
2694
  abort: !1,
2665
2695
  format: "safeint",
2666
- ...d(t)
2696
+ ...m(t)
2667
2697
  });
2668
2698
  }
2669
- function no(e, t) {
2699
+ function oo(e, t) {
2670
2700
  return new e({
2671
2701
  type: "boolean",
2672
- ...d(t)
2702
+ ...m(t)
2673
2703
  });
2674
2704
  }
2675
- function ro(e) {
2705
+ function so(e) {
2676
2706
  return new e({
2677
2707
  type: "any"
2678
2708
  });
2679
2709
  }
2680
- function oo(e, t) {
2681
- return new sr({
2710
+ function io(e, t) {
2711
+ return new ar({
2682
2712
  check: "less_than",
2683
- ...d(t),
2713
+ ...m(t),
2684
2714
  value: e,
2685
2715
  inclusive: !0
2686
2716
  });
2687
2717
  }
2688
- function so(e, t) {
2689
- return new ir({
2718
+ function ao(e, t) {
2719
+ return new ur({
2690
2720
  check: "greater_than",
2691
- ...d(t),
2721
+ ...m(t),
2692
2722
  value: e,
2693
2723
  inclusive: !0
2694
2724
  });
2695
2725
  }
2696
- function ne(e, t) {
2697
- return new ur({
2726
+ function re(e, t) {
2727
+ return new lr({
2698
2728
  check: "max_length",
2699
- ...d(t),
2729
+ ...m(t),
2700
2730
  maximum: e
2701
2731
  });
2702
2732
  }
2703
- function R(e, t) {
2704
- return new cr({
2733
+ function x(e, t) {
2734
+ return new pr({
2705
2735
  check: "min_length",
2706
- ...d(t),
2736
+ ...m(t),
2707
2737
  minimum: e
2708
2738
  });
2709
2739
  }
2710
- function ft(e, t) {
2711
- return new lr({
2740
+ function bt(e, t) {
2741
+ return new dr({
2712
2742
  check: "length_equals",
2713
- ...d(t),
2743
+ ...m(t),
2714
2744
  length: e
2715
2745
  });
2716
2746
  }
2717
- function bt(e, t) {
2718
- return new pr({
2747
+ function yt(e, t) {
2748
+ return new mr({
2719
2749
  check: "string_format",
2720
2750
  format: "regex",
2721
- ...d(t),
2751
+ ...m(t),
2722
2752
  pattern: e
2723
2753
  });
2724
2754
  }
2725
- function io(e) {
2726
- return new dr({
2755
+ function uo(e) {
2756
+ return new hr({
2727
2757
  check: "string_format",
2728
2758
  format: "lowercase",
2729
- ...d(e)
2759
+ ...m(e)
2730
2760
  });
2731
2761
  }
2732
- function ao(e) {
2733
- return new mr({
2762
+ function co(e) {
2763
+ return new fr({
2734
2764
  check: "string_format",
2735
2765
  format: "uppercase",
2736
- ...d(e)
2766
+ ...m(e)
2737
2767
  });
2738
2768
  }
2739
- function uo(e, t) {
2740
- return new hr({
2769
+ function lo(e, t) {
2770
+ return new gr({
2741
2771
  check: "string_format",
2742
2772
  format: "includes",
2743
- ...d(t),
2773
+ ...m(t),
2744
2774
  includes: e
2745
2775
  });
2746
2776
  }
2747
- function co(e, t) {
2748
- return new fr({
2777
+ function po(e, t) {
2778
+ return new br({
2749
2779
  check: "string_format",
2750
2780
  format: "starts_with",
2751
- ...d(t),
2781
+ ...m(t),
2752
2782
  prefix: e
2753
2783
  });
2754
2784
  }
2755
- function lo(e, t) {
2756
- return new br({
2785
+ function mo(e, t) {
2786
+ return new yr({
2757
2787
  check: "string_format",
2758
2788
  format: "ends_with",
2759
- ...d(t),
2789
+ ...m(t),
2760
2790
  suffix: e
2761
2791
  });
2762
2792
  }
2763
- function x(e) {
2764
- return new gr({
2793
+ function F(e) {
2794
+ return new _r({
2765
2795
  check: "overwrite",
2766
2796
  tx: e
2767
2797
  });
2768
2798
  }
2769
- function po(e) {
2770
- return x((t) => t.normalize(e));
2771
- }
2772
- function mo() {
2773
- return x((e) => e.trim());
2774
- }
2775
- function ho() {
2776
- return x((e) => e.toLowerCase());
2799
+ function ho(e) {
2800
+ return F((t) => t.normalize(e));
2777
2801
  }
2778
2802
  function fo() {
2779
- return x((e) => e.toUpperCase());
2803
+ return F((e) => e.trim());
2804
+ }
2805
+ function go() {
2806
+ return F((e) => e.toLowerCase());
2780
2807
  }
2781
2808
  function bo() {
2782
- return x((e) => Zn(e));
2809
+ return F((e) => e.toUpperCase());
2810
+ }
2811
+ function yo() {
2812
+ return F((e) => Cn(e));
2783
2813
  }
2784
- function go(e, t, n) {
2814
+ function _o(e, t, n) {
2785
2815
  return new e({
2786
2816
  type: "array",
2787
2817
  element: t,
2788
2818
  // get element() {
2789
2819
  // return element;
2790
2820
  // },
2791
- ...d(n)
2821
+ ...m(n)
2792
2822
  });
2793
2823
  }
2794
- function gt(e, t, n) {
2824
+ function _t(e, t, n) {
2795
2825
  return new e({
2796
2826
  type: "custom",
2797
2827
  check: "custom",
2798
2828
  fn: t,
2799
- ...d(n)
2829
+ ...m(n)
2800
2830
  });
2801
2831
  }
2802
- function yt(e) {
2803
- const t = yo((n) => (n.addIssue = (r) => {
2832
+ function vt(e) {
2833
+ const t = vo((n) => (n.addIssue = (r) => {
2804
2834
  if (typeof r == "string")
2805
- n.issues.push(W(r, n.value, t._zod.def));
2835
+ n.issues.push(U(r, n.value, t._zod.def));
2806
2836
  else {
2807
2837
  const o = r;
2808
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(W(o));
2838
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(U(o));
2809
2839
  }
2810
2840
  }, e(n.value, n)));
2811
2841
  return t;
2812
2842
  }
2813
- function yo(e, t) {
2843
+ function vo(e, t) {
2814
2844
  const n = new S({
2815
2845
  check: "custom",
2816
- ...d(t)
2846
+ ...m(t)
2817
2847
  });
2818
2848
  return n._zod.check = e, n;
2819
2849
  }
2820
- function _o(e, t, n, r = {}) {
2821
- const o = d(r), s = {
2822
- ...d(r),
2850
+ function ko(e, t, n, r = {}) {
2851
+ const o = m(r), s = {
2852
+ ...m(r),
2823
2853
  check: "string_format",
2824
2854
  type: "string",
2825
2855
  format: t,
@@ -2828,38 +2858,38 @@ function _o(e, t, n, r = {}) {
2828
2858
  };
2829
2859
  return n instanceof RegExp && (s.pattern = n), new e(s);
2830
2860
  }
2831
- const vo = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
2832
- wr.init(e, t), re.init(e, t);
2833
- });
2834
- function ko(e) {
2835
- return Xr(vo, e);
2836
- }
2837
- const wo = /* @__PURE__ */ l("ZodISODate", (e, t) => {
2838
- Tr.init(e, t), re.init(e, t);
2861
+ const wo = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
2862
+ Ar.init(e, t), oe.init(e, t);
2839
2863
  });
2840
2864
  function To(e) {
2841
- return Hr(wo, e);
2865
+ return Jr(wo, e);
2842
2866
  }
2843
- const Ao = /* @__PURE__ */ l("ZodISOTime", (e, t) => {
2844
- Ar.init(e, t), re.init(e, t);
2867
+ const Ao = /* @__PURE__ */ l("ZodISODate", (e, t) => {
2868
+ Sr.init(e, t), oe.init(e, t);
2845
2869
  });
2846
2870
  function So(e) {
2847
- return Jr(Ao, e);
2871
+ return Qr(Ao, e);
2848
2872
  }
2849
- const zo = /* @__PURE__ */ l("ZodISODuration", (e, t) => {
2850
- Sr.init(e, t), re.init(e, t);
2873
+ const zo = /* @__PURE__ */ l("ZodISOTime", (e, t) => {
2874
+ zr.init(e, t), oe.init(e, t);
2851
2875
  });
2852
2876
  function Eo(e) {
2853
- return Qr(zo, e);
2877
+ return eo(zo, e);
2878
+ }
2879
+ const $o = /* @__PURE__ */ l("ZodISODuration", (e, t) => {
2880
+ Er.init(e, t), oe.init(e, t);
2881
+ });
2882
+ function Oo(e) {
2883
+ return to($o, e);
2854
2884
  }
2855
- const $o = (e, t) => {
2856
- st.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2885
+ const Zo = (e, t) => {
2886
+ at.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2857
2887
  format: {
2858
- value: (n) => Ln(e, n)
2888
+ value: (n) => Mn(e, n)
2859
2889
  // enumerable: false,
2860
2890
  },
2861
2891
  flatten: {
2862
- value: (n) => In(e, n)
2892
+ value: (n) => Dn(e, n)
2863
2893
  // enumerable: false,
2864
2894
  },
2865
2895
  addIssue: {
@@ -2881,175 +2911,175 @@ const $o = (e, t) => {
2881
2911
  // enumerable: false,
2882
2912
  }
2883
2913
  });
2884
- }, $ = l("ZodError", $o, {
2914
+ }, $ = l("ZodError", Zo, {
2885
2915
  Parent: Error
2886
- }), Oo = /* @__PURE__ */ H($), Zo = /* @__PURE__ */ J($), Po = /* @__PURE__ */ Q($), Co = /* @__PURE__ */ ee($), Io = /* @__PURE__ */ Nn($), Lo = /* @__PURE__ */ Rn($), Do = /* @__PURE__ */ xn($), Mo = /* @__PURE__ */ Fn($), No = /* @__PURE__ */ Wn($), Ro = /* @__PURE__ */ Un($), xo = /* @__PURE__ */ jn($), Fo = /* @__PURE__ */ Vn($), A = /* @__PURE__ */ l("ZodType", (e, t) => (_.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(On(t, {
2916
+ }), Po = /* @__PURE__ */ J($), Co = /* @__PURE__ */ Q($), Io = /* @__PURE__ */ ee($), Lo = /* @__PURE__ */ te($), Do = /* @__PURE__ */ Rn($), Mo = /* @__PURE__ */ Fn($), No = /* @__PURE__ */ Wn($), xo = /* @__PURE__ */ Un($), Ro = /* @__PURE__ */ jn($), Fo = /* @__PURE__ */ Vn($), Wo = /* @__PURE__ */ Bn($), Uo = /* @__PURE__ */ Yn($), A = /* @__PURE__ */ l("ZodType", (e, t) => (_.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Pn(t, {
2887
2917
  checks: [
2888
2918
  ...t.checks ?? [],
2889
2919
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2890
2920
  ]
2891
- })), e.clone = (n, r) => rt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Oo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Po(e, n, r), e.parseAsync = async (n, r) => Zo(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Co(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Io(e, n, r), e.decode = (n, r) => Lo(e, n, r), e.encodeAsync = async (n, r) => Do(e, n, r), e.decodeAsync = async (n, r) => Mo(e, n, r), e.safeEncode = (n, r) => No(e, n, r), e.safeDecode = (n, r) => Ro(e, n, r), e.safeEncodeAsync = async (n, r) => xo(e, n, r), e.safeDecodeAsync = async (n, r) => Fo(e, n, r), e.refine = (n, r) => e.check(ls(n, r)), e.superRefine = (n) => e.check(ps(n)), e.overwrite = (n) => e.check(x(n)), e.optional = () => xe(e), e.nullable = () => Fe(e), e.nullish = () => xe(Fe(e)), e.nonoptional = (n) => rs(e, n), e.array = () => jo(e), e.or = (n) => Bo([e, n]), e.and = (n) => Go(e, n), e.transform = (n) => We(e, qo(n)), e.default = (n) => Qo(e, n), e.prefault = (n) => ts(e, n), e.catch = (n) => ss(e, n), e.pipe = (n) => We(e, n), e.readonly = () => us(e), e.describe = (n) => {
2921
+ })), e.clone = (n, r) => st(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Po(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Io(e, n, r), e.parseAsync = async (n, r) => Co(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Lo(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Do(e, n, r), e.decode = (n, r) => Mo(e, n, r), e.encodeAsync = async (n, r) => No(e, n, r), e.decodeAsync = async (n, r) => xo(e, n, r), e.safeEncode = (n, r) => Ro(e, n, r), e.safeDecode = (n, r) => Fo(e, n, r), e.safeEncodeAsync = async (n, r) => Wo(e, n, r), e.safeDecodeAsync = async (n, r) => Uo(e, n, r), e.refine = (n, r) => e.check(ds(n, r)), e.superRefine = (n) => e.check(ms(n)), e.overwrite = (n) => e.check(F(n)), e.optional = () => Fe(e), e.nullable = () => We(e), e.nullish = () => Fe(We(e)), e.nonoptional = (n) => ss(e, n), e.array = () => Bo(e), e.or = (n) => Go([e, n]), e.and = (n) => qo(e, n), e.transform = (n) => Ue(e, Ho(n)), e.default = (n) => ts(e, n), e.prefault = (n) => rs(e, n), e.catch = (n) => as(e, n), e.pipe = (n) => Ue(e, n), e.readonly = () => ls(e), e.describe = (n) => {
2892
2922
  const r = e.clone();
2893
- return G.add(r, { description: n }), r;
2923
+ return K.add(r, { description: n }), r;
2894
2924
  }, Object.defineProperty(e, "description", {
2895
2925
  get() {
2896
- return G.get(e)?.description;
2926
+ return K.get(e)?.description;
2897
2927
  },
2898
2928
  configurable: !0
2899
2929
  }), e.meta = (...n) => {
2900
2930
  if (n.length === 0)
2901
- return G.get(e);
2931
+ return K.get(e);
2902
2932
  const r = e.clone();
2903
- return G.add(r, n[0]), r;
2904
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Wo = /* @__PURE__ */ l("_ZodString", (e, t) => {
2905
- ye.init(e, t), A.init(e, t);
2933
+ return K.add(r, n[0]), r;
2934
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), jo = /* @__PURE__ */ l("_ZodString", (e, t) => {
2935
+ _e.init(e, t), A.init(e, t);
2906
2936
  const n = e._zod.bag;
2907
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(bt(...r)), e.includes = (...r) => e.check(uo(...r)), e.startsWith = (...r) => e.check(co(...r)), e.endsWith = (...r) => e.check(lo(...r)), e.min = (...r) => e.check(R(...r)), e.max = (...r) => e.check(ne(...r)), e.length = (...r) => e.check(ft(...r)), e.nonempty = (...r) => e.check(R(1, ...r)), e.lowercase = (r) => e.check(io(r)), e.uppercase = (r) => e.check(ao(r)), e.trim = () => e.check(mo()), e.normalize = (...r) => e.check(po(...r)), e.toLowerCase = () => e.check(ho()), e.toUpperCase = () => e.check(fo()), e.slugify = () => e.check(bo());
2908
- }), re = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
2909
- E.init(e, t), Wo.init(e, t);
2910
- }), Uo = /* @__PURE__ */ l("ZodArray", (e, t) => {
2911
- dt.init(e, t), A.init(e, t), e.element = t.element, e.min = (n, r) => e.check(R(n, r)), e.nonempty = (n) => e.check(R(1, n)), e.max = (n, r) => e.check(ne(n, r)), e.length = (n, r) => e.check(ft(n, r)), e.unwrap = () => e.element;
2937
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(yt(...r)), e.includes = (...r) => e.check(lo(...r)), e.startsWith = (...r) => e.check(po(...r)), e.endsWith = (...r) => e.check(mo(...r)), e.min = (...r) => e.check(x(...r)), e.max = (...r) => e.check(re(...r)), e.length = (...r) => e.check(bt(...r)), e.nonempty = (...r) => e.check(x(1, ...r)), e.lowercase = (r) => e.check(uo(r)), e.uppercase = (r) => e.check(co(r)), e.trim = () => e.check(fo()), e.normalize = (...r) => e.check(ho(...r)), e.toLowerCase = () => e.check(go()), e.toUpperCase = () => e.check(bo()), e.slugify = () => e.check(yo());
2938
+ }), oe = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
2939
+ E.init(e, t), jo.init(e, t);
2940
+ }), Vo = /* @__PURE__ */ l("ZodArray", (e, t) => {
2941
+ ht.init(e, t), A.init(e, t), e.element = t.element, e.min = (n, r) => e.check(x(n, r)), e.nonempty = (n) => e.check(x(1, n)), e.max = (n, r) => e.check(re(n, r)), e.length = (n, r) => e.check(bt(n, r)), e.unwrap = () => e.element;
2912
2942
  });
2913
- function jo(e, t) {
2914
- return go(Uo, e, t);
2943
+ function Bo(e, t) {
2944
+ return _o(Vo, e, t);
2915
2945
  }
2916
- const Vo = /* @__PURE__ */ l("ZodUnion", (e, t) => {
2917
- Cr.init(e, t), A.init(e, t), e.options = t.options;
2946
+ const Yo = /* @__PURE__ */ l("ZodUnion", (e, t) => {
2947
+ Lr.init(e, t), A.init(e, t), e.options = t.options;
2918
2948
  });
2919
- function Bo(e, t) {
2920
- return new Vo({
2949
+ function Go(e, t) {
2950
+ return new Yo({
2921
2951
  type: "union",
2922
2952
  options: e,
2923
- ...d(t)
2953
+ ...m(t)
2924
2954
  });
2925
2955
  }
2926
- const Yo = /* @__PURE__ */ l("ZodIntersection", (e, t) => {
2927
- Ir.init(e, t), A.init(e, t);
2956
+ const Ko = /* @__PURE__ */ l("ZodIntersection", (e, t) => {
2957
+ Dr.init(e, t), A.init(e, t);
2928
2958
  });
2929
- function Go(e, t) {
2930
- return new Yo({
2959
+ function qo(e, t) {
2960
+ return new Ko({
2931
2961
  type: "intersection",
2932
2962
  left: e,
2933
2963
  right: t
2934
2964
  });
2935
2965
  }
2936
- const Ko = /* @__PURE__ */ l("ZodTransform", (e, t) => {
2937
- Lr.init(e, t), A.init(e, t), e._zod.parse = (n, r) => {
2966
+ const Xo = /* @__PURE__ */ l("ZodTransform", (e, t) => {
2967
+ Mr.init(e, t), A.init(e, t), e._zod.parse = (n, r) => {
2938
2968
  if (r.direction === "backward")
2939
- throw new et(e.constructor.name);
2969
+ throw new nt(e.constructor.name);
2940
2970
  n.addIssue = (s) => {
2941
2971
  if (typeof s == "string")
2942
- n.issues.push(W(s, n.value, t));
2972
+ n.issues.push(U(s, n.value, t));
2943
2973
  else {
2944
2974
  const i = s;
2945
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(W(i));
2975
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(U(i));
2946
2976
  }
2947
2977
  };
2948
2978
  const o = t.transform(n.value, n);
2949
2979
  return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
2950
2980
  };
2951
2981
  });
2952
- function qo(e) {
2953
- return new Ko({
2982
+ function Ho(e) {
2983
+ return new Xo({
2954
2984
  type: "transform",
2955
2985
  transform: e
2956
2986
  });
2957
2987
  }
2958
- const Xo = /* @__PURE__ */ l("ZodOptional", (e, t) => {
2959
- mt.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2988
+ const Jo = /* @__PURE__ */ l("ZodOptional", (e, t) => {
2989
+ ft.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2960
2990
  });
2961
- function xe(e) {
2962
- return new Xo({
2991
+ function Fe(e) {
2992
+ return new Jo({
2963
2993
  type: "optional",
2964
2994
  innerType: e
2965
2995
  });
2966
2996
  }
2967
- const Ho = /* @__PURE__ */ l("ZodNullable", (e, t) => {
2968
- Dr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2997
+ const Qo = /* @__PURE__ */ l("ZodNullable", (e, t) => {
2998
+ Nr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2969
2999
  });
2970
- function Fe(e) {
2971
- return new Ho({
3000
+ function We(e) {
3001
+ return new Qo({
2972
3002
  type: "nullable",
2973
3003
  innerType: e
2974
3004
  });
2975
3005
  }
2976
- const Jo = /* @__PURE__ */ l("ZodDefault", (e, t) => {
2977
- Mr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3006
+ const es = /* @__PURE__ */ l("ZodDefault", (e, t) => {
3007
+ xr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2978
3008
  });
2979
- function Qo(e, t) {
2980
- return new Jo({
3009
+ function ts(e, t) {
3010
+ return new es({
2981
3011
  type: "default",
2982
3012
  innerType: e,
2983
3013
  get defaultValue() {
2984
- return typeof t == "function" ? t() : nt(t);
3014
+ return typeof t == "function" ? t() : ot(t);
2985
3015
  }
2986
3016
  });
2987
3017
  }
2988
- const es = /* @__PURE__ */ l("ZodPrefault", (e, t) => {
2989
- Nr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3018
+ const ns = /* @__PURE__ */ l("ZodPrefault", (e, t) => {
3019
+ Rr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2990
3020
  });
2991
- function ts(e, t) {
2992
- return new es({
3021
+ function rs(e, t) {
3022
+ return new ns({
2993
3023
  type: "prefault",
2994
3024
  innerType: e,
2995
3025
  get defaultValue() {
2996
- return typeof t == "function" ? t() : nt(t);
3026
+ return typeof t == "function" ? t() : ot(t);
2997
3027
  }
2998
3028
  });
2999
3029
  }
3000
- const ns = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
3001
- Rr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3030
+ const os = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
3031
+ Fr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3002
3032
  });
3003
- function rs(e, t) {
3004
- return new ns({
3033
+ function ss(e, t) {
3034
+ return new os({
3005
3035
  type: "nonoptional",
3006
3036
  innerType: e,
3007
- ...d(t)
3037
+ ...m(t)
3008
3038
  });
3009
3039
  }
3010
- const os = /* @__PURE__ */ l("ZodCatch", (e, t) => {
3011
- xr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3040
+ const is = /* @__PURE__ */ l("ZodCatch", (e, t) => {
3041
+ Wr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3012
3042
  });
3013
- function ss(e, t) {
3014
- return new os({
3043
+ function as(e, t) {
3044
+ return new is({
3015
3045
  type: "catch",
3016
3046
  innerType: e,
3017
3047
  catchValue: typeof t == "function" ? t : () => t
3018
3048
  });
3019
3049
  }
3020
- const is = /* @__PURE__ */ l("ZodPipe", (e, t) => {
3021
- Fr.init(e, t), A.init(e, t), e.in = t.in, e.out = t.out;
3050
+ const us = /* @__PURE__ */ l("ZodPipe", (e, t) => {
3051
+ Ur.init(e, t), A.init(e, t), e.in = t.in, e.out = t.out;
3022
3052
  });
3023
- function We(e, t) {
3024
- return new is({
3053
+ function Ue(e, t) {
3054
+ return new us({
3025
3055
  type: "pipe",
3026
3056
  in: e,
3027
3057
  out: t
3028
3058
  // ...util.normalizeParams(params),
3029
3059
  });
3030
3060
  }
3031
- const as = /* @__PURE__ */ l("ZodReadonly", (e, t) => {
3032
- Wr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3061
+ const cs = /* @__PURE__ */ l("ZodReadonly", (e, t) => {
3062
+ jr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3033
3063
  });
3034
- function us(e) {
3035
- return new as({
3064
+ function ls(e) {
3065
+ return new cs({
3036
3066
  type: "readonly",
3037
3067
  innerType: e
3038
3068
  });
3039
3069
  }
3040
- const cs = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3041
- ht.init(e, t), A.init(e, t);
3070
+ const ps = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3071
+ gt.init(e, t), A.init(e, t);
3042
3072
  });
3043
- function ls(e, t = {}) {
3044
- return gt(cs, e, t);
3073
+ function ds(e, t = {}) {
3074
+ return _t(ps, e, t);
3045
3075
  }
3046
- function ps(e) {
3047
- return yt(e);
3076
+ function ms(e) {
3077
+ return vt(e);
3048
3078
  }
3049
3079
  const D = /* @__PURE__ */ l("ZodMiniType", (e, t) => {
3050
3080
  if (!e._zod)
3051
3081
  throw new Error("Uninitialized schema in ZodMiniType.");
3052
- _.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Dn(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => it(e, n, r), e.parseAsync = async (n, r) => Mn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => at(e, n, r), e.check = (...n) => e.clone(
3082
+ _.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Nn(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ut(e, n, r), e.parseAsync = async (n, r) => xn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ct(e, n, r), e.check = (...n) => e.clone(
3053
3083
  {
3054
3084
  ...t,
3055
3085
  checks: [
@@ -3058,182 +3088,182 @@ const D = /* @__PURE__ */ l("ZodMiniType", (e, t) => {
3058
3088
  ]
3059
3089
  }
3060
3090
  // { parent: true }
3061
- ), e.clone = (n, r) => rt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e));
3062
- }), _t = /* @__PURE__ */ l("ZodMiniString", (e, t) => {
3063
- ye.init(e, t), D.init(e, t);
3064
- });
3065
- function Ue(e) {
3066
- return Vr(_t, e);
3067
- }
3068
- const F = /* @__PURE__ */ l("ZodMiniStringFormat", (e, t) => {
3069
- E.init(e, t), _t.init(e, t);
3070
- }), ds = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3071
- vr.init(e, t), F.init(e, t);
3091
+ ), e.clone = (n, r) => st(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e));
3092
+ }), kt = /* @__PURE__ */ l("ZodMiniString", (e, t) => {
3093
+ _e.init(e, t), D.init(e, t);
3072
3094
  });
3073
- function ms(e) {
3074
- return Br(ds, e);
3095
+ function je(e) {
3096
+ return Yr(kt, e);
3075
3097
  }
3076
- const hs = /* @__PURE__ */ l("ZodMiniUUID", (e, t) => {
3077
- _r.init(e, t), F.init(e, t);
3098
+ const W = /* @__PURE__ */ l("ZodMiniStringFormat", (e, t) => {
3099
+ E.init(e, t), kt.init(e, t);
3100
+ }), hs = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3101
+ wr.init(e, t), W.init(e, t);
3078
3102
  });
3079
3103
  function fs(e) {
3080
- return Yr(hs, e);
3104
+ return Gr(hs, e);
3081
3105
  }
3082
- const bs = /* @__PURE__ */ l("ZodMiniURL", (e, t) => {
3083
- kr.init(e, t), F.init(e, t);
3106
+ const gs = /* @__PURE__ */ l("ZodMiniUUID", (e, t) => {
3107
+ kr.init(e, t), W.init(e, t);
3084
3108
  });
3085
- function gs(e) {
3086
- return Gr(bs, e);
3109
+ function bs(e) {
3110
+ return Kr(gs, e);
3087
3111
  }
3088
- const ys = /* @__PURE__ */ l("ZodMiniIPv4", (e, t) => {
3089
- zr.init(e, t), F.init(e, t);
3112
+ const ys = /* @__PURE__ */ l("ZodMiniURL", (e, t) => {
3113
+ Tr.init(e, t), W.init(e, t);
3090
3114
  });
3091
3115
  function _s(e) {
3092
- return Kr(ys, e);
3116
+ return qr(ys, e);
3093
3117
  }
3094
- const vs = /* @__PURE__ */ l("ZodMiniIPv6", (e, t) => {
3095
- Er.init(e, t), F.init(e, t);
3118
+ const vs = /* @__PURE__ */ l("ZodMiniIPv4", (e, t) => {
3119
+ $r.init(e, t), W.init(e, t);
3096
3120
  });
3097
3121
  function ks(e) {
3098
- return qr(vs, e);
3122
+ return Xr(vs, e);
3099
3123
  }
3100
- const ws = /* @__PURE__ */ l("ZodMiniCustomStringFormat", (e, t) => {
3101
- $r.init(e, t), F.init(e, t);
3124
+ const ws = /* @__PURE__ */ l("ZodMiniIPv6", (e, t) => {
3125
+ Or.init(e, t), W.init(e, t);
3102
3126
  });
3103
3127
  function Ts(e) {
3104
- return _o(ws, "hostname", qn, e);
3105
- }
3106
- const vt = /* @__PURE__ */ l("ZodMiniNumber", (e, t) => {
3107
- pt.init(e, t), D.init(e, t);
3108
- });
3109
- function je(e) {
3110
- return eo(vt, e);
3128
+ return Hr(ws, e);
3111
3129
  }
3112
- const As = /* @__PURE__ */ l("ZodMiniNumberFormat", (e, t) => {
3113
- Or.init(e, t), vt.init(e, t);
3130
+ const As = /* @__PURE__ */ l("ZodMiniCustomStringFormat", (e, t) => {
3131
+ Zr.init(e, t), W.init(e, t);
3114
3132
  });
3115
3133
  function Ss(e) {
3116
- return to(As, e);
3134
+ return ko(As, "hostname", Hn, e);
3117
3135
  }
3118
- const zs = /* @__PURE__ */ l("ZodMiniBoolean", (e, t) => {
3119
- Zr.init(e, t), D.init(e, t);
3136
+ const wt = /* @__PURE__ */ l("ZodMiniNumber", (e, t) => {
3137
+ mt.init(e, t), D.init(e, t);
3120
3138
  });
3121
3139
  function Ve(e) {
3122
- return no(zs, e);
3140
+ return no(wt, e);
3141
+ }
3142
+ const zs = /* @__PURE__ */ l("ZodMiniNumberFormat", (e, t) => {
3143
+ Pr.init(e, t), wt.init(e, t);
3144
+ });
3145
+ function Es(e) {
3146
+ return ro(zs, e);
3123
3147
  }
3124
- const Es = /* @__PURE__ */ l("ZodMiniAny", (e, t) => {
3125
- Pr.init(e, t), D.init(e, t);
3148
+ const $s = /* @__PURE__ */ l("ZodMiniBoolean", (e, t) => {
3149
+ Cr.init(e, t), D.init(e, t);
3150
+ });
3151
+ function Be(e) {
3152
+ return oo($s, e);
3153
+ }
3154
+ const Os = /* @__PURE__ */ l("ZodMiniAny", (e, t) => {
3155
+ Ir.init(e, t), D.init(e, t);
3126
3156
  });
3127
3157
  function pe() {
3128
- return ro(Es);
3158
+ return so(Os);
3129
3159
  }
3130
- const $s = /* @__PURE__ */ l("ZodMiniArray", (e, t) => {
3131
- dt.init(e, t), D.init(e, t);
3160
+ const Zs = /* @__PURE__ */ l("ZodMiniArray", (e, t) => {
3161
+ ht.init(e, t), D.init(e, t);
3132
3162
  });
3133
- function Be(e, t) {
3134
- return new $s({
3163
+ function Ye(e, t) {
3164
+ return new Zs({
3135
3165
  type: "array",
3136
3166
  element: e,
3137
- ...d(t)
3167
+ ...m(t)
3138
3168
  });
3139
3169
  }
3140
- const Os = /* @__PURE__ */ l("ZodMiniOptional", (e, t) => {
3141
- mt.init(e, t), D.init(e, t);
3170
+ const Ps = /* @__PURE__ */ l("ZodMiniOptional", (e, t) => {
3171
+ ft.init(e, t), D.init(e, t);
3142
3172
  });
3143
- function Zs(e) {
3144
- return new Os({
3173
+ function Cs(e) {
3174
+ return new Ps({
3145
3175
  type: "optional",
3146
3176
  innerType: e
3147
3177
  });
3148
3178
  }
3149
- const Ps = /* @__PURE__ */ l("ZodMiniCustom", (e, t) => {
3150
- ht.init(e, t), D.init(e, t);
3179
+ const Is = /* @__PURE__ */ l("ZodMiniCustom", (e, t) => {
3180
+ gt.init(e, t), D.init(e, t);
3151
3181
  });
3152
3182
  function k(e, t = {}) {
3153
- return gt(Ps, e, t);
3183
+ return _t(Is, e, t);
3154
3184
  }
3155
- function kt(e) {
3156
- return yt(e);
3185
+ function Tt(e) {
3186
+ return vt(e);
3157
3187
  }
3158
3188
  const de = {
3159
- email: { schema: ms() },
3160
- hostname: { schema: Ts() },
3161
- ipv4: { schema: _s() },
3162
- ipv6: { schema: ks() },
3163
- url: { schema: gs() },
3164
- uuid: { schema: fs() },
3165
- date: { schema: To() },
3166
- time: { schema: So() },
3167
- "date-time": { schema: ko() },
3168
- duration: { schema: Eo() }
3169
- }, Cs = Object.keys(de), Is = (e) => (t, n) => {
3189
+ email: { schema: fs() },
3190
+ hostname: { schema: Ss() },
3191
+ ipv4: { schema: ks() },
3192
+ ipv6: { schema: Ts() },
3193
+ url: { schema: _s() },
3194
+ uuid: { schema: bs() },
3195
+ date: { schema: So() },
3196
+ time: { schema: Eo() },
3197
+ "date-time": { schema: To() },
3198
+ duration: { schema: Oo() }
3199
+ }, Ls = Object.keys(de), Ds = (e) => (t, n) => {
3170
3200
  switch (t.type) {
3171
3201
  case "string":
3172
- return Ls(t, n);
3202
+ return Ms(t, n);
3173
3203
  case "integer":
3174
3204
  case "number":
3175
- return Ms(t, n);
3205
+ return xs(t, n);
3176
3206
  case "boolean":
3177
- return Ns(t, n);
3178
- case "array":
3179
3207
  return Rs(t, n);
3208
+ case "array":
3209
+ return Fs(t, n);
3180
3210
  case "custom": {
3181
3211
  if (!e)
3182
3212
  throw new Error(
3183
3213
  'Validator type "custom" requires a customValidators object, but it was not supplied.'
3184
3214
  );
3185
- return xs(t, e);
3215
+ return Ws(t, e);
3186
3216
  }
3187
3217
  }
3188
3218
  };
3189
- function g(e, t) {
3219
+ function b(e, t) {
3190
3220
  if (e !== void 0)
3191
3221
  return typeof e == "string" ? e : t?.translate(e.key, e.params, e.default) ?? e.default;
3192
3222
  }
3193
- function Ls(e, t) {
3223
+ function Ms(e, t) {
3194
3224
  return j(e, (n) => {
3195
- const r = g(n.messages?.invalid, t);
3196
- let o = r ? Ue(r) : Ue();
3225
+ const r = b(n.messages?.invalid, t);
3226
+ let o = r ? je(r) : je();
3197
3227
  if (n.required === !0) {
3198
- const s = g(n.messages?.required, t) ?? "This field is required";
3228
+ const s = b(n.messages?.required, t) ?? "This field is required";
3199
3229
  o = o.check(k((i) => i.length > 0, { error: s }));
3200
3230
  }
3201
3231
  if (typeof n.minLength == "number") {
3202
- const s = g(n.messages?.minLength, t), i = n.minLength;
3232
+ const s = b(n.messages?.minLength, t), i = n.minLength;
3203
3233
  o = o.check(
3204
- s ? k((a) => a.length >= i, { error: s }) : R(i)
3234
+ s ? k((a) => a.length >= i, { error: s }) : x(i)
3205
3235
  );
3206
3236
  }
3207
3237
  if (typeof n.maxLength == "number") {
3208
- const s = g(n.messages?.maxLength, t), i = n.maxLength;
3238
+ const s = b(n.messages?.maxLength, t), i = n.maxLength;
3209
3239
  o = o.check(
3210
- s ? k((a) => a.length <= i, { error: s }) : ne(i)
3240
+ s ? k((a) => a.length <= i, { error: s }) : re(i)
3211
3241
  );
3212
3242
  }
3213
3243
  if (typeof n.pattern == "string") {
3214
- const s = g(n.messages?.pattern, t), i = new RegExp(n.pattern);
3244
+ const s = b(n.messages?.pattern, t), i = new RegExp(n.pattern);
3215
3245
  o = o.check(
3216
- s ? k((a) => i.test(a), { error: s }) : bt(i)
3246
+ s ? k((a) => i.test(a), { error: s }) : yt(i)
3217
3247
  );
3218
3248
  }
3219
3249
  if (n.enum) {
3220
- const s = n.enum, i = g(n.messages?.enum, t);
3250
+ const s = n.enum, i = b(n.messages?.enum, t);
3221
3251
  o = o.check(k((a) => s.includes(a), i ? { error: i } : void 0));
3222
3252
  }
3223
3253
  if (n.const !== void 0) {
3224
- const s = g(n.messages?.const, t);
3254
+ const s = b(n.messages?.const, t);
3225
3255
  o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3226
3256
  }
3227
3257
  if (n.format !== void 0)
3228
- if (Cs.includes(n.format)) {
3229
- const s = g(n.messages?.format, t);
3258
+ if (Ls.includes(n.format)) {
3259
+ const s = b(n.messages?.format, t);
3230
3260
  o = o.check(
3231
- s ? kt((i, a) => {
3232
- const u = Ye(
3261
+ s ? Tt((i, a) => {
3262
+ const u = Ge(
3233
3263
  de[n.format].schema,
3234
3264
  i
3235
3265
  );
3236
- Ge(u) || a.addIssue({ code: "custom", path: [], message: s });
3266
+ Ke(u) || a.addIssue({ code: "custom", path: [], message: s });
3237
3267
  }) : de[n.format].schema
3238
3268
  );
3239
3269
  } else
@@ -3241,104 +3271,104 @@ function Ls(e, t) {
3241
3271
  return o;
3242
3272
  });
3243
3273
  }
3244
- const Ds = (e, t) => {
3274
+ const Ns = (e, t) => {
3245
3275
  if (t === 0)
3246
3276
  return !1;
3247
3277
  const n = e / t;
3248
3278
  return Math.abs(n - Math.round(n)) < 1e-10;
3249
3279
  };
3250
- function Ms(e, t) {
3280
+ function xs(e, t) {
3251
3281
  return j(e, (n) => {
3252
- const r = g(n.messages?.invalid, t);
3253
- let o = r ? je(r) : je();
3254
- if (n.type === "integer" && (o = o.check(Ss())), n.minimum !== void 0) {
3255
- const s = g(n.messages?.minimum, t), i = n.minimum;
3256
- o = o.check(s ? k((a) => a >= i, { error: s }) : so(i));
3282
+ const r = b(n.messages?.invalid, t);
3283
+ let o = r ? Ve(r) : Ve();
3284
+ if (n.type === "integer" && (o = o.check(Es())), n.minimum !== void 0) {
3285
+ const s = b(n.messages?.minimum, t), i = n.minimum;
3286
+ o = o.check(s ? k((a) => a >= i, { error: s }) : ao(i));
3257
3287
  }
3258
3288
  if (n.maximum !== void 0) {
3259
- const s = g(n.messages?.maximum, t), i = n.maximum;
3260
- o = o.check(s ? k((a) => a <= i, { error: s }) : oo(i));
3289
+ const s = b(n.messages?.maximum, t), i = n.maximum;
3290
+ o = o.check(s ? k((a) => a <= i, { error: s }) : io(i));
3261
3291
  }
3262
3292
  if (n.exclusiveMinimum !== void 0) {
3263
- const s = g(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3293
+ const s = b(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3264
3294
  o = o.check(k((a) => a > i, s ? { error: s } : void 0));
3265
3295
  }
3266
3296
  if (n.exclusiveMaximum !== void 0) {
3267
- const s = g(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3297
+ const s = b(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3268
3298
  o = o.check(k((a) => a < i, s ? { error: s } : void 0));
3269
3299
  }
3270
3300
  if (n.multipleOf !== void 0) {
3271
- const s = g(n.messages?.multipleOf, t), i = n.multipleOf;
3301
+ const s = b(n.messages?.multipleOf, t), i = n.multipleOf;
3272
3302
  o = o.check(
3273
- k((a) => Ds(a, i), s ? { error: s } : void 0)
3303
+ k((a) => Ns(a, i), s ? { error: s } : void 0)
3274
3304
  );
3275
3305
  }
3276
3306
  if (n.enum) {
3277
- const s = n.enum, i = g(n.messages?.enum, t);
3307
+ const s = n.enum, i = b(n.messages?.enum, t);
3278
3308
  o = o.check(k((a) => s.includes(a), i ? { error: i } : void 0));
3279
3309
  }
3280
3310
  if (n.const !== void 0) {
3281
- const s = g(n.messages?.const, t);
3311
+ const s = b(n.messages?.const, t);
3282
3312
  o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3283
3313
  }
3284
3314
  return o;
3285
3315
  });
3286
3316
  }
3287
- function Ns(e, t) {
3317
+ function Rs(e, t) {
3288
3318
  return j(e, (n) => {
3289
- const r = g(n.messages?.invalid, t);
3290
- let o = r ? Ve(r) : Ve();
3319
+ const r = b(n.messages?.invalid, t);
3320
+ let o = r ? Be(r) : Be();
3291
3321
  if (n.const !== void 0) {
3292
- const s = g(n.messages?.const, t);
3322
+ const s = b(n.messages?.const, t);
3293
3323
  o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3294
3324
  }
3295
3325
  return o;
3296
3326
  });
3297
3327
  }
3298
- function Rs(e, t) {
3328
+ function Fs(e, t) {
3299
3329
  return j(e, (n) => {
3300
- const r = g(n.messages?.invalid, t);
3301
- let o = r ? Be(pe(), r) : Be(pe());
3330
+ const r = b(n.messages?.invalid, t);
3331
+ let o = r ? Ye(pe(), r) : Ye(pe());
3302
3332
  if (n.required === !0) {
3303
- const s = g(n.messages?.required, t) ?? "This field is required";
3333
+ const s = b(n.messages?.required, t) ?? "This field is required";
3304
3334
  o = o.check(k((i) => i.length > 0, { error: s }));
3305
3335
  }
3306
3336
  if (typeof n.minItems == "number") {
3307
- const s = g(n.messages?.minItems, t), i = n.minItems;
3337
+ const s = b(n.messages?.minItems, t), i = n.minItems;
3308
3338
  o = o.check(
3309
- s ? k((a) => a.length >= i, { error: s }) : R(i)
3339
+ s ? k((a) => a.length >= i, { error: s }) : x(i)
3310
3340
  );
3311
3341
  }
3312
3342
  if (typeof n.maxItems == "number") {
3313
- const s = g(n.messages?.maxItems, t), i = n.maxItems;
3343
+ const s = b(n.messages?.maxItems, t), i = n.maxItems;
3314
3344
  o = o.check(
3315
- s ? k((a) => a.length <= i, { error: s }) : ne(i)
3345
+ s ? k((a) => a.length <= i, { error: s }) : re(i)
3316
3346
  );
3317
3347
  }
3318
3348
  return o;
3319
3349
  });
3320
3350
  }
3321
- function xs(e, t) {
3351
+ function Ws(e, t) {
3322
3352
  return j(e, (n) => {
3323
3353
  let r = pe();
3324
- return At(
3354
+ return zt(
3325
3355
  Object.keys(n),
3326
3356
  // filter non-custom validator keys
3327
3357
  (o) => o !== "type" && o !== "required",
3328
3358
  (o) => {
3329
3359
  const s = n[o], i = t[o], a = i(s);
3330
3360
  r = r.check(
3331
- kt((u, c) => {
3332
- const p = Ye(
3361
+ Tt((u, c) => {
3362
+ const p = Ge(
3333
3363
  a,
3334
3364
  u
3335
3365
  );
3336
- if (!Ge(p)) {
3337
- const m = p.issues[0];
3366
+ if (!Ke(p)) {
3367
+ const d = p.issues[0];
3338
3368
  c.addIssue({
3339
3369
  code: "custom",
3340
3370
  path: [],
3341
- message: m?.message || `Validation failed for ${o}`
3371
+ message: d?.message || `Validation failed for ${o}`
3342
3372
  });
3343
3373
  }
3344
3374
  })
@@ -3349,9 +3379,9 @@ function xs(e, t) {
3349
3379
  }
3350
3380
  function j(e, t) {
3351
3381
  const n = t(e);
3352
- return e.required ? n : Zs(n);
3382
+ return e.required ? n : Cs(n);
3353
3383
  }
3354
- const Fs = {
3384
+ const Us = {
3355
3385
  // ACTION
3356
3386
  button: async () => (await import("./button.element-3a7rRHbA.js")).ButtonElement,
3357
3387
  // INPUTS
@@ -3386,12 +3416,12 @@ const Fs = {
3386
3416
  markdownText: async () => (await import("./markdown-text.element-B8TfVLIO.js")).MarkdownTextElement,
3387
3417
  renderer: async () => (await import("./renderer.element-CNyMn2Lu.js")).RendererElement
3388
3418
  };
3389
- var Ws = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, oe = (e, t, n, r) => {
3390
- for (var o = r > 1 ? void 0 : r ? Us(t, n) : t, s = e.length - 1, i; s >= 0; s--)
3419
+ var js = Object.defineProperty, Vs = Object.getOwnPropertyDescriptor, V = (e, t, n, r) => {
3420
+ for (var o = r > 1 ? void 0 : r ? Vs(t, n) : t, s = e.length - 1, i; s >= 0; s--)
3391
3421
  (i = e[s]) && (o = (r ? i(t, n, o) : i(o)) || o);
3392
- return r && o && Ws(t, n, o), o;
3422
+ return r && o && js(t, n, o), o;
3393
3423
  };
3394
- let U = class extends St {
3424
+ let R = class extends Et {
3395
3425
  constructor() {
3396
3426
  super(...arguments), this.autocomplete = void 0;
3397
3427
  }
@@ -3405,10 +3435,10 @@ let U = class extends St {
3405
3435
  return this;
3406
3436
  }
3407
3437
  render() {
3408
- const e = this.config, t = En(e.formDef, e.formSelectors, e.formConfig), n = {
3438
+ const e = this.config, t = On(e.formDef, e.formSelectors, e.formConfig), n = {
3409
3439
  formDef: t.formDef,
3410
3440
  widgetLoaders: {
3411
- ...Fs,
3441
+ ...Us,
3412
3442
  ...t.widgetLoaders,
3413
3443
  ...e.customWidgetLoaders ?? {}
3414
3444
  },
@@ -3423,32 +3453,36 @@ let U = class extends St {
3423
3453
  data: e.data,
3424
3454
  meta: e.meta,
3425
3455
  formName: e.formName
3426
- }, r = Is({
3456
+ }, r = Ds({
3427
3457
  ...e.customValidators ?? {}
3428
3458
  }), o = t.formEvent, s = o ? (i) => o(i.detail) : void 0;
3429
- return zt`
3459
+ return $t`
3430
3460
  <gui-core-form
3431
3461
  .config=${n}
3432
3462
  .validators=${r}
3433
3463
  .autocomplete=${this.autocomplete}
3464
+ .formHealthBoundary=${this.formHealthBoundary}
3434
3465
  @formEvent=${s}
3435
3466
  ></gui-core-form>
3436
3467
  `;
3437
3468
  }
3438
3469
  };
3439
- oe([
3440
- Ke({ attribute: !1 })
3441
- ], U.prototype, "config", 2);
3442
- oe([
3443
- Ke({ type: String })
3444
- ], U.prototype, "autocomplete", 2);
3445
- oe([
3446
- Et("gui-core-form")
3447
- ], U.prototype, "coreForm", 2);
3448
- U = oe([
3449
- $t("gui-form")
3450
- ], U);
3470
+ V([
3471
+ me({ attribute: !1 })
3472
+ ], R.prototype, "config", 2);
3473
+ V([
3474
+ me({ type: String })
3475
+ ], R.prototype, "autocomplete", 2);
3476
+ V([
3477
+ me({ attribute: !1 })
3478
+ ], R.prototype, "formHealthBoundary", 2);
3479
+ V([
3480
+ Ot("gui-core-form")
3481
+ ], R.prototype, "coreForm", 2);
3482
+ R = V([
3483
+ Zt("gui-form")
3484
+ ], R);
3451
3485
  export {
3452
- U as FormElement,
3453
- Fs as widgetLoaders
3486
+ R as FormElement,
3487
+ Us as widgetLoaders
3454
3488
  };