@arudovwen/form-builder-react 1.5.7 → 1.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { jsx as n, Fragment as ti, jsxs as b } from "react/jsx-runtime";
2
- import si, { createContext as ae, useState as P, useMemo as $, useEffect as R, forwardRef as In, createElement as _i, Fragment as wi, useContext as mi, useRef as hi, useCallback as Z, memo as Oi } from "react";
1
+ import { jsx as n, Fragment as ti, jsxs as v } from "react/jsx-runtime";
2
+ import si, { createContext as ae, useState as P, useMemo as $, useEffect as I, forwardRef as In, createElement as _i, Fragment as wi, useContext as bi, useRef as mi, useCallback as Z, memo as Oi } from "react";
3
3
  import { v4 as ri } from "uuid";
4
4
  import se from "react-datepicker";
5
5
  import { Listbox as ii, Transition as yi, Combobox as Ai, ComboboxInput as le, ComboboxButton as de, ComboboxOptions as ue, ComboboxOption as ce } from "@headlessui/react";
6
- import { toast as vi, Toaster as Dn } from "sonner";
6
+ import { toast as hi, Toaster as Dn } from "sonner";
7
7
  import xi from "axios";
8
8
  import Gi from "react-currency-input-field";
9
9
  import { createPortal as te } from "react-dom";
@@ -21,73 +21,73 @@ const ci = ae(void 0), gn = {
21
21
  disabled: !1,
22
22
  isHidden: !1
23
23
  }, Kn = ({ children: i }) => {
24
- const [e, o] = P(!0), [s, a] = P({}), [l, d] = P({}), [u, c] = P([gn]), [r, t] = P(!1), [h, m] = P(null), [v, f] = P([
24
+ const [e, o] = P(!0), [s, a] = P({}), [l, d] = P({}), [u, c] = P([gn]), [r, t] = P(!1), [h, m] = P(null), [b, f] = P([
25
25
  0
26
26
  ]), [y, g] = P(""), p = si.useCallback(() => {
27
- }, []), S = si.useCallback(() => {
27
+ }, []), A = si.useCallback(() => {
28
28
  const K = ri();
29
- c((O) => [...O, { ...gn, id: K }]), m(K), f([u.length]);
29
+ c((G) => [...G, { ...gn, id: K }]), m(K), f([u.length]);
30
30
  }, [u]), C = si.useCallback((K) => {
31
31
  c(
32
- (O) => O.filter((D) => D.id !== K)
32
+ (G) => G.filter((D) => D.id !== K)
33
33
  ), m(null);
34
34
  }, []), x = si.useCallback(
35
- (K, O) => {
36
- const D = u.find((B) => B.id === O), E = D == null ? void 0 : D.questionData.find(
35
+ (K, G) => {
36
+ const D = u.find((B) => B.id === G), E = D == null ? void 0 : D.questionData.find(
37
37
  (B) => B.id === K
38
38
  );
39
39
  E && c(
40
40
  (B) => B == null ? void 0 : B.map(
41
- (L) => L.id === O ? {
41
+ (L) => L.id === G ? {
42
42
  ...L,
43
- questionData: L.questionData.filter((z) => E.type === "grid" ? z.gridId !== E.id && z.id !== E.id : z.id !== K)
43
+ questionData: L.questionData.filter((J) => E.type === "grid" ? J.gridId !== E.id && J.id !== E.id : J.id !== K)
44
44
  } : L
45
45
  )
46
46
  );
47
47
  },
48
48
  [u, c]
49
49
  ), k = si.useCallback(
50
- (K, O) => {
51
- const D = u.find((z) => z.id === O);
50
+ (K, G) => {
51
+ const D = u.find((J) => J.id === G);
52
52
  if (!D) return;
53
53
  const E = D.questionData.findIndex(
54
- (z) => z.id === K
54
+ (J) => J.id === K
55
55
  );
56
56
  if (E === -1) return;
57
- const B = D.questionData[E], L = (z, ai = {}) => ({
58
- ...JSON.parse(JSON.stringify(z)),
57
+ const B = D.questionData[E], L = (J, ai = {}) => ({
58
+ ...JSON.parse(JSON.stringify(J)),
59
59
  id: ri(),
60
60
  ...ai
61
61
  });
62
62
  c(
63
- (z) => z == null ? void 0 : z.map((ai) => {
63
+ (J) => J == null ? void 0 : J.map((ai) => {
64
64
  var ni;
65
- if (ai.id !== O) return ai;
65
+ if (ai.id !== G) return ai;
66
66
  const _ = [...ai.questionData];
67
67
  if (B.type === "grid") {
68
68
  const ui = (ni = _ == null ? void 0 : _.map((X, oi) => ({ e: X, i: oi })).filter(
69
69
  ({ e: X }) => X.id === B.id || X.gridId === B.id
70
- )) == null ? void 0 : ni.map(({ i: X }) => X), li = ui.length ? Math.max(...ui) + 1 : E + 1, I = ri(), J = L(B, {});
71
- J.id = I;
72
- const j = _.filter((X) => X.gridId === B.id), G = j == null ? void 0 : j.map(
73
- (X) => L(X, { gridId: I })
70
+ )) == null ? void 0 : ni.map(({ i: X }) => X), li = ui.length ? Math.max(...ui) + 1 : E + 1, R = ri(), F = L(B, {});
71
+ F.id = R;
72
+ const j = _.filter((X) => X.gridId === B.id), H = j == null ? void 0 : j.map(
73
+ (X) => L(X, { gridId: R })
74
74
  ), V = [
75
75
  ..._.slice(0, li),
76
- J,
77
- ...G,
76
+ F,
77
+ ...H,
78
78
  ..._.slice(li)
79
79
  ];
80
80
  return { ...ai, questionData: V };
81
81
  } else if (B.gridId) {
82
- const { gridId: ui, gridPosition: li, ...I } = B, J = L(I, {}), j = _.reduce(
82
+ const { gridId: ui, gridPosition: li, ...R } = B, F = L(R, {}), j = _.reduce(
83
83
  (V, X, oi) => X.id === B.gridId || X.gridId === B.gridId ? oi : V,
84
84
  E
85
- ), G = [
85
+ ), H = [
86
86
  ..._.slice(0, j + 1),
87
- J,
87
+ F,
88
88
  ..._.slice(j + 1)
89
89
  ];
90
- return { ...ai, questionData: G };
90
+ return { ...ai, questionData: H };
91
91
  } else {
92
92
  const ui = L(B, {}), li = [
93
93
  ..._.slice(0, E + 1),
@@ -100,29 +100,29 @@ const ci = ae(void 0), gn = {
100
100
  );
101
101
  },
102
102
  [u, c]
103
- ), A = si.useCallback(
104
- (K, O) => {
103
+ ), S = si.useCallback(
104
+ (K, G) => {
105
105
  c(
106
106
  (D) => D == null ? void 0 : D.map(
107
- (E) => E.id === O ? { ...E, questionData: K } : E
107
+ (E) => E.id === G ? { ...E, questionData: K } : E
108
108
  )
109
109
  );
110
110
  },
111
111
  []
112
- ), N = si.useCallback((K, O) => {
112
+ ), N = si.useCallback((K, G) => {
113
113
  c(
114
114
  (D) => D == null ? void 0 : D.map(
115
- (E) => E.id === O ? {
115
+ (E) => E.id === G ? {
116
116
  ...E,
117
117
  questionData: [...E.questionData, K]
118
118
  } : E
119
119
  )
120
120
  );
121
121
  }, []), T = si.useCallback(
122
- (K, O, D) => {
122
+ (K, G, D) => {
123
123
  c(
124
124
  (E) => E == null ? void 0 : E.map(
125
- (B) => B.id === O ? {
125
+ (B) => B.id === G ? {
126
126
  ...B,
127
127
  questionData: [
128
128
  ...B.questionData.slice(0, D),
@@ -135,7 +135,7 @@ const ci = ae(void 0), gn = {
135
135
  },
136
136
  []
137
137
  ), Q = si.useCallback(
138
- (K, O, D) => {
138
+ (K, G, D) => {
139
139
  c(
140
140
  (E) => E == null ? void 0 : E.map(
141
141
  (B) => {
@@ -143,19 +143,19 @@ const ci = ae(void 0), gn = {
143
143
  return B.id === D ? {
144
144
  ...B,
145
145
  questionData: (L = B.questionData) == null ? void 0 : L.map(
146
- (z) => {
146
+ (J) => {
147
147
  var ai;
148
- return z.type === "grid" && z.gridData ? {
149
- ...z,
150
- gridData: (ai = z.gridData) == null ? void 0 : ai.map(
148
+ return J.type === "grid" && J.gridData ? {
149
+ ...J,
150
+ gridData: (ai = J.gridData) == null ? void 0 : ai.map(
151
151
  (_, ni) => ni === K ? {
152
152
  ..._,
153
- ...O
153
+ ...G
154
154
  } : _
155
155
  ).concat(
156
- K >= z.gridData.length ? { ...O } : []
156
+ K >= J.gridData.length ? { ...G } : []
157
157
  )
158
- } : z;
158
+ } : J;
159
159
  }
160
160
  )
161
161
  } : B;
@@ -164,12 +164,12 @@ const ci = ae(void 0), gn = {
164
164
  );
165
165
  },
166
166
  []
167
- ), U = si.useCallback((K, O) => {
167
+ ), z = si.useCallback((K, G) => {
168
168
  c(
169
169
  (D) => D == null ? void 0 : D.map(
170
170
  (E) => {
171
171
  var B;
172
- return E.id === O ? {
172
+ return E.id === G ? {
173
173
  ...E,
174
174
  questionData: (B = E.questionData) == null ? void 0 : B.map(
175
175
  (L) => L.id === K.id ? { ...L, ...K } : L
@@ -181,64 +181,64 @@ const ci = ae(void 0), gn = {
181
181
  }, []), q = si.useCallback(
182
182
  (K) => {
183
183
  const {
184
- draggedId: O,
184
+ draggedId: G,
185
185
  sectionId: D,
186
186
  targetIndex: E,
187
187
  targetId: B,
188
188
  targetGridId: L,
189
- targetCol: z
189
+ targetCol: J
190
190
  } = K;
191
191
  c(
192
192
  (ai) => ai.map((_) => {
193
193
  if (_.id !== D) return _;
194
- const ni = [..._.questionData], ui = ni.findIndex((I) => I.id === O);
194
+ const ni = [..._.questionData], ui = ni.findIndex((R) => R.id === G);
195
195
  if (ui === -1) return _;
196
196
  const li = { ...ni[ui] };
197
- if (L !== void 0 && z !== void 0) {
197
+ if (L !== void 0 && J !== void 0) {
198
198
  if (li.type === "grid") return _;
199
- const I = ni.findIndex(
199
+ const R = ni.findIndex(
200
200
  (j) => {
201
- var G;
202
- return j.id !== O && j.gridId === L && ((G = j.gridPosition) == null ? void 0 : G.col) === z;
201
+ var H;
202
+ return j.id !== G && j.gridId === L && ((H = j.gridPosition) == null ? void 0 : H.col) === J;
203
203
  }
204
204
  );
205
- let J = ni.map(
206
- (j) => j.id === O ? {
205
+ let F = ni.map(
206
+ (j) => j.id === G ? {
207
207
  ...j,
208
208
  gridId: L,
209
- gridPosition: { col: z }
209
+ gridPosition: { col: J }
210
210
  } : j
211
211
  );
212
- return I !== -1 && (J = J.map((j, G) => {
213
- if (G !== I) return j;
212
+ return R !== -1 && (F = F.map((j, H) => {
213
+ if (H !== R) return j;
214
214
  const V = { ...j };
215
215
  return delete V.gridId, delete V.gridPosition, V;
216
- })), { ..._, questionData: J };
216
+ })), { ..._, questionData: F };
217
217
  }
218
218
  if (li.gridId && E !== void 0 && L === void 0) {
219
- const I = { ...li };
220
- delete I.gridId, delete I.gridPosition;
221
- const J = ni.filter((G) => G.id !== O), j = Math.min(E, J.length);
222
- return J.splice(j, 0, I), { ..._, questionData: J };
219
+ const R = { ...li };
220
+ delete R.gridId, delete R.gridPosition;
221
+ const F = ni.filter((H) => H.id !== G), j = Math.min(E, F.length);
222
+ return F.splice(j, 0, R), { ..._, questionData: F };
223
223
  }
224
224
  if (!li.gridId && E !== void 0 && L === void 0 && !B) {
225
225
  ni.splice(ui, 1);
226
- const I = Math.min(E, ni.length);
227
- return ni.splice(I, 0, li), { ..._, questionData: ni };
226
+ const R = Math.min(E, ni.length);
227
+ return ni.splice(R, 0, li), { ..._, questionData: ni };
228
228
  }
229
229
  if (B) {
230
- const I = ni.findIndex((J) => J.id === B);
231
- return I === -1 ? _ : (ni.splice(ui, 1), ni.splice(I, 0, li), { ..._, questionData: ni });
230
+ const R = ni.findIndex((F) => F.id === B);
231
+ return R === -1 ? _ : (ni.splice(ui, 1), ni.splice(R, 0, li), { ..._, questionData: ni });
232
232
  }
233
233
  return _;
234
234
  })
235
235
  );
236
236
  },
237
237
  []
238
- ), w = si.useCallback((K, O) => {
238
+ ), w = si.useCallback((K, G) => {
239
239
  c(
240
240
  (D) => D == null ? void 0 : D.map(
241
- (E) => E.id === O ? {
241
+ (E) => E.id === G ? {
242
242
  ...E,
243
243
  ...K
244
244
  } : E
@@ -252,18 +252,18 @@ const ci = ae(void 0), gn = {
252
252
  removeElement: x,
253
253
  elementData: l,
254
254
  setElementData: d,
255
- updateElementPosition: A,
255
+ updateElementPosition: S,
256
256
  addElement: N,
257
257
  addElementInPosition: T,
258
- updateElement: U,
259
- addSection: S,
258
+ updateElement: z,
259
+ addSection: A,
260
260
  removeSection: C,
261
261
  updateSection: w,
262
262
  isDragging: r,
263
263
  setIsDragging: t,
264
264
  selectedSection: h,
265
265
  setSelectedSection: m,
266
- activeSections: v,
266
+ activeSections: b,
267
267
  setActiveSections: f,
268
268
  updateGridElement: Q,
269
269
  answerData: s,
@@ -280,16 +280,16 @@ const ci = ae(void 0), gn = {
280
280
  p,
281
281
  x,
282
282
  l,
283
- A,
283
+ S,
284
284
  N,
285
285
  T,
286
- U,
287
- S,
286
+ z,
287
+ A,
288
288
  C,
289
289
  w,
290
290
  r,
291
291
  h,
292
- v,
292
+ b,
293
293
  Q,
294
294
  s,
295
295
  y,
@@ -314,7 +314,7 @@ function W() {
314
314
  return s;
315
315
  }
316
316
  function fe({ type: i = "calendar", className: e }) {
317
- return /* @__PURE__ */ n(ti, { children: i === "calendar" ? /* @__PURE__ */ b(
317
+ return /* @__PURE__ */ n(ti, { children: i === "calendar" ? /* @__PURE__ */ v(
318
318
  "svg",
319
319
  {
320
320
  width: "20",
@@ -430,7 +430,7 @@ function fe({ type: i = "calendar", className: e }) {
430
430
  )
431
431
  ]
432
432
  }
433
- ) : /* @__PURE__ */ b(
433
+ ) : /* @__PURE__ */ v(
434
434
  "svg",
435
435
  {
436
436
  width: "20",
@@ -498,10 +498,10 @@ const $i = ({
498
498
  showYearDropdown: c
499
499
  }) => {
500
500
  const r = i ? new Date(i) : null, [t, h] = P(r);
501
- return R(() => {
502
- const v = i ? new Date(i) : null;
503
- (v && t && v.getTime() !== t.getTime() || !v && t || v && !t) && h(v);
504
- }, [i]), R(() => {
501
+ return I(() => {
502
+ const b = i ? new Date(i) : null;
503
+ (b && t && b.getTime() !== t.getTime() || !b && t || b && !t) && h(b);
504
+ }, [i]), I(() => {
505
505
  e && e(a, t);
506
506
  }, [t, e, a]), /* @__PURE__ */ n("div", { className: "builder_date__picker", children: /* @__PURE__ */ n(
507
507
  se,
@@ -512,8 +512,8 @@ const $i = ({
512
512
  dateFormat: s,
513
513
  disabled: o,
514
514
  selected: t,
515
- onChange: (v) => {
516
- h(v);
515
+ onChange: (b) => {
516
+ h(b);
517
517
  },
518
518
  className: "field-control",
519
519
  portalId: "root-portal",
@@ -536,7 +536,7 @@ function ye({
536
536
  watch: a
537
537
  } = e || {};
538
538
  let l;
539
- return a && (l = a()[i.id]), R(() => {
539
+ return a && (l = a()[i.id]), I(() => {
540
540
  o(i.id);
541
541
  }, [i.id]), /* @__PURE__ */ n(
542
542
  $i,
@@ -721,7 +721,7 @@ const Fn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Hi = (i, e, o, s = "") => {
721
721
  return null;
722
722
  }, Pi = (i, e) => i ? !!((e && i.prefix === "" || i.prefix) && i.name) : !1;
723
723
  let Bi = !1;
724
- function Wn(i) {
724
+ function Un(i) {
725
725
  return typeof i == "boolean" && (Bi = i), Bi;
726
726
  }
727
727
  function An(i) {
@@ -753,11 +753,11 @@ function Be(i, e) {
753
753
  const s = Ni(e, o);
754
754
  return !!Vn(s, i);
755
755
  }
756
- const Un = Object.freeze({
756
+ const Wn = Object.freeze({
757
757
  width: null,
758
758
  height: null
759
759
  }), zn = Object.freeze({
760
- ...Un,
760
+ ...Wn,
761
761
  ...Ii
762
762
  }), Le = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Te = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
763
763
  function Sn(i, e, o) {
@@ -815,9 +815,9 @@ function Ie(i, e) {
815
815
  };
816
816
  let l = o.body;
817
817
  [o, s].forEach((y) => {
818
- const g = [], p = y.hFlip, S = y.vFlip;
818
+ const g = [], p = y.hFlip, A = y.vFlip;
819
819
  let C = y.rotate;
820
- p ? S ? C += 2 : (g.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), g.push("scale(-1 1)"), a.top = a.left = 0) : S && (g.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), g.push("scale(1 -1)"), a.top = a.left = 0);
820
+ p ? A ? C += 2 : (g.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), g.push("scale(-1 1)"), a.top = a.left = 0) : A && (g.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), g.push("scale(1 -1)"), a.top = a.left = 0);
821
821
  let x;
822
822
  switch (C < 0 && (C -= Math.floor(C / 4) * 4), C = C % 4, C) {
823
823
  case 1:
@@ -835,10 +835,10 @@ function Ie(i, e) {
835
835
  const d = s.width, u = s.height, c = a.width, r = a.height;
836
836
  let t, h;
837
837
  d === null ? (h = u === null ? "1em" : u === "auto" ? r : u, t = Sn(h, c / r)) : (t = d === "auto" ? c : d, h = u === null ? Sn(t, r / c) : u === "auto" ? r : u);
838
- const m = {}, v = (y, g) => {
838
+ const m = {}, b = (y, g) => {
839
839
  Re(g) || (m[y] = g.toString());
840
840
  };
841
- v("width", t), v("height", h);
841
+ b("width", t), b("height", h);
842
842
  const f = [
843
843
  a.left,
844
844
  a.top,
@@ -919,10 +919,10 @@ function Fe(i, e) {
919
919
  }
920
920
  return s;
921
921
  }
922
- function We(i) {
922
+ function Ue(i) {
923
923
  return i === 404;
924
924
  }
925
- const Ue = (i, e, o) => {
925
+ const We = (i, e, o) => {
926
926
  const s = [], a = Fe(i, e), l = "icons";
927
927
  let d = {
928
928
  type: l,
@@ -972,7 +972,7 @@ const Je = (i, e, o) => {
972
972
  const d = l.status;
973
973
  if (d !== 200) {
974
974
  setTimeout(() => {
975
- o(We(d) ? "abort" : "next", d);
975
+ o(Ue(d) ? "abort" : "next", d);
976
976
  });
977
977
  return;
978
978
  }
@@ -991,7 +991,7 @@ const Je = (i, e, o) => {
991
991
  o("next", a);
992
992
  });
993
993
  }, Ze = {
994
- prepare: Ue,
994
+ prepare: We,
995
995
  send: Je
996
996
  };
997
997
  function Jn(i, e) {
@@ -1088,26 +1088,26 @@ function io(i, e, o, s) {
1088
1088
  const a = i.resources.length, l = i.random ? Math.floor(Math.random() * a) : i.index;
1089
1089
  let d;
1090
1090
  if (i.random) {
1091
- let A = i.resources.slice(0);
1092
- for (d = []; A.length > 1; ) {
1093
- const N = Math.floor(Math.random() * A.length);
1094
- d.push(A[N]), A = A.slice(0, N).concat(A.slice(N + 1));
1091
+ let S = i.resources.slice(0);
1092
+ for (d = []; S.length > 1; ) {
1093
+ const N = Math.floor(Math.random() * S.length);
1094
+ d.push(S[N]), S = S.slice(0, N).concat(S.slice(N + 1));
1095
1095
  }
1096
- d = d.concat(A);
1096
+ d = d.concat(S);
1097
1097
  } else d = i.resources.slice(l).concat(i.resources.slice(0, l));
1098
1098
  const u = Date.now();
1099
- let c = "pending", r = 0, t, h = null, m = [], v = [];
1100
- typeof s == "function" && v.push(s);
1099
+ let c = "pending", r = 0, t, h = null, m = [], b = [];
1100
+ typeof s == "function" && b.push(s);
1101
1101
  function f() {
1102
1102
  h && (clearTimeout(h), h = null);
1103
1103
  }
1104
1104
  function y() {
1105
- c === "pending" && (c = "aborted"), f(), m.forEach((A) => {
1106
- A.status === "pending" && (A.status = "aborted");
1105
+ c === "pending" && (c = "aborted"), f(), m.forEach((S) => {
1106
+ S.status === "pending" && (S.status = "aborted");
1107
1107
  }), m = [];
1108
1108
  }
1109
- function g(A, N) {
1110
- N && (v = []), typeof A == "function" && v.push(A);
1109
+ function g(S, N) {
1110
+ N && (b = []), typeof S == "function" && b.push(S);
1111
1111
  }
1112
1112
  function p() {
1113
1113
  return {
@@ -1120,19 +1120,19 @@ function io(i, e, o, s) {
1120
1120
  abort: y
1121
1121
  };
1122
1122
  }
1123
- function S() {
1124
- c = "failed", v.forEach((A) => {
1125
- A(void 0, t);
1123
+ function A() {
1124
+ c = "failed", b.forEach((S) => {
1125
+ S(void 0, t);
1126
1126
  });
1127
1127
  }
1128
1128
  function C() {
1129
- m.forEach((A) => {
1130
- A.status === "pending" && (A.status = "aborted");
1129
+ m.forEach((S) => {
1130
+ S.status === "pending" && (S.status = "aborted");
1131
1131
  }), m = [];
1132
1132
  }
1133
- function x(A, N, T) {
1133
+ function x(S, N, T) {
1134
1134
  const Q = N !== "success";
1135
- switch (m = m.filter((U) => U !== A), c) {
1135
+ switch (m = m.filter((z) => z !== S), c) {
1136
1136
  case "pending":
1137
1137
  break;
1138
1138
  case "failed":
@@ -1142,43 +1142,43 @@ function io(i, e, o, s) {
1142
1142
  return;
1143
1143
  }
1144
1144
  if (N === "abort") {
1145
- t = T, S();
1145
+ t = T, A();
1146
1146
  return;
1147
1147
  }
1148
1148
  if (Q) {
1149
- t = T, m.length || (d.length ? k() : S());
1149
+ t = T, m.length || (d.length ? k() : A());
1150
1150
  return;
1151
1151
  }
1152
1152
  if (f(), C(), !i.random) {
1153
- const U = i.resources.indexOf(A.resource);
1154
- U !== -1 && U !== i.index && (i.index = U);
1153
+ const z = i.resources.indexOf(S.resource);
1154
+ z !== -1 && z !== i.index && (i.index = z);
1155
1155
  }
1156
- c = "completed", v.forEach((U) => {
1157
- U(T);
1156
+ c = "completed", b.forEach((z) => {
1157
+ z(T);
1158
1158
  });
1159
1159
  }
1160
1160
  function k() {
1161
1161
  if (c !== "pending") return;
1162
1162
  f();
1163
- const A = d.shift();
1164
- if (A === void 0) {
1163
+ const S = d.shift();
1164
+ if (S === void 0) {
1165
1165
  if (m.length) {
1166
1166
  h = setTimeout(() => {
1167
- f(), c === "pending" && (C(), S());
1167
+ f(), c === "pending" && (C(), A());
1168
1168
  }, i.timeout);
1169
1169
  return;
1170
1170
  }
1171
- S();
1171
+ A();
1172
1172
  return;
1173
1173
  }
1174
1174
  const N = {
1175
1175
  status: "pending",
1176
- resource: A,
1176
+ resource: S,
1177
1177
  callback: (T, Q) => {
1178
1178
  x(N, T, Q);
1179
1179
  }
1180
1180
  };
1181
- m.push(N), r++, h = setTimeout(k, i.rotate), o(A, e, N.callback);
1181
+ m.push(N), r++, h = setTimeout(k, i.rotate), o(S, e, N.callback);
1182
1182
  }
1183
1183
  return setTimeout(k), p;
1184
1184
  }
@@ -1212,18 +1212,18 @@ function Zn(i) {
1212
1212
  }
1213
1213
  function Nn() {
1214
1214
  }
1215
- const Wi = /* @__PURE__ */ Object.create(null);
1215
+ const Ui = /* @__PURE__ */ Object.create(null);
1216
1216
  function no(i) {
1217
- if (!Wi[i]) {
1217
+ if (!Ui[i]) {
1218
1218
  const e = tn(i);
1219
1219
  if (!e) return;
1220
1220
  const o = Zn(e), s = {
1221
1221
  config: e,
1222
1222
  redundancy: o
1223
1223
  };
1224
- Wi[i] = s;
1224
+ Ui[i] = s;
1225
1225
  }
1226
- return Wi[i];
1226
+ return Ui[i];
1227
1227
  }
1228
1228
  function eo(i, e, o) {
1229
1229
  let s, a;
@@ -1300,11 +1300,11 @@ function so(i, e) {
1300
1300
  a.forEach((t) => {
1301
1301
  const h = l(t, s, o);
1302
1302
  Cn(h, (m) => {
1303
- const v = m ? {
1303
+ const b = m ? {
1304
1304
  prefix: s,
1305
1305
  icons: { [t]: m }
1306
1306
  } : null;
1307
- Ci(i, [t], v);
1307
+ Ci(i, [t], b);
1308
1308
  });
1309
1309
  });
1310
1310
  return;
@@ -1324,7 +1324,7 @@ function so(i, e) {
1324
1324
  }));
1325
1325
  }
1326
1326
  const lo = (i, e) => {
1327
- const o = Qe(i, !0, Wn()), s = $e(o);
1327
+ const o = Qe(i, !0, Un()), s = $e(o);
1328
1328
  if (!s.pending.length) {
1329
1329
  let c = !0;
1330
1330
  return e && setTimeout(() => {
@@ -1342,8 +1342,8 @@ const lo = (i, e) => {
1342
1342
  const h = a[r] || (a[r] = /* @__PURE__ */ Object.create(null));
1343
1343
  h[t] || (h[t] = []);
1344
1344
  }), s.pending.forEach((c) => {
1345
- const { provider: r, prefix: t, name: h } = c, m = Ni(r, t), v = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
1346
- v.has(h) || (v.add(h), a[r][t].push(h));
1345
+ const { provider: r, prefix: t, name: h } = c, m = Ni(r, t), b = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
1346
+ b.has(h) || (b.add(h), a[r][t].push(h));
1347
1347
  }), l.forEach((c) => {
1348
1348
  const r = a[c.provider][c.prefix];
1349
1349
  r.length && so(c, r);
@@ -1353,7 +1353,7 @@ function uo(i, e) {
1353
1353
  const o = { ...i };
1354
1354
  for (const s in e) {
1355
1355
  const a = e[s], l = typeof a;
1356
- s in Un ? (a === null || a && (l === "string" || l === "number")) && (o[s] = a) : l === typeof o[s] && (o[s] = s === "rotate" ? a % 4 : a);
1356
+ s in Wn ? (a === null || a && (l === "string" || l === "number")) && (o[s] = a) : l === typeof o[s] && (o[s] = s === "rotate" ? a % 4 : a);
1357
1357
  }
1358
1358
  return o;
1359
1359
  }
@@ -1462,11 +1462,11 @@ const So = (i, e, o) => {
1462
1462
  if (o) {
1463
1463
  const g = Hi(o, !1, !0);
1464
1464
  if (g) {
1465
- const p = ["iconify"], S = [
1465
+ const p = ["iconify"], A = [
1466
1466
  "provider",
1467
1467
  "prefix"
1468
1468
  ];
1469
- for (const C of S)
1469
+ for (const C of A)
1470
1470
  g[C] && p.push("iconify--" + g[C]);
1471
1471
  c.className = p.join(" ");
1472
1472
  }
@@ -1531,10 +1531,10 @@ const So = (i, e, o) => {
1531
1531
  __html: go(Ge(r.body, p ? () => p + "ID" + g++ : "iconifyReact"))
1532
1532
  }, _i("svg", c);
1533
1533
  }
1534
- const { body: h, width: m, height: v } = i, f = l === "mask" || (l === "bg" ? !1 : h.indexOf("currentColor") !== -1), y = mo(h, {
1534
+ const { body: h, width: m, height: b } = i, f = l === "mask" || (l === "bg" ? !1 : h.indexOf("currentColor") !== -1), y = mo(h, {
1535
1535
  ...t,
1536
1536
  width: m + "",
1537
- height: v + ""
1537
+ height: b + ""
1538
1538
  });
1539
1539
  return c.style = {
1540
1540
  ...d,
@@ -1546,7 +1546,7 @@ const So = (i, e, o) => {
1546
1546
  ...u
1547
1547
  }, _i("span", c);
1548
1548
  };
1549
- Wn(!0);
1549
+ Un(!0);
1550
1550
  He("", Ze);
1551
1551
  if (typeof document != "undefined" && typeof window != "undefined") {
1552
1552
  const i = window;
@@ -1581,8 +1581,8 @@ if (typeof document != "undefined" && typeof window != "undefined") {
1581
1581
  }
1582
1582
  function _n(i) {
1583
1583
  const [e, o] = P(!!i.ssr), [s, a] = P({});
1584
- function l(v) {
1585
- if (v) {
1584
+ function l(b) {
1585
+ if (b) {
1586
1586
  const f = i.icon;
1587
1587
  if (typeof f == "object")
1588
1588
  return {
@@ -1602,15 +1602,15 @@ function _n(i) {
1602
1602
  }
1603
1603
  const [d, u] = P(l(!!i.ssr));
1604
1604
  function c() {
1605
- const v = s.callback;
1606
- v && (v(), a({}));
1605
+ const b = s.callback;
1606
+ b && (b(), a({}));
1607
1607
  }
1608
- function r(v) {
1609
- if (JSON.stringify(d) !== JSON.stringify(v))
1610
- return c(), u(v), !0;
1608
+ function r(b) {
1609
+ if (JSON.stringify(d) !== JSON.stringify(b))
1610
+ return c(), u(b), !0;
1611
1611
  }
1612
1612
  function t() {
1613
- var v;
1613
+ var b;
1614
1614
  const f = i.icon;
1615
1615
  if (typeof f == "object") {
1616
1616
  r({
@@ -1629,9 +1629,9 @@ function _n(i) {
1629
1629
  a({
1630
1630
  callback: g
1631
1631
  });
1632
- } else y && ((v = i.onLoad) === null || v === void 0 || v.call(i, f));
1632
+ } else y && ((b = i.onLoad) === null || b === void 0 || b.call(i, f));
1633
1633
  }
1634
- R(() => (o(!0), c), []), R(() => {
1634
+ I(() => (o(!0), c), []), I(() => {
1635
1635
  e && t();
1636
1636
  }, [i.icon, e]);
1637
1637
  const { name: h, data: m } = d;
@@ -1649,7 +1649,7 @@ In((i, e) => _n({
1649
1649
  ...i,
1650
1650
  _ref: e
1651
1651
  }));
1652
- function F({
1652
+ function U({
1653
1653
  icon: i,
1654
1654
  iconClass: e
1655
1655
  }) {
@@ -1674,17 +1674,17 @@ function rn({
1674
1674
  () => c == null ? void 0 : c.map((m) => m.label).join(", "),
1675
1675
  [c]
1676
1676
  );
1677
- return R(() => {
1677
+ return I(() => {
1678
1678
  s(i.id);
1679
- }, [i.id, s]), R(() => {
1679
+ }, [i.id, s]), I(() => {
1680
1680
  if (!d) return;
1681
- const m = d((v) => {
1682
- const f = v[i.id];
1681
+ const m = d((b) => {
1682
+ const f = b[i.id];
1683
1683
  f !== void 0 && r(Array.isArray(f) ? f : []);
1684
1684
  });
1685
1685
  return () => {
1686
- var v;
1687
- return (v = m.unsubscribe) == null ? void 0 : v.call(m);
1686
+ var b;
1687
+ return (b = m.unsubscribe) == null ? void 0 : b.call(m);
1688
1688
  };
1689
1689
  }, [d, i.id]), /* @__PURE__ */ n("div", { className: "custom-select", children: /* @__PURE__ */ n(
1690
1690
  ii,
@@ -1696,15 +1696,15 @@ function rn({
1696
1696
  multiple: !0,
1697
1697
  disabled: l,
1698
1698
  by: "value",
1699
- children: /* @__PURE__ */ b("div", { className: "custom-select__wrapper", children: [
1700
- /* @__PURE__ */ b(
1699
+ children: /* @__PURE__ */ v("div", { className: "custom-select__wrapper", children: [
1700
+ /* @__PURE__ */ v(
1701
1701
  ii.Button,
1702
1702
  {
1703
1703
  className: "custom-select__control field-control",
1704
1704
  disabled: l,
1705
1705
  children: [
1706
1706
  /* @__PURE__ */ n("span", { className: "custom-select__value", children: (c == null ? void 0 : c.length) > 0 ? t : /* @__PURE__ */ n("span", { className: "custom-select__placeholder", children: o != null ? o : " Select options" }) }),
1707
- /* @__PURE__ */ n("span", { className: "custom-select__icon", children: /* @__PURE__ */ n(F, { icon: "lucide:chevron-down" }) })
1707
+ /* @__PURE__ */ n("span", { className: "custom-select__icon", children: /* @__PURE__ */ n(U, { icon: "lucide:chevron-down" }) })
1708
1708
  ]
1709
1709
  }
1710
1710
  ),
@@ -1714,12 +1714,12 @@ function rn({
1714
1714
  anchor: "bottom start",
1715
1715
  className: "custom-select__options",
1716
1716
  children: (h = i == null ? void 0 : i.options) == null ? void 0 : h.map(
1717
- (m, v) => /* @__PURE__ */ n(
1717
+ (m, b) => /* @__PURE__ */ n(
1718
1718
  ii.Option,
1719
1719
  {
1720
1720
  value: m,
1721
1721
  className: ({ active: f }) => `custom-select__option ${f ? "custom-select__option--active" : ""}`,
1722
- children: ({ selected: f }) => /* @__PURE__ */ b("div", { className: "custom-select__option-row", children: [
1722
+ children: ({ selected: f }) => /* @__PURE__ */ v("div", { className: "custom-select__option-row", children: [
1723
1723
  /* @__PURE__ */ n(
1724
1724
  "span",
1725
1725
  {
@@ -1730,7 +1730,7 @@ function rn({
1730
1730
  f && /* @__PURE__ */ n("span", { className: "custom-select__check", children: "✓" })
1731
1731
  ] })
1732
1732
  },
1733
- v
1733
+ b
1734
1734
  )
1735
1735
  )
1736
1736
  }
@@ -1764,18 +1764,18 @@ function Qn({
1764
1764
  removeFile: o
1765
1765
  }) {
1766
1766
  const [s, a] = P(!1), [l, d] = P("unknown"), [u, c] = P(null);
1767
- R(() => {
1767
+ I(() => {
1768
1768
  i && d(No(i));
1769
- }, [i]), R(() => {
1769
+ }, [i]), I(() => {
1770
1770
  if (l === "pdf" && (i != null && i.startsWith("data:")))
1771
1771
  try {
1772
- const v = atob(i.split(",")[1]), f = new ArrayBuffer(v.length), y = new Uint8Array(f);
1773
- for (let S = 0; S < v.length; S++)
1774
- y[S] = v.charCodeAt(S);
1772
+ const b = atob(i.split(",")[1]), f = new ArrayBuffer(b.length), y = new Uint8Array(f);
1773
+ for (let A = 0; A < b.length; A++)
1774
+ y[A] = b.charCodeAt(A);
1775
1775
  const g = new Blob([f], { type: "application/pdf" }), p = URL.createObjectURL(g);
1776
1776
  return c(p), () => URL.revokeObjectURL(p);
1777
- } catch (v) {
1778
- console.error("Error creating blob URL:", v);
1777
+ } catch (b) {
1778
+ console.error("Error creating blob URL:", b);
1779
1779
  }
1780
1780
  else
1781
1781
  c(null);
@@ -1783,31 +1783,31 @@ function Qn({
1783
1783
  const r = () => {
1784
1784
  l === "image" || l === "pdf" ? a(!0) : window.open(u || i, "_blank");
1785
1785
  }, t = () => a(!1), h = e || (i == null ? void 0 : i.split("/").pop()) || "Unknown file";
1786
- function m(v, f = "download") {
1787
- if (!v) return;
1788
- if (v.startsWith("data:")) {
1786
+ function m(b, f = "download") {
1787
+ if (!b) return;
1788
+ if (b.startsWith("data:")) {
1789
1789
  const g = document.createElement("a");
1790
- g.href = v, g.download = f, document.body.appendChild(g), g.click(), document.body.removeChild(g);
1790
+ g.href = b, g.download = f, document.body.appendChild(g), g.click(), document.body.removeChild(g);
1791
1791
  return;
1792
1792
  }
1793
1793
  const y = document.createElement("a");
1794
- y.href = v, y.setAttribute("download", f), document.body.appendChild(y), y.click(), document.body.removeChild(y);
1794
+ y.href = b, y.setAttribute("download", f), document.body.appendChild(y), y.click(), document.body.removeChild(y);
1795
1795
  }
1796
- return /* @__PURE__ */ b("div", { className: "mt-2 field-control !py-1 !bg-gray-50 !flex justify-between gap-x-8 items-center", children: [
1797
- /* @__PURE__ */ b(
1796
+ return /* @__PURE__ */ v("div", { className: "mt-2 field-control !py-1 !bg-gray-50 !flex justify-between gap-x-8 items-center", children: [
1797
+ /* @__PURE__ */ v(
1798
1798
  "div",
1799
1799
  {
1800
1800
  onClick: r,
1801
1801
  className: "!flex items-center rounded cursor-pointer gap-x-3",
1802
1802
  title: `Click to preview ${h}`,
1803
1803
  children: [
1804
- l === "image" && /* @__PURE__ */ n("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ n(F, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
1805
- l !== "image" && /* @__PURE__ */ n(F, { icon: ko[l], iconClass: "text-4xl" }),
1804
+ l === "image" && /* @__PURE__ */ n("div", { className: "flex items-center justify-center ", children: /* @__PURE__ */ n(U, { iconClass: "text-4xl", icon: "fluent-color:image-48" }) }),
1805
+ l !== "image" && /* @__PURE__ */ n(U, { icon: ko[l], iconClass: "text-4xl" }),
1806
1806
  /* @__PURE__ */ n("span", { className: "text-sm font-semibold text-center text-gray-700 truncate max-w-[300px]", children: h })
1807
1807
  ]
1808
1808
  }
1809
1809
  ),
1810
- /* @__PURE__ */ b("div", { className: "flex gap-x-1 items-center", children: [
1810
+ /* @__PURE__ */ v("div", { className: "flex gap-x-1 items-center", children: [
1811
1811
  /* @__PURE__ */ n(
1812
1812
  "button",
1813
1813
  {
@@ -1815,7 +1815,7 @@ function Qn({
1815
1815
  className: "p-2",
1816
1816
  onClick: () => m(u || i, e),
1817
1817
  title: `Download ${h}`,
1818
- children: /* @__PURE__ */ n(F, { icon: "streamline-flex:download-tray-solid" })
1818
+ children: /* @__PURE__ */ n(U, { icon: "streamline-flex:download-tray-solid" })
1819
1819
  }
1820
1820
  ),
1821
1821
  o && /* @__PURE__ */ n(
@@ -1824,7 +1824,7 @@ function Qn({
1824
1824
  type: "button",
1825
1825
  className: "p-2 text-lg text-red-500",
1826
1826
  onClick: o,
1827
- children: /* @__PURE__ */ n(F, { icon: "lets-icons:trash-duotone" })
1827
+ children: /* @__PURE__ */ n(U, { icon: "lets-icons:trash-duotone" })
1828
1828
  }
1829
1829
  )
1830
1830
  ] }),
@@ -1833,11 +1833,11 @@ function Qn({
1833
1833
  {
1834
1834
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",
1835
1835
  onClick: t,
1836
- children: /* @__PURE__ */ b(
1836
+ children: /* @__PURE__ */ v(
1837
1837
  "div",
1838
1838
  {
1839
1839
  className: "relative bg-white p-8 rounded-lg w-full max-w-[90vw] max-h-[90vh] overflow-auto",
1840
- onClick: (v) => v.stopPropagation(),
1840
+ onClick: (b) => b.stopPropagation(),
1841
1841
  children: [
1842
1842
  /* @__PURE__ */ n(
1843
1843
  "button",
@@ -1890,19 +1890,19 @@ function Mo({
1890
1890
  list: a = null,
1891
1891
  accept: l = []
1892
1892
  }) {
1893
- const { uploadUrl: d } = mi(ci), u = hi(null), [c, r] = P(a), [t, h] = P(!1);
1894
- R(() => {
1893
+ const { uploadUrl: d } = bi(ci), u = mi(null), [c, r] = P(a), [t, h] = P(!1);
1894
+ I(() => {
1895
1895
  r(a);
1896
1896
  }, [a]);
1897
1897
  const m = $(
1898
1898
  () => l == null ? void 0 : l.map((x) => x.value).join(", "),
1899
1899
  [l]
1900
- ), v = $(
1900
+ ), b = $(
1901
1901
  () => l == null ? void 0 : l.map((x) => x.label).join(", "),
1902
1902
  [l]
1903
1903
  ), f = Z(
1904
1904
  async (x) => {
1905
- var A;
1905
+ var S;
1906
1906
  const k = di("token");
1907
1907
  try {
1908
1908
  const { data: N } = await xi.post(d, x, {
@@ -1910,14 +1910,14 @@ function Mo({
1910
1910
  Authorization: `Bearer ${k}`
1911
1911
  }
1912
1912
  });
1913
- return (A = N == null ? void 0 : N.data) == null ? void 0 : A.url;
1913
+ return (S = N == null ? void 0 : N.data) == null ? void 0 : S.url;
1914
1914
  } catch (N) {
1915
1915
  throw console.error("File upload error:", N), new Error("Failed to upload file to server");
1916
1916
  }
1917
1917
  },
1918
1918
  [d]
1919
1919
  ), y = Z(
1920
- (x) => new Promise((k, A) => {
1920
+ (x) => new Promise((k, S) => {
1921
1921
  const N = new FileReader();
1922
1922
  N.onloadend = async () => {
1923
1923
  try {
@@ -1935,30 +1935,30 @@ function Mo({
1935
1935
  name: x.name
1936
1936
  });
1937
1937
  } catch (T) {
1938
- A(T);
1938
+ S(T);
1939
1939
  }
1940
- }, N.onerror = () => A(new Error("File read failed")), N.readAsDataURL(x);
1940
+ }, N.onerror = () => S(new Error("File read failed")), N.readAsDataURL(x);
1941
1941
  }),
1942
1942
  [d, f]
1943
1943
  ), g = Z(
1944
1944
  (x) => {
1945
- var A;
1946
- const k = m ? (A = m.split(",")) == null ? void 0 : A.map((N) => N.trim()) : [];
1945
+ var S;
1946
+ const k = m ? (S = m.split(",")) == null ? void 0 : S.map((N) => N.trim()) : [];
1947
1947
  for (const N of x) {
1948
1948
  if (N.size > Co)
1949
- return vi.error(
1949
+ return hi.error(
1950
1950
  `File "${N.name}" exceeds 5MB limit (${(N.size / 1024 / 1024).toFixed(2)}MB)`
1951
1951
  ), !1;
1952
1952
  if (k.length && !k.some(
1953
1953
  (T) => N.type === T || N.name.toLowerCase().endsWith(T.replace("*", ""))
1954
1954
  ))
1955
- return vi.error(
1956
- `File "${N.name}" is not an allowed type. Allowed: ${v || "any"}`
1955
+ return hi.error(
1956
+ `File "${N.name}" is not an allowed type. Allowed: ${b || "any"}`
1957
1957
  ), !1;
1958
1958
  }
1959
1959
  return !0;
1960
1960
  },
1961
- [m, v]
1961
+ [m, b]
1962
1962
  ), p = Z(
1963
1963
  async (x) => {
1964
1964
  const k = Array.from(x.target.files || []);
@@ -1969,27 +1969,27 @@ function Mo({
1969
1969
  }
1970
1970
  try {
1971
1971
  h(!0);
1972
- const A = await Promise.all(k == null ? void 0 : k.map(y)), N = s && c ? [...c, ...A] : A;
1973
- r(N), i(N), vi.success(`Successfully uploaded ${k.length} file(s)`);
1974
- } catch (A) {
1975
- console.error("Upload error:", A), vi.error("Failed to upload file(s). Please try again.");
1972
+ const S = await Promise.all(k == null ? void 0 : k.map(y)), N = s && c ? [...c, ...S] : S;
1973
+ r(N), i(N), hi.success(`Successfully uploaded ${k.length} file(s)`);
1974
+ } catch (S) {
1975
+ console.error("Upload error:", S), hi.error("Failed to upload file(s). Please try again.");
1976
1976
  } finally {
1977
1977
  h(!1), u.current && (u.current.value = "");
1978
1978
  }
1979
1979
  }
1980
1980
  },
1981
1981
  [t, g, y, i, s, c]
1982
- ), S = Z(
1982
+ ), A = Z(
1983
1983
  (x) => {
1984
1984
  t || (u.current && (u.current.value = ""), r((k) => {
1985
- const A = x === void 0 ? null : (k == null ? void 0 : k.filter((N, T) => T !== x)) || null;
1986
- return i(A), A;
1985
+ const S = x === void 0 ? null : (k == null ? void 0 : k.filter((N, T) => T !== x)) || null;
1986
+ return i(S), S;
1987
1987
  }), o == null || o());
1988
1988
  },
1989
1989
  [o, i, t]
1990
1990
  ), C = c && c.length > 0;
1991
- return /* @__PURE__ */ b("div", { className: "flex flex-col items-start gap-2", children: [
1992
- !e && /* @__PURE__ */ b("div", { className: "!flex field-control !py-0 !px-0 relative", children: [
1991
+ return /* @__PURE__ */ v("div", { className: "flex flex-col items-start gap-2", children: [
1992
+ !e && /* @__PURE__ */ v("div", { className: "!flex field-control !py-0 !px-0 relative", children: [
1993
1993
  /* @__PURE__ */ n(
1994
1994
  "input",
1995
1995
  {
@@ -2011,15 +2011,15 @@ function Mo({
2011
2011
  {
2012
2012
  type: "button",
2013
2013
  className: "p-2 text-lg text-red-500 hover:text-red-600 transition-colors disabled:opacity-50",
2014
- onClick: () => S(),
2014
+ onClick: () => A(),
2015
2015
  disabled: t,
2016
2016
  "aria-label": "Remove all files",
2017
- children: /* @__PURE__ */ n(F, { icon: "lets-icons:trash-duotone" })
2017
+ children: /* @__PURE__ */ n(U, { icon: "lets-icons:trash-duotone" })
2018
2018
  }
2019
2019
  )
2020
2020
  ] }),
2021
- C && /* @__PURE__ */ b("div", { className: "relative grid gap-y-1 flex-1 w-full", children: [
2022
- t && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-white/60 rounded", children: /* @__PURE__ */ b("div", { className: "flex items-center gap-2 text-sm text-blue-600 font-medium", children: [
2021
+ C && /* @__PURE__ */ v("div", { className: "relative grid gap-y-1 flex-1 w-full", children: [
2022
+ t && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-white/60 rounded", children: /* @__PURE__ */ v("div", { className: "flex items-center gap-2 text-sm text-blue-600 font-medium", children: [
2023
2023
  /* @__PURE__ */ n("span", { className: "animate-spin h-4 w-4 border-2 border-blue-500 border-t-transparent rounded-full" }),
2024
2024
  "Uploading..."
2025
2025
  ] }) }),
@@ -2028,7 +2028,7 @@ function Mo({
2028
2028
  {
2029
2029
  fileUrl: x.base64,
2030
2030
  fileName: x.name,
2031
- removeFile: () => S(k)
2031
+ removeFile: () => A(k)
2032
2032
  },
2033
2033
  `${x.name}-${k}`
2034
2034
  )))
@@ -2043,9 +2043,9 @@ function Bo({ element: i, validationData: e }) {
2043
2043
  isReadOnly: d,
2044
2044
  watch: u
2045
2045
  } = e || {};
2046
- R(() => {
2046
+ I(() => {
2047
2047
  a(i.id);
2048
- }, [i.id, a]), R(() => {
2048
+ }, [i.id, a]), I(() => {
2049
2049
  if (u) {
2050
2050
  const h = u((m) => {
2051
2051
  s(m[i.id]);
@@ -2064,7 +2064,7 @@ function Bo({ element: i, validationData: e }) {
2064
2064
  ), r = () => {
2065
2065
  l == null || l(i.id, null), s(null);
2066
2066
  };
2067
- return /* @__PURE__ */ b("div", { children: [
2067
+ return /* @__PURE__ */ v("div", { children: [
2068
2068
  !d && /* @__PURE__ */ n(
2069
2069
  Mo,
2070
2070
  {
@@ -2076,7 +2076,15 @@ function Bo({ element: i, validationData: e }) {
2076
2076
  accept: i == null ? void 0 : i.acceptedFiles
2077
2077
  }
2078
2078
  ),
2079
- o && d && /* @__PURE__ */ n("div", { className: "relative grid gap-y-1 flex-1 w-full", children: typeof o == "object" && (o == null ? void 0 : o.map((h, m) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(Qn, { fileUrl: h.base64, fileName: h.name }) }, m))) })
2079
+ d && /* @__PURE__ */ n(ti, { children: o ? /* @__PURE__ */ n("div", { className: "relative grid gap-y-1 flex-1 w-full", children: typeof o == "object" && Array.isArray(o) && o.map(
2080
+ (h, m) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2081
+ Qn,
2082
+ {
2083
+ fileUrl: h.base64,
2084
+ fileName: h.name
2085
+ }
2086
+ ) }, m)
2087
+ ) }) : /* @__PURE__ */ n("span", { className: "field-control !bg-gray-50 w-full !text-gray-400 !text-sm !italic ", children: "No File Uploaded" }) })
2080
2088
  ] });
2081
2089
  }
2082
2090
  function Lo({
@@ -2095,7 +2103,7 @@ function Lo({
2095
2103
  }
2096
2104
  );
2097
2105
  }
2098
- const H = ({
2106
+ const O = ({
2099
2107
  label: i,
2100
2108
  name: e,
2101
2109
  register: o,
@@ -2109,16 +2117,16 @@ const H = ({
2109
2117
  trigger: t,
2110
2118
  prefix: h,
2111
2119
  disabled: m,
2112
- watch: v,
2120
+ watch: b,
2113
2121
  min: f,
2114
2122
  max: y,
2115
2123
  description: g,
2116
2124
  onChange: p
2117
2125
  }) => {
2118
- var C, x, k, A;
2119
- const S = o ? { ...o(e) } : {};
2126
+ var C, x, k, S;
2127
+ const A = o ? { ...o(e) } : {};
2120
2128
  if (l === "amount")
2121
- return /* @__PURE__ */ b("div", { className: "space-y-1.5 relative", children: [
2129
+ return /* @__PURE__ */ v("div", { className: "space-y-1.5 relative", children: [
2122
2130
  /* @__PURE__ */ n(
2123
2131
  "label",
2124
2132
  {
@@ -2143,10 +2151,10 @@ const H = ({
2143
2151
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-red-600", children: (C = s[e]) == null ? void 0 : C.message })
2144
2152
  ] });
2145
2153
  if (["checkbox", "radio"].includes(l)) {
2146
- const N = (v == null ? void 0 : v(e)) || null;
2154
+ const N = (b == null ? void 0 : b(e)) || null;
2147
2155
  let T = !1;
2148
- return N && (N != null && N.length && l === "checkbox" ? T = N == null ? void 0 : N.includes(r) : T = N == r), /* @__PURE__ */ b("div", { className: "space-y-1", children: [
2149
- /* @__PURE__ */ b(
2156
+ return N && (N != null && N.length && l === "checkbox" ? T = N == null ? void 0 : N.includes(r) : T = N == r), /* @__PURE__ */ v("div", { className: "space-y-1", children: [
2157
+ /* @__PURE__ */ v(
2150
2158
  "label",
2151
2159
  {
2152
2160
  className: `flex gap-3 cursor-pointer select-none ${g ? "items-start" : "items-center"}`,
@@ -2154,7 +2162,7 @@ const H = ({
2154
2162
  /* @__PURE__ */ n(
2155
2163
  "input",
2156
2164
  {
2157
- ...S,
2165
+ ...A,
2158
2166
  type: l,
2159
2167
  value: r || "",
2160
2168
  disabled: m,
@@ -2174,7 +2182,7 @@ const H = ({
2174
2182
  peer-disabled:cursor-not-allowed
2175
2183
  `,
2176
2184
  children: T && /* @__PURE__ */ n(
2177
- F,
2185
+ U,
2178
2186
  {
2179
2187
  icon: "meteor-icons:check",
2180
2188
  iconClass: "w-3.5 h-3.5 text-white"
@@ -2182,7 +2190,7 @@ const H = ({
2182
2190
  )
2183
2191
  }
2184
2192
  ),
2185
- /* @__PURE__ */ b("div", { children: [
2193
+ /* @__PURE__ */ v("div", { children: [
2186
2194
  /* @__PURE__ */ n("span", { className: "text-sm leading-none block font-medium text-[#344054] font-onest", children: i }),
2187
2195
  g && /* @__PURE__ */ n("span", { className: "text-xs font-medium leading-none text-[#5c6c86] font-onest", children: g })
2188
2196
  ] })
@@ -2192,7 +2200,7 @@ const H = ({
2192
2200
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "ml-8 text-sm text-red-600", children: (x = s[e]) == null ? void 0 : x.message })
2193
2201
  ] });
2194
2202
  }
2195
- return l === "textarea" ? /* @__PURE__ */ b("div", { className: "space-y-1.5 relative", children: [
2203
+ return l === "textarea" ? /* @__PURE__ */ v("div", { className: "space-y-1.5 relative", children: [
2196
2204
  /* @__PURE__ */ n(
2197
2205
  "label",
2198
2206
  {
@@ -2203,10 +2211,10 @@ const H = ({
2203
2211
  /* @__PURE__ */ n(
2204
2212
  "textarea",
2205
2213
  {
2206
- ...S,
2214
+ ...A,
2207
2215
  onChange: (N) => {
2208
2216
  var T;
2209
- (T = S.onChange) == null || T.call(S, N), p == null || p(N);
2217
+ (T = A.onChange) == null || T.call(A, N), p == null || p(N);
2210
2218
  },
2211
2219
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
2212
2220
  placeholder: d,
@@ -2214,7 +2222,7 @@ const H = ({
2214
2222
  }
2215
2223
  ),
2216
2224
  (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-red-600", children: (k = s[e]) == null ? void 0 : k.message })
2217
- ] }) : /* @__PURE__ */ b("div", { className: " relative w-full", children: [
2225
+ ] }) : /* @__PURE__ */ v("div", { className: " relative w-full", children: [
2218
2226
  i && /* @__PURE__ */ n(
2219
2227
  "label",
2220
2228
  {
@@ -2225,10 +2233,10 @@ const H = ({
2225
2233
  /* @__PURE__ */ n(
2226
2234
  "input",
2227
2235
  {
2228
- ...S,
2236
+ ...A,
2229
2237
  onChange: (N) => {
2230
2238
  var T;
2231
- (T = S.onChange) == null || T.call(S, N), p == null || p(N);
2239
+ (T = A.onChange) == null || T.call(A, N), p == null || p(N);
2232
2240
  },
2233
2241
  type: l,
2234
2242
  className: `field-control ${s != null && s[e] ? "border-red-300" : "border-[#D0D5DD]"} ${a}`,
@@ -2238,7 +2246,7 @@ const H = ({
2238
2246
  max: y
2239
2247
  }
2240
2248
  ),
2241
- (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-red-600", children: (A = s[e]) == null ? void 0 : A.message })
2249
+ (s == null ? void 0 : s[e]) && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-red-600", children: (S = s[e]) == null ? void 0 : S.message })
2242
2250
  ] });
2243
2251
  };
2244
2252
  function To({
@@ -2249,7 +2257,7 @@ function To({
2249
2257
  const { register: o = () => ({}), watch: s } = e || {};
2250
2258
  return /* @__PURE__ */ n("div", { className: W("grid gap-y-[6px]", i.customClass), children: (a = i == null ? void 0 : i.options) == null ? void 0 : a.map(
2251
2259
  (l) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2252
- H,
2260
+ O,
2253
2261
  {
2254
2262
  placeholder: i.placeholder,
2255
2263
  type: i.inputType,
@@ -2277,7 +2285,7 @@ function Po({
2277
2285
  const { register: o = () => ({}), watch: s } = e || {};
2278
2286
  return /* @__PURE__ */ n("div", { className: W("grid gap-y-[6px]", i.customClass), children: (a = i == null ? void 0 : i.options) == null ? void 0 : a.map(
2279
2287
  (l) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2280
- H,
2288
+ O,
2281
2289
  {
2282
2290
  placeholder: i.placeholder,
2283
2291
  type: i.inputType,
@@ -2305,37 +2313,37 @@ const Si = ({
2305
2313
  isFloatingLabel: t,
2306
2314
  subText: h,
2307
2315
  labelClass: m = "text-[10px]",
2308
- loading: v,
2316
+ loading: b,
2309
2317
  disabled: f
2310
2318
  }) => {
2311
- const [y, g] = P(r ? [] : null), p = hi(!1), S = $(() => !u || !i || i.length === 0 ? r ? [] : null : r ? Array.isArray(u) ? i.filter((k) => u.some(
2312
- (A) => {
2319
+ const [y, g] = P(r ? [] : null), p = mi(!1), A = $(() => !u || !i || i.length === 0 ? r ? [] : null : r ? Array.isArray(u) ? i.filter((k) => u.some(
2320
+ (S) => {
2313
2321
  var N;
2314
- return typeof k.value == "object" ? ((N = k.value) == null ? void 0 : N.id) === (A == null ? void 0 : A.id) : k.value === A;
2322
+ return typeof k.value == "object" ? ((N = k.value) == null ? void 0 : N.id) === (S == null ? void 0 : S.id) : k.value === S;
2315
2323
  }
2316
2324
  )) : [] : i.find((k) => {
2317
- var A;
2318
- return typeof k.value == "string" && typeof u == "string" ? k.value.toLowerCase() === u.toLowerCase() : typeof k.value == "object" && typeof u == "object" ? ((A = k.value) == null ? void 0 : A.id) === (u == null ? void 0 : u.id) : k.value === u;
2325
+ var S;
2326
+ return typeof k.value == "string" && typeof u == "string" ? k.value.toLowerCase() === u.toLowerCase() : typeof k.value == "object" && typeof u == "object" ? ((S = k.value) == null ? void 0 : S.id) === (u == null ? void 0 : u.id) : k.value === u;
2319
2327
  }) || null, [u, i, r]);
2320
- R(() => {
2328
+ I(() => {
2321
2329
  if (p.current) {
2322
2330
  p.current = !1;
2323
2331
  return;
2324
2332
  }
2325
- if (r && Array.isArray(S) && Array.isArray(y)) {
2326
- const k = y == null ? void 0 : y.map((N) => N.value), A = S == null ? void 0 : S.map((N) => N.value);
2327
- JSON.stringify(k) !== JSON.stringify(A) && g(S);
2328
- } else (S == null ? void 0 : S.value) !== (y == null ? void 0 : y.value) && g(S);
2329
- }, [S, r]);
2333
+ if (r && Array.isArray(A) && Array.isArray(y)) {
2334
+ const k = y == null ? void 0 : y.map((N) => N.value), S = A == null ? void 0 : A.map((N) => N.value);
2335
+ JSON.stringify(k) !== JSON.stringify(S) && g(A);
2336
+ } else (A == null ? void 0 : A.value) !== (y == null ? void 0 : y.value) && g(A);
2337
+ }, [A, r]);
2330
2338
  const C = Z((k) => {
2331
- var A;
2339
+ var S;
2332
2340
  if (p.current = !0, g(k), a) {
2333
- const N = r ? Array.isArray(k) ? k == null ? void 0 : k.map((T) => T.value) : [] : (A = k == null ? void 0 : k.value) != null ? A : null;
2341
+ const N = r ? Array.isArray(k) ? k == null ? void 0 : k.map((T) => T.value) : [] : (S = k == null ? void 0 : k.value) != null ? S : null;
2334
2342
  a(l, N), c == null || c(l);
2335
2343
  }
2336
2344
  s && !p.current && s(l);
2337
- }, [a, l, c, s, r]), x = $(() => v ? "Fetching data..." : y ? r && Array.isArray(y) ? y.length > 0 ? y == null ? void 0 : y.map((k) => k.label).join(", ") : e : (y == null ? void 0 : y.label) || e : e, [y, v, e, r]);
2338
- return /* @__PURE__ */ b("div", { className: "relative", children: [
2345
+ }, [a, l, c, s, r]), x = $(() => b ? "Fetching data..." : y ? r && Array.isArray(y) ? y.length > 0 ? y == null ? void 0 : y.map((k) => k.label).join(", ") : e : (y == null ? void 0 : y.label) || e : e, [y, b, e, r]);
2346
+ return /* @__PURE__ */ v("div", { className: "relative", children: [
2339
2347
  !t && d && /* @__PURE__ */ n("label", { className: "block text-sm text-[#686878] darks:text-white/70 mb-2", children: d }),
2340
2348
  t && d && /* @__PURE__ */ n(
2341
2349
  "label",
@@ -2353,19 +2361,19 @@ const Si = ({
2353
2361
  value: y,
2354
2362
  onChange: C,
2355
2363
  multiple: r,
2356
- disabled: f || v,
2357
- children: /* @__PURE__ */ b("div", { className: "relative", children: [
2358
- /* @__PURE__ */ b(ii.Button, { className: "field-control", disabled: f || v, children: [
2364
+ disabled: f || b,
2365
+ children: /* @__PURE__ */ v("div", { className: "relative", children: [
2366
+ /* @__PURE__ */ v(ii.Button, { className: "field-control", disabled: f || b, children: [
2359
2367
  /* @__PURE__ */ n(
2360
2368
  "span",
2361
2369
  {
2362
2370
  className: W("block text-sm text-left truncate", {
2363
- "opacity-60": !y || v
2371
+ "opacity-60": !y || b
2364
2372
  }),
2365
2373
  children: x
2366
2374
  }
2367
2375
  ),
2368
- /* @__PURE__ */ n("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n(F, { icon: "lucide:chevron-down" }) })
2376
+ /* @__PURE__ */ n("span", { className: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none", children: /* @__PURE__ */ n(U, { icon: "lucide:chevron-down" }) })
2369
2377
  ] }),
2370
2378
  /* @__PURE__ */ n(
2371
2379
  yi,
@@ -2373,7 +2381,7 @@ const Si = ({
2373
2381
  leave: "transition ease-in duration-100",
2374
2382
  leaveFrom: "opacity-100",
2375
2383
  leaveTo: "opacity-0",
2376
- children: /* @__PURE__ */ n(ii.Options, { anchor: "bottom start", className: "select-button-options", children: i.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No options available" }) : i == null ? void 0 : i.map((k, A) => {
2384
+ children: /* @__PURE__ */ n(ii.Options, { anchor: "bottom start", className: "select-button-options", children: i.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No options available" }) : i == null ? void 0 : i.map((k, S) => {
2377
2385
  var N;
2378
2386
  return /* @__PURE__ */ n(
2379
2387
  ii.Option,
@@ -2382,7 +2390,7 @@ const Si = ({
2382
2390
  className: ({ active: T }) => W("select-option", { active: T }),
2383
2391
  children: ({ selected: T }) => /* @__PURE__ */ n("div", { className: W("option-text", { selected: T }), children: k.label })
2384
2392
  },
2385
- ((N = k.value) == null ? void 0 : N.id) || k.value || A
2393
+ ((N = k.value) == null ? void 0 : N.id) || k.value || S
2386
2394
  );
2387
2395
  }) })
2388
2396
  }
@@ -2403,51 +2411,51 @@ function on({
2403
2411
  name: l
2404
2412
  }) {
2405
2413
  const [d, u] = P(""), c = $(() => {
2406
- const v = e != null ? e : o;
2407
- return i.find((f) => f.value === v || f.label === v) || null;
2414
+ const b = e != null ? e : o;
2415
+ return i.find((f) => f.value === b || f.label === b) || null;
2408
2416
  }, [e, o, i]), [r, t] = P(c);
2409
- R(() => {
2417
+ I(() => {
2410
2418
  if (e !== void 0) {
2411
- const v = i.find((f) => f.value === e || f.label === e) || null;
2412
- t(v);
2419
+ const b = i.find((f) => f.value === e || f.label === e) || null;
2420
+ t(b);
2413
2421
  }
2414
2422
  }, [e, i]);
2415
2423
  const h = $(() => {
2416
2424
  if (d === "") return i;
2417
- const v = d.toLowerCase();
2425
+ const b = d.toLowerCase();
2418
2426
  return i.filter(
2419
- (f) => f.label.toLowerCase().includes(v)
2427
+ (f) => f.label.toLowerCase().includes(b)
2420
2428
  );
2421
- }, [d, i]), m = Z((v) => {
2422
- t(v), s(l, v);
2429
+ }, [d, i]), m = Z((b) => {
2430
+ t(b), s(l, b);
2423
2431
  }, [l, s]);
2424
- return /* @__PURE__ */ n("div", { className: "relative w-full", children: /* @__PURE__ */ b(
2432
+ return /* @__PURE__ */ n("div", { className: "relative w-full", children: /* @__PURE__ */ v(
2425
2433
  Ai,
2426
2434
  {
2427
2435
  value: r,
2428
2436
  onChange: m,
2429
2437
  disabled: a,
2430
2438
  children: [
2431
- /* @__PURE__ */ b("div", { className: "relative", children: [
2439
+ /* @__PURE__ */ v("div", { className: "relative", children: [
2432
2440
  /* @__PURE__ */ n(
2433
2441
  le,
2434
2442
  {
2435
2443
  className: "field-control",
2436
- displayValue: (v) => (v == null ? void 0 : v.label) || "",
2437
- onChange: (v) => u(v.target.value),
2444
+ displayValue: (b) => (b == null ? void 0 : b.label) || "",
2445
+ onChange: (b) => u(b.target.value),
2438
2446
  placeholder: "Select an option..."
2439
2447
  }
2440
2448
  ),
2441
- /* @__PURE__ */ n(de, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n(F, { icon: "octicon:chevron-down-12" }) })
2449
+ /* @__PURE__ */ n(de, { className: "absolute inset-y-0 right-0 flex items-center px-2 text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ n(U, { icon: "octicon:chevron-down-12" }) })
2442
2450
  ] }),
2443
- /* @__PURE__ */ n(ue, { anchor: "bottom start", className: "select-options__combo", children: h.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : h == null ? void 0 : h.map((v) => /* @__PURE__ */ n(
2451
+ /* @__PURE__ */ n(ue, { anchor: "bottom start", className: "select-options__combo", children: h.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-sm text-gray-500", children: "No results found." }) : h == null ? void 0 : h.map((b) => /* @__PURE__ */ n(
2444
2452
  ce,
2445
2453
  {
2446
- value: v,
2454
+ value: b,
2447
2455
  className: ({ active: f, selected: y }) => W("select-option", { active: f, selected: y }),
2448
- children: ({ selected: f }) => /* @__PURE__ */ n("div", { className: W("option-text", { selected: f }), children: v.label })
2456
+ children: ({ selected: f }) => /* @__PURE__ */ n("div", { className: W("option-text", { selected: f }), children: b.label })
2449
2457
  },
2450
- v.value
2458
+ b.value
2451
2459
  )) })
2452
2460
  ]
2453
2461
  }
@@ -2465,7 +2473,7 @@ function Eo({
2465
2473
  watch: l
2466
2474
  } = e || {};
2467
2475
  let d;
2468
- return l && (d = l()[i.id]), R(() => {
2476
+ return l && (d = l()[i.id]), I(() => {
2469
2477
  o(i.id);
2470
2478
  }, [i.id, o]), /* @__PURE__ */ n(ti, { children: i.selectType === "list" ? /* @__PURE__ */ n(
2471
2479
  Si,
@@ -2555,7 +2563,7 @@ const Io = ({
2555
2563
  "border-gray-500 border-primary border-primary-500 text-primary text-primary-500": c,
2556
2564
  "border-transparent text-gray-400 ": !c
2557
2565
  }), m = r > 0 && /* @__PURE__ */ n("span", { className: "text-xs h-6 min-w-[24px] rounded-full flex justify-center items-center border border-[#EAECF0] darks:border-gray-500 bg-[#F9FAFB] darks:bg-gray-800 text-[#454745] darks:text-white/80", children: r });
2558
- return /* @__PURE__ */ b(
2566
+ return /* @__PURE__ */ v(
2559
2567
  "button",
2560
2568
  {
2561
2569
  onClick: () => s(u.key),
@@ -2889,13 +2897,13 @@ const Io = ({
2889
2897
  { label: "Weekday, Month Day, Year", value: "EEEE, MMMM d, yyyy" },
2890
2898
  { label: "Short Weekday, Month Day, Year", value: "EEE, MMM d, yyyy" },
2891
2899
  { label: "Day-Month-Year", value: "dd-MM-yyyy" }
2892
- ], Vo = ["amount"], Fo = ["text", "number"], Wo = [
2900
+ ], Vo = ["amount"], Fo = ["text", "number"], Uo = [
2893
2901
  "text",
2894
2902
  "number",
2895
2903
  "amount",
2896
2904
  "date",
2897
2905
  "password"
2898
- ], Uo = ["amount"], Ti = [
2906
+ ], Wo = ["amount"], Ti = [
2899
2907
  "grid",
2900
2908
  "section",
2901
2909
  "divider",
@@ -2907,7 +2915,7 @@ const Io = ({
2907
2915
  "checkbox",
2908
2916
  "multiselect",
2909
2917
  "matrix"
2910
- ], Jo = ["validateInput"], Zo = ["tableInput"], Ui = ["basicText"], qo = [
2918
+ ], Jo = ["validateInput"], Zo = ["tableInput"], Wi = ["basicText"], qo = [
2911
2919
  {
2912
2920
  value: [
2913
2921
  "image/jpeg",
@@ -2958,7 +2966,7 @@ function Yo({
2958
2966
  const [s, a] = P(
2959
2967
  (i == null ? void 0 : i.length) > 0 ? i : [{ value: "" }]
2960
2968
  );
2961
- R(() => {
2969
+ I(() => {
2962
2970
  (i == null ? void 0 : i.length) > 0 && JSON.stringify(i) !== JSON.stringify(s) && a(i);
2963
2971
  }, [i]);
2964
2972
  function l(c, r) {
@@ -2981,16 +2989,16 @@ function Yo({
2981
2989
  const r = s.filter((t, h) => h !== c);
2982
2990
  a(r), e && e(r);
2983
2991
  }
2984
- return R(() => {
2992
+ return I(() => {
2985
2993
  o && o(JSON.stringify({ values: s }));
2986
- }, [o, s]), /* @__PURE__ */ b("div", { className: "]", children: [
2987
- /* @__PURE__ */ b("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: [
2994
+ }, [o, s]), /* @__PURE__ */ v("div", { className: "]", children: [
2995
+ /* @__PURE__ */ v("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: [
2988
2996
  /* @__PURE__ */ n("div", { className: "grid text-sm font-bold border-b border-gray-100 bg-gray-50", children: /* @__PURE__ */ n("div", { className: "px-2 py-2", children: /* @__PURE__ */ n("span", { className: "", children: "Add Denominations" }) }) }),
2989
2997
  s == null ? void 0 : s.map((c, r) => /* @__PURE__ */ n(
2990
2998
  "div",
2991
2999
  {
2992
3000
  className: "grid text-sm border-b border-gray-100",
2993
- children: /* @__PURE__ */ b("div", { className: "flex items-center gap-x-4 px-2 py-1", children: [
3001
+ children: /* @__PURE__ */ v("div", { className: "flex items-center gap-x-4 px-2 py-1", children: [
2994
3002
  /* @__PURE__ */ n("span", { className: "flex-1", children: /* @__PURE__ */ n(
2995
3003
  Gi,
2996
3004
  {
@@ -3028,14 +3036,14 @@ function Yo({
3028
3036
  ) })
3029
3037
  ] });
3030
3038
  }
3031
- const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700", children: /* @__PURE__ */ b("ul", { children: [
3032
- /* @__PURE__ */ b("li", { className: "text-xs", children: [
3039
+ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700", children: /* @__PURE__ */ v("ul", { children: [
3040
+ /* @__PURE__ */ v("li", { className: "text-xs", children: [
3033
3041
  "API URL example format: ",
3034
3042
  /* @__PURE__ */ n("code", { children: "https://example.com/validation?value={value}" })
3035
3043
  ] }),
3036
- /* @__PURE__ */ b("li", { className: "text-xs", children: [
3044
+ /* @__PURE__ */ v("li", { className: "text-xs", children: [
3037
3045
  /* @__PURE__ */ n("span", { className: "block mb-1", children: " Response example format:" }),
3038
- /* @__PURE__ */ n("pre", { className: "bg-white p-2 rounded-md", children: /* @__PURE__ */ b("code", { children: [
3046
+ /* @__PURE__ */ n("pre", { className: "bg-white p-2 rounded-md", children: /* @__PURE__ */ v("code", { children: [
3039
3047
  "{ ",
3040
3048
  /* @__PURE__ */ n("br", {}),
3041
3049
  '  "data": { ',
@@ -3049,13 +3057,13 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3049
3057
  "}"
3050
3058
  ] }) })
3051
3059
  ] })
3052
- ] }) }), $o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700 text-sm space-y-3", children: /* @__PURE__ */ b("ul", { className: "list-disc list-inside space-y-1", children: [
3053
- /* @__PURE__ */ b("li", { children: [
3060
+ ] }) }), $o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700 text-sm space-y-3", children: /* @__PURE__ */ v("ul", { className: "list-disc list-inside space-y-1", children: [
3061
+ /* @__PURE__ */ v("li", { children: [
3054
3062
  /* @__PURE__ */ n("strong", { children: "Method:" }),
3055
3063
  " ",
3056
3064
  /* @__PURE__ */ n("code", { children: "GET" })
3057
3065
  ] }),
3058
- /* @__PURE__ */ b("li", { children: [
3066
+ /* @__PURE__ */ v("li", { children: [
3059
3067
  /* @__PURE__ */ n("strong", { children: "Response format:" }),
3060
3068
  /* @__PURE__ */ n("pre", { className: "bg-white p-2 mt-1 rounded-md overflow-auto text-xs", children: /* @__PURE__ */ n("code", { children: `{
3061
3069
  "data": [
@@ -3084,8 +3092,8 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3084
3092
  type: a
3085
3093
  }) => {
3086
3094
  const [l, d] = P(""), u = di("config");
3087
- return /* @__PURE__ */ b("div", { children: [
3088
- /* @__PURE__ */ b("div", { className: "relative", children: [
3095
+ return /* @__PURE__ */ v("div", { children: [
3096
+ /* @__PURE__ */ v("div", { className: "relative", children: [
3089
3097
  /* @__PURE__ */ n(
3090
3098
  "label",
3091
3099
  {
@@ -3104,7 +3112,7 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3104
3112
  d(t.name);
3105
3113
  const h = new FileReader();
3106
3114
  t.name.endsWith(".csv") ? (h.onload = (m) => {
3107
- const v = m.target.result, f = pe.parse(v, { header: !0 });
3115
+ const b = m.target.result, f = pe.parse(b, { header: !0 });
3108
3116
  i(
3109
3117
  e,
3110
3118
  (a === "dataGrid" ? sn : an)(
@@ -3112,17 +3120,17 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3112
3120
  )
3113
3121
  );
3114
3122
  }, h.readAsText(t)) : t.name.endsWith(".xlsx") || t.name.endsWith(".xls") ? (h.onload = (m) => {
3115
- const v = new Uint8Array(m.target.result), f = pn.read(v, { type: "array" }), y = f.SheetNames[0], g = f.Sheets[y], p = pn.utils.sheet_to_json(g);
3123
+ const b = new Uint8Array(m.target.result), f = pn.read(b, { type: "array" }), y = f.SheetNames[0], g = f.Sheets[y], p = pn.utils.sheet_to_json(g);
3116
3124
  i(
3117
3125
  e,
3118
3126
  (a === "dataGrid" ? sn : an)(p)
3119
3127
  );
3120
- }, h.readAsArrayBuffer(t)) : vi.error("Unsupported file type. Please upload a CSV or Excel file.");
3128
+ }, h.readAsArrayBuffer(t)) : hi.error("Unsupported file type. Please upload a CSV or Excel file.");
3121
3129
  },
3122
3130
  className: "mb-4 field-control file:bg-gray-600 file:text-white file:text-sm file:rounded file:border-gray-600 file:outline-none"
3123
3131
  }
3124
3132
  ),
3125
- l && /* @__PURE__ */ b("p", { className: "text-xs text-gray-600 mb-2", children: [
3133
+ l && /* @__PURE__ */ v("p", { className: "text-xs text-gray-600 mb-2", children: [
3126
3134
  "Uploaded: ",
3127
3135
  l
3128
3136
  ] })
@@ -3140,13 +3148,13 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3140
3148
  }
3141
3149
  )
3142
3150
  ] });
3143
- }, Qo = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700 text-sm space-y-3", children: /* @__PURE__ */ b("ul", { className: "list-disc list-inside space-y-1", children: [
3144
- /* @__PURE__ */ b("li", { children: [
3151
+ }, Qo = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 rounded-md text-gray-700 text-sm space-y-3", children: /* @__PURE__ */ v("ul", { className: "list-disc list-inside space-y-1", children: [
3152
+ /* @__PURE__ */ v("li", { children: [
3145
3153
  /* @__PURE__ */ n("strong", { children: "Method:" }),
3146
3154
  " ",
3147
3155
  /* @__PURE__ */ n("code", { children: "GET" })
3148
3156
  ] }),
3149
- /* @__PURE__ */ b("li", { children: [
3157
+ /* @__PURE__ */ v("li", { children: [
3150
3158
  /* @__PURE__ */ n("strong", { children: "Response format:" }),
3151
3159
  /* @__PURE__ */ n("pre", { className: "bg-white p-2 mt-1 rounded-md overflow-auto text-xs", children: /* @__PURE__ */ n("code", { children: `{
3152
3160
  "data": [
@@ -3154,7 +3162,7 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3154
3162
  ]
3155
3163
  }` }) })
3156
3164
  ] })
3157
- ] }) }), Xo = () => /* @__PURE__ */ n("blockquote", { className: "p-4 space-y-3 text-xs text-gray-700 bg-gray-100 rounded-md", children: /* @__PURE__ */ n("ul", { className: "space-y-1 ", children: /* @__PURE__ */ b("li", { children: [
3165
+ ] }) }), Xo = () => /* @__PURE__ */ n("blockquote", { className: "p-4 space-y-3 text-xs text-gray-700 bg-gray-100 rounded-md", children: /* @__PURE__ */ n("ul", { className: "space-y-1 ", children: /* @__PURE__ */ v("li", { children: [
3158
3166
  /* @__PURE__ */ n("span", { children: "Method:" }),
3159
3167
  " ",
3160
3168
  /* @__PURE__ */ n("code", { children: "GET" }),
@@ -3165,17 +3173,17 @@ const _o = () => /* @__PURE__ */ n("blockquote", { className: "bg-gray-100 p-4 r
3165
3173
  { "name": "Document Name", "id": "documentMainId", ...restObject },
3166
3174
  ]
3167
3175
  }` }) })
3168
- ] }) }) }), ia = () => /* @__PURE__ */ n("blockquote", { className: "p-4 text-gray-700 bg-gray-100 rounded-md", children: /* @__PURE__ */ b("ul", { children: [
3169
- /* @__PURE__ */ b("li", { className: "text-xs", children: [
3176
+ ] }) }) }), ia = () => /* @__PURE__ */ n("blockquote", { className: "p-4 text-gray-700 bg-gray-100 rounded-md", children: /* @__PURE__ */ v("ul", { children: [
3177
+ /* @__PURE__ */ v("li", { className: "text-xs", children: [
3170
3178
  "Method: GET ",
3171
3179
  /* @__PURE__ */ n("br", {}),
3172
3180
  "URL format:",
3173
3181
  " ",
3174
3182
  /* @__PURE__ */ n("code", { children: "https://example.com/validation/{documentId}" })
3175
3183
  ] }),
3176
- /* @__PURE__ */ b("li", { className: "text-xs", children: [
3184
+ /* @__PURE__ */ v("li", { className: "text-xs", children: [
3177
3185
  /* @__PURE__ */ n("span", { className: "block mb-1", children: " Response example format:" }),
3178
- /* @__PURE__ */ n("pre", { className: "p-2 bg-white rounded-md", children: /* @__PURE__ */ b("code", { children: [
3186
+ /* @__PURE__ */ n("pre", { className: "p-2 bg-white rounded-md", children: /* @__PURE__ */ v("code", { children: [
3179
3187
  "{ ",
3180
3188
  /* @__PURE__ */ n("br", {}),
3181
3189
  '  "data": { ',
@@ -3204,7 +3212,7 @@ function oa({
3204
3212
  watch: s,
3205
3213
  id: a
3206
3214
  }) {
3207
- const { formData: l } = mi(ci), d = s("visibilityDependentFields") || [], u = $(() => {
3215
+ const { formData: l } = bi(ci), d = s("visibilityDependentFields") || [], u = $(() => {
3208
3216
  var r;
3209
3217
  return (r = na(l).filter((t) => t.id !== a)) == null ? void 0 : r.map((t) => {
3210
3218
  const h = d.find(
@@ -3222,11 +3230,11 @@ function oa({
3222
3230
  });
3223
3231
  }, [l, d, a]), c = (r, t, h) => {
3224
3232
  const m = d == null ? void 0 : d.map(
3225
- (v, f) => f === r ? { ...v, [t]: h } : v
3233
+ (b, f) => f === r ? { ...b, [t]: h } : b
3226
3234
  );
3227
3235
  e("visibilityDependentFields", m);
3228
3236
  };
3229
- return /* @__PURE__ */ b("div", { className: "visibility-editor", children: [
3237
+ return /* @__PURE__ */ v("div", { className: "visibility-editor", children: [
3230
3238
  /* @__PURE__ */ n("label", { className: "label", children: "Select Dependent Fields" }),
3231
3239
  /* @__PURE__ */ n(
3232
3240
  rn,
@@ -3241,7 +3249,7 @@ function oa({
3241
3249
  ),
3242
3250
  d.length > 0 && /* @__PURE__ */ n("div", { className: "py-1 bg-gray-100 rounded dependent-fields", children: d == null ? void 0 : d.map((r, t) => {
3243
3251
  var h, m;
3244
- return /* @__PURE__ */ b("div", { className: "dependent-field", children: [
3252
+ return /* @__PURE__ */ v("div", { className: "dependent-field", children: [
3245
3253
  /* @__PURE__ */ n(
3246
3254
  "input",
3247
3255
  {
@@ -3256,8 +3264,8 @@ function oa({
3256
3264
  ii,
3257
3265
  {
3258
3266
  value: r.fieldType,
3259
- onChange: (v) => c(t, "fieldType", v),
3260
- children: /* @__PURE__ */ b("div", { className: "listbox-wrapper", children: [
3267
+ onChange: (b) => c(t, "fieldType", b),
3268
+ children: /* @__PURE__ */ v("div", { className: "listbox-wrapper", children: [
3261
3269
  /* @__PURE__ */ n(ii.Button, { className: "listbox-button", children: r.fieldType }),
3262
3270
  /* @__PURE__ */ n(
3263
3271
  yi,
@@ -3271,14 +3279,14 @@ function oa({
3271
3279
  {
3272
3280
  className: "listbox-options ",
3273
3281
  anchor: "bottom",
3274
- children: zi == null ? void 0 : zi.map((v) => /* @__PURE__ */ n(
3282
+ children: zi == null ? void 0 : zi.map((b) => /* @__PURE__ */ n(
3275
3283
  ii.Option,
3276
3284
  {
3277
- value: v,
3285
+ value: b,
3278
3286
  className: "listbox-option",
3279
- children: v
3287
+ children: b
3280
3288
  },
3281
- v
3289
+ b
3282
3290
  ))
3283
3291
  }
3284
3292
  )
@@ -3291,8 +3299,8 @@ function oa({
3291
3299
  ii,
3292
3300
  {
3293
3301
  value: r.operator,
3294
- onChange: (v) => c(t, "operator", v),
3295
- children: /* @__PURE__ */ b("div", { className: "listbox-wrapper", children: [
3302
+ onChange: (b) => c(t, "operator", b),
3303
+ children: /* @__PURE__ */ v("div", { className: "listbox-wrapper", children: [
3296
3304
  /* @__PURE__ */ n(ii.Button, { className: "listbox-button", children: r.operator.replace("_", " ") }),
3297
3305
  /* @__PURE__ */ n(
3298
3306
  yi,
@@ -3306,14 +3314,14 @@ function oa({
3306
3314
  {
3307
3315
  className: "listbox-options ",
3308
3316
  anchor: "bottom",
3309
- children: (h = r.fieldType === "number" ? [...wn, ...ea] : wn) == null ? void 0 : h.map((v) => /* @__PURE__ */ n(
3317
+ children: (h = r.fieldType === "number" ? [...wn, ...ea] : wn) == null ? void 0 : h.map((b) => /* @__PURE__ */ n(
3310
3318
  ii.Option,
3311
3319
  {
3312
- value: v,
3320
+ value: b,
3313
3321
  className: "listbox-option",
3314
- children: v.replace("_", " ")
3322
+ children: b.replace("_", " ")
3315
3323
  },
3316
- v
3324
+ b
3317
3325
  ))
3318
3326
  }
3319
3327
  )
@@ -3327,7 +3335,7 @@ function oa({
3327
3335
  {
3328
3336
  type: r.fieldType,
3329
3337
  value: r.fieldValue || "",
3330
- onChange: (v) => c(t, "fieldValue", v.target.value),
3338
+ onChange: (b) => c(t, "fieldValue", b.target.value),
3331
3339
  placeholder: "Value",
3332
3340
  className: "field-value"
3333
3341
  }
@@ -3335,8 +3343,8 @@ function oa({
3335
3343
  ii,
3336
3344
  {
3337
3345
  value: (m = r.fieldValue) != null ? m : "",
3338
- onChange: (v) => c(t, "fieldValue", v),
3339
- children: /* @__PURE__ */ b("div", { className: "listbox-wrapper", children: [
3346
+ onChange: (b) => c(t, "fieldValue", b),
3347
+ children: /* @__PURE__ */ v("div", { className: "listbox-wrapper", children: [
3340
3348
  /* @__PURE__ */ n(ii.Button, { className: "listbox-button", children: r.fieldValue === !0 ? "True" : r.fieldValue === !1 ? "False" : "Select value" }),
3341
3349
  /* @__PURE__ */ n(
3342
3350
  yi,
@@ -3345,7 +3353,7 @@ function oa({
3345
3353
  leave: "transition ease-in duration-100",
3346
3354
  leaveFrom: "opacity-100",
3347
3355
  leaveTo: "opacity-0",
3348
- children: /* @__PURE__ */ b(
3356
+ children: /* @__PURE__ */ v(
3349
3357
  ii.Options,
3350
3358
  {
3351
3359
  className: "listbox-options ",
@@ -3457,15 +3465,15 @@ const aa = M.object().shape({
3457
3465
  element: o
3458
3466
  }) => {
3459
3467
  const s = sa.filter(
3460
- (I) => !Ti.includes(o.inputType) || I.key !== "validation"
3468
+ (R) => !Ti.includes(o.inputType) || R.key !== "validation"
3461
3469
  ), { updateElement: a } = si.useContext(ci), [l, d] = P("basic"), [u, c] = P(!1), [r, t] = P("manual"), h = di("config"), {
3462
3470
  register: m,
3463
- handleSubmit: v,
3471
+ handleSubmit: b,
3464
3472
  control: f,
3465
3473
  setValue: y,
3466
3474
  watch: g,
3467
3475
  trigger: p,
3468
- formState: { errors: S, isSubmitting: C, isValid: x },
3476
+ formState: { errors: A, isSubmitting: C, isValid: x },
3469
3477
  reset: k
3470
3478
  } = ln({
3471
3479
  resolver: mn(aa),
@@ -3473,11 +3481,11 @@ const aa = M.object().shape({
3473
3481
  ...o,
3474
3482
  options: o.options || []
3475
3483
  }
3476
- }), A = g(), { fields: N, append: T, remove: Q } = ji({
3484
+ }), S = g(), { fields: N, append: T, remove: Q } = ji({
3477
3485
  control: f,
3478
3486
  name: "options"
3479
3487
  }), {
3480
- fields: U,
3488
+ fields: z,
3481
3489
  append: q,
3482
3490
  remove: w
3483
3491
  } = ji({
@@ -3486,78 +3494,78 @@ const aa = M.object().shape({
3486
3494
  }), {
3487
3495
  fields: Y,
3488
3496
  append: K,
3489
- remove: O
3497
+ remove: G
3490
3498
  } = ji({
3491
3499
  control: f,
3492
3500
  name: "dataColumns"
3493
3501
  });
3494
- R(() => {
3502
+ I(() => {
3495
3503
  i || k();
3496
3504
  }, [i, k]);
3497
- const D = (I) => {
3498
- a(I, o.sectionId), e();
3505
+ const D = (R) => {
3506
+ a(R, o.sectionId), e();
3499
3507
  }, B = {
3500
3508
  headers: {
3501
3509
  Authorization: `Bearer ${di("token")}`
3502
3510
  }
3503
3511
  }, L = Z(async () => {
3504
- var I, J, j;
3505
- if (!A.apiUrl || !/^https?:\/\//.test(A.apiUrl)) {
3506
- vi.info("Please provide a valid API URL");
3512
+ var R, F, j;
3513
+ if (!S.apiUrl || !/^https?:\/\//.test(S.apiUrl)) {
3514
+ hi.info("Please provide a valid API URL");
3507
3515
  return;
3508
3516
  }
3509
3517
  try {
3510
3518
  c(!0);
3511
- const { status: G, data: V } = await xi.get(A.apiUrl, B);
3512
- if (G !== 200 || !V) {
3513
- vi.error("Unexpected response from server.");
3519
+ const { status: H, data: V } = await xi.get(S.apiUrl, B);
3520
+ if (H !== 200 || !V) {
3521
+ hi.error("Unexpected response from server.");
3514
3522
  return;
3515
3523
  }
3516
3524
  const X = V.data || V.record || V.result;
3517
3525
  if (!Array.isArray(X)) {
3518
- vi.error("Expected an array in response (data, record, or result).");
3526
+ hi.error("Expected an array in response (data, record, or result).");
3519
3527
  return;
3520
3528
  }
3521
- ((I = o.type) == null ? void 0 : I.toLowerCase()) === "datagrid" ? y("dataColumns", sn(X)) : y("options", an(X));
3522
- } catch (G) {
3523
- const V = ((j = (J = G == null ? void 0 : G.response) == null ? void 0 : J.data) == null ? void 0 : j.message) || (G == null ? void 0 : G.message) || "Unable to load options";
3524
- vi.error(V);
3529
+ ((R = o.type) == null ? void 0 : R.toLowerCase()) === "datagrid" ? y("dataColumns", sn(X)) : y("options", an(X));
3530
+ } catch (H) {
3531
+ const V = ((j = (F = H == null ? void 0 : H.response) == null ? void 0 : F.data) == null ? void 0 : j.message) || (H == null ? void 0 : H.message) || "Unable to load options";
3532
+ hi.error(V);
3525
3533
  } finally {
3526
3534
  c(!1);
3527
3535
  }
3528
- }, [o.type, y, A.apiUrl]), z = ["manual", "api", "sheet"];
3536
+ }, [o.type, y, S.apiUrl]), J = ["manual", "api", "sheet"];
3529
3537
  function ai() {
3530
3538
  r === "api" && L();
3531
3539
  }
3532
3540
  const _ = () => {
3533
- var I, J;
3534
- return /* @__PURE__ */ b("div", { className: "flex flex-col justify-start gap-y-1", children: [
3535
- /* @__PURE__ */ n("div", { className: "flex items-center mb-4 gap-x-5", children: z == null ? void 0 : z.map((j) => /* @__PURE__ */ b("label", { className: "items-center text-base capitalize gap-x-3", children: [
3541
+ var R, F;
3542
+ return /* @__PURE__ */ v("div", { className: "flex flex-col justify-start gap-y-1", children: [
3543
+ /* @__PURE__ */ n("div", { className: "flex items-center mb-4 gap-x-5", children: J == null ? void 0 : J.map((j) => /* @__PURE__ */ v("label", { className: "items-center text-base capitalize gap-x-3", children: [
3536
3544
  /* @__PURE__ */ n(
3537
3545
  "input",
3538
3546
  {
3539
3547
  type: "radio",
3540
3548
  name: "optionType",
3541
- onChange: (G) => t(G.target.value),
3549
+ onChange: (H) => t(H.target.value),
3542
3550
  value: j
3543
3551
  }
3544
3552
  ),
3545
3553
  " ",
3546
- /* @__PURE__ */ b("span", { children: [
3554
+ /* @__PURE__ */ v("span", { children: [
3547
3555
  j,
3548
3556
  " options"
3549
3557
  ] })
3550
3558
  ] }, j)) }),
3551
- r === "api" && /* @__PURE__ */ b("div", { className: "mb-4", children: [
3552
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
3553
- /* @__PURE__ */ b("div", { className: "relative flex items-center w-full mb-2", children: [
3559
+ r === "api" && /* @__PURE__ */ v("div", { className: "mb-4", children: [
3560
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
3561
+ /* @__PURE__ */ v("div", { className: "relative flex items-center w-full mb-2", children: [
3554
3562
  /* @__PURE__ */ n(
3555
- H,
3563
+ O,
3556
3564
  {
3557
3565
  watch: g,
3558
3566
  label: "Load Options from Api",
3559
3567
  name: "apiUrl",
3560
- errors: S,
3568
+ errors: A,
3561
3569
  register: m,
3562
3570
  className: "!w-full",
3563
3571
  placeholder: "https://example.com/options",
@@ -3587,26 +3595,26 @@ const aa = M.object().shape({
3587
3595
  name: "options"
3588
3596
  }
3589
3597
  ) }),
3590
- /* @__PURE__ */ b("div", { children: [
3591
- /* @__PURE__ */ n("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((I = o == null ? void 0 : o.type) == null ? void 0 : I.toLowerCase()) === "matrix" ? "Rows Options" : "Parent Options" }),
3592
- N == null ? void 0 : N.map((j, G) => /* @__PURE__ */ b(
3598
+ /* @__PURE__ */ v("div", { children: [
3599
+ /* @__PURE__ */ n("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((R = o == null ? void 0 : o.type) == null ? void 0 : R.toLowerCase()) === "matrix" ? "Rows Options" : "Parent Options" }),
3600
+ N == null ? void 0 : N.map((j, H) => /* @__PURE__ */ v(
3593
3601
  "div",
3594
3602
  {
3595
3603
  className: "flex items-center mb-1 gap-x-4 last:mb-0",
3596
3604
  children: [
3597
3605
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3598
- H,
3606
+ O,
3599
3607
  {
3600
3608
  watch: g,
3601
- label: G === 0 ? "Label" : "",
3602
- name: `options.${G}.label`,
3609
+ label: H === 0 ? "Label" : "",
3610
+ name: `options.${H}.label`,
3603
3611
  register: m,
3604
- errors: S,
3612
+ errors: A,
3605
3613
  element: o,
3606
3614
  placeholder: "Label",
3607
3615
  onChange: (V) => {
3608
3616
  const oi = V.target.value.toLowerCase().trim().replace(/[\s-]+/g, "_").replace(/[^a-z0-9_]/g, "");
3609
- y(`options.${G}.value`, oi, {
3617
+ y(`options.${H}.value`, oi, {
3610
3618
  shouldValidate: !0,
3611
3619
  shouldDirty: !0
3612
3620
  });
@@ -3614,13 +3622,13 @@ const aa = M.object().shape({
3614
3622
  }
3615
3623
  ) }),
3616
3624
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3617
- H,
3625
+ O,
3618
3626
  {
3619
3627
  watch: g,
3620
- label: G === 0 ? "Value" : "",
3621
- name: `options.${G}.value`,
3628
+ label: H === 0 ? "Value" : "",
3629
+ name: `options.${H}.value`,
3622
3630
  register: m,
3623
- errors: S,
3631
+ errors: A,
3624
3632
  element: o,
3625
3633
  placeholder: "Value"
3626
3634
  }
@@ -3631,8 +3639,8 @@ const aa = M.object().shape({
3631
3639
  disabled: N.length === 1,
3632
3640
  type: "button",
3633
3641
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
3634
- onClick: () => Q(G),
3635
- children: /* @__PURE__ */ n(F, { icon: "iconamoon:sign-times-fill" })
3642
+ onClick: () => Q(H),
3643
+ children: /* @__PURE__ */ n(U, { icon: "iconamoon:sign-times-fill" })
3636
3644
  }
3637
3645
  )
3638
3646
  ]
@@ -3640,45 +3648,45 @@ const aa = M.object().shape({
3640
3648
  j.id
3641
3649
  )),
3642
3650
  " ",
3643
- /* @__PURE__ */ b("div", { children: [
3651
+ /* @__PURE__ */ v("div", { children: [
3644
3652
  " ",
3645
- /* @__PURE__ */ b(
3653
+ /* @__PURE__ */ v(
3646
3654
  "button",
3647
3655
  {
3648
3656
  type: "button",
3649
3657
  className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
3650
3658
  onClick: () => T({ label: "", value: "", id: ri() }),
3651
3659
  children: [
3652
- /* @__PURE__ */ n(F, { icon: "qlementine-icons:plus-16" }),
3660
+ /* @__PURE__ */ n(U, { icon: "qlementine-icons:plus-16" }),
3653
3661
  " Add Option"
3654
3662
  ]
3655
3663
  }
3656
3664
  )
3657
3665
  ] })
3658
3666
  ] }),
3659
- ["cascadeselect", "matrix"].includes(o.type.toLowerCase()) && /* @__PURE__ */ b(ti, { children: [
3667
+ ["cascadeselect", "matrix"].includes(o.type.toLowerCase()) && /* @__PURE__ */ v(ti, { children: [
3660
3668
  /* @__PURE__ */ n("hr", { className: "my-5" }),
3661
- /* @__PURE__ */ b("div", { children: [
3669
+ /* @__PURE__ */ v("div", { children: [
3662
3670
  " ",
3663
- /* @__PURE__ */ n("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((J = o == null ? void 0 : o.type) == null ? void 0 : J.toLowerCase()) === "matrix" ? "Columns Options" : "Child Options" }),
3664
- U == null ? void 0 : U.map((j, G) => /* @__PURE__ */ b(
3671
+ /* @__PURE__ */ n("h3", { className: "mb-4 text-sm text-gray-500 font-semibold", children: ((F = o == null ? void 0 : o.type) == null ? void 0 : F.toLowerCase()) === "matrix" ? "Columns Options" : "Child Options" }),
3672
+ z == null ? void 0 : z.map((j, H) => /* @__PURE__ */ v(
3665
3673
  "div",
3666
3674
  {
3667
3675
  className: "flex items-center mb-1 gap-x-4 last:mb-0",
3668
3676
  children: [
3669
3677
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3670
- H,
3678
+ O,
3671
3679
  {
3672
3680
  watch: g,
3673
- label: G === 0 ? "Label" : "",
3674
- name: `options1.${G}.label`,
3681
+ label: H === 0 ? "Label" : "",
3682
+ name: `options1.${H}.label`,
3675
3683
  register: m,
3676
- errors: S,
3684
+ errors: A,
3677
3685
  element: o,
3678
3686
  placeholder: "Label",
3679
3687
  onChange: (V) => {
3680
3688
  const oi = V.target.value.toLowerCase().trim().replace(/[\s-]+/g, "_").replace(/[^a-z0-9_]/g, "");
3681
- y(`options1.${G}.value`, oi, {
3689
+ y(`options1.${H}.value`, oi, {
3682
3690
  shouldValidate: !0,
3683
3691
  shouldDirty: !0
3684
3692
  });
@@ -3686,25 +3694,25 @@ const aa = M.object().shape({
3686
3694
  }
3687
3695
  ) }),
3688
3696
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3689
- H,
3697
+ O,
3690
3698
  {
3691
3699
  watch: g,
3692
- label: G === 0 ? "Value" : "",
3693
- name: `options1.${G}.value`,
3700
+ label: H === 0 ? "Value" : "",
3701
+ name: `options1.${H}.value`,
3694
3702
  register: m,
3695
- errors: S,
3703
+ errors: A,
3696
3704
  element: o,
3697
3705
  placeholder: "Value"
3698
3706
  }
3699
3707
  ) }),
3700
3708
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3701
- H,
3709
+ O,
3702
3710
  {
3703
3711
  watch: g,
3704
- label: G === 0 ? "Key" : "",
3705
- name: `options1.${G}.key`,
3712
+ label: H === 0 ? "Key" : "",
3713
+ name: `options1.${H}.key`,
3706
3714
  register: m,
3707
- errors: S,
3715
+ errors: A,
3708
3716
  element: o,
3709
3717
  placeholder: "Key"
3710
3718
  }
@@ -3712,27 +3720,27 @@ const aa = M.object().shape({
3712
3720
  /* @__PURE__ */ n(
3713
3721
  "button",
3714
3722
  {
3715
- disabled: U.length === 1,
3723
+ disabled: z.length === 1,
3716
3724
  type: "button",
3717
3725
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
3718
- onClick: () => w(G),
3719
- children: /* @__PURE__ */ n(F, { icon: "iconamoon:sign-times-fill" })
3726
+ onClick: () => w(H),
3727
+ children: /* @__PURE__ */ n(U, { icon: "iconamoon:sign-times-fill" })
3720
3728
  }
3721
3729
  )
3722
3730
  ]
3723
3731
  },
3724
3732
  j.id
3725
3733
  )),
3726
- /* @__PURE__ */ b("div", { children: [
3734
+ /* @__PURE__ */ v("div", { children: [
3727
3735
  " ",
3728
- /* @__PURE__ */ b(
3736
+ /* @__PURE__ */ v(
3729
3737
  "button",
3730
3738
  {
3731
3739
  type: "button",
3732
3740
  className: "flex items-center mt-2 text-sm font-medium text-gray-700 gap-x-1",
3733
3741
  onClick: () => q({ label: "", value: "", key: "", id: ri() }),
3734
3742
  children: [
3735
- /* @__PURE__ */ n(F, { icon: "qlementine-icons:plus-16" }),
3743
+ /* @__PURE__ */ n(U, { icon: "qlementine-icons:plus-16" }),
3736
3744
  " Add Option"
3737
3745
  ]
3738
3746
  }
@@ -3741,34 +3749,34 @@ const aa = M.object().shape({
3741
3749
  ] })
3742
3750
  ] })
3743
3751
  ] });
3744
- }, ni = () => /* @__PURE__ */ b("div", { className: "flex flex-col justify-start gap-y-1", children: [
3745
- /* @__PURE__ */ n("div", { className: "flex items-center mb-4 gap-x-5", children: z == null ? void 0 : z.map((I) => /* @__PURE__ */ b("label", { className: "items-center text-base capitalize gap-x-3", children: [
3752
+ }, ni = () => /* @__PURE__ */ v("div", { className: "flex flex-col justify-start gap-y-1", children: [
3753
+ /* @__PURE__ */ n("div", { className: "flex items-center mb-4 gap-x-5", children: J == null ? void 0 : J.map((R) => /* @__PURE__ */ v("label", { className: "items-center text-base capitalize gap-x-3", children: [
3746
3754
  /* @__PURE__ */ n(
3747
3755
  "input",
3748
3756
  {
3749
3757
  type: "radio",
3750
3758
  name: "optionType",
3751
- onChange: (J) => t(J.target.value),
3752
- value: I,
3753
- checked: I === r
3759
+ onChange: (F) => t(F.target.value),
3760
+ value: R,
3761
+ checked: R === r
3754
3762
  }
3755
3763
  ),
3756
3764
  " ",
3757
- /* @__PURE__ */ b("span", { children: [
3758
- I,
3765
+ /* @__PURE__ */ v("span", { children: [
3766
+ R,
3759
3767
  " options"
3760
3768
  ] })
3761
- ] }, I)) }),
3762
- r === "api" && /* @__PURE__ */ b("div", { className: "mb-4", children: [
3763
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
3764
- /* @__PURE__ */ b("div", { className: "relative flex items-center w-full mb-2", children: [
3769
+ ] }, R)) }),
3770
+ r === "api" && /* @__PURE__ */ v("div", { className: "mb-4", children: [
3771
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
3772
+ /* @__PURE__ */ v("div", { className: "relative flex items-center w-full mb-2", children: [
3765
3773
  /* @__PURE__ */ n(
3766
- H,
3774
+ O,
3767
3775
  {
3768
3776
  watch: g,
3769
3777
  label: "Load Columns from Api",
3770
3778
  name: "apiUrl",
3771
- errors: S,
3779
+ errors: A,
3772
3780
  register: m,
3773
3781
  className: "!w-full",
3774
3782
  placeholder: "https://example.com/columns"
@@ -3798,11 +3806,11 @@ const aa = M.object().shape({
3798
3806
  name: "dataColumns"
3799
3807
  }
3800
3808
  ) }),
3801
- /* @__PURE__ */ n("div", { className: "grid gap-y-3", children: Y == null ? void 0 : Y.map((I, J) => /* @__PURE__ */ b("div", { className: "flex items-center gap-x-4 ", children: [
3809
+ /* @__PURE__ */ n("div", { className: "grid gap-y-3", children: Y == null ? void 0 : Y.map((R, F) => /* @__PURE__ */ v("div", { className: "flex items-center gap-x-4 ", children: [
3802
3810
  /* @__PURE__ */ n("div", { className: "min-w-[140px]", children: /* @__PURE__ */ n(
3803
3811
  Si,
3804
3812
  {
3805
- label: J === 0 ? "Type" : "",
3813
+ label: F === 0 ? "Type" : "",
3806
3814
  options: [
3807
3815
  {
3808
3816
  label: "Text",
@@ -3818,45 +3826,58 @@ const aa = M.object().shape({
3818
3826
  }
3819
3827
  ],
3820
3828
  register: m,
3821
- name: `dataColumns.${J}.type`,
3829
+ name: `dataColumns.${F}.type`,
3822
3830
  setValue: y,
3823
3831
  trigger: p,
3824
- value: A.dataColumns[J].type
3832
+ value: S.dataColumns[F].type
3825
3833
  }
3826
3834
  ) }),
3827
3835
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3828
- H,
3836
+ O,
3829
3837
  {
3830
3838
  watch: g,
3831
- label: J === 0 ? "Display header" : "",
3832
- name: `dataColumns.${J}.headerName`,
3839
+ label: F === 0 ? "Display header" : "",
3840
+ name: `dataColumns.${F}.headerName`,
3833
3841
  register: m,
3834
3842
  onChange: (j) => {
3835
3843
  const V = j.target.value.toLowerCase().trim().replace(/[\s-]+/g, "_").replace(/[^a-z0-9_]/g, "");
3836
- y(`dataColumns.${J}.field`, V, {
3844
+ y(`dataColumns.${F}.field`, V, {
3837
3845
  shouldValidate: !0,
3838
3846
  shouldDirty: !0
3839
3847
  });
3840
3848
  },
3841
- errors: S,
3849
+ errors: A,
3842
3850
  element: o,
3843
3851
  placeholder: "header"
3844
3852
  }
3845
3853
  ) }),
3854
+ /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
3855
+ O,
3856
+ {
3857
+ watch: g,
3858
+ label: F === 0 ? "Field key" : "",
3859
+ name: `dataColumns.${F}.field`,
3860
+ register: m,
3861
+ errors: A,
3862
+ element: o,
3863
+ placeholder: "fieldKey",
3864
+ disabled: !0
3865
+ }
3866
+ ) }),
3846
3867
  /* @__PURE__ */ n(
3847
3868
  "button",
3848
3869
  {
3849
3870
  disabled: Y.length === 1,
3850
3871
  type: "button",
3851
3872
  className: "outline-none hover:opacity-80 disabled:opacity-40 disabled:cursor-not-allowed",
3852
- onClick: () => O(J),
3853
- children: /* @__PURE__ */ n(F, { icon: "iconamoon:sign-times-fill" })
3873
+ onClick: () => G(F),
3874
+ children: /* @__PURE__ */ n(U, { icon: "iconamoon:sign-times-fill" })
3854
3875
  }
3855
3876
  )
3856
- ] }, I.id)) }),
3857
- /* @__PURE__ */ b("div", { children: [
3877
+ ] }, R.id)) }),
3878
+ /* @__PURE__ */ v("div", { children: [
3858
3879
  " ",
3859
- /* @__PURE__ */ b(
3880
+ /* @__PURE__ */ v(
3860
3881
  "button",
3861
3882
  {
3862
3883
  type: "button",
@@ -3870,39 +3891,39 @@ const aa = M.object().shape({
3870
3891
  validate: !1
3871
3892
  }),
3872
3893
  children: [
3873
- /* @__PURE__ */ n(F, { icon: "qlementine-icons:plus-16" }),
3894
+ /* @__PURE__ */ n(U, { icon: "qlementine-icons:plus-16" }),
3874
3895
  " Add column"
3875
3896
  ]
3876
3897
  }
3877
3898
  )
3878
3899
  ] })
3879
3900
  ] }), ui = Z(async () => {
3880
- const I = di("token"), { status: J, data: j } = await xi.get(A.url, {
3901
+ const R = di("token"), { status: F, data: j } = await xi.get(S.url, {
3881
3902
  headers: {
3882
- Authorization: `Bearer ${I}`
3903
+ Authorization: `Bearer ${R}`
3883
3904
  }
3884
3905
  });
3885
- J === 200 && y("options", (j == null ? void 0 : j.data) || j);
3886
- }, [y, A.url]);
3887
- R(() => {
3888
- o.type === "document" && A.url && ui();
3889
- }, [A.url, o.type, ui]);
3906
+ F === 200 && y("options", (j == null ? void 0 : j.data) || j);
3907
+ }, [y, S.url]);
3908
+ I(() => {
3909
+ o.type === "document" && S.url && ui();
3910
+ }, [S.url, o.type, ui]);
3890
3911
  const li = /* @__PURE__ */ n(
3891
3912
  "div",
3892
3913
  {
3893
3914
  className: "fixed inset-0 bg-gray-800/40 backdrop-blur-sm flex items-center justify-end z-[999] cursor-default",
3894
- onMouseDown: (I) => I.stopPropagation(),
3895
- onPointerDown: (I) => I.stopPropagation(),
3896
- onDragStart: (I) => {
3897
- I.preventDefault(), I.stopPropagation();
3915
+ onMouseDown: (R) => R.stopPropagation(),
3916
+ onPointerDown: (R) => R.stopPropagation(),
3917
+ onDragStart: (R) => {
3918
+ R.preventDefault(), R.stopPropagation();
3898
3919
  },
3899
- children: /* @__PURE__ */ b("div", { className: "w-full lg:w-2/3 xl:w-2/5 bg-white h-screen shadow-xl relative flex flex-col items-center", children: [
3920
+ children: /* @__PURE__ */ v("div", { className: "w-full lg:w-2/3 xl:w-2/5 bg-white h-screen shadow-xl relative flex flex-col items-center", children: [
3900
3921
  /* @__PURE__ */ n(
3901
3922
  "button",
3902
3923
  {
3903
3924
  className: "bg-white h-10 w-10 flex justify-center items-center absolute top-1 -left-12 rounded-lg hover:bg-gray-50",
3904
3925
  onClick: e,
3905
- children: /* @__PURE__ */ n(F, { icon: "tabler:x", iconClass: "text-xl" })
3926
+ children: /* @__PURE__ */ n(U, { icon: "tabler:x", iconClass: "text-xl" })
3906
3927
  }
3907
3928
  ),
3908
3929
  /* @__PURE__ */ n("div", { className: "w-full pt-4", children: /* @__PURE__ */ n(
@@ -3915,84 +3936,84 @@ const aa = M.object().shape({
3915
3936
  btnClass: " !text-left"
3916
3937
  }
3917
3938
  ) }),
3918
- /* @__PURE__ */ b(
3939
+ /* @__PURE__ */ v(
3919
3940
  "form",
3920
3941
  {
3921
- onSubmit: v(D),
3942
+ onSubmit: b(D),
3922
3943
  className: "w-full flex-1 flex flex-col",
3923
3944
  children: [
3924
- /* @__PURE__ */ b("div", { className: "flex-1", children: [
3945
+ /* @__PURE__ */ v("div", { className: "flex-1", children: [
3925
3946
  " ",
3926
- /* @__PURE__ */ b("div", { className: " max-h-[70vh] overflow-y-auto flex-1", children: [
3927
- l === "basic" && /* @__PURE__ */ b("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
3928
- Ui.includes(o.inputType) && /* @__PURE__ */ n(ti, { children: /* @__PURE__ */ n(
3929
- H,
3947
+ /* @__PURE__ */ v("div", { className: " max-h-[70vh] overflow-y-auto flex-1", children: [
3948
+ l === "basic" && /* @__PURE__ */ v("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
3949
+ Wi.includes(o.inputType) && /* @__PURE__ */ n(ti, { children: /* @__PURE__ */ n(
3950
+ O,
3930
3951
  {
3931
3952
  watch: g,
3932
3953
  label: "Value",
3933
3954
  name: "value",
3934
3955
  register: m,
3935
- errors: S,
3956
+ errors: A,
3936
3957
  element: o
3937
3958
  }
3938
3959
  ) }),
3939
- !Ui.includes(o.inputType) && !Ti.includes(o.inputType) && /* @__PURE__ */ b(ti, { children: [
3960
+ !Wi.includes(o.inputType) && !Ti.includes(o.inputType) && /* @__PURE__ */ v(ti, { children: [
3940
3961
  /* @__PURE__ */ n(
3941
- H,
3962
+ O,
3942
3963
  {
3943
3964
  watch: g,
3944
3965
  label: "Label",
3945
3966
  name: "inputLabel",
3946
3967
  register: m,
3947
- errors: S,
3968
+ errors: A,
3948
3969
  element: o
3949
3970
  }
3950
3971
  ),
3951
3972
  " ",
3952
3973
  o.type.toLowerCase() === "cascadeselect" && /* @__PURE__ */ n(
3953
- H,
3974
+ O,
3954
3975
  {
3955
3976
  watch: g,
3956
3977
  label: "Child Label",
3957
3978
  name: "childLabel",
3958
3979
  register: m,
3959
- errors: S,
3980
+ errors: A,
3960
3981
  element: o
3961
3982
  }
3962
3983
  )
3963
3984
  ] }),
3964
- Wo.includes(o.inputType) && /* @__PURE__ */ n(
3965
- H,
3985
+ Uo.includes(o.inputType) && /* @__PURE__ */ n(
3986
+ O,
3966
3987
  {
3967
3988
  watch: g,
3968
3989
  label: "Placeholder",
3969
3990
  name: "placeholder",
3970
3991
  register: m,
3971
- errors: S,
3992
+ errors: A,
3972
3993
  element: o
3973
3994
  }
3974
3995
  ),
3975
3996
  Vo.includes(o.inputType) && /* @__PURE__ */ n(
3976
- H,
3997
+ O,
3977
3998
  {
3978
3999
  watch: g,
3979
4000
  label: "Prefix",
3980
4001
  name: "prefix",
3981
4002
  register: m,
3982
- errors: S,
4003
+ errors: A,
3983
4004
  element: o
3984
4005
  }
3985
4006
  ),
3986
- Jo.includes(o.inputType) && /* @__PURE__ */ b("div", { className: "grid gap-y-4", children: [
4007
+ Jo.includes(o.inputType) && /* @__PURE__ */ v("div", { className: "grid gap-y-4", children: [
3987
4008
  /* @__PURE__ */ n(_o, {}),
3988
4009
  /* @__PURE__ */ n(
3989
- H,
4010
+ O,
3990
4011
  {
3991
4012
  watch: g,
3992
4013
  label: "Api Url",
3993
4014
  name: "url",
3994
4015
  register: m,
3995
- errors: S,
4016
+ errors: A,
3996
4017
  element: o
3997
4018
  }
3998
4019
  ),
@@ -4042,24 +4063,24 @@ const aa = M.object().shape({
4042
4063
  Zo.includes(o.inputType) && /* @__PURE__ */ n(
4043
4064
  Yo,
4044
4065
  {
4045
- onChange: (I) => {
4046
- y("denominators", I);
4066
+ onChange: (R) => {
4067
+ y("denominators", R);
4047
4068
  },
4048
4069
  value: g("denominators")
4049
4070
  }
4050
4071
  ),
4051
- !Ui.includes(o.inputType) && !Ti.includes(o.inputType) && /* @__PURE__ */ n(
4052
- H,
4072
+ !Wi.includes(o.inputType) && !Ti.includes(o.inputType) && /* @__PURE__ */ n(
4073
+ O,
4053
4074
  {
4054
4075
  watch: g,
4055
4076
  label: "Short Description",
4056
4077
  name: "description",
4057
4078
  register: m,
4058
- errors: S,
4079
+ errors: A,
4059
4080
  element: o
4060
4081
  }
4061
4082
  ),
4062
- o.type.toLowerCase() === "date" && /* @__PURE__ */ b(ti, { children: [
4083
+ o.type.toLowerCase() === "date" && /* @__PURE__ */ v(ti, { children: [
4063
4084
  /* @__PURE__ */ n(
4064
4085
  Si,
4065
4086
  {
@@ -4073,24 +4094,24 @@ const aa = M.object().shape({
4073
4094
  }
4074
4095
  ),
4075
4096
  /* @__PURE__ */ n(
4076
- H,
4097
+ O,
4077
4098
  {
4078
4099
  watch: g,
4079
4100
  label: "Allow Range",
4080
4101
  name: "canHaveDateRange",
4081
4102
  register: m,
4082
- errors: S,
4103
+ errors: A,
4083
4104
  element: o,
4084
4105
  type: "checkbox",
4085
- value: A.canHaveDateRange
4106
+ value: S.canHaveDateRange
4086
4107
  }
4087
4108
  ),
4088
- (A == null ? void 0 : A.canHaveDateRange) && /* @__PURE__ */ b("div", { className: "grid grid-cols-2 gap-4", children: [
4109
+ (S == null ? void 0 : S.canHaveDateRange) && /* @__PURE__ */ v("div", { className: "grid grid-cols-2 gap-4", children: [
4089
4110
  /* @__PURE__ */ n(
4090
4111
  $i,
4091
4112
  {
4092
4113
  name: "minDate",
4093
- value: A == null ? void 0 : A.minDate,
4114
+ value: S == null ? void 0 : S.minDate,
4094
4115
  onGetValue: y,
4095
4116
  placeholder: "Select min date"
4096
4117
  }
@@ -4099,38 +4120,38 @@ const aa = M.object().shape({
4099
4120
  $i,
4100
4121
  {
4101
4122
  name: "maxDate",
4102
- value: A == null ? void 0 : A.minDate,
4123
+ value: S == null ? void 0 : S.minDate,
4103
4124
  onGetValue: y,
4104
4125
  placeholder: "Select max date",
4105
- minDate: A == null ? void 0 : A.minDate
4126
+ minDate: S == null ? void 0 : S.minDate
4106
4127
  }
4107
4128
  )
4108
4129
  ] }),
4109
4130
  /* @__PURE__ */ n(
4110
- H,
4131
+ O,
4111
4132
  {
4112
4133
  watch: g,
4113
4134
  label: "Allow Year Picker",
4114
4135
  name: "allowYearPicker",
4115
4136
  register: m,
4116
- errors: S,
4137
+ errors: A,
4117
4138
  element: o,
4118
4139
  type: "checkbox",
4119
- value: A.allowYearPicker
4140
+ value: S.allowYearPicker
4120
4141
  }
4121
4142
  )
4122
4143
  ] }),
4123
4144
  o.type.toLowerCase() === "country" && /* @__PURE__ */ n(
4124
- H,
4145
+ O,
4125
4146
  {
4126
4147
  watch: g,
4127
4148
  label: "Allow States",
4128
4149
  name: "showState",
4129
4150
  register: m,
4130
- errors: S,
4151
+ errors: A,
4131
4152
  element: o,
4132
4153
  type: "checkbox",
4133
- value: A.showState
4154
+ value: S.showState
4134
4155
  }
4135
4156
  ),
4136
4157
  o.type.toLowerCase() === "selectfield" && /* @__PURE__ */ n(
@@ -4155,73 +4176,73 @@ const aa = M.object().shape({
4155
4176
  }
4156
4177
  ),
4157
4178
  o.type.toLowerCase() === "grid" && /* @__PURE__ */ n(
4158
- H,
4179
+ O,
4159
4180
  {
4160
4181
  watch: g,
4161
4182
  label: "Number of columns (max: 4)",
4162
4183
  name: "columns",
4163
4184
  register: m,
4164
- errors: S,
4185
+ errors: A,
4165
4186
  element: o,
4166
4187
  max: 4,
4167
4188
  min: 1
4168
4189
  }
4169
4190
  ),
4170
- o.type.toLowerCase() === "document" && /* @__PURE__ */ b("div", { className: "grid gap-y-6", children: [
4171
- /* @__PURE__ */ b("div", { className: "grid gap-y-1", children: [
4191
+ o.type.toLowerCase() === "document" && /* @__PURE__ */ v("div", { className: "grid gap-y-6", children: [
4192
+ /* @__PURE__ */ v("div", { className: "grid gap-y-1", children: [
4172
4193
  /* @__PURE__ */ n(
4173
- H,
4194
+ O,
4174
4195
  {
4175
4196
  watch: g,
4176
4197
  label: "Document Options Url",
4177
4198
  name: "url",
4178
4199
  register: m,
4179
- errors: S,
4200
+ errors: A,
4180
4201
  element: o
4181
4202
  }
4182
4203
  ),
4183
4204
  " ",
4184
4205
  /* @__PURE__ */ n(Xo, {})
4185
4206
  ] }),
4186
- /* @__PURE__ */ b("div", { className: "grid gap-y-1", children: [
4207
+ /* @__PURE__ */ v("div", { className: "grid gap-y-1", children: [
4187
4208
  /* @__PURE__ */ n(
4188
- H,
4209
+ O,
4189
4210
  {
4190
4211
  watch: g,
4191
4212
  label: "Document Validation Url",
4192
4213
  name: "validationUrl",
4193
4214
  register: m,
4194
- errors: S,
4215
+ errors: A,
4195
4216
  element: o
4196
4217
  }
4197
4218
  ),
4198
4219
  /* @__PURE__ */ n(ia, {})
4199
4220
  ] }),
4200
4221
  /* @__PURE__ */ n("div", { className: "grid gap-y-1", children: /* @__PURE__ */ n(
4201
- H,
4222
+ O,
4202
4223
  {
4203
4224
  watch: g,
4204
4225
  label: "Signature Page Url",
4205
4226
  name: "signatureLink",
4206
4227
  register: m,
4207
- errors: S,
4228
+ errors: A,
4208
4229
  element: o
4209
4230
  }
4210
4231
  ) })
4211
4232
  ] }),
4212
4233
  o.type.toLowerCase() === "datagrid" && ni(),
4213
- o.type.toLowerCase() === "file" && /* @__PURE__ */ b(ti, { children: [
4234
+ o.type.toLowerCase() === "file" && /* @__PURE__ */ v(ti, { children: [
4214
4235
  /* @__PURE__ */ n(
4215
- H,
4236
+ O,
4216
4237
  {
4217
4238
  watch: g,
4218
4239
  label: "Allow Multiple Uploads",
4219
4240
  name: "isMultiple",
4220
4241
  register: m,
4221
- errors: S,
4242
+ errors: A,
4222
4243
  element: o,
4223
4244
  type: "checkbox",
4224
- value: A.isMultiple
4245
+ value: S.isMultiple
4225
4246
  }
4226
4247
  ),
4227
4248
  /* @__PURE__ */ n(
@@ -4230,7 +4251,7 @@ const aa = M.object().shape({
4230
4251
  element: {
4231
4252
  options: qo,
4232
4253
  id: "acceptedFiles",
4233
- value: A == null ? void 0 : A.acceptedFiles
4254
+ value: S == null ? void 0 : S.acceptedFiles
4234
4255
  },
4235
4256
  validationData: { register: m, setValue: y, trigger: p, watch: g },
4236
4257
  placeholder: "Choose file types"
@@ -4238,22 +4259,22 @@ const aa = M.object().shape({
4238
4259
  )
4239
4260
  ] }),
4240
4261
  zo.includes(o.inputType) && _(),
4241
- /* @__PURE__ */ b("div", { children: [
4262
+ /* @__PURE__ */ v("div", { children: [
4242
4263
  /* @__PURE__ */ n("div", { className: "w-[150px] mb-4", children: /* @__PURE__ */ n(
4243
- H,
4264
+ O,
4244
4265
  {
4245
4266
  watch: g,
4246
4267
  label: "Toggle Visibility",
4247
4268
  name: "isHidden",
4248
4269
  register: m,
4249
- errors: S,
4270
+ errors: A,
4250
4271
  element: o,
4251
4272
  type: "checkbox",
4252
- value: A.isHidden
4273
+ value: S.isHidden
4253
4274
  }
4254
4275
  ) }),
4255
4276
  " ",
4256
- A.isHidden && /* @__PURE__ */ n(
4277
+ S.isHidden && /* @__PURE__ */ n(
4257
4278
  oa,
4258
4279
  {
4259
4280
  register: m,
@@ -4265,137 +4286,137 @@ const aa = M.object().shape({
4265
4286
  )
4266
4287
  ] })
4267
4288
  ] }),
4268
- !Ti.includes(o.type.toLowerCase()) && l === "validation" && /* @__PURE__ */ b("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
4269
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4289
+ !Ti.includes(o.type.toLowerCase()) && l === "validation" && /* @__PURE__ */ v("div", { className: "z-10 flex flex-col w-full gap-5 px-6", children: [
4290
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4270
4291
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4271
- H,
4292
+ O,
4272
4293
  {
4273
4294
  watch: g,
4274
4295
  label: "Required",
4275
4296
  name: "isRequired",
4276
4297
  register: m,
4277
- errors: S,
4298
+ errors: A,
4278
4299
  element: o,
4279
4300
  type: "checkbox",
4280
- value: A.isRequired
4301
+ value: S.isRequired
4281
4302
  }
4282
4303
  ) }),
4283
4304
  " ",
4284
4305
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4285
- H,
4306
+ O,
4286
4307
  {
4287
4308
  watch: g,
4288
4309
  label: "Error message text",
4289
4310
  name: "requiredMessage",
4290
4311
  register: m,
4291
- errors: S,
4312
+ errors: A,
4292
4313
  element: o
4293
4314
  }
4294
4315
  ) })
4295
4316
  ] }),
4296
- Fo.includes(o.inputType) && /* @__PURE__ */ b(ti, { children: [
4297
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4317
+ Fo.includes(o.inputType) && /* @__PURE__ */ v(ti, { children: [
4318
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4298
4319
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4299
- H,
4320
+ O,
4300
4321
  {
4301
4322
  watch: g,
4302
4323
  label: "Min Length",
4303
4324
  name: "minLength",
4304
4325
  register: m,
4305
- errors: S,
4326
+ errors: A,
4306
4327
  element: o,
4307
4328
  type: "number"
4308
4329
  }
4309
4330
  ) }),
4310
4331
  " ",
4311
4332
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4312
- H,
4333
+ O,
4313
4334
  {
4314
4335
  watch: g,
4315
4336
  label: "Error message text",
4316
4337
  name: "minLengthMessage",
4317
4338
  register: m,
4318
- errors: S,
4339
+ errors: A,
4319
4340
  element: o
4320
4341
  }
4321
4342
  ) })
4322
4343
  ] }),
4323
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4344
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4324
4345
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4325
- H,
4346
+ O,
4326
4347
  {
4327
4348
  watch: g,
4328
4349
  label: "Max Length",
4329
4350
  name: "maxLength",
4330
4351
  register: m,
4331
- errors: S,
4352
+ errors: A,
4332
4353
  element: o,
4333
4354
  type: "number"
4334
4355
  }
4335
4356
  ) }),
4336
4357
  " ",
4337
4358
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4338
- H,
4359
+ O,
4339
4360
  {
4340
4361
  watch: g,
4341
4362
  label: "Error message text",
4342
4363
  name: "maxLengthMessage",
4343
4364
  register: m,
4344
- errors: S,
4365
+ errors: A,
4345
4366
  element: o
4346
4367
  }
4347
4368
  ) })
4348
4369
  ] })
4349
4370
  ] }),
4350
- Uo.includes(o.inputType) && /* @__PURE__ */ b(ti, { children: [
4351
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4371
+ Wo.includes(o.inputType) && /* @__PURE__ */ v(ti, { children: [
4372
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4352
4373
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4353
- H,
4374
+ O,
4354
4375
  {
4355
4376
  watch: g,
4356
4377
  label: "Min Amount",
4357
4378
  name: "minAmount",
4358
4379
  register: m,
4359
- errors: S,
4380
+ errors: A,
4360
4381
  element: o,
4361
4382
  type: "amount"
4362
4383
  }
4363
4384
  ) }),
4364
4385
  " ",
4365
4386
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4366
- H,
4387
+ O,
4367
4388
  {
4368
4389
  watch: g,
4369
4390
  label: "Error message text",
4370
4391
  name: "minAmountMessage",
4371
4392
  register: m,
4372
- errors: S,
4393
+ errors: A,
4373
4394
  element: o
4374
4395
  }
4375
4396
  ) })
4376
4397
  ] }),
4377
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-6", children: [
4398
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-6", children: [
4378
4399
  /* @__PURE__ */ n("div", { className: "w-[150px]", children: /* @__PURE__ */ n(
4379
- H,
4400
+ O,
4380
4401
  {
4381
4402
  watch: g,
4382
4403
  label: "Max Amount",
4383
4404
  name: "maxAmount",
4384
4405
  register: m,
4385
- errors: S,
4406
+ errors: A,
4386
4407
  element: o,
4387
4408
  type: "amount"
4388
4409
  }
4389
4410
  ) }),
4390
4411
  " ",
4391
4412
  /* @__PURE__ */ n("div", { className: "flex-1", children: /* @__PURE__ */ n(
4392
- H,
4413
+ O,
4393
4414
  {
4394
4415
  watch: g,
4395
4416
  label: "Error message text",
4396
4417
  name: "maxAmountMessage",
4397
4418
  register: m,
4398
- errors: S,
4419
+ errors: A,
4399
4420
  element: o
4400
4421
  }
4401
4422
  ) })
@@ -4404,7 +4425,7 @@ const aa = M.object().shape({
4404
4425
  ] })
4405
4426
  ] })
4406
4427
  ] }),
4407
- /* @__PURE__ */ b("div", { className: "sticky flex w-full gap-3 px-6 pt-8 pb-10 mt-10 border-t", children: [
4428
+ /* @__PURE__ */ v("div", { className: "sticky flex w-full gap-3 px-6 pt-8 pb-10 mt-10 border-t", children: [
4408
4429
  /* @__PURE__ */ n(
4409
4430
  "button",
4410
4431
  {
@@ -4443,7 +4464,7 @@ const aa = M.object().shape({
4443
4464
  ), c = Z(() => {
4444
4465
  l(e.id, e.sectionId);
4445
4466
  }, [e.id, e.sectionId, l]);
4446
- return /* @__PURE__ */ b("div", { className: "w-full min-w-0", children: [
4467
+ return /* @__PURE__ */ v("div", { className: "w-full min-w-0", children: [
4447
4468
  s && /* @__PURE__ */ n(
4448
4469
  la,
4449
4470
  {
@@ -4452,20 +4473,20 @@ const aa = M.object().shape({
4452
4473
  element: e
4453
4474
  }
4454
4475
  ),
4455
- /* @__PURE__ */ b("div", { className: "flex items-center justify-between mb-2", children: [
4456
- /* @__PURE__ */ b("span", { children: [
4476
+ /* @__PURE__ */ v("div", { className: "flex items-center justify-between mb-2", children: [
4477
+ /* @__PURE__ */ v("span", { children: [
4457
4478
  " ",
4458
- e.inputLabel && /* @__PURE__ */ b("label", { className: "text-sm font-medium input_label", children: [
4479
+ e.inputLabel && /* @__PURE__ */ v("label", { className: "text-sm font-medium input_label", children: [
4459
4480
  e.inputLabel,
4460
4481
  " ",
4461
- u && /* @__PURE__ */ b("span", { className: "text-gray-400 text-xs", children: [
4482
+ u && /* @__PURE__ */ v("span", { className: "text-gray-400 text-xs", children: [
4462
4483
  "(",
4463
4484
  u == null ? void 0 : u.toLowerCase(),
4464
4485
  ")"
4465
4486
  ] })
4466
4487
  ] })
4467
4488
  ] }),
4468
- i === "edit" && /* @__PURE__ */ b("span", { className: "flex items-center gap-x-3", children: [
4489
+ i === "edit" && /* @__PURE__ */ v("span", { className: "flex items-center gap-x-3", children: [
4469
4490
  /* @__PURE__ */ n(
4470
4491
  "button",
4471
4492
  {
@@ -4473,7 +4494,7 @@ const aa = M.object().shape({
4473
4494
  className: "text-sm outline-none hover:opacity-80 py-1 text-gray-600",
4474
4495
  onClick: () => d(e == null ? void 0 : e.id, e.sectionId),
4475
4496
  title: "Duplicate",
4476
- children: /* @__PURE__ */ n(F, { icon: "tabler:copy", iconClass: "text-base" })
4497
+ children: /* @__PURE__ */ n(U, { icon: "tabler:copy", iconClass: "text-base" })
4477
4498
  }
4478
4499
  ),
4479
4500
  /* @__PURE__ */ n(
@@ -4483,7 +4504,7 @@ const aa = M.object().shape({
4483
4504
  className: "text-sm outline-none hover:opacity-80 text-gray-600 py-1",
4484
4505
  onClick: () => a(!0),
4485
4506
  title: "Edit",
4486
- children: /* @__PURE__ */ n(F, { icon: "circum:edit", iconClass: "text-base" })
4507
+ children: /* @__PURE__ */ n(U, { icon: "circum:edit", iconClass: "text-base" })
4487
4508
  }
4488
4509
  ),
4489
4510
  /* @__PURE__ */ n(
@@ -4493,7 +4514,7 @@ const aa = M.object().shape({
4493
4514
  className: "text-sm outline-none hover:opacity-80 text-gray-600 py-1",
4494
4515
  onClick: c,
4495
4516
  title: "Remove",
4496
- children: /* @__PURE__ */ n(F, { icon: "iconamoon:trash", iconClass: "text-base" })
4517
+ children: /* @__PURE__ */ n(U, { icon: "iconamoon:trash", iconClass: "text-base" })
4497
4518
  }
4498
4519
  )
4499
4520
  ] })
@@ -4516,7 +4537,7 @@ function da({
4516
4537
  } = e || {};
4517
4538
  let u;
4518
4539
  return l && (u = l()[i.id]), /* @__PURE__ */ n(
4519
- H,
4540
+ O,
4520
4541
  {
4521
4542
  placeholder: i.placeholder,
4522
4543
  type: i.inputType,
@@ -4543,7 +4564,7 @@ const ca = ({ imageUrl: i }) => {
4543
4564
  }, a = () => {
4544
4565
  o(!1);
4545
4566
  };
4546
- return /* @__PURE__ */ b("div", { children: [
4567
+ return /* @__PURE__ */ v("div", { children: [
4547
4568
  /* @__PURE__ */ n(
4548
4569
  "img",
4549
4570
  {
@@ -4577,7 +4598,7 @@ const ca = ({ imageUrl: i }) => {
4577
4598
  alignItems: "center"
4578
4599
  },
4579
4600
  onClick: a,
4580
- children: /* @__PURE__ */ b(
4601
+ children: /* @__PURE__ */ v(
4581
4602
  "div",
4582
4603
  {
4583
4604
  className: "modal-content",
@@ -4628,37 +4649,37 @@ function ta({
4628
4649
  element: i,
4629
4650
  validationData: e
4630
4651
  }) {
4631
- var A;
4632
- const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, d] = P(), [u, c] = P(!1), [r, t] = P(!1), [h, m] = P(""), v = a && a(i == null ? void 0 : i.id);
4633
- R(() => {
4634
- d(v);
4635
- }, [v]);
4652
+ var S;
4653
+ const { register: o = () => ({}), setValue: s, watch: a } = e || {}, [l, d] = P(), [u, c] = P(!1), [r, t] = P(!1), [h, m] = P(""), b = a && a(i == null ? void 0 : i.id);
4654
+ I(() => {
4655
+ d(b);
4656
+ }, [b]);
4636
4657
  const [f, y] = P("");
4637
- R(() => {
4658
+ I(() => {
4638
4659
  o(i.id);
4639
4660
  }, [i.id, o]);
4640
- const { url: g, method: p, responseType: S } = i || {}, x = {
4661
+ const { url: g, method: p, responseType: A } = i || {}, x = {
4641
4662
  headers: {
4642
4663
  Authorization: `Bearer ${di("token")}`
4643
4664
  }
4644
4665
  }, k = Z(
4645
4666
  async (N) => {
4646
- var T, Q, U, q, w, Y, K, O, D, E, B;
4667
+ var T, Q, z, q, w, Y, K, G, D, E, B;
4647
4668
  if (!(!g || !p)) {
4648
4669
  c(!0);
4649
4670
  try {
4650
4671
  let L;
4651
4672
  if (p.toLowerCase() === "get") {
4652
- const z = `${g}?value=${N}`;
4653
- L = await xi.get(z, x);
4673
+ const J = `${g}?value=${N}`;
4674
+ L = await xi.get(J, x);
4654
4675
  } else if (p.toLowerCase() === "post")
4655
4676
  L = await xi.post(g, { value: N }, x);
4656
4677
  else
4657
4678
  throw new Error("Unsupported HTTP method");
4658
- L.status === 200 && ((((Q = (T = L == null ? void 0 : L.data) == null ? void 0 : T.data) == null ? void 0 : Q.status) || ((U = L == null ? void 0 : L.data) == null ? void 0 : U.status)) === !0 ? (t(!0), S === "string" ? m(
4679
+ L.status === 200 && ((((Q = (T = L == null ? void 0 : L.data) == null ? void 0 : T.data) == null ? void 0 : Q.status) || ((z = L == null ? void 0 : L.data) == null ? void 0 : z.status)) === !0 ? (t(!0), A === "string" ? m(
4659
4680
  ((w = (q = L == null ? void 0 : L.data) == null ? void 0 : q.data) == null ? void 0 : w.description) || ((Y = L == null ? void 0 : L.data) == null ? void 0 : Y.description) || "Validation successful"
4660
4681
  ) : y(
4661
- ((O = (K = L == null ? void 0 : L.data) == null ? void 0 : K.data) == null ? void 0 : O.description) || ((D = L == null ? void 0 : L.data) == null ? void 0 : D.description) || {}
4682
+ ((G = (K = L == null ? void 0 : L.data) == null ? void 0 : K.data) == null ? void 0 : G.description) || ((D = L == null ? void 0 : L.data) == null ? void 0 : D.description) || {}
4662
4683
  )) : (console.error("Invalid input:", N), m("Unable to validate input"), t(!1)));
4663
4684
  } catch (L) {
4664
4685
  console.error("Error validating input:", L), m(
@@ -4669,17 +4690,17 @@ function ta({
4669
4690
  }
4670
4691
  }
4671
4692
  },
4672
- [p, S, g]
4693
+ [p, A, g]
4673
4694
  );
4674
- return R(() => {
4695
+ return I(() => {
4675
4696
  if (l) {
4676
4697
  const N = setTimeout(() => {
4677
4698
  k(l);
4678
4699
  }, 700);
4679
4700
  return () => clearTimeout(N);
4680
4701
  }
4681
- }, [k, l]), /* @__PURE__ */ b("div", { children: [
4682
- /* @__PURE__ */ b("div", { className: "relative flex items-center", children: [
4702
+ }, [k, l]), /* @__PURE__ */ v("div", { children: [
4703
+ /* @__PURE__ */ v("div", { className: "relative flex items-center", children: [
4683
4704
  /* @__PURE__ */ n(
4684
4705
  "input",
4685
4706
  {
@@ -4693,10 +4714,10 @@ function ta({
4693
4714
  disabled: e == null ? void 0 : e.isReadOnly
4694
4715
  }
4695
4716
  ),
4696
- /* @__PURE__ */ b("span", { className: "absolute right-0", children: [
4697
- u && /* @__PURE__ */ b("span", { children: [
4717
+ /* @__PURE__ */ v("span", { className: "absolute right-0", children: [
4718
+ u && /* @__PURE__ */ v("span", { children: [
4698
4719
  " ",
4699
- /* @__PURE__ */ b(
4720
+ /* @__PURE__ */ v(
4700
4721
  "svg",
4701
4722
  {
4702
4723
  className: "animate-spin -ml-1 mr-3 h-5 w-5",
@@ -4727,18 +4748,18 @@ function ta({
4727
4748
  }
4728
4749
  )
4729
4750
  ] }),
4730
- r && !u && /* @__PURE__ */ n("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n(F, { icon: "gg:check-o" }) })
4751
+ r && !u && /* @__PURE__ */ n("span", { className: "block pr-3 text-lg text-green-600", children: /* @__PURE__ */ n(U, { icon: "gg:check-o" }) })
4731
4752
  ] })
4732
4753
  ] }),
4733
- h && S === "string" && /* @__PURE__ */ n(
4754
+ h && A === "string" && /* @__PURE__ */ n(
4734
4755
  "span",
4735
4756
  {
4736
4757
  className: `${r ? "text-green-600" : "text-red-600"} text-sm`,
4737
4758
  children: h
4738
4759
  }
4739
4760
  ),
4740
- S === "object" && /* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-6 mt-2 text-sm text-gray-600", children: (A = Object.entries(f)) == null ? void 0 : A.map(([N, T]) => /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
4741
- /* @__PURE__ */ b("span", { className: "font-semibold", children: [
4761
+ A === "object" && /* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-6 mt-2 text-sm text-gray-600", children: (S = Object.entries(f)) == null ? void 0 : S.map(([N, T]) => /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
4762
+ /* @__PURE__ */ v("span", { className: "font-semibold", children: [
4742
4763
  N,
4743
4764
  ":"
4744
4765
  ] }),
@@ -4772,9 +4793,9 @@ function ra({
4772
4793
  }, 0),
4773
4794
  [a]
4774
4795
  );
4775
- return R(() => {
4796
+ return I(() => {
4776
4797
  i && i(a);
4777
- }, [a]), R(() => {
4798
+ }, [a]), I(() => {
4778
4799
  if (s != null && s.length) {
4779
4800
  const r = s == null ? void 0 : s.map((t, h) => ({
4780
4801
  key: t.value,
@@ -4782,15 +4803,15 @@ function ra({
4782
4803
  }));
4783
4804
  l(r);
4784
4805
  }
4785
- }, [o, s]), /* @__PURE__ */ n("div", { className: "mt-2", children: /* @__PURE__ */ b("div", { className: "border border-gray-200 rounded-lg overflow-hidden text-gray-700", children: [
4786
- /* @__PURE__ */ b("div", { className: "grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50", children: [
4806
+ }, [o, s]), /* @__PURE__ */ n("div", { className: "mt-2", children: /* @__PURE__ */ v("div", { className: "border border-gray-200 rounded-lg overflow-hidden text-gray-700", children: [
4807
+ /* @__PURE__ */ v("div", { className: "grid grid-cols-3 text-sm font-bold border-b border-gray-100 bg-gray-50", children: [
4787
4808
  /* @__PURE__ */ n("div", { className: "border-r px-4 py-2", children: /* @__PURE__ */ n("span", { className: "", children: "Denomination" }) }),
4788
4809
  /* @__PURE__ */ n("div", { className: "border-r px-4 py-2", children: /* @__PURE__ */ n("span", { children: "Quantity" }) }),
4789
4810
  /* @__PURE__ */ n("div", { className: "px-4 py-2", children: /* @__PURE__ */ n("span", { children: "Sub total" }) })
4790
4811
  ] }),
4791
4812
  a == null ? void 0 : a.map((r, t) => {
4792
4813
  var h, m;
4793
- return /* @__PURE__ */ b(
4814
+ return /* @__PURE__ */ v(
4794
4815
  "div",
4795
4816
  {
4796
4817
  className: "grid grid-cols-3 text-sm border-b border-gray-100",
@@ -4803,7 +4824,7 @@ function ra({
4803
4824
  className: "border border-gray-100 rounded w-full px-3 py-1 outline-none",
4804
4825
  decimalsLimit: 6,
4805
4826
  value: r.value,
4806
- onValueChange: (v) => d(v, t),
4827
+ onValueChange: (b) => d(b, t),
4807
4828
  disabled: e,
4808
4829
  allowNegativeValue: !1
4809
4830
  }
@@ -4814,7 +4835,7 @@ function ra({
4814
4835
  t + "index"
4815
4836
  );
4816
4837
  }),
4817
- /* @__PURE__ */ b("div", { className: "grid grid-cols-3 text-sm font-bold bg-gray-50", children: [
4838
+ /* @__PURE__ */ v("div", { className: "grid grid-cols-3 text-sm font-bold bg-gray-50", children: [
4818
4839
  /* @__PURE__ */ n("div", { className: "border-r px-4 py-3 col-span-2 text-right", children: "Total" }),
4819
4840
  /* @__PURE__ */ n("div", { className: "px-4 py-3", children: c == null ? void 0 : c.toLocaleString() })
4820
4841
  ] })
@@ -4825,7 +4846,7 @@ function ma({
4825
4846
  validationData: e
4826
4847
  }) {
4827
4848
  const { register: o = () => ({}), setValue: s, getValues: a } = e || {}, l = a && a(i == null ? void 0 : i.id) || [];
4828
- return R(() => {
4849
+ return I(() => {
4829
4850
  o(i.id);
4830
4851
  }, [i.id, o]), /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
4831
4852
  ra,
@@ -4874,9 +4895,9 @@ function ga({
4874
4895
  getValidationStatus: a,
4875
4896
  deleteRow: l
4876
4897
  }) {
4877
- return /* @__PURE__ */ b("tr", { children: [
4898
+ return /* @__PURE__ */ v("tr", { children: [
4878
4899
  e.map((d) => {
4879
- var v;
4900
+ var b;
4880
4901
  const u = i[d.field], c = d.editable && !o, { isValidating: r, result: t } = a(i.id, d.field);
4881
4902
  let h = "border-gray-300";
4882
4903
  d.validate && ((t == null ? void 0 : t.isValid) === !1 ? h = "border-red-500 bg-red-50" : (t == null ? void 0 : t.isValid) === !0 && (h = "border-green-500 bg-green-50"));
@@ -4885,7 +4906,7 @@ function ga({
4885
4906
  "td",
4886
4907
  {
4887
4908
  className: "px-3 py-1 border-b border-r last:border-r-0",
4888
- children: c ? /* @__PURE__ */ b("div", { className: "relative", children: [
4909
+ children: c ? /* @__PURE__ */ v("div", { className: "relative", children: [
4889
4910
  d.type === "number" ? /* @__PURE__ */ n(
4890
4911
  Gi,
4891
4912
  {
@@ -4897,7 +4918,7 @@ function ga({
4897
4918
  }
4898
4919
  ) : d.type === "checkbox" ? /* @__PURE__ */ n("div", { className: "flex items-center gap-x-4", children: ["yes", "no"].map((f) => {
4899
4920
  const y = f === "yes", g = `radio-${i.id}-${String(d.field)}-${f}`;
4900
- return /* @__PURE__ */ b(
4921
+ return /* @__PURE__ */ v(
4901
4922
  "label",
4902
4923
  {
4903
4924
  htmlFor: g,
@@ -4928,8 +4949,8 @@ function ga({
4928
4949
  }
4929
4950
  ),
4930
4951
  r && /* @__PURE__ */ n("div", { className: "absolute right-1 top-1", children: /* @__PURE__ */ n("div", { className: "w-4 h-4 border-2 border-blue-500 rounded-full border-t-transparent animate-spin" }) })
4931
- ] }) : d.validate && t ? /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
4932
- /* @__PURE__ */ b("span", { children: [
4952
+ ] }) : d.validate && t ? /* @__PURE__ */ v("div", { className: "flex items-center gap-2", children: [
4953
+ /* @__PURE__ */ v("span", { children: [
4933
4954
  String(u != null ? u : ""),
4934
4955
  " ",
4935
4956
  t.data && `[${t.data}]`
@@ -4938,7 +4959,7 @@ function ga({
4938
4959
  "span",
4939
4960
  {
4940
4961
  className: "text-xs text-red-600 cursor-help",
4941
- title: (v = t.error) != null ? v : "",
4962
+ title: (b = t.error) != null ? b : "",
4942
4963
  children: "✗"
4943
4964
  }
4944
4965
  )
@@ -4954,7 +4975,7 @@ function ga({
4954
4975
  onClick: () => l(i.id),
4955
4976
  className: "text-red-500 hover:text-red-700",
4956
4977
  "aria-label": "Delete row",
4957
- children: /* @__PURE__ */ n(F, { icon: "lets-icons:trash-duotone", iconClass: "text-xl" })
4978
+ children: /* @__PURE__ */ n(U, { icon: "lets-icons:trash-duotone", iconClass: "text-xl" })
4958
4979
  }
4959
4980
  ) })
4960
4981
  ] });
@@ -4967,43 +4988,48 @@ function ya({
4967
4988
  columns: s
4968
4989
  }) {
4969
4990
  const [a, l] = P(i), d = di("config");
4970
- R(() => {
4991
+ I(() => {
4971
4992
  l((h) => JSON.stringify(h) !== JSON.stringify(i) ? i : h);
4972
- }, [i]), R(() => {
4973
- e == null || e(a);
4974
- }, [a, e]);
4993
+ }, [i]);
4975
4994
  const u = Z(
4976
- (h, m, v) => {
4977
- l(
4978
- (f) => f.map(
4979
- (y) => y.id === m ? { ...y, [v]: h } : y
4980
- )
4981
- );
4995
+ (h, m, b) => {
4996
+ l((f) => {
4997
+ const y = f.map(
4998
+ (g) => g.id === m ? { ...g, [b]: h } : g
4999
+ );
5000
+ return e == null || e(y), y;
5001
+ });
4982
5002
  },
4983
- []
5003
+ [e]
4984
5004
  ), c = Z(() => {
4985
- const h = ri(), m = s.reduce((v, f) => (v[f.field] = f.field === "id" ? h : "", v), {});
4986
- l((v) => [...v, { id: h, ...m }]);
4987
- }, [s]), r = Z((h) => {
4988
- l((m) => m.filter((v) => v.id !== h));
4989
- }, []), t = Z(
5005
+ const h = ri(), m = s.reduce((b, f) => (b[f.field] = f.field === "id" ? h : "", b), {});
5006
+ l((b) => {
5007
+ const f = [...b, { id: h, ...m }];
5008
+ return e == null || e(f), f;
5009
+ });
5010
+ }, [s, e]), r = Z((h) => {
5011
+ l((m) => {
5012
+ const b = m.filter((f) => f.id !== h);
5013
+ return e == null || e(b), b;
5014
+ });
5015
+ }, [e]), t = Z(
4990
5016
  (h, m) => ({
4991
5017
  isValidating: !1,
4992
5018
  result: void 0
4993
5019
  }),
4994
5020
  []
4995
5021
  );
4996
- return /* @__PURE__ */ b("div", { className: "mt-3 rounded", children: [
4997
- /* @__PURE__ */ n("div", { className: "w-full max-w-full overflow-x-auto border rounded-lg", children: /* @__PURE__ */ b("table", { className: "min-w-max w-full text-sm border-collapse table-auto", children: [
4998
- /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ b("tr", { className: "bg-gray-100", children: [
5022
+ return /* @__PURE__ */ v("div", { className: "mt-3 rounded", children: [
5023
+ /* @__PURE__ */ n("div", { className: "w-full max-w-full overflow-x-auto border rounded-lg", children: /* @__PURE__ */ v("table", { className: "min-w-max w-full text-sm border-collapse table-auto", children: [
5024
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ v("tr", { className: "bg-gray-100", children: [
4999
5025
  s.map((h, m) => {
5000
- var v;
5001
- return /* @__PURE__ */ b(
5026
+ var b;
5027
+ return /* @__PURE__ */ v(
5002
5028
  "th",
5003
5029
  {
5004
5030
  className: "px-3 py-2 text-xs font-semibold text-left text-gray-600 border-b whitespace-nowrap",
5005
5031
  children: [
5006
- (v = h.headerName) != null ? v : String(h.field),
5032
+ (b = h.headerName) != null ? b : String(h.field),
5007
5033
  h.validate && /* @__PURE__ */ n("span", { className: "ml-1 text-blue-600", children: "*" })
5008
5034
  ]
5009
5035
  },
@@ -5048,31 +5074,31 @@ function Aa({
5048
5074
  element: i,
5049
5075
  validationData: e
5050
5076
  }) {
5051
- var t;
5077
+ var b;
5052
5078
  const {
5053
5079
  register: o = () => ({}),
5054
5080
  setValue: s,
5055
5081
  watch: a,
5056
5082
  isReadOnly: l
5057
- } = e || {}, d = a && a(i == null ? void 0 : i.id) || {}, u = Array.isArray(d) ? d : (t = d == null ? void 0 : d.rows) != null ? t : [];
5058
- R(() => {
5083
+ } = e || {}, d = a && a(i == null ? void 0 : i.id) || {}, u = Array.isArray(d) ? d : (b = d == null ? void 0 : d.rows) != null ? b : [];
5084
+ I(() => {
5059
5085
  o(i.id);
5060
5086
  }, [i.id, o]);
5061
- const c = hi(""), r = Z(
5062
- (h) => {
5063
- const m = JSON.stringify(h);
5064
- m !== c.current && (c.current = m, s == null || s(i.id, {
5065
- rows: h,
5066
- columns: i == null ? void 0 : i.dataColumns
5067
- }));
5068
- },
5069
- [i.id, i == null ? void 0 : i.dataColumns, s]
5070
- );
5087
+ const c = mi(""), r = mi(i == null ? void 0 : i.id), t = mi(i == null ? void 0 : i.dataColumns), h = mi(s);
5088
+ r.current = i == null ? void 0 : i.id, t.current = i == null ? void 0 : i.dataColumns, h.current = s;
5089
+ const m = Z((f) => {
5090
+ var g;
5091
+ const y = JSON.stringify(f);
5092
+ y !== c.current && (c.current = y, (g = h.current) == null || g.call(h, r.current, {
5093
+ rows: f,
5094
+ columns: t.current
5095
+ }));
5096
+ }, []);
5071
5097
  return /* @__PURE__ */ n(
5072
5098
  ya,
5073
5099
  {
5074
5100
  value: u,
5075
- onChange: r,
5101
+ onChange: m,
5076
5102
  columns: i == null ? void 0 : i.dataColumns,
5077
5103
  isReadOnly: l
5078
5104
  }
@@ -5092,22 +5118,22 @@ const Pn = ({
5092
5118
  isMultiple: t = !1,
5093
5119
  isFloatingLabel: h = !1,
5094
5120
  subText: m,
5095
- labelClass: v = "",
5121
+ labelClass: b = "",
5096
5122
  loading: f,
5097
5123
  disabled: y
5098
5124
  }) => {
5099
- const [g, p] = P(t ? [] : null), S = W("custom-select__control", i), C = $(() => e, [e]);
5100
- return R(() => {
5125
+ const [g, p] = P(t ? [] : null), A = W("custom-select__control", i), C = $(() => e, [e]);
5126
+ return I(() => {
5101
5127
  const x = e == null ? void 0 : e.find((k) => {
5102
- var A;
5103
- return typeof k.value == "string" && typeof c == "string" ? k.value.toLowerCase() === c.toLowerCase() : typeof k.value == "object" && typeof c == "object" ? ((A = k.value) == null ? void 0 : A.id) === (c == null ? void 0 : c.id) : k.value === c;
5128
+ var S;
5129
+ return typeof k.value == "string" && typeof c == "string" ? k.value.toLowerCase() === c.toLowerCase() : typeof k.value == "object" && typeof c == "object" ? ((S = k.value) == null ? void 0 : S.id) === (c == null ? void 0 : c.id) : k.value === c;
5104
5130
  });
5105
5131
  p(x || null);
5106
- }, [c, e]), R(() => {
5132
+ }, [c, e]), I(() => {
5107
5133
  g && l && a && (l(d, g == null ? void 0 : g.value), a(d), r == null || r(d));
5108
- }, [d, g]), /* @__PURE__ */ b("div", { className: "custom-select", children: [
5134
+ }, [d, g]), /* @__PURE__ */ v("div", { className: "custom-select", children: [
5109
5135
  u && !h && /* @__PURE__ */ n("label", { className: "custom-select__label", children: u }),
5110
- h && u && /* @__PURE__ */ n("label", { className: W("custom-select__floating-label", v), children: u }),
5136
+ h && u && /* @__PURE__ */ n("label", { className: W("custom-select__floating-label", b), children: u }),
5111
5137
  /* @__PURE__ */ n(
5112
5138
  ii,
5113
5139
  {
@@ -5115,10 +5141,10 @@ const Pn = ({
5115
5141
  onChange: p,
5116
5142
  multiple: t,
5117
5143
  disabled: y,
5118
- children: /* @__PURE__ */ b("div", { className: "custom-select__wrapper", children: [
5119
- /* @__PURE__ */ b(ii.Button, { className: S, disabled: y, children: [
5144
+ children: /* @__PURE__ */ v("div", { className: "custom-select__wrapper", children: [
5145
+ /* @__PURE__ */ v(ii.Button, { className: A, disabled: y, children: [
5120
5146
  f ? /* @__PURE__ */ n("span", { className: "custom-select__loading", children: "Fetching data..." }) : /* @__PURE__ */ n("span", { className: "custom-select__value", children: (g == null ? void 0 : g.label) || /* @__PURE__ */ n("span", { className: "custom-select__placeholder", children: o }) }),
5121
- /* @__PURE__ */ n("span", { className: "custom-select__icon", children: /* @__PURE__ */ n(F, { icon: "lucide:chevron-down" }) })
5147
+ /* @__PURE__ */ n("span", { className: "custom-select__icon", children: /* @__PURE__ */ n(U, { icon: "lucide:chevron-down" }) })
5122
5148
  ] }),
5123
5149
  /* @__PURE__ */ n(
5124
5150
  yi,
@@ -5129,16 +5155,16 @@ const Pn = ({
5129
5155
  ii.Option,
5130
5156
  {
5131
5157
  value: x,
5132
- className: ({ active: A }) => W(
5158
+ className: ({ active: S }) => W(
5133
5159
  "custom-select__option",
5134
- A && "custom-select__option--active"
5160
+ S && "custom-select__option--active"
5135
5161
  ),
5136
- children: ({ selected: A }) => /* @__PURE__ */ n(
5162
+ children: ({ selected: S }) => /* @__PURE__ */ n(
5137
5163
  "span",
5138
5164
  {
5139
5165
  className: W(
5140
5166
  "custom-select__option-label",
5141
- A && "custom-select__option--selected"
5167
+ S && "custom-select__option--selected"
5142
5168
  ),
5143
5169
  children: x.label
5144
5170
  }
@@ -5166,17 +5192,17 @@ const Pn = ({
5166
5192
  watch: l,
5167
5193
  isReadOnly: d
5168
5194
  } = e || {}, u = (y = i == null ? void 0 : i.id) != null ? y : "cascadeValue", [c, r] = P(""), [t, h] = P(""), m = (g, p) => {
5169
- const S = g && p ? `${g}_${p}` : "";
5170
- a == null || a(u, S), s == null || s(u);
5171
- }, v = (g, p) => {
5195
+ const A = g && p ? `${g}_${p}` : "";
5196
+ a == null || a(u, A), s == null || s(u);
5197
+ }, b = (g, p) => {
5172
5198
  g === "first" ? (r(p), h(""), m(p, "")) : (h(p), m(c, p));
5173
5199
  };
5174
- R(() => {
5200
+ I(() => {
5175
5201
  if (l) {
5176
5202
  const g = l(u);
5177
5203
  if (g != null && g.includes("_")) {
5178
- const [p, S] = g.split("_");
5179
- r(p), h(S);
5204
+ const [p, A] = g.split("_");
5205
+ r(p), h(A);
5180
5206
  }
5181
5207
  }
5182
5208
  }, [l, u]);
@@ -5187,24 +5213,24 @@ const Pn = ({
5187
5213
  },
5188
5214
  [i.options1, c]
5189
5215
  );
5190
- return !i.options || !i.options1 ? null : /* @__PURE__ */ b("div", { children: [
5216
+ return !i.options || !i.options1 ? null : /* @__PURE__ */ v("div", { children: [
5191
5217
  /* @__PURE__ */ n("input", { type: "hidden", ...o(u) }),
5192
5218
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
5193
5219
  Pn,
5194
5220
  {
5195
- setValue: (g, p) => v("first", p),
5221
+ setValue: (g, p) => b("first", p),
5196
5222
  options: i.options,
5197
5223
  name: `${u}`,
5198
5224
  register: o,
5199
5225
  value: c
5200
5226
  }
5201
5227
  ) }),
5202
- c && /* @__PURE__ */ b("div", { className: "mt-4", children: [
5228
+ c && /* @__PURE__ */ v("div", { className: "mt-4", children: [
5203
5229
  (i == null ? void 0 : i.childLabel) && /* @__PURE__ */ n("label", { className: "block text-sm text-[#686878] darks:!text-white/70 mb-2", children: i == null ? void 0 : i.childLabel }),
5204
5230
  /* @__PURE__ */ n(
5205
5231
  Pn,
5206
5232
  {
5207
- setValue: (g, p) => v("second", p),
5233
+ setValue: (g, p) => b("second", p),
5208
5234
  options: f,
5209
5235
  name: `${u}`,
5210
5236
  register: o,
@@ -5230,20 +5256,20 @@ const Pn = ({
5230
5256
  setValue: t,
5231
5257
  watch: h,
5232
5258
  isReadOnly: m
5233
- } = u || {}, v = (p = h == null ? void 0 : h(d.id)) != null ? p : 0, [f, y] = P(null);
5234
- R(() => {
5235
- v == null && (t == null || t(d.id, i));
5259
+ } = u || {}, b = (p = h == null ? void 0 : h(d.id)) != null ? p : 0, [f, y] = P(null);
5260
+ I(() => {
5261
+ b == null && (t == null || t(d.id, i));
5236
5262
  }, []);
5237
- const g = (S) => {
5263
+ const g = (A) => {
5238
5264
  if (!o && !m) {
5239
- const C = S + 1;
5265
+ const C = A + 1;
5240
5266
  t == null || t(d.id, C), r == null || r(d.id), s == null || s(C);
5241
5267
  }
5242
5268
  };
5243
- return /* @__PURE__ */ b("div", { className: `flex gap-1 ${l}`, children: [
5269
+ return /* @__PURE__ */ v("div", { className: `flex gap-1 ${l}`, children: [
5244
5270
  /* @__PURE__ */ n("input", { type: "hidden", ...c(d.id) }),
5245
- Array.from({ length: e }, (S, C) => {
5246
- const x = f !== null ? C <= f : C < v;
5271
+ Array.from({ length: e }, (A, C) => {
5272
+ const x = f !== null ? C <= f : C < b;
5247
5273
  return /* @__PURE__ */ n(
5248
5274
  $n,
5249
5275
  {
@@ -5265,8 +5291,8 @@ function Na({
5265
5291
  validationData: e
5266
5292
  }) {
5267
5293
  const { register: o = () => ({}) } = e || {}, s = (i == null ? void 0 : i.options) || [], a = (i == null ? void 0 : i.options1) || [];
5268
- return /* @__PURE__ */ n("div", { className: W("w-full overflow-x-auto", i.customClass), children: /* @__PURE__ */ b("table", { className: "w-full text-left border-collapse min-w-[600px] mb-2", children: [
5269
- /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ b("tr", { children: [
5294
+ return /* @__PURE__ */ n("div", { className: W("w-full overflow-x-auto", i.customClass), children: /* @__PURE__ */ v("table", { className: "w-full text-left border-collapse min-w-[600px] mb-2", children: [
5295
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ v("tr", { children: [
5270
5296
  /* @__PURE__ */ n("th", { className: "p-3 border-b bg-gray-50/50" }),
5271
5297
  a.map((l) => /* @__PURE__ */ n(
5272
5298
  "th",
@@ -5277,7 +5303,7 @@ function Na({
5277
5303
  l.id || l.value
5278
5304
  ))
5279
5305
  ] }) }),
5280
- /* @__PURE__ */ n("tbody", { children: s.map((l) => /* @__PURE__ */ b(
5306
+ /* @__PURE__ */ n("tbody", { children: s.map((l) => /* @__PURE__ */ v(
5281
5307
  "tr",
5282
5308
  {
5283
5309
  className: "border-b last:border-0 hover:bg-gray-50/30",
@@ -5316,7 +5342,7 @@ function En({
5316
5342
  return { country: g, state: y };
5317
5343
  }
5318
5344
  return { country: u, state: "" };
5319
- }, [u]), t = hi(u), h = $(() => {
5345
+ }, [u]), t = mi(u), h = $(() => {
5320
5346
  var f, y;
5321
5347
  return c ? ((y = (f = Ri.find((g) => g.name === c)) == null ? void 0 : f.states) == null ? void 0 : y.map((g) => ({
5322
5348
  label: g.name,
@@ -5325,13 +5351,13 @@ function En({
5325
5351
  }, [c]), m = (f, y) => {
5326
5352
  const p = (y == null ? void 0 : y.value) || "";
5327
5353
  s && p !== t.current && (s(i.id, p), a == null || a(i.id), t.current = p);
5328
- }, v = (f, y) => {
5354
+ }, b = (f, y) => {
5329
5355
  const g = (y == null ? void 0 : y.value) || "", p = g ? `${g}, ${c}` : c;
5330
5356
  s && p !== t.current && (s(i.id, p), a == null || a(i.id), t.current = p);
5331
5357
  };
5332
- return R(() => {
5358
+ return I(() => {
5333
5359
  t.current = u;
5334
- }, [u]), /* @__PURE__ */ b("div", { className: "grid gap-y-6", children: [
5360
+ }, [u]), /* @__PURE__ */ v("div", { className: "grid gap-y-6", children: [
5335
5361
  /* @__PURE__ */ n("input", { type: "hidden", ...o(i.id) }),
5336
5362
  /* @__PURE__ */ n(
5337
5363
  on,
@@ -5344,13 +5370,13 @@ function En({
5344
5370
  },
5345
5371
  `country-${c}`
5346
5372
  ),
5347
- h.length > 0 && i.showState && /* @__PURE__ */ b("div", { children: [
5373
+ h.length > 0 && i.showState && /* @__PURE__ */ v("div", { children: [
5348
5374
  /* @__PURE__ */ n("label", { className: "block text-sm font-medium mb-1.5 input_label", children: "State" }),
5349
5375
  /* @__PURE__ */ n(
5350
5376
  on,
5351
5377
  {
5352
5378
  options: h,
5353
- onGetValue: v,
5379
+ onGetValue: b,
5354
5380
  name: `${i.id}-state`,
5355
5381
  readOnly: l,
5356
5382
  defaultValue: r
@@ -5365,7 +5391,7 @@ function ka({
5365
5391
  validationData: e
5366
5392
  }) {
5367
5393
  const { register: o = () => ({}), isReadOnly: s } = e || {}, { validationUrl: a, documentObj: l, signatureLink: d } = i, u = $(() => di("config"), []), [c, r] = P(!1), [t, h] = P(!1), m = Z(async () => {
5368
- var v, f;
5394
+ var b, f;
5369
5395
  if (!(!a || !l))
5370
5396
  try {
5371
5397
  h(!0);
@@ -5376,24 +5402,24 @@ function ka({
5376
5402
  }, { data: p } = await xi.get(
5377
5403
  `${a}/${l}`,
5378
5404
  g
5379
- ), S = !!((f = (v = p == null ? void 0 : p.data) == null ? void 0 : v.isSigned) != null ? f : p != null && p.isSigned);
5380
- return r(S), S;
5405
+ ), A = !!((f = (b = p == null ? void 0 : p.data) == null ? void 0 : b.isSigned) != null ? f : p != null && p.isSigned);
5406
+ return r(A), A;
5381
5407
  } catch (y) {
5382
5408
  console.error("Failed to check sign status", y);
5383
5409
  } finally {
5384
5410
  h(!1);
5385
5411
  }
5386
5412
  }, [a, l]);
5387
- return R(() => {
5388
- let v = null;
5413
+ return I(() => {
5414
+ let b = null;
5389
5415
  return !c && l && a && (async () => {
5390
- await m() || (v = setInterval(async () => {
5391
- await m() && v && clearInterval(v);
5416
+ await m() || (b = setInterval(async () => {
5417
+ await m() && b && clearInterval(b);
5392
5418
  }, 2e3));
5393
5419
  })(), () => {
5394
- v && clearInterval(v);
5420
+ b && clearInterval(b);
5395
5421
  };
5396
- }, [m, c, l, a]), /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
5422
+ }, [m, c, l, a]), /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
5397
5423
  /* @__PURE__ */ n(
5398
5424
  "input",
5399
5425
  {
@@ -5404,7 +5430,7 @@ function ka({
5404
5430
  disabled: s
5405
5431
  }
5406
5432
  ),
5407
- /* @__PURE__ */ n("a", { href: c ? "#" : d, children: /* @__PURE__ */ b(
5433
+ /* @__PURE__ */ n("a", { href: c ? "#" : d, children: /* @__PURE__ */ v(
5408
5434
  "button",
5409
5435
  {
5410
5436
  type: "button",
@@ -5417,7 +5443,7 @@ function ka({
5417
5443
  ),
5418
5444
  children: [
5419
5445
  /* @__PURE__ */ n(
5420
- F,
5446
+ U,
5421
5447
  {
5422
5448
  icon: t ? "solar:refresh-outline" : c ? "solar:check-circle-bold" : "solar:pen-2-line-duotone",
5423
5449
  iconClass: t ? "animate-spin" : ""
@@ -5689,26 +5715,26 @@ function Ca({
5689
5715
  horizontal: t,
5690
5716
  description: h,
5691
5717
  validate: m,
5692
- onChange: v,
5718
+ onChange: b,
5693
5719
  onError: f
5694
5720
  }) {
5695
- const [y, g] = P(""), [p, S] = P(null), [C, x] = P(""), k = $(
5721
+ const [y, g] = P(""), [p, A] = P(null), [C, x] = P(""), k = $(
5696
5722
  () => {
5697
5723
  var w;
5698
5724
  return (w = Ji == null ? void 0 : Ji.slice().sort((Y, K) => Y.label.localeCompare(K.label))) == null ? void 0 : w.map((Y) => ({ ...Y, phone: `+${Y.phone}` }));
5699
5725
  },
5700
5726
  []
5701
- ), A = $(() => y ? k.filter(
5727
+ ), S = $(() => y ? k.filter(
5702
5728
  (w) => `${w.label} ${w.phone}`.toLowerCase().includes(y.toLowerCase())
5703
- ) : k, [y, k]), N = (p == null ? void 0 : p.min) || 10, T = (p == null ? void 0 : p.max) || 10, Q = () => C ? `${(p == null ? void 0 : p.phone) || "+234"}-${C}` : "", U = (w) => {
5729
+ ) : k, [y, k]), N = (p == null ? void 0 : p.min) || 10, T = (p == null ? void 0 : p.max) || 10, Q = () => C ? `${(p == null ? void 0 : p.phone) || "+234"}-${C}` : "", z = (w) => {
5704
5730
  if (!w) return { code: "+234", number: "" };
5705
5731
  const Y = w.split(/[-\s]/);
5706
5732
  return { code: Y[0], number: Y.slice(1).join(" ") };
5707
5733
  };
5708
- R(() => {
5734
+ I(() => {
5709
5735
  if (d) {
5710
- const w = U(d);
5711
- S(
5736
+ const w = z(d);
5737
+ A(
5712
5738
  k.find((Y) => Y.phone === w.code) || k[0]
5713
5739
  ), x(w.number);
5714
5740
  }
@@ -5718,14 +5744,14 @@ function Ca({
5718
5744
  const w = C.length;
5719
5745
  return s && w === 0 ? "Phone number is required" : w > 0 && !/^\d+$/.test(C) ? "Phone number must contain only digits" : w > 0 && w < N ? `Minimum length is ${N}` : w > T ? `Maximum length is ${T}` : "";
5720
5746
  }, [u, C, N, T, s]);
5721
- return R(() => {
5722
- v == null || v(Q()), f == null || f(q || null);
5723
- }, [C, p, q]), /* @__PURE__ */ b(
5747
+ return I(() => {
5748
+ b == null || b(Q()), f == null || f(q || null);
5749
+ }, [C, p, q]), /* @__PURE__ */ v(
5724
5750
  "div",
5725
5751
  {
5726
5752
  className: `relative formGroup ${q && !r ? "has-error" : ""} ${t ? "flex" : ""} ${!q && C.length > 0 && !r ? "is-valid" : ""}`,
5727
5753
  children: [
5728
- i && /* @__PURE__ */ b(
5754
+ i && /* @__PURE__ */ v(
5729
5755
  "label",
5730
5756
  {
5731
5757
  htmlFor: l,
@@ -5738,9 +5764,9 @@ function Ca({
5738
5764
  ]
5739
5765
  }
5740
5766
  ),
5741
- /* @__PURE__ */ b("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
5742
- /* @__PURE__ */ n(F, { icon: "lucide:phone-call" }),
5743
- /* @__PURE__ */ n(Ai, { value: p, onChange: S, children: /* @__PURE__ */ b("div", { className: "relative", children: [
5767
+ /* @__PURE__ */ v("div", { className: "relative !flex items-center input-control text-[#667085] !py-0 field-control", children: [
5768
+ /* @__PURE__ */ n(U, { icon: "lucide:phone-call" }),
5769
+ /* @__PURE__ */ n(Ai, { value: p, onChange: A, children: /* @__PURE__ */ v("div", { className: "relative", children: [
5744
5770
  /* @__PURE__ */ n(
5745
5771
  Ai.Input,
5746
5772
  {
@@ -5750,8 +5776,8 @@ function Ca({
5750
5776
  onChange: (w) => g(w.target.value)
5751
5777
  }
5752
5778
  ),
5753
- /* @__PURE__ */ n(Ai.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n(F, { icon: "lucide:chevron-down" }) }),
5754
- /* @__PURE__ */ n(Ai.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: A == null ? void 0 : A.map((w, Y) => /* @__PURE__ */ b(
5779
+ /* @__PURE__ */ n(Ai.Button, { className: "absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ n(U, { icon: "lucide:chevron-down" }) }),
5780
+ /* @__PURE__ */ n(Ai.Options, { className: "absolute z-10 w-[250px] left-0 bg-white border rounded-md shadow-lg max-h-[400px] overflow-y-auto", children: S == null ? void 0 : S.map((w, Y) => /* @__PURE__ */ v(
5755
5781
  Ai.Option,
5756
5782
  {
5757
5783
  value: w,
@@ -5765,7 +5791,7 @@ function Ca({
5765
5791
  `${w.code}+ ${Y}`
5766
5792
  )) })
5767
5793
  ] }) }),
5768
- /* @__PURE__ */ b("div", { className: "relative flex items-center flex-1 z-[1]", children: [
5794
+ /* @__PURE__ */ v("div", { className: "relative flex items-center flex-1 z-[1]", children: [
5769
5795
  /* @__PURE__ */ n(
5770
5796
  "input",
5771
5797
  {
@@ -5784,7 +5810,7 @@ function Ca({
5784
5810
  minLength: N
5785
5811
  }
5786
5812
  ),
5787
- /* @__PURE__ */ n("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !q && C.length > 0 && !r && /* @__PURE__ */ n("span", { className: "text-green-500", children: /* @__PURE__ */ n(F, { icon: "bi:check-lg" }) }) })
5813
+ /* @__PURE__ */ n("div", { className: "absolute flex text-xl -translate-y-1/2 top-1/2 right-4", children: !q && C.length > 0 && !r && /* @__PURE__ */ n("span", { className: "text-green-500", children: /* @__PURE__ */ n(U, { icon: "bi:check-lg" }) }) })
5788
5814
  ] })
5789
5815
  ] }),
5790
5816
  h && /* @__PURE__ */ n("span", { className: "block text-[#475467] font-light leading-4 text-xs mt-2", children: h })
@@ -5805,7 +5831,7 @@ function Ma({
5805
5831
  clearErrors: u
5806
5832
  } = e || {};
5807
5833
  let c;
5808
- return R(() => {
5834
+ return I(() => {
5809
5835
  o(i.id);
5810
5836
  }, [i.id, o]), a && (c = a()[i.id]), /* @__PURE__ */ n(
5811
5837
  Ca,
@@ -5834,8 +5860,8 @@ function Ba({
5834
5860
  let a = "";
5835
5861
  s && (a = (r = s()[i.id]) != null ? r : "");
5836
5862
  const l = a.trim(), d = /^https?:\/\//i.test(l), u = l ? d ? l : `https://${l}` : "", c = !d;
5837
- return /* @__PURE__ */ b("div", { children: [
5838
- !(e != null && e.isReadOnly) && /* @__PURE__ */ b("div", { className: "relative", children: [
5863
+ return /* @__PURE__ */ v("div", { children: [
5864
+ !(e != null && e.isReadOnly) && /* @__PURE__ */ v("div", { className: "relative", children: [
5839
5865
  c && /* @__PURE__ */ n("span", { className: "text-sm absolute left-4 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none select-none", children: "https://" }),
5840
5866
  /* @__PURE__ */ n(
5841
5867
  "input",
@@ -5906,7 +5932,7 @@ const ne = {
5906
5932
  url: Ba
5907
5933
  }, Rn = "edit", La = (i, e) => {
5908
5934
  const o = ne[i.type];
5909
- return o ? /* @__PURE__ */ n(bn, { element: i, state: Rn, children: /* @__PURE__ */ b("div", { className: "relative w-full", children: [
5935
+ return o ? /* @__PURE__ */ n(bn, { element: i, state: Rn, children: /* @__PURE__ */ v("div", { className: "relative w-full", children: [
5910
5936
  i.type.toLowerCase() !== "grid" && /* @__PURE__ */ n("div", { className: "absolute top-0 left-0 z-20 w-full h-full" }),
5911
5937
  /* @__PURE__ */ n(
5912
5938
  o,
@@ -5939,11 +5965,11 @@ const ne = {
5939
5965
  moveElement: r,
5940
5966
  isDragging: t,
5941
5967
  removeElement: h
5942
- } = mi(ci), m = $(
5968
+ } = bi(ci), m = $(
5943
5969
  () => Array.from({ length: i.columns }),
5944
5970
  [i.columns]
5945
- ), [v, f] = P(null);
5946
- R(() => {
5971
+ ), [b, f] = P(null);
5972
+ I(() => {
5947
5973
  const x = () => {
5948
5974
  f(null), c(!1);
5949
5975
  };
@@ -5961,42 +5987,42 @@ const ne = {
5961
5987
  []
5962
5988
  ), p = Z(
5963
5989
  (x, k) => {
5964
- const A = x.relatedTarget;
5965
- A && x.currentTarget.contains(A) || f((N) => N === k ? null : N);
5990
+ const S = x.relatedTarget;
5991
+ S && x.currentTarget.contains(S) || f((N) => N === k ? null : N);
5966
5992
  },
5967
5993
  []
5968
- ), S = Z(
5994
+ ), A = Z(
5969
5995
  (x, k) => {
5970
5996
  var T;
5971
5997
  x.preventDefault(), x.stopPropagation(), c(!1), f(null);
5972
- const A = k + 1, N = x.dataTransfer.getData("elementId");
5998
+ const S = k + 1, N = x.dataTransfer.getData("elementId");
5973
5999
  if (N) {
5974
6000
  r({
5975
6001
  draggedId: N,
5976
6002
  sectionId: e,
5977
6003
  targetGridId: i.id,
5978
- targetCol: A
6004
+ targetCol: S
5979
6005
  });
5980
6006
  return;
5981
6007
  }
5982
6008
  try {
5983
6009
  const Q = x.dataTransfer.getData("properties");
5984
6010
  if (!Q) return;
5985
- const U = JSON.parse(Q);
5986
- if ((U == null ? void 0 : U.type) === "grid") return;
6011
+ const z = JSON.parse(Q);
6012
+ if ((z == null ? void 0 : z.type) === "grid") return;
5987
6013
  const q = d.find((K) => K.id === e), w = (T = q == null ? void 0 : q.questionData) == null ? void 0 : T.find(
5988
6014
  (K) => {
5989
- var O;
5990
- return K.gridId === i.id && ((O = K.gridPosition) == null ? void 0 : O.col) === A;
6015
+ var G;
6016
+ return K.gridId === i.id && ((G = K.gridPosition) == null ? void 0 : G.col) === S;
5991
6017
  }
5992
6018
  );
5993
6019
  w && h(w.id, e);
5994
6020
  const Y = {
5995
- ...U,
6021
+ ...z,
5996
6022
  id: ri(),
5997
6023
  sectionId: e,
5998
6024
  gridId: i.id,
5999
- gridPosition: { col: A }
6025
+ gridPosition: { col: S }
6000
6026
  };
6001
6027
  u(Y, e);
6002
6028
  } catch (Q) {
@@ -6004,17 +6030,17 @@ const ne = {
6004
6030
  }
6005
6031
  },
6006
6032
  [u, i.id, d, e, c, r]
6007
- ), C = (x, k, A) => {
6008
- var O, D, E;
6009
- const N = x + 1, T = (D = (O = d.find((B) => B.id === e)) == null ? void 0 : O.questionData) == null ? void 0 : D.find(
6033
+ ), C = (x, k, S) => {
6034
+ var G, D, E;
6035
+ const N = x + 1, T = (D = (G = d.find((B) => B.id === e)) == null ? void 0 : G.questionData) == null ? void 0 : D.find(
6010
6036
  (B) => {
6011
6037
  var L;
6012
6038
  return B.gridId === i.id && ((L = B.gridPosition) == null ? void 0 : L.col) === N;
6013
6039
  }
6014
- ), Q = (E = T == null ? void 0 : T.id) != null ? E : null, U = Array.isArray(o) && o.find((B) => {
6040
+ ), Q = (E = T == null ? void 0 : T.id) != null ? E : null, z = Array.isArray(o) && o.find((B) => {
6015
6041
  var L;
6016
6042
  return ((L = B == null ? void 0 : B.props) == null ? void 0 : L.col) === N;
6017
- }), q = t && v === x, w = !!U, Y = t && !!l, K = w && Q && A === "edit" ? {
6043
+ }), q = t && b === x, w = !!z, Y = t && !!l, K = w && Q && S === "edit" ? {
6018
6044
  draggable: !0,
6019
6045
  onDragStart: (B) => {
6020
6046
  B.stopPropagation(), B.dataTransfer.setData("elementId", Q), B.dataTransfer.setData("properties", Q), B.dataTransfer.effectAllowed = "move", c(!0);
@@ -6023,12 +6049,12 @@ const ne = {
6023
6049
  f(null), c(!1);
6024
6050
  }
6025
6051
  } : {};
6026
- return /* @__PURE__ */ n("div", { className: "min-w-0", children: /* @__PURE__ */ b(
6052
+ return /* @__PURE__ */ n("div", { className: "min-w-0", children: /* @__PURE__ */ v(
6027
6053
  "div",
6028
6054
  {
6029
6055
  id: `grid-cell-${i.id}-${x}`,
6030
6056
  ...K,
6031
- onDrop: (B) => S(B, x),
6057
+ onDrop: (B) => A(B, x),
6032
6058
  onDragEnter: (B) => g(B, x),
6033
6059
  onDragOver: (B) => y(B, x),
6034
6060
  onDragLeave: (B) => p(B, x),
@@ -6036,8 +6062,8 @@ const ne = {
6036
6062
  "relative border rounded-lg min-h-[110px] min-w-0",
6037
6063
  "flex items-center justify-center",
6038
6064
  "transition-all duration-200 ease-in-out",
6039
- A === "edit" ? "py-3 " : "",
6040
- w && A === "edit" && "cursor-grab active:cursor-grabbing border-none",
6065
+ S === "edit" ? "py-3 " : "",
6066
+ w && S === "edit" && "cursor-grab active:cursor-grabbing border-none",
6041
6067
  k,
6042
6068
  !Y && !q && "bg-white border-gray-200 text-gray-300",
6043
6069
  Y && !q && !w && "bg-blue-50 border-blue-200 border-dashed text-blue-300",
@@ -6046,9 +6072,9 @@ const ne = {
6046
6072
  q && w && "bg-orange-50 border-orange-400 border-dashed shadow-inner scale-[1.01] text-orange-500"
6047
6073
  ),
6048
6074
  children: [
6049
- w && A === "edit" && /* @__PURE__ */ n("div", { className: "absolute top-1 left-1/2 -translate-x-1/2 flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-gray-100 hover:bg-blue-100 text-gray-400 hover:text-blue-500 cursor-grab active:cursor-grabbing transition-colors z-10 opacity-60 hover:opacity-100 pointer-events-none select-none", children: /* @__PURE__ */ n(F, { icon: "ph:dots-six-bold" }) }),
6050
- q && !w && /* @__PURE__ */ b("span", { className: "absolute inset-0 flex flex-col items-center justify-center gap-1 text-blue-400 text-xs font-medium pointer-events-none", children: [
6051
- /* @__PURE__ */ n(F, { icon: "ph:plus-bold" }),
6075
+ w && S === "edit" && /* @__PURE__ */ n("div", { className: "absolute top-1 left-1/2 -translate-x-1/2 flex items-center gap-0.5 px-2 py-0.5 rounded-full bg-gray-100 hover:bg-blue-100 text-gray-400 hover:text-blue-500 cursor-grab active:cursor-grabbing transition-colors z-10 opacity-60 hover:opacity-100 pointer-events-none select-none", children: /* @__PURE__ */ n(U, { icon: "ph:dots-six-bold" }) }),
6076
+ q && !w && /* @__PURE__ */ v("span", { className: "absolute inset-0 flex flex-col items-center justify-center gap-1 text-blue-400 text-xs font-medium pointer-events-none", children: [
6077
+ /* @__PURE__ */ n(U, { icon: "ph:plus-bold" }),
6052
6078
  "Drop here"
6053
6079
  ] }),
6054
6080
  q && w && /* @__PURE__ */ n("span", { className: "absolute top-1 right-1 text-xs text-orange-400 font-medium pointer-events-none px-1 py-0.5 bg-orange-50 rounded", children: "Replace" }),
@@ -6059,7 +6085,7 @@ const ne = {
6059
6085
  "w-full select-none min-w-0",
6060
6086
  q && "opacity-50 pointer-events-none"
6061
6087
  ),
6062
- children: U || /* @__PURE__ */ n("span", { className: "flex items-center justify-center text-gray-300", children: A === "edit" && /* @__PURE__ */ n(F, { icon: "ph:plus-bold" }) })
6088
+ children: z || /* @__PURE__ */ n("span", { className: "flex items-center justify-center text-gray-300", children: S === "edit" && /* @__PURE__ */ n(U, { icon: "ph:plus-bold" }) })
6063
6089
  }
6064
6090
  )
6065
6091
  ]
@@ -6108,8 +6134,8 @@ function Zi({
6108
6134
  "transition-all duration-150 ease-in-out overflow-hidden",
6109
6135
  a ? "bg-blue-50 border-2 border-blue-300 border-dashed" : s ? "border-2 border-blue-200 border-dashed" : "border-2 border-transparent"
6110
6136
  ),
6111
- children: a && /* @__PURE__ */ b("span", { className: "flex items-center gap-1 text-blue-500 text-xs font-medium select-none pointer-events-none", children: [
6112
- /* @__PURE__ */ n(F, { icon: "octicon:plus-16" }),
6137
+ children: a && /* @__PURE__ */ v("span", { className: "flex items-center gap-1 text-blue-500 text-xs font-medium select-none pointer-events-none", children: [
6138
+ /* @__PURE__ */ n(U, { icon: "octicon:plus-16" }),
6113
6139
  "Drop here"
6114
6140
  ] })
6115
6141
  }
@@ -6122,66 +6148,66 @@ function Pa({ elementData: i, sectionId: e }) {
6122
6148
  setIsDragging: a,
6123
6149
  addElementInPosition: l,
6124
6150
  moveElement: d
6125
- } = mi(ci), [u, c] = P(null), r = $(
6151
+ } = bi(ci), [u, c] = P(null), r = $(
6126
6152
  () => {
6127
6153
  var p;
6128
- return ((p = o.find((S) => S.id === e)) == null ? void 0 : p.questionData) || [];
6154
+ return ((p = o.find((A) => A.id === e)) == null ? void 0 : p.questionData) || [];
6129
6155
  },
6130
6156
  [o, e]
6131
6157
  ), t = Z(
6132
- (p, S) => {
6133
- p.dataTransfer.setData("elementId", S), p.dataTransfer.setData("properties", S), p.dataTransfer.effectAllowed = "move", c(S), a(!0);
6158
+ (p, A) => {
6159
+ p.dataTransfer.setData("elementId", A), p.dataTransfer.setData("properties", A), p.dataTransfer.effectAllowed = "move", c(A), a(!0);
6134
6160
  },
6135
6161
  [a]
6136
6162
  ), h = Z(() => {
6137
6163
  c(null), a(!1);
6138
6164
  }, [a]);
6139
- R(() => {
6165
+ I(() => {
6140
6166
  !s && u && c(null);
6141
6167
  }, [s, u]);
6142
6168
  const m = Z(
6143
6169
  (p) => {
6144
6170
  p.preventDefault(), p.stopPropagation();
6145
- const S = p.dataTransfer.getData("elementId"), C = p.currentTarget.id;
6146
- if (!S || !C || S === C) {
6171
+ const A = p.dataTransfer.getData("elementId"), C = p.currentTarget.id;
6172
+ if (!A || !C || A === C) {
6147
6173
  h();
6148
6174
  return;
6149
6175
  }
6150
- const x = r.find((A) => A.id === S), k = r.findIndex(
6151
- (A) => A.id === C
6176
+ const x = r.find((S) => S.id === A), k = r.findIndex(
6177
+ (S) => S.id === C
6152
6178
  );
6153
- x != null && x.gridId && k !== -1 ? d({ draggedId: S, sectionId: e, targetIndex: k }) : d({ draggedId: S, sectionId: e, targetId: C }), c(null), a(!1);
6179
+ x != null && x.gridId && k !== -1 ? d({ draggedId: A, sectionId: e, targetIndex: k }) : d({ draggedId: A, sectionId: e, targetId: C }), c(null), a(!1);
6154
6180
  },
6155
6181
  [e, d, a, h, r]
6156
- ), v = Z(
6157
- (p, S) => {
6182
+ ), b = Z(
6183
+ (p, A) => {
6158
6184
  p.preventDefault(), p.stopPropagation(), a(!1);
6159
6185
  const C = p.dataTransfer.getData("elementId");
6160
6186
  if (C) {
6161
- d({ draggedId: C, sectionId: e, targetIndex: S }), c(null);
6187
+ d({ draggedId: C, sectionId: e, targetIndex: A }), c(null);
6162
6188
  return;
6163
6189
  }
6164
6190
  try {
6165
6191
  const x = JSON.parse(p.dataTransfer.getData("properties"));
6166
6192
  if ((x == null ? void 0 : x.type) === "section") return;
6167
6193
  const k = { ...x, id: ri(), sectionId: e };
6168
- l(k, e, S), c(null);
6194
+ l(k, e, A), c(null);
6169
6195
  } catch (x) {
6170
6196
  console.error("Drop error:", x);
6171
6197
  }
6172
6198
  },
6173
6199
  [l, e, a, d]
6174
6200
  ), f = Z(
6175
- (p, S = !1) => /* @__PURE__ */ n(
6201
+ (p, A = !1) => /* @__PURE__ */ n(
6176
6202
  "div",
6177
6203
  {
6178
6204
  id: p.id,
6179
6205
  draggable: !0,
6180
6206
  onDragStart: (C) => t(C, p.id),
6181
- onDragOver: S ? void 0 : (C) => {
6207
+ onDragOver: A ? void 0 : (C) => {
6182
6208
  C.preventDefault(), C.stopPropagation();
6183
6209
  },
6184
- onDrop: S ? void 0 : m,
6210
+ onDrop: A ? void 0 : m,
6185
6211
  onDragEnd: h,
6186
6212
  className: W(
6187
6213
  "cursor-grab active:cursor-grabbing border p-4 w-full rounded-lg",
@@ -6193,42 +6219,42 @@ function Pa({ elementData: i, sectionId: e }) {
6193
6219
  p.id
6194
6220
  ),
6195
6221
  [u, m, e, t, h]
6196
- ), y = $(() => (i == null ? void 0 : i.reduce((p, S) => (S.gridId && (p[S.gridId] = p[S.gridId] || [], p[S.gridId].push(S)), p), {})) || {}, [i]);
6222
+ ), y = $(() => (i == null ? void 0 : i.reduce((p, A) => (A.gridId && (p[A.gridId] = p[A.gridId] || [], p[A.gridId].push(A)), p), {})) || {}, [i]);
6197
6223
  if (!(i != null && i.length))
6198
6224
  return /* @__PURE__ */ n(
6199
6225
  "div",
6200
6226
  {
6201
6227
  onDragOver: (p) => p.preventDefault(),
6202
- onDrop: (p) => v(p, 0),
6228
+ onDrop: (p) => b(p, 0),
6203
6229
  onDragEnd: h,
6204
6230
  className: "w-full h-full flex items-center justify-center text-gray-400 min-h-[200px] p-10 col-span-2 border border-dashed border-gray-300 rounded-lg",
6205
6231
  children: "Drag or click an element to display"
6206
6232
  }
6207
6233
  );
6208
6234
  const g = i.filter((p) => !p.gridId);
6209
- return /* @__PURE__ */ b("div", { className: "relative flex flex-col w-full h-full gap-2", children: [
6235
+ return /* @__PURE__ */ v("div", { className: "relative flex flex-col w-full h-full gap-2", children: [
6210
6236
  /* @__PURE__ */ n(
6211
6237
  Zi,
6212
6238
  {
6213
6239
  index: 0,
6214
6240
  isDragging: s,
6215
- onDrop: v,
6241
+ onDrop: b,
6216
6242
  onDragEnd: h
6217
6243
  }
6218
6244
  ),
6219
6245
  g.map((p) => {
6220
- const S = r.findIndex((C) => C.id === p.id);
6246
+ const A = r.findIndex((C) => C.id === p.id);
6221
6247
  if (p.type === "grid") {
6222
6248
  const C = y[p.id] || [], x = u === p.id, k = !!u && !x;
6223
- return /* @__PURE__ */ b("div", { className: "flex flex-col gap-0", children: [
6249
+ return /* @__PURE__ */ v("div", { className: "flex flex-col gap-0", children: [
6224
6250
  /* @__PURE__ */ n(
6225
6251
  "div",
6226
6252
  {
6227
6253
  id: p.id,
6228
6254
  draggable: !0,
6229
- onDragStart: (A) => t(A, p.id),
6230
- onDragOver: (A) => {
6231
- A.preventDefault(), A.stopPropagation();
6255
+ onDragStart: (S) => t(S, p.id),
6256
+ onDragOver: (S) => {
6257
+ S.preventDefault(), S.stopPropagation();
6232
6258
  },
6233
6259
  onDrop: m,
6234
6260
  onDragEnd: h,
@@ -6245,9 +6271,9 @@ function Pa({ elementData: i, sectionId: e }) {
6245
6271
  state: wa,
6246
6272
  draggedElementId: u,
6247
6273
  children: C == null ? void 0 : C.map(
6248
- (A) => {
6274
+ (S) => {
6249
6275
  var N;
6250
- return /* @__PURE__ */ n(vn, { col: (N = A.gridPosition) == null ? void 0 : N.col, children: f(A, !0) }, A.id);
6276
+ return /* @__PURE__ */ n(vn, { col: (N = S.gridPosition) == null ? void 0 : N.col, children: f(S, !0) }, S.id);
6251
6277
  }
6252
6278
  )
6253
6279
  }
@@ -6257,22 +6283,22 @@ function Pa({ elementData: i, sectionId: e }) {
6257
6283
  /* @__PURE__ */ n(
6258
6284
  Zi,
6259
6285
  {
6260
- index: S + 1,
6286
+ index: A + 1,
6261
6287
  isDragging: s,
6262
- onDrop: v,
6288
+ onDrop: b,
6263
6289
  onDragEnd: h
6264
6290
  }
6265
6291
  )
6266
6292
  ] }, p.id);
6267
6293
  }
6268
- return /* @__PURE__ */ b("div", { className: "flex flex-col gap-0", children: [
6294
+ return /* @__PURE__ */ v("div", { className: "flex flex-col gap-0", children: [
6269
6295
  f(p),
6270
6296
  /* @__PURE__ */ n(
6271
6297
  Zi,
6272
6298
  {
6273
- index: S + 1,
6299
+ index: A + 1,
6274
6300
  isDragging: s,
6275
- onDrop: v,
6301
+ onDrop: b,
6276
6302
  onDragEnd: h
6277
6303
  }
6278
6304
  )
@@ -6299,25 +6325,25 @@ const Ea = Oi(Pa), Ra = M.object({
6299
6325
  if (si.useEffect(() => {
6300
6326
  i || t();
6301
6327
  }, [i, t]), !i) return null;
6302
- const h = (v) => {
6303
- s(v, o.id), e();
6328
+ const h = (b) => {
6329
+ s(b, o.id), e();
6304
6330
  }, m = d();
6305
- return /* @__PURE__ */ n("div", { className: "fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none", children: /* @__PURE__ */ b("div", { className: "min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center", children: [
6306
- /* @__PURE__ */ b("div", { className: "w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6", children: [
6331
+ return /* @__PURE__ */ n("div", { className: "fixed inset-0 bg-black/30 flex items-center justify-center z-[999] cursor-default no-drag select-none", children: /* @__PURE__ */ v("div", { className: "min-w-[600px] bg-white rounded-xl shadow-xl relative flex flex-col items-center", children: [
6332
+ /* @__PURE__ */ v("div", { className: "w-full px-6 pt-6 pb-5 flex flex-col items-start gap-4 z-10 mb-6", children: [
6307
6333
  /* @__PURE__ */ n("h2", { className: "text-lg font-semibold text-[#475467] font-onest", children: "Update Section Information" }),
6308
6334
  /* @__PURE__ */ n(
6309
6335
  "button",
6310
6336
  {
6311
6337
  onClick: e,
6312
6338
  className: "absolute right-4 top-4 p-2 text-[#98A2B3] hover:bg-gray-50 rounded-lg",
6313
- children: /* @__PURE__ */ n(F, { icon: "tabler:x" })
6339
+ children: /* @__PURE__ */ n(U, { icon: "tabler:x" })
6314
6340
  }
6315
6341
  )
6316
6342
  ] }),
6317
- /* @__PURE__ */ b("form", { onSubmit: l(h), className: "w-full", children: [
6318
- /* @__PURE__ */ b("div", { className: "w-full px-6 flex flex-col gap-5 z-10", children: [
6343
+ /* @__PURE__ */ v("form", { onSubmit: l(h), className: "w-full", children: [
6344
+ /* @__PURE__ */ v("div", { className: "w-full px-6 flex flex-col gap-5 z-10", children: [
6319
6345
  /* @__PURE__ */ n(
6320
- H,
6346
+ O,
6321
6347
  {
6322
6348
  label: "Title",
6323
6349
  name: "title",
@@ -6327,7 +6353,7 @@ const Ea = Oi(Pa), Ra = M.object({
6327
6353
  }
6328
6354
  ),
6329
6355
  /* @__PURE__ */ n(
6330
- H,
6356
+ O,
6331
6357
  {
6332
6358
  label: "Description",
6333
6359
  name: "description",
@@ -6338,7 +6364,7 @@ const Ea = Oi(Pa), Ra = M.object({
6338
6364
  }
6339
6365
  ),
6340
6366
  /* @__PURE__ */ n(
6341
- H,
6367
+ O,
6342
6368
  {
6343
6369
  label: "Disable Section",
6344
6370
  name: "disabled",
@@ -6351,7 +6377,7 @@ const Ea = Oi(Pa), Ra = M.object({
6351
6377
  }
6352
6378
  ),
6353
6379
  /* @__PURE__ */ n(
6354
- H,
6380
+ O,
6355
6381
  {
6356
6382
  label: "Hide Section",
6357
6383
  name: "isHidden",
@@ -6364,7 +6390,7 @@ const Ea = Oi(Pa), Ra = M.object({
6364
6390
  }
6365
6391
  )
6366
6392
  ] }),
6367
- /* @__PURE__ */ b("div", { className: "w-full px-6 pt-8 pb-6 flex gap-3 mt-4", children: [
6393
+ /* @__PURE__ */ v("div", { className: "w-full px-6 pt-8 pb-6 flex gap-3 mt-4", children: [
6368
6394
  /* @__PURE__ */ n(
6369
6395
  "button",
6370
6396
  {
@@ -6400,9 +6426,9 @@ const Ea = Oi(Pa), Ra = M.object({
6400
6426
  onDragOver: r,
6401
6427
  setIsDragging: t
6402
6428
  }) => {
6403
- var v, f;
6404
- const h = hi(null), m = hi((v = i.questionData) == null ? void 0 : v.length);
6405
- return R(() => {
6429
+ var b, f;
6430
+ const h = mi(null), m = mi((b = i.questionData) == null ? void 0 : b.length);
6431
+ return I(() => {
6406
6432
  var y;
6407
6433
  i.questionData.length > m.current && h.current && requestAnimationFrame(() => {
6408
6434
  var g;
@@ -6416,13 +6442,13 @@ const Ea = Oi(Pa), Ra = M.object({
6416
6442
  {
6417
6443
  ref: h,
6418
6444
  className: "bg-white group cursor-pointer rounded-lg shadow-[rgba(149,157,165,0.2)_0px_2px_2px] transition-colors duration-200",
6419
- children: /* @__PURE__ */ b(
6445
+ children: /* @__PURE__ */ v(
6420
6446
  "div",
6421
6447
  {
6422
6448
  className: ` border border-gray-200 rounded-lg px-4 transition-colors duration-200
6423
6449
  ${o === i.id ? " border-blue-200 bg-gray-100" : "bg-white"} ${a.includes(e) ? "min-h-[300px] pb-6 " : ""}`,
6424
6450
  children: [
6425
- /* @__PURE__ */ b("div", { className: "flex items-center justify-between", children: [
6451
+ /* @__PURE__ */ v("div", { className: "flex items-center justify-between", children: [
6426
6452
  /* @__PURE__ */ n(
6427
6453
  "div",
6428
6454
  {
@@ -6431,14 +6457,14 @@ const Ea = Oi(Pa), Ra = M.object({
6431
6457
  children: /* @__PURE__ */ n("h2", { className: "font-medium", children: i.title || "Section title" })
6432
6458
  }
6433
6459
  ),
6434
- /* @__PURE__ */ b("div", { className: "flex items-center gap-x-2", children: [
6460
+ /* @__PURE__ */ v("div", { className: "flex items-center gap-x-2", children: [
6435
6461
  /* @__PURE__ */ n(
6436
6462
  "button",
6437
6463
  {
6438
6464
  type: "button",
6439
6465
  className: "p-1 text-xs border rounded-lg",
6440
6466
  onClick: () => d(i),
6441
- children: /* @__PURE__ */ n(F, { icon: "fluent:edit-28-regular" })
6467
+ children: /* @__PURE__ */ n(U, { icon: "fluent:edit-28-regular" })
6442
6468
  }
6443
6469
  ),
6444
6470
  c > 1 && /* @__PURE__ */ n(
@@ -6447,7 +6473,7 @@ const Ea = Oi(Pa), Ra = M.object({
6447
6473
  type: "button",
6448
6474
  className: "p-1 text-xs border rounded-lg",
6449
6475
  onClick: () => u(i.id),
6450
- children: /* @__PURE__ */ n(F, { icon: "lets-icons:trash-duotone-line" })
6476
+ children: /* @__PURE__ */ n(U, { icon: "lets-icons:trash-duotone-line" })
6451
6477
  }
6452
6478
  ),
6453
6479
  /* @__PURE__ */ n(
@@ -6457,7 +6483,7 @@ const Ea = Oi(Pa), Ra = M.object({
6457
6483
  className: "p-1 text-xs rounded-lg",
6458
6484
  onClick: () => l(e),
6459
6485
  children: /* @__PURE__ */ n(
6460
- F,
6486
+ U,
6461
6487
  {
6462
6488
  icon: a.includes(e) ? "fa6-solid:chevron-up" : "fa6-solid:chevron-down",
6463
6489
  iconClass: "text-base"
@@ -6468,7 +6494,7 @@ const Ea = Oi(Pa), Ra = M.object({
6468
6494
  ] })
6469
6495
  ] }),
6470
6496
  (i == null ? void 0 : i.description) && a.includes(e) && /* @__PURE__ */ n("p", { className: "mt-2 text-sm text-gray-600", children: i == null ? void 0 : i.description }),
6471
- a.includes(e) && /* @__PURE__ */ b(
6497
+ a.includes(e) && /* @__PURE__ */ v(
6472
6498
  "div",
6473
6499
  {
6474
6500
  className: "h-full mt-4 transition-all duration-200",
@@ -6495,7 +6521,7 @@ const Ea = Oi(Pa), Ra = M.object({
6495
6521
  i.id
6496
6522
  );
6497
6523
  }, Ka = () => {
6498
- const [i, e] = P(!1), o = hi(null), s = hi(null), {
6524
+ const [i, e] = P(!1), o = mi(null), s = mi(null), {
6499
6525
  removeSection: a,
6500
6526
  // addElement,
6501
6527
  addSection: l,
@@ -6505,11 +6531,11 @@ const Ea = Oi(Pa), Ra = M.object({
6505
6531
  selectedSection: r,
6506
6532
  activeSections: t,
6507
6533
  setActiveSections: h
6508
- } = mi(ci), m = hi((d == null ? void 0 : d.length) || 0);
6509
- R(() => {
6534
+ } = bi(ci), m = mi((d == null ? void 0 : d.length) || 0);
6535
+ I(() => {
6510
6536
  var p;
6511
6537
  c(((p = d[0]) == null ? void 0 : p.id) || null);
6512
- }, []), R(() => {
6538
+ }, []), I(() => {
6513
6539
  (d == null ? void 0 : d.length) > m.current && s.current && requestAnimationFrame(() => {
6514
6540
  var p;
6515
6541
  (p = s.current) == null || p.scrollTo({
@@ -6518,19 +6544,19 @@ const Ea = Oi(Pa), Ra = M.object({
6518
6544
  });
6519
6545
  }), m.current = (d == null ? void 0 : d.length) || 0;
6520
6546
  }, [d == null ? void 0 : d.length]);
6521
- const v = Z((p) => {
6547
+ const b = Z((p) => {
6522
6548
  p.preventDefault(), p.dataTransfer.dropEffect = "move", s.current && (s.current.scrollTop = s.current.scrollHeight);
6523
6549
  }, []);
6524
6550
  function f(p) {
6525
6551
  t.includes(p) ? h(
6526
- (S) => S.filter((C) => C !== p)
6527
- ) : h((S) => [...S, p]);
6552
+ (A) => A.filter((C) => C !== p)
6553
+ ) : h((A) => [...A, p]);
6528
6554
  }
6529
6555
  function y(p) {
6530
6556
  o.current = p, e(!0);
6531
6557
  }
6532
6558
  const g = di("config");
6533
- return /* @__PURE__ */ b(
6559
+ return /* @__PURE__ */ v(
6534
6560
  "div",
6535
6561
  {
6536
6562
  ref: s,
@@ -6544,18 +6570,18 @@ const Ea = Oi(Pa), Ra = M.object({
6544
6570
  section: o.current
6545
6571
  }
6546
6572
  ),
6547
- /* @__PURE__ */ b(
6573
+ /* @__PURE__ */ v(
6548
6574
  "div",
6549
6575
  {
6550
6576
  id: "section-container",
6551
6577
  className: "relative flex flex-col flex-1 w-full gap-y-3 container overflow-y-auto",
6552
6578
  children: [
6553
6579
  d == null ? void 0 : d.map(
6554
- (p, S) => /* @__PURE__ */ n(
6580
+ (p, A) => /* @__PURE__ */ n(
6555
6581
  Da,
6556
6582
  {
6557
6583
  section: p,
6558
- index: S,
6584
+ index: A,
6559
6585
  selectedSection: r,
6560
6586
  setSelectedSection: c,
6561
6587
  activeSections: t,
@@ -6563,13 +6589,13 @@ const Ea = Oi(Pa), Ra = M.object({
6563
6589
  handleSectionEdit: y,
6564
6590
  removeSection: a,
6565
6591
  formDataLength: d.length,
6566
- onDragOver: v,
6592
+ onDragOver: b,
6567
6593
  setIsDragging: u
6568
6594
  },
6569
6595
  p.id
6570
6596
  )
6571
6597
  ),
6572
- /* @__PURE__ */ n("div", { className: "flex justify-center", children: /* @__PURE__ */ b(
6598
+ /* @__PURE__ */ n("div", { className: "flex justify-center", children: /* @__PURE__ */ v(
6573
6599
  "button",
6574
6600
  {
6575
6601
  type: "button",
@@ -6589,7 +6615,7 @@ const Ea = Oi(Pa), Ra = M.object({
6589
6615
  }
6590
6616
  );
6591
6617
  }, Oa = () => {
6592
- const { formData: i, uploadUrl: e } = mi(
6618
+ const { formData: i, uploadUrl: e } = bi(
6593
6619
  ci
6594
6620
  ), o = di("config");
6595
6621
  return /* @__PURE__ */ n(
@@ -6608,10 +6634,10 @@ function Ga({
6608
6634
  questionData: i,
6609
6635
  uploadUrl: e
6610
6636
  }) {
6611
- const { setFormData: o, addSection: s, setUploadUrl: a, showPreview: l } = mi(ci);
6612
- R(() => {
6637
+ const { setFormData: o, addSection: s, setUploadUrl: a, showPreview: l } = bi(ci);
6638
+ I(() => {
6613
6639
  i && i.length > 0 && o(i);
6614
- }, [i, o]), R(() => {
6640
+ }, [i, o]), I(() => {
6615
6641
  a(e);
6616
6642
  }, [e, a]);
6617
6643
  const d = Z((u) => {
@@ -6626,7 +6652,7 @@ function Ga({
6626
6652
  console.error("Drop error:", c);
6627
6653
  }
6628
6654
  }, []);
6629
- return /* @__PURE__ */ b("div", { className: "flex gap-x-6 h-full", children: [
6655
+ return /* @__PURE__ */ v("div", { className: "flex gap-x-6 h-full", children: [
6630
6656
  /* @__PURE__ */ n(
6631
6657
  "div",
6632
6658
  {
@@ -6661,56 +6687,56 @@ const Yi = [
6661
6687
  { key: "layoutAndDisplay", title: "Layout & Display" },
6662
6688
  { key: "advancedData", title: "Advanced / Data" }
6663
6689
  ], Ha = () => {
6664
- const [i, e] = P(""), { setIsDragging: o, addElement: s, selectedSection: a } = mi(ci), l = Z(
6665
- (v, f) => {
6690
+ const [i, e] = P(""), { setIsDragging: o, addElement: s, selectedSection: a } = bi(ci), l = Z(
6691
+ (b, f) => {
6666
6692
  if (!a) {
6667
- vi.error("Please select a section to add an element.");
6693
+ hi.error("Please select a section to add an element.");
6668
6694
  return;
6669
6695
  }
6670
- v.dataTransfer.setData("properties", JSON.stringify(f)), v.dataTransfer.effectAllowed = "move", o(!0);
6696
+ b.dataTransfer.setData("properties", JSON.stringify(f)), b.dataTransfer.effectAllowed = "move", o(!0);
6671
6697
  },
6672
6698
  [o, a]
6673
6699
  );
6674
- function d(v) {
6700
+ function d(b) {
6675
6701
  if (!a) {
6676
- vi.error("Please select a section to add an element.");
6702
+ hi.error("Please select a section to add an element.");
6677
6703
  return;
6678
6704
  }
6679
6705
  const f = {
6680
- ...v,
6706
+ ...b,
6681
6707
  id: ri(),
6682
6708
  sectionId: a
6683
6709
  };
6684
6710
  s(f, a);
6685
6711
  }
6686
6712
  const u = di("config") || {}, c = u.elementColor, r = u.elementBgColor, t = u.elementBorderColor, h = Go.filter(
6687
- (v) => v.label.toLowerCase().includes(i.toLowerCase())
6688
- ), m = Yi == null ? void 0 : Yi.map((v) => ({
6689
- title: v.title,
6713
+ (b) => b.label.toLowerCase().includes(i.toLowerCase())
6714
+ ), m = Yi == null ? void 0 : Yi.map((b) => ({
6715
+ title: b.title,
6690
6716
  elements: h.filter(
6691
6717
  (f) => {
6692
6718
  var y;
6693
- return (y = Ho[v.key]) == null ? void 0 : y.includes(f.type);
6719
+ return (y = Ho[b.key]) == null ? void 0 : y.includes(f.type);
6694
6720
  }
6695
6721
  )
6696
- })).filter((v) => v.elements.length > 0);
6697
- return /* @__PURE__ */ b("div", { className: "pt-4 flex flex-col gap-y-6", children: [
6722
+ })).filter((b) => b.elements.length > 0);
6723
+ return /* @__PURE__ */ v("div", { className: "pt-4 flex flex-col gap-y-6", children: [
6698
6724
  /* @__PURE__ */ n("div", { className: "px-5", children: /* @__PURE__ */ n(
6699
6725
  "input",
6700
6726
  {
6701
6727
  className: "field-control",
6702
6728
  placeholder: "Search",
6703
6729
  value: i,
6704
- onChange: (v) => e(v.target.value),
6730
+ onChange: (b) => e(b.target.value),
6705
6731
  name: "search",
6706
6732
  id: "search"
6707
6733
  }
6708
6734
  ) }),
6709
- /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]", children: /* @__PURE__ */ n("ul", { className: "grid gap-y-5 mt-3 px-5 ", children: m == null ? void 0 : m.map((v, f) => {
6735
+ /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto no-scrollbar max-h-[calc(100vh-100px)]", children: /* @__PURE__ */ n("ul", { className: "grid gap-y-5 mt-3 px-5 ", children: m == null ? void 0 : m.map((b, f) => {
6710
6736
  var y;
6711
- return /* @__PURE__ */ b("li", { children: [
6712
- /* @__PURE__ */ n("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: v.title }),
6713
- /* @__PURE__ */ n("ul", { className: "grid grid-cols-2 gap-y-3 gap-x-4 mb-3", children: (y = v.elements) == null ? void 0 : y.map((g) => /* @__PURE__ */ n(
6737
+ return /* @__PURE__ */ v("li", { children: [
6738
+ /* @__PURE__ */ n("h4", { className: "mb-2 text-[11px] font-bold text-gray-500 uppercase", children: b.title }),
6739
+ /* @__PURE__ */ n("ul", { className: "grid grid-cols-2 gap-y-3 gap-x-4 mb-3", children: (y = b.elements) == null ? void 0 : y.map((g) => /* @__PURE__ */ n(
6714
6740
  "li",
6715
6741
  {
6716
6742
  onDragStart: (p) => l(p, g),
@@ -6725,8 +6751,8 @@ const Yi = [
6725
6751
  hover:shadow-lg transition-all duration-200\r
6726
6752
  active:opacity-50 element_class`,
6727
6753
  draggable: !0,
6728
- children: /* @__PURE__ */ b("span", { className: "flex flex-col items-center justify-center w-full gap-2", children: [
6729
- /* @__PURE__ */ n("span", { style: { color: c }, children: /* @__PURE__ */ n(F, { icon: g.icon, iconClass: "w-6 h-6" }) }),
6754
+ children: /* @__PURE__ */ v("span", { className: "flex flex-col items-center justify-center w-full gap-2", children: [
6755
+ /* @__PURE__ */ n("span", { style: { color: c }, children: /* @__PURE__ */ n(U, { icon: g.icon, iconClass: "w-6 h-6" }) }),
6730
6756
  /* @__PURE__ */ n(
6731
6757
  "span",
6732
6758
  {
@@ -6757,15 +6783,15 @@ const Yi = [
6757
6783
  style: h,
6758
6784
  onClick: m
6759
6785
  }) => {
6760
- const v = W(
6786
+ const b = W(
6761
6787
  "btn inline-flex justify-center",
6762
6788
  {
6763
6789
  "pointer-events-none": o,
6764
6790
  "opacity-40 cursor-not-allowed": e
6765
6791
  },
6766
6792
  s
6767
- ), f = () => o ? /* @__PURE__ */ b(ti, { children: [
6768
- /* @__PURE__ */ b(
6793
+ ), f = () => o ? /* @__PURE__ */ v(ti, { children: [
6794
+ /* @__PURE__ */ v(
6769
6795
  "svg",
6770
6796
  {
6771
6797
  className: `animate-spin -ml-1 mr-3 h-5 w-5 ${u}`,
@@ -6796,17 +6822,17 @@ const Yi = [
6796
6822
  }
6797
6823
  ),
6798
6824
  "Submitting..."
6799
- ] }) : /* @__PURE__ */ b("span", { className: "flex items-center", children: [
6800
- a && l === "left" && /* @__PURE__ */ n("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ n(F, { icon: a }) }),
6825
+ ] }) : /* @__PURE__ */ v("span", { className: "flex items-center", children: [
6826
+ a && l === "left" && /* @__PURE__ */ n("span", { className: `mr-[6px] ${d}`, children: /* @__PURE__ */ n(U, { icon: a }) }),
6801
6827
  i && /* @__PURE__ */ n("span", { children: i }),
6802
- a && l === "right" && /* @__PURE__ */ n("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ n(F, { icon: a }) })
6828
+ a && l === "right" && /* @__PURE__ */ n("span", { className: `ml-[6px] ${d}`, children: /* @__PURE__ */ n(U, { icon: a }) })
6803
6829
  ] });
6804
- return r ? /* @__PURE__ */ n("div", { className: v, children: f() }) : c ? /* @__PURE__ */ n(ge, { to: c, className: v, children: f() }) : /* @__PURE__ */ n(
6830
+ return r ? /* @__PURE__ */ n("div", { className: b, children: f() }) : c ? /* @__PURE__ */ n(ge, { to: c, className: b, children: f() }) : /* @__PURE__ */ n(
6805
6831
  "button",
6806
6832
  {
6807
6833
  disabled: e,
6808
6834
  type: t,
6809
- className: v,
6835
+ className: b,
6810
6836
  "data-testid": "btn",
6811
6837
  onClick: m,
6812
6838
  style: h,
@@ -6815,7 +6841,7 @@ const Yi = [
6815
6841
  );
6816
6842
  };
6817
6843
  function Va() {
6818
- return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ b(
6844
+ return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ v(
6819
6845
  "svg",
6820
6846
  {
6821
6847
  width: "36",
@@ -6854,12 +6880,12 @@ const Fa = ({
6854
6880
  isOpen: i,
6855
6881
  onClose: e
6856
6882
  }) => {
6857
- const { formData: o, uploadUrl: s } = mi(
6883
+ const { formData: o, uploadUrl: s } = bi(
6858
6884
  ci
6859
6885
  );
6860
6886
  if (!i) return null;
6861
6887
  const a = di("config");
6862
- return /* @__PURE__ */ b("div", { className: "fixed inset-0 flex justify-center z-[999] cursor-default no-drag select-none w-screen h-screen pt-20 bg-[#F8F9FC]", children: [
6888
+ return /* @__PURE__ */ v("div", { className: "fixed inset-0 flex justify-center z-[999] cursor-default no-drag select-none w-screen h-screen pt-20 bg-[#F8F9FC]", children: [
6863
6889
  /* @__PURE__ */ n(
6864
6890
  "button",
6865
6891
  {
@@ -6882,8 +6908,8 @@ const Fa = ({
6882
6908
  ) })
6883
6909
  ] });
6884
6910
  };
6885
- function Wa() {
6886
- return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ b(
6911
+ function Ua() {
6912
+ return /* @__PURE__ */ n("div", { children: /* @__PURE__ */ v(
6887
6913
  "svg",
6888
6914
  {
6889
6915
  width: "24",
@@ -6907,7 +6933,7 @@ function Wa() {
6907
6933
  }
6908
6934
  ) });
6909
6935
  }
6910
- function Ua({
6936
+ function Wa({
6911
6937
  title: i,
6912
6938
  goBackUrl: e,
6913
6939
  onSubmit: o,
@@ -6917,8 +6943,8 @@ function Ua({
6917
6943
  publishLoading: d,
6918
6944
  onTitleChange: u
6919
6945
  }) {
6920
- const { formData: c, setShowPreview: r, showPreview: t } = mi(ci), [h, m] = P(!1), [v, f] = P(!1), [y, g] = P(i || ""), p = di("config");
6921
- function S() {
6946
+ const { formData: c, setShowPreview: r, showPreview: t } = bi(ci), [h, m] = P(!1), [b, f] = P(!1), [y, g] = P(i || ""), p = di("config");
6947
+ function A() {
6922
6948
  localStorage.setItem("formData", JSON.stringify(c)), o == null || o(c);
6923
6949
  }
6924
6950
  function C() {
@@ -6927,8 +6953,8 @@ function Ua({
6927
6953
  function x() {
6928
6954
  f(!1), u && y !== i && u(y.trim());
6929
6955
  }
6930
- return /* @__PURE__ */ b("div", { className: "px-[30px] py-3 flex justify-between items-center bg-[#F9F9FB] top_bar border-b h-full", children: [
6931
- /* @__PURE__ */ b("span", { className: "flex items-center gap-x-2", children: [
6956
+ return /* @__PURE__ */ v("div", { className: "px-[30px] py-3 flex justify-between items-center bg-[#F9F9FB] top_bar border-b h-full", children: [
6957
+ /* @__PURE__ */ v("span", { className: "flex items-center gap-x-2", children: [
6932
6958
  e && /* @__PURE__ */ n(
6933
6959
  "button",
6934
6960
  {
@@ -6936,11 +6962,11 @@ function Ua({
6936
6962
  onClick: () => e(),
6937
6963
  style: { color: (p == null ? void 0 : p.buttonColor) || "#333" },
6938
6964
  className: "flex items-center gap-x-3",
6939
- children: /* @__PURE__ */ n(Wa, {})
6965
+ children: /* @__PURE__ */ n(Ua, {})
6940
6966
  }
6941
6967
  ),
6942
6968
  " ",
6943
- v ? /* @__PURE__ */ n(
6969
+ b ? /* @__PURE__ */ n(
6944
6970
  "input",
6945
6971
  {
6946
6972
  type: "text",
@@ -6968,7 +6994,7 @@ function Ua({
6968
6994
  element: void 0
6969
6995
  }
6970
6996
  ),
6971
- /* @__PURE__ */ b("div", { className: "flex justify-end text-xs gap-x-3", children: [
6997
+ /* @__PURE__ */ v("div", { className: "flex justify-end text-xs gap-x-3", children: [
6972
6998
  /* @__PURE__ */ n(
6973
6999
  fi,
6974
7000
  {
@@ -6985,7 +7011,7 @@ function Ua({
6985
7011
  /* @__PURE__ */ n(
6986
7012
  fi,
6987
7013
  {
6988
- onClick: S,
7014
+ onClick: A,
6989
7015
  text: "Save",
6990
7016
  btnClass: "px-2 bg-transparent font-medium text-sm form_save__btn",
6991
7017
  icon: "lets-icons:save-duotone",
@@ -7014,7 +7040,7 @@ const ee = ({ loadingClass: i }) => {
7014
7040
  "h-full w-full min-h-[300px] flex justify-center items-center",
7015
7041
  i
7016
7042
  );
7017
- return R(() => {
7043
+ return I(() => {
7018
7044
  const o = di("config"), s = (o == null ? void 0 : o.loaderColor) || "#333";
7019
7045
  document.documentElement.style.setProperty("--loader-color", s);
7020
7046
  }, []), /* @__PURE__ */ n("div", { className: e, children: /* @__PURE__ */ n("span", { className: "loader" }) });
@@ -7032,13 +7058,13 @@ function za({
7032
7058
  onTitleChange: r,
7033
7059
  uploadUrl: t
7034
7060
  }) {
7035
- return /* @__PURE__ */ b(Kn, { children: [
7061
+ return /* @__PURE__ */ v(Kn, { children: [
7036
7062
  /* @__PURE__ */ n(Dn, { position: "top-right", richColors: !0, closeButton: !0 }),
7037
- /* @__PURE__ */ n("div", { className: "w-full h-full bg-[#F8F9FC] flex flex-col", children: /* @__PURE__ */ b("div", { className: "flex flex-1 ", children: [
7063
+ /* @__PURE__ */ n("div", { className: "w-full h-full bg-[#F8F9FC] flex flex-col", children: /* @__PURE__ */ v("div", { className: "flex flex-1 ", children: [
7038
7064
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("div", { className: "w-[250px] h-screen border-r border-[#E4E7EC] bg-white ", children: /* @__PURE__ */ n(ja, {}) }) }),
7039
- /* @__PURE__ */ b("div", { className: "flex-1 h-full max-h-full z-[1] w-[calc(100%-250px)]", children: [
7065
+ /* @__PURE__ */ v("div", { className: "flex-1 h-full max-h-full z-[1] w-[calc(100%-250px)]", children: [
7040
7066
  /* @__PURE__ */ n("div", { className: " h-[70px]", children: /* @__PURE__ */ n(
7041
- Ua,
7067
+ Wa,
7042
7068
  {
7043
7069
  title: o,
7044
7070
  goBackUrl: s,
@@ -7071,7 +7097,7 @@ const hs = ({
7071
7097
  publishLoading: t,
7072
7098
  onTitleChange: h,
7073
7099
  uploadUrl: m
7074
- }) => (R(() => {
7100
+ }) => (I(() => {
7075
7101
  s && Xn("config", s);
7076
7102
  }, [s]), /* @__PURE__ */ n(
7077
7103
  za,
@@ -7161,7 +7187,7 @@ function _a({ formData: i, isReadOnly: e }) {
7161
7187
  }), M.object().shape(o);
7162
7188
  }
7163
7189
  const Di = ({ element: i, validationData: e }) => {
7164
- const o = ne[i.type], { answerData: s } = mi(ci), a = $(
7190
+ const o = ne[i.type], { answerData: s } = bi(ci), a = $(
7165
7191
  () => {
7166
7192
  var u;
7167
7193
  return (u = i == null ? void 0 : i.acceptedFiles) == null ? void 0 : u.map((c) => c.label).join(", ");
@@ -7192,18 +7218,18 @@ const Di = ({ element: i, validationData: e }) => {
7192
7218
  }
7193
7219
  }
7194
7220
  ) : !0, [l, s, i]);
7195
- return o ? /* @__PURE__ */ b("div", { className: `${d ? "" : "invisible h-0"} min-w-0 w-full`, children: [
7196
- /* @__PURE__ */ b("div", { className: "mb-1.5 min-w-0", children: [
7197
- i.inputLabel && /* @__PURE__ */ b("label", { className: "block text-sm font-medium input_label", children: [
7221
+ return o ? /* @__PURE__ */ v("div", { className: `${d ? "" : "invisible h-0"} min-w-0 w-full`, children: [
7222
+ /* @__PURE__ */ v("div", { className: "mb-1.5 min-w-0", children: [
7223
+ i.inputLabel && /* @__PURE__ */ v("label", { className: "block text-sm font-medium input_label", children: [
7198
7224
  i.inputLabel,
7199
7225
  " ",
7200
- a && /* @__PURE__ */ b("span", { className: "text-gray-400 text-xs", children: [
7226
+ a && /* @__PURE__ */ v("span", { className: "text-gray-400 text-xs", children: [
7201
7227
  "(",
7202
7228
  a == null ? void 0 : a.toLowerCase(),
7203
7229
  ")"
7204
7230
  ] })
7205
7231
  ] }),
7206
- i.description && /* @__PURE__ */ b("small", { className: "block text-gray-400 mt-0.5 text-xs", children: [
7232
+ i.description && /* @__PURE__ */ v("small", { className: "block text-gray-400 mt-0.5 text-xs", children: [
7207
7233
  " ",
7208
7234
  i.description
7209
7235
  ] })
@@ -7229,7 +7255,7 @@ function $a({ form_data: i, options: e }) {
7229
7255
  customClass: "p-0 min-h-[60px] border-none",
7230
7256
  children: l == null ? void 0 : l.map((d) => {
7231
7257
  var u, c, r;
7232
- return /* @__PURE__ */ b(
7258
+ return /* @__PURE__ */ v(
7233
7259
  vn,
7234
7260
  {
7235
7261
  col: (u = d.gridPosition) == null ? void 0 : u.col,
@@ -7251,7 +7277,7 @@ function $a({ form_data: i, options: e }) {
7251
7277
  }
7252
7278
  ) }, a.id), s = (a) => {
7253
7279
  var l, d;
7254
- return /* @__PURE__ */ b(
7280
+ return /* @__PURE__ */ v(
7255
7281
  "div",
7256
7282
  {
7257
7283
  className: W("group relative grid gap-y-[6px] min-w-0", a.elementClass),
@@ -7274,8 +7300,8 @@ function $a({ form_data: i, options: e }) {
7274
7300
  const l = /* @__PURE__ */ new Map();
7275
7301
  return (d = a.questionData) == null || d.forEach((c) => {
7276
7302
  c.gridId && (l.has(c.gridId) || l.set(c.gridId, []), l.get(c.gridId).push(c));
7277
- }), /* @__PURE__ */ b("div", { className: "pb-6 section_box min-w-0", children: [
7278
- (a.title || a.description) && /* @__PURE__ */ b("div", { className: "py-4 border-b border-gray-100 mb-7 section_box__title", children: [
7303
+ }), /* @__PURE__ */ v("div", { className: "pb-6 section_box min-w-0", children: [
7304
+ (a.title || a.description) && /* @__PURE__ */ v("div", { className: "py-4 border-b border-gray-100 mb-7 section_box__title", children: [
7279
7305
  a.title && /* @__PURE__ */ n("h2", { className: "text-lg font-semibold mb-[4px]", children: a.title }),
7280
7306
  a.description && /* @__PURE__ */ n("p", { className: "text-sm", children: a.description })
7281
7307
  ] }),
@@ -7301,7 +7327,7 @@ function Qa({ form_data: i, options: e, current: o }) {
7301
7327
  customClass: "p-0 min-h-[60px] border-none",
7302
7328
  children: u == null ? void 0 : u.map((c) => {
7303
7329
  var r, t, h;
7304
- return /* @__PURE__ */ b(
7330
+ return /* @__PURE__ */ v(
7305
7331
  vn,
7306
7332
  {
7307
7333
  col: (r = c.gridPosition) == null ? void 0 : r.col,
@@ -7323,7 +7349,7 @@ function Qa({ form_data: i, options: e, current: o }) {
7323
7349
  }
7324
7350
  ) }, a.id);
7325
7351
  }
7326
- return a.gridId ? null : /* @__PURE__ */ b(
7352
+ return a.gridId ? null : /* @__PURE__ */ v(
7327
7353
  "div",
7328
7354
  {
7329
7355
  className: W(
@@ -7360,14 +7386,14 @@ const is = ({
7360
7386
  hideFooter: c = !1,
7361
7387
  uploadUrl: r
7362
7388
  }) => {
7363
- var _, ni, ui, li, I, J, j, G;
7364
- const { setAnswerData: t, setUploadUrl: h } = mi(ci), [m, v] = P(0), f = $(
7389
+ var _, ni, ui, li, R, F, j, H;
7390
+ const { setAnswerData: t, setUploadUrl: h } = bi(ci), [m, b] = P(0), f = $(
7365
7391
  () => i.filter((V) => !V.isHidden).map((V) => {
7366
7392
  var oi;
7367
7393
  return V.isDisabled || V.disabled ? {
7368
7394
  ...V,
7369
- questionData: (oi = V.questionData) == null ? void 0 : oi.map((bi) => ({
7370
- ...bi,
7395
+ questionData: (oi = V.questionData) == null ? void 0 : oi.map((vi) => ({
7396
+ ...vi,
7371
7397
  isDisabled: !0
7372
7398
  }))
7373
7399
  } : V;
@@ -7376,7 +7402,7 @@ const is = ({
7376
7402
  ), y = (_ = f == null ? void 0 : f.length) != null ? _ : 0, g = di("config"), p = $(
7377
7403
  () => _a({ formData: f, isReadOnly: l }),
7378
7404
  [f, l]
7379
- ), S = ln({
7405
+ ), A = ln({
7380
7406
  resolver: mn(p),
7381
7407
  mode: "onSubmit",
7382
7408
  defaultValues: {}
@@ -7384,38 +7410,38 @@ const is = ({
7384
7410
  register: C,
7385
7411
  setValue: x,
7386
7412
  control: k,
7387
- handleSubmit: A,
7413
+ handleSubmit: S,
7388
7414
  reset: N,
7389
7415
  getValues: T,
7390
7416
  watch: Q,
7391
- formState: { errors: U, isSubmitting: q },
7417
+ formState: { errors: z, isSubmitting: q },
7392
7418
  trigger: w,
7393
7419
  setError: Y,
7394
7420
  clearErrors: K
7395
- } = S, O = me({ control: k }), D = $(
7396
- () => O,
7397
- [JSON.stringify(O)]
7421
+ } = A, G = me({ control: k }), D = $(
7422
+ () => G,
7423
+ [JSON.stringify(G)]
7398
7424
  ), E = Z(
7399
7425
  (V) => {
7400
7426
  a && a(V);
7401
7427
  },
7402
7428
  [a]
7403
7429
  );
7404
- R(() => {
7430
+ I(() => {
7405
7431
  h(r);
7406
- }, [h, r]), R(() => {
7432
+ }, [h, r]), I(() => {
7407
7433
  if (!(f != null && f.length) || !a) return;
7408
7434
  const V = f.flatMap(
7409
7435
  (X) => {
7410
7436
  var oi;
7411
- return (oi = X.questionData) == null ? void 0 : oi.map((bi) => ({
7412
- id: bi.id,
7413
- value: D[bi.id] || "",
7437
+ return (oi = X.questionData) == null ? void 0 : oi.map((vi) => ({
7438
+ id: vi.id,
7439
+ value: D[vi.id] || "",
7414
7440
  sectionId: X.id,
7415
- type: bi.type,
7441
+ type: vi.type,
7416
7442
  metaData: {
7417
- prefix: bi.prefix,
7418
- dateFormat: bi.dateFormat
7443
+ prefix: vi.prefix,
7444
+ dateFormat: vi.dateFormat
7419
7445
  }
7420
7446
  }));
7421
7447
  }
@@ -7427,15 +7453,15 @@ const is = ({
7427
7453
  E,
7428
7454
  a,
7429
7455
  t
7430
- ]), R(() => {
7456
+ ]), I(() => {
7431
7457
  e != null && e.length && N(Xa(e));
7432
7458
  }, [e, N]);
7433
7459
  const B = Z(
7434
7460
  (V) => {
7435
7461
  const X = f.flatMap(
7436
7462
  (oi) => {
7437
- var bi;
7438
- return (bi = oi.questionData) == null ? void 0 : bi.map((gi) => ({
7463
+ var vi;
7464
+ return (vi = oi.questionData) == null ? void 0 : vi.map((gi) => ({
7439
7465
  id: gi.id,
7440
7466
  value: V[gi.id] || "",
7441
7467
  sectionId: oi.id,
@@ -7447,9 +7473,9 @@ const is = ({
7447
7473
  }));
7448
7474
  }
7449
7475
  );
7450
- Object.keys(U).length > 0 || s == null || s(X);
7476
+ Object.keys(z).length > 0 || s == null || s(X);
7451
7477
  },
7452
- [U, f, s]
7478
+ [z, f, s]
7453
7479
  ), L = Z(async () => {
7454
7480
  var V, X;
7455
7481
  if (!o) {
@@ -7458,15 +7484,15 @@ const is = ({
7458
7484
  );
7459
7485
  if (!await w(oi)) return;
7460
7486
  }
7461
- v((oi) => oi + 1);
7462
- }, [m, f, o, w]), z = Z(() => {
7463
- v((V) => V - 1);
7487
+ b((oi) => oi + 1);
7488
+ }, [m, f, o, w]), J = Z(() => {
7489
+ b((V) => V - 1);
7464
7490
  }, []), ai = $(
7465
7491
  () => ({
7466
7492
  register: C,
7467
7493
  setValue: x,
7468
7494
  watch: Q,
7469
- errors: U,
7495
+ errors: z,
7470
7496
  trigger: w,
7471
7497
  isSubmitting: q,
7472
7498
  isReadOnly: l,
@@ -7478,7 +7504,7 @@ const is = ({
7478
7504
  C,
7479
7505
  x,
7480
7506
  Q,
7481
- U,
7507
+ z,
7482
7508
  w,
7483
7509
  q,
7484
7510
  l,
@@ -7487,22 +7513,22 @@ const is = ({
7487
7513
  K
7488
7514
  ]
7489
7515
  );
7490
- return /* @__PURE__ */ b(be, { ...S, children: [
7516
+ return /* @__PURE__ */ v(be, { ...A, children: [
7491
7517
  /* @__PURE__ */ n(Dn, { position: "top-right", richColors: !0, closeButton: !0 }),
7492
- /* @__PURE__ */ b(
7518
+ /* @__PURE__ */ v(
7493
7519
  "form",
7494
7520
  {
7495
- onSubmit: A(B),
7521
+ onSubmit: S(B),
7496
7522
  className: "container h-full mx-auto",
7497
7523
  children: [
7498
- /* @__PURE__ */ n("div", { className: "relative flex flex-col w-full min-w-0 py-4 gap-y-12", children: /* @__PURE__ */ b(
7524
+ /* @__PURE__ */ n("div", { className: "relative flex flex-col w-full min-w-0 py-4 gap-y-12", children: /* @__PURE__ */ v(
7499
7525
  "div",
7500
7526
  {
7501
7527
  className: "multi_section__box min-w-0",
7502
7528
  children: [
7503
- d === "multi" && (((ni = f == null ? void 0 : f[m]) == null ? void 0 : ni.title) || ((ui = f == null ? void 0 : f[m]) == null ? void 0 : ui.description)) && /* @__PURE__ */ b("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
7504
- ((li = f[m]) == null ? void 0 : li.title) && /* @__PURE__ */ n("h2", { className: "text-lg font-semibold mb-[6px]", children: (I = f[m]) == null ? void 0 : I.title }),
7505
- ((J = f[m]) == null ? void 0 : J.description) && /* @__PURE__ */ n("p", { className: "text-sm", children: (j = f[m]) == null ? void 0 : j.description })
7529
+ d === "multi" && (((ni = f == null ? void 0 : f[m]) == null ? void 0 : ni.title) || ((ui = f == null ? void 0 : f[m]) == null ? void 0 : ui.description)) && /* @__PURE__ */ v("div", { className: "py-4 mb-4 border-b border-gray-100 multi_section__title", children: [
7530
+ ((li = f[m]) == null ? void 0 : li.title) && /* @__PURE__ */ n("h2", { className: "text-lg font-semibold mb-[6px]", children: (R = f[m]) == null ? void 0 : R.title }),
7531
+ ((F = f[m]) == null ? void 0 : F.description) && /* @__PURE__ */ n("p", { className: "text-sm", children: (j = f[m]) == null ? void 0 : j.description })
7506
7532
  ] }),
7507
7533
  d === "multi" ? /* @__PURE__ */ n(
7508
7534
  Qa,
@@ -7520,18 +7546,18 @@ const is = ({
7520
7546
  )
7521
7547
  ]
7522
7548
  },
7523
- (G = f == null ? void 0 : f[m]) == null ? void 0 : G.id
7549
+ (H = f == null ? void 0 : f[m]) == null ? void 0 : H.id
7524
7550
  ) }),
7525
- !c && /* @__PURE__ */ n("footer", { className: "flex items-center justify-end gap-4 footer flex-wrap", children: d === "multi" ? /* @__PURE__ */ b(ti, { children: [
7526
- /* @__PURE__ */ b("div", { className: "flex gap-x-4 justify-between navigation_container w-full", children: [
7527
- /* @__PURE__ */ b("div", { children: [
7551
+ !c && /* @__PURE__ */ n("footer", { className: "flex items-center justify-end gap-4 footer flex-wrap", children: d === "multi" ? /* @__PURE__ */ v(ti, { children: [
7552
+ /* @__PURE__ */ v("div", { className: "flex gap-x-4 justify-between navigation_container w-full", children: [
7553
+ /* @__PURE__ */ v("div", { children: [
7528
7554
  " ",
7529
7555
  m > 0 && /* @__PURE__ */ n(
7530
7556
  fi,
7531
7557
  {
7532
7558
  type: "button",
7533
7559
  text: "Back",
7534
- onClick: z,
7560
+ onClick: J,
7535
7561
  btnClass: "text-gray-700 back_btn text-sm border-[#98A2B3] !font-medium !py-[10px] px-10 bg-gray-200 rounded-lg"
7536
7562
  }
7537
7563
  )
@@ -7550,7 +7576,7 @@ const is = ({
7550
7576
  (m === y - 1 || l) && !o && (u != null ? u : /* @__PURE__ */ n(
7551
7577
  fi,
7552
7578
  {
7553
- isDisabled: q || Object.keys(U).length > 0,
7579
+ isDisabled: q || Object.keys(z).length > 0,
7554
7580
  isLoading: q,
7555
7581
  type: "submit",
7556
7582
  text: "Submit",
@@ -7561,7 +7587,7 @@ const is = ({
7561
7587
  ] }) : !o && (u != null ? u : /* @__PURE__ */ n(
7562
7588
  fi,
7563
7589
  {
7564
- isDisabled: q || Object.keys(U).length > 0,
7590
+ isDisabled: q || Object.keys(z).length > 0,
7565
7591
  isLoading: q,
7566
7592
  type: "submit",
7567
7593
  text: "Submit",
@@ -7588,16 +7614,16 @@ function oe({
7588
7614
  onGetValues: t,
7589
7615
  uploadUrl: h
7590
7616
  }) {
7591
- R(() => {
7617
+ I(() => {
7592
7618
  d && Xn("config", d);
7593
7619
  }, [d]);
7594
7620
  const m = Z(
7595
- (v) => {
7596
- t && t(v);
7621
+ (b) => {
7622
+ t && t(b);
7597
7623
  },
7598
7624
  [t]
7599
7625
  );
7600
- return l ? /* @__PURE__ */ n(ee, {}) : e ? /* @__PURE__ */ b("div", { className: "w-full h-full min-w-0", children: [
7626
+ return l ? /* @__PURE__ */ n(ee, {}) : e ? /* @__PURE__ */ v("div", { className: "w-full h-full min-w-0", children: [
7601
7627
  /* @__PURE__ */ n("div", { id: "root-portal" }),
7602
7628
  /* @__PURE__ */ n(Kn, { children: /* @__PURE__ */ n(
7603
7629
  ns,