digital-rabbit-cl 1.3.3 → 1.3.5

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.
@@ -277,8 +277,8 @@ const Lr = "Checkbox-module__container___aV9qz", Br = "Checkbox-module__svg___kk
277
277
  checkmarkColor: r,
278
278
  disabled: o,
279
279
  inverted: s
280
- }), z = (W) => {
281
- o || d(W);
280
+ }), z = (T) => {
281
+ o || d(T);
282
282
  }, k = {
283
283
  cursor: S.cursor,
284
284
  fontSize: x.fonts.size,
@@ -287,23 +287,23 @@ const Lr = "Checkbox-module__container___aV9qz", Br = "Checkbox-module__svg___kk
287
287
  // Top-level style prop overrides
288
288
  }, E = {
289
289
  width: "1em"
290
- }, j = {
290
+ }, I = {
291
291
  fill: s && t ? S.checkboxColor : "transparent",
292
292
  strokeWidth: "25",
293
293
  stroke: S.checkboxColor
294
- }, U = {
294
+ }, W = {
295
295
  stroke: S.checkmarkColor,
296
296
  strokeWidth: "15",
297
297
  fill: "transparent"
298
- }, Y = [Me.container, m].filter(Boolean).join(" ");
299
- return /* @__PURE__ */ K("div", { ...F, className: Y, style: k, children: [
298
+ }, ee = [Me.container, m].filter(Boolean).join(" ");
299
+ return /* @__PURE__ */ K("div", { ...F, className: ee, style: k, children: [
300
300
  /* @__PURE__ */ V(
301
301
  "input",
302
302
  {
303
303
  id: _,
304
304
  checked: t,
305
305
  disabled: o,
306
- onChange: (W) => z({ target: { checked: W.target.checked, name: i, type: "checkbox" } }),
306
+ onChange: (T) => z({ target: { checked: T.target.checked, name: i, type: "checkbox" } }),
307
307
  name: i,
308
308
  style: { display: "none" },
309
309
  type: "checkbox"
@@ -318,8 +318,8 @@ const Lr = "Checkbox-module__container___aV9qz", Br = "Checkbox-module__svg___kk
318
318
  style: E,
319
319
  className: Me.svg,
320
320
  children: [
321
- /* @__PURE__ */ V("rect", { x: "0", y: "0", height: "100", width: "100", style: j }),
322
- t && /* @__PURE__ */ V("path", { d: "M 25 45 L 45 65 L 75 30", style: U })
321
+ /* @__PURE__ */ V("rect", { x: "0", y: "0", height: "100", width: "100", style: I }),
322
+ t && /* @__PURE__ */ V("path", { d: "M 25 45 L 45 65 L 75 30", style: W })
323
323
  ]
324
324
  }
325
325
  ),
@@ -345,27 +345,27 @@ const Lr = "Checkbox-module__container___aV9qz", Br = "Checkbox-module__svg___kk
345
345
  };
346
346
  var be = (e) => e.type === "checkbox", ue = (e) => e instanceof Date, Q = (e) => e == null;
347
347
  const Kt = (e) => typeof e == "object";
348
- var M = (e) => !Q(e) && !Array.isArray(e) && Kt(e) && !ue(e), Jt = (e) => M(e) && e.target ? be(e.target) ? e.target.checked : e.target.value : e, Ur = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Xt = (e, r) => e.has(Ur(r)), Wr = (e) => {
348
+ var j = (e) => !Q(e) && !Array.isArray(e) && Kt(e) && !ue(e), Jt = (e) => j(e) && e.target ? be(e.target) ? e.target.checked : e.target.value : e, Ur = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Xt = (e, r) => e.has(Ur(r)), Wr = (e) => {
349
349
  const r = e.constructor && e.constructor.prototype;
350
- return M(r) && r.hasOwnProperty("isPrototypeOf");
350
+ return j(r) && r.hasOwnProperty("isPrototypeOf");
351
351
  }, st = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
352
- function I(e) {
352
+ function U(e) {
353
353
  let r;
354
354
  const t = Array.isArray(e), s = typeof FileList < "u" ? e instanceof FileList : !1;
355
355
  if (e instanceof Date)
356
356
  r = new Date(e);
357
- else if (!(st && (e instanceof Blob || s)) && (t || M(e)))
357
+ else if (!(st && (e instanceof Blob || s)) && (t || j(e)))
358
358
  if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !Wr(e))
359
359
  r = e;
360
360
  else
361
361
  for (const o in e)
362
- e.hasOwnProperty(o) && (r[o] = I(e[o]));
362
+ e.hasOwnProperty(o) && (r[o] = U(e[o]));
363
363
  else
364
364
  return e;
365
365
  return r;
366
366
  }
367
367
  var Pe = (e) => /^\w*$/.test(e), B = (e) => e === void 0, ot = (e) => Array.isArray(e) ? e.filter(Boolean) : [], nt = (e) => ot(e.replace(/["|']|\]/g, "").split(/\.|\[/)), v = (e, r, t) => {
368
- if (!r || !M(e))
368
+ if (!r || !j(e))
369
369
  return t;
370
370
  const s = (Pe(r) ? [r] : nt(r)).reduce((o, n) => Q(o) ? o : o[n], e);
371
371
  return B(s) || s === e ? B(e[r]) ? t : e[r] : s;
@@ -377,7 +377,7 @@ var Pe = (e) => /^\w*$/.test(e), B = (e) => e === void 0, ot = (e) => Array.isAr
377
377
  let d = t;
378
378
  if (s !== i) {
379
379
  const y = e[l];
380
- d = M(y) || Array.isArray(y) ? y : isNaN(+o[s + 1]) ? {} : [];
380
+ d = j(y) || Array.isArray(y) ? y : isNaN(+o[s + 1]) ? {} : [];
381
381
  }
382
382
  if (l === "__proto__" || l === "constructor" || l === "prototype")
383
383
  return;
@@ -388,13 +388,13 @@ const Ae = {
388
388
  BLUR: "blur",
389
389
  FOCUS_OUT: "focusout",
390
390
  CHANGE: "change"
391
- }, te = {
391
+ }, re = {
392
392
  onBlur: "onBlur",
393
393
  onChange: "onChange",
394
394
  onSubmit: "onSubmit",
395
395
  onTouched: "onTouched",
396
396
  all: "all"
397
- }, ae = {
397
+ }, le = {
398
398
  max: "max",
399
399
  min: "min",
400
400
  maxLength: "maxLength",
@@ -413,7 +413,7 @@ var er = (e, r, t, s = !0) => {
413
413
  Object.defineProperty(o, n, {
414
414
  get: () => {
415
415
  const i = n;
416
- return r._proxyFormState[i] !== te.all && (r._proxyFormState[i] = !s || te.all), t && (t[i] = !0), e[i];
416
+ return r._proxyFormState[i] !== re.all && (r._proxyFormState[i] = !s || re.all), t && (t[i] = !0), e[i];
417
417
  }
418
418
  });
419
419
  return o;
@@ -445,7 +445,7 @@ function qr(e) {
445
445
  }, [t]), $.useMemo(() => er(i, t, d.current, !1), [i, t]);
446
446
  }
447
447
  var X = (e) => typeof e == "string", Ke = (e, r, t, s, o) => X(e) ? (s && r.watch.add(e), v(t, e, o)) : Array.isArray(e) ? e.map((n) => (s && r.watch.add(n), v(t, n))) : (s && (r.watchAll = !0), t), Je = (e) => Q(e) || !Kt(e);
448
- function re(e, r, t = /* @__PURE__ */ new WeakSet()) {
448
+ function se(e, r, t = /* @__PURE__ */ new WeakSet()) {
449
449
  if (Je(e) || Je(r))
450
450
  return e === r;
451
451
  if (ue(e) && ue(r))
@@ -462,7 +462,7 @@ function re(e, r, t = /* @__PURE__ */ new WeakSet()) {
462
462
  return !1;
463
463
  if (n !== "ref") {
464
464
  const l = r[n];
465
- if (ue(i) && ue(l) || M(i) && M(l) || Array.isArray(i) && Array.isArray(l) ? !re(i, l, t) : i !== l)
465
+ if (ue(i) && ue(l) || j(i) && j(l) || Array.isArray(i) && Array.isArray(l) ? !se(i, l, t) : i !== l)
466
466
  return !1;
467
467
  }
468
468
  }
@@ -481,13 +481,13 @@ function Gr(e) {
481
481
  if (!n) {
482
482
  const E = Ke(s, t._names, k || t._formValues, !1, d.current);
483
483
  if (y.current) {
484
- const j = y.current(E);
485
- re(j, f.current) || (x(j), f.current = j);
484
+ const I = y.current(E);
485
+ se(I, f.current) || (x(I), f.current = I);
486
486
  } else
487
487
  x(E);
488
488
  }
489
489
  }, [t._formValues, t._names, n, s]);
490
- at(() => ((m.current !== t || !re(h.current, s)) && (m.current = t, h.current = s, C()), t._subscribe({
490
+ at(() => ((m.current !== t || !se(h.current, s)) && (m.current = t, h.current = s, C()), t._subscribe({
491
491
  name: s,
492
492
  formState: {
493
493
  values: !0
@@ -500,7 +500,7 @@ function Gr(e) {
500
500
  const A = m.current !== t, S = h.current, z = $.useMemo(() => {
501
501
  if (n)
502
502
  return null;
503
- const k = !A && !re(S, s);
503
+ const k = !A && !se(S, s);
504
504
  return A || k ? _() : null;
505
505
  }, [n, A, s, S, _]);
506
506
  return z !== null ? z : F;
@@ -576,13 +576,13 @@ function Zr(e) {
576
576
  ...m.current.rules,
577
577
  ...J(m.current.disabled) ? { disabled: m.current.disabled } : {}
578
578
  });
579
- const E = (j, U) => {
580
- const Y = v(o._fields, j);
581
- Y && Y._f && (Y._f.mount = U);
579
+ const E = (I, W) => {
580
+ const ee = v(o._fields, I);
581
+ ee && ee._f && (ee._f.mount = W);
582
582
  };
583
583
  if (E(t, !0), z) {
584
- const j = I(v(o._options.defaultValues, t, m.current.defaultValue));
585
- D(o._defaultValues, t, j), B(v(o._formValues, t)) && D(o._formValues, t, j);
584
+ const I = U(v(o._options.defaultValues, t, m.current.defaultValue));
585
+ D(o._defaultValues, t, I), B(v(o._formValues, t)) && D(o._formValues, t, I);
586
586
  }
587
587
  return !l && o.register(t), h.current = t, () => {
588
588
  (l ? z && !o._state.action : z) ? o.unregister(t) : E(t, !1);
@@ -629,14 +629,14 @@ function tr(e, r) {
629
629
  for (const s in e)
630
630
  if (e.hasOwnProperty(s)) {
631
631
  const o = e[s], n = r[s];
632
- if (o && M(o) && n) {
632
+ if (o && j(o) && n) {
633
633
  const i = tr(o, n);
634
- M(i) && (t[s] = i);
634
+ j(i) && (t[s] = i);
635
635
  } else e[s] && (t[s] = n);
636
636
  }
637
637
  return t;
638
638
  }
639
- var G = (e) => M(e) && !Object.keys(e).length, ct = (e) => e.type === "file", se = (e) => typeof e == "function", Ne = (e) => {
639
+ var G = (e) => j(e) && !Object.keys(e).length, ct = (e) => e.type === "file", oe = (e) => typeof e == "function", Ne = (e) => {
640
640
  if (!st)
641
641
  return !1;
642
642
  const r = e ? e.ownerDocument : 0;
@@ -655,18 +655,18 @@ function Jr(e) {
655
655
  return !1;
656
656
  return !0;
657
657
  }
658
- function T(e, r) {
658
+ function M(e, r) {
659
659
  const t = Array.isArray(r) ? r : Pe(r) ? [r] : nt(r), s = t.length === 1 ? e : Kr(e, t), o = t.length - 1, n = t[o];
660
- return s && delete s[n], o !== 0 && (M(s) && G(s) || Array.isArray(s) && Jr(s)) && T(e, t.slice(0, -1)), e;
660
+ return s && delete s[n], o !== 0 && (j(s) && G(s) || Array.isArray(s) && Jr(s)) && M(e, t.slice(0, -1)), e;
661
661
  }
662
662
  var Xr = (e) => {
663
663
  for (const r in e)
664
- if (se(e[r]))
664
+ if (oe(e[r]))
665
665
  return !0;
666
666
  return !1;
667
667
  };
668
668
  function sr(e) {
669
- return Array.isArray(e) || M(e) && !Xr(e);
669
+ return Array.isArray(e) || j(e) && !Xr(e);
670
670
  }
671
671
  function Xe(e, r = {}) {
672
672
  for (const t in e)
@@ -676,7 +676,7 @@ function Xe(e, r = {}) {
676
676
  function me(e, r, t) {
677
677
  t || (t = Xe(r));
678
678
  for (const s in e)
679
- sr(e[s]) ? B(r) || Je(t[s]) ? t[s] = Xe(e[s], Array.isArray(e[s]) ? [] : {}) : me(e[s], Q(r) ? {} : r[s], t[s]) : t[s] = !re(e[s], r[s]);
679
+ sr(e[s]) ? B(r) || Je(t[s]) ? t[s] = Xe(e[s], Array.isArray(e[s]) ? [] : {}) : me(e[s], Q(r) ? {} : r[s], t[s]) : t[s] = !se(e[s], r[s]);
680
680
  return t;
681
681
  }
682
682
  const kt = {
@@ -720,15 +720,15 @@ var Yr = (e, r, t, s) => {
720
720
  fields: o,
721
721
  shouldUseNativeValidation: s
722
722
  };
723
- }, Re = (e) => e instanceof RegExp, ge = (e) => B(e) ? e : Re(e) ? e.source : M(e) ? Re(e.value) ? e.value.source : e.value : e, Et = (e) => ({
724
- isOnSubmit: !e || e === te.onSubmit,
725
- isOnBlur: e === te.onBlur,
726
- isOnChange: e === te.onChange,
727
- isOnAll: e === te.all,
728
- isOnTouch: e === te.onTouched
723
+ }, Re = (e) => e instanceof RegExp, ge = (e) => B(e) ? e : Re(e) ? e.source : j(e) ? Re(e.value) ? e.value.source : e.value : e, Et = (e) => ({
724
+ isOnSubmit: !e || e === re.onSubmit,
725
+ isOnBlur: e === re.onBlur,
726
+ isOnChange: e === re.onChange,
727
+ isOnAll: e === re.all,
728
+ isOnTouch: e === re.onTouched
729
729
  });
730
730
  const At = "AsyncFunction";
731
- var es = (e) => !!e && !!e.validate && !!(se(e.validate) && e.validate.constructor.name === At || M(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === At)), ts = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Nt = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((s) => e.startsWith(s) && /^\.\w+/.test(e.slice(s.length))));
731
+ var es = (e) => !!e && !!e.validate && !!(oe(e.validate) && e.validate.constructor.name === At || j(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === At)), ts = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Nt = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((s) => e.startsWith(s) && /^\.\w+/.test(e.slice(s.length))));
732
732
  const ve = (e, r, t, s) => {
733
733
  for (const o of t || Object.keys(e)) {
734
734
  const n = v(e, o);
@@ -741,7 +741,7 @@ const ve = (e, r, t, s) => {
741
741
  return !0;
742
742
  if (ve(l, r))
743
743
  break;
744
- } else if (M(l) && ve(l, r))
744
+ } else if (j(l) && ve(l, r))
745
745
  break;
746
746
  }
747
747
  }
@@ -777,8 +777,8 @@ function Rt(e, r, t) {
777
777
  var rs = (e, r, t, s) => {
778
778
  t(e);
779
779
  const { name: o, ...n } = e;
780
- return G(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((i) => r[i] === (!s || te.all));
781
- }, ss = (e, r, t) => !e || !r || e === r || pe(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s))), os = (e, r, t, s, o) => o.isOnAll ? !1 : !t && o.isOnTouch ? !(r || e) : (t ? s.isOnBlur : o.isOnBlur) ? !e : (t ? s.isOnChange : o.isOnChange) ? e : !0, ns = (e, r) => !ot(v(e, r)).length && T(e, r), is = (e, r, t) => {
780
+ return G(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((i) => r[i] === (!s || re.all));
781
+ }, ss = (e, r, t) => !e || !r || e === r || pe(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s))), os = (e, r, t, s, o) => o.isOnAll ? !1 : !t && o.isOnTouch ? !(r || e) : (t ? s.isOnBlur : o.isOnBlur) ? !e : (t ? s.isOnChange : o.isOnChange) ? e : !0, ns = (e, r) => !ot(v(e, r)).length && M(e, r), is = (e, r, t) => {
782
782
  const s = pe(v(e, t));
783
783
  return D(s, "root", r[t]), D(e, t, s), e;
784
784
  };
@@ -790,7 +790,7 @@ function Dt(e, r, t = "validate") {
790
790
  ref: r
791
791
  };
792
792
  }
793
- var fe = (e) => M(e) && !Re(e) ? e : {
793
+ var fe = (e) => j(e) && !Re(e) ? e : {
794
794
  value: e,
795
795
  message: ""
796
796
  }, Pt = async (e, r, t, s, o, n) => {
@@ -799,62 +799,62 @@ var fe = (e) => M(e) && !Re(e) ? e : {
799
799
  return {};
800
800
  const z = l ? l[0] : i, k = (N) => {
801
801
  o && z.reportValidity && (z.setCustomValidity(J(N) ? "" : N || ""), z.reportValidity());
802
- }, E = {}, j = ut(i), U = be(i), Y = j || U, W = (C || ct(i)) && B(i.value) && B(S) || Ne(i) && i.value === "" || S === "" || Array.isArray(S) && !S.length, ce = lt.bind(null, _, s, E), oe = (N, P, H, q = ae.maxLength, Z = ae.minLength) => {
803
- const ne = N ? P : H;
802
+ }, E = {}, I = ut(i), W = be(i), ee = I || W, T = (C || ct(i)) && B(i.value) && B(S) || Ne(i) && i.value === "" || S === "" || Array.isArray(S) && !S.length, te = lt.bind(null, _, s, E), ne = (N, P, H, q = le.maxLength, Z = le.minLength) => {
803
+ const ie = N ? P : H;
804
804
  E[_] = {
805
805
  type: N ? q : Z,
806
- message: ne,
806
+ message: ie,
807
807
  ref: i,
808
- ...ce(N ? q : Z, ne)
808
+ ...te(N ? q : Z, ie)
809
809
  };
810
810
  };
811
- if (n ? !Array.isArray(S) || !S.length : d && (!Y && (W || Q(S)) || J(S) && !S || U && !or(l).isValid || j && !ir(l).isValid)) {
811
+ if (n ? !Array.isArray(S) || !S.length : d && (!ee && (T || Q(S)) || J(S) && !S || W && !or(l).isValid || I && !ir(l).isValid)) {
812
812
  const { value: N, message: P } = X(d) ? { value: !!d, message: d } : fe(d);
813
813
  if (N && (E[_] = {
814
- type: ae.required,
814
+ type: le.required,
815
815
  message: P,
816
816
  ref: z,
817
- ...ce(ae.required, P)
817
+ ...te(le.required, P)
818
818
  }, !s))
819
819
  return k(P), E;
820
820
  }
821
- if (!W && (!Q(m) || !Q(h))) {
821
+ if (!T && (!Q(m) || !Q(h))) {
822
822
  let N, P;
823
823
  const H = fe(h), q = fe(m);
824
824
  if (!Q(S) && !isNaN(S)) {
825
825
  const Z = i.valueAsNumber || S && +S;
826
826
  Q(H.value) || (N = Z > H.value), Q(q.value) || (P = Z < q.value);
827
827
  } else {
828
- const Z = i.valueAsDate || new Date(S), ne = (Fe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Fe), he = i.type == "time", de = i.type == "week";
829
- X(H.value) && S && (N = he ? ne(S) > ne(H.value) : de ? S > H.value : Z > new Date(H.value)), X(q.value) && S && (P = he ? ne(S) < ne(q.value) : de ? S < q.value : Z < new Date(q.value));
828
+ const Z = i.valueAsDate || new Date(S), ie = (Fe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Fe), he = i.type == "time", de = i.type == "week";
829
+ X(H.value) && S && (N = he ? ie(S) > ie(H.value) : de ? S > H.value : Z > new Date(H.value)), X(q.value) && S && (P = he ? ie(S) < ie(q.value) : de ? S < q.value : Z < new Date(q.value));
830
830
  }
831
- if ((N || P) && (oe(!!N, H.message, q.message, ae.max, ae.min), !s))
831
+ if ((N || P) && (ne(!!N, H.message, q.message, le.max, le.min), !s))
832
832
  return k(E[_].message), E;
833
833
  }
834
- if ((y || f) && !W && (X(S) || n && Array.isArray(S))) {
834
+ if ((y || f) && !T && (X(S) || n && Array.isArray(S))) {
835
835
  const N = fe(y), P = fe(f), H = !Q(N.value) && S.length > +N.value, q = !Q(P.value) && S.length < +P.value;
836
- if ((H || q) && (oe(H, N.message, P.message), !s))
836
+ if ((H || q) && (ne(H, N.message, P.message), !s))
837
837
  return k(E[_].message), E;
838
838
  }
839
- if (F && !W && X(S)) {
839
+ if (F && !T && X(S)) {
840
840
  const { value: N, message: P } = fe(F);
841
841
  if (Re(N) && !S.match(N) && (E[_] = {
842
- type: ae.pattern,
842
+ type: le.pattern,
843
843
  message: P,
844
844
  ref: i,
845
- ...ce(ae.pattern, P)
845
+ ...te(le.pattern, P)
846
846
  }, !s))
847
847
  return k(P), E;
848
848
  }
849
849
  if (x) {
850
- if (se(x)) {
850
+ if (oe(x)) {
851
851
  const N = await x(S, t), P = Dt(N, z);
852
852
  if (P && (E[_] = {
853
853
  ...P,
854
- ...ce(ae.validate, P.message)
854
+ ...te(le.validate, P.message)
855
855
  }, !s))
856
856
  return k(P.message), E;
857
- } else if (M(x)) {
857
+ } else if (j(x)) {
858
858
  let N = {};
859
859
  for (const P in x) {
860
860
  if (!G(N) && !s)
@@ -862,7 +862,7 @@ var fe = (e) => M(e) && !Re(e) ? e : {
862
862
  const H = Dt(await x[P](S, t), z, P);
863
863
  H && (N = {
864
864
  ...H,
865
- ...ce(P, H.message)
865
+ ...te(P, H.message)
866
866
  }, k(H.message), s && (E[_] = N));
867
867
  }
868
868
  if (!G(N) && (E[_] = {
@@ -875,8 +875,8 @@ var fe = (e) => M(e) && !Re(e) ? e : {
875
875
  return k(!0), E;
876
876
  };
877
877
  const as = {
878
- mode: te.onSubmit,
879
- reValidateMode: te.onChange,
878
+ mode: re.onSubmit,
879
+ reValidateMode: re.onChange,
880
880
  shouldFocusError: !0
881
881
  };
882
882
  function ls(e = {}) {
@@ -887,7 +887,7 @@ function ls(e = {}) {
887
887
  submitCount: 0,
888
888
  isDirty: !1,
889
889
  isReady: !1,
890
- isLoading: se(r.defaultValues),
890
+ isLoading: oe(r.defaultValues),
891
891
  isValidating: !1,
892
892
  isSubmitted: !1,
893
893
  isSubmitting: !1,
@@ -898,7 +898,7 @@ function ls(e = {}) {
898
898
  validatingFields: {},
899
899
  errors: r.errors || {},
900
900
  disabled: r.disabled || !1
901
- }, s = {}, o = M(r.defaultValues) || M(r.values) ? I(r.defaultValues || r.values) || {} : {}, n = r.shouldUnregister ? {} : I(o), i = {
901
+ }, s = {}, o = j(r.defaultValues) || j(r.values) ? U(r.defaultValues || r.values) || {} : {}, n = r.shouldUnregister ? {} : U(o), i = {
902
902
  action: !1,
903
903
  mount: !1,
904
904
  watch: !1
@@ -924,18 +924,18 @@ function ls(e = {}) {
924
924
  const h = {
925
925
  array: wt(),
926
926
  state: wt()
927
- }, F = r.criteriaMode === te.all, x = (a) => (c) => {
927
+ }, F = r.criteriaMode === re.all, x = (a) => (c) => {
928
928
  clearTimeout(y), y = setTimeout(a, c);
929
929
  }, _ = async (a) => {
930
930
  if (!r.disabled && (f.isValid || m.isValid || a)) {
931
- const c = r.resolver ? G((await U()).errors) : await W(s, !0);
931
+ const c = r.resolver ? G((await W()).errors) : await T(s, !0);
932
932
  c !== t.isValid && h.state.next({
933
933
  isValid: c
934
934
  });
935
935
  }
936
936
  }, C = (a, c) => {
937
937
  !r.disabled && (f.isValidating || f.validatingFields || m.isValidating || m.validatingFields) && ((a || Array.from(l.mount)).forEach((u) => {
938
- u && (c ? D(t.validatingFields, u, c) : T(t.validatingFields, u));
938
+ u && (c ? D(t.validatingFields, u, c) : M(t.validatingFields, u));
939
939
  }), h.state.next({
940
940
  validatingFields: t.validatingFields,
941
941
  isValidating: !G(t.validatingFields)
@@ -956,7 +956,7 @@ function ls(e = {}) {
956
956
  }
957
957
  (f.dirtyFields || m.dirtyFields) && (t.dirtyFields = me(o, n)), h.state.next({
958
958
  name: a,
959
- isDirty: oe(a, c),
959
+ isDirty: ne(a, c),
960
960
  dirtyFields: t.dirtyFields,
961
961
  errors: t.errors,
962
962
  isValid: t.isValid
@@ -985,9 +985,9 @@ function ls(e = {}) {
985
985
  };
986
986
  if (!r.disabled) {
987
987
  if (!u || b) {
988
- (f.isDirty || m.isDirty) && (w = t.isDirty, t.isDirty = R.isDirty = oe(), g = w !== R.isDirty);
989
- const L = re(v(o, a), c);
990
- w = !!v(t.dirtyFields, a), L ? T(t.dirtyFields, a) : D(t.dirtyFields, a, !0), R.dirtyFields = t.dirtyFields, g = g || (f.dirtyFields || m.dirtyFields) && w !== !L;
988
+ (f.isDirty || m.isDirty) && (w = t.isDirty, t.isDirty = R.isDirty = ne(), g = w !== R.isDirty);
989
+ const L = se(v(o, a), c);
990
+ w = !!v(t.dirtyFields, a), L ? M(t.dirtyFields, a) : D(t.dirtyFields, a, !0), R.dirtyFields = t.dirtyFields, g = g || (f.dirtyFields || m.dirtyFields) && w !== !L;
991
991
  }
992
992
  if (u) {
993
993
  const L = v(t.touchedFields, a);
@@ -996,9 +996,9 @@ function ls(e = {}) {
996
996
  g && p && h.state.next(R);
997
997
  }
998
998
  return g ? R : {};
999
- }, j = (a, c, u, b) => {
999
+ }, I = (a, c, u, b) => {
1000
1000
  const p = v(t.errors, a), g = (f.isValid || m.isValid) && J(c) && t.isValid !== c;
1001
- if (r.delayError && u ? (d = x(() => S(a, u)), d(r.delayError)) : (clearTimeout(y), d = null, u ? D(t.errors, a, u) : T(t.errors, a)), (u ? !re(p, u) : p) || !G(b) || g) {
1001
+ if (r.delayError && u ? (d = x(() => S(a, u)), d(r.delayError)) : (clearTimeout(y), d = null, u ? D(t.errors, a, u) : M(t.errors, a)), (u ? !se(p, u) : p) || !G(b) || g) {
1002
1002
  const w = {
1003
1003
  ...b,
1004
1004
  ...g && J(c) ? { isValid: c } : {},
@@ -1010,21 +1010,21 @@ function ls(e = {}) {
1010
1010
  ...w
1011
1011
  }, h.state.next(w);
1012
1012
  }
1013
- }, U = async (a) => {
1013
+ }, W = async (a) => {
1014
1014
  C(a, !0);
1015
1015
  const c = await r.resolver(n, r.context, Yr(a || l.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
1016
1016
  return C(a), c;
1017
- }, Y = async (a) => {
1018
- const { errors: c } = await U(a);
1017
+ }, ee = async (a) => {
1018
+ const { errors: c } = await W(a);
1019
1019
  if (a)
1020
1020
  for (const u of a) {
1021
1021
  const b = v(c, u);
1022
- b ? D(t.errors, u, b) : T(t.errors, u);
1022
+ b ? D(t.errors, u, b) : M(t.errors, u);
1023
1023
  }
1024
1024
  else
1025
1025
  t.errors = c;
1026
1026
  return c;
1027
- }, W = async (a, c, u = {
1027
+ }, T = async (a, c, u = {
1028
1028
  valid: !0
1029
1029
  }) => {
1030
1030
  for (const b in a) {
@@ -1034,22 +1034,22 @@ function ls(e = {}) {
1034
1034
  if (g) {
1035
1035
  const R = l.array.has(g.name), L = p._f && es(p._f);
1036
1036
  L && f.validatingFields && C([g.name], !0);
1037
- const ee = await Pt(p, l.disabled, n, F, r.shouldUseNativeValidation && !c, R);
1038
- if (L && f.validatingFields && C([g.name]), ee[g.name] && (u.valid = !1, c))
1037
+ const Y = await Pt(p, l.disabled, n, F, r.shouldUseNativeValidation && !c, R);
1038
+ if (L && f.validatingFields && C([g.name]), Y[g.name] && (u.valid = !1, c))
1039
1039
  break;
1040
- !c && (v(ee, g.name) ? R ? is(t.errors, ee, g.name) : D(t.errors, g.name, ee[g.name]) : T(t.errors, g.name));
1040
+ !c && (v(Y, g.name) ? R ? is(t.errors, Y, g.name) : D(t.errors, g.name, Y[g.name]) : M(t.errors, g.name));
1041
1041
  }
1042
- !G(w) && await W(w, c, u);
1042
+ !G(w) && await T(w, c, u);
1043
1043
  }
1044
1044
  }
1045
1045
  return u.valid;
1046
- }, ce = () => {
1046
+ }, te = () => {
1047
1047
  for (const a of l.unMount) {
1048
1048
  const c = v(s, a);
1049
1049
  c && (c._f.refs ? c._f.refs.every((u) => !je(u)) : !je(c._f.ref)) && Le(a);
1050
1050
  }
1051
1051
  l.unMount = /* @__PURE__ */ new Set();
1052
- }, oe = (a, c) => !r.disabled && (a && c && D(n, a, c), !re(Fe(), o)), N = (a, c, u) => Ke(a, l, {
1052
+ }, ne = (a, c) => !r.disabled && (a && c && D(n, a, c), !se(Fe(), o)), N = (a, c, u) => Ke(a, l, {
1053
1053
  ...i.mount ? n : B(c) ? o : X(a) ? { [a]: c } : c
1054
1054
  }, u, c), P = (a) => ot(v(i.mount ? n : o, a, r.shouldUnregister ? v(o, a, []) : [])), H = (a, c, u = {}) => {
1055
1055
  const b = v(s, a);
@@ -1060,7 +1060,7 @@ function ls(e = {}) {
1060
1060
  (!w.defaultChecked || !w.disabled) && (Array.isArray(p) ? w.checked = !!p.find((R) => R === w.value) : w.checked = p === w.value || !!p);
1061
1061
  }) : g.refs.forEach((w) => w.checked = w.value === p) : ct(g.ref) ? g.ref.value = "" : (g.ref.value = p, g.ref.type || h.state.next({
1062
1062
  name: a,
1063
- values: I(n)
1063
+ values: U(n)
1064
1064
  })));
1065
1065
  }
1066
1066
  (u.shouldDirty || u.shouldTouch) && E(a, p, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && de(a);
@@ -1069,48 +1069,48 @@ function ls(e = {}) {
1069
1069
  if (!c.hasOwnProperty(b))
1070
1070
  return;
1071
1071
  const p = c[b], g = a + "." + b, w = v(s, g);
1072
- (l.array.has(a) || M(p) || w && !w._f) && !ue(p) ? q(g, p, u) : H(g, p, u);
1072
+ (l.array.has(a) || j(p) || w && !w._f) && !ue(p) ? q(g, p, u) : H(g, p, u);
1073
1073
  }
1074
1074
  }, Z = (a, c, u = {}) => {
1075
- const b = v(s, a), p = l.array.has(a), g = I(c);
1075
+ const b = v(s, a), p = l.array.has(a), g = U(c);
1076
1076
  D(n, a, g), p ? (h.array.next({
1077
1077
  name: a,
1078
- values: I(n)
1078
+ values: U(n)
1079
1079
  }), (f.isDirty || f.dirtyFields || m.isDirty || m.dirtyFields) && u.shouldDirty && h.state.next({
1080
1080
  name: a,
1081
1081
  dirtyFields: me(o, n),
1082
- isDirty: oe(a, g)
1082
+ isDirty: ne(a, g)
1083
1083
  })) : b && !b._f && !Q(g) ? q(a, g, u) : H(a, g, u), Nt(a, l) && h.state.next({ ...t, name: a }), h.state.next({
1084
1084
  name: i.mount ? a : void 0,
1085
- values: I(n)
1085
+ values: U(n)
1086
1086
  });
1087
- }, ne = async (a) => {
1087
+ }, ie = async (a) => {
1088
1088
  i.mount = !0;
1089
1089
  const c = a.target;
1090
1090
  let u = c.name, b = !0;
1091
1091
  const p = v(s, u), g = (L) => {
1092
- b = Number.isNaN(L) || ue(L) && isNaN(L.getTime()) || re(L, v(n, u, L));
1092
+ b = Number.isNaN(L) || ue(L) && isNaN(L.getTime()) || se(L, v(n, u, L));
1093
1093
  }, w = Et(r.mode), R = Et(r.reValidateMode);
1094
1094
  if (p) {
1095
- let L, ee;
1096
- const xe = c.type ? $t(p._f) : Jt(a), le = a.type === Ae.BLUR || a.type === Ae.FOCUS_OUT, Fr = !ts(p._f) && !r.resolver && !v(t.errors, u) && !p._f.deps || os(le, v(t.touchedFields, u), t.isSubmitted, R, w), He = Nt(u, l, le);
1097
- D(n, u, xe), le ? (!c || !c.readOnly) && (p._f.onBlur && p._f.onBlur(a), d && d(0)) : p._f.onChange && p._f.onChange(a);
1098
- const Te = E(u, xe, le), xr = !G(Te) || He;
1099
- if (!le && h.state.next({
1095
+ let L, Y;
1096
+ const xe = c.type ? $t(p._f) : Jt(a), ce = a.type === Ae.BLUR || a.type === Ae.FOCUS_OUT, Fr = !ts(p._f) && !r.resolver && !v(t.errors, u) && !p._f.deps || os(ce, v(t.touchedFields, u), t.isSubmitted, R, w), He = Nt(u, l, ce);
1097
+ D(n, u, xe), ce ? (!c || !c.readOnly) && (p._f.onBlur && p._f.onBlur(a), d && d(0)) : p._f.onChange && p._f.onChange(a);
1098
+ const Te = E(u, xe, ce), xr = !G(Te) || He;
1099
+ if (!ce && h.state.next({
1100
1100
  name: u,
1101
1101
  type: a.type,
1102
- values: I(n)
1102
+ values: U(n)
1103
1103
  }), Fr)
1104
- return (f.isValid || m.isValid) && (r.mode === "onBlur" ? le && _() : le || _()), xr && h.state.next({ name: u, ...He ? {} : Te });
1105
- if (!le && He && h.state.next({ ...t }), r.resolver) {
1106
- const { errors: vt } = await U([u]);
1104
+ return (f.isValid || m.isValid) && (r.mode === "onBlur" ? ce && _() : ce || _()), xr && h.state.next({ name: u, ...He ? {} : Te });
1105
+ if (!ce && He && h.state.next({ ...t }), r.resolver) {
1106
+ const { errors: vt } = await W([u]);
1107
1107
  if (g(xe), b) {
1108
1108
  const Vr = Rt(t.errors, s, u), bt = Rt(vt, s, Vr.name || u);
1109
- L = bt.error, u = bt.name, ee = G(vt);
1109
+ L = bt.error, u = bt.name, Y = G(vt);
1110
1110
  }
1111
1111
  } else
1112
- C([u], !0), L = (await Pt(p, l.disabled, n, F, r.shouldUseNativeValidation))[u], C([u]), g(xe), b && (L ? ee = !1 : (f.isValid || m.isValid) && (ee = await W(s, !0)));
1113
- b && (p._f.deps && (!Array.isArray(p._f.deps) || p._f.deps.length > 0) && de(p._f.deps), j(u, ee, L, Te));
1112
+ C([u], !0), L = (await Pt(p, l.disabled, n, F, r.shouldUseNativeValidation))[u], C([u]), g(xe), b && (L ? Y = !1 : (f.isValid || m.isValid) && (Y = await T(s, !0)));
1113
+ b && (p._f.deps && (!Array.isArray(p._f.deps) || p._f.deps.length > 0) && de(p._f.deps), I(u, Y, L, Te));
1114
1114
  }
1115
1115
  }, he = (a, c) => {
1116
1116
  if (v(t.errors, c) && a.focus)
@@ -1119,12 +1119,12 @@ function ls(e = {}) {
1119
1119
  let u, b;
1120
1120
  const p = pe(a);
1121
1121
  if (r.resolver) {
1122
- const g = await Y(B(a) ? a : p);
1122
+ const g = await ee(B(a) ? a : p);
1123
1123
  u = G(g), b = a ? !p.some((w) => v(g, w)) : u;
1124
1124
  } else a ? (b = (await Promise.all(p.map(async (g) => {
1125
1125
  const w = v(s, g);
1126
- return await W(w && w._f ? { [g]: w } : w);
1127
- }))).every(Boolean), !(!b && !t.isValid) && _()) : b = u = await W(s);
1126
+ return await T(w && w._f ? { [g]: w } : w);
1127
+ }))).every(Boolean), !(!b && !t.isValid) && _()) : b = u = await T(s);
1128
1128
  return h.state.next({
1129
1129
  ...!X(a) || (f.isValid || m.isValid) && u !== t.isValid ? {} : { name: a },
1130
1130
  ...r.resolver || !a ? { isValid: u } : {},
@@ -1142,7 +1142,7 @@ function ls(e = {}) {
1142
1142
  isValidating: !!v(t.validatingFields, a),
1143
1143
  isTouched: !!v((c || t).touchedFields, a)
1144
1144
  }), hr = (a) => {
1145
- a && pe(a).forEach((c) => T(t.errors, c)), h.state.next({
1145
+ a && pe(a).forEach((c) => M(t.errors, c)), h.state.next({
1146
1146
  errors: a ? t.errors : {}
1147
1147
  });
1148
1148
  }, ft = (a, c, u) => {
@@ -1156,7 +1156,7 @@ function ls(e = {}) {
1156
1156
  errors: t.errors,
1157
1157
  isValid: !1
1158
1158
  }), u && u.shouldFocus && b && b.focus && b.focus();
1159
- }, gr = (a, c) => se(a) ? h.state.subscribe({
1159
+ }, gr = (a, c) => oe(a) ? h.state.subscribe({
1160
1160
  next: (u) => "values" in u && a(N(void 0, c), u)
1161
1161
  }) : N(a, c, !0), yt = (a) => h.state.subscribe({
1162
1162
  next: (c) => {
@@ -1175,12 +1175,12 @@ function ls(e = {}) {
1175
1175
  formState: m
1176
1176
  })), Le = (a, c = {}) => {
1177
1177
  for (const u of a ? pe(a) : l.mount)
1178
- l.mount.delete(u), l.array.delete(u), c.keepValue || (T(s, u), T(n, u)), !c.keepError && T(t.errors, u), !c.keepDirty && T(t.dirtyFields, u), !c.keepTouched && T(t.touchedFields, u), !c.keepIsValidating && T(t.validatingFields, u), !r.shouldUnregister && !c.keepDefaultValue && T(o, u);
1178
+ l.mount.delete(u), l.array.delete(u), c.keepValue || (M(s, u), M(n, u)), !c.keepError && M(t.errors, u), !c.keepDirty && M(t.dirtyFields, u), !c.keepTouched && M(t.touchedFields, u), !c.keepIsValidating && M(t.validatingFields, u), !r.shouldUnregister && !c.keepDefaultValue && M(o, u);
1179
1179
  h.state.next({
1180
- values: I(n)
1180
+ values: U(n)
1181
1181
  }), h.state.next({
1182
1182
  ...t,
1183
- ...c.keepDirty ? { isDirty: oe() } : {}
1183
+ ...c.keepDirty ? { isDirty: ne() } : {}
1184
1184
  }), !c.keepIsValid && _();
1185
1185
  }, mt = ({ disabled: a, name: c }) => {
1186
1186
  (J(a) && i.mount || a || l.disabled.has(c)) && (a ? l.disabled.add(c) : l.disabled.delete(c));
@@ -1209,8 +1209,8 @@ function ls(e = {}) {
1209
1209
  pattern: ge(c.pattern)
1210
1210
  } : {},
1211
1211
  name: a,
1212
- onChange: ne,
1213
- onBlur: ne,
1212
+ onChange: ie,
1213
+ onBlur: ie,
1214
1214
  ref: (p) => {
1215
1215
  if (p) {
1216
1216
  Be(a, c), u = v(s, a);
@@ -1244,18 +1244,18 @@ function ls(e = {}) {
1244
1244
  }, ht = (a, c) => async (u) => {
1245
1245
  let b;
1246
1246
  u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
1247
- let p = I(n);
1247
+ let p = U(n);
1248
1248
  if (h.state.next({
1249
1249
  isSubmitting: !0
1250
1250
  }), r.resolver) {
1251
- const { errors: g, values: w } = await U();
1252
- t.errors = g, p = I(w);
1251
+ const { errors: g, values: w } = await W();
1252
+ t.errors = g, p = U(w);
1253
1253
  } else
1254
- await W(s);
1254
+ await T(s);
1255
1255
  if (l.disabled.size)
1256
1256
  for (const g of l.disabled)
1257
- T(p, g);
1258
- if (T(t.errors, "root"), G(t.errors)) {
1257
+ M(p, g);
1258
+ if (M(t.errors, "root"), G(t.errors)) {
1259
1259
  h.state.next({
1260
1260
  errors: {}
1261
1261
  });
@@ -1275,9 +1275,9 @@ function ls(e = {}) {
1275
1275
  }), b)
1276
1276
  throw b;
1277
1277
  }, vr = (a, c = {}) => {
1278
- v(s, a) && (B(c.defaultValue) ? Z(a, I(v(o, a))) : (Z(a, c.defaultValue), D(o, a, I(c.defaultValue))), c.keepTouched || T(t.touchedFields, a), c.keepDirty || (T(t.dirtyFields, a), t.isDirty = c.defaultValue ? oe(a, I(v(o, a))) : oe()), c.keepError || (T(t.errors, a), f.isValid && _()), h.state.next({ ...t }));
1278
+ v(s, a) && (B(c.defaultValue) ? Z(a, U(v(o, a))) : (Z(a, c.defaultValue), D(o, a, U(c.defaultValue))), c.keepTouched || M(t.touchedFields, a), c.keepDirty || (M(t.dirtyFields, a), t.isDirty = c.defaultValue ? ne(a, U(v(o, a))) : ne()), c.keepError || (M(t.errors, a), f.isValid && _()), h.state.next({ ...t }));
1279
1279
  }, gt = (a, c = {}) => {
1280
- const u = a ? I(a) : o, b = I(u), p = G(a), g = p ? o : b;
1280
+ const u = a ? U(a) : o, b = U(u), p = G(a), g = p ? o : b;
1281
1281
  if (c.keepDefaultValues || (o = u), !c.keepValues) {
1282
1282
  if (c.keepDirtyValues) {
1283
1283
  const w = /* @__PURE__ */ new Set([
@@ -1293,9 +1293,9 @@ function ls(e = {}) {
1293
1293
  if (R && R._f) {
1294
1294
  const L = Array.isArray(R._f.refs) ? R._f.refs[0] : R._f.ref;
1295
1295
  if (Ne(L)) {
1296
- const ee = L.closest("form");
1297
- if (ee) {
1298
- ee.reset();
1296
+ const Y = L.closest("form");
1297
+ if (Y) {
1298
+ Y.reset();
1299
1299
  break;
1300
1300
  }
1301
1301
  }
@@ -1307,7 +1307,7 @@ function ls(e = {}) {
1307
1307
  else
1308
1308
  s = {};
1309
1309
  }
1310
- n = r.shouldUnregister ? c.keepDefaultValues ? I(o) : {} : I(g), h.array.next({
1310
+ n = r.shouldUnregister ? c.keepDefaultValues ? U(o) : {} : U(g), h.array.next({
1311
1311
  values: { ...g }
1312
1312
  }), h.state.next({
1313
1313
  values: { ...g }
@@ -1323,7 +1323,7 @@ function ls(e = {}) {
1323
1323
  focus: ""
1324
1324
  }, i.mount = !f.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !r.shouldUnregister && !G(g), i.watch = !!r.shouldUnregister, h.state.next({
1325
1325
  submitCount: c.keepSubmitCount ? t.submitCount : 0,
1326
- isDirty: p ? !1 : c.keepDirty ? t.isDirty : !!(c.keepDefaultValues && !re(a, o)),
1326
+ isDirty: p ? !1 : c.keepDirty ? t.isDirty : !!(c.keepDefaultValues && !se(a, o)),
1327
1327
  isSubmitted: c.keepIsSubmitted ? t.isSubmitted : !1,
1328
1328
  dirtyFields: p ? {} : c.keepDirtyValues ? c.keepDefaultValues && n ? me(o, n) : t.dirtyFields : c.keepDefaultValues && a ? me(o, a) : c.keepDirty ? t.dirtyFields : {},
1329
1329
  touchedFields: c.keepTouched ? t.touchedFields : {},
@@ -1332,11 +1332,11 @@ function ls(e = {}) {
1332
1332
  isSubmitting: !1,
1333
1333
  defaultValues: o
1334
1334
  });
1335
- }, _t = (a, c) => gt(se(a) ? a(n) : a, c), br = (a, c = {}) => {
1335
+ }, _t = (a, c) => gt(oe(a) ? a(n) : a, c), br = (a, c = {}) => {
1336
1336
  const u = v(s, a), b = u && u._f;
1337
1337
  if (b) {
1338
1338
  const p = b.refs ? b.refs[0] : b.ref;
1339
- p.focus && (p.focus(), c.shouldSelect && se(p.select) && p.select());
1339
+ p.focus && (p.focus(), c.shouldSelect && oe(p.select) && p.select());
1340
1340
  }
1341
1341
  }, Sr = (a) => {
1342
1342
  t = {
@@ -1351,22 +1351,22 @@ function ls(e = {}) {
1351
1351
  handleSubmit: ht,
1352
1352
  setError: ft,
1353
1353
  _subscribe: yt,
1354
- _runSchema: U,
1354
+ _runSchema: W,
1355
1355
  _focusError: Oe,
1356
1356
  _getWatch: N,
1357
- _getDirty: oe,
1357
+ _getDirty: ne,
1358
1358
  _setValid: _,
1359
1359
  _setFieldArray: A,
1360
1360
  _setDisabledField: mt,
1361
1361
  _setErrors: z,
1362
1362
  _getFieldArray: P,
1363
1363
  _reset: gt,
1364
- _resetDefaultValues: () => se(r.defaultValues) && r.defaultValues().then((a) => {
1364
+ _resetDefaultValues: () => oe(r.defaultValues) && r.defaultValues().then((a) => {
1365
1365
  _t(a, r.resetOptions), h.state.next({
1366
1366
  isLoading: !1
1367
1367
  });
1368
1368
  }),
1369
- _removeUnmounted: ce,
1369
+ _removeUnmounted: te,
1370
1370
  _disableForm: pr,
1371
1371
  _subjects: h,
1372
1372
  _proxyFormState: f,
@@ -1428,7 +1428,7 @@ function cs(e = {}) {
1428
1428
  const r = $.useRef(void 0), t = $.useRef(void 0), [s, o] = $.useState({
1429
1429
  isDirty: !1,
1430
1430
  isValidating: !1,
1431
- isLoading: se(e.defaultValues),
1431
+ isLoading: oe(e.defaultValues),
1432
1432
  isSubmitted: !1,
1433
1433
  isSubmitting: !1,
1434
1434
  isSubmitSuccessful: !1,
@@ -1440,14 +1440,14 @@ function cs(e = {}) {
1440
1440
  errors: e.errors || {},
1441
1441
  disabled: e.disabled || !1,
1442
1442
  isReady: !1,
1443
- defaultValues: se(e.defaultValues) ? void 0 : e.defaultValues
1443
+ defaultValues: oe(e.defaultValues) ? void 0 : e.defaultValues
1444
1444
  });
1445
1445
  if (!r.current)
1446
1446
  if (e.formControl)
1447
1447
  r.current = {
1448
1448
  ...e.formControl,
1449
1449
  formState: s
1450
- }, e.defaultValues && !se(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
1450
+ }, e.defaultValues && !oe(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
1451
1451
  else {
1452
1452
  const { formControl: i, ...l } = ls(e);
1453
1453
  r.current = {
@@ -1482,7 +1482,7 @@ function cs(e = {}) {
1482
1482
  });
1483
1483
  }
1484
1484
  }, [n, s.isDirty]), $.useEffect(() => {
1485
- e.values && !re(e.values, t.current) ? (n._reset(e.values, {
1485
+ e.values && !se(e.values, t.current) ? (n._reset(e.values, {
1486
1486
  keepFieldsRef: !0,
1487
1487
  ...n._options.resetOptions
1488
1488
  }), t.current = e.values, o((i) => ({ ...i }))) : n._resetDefaultValues();
@@ -2251,8 +2251,8 @@ const Zs = "Radio-module__container___AQxhk", Qs = "Radio-module__svg___zl5kF",
2251
2251
  const h = O(), F = n || Qt(), x = h.colors.error, _ = s ? x : e || h.colors.primary, C = Js({
2252
2252
  color: _,
2253
2253
  disabled: t
2254
- }), A = (U) => {
2255
- t || i(U);
2254
+ }), A = (W) => {
2255
+ t || i(W);
2256
2256
  }, S = {
2257
2257
  cursor: C.cursor,
2258
2258
  fontSize: h.fonts.size,
@@ -2267,8 +2267,8 @@ const Zs = "Radio-module__container___AQxhk", Qs = "Radio-module__svg___zl5kF",
2267
2267
  stroke: C.radioColor
2268
2268
  }, E = {
2269
2269
  fill: C.radioColor
2270
- }, j = [qe.container, y].filter(Boolean).join(" ");
2271
- return /* @__PURE__ */ K("div", { ...m, className: j, style: S, children: [
2270
+ }, I = [qe.container, y].filter(Boolean).join(" ");
2271
+ return /* @__PURE__ */ K("div", { ...m, className: I, style: S, children: [
2272
2272
  /* @__PURE__ */ V(
2273
2273
  "input",
2274
2274
  {
@@ -2276,7 +2276,7 @@ const Zs = "Radio-module__container___AQxhk", Qs = "Radio-module__svg___zl5kF",
2276
2276
  checked: r,
2277
2277
  disabled: t,
2278
2278
  name: o,
2279
- onChange: (U) => A({ target: { checked: U.target.checked, name: o, type: "radio" } }),
2279
+ onChange: (W) => A({ target: { checked: W.target.checked, name: o, type: "radio" } }),
2280
2280
  style: { display: "none" },
2281
2281
  type: "radio"
2282
2282
  }
@@ -2426,7 +2426,7 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2426
2426
  backgroundColor: y,
2427
2427
  color: f
2428
2428
  };
2429
- }, ie = (e) => {
2429
+ }, ae = (e) => {
2430
2430
  const r = typeof window < "u" && typeof window.matchMedia == "function";
2431
2431
  return zr((n) => {
2432
2432
  if (!r) return () => {
@@ -2456,7 +2456,7 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2456
2456
  // Element-specific props
2457
2457
  headerProps: x
2458
2458
  }) => {
2459
- const _ = O(), C = f || _.breakpoints.sm, { maxWidth: A, unit: S } = Ee(C), z = ie(`(max-width: ${A}${S})`), k = io({
2459
+ const _ = O(), C = f || _.breakpoints.sm, { maxWidth: A, unit: S } = Ee(C), z = ae(`(max-width: ${A}${S})`), k = io({
2460
2460
  isSmallScreen: z,
2461
2461
  maxWidth: t,
2462
2462
  minWidth: s,
@@ -2535,7 +2535,7 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2535
2535
  // Element-specific props
2536
2536
  navProps: y
2537
2537
  }) => {
2538
- const [f, m] = tt(!1), h = St(null), F = St(null), _ = { ...O().breakpoints, ...n }, { maxWidth: C, unit: A } = Ee(_.md), { maxWidth: S, unit: z } = Ee(_.sm), k = ie(`(max-width: ${C}${A})`), E = ie(`(max-width: ${S}${z})`), j = yo({
2538
+ const [f, m] = tt(!1), h = St(null), F = St(null), _ = { ...O().breakpoints, ...n }, { maxWidth: C, unit: A } = Ee(_.md), { maxWidth: S, unit: z } = Ee(_.sm), k = ae(`(max-width: ${C}${A})`), E = ae(`(max-width: ${S}${z})`), I = yo({
2539
2539
  isMobile: k,
2540
2540
  isCompact: E,
2541
2541
  mobileBackground: e,
@@ -2545,19 +2545,22 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2545
2545
  mobileButtonHoverColor: o
2546
2546
  });
2547
2547
  Wt(() => {
2548
- const Y = (W) => {
2549
- !F.current || F.current.contains(W.target) || h.current && h.current.contains(W.target) || m(!1);
2548
+ const T = (te) => {
2549
+ !F.current || F.current.contains(te.target) || h.current && h.current.contains(te.target) || m(!1);
2550
2550
  };
2551
- return document.addEventListener("mousedown", Y), () => {
2552
- document.removeEventListener("mousedown", Y);
2551
+ return document.addEventListener("mousedown", T), () => {
2552
+ document.removeEventListener("mousedown", T);
2553
2553
  };
2554
2554
  }, [h, F, m]);
2555
- const U = [
2555
+ const W = [
2556
2556
  ze.nav,
2557
2557
  k ? ze.navMobile : ze.navDesktop,
2558
2558
  k && f ? ze.open : "",
2559
2559
  l
2560
- ].filter(Boolean).join(" ");
2560
+ ].filter(Boolean).join(" "), ee = (T) => {
2561
+ if (!k) return;
2562
+ T.target.closest("a, button") && m(!1);
2563
+ };
2561
2564
  return /* @__PURE__ */ K(et, { children: [
2562
2565
  /* @__PURE__ */ V(
2563
2566
  so,
@@ -2574,8 +2577,9 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2574
2577
  {
2575
2578
  ...y,
2576
2579
  ref: F,
2577
- className: U,
2578
- style: { ...j, ...d },
2580
+ className: W,
2581
+ style: { ...I, ...d },
2582
+ onClickCapture: ee,
2579
2583
  children: typeof i == "function" ? i({ setOpen: m }) : i
2580
2584
  }
2581
2585
  )
@@ -2690,7 +2694,7 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2690
2694
  // Element-specific props
2691
2695
  sectionProps: x
2692
2696
  }) => {
2693
- const _ = O(), C = ie(`(min-width: ${_.breakpoints.sm})`), A = {
2697
+ const _ = O(), C = ae(`(min-width: ${_.breakpoints.sm})`), A = {
2694
2698
  backgroundColor: e,
2695
2699
  color: r || _.fonts.color,
2696
2700
  margin: d,
@@ -2733,7 +2737,7 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2733
2737
  style: o,
2734
2738
  ...n
2735
2739
  }) => {
2736
- const i = O(), l = [jt.hero, s].filter(Boolean).join(" "), d = (r == null ? void 0 : r.md) || i.breakpoints.md, y = (r == null ? void 0 : r.lg) || i.breakpoints.lg, f = ie(`(min-width: ${d})`), m = ie(`(min-width: ${y})`), h = Fo({ isMd: f, isLg: m, theme: i });
2740
+ const i = O(), l = [jt.hero, s].filter(Boolean).join(" "), d = (r == null ? void 0 : r.md) || i.breakpoints.md, y = (r == null ? void 0 : r.lg) || i.breakpoints.lg, f = ae(`(min-width: ${d})`), m = ae(`(min-width: ${y})`), h = Fo({ isMd: f, isLg: m, theme: i });
2737
2741
  return /* @__PURE__ */ V(
2738
2742
  mr,
2739
2743
  {
@@ -2794,7 +2798,7 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2794
2798
  // Element-specific props
2795
2799
  footerProps: x
2796
2800
  }) => {
2797
- const _ = O(), C = f || _.breakpoints.sm, { maxWidth: A, unit: S } = Ee(C), z = ie(`(max-width: ${A}${S})`), k = wo({
2801
+ const _ = O(), C = f || _.breakpoints.sm, { maxWidth: A, unit: S } = Ee(C), z = ae(`(max-width: ${A}${S})`), k = wo({
2798
2802
  isSmallScreen: z,
2799
2803
  maxWidth: t,
2800
2804
  minWidth: s,
@@ -2838,7 +2842,7 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2838
2842
  // Element-specific props
2839
2843
  divProps: i
2840
2844
  }) => {
2841
- const l = O(), d = [$e.card, o].filter(Boolean).join(" "), y = e || l.breakpoints.md, f = ie(`(min-width: ${y})`), m = Ao({ isMd: f, theme: l });
2845
+ const l = O(), d = [$e.card, o].filter(Boolean).join(" "), y = e || l.breakpoints.md, f = ae(`(min-width: ${y})`), m = Ao({ isMd: f, theme: l });
2842
2846
  return /* @__PURE__ */ K(
2843
2847
  "div",
2844
2848
  {
@@ -2882,7 +2886,7 @@ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
2882
2886
  style: n,
2883
2887
  ...i
2884
2888
  }) => {
2885
- const l = O(), d = [Ut.section, o].filter(Boolean).join(" "), y = (r == null ? void 0 : r.md) || l.breakpoints.md, f = (r == null ? void 0 : r.lg) || l.breakpoints.lg, m = ie(`(min-width: ${y})`), h = ie(`(min-width: ${f})`), F = Do({ columns: e, isMd: m, isLg: h }), x = {
2889
+ const l = O(), d = [Ut.section, o].filter(Boolean).join(" "), y = (r == null ? void 0 : r.md) || l.breakpoints.md, f = (r == null ? void 0 : r.lg) || l.breakpoints.lg, m = ae(`(min-width: ${y})`), h = ae(`(min-width: ${f})`), F = Do({ columns: e, isMd: m, isLg: h }), x = {
2886
2890
  "--section-padding-vertical": `calc(${l.fonts.rhythm} * 2)`
2887
2891
  }, _ = {
2888
2892
  ...F,