@scbt-ecom/ui 0.46.4 → 0.46.6

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,8 +1,8 @@
1
- import * as de from "react";
2
- import E, { useCallback as Ke, useSyncExternalStore as Qe, useState as kt, useEffect as Ct } from "react";
3
- import { i as Lt } from "./isClient-C9aZtt2Q.js";
4
- const Ge = () => !1, ar = () => {
5
- const e = "(max-width: 1187px)", r = "(min-width: 1188px)", t = Ke(
1
+ import * as fe from "react";
2
+ import D, { useCallback as $e, useSyncExternalStore as ze } from "react";
3
+ import { i as pt } from "./isClient-C9aZtt2Q.js";
4
+ const Ge = () => !1, ir = () => {
5
+ const e = "(max-width: 1187px)", r = "(min-width: 1188px)", t = $e(
6
6
  (l) => {
7
7
  const d = globalThis.matchMedia(e);
8
8
  return d.addEventListener("change", l), () => {
@@ -10,7 +10,7 @@ const Ge = () => !1, ar = () => {
10
10
  };
11
11
  },
12
12
  [e]
13
- ), i = Ke(
13
+ ), i = $e(
14
14
  (l) => {
15
15
  const d = globalThis.matchMedia(r);
16
16
  return d.addEventListener("change", l), () => {
@@ -20,58 +20,58 @@ const Ge = () => !1, ar = () => {
20
20
  [r]
21
21
  ), a = () => globalThis.matchMedia(e).matches, u = () => globalThis.matchMedia(r).matches;
22
22
  return {
23
- isMobile: Qe(t, a, Ge),
24
- isDesktop: Qe(i, u, Ge)
23
+ isMobile: ze(t, a, Ge),
24
+ isDesktop: ze(i, u, Ge)
25
25
  };
26
- }, ur = (e, r) => {
26
+ }, nr = (e, r) => {
27
27
  const t = (i) => {
28
28
  e.current && !e.current.contains(i.target) && r();
29
29
  };
30
- de.useEffect(() => {
30
+ fe.useEffect(() => {
31
31
  var i;
32
- if (Lt)
32
+ if (pt)
33
33
  return (i = globalThis == null ? void 0 : globalThis.document) == null || i.addEventListener("mousedown", t), () => {
34
34
  globalThis == null || globalThis.document.removeEventListener("mousedown", t);
35
35
  };
36
36
  }, [e, r]);
37
37
  };
38
- var he = (e) => e.type === "checkbox", re = (e) => e instanceof Date, B = (e) => e == null;
38
+ var he = (e) => e.type === "checkbox", re = (e) => e instanceof Date, N = (e) => e == null;
39
39
  const at = (e) => typeof e == "object";
40
- var p = (e) => !B(e) && !Array.isArray(e) && at(e) && !re(e), ut = (e) => p(e) && e.target ? he(e.target) ? e.target.checked : e.target.value : e, Tt = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, ot = (e, r) => e.has(Tt(r)), Mt = (e) => {
40
+ var S = (e) => !N(e) && !Array.isArray(e) && at(e) && !re(e), ut = (e) => S(e) && e.target ? he(e.target) ? e.target.checked : e.target.value : e, Ct = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, ot = (e, r) => e.has(Ct(r)), Tt = (e) => {
41
41
  const r = e.constructor && e.constructor.prototype;
42
- return p(r) && r.hasOwnProperty("isPrototypeOf");
43
- }, Le = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
44
- function N(e) {
42
+ return S(r) && r.hasOwnProperty("isPrototypeOf");
43
+ }, Te = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
44
+ function B(e) {
45
45
  let r;
46
46
  const t = Array.isArray(e), i = typeof FileList < "u" ? e instanceof FileList : !1;
47
47
  if (e instanceof Date)
48
48
  r = new Date(e);
49
49
  else if (e instanceof Set)
50
50
  r = new Set(e);
51
- else if (!(Le && (e instanceof Blob || i)) && (t || p(e)))
52
- if (r = t ? [] : {}, !t && !Mt(e))
51
+ else if (!(Te && (e instanceof Blob || i)) && (t || S(e)))
52
+ if (r = t ? [] : {}, !t && !Tt(e))
53
53
  r = e;
54
54
  else
55
55
  for (const a in e)
56
- e.hasOwnProperty(a) && (r[a] = N(e[a]));
56
+ e.hasOwnProperty(a) && (r[a] = B(e[a]));
57
57
  else
58
58
  return e;
59
59
  return r;
60
60
  }
61
- var Ae = (e) => Array.isArray(e) ? e.filter(Boolean) : [], D = (e) => e === void 0, f = (e, r, t) => {
62
- if (!r || !p(e))
61
+ var Ae = (e) => Array.isArray(e) ? e.filter(Boolean) : [], E = (e) => e === void 0, f = (e, r, t) => {
62
+ if (!r || !S(e))
63
63
  return t;
64
- const i = Ae(r.split(/[,[\].]+?/)).reduce((a, u) => B(a) ? a : a[u], e);
65
- return D(i) || i === e ? D(e[r]) ? t : e[r] : i;
66
- }, q = (e) => typeof e == "boolean", Te = (e) => /^\w*$/.test(e), lt = (e) => Ae(e.replace(/["|']|\]/g, "").split(/\.|\[/)), x = (e, r, t) => {
64
+ const i = Ae(r.split(/[,[\].]+?/)).reduce((a, u) => N(a) ? a : a[u], e);
65
+ return E(i) || i === e ? E(e[r]) ? t : e[r] : i;
66
+ }, q = (e) => typeof e == "boolean", Le = (e) => /^\w*$/.test(e), lt = (e) => Ae(e.replace(/["|']|\]/g, "").split(/\.|\[/)), x = (e, r, t) => {
67
67
  let i = -1;
68
- const a = Te(r) ? [r] : lt(r), u = a.length, l = u - 1;
68
+ const a = Le(r) ? [r] : lt(r), u = a.length, l = u - 1;
69
69
  for (; ++i < u; ) {
70
70
  const d = a[i];
71
71
  let b = t;
72
72
  if (i !== l) {
73
- const F = e[d];
74
- b = p(F) || Array.isArray(F) ? F : isNaN(+a[i + 1]) ? {} : [];
73
+ const w = e[d];
74
+ b = S(w) || Array.isArray(w) ? w : isNaN(+a[i + 1]) ? {} : [];
75
75
  }
76
76
  if (d === "__proto__" || d === "constructor" || d === "prototype")
77
77
  return;
@@ -83,7 +83,7 @@ const _e = {
83
83
  BLUR: "blur",
84
84
  FOCUS_OUT: "focusout",
85
85
  CHANGE: "change"
86
- }, $ = {
86
+ }, K = {
87
87
  onBlur: "onBlur",
88
88
  onChange: "onChange",
89
89
  onSubmit: "onSubmit",
@@ -97,7 +97,7 @@ const _e = {
97
97
  pattern: "pattern",
98
98
  required: "required",
99
99
  validate: "validate"
100
- }, Ot = E.createContext(null), Me = () => E.useContext(Ot);
100
+ }, Lt = D.createContext(null), Me = () => D.useContext(Lt);
101
101
  var ct = (e, r, t, i = !0) => {
102
102
  const a = {
103
103
  defaultValues: r._defaultValues
@@ -106,18 +106,18 @@ var ct = (e, r, t, i = !0) => {
106
106
  Object.defineProperty(a, u, {
107
107
  get: () => {
108
108
  const l = u;
109
- return r._proxyFormState[l] !== $.all && (r._proxyFormState[l] = !i || $.all), t && (t[l] = !0), e[l];
109
+ return r._proxyFormState[l] !== K.all && (r._proxyFormState[l] = !i || K.all), t && (t[l] = !0), e[l];
110
110
  }
111
111
  });
112
112
  return a;
113
- }, P = (e) => p(e) && !Object.keys(e).length, dt = (e, r, t, i) => {
113
+ }, P = (e) => S(e) && !Object.keys(e).length, ft = (e, r, t, i) => {
114
114
  t(e);
115
115
  const { name: a, ...u } = e;
116
- return P(u) || Object.keys(u).length >= Object.keys(r).length || Object.keys(u).find((l) => r[l] === (!i || $.all));
117
- }, fe = (e) => Array.isArray(e) ? e : [e], ft = (e, r, t) => !e || !r || e === r || fe(e).some((i) => i && (t ? i === r : i.startsWith(r) || r.startsWith(i)));
116
+ return P(u) || Object.keys(u).length >= Object.keys(r).length || Object.keys(u).find((l) => r[l] === (!i || K.all));
117
+ }, de = (e) => Array.isArray(e) ? e : [e], dt = (e, r, t) => !e || !r || e === r || de(e).some((i) => i && (t ? i === r : i.startsWith(r) || r.startsWith(i)));
118
118
  function Oe(e) {
119
- const r = E.useRef(e);
120
- r.current = e, E.useEffect(() => {
119
+ const r = D.useRef(e);
120
+ r.current = e, D.useEffect(() => {
121
121
  const t = !e.disabled && r.current.subject && r.current.subject.subscribe({
122
122
  next: r.current.next
123
123
  });
@@ -126,8 +126,8 @@ function Oe(e) {
126
126
  };
127
127
  }, [e.disabled]);
128
128
  }
129
- function Rt(e) {
130
- const r = Me(), { control: t = r.control, disabled: i, name: a, exact: u } = e || {}, [l, d] = E.useState(t._formState), b = E.useRef(!0), F = E.useRef({
129
+ function Mt(e) {
130
+ const r = Me(), { control: t = r.control, disabled: i, name: a, exact: u } = e || {}, [l, d] = D.useState(t._formState), b = D.useRef(!0), w = D.useRef({
131
131
  isDirty: !1,
132
132
  isLoading: !1,
133
133
  dirtyFields: !1,
@@ -136,46 +136,46 @@ function Rt(e) {
136
136
  isValidating: !1,
137
137
  isValid: !1,
138
138
  errors: !1
139
- }), _ = E.useRef(a);
140
- return _.current = a, Oe({
139
+ }), V = D.useRef(a);
140
+ return V.current = a, Oe({
141
141
  disabled: i,
142
- next: (v) => b.current && ft(_.current, v.name, u) && dt(v, F.current, t._updateFormState) && d({
142
+ next: (v) => b.current && dt(V.current, v.name, u) && ft(v, w.current, t._updateFormState) && d({
143
143
  ...t._formState,
144
144
  ...v
145
145
  }),
146
146
  subject: t._subjects.state
147
- }), E.useEffect(() => (b.current = !0, F.current.isValid && t._updateValid(!0), () => {
147
+ }), D.useEffect(() => (b.current = !0, w.current.isValid && t._updateValid(!0), () => {
148
148
  b.current = !1;
149
- }), [t]), E.useMemo(() => ct(l, t, F.current, !1), [l, t]);
149
+ }), [t]), D.useMemo(() => ct(l, t, w.current, !1), [l, t]);
150
150
  }
151
- var Q = (e) => typeof e == "string", yt = (e, r, t, i, a) => Q(e) ? (i && r.watch.add(e), f(t, e, a)) : Array.isArray(e) ? e.map((u) => (i && r.watch.add(u), f(t, u))) : (i && (r.watchAll = !0), t);
152
- function Ut(e) {
153
- const r = Me(), { control: t = r.control, name: i, defaultValue: a, disabled: u, exact: l } = e || {}, d = E.useRef(i);
151
+ var z = (e) => typeof e == "string", yt = (e, r, t, i, a) => z(e) ? (i && r.watch.add(e), f(t, e, a)) : Array.isArray(e) ? e.map((u) => (i && r.watch.add(u), f(t, u))) : (i && (r.watchAll = !0), t);
152
+ function Ot(e) {
153
+ const r = Me(), { control: t = r.control, name: i, defaultValue: a, disabled: u, exact: l } = e || {}, d = D.useRef(i);
154
154
  d.current = i, Oe({
155
155
  disabled: u,
156
156
  subject: t._subjects.values,
157
- next: (_) => {
158
- ft(d.current, _.name, l) && F(N(yt(d.current, t._names, _.values || t._formValues, !1, a)));
157
+ next: (V) => {
158
+ dt(d.current, V.name, l) && w(B(yt(d.current, t._names, V.values || t._formValues, !1, a)));
159
159
  }
160
160
  });
161
- const [b, F] = E.useState(t._getWatch(i, a));
162
- return E.useEffect(() => t._removeUnmounted()), b;
161
+ const [b, w] = D.useState(t._getWatch(i, a));
162
+ return D.useEffect(() => t._removeUnmounted()), b;
163
163
  }
164
- function or(e) {
165
- const r = Me(), { name: t, disabled: i, control: a = r.control, shouldUnregister: u } = e, l = ot(a._names.array, t), d = Ut({
164
+ function ar(e) {
165
+ const r = Me(), { name: t, disabled: i, control: a = r.control, shouldUnregister: u } = e, l = ot(a._names.array, t), d = Ot({
166
166
  control: a,
167
167
  name: t,
168
168
  defaultValue: f(a._formValues, t, f(a._defaultValues, t, e.defaultValue)),
169
169
  exact: !0
170
- }), b = Rt({
170
+ }), b = Mt({
171
171
  control: a,
172
172
  name: t,
173
173
  exact: !0
174
- }), F = E.useRef(a.register(t, {
174
+ }), w = D.useRef(a.register(t, {
175
175
  ...e.rules,
176
176
  value: d,
177
177
  ...q(e.disabled) ? { disabled: e.disabled } : {}
178
- })), _ = E.useMemo(() => Object.defineProperties({}, {
178
+ })), V = D.useMemo(() => Object.defineProperties({}, {
179
179
  invalid: {
180
180
  enumerable: !0,
181
181
  get: () => !!f(b.errors, t)
@@ -196,18 +196,18 @@ function or(e) {
196
196
  enumerable: !0,
197
197
  get: () => f(b.errors, t)
198
198
  }
199
- }), [b, t]), v = E.useMemo(() => ({
199
+ }), [b, t]), v = D.useMemo(() => ({
200
200
  name: t,
201
201
  value: d,
202
202
  ...q(i) || b.disabled ? { disabled: b.disabled || i } : {},
203
- onChange: (M) => F.current.onChange({
203
+ onChange: (M) => w.current.onChange({
204
204
  target: {
205
205
  value: ut(M),
206
206
  name: t
207
207
  },
208
208
  type: _e.CHANGE
209
209
  }),
210
- onBlur: () => F.current.onBlur({
210
+ onBlur: () => w.current.onBlur({
211
211
  target: {
212
212
  value: f(a._formValues, t),
213
213
  name: t
@@ -215,8 +215,8 @@ function or(e) {
215
215
  type: _e.BLUR
216
216
  }),
217
217
  ref: (M) => {
218
- const H = f(a._fields, t);
219
- H && M && (H._f.ref = {
218
+ const Q = f(a._fields, t);
219
+ Q && M && (Q._f.ref = {
220
220
  focus: () => M.focus(),
221
221
  select: () => M.select(),
222
222
  setCustomValidity: (O) => M.setCustomValidity(O),
@@ -231,29 +231,29 @@ function or(e) {
231
231
  d,
232
232
  a._fields
233
233
  ]);
234
- return E.useEffect(() => {
235
- const M = a._options.shouldUnregister || u, H = (O, U) => {
234
+ return D.useEffect(() => {
235
+ const M = a._options.shouldUnregister || u, Q = (O, R) => {
236
236
  const I = f(a._fields, O);
237
- I && I._f && (I._f.mount = U);
237
+ I && I._f && (I._f.mount = R);
238
238
  };
239
- if (H(t, !0), M) {
240
- const O = N(f(a._options.defaultValues, t));
241
- x(a._defaultValues, t, O), D(f(a._formValues, t)) && x(a._formValues, t, O);
239
+ if (Q(t, !0), M) {
240
+ const O = B(f(a._options.defaultValues, t));
241
+ x(a._defaultValues, t, O), E(f(a._formValues, t)) && x(a._formValues, t, O);
242
242
  }
243
243
  return !l && a.register(t), () => {
244
- (l ? M && !a._state.action : M) ? a.unregister(t) : H(t, !1);
244
+ (l ? M && !a._state.action : M) ? a.unregister(t) : Q(t, !1);
245
245
  };
246
- }, [t, a, l, u]), E.useEffect(() => {
246
+ }, [t, a, l, u]), D.useEffect(() => {
247
247
  a._updateDisabledField({
248
248
  disabled: i,
249
249
  fields: a._fields,
250
250
  name: t
251
251
  });
252
- }, [i, t, a]), E.useMemo(() => ({
252
+ }, [i, t, a]), D.useMemo(() => ({
253
253
  field: v,
254
254
  formState: b,
255
- fieldState: _
256
- }), [v, b, _]);
255
+ fieldState: V
256
+ }), [v, b, V]);
257
257
  }
258
258
  var ht = (e, r, t, i, a) => r ? {
259
259
  ...t[e],
@@ -262,11 +262,11 @@ var ht = (e, r, t, i, a) => r ? {
262
262
  [i]: a || !0
263
263
  }
264
264
  } : {}, Ye = (e) => ({
265
- isOnSubmit: !e || e === $.onSubmit,
266
- isOnBlur: e === $.onBlur,
267
- isOnChange: e === $.onChange,
268
- isOnAll: e === $.all,
269
- isOnTouch: e === $.onTouched
265
+ isOnSubmit: !e || e === K.onSubmit,
266
+ isOnBlur: e === K.onBlur,
267
+ isOnChange: e === K.onChange,
268
+ isOnAll: e === K.all,
269
+ isOnTouch: e === K.onTouched
270
270
  }), Je = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((i) => e.startsWith(i) && /^\.\w+/.test(e.slice(i.length))));
271
271
  const ye = (e, r, t, i) => {
272
272
  for (const a of t || Object.keys(e)) {
@@ -280,20 +280,20 @@ const ye = (e, r, t, i) => {
280
280
  return !0;
281
281
  if (ye(d, r))
282
282
  break;
283
- } else if (p(d) && ye(d, r))
283
+ } else if (S(d) && ye(d, r))
284
284
  break;
285
285
  }
286
286
  }
287
287
  };
288
- var Bt = (e, r, t) => {
289
- const i = fe(f(e, t));
288
+ var Ut = (e, r, t) => {
289
+ const i = de(f(e, t));
290
290
  return x(i, "root", r[t]), x(e, t, i), e;
291
- }, Re = (e) => e.type === "file", K = (e) => typeof e == "function", me = (e) => {
292
- if (!Le)
291
+ }, Ue = (e) => e.type === "file", $ = (e) => typeof e == "function", me = (e) => {
292
+ if (!Te)
293
293
  return !1;
294
294
  const r = e ? e.ownerDocument : 0;
295
295
  return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
296
- }, be = (e) => Q(e), Ue = (e) => e.type === "radio", Ve = (e) => e instanceof RegExp;
296
+ }, be = (e) => z(e), Re = (e) => e.type === "radio", Ve = (e) => e instanceof RegExp;
297
297
  const Xe = {
298
298
  value: !1,
299
299
  isValid: !1
@@ -306,7 +306,7 @@ var gt = (e) => {
306
306
  }
307
307
  return e[0].checked && !e[0].disabled ? (
308
308
  // @ts-expect-error expected to work in the browser
309
- e[0].attributes && !D(e[0].attributes.value) ? D(e[0].value) || e[0].value === "" ? Ze : { value: e[0].value, isValid: !0 } : Ze
309
+ e[0].attributes && !E(e[0].attributes.value) ? E(e[0].value) || e[0].value === "" ? Ze : { value: e[0].value, isValid: !0 } : Ze
310
310
  ) : Xe;
311
311
  }
312
312
  return Xe;
@@ -327,108 +327,108 @@ function tt(e, r, t = "validate") {
327
327
  ref: r
328
328
  };
329
329
  }
330
- var ne = (e) => p(e) && !Ve(e) ? e : {
330
+ var ne = (e) => S(e) && !Ve(e) ? e : {
331
331
  value: e,
332
332
  message: ""
333
333
  }, rt = async (e, r, t, i, a, u) => {
334
- const { ref: l, refs: d, required: b, maxLength: F, minLength: _, min: v, max: M, pattern: H, validate: O, name: U, valueAsNumber: I, mount: X } = e._f, A = f(t, U);
335
- if (!X || r.has(U))
334
+ const { ref: l, refs: d, required: b, maxLength: w, minLength: V, min: v, max: M, pattern: Q, validate: O, name: R, valueAsNumber: I, mount: X } = e._f, F = f(t, R);
335
+ if (!X || r.has(R))
336
336
  return {};
337
- const G = d ? d[0] : l, Y = (V) => {
338
- a && G.reportValidity && (G.setCustomValidity(q(V) ? "" : V || ""), G.reportValidity());
339
- }, S = {}, se = Ue(l), ge = he(l), te = se || ge, ie = (I || Re(l)) && D(l.value) && D(A) || me(l) && l.value === "" || A === "" || Array.isArray(A) && !A.length, j = ht.bind(null, U, i, S), ve = (V, w, k, R = J.maxLength, z = J.minLength) => {
340
- const W = V ? w : k;
341
- S[U] = {
342
- type: V ? R : z,
337
+ const G = d ? d[0] : l, Y = (m) => {
338
+ a && G.reportValidity && (G.setCustomValidity(q(m) ? "" : m || ""), G.reportValidity());
339
+ }, k = {}, se = Re(l), ge = he(l), te = se || ge, ie = (I || Ue(l)) && E(l.value) && E(F) || me(l) && l.value === "" || F === "" || Array.isArray(F) && !F.length, j = ht.bind(null, R, i, k), ve = (m, A, p, U = J.maxLength, H = J.minLength) => {
340
+ const W = m ? A : p;
341
+ k[R] = {
342
+ type: m ? U : H,
343
343
  message: W,
344
344
  ref: l,
345
- ...j(V ? R : z, W)
345
+ ...j(m ? U : H, W)
346
346
  };
347
347
  };
348
- if (u ? !Array.isArray(A) || !A.length : b && (!te && (ie || B(A)) || q(A) && !A || ge && !gt(d).isValid || se && !vt(d).isValid)) {
349
- const { value: V, message: w } = be(b) ? { value: !!b, message: b } : ne(b);
350
- if (V && (S[U] = {
348
+ if (u ? !Array.isArray(F) || !F.length : b && (!te && (ie || N(F)) || q(F) && !F || ge && !gt(d).isValid || se && !vt(d).isValid)) {
349
+ const { value: m, message: A } = be(b) ? { value: !!b, message: b } : ne(b);
350
+ if (m && (k[R] = {
351
351
  type: J.required,
352
- message: w,
352
+ message: A,
353
353
  ref: G,
354
- ...j(J.required, w)
354
+ ...j(J.required, A)
355
355
  }, !i))
356
- return Y(w), S;
356
+ return Y(A), k;
357
357
  }
358
- if (!ie && (!B(v) || !B(M))) {
359
- let V, w;
360
- const k = ne(M), R = ne(v);
361
- if (!B(A) && !isNaN(A)) {
362
- const z = l.valueAsNumber || A && +A;
363
- B(k.value) || (V = z > k.value), B(R.value) || (w = z < R.value);
358
+ if (!ie && (!N(v) || !N(M))) {
359
+ let m, A;
360
+ const p = ne(M), U = ne(v);
361
+ if (!N(F) && !isNaN(F)) {
362
+ const H = l.valueAsNumber || F && +F;
363
+ N(p.value) || (m = H > p.value), N(U.value) || (A = H < U.value);
364
364
  } else {
365
- const z = l.valueAsDate || new Date(A), W = (oe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + oe), ae = l.type == "time", ue = l.type == "week";
366
- Q(k.value) && A && (V = ae ? W(A) > W(k.value) : ue ? A > k.value : z > new Date(k.value)), Q(R.value) && A && (w = ae ? W(A) < W(R.value) : ue ? A < R.value : z < new Date(R.value));
365
+ const H = l.valueAsDate || new Date(F), W = (oe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + oe), ae = l.type == "time", ue = l.type == "week";
366
+ z(p.value) && F && (m = ae ? W(F) > W(p.value) : ue ? F > p.value : H > new Date(p.value)), z(U.value) && F && (A = ae ? W(F) < W(U.value) : ue ? F < U.value : H < new Date(U.value));
367
367
  }
368
- if ((V || w) && (ve(!!V, k.message, R.message, J.max, J.min), !i))
369
- return Y(S[U].message), S;
368
+ if ((m || A) && (ve(!!m, p.message, U.message, J.max, J.min), !i))
369
+ return Y(k[R].message), k;
370
370
  }
371
- if ((F || _) && !ie && (Q(A) || u && Array.isArray(A))) {
372
- const V = ne(F), w = ne(_), k = !B(V.value) && A.length > +V.value, R = !B(w.value) && A.length < +w.value;
373
- if ((k || R) && (ve(k, V.message, w.message), !i))
374
- return Y(S[U].message), S;
371
+ if ((w || V) && !ie && (z(F) || u && Array.isArray(F))) {
372
+ const m = ne(w), A = ne(V), p = !N(m.value) && F.length > +m.value, U = !N(A.value) && F.length < +A.value;
373
+ if ((p || U) && (ve(p, m.message, A.message), !i))
374
+ return Y(k[R].message), k;
375
375
  }
376
- if (H && !ie && Q(A)) {
377
- const { value: V, message: w } = ne(H);
378
- if (Ve(V) && !A.match(V) && (S[U] = {
376
+ if (Q && !ie && z(F)) {
377
+ const { value: m, message: A } = ne(Q);
378
+ if (Ve(m) && !F.match(m) && (k[R] = {
379
379
  type: J.pattern,
380
- message: w,
380
+ message: A,
381
381
  ref: l,
382
- ...j(J.pattern, w)
382
+ ...j(J.pattern, A)
383
383
  }, !i))
384
- return Y(w), S;
384
+ return Y(A), k;
385
385
  }
386
386
  if (O) {
387
- if (K(O)) {
388
- const V = await O(A, t), w = tt(V, G);
389
- if (w && (S[U] = {
390
- ...w,
391
- ...j(J.validate, w.message)
387
+ if ($(O)) {
388
+ const m = await O(F, t), A = tt(m, G);
389
+ if (A && (k[R] = {
390
+ ...A,
391
+ ...j(J.validate, A.message)
392
392
  }, !i))
393
- return Y(w.message), S;
394
- } else if (p(O)) {
395
- let V = {};
396
- for (const w in O) {
397
- if (!P(V) && !i)
393
+ return Y(A.message), k;
394
+ } else if (S(O)) {
395
+ let m = {};
396
+ for (const A in O) {
397
+ if (!P(m) && !i)
398
398
  break;
399
- const k = tt(await O[w](A, t), G, w);
400
- k && (V = {
401
- ...k,
402
- ...j(w, k.message)
403
- }, Y(k.message), i && (S[U] = V));
399
+ const p = tt(await O[A](F, t), G, A);
400
+ p && (m = {
401
+ ...p,
402
+ ...j(A, p.message)
403
+ }, Y(p.message), i && (k[R] = m));
404
404
  }
405
- if (!P(V) && (S[U] = {
405
+ if (!P(m) && (k[R] = {
406
406
  ref: G,
407
- ...V
407
+ ...m
408
408
  }, !i))
409
- return S;
409
+ return k;
410
410
  }
411
411
  }
412
- return Y(!0), S;
412
+ return Y(!0), k;
413
413
  };
414
- function Nt(e, r) {
414
+ function Rt(e, r) {
415
415
  const t = r.slice(0, -1).length;
416
416
  let i = 0;
417
417
  for (; i < t; )
418
- e = D(e) ? i++ : e[r[i++]];
418
+ e = E(e) ? i++ : e[r[i++]];
419
419
  return e;
420
420
  }
421
- function Pt(e) {
421
+ function Nt(e) {
422
422
  for (const r in e)
423
- if (e.hasOwnProperty(r) && !D(e[r]))
423
+ if (e.hasOwnProperty(r) && !E(e[r]))
424
424
  return !1;
425
425
  return !0;
426
426
  }
427
427
  function C(e, r) {
428
- const t = Array.isArray(r) ? r : Te(r) ? [r] : lt(r), i = t.length === 1 ? e : Nt(e, t), a = t.length - 1, u = t[a];
429
- return i && delete i[u], a !== 0 && (p(i) && P(i) || Array.isArray(i) && Pt(i)) && C(e, t.slice(0, -1)), e;
428
+ const t = Array.isArray(r) ? r : Le(r) ? [r] : lt(r), i = t.length === 1 ? e : Rt(e, t), a = t.length - 1, u = t[a];
429
+ return i && delete i[u], a !== 0 && (S(i) && P(i) || Array.isArray(i) && Nt(i)) && C(e, t.slice(0, -1)), e;
430
430
  }
431
- var pe = () => {
431
+ var Se = () => {
432
432
  let e = [];
433
433
  return {
434
434
  get observers() {
@@ -447,7 +447,7 @@ var pe = () => {
447
447
  e = [];
448
448
  }
449
449
  };
450
- }, Ce = (e) => B(e) || !at(e);
450
+ }, Ce = (e) => N(e) || !at(e);
451
451
  function ee(e, r) {
452
452
  if (Ce(e) || Ce(r))
453
453
  return e === r;
@@ -462,38 +462,38 @@ function ee(e, r) {
462
462
  return !1;
463
463
  if (a !== "ref") {
464
464
  const l = r[a];
465
- if (re(u) && re(l) || p(u) && p(l) || Array.isArray(u) && Array.isArray(l) ? !ee(u, l) : u !== l)
465
+ if (re(u) && re(l) || S(u) && S(l) || Array.isArray(u) && Array.isArray(l) ? !ee(u, l) : u !== l)
466
466
  return !1;
467
467
  }
468
468
  }
469
469
  return !0;
470
470
  }
471
- var bt = (e) => e.type === "select-multiple", It = (e) => Ue(e) || he(e), Se = (e) => me(e) && e.isConnected, _t = (e) => {
471
+ var bt = (e) => e.type === "select-multiple", Bt = (e) => Re(e) || he(e), ke = (e) => me(e) && e.isConnected, _t = (e) => {
472
472
  for (const r in e)
473
- if (K(e[r]))
473
+ if ($(e[r]))
474
474
  return !0;
475
475
  return !1;
476
476
  };
477
477
  function Fe(e, r = {}) {
478
478
  const t = Array.isArray(e);
479
- if (p(e) || t)
479
+ if (S(e) || t)
480
480
  for (const i in e)
481
- Array.isArray(e[i]) || p(e[i]) && !_t(e[i]) ? (r[i] = Array.isArray(e[i]) ? [] : {}, Fe(e[i], r[i])) : B(e[i]) || (r[i] = !0);
481
+ Array.isArray(e[i]) || S(e[i]) && !_t(e[i]) ? (r[i] = Array.isArray(e[i]) ? [] : {}, Fe(e[i], r[i])) : N(e[i]) || (r[i] = !0);
482
482
  return r;
483
483
  }
484
484
  function mt(e, r, t) {
485
485
  const i = Array.isArray(e);
486
- if (p(e) || i)
486
+ if (S(e) || i)
487
487
  for (const a in e)
488
- Array.isArray(e[a]) || p(e[a]) && !_t(e[a]) ? D(r) || Ce(t[a]) ? t[a] = Array.isArray(e[a]) ? Fe(e[a], []) : { ...Fe(e[a]) } : mt(e[a], B(r) ? {} : r[a], t[a]) : t[a] = !ee(e[a], r[a]);
488
+ Array.isArray(e[a]) || S(e[a]) && !_t(e[a]) ? E(r) || Ce(t[a]) ? t[a] = Array.isArray(e[a]) ? Fe(e[a], []) : { ...Fe(e[a]) } : mt(e[a], N(r) ? {} : r[a], t[a]) : t[a] = !ee(e[a], r[a]);
489
489
  return t;
490
490
  }
491
- var le = (e, r) => mt(e, r, Fe(r)), Vt = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: i }) => D(e) ? e : r ? e === "" ? NaN : e && +e : t && Q(e) ? new Date(e) : i ? i(e) : e;
492
- function ke(e) {
491
+ var le = (e, r) => mt(e, r, Fe(r)), Vt = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: i }) => E(e) ? e : r ? e === "" ? NaN : e && +e : t && z(e) ? new Date(e) : i ? i(e) : e;
492
+ function pe(e) {
493
493
  const r = e.ref;
494
- return Re(r) ? r.files : Ue(r) ? vt(e.refs).value : bt(r) ? [...r.selectedOptions].map(({ value: t }) => t) : he(r) ? gt(e.refs).value : Vt(D(r.value) ? e.ref.value : r.value, e);
494
+ return Ue(r) ? r.files : Re(r) ? vt(e.refs).value : bt(r) ? [...r.selectedOptions].map(({ value: t }) => t) : he(r) ? gt(e.refs).value : Vt(E(r.value) ? e.ref.value : r.value, e);
495
495
  }
496
- var jt = (e, r, t, i) => {
496
+ var Pt = (e, r, t, i) => {
497
497
  const a = {};
498
498
  for (const u of e) {
499
499
  const l = f(r, u);
@@ -505,12 +505,12 @@ var jt = (e, r, t, i) => {
505
505
  fields: a,
506
506
  shouldUseNativeValidation: i
507
507
  };
508
- }, ce = (e) => D(e) ? e : Ve(e) ? e.source : p(e) ? Ve(e.value) ? e.value.source : e.value : e;
508
+ }, ce = (e) => E(e) ? e : Ve(e) ? e.source : S(e) ? Ve(e.value) ? e.value.source : e.value : e;
509
509
  const st = "AsyncFunction";
510
- var Wt = (e) => !!e && !!e.validate && !!(K(e.validate) && e.validate.constructor.name === st || p(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === st)), qt = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
510
+ var It = (e) => !!e && !!e.validate && !!($(e.validate) && e.validate.constructor.name === st || S(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === st)), jt = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
511
511
  function it(e, r, t) {
512
512
  const i = f(e, t);
513
- if (i || Te(t))
513
+ if (i || Le(t))
514
514
  return {
515
515
  error: i,
516
516
  name: t
@@ -531,20 +531,20 @@ function it(e, r, t) {
531
531
  name: t
532
532
  };
533
533
  }
534
- var Ht = (e, r, t, i, a) => a.isOnAll ? !1 : !t && a.isOnTouch ? !(r || e) : (t ? i.isOnBlur : a.isOnBlur) ? !e : (t ? i.isOnChange : a.isOnChange) ? e : !0, zt = (e, r) => !Ae(f(e, r)).length && C(e, r);
535
- const $t = {
536
- mode: $.onSubmit,
537
- reValidateMode: $.onChange,
534
+ var Wt = (e, r, t, i, a) => a.isOnAll ? !1 : !t && a.isOnTouch ? !(r || e) : (t ? i.isOnBlur : a.isOnBlur) ? !e : (t ? i.isOnChange : a.isOnChange) ? e : !0, qt = (e, r) => !Ae(f(e, r)).length && C(e, r);
535
+ const Ht = {
536
+ mode: K.onSubmit,
537
+ reValidateMode: K.onChange,
538
538
  shouldFocusError: !0
539
539
  };
540
540
  function Kt(e = {}) {
541
541
  let r = {
542
- ...$t,
542
+ ...Ht,
543
543
  ...e
544
544
  }, t = {
545
545
  submitCount: 0,
546
546
  isDirty: !1,
547
- isLoading: K(r.defaultValues),
547
+ isLoading: $(r.defaultValues),
548
548
  isValidating: !1,
549
549
  isSubmitted: !1,
550
550
  isSubmitting: !1,
@@ -555,7 +555,7 @@ function Kt(e = {}) {
555
555
  validatingFields: {},
556
556
  errors: r.errors || {},
557
557
  disabled: r.disabled || !1
558
- }, i = {}, a = p(r.defaultValues) || p(r.values) ? N(r.defaultValues || r.values) || {} : {}, u = r.shouldUnregister ? {} : N(a), l = {
558
+ }, i = {}, a = S(r.defaultValues) || S(r.values) ? B(r.defaultValues || r.values) || {} : {}, u = r.shouldUnregister ? {} : B(a), l = {
559
559
  action: !1,
560
560
  mount: !1,
561
561
  watch: !1
@@ -565,8 +565,8 @@ function Kt(e = {}) {
565
565
  unMount: /* @__PURE__ */ new Set(),
566
566
  array: /* @__PURE__ */ new Set(),
567
567
  watch: /* @__PURE__ */ new Set()
568
- }, b, F = 0;
569
- const _ = {
568
+ }, b, w = 0;
569
+ const V = {
570
570
  isDirty: !1,
571
571
  dirtyFields: !1,
572
572
  validatingFields: !1,
@@ -575,26 +575,26 @@ function Kt(e = {}) {
575
575
  isValid: !1,
576
576
  errors: !1
577
577
  }, v = {
578
- values: pe(),
579
- array: pe(),
580
- state: pe()
581
- }, M = Ye(r.mode), H = Ye(r.reValidateMode), O = r.criteriaMode === $.all, U = (s) => (n) => {
582
- clearTimeout(F), F = setTimeout(s, n);
578
+ values: Se(),
579
+ array: Se(),
580
+ state: Se()
581
+ }, M = Ye(r.mode), Q = Ye(r.reValidateMode), O = r.criteriaMode === K.all, R = (s) => (n) => {
582
+ clearTimeout(w), w = setTimeout(s, n);
583
583
  }, I = async (s) => {
584
- if (!r.disabled && (_.isValid || s)) {
584
+ if (!r.disabled && (V.isValid || s)) {
585
585
  const n = r.resolver ? P((await te()).errors) : await j(i, !0);
586
586
  n !== t.isValid && v.state.next({
587
587
  isValid: n
588
588
  });
589
589
  }
590
590
  }, X = (s, n) => {
591
- !r.disabled && (_.isValidating || _.validatingFields) && ((s || Array.from(d.mount)).forEach((o) => {
591
+ !r.disabled && (V.isValidating || V.validatingFields) && ((s || Array.from(d.mount)).forEach((o) => {
592
592
  o && (n ? x(t.validatingFields, o, n) : C(t.validatingFields, o));
593
593
  }), v.state.next({
594
594
  validatingFields: t.validatingFields,
595
595
  isValidating: !P(t.validatingFields)
596
596
  }));
597
- }, A = (s, n = [], o, h, y = !0, c = !0) => {
597
+ }, F = (s, n = [], o, h, y = !0, c = !0) => {
598
598
  if (h && o && !r.disabled) {
599
599
  if (l.action = !0, c && Array.isArray(f(i, s))) {
600
600
  const g = o(f(i, s), h.argA, h.argB);
@@ -602,15 +602,15 @@ function Kt(e = {}) {
602
602
  }
603
603
  if (c && Array.isArray(f(t.errors, s))) {
604
604
  const g = o(f(t.errors, s), h.argA, h.argB);
605
- y && x(t.errors, s, g), zt(t.errors, s);
605
+ y && x(t.errors, s, g), qt(t.errors, s);
606
606
  }
607
- if (_.touchedFields && c && Array.isArray(f(t.touchedFields, s))) {
607
+ if (V.touchedFields && c && Array.isArray(f(t.touchedFields, s))) {
608
608
  const g = o(f(t.touchedFields, s), h.argA, h.argB);
609
609
  y && x(t.touchedFields, s, g);
610
610
  }
611
- _.dirtyFields && (t.dirtyFields = le(a, u)), v.state.next({
611
+ V.dirtyFields && (t.dirtyFields = le(a, u)), v.state.next({
612
612
  name: s,
613
- isDirty: V(s, n),
613
+ isDirty: m(s, n),
614
614
  dirtyFields: t.dirtyFields,
615
615
  errors: t.errors,
616
616
  isValid: t.isValid
@@ -626,34 +626,34 @@ function Kt(e = {}) {
626
626
  errors: t.errors,
627
627
  isValid: !1
628
628
  });
629
- }, S = (s, n, o, h) => {
629
+ }, k = (s, n, o, h) => {
630
630
  const y = f(i, s);
631
631
  if (y) {
632
- const c = f(u, s, D(o) ? f(a, s) : o);
633
- D(c) || h && h.defaultChecked || n ? x(u, s, n ? c : ke(y._f)) : R(s, c), l.mount && I();
632
+ const c = f(u, s, E(o) ? f(a, s) : o);
633
+ E(c) || h && h.defaultChecked || n ? x(u, s, n ? c : pe(y._f)) : U(s, c), l.mount && I();
634
634
  }
635
635
  }, se = (s, n, o, h, y) => {
636
636
  let c = !1, g = !1;
637
- const m = {
637
+ const _ = {
638
638
  name: s
639
639
  };
640
640
  if (!r.disabled) {
641
- const L = !!(f(i, s) && f(i, s)._f && f(i, s)._f.disabled);
641
+ const T = !!(f(i, s) && f(i, s)._f && f(i, s)._f.disabled);
642
642
  if (!o || h) {
643
- _.isDirty && (g = t.isDirty, t.isDirty = m.isDirty = V(), c = g !== m.isDirty);
644
- const T = L || ee(f(a, s), n);
645
- g = !!(!L && f(t.dirtyFields, s)), T || L ? C(t.dirtyFields, s) : x(t.dirtyFields, s, !0), m.dirtyFields = t.dirtyFields, c = c || _.dirtyFields && g !== !T;
643
+ V.isDirty && (g = t.isDirty, t.isDirty = _.isDirty = m(), c = g !== _.isDirty);
644
+ const L = T || ee(f(a, s), n);
645
+ g = !!(!T && f(t.dirtyFields, s)), L || T ? C(t.dirtyFields, s) : x(t.dirtyFields, s, !0), _.dirtyFields = t.dirtyFields, c = c || V.dirtyFields && g !== !L;
646
646
  }
647
647
  if (o) {
648
- const T = f(t.touchedFields, s);
649
- T || (x(t.touchedFields, s, o), m.touchedFields = t.touchedFields, c = c || _.touchedFields && T !== o);
648
+ const L = f(t.touchedFields, s);
649
+ L || (x(t.touchedFields, s, o), _.touchedFields = t.touchedFields, c = c || V.touchedFields && L !== o);
650
650
  }
651
- c && y && v.state.next(m);
651
+ c && y && v.state.next(_);
652
652
  }
653
- return c ? m : {};
653
+ return c ? _ : {};
654
654
  }, ge = (s, n, o, h) => {
655
- const y = f(t.errors, s), c = _.isValid && q(n) && t.isValid !== n;
656
- if (r.delayError && o ? (b = U(() => G(s, o)), b(r.delayError)) : (clearTimeout(F), b = null, o ? x(t.errors, s, o) : C(t.errors, s)), (o ? !ee(y, o) : y) || !P(h) || c) {
655
+ const y = f(t.errors, s), c = V.isValid && q(n) && t.isValid !== n;
656
+ if (r.delayError && o ? (b = R(() => G(s, o)), b(r.delayError)) : (clearTimeout(w), b = null, o ? x(t.errors, s, o) : C(t.errors, s)), (o ? !ee(y, o) : y) || !P(h) || c) {
657
657
  const g = {
658
658
  ...h,
659
659
  ...c && q(n) ? { isValid: n } : {},
@@ -667,7 +667,7 @@ function Kt(e = {}) {
667
667
  }
668
668
  }, te = async (s) => {
669
669
  X(s, !0);
670
- const n = await r.resolver(u, r.context, jt(s || d.mount, i, r.criteriaMode, r.shouldUseNativeValidation));
670
+ const n = await r.resolver(u, r.context, Pt(s || d.mount, i, r.criteriaMode, r.shouldUseNativeValidation));
671
671
  return X(s), n;
672
672
  }, ie = async (s) => {
673
673
  const { errors: n } = await te(s);
@@ -687,12 +687,12 @@ function Kt(e = {}) {
687
687
  if (y) {
688
688
  const { _f: c, ...g } = y;
689
689
  if (c) {
690
- const m = d.array.has(c.name), L = y._f && Wt(y._f);
691
- L && _.validatingFields && X([h], !0);
692
- const T = await rt(y, d.disabled, u, O, r.shouldUseNativeValidation && !n, m);
693
- if (L && _.validatingFields && X([h]), T[c.name] && (o.valid = !1, n))
690
+ const _ = d.array.has(c.name), T = y._f && It(y._f);
691
+ T && V.validatingFields && X([h], !0);
692
+ const L = await rt(y, d.disabled, u, O, r.shouldUseNativeValidation && !n, _);
693
+ if (T && V.validatingFields && X([h]), L[c.name] && (o.valid = !1, n))
694
694
  break;
695
- !n && (f(T, c.name) ? m ? Bt(t.errors, T, c.name) : x(t.errors, c.name, T[c.name]) : C(t.errors, c.name));
695
+ !n && (f(L, c.name) ? _ ? Ut(t.errors, L, c.name) : x(t.errors, c.name, L[c.name]) : C(t.errors, c.name));
696
696
  }
697
697
  !P(g) && await j(g, n, o);
698
698
  }
@@ -701,37 +701,37 @@ function Kt(e = {}) {
701
701
  }, ve = () => {
702
702
  for (const s of d.unMount) {
703
703
  const n = f(i, s);
704
- n && (n._f.refs ? n._f.refs.every((o) => !Se(o)) : !Se(n._f.ref)) && we(s);
704
+ n && (n._f.refs ? n._f.refs.every((o) => !ke(o)) : !ke(n._f.ref)) && xe(s);
705
705
  }
706
706
  d.unMount = /* @__PURE__ */ new Set();
707
- }, V = (s, n) => !r.disabled && (s && n && x(u, s, n), !ee(Be(), a)), w = (s, n, o) => yt(s, d, {
708
- ...l.mount ? u : D(n) ? a : Q(s) ? { [s]: n } : n
709
- }, o, n), k = (s) => Ae(f(l.mount ? u : a, s, r.shouldUnregister ? f(a, s, []) : [])), R = (s, n, o = {}) => {
707
+ }, m = (s, n) => !r.disabled && (s && n && x(u, s, n), !ee(Ne(), a)), A = (s, n, o) => yt(s, d, {
708
+ ...l.mount ? u : E(n) ? a : z(s) ? { [s]: n } : n
709
+ }, o, n), p = (s) => Ae(f(l.mount ? u : a, s, r.shouldUnregister ? f(a, s, []) : [])), U = (s, n, o = {}) => {
710
710
  const h = f(i, s);
711
711
  let y = n;
712
712
  if (h) {
713
713
  const c = h._f;
714
- c && (!c.disabled && x(u, s, Vt(n, c)), y = me(c.ref) && B(n) ? "" : n, bt(c.ref) ? [...c.ref.options].forEach((g) => g.selected = y.includes(g.value)) : c.refs ? he(c.ref) ? c.refs.length > 1 ? c.refs.forEach((g) => (!g.defaultChecked || !g.disabled) && (g.checked = Array.isArray(y) ? !!y.find((m) => m === g.value) : y === g.value)) : c.refs[0] && (c.refs[0].checked = !!y) : c.refs.forEach((g) => g.checked = g.value === y) : Re(c.ref) ? c.ref.value = "" : (c.ref.value = y, c.ref.type || v.values.next({
714
+ c && (!c.disabled && x(u, s, Vt(n, c)), y = me(c.ref) && N(n) ? "" : n, bt(c.ref) ? [...c.ref.options].forEach((g) => g.selected = y.includes(g.value)) : c.refs ? he(c.ref) ? c.refs.length > 1 ? c.refs.forEach((g) => (!g.defaultChecked || !g.disabled) && (g.checked = Array.isArray(y) ? !!y.find((_) => _ === g.value) : y === g.value)) : c.refs[0] && (c.refs[0].checked = !!y) : c.refs.forEach((g) => g.checked = g.value === y) : Ue(c.ref) ? c.ref.value = "" : (c.ref.value = y, c.ref.type || v.values.next({
715
715
  name: s,
716
716
  values: { ...u }
717
717
  })));
718
718
  }
719
719
  (o.shouldDirty || o.shouldTouch) && se(s, y, o.shouldTouch, o.shouldDirty, !0), o.shouldValidate && oe(s);
720
- }, z = (s, n, o) => {
720
+ }, H = (s, n, o) => {
721
721
  for (const h in n) {
722
722
  const y = n[h], c = `${s}.${h}`, g = f(i, c);
723
- (d.array.has(s) || p(y) || g && !g._f) && !re(y) ? z(c, y, o) : R(c, y, o);
723
+ (d.array.has(s) || S(y) || g && !g._f) && !re(y) ? H(c, y, o) : U(c, y, o);
724
724
  }
725
725
  }, W = (s, n, o = {}) => {
726
- const h = f(i, s), y = d.array.has(s), c = N(n);
726
+ const h = f(i, s), y = d.array.has(s), c = B(n);
727
727
  x(u, s, c), y ? (v.array.next({
728
728
  name: s,
729
729
  values: { ...u }
730
- }), (_.isDirty || _.dirtyFields) && o.shouldDirty && v.state.next({
730
+ }), (V.isDirty || V.dirtyFields) && o.shouldDirty && v.state.next({
731
731
  name: s,
732
732
  dirtyFields: le(a, u),
733
- isDirty: V(s, c)
734
- })) : h && !h._f && !B(c) ? z(s, c, o) : R(s, c, o), Je(s, d) && v.state.next({ ...t }), v.values.next({
733
+ isDirty: m(s, c)
734
+ })) : h && !h._f && !N(c) ? H(s, c, o) : U(s, c, o), Je(s, d) && v.state.next({ ...t }), v.values.next({
735
735
  name: l.mount ? s : void 0,
736
736
  values: { ...u }
737
737
  });
@@ -739,67 +739,67 @@ function Kt(e = {}) {
739
739
  l.mount = !0;
740
740
  const n = s.target;
741
741
  let o = n.name, h = !0;
742
- const y = f(i, o), c = () => n.type ? ke(y._f) : ut(s), g = (m) => {
743
- h = Number.isNaN(m) || re(m) && isNaN(m.getTime()) || ee(m, f(u, o, m));
742
+ const y = f(i, o), c = () => n.type ? pe(y._f) : ut(s), g = (_) => {
743
+ h = Number.isNaN(_) || re(_) && isNaN(_.getTime()) || ee(_, f(u, o, _));
744
744
  };
745
745
  if (y) {
746
- let m, L;
747
- const T = c(), Z = s.type === _e.BLUR || s.type === _e.FOCUS_OUT, Dt = !qt(y._f) && !r.resolver && !f(t.errors, o) && !y._f.deps || Ht(Z, f(t.touchedFields, o), t.isSubmitted, H, M), Ee = Je(o, d, Z);
748
- x(u, o, T), Z ? (y._f.onBlur && y._f.onBlur(s), b && b(0)) : y._f.onChange && y._f.onChange(s);
749
- const De = se(o, T, Z, !1), pt = !P(De) || Ee;
746
+ let _, T;
747
+ const L = c(), Z = s.type === _e.BLUR || s.type === _e.FOCUS_OUT, Et = !jt(y._f) && !r.resolver && !f(t.errors, o) && !y._f.deps || Wt(Z, f(t.touchedFields, o), t.isSubmitted, Q, M), we = Je(o, d, Z);
748
+ x(u, o, L), Z ? (y._f.onBlur && y._f.onBlur(s), b && b(0)) : y._f.onChange && y._f.onChange(s);
749
+ const Ee = se(o, L, Z, !1), St = !P(Ee) || we;
750
750
  if (!Z && v.values.next({
751
751
  name: o,
752
752
  type: s.type,
753
753
  values: { ...u }
754
- }), Dt)
755
- return _.isValid && (r.mode === "onBlur" && Z ? I() : Z || I()), pt && v.state.next({ name: o, ...Ee ? {} : De });
756
- if (!Z && Ee && v.state.next({ ...t }), r.resolver) {
757
- const { errors: ze } = await te([o]);
758
- if (g(T), h) {
759
- const St = it(t.errors, i, o), $e = it(ze, i, St.name || o);
760
- m = $e.error, o = $e.name, L = P(ze);
754
+ }), Et)
755
+ return V.isValid && (r.mode === "onBlur" && Z ? I() : Z || I()), St && v.state.next({ name: o, ...we ? {} : Ee });
756
+ if (!Z && we && v.state.next({ ...t }), r.resolver) {
757
+ const { errors: Ke } = await te([o]);
758
+ if (g(L), h) {
759
+ const kt = it(t.errors, i, o), Qe = it(Ke, i, kt.name || o);
760
+ _ = Qe.error, o = Qe.name, T = P(Ke);
761
761
  }
762
762
  } else
763
- X([o], !0), m = (await rt(y, d.disabled, u, O, r.shouldUseNativeValidation))[o], X([o]), g(T), h && (m ? L = !1 : _.isValid && (L = await j(i, !0)));
764
- h && (y._f.deps && oe(y._f.deps), ge(o, L, m, De));
763
+ X([o], !0), _ = (await rt(y, d.disabled, u, O, r.shouldUseNativeValidation))[o], X([o]), g(L), h && (_ ? T = !1 : V.isValid && (T = await j(i, !0)));
764
+ h && (y._f.deps && oe(y._f.deps), ge(o, T, _, Ee));
765
765
  }
766
766
  }, ue = (s, n) => {
767
767
  if (f(t.errors, n) && s.focus)
768
768
  return s.focus(), 1;
769
769
  }, oe = async (s, n = {}) => {
770
770
  let o, h;
771
- const y = fe(s);
771
+ const y = de(s);
772
772
  if (r.resolver) {
773
- const c = await ie(D(s) ? s : y);
773
+ const c = await ie(E(s) ? s : y);
774
774
  o = P(c), h = s ? !y.some((g) => f(c, g)) : o;
775
775
  } else s ? (h = (await Promise.all(y.map(async (c) => {
776
776
  const g = f(i, c);
777
777
  return await j(g && g._f ? { [c]: g } : g);
778
778
  }))).every(Boolean), !(!h && !t.isValid) && I()) : h = o = await j(i);
779
779
  return v.state.next({
780
- ...!Q(s) || _.isValid && o !== t.isValid ? {} : { name: s },
780
+ ...!z(s) || V.isValid && o !== t.isValid ? {} : { name: s },
781
781
  ...r.resolver || !s ? { isValid: o } : {},
782
782
  errors: t.errors
783
783
  }), n.shouldFocus && !h && ye(i, ue, s ? y : d.mount), h;
784
- }, Be = (s) => {
784
+ }, Ne = (s) => {
785
785
  const n = {
786
786
  ...l.mount ? u : a
787
787
  };
788
- return D(s) ? n : Q(s) ? f(n, s) : s.map((o) => f(n, o));
789
- }, Ne = (s, n) => ({
788
+ return E(s) ? n : z(s) ? f(n, s) : s.map((o) => f(n, o));
789
+ }, Be = (s, n) => ({
790
790
  invalid: !!f((n || t).errors, s),
791
791
  isDirty: !!f((n || t).dirtyFields, s),
792
792
  error: f((n || t).errors, s),
793
793
  isValidating: !!f(t.validatingFields, s),
794
794
  isTouched: !!f((n || t).touchedFields, s)
795
795
  }), At = (s) => {
796
- s && fe(s).forEach((n) => C(t.errors, n)), v.state.next({
796
+ s && de(s).forEach((n) => C(t.errors, n)), v.state.next({
797
797
  errors: s ? t.errors : {}
798
798
  });
799
799
  }, Pe = (s, n, o) => {
800
- const h = (f(i, s, { _f: {} })._f || {}).ref, y = f(t.errors, s) || {}, { ref: c, message: g, type: m, ...L } = y;
800
+ const h = (f(i, s, { _f: {} })._f || {}).ref, y = f(t.errors, s) || {}, { ref: c, message: g, type: _, ...T } = y;
801
801
  x(t.errors, s, {
802
- ...L,
802
+ ...T,
803
803
  ...n,
804
804
  ref: h
805
805
  }), v.state.next({
@@ -807,20 +807,20 @@ function Kt(e = {}) {
807
807
  errors: t.errors,
808
808
  isValid: !1
809
809
  }), o && o.shouldFocus && h && h.focus && h.focus();
810
- }, wt = (s, n) => K(s) ? v.values.subscribe({
811
- next: (o) => s(w(void 0, n), o)
812
- }) : w(s, n, !0), we = (s, n = {}) => {
813
- for (const o of s ? fe(s) : d.mount)
810
+ }, xt = (s, n) => $(s) ? v.values.subscribe({
811
+ next: (o) => s(A(void 0, n), o)
812
+ }) : A(s, n, !0), xe = (s, n = {}) => {
813
+ for (const o of s ? de(s) : d.mount)
814
814
  d.mount.delete(o), d.array.delete(o), n.keepValue || (C(i, o), C(u, o)), !n.keepError && C(t.errors, o), !n.keepDirty && C(t.dirtyFields, o), !n.keepTouched && C(t.touchedFields, o), !n.keepIsValidating && C(t.validatingFields, o), !r.shouldUnregister && !n.keepDefaultValue && C(a, o);
815
815
  v.values.next({
816
816
  values: { ...u }
817
817
  }), v.state.next({
818
818
  ...t,
819
- ...n.keepDirty ? { isDirty: V() } : {}
819
+ ...n.keepDirty ? { isDirty: m() } : {}
820
820
  }), !n.keepIsValid && I();
821
821
  }, Ie = ({ disabled: s, name: n, field: o, fields: h }) => {
822
- (q(s) && l.mount || s || d.disabled.has(n)) && (s ? d.disabled.add(n) : d.disabled.delete(n), se(n, ke(o ? o._f : f(h, n)._f), !1, !1, !0));
823
- }, xe = (s, n = {}) => {
822
+ (q(s) && l.mount || s || d.disabled.has(n)) && (s ? d.disabled.add(n) : d.disabled.delete(n), se(n, pe(o ? o._f : f(h, n)._f), !1, !1, !0));
823
+ }, De = (s, n = {}) => {
824
824
  let o = f(i, s);
825
825
  const h = q(n.disabled) || q(r.disabled);
826
826
  return x(i, s, {
@@ -835,7 +835,7 @@ function Kt(e = {}) {
835
835
  field: o,
836
836
  disabled: q(n.disabled) ? n.disabled : r.disabled,
837
837
  name: s
838
- }) : S(s, !0, n.value), {
838
+ }) : k(s, !0, n.value), {
839
839
  ...h ? { disabled: n.disabled || r.disabled } : {},
840
840
  ...r.progressive ? {
841
841
  required: !!n.required,
@@ -850,28 +850,28 @@ function Kt(e = {}) {
850
850
  onBlur: ae,
851
851
  ref: (y) => {
852
852
  if (y) {
853
- xe(s, n), o = f(i, s);
854
- const c = D(y.value) && y.querySelectorAll && y.querySelectorAll("input,select,textarea")[0] || y, g = It(c), m = o._f.refs || [];
855
- if (g ? m.find((L) => L === c) : c === o._f.ref)
853
+ De(s, n), o = f(i, s);
854
+ const c = E(y.value) && y.querySelectorAll && y.querySelectorAll("input,select,textarea")[0] || y, g = Bt(c), _ = o._f.refs || [];
855
+ if (g ? _.find((T) => T === c) : c === o._f.ref)
856
856
  return;
857
857
  x(i, s, {
858
858
  _f: {
859
859
  ...o._f,
860
860
  ...g ? {
861
861
  refs: [
862
- ...m.filter(Se),
862
+ ..._.filter(ke),
863
863
  c,
864
864
  ...Array.isArray(f(a, s)) ? [{}] : []
865
865
  ],
866
866
  ref: { type: c.type, name: s }
867
867
  } : { ref: c }
868
868
  }
869
- }), S(s, !1, void 0, c);
869
+ }), k(s, !1, void 0, c);
870
870
  } else
871
871
  o = f(i, s, {}), o._f && (o._f.mount = !1), (r.shouldUnregister || n.shouldUnregister) && !(ot(d.array, s) && l.action) && d.unMount.add(s);
872
872
  }
873
873
  };
874
- }, je = () => r.shouldFocusError && ye(i, ue, d.mount), xt = (s) => {
874
+ }, je = () => r.shouldFocusError && ye(i, ue, d.mount), Dt = (s) => {
875
875
  q(s) && (v.state.next({ disabled: s }), ye(i, (n, o) => {
876
876
  const h = f(i, o);
877
877
  h && (n.disabled = h._f.disabled || s, Array.isArray(h._f.refs) && h._f.refs.forEach((y) => {
@@ -881,7 +881,7 @@ function Kt(e = {}) {
881
881
  }, We = (s, n) => async (o) => {
882
882
  let h;
883
883
  o && (o.preventDefault && o.preventDefault(), o.persist && o.persist());
884
- let y = N(u);
884
+ let y = B(u);
885
885
  if (d.disabled.size)
886
886
  for (const c of d.disabled)
887
887
  x(y, c, void 0);
@@ -911,28 +911,28 @@ function Kt(e = {}) {
911
911
  errors: t.errors
912
912
  }), h)
913
913
  throw h;
914
- }, Et = (s, n = {}) => {
915
- f(i, s) && (D(n.defaultValue) ? W(s, N(f(a, s))) : (W(s, n.defaultValue), x(a, s, N(n.defaultValue))), n.keepTouched || C(t.touchedFields, s), n.keepDirty || (C(t.dirtyFields, s), t.isDirty = n.defaultValue ? V(s, N(f(a, s))) : V()), n.keepError || (C(t.errors, s), _.isValid && I()), v.state.next({ ...t }));
914
+ }, wt = (s, n = {}) => {
915
+ f(i, s) && (E(n.defaultValue) ? W(s, B(f(a, s))) : (W(s, n.defaultValue), x(a, s, B(n.defaultValue))), n.keepTouched || C(t.touchedFields, s), n.keepDirty || (C(t.dirtyFields, s), t.isDirty = n.defaultValue ? m(s, B(f(a, s))) : m()), n.keepError || (C(t.errors, s), V.isValid && I()), v.state.next({ ...t }));
916
916
  }, qe = (s, n = {}) => {
917
- const o = s ? N(s) : a, h = N(o), y = P(s), c = y ? a : h;
917
+ const o = s ? B(s) : a, h = B(o), y = P(s), c = y ? a : h;
918
918
  if (n.keepDefaultValues || (a = o), !n.keepValues) {
919
919
  if (n.keepDirtyValues) {
920
920
  const g = /* @__PURE__ */ new Set([
921
921
  ...d.mount,
922
922
  ...Object.keys(le(a, u))
923
923
  ]);
924
- for (const m of Array.from(g))
925
- f(t.dirtyFields, m) ? x(c, m, f(u, m)) : W(m, f(c, m));
924
+ for (const _ of Array.from(g))
925
+ f(t.dirtyFields, _) ? x(c, _, f(u, _)) : W(_, f(c, _));
926
926
  } else {
927
- if (Le && D(s))
927
+ if (Te && E(s))
928
928
  for (const g of d.mount) {
929
- const m = f(i, g);
930
- if (m && m._f) {
931
- const L = Array.isArray(m._f.refs) ? m._f.refs[0] : m._f.ref;
932
- if (me(L)) {
933
- const T = L.closest("form");
934
- if (T) {
935
- T.reset();
929
+ const _ = f(i, g);
930
+ if (_ && _._f) {
931
+ const T = Array.isArray(_._f.refs) ? _._f.refs[0] : _._f.ref;
932
+ if (me(T)) {
933
+ const L = T.closest("form");
934
+ if (L) {
935
+ L.reset();
936
936
  break;
937
937
  }
938
938
  }
@@ -940,7 +940,7 @@ function Kt(e = {}) {
940
940
  }
941
941
  i = {};
942
942
  }
943
- u = r.shouldUnregister ? n.keepDefaultValues ? N(a) : {} : N(c), v.array.next({
943
+ u = r.shouldUnregister ? n.keepDefaultValues ? B(a) : {} : B(c), v.array.next({
944
944
  values: { ...c }
945
945
  }), v.values.next({
946
946
  values: { ...c }
@@ -954,7 +954,7 @@ function Kt(e = {}) {
954
954
  watch: /* @__PURE__ */ new Set(),
955
955
  watchAll: !1,
956
956
  focus: ""
957
- }, l.mount = !_.isValid || !!n.keepIsValid || !!n.keepDirtyValues, l.watch = !!r.shouldUnregister, v.state.next({
957
+ }, l.mount = !V.isValid || !!n.keepIsValid || !!n.keepDirtyValues, l.watch = !!r.shouldUnregister, v.state.next({
958
958
  submitCount: n.keepSubmitCount ? t.submitCount : 0,
959
959
  isDirty: y ? !1 : n.keepDirty ? t.isDirty : !!(n.keepDefaultValues && !ee(s, a)),
960
960
  isSubmitted: n.keepIsSubmitted ? t.isSubmitted : !1,
@@ -964,24 +964,24 @@ function Kt(e = {}) {
964
964
  isSubmitSuccessful: n.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
965
965
  isSubmitting: !1
966
966
  });
967
- }, He = (s, n) => qe(K(s) ? s(u) : s, n);
967
+ }, He = (s, n) => qe($(s) ? s(u) : s, n);
968
968
  return {
969
969
  control: {
970
- register: xe,
971
- unregister: we,
972
- getFieldState: Ne,
970
+ register: De,
971
+ unregister: xe,
972
+ getFieldState: Be,
973
973
  handleSubmit: We,
974
974
  setError: Pe,
975
975
  _executeSchema: te,
976
- _getWatch: w,
977
- _getDirty: V,
976
+ _getWatch: A,
977
+ _getDirty: m,
978
978
  _updateValid: I,
979
979
  _removeUnmounted: ve,
980
- _updateFieldArray: A,
980
+ _updateFieldArray: F,
981
981
  _updateDisabledField: Ie,
982
- _getFieldArray: k,
982
+ _getFieldArray: p,
983
983
  _reset: qe,
984
- _resetDefaultValues: () => K(r.defaultValues) && r.defaultValues().then((s) => {
984
+ _resetDefaultValues: () => $(r.defaultValues) && r.defaultValues().then((s) => {
985
985
  He(s, r.resetOptions), v.state.next({
986
986
  isLoading: !1
987
987
  });
@@ -992,9 +992,9 @@ function Kt(e = {}) {
992
992
  ...s
993
993
  };
994
994
  },
995
- _disableForm: xt,
995
+ _disableForm: Dt,
996
996
  _subjects: v,
997
- _proxyFormState: _,
997
+ _proxyFormState: V,
998
998
  _setErrors: Y,
999
999
  get _fields() {
1000
1000
  return i;
@@ -1034,31 +1034,31 @@ function Kt(e = {}) {
1034
1034
  }
1035
1035
  },
1036
1036
  trigger: oe,
1037
- register: xe,
1037
+ register: De,
1038
1038
  handleSubmit: We,
1039
- watch: wt,
1039
+ watch: xt,
1040
1040
  setValue: W,
1041
- getValues: Be,
1041
+ getValues: Ne,
1042
1042
  reset: He,
1043
- resetField: Et,
1043
+ resetField: wt,
1044
1044
  clearErrors: At,
1045
- unregister: we,
1045
+ unregister: xe,
1046
1046
  setError: Pe,
1047
1047
  setFocus: (s, n = {}) => {
1048
1048
  const o = f(i, s), h = o && o._f;
1049
1049
  if (h) {
1050
1050
  const y = h.refs ? h.refs[0] : h.ref;
1051
- y.focus && (y.focus(), n.shouldSelect && K(y.select) && y.select());
1051
+ y.focus && (y.focus(), n.shouldSelect && $(y.select) && y.select());
1052
1052
  }
1053
1053
  },
1054
- getFieldState: Ne
1054
+ getFieldState: Be
1055
1055
  };
1056
1056
  }
1057
1057
  function Qt(e = {}) {
1058
- const r = E.useRef(void 0), t = E.useRef(void 0), [i, a] = E.useState({
1058
+ const r = D.useRef(void 0), t = D.useRef(void 0), [i, a] = D.useState({
1059
1059
  isDirty: !1,
1060
1060
  isValidating: !1,
1061
- isLoading: K(e.defaultValues),
1061
+ isLoading: $(e.defaultValues),
1062
1062
  isSubmitted: !1,
1063
1063
  isSubmitting: !1,
1064
1064
  isSubmitSuccessful: !1,
@@ -1069,7 +1069,7 @@ function Qt(e = {}) {
1069
1069
  validatingFields: {},
1070
1070
  errors: e.errors || {},
1071
1071
  disabled: e.disabled || !1,
1072
- defaultValues: K(e.defaultValues) ? void 0 : e.defaultValues
1072
+ defaultValues: $(e.defaultValues) ? void 0 : e.defaultValues
1073
1073
  });
1074
1074
  r.current || (r.current = {
1075
1075
  ...Kt(e),
@@ -1079,22 +1079,22 @@ function Qt(e = {}) {
1079
1079
  return u._options = e, Oe({
1080
1080
  subject: u._subjects.state,
1081
1081
  next: (l) => {
1082
- dt(l, u._proxyFormState, u._updateFormState, !0) && a({ ...u._formState });
1082
+ ft(l, u._proxyFormState, u._updateFormState, !0) && a({ ...u._formState });
1083
1083
  }
1084
- }), E.useEffect(() => u._disableForm(e.disabled), [u, e.disabled]), E.useEffect(() => {
1084
+ }), D.useEffect(() => u._disableForm(e.disabled), [u, e.disabled]), D.useEffect(() => {
1085
1085
  if (u._proxyFormState.isDirty) {
1086
1086
  const l = u._getDirty();
1087
1087
  l !== i.isDirty && u._subjects.state.next({
1088
1088
  isDirty: l
1089
1089
  });
1090
1090
  }
1091
- }, [u, i.isDirty]), E.useEffect(() => {
1091
+ }, [u, i.isDirty]), D.useEffect(() => {
1092
1092
  e.values && !ee(e.values, t.current) ? (u._reset(e.values, u._options.resetOptions), t.current = e.values, a((l) => ({ ...l }))) : u._resetDefaultValues();
1093
- }, [e.values, u]), E.useEffect(() => {
1093
+ }, [e.values, u]), D.useEffect(() => {
1094
1094
  e.errors && u._setErrors(e.errors);
1095
- }, [e.errors, u]), E.useEffect(() => {
1095
+ }, [e.errors, u]), D.useEffect(() => {
1096
1096
  u._state.mount || (u._updateValid(), u._state.mount = !0), u._state.watch && (u._state.watch = !1, u._subjects.state.next({ ...u._formState })), u._removeUnmounted();
1097
- }), E.useEffect(() => {
1097
+ }), D.useEffect(() => {
1098
1098
  e.shouldUnregister && u._subjects.values.next({
1099
1099
  values: u._getWatch()
1100
1100
  });
@@ -1110,52 +1110,52 @@ const nt = (e, r, t) => {
1110
1110
  const i = r.fields[t];
1111
1111
  i && i.ref && "reportValidity" in i.ref ? nt(i.ref, t, e) : i.refs && i.refs.forEach((a) => nt(a, t, e));
1112
1112
  }
1113
- }, Gt = (e, r) => {
1113
+ }, $t = (e, r) => {
1114
1114
  r.shouldUseNativeValidation && Ft(e, r);
1115
1115
  const t = {};
1116
1116
  for (const i in e) {
1117
1117
  const a = f(r.fields, i), u = Object.assign(e[i] || {}, { ref: a && a.ref });
1118
- if (Yt(r.names || Object.keys(e), i)) {
1118
+ if (zt(r.names || Object.keys(e), i)) {
1119
1119
  const l = Object.assign({}, f(t, i));
1120
1120
  x(l, "root", u), x(t, i, l);
1121
1121
  } else x(t, i, u);
1122
1122
  }
1123
1123
  return t;
1124
- }, Yt = (e, r) => e.some((t) => t.startsWith(r + "."));
1125
- var Jt = function(e, r) {
1124
+ }, zt = (e, r) => e.some((t) => t.startsWith(r + "."));
1125
+ var Gt = function(e, r) {
1126
1126
  for (var t = {}; e.length; ) {
1127
1127
  var i = e[0], a = i.code, u = i.message, l = i.path.join(".");
1128
1128
  if (!t[l]) if ("unionErrors" in i) {
1129
1129
  var d = i.unionErrors[0].errors[0];
1130
1130
  t[l] = { message: d.message, type: d.code };
1131
1131
  } else t[l] = { message: u, type: a };
1132
- if ("unionErrors" in i && i.unionErrors.forEach(function(_) {
1133
- return _.errors.forEach(function(v) {
1132
+ if ("unionErrors" in i && i.unionErrors.forEach(function(V) {
1133
+ return V.errors.forEach(function(v) {
1134
1134
  return e.push(v);
1135
1135
  });
1136
1136
  }), r) {
1137
- var b = t[l].types, F = b && b[i.code];
1138
- t[l] = ht(l, r, t, a, F ? [].concat(F, i.message) : i.message);
1137
+ var b = t[l].types, w = b && b[i.code];
1138
+ t[l] = ht(l, r, t, a, w ? [].concat(w, i.message) : i.message);
1139
1139
  }
1140
1140
  e.shift();
1141
1141
  }
1142
1142
  return t;
1143
- }, Xt = function(e, r, t) {
1143
+ }, Yt = function(e, r, t) {
1144
1144
  return t === void 0 && (t = {}), function(i, a, u) {
1145
1145
  try {
1146
1146
  return Promise.resolve(function(l, d) {
1147
1147
  try {
1148
- var b = Promise.resolve(e[t.mode === "sync" ? "parse" : "parseAsync"](i, r)).then(function(F) {
1149
- return u.shouldUseNativeValidation && Ft({}, u), { errors: {}, values: t.raw ? i : F };
1148
+ var b = Promise.resolve(e[t.mode === "sync" ? "parse" : "parseAsync"](i, r)).then(function(w) {
1149
+ return u.shouldUseNativeValidation && Ft({}, u), { errors: {}, values: t.raw ? i : w };
1150
1150
  });
1151
- } catch (F) {
1152
- return d(F);
1151
+ } catch (w) {
1152
+ return d(w);
1153
1153
  }
1154
1154
  return b && b.then ? b.then(void 0, d) : b;
1155
1155
  }(0, function(l) {
1156
1156
  if (function(d) {
1157
1157
  return Array.isArray(d == null ? void 0 : d.errors);
1158
- }(l)) return { values: {}, errors: Gt(Jt(l.errors, !u.shouldUseNativeValidation && u.criteriaMode === "all"), u) };
1158
+ }(l)) return { values: {}, errors: $t(Gt(l.errors, !u.shouldUseNativeValidation && u.criteriaMode === "all"), u) };
1159
1159
  throw l;
1160
1160
  }));
1161
1161
  } catch (l) {
@@ -1163,49 +1163,28 @@ var Jt = function(e, r) {
1163
1163
  }
1164
1164
  };
1165
1165
  };
1166
- const lr = ({ schema: e, ...r }) => Qt({
1166
+ const ur = ({ schema: e, ...r }) => Qt({
1167
1167
  ...r,
1168
- resolver: Xt(e)
1169
- }), Zt = (e, r) => {
1168
+ resolver: Yt(e)
1169
+ }), Jt = (e, r) => {
1170
1170
  let t;
1171
1171
  return function(...i) {
1172
1172
  clearTimeout(t), t = setTimeout(() => e(...i), r);
1173
1173
  };
1174
- }, er = (e, r) => de.useMemo(() => Zt(e, r), [r]), cr = (e, r) => {
1175
- const t = de.useRef(e), [i, a] = de.useState(e), u = er(a, r);
1176
- return de.useEffect(() => {
1174
+ }, Xt = (e, r) => fe.useMemo(() => Jt(e, r), [r]), or = (e, r) => {
1175
+ const t = fe.useRef(e), [i, a] = fe.useState(e), u = Xt(a, r);
1176
+ return fe.useEffect(() => {
1177
1177
  t.current !== e && (u(e), t.current = e);
1178
1178
  }, [e]), i;
1179
- }, dr = (e, r, t) => {
1180
- const [i, a] = kt(null);
1181
- return Ct(() => {
1182
- const u = () => {
1183
- if (e.current && r.current) {
1184
- const l = e.current.getBoundingClientRect(), d = r.current.getBoundingClientRect(), b = window.innerHeight;
1185
- let F, _;
1186
- const v = b - l.bottom;
1187
- v >= d.height + t ? (F = l.bottom + t, _ = "top") : l.top >= d.height + t ? (F = l.top - d.height - t * 2, _ = "bottom") : (F = l.bottom + t, _ = "top", r.current.style.maxHeight = `${v - t}px`), a({
1188
- top: F,
1189
- width: l.width,
1190
- left: l.left,
1191
- transformOrigin: _
1192
- });
1193
- }
1194
- };
1195
- return u(), window.addEventListener("resize", u), window.addEventListener("orientationchange", u), () => {
1196
- window.removeEventListener("resize", u), window.removeEventListener("orientationchange", u);
1197
- };
1198
- }, [e.current, r.current, t]), i;
1199
1179
  };
1200
1180
  export {
1201
- ar as a,
1202
- ur as b,
1203
- lr as c,
1204
- Zt as d,
1205
- er as e,
1206
- cr as f,
1207
- dr as g,
1208
- or as h,
1209
- Ut as u
1181
+ ir as a,
1182
+ nr as b,
1183
+ ur as c,
1184
+ Jt as d,
1185
+ Xt as e,
1186
+ or as f,
1187
+ ar as g,
1188
+ Ot as u
1210
1189
  };
1211
- //# sourceMappingURL=useFloating-9_G5403U.js.map
1190
+ //# sourceMappingURL=useDebounce-QgEEiWs9.js.map