autoforma 2.10.0 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -50,24 +50,24 @@ function zt() {
50
50
  return c.$$typeof === fe ? null : c.displayName || c.name || null;
51
51
  if (typeof c == "string") return c;
52
52
  switch (c) {
53
- case W:
53
+ case $:
54
54
  return "Fragment";
55
55
  case E:
56
56
  return "Profiler";
57
- case $:
57
+ case Y:
58
58
  return "StrictMode";
59
59
  case ee:
60
60
  return "Suspense";
61
61
  case ce:
62
62
  return "SuspenseList";
63
- case H:
63
+ case I:
64
64
  return "Activity";
65
65
  }
66
66
  if (typeof c == "object")
67
67
  switch (typeof c.tag == "number" && console.error(
68
68
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
69
  ), c.$$typeof) {
70
- case S:
70
+ case O:
71
71
  return "Portal";
72
72
  case C:
73
73
  return c.displayName || "Context";
@@ -78,7 +78,7 @@ function zt() {
78
78
  return c = c.displayName, c || (c = g.displayName || g.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
79
79
  case se:
80
80
  return g = c.displayName || null, g !== null ? g : e(c.type) || "Memo";
81
- case N:
81
+ case j:
82
82
  g = c._payload, c = c._init;
83
83
  try {
84
84
  return e(c(g));
@@ -99,8 +99,8 @@ function zt() {
99
99
  }
100
100
  if (g) {
101
101
  g = console;
102
- var j = g.error, L = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
103
- return j.call(
102
+ var P = g.error, L = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
103
+ return P.call(
104
104
  g,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
106
  L
@@ -108,8 +108,8 @@ function zt() {
108
108
  }
109
109
  }
110
110
  function n(c) {
111
- if (c === W) return "<>";
112
- if (typeof c == "object" && c !== null && c.$$typeof === N)
111
+ if (c === $) return "<>";
112
+ if (typeof c == "object" && c !== null && c.$$typeof === j)
113
113
  return "<...>";
114
114
  try {
115
115
  var g = e(c);
@@ -133,14 +133,14 @@ function zt() {
133
133
  return c.key !== void 0;
134
134
  }
135
135
  function f(c, g) {
136
- function j() {
136
+ function P() {
137
137
  Q || (Q = !0, console.error(
138
138
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
139
  g
140
140
  ));
141
141
  }
142
- j.isReactWarning = !0, Object.defineProperty(c, "key", {
143
- get: j,
142
+ P.isReactWarning = !0, Object.defineProperty(c, "key", {
143
+ get: P,
144
144
  configurable: !0
145
145
  });
146
146
  }
@@ -150,15 +150,15 @@ function zt() {
150
150
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
151
  )), c = this.props.ref, c !== void 0 ? c : null;
152
152
  }
153
- function A(c, g, j, L, _e, xe) {
154
- var U = j.ref;
153
+ function A(c, g, P, L, _e, xe) {
154
+ var M = P.ref;
155
155
  return c = {
156
- $$typeof: B,
156
+ $$typeof: W,
157
157
  type: c,
158
158
  key: g,
159
- props: j,
159
+ props: P,
160
160
  _owner: L
161
- }, (U !== void 0 ? U : null) !== null ? Object.defineProperty(c, "ref", {
161
+ }, (M !== void 0 ? M : null) !== null ? Object.defineProperty(c, "ref", {
162
162
  enumerable: !1,
163
163
  get: F
164
164
  }) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
@@ -183,25 +183,25 @@ function zt() {
183
183
  value: xe
184
184
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
185
185
  }
186
- function O(c, g, j, L, _e, xe) {
187
- var U = g.children;
188
- if (U !== void 0)
186
+ function T(c, g, P, L, _e, xe) {
187
+ var M = g.children;
188
+ if (M !== void 0)
189
189
  if (L)
190
- if (I(U)) {
191
- for (L = 0; L < U.length; L++)
192
- x(U[L]);
193
- Object.freeze && Object.freeze(U);
190
+ if (U(M)) {
191
+ for (L = 0; L < M.length; L++)
192
+ x(M[L]);
193
+ Object.freeze && Object.freeze(M);
194
194
  } else
195
195
  console.error(
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
- else x(U);
198
+ else x(M);
199
199
  if (p.call(g, "key")) {
200
- U = e(c);
200
+ M = e(c);
201
201
  var oe = Object.keys(g).filter(function(Ae) {
202
202
  return Ae !== "key";
203
203
  });
204
- L = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", me[U + L] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ L = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", me[M + L] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
@@ -209,35 +209,35 @@ React keys must be passed directly to JSX without using spread:
209
209
  let props = %s;
210
210
  <%s key={someKey} {...props} />`,
211
211
  L,
212
- U,
212
+ M,
213
213
  oe,
214
- U
215
- ), me[U + L] = !0);
214
+ M
215
+ ), me[M + L] = !0);
216
216
  }
217
- if (U = null, j !== void 0 && (t(j), U = "" + j), u(g) && (t(g.key), U = "" + g.key), "key" in g) {
218
- j = {};
217
+ if (M = null, P !== void 0 && (t(P), M = "" + P), u(g) && (t(g.key), M = "" + g.key), "key" in g) {
218
+ P = {};
219
219
  for (var Ee in g)
220
- Ee !== "key" && (j[Ee] = g[Ee]);
221
- } else j = g;
222
- return U && f(
223
- j,
220
+ Ee !== "key" && (P[Ee] = g[Ee]);
221
+ } else P = g;
222
+ return M && f(
223
+ P,
224
224
  typeof c == "function" ? c.displayName || c.name || "Unknown" : c
225
225
  ), A(
226
226
  c,
227
- U,
228
- j,
227
+ M,
228
+ P,
229
229
  o(),
230
230
  _e,
231
231
  xe
232
232
  );
233
233
  }
234
234
  function x(c) {
235
- w(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === N && (c._payload.status === "fulfilled" ? w(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
235
+ w(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === j && (c._payload.status === "fulfilled" ? w(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
236
236
  }
237
237
  function w(c) {
238
- return typeof c == "object" && c !== null && c.$$typeof === B;
238
+ return typeof c == "object" && c !== null && c.$$typeof === W;
239
239
  }
240
- var b = R, B = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), W = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), G = Symbol.for("react.consumer"), C = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), ce = Symbol.for("react.suspense_list"), se = Symbol.for("react.memo"), N = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), fe = Symbol.for("react.client.reference"), _ = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, p = Object.prototype.hasOwnProperty, I = Array.isArray, Y = console.createTask ? console.createTask : function() {
240
+ var b = R, W = Symbol.for("react.transitional.element"), O = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), Y = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), G = Symbol.for("react.consumer"), C = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), ce = Symbol.for("react.suspense_list"), se = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), I = Symbol.for("react.activity"), fe = Symbol.for("react.client.reference"), _ = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, p = Object.prototype.hasOwnProperty, U = Array.isArray, q = console.createTask ? console.createTask : function() {
241
241
  return null;
242
242
  };
243
243
  b = {
@@ -248,26 +248,26 @@ React keys must be passed directly to JSX without using spread:
248
248
  var Q, X = {}, de = b.react_stack_bottom_frame.bind(
249
249
  b,
250
250
  i
251
- )(), ye = Y(n(i)), me = {};
252
- pe.Fragment = W, pe.jsx = function(c, g, j) {
251
+ )(), ye = q(n(i)), me = {};
252
+ pe.Fragment = $, pe.jsx = function(c, g, P) {
253
253
  var L = 1e4 > _.recentlyCreatedOwnerStacks++;
254
- return O(
254
+ return T(
255
255
  c,
256
256
  g,
257
- j,
257
+ P,
258
258
  !1,
259
259
  L ? Error("react-stack-top-frame") : de,
260
- L ? Y(n(c)) : ye
260
+ L ? q(n(c)) : ye
261
261
  );
262
- }, pe.jsxs = function(c, g, j) {
262
+ }, pe.jsxs = function(c, g, P) {
263
263
  var L = 1e4 > _.recentlyCreatedOwnerStacks++;
264
- return O(
264
+ return T(
265
265
  c,
266
266
  g,
267
- j,
267
+ P,
268
268
  !0,
269
269
  L ? Error("react-stack-top-frame") : de,
270
- L ? Y(n(c)) : ye
270
+ L ? q(n(c)) : ye
271
271
  );
272
272
  };
273
273
  })()), pe;
@@ -278,9 +278,9 @@ function Ht() {
278
278
  }
279
279
  var V = Ht(), Te = (e) => e.type === "checkbox", be = (e) => e instanceof Date, K = (e) => e == null;
280
280
  const Vt = (e) => typeof e == "object";
281
- var z = (e) => !K(e) && !Array.isArray(e) && Vt(e) && !be(e), Jt = (e) => z(e) && e.target ? Te(e.target) ? e.target.checked : e.target.value : e, Gt = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Xt = (e, r) => e.has(Gt(r)), Zt = (e) => {
281
+ var H = (e) => !K(e) && !Array.isArray(e) && Vt(e) && !be(e), Jt = (e) => H(e) && e.target ? Te(e.target) ? e.target.checked : e.target.value : e, Gt = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Xt = (e, r) => e.has(Gt(r)), Zt = (e) => {
282
282
  const r = e.constructor && e.constructor.prototype;
283
- return z(r) && r.hasOwnProperty("isPrototypeOf");
283
+ return H(r) && r.hasOwnProperty("isPrototypeOf");
284
284
  }, ze = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
285
285
  function J(e) {
286
286
  if (e instanceof Date)
@@ -289,19 +289,19 @@ function J(e) {
289
289
  if (ze && (e instanceof Blob || r))
290
290
  return e;
291
291
  const t = Array.isArray(e);
292
- if (!t && !(z(e) && Zt(e)))
292
+ if (!t && !(H(e) && Zt(e)))
293
293
  return e;
294
294
  const n = t ? [] : Object.create(Object.getPrototypeOf(e));
295
295
  for (const o in e)
296
296
  Object.prototype.hasOwnProperty.call(e, o) && (n[o] = J(e[o]));
297
297
  return n;
298
298
  }
299
- var Ie = (e) => /^\w*$/.test(e), M = (e) => e === void 0, He = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Je = (e) => He(e.replace(/["|']|\]/g, "").split(/\.|\[/)), h = (e, r, t) => {
300
- if (!r || !z(e))
299
+ var Ie = (e) => /^\w*$/.test(e), B = (e) => e === void 0, He = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Je = (e) => He(e.replace(/["|']|\]/g, "").split(/\.|\[/)), h = (e, r, t) => {
300
+ if (!r || !H(e))
301
301
  return t;
302
302
  const n = (Ie(r) ? [r] : Je(r)).reduce((o, i) => K(o) ? o : o[i], e);
303
- return M(n) || n === e ? M(e[r]) ? t : e[r] : n;
304
- }, le = (e) => typeof e == "boolean", ne = (e) => typeof e == "function", P = (e, r, t) => {
303
+ return B(n) || n === e ? B(e[r]) ? t : e[r] : n;
304
+ }, le = (e) => typeof e == "boolean", ne = (e) => typeof e == "function", N = (e, r, t) => {
305
305
  let n = -1;
306
306
  const o = Ie(r) ? [r] : Je(r), i = o.length, u = i - 1;
307
307
  for (; ++n < i; ) {
@@ -309,7 +309,7 @@ var Ie = (e) => /^\w*$/.test(e), M = (e) => e === void 0, He = (e) => Array.isAr
309
309
  let F = t;
310
310
  if (n !== u) {
311
311
  const A = e[f];
312
- F = z(A) || Array.isArray(A) ? A : isNaN(+o[n + 1]) ? {} : [];
312
+ F = H(A) || Array.isArray(A) ? A : isNaN(+o[n + 1]) ? {} : [];
313
313
  }
314
314
  if (f === "__proto__" || f === "constructor" || f === "prototype")
315
315
  return;
@@ -371,47 +371,47 @@ function ae(e, r, t = /* @__PURE__ */ new WeakSet()) {
371
371
  return !1;
372
372
  if (i !== "ref") {
373
373
  const f = r[i];
374
- if (be(u) && be(f) || z(u) && z(f) || Array.isArray(u) && Array.isArray(f) ? !ae(u, f, t) : !Object.is(u, f))
374
+ if (be(u) && be(f) || H(u) && H(f) || Array.isArray(u) && Array.isArray(f) ? !ae(u, f, t) : !Object.is(u, f))
375
375
  return !1;
376
376
  }
377
377
  }
378
378
  return !0;
379
379
  }
380
380
  function At(e) {
381
- const r = ge(), { control: t = r.control, name: n, defaultValue: o, disabled: i, exact: u, compute: f } = e || {}, F = R.useRef(o), A = R.useRef(f), O = R.useRef(void 0), x = R.useRef(t), w = R.useRef(n);
381
+ const r = ge(), { control: t = r.control, name: n, defaultValue: o, disabled: i, exact: u, compute: f } = e || {}, F = R.useRef(o), A = R.useRef(f), T = R.useRef(void 0), x = R.useRef(t), w = R.useRef(n);
382
382
  A.current = f;
383
- const [b, B] = R.useState(() => {
383
+ const [b, W] = R.useState(() => {
384
384
  const C = t._getWatch(n, F.current);
385
385
  return A.current ? A.current(C) : C;
386
- }), S = R.useCallback((C) => {
386
+ }), O = R.useCallback((C) => {
387
387
  const k = $e(n, t._names, C || t._formValues, !1, F.current);
388
388
  return A.current ? A.current(k) : k;
389
- }, [t._formValues, t._names, n]), W = R.useCallback((C) => {
389
+ }, [t._formValues, t._names, n]), $ = R.useCallback((C) => {
390
390
  if (!i) {
391
391
  const k = $e(n, t._names, C || t._formValues, !1, F.current);
392
392
  if (A.current) {
393
393
  const ee = A.current(k);
394
- ae(ee, O.current) || (B(ee), O.current = ee);
394
+ ae(ee, T.current) || (W(ee), T.current = ee);
395
395
  } else
396
- B(k);
396
+ W(k);
397
397
  }
398
398
  }, [t._formValues, t._names, i, n]);
399
- Ft(() => ((x.current !== t || !ae(w.current, n)) && (x.current = t, w.current = n, W()), t._subscribe({
399
+ Ft(() => ((x.current !== t || !ae(w.current, n)) && (x.current = t, w.current = n, $()), t._subscribe({
400
400
  name: n,
401
401
  formState: {
402
402
  values: !0
403
403
  },
404
404
  exact: u,
405
405
  callback: (C) => {
406
- W(C.values);
406
+ $(C.values);
407
407
  }
408
- })), [t, u, n, W]), R.useEffect(() => t._removeUnmounted());
409
- const $ = x.current !== t, E = w.current, G = R.useMemo(() => {
408
+ })), [t, u, n, $]), R.useEffect(() => t._removeUnmounted());
409
+ const Y = x.current !== t, E = w.current, G = R.useMemo(() => {
410
410
  if (i)
411
411
  return null;
412
- const C = !$ && !ae(E, n);
413
- return $ || C ? S() : null;
414
- }, [i, $, n, E, S]);
412
+ const C = !Y && !ae(E, n);
413
+ return Y || C ? O() : null;
414
+ }, [i, Y, n, E, O]);
415
415
  return G !== null ? G : b;
416
416
  }
417
417
  var er = (e, r, t, n, o) => r ? {
@@ -445,14 +445,14 @@ function wt(e, r) {
445
445
  for (const n in e)
446
446
  if (e.hasOwnProperty(n)) {
447
447
  const o = e[n], i = r[n];
448
- if (o && z(o) && i) {
448
+ if (o && H(o) && i) {
449
449
  const u = wt(o, i);
450
- z(u) && (t[n] = u);
450
+ H(u) && (t[n] = u);
451
451
  } else e[n] && (t[n] = i);
452
452
  }
453
453
  return t;
454
454
  }
455
- var Z = (e) => z(e) && !Object.keys(e).length, Xe = (e) => e.type === "file", je = (e) => {
455
+ var Z = (e) => H(e) && !Object.keys(e).length, Xe = (e) => e.type === "file", je = (e) => {
456
456
  if (!ze)
457
457
  return !1;
458
458
  const r = e ? e.ownerDocument : 0;
@@ -462,18 +462,18 @@ function rr(e, r) {
462
462
  const t = r.slice(0, -1).length;
463
463
  let n = 0;
464
464
  for (; n < t; )
465
- e = M(e) ? n++ : e[r[n++]];
465
+ e = B(e) ? n++ : e[r[n++]];
466
466
  return e;
467
467
  }
468
468
  function sr(e) {
469
469
  for (const r in e)
470
- if (e.hasOwnProperty(r) && !M(e[r]))
470
+ if (e.hasOwnProperty(r) && !B(e[r]))
471
471
  return !1;
472
472
  return !0;
473
473
  }
474
- function q(e, r) {
474
+ function z(e, r) {
475
475
  const t = Array.isArray(r) ? r : Ie(r) ? [r] : Je(r), n = t.length === 1 ? e : rr(e, t), o = t.length - 1, i = t[o];
476
- return n && delete n[i], o !== 0 && (z(n) && Z(n) || Array.isArray(n) && sr(n)) && q(e, t.slice(0, -1)), e;
476
+ return n && delete n[i], o !== 0 && (H(n) && Z(n) || Array.isArray(n) && sr(n)) && z(e, t.slice(0, -1)), e;
477
477
  }
478
478
  var nr = (e) => {
479
479
  for (const r in e)
@@ -482,12 +482,12 @@ var nr = (e) => {
482
482
  return !1;
483
483
  };
484
484
  function Rt(e) {
485
- return Array.isArray(e) || z(e) && !nr(e);
485
+ return Array.isArray(e) || H(e) && !nr(e);
486
486
  }
487
487
  function qe(e, r = {}) {
488
488
  for (const t in e) {
489
489
  const n = e[t];
490
- Rt(n) ? (r[t] = Array.isArray(n) ? [] : {}, qe(n, r[t])) : M(n) || (r[t] = !0);
490
+ Rt(n) ? (r[t] = Array.isArray(n) ? [] : {}, qe(n, r[t])) : B(n) || (r[t] = !0);
491
491
  }
492
492
  return r;
493
493
  }
@@ -496,7 +496,7 @@ function Fe(e, r, t) {
496
496
  for (const n in e) {
497
497
  const o = e[n];
498
498
  if (Rt(o))
499
- M(r) || Ye(t[n]) ? t[n] = qe(o, Array.isArray(o) ? [] : {}) : Fe(o, K(r) ? {} : r[n], t[n]);
499
+ B(r) || Ye(t[n]) ? t[n] = qe(o, Array.isArray(o) ? [] : {}) : Fe(o, K(r) ? {} : r[n], t[n]);
500
500
  else {
501
501
  const i = r[n];
502
502
  t[n] = !ae(o, i);
@@ -516,11 +516,11 @@ var kt = (e) => {
516
516
  }
517
517
  return e[0].checked && !e[0].disabled ? (
518
518
  // @ts-expect-error expected to work in the browser
519
- e[0].attributes && !M(e[0].attributes.value) ? M(e[0].value) || e[0].value === "" ? ft : { value: e[0].value, isValid: !0 } : ft
519
+ e[0].attributes && !B(e[0].attributes.value) ? B(e[0].value) || e[0].value === "" ? ft : { value: e[0].value, isValid: !0 } : ft
520
520
  ) : ct;
521
521
  }
522
522
  return ct;
523
- }, St = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: n }) => M(e) ? e : r ? e === "" ? NaN : e && +e : t && te(e) ? new Date(e) : n ? n(e) : e;
523
+ }, St = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: n }) => B(e) ? e : r ? e === "" ? NaN : e && +e : t && te(e) ? new Date(e) : n ? n(e) : e;
524
524
  const dt = {
525
525
  isValid: !1,
526
526
  value: null
@@ -531,13 +531,13 @@ var Tt = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disab
531
531
  } : r, dt) : dt;
532
532
  function yt(e) {
533
533
  const r = e.ref;
534
- return Xe(r) ? r.files : Ze(r) ? Tt(e.refs).value : pt(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Te(r) ? kt(e.refs).value : St(M(r.value) ? e.ref.value : r.value, e);
534
+ return Xe(r) ? r.files : Ze(r) ? Tt(e.refs).value : pt(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Te(r) ? kt(e.refs).value : St(B(r.value) ? e.ref.value : r.value, e);
535
535
  }
536
536
  var ir = (e, r, t, n) => {
537
537
  const o = {};
538
538
  for (const i of e) {
539
539
  const u = h(r, i);
540
- u && P(o, i, u._f);
540
+ u && N(o, i, u._f);
541
541
  }
542
542
  return {
543
543
  criteriaMode: t,
@@ -545,7 +545,7 @@ var ir = (e, r, t, n) => {
545
545
  fields: o,
546
546
  shouldUseNativeValidation: n
547
547
  };
548
- }, Pe = (e) => e instanceof RegExp, Re = (e) => M(e) ? e : Pe(e) ? e.source : z(e) ? Pe(e.value) ? e.value.source : e.value : e, mt = (e) => ({
548
+ }, Pe = (e) => e instanceof RegExp, Re = (e) => B(e) ? e : Pe(e) ? e.source : H(e) ? Pe(e.value) ? e.value.source : e.value : e, mt = (e) => ({
549
549
  isOnSubmit: !e || e === ie.onSubmit,
550
550
  isOnBlur: e === ie.onBlur,
551
551
  isOnChange: e === ie.onChange,
@@ -553,7 +553,7 @@ var ir = (e, r, t, n) => {
553
553
  isOnTouch: e === ie.onTouched
554
554
  });
555
555
  const ht = "AsyncFunction";
556
- var ar = (e) => !!e && !!e.validate && !!(ne(e.validate) && e.validate.constructor.name === ht || z(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === ht)), or = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), vt = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
556
+ var ar = (e) => !!e && !!e.validate && !!(ne(e.validate) && e.validate.constructor.name === ht || H(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === ht)), or = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), vt = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
557
557
  const Se = (e, r, t, n) => {
558
558
  for (const o of t || Object.keys(e)) {
559
559
  const i = h(e, o);
@@ -566,7 +566,7 @@ const Se = (e, r, t, n) => {
566
566
  return !0;
567
567
  if (Se(f, r))
568
568
  break;
569
- } else if (z(f) && Se(f, r))
569
+ } else if (H(f) && Se(f, r))
570
570
  break;
571
571
  }
572
572
  }
@@ -603,9 +603,9 @@ var lr = (e, r, t, n) => {
603
603
  t(e);
604
604
  const { name: o, ...i } = e;
605
605
  return Z(i) || Object.keys(i).length >= Object.keys(r).length || Object.keys(i).find((u) => r[u] === (!n || ie.all));
606
- }, ur = (e, r, t) => !e || !r || e === r || ke(e).some((n) => n && (t ? n === r : n.startsWith(r) || r.startsWith(n))), cr = (e, r, t, n, o) => o.isOnAll ? !1 : !t && o.isOnTouch ? !(r || e) : (t ? n.isOnBlur : o.isOnBlur) ? !e : (t ? n.isOnChange : o.isOnChange) ? e : !0, fr = (e, r) => !He(h(e, r)).length && q(e, r), dr = (e, r, t) => {
606
+ }, ur = (e, r, t) => !e || !r || e === r || ke(e).some((n) => n && (t ? n === r : n.startsWith(r) || r.startsWith(n))), cr = (e, r, t, n, o) => o.isOnAll ? !1 : !t && o.isOnTouch ? !(r || e) : (t ? n.isOnBlur : o.isOnBlur) ? !e : (t ? n.isOnChange : o.isOnChange) ? e : !0, fr = (e, r) => !He(h(e, r)).length && z(e, r), dr = (e, r, t) => {
607
607
  const n = ke(h(e, t));
608
- return P(n, "root", r[t]), P(e, t, n), e;
608
+ return N(n, "root", r[t]), N(e, t, n), e;
609
609
  };
610
610
  function gt(e, r, t = "validate") {
611
611
  if (te(e) || Array.isArray(e) && e.every(te) || le(e) && !e)
@@ -615,82 +615,82 @@ function gt(e, r, t = "validate") {
615
615
  ref: r
616
616
  };
617
617
  }
618
- var Ve = (e) => z(e) && !Pe(e) ? e : {
618
+ var Ve = (e) => H(e) && !Pe(e) ? e : {
619
619
  value: e,
620
620
  message: ""
621
621
  }, _t = async (e, r, t, n, o, i) => {
622
- const { ref: u, refs: f, required: F, maxLength: A, minLength: O, min: x, max: w, pattern: b, validate: B, name: S, valueAsNumber: W, mount: $ } = e._f, E = h(t, S);
623
- if (!$ || r.has(S))
622
+ const { ref: u, refs: f, required: F, maxLength: A, minLength: T, min: x, max: w, pattern: b, validate: W, name: O, valueAsNumber: $, mount: Y } = e._f, E = h(t, O);
623
+ if (!Y || r.has(O))
624
624
  return {};
625
625
  const G = f ? f[0] : u, C = (_) => {
626
626
  o && G.reportValidity && (G.setCustomValidity(le(_) ? "" : _ || ""), G.reportValidity());
627
- }, k = {}, ee = Ze(u), ce = Te(u), se = ee || ce, N = (W || Xe(u)) && M(u.value) && M(E) || je(u) && u.value === "" || E === "" || Array.isArray(E) && !E.length, H = er.bind(null, S, n, k), fe = (_, p, I, Y = ue.maxLength, Q = ue.minLength) => {
628
- const X = _ ? p : I;
629
- k[S] = {
630
- type: _ ? Y : Q,
627
+ }, k = {}, ee = Ze(u), ce = Te(u), se = ee || ce, j = ($ || Xe(u)) && B(u.value) && B(E) || je(u) && u.value === "" || E === "" || Array.isArray(E) && !E.length, I = er.bind(null, O, n, k), fe = (_, p, U, q = ue.maxLength, Q = ue.minLength) => {
628
+ const X = _ ? p : U;
629
+ k[O] = {
630
+ type: _ ? q : Q,
631
631
  message: X,
632
632
  ref: u,
633
- ...H(_ ? Y : Q, X)
633
+ ...I(_ ? q : Q, X)
634
634
  };
635
635
  };
636
- if (i ? !Array.isArray(E) || !E.length : F && (!se && (N || K(E)) || le(E) && !E || ce && !kt(f).isValid || ee && !Tt(f).isValid)) {
636
+ if (i ? !Array.isArray(E) || !E.length : F && (!se && (j || K(E)) || le(E) && !E || ce && !kt(f).isValid || ee && !Tt(f).isValid)) {
637
637
  const { value: _, message: p } = te(F) ? { value: !!F, message: F } : Ve(F);
638
- if (_ && (k[S] = {
638
+ if (_ && (k[O] = {
639
639
  type: ue.required,
640
640
  message: p,
641
641
  ref: G,
642
- ...H(ue.required, p)
642
+ ...I(ue.required, p)
643
643
  }, !n))
644
644
  return C(p), k;
645
645
  }
646
- if (!N && (!K(x) || !K(w))) {
646
+ if (!j && (!K(x) || !K(w))) {
647
647
  let _, p;
648
- const I = Ve(w), Y = Ve(x);
648
+ const U = Ve(w), q = Ve(x);
649
649
  if (!K(E) && !isNaN(E)) {
650
650
  const Q = u.valueAsNumber || E && +E;
651
- K(I.value) || (_ = Q > I.value), K(Y.value) || (p = Q < Y.value);
651
+ K(U.value) || (_ = Q > U.value), K(q.value) || (p = Q < q.value);
652
652
  } else {
653
653
  const Q = u.valueAsDate || new Date(E), X = (me) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + me), de = u.type == "time", ye = u.type == "week";
654
- te(I.value) && E && (_ = de ? X(E) > X(I.value) : ye ? E > I.value : Q > new Date(I.value)), te(Y.value) && E && (p = de ? X(E) < X(Y.value) : ye ? E < Y.value : Q < new Date(Y.value));
654
+ te(U.value) && E && (_ = de ? X(E) > X(U.value) : ye ? E > U.value : Q > new Date(U.value)), te(q.value) && E && (p = de ? X(E) < X(q.value) : ye ? E < q.value : Q < new Date(q.value));
655
655
  }
656
- if ((_ || p) && (fe(!!_, I.message, Y.message, ue.max, ue.min), !n))
657
- return C(k[S].message), k;
656
+ if ((_ || p) && (fe(!!_, U.message, q.message, ue.max, ue.min), !n))
657
+ return C(k[O].message), k;
658
658
  }
659
- if ((A || O) && !N && (te(E) || i && Array.isArray(E))) {
660
- const _ = Ve(A), p = Ve(O), I = !K(_.value) && E.length > +_.value, Y = !K(p.value) && E.length < +p.value;
661
- if ((I || Y) && (fe(I, _.message, p.message), !n))
662
- return C(k[S].message), k;
659
+ if ((A || T) && !j && (te(E) || i && Array.isArray(E))) {
660
+ const _ = Ve(A), p = Ve(T), U = !K(_.value) && E.length > +_.value, q = !K(p.value) && E.length < +p.value;
661
+ if ((U || q) && (fe(U, _.message, p.message), !n))
662
+ return C(k[O].message), k;
663
663
  }
664
- if (b && !N && te(E)) {
664
+ if (b && !j && te(E)) {
665
665
  const { value: _, message: p } = Ve(b);
666
- if (Pe(_) && !E.match(_) && (k[S] = {
666
+ if (Pe(_) && !E.match(_) && (k[O] = {
667
667
  type: ue.pattern,
668
668
  message: p,
669
669
  ref: u,
670
- ...H(ue.pattern, p)
670
+ ...I(ue.pattern, p)
671
671
  }, !n))
672
672
  return C(p), k;
673
673
  }
674
- if (B) {
675
- if (ne(B)) {
676
- const _ = await B(E, t), p = gt(_, G);
677
- if (p && (k[S] = {
674
+ if (W) {
675
+ if (ne(W)) {
676
+ const _ = await W(E, t), p = gt(_, G);
677
+ if (p && (k[O] = {
678
678
  ...p,
679
- ...H(ue.validate, p.message)
679
+ ...I(ue.validate, p.message)
680
680
  }, !n))
681
681
  return C(p.message), k;
682
- } else if (z(B)) {
682
+ } else if (H(W)) {
683
683
  let _ = {};
684
- for (const p in B) {
684
+ for (const p in W) {
685
685
  if (!Z(_) && !n)
686
686
  break;
687
- const I = gt(await B[p](E, t), G, p);
688
- I && (_ = {
689
- ...I,
690
- ...H(p, I.message)
691
- }, C(I.message), n && (k[S] = _));
687
+ const U = gt(await W[p](E, t), G, p);
688
+ U && (_ = {
689
+ ...U,
690
+ ...I(p, U.message)
691
+ }, C(U.message), n && (k[O] = _));
692
692
  }
693
- if (!Z(_) && (k[S] = {
693
+ if (!Z(_) && (k[O] = {
694
694
  ref: G,
695
695
  ..._
696
696
  }, !n))
@@ -723,7 +723,7 @@ function mr(e = {}) {
723
723
  validatingFields: {},
724
724
  errors: r.errors || {},
725
725
  disabled: r.disabled || !1
726
- }, n = {}, o = z(r.defaultValues) || z(r.values) ? J(r.defaultValues || r.values) || {} : {}, i = r.shouldUnregister ? {} : J(o), u = {
726
+ }, n = {}, o = H(r.defaultValues) || H(r.values) ? J(r.defaultValues || r.values) || {} : {}, i = r.shouldUnregister ? {} : J(o), u = {
727
727
  action: !1,
728
728
  mount: !1,
729
729
  watch: !1,
@@ -735,7 +735,7 @@ function mr(e = {}) {
735
735
  array: /* @__PURE__ */ new Set(),
736
736
  watch: /* @__PURE__ */ new Set()
737
737
  }, F, A = 0;
738
- const O = {
738
+ const T = {
739
739
  isDirty: !1,
740
740
  dirtyFields: !1,
741
741
  validatingFields: !1,
@@ -744,7 +744,7 @@ function mr(e = {}) {
744
744
  isValid: !1,
745
745
  errors: !1
746
746
  }, x = {
747
- ...O
747
+ ...T
748
748
  };
749
749
  let w = {
750
750
  ...x
@@ -752,18 +752,18 @@ function mr(e = {}) {
752
752
  const b = {
753
753
  array: ut(),
754
754
  state: ut()
755
- }, B = r.criteriaMode === ie.all, S = (s) => (a) => {
755
+ }, W = r.criteriaMode === ie.all, O = (s) => (a) => {
756
756
  clearTimeout(A), A = setTimeout(s, a);
757
- }, W = async (s) => {
757
+ }, $ = async (s) => {
758
758
  if (!u.keepIsValid && !r.disabled && (x.isValid || w.isValid || s)) {
759
759
  let a;
760
- r.resolver ? (a = Z((await se()).errors), $()) : a = await H(n, !0), a !== t.isValid && b.state.next({
760
+ r.resolver ? (a = Z((await se()).errors), Y()) : a = await I(n, !0), a !== t.isValid && b.state.next({
761
761
  isValid: a
762
762
  });
763
763
  }
764
- }, $ = (s, a) => {
764
+ }, Y = (s, a) => {
765
765
  !r.disabled && (x.isValidating || x.validatingFields || w.isValidating || w.validatingFields) && ((s || Array.from(f.mount)).forEach((l) => {
766
- l && (a ? P(t.validatingFields, l, a) : q(t.validatingFields, l));
766
+ l && (a ? N(t.validatingFields, l, a) : z(t.validatingFields, l));
767
767
  }), b.state.next({
768
768
  validatingFields: t.validatingFields,
769
769
  isValidating: !Z(t.validatingFields)
@@ -772,15 +772,15 @@ function mr(e = {}) {
772
772
  if (m && l && !r.disabled) {
773
773
  if (u.action = !0, d && Array.isArray(h(n, s))) {
774
774
  const v = l(h(n, s), m.argA, m.argB);
775
- y && P(n, s, v);
775
+ y && N(n, s, v);
776
776
  }
777
777
  if (d && Array.isArray(h(t.errors, s))) {
778
778
  const v = l(h(t.errors, s), m.argA, m.argB);
779
- y && P(t.errors, s, v), fr(t.errors, s);
779
+ y && N(t.errors, s, v), fr(t.errors, s);
780
780
  }
781
781
  if ((x.touchedFields || w.touchedFields) && d && Array.isArray(h(t.touchedFields, s))) {
782
782
  const v = l(h(t.touchedFields, s), m.argA, m.argB);
783
- y && P(t.touchedFields, s, v);
783
+ y && N(t.touchedFields, s, v);
784
784
  }
785
785
  (x.dirtyFields || w.dirtyFields) && (t.dirtyFields = Fe(o, i)), b.state.next({
786
786
  name: s,
@@ -790,9 +790,9 @@ function mr(e = {}) {
790
790
  isValid: t.isValid
791
791
  });
792
792
  } else
793
- P(i, s, a);
793
+ N(i, s, a);
794
794
  }, G = (s, a) => {
795
- P(t.errors, s, a), b.state.next({
795
+ N(t.errors, s, a), b.state.next({
796
796
  errors: t.errors
797
797
  });
798
798
  }, C = (s) => {
@@ -803,30 +803,30 @@ function mr(e = {}) {
803
803
  }, k = (s, a, l, m) => {
804
804
  const y = h(n, s);
805
805
  if (y) {
806
- const d = h(i, s, M(l) ? h(o, s) : l);
807
- M(d) || m && m.defaultChecked || a ? P(i, s, a ? d : yt(y._f)) : Y(s, d), u.mount && !u.action && W();
806
+ const d = h(i, s, B(l) ? h(o, s) : l);
807
+ B(d) || m && m.defaultChecked || a ? N(i, s, a ? d : yt(y._f)) : q(s, d), u.mount && !u.action && $();
808
808
  }
809
809
  }, ee = (s, a, l, m, y) => {
810
810
  let d = !1, v = !1;
811
- const T = {
811
+ const S = {
812
812
  name: s
813
813
  };
814
814
  if (!r.disabled) {
815
815
  if (!l || m) {
816
- (x.isDirty || w.isDirty) && (v = t.isDirty, t.isDirty = T.isDirty = _(), d = v !== T.isDirty);
816
+ (x.isDirty || w.isDirty) && (v = t.isDirty, t.isDirty = S.isDirty = _(), d = v !== S.isDirty);
817
817
  const D = ae(h(o, s), a);
818
- v = !!h(t.dirtyFields, s), D ? q(t.dirtyFields, s) : P(t.dirtyFields, s, !0), T.dirtyFields = t.dirtyFields, d = d || (x.dirtyFields || w.dirtyFields) && v !== !D;
818
+ v = !!h(t.dirtyFields, s), D ? z(t.dirtyFields, s) : N(t.dirtyFields, s, !0), S.dirtyFields = t.dirtyFields, d = d || (x.dirtyFields || w.dirtyFields) && v !== !D;
819
819
  }
820
820
  if (l) {
821
821
  const D = h(t.touchedFields, s);
822
- D || (P(t.touchedFields, s, l), T.touchedFields = t.touchedFields, d = d || (x.touchedFields || w.touchedFields) && D !== l);
822
+ D || (N(t.touchedFields, s, l), S.touchedFields = t.touchedFields, d = d || (x.touchedFields || w.touchedFields) && D !== l);
823
823
  }
824
- d && y && b.state.next(T);
824
+ d && y && b.state.next(S);
825
825
  }
826
- return d ? T : {};
826
+ return d ? S : {};
827
827
  }, ce = (s, a, l, m) => {
828
828
  const y = h(t.errors, s), d = (x.isValid || w.isValid) && le(a) && t.isValid !== a;
829
- if (r.delayError && l ? (F = S(() => G(s, l)), F(r.delayError)) : (clearTimeout(A), F = null, l ? P(t.errors, s, l) : q(t.errors, s)), (l ? !ae(y, l) : y) || !Z(m) || d) {
829
+ if (r.delayError && l ? (F = O(() => G(s, l)), F(r.delayError)) : (clearTimeout(A), F = null, l ? N(t.errors, s, l) : z(t.errors, s)), (l ? !ae(y, l) : y) || !Z(m) || d) {
830
830
  const v = {
831
831
  ...m,
832
832
  ...d && le(a) ? { isValid: a } : {},
@@ -838,17 +838,17 @@ function mr(e = {}) {
838
838
  ...v
839
839
  }, b.state.next(v);
840
840
  }
841
- }, se = async (s) => ($(s, !0), await r.resolver(i, r.context, ir(s || f.mount, n, r.criteriaMode, r.shouldUseNativeValidation))), N = async (s) => {
841
+ }, se = async (s) => (Y(s, !0), await r.resolver(i, r.context, ir(s || f.mount, n, r.criteriaMode, r.shouldUseNativeValidation))), j = async (s) => {
842
842
  const { errors: a } = await se(s);
843
- if ($(s), s)
843
+ if (Y(s), s)
844
844
  for (const l of s) {
845
845
  const m = h(a, l);
846
- m ? P(t.errors, l, m) : q(t.errors, l);
846
+ m ? N(t.errors, l, m) : z(t.errors, l);
847
847
  }
848
848
  else
849
849
  t.errors = a;
850
850
  return a;
851
- }, H = async (s, a, l = {
851
+ }, I = async (s, a, l = {
852
852
  valid: !0
853
853
  }) => {
854
854
  for (const m in s) {
@@ -856,14 +856,14 @@ function mr(e = {}) {
856
856
  if (y) {
857
857
  const { _f: d, ...v } = y;
858
858
  if (d) {
859
- const T = f.array.has(d.name), D = y._f && ar(y._f);
860
- D && x.validatingFields && $([d.name], !0);
861
- const re = await _t(y, f.disabled, i, B, r.shouldUseNativeValidation && !a, T);
862
- if (D && x.validatingFields && $([d.name]), re[d.name] && (l.valid = !1, a))
859
+ const S = f.array.has(d.name), D = y._f && ar(y._f);
860
+ D && x.validatingFields && Y([d.name], !0);
861
+ const re = await _t(y, f.disabled, i, W, r.shouldUseNativeValidation && !a, S);
862
+ if (D && x.validatingFields && Y([d.name]), re[d.name] && (l.valid = !1, a))
863
863
  break;
864
- !a && (h(re, d.name) ? T ? dr(t.errors, re, d.name) : P(t.errors, d.name, re[d.name]) : q(t.errors, d.name));
864
+ !a && (h(re, d.name) ? S ? dr(t.errors, re, d.name) : N(t.errors, d.name, re[d.name]) : z(t.errors, d.name));
865
865
  }
866
- !Z(v) && await H(v, a, l);
866
+ !Z(v) && await I(v, a, l);
867
867
  }
868
868
  }
869
869
  return l.valid;
@@ -873,15 +873,15 @@ function mr(e = {}) {
873
873
  a && (a._f.refs ? a._f.refs.every((l) => !We(l)) : !We(a._f.ref)) && oe(s);
874
874
  }
875
875
  f.unMount = /* @__PURE__ */ new Set();
876
- }, _ = (s, a) => !r.disabled && (s && a && P(i, s, a), !ae(c(), o)), p = (s, a, l) => $e(s, f, {
877
- ...u.mount ? i : M(a) ? o : te(s) ? { [s]: a } : a
878
- }, l, a), I = (s) => He(h(u.mount ? i : o, s, r.shouldUnregister ? h(o, s, []) : [])), Y = (s, a, l = {}) => {
876
+ }, _ = (s, a) => !r.disabled && (s && a && N(i, s, a), !ae(c(), o)), p = (s, a, l) => $e(s, f, {
877
+ ...u.mount ? i : B(a) ? o : te(s) ? { [s]: a } : a
878
+ }, l, a), U = (s) => He(h(u.mount ? i : o, s, r.shouldUnregister ? h(o, s, []) : [])), q = (s, a, l = {}) => {
879
879
  const m = h(n, s);
880
880
  let y = a;
881
881
  if (m) {
882
882
  const d = m._f;
883
- d && (!d.disabled && P(i, s, St(a, d)), y = je(d.ref) && K(a) ? "" : a, pt(d.ref) ? [...d.ref.options].forEach((v) => v.selected = y.includes(v.value)) : d.refs ? Te(d.ref) ? d.refs.forEach((v) => {
884
- (!v.defaultChecked || !v.disabled) && (Array.isArray(y) ? v.checked = !!y.find((T) => T === v.value) : v.checked = y === v.value || !!y);
883
+ d && (!d.disabled && N(i, s, St(a, d)), y = je(d.ref) && K(a) ? "" : a, pt(d.ref) ? [...d.ref.options].forEach((v) => v.selected = y.includes(v.value)) : d.refs ? Te(d.ref) ? d.refs.forEach((v) => {
884
+ (!v.defaultChecked || !v.disabled) && (Array.isArray(y) ? v.checked = !!y.find((S) => S === v.value) : v.checked = y === v.value || !!y);
885
885
  }) : d.refs.forEach((v) => v.checked = v.value === y) : Xe(d.ref) ? d.ref.value = "" : (d.ref.value = y, d.ref.type || b.state.next({
886
886
  name: s,
887
887
  values: J(i)
@@ -893,18 +893,18 @@ function mr(e = {}) {
893
893
  if (!a.hasOwnProperty(m))
894
894
  return;
895
895
  const y = a[m], d = s + "." + m, v = h(n, d);
896
- (f.array.has(s) || z(y) || v && !v._f) && !be(y) ? Q(d, y, l) : Y(d, y, l);
896
+ (f.array.has(s) || H(y) || v && !v._f) && !be(y) ? Q(d, y, l) : q(d, y, l);
897
897
  }
898
898
  }, X = (s, a, l = {}) => {
899
899
  const m = h(n, s), y = f.array.has(s), d = J(a);
900
- P(i, s, d), y ? (b.array.next({
900
+ N(i, s, d), y ? (b.array.next({
901
901
  name: s,
902
902
  values: J(i)
903
903
  }), (x.isDirty || x.dirtyFields || w.isDirty || w.dirtyFields) && l.shouldDirty && b.state.next({
904
904
  name: s,
905
905
  dirtyFields: Fe(o, i),
906
906
  isDirty: _(s, d)
907
- })) : m && !m._f && !K(d) ? Q(s, d, l) : Y(s, d, l), vt(s, f) && b.state.next({ ...t, name: s }), b.state.next({
907
+ })) : m && !m._f && !K(d) ? Q(s, d, l) : q(s, d, l), vt(s, f) && b.state.next({ ...t, name: s }), b.state.next({
908
908
  name: u.mount ? s : void 0,
909
909
  values: J(i)
910
910
  });
@@ -914,26 +914,26 @@ function mr(e = {}) {
914
914
  let l = a.name, m = !0;
915
915
  const y = h(n, l), d = (D) => {
916
916
  m = Number.isNaN(D) || be(D) && isNaN(D.getTime()) || ae(D, h(i, l, D));
917
- }, v = mt(r.mode), T = mt(r.reValidateMode);
917
+ }, v = mt(r.mode), S = mt(r.reValidateMode);
918
918
  if (y) {
919
919
  let D, re;
920
- const Oe = a.type ? yt(y._f) : Jt(s), he = s.type === lt.BLUR || s.type === lt.FOCUS_OUT, Ut = !or(y._f) && !r.resolver && !h(t.errors, l) && !y._f.deps || cr(he, h(t.touchedFields, l), t.isSubmitted, T, v), Me = vt(l, f, he);
921
- P(i, l, Oe), he ? (!a || !a.readOnly) && (y._f.onBlur && y._f.onBlur(s), F && F(0)) : y._f.onChange && y._f.onChange(s);
920
+ const Oe = a.type ? yt(y._f) : Jt(s), he = s.type === lt.BLUR || s.type === lt.FOCUS_OUT, Ut = !or(y._f) && !r.resolver && !h(t.errors, l) && !y._f.deps || cr(he, h(t.touchedFields, l), t.isSubmitted, S, v), Me = vt(l, f, he);
921
+ N(i, l, Oe), he ? (!a || !a.readOnly) && (y._f.onBlur && y._f.onBlur(s), F && F(0)) : y._f.onChange && y._f.onChange(s);
922
922
  const Be = ee(l, Oe, he), Mt = !Z(Be) || Me;
923
923
  if (!he && b.state.next({
924
924
  name: l,
925
925
  type: s.type,
926
926
  values: J(i)
927
927
  }), Ut)
928
- return (x.isValid || w.isValid) && (r.mode === "onBlur" ? he && W() : he || W()), Mt && b.state.next({ name: l, ...Me ? {} : Be });
928
+ return (x.isValid || w.isValid) && (r.mode === "onBlur" ? he && $() : he || $()), Mt && b.state.next({ name: l, ...Me ? {} : Be });
929
929
  if (!he && Me && b.state.next({ ...t }), r.resolver) {
930
930
  const { errors: st } = await se([l]);
931
- if ($([l]), d(Oe), m) {
931
+ if (Y([l]), d(Oe), m) {
932
932
  const Bt = bt(t.errors, n, l), nt = bt(st, n, Bt.name || l);
933
933
  D = nt.error, l = nt.name, re = Z(st);
934
934
  }
935
935
  } else
936
- $([l], !0), D = (await _t(y, f.disabled, i, B, r.shouldUseNativeValidation))[l], $([l]), d(Oe), m && (D ? re = !1 : (x.isValid || w.isValid) && (re = await H(n, !0)));
936
+ Y([l], !0), D = (await _t(y, f.disabled, i, W, r.shouldUseNativeValidation))[l], Y([l]), d(Oe), m && (D ? re = !1 : (x.isValid || w.isValid) && (re = await I(n, !0)));
937
937
  m && (y._f.deps && (!Array.isArray(y._f.deps) || y._f.deps.length > 0) && me(y._f.deps), ce(l, re, D, Be));
938
938
  }
939
939
  }, ye = (s, a) => {
@@ -943,12 +943,12 @@ function mr(e = {}) {
943
943
  let l, m;
944
944
  const y = ke(s);
945
945
  if (r.resolver) {
946
- const d = await N(M(s) ? s : y);
946
+ const d = await j(B(s) ? s : y);
947
947
  l = Z(d), m = s ? !y.some((v) => h(d, v)) : l;
948
948
  } else s ? (m = (await Promise.all(y.map(async (d) => {
949
949
  const v = h(n, d);
950
- return await H(v && v._f ? { [d]: v } : v);
951
- }))).every(Boolean), !(!m && !t.isValid) && W()) : m = l = await H(n);
950
+ return await I(v && v._f ? { [d]: v } : v);
951
+ }))).every(Boolean), !(!m && !t.isValid) && $()) : m = l = await I(n);
952
952
  return b.state.next({
953
953
  ...!te(s) || (x.isValid || w.isValid) && l !== t.isValid ? {} : { name: s },
954
954
  ...r.resolver || !s ? { isValid: l } : {},
@@ -958,20 +958,20 @@ function mr(e = {}) {
958
958
  let l = {
959
959
  ...u.mount ? i : o
960
960
  };
961
- return a && (l = wt(a.dirtyFields ? t.dirtyFields : t.touchedFields, l)), M(s) ? l : te(s) ? h(l, s) : s.map((m) => h(l, m));
961
+ return a && (l = wt(a.dirtyFields ? t.dirtyFields : t.touchedFields, l)), B(s) ? l : te(s) ? h(l, s) : s.map((m) => h(l, m));
962
962
  }, g = (s, a) => ({
963
963
  invalid: !!h((a || t).errors, s),
964
964
  isDirty: !!h((a || t).dirtyFields, s),
965
965
  error: h((a || t).errors, s),
966
966
  isValidating: !!h(t.validatingFields, s),
967
967
  isTouched: !!h((a || t).touchedFields, s)
968
- }), j = (s) => {
969
- s && ke(s).forEach((a) => q(t.errors, a)), b.state.next({
968
+ }), P = (s) => {
969
+ s && ke(s).forEach((a) => z(t.errors, a)), b.state.next({
970
970
  errors: s ? t.errors : {}
971
971
  });
972
972
  }, L = (s, a, l) => {
973
- const m = (h(n, s, { _f: {} })._f || {}).ref, y = h(t.errors, s) || {}, { ref: d, message: v, type: T, ...D } = y;
974
- P(t.errors, s, {
973
+ const m = (h(n, s, { _f: {} })._f || {}).ref, y = h(t.errors, s) || {}, { ref: d, message: v, type: S, ...D } = y;
974
+ N(t.errors, s, {
975
975
  ...D,
976
976
  ...a,
977
977
  ref: m
@@ -991,30 +991,30 @@ function mr(e = {}) {
991
991
  defaultValues: o
992
992
  });
993
993
  }
994
- }).unsubscribe, U = (s) => (u.mount = !0, w = {
994
+ }).unsubscribe, M = (s) => (u.mount = !0, w = {
995
995
  ...w,
996
996
  ...s.formState
997
997
  }, xe({
998
998
  ...s,
999
999
  formState: {
1000
- ...O,
1000
+ ...T,
1001
1001
  ...s.formState
1002
1002
  }
1003
1003
  })), oe = (s, a = {}) => {
1004
1004
  for (const l of s ? ke(s) : f.mount)
1005
- f.mount.delete(l), f.array.delete(l), a.keepValue || (q(n, l), q(i, l)), !a.keepError && q(t.errors, l), !a.keepDirty && q(t.dirtyFields, l), !a.keepTouched && q(t.touchedFields, l), !a.keepIsValidating && q(t.validatingFields, l), !r.shouldUnregister && !a.keepDefaultValue && q(o, l);
1005
+ f.mount.delete(l), f.array.delete(l), a.keepValue || (z(n, l), z(i, l)), !a.keepError && z(t.errors, l), !a.keepDirty && z(t.dirtyFields, l), !a.keepTouched && z(t.touchedFields, l), !a.keepIsValidating && z(t.validatingFields, l), !r.shouldUnregister && !a.keepDefaultValue && z(o, l);
1006
1006
  b.state.next({
1007
1007
  values: J(i)
1008
1008
  }), b.state.next({
1009
1009
  ...t,
1010
1010
  ...a.keepDirty ? { isDirty: _() } : {}
1011
- }), !a.keepIsValid && W();
1011
+ }), !a.keepIsValid && $();
1012
1012
  }, Ee = ({ disabled: s, name: a }) => {
1013
1013
  (le(s) && u.mount || s || f.disabled.has(a)) && (s ? f.disabled.add(a) : f.disabled.delete(a));
1014
1014
  }, Ae = (s, a = {}) => {
1015
1015
  let l = h(n, s);
1016
1016
  const m = le(a.disabled) || le(r.disabled);
1017
- return P(n, s, {
1017
+ return N(n, s, {
1018
1018
  ...l || {},
1019
1019
  _f: {
1020
1020
  ...l && l._f ? l._f : { ref: { name: s } },
@@ -1041,15 +1041,15 @@ function mr(e = {}) {
1041
1041
  ref: (y) => {
1042
1042
  if (y) {
1043
1043
  Ae(s, a), l = h(n, s);
1044
- const d = M(y.value) && y.querySelectorAll && y.querySelectorAll("input,select,textarea")[0] || y, v = tr(d), T = l._f.refs || [];
1045
- if (v ? T.find((D) => D === d) : d === l._f.ref)
1044
+ const d = B(y.value) && y.querySelectorAll && y.querySelectorAll("input,select,textarea")[0] || y, v = tr(d), S = l._f.refs || [];
1045
+ if (v ? S.find((D) => D === d) : d === l._f.ref)
1046
1046
  return;
1047
- P(n, s, {
1047
+ N(n, s, {
1048
1048
  _f: {
1049
1049
  ...l._f,
1050
1050
  ...v ? {
1051
1051
  refs: [
1052
- ...T.filter(We),
1052
+ ...S.filter(We),
1053
1053
  d,
1054
1054
  ...Array.isArray(h(o, s)) ? [{}] : []
1055
1055
  ],
@@ -1076,13 +1076,13 @@ function mr(e = {}) {
1076
1076
  isSubmitting: !0
1077
1077
  }), r.resolver) {
1078
1078
  const { errors: d, values: v } = await se();
1079
- $(), t.errors = d, y = J(v);
1079
+ Y(), t.errors = d, y = J(v);
1080
1080
  } else
1081
- await H(n);
1081
+ await I(n);
1082
1082
  if (f.disabled.size)
1083
1083
  for (const d of f.disabled)
1084
- q(y, d);
1085
- if (q(t.errors, "root"), Z(t.errors)) {
1084
+ z(y, d);
1085
+ if (z(t.errors, "root"), Z(t.errors)) {
1086
1086
  b.state.next({
1087
1087
  errors: {}
1088
1088
  });
@@ -1102,7 +1102,7 @@ function mr(e = {}) {
1102
1102
  }), m)
1103
1103
  throw m;
1104
1104
  }, Nt = (s, a = {}) => {
1105
- h(n, s) && (M(a.defaultValue) ? X(s, J(h(o, s))) : (X(s, a.defaultValue), P(o, s, J(a.defaultValue))), a.keepTouched || q(t.touchedFields, s), a.keepDirty || (q(t.dirtyFields, s), t.isDirty = a.defaultValue ? _(s, J(h(o, s))) : _()), a.keepError || (q(t.errors, s), x.isValid && W()), b.state.next({ ...t }));
1105
+ h(n, s) && (B(a.defaultValue) ? X(s, J(h(o, s))) : (X(s, a.defaultValue), N(o, s, J(a.defaultValue))), a.keepTouched || z(t.touchedFields, s), a.keepDirty || (z(t.dirtyFields, s), t.isDirty = a.defaultValue ? _(s, J(h(o, s))) : _()), a.keepError || (z(t.errors, s), x.isValid && $()), b.state.next({ ...t }));
1106
1106
  }, et = (s, a = {}) => {
1107
1107
  const l = s ? J(s) : o, m = J(l), y = Z(s), d = y ? o : m;
1108
1108
  if (a.keepDefaultValues || (o = l), !a.keepValues) {
@@ -1111,14 +1111,14 @@ function mr(e = {}) {
1111
1111
  ...f.mount,
1112
1112
  ...Object.keys(Fe(o, i))
1113
1113
  ]);
1114
- for (const T of Array.from(v))
1115
- h(t.dirtyFields, T) ? P(d, T, h(i, T)) : X(T, h(d, T));
1114
+ for (const S of Array.from(v))
1115
+ h(t.dirtyFields, S) ? N(d, S, h(i, S)) : X(S, h(d, S));
1116
1116
  } else {
1117
- if (ze && M(s))
1117
+ if (ze && B(s))
1118
1118
  for (const v of f.mount) {
1119
- const T = h(n, v);
1120
- if (T && T._f) {
1121
- const D = Array.isArray(T._f.refs) ? T._f.refs[0] : T._f.ref;
1119
+ const S = h(n, v);
1120
+ if (S && S._f) {
1121
+ const D = Array.isArray(S._f.refs) ? S._f.refs[0] : S._f.ref;
1122
1122
  if (je(D)) {
1123
1123
  const re = D.closest("form");
1124
1124
  if (re) {
@@ -1181,15 +1181,15 @@ function mr(e = {}) {
1181
1181
  setError: L,
1182
1182
  _subscribe: xe,
1183
1183
  _runSchema: se,
1184
- _updateIsValidating: $,
1184
+ _updateIsValidating: Y,
1185
1185
  _focusError: Ue,
1186
1186
  _getWatch: p,
1187
1187
  _getDirty: _,
1188
- _setValid: W,
1188
+ _setValid: $,
1189
1189
  _setFieldArray: E,
1190
1190
  _setDisabledField: Ee,
1191
1191
  _setErrors: C,
1192
- _getFieldArray: I,
1192
+ _getFieldArray: U,
1193
1193
  _reset: et,
1194
1194
  _resetDefaultValues: () => ne(r.defaultValues) && r.defaultValues().then((s) => {
1195
1195
  tt(s, r.resetOptions), b.state.next({
@@ -1234,7 +1234,7 @@ function mr(e = {}) {
1234
1234
  };
1235
1235
  }
1236
1236
  },
1237
- subscribe: U,
1237
+ subscribe: M,
1238
1238
  trigger: me,
1239
1239
  register: Ae,
1240
1240
  handleSubmit: Ke,
@@ -1243,7 +1243,7 @@ function mr(e = {}) {
1243
1243
  getValues: c,
1244
1244
  reset: tt,
1245
1245
  resetField: Nt,
1246
- clearErrors: j,
1246
+ clearErrors: P,
1247
1247
  unregister: oe,
1248
1248
  setError: L,
1249
1249
  setFocus: Lt,
@@ -1360,8 +1360,8 @@ function _r(e, r) {
1360
1360
  const i = n.split(".");
1361
1361
  let u = t;
1362
1362
  i.forEach((f, F) => {
1363
- const A = F === i.length - 1, O = !isNaN(Number(f));
1364
- A ? u[f] = r[o] : (f in u || (u[f] = O ? [] : {}), u = u[f]);
1363
+ const A = F === i.length - 1, T = !isNaN(Number(f));
1364
+ A ? u[f] = r[o] : (f in u || (u[f] = T ? [] : {}), u = u[f]);
1365
1365
  });
1366
1366
  }), t;
1367
1367
  }
@@ -1441,10 +1441,10 @@ const Vr = R.memo((e) => {
1441
1441
  o(r.name, x);
1442
1442
  };
1443
1443
  return /* @__PURE__ */ V.jsxs("div", { children: [
1444
- u.map((A, O) => /* @__PURE__ */ V.jsxs("div", { children: [
1445
- /* @__PURE__ */ V.jsx(Vr, { baseName: r.name, index: O, fields: r.fields }),
1446
- !r.readonly && /* @__PURE__ */ V.jsx("button", { type: "button", onClick: () => F(O), children: "Remove" })
1447
- ] }, O)),
1444
+ u.map((A, T) => /* @__PURE__ */ V.jsxs("div", { children: [
1445
+ /* @__PURE__ */ V.jsx(Vr, { baseName: r.name, index: T, fields: r.fields }),
1446
+ !r.readonly && /* @__PURE__ */ V.jsx("button", { type: "button", onClick: () => F(T), children: "Remove" })
1447
+ ] }, T)),
1448
1448
  !r.readonly && /* @__PURE__ */ V.jsx("button", { type: "button", onClick: f, children: "Add Row" })
1449
1449
  ] });
1450
1450
  }, Ar = R.memo(Fr), wr = (e) => {
@@ -1458,13 +1458,13 @@ const Vr = R.memo((e) => {
1458
1458
  );
1459
1459
  return /* @__PURE__ */ V.jsx(Le, { schema: t });
1460
1460
  }, jt = ({ fieldSchema: e }) => {
1461
- var A, O;
1461
+ var A, T;
1462
1462
  const t = Dt().uiConfig, { register: n, control: o } = ge(), i = Qe(e.name), u = n(e.name), f = (A = t == null ? void 0 : t.renderersByName) == null ? void 0 : A[i];
1463
1463
  if (e.visible === !1)
1464
1464
  return null;
1465
1465
  if (f)
1466
1466
  return /* @__PURE__ */ V.jsx(f, { fieldSchema: e, control: o, register: u });
1467
- const F = (O = t == null ? void 0 : t.renderersByType) == null ? void 0 : O[e.type];
1467
+ const F = (T = t == null ? void 0 : t.renderersByType) == null ? void 0 : T[e.type];
1468
1468
  if (F)
1469
1469
  return /* @__PURE__ */ V.jsx(F, { fieldSchema: e, control: o, register: u });
1470
1470
  switch (e.type) {
@@ -1494,8 +1494,8 @@ const Vr = R.memo((e) => {
1494
1494
  if (!n.length) return;
1495
1495
  let F = !1;
1496
1496
  return (async () => {
1497
- var B;
1498
- const O = Qe(e.name), x = _r(o, i ?? []), w = (B = t == null ? void 0 : t.updateFieldSchema) == null ? void 0 : B[O];
1497
+ var W;
1498
+ const T = Qe(e.name), x = _r(o, i ?? []), w = (W = t == null ? void 0 : t.updateFieldSchema) == null ? void 0 : W[T];
1499
1499
  if (!w) return;
1500
1500
  const b = await w(e.name, e, x);
1501
1501
  !F && b && f({
@@ -1533,8 +1533,8 @@ const Or = (e) => {
1533
1533
  const f = i((F, { name: A = "" }) => {
1534
1534
  var w;
1535
1535
  t(F);
1536
- const O = Qe(A), x = Tr(A, F);
1537
- (w = n == null ? void 0 : n[O]) == null || w.call(n, A, x, F);
1536
+ const T = Qe(A), x = Tr(A, F);
1537
+ (w = n == null ? void 0 : n[T]) == null || w.call(n, A, x, F);
1538
1538
  });
1539
1539
  return () => f.unsubscribe();
1540
1540
  }, [i, t]), Ce(() => {
@@ -1566,50 +1566,54 @@ const Or = (e) => {
1566
1566
  hideSubmit: F = !1,
1567
1567
  onDirtyChange: A = () => {
1568
1568
  },
1569
- onValuesChange: O = () => {
1569
+ onValuesChange: T = () => {
1570
1570
  },
1571
1571
  resolver: x,
1572
1572
  readonly: w,
1573
1573
  onFieldChange: b = {},
1574
- loadingComponent: B
1575
- } = e, S = hr({
1574
+ loadingComponent: W
1575
+ } = e, O = hr({
1576
1576
  reValidateMode: "onSubmit",
1577
1577
  criteriaMode: "all",
1578
1578
  resolver: x
1579
- }), W = Et(!1), [$, E] = xt(!1), G = S.handleSubmit(n), C = ve(() => {
1580
- let N = t;
1581
- return w && (N = Ct(N)), N;
1579
+ }), $ = Et(!1), [Y, E] = xt(!1), G = O.handleSubmit(n), C = ve(() => {
1580
+ let j = t;
1581
+ return w && (j = Ct(j)), j;
1582
1582
  }, [w, t]);
1583
1583
  Ce(() => {
1584
1584
  if (!f) return;
1585
- let N = !1;
1585
+ let j = !1;
1586
1586
  return (async () => {
1587
- if (W.current) return;
1587
+ if ($.current) return;
1588
1588
  E(!1);
1589
1589
  const fe = await f();
1590
- N || (S.reset(Ne(t, fe), {
1590
+ j || (O.reset(Ne(t, fe), {
1591
1591
  keepErrors: !0,
1592
1592
  keepDirty: !1,
1593
1593
  keepTouched: !1
1594
- }), W.current = !0, E(!0));
1594
+ }), $.current = !0, E(!0));
1595
1595
  })(), () => {
1596
- N = !0;
1596
+ j = !0;
1597
1597
  };
1598
1598
  }, [t, f]), Yt(r, () => ({
1599
- submit: async () => {
1600
- if (!await S.trigger())
1601
- return { success: !1, errors: S.formState.errors };
1602
- const H = S.getValues();
1603
- return await n(H), { success: !0 };
1604
- },
1605
- reset: (N) => {
1606
- S.reset(N ? Ne(t, N) : void 0);
1599
+ submit: () => new Promise((j) => {
1600
+ O.handleSubmit(
1601
+ async (I) => {
1602
+ await n(I), j({ success: !0, errors: {} });
1603
+ },
1604
+ (I) => {
1605
+ j({ success: !1, errors: I });
1606
+ }
1607
+ )();
1608
+ }),
1609
+ reset: (j) => {
1610
+ O.reset(j ? Ne(t, j) : void 0);
1607
1611
  },
1608
- getValues: () => S.getValues(),
1609
- setValue: (N, H) => {
1610
- S.setValue(N, H);
1612
+ getValues: () => O.getValues(),
1613
+ setValue: (j, I) => {
1614
+ O.setValue(j, I);
1611
1615
  },
1612
- getErrors: () => S.formState.errors
1616
+ getErrors: () => O.formState.errors
1613
1617
  }));
1614
1618
  const k = F || w, ee = ve(() => o, [o]), ce = ve(() => i, [i]), se = ve(
1615
1619
  () => ({
@@ -1619,12 +1623,12 @@ const Or = (e) => {
1619
1623
  }),
1620
1624
  [u, o, i]
1621
1625
  );
1622
- return $ ? /* @__PURE__ */ V.jsxs(Qt, { ...S, children: [
1626
+ return Y ? /* @__PURE__ */ V.jsxs(Qt, { ...O, children: [
1623
1627
  /* @__PURE__ */ V.jsx(
1624
1628
  Dr,
1625
1629
  {
1626
1630
  onDirtyChange: A,
1627
- onValuesChange: O,
1631
+ onValuesChange: T,
1628
1632
  onFieldChange: b
1629
1633
  }
1630
1634
  ),
@@ -1650,7 +1654,7 @@ const Or = (e) => {
1650
1654
  ]
1651
1655
  }
1652
1656
  )
1653
- ] }) : /* @__PURE__ */ V.jsx(V.Fragment, { children: B ?? /* @__PURE__ */ V.jsx(
1657
+ ] }) : /* @__PURE__ */ V.jsx(V.Fragment, { children: W ?? /* @__PURE__ */ V.jsx(
1654
1658
  "div",
1655
1659
  {
1656
1660
  style: {