finform-react-builder 1.11.0 → 1.12.0

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
@@ -15,8 +15,8 @@ var Qn = (e, t, r, n) => ({
15
15
  });
16
16
  import { jsx as p, jsxs as te, Fragment as Ii } from "react/jsx-runtime";
17
17
  import * as ie from "react";
18
- import le, { isValidElement as oi, cloneElement as si, Children as xu, useState as Ft, useMemo as Ye, useRef as bt, useEffect as Vt, useCallback as $e, useReducer as bu, forwardRef as wu, useImperativeHandle as Su, Fragment as Cu, createElement as Eu } from "react";
19
- import { InputAdornment as ku, Box as K, Typography as me, TextField as Mi, FormControl as oo, InputLabel as Tu, Select as Au, MenuItem as Bo, CircularProgress as xn, OutlinedInput as Ou, FormHelperText as so, Autocomplete as Fu, Checkbox as $n, FormControlLabel as nn, FormLabel as Pl, Switch as Dl, RadioGroup as _u, Radio as Ru, Divider as lo, Button as Qe, Chip as co, StepConnector as Il, stepConnectorClasses as gr, Stepper as Ml, Step as jl, StepLabel as zl, Card as mt, List as qo, ListItem as Wo, ListItemText as Uo, Tabs as $u, Tab as Pu, TableContainer as Du, Table as Iu, TableHead as Mu, TableRow as Ho, TableCell as Ur, TableBody as ju, IconButton as ji, CardContent as zu, Tooltip as li, Dialog as Vu, DialogTitle as Nu, DialogContent as Lu, DialogActions as Bu, LinearProgress as qu, ButtonGroup as Wu, createTheme as Uu, ThemeProvider as Hu, Paper as Ku, Alert as Yu } from "@mui/material";
18
+ import le, { isValidElement as oi, cloneElement as si, Children as xu, useState as Ft, useMemo as Qe, useRef as bt, useEffect as Vt, useCallback as $e, useReducer as bu, forwardRef as wu, useImperativeHandle as Su, Fragment as Cu, createElement as Eu } from "react";
19
+ import { InputAdornment as ku, Box as K, Typography as me, TextField as Mi, FormControl as oo, InputLabel as Tu, Select as Au, MenuItem as Bo, CircularProgress as xn, OutlinedInput as Ou, FormHelperText as so, Autocomplete as Fu, Checkbox as $n, FormControlLabel as nn, FormLabel as Pl, Switch as Dl, RadioGroup as _u, Radio as Ru, Divider as lo, Button as Ge, Chip as co, StepConnector as Il, stepConnectorClasses as gr, Stepper as Ml, Step as jl, StepLabel as zl, Card as mt, List as qo, ListItem as Wo, ListItemText as Uo, Tabs as $u, Tab as Pu, TableContainer as Du, Table as Iu, TableHead as Mu, TableRow as Ho, TableCell as Ur, TableBody as ju, IconButton as ji, CardContent as zu, Tooltip as li, Dialog as Vu, DialogTitle as Nu, DialogContent as Lu, DialogActions as Bu, LinearProgress as qu, ButtonGroup as Wu, createTheme as Uu, ThemeProvider as Hu, Paper as Ku, Alert as Yu } from "@mui/material";
20
20
  import Qu from "@emotion/styled";
21
21
  import { ThemeContext as Gu, keyframes as Bn, css as Vl } from "@emotion/react";
22
22
  var qn = (e) => e.type === "checkbox", Or = (e) => e instanceof Date, ct = (e) => e == null;
@@ -291,9 +291,9 @@ function np(e) {
291
291
  return !1;
292
292
  return !0;
293
293
  }
294
- function Ke(e, t) {
294
+ function Ye(e, t) {
295
295
  const r = Array.isArray(t) ? t : zi(t) ? [t] : po(t), n = r.length === 1 ? e : rp(e, r), i = r.length - 1, a = r[i];
296
- return n && delete n[a], i !== 0 && (Ue(n) && lt(n) || Array.isArray(n) && np(n)) && Ke(e, r.slice(0, -1)), e;
296
+ return n && delete n[a], i !== 0 && (Ue(n) && lt(n) || Array.isArray(n) && np(n)) && Ye(e, r.slice(0, -1)), e;
297
297
  }
298
298
  var Ql = (e) => {
299
299
  for (const t in e)
@@ -415,7 +415,7 @@ var sp = (e, t, r, n) => {
415
415
  r(e);
416
416
  const { name: i, ...a } = e;
417
417
  return lt(a) || Object.keys(a).length >= Object.keys(t).length || Object.keys(a).find((o) => t[o] === (!n || _t.all));
418
- }, lp = (e, t, r) => !e || !t || e === t || gt(e).some((n) => n && (r ? n === t : n.startsWith(t) || t.startsWith(n))), cp = (e, t, r, n, i) => i.isOnAll ? !1 : !r && i.isOnTouch ? !(t || e) : (r ? n.isOnBlur : i.isOnBlur) ? !e : (r ? n.isOnChange : i.isOnChange) ? e : !0, up = (e, t) => !Vi(ee(e, t)).length && Ke(e, t), ec = (e, t, r) => {
418
+ }, lp = (e, t, r) => !e || !t || e === t || gt(e).some((n) => n && (r ? n === t : n.startsWith(t) || t.startsWith(n))), cp = (e, t, r, n, i) => i.isOnAll ? !1 : !r && i.isOnTouch ? !(t || e) : (r ? n.isOnBlur : i.isOnBlur) ? !e : (r ? n.isOnChange : i.isOnChange) ? e : !0, up = (e, t) => !Vi(ee(e, t)).length && Ye(e, t), ec = (e, t, r) => {
419
419
  const n = gt(ee(e, r));
420
420
  return Ce(n, "root", t[r]), Ce(e, r, n), e;
421
421
  }, ci = (e) => Kt(e);
@@ -574,7 +574,7 @@ function dp(e = {}) {
574
574
  }
575
575
  }, w = (b, k) => {
576
576
  !t.disabled && (f.isValidating || f.validatingFields || d.isValidating || d.validatingFields) && ((b || Array.from(s.mount)).forEach((g) => {
577
- g && (k ? Ce(r.validatingFields, g, k) : Ke(r.validatingFields, g));
577
+ g && (k ? Ce(r.validatingFields, g, k) : Ye(r.validatingFields, g));
578
578
  }), c.state.next({
579
579
  validatingFields: r.validatingFields,
580
580
  isValidating: !lt(r.validatingFields)
@@ -626,7 +626,7 @@ function dp(e = {}) {
626
626
  if (!g || M) {
627
627
  (f.isDirty || d.isDirty) && (N = r.isDirty, r.isDirty = U.isDirty = I(), F = N !== U.isDirty);
628
628
  const z = sr(ee(i, b), k);
629
- N = !!ee(r.dirtyFields, b), z ? Ke(r.dirtyFields, b) : Ce(r.dirtyFields, b, !0), U.dirtyFields = r.dirtyFields, F = F || (f.dirtyFields || d.dirtyFields) && N !== !z;
629
+ N = !!ee(r.dirtyFields, b), z ? Ye(r.dirtyFields, b) : Ce(r.dirtyFields, b, !0), U.dirtyFields = r.dirtyFields, F = F || (f.dirtyFields || d.dirtyFields) && N !== !z;
630
630
  }
631
631
  if (g) {
632
632
  const z = ee(r.touchedFields, b);
@@ -637,7 +637,7 @@ function dp(e = {}) {
637
637
  return F ? U : {};
638
638
  }, _ = (b, k, g, M) => {
639
639
  const x = ee(r.errors, b), F = (f.isValid || d.isValid) && xt(k) && r.isValid !== k;
640
- if (t.delayError && g ? (l = C(() => T(b, g)), l(t.delayError)) : (clearTimeout(u), l = null, g ? Ce(r.errors, b, g) : Ke(r.errors, b)), (g ? !sr(x, g) : x) || !lt(M) || F) {
640
+ if (t.delayError && g ? (l = C(() => T(b, g)), l(t.delayError)) : (clearTimeout(u), l = null, g ? Ce(r.errors, b, g) : Ye(r.errors, b)), (g ? !sr(x, g) : x) || !lt(M) || F) {
641
641
  const N = {
642
642
  ...M,
643
643
  ...F && xt(k) ? { isValid: k } : {},
@@ -658,7 +658,7 @@ function dp(e = {}) {
658
658
  if (b)
659
659
  for (const g of b) {
660
660
  const M = ee(k, g);
661
- M ? Ce(r.errors, g, M) : Ke(r.errors, g);
661
+ M ? Ce(r.errors, g, M) : Ye(r.errors, g);
662
662
  }
663
663
  else
664
664
  r.errors = k;
@@ -676,7 +676,7 @@ function dp(e = {}) {
676
676
  const he = await Oa(x, s.disabled, a, y, t.shouldUseNativeValidation && !k, U);
677
677
  if (z && f.validatingFields && w([M]), he[F.name] && (g.valid = !1, k))
678
678
  break;
679
- !k && (ee(he, F.name) ? U ? ec(r.errors, he, F.name) : Ce(r.errors, F.name, he[F.name]) : Ke(r.errors, F.name));
679
+ !k && (ee(he, F.name) ? U ? ec(r.errors, he, F.name) : Ce(r.errors, F.name, he[F.name]) : Ye(r.errors, F.name));
680
680
  }
681
681
  !lt(N) && await H(N, k, g);
682
682
  }
@@ -734,22 +734,22 @@ function dp(e = {}) {
734
734
  let z, he;
735
735
  const ve = k.type ? Zo(x._f) : Ll(b), xe = b.type === gi.BLUR || b.type === gi.FOCUS_OUT, Ae = !op(x._f) && !t.resolver && !ee(r.errors, g) && !x._f.deps || cp(xe, ee(r.touchedFields, g), r.isSubmitted, U, N), Me = Aa(g, s, xe);
736
736
  Ce(a, g, ve), xe ? (x._f.onBlur && x._f.onBlur(b), l && l(0)) : x._f.onChange && x._f.onChange(b);
737
- const et = S(g, ve, xe), vt = !lt(et) || Me;
737
+ const tt = S(g, ve, xe), vt = !lt(tt) || Me;
738
738
  if (!xe && c.state.next({
739
739
  name: g,
740
740
  type: b.type,
741
741
  values: je(a)
742
742
  }), Ae)
743
- return (f.isValid || d.isValid) && (t.mode === "onBlur" ? xe && m() : xe || m()), vt && c.state.next({ name: g, ...Me ? {} : et });
743
+ return (f.isValid || d.isValid) && (t.mode === "onBlur" ? xe && m() : xe || m()), vt && c.state.next({ name: g, ...Me ? {} : tt });
744
744
  if (!xe && Me && c.state.next({ ...r }), t.resolver) {
745
745
  const { errors: Le } = await D([g]);
746
746
  if (F(ve), M) {
747
- const ne = Jo(r.errors, n, g), Xe = Jo(Le, n, ne.name || g);
748
- z = Xe.error, g = Xe.name, he = lt(Le);
747
+ const ne = Jo(r.errors, n, g), Je = Jo(Le, n, ne.name || g);
748
+ z = Je.error, g = Je.name, he = lt(Le);
749
749
  }
750
750
  } else
751
751
  w([g], !0), z = (await Oa(x, s.disabled, a, y, t.shouldUseNativeValidation))[g], w([g]), F(ve), M && (z ? he = !1 : (f.isValid || d.isValid) && (he = await H(n, !0)));
752
- M && (x._f.deps && $(x._f.deps), _(g, he, z, et));
752
+ M && (x._f.deps && $(x._f.deps), _(g, he, z, tt));
753
753
  }
754
754
  }, fe = (b, k) => {
755
755
  if (ee(r.errors, k) && b.focus)
@@ -781,7 +781,7 @@ function dp(e = {}) {
781
781
  isValidating: !!ee(r.validatingFields, b),
782
782
  isTouched: !!ee((k || r).touchedFields, b)
783
783
  }), pe = (b) => {
784
- b && gt(b).forEach((k) => Ke(r.errors, k)), c.state.next({
784
+ b && gt(b).forEach((k) => Ye(r.errors, k)), c.state.next({
785
785
  errors: b ? r.errors : {}
786
786
  });
787
787
  }, ge = (b, k, g) => {
@@ -799,7 +799,7 @@ function dp(e = {}) {
799
799
  next: (g) => b(L(void 0, k), g)
800
800
  }) : L(b, k, !0), re = (b) => c.state.subscribe({
801
801
  next: (k) => {
802
- lp(b.name, k.name, b.exact) && sp(k, b.formState || f, Ze, b.reRenderRoot) && b.callback({
802
+ lp(b.name, k.name, b.exact) && sp(k, b.formState || f, Xe, b.reRenderRoot) && b.callback({
803
803
  values: { ...a },
804
804
  ...r,
805
805
  ...k
@@ -813,7 +813,7 @@ function dp(e = {}) {
813
813
  formState: d
814
814
  })), J = (b, k = {}) => {
815
815
  for (const g of b ? gt(b) : s.mount)
816
- s.mount.delete(g), s.array.delete(g), k.keepValue || (Ke(n, g), Ke(a, g)), !k.keepError && Ke(r.errors, g), !k.keepDirty && Ke(r.dirtyFields, g), !k.keepTouched && Ke(r.touchedFields, g), !k.keepIsValidating && Ke(r.validatingFields, g), !t.shouldUnregister && !k.keepDefaultValue && Ke(i, g);
816
+ s.mount.delete(g), s.array.delete(g), k.keepValue || (Ye(n, g), Ye(a, g)), !k.keepError && Ye(r.errors, g), !k.keepDirty && Ye(r.dirtyFields, g), !k.keepTouched && Ye(r.touchedFields, g), !k.keepIsValidating && Ye(r.validatingFields, g), !t.shouldUnregister && !k.keepDefaultValue && Ye(i, g);
817
817
  c.state.next({
818
818
  values: je(a)
819
819
  }), c.state.next({
@@ -893,7 +893,7 @@ function dp(e = {}) {
893
893
  if (s.disabled.size)
894
894
  for (const F of s.disabled)
895
895
  Ce(x, F, void 0);
896
- if (Ke(r.errors, "root"), lt(r.errors)) {
896
+ if (Ye(r.errors, "root"), lt(r.errors)) {
897
897
  c.state.next({
898
898
  errors: {}
899
899
  });
@@ -913,8 +913,8 @@ function dp(e = {}) {
913
913
  }), M)
914
914
  throw M;
915
915
  }, Ne = (b, k = {}) => {
916
- ee(n, b) && (Pe(k.defaultValue) ? Q(b, je(ee(i, b))) : (Q(b, k.defaultValue), Ce(i, b, je(k.defaultValue))), k.keepTouched || Ke(r.touchedFields, b), k.keepDirty || (Ke(r.dirtyFields, b), r.isDirty = k.defaultValue ? I(b, je(ee(i, b))) : I()), k.keepError || (Ke(r.errors, b), f.isValid && m()), c.state.next({ ...r }));
917
- }, Ge = (b, k = {}) => {
916
+ ee(n, b) && (Pe(k.defaultValue) ? Q(b, je(ee(i, b))) : (Q(b, k.defaultValue), Ce(i, b, je(k.defaultValue))), k.keepTouched || Ye(r.touchedFields, b), k.keepDirty || (Ye(r.dirtyFields, b), r.isDirty = k.defaultValue ? I(b, je(ee(i, b))) : I()), k.keepError || (Ye(r.errors, b), f.isValid && m()), c.state.next({ ...r }));
917
+ }, Ze = (b, k = {}) => {
918
918
  const g = b ? je(b) : i, M = je(g), x = lt(b), F = x ? i : M;
919
919
  if (k.keepDefaultValues || (i = g), !k.keepValues) {
920
920
  if (k.keepDirtyValues) {
@@ -966,18 +966,18 @@ function dp(e = {}) {
966
966
  isSubmitSuccessful: k.keepIsSubmitSuccessful ? r.isSubmitSuccessful : !1,
967
967
  isSubmitting: !1
968
968
  });
969
- }, rt = (b, k) => Ge(jt(b) ? b(a) : b, k), Pt = (b, k = {}) => {
969
+ }, nt = (b, k) => Ze(jt(b) ? b(a) : b, k), Pt = (b, k = {}) => {
970
970
  const g = ee(n, b), M = g && g._f;
971
971
  if (M) {
972
972
  const x = M.refs ? M.refs[0] : M.ref;
973
973
  x.focus && (x.focus(), k.shouldSelect && jt(x.select) && x.select());
974
974
  }
975
- }, Ze = (b) => {
975
+ }, Xe = (b) => {
976
976
  r = {
977
977
  ...r,
978
978
  ...b
979
979
  };
980
- }, Je = {
980
+ }, Ke = {
981
981
  control: {
982
982
  register: ce,
983
983
  unregister: J,
@@ -994,9 +994,9 @@ function dp(e = {}) {
994
994
  _setDisabledField: oe,
995
995
  _setErrors: P,
996
996
  _getFieldArray: Y,
997
- _reset: Ge,
997
+ _reset: Ze,
998
998
  _resetDefaultValues: () => jt(t.defaultValues) && t.defaultValues().then((b) => {
999
- rt(b, t.resetOptions), c.state.next({
999
+ nt(b, t.resetOptions), c.state.next({
1000
1000
  isLoading: !1
1001
1001
  });
1002
1002
  }),
@@ -1045,7 +1045,7 @@ function dp(e = {}) {
1045
1045
  watch: de,
1046
1046
  setValue: Q,
1047
1047
  getValues: B,
1048
- reset: rt,
1048
+ reset: nt,
1049
1049
  resetField: Ne,
1050
1050
  clearErrors: pe,
1051
1051
  unregister: J,
@@ -1054,8 +1054,8 @@ function dp(e = {}) {
1054
1054
  getFieldState: G
1055
1055
  };
1056
1056
  return {
1057
- ...Je,
1058
- formControl: Je
1057
+ ...Ke,
1058
+ formControl: Ke
1059
1059
  };
1060
1060
  }
1061
1061
  var nr = () => {
@@ -1154,7 +1154,7 @@ function hp(e) {
1154
1154
  if (r._options.resolver)
1155
1155
  r._runSchema([n]).then((_) => {
1156
1156
  const D = ee(_.errors, n), R = ee(r._formState.errors, n);
1157
- (R ? !D && R.type || D && (R.type !== D.type || R.message !== D.message) : D && D.type) && (D ? Ce(r._formState.errors, n, D) : Ke(r._formState.errors, n), r._subjects.state.next({
1157
+ (R ? !D && R.type || D && (R.type !== D.type || R.message !== D.message) : D && D.type) && (D ? Ce(r._formState.errors, n, D) : Ye(r._formState.errors, n), r._subjects.state.next({
1158
1158
  errors: r._formState.errors
1159
1159
  }));
1160
1160
  });
@@ -1698,7 +1698,7 @@ function Op() {
1698
1698
  }
1699
1699
  };
1700
1700
  }
1701
- var tt = Op(), Rr, Tl, sc = (Tl = class {
1701
+ var rt = Op(), Rr, Tl, sc = (Tl = class {
1702
1702
  constructor() {
1703
1703
  ye(this, Rr);
1704
1704
  }
@@ -1719,7 +1719,7 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1719
1719
  clearGcTimeout() {
1720
1720
  O(this, Rr) && (clearTimeout(O(this, Rr)), se(this, Rr, void 0));
1721
1721
  }
1722
- }, Rr = new WeakMap(), Tl), un, $r, kt, Pr, nt, zn, Dr, It, Jt, Al, Fp = (Al = class extends sc {
1722
+ }, Rr = new WeakMap(), Tl), un, $r, kt, Pr, it, zn, Dr, It, Jt, Al, Fp = (Al = class extends sc {
1723
1723
  constructor(t) {
1724
1724
  super();
1725
1725
  ye(this, It);
@@ -1727,7 +1727,7 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1727
1727
  ye(this, $r);
1728
1728
  ye(this, kt);
1729
1729
  ye(this, Pr);
1730
- ye(this, nt);
1730
+ ye(this, it);
1731
1731
  ye(this, zn);
1732
1732
  ye(this, Dr);
1733
1733
  se(this, Dr, !1), se(this, zn, t.defaultOptions), this.setOptions(t.options), this.observers = [], se(this, Pr, t.client), se(this, kt, O(this, Pr).getQueryCache()), this.queryKey = t.queryKey, this.queryHash = t.queryHash, se(this, un, _p(this.options)), this.state = t.state ?? O(this, un), this.scheduleGc();
@@ -1737,7 +1737,7 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1737
1737
  }
1738
1738
  get promise() {
1739
1739
  var t;
1740
- return (t = O(this, nt)) == null ? void 0 : t.promise;
1740
+ return (t = O(this, it)) == null ? void 0 : t.promise;
1741
1741
  }
1742
1742
  setOptions(t) {
1743
1743
  this.options = { ...O(this, zn), ...t }, this.updateGcTime(this.options.gcTime);
@@ -1759,8 +1759,8 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1759
1759
  }
1760
1760
  cancel(t) {
1761
1761
  var n, i;
1762
- const r = (n = O(this, nt)) == null ? void 0 : n.promise;
1763
- return (i = O(this, nt)) == null || i.cancel(t), r ? r.then(ft).catch(ft) : Promise.resolve();
1762
+ const r = (n = O(this, it)) == null ? void 0 : n.promise;
1763
+ return (i = O(this, it)) == null || i.cancel(t), r ? r.then(ft).catch(ft) : Promise.resolve();
1764
1764
  }
1765
1765
  destroy() {
1766
1766
  super.destroy(), this.cancel({ silent: !0 });
@@ -1792,18 +1792,18 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1792
1792
  onFocus() {
1793
1793
  var r;
1794
1794
  const t = this.observers.find((n) => n.shouldFetchOnWindowFocus());
1795
- t == null || t.refetch({ cancelRefetch: !1 }), (r = O(this, nt)) == null || r.continue();
1795
+ t == null || t.refetch({ cancelRefetch: !1 }), (r = O(this, it)) == null || r.continue();
1796
1796
  }
1797
1797
  onOnline() {
1798
1798
  var r;
1799
1799
  const t = this.observers.find((n) => n.shouldFetchOnReconnect());
1800
- t == null || t.refetch({ cancelRefetch: !1 }), (r = O(this, nt)) == null || r.continue();
1800
+ t == null || t.refetch({ cancelRefetch: !1 }), (r = O(this, it)) == null || r.continue();
1801
1801
  }
1802
1802
  addObserver(t) {
1803
1803
  this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), O(this, kt).notify({ type: "observerAdded", query: this, observer: t }));
1804
1804
  }
1805
1805
  removeObserver(t) {
1806
- this.observers.includes(t) && (this.observers = this.observers.filter((r) => r !== t), this.observers.length || (O(this, nt) && (O(this, Dr) ? O(this, nt).cancel({ revert: !0 }) : O(this, nt).cancelRetry()), this.scheduleGc()), O(this, kt).notify({ type: "observerRemoved", query: this, observer: t }));
1806
+ this.observers.includes(t) && (this.observers = this.observers.filter((r) => r !== t), this.observers.length || (O(this, it) && (O(this, Dr) ? O(this, it).cancel({ revert: !0 }) : O(this, it).cancelRetry()), this.scheduleGc()), O(this, kt).notify({ type: "observerRemoved", query: this, observer: t }));
1807
1807
  }
1808
1808
  getObserversCount() {
1809
1809
  return this.observers.length;
@@ -1816,8 +1816,8 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1816
1816
  if (this.state.fetchStatus !== "idle") {
1817
1817
  if (this.state.data !== void 0 && (r != null && r.cancelRefetch))
1818
1818
  this.cancel({ silent: !0 });
1819
- else if (O(this, nt))
1820
- return O(this, nt).continueRetry(), O(this, nt).promise;
1819
+ else if (O(this, it))
1820
+ return O(this, it).continueRetry(), O(this, it).promise;
1821
1821
  }
1822
1822
  if (t && this.setOptions(t), !this.options.queryFn) {
1823
1823
  const c = this.observers.find((y) => y.options.queryFn);
@@ -1873,7 +1873,7 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1873
1873
  this
1874
1874
  )), this.scheduleGc();
1875
1875
  };
1876
- return se(this, nt, oc({
1876
+ return se(this, it, oc({
1877
1877
  initialPromise: r == null ? void 0 : r.initialPromise,
1878
1878
  fn: s.fetchFn,
1879
1879
  abort: n.abort.bind(n),
@@ -1912,9 +1912,9 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1912
1912
  retryDelay: s.options.retryDelay,
1913
1913
  networkMode: s.options.networkMode,
1914
1914
  canRun: () => !0
1915
- })), O(this, nt).start();
1915
+ })), O(this, it).start();
1916
1916
  }
1917
- }, un = new WeakMap(), $r = new WeakMap(), kt = new WeakMap(), Pr = new WeakMap(), nt = new WeakMap(), zn = new WeakMap(), Dr = new WeakMap(), It = new WeakSet(), Jt = function(t) {
1917
+ }, un = new WeakMap(), $r = new WeakMap(), kt = new WeakMap(), Pr = new WeakMap(), it = new WeakMap(), zn = new WeakMap(), Dr = new WeakMap(), It = new WeakSet(), Jt = function(t) {
1918
1918
  const r = (n) => {
1919
1919
  switch (t.type) {
1920
1920
  case "failed":
@@ -1978,7 +1978,7 @@ var tt = Op(), Rr, Tl, sc = (Tl = class {
1978
1978
  };
1979
1979
  }
1980
1980
  };
1981
- this.state = r(this.state), tt.batch(() => {
1981
+ this.state = r(this.state), rt.batch(() => {
1982
1982
  this.observers.forEach((n) => {
1983
1983
  n.onQueryUpdate();
1984
1984
  }), O(this, kt).notify({ query: this, type: "updated", action: t });
@@ -2041,7 +2041,7 @@ var qt, Ol, Rp = (Ol = class extends Wn {
2041
2041
  r && (t.destroy(), r === t && O(this, qt).delete(t.queryHash), this.notify({ type: "removed", query: t }));
2042
2042
  }
2043
2043
  clear() {
2044
- tt.batch(() => {
2044
+ rt.batch(() => {
2045
2045
  this.getAll().forEach((t) => {
2046
2046
  this.remove(t);
2047
2047
  });
@@ -2064,21 +2064,21 @@ var qt, Ol, Rp = (Ol = class extends Wn {
2064
2064
  return Object.keys(t).length > 0 ? r.filter((n) => is(t, n)) : r;
2065
2065
  }
2066
2066
  notify(t) {
2067
- tt.batch(() => {
2067
+ rt.batch(() => {
2068
2068
  this.listeners.forEach((r) => {
2069
2069
  r(t);
2070
2070
  });
2071
2071
  });
2072
2072
  }
2073
2073
  onFocus() {
2074
- tt.batch(() => {
2074
+ rt.batch(() => {
2075
2075
  this.getAll().forEach((t) => {
2076
2076
  t.onFocus();
2077
2077
  });
2078
2078
  });
2079
2079
  }
2080
2080
  onOnline() {
2081
- tt.batch(() => {
2081
+ rt.batch(() => {
2082
2082
  this.getAll().forEach((t) => {
2083
2083
  t.onOnline();
2084
2084
  });
@@ -2261,7 +2261,7 @@ var qt, Ol, Rp = (Ol = class extends Wn {
2261
2261
  };
2262
2262
  }
2263
2263
  };
2264
- this.state = r(this.state), tt.batch(() => {
2264
+ this.state = r(this.state), rt.batch(() => {
2265
2265
  O(this, Wt).forEach((n) => {
2266
2266
  n.onMutationUpdate(t);
2267
2267
  }), O(this, ot).notify({
@@ -2344,7 +2344,7 @@ var er, Mt, Vn, _l, Dp = (_l = class extends Wn {
2344
2344
  return Promise.resolve();
2345
2345
  }
2346
2346
  clear() {
2347
- tt.batch(() => {
2347
+ rt.batch(() => {
2348
2348
  O(this, er).forEach((t) => {
2349
2349
  this.notify({ type: "removed", mutation: t });
2350
2350
  }), O(this, er).clear(), O(this, Mt).clear();
@@ -2363,7 +2363,7 @@ var er, Mt, Vn, _l, Dp = (_l = class extends Wn {
2363
2363
  return this.getAll().filter((r) => as(t, r));
2364
2364
  }
2365
2365
  notify(t) {
2366
- tt.batch(() => {
2366
+ rt.batch(() => {
2367
2367
  this.listeners.forEach((r) => {
2368
2368
  r(t);
2369
2369
  });
@@ -2371,7 +2371,7 @@ var er, Mt, Vn, _l, Dp = (_l = class extends Wn {
2371
2371
  }
2372
2372
  resumePausedMutations() {
2373
2373
  const t = this.getAll().filter((r) => r.state.isPaused);
2374
- return tt.batch(
2374
+ return rt.batch(
2375
2375
  () => Promise.all(
2376
2376
  t.map((r) => r.continue().catch(ft))
2377
2377
  )
@@ -2523,7 +2523,7 @@ var We, ur, pr, pn, dn, dr, fn, hn, Rl, Mp = (Rl = class {
2523
2523
  return O(this, We).build(this, n).setData(o, { ...r, manual: !0 });
2524
2524
  }
2525
2525
  setQueriesData(e, t, r) {
2526
- return tt.batch(
2526
+ return rt.batch(
2527
2527
  () => O(this, We).findAll(e).map(({ queryKey: n }) => [
2528
2528
  n,
2529
2529
  this.setQueryData(n, t, r)
@@ -2539,7 +2539,7 @@ var We, ur, pr, pn, dn, dr, fn, hn, Rl, Mp = (Rl = class {
2539
2539
  }
2540
2540
  removeQueries(e) {
2541
2541
  const t = O(this, We);
2542
- tt.batch(() => {
2542
+ rt.batch(() => {
2543
2543
  t.findAll(e).forEach((r) => {
2544
2544
  t.remove(r);
2545
2545
  });
@@ -2547,7 +2547,7 @@ var We, ur, pr, pn, dn, dr, fn, hn, Rl, Mp = (Rl = class {
2547
2547
  }
2548
2548
  resetQueries(e, t) {
2549
2549
  const r = O(this, We);
2550
- return tt.batch(() => (r.findAll(e).forEach((n) => {
2550
+ return rt.batch(() => (r.findAll(e).forEach((n) => {
2551
2551
  n.reset();
2552
2552
  }), this.refetchQueries(
2553
2553
  {
@@ -2558,13 +2558,13 @@ var We, ur, pr, pn, dn, dr, fn, hn, Rl, Mp = (Rl = class {
2558
2558
  )));
2559
2559
  }
2560
2560
  cancelQueries(e, t = {}) {
2561
- const r = { revert: !0, ...t }, n = tt.batch(
2561
+ const r = { revert: !0, ...t }, n = rt.batch(
2562
2562
  () => O(this, We).findAll(e).map((i) => i.cancel(r))
2563
2563
  );
2564
2564
  return Promise.all(n).then(ft).catch(ft);
2565
2565
  }
2566
2566
  invalidateQueries(e, t = {}) {
2567
- return tt.batch(() => (O(this, We).findAll(e).forEach((r) => {
2567
+ return rt.batch(() => (O(this, We).findAll(e).forEach((r) => {
2568
2568
  r.invalidate();
2569
2569
  }), (e == null ? void 0 : e.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
2570
2570
  {
@@ -2578,7 +2578,7 @@ var We, ur, pr, pn, dn, dr, fn, hn, Rl, Mp = (Rl = class {
2578
2578
  const r = {
2579
2579
  ...t,
2580
2580
  cancelRefetch: t.cancelRefetch ?? !0
2581
- }, n = tt.batch(
2581
+ }, n = rt.batch(
2582
2582
  () => O(this, We).findAll(e).filter((i) => !i.isDisabled() && !i.isStatic()).map((i) => {
2583
2583
  let a = i.fetch(void 0, r);
2584
2584
  return r.throwOnError || (a = a.catch(ft)), i.state.fetchStatus === "paused" ? Promise.resolve() : a;
@@ -2921,7 +2921,7 @@ var We, ur, pr, pn, dn, dr, fn, hn, Rl, Mp = (Rl = class {
2921
2921
  const r = O(this, we);
2922
2922
  se(this, we, t), se(this, Nn, t.state), this.hasListeners() && (r == null || r.removeObserver(this), t.addObserver(this));
2923
2923
  }, cc = function(t) {
2924
- tt.batch(() => {
2924
+ rt.batch(() => {
2925
2925
  t.listeners && this.listeners.forEach((r) => {
2926
2926
  r(O(this, st));
2927
2927
  }), O(this, dt).getQueryCache().notify({
@@ -3020,7 +3020,7 @@ function Xp(e, t, r) {
3020
3020
  if (ie.useSyncExternalStore(
3021
3021
  ie.useCallback(
3022
3022
  (w) => {
3023
- const v = f ? l.subscribe(tt.batchCalls(w)) : ft;
3023
+ const v = f ? l.subscribe(rt.batchCalls(w)) : ft;
3024
3024
  return l.updateResult(), v;
3025
3025
  },
3026
3026
  [l, f]
@@ -3160,24 +3160,24 @@ function td() {
3160
3160
  var Ne = Z.$$typeof;
3161
3161
  switch (Ne) {
3162
3162
  case t:
3163
- var Ge = Z.type;
3164
- switch (Ge) {
3163
+ var Ze = Z.type;
3164
+ switch (Ze) {
3165
3165
  case l:
3166
3166
  case u:
3167
3167
  case n:
3168
3168
  case a:
3169
3169
  case i:
3170
3170
  case d:
3171
- return Ge;
3171
+ return Ze;
3172
3172
  default:
3173
- var rt = Ge && Ge.$$typeof;
3174
- switch (rt) {
3173
+ var nt = Ze && Ze.$$typeof;
3174
+ switch (nt) {
3175
3175
  case s:
3176
3176
  case f:
3177
3177
  case C:
3178
3178
  case y:
3179
3179
  case o:
3180
- return rt;
3180
+ return nt;
3181
3181
  default:
3182
3182
  return Ne;
3183
3183
  }
@@ -7951,23 +7951,23 @@ const wm = Br("MuiButtonBase", ["root", "disabled", "focusVisible"]), Sm = (e) =
7951
7951
  Gs(g.target) || pe(!1), m && m(g);
7952
7952
  }, !1), Ne = pi((g) => {
7953
7953
  fe.current || (fe.current = g.currentTarget), Gs(g.target) && (pe(!0), A && A(g)), P && P(g);
7954
- }), Ge = () => {
7954
+ }), Ze = () => {
7955
7955
  const g = fe.current;
7956
7956
  return l && l !== "button" && !(g.tagName === "A" && g.href);
7957
- }, rt = pi((g) => {
7957
+ }, nt = pi((g) => {
7958
7958
  c && !g.repeat && G && g.key === " " && $.stop(g, () => {
7959
7959
  $.start(g);
7960
- }), g.target === g.currentTarget && Ge() && g.key === " " && g.preventDefault(), S && S(g), g.target === g.currentTarget && Ge() && g.key === "Enter" && !u && (g.preventDefault(), w && w(g));
7960
+ }), g.target === g.currentTarget && Ze() && g.key === " " && g.preventDefault(), S && S(g), g.target === g.currentTarget && Ze() && g.key === "Enter" && !u && (g.preventDefault(), w && w(g));
7961
7961
  }), Pt = pi((g) => {
7962
7962
  c && g.key === " " && G && !g.defaultPrevented && $.stop(g, () => {
7963
7963
  $.pulsate(g);
7964
- }), _ && _(g), w && g.target === g.currentTarget && Ge() && g.key === " " && !g.defaultPrevented && w(g);
7964
+ }), _ && _(g), w && g.target === g.currentTarget && Ze() && g.key === " " && !g.defaultPrevented && w(g);
7965
7965
  });
7966
- let Ze = l;
7967
- Ze === "button" && (ae.href || ae.to) && (Ze = C);
7968
- const at = {};
7969
- Ze === "button" ? (at.type = Q === void 0 ? "button" : Q, at.disabled = u) : (!ae.href && !ae.to && (at.role = "button"), u && (at["aria-disabled"] = u));
7970
- const Je = Qs(r, fe), b = {
7966
+ let Xe = l;
7967
+ Xe === "button" && (ae.href || ae.to) && (Xe = C);
7968
+ const et = {};
7969
+ Xe === "button" ? (et.type = Q === void 0 ? "button" : Q, et.disabled = u) : (!ae.href && !ae.to && (et.role = "button"), u && (et["aria-disabled"] = u));
7970
+ const Ke = Qs(r, fe), b = {
7971
7971
  ...n,
7972
7972
  centerRipple: a,
7973
7973
  component: l,
@@ -7979,14 +7979,14 @@ const wm = Br("MuiButtonBase", ["root", "disabled", "focusVisible"]), Sm = (e) =
7979
7979
  focusVisible: G
7980
7980
  }, k = Sm(b);
7981
7981
  return /* @__PURE__ */ te(Cm, {
7982
- as: Ze,
7982
+ as: Xe,
7983
7983
  className: ut(k.root, s),
7984
7984
  ownerState: b,
7985
7985
  onBlur: Z,
7986
7986
  onClick: w,
7987
7987
  onContextMenu: re,
7988
7988
  onFocus: Ne,
7989
- onKeyDown: rt,
7989
+ onKeyDown: nt,
7990
7990
  onKeyUp: Pt,
7991
7991
  onMouseDown: de,
7992
7992
  onMouseLeave: oe,
@@ -7995,10 +7995,10 @@ const wm = Br("MuiButtonBase", ["root", "disabled", "focusVisible"]), Sm = (e) =
7995
7995
  onTouchEnd: ue,
7996
7996
  onTouchMove: Se,
7997
7997
  onTouchStart: ce,
7998
- ref: Je,
7998
+ ref: Ke,
7999
7999
  tabIndex: u ? -1 : Y,
8000
8000
  type: Q,
8001
- ...at,
8001
+ ...et,
8002
8002
  ...ae,
8003
8003
  children: [o, ge ? /* @__PURE__ */ p(Ic, {
8004
8004
  ref: B,
@@ -8749,7 +8749,7 @@ const el = yt(/* @__PURE__ */ p("path", {
8749
8749
  800: Zt(e, r, 0.3),
8750
8750
  900: Zt(e, r, 0.42)
8751
8751
  };
8752
- }, qy = Po(X.primary.main), Wy = Po(X.secondary.main), it = Po(X.text.primary), Uy = {
8752
+ }, qy = Po(X.primary.main), Wy = Po(X.secondary.main), at = Po(X.text.primary), Uy = {
8753
8753
  primary: X.primary.main,
8754
8754
  secondary: X.secondary.main,
8755
8755
  textPrimary: X.text.primary,
@@ -8827,8 +8827,8 @@ const el = yt(/* @__PURE__ */ p("path", {
8827
8827
  backgroundColor: X.background.paper,
8828
8828
  borderRadius: "8px",
8829
8829
  "& fieldset": { borderColor: X.divider },
8830
- "&:hover fieldset": { borderColor: it[300] },
8831
- "&.Mui-focused fieldset": { borderColor: it[400] },
8830
+ "&:hover fieldset": { borderColor: at[300] },
8831
+ "&.Mui-focused fieldset": { borderColor: at[400] },
8832
8832
  "&.Mui-error fieldset": { borderColor: X.error.main }
8833
8833
  },
8834
8834
  "& .MuiInputBase-input": {
@@ -8956,10 +8956,10 @@ const el = yt(/* @__PURE__ */ p("path", {
8956
8956
  borderColor: X.divider
8957
8957
  },
8958
8958
  "&:hover .MuiOutlinedInput-notchedOutline": {
8959
- borderColor: it[300]
8959
+ borderColor: at[300]
8960
8960
  },
8961
8961
  "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
8962
- borderColor: it[400]
8962
+ borderColor: at[400]
8963
8963
  },
8964
8964
  "&.Mui-error .MuiOutlinedInput-notchedOutline": {
8965
8965
  borderColor: X.error.main
@@ -8981,11 +8981,11 @@ const el = yt(/* @__PURE__ */ p("path", {
8981
8981
  fontSize: 14,
8982
8982
  mx: 1,
8983
8983
  "&:hover": {
8984
- backgroundColor: it[50],
8984
+ backgroundColor: at[50],
8985
8985
  borderRadius: "4px"
8986
8986
  },
8987
8987
  "&.Mui-selected": {
8988
- backgroundColor: it[50],
8988
+ backgroundColor: at[50],
8989
8989
  borderRadius: "4px"
8990
8990
  }
8991
8991
  },
@@ -9078,8 +9078,8 @@ const el = yt(/* @__PURE__ */ p("path", {
9078
9078
  borderRadius: "8px",
9079
9079
  height: "40px",
9080
9080
  "& fieldset": { borderColor: X.divider },
9081
- "&:hover fieldset": { borderColor: it[300] },
9082
- "&.Mui-focused fieldset": { borderColor: it[400] },
9081
+ "&:hover fieldset": { borderColor: at[300] },
9082
+ "&.Mui-focused fieldset": { borderColor: at[400] },
9083
9083
  "&.Mui-error fieldset": { borderColor: X.error.main }
9084
9084
  },
9085
9085
  "& .MuiInputBase-input": {
@@ -9097,36 +9097,40 @@ const el = yt(/* @__PURE__ */ p("path", {
9097
9097
  },
9098
9098
  getOptionLabel: (w) => typeof w == "string" ? w : (w == null ? void 0 : w.label) ?? "",
9099
9099
  isOptionEqualToValue: (w, v) => ((w == null ? void 0 : w.value) ?? w) === ((v == null ? void 0 : v.value) ?? v),
9100
- renderOption: (w, v, { selected: T }) => /* @__PURE__ */ te(
9101
- K,
9102
- {
9103
- component: "li",
9104
- ...w,
9105
- sx: {
9106
- backgroundColor: X.background.paper,
9107
- color: X.text.primary,
9108
- mx: 0.5,
9109
- borderRadius: "4px",
9110
- "&:hover": { backgroundColor: it[50] },
9111
- "&.Mui-focused": { backgroundColor: it[50] },
9112
- ...T ? { backgroundColor: it[50] } : {}
9100
+ renderOption: (w, v, { selected: T }) => {
9101
+ const { key: P, ...A } = w;
9102
+ return /* @__PURE__ */ te(
9103
+ K,
9104
+ {
9105
+ component: "li",
9106
+ ...A,
9107
+ sx: {
9108
+ backgroundColor: X.background.paper,
9109
+ color: X.text.primary,
9110
+ mx: 0.5,
9111
+ borderRadius: "4px",
9112
+ "&:hover": { backgroundColor: at[50] },
9113
+ "&.Mui-focused": { backgroundColor: at[50] },
9114
+ ...T ? { backgroundColor: at[50] } : {}
9115
+ },
9116
+ children: [
9117
+ n && /* @__PURE__ */ p($n, { checked: T }),
9118
+ /* @__PURE__ */ p(
9119
+ me,
9120
+ {
9121
+ variant: "body2",
9122
+ sx: {
9123
+ color: X.text.primary,
9124
+ fontSize: 14
9125
+ },
9126
+ children: typeof v == "string" ? v : v.label
9127
+ }
9128
+ )
9129
+ ]
9113
9130
  },
9114
- children: [
9115
- n && /* @__PURE__ */ p($n, { checked: T }),
9116
- /* @__PURE__ */ p(
9117
- me,
9118
- {
9119
- variant: "body2",
9120
- sx: {
9121
- color: X.text.primary,
9122
- fontSize: 14
9123
- },
9124
- children: typeof v == "string" ? v : v.label
9125
- }
9126
- )
9127
- ]
9128
- }
9129
- ),
9131
+ P
9132
+ );
9133
+ },
9130
9134
  renderInput: (w) => /* @__PURE__ */ p(
9131
9135
  Mi,
9132
9136
  {
@@ -9574,8 +9578,8 @@ const el = yt(/* @__PURE__ */ p("path", {
9574
9578
  backgroundColor: X.background.paper,
9575
9579
  borderRadius: "8px",
9576
9580
  "& fieldset": { borderColor: X.divider },
9577
- "&:hover fieldset": { borderColor: it[300] },
9578
- "&.Mui-focused fieldset": { borderColor: it[400] },
9581
+ "&:hover fieldset": { borderColor: at[300] },
9582
+ "&.Mui-focused fieldset": { borderColor: at[400] },
9579
9583
  "&.Mui-error fieldset": { borderColor: X.error.main }
9580
9584
  },
9581
9585
  "& .MuiInputBase-input": { color: X.text.primary, fontSize: 14 },
@@ -9718,7 +9722,7 @@ function qm({
9718
9722
  }
9719
9723
  ),
9720
9724
  C && /* @__PURE__ */ p(
9721
- Qe,
9725
+ Ge,
9722
9726
  {
9723
9727
  variant: "outlined",
9724
9728
  startIcon: /* @__PURE__ */ p(_n, {}),
@@ -10088,7 +10092,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10088
10092
  }
10089
10093
  )
10090
10094
  ] }),
10091
- i === l && /* @__PURE__ */ p(Qe, { sx: { display: l > t ? "none" : "block" }, variant: l < t ? "outlined" : "contained", size: "small", color: "primary", children: l < t ? "Edit" : l === t ? "Complete" : "" })
10095
+ i === l && /* @__PURE__ */ p(Ge, { sx: { display: l > t ? "none" : "block" }, variant: l < t ? "outlined" : "contained", size: "small", color: "primary", children: l < t ? "Edit" : l === t ? "Complete" : "" })
10092
10096
  ]
10093
10097
  }
10094
10098
  ),
@@ -10432,7 +10436,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10432
10436
  }
10433
10437
  ),
10434
10438
  Array.isArray(d) && d.length > 0 ? d.map((q, Q) => /* @__PURE__ */ p(
10435
- Qe,
10439
+ Ge,
10436
10440
  {
10437
10441
  variant: "outlined",
10438
10442
  size: "small",
@@ -10445,7 +10449,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10445
10449
  },
10446
10450
  `empty-add-${Q}`
10447
10451
  )) : n && /* @__PURE__ */ p(
10448
- Qe,
10452
+ Ge,
10449
10453
  {
10450
10454
  variant: "outlined",
10451
10455
  size: "small",
@@ -10472,7 +10476,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10472
10476
  borderBottom: "1px solid #E5E6EB"
10473
10477
  },
10474
10478
  children: Array.isArray(d) && d.length > 0 ? d.map((q, Q) => /* @__PURE__ */ p(
10475
- Qe,
10479
+ Ge,
10476
10480
  {
10477
10481
  variant: Q === 0 ? "contained" : "outlined",
10478
10482
  size: "small",
@@ -10496,7 +10500,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10496
10500
  },
10497
10501
  `add-${Q}`
10498
10502
  )) : n && /* @__PURE__ */ p(
10499
- Qe,
10503
+ Ge,
10500
10504
  {
10501
10505
  variant: "contained",
10502
10506
  size: "small",
@@ -11037,7 +11041,7 @@ const Wm = Et(Il)(({ theme: e }) => {
11037
11041
  sx: {
11038
11042
  color: X.error.main,
11039
11043
  "&:hover": {
11040
- bgcolor: it[50]
11044
+ bgcolor: at[50]
11041
11045
  }
11042
11046
  },
11043
11047
  size: "small",
@@ -11286,7 +11290,7 @@ const Wm = Et(Il)(({ theme: e }) => {
11286
11290
  color: s.includes(c) ? X.primary.contrastText : X.text.primary,
11287
11291
  border: `1px solid ${X.divider}`,
11288
11292
  "&:hover": {
11289
- bgcolor: s.includes(c) ? it[600] : it[50]
11293
+ bgcolor: s.includes(c) ? at[600] : at[50]
11290
11294
  }
11291
11295
  }
11292
11296
  },
@@ -11445,11 +11449,11 @@ async function Xm(e, t, r, n) {
11445
11449
  }
11446
11450
  }
11447
11451
  function Jm(e, t, r, n, i = !1) {
11448
- const a = Ye(() => {
11452
+ const a = Qe(() => {
11449
11453
  if (!(e != null && e.dependsOn) || !n) return null;
11450
11454
  const s = n[e.dependsOn];
11451
11455
  return s !== void 0 ? s : null;
11452
- }, [e == null ? void 0 : e.dependsOn, n]), o = Ye(() => [
11456
+ }, [e == null ? void 0 : e.dependsOn, n]), o = Qe(() => [
11453
11457
  "api-data",
11454
11458
  e == null ? void 0 : e.endpoint,
11455
11459
  e == null ? void 0 : e.method,
@@ -11573,7 +11577,7 @@ const qc = ({
11573
11577
  ),
11574
11578
  e.name
11575
11579
  ]);
11576
- const R = Ye(() => {
11580
+ const R = Qe(() => {
11577
11581
  const W = Bc(e);
11578
11582
  return W && Array.isArray(e.passThroughFields) && (W.passThroughFields = e.passThroughFields), W;
11579
11583
  }, [
@@ -11585,11 +11589,11 @@ const qc = ({
11585
11589
  e.depends_on,
11586
11590
  e.conditional,
11587
11591
  e.passThroughFields
11588
- ]), H = bt(null), h = R != null && R.dependsOn ? a == null ? void 0 : a[R.dependsOn] : null, I = Ye(() => {
11592
+ ]), H = bt(null), h = R != null && R.dependsOn ? a == null ? void 0 : a[R.dependsOn] : null, I = Qe(() => {
11589
11593
  if (!(R != null && R.dependsOn)) return !1;
11590
11594
  const W = h, J = H.current, oe = W !== J;
11591
11595
  return oe && (H.current = W), oe;
11592
- }, [R == null ? void 0 : R.dependsOn, h]), L = Ye(() => {
11596
+ }, [R == null ? void 0 : R.dependsOn, h]), L = Qe(() => {
11593
11597
  const W = e.showWhen;
11594
11598
  if (typeof W == "function")
11595
11599
  try {
@@ -11665,7 +11669,7 @@ const qc = ({
11665
11669
  return;
11666
11670
  }
11667
11671
  return W;
11668
- }, [e, a, t, o]), q = Ye(() => u && Xr(e) && (!(R != null && R.dependsOn) || h), [u, e, R == null ? void 0 : R.dependsOn, h]), Q = Ye(() => {
11672
+ }, [e, a, t, o]), q = Qe(() => u && Xr(e) && (!(R != null && R.dependsOn) || h), [u, e, R == null ? void 0 : R.dependsOn, h]), Q = Qe(() => {
11669
11673
  const W = {};
11670
11674
  if (!a) return W;
11671
11675
  const J = (R == null ? void 0 : R.endpoint) || (e == null ? void 0 : e.api_endpoint);
@@ -11738,7 +11742,7 @@ const qc = ({
11738
11742
  }
11739
11743
  );
11740
11744
  case "finuiHeader":
11741
- const Z = e.actionName, Ne = e.actionComponent, Ge = e.actionLabel, rt = (k) => /* @__PURE__ */ p(
11745
+ const Z = e.actionName, Ne = e.actionComponent, Ze = e.actionLabel, nt = (k) => /* @__PURE__ */ p(
11742
11746
  Bm,
11743
11747
  {
11744
11748
  title: e.title || e.label,
@@ -11766,25 +11770,25 @@ const qc = ({
11766
11770
  name: Z,
11767
11771
  control: t,
11768
11772
  defaultValue: e.value ?? !1,
11769
- render: ({ field: k }) => rt(
11773
+ render: ({ field: k }) => nt(
11770
11774
  Ne === "switch" ? /* @__PURE__ */ p(
11771
11775
  Za,
11772
11776
  {
11773
- label: Ge,
11777
+ label: Ze,
11774
11778
  checked: !!k.value,
11775
11779
  onChange: k.onChange
11776
11780
  }
11777
11781
  ) : /* @__PURE__ */ p(
11778
11782
  xr,
11779
11783
  {
11780
- label: Ge || "",
11784
+ label: Ze || "",
11781
11785
  checked: !!k.value,
11782
11786
  onChange: k.onChange
11783
11787
  }
11784
11788
  )
11785
11789
  )
11786
11790
  }
11787
- ) : rt()
11791
+ ) : nt()
11788
11792
  );
11789
11793
  case "tabs":
11790
11794
  return /* @__PURE__ */ p(
@@ -11840,7 +11844,7 @@ const qc = ({
11840
11844
  return /* @__PURE__ */ p(K, { sx: { mt: 1 }, children: z.map((xe, Ae) => {
11841
11845
  const Me = xe.find(
11842
11846
  (Le) => Le.type === "section"
11843
- ), et = (Me == null ? void 0 : Me.cardWrap) !== !1, vt = /* @__PURE__ */ p(Ii, { children: xe.map((Le) => {
11847
+ ), tt = (Me == null ? void 0 : Me.cardWrap) !== !1, vt = /* @__PURE__ */ p(Ii, { children: xe.map((Le) => {
11844
11848
  const ne = Le.showWhen;
11845
11849
  if (ne)
11846
11850
  try {
@@ -11854,14 +11858,14 @@ const qc = ({
11854
11858
  }
11855
11859
  } catch {
11856
11860
  }
11857
- const Xe = Math.min(
11861
+ const Je = Math.min(
11858
11862
  Math.max(Le.col ?? 12, 1),
11859
11863
  12
11860
11864
  );
11861
11865
  return /* @__PURE__ */ p(
11862
11866
  K,
11863
11867
  {
11864
- sx: { gridColumn: `span ${Xe}` },
11868
+ sx: { gridColumn: `span ${Je}` },
11865
11869
  children: /* @__PURE__ */ p(
11866
11870
  qc,
11867
11871
  {
@@ -11878,7 +11882,7 @@ const qc = ({
11878
11882
  Le.name
11879
11883
  );
11880
11884
  }) });
11881
- return et ? /* @__PURE__ */ p(
11885
+ return tt ? /* @__PURE__ */ p(
11882
11886
  mt,
11883
11887
  {
11884
11888
  sx: {
@@ -11910,13 +11914,13 @@ const qc = ({
11910
11914
  }
11911
11915
  );
11912
11916
  case "grid":
11913
- const Ze = e.defaultRows || [];
11917
+ const Xe = e.defaultRows || [];
11914
11918
  return /* @__PURE__ */ p(K, { children: /* @__PURE__ */ p(
11915
11919
  Ie,
11916
11920
  {
11917
11921
  name: e.name,
11918
11922
  control: t,
11919
- defaultValue: Ze.length > 0 ? Ze : _() || [],
11923
+ defaultValue: Xe.length > 0 ? Xe : _() || [],
11920
11924
  render: () => /* @__PURE__ */ p(
11921
11925
  Qm,
11922
11926
  {
@@ -12083,30 +12087,33 @@ const qc = ({
12083
12087
  }
12084
12088
  );
12085
12089
  case "select":
12086
- const at = pe();
12090
+ const et = pe();
12087
12091
  return /* @__PURE__ */ p(
12088
12092
  Ie,
12089
12093
  {
12090
12094
  name: e.name,
12091
12095
  control: t,
12092
12096
  defaultValue: _(),
12093
- render: ({ field: k }) => /* @__PURE__ */ p(
12094
- Do,
12095
- {
12096
- labelText: e.labelPosition === "top" ? S(e.label) : void 0,
12097
- label: e.labelPosition !== "top" && e.labelPosition !== "none" ? S(e.label) : void 0,
12098
- labelVariant: e.labelVariant,
12099
- value: k.value,
12100
- onChange: k.onChange,
12101
- options: at,
12102
- disabled: e.disabled || fe,
12103
- placeholder: e.labelPosition === "inner" || e.labelPosition === "none" || !e.labelPosition ? e.placeholder || (e.labelPosition === "none" ? S(e.label) : void 0) : e.placeholder,
12104
- loading: fe,
12105
- error: l || !!$,
12106
- helperText: (s == null ? void 0 : s.message) || ($ == null ? void 0 : $.message) || e.helperText,
12107
- onOpen: B
12108
- }
12109
- )
12097
+ render: ({ field: k }) => {
12098
+ const g = typeof e.disabled == "function" ? !!e.disabled(a || {}) : !!e.disabled, M = e.disableWhenEmptyOptions === !0 && Array.isArray(et) && et.length === 0, x = g || M || fe;
12099
+ return /* @__PURE__ */ p(
12100
+ Do,
12101
+ {
12102
+ labelText: e.labelPosition === "top" ? S(e.label) : void 0,
12103
+ label: e.labelPosition !== "top" && e.labelPosition !== "none" ? S(e.label) : void 0,
12104
+ labelVariant: e.labelVariant,
12105
+ value: k.value,
12106
+ onChange: k.onChange,
12107
+ options: et,
12108
+ disabled: x,
12109
+ placeholder: e.labelPosition === "inner" || e.labelPosition === "none" || !e.labelPosition ? e.placeholder || (e.labelPosition === "none" ? S(e.label) : void 0) : e.placeholder,
12110
+ loading: fe,
12111
+ error: l || !!$,
12112
+ helperText: (s == null ? void 0 : s.message) || ($ == null ? void 0 : $.message) || e.helperText,
12113
+ onOpen: B
12114
+ }
12115
+ );
12116
+ }
12110
12117
  }
12111
12118
  );
12112
12119
  case "checkbox":
@@ -12216,7 +12223,7 @@ const qc = ({
12216
12223
  }
12217
12224
  );
12218
12225
  case "autocomplete":
12219
- const Je = pe(), b = !!(e.disabled || fe || R != null && R.dependsOn && !h);
12226
+ const Ke = pe(), b = !!((typeof e.disabled == "function" ? e.disabled(a || {}, { options: Ke, isLoading: fe, error: $ }) : e.disabled) || e.disableWhenEmptyOptions === !0 && Array.isArray(Ke) && Ke.length === 0 || fe || R != null && R.dependsOn && !h);
12220
12227
  return /* @__PURE__ */ p(
12221
12228
  Ie,
12222
12229
  {
@@ -12239,7 +12246,7 @@ const qc = ({
12239
12246
  }, U = (() => {
12240
12247
  if (M)
12241
12248
  return (Array.isArray(g) ? g : []).map((he) => {
12242
- const ve = Je.find((xe) => {
12249
+ const ve = Ke.find((xe) => {
12243
12250
  const Ae = N(xe);
12244
12251
  return Ae !== void 0 && Ae === he;
12245
12252
  });
@@ -12253,7 +12260,7 @@ const qc = ({
12253
12260
  {
12254
12261
  if (g == null || g === "")
12255
12262
  return null;
12256
- const z = Je.find(
12263
+ const z = Ke.find(
12257
12264
  (he) => {
12258
12265
  const ve = N(he);
12259
12266
  return ve !== void 0 && ve === g;
@@ -12271,7 +12278,7 @@ const qc = ({
12271
12278
  Vm,
12272
12279
  {
12273
12280
  id: e.id,
12274
- options: Je,
12281
+ options: Ke,
12275
12282
  value: U,
12276
12283
  multiple: M,
12277
12284
  labelText: e.labelPosition === "top" ? S(e.label) : void 0,
@@ -12289,7 +12296,7 @@ const qc = ({
12289
12296
  noOptionsText: b && (R != null && R.dependsOn) && !h ? `Please select ${R.dependsOn.replace(
12290
12297
  /_/g,
12291
12298
  " "
12292
- )} first` : fe ? "Fetching data..." : u && !fe && Je.length === 0 ? "No options available" : "Click to load options",
12299
+ )} first` : fe ? "Fetching data..." : u && !fe && Ke.length === 0 ? "No options available" : "Click to load options",
12293
12300
  onChange: (z) => {
12294
12301
  const he = (R == null ? void 0 : R.valueField) || e.value_field || "value";
12295
12302
  if (M) {
@@ -12303,10 +12310,10 @@ const qc = ({
12303
12310
  for (const [Ae, Me] of Object.entries(
12304
12311
  xe
12305
12312
  )) {
12306
- const et = z[Me];
12307
- if (et !== void 0 && typeof o == "function")
12313
+ const tt = z[Me];
12314
+ if (tt !== void 0 && typeof o == "function")
12308
12315
  try {
12309
- o(Ae, et, {
12316
+ o(Ae, tt, {
12310
12317
  shouldDirty: !0,
12311
12318
  shouldTouch: !0,
12312
12319
  shouldValidate: !1
@@ -12363,7 +12370,7 @@ const qc = ({
12363
12370
  e.onPreview(g);
12364
12371
  } catch {
12365
12372
  }
12366
- }, et = () => {
12373
+ }, tt = () => {
12367
12374
  k.onChange(""), typeof e.onRemove == "function" && e.onRemove();
12368
12375
  }, vt = () => {
12369
12376
  typeof e.onSave == "function" && e.onSave({
@@ -12371,19 +12378,19 @@ const qc = ({
12371
12378
  file: P.current || void 0
12372
12379
  });
12373
12380
  }, Le = (ne) => {
12374
- const Xe = ne.target.files && ne.target.files[0];
12375
- if (Xe) {
12381
+ const Je = ne.target.files && ne.target.files[0];
12382
+ if (Je) {
12376
12383
  if (typeof e.onFileSelected == "function")
12377
12384
  try {
12378
- e.onFileSelected(Xe);
12385
+ e.onFileSelected(Je);
12379
12386
  } catch {
12380
12387
  }
12381
12388
  try {
12382
- const rr = URL.createObjectURL(Xe);
12389
+ const rr = URL.createObjectURL(Je);
12383
12390
  k.onChange(rr);
12384
12391
  } catch {
12385
12392
  }
12386
- P.current = Xe, v(!1);
12393
+ P.current = Je, v(!1);
12387
12394
  }
12388
12395
  };
12389
12396
  return /* @__PURE__ */ te(
@@ -12459,7 +12466,7 @@ const qc = ({
12459
12466
  ] }),
12460
12467
  /* @__PURE__ */ te(K, { sx: { display: "flex", gap: 1 }, children: [
12461
12468
  /* @__PURE__ */ p(
12462
- Qe,
12469
+ Ge,
12463
12470
  {
12464
12471
  type: "button",
12465
12472
  sx: { ...z.previewButtonSx },
@@ -12470,18 +12477,18 @@ const qc = ({
12470
12477
  }
12471
12478
  ),
12472
12479
  /* @__PURE__ */ p(
12473
- Qe,
12480
+ Ge,
12474
12481
  {
12475
12482
  variant: "outlined",
12476
12483
  color: "error",
12477
- onClick: et,
12484
+ onClick: tt,
12478
12485
  sx: { ...z.removeButtonSx },
12479
12486
  startIcon: /* @__PURE__ */ p(tl, {}),
12480
12487
  children: ve
12481
12488
  }
12482
12489
  ),
12483
12490
  Ae && /* @__PURE__ */ p(
12484
- Qe,
12491
+ Ge,
12485
12492
  {
12486
12493
  variant: "contained",
12487
12494
  onClick: vt,
@@ -12528,7 +12535,7 @@ const qc = ({
12528
12535
  ) }),
12529
12536
  /* @__PURE__ */ te(Bu, { children: [
12530
12537
  /* @__PURE__ */ p(
12531
- Qe,
12538
+ Ge,
12532
12539
  {
12533
12540
  type: "button",
12534
12541
  variant: "outlined",
@@ -12540,7 +12547,7 @@ const qc = ({
12540
12547
  }
12541
12548
  ),
12542
12549
  /* @__PURE__ */ p(
12543
- Qe,
12550
+ Ge,
12544
12551
  {
12545
12552
  type: "button",
12546
12553
  variant: "contained",
@@ -12639,7 +12646,7 @@ const qc = ({
12639
12646
  }
12640
12647
  ),
12641
12648
  /* @__PURE__ */ p(
12642
- Qe,
12649
+ Ge,
12643
12650
  {
12644
12651
  onClick: N,
12645
12652
  sx: { my: 2, ...M.buttonSx },
@@ -12688,7 +12695,7 @@ const qc = ({
12688
12695
  default:
12689
12696
  return null;
12690
12697
  }
12691
- }, de = Ye(() => !e.disabled || e.copyWhenDisabled === !1 ? !1 : !["title", "section", "image", "component"].includes(
12698
+ }, de = Qe(() => !e.disabled || e.copyWhenDisabled === !1 ? !1 : !["title", "section", "image", "component"].includes(
12692
12699
  e.type
12693
12700
  ), [e.disabled, e.copyWhenDisabled, e.type]), re = $e(async () => {
12694
12701
  try {
@@ -14516,10 +14523,10 @@ const Pg = (e) => {
14516
14523
  showStepTitles: i = !0,
14517
14524
  completedSteps: a = []
14518
14525
  }) => {
14519
- const o = Ye(
14526
+ const o = Qe(
14520
14527
  () => Array.from({ length: t }, (f, d) => d + 1),
14521
14528
  [t]
14522
- ), s = Ye(
14529
+ ), s = Qe(
14523
14530
  () => Math.round(e / t * 100),
14524
14531
  [e, t]
14525
14532
  ), l = (f) => n[f - 1] || `Step ${f}`, u = (f) => f === e || a.includes(f) || f === e + 1 && a.includes(e);
@@ -14645,7 +14652,7 @@ const Pg = (e) => {
14645
14652
  }, n = e.filter((s) => s.position === "left" || !s.position), i = e.filter((s) => s.position === "center"), a = e.filter((s) => s.position === "right"), o = (s, l) => {
14646
14653
  const u = (s.text || "").toLowerCase(), f = s.type === "submit" || u.includes("submit") || u.includes("save") || u.includes("next"), d = s.position === "left" || u.includes("cancel") || u.includes("back") || u.includes("draft"), c = s.type ? s.type : f ? "submit" : "button", y = d ? "outlined" : "contained", C = s.disabled || t;
14647
14654
  return /* @__PURE__ */ te(
14648
- Qe,
14655
+ Ge,
14649
14656
  {
14650
14657
  type: c,
14651
14658
  variant: y,
@@ -14685,7 +14692,7 @@ const Pg = (e) => {
14685
14692
  }, m = (v, T) => {
14686
14693
  const { buttonType: P, buttonVariant: A } = c(v), S = y(v.color);
14687
14694
  return /* @__PURE__ */ p(
14688
- Qe,
14695
+ Ge,
14689
14696
  {
14690
14697
  type: P,
14691
14698
  variant: A,
@@ -14837,7 +14844,7 @@ const Pg = (e) => {
14837
14844
  Vt(() => {
14838
14845
  G.current = i;
14839
14846
  }, [i]);
14840
- const pe = Ye(() => {
14847
+ const pe = Qe(() => {
14841
14848
  try {
14842
14849
  return JSON.stringify($);
14843
14850
  } catch {
@@ -14861,7 +14868,7 @@ const Pg = (e) => {
14861
14868
  const N = j[F];
14862
14869
  return typeof (N == null ? void 0 : N.message) == "string" ? N.message : `${F} is invalid`;
14863
14870
  }).length === 0;
14864
- }, re = Ye(() => {
14871
+ }, re = Qe(() => {
14865
14872
  if (!_) return !0;
14866
14873
  const g = r.filter((x) => x.step === R);
14867
14874
  for (const x of g)
@@ -14881,7 +14888,7 @@ const Pg = (e) => {
14881
14888
  for (const F of x.items || [])
14882
14889
  Array.isArray(F.fields) && M.push(...J(F.fields));
14883
14890
  return M;
14884
- }, []), oe = $e((g, M) => mi(g, M), []), ce = Ye(() => {
14891
+ }, []), oe = $e((g, M) => mi(g, M), []), ce = Qe(() => {
14885
14892
  if (_)
14886
14893
  return re;
14887
14894
  const g = mi(r, $);
@@ -14914,12 +14921,12 @@ const Pg = (e) => {
14914
14921
  if (z.type === "dragdroplist" && Array.isArray(he)) {
14915
14922
  const ve = z, xe = ve.serialize;
14916
14923
  if (!xe) continue;
14917
- const Ae = he, Me = typeof ve.getId == "function" ? ve.getId : typeof ve.getId == "string" ? (ne) => ne == null ? void 0 : ne[ve.getId] : (ne) => (ne == null ? void 0 : ne.id) ?? (ne == null ? void 0 : ne._id) ?? (ne == null ? void 0 : ne.key) ?? String(ne), et = typeof ve.getText == "function" ? ve.getText : typeof ve.getText == "string" ? (ne) => (ne == null ? void 0 : ne[ve.getText]) ?? String(ne) : (ne) => (ne == null ? void 0 : ne.text) ?? (ne == null ? void 0 : ne.label) ?? (ne == null ? void 0 : ne.name) ?? (ne == null ? void 0 : ne.title) ?? String(ne), vt = (() => {
14924
+ const Ae = he, Me = typeof ve.getId == "function" ? ve.getId : typeof ve.getId == "string" ? (ne) => ne == null ? void 0 : ne[ve.getId] : (ne) => (ne == null ? void 0 : ne.id) ?? (ne == null ? void 0 : ne._id) ?? (ne == null ? void 0 : ne.key) ?? String(ne), tt = typeof ve.getText == "function" ? ve.getText : typeof ve.getText == "string" ? (ne) => (ne == null ? void 0 : ne[ve.getText]) ?? String(ne) : (ne) => (ne == null ? void 0 : ne.text) ?? (ne == null ? void 0 : ne.label) ?? (ne == null ? void 0 : ne.name) ?? (ne == null ? void 0 : ne.title) ?? String(ne), vt = (() => {
14918
14925
  if (typeof ve.chipText == "function") return ve.chipText;
14919
- if (typeof ve.chipText == "string") return (ne, Xe) => ne == null ? void 0 : ne[ve.chipText];
14926
+ if (typeof ve.chipText == "string") return (ne, Je) => ne == null ? void 0 : ne[ve.chipText];
14920
14927
  })();
14921
14928
  let Le = he;
14922
- typeof xe == "function" ? Le = Ae.map((ne, Xe) => xe(ne, Xe)) : xe === "ids" ? Le = Ae.map((ne) => Me(ne)) : xe === "text" ? Le = Ae.map((ne) => et(ne)) : xe === "chips" ? Le = Ae.map((ne, Xe) => (typeof vt == "function" ? vt(ne, Xe) : void 0) ?? "") : xe && typeof xe == "object" && "field" in xe && (Le = Ae.map((ne) => ne == null ? void 0 : ne[xe.field])), N[z.name] = Le;
14929
+ typeof xe == "function" ? Le = Ae.map((ne, Je) => xe(ne, Je)) : xe === "ids" ? Le = Ae.map((ne) => Me(ne)) : xe === "text" ? Le = Ae.map((ne) => tt(ne)) : xe === "chips" ? Le = Ae.map((ne, Je) => (typeof vt == "function" ? vt(ne, Je) : void 0) ?? "") : xe && typeof xe == "object" && "field" in xe && (Le = Ae.map((ne) => ne == null ? void 0 : ne[xe.field])), N[z.name] = Le;
14923
14930
  }
14924
14931
  }
14925
14932
  return N;
@@ -14929,7 +14936,7 @@ const Pg = (e) => {
14929
14936
  g && (g.preventDefault(), g.stopPropagation()), _ && R < D && await de() && ue(R + 1);
14930
14937
  }, Ne = (g) => {
14931
14938
  g && (g.preventDefault(), g.stopPropagation()), _ && R > 1 && ue(R - 1);
14932
- }, Ge = (g) => g.col ? g.col : (g.xs || g.sm || g.md || g.lg || g.xl) && (g.xs || g.sm || g.md || g.lg || g.xl) || 12, rt = t ? Uu({
14939
+ }, Ze = (g) => g.col ? g.col : (g.xs || g.sm || g.md || g.lg || g.xl) && (g.xs || g.sm || g.md || g.lg || g.xl) || 12, nt = t ? Uu({
14933
14940
  palette: {
14934
14941
  primary: {
14935
14942
  main: t.primaryColor || "#1976d2"
@@ -15023,7 +15030,7 @@ const Pg = (e) => {
15023
15030
  },
15024
15031
  children: /* @__PURE__ */ te(K, { sx: { display: "flex", gap: 2 }, children: [
15025
15032
  _ && R > 1 && /* @__PURE__ */ p(
15026
- Qe,
15033
+ Ge,
15027
15034
  {
15028
15035
  type: "button",
15029
15036
  variant: "outlined",
@@ -15034,7 +15041,7 @@ const Pg = (e) => {
15034
15041
  _ ? (
15035
15042
  // Multi-step form: Show Next for non-final steps, Submit for final step
15036
15043
  R < D ? /* @__PURE__ */ p(
15037
- Qe,
15044
+ Ge,
15038
15045
  {
15039
15046
  type: "button",
15040
15047
  variant: "contained",
@@ -15045,7 +15052,7 @@ const Pg = (e) => {
15045
15052
  children: "Next"
15046
15053
  }
15047
15054
  ) : /* @__PURE__ */ p(
15048
- Qe,
15055
+ Ge,
15049
15056
  {
15050
15057
  type: "submit",
15051
15058
  variant: "contained",
@@ -15058,7 +15065,7 @@ const Pg = (e) => {
15058
15065
  ) : (
15059
15066
  // Single-step form: Show Submit button (disabled if invalid)
15060
15067
  /* @__PURE__ */ p(
15061
- Qe,
15068
+ Ge,
15062
15069
  {
15063
15070
  type: "submit",
15064
15071
  variant: "contained",
@@ -15072,13 +15079,13 @@ const Pg = (e) => {
15072
15079
  ] })
15073
15080
  }
15074
15081
  ) : null;
15075
- }, Ze = Ye(() => {
15082
+ }, Xe = Qe(() => {
15076
15083
  const g = [];
15077
15084
  let M = [];
15078
15085
  for (const x of h)
15079
15086
  x.type === "section" && M.length > 0 ? (g.push(M), M = [x]) : M.push(x);
15080
15087
  return M.length > 0 && g.push(M), g;
15081
- }, [h]), at = /* @__PURE__ */ te(
15088
+ }, [h]), et = /* @__PURE__ */ te(
15082
15089
  K,
15083
15090
  {
15084
15091
  component: "form",
@@ -15105,7 +15112,7 @@ const Pg = (e) => {
15105
15112
  showStepTitles: (A == null ? void 0 : A.showStepTitles) !== !1
15106
15113
  }
15107
15114
  ),
15108
- Ze.map((g, M) => {
15115
+ Xe.map((g, M) => {
15109
15116
  const x = g.find((he) => he.type === "section");
15110
15117
  if (x && !W(x, $))
15111
15118
  return null;
@@ -15128,7 +15135,7 @@ const Pg = (e) => {
15128
15135
  }, z = /* @__PURE__ */ p(Ii, { children: g.map((he) => {
15129
15136
  if (!W(he, $))
15130
15137
  return null;
15131
- const ve = Ge(he);
15138
+ const ve = Ze(he);
15132
15139
  return /* @__PURE__ */ p(K, { sx: { gridColumn: `span ${ve}` }, children: /* @__PURE__ */ p(
15133
15140
  qc,
15134
15141
  {
@@ -15155,7 +15162,7 @@ const Pg = (e) => {
15155
15162
  Pt()
15156
15163
  ]
15157
15164
  }
15158
- ), Je = m ? /* @__PURE__ */ p(
15165
+ ), Ke = m ? /* @__PURE__ */ p(
15159
15166
  mt,
15160
15167
  {
15161
15168
  sx: {
@@ -15166,10 +15173,10 @@ const Pg = (e) => {
15166
15173
  ...w
15167
15174
  },
15168
15175
  ...v,
15169
- children: at
15176
+ children: et
15170
15177
  }
15171
- ) : at;
15172
- return rt ? /* @__PURE__ */ p(Hu, { theme: rt, children: Je }) : Je;
15178
+ ) : et;
15179
+ return nt ? /* @__PURE__ */ p(Hu, { theme: nt, children: Ke }) : Ke;
15173
15180
  }, Xy = ({
15174
15181
  src: e,
15175
15182
  alt: t,
@@ -17098,13 +17105,13 @@ var ao = {
17098
17105
  fileRejections: []
17099
17106
  };
17100
17107
  function gu() {
17101
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = ze(ze({}, mu), e), r = t.accept, n = t.disabled, i = t.getFilesFromEvent, a = t.maxSize, o = t.minSize, s = t.multiple, l = t.maxFiles, u = t.onDragEnter, f = t.onDragLeave, d = t.onDragOver, c = t.onDrop, y = t.onDropAccepted, C = t.onDropRejected, m = t.onFileDialogCancel, w = t.onFileDialogOpen, v = t.useFsAccessApi, T = t.autoFocus, P = t.preventDropOnDocument, A = t.noClick, S = t.noKeyboard, _ = t.noDrag, D = t.noDragEventsBubbling, R = t.onError, H = t.validator, h = Ye(function() {
17108
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = ze(ze({}, mu), e), r = t.accept, n = t.disabled, i = t.getFilesFromEvent, a = t.maxSize, o = t.minSize, s = t.multiple, l = t.maxFiles, u = t.onDragEnter, f = t.onDragLeave, d = t.onDragOver, c = t.onDrop, y = t.onDropAccepted, C = t.onDropRejected, m = t.onFileDialogCancel, w = t.onFileDialogOpen, v = t.useFsAccessApi, T = t.autoFocus, P = t.preventDropOnDocument, A = t.noClick, S = t.noKeyboard, _ = t.noDrag, D = t.noDragEventsBubbling, R = t.onError, H = t.validator, h = Qe(function() {
17102
17109
  return vy(r);
17103
- }, [r]), I = Ye(function() {
17110
+ }, [r]), I = Qe(function() {
17104
17111
  return yy(r);
17105
- }, [r]), L = Ye(function() {
17112
+ }, [r]), L = Qe(function() {
17106
17113
  return typeof w == "function" ? w : Sl;
17107
- }, [w]), Y = Ye(function() {
17114
+ }, [w]), Y = Qe(function() {
17108
17115
  return typeof m == "function" ? m : Sl;
17109
17116
  }, [m]), j = bt(null), q = bt(null), Q = bu(Py, ao), ae = ka(Q, 2), fe = ae[0], $ = ae[1], B = fe.isFocused, G = fe.isFileDialogActive, pe = bt(typeof window < "u" && window.isSecureContext && v && gy()), ge = function() {
17110
17117
  !pe.current && G && setTimeout(function() {
@@ -17179,14 +17186,14 @@ function gu() {
17179
17186
  }, [j, f, D]), ue = $e(function(x, F) {
17180
17187
  var N = [], U = [];
17181
17188
  x.forEach(function(z) {
17182
- var he = uu(z, h), ve = ka(he, 2), xe = ve[0], Ae = ve[1], Me = pu(z, o, a), et = ka(Me, 2), vt = et[0], Le = et[1], ne = H ? H(z) : null;
17189
+ var he = uu(z, h), ve = ka(he, 2), xe = ve[0], Ae = ve[1], Me = pu(z, o, a), tt = ka(Me, 2), vt = tt[0], Le = tt[1], ne = H ? H(z) : null;
17183
17190
  if (xe && vt && !ne)
17184
17191
  N.push(z);
17185
17192
  else {
17186
- var Xe = [Ae, Le];
17187
- ne && (Xe = Xe.concat(ne)), U.push({
17193
+ var Je = [Ae, Le];
17194
+ ne && (Je = Je.concat(ne)), U.push({
17188
17195
  file: z,
17189
- errors: Xe.filter(function(rr) {
17196
+ errors: Je.filter(function(rr) {
17190
17197
  return rr;
17191
17198
  })
17192
17199
  });
@@ -17237,44 +17244,44 @@ function gu() {
17237
17244
  }), L(), q.current.value = null, q.current.click());
17238
17245
  }, [$, L, Y, v, ue, W, I, s]), Ne = $e(function(x) {
17239
17246
  !j.current || !j.current.isEqualNode(x.target) || (x.key === " " || x.key === "Enter" || x.keyCode === 32 || x.keyCode === 13) && (x.preventDefault(), Z());
17240
- }, [j, Z]), Ge = $e(function() {
17247
+ }, [j, Z]), Ze = $e(function() {
17241
17248
  $({
17242
17249
  type: "focus"
17243
17250
  });
17244
- }, []), rt = $e(function() {
17251
+ }, []), nt = $e(function() {
17245
17252
  $({
17246
17253
  type: "blur"
17247
17254
  });
17248
17255
  }, []), Pt = $e(function() {
17249
17256
  A || (my() ? setTimeout(Z, 0) : Z());
17250
- }, [A, Z]), Ze = function(F) {
17257
+ }, [A, Z]), Xe = function(F) {
17251
17258
  return n ? null : F;
17252
- }, at = function(F) {
17253
- return S ? null : Ze(F);
17254
- }, Je = function(F) {
17255
- return _ ? null : Ze(F);
17259
+ }, et = function(F) {
17260
+ return S ? null : Xe(F);
17261
+ }, Ke = function(F) {
17262
+ return _ ? null : Xe(F);
17256
17263
  }, b = function(F) {
17257
17264
  D && F.stopPropagation();
17258
- }, k = Ye(function() {
17265
+ }, k = Qe(function() {
17259
17266
  return function() {
17260
- var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, F = x.refKey, N = F === void 0 ? "ref" : F, U = x.role, z = x.onKeyDown, he = x.onFocus, ve = x.onBlur, xe = x.onClick, Ae = x.onDragEnter, Me = x.onDragOver, et = x.onDragLeave, vt = x.onDrop, Le = Di(x, Cy);
17267
+ var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, F = x.refKey, N = F === void 0 ? "ref" : F, U = x.role, z = x.onKeyDown, he = x.onFocus, ve = x.onBlur, xe = x.onClick, Ae = x.onDragEnter, Me = x.onDragOver, tt = x.onDragLeave, vt = x.onDrop, Le = Di(x, Cy);
17261
17268
  return ze(ze(io({
17262
- onKeyDown: at(Lt(z, Ne)),
17263
- onFocus: at(Lt(he, Ge)),
17264
- onBlur: at(Lt(ve, rt)),
17265
- onClick: Ze(Lt(xe, Pt)),
17266
- onDragEnter: Je(Lt(Ae, J)),
17267
- onDragOver: Je(Lt(Me, oe)),
17268
- onDragLeave: Je(Lt(et, ce)),
17269
- onDrop: Je(Lt(vt, Se)),
17269
+ onKeyDown: et(Lt(z, Ne)),
17270
+ onFocus: et(Lt(he, Ze)),
17271
+ onBlur: et(Lt(ve, nt)),
17272
+ onClick: Xe(Lt(xe, Pt)),
17273
+ onDragEnter: Ke(Lt(Ae, J)),
17274
+ onDragOver: Ke(Lt(Me, oe)),
17275
+ onDragLeave: Ke(Lt(tt, ce)),
17276
+ onDrop: Ke(Lt(vt, Se)),
17270
17277
  role: typeof U == "string" && U !== "" ? U : "presentation"
17271
17278
  }, N, j), !n && !S ? {
17272
17279
  tabIndex: 0
17273
17280
  } : {}), Le);
17274
17281
  };
17275
- }, [j, Ne, Ge, rt, Pt, J, oe, ce, Se, S, _, n]), g = $e(function(x) {
17282
+ }, [j, Ne, Ze, nt, Pt, J, oe, ce, Se, S, _, n]), g = $e(function(x) {
17276
17283
  x.stopPropagation();
17277
- }, []), M = Ye(function() {
17284
+ }, []), M = Qe(function() {
17278
17285
  return function() {
17279
17286
  var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, F = x.refKey, N = F === void 0 ? "ref" : F, U = x.onChange, z = x.onClick, he = Di(x, Ey), ve = io({
17280
17287
  accept: h,
@@ -17292,8 +17299,8 @@ function gu() {
17292
17299
  width: "1px",
17293
17300
  whiteSpace: "nowrap"
17294
17301
  },
17295
- onChange: Ze(Lt(U, Se)),
17296
- onClick: Ze(Lt(z, g)),
17302
+ onChange: Xe(Lt(U, Se)),
17303
+ onClick: Xe(Lt(z, g)),
17297
17304
  tabIndex: -1
17298
17305
  }, N, q);
17299
17306
  return ze(ze({}, ve), he);
@@ -17305,7 +17312,7 @@ function gu() {
17305
17312
  getInputProps: M,
17306
17313
  rootRef: j,
17307
17314
  inputRef: q,
17308
- open: Ze(Z)
17315
+ open: Xe(Z)
17309
17316
  });
17310
17317
  }
17311
17318
  function Py(e, t) {
@@ -17569,7 +17576,7 @@ const Dy = yt(/* @__PURE__ */ p("path", {
17569
17576
  ),
17570
17577
  /* @__PURE__ */ p(me, { sx: { fontSize: "16px", fontWeight: 600, color: "primary.main" }, children: s }),
17571
17578
  /* @__PURE__ */ p(me, { sx: { fontSize: "12px", fontWeight: 400, color: "primary.main" }, children: l }),
17572
- /* @__PURE__ */ p(Qe, { onClick: () => {
17579
+ /* @__PURE__ */ p(Ge, { onClick: () => {
17573
17580
  var j;
17574
17581
  return (j = S.current) == null ? void 0 : j.click();
17575
17582
  }, sx: { my: 2 }, startIcon: /* @__PURE__ */ p(Oi, {}), variant: "contained", children: u }),
@@ -17602,7 +17609,7 @@ const Dy = yt(/* @__PURE__ */ p("path", {
17602
17609
  justifyContent: Y()
17603
17610
  },
17604
17611
  children: /* @__PURE__ */ p(
17605
- Qe,
17612
+ Ge,
17606
17613
  {
17607
17614
  variant: "contained",
17608
17615
  onClick: H,
@@ -17648,7 +17655,7 @@ export {
17648
17655
  Pg as generateSchema,
17649
17656
  Bc as getApiConfig,
17650
17657
  Xr as hasApiConfig,
17651
- it as neutral,
17658
+ at as neutral,
17652
17659
  qy as primary,
17653
17660
  Wy as secondary,
17654
17661
  Gy as shouldShowField,