@uniquedj95/vform 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,197 +1,197 @@
1
- import { ref as E, computed as S, watch as I, defineComponent as U, createElementBlock as $, openBlock as f, normalizeClass as ne, createElementVNode as B, createCommentVNode as O, Fragment as T, renderList as K, toDisplayString as A, normalizeStyle as ve, createBlock as V, createVNode as P, unref as d, withCtx as b, resolveDynamicComponent as fe, createTextVNode as z, toRef as Oe, mergeModels as N, useModel as G, resolveDirective as Ee, withDirectives as xe, onMounted as ge } from "vue";
2
- import { IonGrid as Ce, IonRow as le, IonCol as ae, IonButton as j, IonLabel as Y, IonText as Re, IonInput as Ve, IonInputPasswordToggle as Ae, IonChip as $e, IonIcon as ce, IonList as Fe, IonItem as ze, IonCheckbox as be, actionSheetController as Be, alertController as Pe, IonTextarea as Ie, IonRadioGroup as Ue, IonRadio as De } from "@ionic/vue";
3
- import { chevronDown as Te, close as qe, add as Le, remove as Me } from "ionicons/icons";
4
- import { maskito as je } from "@maskito/vue";
5
- function Ne(t) {
6
- return new Promise((o) => {
1
+ import { ref as E, computed as S, watch as D, defineComponent as T, createElementBlock as $, openBlock as f, normalizeClass as ne, createElementVNode as B, createCommentVNode as O, Fragment as M, renderList as K, toDisplayString as A, normalizeStyle as ve, createBlock as b, createVNode as I, unref as d, withCtx as k, resolveDynamicComponent as fe, createTextVNode as z, toRef as we, mergeModels as G, useModel as H, resolveDirective as Oe, withDirectives as Ee, onMounted as ge } from "vue";
2
+ import { IonGrid as Ve, IonRow as le, IonCol as ae, IonButton as N, IonLabel as Y, IonText as xe, IonInput as _e, IonInputPasswordToggle as Re, IonChip as Ae, IonIcon as ce, IonList as $e, IonItem as Fe, IonCheckbox as be, actionSheetController as ze, alertController as Be, IonTextarea as Pe, IonRadioGroup as Ie, IonRadio as Ue } from "@ionic/vue";
3
+ import { chevronDown as De, close as Te, add as qe, remove as Le } from "ionicons/icons";
4
+ import { maskito as Me } from "@maskito/vue";
5
+ function je(t) {
6
+ return new Promise((u) => {
7
7
  requestAnimationFrame(async () => {
8
8
  const n = await t.getInputElement();
9
- o(n);
9
+ u(n);
10
10
  });
11
11
  });
12
12
  }
13
- const Ge = {
13
+ const Ne = {
14
14
  d: /\d/,
15
15
  a: /[A-Za-z]/,
16
16
  "*": /[A-Za-z0-9]/
17
17
  // Default: alphanum, can customize if needed
18
- }, He = {
18
+ }, Ge = {
19
19
  d: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
20
20
  a: ["A", "B", "C", "x", "y", "z", "D", "f"],
21
21
  "*": ["A", "3", "b", "8", "z", "4", "D", "0"]
22
22
  };
23
- function Ke(t, o) {
24
- const n = He[t];
25
- return n[o % n.length];
23
+ function He(t, u) {
24
+ const n = Ge[t];
25
+ return n[u % n.length];
26
26
  }
27
- function We(t) {
28
- const o = [];
27
+ function Ke(t) {
28
+ const u = [];
29
29
  let n = "", e = 0, l = 0;
30
30
  for (; e < t.length; ) {
31
- const u = t[e];
32
- if (["d", "a", "*"].includes(u)) {
31
+ const s = t[e];
32
+ if (["d", "a", "*"].includes(s)) {
33
33
  let r = 1;
34
34
  if (t[e + 1] === "{") {
35
- const s = t.indexOf("}", e + 2);
36
- if (s !== -1) {
37
- const y = t.slice(e + 2, s);
35
+ const o = t.indexOf("}", e + 2);
36
+ if (o !== -1) {
37
+ const y = t.slice(e + 2, o);
38
38
  if (y.includes(",")) {
39
39
  const [, p] = y.split(",").map((c) => parseInt(c.trim()));
40
40
  r = p || parseInt(y.split(",")[0]);
41
41
  } else
42
42
  r = parseInt(y);
43
- e = s;
43
+ e = o;
44
44
  }
45
45
  } else {
46
- let s = e + 1;
47
- for (; t[s] === u; )
48
- r++, s++;
49
- e = s - 1;
46
+ let o = e + 1;
47
+ for (; t[o] === s; )
48
+ r++, o++;
49
+ e = o - 1;
50
50
  }
51
- for (let s = 0; s < r; s++)
52
- o.push(Ge[u]), n += Ke(u, l++);
51
+ for (let o = 0; o < r; o++)
52
+ u.push(Ne[s]), n += He(s, l++);
53
53
  } else
54
- o.push(u), n += u;
54
+ u.push(s), n += s;
55
55
  e++;
56
56
  }
57
57
  return {
58
- mask: o,
58
+ mask: u,
59
59
  placeholder: n,
60
- elementPredicate: Ne
60
+ elementPredicate: je
61
61
  };
62
62
  }
63
63
  function me(t) {
64
64
  return t == null || Array.isArray(t) && !t.length || typeof t == "object" && !Object.keys(t).length || !t;
65
65
  }
66
- function ie(t, o, n) {
67
- return typeof t.condition == "function" ? t.condition(o, n) : !0;
66
+ function ie(t, u, n) {
67
+ return typeof t.condition == "function" ? t.condition(u, n) : !0;
68
68
  }
69
69
  function he(t) {
70
70
  if (typeof t != "object" || t === null)
71
71
  return t;
72
72
  if (Array.isArray(t))
73
73
  return t.map((n) => he(n));
74
- const o = {};
74
+ const u = {};
75
75
  return Object.entries(t).forEach(([n, e]) => {
76
- typeof e == "function" ? o[n] = e.bind(o) : o[n] = he(e);
77
- }), o;
76
+ typeof e == "function" ? u[n] = e.bind(u) : u[n] = he(e);
77
+ }), u;
78
78
  }
79
- function ke(t, o) {
80
- return o.findIndex((n) => n.value === t.value || n.label === t.label || n.value === t.label || n.label === t.value);
79
+ function ye(t, u) {
80
+ return u.findIndex((n) => n.value === t.value || n.label === t.label || n.value === t.label || n.label === t.value);
81
81
  }
82
- function X(t, o) {
83
- const n = ke(t, o);
84
- n >= 0 ? o[n].isChecked = !0 : o.push({ ...t, isChecked: !0 });
82
+ function X(t, u) {
83
+ const n = ye(t, u);
84
+ n >= 0 ? u[n].isChecked = !0 : u.push({ ...t, isChecked: !0 });
85
85
  }
86
- function _e(t, o) {
87
- const n = ke(t, o);
88
- n >= 0 && (o[n].isChecked = !1);
86
+ function We(t, u) {
87
+ const n = ye(t, u);
88
+ n >= 0 && (u[n].isChecked = !1);
89
89
  }
90
90
  function Ze(t) {
91
- t.forEach((o) => {
92
- o.isChecked = !1;
91
+ t.forEach((u) => {
92
+ u.isChecked = !1;
93
93
  });
94
94
  }
95
- function Je(t, o) {
96
- return o ? t.filter(
97
- (n) => JSON.stringify(n).toLowerCase().includes(o.toLowerCase())
95
+ function Je(t, u) {
96
+ return u ? t.filter(
97
+ (n) => JSON.stringify(n).toLowerCase().includes(u.toLowerCase())
98
98
  ) : t;
99
99
  }
100
- function Se(t) {
101
- const o = t.label || "", n = t.required ? " *" : "";
102
- return o + n;
100
+ function ke(t) {
101
+ const u = t.label || "", n = t.required ? " *" : "";
102
+ return u + n;
103
103
  }
104
- function oe(t, o) {
105
- if (t === o) return !0;
106
- if (t == null || o == null || typeof t != typeof o) return !1;
107
- if (typeof t != "object") return t === o;
108
- if (Array.isArray(t) && Array.isArray(o))
109
- return t.length !== o.length ? !1 : t.every((l, u) => oe(l, o[u]));
110
- if (Array.isArray(t) !== Array.isArray(o)) return !1;
111
- const n = Object.keys(t), e = Object.keys(o);
104
+ function oe(t, u) {
105
+ if (t === u) return !0;
106
+ if (t == null || u == null || typeof t != typeof u) return !1;
107
+ if (typeof t != "object") return t === u;
108
+ if (Array.isArray(t) && Array.isArray(u))
109
+ return t.length !== u.length ? !1 : t.every((l, s) => oe(l, u[s]));
110
+ if (Array.isArray(t) !== Array.isArray(u)) return !1;
111
+ const n = Object.keys(t), e = Object.keys(u);
112
112
  return n.length !== e.length ? !1 : n.every(
113
- (l) => Object.prototype.hasOwnProperty.call(o, l) && oe(t[l], o[l])
113
+ (l) => Object.prototype.hasOwnProperty.call(u, l) && oe(t[l], u[l])
114
114
  );
115
115
  }
116
- function we() {
116
+ function Se() {
117
117
  const t = E([]);
118
- async function o() {
118
+ async function u() {
119
119
  console.debug("Validating form inputs");
120
- const u = [];
120
+ const s = [];
121
121
  for (const r of t.value)
122
122
  if (typeof (r == null ? void 0 : r.onValueUpdate) == "function" && await r.onValueUpdate(), typeof (r == null ? void 0 : r.getErrors) == "function")
123
123
  try {
124
- const s = r.getErrors();
125
- Array.isArray(s) ? u.push(...s) : console.warn("getErrors() returned non-array value:", s);
126
- } catch (s) {
127
- console.error("Error calling getErrors on component:", s, r);
124
+ const o = r.getErrors();
125
+ Array.isArray(o) ? s.push(...o) : console.warn("getErrors() returned non-array value:", o);
126
+ } catch (o) {
127
+ console.error("Error calling getErrors on component:", o, r);
128
128
  }
129
129
  else
130
130
  console.warn("Component does not have getErrors function:", r);
131
- return u.every(me);
131
+ return s.every(me);
132
132
  }
133
133
  function n() {
134
- t.value.forEach((u) => {
135
- typeof (u == null ? void 0 : u.onReset) == "function" && u.onReset();
134
+ t.value.forEach((s) => {
135
+ typeof (s == null ? void 0 : s.onReset) == "function" && s.onReset();
136
136
  });
137
137
  }
138
138
  function e() {
139
- const u = [];
139
+ const s = [];
140
140
  for (const r of t.value)
141
141
  if (typeof (r == null ? void 0 : r.getErrors) == "function")
142
142
  try {
143
- const s = r.getErrors();
144
- Array.isArray(s) ? u.push(...s) : u.push(String(s));
145
- } catch (s) {
146
- console.error("Error calling getErrors on component:", s, r);
143
+ const o = r.getErrors();
144
+ Array.isArray(o) ? s.push(...o) : s.push(String(o));
145
+ } catch (o) {
146
+ console.error("Error calling getErrors on component:", o, r);
147
147
  }
148
- return u;
148
+ return s;
149
149
  }
150
150
  async function l() {
151
- for (const u of t.value)
152
- typeof (u == null ? void 0 : u.onValueUpdate) == "function" && await u.onValueUpdate();
151
+ for (const s of t.value)
152
+ typeof (s == null ? void 0 : s.onValueUpdate) == "function" && await s.onValueUpdate();
153
153
  }
154
154
  return {
155
155
  dynamicRefs: t,
156
- isFormValid: o,
156
+ isFormValid: u,
157
157
  resetForm: n,
158
158
  getFormErrors: e,
159
159
  updateFormValues: l
160
160
  };
161
161
  }
162
162
  function Qe(t) {
163
- const o = S(
163
+ const u = S(
164
164
  () => Object.entries(t.value).reduce((p, [c, v]) => (v.value !== void 0 && (typeof v.onChange == "function" ? p[c] = v.onChange(v.value, t.value) : p[c] = v.value), p), {})
165
165
  ), n = E({}), e = (p, c, v) => {
166
166
  var i;
167
167
  return typeof ((i = t.value[p].children[c]) == null ? void 0 : i.computedValue) == "function" ? t.value[p].children[c].computedValue(v, t.value) : v;
168
168
  }, l = (p, c, v, i) => {
169
- n.value[p][i] || (n.value[p][i] = {}), Object.entries(c.other ?? {}).forEach(([m, C]) => {
169
+ n.value[p][i] || (n.value[p][i] = {}), Object.entries(c.other ?? {}).forEach(([h, C]) => {
170
170
  var w;
171
- !oe(C, (w = v.other) == null ? void 0 : w[m]) && (n.value[p][i][m] = e(p, m, C));
171
+ !oe(C, (w = v.other) == null ? void 0 : w[h]) && (n.value[p][i][h] = e(p, h, C));
172
172
  });
173
- }, u = (p, c, v) => {
174
- c.forEach((i, m) => {
175
- const C = v[m] ?? { other: {} };
176
- l(p, i, C, m);
173
+ }, s = (p, c, v) => {
174
+ c.forEach((i, h) => {
175
+ const C = v[h] ?? { other: {} };
176
+ l(p, i, C, h);
177
177
  });
178
178
  }, r = (p, { other: c }) => Object.entries(c ?? {}).reduce(
179
- (v, [i, m]) => (v[i] = e(p, i, m), v),
179
+ (v, [i, h]) => (v[i] = e(p, i, h), v),
180
180
  {}
181
- ), s = (p, c, v) => {
181
+ ), o = (p, c, v) => {
182
182
  n.value[p] || (n.value[p] = []);
183
183
  const i = c;
184
- Array.isArray(v[p]) ? u(p, i, v[p]) : n.value[p] = i.map((m) => r(p, m));
184
+ Array.isArray(v[p]) ? s(p, i, v[p]) : n.value[p] = i.map((h) => r(p, h));
185
185
  }, y = (p, c, v) => {
186
186
  if (!c) {
187
187
  delete n.value[p];
188
188
  return;
189
189
  }
190
190
  const i = t.value[p];
191
- i.children !== void 0 ? s(p, c, v) : typeof i.computedValue == "function" && (n.value[p] = i.computedValue(c, t.value));
191
+ i.children !== void 0 ? o(p, c, v) : typeof i.computedValue == "function" && (n.value[p] = i.computedValue(c, t.value));
192
192
  };
193
- return I(
194
- o,
193
+ return D(
194
+ u,
195
195
  (p, c = {}) => {
196
196
  Object.keys(p).forEach((v) => {
197
197
  oe(p[v], c[v]) || y(v, p[v], c);
@@ -204,116 +204,116 @@ function Qe(t) {
204
204
  deep: !0
205
205
  }
206
206
  ), {
207
- formData: o,
207
+ formData: u,
208
208
  computedData: n
209
209
  };
210
210
  }
211
211
  function Xe(t) {
212
- const o = E(0), n = E({}), e = E({}), l = E({});
213
- function u(_) {
212
+ const u = E(0), n = E({}), e = E({}), l = E({});
213
+ function s(V) {
214
214
  const a = {};
215
- return Object.entries(_.schema).forEach(([h, k]) => {
216
- a[h] = k.value;
215
+ return Object.entries(V.schema).forEach(([m, _]) => {
216
+ a[m] = _.value;
217
217
  }), a;
218
218
  }
219
- t.steps.forEach((_) => {
220
- n.value[_.id] = u(_), e.value[_.id] = {}, l.value[_.id] = [];
219
+ t.steps.forEach((V) => {
220
+ n.value[V.id] = s(V), e.value[V.id] = {}, l.value[V.id] = [];
221
221
  });
222
- const r = S(() => t.steps[o.value]), s = S(() => o.value === 0), y = S(() => o.value === t.steps.length - 1), p = S(() => !y.value), c = S(() => !s.value), v = S(() => t.steps.length), i = S(() => v.value === 0 ? 0 : Math.round((o.value + 1) / v.value * 100)), m = S(() => {
223
- const _ = {};
222
+ const r = S(() => t.steps[u.value]), o = S(() => u.value === 0), y = S(() => u.value === t.steps.length - 1), p = S(() => !y.value), c = S(() => !o.value), v = S(() => t.steps.length), i = S(() => v.value === 0 ? 0 : Math.round((u.value + 1) / v.value * 100)), h = S(() => {
223
+ const V = {};
224
224
  return Object.values(n.value).forEach((a) => {
225
- Object.assign(_, a);
226
- }), _;
225
+ Object.assign(V, a);
226
+ }), V;
227
227
  }), C = S(() => {
228
- const _ = {};
228
+ const V = {};
229
229
  return Object.values(e.value).forEach((a) => {
230
- Object.assign(_, a);
231
- }), _;
230
+ Object.assign(V, a);
231
+ }), V;
232
232
  });
233
- function x(_, a) {
234
- n.value[_] = { ...n.value[_], ...a };
233
+ function x(V, a) {
234
+ n.value[V] = { ...n.value[V], ...a };
235
235
  }
236
- function w(_, a) {
237
- e.value[_] = { ...e.value[_], ...a };
236
+ function w(V, a) {
237
+ e.value[V] = { ...e.value[V], ...a };
238
238
  }
239
- function R(_) {
240
- const a = t.steps.find((h) => h.id === _);
241
- a && (n.value[_] = u(a), e.value[_] = {});
239
+ function R(V) {
240
+ const a = t.steps.find((m) => m.id === V);
241
+ a && (n.value[V] = s(a), e.value[V] = {});
242
242
  }
243
243
  async function F() {
244
- const _ = r.value;
245
- if (!_) return !0;
244
+ const V = r.value;
245
+ if (!V) return !0;
246
246
  const a = [];
247
- if (_.validation) {
248
- const h = await _.validation(
249
- n.value[_.id],
250
- e.value[_.id]
247
+ if (V.validation) {
248
+ const m = await V.validation(
249
+ n.value[V.id],
250
+ e.value[V.id]
251
251
  );
252
- h && a.push(...h);
252
+ m && a.push(...m);
253
253
  }
254
- return l.value[_.id] = a, a.length === 0;
254
+ return l.value[V.id] = a, a.length === 0;
255
255
  }
256
- async function q(_) {
257
- return _ < 0 || _ >= t.steps.length || _ > o.value && !await F() ? !1 : (o.value = _, !0);
256
+ async function j(V) {
257
+ return V < 0 || V >= t.steps.length || V > u.value && !await F() ? !1 : (u.value = V, !0);
258
258
  }
259
259
  async function W() {
260
- return p.value ? q(o.value + 1) : !1;
260
+ return p.value ? j(u.value + 1) : !1;
261
261
  }
262
262
  async function J() {
263
- return c.value ? q(o.value - 1) : !1;
263
+ return c.value ? j(u.value - 1) : !1;
264
264
  }
265
265
  function Z() {
266
- o.value = 0, l.value = {}, t.steps.forEach((_) => {
267
- R(_.id), l.value[_.id] = [];
266
+ u.value = 0, l.value = {}, t.steps.forEach((V) => {
267
+ R(V.id), l.value[V.id] = [];
268
268
  });
269
269
  }
270
- async function L() {
271
- let _ = !0;
270
+ async function q() {
271
+ let V = !0;
272
272
  for (const a of t.steps)
273
273
  if (a.validation) {
274
- const h = await a.validation(
274
+ const m = await a.validation(
275
275
  n.value[a.id],
276
276
  e.value[a.id]
277
277
  );
278
- l.value[a.id] = h || [], h && h.length > 0 && (_ = !1);
278
+ l.value[a.id] = m || [], m && m.length > 0 && (V = !1);
279
279
  }
280
- return _;
280
+ return V;
281
281
  }
282
- function M() {
282
+ function L() {
283
283
  return {
284
284
  steps: { ...n.value },
285
285
  computedSteps: { ...e.value },
286
- allFormData: m.value,
286
+ allFormData: h.value,
287
287
  allComputedData: C.value
288
288
  };
289
289
  }
290
290
  return {
291
291
  // State
292
- currentStepIndex: o,
292
+ currentStepIndex: u,
293
293
  currentStep: r,
294
294
  stepData: n,
295
295
  stepComputedData: e,
296
296
  stepValidationErrors: l,
297
297
  // Computed
298
- isFirstStep: s,
298
+ isFirstStep: o,
299
299
  isLastStep: y,
300
300
  canGoNext: p,
301
301
  canGoPrevious: c,
302
302
  totalSteps: v,
303
303
  progressPercentage: i,
304
- allFormData: m,
304
+ allFormData: h,
305
305
  allComputedData: C,
306
306
  // Methods
307
307
  updateStepData: x,
308
308
  updateStepComputedData: w,
309
309
  clearStepData: R,
310
310
  validateCurrentStep: F,
311
- goToStep: q,
311
+ goToStep: j,
312
312
  nextStep: W,
313
313
  previousStep: J,
314
314
  resetForm: Z,
315
- validateAllSteps: L,
316
- getMultiStepFormData: M
315
+ validateAllSteps: q,
316
+ getMultiStepFormData: L
317
317
  };
318
318
  }
319
319
  const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { class: "step-indicator__step-content" }, lt = { class: "step-indicator__step-marker" }, at = { class: "step-indicator__step-info" }, nt = { class: "step-indicator__step-title" }, ot = {
@@ -322,7 +322,7 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
322
322
  }, ut = {
323
323
  key: 0,
324
324
  class: "step-indicator__progress"
325
- }, st = { class: "step-indicator__progress-bar" }, rt = { class: "step-indicator__progress-text" }, it = /* @__PURE__ */ U({
325
+ }, st = { class: "step-indicator__progress-bar" }, rt = { class: "step-indicator__progress-text" }, it = /* @__PURE__ */ T({
326
326
  __name: "StepIndicator",
327
327
  props: {
328
328
  steps: {},
@@ -332,23 +332,23 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
332
332
  allowNavigation: { type: Boolean, default: !1 }
333
333
  },
334
334
  emits: ["step-click"],
335
- setup(t, { emit: o }) {
336
- const n = t, e = o, l = S(() => n.steps.length === 0 ? 0 : (n.activeStepIndex + 1) / n.steps.length * 100);
337
- function u(r) {
335
+ setup(t, { emit: u }) {
336
+ const n = t, e = u, l = S(() => n.steps.length === 0 ? 0 : (n.activeStepIndex + 1) / n.steps.length * 100);
337
+ function s(r) {
338
338
  n.allowNavigation && e("step-click", r);
339
339
  }
340
- return (r, s) => (f(), $("div", {
340
+ return (r, o) => (f(), $("div", {
341
341
  class: ne(["step-indicator", [`step-indicator--${r.position}`, { "step-indicator--clickable": r.allowNavigation }]])
342
342
  }, [
343
343
  B("div", Ye, [
344
- (f(!0), $(T, null, K(r.steps, (y, p) => (f(), $("div", {
344
+ (f(!0), $(M, null, K(r.steps, (y, p) => (f(), $("div", {
345
345
  key: y.id,
346
346
  class: ne(["step-indicator__step", {
347
347
  "step-indicator__step--active": p === r.activeStepIndex,
348
348
  "step-indicator__step--completed": p < r.activeStepIndex,
349
349
  "step-indicator__step--clickable": r.allowNavigation
350
350
  }]),
351
- onClick: (c) => u(p)
351
+ onClick: (c) => s(p)
352
352
  }, [
353
353
  B("div", tt, [
354
354
  B("div", lt, [
@@ -376,9 +376,9 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
376
376
  ])) : O("", !0)
377
377
  ], 2));
378
378
  }
379
- }), de = (t, o) => {
379
+ }), de = (t, u) => {
380
380
  const n = t.__vccOpts || t;
381
- for (const [e, l] of o)
381
+ for (const [e, l] of u)
382
382
  n[e] = l;
383
383
  return n;
384
384
  }, re = /* @__PURE__ */ de(it, [["__scopeId", "data-v-aca1a6d0"]]), ct = { class: "v-form-container" }, dt = {
@@ -387,7 +387,7 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
387
387
  }, pt = { class: "multi-step-form-content" }, vt = { class: "step-nav-buttons" }, ft = { class: "step-action-buttons" }, mt = { class: "step-nav-buttons" }, ht = {
388
388
  key: 1,
389
389
  class: "step-progress-bottom"
390
- }, gt = { class: "step-progress-bar" }, yt = { class: "step-progress-text" }, Ct = /* @__PURE__ */ U({
390
+ }, gt = { class: "step-progress-bar" }, yt = { class: "step-progress-text" }, Ct = /* @__PURE__ */ T({
391
391
  __name: "vForm",
392
392
  props: {
393
393
  schema: {},
@@ -403,139 +403,139 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
403
403
  customButtons: {}
404
404
  },
405
405
  emits: ["submit", "multi-step-submit", "step-change", "clear", "cancel"],
406
- setup(t, { expose: o, emit: n }) {
407
- const e = t, l = n, u = S(() => !!e.multiStepConfig), r = E(e.schema || {}), s = e.multiStepConfig ? Xe(e.multiStepConfig) : null, { dynamicRefs: y, isFormValid: p, resetForm: c } = we(), { formData: v, computedData: i } = Qe(r), m = S(() => (s == null ? void 0 : s.currentStepIndex.value) ?? 0), C = S(() => s == null ? void 0 : s.currentStep.value), x = S(() => (s == null ? void 0 : s.isLastStep.value) ?? !0), w = S(() => (s == null ? void 0 : s.canGoNext.value) ?? !1), R = S(() => (s == null ? void 0 : s.canGoPrevious.value) ?? !1), F = S(() => !u.value || !s ? 0 : s.progressPercentage.value);
408
- I(
406
+ setup(t, { expose: u, emit: n }) {
407
+ const e = t, l = n, s = S(() => !!e.multiStepConfig), r = E(e.schema || {}), o = e.multiStepConfig ? Xe(e.multiStepConfig) : null, { dynamicRefs: y, isFormValid: p, resetForm: c } = Se(), { formData: v, computedData: i } = Qe(r), h = S(() => (o == null ? void 0 : o.currentStepIndex.value) ?? 0), C = S(() => o == null ? void 0 : o.currentStep.value), x = S(() => (o == null ? void 0 : o.isLastStep.value) ?? !0), w = S(() => (o == null ? void 0 : o.canGoNext.value) ?? !1), R = S(() => (o == null ? void 0 : o.canGoPrevious.value) ?? !1), F = S(() => !s.value || !o ? 0 : o.progressPercentage.value);
408
+ D(
409
409
  () => C.value,
410
410
  (a) => {
411
- a && u.value && (r.value = a.schema);
411
+ a && s.value && (r.value = a.schema);
412
412
  },
413
413
  { immediate: !0 }
414
- ), I(
414
+ ), D(
415
415
  [v, i],
416
- ([a, h]) => {
417
- u.value && s && C.value && (s.updateStepData(C.value.id, a), s.updateStepComputedData(C.value.id, h));
416
+ ([a, m]) => {
417
+ s.value && o && C.value && (o.updateStepData(C.value.id, a), o.updateStepComputedData(C.value.id, m));
418
418
  },
419
419
  { deep: !0 }
420
- ), I(
420
+ ), D(
421
421
  () => e.schema,
422
422
  (a) => {
423
- if (!u.value && a) {
423
+ if (!s.value && a) {
424
424
  r.value = a;
425
- for (const [h, k] of Object.entries(a))
426
- k.value !== void 0 && (r.value[h].value = k.value);
425
+ for (const [m, _] of Object.entries(a))
426
+ _.value !== void 0 && (r.value[m].value = _.value);
427
427
  }
428
428
  },
429
429
  { deep: !0, immediate: !0 }
430
430
  );
431
- async function q() {
432
- if (u.value && s) {
433
- if (!await s.validateAllSteps()) return;
434
- const h = s.getMultiStepFormData();
435
- l("multi-step-submit", h);
431
+ async function j() {
432
+ if (s.value && o) {
433
+ if (!await o.validateAllSteps()) return;
434
+ const m = o.getMultiStepFormData();
435
+ l("multi-step-submit", m);
436
436
  } else {
437
437
  if (!await p()) return;
438
438
  l("submit", v.value, i.value);
439
439
  }
440
440
  }
441
441
  function W() {
442
- u.value && s ? s.resetForm() : c(), l("clear");
442
+ s.value && o ? o.resetForm() : c(), l("clear");
443
443
  }
444
444
  function J() {
445
- u.value && s && C.value && s.clearStepData(C.value.id);
445
+ s.value && o && C.value && o.clearStepData(C.value.id);
446
446
  }
447
447
  function Z() {
448
- u.value && s ? s.resetForm() : c(), l("cancel");
448
+ s.value && o ? o.resetForm() : c(), l("cancel");
449
449
  }
450
- async function L() {
451
- if (s) {
450
+ async function q() {
451
+ if (o) {
452
452
  if (!await p())
453
453
  return;
454
- await s.nextStep() && C.value && l("step-change", m.value, C.value.id);
454
+ await o.nextStep() && C.value && l("step-change", h.value, C.value.id);
455
455
  }
456
456
  }
457
- async function M() {
458
- s && await s.previousStep() && C.value && l("step-change", m.value, C.value.id);
457
+ async function L() {
458
+ o && await o.previousStep() && C.value && l("step-change", h.value, C.value.id);
459
459
  }
460
- async function _(a) {
461
- if (s) {
462
- if (a > m.value && !await p())
460
+ async function V(a) {
461
+ if (o) {
462
+ if (a > h.value && !await p())
463
463
  return;
464
- await s.goToStep(a) && C.value && l("step-change", a, C.value.id);
464
+ await o.goToStep(a) && C.value && l("step-change", a, C.value.id);
465
465
  }
466
466
  }
467
- return I(
467
+ return D(
468
468
  v,
469
469
  async () => {
470
470
  var a;
471
- for (const [h, k] of Object.entries(r.value))
472
- if (!ie(k, v.value, i.value)) {
473
- const g = u.value && C.value ? C.value.schema[h] : (a = e.schema) == null ? void 0 : a[h];
474
- g && (k.value = g.value);
471
+ for (const [m, _] of Object.entries(r.value))
472
+ if (!ie(_, v.value, i.value)) {
473
+ const g = s.value && C.value ? C.value.schema[m] : (a = e.schema) == null ? void 0 : a[m];
474
+ g && (_.value = g.value);
475
475
  }
476
476
  },
477
477
  {
478
478
  deep: !0,
479
479
  immediate: !0
480
480
  }
481
- ), o({
481
+ ), u({
482
482
  resetForm: W,
483
483
  isFormValid: p,
484
- resolveData: () => u.value && s ? s.getMultiStepFormData() : {
484
+ resolveData: () => s.value && o ? o.getMultiStepFormData() : {
485
485
  formData: v.value,
486
486
  computedData: i.value
487
487
  },
488
488
  // Multi-step specific methods
489
- nextStep: L,
490
- previousStep: M,
491
- goToStep: _,
489
+ nextStep: q,
490
+ previousStep: L,
491
+ goToStep: V,
492
492
  getCurrentStep: () => C.value,
493
- getCurrentStepIndex: () => m.value
494
- }), (a, h) => {
495
- var k;
493
+ getCurrentStepIndex: () => h.value
494
+ }), (a, m) => {
495
+ var _;
496
496
  return f(), $("div", ct, [
497
- u.value ? (f(), $("div", dt, [
498
- a.multiStepConfig && a.multiStepConfig.stepPosition === "top" ? (f(), V(re, {
497
+ s.value ? (f(), $("div", dt, [
498
+ a.multiStepConfig && a.multiStepConfig.stepPosition === "top" ? (f(), b(re, {
499
499
  key: 0,
500
500
  steps: a.multiStepConfig.steps,
501
- "active-step-index": m.value,
501
+ "active-step-index": h.value,
502
502
  position: a.multiStepConfig.stepPosition || "top",
503
503
  "show-progress": a.multiStepConfig.showProgress,
504
504
  "allow-navigation": a.multiStepConfig.allowStepNavigation,
505
- onStepClick: _
505
+ onStepClick: V
506
506
  }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0),
507
507
  B("div", {
508
- class: ne(["multi-step-content", `multi-step-content--${((k = a.multiStepConfig) == null ? void 0 : k.stepPosition) || "top"}`])
508
+ class: ne(["multi-step-content", `multi-step-content--${((_ = a.multiStepConfig) == null ? void 0 : _.stepPosition) || "top"}`])
509
509
  }, [
510
- a.multiStepConfig && a.multiStepConfig.stepPosition === "left" ? (f(), V(re, {
510
+ a.multiStepConfig && a.multiStepConfig.stepPosition === "left" ? (f(), b(re, {
511
511
  key: 0,
512
512
  steps: a.multiStepConfig.steps,
513
- "active-step-index": m.value,
513
+ "active-step-index": h.value,
514
514
  position: a.multiStepConfig.stepPosition ?? "top",
515
515
  "show-progress": a.multiStepConfig.showProgress,
516
516
  "allow-navigation": a.multiStepConfig.allowStepNavigation,
517
- onStepClick: _,
517
+ onStepClick: V,
518
518
  class: "multi-step-sidebar"
519
519
  }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0),
520
520
  B("div", pt, [
521
- P(d(Ce), null, {
522
- default: b(() => [
523
- P(d(le), null, {
524
- default: b(() => [
525
- (f(!0), $(T, null, K(Object.keys(r.value), (g) => {
526
- var D, H, Q, ee, te;
527
- return f(), $(T, null, [
528
- d(ie)(r.value[g], d(v), d(i)) ? (f(), V(d(ae), {
521
+ I(d(Ve), null, {
522
+ default: k(() => [
523
+ I(d(le), null, {
524
+ default: k(() => [
525
+ (f(!0), $(M, null, K(Object.keys(r.value), (g) => {
526
+ var P, U, Q, ee, te;
527
+ return f(), $(M, null, [
528
+ d(ie)(r.value[g], d(v), d(i)) ? (f(), b(d(ae), {
529
529
  key: g,
530
- size: ((D = r.value[g].grid) == null ? void 0 : D.xs) ?? "12",
531
- "size-sm": (H = r.value[g].grid) == null ? void 0 : H.sm,
530
+ size: ((P = r.value[g].grid) == null ? void 0 : P.xs) ?? "12",
531
+ "size-sm": (U = r.value[g].grid) == null ? void 0 : U.sm,
532
532
  "size-md": (Q = r.value[g].grid) == null ? void 0 : Q.md,
533
533
  "size-lg": (ee = r.value[g].grid) == null ? void 0 : ee.lg,
534
534
  "size-xl": (te = r.value[g].grid) == null ? void 0 : te.xl,
535
535
  class: "ion-margin-vertical"
536
536
  }, {
537
- default: b(() => [
538
- (f(), V(fe(r.value[g].type), {
537
+ default: k(() => [
538
+ (f(), b(fe(r.value[g].type), {
539
539
  modelValue: r.value[g],
540
540
  "onUpdate:modelValue": (pe) => r.value[g] = pe,
541
541
  schema: r.value,
@@ -556,23 +556,23 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
556
556
  ]),
557
557
  _: 1
558
558
  }),
559
- a.hideButtons ? O("", !0) : (f(), V(d(le), {
559
+ a.hideButtons ? O("", !0) : (f(), b(d(le), {
560
560
  key: 0,
561
561
  class: "multi-step-buttons"
562
562
  }, {
563
- default: b(() => [
564
- P(d(ae), {
563
+ default: k(() => [
564
+ I(d(ae), {
565
565
  size: "12",
566
566
  class: "button-container"
567
567
  }, {
568
- default: b(() => [
568
+ default: k(() => [
569
569
  B("div", vt, [
570
- R.value ? (f(), V(d(j), {
570
+ R.value ? (f(), b(d(N), {
571
571
  key: 0,
572
- onClick: M,
572
+ onClick: L,
573
573
  fill: "outline"
574
574
  }, {
575
- default: b(() => h[0] || (h[0] = [
575
+ default: k(() => m[0] || (m[0] = [
576
576
  z(" Previous ")
577
577
  ])),
578
578
  _: 1,
@@ -580,53 +580,53 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
580
580
  })) : O("", !0)
581
581
  ]),
582
582
  B("div", ft, [
583
- a.showCancelButton ? (f(), V(d(j), {
583
+ a.showCancelButton ? (f(), b(d(N), {
584
584
  key: 0,
585
585
  onClick: Z,
586
586
  fill: "outline"
587
587
  }, {
588
- default: b(() => [
588
+ default: k(() => [
589
589
  z(A(a.cancelButtonText ?? "Cancel"), 1)
590
590
  ]),
591
591
  _: 1
592
592
  })) : O("", !0),
593
- a.showClearButton ? (f(), V(d(j), {
593
+ a.showClearButton ? (f(), b(d(N), {
594
594
  key: 1,
595
595
  onClick: J,
596
596
  fill: "outline"
597
597
  }, {
598
- default: b(() => [
598
+ default: k(() => [
599
599
  z(A(a.clearButtonText ?? "Reset"), 1)
600
600
  ]),
601
601
  _: 1
602
602
  })) : O("", !0),
603
- (f(!0), $(T, null, K(a.customButtons, (g) => (f(), V(d(j), {
603
+ (f(!0), $(M, null, K(a.customButtons, (g) => (f(), b(d(N), {
604
604
  key: g.label,
605
605
  onClick: g.action,
606
606
  color: g.color ?? "primary"
607
607
  }, {
608
- default: b(() => [
608
+ default: k(() => [
609
609
  z(A(g.label), 1)
610
610
  ]),
611
611
  _: 2
612
612
  }, 1032, ["onClick", "color"]))), 128))
613
613
  ]),
614
614
  B("div", mt, [
615
- w.value ? (f(), V(d(j), {
615
+ w.value ? (f(), b(d(N), {
616
616
  key: 0,
617
- onClick: L
617
+ onClick: q
618
618
  }, {
619
- default: b(() => h[1] || (h[1] = [
619
+ default: k(() => m[1] || (m[1] = [
620
620
  z(" Next ")
621
621
  ])),
622
622
  _: 1,
623
623
  __: [1]
624
624
  })) : O("", !0),
625
- x.value ? (f(), V(d(j), {
625
+ x.value ? (f(), b(d(N), {
626
626
  key: 1,
627
- onClick: q
627
+ onClick: j
628
628
  }, {
629
- default: b(() => [
629
+ default: k(() => [
630
630
  z(A(a.submitButtonText ?? "Submit"), 1)
631
631
  ]),
632
632
  _: 1
@@ -645,47 +645,47 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
645
645
  style: ve({ width: `${F.value}%` })
646
646
  }, null, 4)
647
647
  ]),
648
- B("div", yt, " Step " + A(m.value + 1) + " of " + A(a.multiStepConfig.steps.length), 1)
648
+ B("div", yt, " Step " + A(h.value + 1) + " of " + A(a.multiStepConfig.steps.length), 1)
649
649
  ])) : O("", !0)
650
650
  ]),
651
- a.multiStepConfig && a.multiStepConfig.stepPosition === "right" ? (f(), V(re, {
651
+ a.multiStepConfig && a.multiStepConfig.stepPosition === "right" ? (f(), b(re, {
652
652
  key: 1,
653
653
  steps: a.multiStepConfig.steps,
654
- "active-step-index": m.value,
654
+ "active-step-index": h.value,
655
655
  position: a.multiStepConfig.stepPosition,
656
656
  "show-progress": a.multiStepConfig.showProgress,
657
657
  "allow-navigation": a.multiStepConfig.allowStepNavigation,
658
- onStepClick: _,
658
+ onStepClick: V,
659
659
  class: "multi-step-sidebar"
660
660
  }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0)
661
661
  ], 2),
662
- a.multiStepConfig && a.multiStepConfig.stepPosition === "bottom" ? (f(), V(re, {
662
+ a.multiStepConfig && a.multiStepConfig.stepPosition === "bottom" ? (f(), b(re, {
663
663
  key: 1,
664
664
  steps: a.multiStepConfig.steps,
665
- "active-step-index": m.value,
665
+ "active-step-index": h.value,
666
666
  position: a.multiStepConfig.stepPosition,
667
667
  "show-progress": a.multiStepConfig.showProgress,
668
668
  "allow-navigation": a.multiStepConfig.allowStepNavigation,
669
- onStepClick: _
669
+ onStepClick: V
670
670
  }, null, 8, ["steps", "active-step-index", "position", "show-progress", "allow-navigation"])) : O("", !0)
671
- ])) : (f(), V(d(Ce), { key: 1 }, {
672
- default: b(() => [
673
- P(d(le), null, {
674
- default: b(() => [
675
- (f(!0), $(T, null, K(Object.keys(r.value), (g) => {
676
- var D, H, Q, ee, te;
677
- return f(), $(T, null, [
678
- d(ie)(r.value[g], d(v), d(i)) ? (f(), V(d(ae), {
671
+ ])) : (f(), b(d(Ve), { key: 1 }, {
672
+ default: k(() => [
673
+ I(d(le), null, {
674
+ default: k(() => [
675
+ (f(!0), $(M, null, K(Object.keys(r.value), (g) => {
676
+ var P, U, Q, ee, te;
677
+ return f(), $(M, null, [
678
+ d(ie)(r.value[g], d(v), d(i)) ? (f(), b(d(ae), {
679
679
  key: g,
680
- size: ((D = r.value[g].grid) == null ? void 0 : D.xs) ?? "12",
681
- "size-sm": (H = r.value[g].grid) == null ? void 0 : H.sm,
680
+ size: ((P = r.value[g].grid) == null ? void 0 : P.xs) ?? "12",
681
+ "size-sm": (U = r.value[g].grid) == null ? void 0 : U.sm,
682
682
  "size-md": (Q = r.value[g].grid) == null ? void 0 : Q.md,
683
683
  "size-lg": (ee = r.value[g].grid) == null ? void 0 : ee.lg,
684
684
  "size-xl": (te = r.value[g].grid) == null ? void 0 : te.xl,
685
685
  class: "ion-margin-vertical"
686
686
  }, {
687
- default: b(() => [
688
- (f(), V(fe(r.value[g].type), {
687
+ default: k(() => [
688
+ (f(), b(fe(r.value[g].type), {
689
689
  modelValue: r.value[g],
690
690
  "onUpdate:modelValue": (pe) => r.value[g] = pe,
691
691
  schema: r.value,
@@ -703,43 +703,43 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
703
703
  ]),
704
704
  _: 1
705
705
  }),
706
- a.hideButtons ? O("", !0) : (f(), V(d(le), { key: 0 }, {
707
- default: b(() => [
708
- P(d(ae), {
706
+ a.hideButtons ? O("", !0) : (f(), b(d(le), { key: 0 }, {
707
+ default: k(() => [
708
+ I(d(ae), {
709
709
  size: "12",
710
710
  style: ve([{ display: "flex" }, { justifyContent: a.buttonPlacement }])
711
711
  }, {
712
- default: b(() => [
713
- a.showCancelButton ? (f(), V(d(j), {
712
+ default: k(() => [
713
+ a.showCancelButton ? (f(), b(d(N), {
714
714
  key: 0,
715
715
  onClick: Z
716
716
  }, {
717
- default: b(() => [
717
+ default: k(() => [
718
718
  z(A(a.cancelButtonText ?? "Cancel"), 1)
719
719
  ]),
720
720
  _: 1
721
721
  })) : O("", !0),
722
- a.showClearButton ? (f(), V(d(j), {
722
+ a.showClearButton ? (f(), b(d(N), {
723
723
  key: 1,
724
724
  onClick: W
725
725
  }, {
726
- default: b(() => [
726
+ default: k(() => [
727
727
  z(A(a.clearButtonText ?? "Reset"), 1)
728
728
  ]),
729
729
  _: 1
730
730
  })) : O("", !0),
731
- (f(!0), $(T, null, K(a.customButtons, (g) => (f(), V(d(j), {
731
+ (f(!0), $(M, null, K(a.customButtons, (g) => (f(), b(d(N), {
732
732
  key: g.label,
733
733
  onClick: g.action,
734
734
  color: g.color ?? "primary"
735
735
  }, {
736
- default: b(() => [
736
+ default: k(() => [
737
737
  z(A(g.label), 1)
738
738
  ]),
739
739
  _: 2
740
740
  }, 1032, ["onClick", "color"]))), 128)),
741
- P(d(j), { onClick: q }, {
742
- default: b(() => [
741
+ I(d(N), { onClick: j }, {
742
+ default: k(() => [
743
743
  z(A(a.submitButtonText ?? "Submit"), 1)
744
744
  ]),
745
745
  _: 1
@@ -756,12 +756,12 @@ const Ye = { class: "step-indicator__container" }, et = ["onClick"], tt = { clas
756
756
  ]);
757
757
  };
758
758
  }
759
- }), _t = /* @__PURE__ */ de(Ct, [["__scopeId", "data-v-3850cccc"]]);
760
- function Vt(t) {
759
+ }), Vt = /* @__PURE__ */ de(Ct, [["__scopeId", "data-v-3850cccc"]]);
760
+ function _t(t) {
761
761
  return {
762
762
  applyValidationState: async (e) => {
763
- var l, u, r, s, y;
764
- (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (u = t.value) == null || u.$el.classList.remove("ion-valid"), e ? (r = t.value) == null || r.$el.classList.add("ion-valid") : (s = t.value) == null || s.$el.classList.add("ion-invalid"), (y = t.value) == null || y.$el.classList.add("ion-touched");
763
+ var l, s, r, o, y;
764
+ (l = t.value) == null || l.$el.classList.remove("ion-invalid"), (s = t.value) == null || s.$el.classList.remove("ion-valid"), e ? (r = t.value) == null || r.$el.classList.add("ion-valid") : (o = t.value) == null || o.$el.classList.add("ion-invalid"), (y = t.value) == null || y.$el.classList.add("ion-touched");
765
765
  },
766
766
  resetValidationState: () => {
767
767
  var e, l;
@@ -769,75 +769,75 @@ function Vt(t) {
769
769
  }
770
770
  };
771
771
  }
772
- function ue(t, o, n, e, l) {
773
- const { applyValidationState: u, resetValidationState: r } = Vt(t);
774
- async function s() {
775
- if (o.value.required && !n.value)
776
- return o.value.error = "This field is required", !1;
772
+ function ue(t, u, n, e, l) {
773
+ const { applyValidationState: s, resetValidationState: r } = _t(t);
774
+ async function o() {
775
+ if (u.value.required && !n.value)
776
+ return u.value.error = "This field is required", !1;
777
777
  if (l) {
778
778
  const i = await l(n.value);
779
779
  if (typeof i == "string")
780
- return o.value.error = i, !1;
780
+ return u.value.error = i, !1;
781
781
  if (i === !1)
782
782
  return !1;
783
783
  }
784
- if (o.value.validation) {
785
- const i = await o.value.validation(n.value, e == null ? void 0 : e.value);
784
+ if (u.value.validation) {
785
+ const i = await u.value.validation(n.value, e == null ? void 0 : e.value);
786
786
  if (i && i.length)
787
- return o.value.error = i.join(), !1;
787
+ return u.value.error = i.join(), !1;
788
788
  }
789
789
  return !0;
790
790
  }
791
791
  async function y() {
792
- const i = await s();
793
- i && (o.value.error = "", o.value.value = n.value), await u(i);
792
+ const i = await o();
793
+ i && (u.value.error = "", u.value.value = n.value), await s(i);
794
794
  }
795
795
  function p() {
796
- r(), o.value.error = "";
796
+ r(), u.value.error = "";
797
797
  }
798
798
  function c(i = "") {
799
- n.value = i, o.value.error = "", o.value.value = i;
799
+ n.value = i, u.value.error = "", u.value.value = i;
800
800
  }
801
801
  function v() {
802
- return o.value.error ? [o.value.error] : [];
802
+ return u.value.error ? [u.value.error] : [];
803
803
  }
804
804
  return {
805
- isValid: s,
805
+ isValid: o,
806
806
  onValueUpdate: y,
807
807
  onFocus: p,
808
808
  onReset: c,
809
809
  getErrors: v,
810
- applyValidationState: u,
810
+ applyValidationState: s,
811
811
  resetValidationState: r
812
812
  };
813
813
  }
814
814
  function bt(t) {
815
- const o = S(() => !!t.value.label), n = S(() => !!t.value.required), e = S(() => t.value.label || "");
815
+ const u = S(() => !!t.value.label), n = S(() => !!t.value.required), e = S(() => t.value.label || "");
816
816
  return {
817
- showLabel: o,
817
+ showLabel: u,
818
818
  showRequired: n,
819
819
  labelText: e
820
820
  };
821
821
  }
822
- const ye = /* @__PURE__ */ U({
822
+ const Ce = /* @__PURE__ */ T({
823
823
  __name: "InputLabel",
824
824
  props: {
825
825
  model: {}
826
826
  },
827
827
  setup(t) {
828
- const o = t, { showLabel: n, showRequired: e, labelText: l } = bt(Oe(o, "model"));
829
- return (u, r) => d(n) ? (f(), V(d(Y), {
828
+ const u = t, { showLabel: n, showRequired: e, labelText: l } = bt(we(u, "model"));
829
+ return (s, r) => d(n) ? (f(), b(d(Y), {
830
830
  key: 0,
831
831
  slot: "label",
832
832
  class: "input-label"
833
833
  }, {
834
- default: b(() => [
834
+ default: k(() => [
835
835
  z(A(d(l)) + " ", 1),
836
- d(e) ? (f(), V(d(Re), {
836
+ d(e) ? (f(), b(d(xe), {
837
837
  key: 0,
838
838
  color: "danger"
839
839
  }, {
840
- default: b(() => r[0] || (r[0] = [
840
+ default: k(() => r[0] || (r[0] = [
841
841
  z("*")
842
842
  ])),
843
843
  _: 1,
@@ -847,9 +847,9 @@ const ye = /* @__PURE__ */ U({
847
847
  _: 1
848
848
  })) : O("", !0);
849
849
  }
850
- }), se = /* @__PURE__ */ U({
850
+ }), se = /* @__PURE__ */ T({
851
851
  __name: "BaseInput",
852
- props: /* @__PURE__ */ N({
852
+ props: /* @__PURE__ */ G({
853
853
  schema: {},
854
854
  type: {}
855
855
  }, {
@@ -857,35 +857,35 @@ const ye = /* @__PURE__ */ U({
857
857
  modelModifiers: {}
858
858
  }),
859
859
  emits: ["update:modelValue"],
860
- setup(t, { expose: o }) {
861
- const n = t, e = G(t, "modelValue"), l = E(null), u = E(e.value.value), r = S(() => n.schema), { isValid: s, onValueUpdate: y, onFocus: p, onReset: c, getErrors: v } = ue(
860
+ setup(t, { expose: u }) {
861
+ const n = t, e = H(t, "modelValue"), l = E(null), s = E(e.value.value), r = S(() => n.schema), { isValid: o, onValueUpdate: y, onFocus: p, onReset: c, getErrors: v } = ue(
862
862
  l,
863
863
  e,
864
- u,
864
+ s,
865
865
  r
866
866
  ), i = S(() => {
867
- if (e.value.pattern) return We(e.value.pattern);
867
+ if (e.value.pattern) return Ke(e.value.pattern);
868
868
  });
869
- return I(
869
+ return D(
870
870
  () => e.value.value,
871
- (m) => u.value = m
872
- ), o({
871
+ (h) => s.value = h
872
+ ), u({
873
873
  onValueUpdate: y,
874
874
  onReset: c,
875
875
  getErrors: v,
876
- isValid: s
877
- }), (m, C) => {
876
+ isValid: o
877
+ }), (h, C) => {
878
878
  var w;
879
- const x = Ee("maskito");
880
- return xe((f(), V(d(Ve), {
879
+ const x = Oe("maskito");
880
+ return Ee((f(), b(d(_e), {
881
881
  ref_key: "inputRef",
882
882
  ref: l,
883
- modelValue: u.value,
884
- "onUpdate:modelValue": C[0] || (C[0] = (R) => u.value = R),
883
+ modelValue: s.value,
884
+ "onUpdate:modelValue": C[0] || (C[0] = (R) => s.value = R),
885
885
  "clear-input": !0,
886
886
  fill: e.value.fill ?? "solid",
887
887
  "label-placement": e.value.labelPlacement ?? "stacked",
888
- type: m.type ?? "text",
888
+ type: h.type ?? "text",
889
889
  required: e.value.required,
890
890
  "error-text": e.value.error,
891
891
  autofocus: e.value.autoFocus,
@@ -901,27 +901,27 @@ const ye = /* @__PURE__ */ U({
901
901
  onIonChange: d(y),
902
902
  onIonBlur: d(y)
903
903
  }, {
904
- default: b(() => [
905
- P(ye, { model: e.value }, null, 8, ["model"]),
906
- e.value.prefix ? (f(), V(d(Y), {
904
+ default: k(() => [
905
+ I(Ce, { model: e.value }, null, 8, ["model"]),
906
+ e.value.prefix ? (f(), b(d(Y), {
907
907
  key: 0,
908
908
  slot: "start"
909
909
  }, {
910
- default: b(() => [
910
+ default: k(() => [
911
911
  z(A(e.value.prefix), 1)
912
912
  ]),
913
913
  _: 1
914
914
  })) : O("", !0),
915
- e.value.suffix ? (f(), V(d(Y), {
915
+ e.value.suffix ? (f(), b(d(Y), {
916
916
  key: 1,
917
917
  slot: "end"
918
918
  }, {
919
- default: b(() => [
919
+ default: k(() => [
920
920
  z(A(e.value.suffix), 1)
921
921
  ]),
922
922
  _: 1
923
923
  })) : O("", !0),
924
- m.type === "password" ? (f(), V(d(Ae), {
924
+ h.type === "password" ? (f(), b(d(Re), {
925
925
  key: 2,
926
926
  slot: "end"
927
927
  })) : O("", !0)
@@ -932,18 +932,18 @@ const ye = /* @__PURE__ */ U({
932
932
  ]);
933
933
  };
934
934
  }
935
- }), kt = /* @__PURE__ */ U({
935
+ }), kt = /* @__PURE__ */ T({
936
936
  __name: "TextInput",
937
- props: /* @__PURE__ */ N({
937
+ props: /* @__PURE__ */ G({
938
938
  schema: {}
939
939
  }, {
940
940
  modelValue: { type: Object, default: {} },
941
941
  modelModifiers: {}
942
942
  }),
943
943
  emits: ["update:modelValue"],
944
- setup(t, { expose: o }) {
945
- const n = G(t, "modelValue"), e = E(null);
946
- return o({
944
+ setup(t, { expose: u }) {
945
+ const n = H(t, "modelValue"), e = E(null);
946
+ return u({
947
947
  onReset: () => {
948
948
  var l;
949
949
  return (l = e.value) == null ? void 0 : l.onReset();
@@ -953,30 +953,30 @@ const ye = /* @__PURE__ */ U({
953
953
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
954
954
  },
955
955
  getErrors: () => {
956
- var l, u;
957
- return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
956
+ var l, s;
957
+ return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
958
958
  }
959
- }), (l, u) => (f(), V(se, {
959
+ }), (l, s) => (f(), b(se, {
960
960
  modelValue: n.value,
961
- "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
961
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
962
962
  type: "text",
963
963
  schema: l.schema,
964
964
  ref_key: "inputRef",
965
965
  ref: e
966
966
  }, null, 8, ["modelValue", "schema"]));
967
967
  }
968
- }), St = /* @__PURE__ */ U({
968
+ }), St = /* @__PURE__ */ T({
969
969
  __name: "DateInput",
970
- props: /* @__PURE__ */ N({
970
+ props: /* @__PURE__ */ G({
971
971
  schema: {}
972
972
  }, {
973
973
  modelValue: { type: Object, default: {} },
974
974
  modelModifiers: {}
975
975
  }),
976
976
  emits: ["update:modelValue"],
977
- setup(t, { expose: o }) {
978
- const n = G(t, "modelValue"), e = E(null);
979
- return o({
977
+ setup(t, { expose: u }) {
978
+ const n = H(t, "modelValue"), e = E(null);
979
+ return u({
980
980
  onValueUpdate: () => {
981
981
  var l;
982
982
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
@@ -986,30 +986,30 @@ const ye = /* @__PURE__ */ U({
986
986
  return (l = e.value) == null ? void 0 : l.onReset();
987
987
  },
988
988
  getErrors: () => {
989
- var l, u;
990
- return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
989
+ var l, s;
990
+ return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
991
991
  }
992
- }), (l, u) => (f(), V(se, {
992
+ }), (l, s) => (f(), b(se, {
993
993
  modelValue: n.value,
994
- "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
994
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
995
995
  type: n.value.enableTime ? "datetime-local" : "date",
996
996
  schema: l.schema,
997
997
  ref_key: "inputRef",
998
998
  ref: e
999
999
  }, null, 8, ["modelValue", "type", "schema"]));
1000
1000
  }
1001
- }), wt = /* @__PURE__ */ U({
1001
+ }), wt = /* @__PURE__ */ T({
1002
1002
  __name: "NumberInput",
1003
- props: /* @__PURE__ */ N({
1003
+ props: /* @__PURE__ */ G({
1004
1004
  schema: {}
1005
1005
  }, {
1006
1006
  modelValue: { type: Object, default: {} },
1007
1007
  modelModifiers: {}
1008
1008
  }),
1009
1009
  emits: ["update:modelValue"],
1010
- setup(t, { expose: o }) {
1011
- const n = G(t, "modelValue"), e = E(null);
1012
- return o({
1010
+ setup(t, { expose: u }) {
1011
+ const n = H(t, "modelValue"), e = E(null);
1012
+ return u({
1013
1013
  onReset: () => {
1014
1014
  var l;
1015
1015
  return (l = e.value) == null ? void 0 : l.onReset();
@@ -1019,30 +1019,30 @@ const ye = /* @__PURE__ */ U({
1019
1019
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
1020
1020
  },
1021
1021
  getErrors: () => {
1022
- var l, u;
1023
- return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
1022
+ var l, s;
1023
+ return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1024
1024
  }
1025
- }), (l, u) => (f(), V(se, {
1025
+ }), (l, s) => (f(), b(se, {
1026
1026
  modelValue: n.value,
1027
- "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
1027
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
1028
1028
  type: "number",
1029
1029
  schema: l.schema,
1030
1030
  ref_key: "inputRef",
1031
1031
  ref: e
1032
1032
  }, null, 8, ["modelValue", "schema"]));
1033
1033
  }
1034
- }), Ot = /* @__PURE__ */ U({
1034
+ }), Ot = /* @__PURE__ */ T({
1035
1035
  __name: "EmailInput",
1036
- props: /* @__PURE__ */ N({
1036
+ props: /* @__PURE__ */ G({
1037
1037
  schema: {}
1038
1038
  }, {
1039
1039
  modelValue: { type: Object, default: {} },
1040
1040
  modelModifiers: {}
1041
1041
  }),
1042
1042
  emits: ["update:modelValue"],
1043
- setup(t, { expose: o }) {
1044
- const n = G(t, "modelValue"), e = E(null);
1045
- return o({
1043
+ setup(t, { expose: u }) {
1044
+ const n = H(t, "modelValue"), e = E(null);
1045
+ return u({
1046
1046
  onReset: () => {
1047
1047
  var l;
1048
1048
  return (l = e.value) == null ? void 0 : l.onReset();
@@ -1052,30 +1052,30 @@ const ye = /* @__PURE__ */ U({
1052
1052
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
1053
1053
  },
1054
1054
  getErrors: () => {
1055
- var l, u;
1056
- return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
1055
+ var l, s;
1056
+ return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1057
1057
  }
1058
- }), (l, u) => (f(), V(se, {
1058
+ }), (l, s) => (f(), b(se, {
1059
1059
  modelValue: n.value,
1060
- "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
1060
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
1061
1061
  type: "email",
1062
1062
  schema: l.schema,
1063
1063
  ref_key: "inputRef",
1064
1064
  ref: e
1065
1065
  }, null, 8, ["modelValue", "schema"]));
1066
1066
  }
1067
- }), Et = /* @__PURE__ */ U({
1067
+ }), Et = /* @__PURE__ */ T({
1068
1068
  __name: "PasswordInput",
1069
- props: /* @__PURE__ */ N({
1069
+ props: /* @__PURE__ */ G({
1070
1070
  schema: {}
1071
1071
  }, {
1072
1072
  modelValue: { type: Object, default: {} },
1073
1073
  modelModifiers: {}
1074
1074
  }),
1075
1075
  emits: ["update:modelValue"],
1076
- setup(t, { expose: o }) {
1077
- const n = G(t, "modelValue"), e = E(null);
1078
- return o({
1076
+ setup(t, { expose: u }) {
1077
+ const n = H(t, "modelValue"), e = E(null);
1078
+ return u({
1079
1079
  onReset: () => {
1080
1080
  var l;
1081
1081
  return (l = e.value) == null ? void 0 : l.onReset();
@@ -1085,21 +1085,21 @@ const ye = /* @__PURE__ */ U({
1085
1085
  return (l = e.value) == null ? void 0 : l.onValueUpdate();
1086
1086
  },
1087
1087
  getErrors: () => {
1088
- var l, u;
1089
- return ((u = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : u.call(l)) ?? [];
1088
+ var l, s;
1089
+ return ((s = (l = e.value) == null ? void 0 : l.getErrors) == null ? void 0 : s.call(l)) ?? [];
1090
1090
  }
1091
- }), (l, u) => (f(), V(se, {
1091
+ }), (l, s) => (f(), b(se, {
1092
1092
  modelValue: n.value,
1093
- "onUpdate:modelValue": u[0] || (u[0] = (r) => n.value = r),
1093
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
1094
1094
  type: "password",
1095
1095
  schema: l.schema,
1096
1096
  ref_key: "inputRef",
1097
1097
  ref: e
1098
1098
  }, null, 8, ["modelValue", "schema"]));
1099
1099
  }
1100
- }), xt = /* @__PURE__ */ U({
1100
+ }), xt = /* @__PURE__ */ T({
1101
1101
  __name: "SelectInput",
1102
- props: /* @__PURE__ */ N({
1102
+ props: /* @__PURE__ */ G({
1103
1103
  schema: Object,
1104
1104
  type: String,
1105
1105
  formId: String
@@ -1108,27 +1108,35 @@ const ye = /* @__PURE__ */ U({
1108
1108
  modelModifiers: {}
1109
1109
  }),
1110
1110
  emits: ["update:modelValue"],
1111
- setup(t, { expose: o }) {
1112
- const n = t, e = G(t, "modelValue"), l = E(null), u = E(null), r = E(!1), s = E([]), y = E(""), p = E(1), c = S(() => e.value.interface ?? "popover"), v = S(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), i = S(() => s.value.filter((a) => !!a.isChecked)), m = S(() => !y.value && me(i.value) && !r.value ? e.value.placeholder ?? "Select an option" : "");
1113
- I([y, () => e.value.options], M, {
1111
+ setup(t, { expose: u }) {
1112
+ const n = t, e = H(t, "modelValue"), l = E(null), s = E(null), r = E(!1), o = E([]), y = E(""), p = E(1), c = S(() => e.value.interface ?? "popover"), v = S(() => e.value.optionsPlacement === "top" ? "top" : "bottom"), i = S(() => o.value.filter((a) => !!a.isChecked)), h = S(() => !y.value && me(i.value) && !r.value ? e.value.placeholder ?? "Select an option" : "");
1113
+ D([y, () => e.value.options], L, {
1114
1114
  immediate: !0,
1115
1115
  deep: !0
1116
- }), I(() => e.value.value, _, { immediate: !0, deep: !0 }), I(
1117
- () => !e.value.dependsOn || !n.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((h) => {
1118
- var k;
1119
- return (k = n.schema[h]) == null ? void 0 : k.value;
1116
+ }), D(() => e.value.value, V, { immediate: !0, deep: !0 }), D(
1117
+ () => !e.value.dependsOn || !n.schema ? null : (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).map((m) => {
1118
+ var _;
1119
+ return (_ = n.schema[m]) == null ? void 0 : _.value;
1120
1120
  }),
1121
- async (a, h) => {
1122
- a && h && !oe(a, h) && (C(), s.value = [], await M());
1121
+ async (a, m) => {
1122
+ a && m && !oe(a, m) && (C(), o.value = [], await L());
1123
1123
  },
1124
1124
  { deep: !0 }
1125
1125
  );
1126
1126
  function C() {
1127
- e.value.error = "", y.value = "", p.value = 1, e.value.value = e.value.multiple ? [] : "", Ze(s.value);
1127
+ e.value.error = "", y.value = "", p.value = 1, e.value.value = e.value.multiple ? [] : "", Ze(o.value);
1128
1128
  }
1129
1129
  function x(a) {
1130
- if (a.isChecked) return _e(a, s.value);
1131
- e.value.multiple ? X(a, s.value) : (C(), X(a, s.value), L()), y.value = "";
1130
+ const m = o.value.findIndex((_) => _.value === a.value && _.isChecked);
1131
+ if (m >= 0) {
1132
+ if (Array.isArray(e.value.value)) {
1133
+ const _ = ye(a, e.value.value);
1134
+ _ >= 0 && e.value.value.splice(_, 1);
1135
+ }
1136
+ o.value[m].isChecked = !1;
1137
+ } else
1138
+ e.value.multiple || C(), X(a, o.value);
1139
+ q(), y.value = "";
1132
1140
  }
1133
1141
  function w() {
1134
1142
  switch (c.value) {
@@ -1145,17 +1153,17 @@ const ye = /* @__PURE__ */ U({
1145
1153
  }
1146
1154
  }
1147
1155
  async function R() {
1148
- if (await M(), e.value.multiple) {
1156
+ if (await L(), e.value.multiple) {
1149
1157
  r.value = !0;
1150
1158
  return;
1151
1159
  }
1152
- await (await Be.create({
1160
+ await (await ze.create({
1153
1161
  header: e.value.label || "Select an option",
1154
1162
  buttons: [
1155
- ...s.value.map((h) => ({
1156
- text: h.label,
1157
- cssClass: h.isChecked ? "selected-option" : "",
1158
- handler: () => (x(h), !1)
1163
+ ...o.value.map((m) => ({
1164
+ text: m.label,
1165
+ cssClass: m.isChecked ? "selected-option" : "",
1166
+ handler: () => (x(m), !1)
1159
1167
  })),
1160
1168
  {
1161
1169
  text: "Cancel",
@@ -1165,14 +1173,14 @@ const ye = /* @__PURE__ */ U({
1165
1173
  })).present();
1166
1174
  }
1167
1175
  async function F() {
1168
- await M();
1169
- const a = s.value.map((k) => ({
1170
- label: k.label,
1176
+ await L();
1177
+ const a = o.value.map((_) => ({
1178
+ label: _.label,
1171
1179
  type: e.value.multiple ? "checkbox" : "radio",
1172
- value: k,
1173
- checked: k.isChecked
1180
+ value: _,
1181
+ checked: _.isChecked
1174
1182
  }));
1175
- await (await Pe.create({
1183
+ await (await Be.create({
1176
1184
  header: e.value.label || "Select an option",
1177
1185
  inputs: a,
1178
1186
  buttons: [
@@ -1182,24 +1190,24 @@ const ye = /* @__PURE__ */ U({
1182
1190
  },
1183
1191
  {
1184
1192
  text: "OK",
1185
- handler: (k) => {
1193
+ handler: (_) => {
1186
1194
  if (e.value.multiple)
1187
- s.value.forEach((g) => _e(g, s.value)), k.forEach((g) => {
1188
- const D = s.value.find((H) => H.value === g.value);
1189
- D && X(D, s.value);
1195
+ o.value.forEach((g) => We(g, o.value)), _.forEach((g) => {
1196
+ const P = o.value.find((U) => U.value === g.value);
1197
+ P && X(P, o.value);
1190
1198
  });
1191
1199
  else {
1192
1200
  C();
1193
- const g = s.value.find((D) => D.value === k.value);
1194
- g && X(g, s.value);
1201
+ const g = o.value.find((P) => P.value === _.value);
1202
+ g && X(g, o.value);
1195
1203
  }
1196
- L();
1204
+ q();
1197
1205
  }
1198
1206
  }
1199
1207
  ]
1200
1208
  })).present();
1201
1209
  }
1202
- async function q() {
1210
+ async function j() {
1203
1211
  if (e.value.required && me(i.value))
1204
1212
  return "This field is required";
1205
1213
  if (e.value.validation) {
@@ -1214,85 +1222,103 @@ const ye = /* @__PURE__ */ U({
1214
1222
  e,
1215
1223
  S(() => e.value.multiple ? i.value : i.value[0]),
1216
1224
  S(() => n == null ? void 0 : n.schema),
1217
- q
1225
+ j
1218
1226
  );
1219
1227
  function Z(a) {
1220
- var h;
1221
- a.target === ((h = l.value) == null ? void 0 : h.$el) && (W(), c.value === "popover" && (r.value = !0));
1228
+ var m;
1229
+ a.target === ((m = l.value) == null ? void 0 : m.$el) && (W(), c.value === "popover" && (r.value = !0));
1222
1230
  }
1223
- async function L(a) {
1224
- var k;
1225
- if ((k = a == null ? void 0 : a.relatedTarget) != null && k.closest(".suggestions-list")) return;
1231
+ async function q(a) {
1232
+ var _;
1233
+ if ((_ = a == null ? void 0 : a.relatedTarget) != null && _.closest(".suggestions-list")) return;
1226
1234
  r.value = !1;
1227
- const h = await q();
1228
- h === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? i.value : i.value[0]) : e.value.error = typeof h == "string" ? h : "Validation failed", await J(h === !0);
1235
+ const m = await j();
1236
+ m === !0 ? (e.value.error = "", e.value.value = e.value.multiple ? i.value : i.value[0]) : e.value.error = typeof m == "string" ? m : "Validation failed", await J(m === !0);
1229
1237
  }
1230
- async function M() {
1238
+ async function L() {
1231
1239
  const a = [];
1232
1240
  if (typeof e.value.options == "function") {
1233
- let h = {};
1234
- e.value.dependsOn && n.schema && (h = (Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn]).reduce(
1235
- (D, H) => {
1236
- var Q;
1237
- return D[H] = (Q = n.schema[H]) == null ? void 0 : Q.value, D;
1238
- },
1239
- {}
1240
- ));
1241
- const k = await e.value.options(y.value, h);
1242
- a.push(...k.filter((g) => !!g.label));
1241
+ let m = {};
1242
+ if (e.value.dependsOn && n.schema) {
1243
+ const _ = Array.isArray(e.value.dependsOn) ? e.value.dependsOn : [e.value.dependsOn];
1244
+ let g = !0;
1245
+ if (m = _.reduce(
1246
+ (P, U) => {
1247
+ var Q;
1248
+ return P[U] = (Q = n.schema[U]) == null ? void 0 : Q.value, (P[U] === void 0 || P[U] === null || P[U] === "") && (g = !1), P;
1249
+ },
1250
+ {}
1251
+ ), g) {
1252
+ const P = await e.value.options(y.value, m);
1253
+ a.push(...P.filter((U) => !!U.label));
1254
+ }
1255
+ } else {
1256
+ const _ = await e.value.options(y.value, {});
1257
+ a.push(..._.filter((g) => !!g.label));
1258
+ }
1243
1259
  } else Array.isArray(e.value.options) && a.push(...Je(e.value.options, y.value));
1244
- i.value.forEach((h) => X(h, a)), s.value = a;
1260
+ i.value.forEach((m) => X(m, a)), o.value = a;
1245
1261
  }
1246
- function _() {
1262
+ async function V() {
1247
1263
  const a = e.value.value;
1248
- a && (Array.isArray(a) ? a.forEach((h) => X(h, s.value)) : X(typeof a == "object" ? a : {
1249
- value: a,
1250
- label: a
1251
- }, s.value));
1264
+ if (a) {
1265
+ if (o.value.length === 0 && await L(), Array.isArray(a))
1266
+ a.forEach((m) => X(m, o.value));
1267
+ else if (typeof a == "object")
1268
+ X(a, o.value);
1269
+ else {
1270
+ const m = o.value.find((_) => _.value === a);
1271
+ X(m || {
1272
+ value: a,
1273
+ label: a
1274
+ }, o.value);
1275
+ }
1276
+ q();
1277
+ }
1252
1278
  }
1253
- return ge(() => {
1254
- M();
1255
- }), o({
1256
- onValueUpdate: L,
1279
+ return ge(async () => {
1280
+ await L(), await V();
1281
+ }), u({
1282
+ onValueUpdate: q,
1257
1283
  onReset: C,
1258
1284
  getErrors: () => e.value.error ? [e.value.error] : []
1259
- }), (a, h) => (f(), $("div", {
1285
+ }), (a, m) => (f(), $("div", {
1260
1286
  class: "autocomplete-container",
1261
- onFocusout: L,
1287
+ onFocusout: q,
1262
1288
  ref_key: "containerRef",
1263
- ref: u
1289
+ ref: s
1264
1290
  }, [
1265
- P(d(Ve), {
1291
+ I(d(_e), {
1266
1292
  ref_key: "inputRef",
1267
1293
  ref: l,
1268
1294
  modelValue: y.value,
1269
- "onUpdate:modelValue": h[0] || (h[0] = (k) => y.value = k),
1295
+ "onUpdate:modelValue": m[0] || (m[0] = (_) => y.value = _),
1270
1296
  fill: e.value.fill ?? "solid",
1271
1297
  "label-placement": e.value.labelPlacement ?? "stacked",
1272
1298
  type: t.type ?? "text",
1273
1299
  required: e.value.required,
1274
1300
  "error-text": e.value.error,
1275
1301
  autofocus: e.value.autoFocus,
1276
- placeholder: m.value,
1302
+ placeholder: h.value,
1277
1303
  disabled: e.value.disabled,
1278
1304
  counter: e.value.counter,
1279
1305
  onIonFocus: Z,
1280
1306
  debounce: 300,
1281
1307
  onClick: w
1282
1308
  }, {
1283
- default: b(() => [
1284
- P(ye, { model: e.value }, null, 8, ["model"]),
1285
- e.value.multiple ? (f(), V(d(Y), {
1309
+ default: k(() => [
1310
+ I(Ce, { model: e.value }, null, 8, ["model"]),
1311
+ e.value.multiple ? (f(), b(d(Y), {
1286
1312
  key: 0,
1287
1313
  style: { width: "fit-content" },
1288
1314
  slot: "start"
1289
1315
  }, {
1290
- default: b(() => [
1291
- (f(!0), $(T, null, K(i.value, (k, g) => (f(), V(d($e), { key: g }, {
1292
- default: b(() => [
1293
- P(d(Y), null, {
1294
- default: b(() => [
1295
- z(A(k.label), 1)
1316
+ default: k(() => [
1317
+ (f(!0), $(M, null, K(i.value, (_, g) => (f(), b(d(Ae), { key: g }, {
1318
+ default: k(() => [
1319
+ I(d(Y), null, {
1320
+ default: k(() => [
1321
+ z(A(_.label), 1)
1296
1322
  ]),
1297
1323
  _: 2
1298
1324
  }, 1024)
@@ -1301,52 +1327,52 @@ const ye = /* @__PURE__ */ U({
1301
1327
  }, 1024))), 128))
1302
1328
  ]),
1303
1329
  _: 1
1304
- })) : (f(), V(d(Y), {
1330
+ })) : (f(), b(d(Y), {
1305
1331
  key: 1,
1306
1332
  slot: "start",
1307
1333
  class: "ion-no-wrap"
1308
1334
  }, {
1309
- default: b(() => {
1310
- var k;
1335
+ default: k(() => {
1336
+ var _;
1311
1337
  return [
1312
- z(A(((k = i.value[0]) == null ? void 0 : k.label) ?? ""), 1)
1338
+ z(A(((_ = i.value[0]) == null ? void 0 : _.label) ?? ""), 1)
1313
1339
  ];
1314
1340
  }),
1315
1341
  _: 1
1316
1342
  })),
1317
- P(d(ce), {
1343
+ I(d(ce), {
1318
1344
  slot: "end",
1319
- icon: d(Te)
1345
+ icon: d(De)
1320
1346
  }, null, 8, ["icon"]),
1321
- i.value.length > 0 || y.value ? (f(), V(d(ce), {
1347
+ i.value.length > 0 || y.value ? (f(), b(d(ce), {
1322
1348
  key: 2,
1323
1349
  slot: "end",
1324
- icon: d(qe),
1350
+ icon: d(Te),
1325
1351
  onClick: C,
1326
1352
  style: { "z-index": "999999" }
1327
1353
  }, null, 8, ["icon"])) : O("", !0)
1328
1354
  ]),
1329
1355
  _: 1
1330
1356
  }, 8, ["modelValue", "fill", "label-placement", "type", "required", "error-text", "autofocus", "placeholder", "disabled", "counter"]),
1331
- r.value && s.value.length > 0 && c.value === "popover" ? (f(), V(d(Fe), {
1357
+ r.value && o.value.length > 0 && c.value === "popover" ? (f(), b(d($e), {
1332
1358
  key: 0,
1333
1359
  class: ne(["suggestions-list", v.value])
1334
1360
  }, {
1335
- default: b(() => [
1336
- (f(!0), $(T, null, K(s.value, (k) => (f(), V(d(ze), {
1361
+ default: k(() => [
1362
+ (f(!0), $(M, null, K(o.value, (_) => (f(), b(d(Fe), {
1337
1363
  button: "",
1338
- key: k.label,
1339
- onClick: (g) => x(k)
1364
+ key: _.label,
1365
+ onClick: (g) => x(_)
1340
1366
  }, {
1341
- default: b(() => [
1342
- e.value.multiple ? (f(), V(d(be), {
1367
+ default: k(() => [
1368
+ e.value.multiple ? (f(), b(d(be), {
1343
1369
  key: 0,
1344
1370
  slot: "start",
1345
- checked: k.isChecked
1371
+ checked: _.isChecked
1346
1372
  }, null, 8, ["checked"])) : O("", !0),
1347
- P(d(Y), null, {
1348
- default: b(() => [
1349
- z(A(k.label), 1)
1373
+ I(d(Y), null, {
1374
+ default: k(() => [
1375
+ z(A(_.label), 1)
1350
1376
  ]),
1351
1377
  _: 2
1352
1378
  }, 1024)
@@ -1358,34 +1384,34 @@ const ye = /* @__PURE__ */ U({
1358
1384
  }, 8, ["class"])) : O("", !0)
1359
1385
  ], 544));
1360
1386
  }
1361
- }), Rt = /* @__PURE__ */ de(xt, [["__scopeId", "data-v-4766dec2"]]), At = /* @__PURE__ */ U({
1387
+ }), Rt = /* @__PURE__ */ de(xt, [["__scopeId", "data-v-8d55391c"]]), At = /* @__PURE__ */ T({
1362
1388
  __name: "TextAreaInput",
1363
- props: /* @__PURE__ */ N({
1389
+ props: /* @__PURE__ */ G({
1364
1390
  schema: {}
1365
1391
  }, {
1366
1392
  modelValue: { type: Object, default: {} },
1367
1393
  modelModifiers: {}
1368
1394
  }),
1369
1395
  emits: ["update:modelValue"],
1370
- setup(t, { expose: o }) {
1371
- const n = t, e = G(t, "modelValue"), l = E(null), u = E(e.value.value), r = S(() => n.schema), { onValueUpdate: s, onFocus: y, onReset: p, getErrors: c } = ue(
1396
+ setup(t, { expose: u }) {
1397
+ const n = t, e = H(t, "modelValue"), l = E(null), s = E(e.value.value), r = S(() => n.schema), { onValueUpdate: o, onFocus: y, onReset: p, getErrors: c } = ue(
1372
1398
  l,
1373
1399
  e,
1374
- u,
1400
+ s,
1375
1401
  r
1376
1402
  );
1377
- return I(
1403
+ return D(
1378
1404
  () => e.value.value,
1379
- (v) => u.value = v
1380
- ), o({
1405
+ (v) => s.value = v
1406
+ ), u({
1381
1407
  onReset: p,
1382
- onValueUpdate: s,
1408
+ onValueUpdate: o,
1383
1409
  getErrors: c
1384
- }), (v, i) => (f(), V(d(Ie), {
1410
+ }), (v, i) => (f(), b(d(Pe), {
1385
1411
  ref_key: "inputRef",
1386
1412
  ref: l,
1387
- modelValue: u.value,
1388
- "onUpdate:modelValue": i[0] || (i[0] = (m) => u.value = m),
1413
+ modelValue: s.value,
1414
+ "onUpdate:modelValue": i[0] || (i[0] = (h) => s.value = h),
1389
1415
  "clear-input": !0,
1390
1416
  fill: e.value.fill ?? "solid",
1391
1417
  "label-placement": e.value.labelPlacement ?? "stacked",
@@ -1404,11 +1430,11 @@ const ye = /* @__PURE__ */ U({
1404
1430
  "min-length": e.value.minLength,
1405
1431
  pattern: e.value.pattern,
1406
1432
  onIonFocus: d(y),
1407
- onIonChange: d(s),
1408
- onIonBlur: d(s)
1433
+ onIonChange: d(o),
1434
+ onIonBlur: d(o)
1409
1435
  }, {
1410
- default: b(() => [
1411
- P(ye, { model: e.value }, null, 8, ["model"])
1436
+ default: k(() => [
1437
+ I(Ce, { model: e.value }, null, 8, ["model"])
1412
1438
  ]),
1413
1439
  _: 1
1414
1440
  }, 8, ["modelValue", "fill", "label-placement", "required", "error-text", "autofocus", "placeholder", "disabled", "counter", "min", "max", "rows", "cols", "auto-grow", "max-length", "min-length", "pattern", "onIonFocus", "onIonChange", "onIonBlur"]));
@@ -1416,9 +1442,9 @@ const ye = /* @__PURE__ */ U({
1416
1442
  }), $t = {
1417
1443
  class: "ion-margin-end",
1418
1444
  style: { "flex-grow": "1" }
1419
- }, Ft = { style: { display: "flex", "justify-content": "flex-end" } }, zt = /* @__PURE__ */ U({
1445
+ }, Ft = { style: { display: "flex", "justify-content": "flex-end" } }, zt = /* @__PURE__ */ T({
1420
1446
  __name: "RepeatInput",
1421
- props: /* @__PURE__ */ N({
1447
+ props: /* @__PURE__ */ G({
1422
1448
  schema: {},
1423
1449
  data: {},
1424
1450
  computedData: {}
@@ -1427,8 +1453,8 @@ const ye = /* @__PURE__ */ U({
1427
1453
  modelModifiers: {}
1428
1454
  }),
1429
1455
  emits: ["update:modelValue"],
1430
- setup(t, { expose: o }) {
1431
- const n = G(t, "modelValue"), e = E([]), { dynamicRefs: l, resetForm: u, getFormErrors: r, updateFormValues: s } = we(), y = S(() => e.value.map((C, x) => ({
1456
+ setup(t, { expose: u }) {
1457
+ const n = H(t, "modelValue"), e = E([]), { dynamicRefs: l, resetForm: s, getFormErrors: r, updateFormValues: o } = Se(), y = S(() => e.value.map((C, x) => ({
1432
1458
  label: `Set ${x + 1}`,
1433
1459
  value: x,
1434
1460
  other: Object.entries(C).reduce(
@@ -1436,7 +1462,7 @@ const ye = /* @__PURE__ */ U({
1436
1462
  {}
1437
1463
  )
1438
1464
  })));
1439
- I(
1465
+ D(
1440
1466
  y,
1441
1467
  (C) => {
1442
1468
  n.value.value = C;
@@ -1450,41 +1476,41 @@ const ye = /* @__PURE__ */ U({
1450
1476
  e.value.splice(C, 1);
1451
1477
  }
1452
1478
  function v() {
1453
- u();
1479
+ s();
1454
1480
  }
1455
1481
  function i() {
1456
1482
  return r();
1457
1483
  }
1458
- async function m() {
1459
- await s();
1484
+ async function h() {
1485
+ await o();
1460
1486
  }
1461
- return o({
1462
- onValueUpdate: m,
1487
+ return u({
1488
+ onValueUpdate: h,
1463
1489
  onReset: v,
1464
1490
  getErrors: i
1465
- }), (C, x) => (f(!0), $(T, null, K(e.value, (w, R) => (f(), $("div", {
1491
+ }), (C, x) => (f(!0), $(M, null, K(e.value, (w, R) => (f(), $("div", {
1466
1492
  class: "repeat-input-wrapper",
1467
1493
  key: R
1468
1494
  }, [
1469
1495
  B("div", $t, [
1470
- P(d(le), null, {
1471
- default: b(() => [
1472
- (f(!0), $(T, null, K(Object.keys(w), (F) => {
1473
- var q, W, J, Z, L;
1474
- return f(), $(T, null, [
1475
- d(ie)(w[F], C.data, C.computedData) ? (f(), V(d(ae), {
1496
+ I(d(le), null, {
1497
+ default: k(() => [
1498
+ (f(!0), $(M, null, K(Object.keys(w), (F) => {
1499
+ var j, W, J, Z, q;
1500
+ return f(), $(M, null, [
1501
+ d(ie)(w[F], C.data, C.computedData) ? (f(), b(d(ae), {
1476
1502
  key: `${R}-${F}`,
1477
- size: ((q = w[F].grid) == null ? void 0 : q.xs) ?? "12",
1503
+ size: ((j = w[F].grid) == null ? void 0 : j.xs) ?? "12",
1478
1504
  "size-sm": (W = w[F].grid) == null ? void 0 : W.sm,
1479
1505
  "size-md": (J = w[F].grid) == null ? void 0 : J.md,
1480
1506
  "size-lg": (Z = w[F].grid) == null ? void 0 : Z.lg,
1481
- "size-xl": (L = w[F].grid) == null ? void 0 : L.xl,
1507
+ "size-xl": (q = w[F].grid) == null ? void 0 : q.xl,
1482
1508
  class: "ion-margin-bottom"
1483
1509
  }, {
1484
- default: b(() => [
1485
- (f(), V(fe(w[F].type), {
1510
+ default: k(() => [
1511
+ (f(), b(fe(w[F].type), {
1486
1512
  modelValue: w[F],
1487
- "onUpdate:modelValue": (M) => w[F] = M,
1513
+ "onUpdate:modelValue": (L) => w[F] = L,
1488
1514
  schema: w,
1489
1515
  "ref-key": `${R}-${F}`,
1490
1516
  ref_for: !0,
@@ -1501,28 +1527,28 @@ const ye = /* @__PURE__ */ U({
1501
1527
  }, 1024)
1502
1528
  ]),
1503
1529
  B("div", Ft, [
1504
- R === e.value.length - 1 ? (f(), V(d(j), {
1530
+ R === e.value.length - 1 ? (f(), b(d(N), {
1505
1531
  key: 0,
1506
1532
  onClick: p,
1507
1533
  color: "primary"
1508
1534
  }, {
1509
- default: b(() => [
1510
- P(d(ce), {
1535
+ default: k(() => [
1536
+ I(d(ce), {
1511
1537
  slot: "icon-only",
1512
- icon: d(Le)
1538
+ icon: d(qe)
1513
1539
  }, null, 8, ["icon"])
1514
1540
  ]),
1515
1541
  _: 1
1516
1542
  })) : O("", !0),
1517
- e.value.length > 1 ? (f(), V(d(j), {
1543
+ e.value.length > 1 ? (f(), b(d(N), {
1518
1544
  key: 1,
1519
1545
  onClick: (F) => c(R),
1520
1546
  color: "warning"
1521
1547
  }, {
1522
- default: b(() => [
1523
- P(d(ce), {
1548
+ default: k(() => [
1549
+ I(d(ce), {
1524
1550
  slot: "icon-only",
1525
- icon: d(Me)
1551
+ icon: d(Le)
1526
1552
  }, null, 8, ["icon"])
1527
1553
  ]),
1528
1554
  _: 2
@@ -1530,30 +1556,30 @@ const ye = /* @__PURE__ */ U({
1530
1556
  ])
1531
1557
  ]))), 128));
1532
1558
  }
1533
- }), Bt = /* @__PURE__ */ de(zt, [["__scopeId", "data-v-060bdf58"]]), Pt = /* @__PURE__ */ U({
1559
+ }), Bt = /* @__PURE__ */ de(zt, [["__scopeId", "data-v-060bdf58"]]), Pt = /* @__PURE__ */ T({
1534
1560
  __name: "CheckboxInput",
1535
- props: /* @__PURE__ */ N({
1561
+ props: /* @__PURE__ */ G({
1536
1562
  schema: {}
1537
1563
  }, {
1538
1564
  modelValue: { type: Object, default: {} },
1539
1565
  modelModifiers: {}
1540
1566
  }),
1541
1567
  emits: ["update:modelValue"],
1542
- setup(t, { expose: o }) {
1543
- const n = t, e = G(t, "modelValue"), l = E(null), u = E(e.value.value), r = S(() => n.schema), s = S(() => Se(e.value)), { onValueUpdate: y, onFocus: p, getErrors: c } = ue(l, e, u, r);
1568
+ setup(t, { expose: u }) {
1569
+ const n = t, e = H(t, "modelValue"), l = E(null), s = E(e.value.value), r = S(() => n.schema), o = S(() => ke(e.value)), { onValueUpdate: y, onFocus: p, getErrors: c } = ue(l, e, s, r);
1544
1570
  function v() {
1545
- u.value = !1, e.value.error = "", e.value.value = !1;
1571
+ s.value = !1, e.value.error = "", e.value.value = !1;
1546
1572
  }
1547
- return I(
1573
+ return D(
1548
1574
  () => e.value.value,
1549
- (i) => u.value = i
1550
- ), o({
1575
+ (i) => s.value = i
1576
+ ), u({
1551
1577
  onValueUpdate: y,
1552
1578
  onReset: v,
1553
1579
  getErrors: c
1554
- }), (i, m) => (f(), V(d(be), {
1555
- modelValue: u.value,
1556
- "onUpdate:modelValue": m[0] || (m[0] = (C) => u.value = C),
1580
+ }), (i, h) => (f(), b(d(be), {
1581
+ modelValue: s.value,
1582
+ "onUpdate:modelValue": h[0] || (h[0] = (C) => s.value = C),
1557
1583
  ref_key: "inputRef",
1558
1584
  ref: l,
1559
1585
  required: e.value.required,
@@ -1563,63 +1589,63 @@ const ye = /* @__PURE__ */ U({
1563
1589
  onIonChange: d(y),
1564
1590
  onIonBlur: d(y)
1565
1591
  }, {
1566
- default: b(() => [
1567
- z(A(s.value), 1)
1592
+ default: k(() => [
1593
+ z(A(o.value), 1)
1568
1594
  ]),
1569
1595
  _: 1
1570
1596
  }, 8, ["modelValue", "required", "error-text", "disabled", "onIonFocus", "onIonChange", "onIonBlur"]));
1571
1597
  }
1572
- }), It = /* @__PURE__ */ U({
1598
+ }), It = /* @__PURE__ */ T({
1573
1599
  __name: "RadioInput",
1574
- props: /* @__PURE__ */ N({
1600
+ props: /* @__PURE__ */ G({
1575
1601
  schema: {}
1576
1602
  }, {
1577
1603
  modelValue: { type: Object, default: {} },
1578
1604
  modelModifiers: {}
1579
1605
  }),
1580
1606
  emits: ["update:modelValue"],
1581
- setup(t, { expose: o }) {
1582
- const n = t, e = G(t, "modelValue"), l = E(null), u = E(e.value.value), r = S(() => n.schema), s = E([]), y = S(() => Se(e.value)), { onValueUpdate: p, onFocus: c, getErrors: v } = ue(l, e, u, r);
1607
+ setup(t, { expose: u }) {
1608
+ const n = t, e = H(t, "modelValue"), l = E(null), s = E(e.value.value), r = S(() => n.schema), o = E([]), y = S(() => ke(e.value)), { onValueUpdate: p, onFocus: c, getErrors: v } = ue(l, e, s, r);
1583
1609
  function i() {
1584
- e.value.error = "", u.value = void 0, e.value.value = void 0;
1610
+ e.value.error = "", s.value = void 0, e.value.value = void 0;
1585
1611
  }
1586
- function m(x, w) {
1612
+ function h(x, w) {
1587
1613
  return x.value === w.value;
1588
1614
  }
1589
1615
  async function C() {
1590
- typeof e.value.options == "function" ? s.value = await e.value.options() : s.value = e.value.options;
1616
+ typeof e.value.options == "function" ? o.value = await e.value.options() : o.value = e.value.options;
1591
1617
  }
1592
- return I(
1618
+ return D(
1593
1619
  () => e.value.value,
1594
- (x) => u.value = x
1595
- ), o({
1620
+ (x) => s.value = x
1621
+ ), u({
1596
1622
  onValueUpdate: p,
1597
1623
  onReset: i,
1598
1624
  getErrors: v
1599
- }), ge(C), (x, w) => (f(), V(d(Ue), {
1600
- modelValue: u.value,
1601
- "onUpdate:modelValue": w[0] || (w[0] = (R) => u.value = R),
1625
+ }), ge(C), (x, w) => (f(), b(d(Ie), {
1626
+ modelValue: s.value,
1627
+ "onUpdate:modelValue": w[0] || (w[0] = (R) => s.value = R),
1602
1628
  ref_key: "inputRef",
1603
1629
  ref: l,
1604
1630
  required: e.value.required,
1605
1631
  "helper-text": y.value,
1606
1632
  "error-text": e.value.error,
1607
1633
  disabled: e.value.disabled,
1608
- compareWith: m,
1634
+ compareWith: h,
1609
1635
  "allow-empty-selection": !e.value.required,
1610
1636
  onIonFocus: d(c),
1611
1637
  onIonChange: d(p),
1612
1638
  onIonBlur: d(p)
1613
1639
  }, {
1614
- default: b(() => [
1615
- (f(!0), $(T, null, K(s.value, (R) => (f(), V(d(De), {
1640
+ default: k(() => [
1641
+ (f(!0), $(M, null, K(o.value, (R) => (f(), b(d(Ue), {
1616
1642
  key: R.value,
1617
1643
  value: R,
1618
1644
  disabled: e.value.disabled,
1619
1645
  "label-placement": "end",
1620
1646
  justify: "start"
1621
1647
  }, {
1622
- default: b(() => [
1648
+ default: k(() => [
1623
1649
  z(A(R.label), 1)
1624
1650
  ]),
1625
1651
  _: 2
@@ -1629,30 +1655,30 @@ const ye = /* @__PURE__ */ U({
1629
1655
  }, 8, ["modelValue", "required", "helper-text", "error-text", "disabled", "allow-empty-selection", "onIonFocus", "onIonChange", "onIonBlur"]));
1630
1656
  }
1631
1657
  });
1632
- function Lt(t, o, n) {
1658
+ function Lt(t, u, n) {
1633
1659
  const e = E({}), l = E({});
1634
- function u(c, v, i) {
1635
- l.value[c] = i, v.forEach((m) => {
1660
+ function s(c, v, i) {
1661
+ l.value[c] = i, v.forEach((h) => {
1636
1662
  var C;
1637
- (C = e.value)[m] ?? (C[m] = []), e.value[m].includes(c) || e.value[m].push(c);
1663
+ (C = e.value)[h] ?? (C[h] = []), e.value[h].includes(c) || e.value[h].push(c);
1638
1664
  }), p(c);
1639
1665
  }
1640
1666
  function r(c) {
1641
1667
  return Object.entries(e.value).filter(([, i]) => i.includes(c)).map(([i]) => i).reduce(
1642
- (i, m) => (i[m] = o.value[m] ?? n.value[m], i),
1668
+ (i, h) => (i[h] = u.value[h] ?? n.value[h], i),
1643
1669
  {}
1644
1670
  );
1645
1671
  }
1646
- function s(c, v) {
1647
- return c ? Array.isArray(c) ? c.some((i) => v.some((m) => y(i, m.value))) : v.some((i) => y(c, i.value)) : !1;
1672
+ function o(c, v) {
1673
+ return c ? Array.isArray(c) ? c.some((i) => v.some((h) => y(i, h.value))) : v.some((i) => y(c, i.value)) : !1;
1648
1674
  }
1649
1675
  function y(c, v) {
1650
1676
  return typeof c == "object" && c !== null ? c.value === v : String(c) === String(v);
1651
1677
  }
1652
1678
  async function p(c, v) {
1653
1679
  if (!l.value[c]) return;
1654
- const i = r(c), m = Object.keys(i);
1655
- if (!(m.length === 0 || !m.every(
1680
+ const i = r(c), h = Object.keys(i);
1681
+ if (!(h.length === 0 || !h.every(
1656
1682
  (x) => i[x] !== void 0 && i[x] !== null
1657
1683
  )))
1658
1684
  try {
@@ -1661,29 +1687,29 @@ function Lt(t, o, n) {
1661
1687
  t.value[c].options = w;
1662
1688
  const R = t.value[c].value;
1663
1689
  if (!R) return;
1664
- s(R, w) || (t.value[c].value = t.value[c].multiple ? [] : "");
1690
+ o(R, w) || (t.value[c].value = t.value[c].multiple ? [] : "");
1665
1691
  } catch (x) {
1666
1692
  console.error(`Error loading options for ${c}:`, x);
1667
1693
  }
1668
1694
  }
1669
- return I(
1670
- [o, n],
1695
+ return D(
1696
+ [u, n],
1671
1697
  () => {
1672
1698
  Object.entries(e.value).forEach(([c, v]) => {
1673
- (o.value[c] !== void 0 || n.value[c] !== void 0) && v.forEach((i) => {
1699
+ (u.value[c] !== void 0 || n.value[c] !== void 0) && v.forEach((i) => {
1674
1700
  p(i);
1675
1701
  });
1676
1702
  });
1677
1703
  },
1678
1704
  { deep: !0, immediate: !0 }
1679
1705
  ), {
1680
- registerDependency: u,
1706
+ registerDependency: s,
1681
1707
  updateOptions: p
1682
1708
  };
1683
1709
  }
1684
1710
  const Mt = {
1685
1711
  install(t) {
1686
- t.component("VForm", _t), t.component("TextInput", kt), t.component("DateInput", St), t.component("NumberInput", wt), t.component("EmailInput", Ot), t.component("PasswordInput", Et), t.component("SelectInput", Rt), t.component("TextAreaInput", At), t.component("RepeatInput", Bt), t.component("CheckboxInput", Pt), t.component("RadioInput", It), t.directive("maskito", je);
1712
+ t.component("VForm", Vt), t.component("TextInput", kt), t.component("DateInput", St), t.component("NumberInput", wt), t.component("EmailInput", Ot), t.component("PasswordInput", Et), t.component("SelectInput", Rt), t.component("TextAreaInput", At), t.component("RepeatInput", Bt), t.component("CheckboxInput", Pt), t.component("RadioInput", It), t.directive("maskito", Me);
1687
1713
  }
1688
1714
  };
1689
1715
  export {
@@ -1691,7 +1717,7 @@ export {
1691
1717
  Mt as default,
1692
1718
  Qe as useDataTransformation,
1693
1719
  Lt as useDependentOptions,
1694
- we as useFormValidation,
1720
+ Se as useFormValidation,
1695
1721
  ue as useInputValidation,
1696
1722
  Xe as useMultiStepForm
1697
1723
  };