finform-react-builder 1.11.1 → 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": {
@@ -9109,9 +9109,9 @@ const el = yt(/* @__PURE__ */ p("path", {
9109
9109
  color: X.text.primary,
9110
9110
  mx: 0.5,
9111
9111
  borderRadius: "4px",
9112
- "&:hover": { backgroundColor: it[50] },
9113
- "&.Mui-focused": { backgroundColor: it[50] },
9114
- ...T ? { backgroundColor: it[50] } : {}
9112
+ "&:hover": { backgroundColor: at[50] },
9113
+ "&.Mui-focused": { backgroundColor: at[50] },
9114
+ ...T ? { backgroundColor: at[50] } : {}
9115
9115
  },
9116
9116
  children: [
9117
9117
  n && /* @__PURE__ */ p($n, { checked: T }),
@@ -9578,8 +9578,8 @@ const el = yt(/* @__PURE__ */ p("path", {
9578
9578
  backgroundColor: X.background.paper,
9579
9579
  borderRadius: "8px",
9580
9580
  "& fieldset": { borderColor: X.divider },
9581
- "&:hover fieldset": { borderColor: it[300] },
9582
- "&.Mui-focused fieldset": { borderColor: it[400] },
9581
+ "&:hover fieldset": { borderColor: at[300] },
9582
+ "&.Mui-focused fieldset": { borderColor: at[400] },
9583
9583
  "&.Mui-error fieldset": { borderColor: X.error.main }
9584
9584
  },
9585
9585
  "& .MuiInputBase-input": { color: X.text.primary, fontSize: 14 },
@@ -9722,7 +9722,7 @@ function qm({
9722
9722
  }
9723
9723
  ),
9724
9724
  C && /* @__PURE__ */ p(
9725
- Qe,
9725
+ Ge,
9726
9726
  {
9727
9727
  variant: "outlined",
9728
9728
  startIcon: /* @__PURE__ */ p(_n, {}),
@@ -10092,7 +10092,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10092
10092
  }
10093
10093
  )
10094
10094
  ] }),
10095
- 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" : "" })
10096
10096
  ]
10097
10097
  }
10098
10098
  ),
@@ -10436,7 +10436,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10436
10436
  }
10437
10437
  ),
10438
10438
  Array.isArray(d) && d.length > 0 ? d.map((q, Q) => /* @__PURE__ */ p(
10439
- Qe,
10439
+ Ge,
10440
10440
  {
10441
10441
  variant: "outlined",
10442
10442
  size: "small",
@@ -10449,7 +10449,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10449
10449
  },
10450
10450
  `empty-add-${Q}`
10451
10451
  )) : n && /* @__PURE__ */ p(
10452
- Qe,
10452
+ Ge,
10453
10453
  {
10454
10454
  variant: "outlined",
10455
10455
  size: "small",
@@ -10476,7 +10476,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10476
10476
  borderBottom: "1px solid #E5E6EB"
10477
10477
  },
10478
10478
  children: Array.isArray(d) && d.length > 0 ? d.map((q, Q) => /* @__PURE__ */ p(
10479
- Qe,
10479
+ Ge,
10480
10480
  {
10481
10481
  variant: Q === 0 ? "contained" : "outlined",
10482
10482
  size: "small",
@@ -10500,7 +10500,7 @@ const Wm = Et(Il)(({ theme: e }) => {
10500
10500
  },
10501
10501
  `add-${Q}`
10502
10502
  )) : n && /* @__PURE__ */ p(
10503
- Qe,
10503
+ Ge,
10504
10504
  {
10505
10505
  variant: "contained",
10506
10506
  size: "small",
@@ -11041,7 +11041,7 @@ const Wm = Et(Il)(({ theme: e }) => {
11041
11041
  sx: {
11042
11042
  color: X.error.main,
11043
11043
  "&:hover": {
11044
- bgcolor: it[50]
11044
+ bgcolor: at[50]
11045
11045
  }
11046
11046
  },
11047
11047
  size: "small",
@@ -11290,7 +11290,7 @@ const Wm = Et(Il)(({ theme: e }) => {
11290
11290
  color: s.includes(c) ? X.primary.contrastText : X.text.primary,
11291
11291
  border: `1px solid ${X.divider}`,
11292
11292
  "&:hover": {
11293
- bgcolor: s.includes(c) ? it[600] : it[50]
11293
+ bgcolor: s.includes(c) ? at[600] : at[50]
11294
11294
  }
11295
11295
  }
11296
11296
  },
@@ -11449,11 +11449,11 @@ async function Xm(e, t, r, n) {
11449
11449
  }
11450
11450
  }
11451
11451
  function Jm(e, t, r, n, i = !1) {
11452
- const a = Ye(() => {
11452
+ const a = Qe(() => {
11453
11453
  if (!(e != null && e.dependsOn) || !n) return null;
11454
11454
  const s = n[e.dependsOn];
11455
11455
  return s !== void 0 ? s : null;
11456
- }, [e == null ? void 0 : e.dependsOn, n]), o = Ye(() => [
11456
+ }, [e == null ? void 0 : e.dependsOn, n]), o = Qe(() => [
11457
11457
  "api-data",
11458
11458
  e == null ? void 0 : e.endpoint,
11459
11459
  e == null ? void 0 : e.method,
@@ -11577,7 +11577,7 @@ const qc = ({
11577
11577
  ),
11578
11578
  e.name
11579
11579
  ]);
11580
- const R = Ye(() => {
11580
+ const R = Qe(() => {
11581
11581
  const W = Bc(e);
11582
11582
  return W && Array.isArray(e.passThroughFields) && (W.passThroughFields = e.passThroughFields), W;
11583
11583
  }, [
@@ -11589,11 +11589,11 @@ const qc = ({
11589
11589
  e.depends_on,
11590
11590
  e.conditional,
11591
11591
  e.passThroughFields
11592
- ]), 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(() => {
11593
11593
  if (!(R != null && R.dependsOn)) return !1;
11594
11594
  const W = h, J = H.current, oe = W !== J;
11595
11595
  return oe && (H.current = W), oe;
11596
- }, [R == null ? void 0 : R.dependsOn, h]), L = Ye(() => {
11596
+ }, [R == null ? void 0 : R.dependsOn, h]), L = Qe(() => {
11597
11597
  const W = e.showWhen;
11598
11598
  if (typeof W == "function")
11599
11599
  try {
@@ -11669,7 +11669,7 @@ const qc = ({
11669
11669
  return;
11670
11670
  }
11671
11671
  return W;
11672
- }, [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(() => {
11673
11673
  const W = {};
11674
11674
  if (!a) return W;
11675
11675
  const J = (R == null ? void 0 : R.endpoint) || (e == null ? void 0 : e.api_endpoint);
@@ -11742,7 +11742,7 @@ const qc = ({
11742
11742
  }
11743
11743
  );
11744
11744
  case "finuiHeader":
11745
- 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(
11746
11746
  Bm,
11747
11747
  {
11748
11748
  title: e.title || e.label,
@@ -11770,25 +11770,25 @@ const qc = ({
11770
11770
  name: Z,
11771
11771
  control: t,
11772
11772
  defaultValue: e.value ?? !1,
11773
- render: ({ field: k }) => rt(
11773
+ render: ({ field: k }) => nt(
11774
11774
  Ne === "switch" ? /* @__PURE__ */ p(
11775
11775
  Za,
11776
11776
  {
11777
- label: Ge,
11777
+ label: Ze,
11778
11778
  checked: !!k.value,
11779
11779
  onChange: k.onChange
11780
11780
  }
11781
11781
  ) : /* @__PURE__ */ p(
11782
11782
  xr,
11783
11783
  {
11784
- label: Ge || "",
11784
+ label: Ze || "",
11785
11785
  checked: !!k.value,
11786
11786
  onChange: k.onChange
11787
11787
  }
11788
11788
  )
11789
11789
  )
11790
11790
  }
11791
- ) : rt()
11791
+ ) : nt()
11792
11792
  );
11793
11793
  case "tabs":
11794
11794
  return /* @__PURE__ */ p(
@@ -11844,7 +11844,7 @@ const qc = ({
11844
11844
  return /* @__PURE__ */ p(K, { sx: { mt: 1 }, children: z.map((xe, Ae) => {
11845
11845
  const Me = xe.find(
11846
11846
  (Le) => Le.type === "section"
11847
- ), 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) => {
11848
11848
  const ne = Le.showWhen;
11849
11849
  if (ne)
11850
11850
  try {
@@ -11858,14 +11858,14 @@ const qc = ({
11858
11858
  }
11859
11859
  } catch {
11860
11860
  }
11861
- const Xe = Math.min(
11861
+ const Je = Math.min(
11862
11862
  Math.max(Le.col ?? 12, 1),
11863
11863
  12
11864
11864
  );
11865
11865
  return /* @__PURE__ */ p(
11866
11866
  K,
11867
11867
  {
11868
- sx: { gridColumn: `span ${Xe}` },
11868
+ sx: { gridColumn: `span ${Je}` },
11869
11869
  children: /* @__PURE__ */ p(
11870
11870
  qc,
11871
11871
  {
@@ -11882,7 +11882,7 @@ const qc = ({
11882
11882
  Le.name
11883
11883
  );
11884
11884
  }) });
11885
- return et ? /* @__PURE__ */ p(
11885
+ return tt ? /* @__PURE__ */ p(
11886
11886
  mt,
11887
11887
  {
11888
11888
  sx: {
@@ -11914,13 +11914,13 @@ const qc = ({
11914
11914
  }
11915
11915
  );
11916
11916
  case "grid":
11917
- const Ze = e.defaultRows || [];
11917
+ const Xe = e.defaultRows || [];
11918
11918
  return /* @__PURE__ */ p(K, { children: /* @__PURE__ */ p(
11919
11919
  Ie,
11920
11920
  {
11921
11921
  name: e.name,
11922
11922
  control: t,
11923
- defaultValue: Ze.length > 0 ? Ze : _() || [],
11923
+ defaultValue: Xe.length > 0 ? Xe : _() || [],
11924
11924
  render: () => /* @__PURE__ */ p(
11925
11925
  Qm,
11926
11926
  {
@@ -12087,30 +12087,33 @@ const qc = ({
12087
12087
  }
12088
12088
  );
12089
12089
  case "select":
12090
- const at = pe();
12090
+ const et = pe();
12091
12091
  return /* @__PURE__ */ p(
12092
12092
  Ie,
12093
12093
  {
12094
12094
  name: e.name,
12095
12095
  control: t,
12096
12096
  defaultValue: _(),
12097
- render: ({ field: k }) => /* @__PURE__ */ p(
12098
- Do,
12099
- {
12100
- labelText: e.labelPosition === "top" ? S(e.label) : void 0,
12101
- label: e.labelPosition !== "top" && e.labelPosition !== "none" ? S(e.label) : void 0,
12102
- labelVariant: e.labelVariant,
12103
- value: k.value,
12104
- onChange: k.onChange,
12105
- options: at,
12106
- disabled: e.disabled || fe,
12107
- placeholder: e.labelPosition === "inner" || e.labelPosition === "none" || !e.labelPosition ? e.placeholder || (e.labelPosition === "none" ? S(e.label) : void 0) : e.placeholder,
12108
- loading: fe,
12109
- error: l || !!$,
12110
- helperText: (s == null ? void 0 : s.message) || ($ == null ? void 0 : $.message) || e.helperText,
12111
- onOpen: B
12112
- }
12113
- )
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
+ }
12114
12117
  }
12115
12118
  );
12116
12119
  case "checkbox":
@@ -12220,7 +12223,7 @@ const qc = ({
12220
12223
  }
12221
12224
  );
12222
12225
  case "autocomplete":
12223
- 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);
12224
12227
  return /* @__PURE__ */ p(
12225
12228
  Ie,
12226
12229
  {
@@ -12243,7 +12246,7 @@ const qc = ({
12243
12246
  }, U = (() => {
12244
12247
  if (M)
12245
12248
  return (Array.isArray(g) ? g : []).map((he) => {
12246
- const ve = Je.find((xe) => {
12249
+ const ve = Ke.find((xe) => {
12247
12250
  const Ae = N(xe);
12248
12251
  return Ae !== void 0 && Ae === he;
12249
12252
  });
@@ -12257,7 +12260,7 @@ const qc = ({
12257
12260
  {
12258
12261
  if (g == null || g === "")
12259
12262
  return null;
12260
- const z = Je.find(
12263
+ const z = Ke.find(
12261
12264
  (he) => {
12262
12265
  const ve = N(he);
12263
12266
  return ve !== void 0 && ve === g;
@@ -12275,7 +12278,7 @@ const qc = ({
12275
12278
  Vm,
12276
12279
  {
12277
12280
  id: e.id,
12278
- options: Je,
12281
+ options: Ke,
12279
12282
  value: U,
12280
12283
  multiple: M,
12281
12284
  labelText: e.labelPosition === "top" ? S(e.label) : void 0,
@@ -12293,7 +12296,7 @@ const qc = ({
12293
12296
  noOptionsText: b && (R != null && R.dependsOn) && !h ? `Please select ${R.dependsOn.replace(
12294
12297
  /_/g,
12295
12298
  " "
12296
- )} 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",
12297
12300
  onChange: (z) => {
12298
12301
  const he = (R == null ? void 0 : R.valueField) || e.value_field || "value";
12299
12302
  if (M) {
@@ -12307,10 +12310,10 @@ const qc = ({
12307
12310
  for (const [Ae, Me] of Object.entries(
12308
12311
  xe
12309
12312
  )) {
12310
- const et = z[Me];
12311
- if (et !== void 0 && typeof o == "function")
12313
+ const tt = z[Me];
12314
+ if (tt !== void 0 && typeof o == "function")
12312
12315
  try {
12313
- o(Ae, et, {
12316
+ o(Ae, tt, {
12314
12317
  shouldDirty: !0,
12315
12318
  shouldTouch: !0,
12316
12319
  shouldValidate: !1
@@ -12367,7 +12370,7 @@ const qc = ({
12367
12370
  e.onPreview(g);
12368
12371
  } catch {
12369
12372
  }
12370
- }, et = () => {
12373
+ }, tt = () => {
12371
12374
  k.onChange(""), typeof e.onRemove == "function" && e.onRemove();
12372
12375
  }, vt = () => {
12373
12376
  typeof e.onSave == "function" && e.onSave({
@@ -12375,19 +12378,19 @@ const qc = ({
12375
12378
  file: P.current || void 0
12376
12379
  });
12377
12380
  }, Le = (ne) => {
12378
- const Xe = ne.target.files && ne.target.files[0];
12379
- if (Xe) {
12381
+ const Je = ne.target.files && ne.target.files[0];
12382
+ if (Je) {
12380
12383
  if (typeof e.onFileSelected == "function")
12381
12384
  try {
12382
- e.onFileSelected(Xe);
12385
+ e.onFileSelected(Je);
12383
12386
  } catch {
12384
12387
  }
12385
12388
  try {
12386
- const rr = URL.createObjectURL(Xe);
12389
+ const rr = URL.createObjectURL(Je);
12387
12390
  k.onChange(rr);
12388
12391
  } catch {
12389
12392
  }
12390
- P.current = Xe, v(!1);
12393
+ P.current = Je, v(!1);
12391
12394
  }
12392
12395
  };
12393
12396
  return /* @__PURE__ */ te(
@@ -12463,7 +12466,7 @@ const qc = ({
12463
12466
  ] }),
12464
12467
  /* @__PURE__ */ te(K, { sx: { display: "flex", gap: 1 }, children: [
12465
12468
  /* @__PURE__ */ p(
12466
- Qe,
12469
+ Ge,
12467
12470
  {
12468
12471
  type: "button",
12469
12472
  sx: { ...z.previewButtonSx },
@@ -12474,18 +12477,18 @@ const qc = ({
12474
12477
  }
12475
12478
  ),
12476
12479
  /* @__PURE__ */ p(
12477
- Qe,
12480
+ Ge,
12478
12481
  {
12479
12482
  variant: "outlined",
12480
12483
  color: "error",
12481
- onClick: et,
12484
+ onClick: tt,
12482
12485
  sx: { ...z.removeButtonSx },
12483
12486
  startIcon: /* @__PURE__ */ p(tl, {}),
12484
12487
  children: ve
12485
12488
  }
12486
12489
  ),
12487
12490
  Ae && /* @__PURE__ */ p(
12488
- Qe,
12491
+ Ge,
12489
12492
  {
12490
12493
  variant: "contained",
12491
12494
  onClick: vt,
@@ -12532,7 +12535,7 @@ const qc = ({
12532
12535
  ) }),
12533
12536
  /* @__PURE__ */ te(Bu, { children: [
12534
12537
  /* @__PURE__ */ p(
12535
- Qe,
12538
+ Ge,
12536
12539
  {
12537
12540
  type: "button",
12538
12541
  variant: "outlined",
@@ -12544,7 +12547,7 @@ const qc = ({
12544
12547
  }
12545
12548
  ),
12546
12549
  /* @__PURE__ */ p(
12547
- Qe,
12550
+ Ge,
12548
12551
  {
12549
12552
  type: "button",
12550
12553
  variant: "contained",
@@ -12643,7 +12646,7 @@ const qc = ({
12643
12646
  }
12644
12647
  ),
12645
12648
  /* @__PURE__ */ p(
12646
- Qe,
12649
+ Ge,
12647
12650
  {
12648
12651
  onClick: N,
12649
12652
  sx: { my: 2, ...M.buttonSx },
@@ -12692,7 +12695,7 @@ const qc = ({
12692
12695
  default:
12693
12696
  return null;
12694
12697
  }
12695
- }, 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(
12696
12699
  e.type
12697
12700
  ), [e.disabled, e.copyWhenDisabled, e.type]), re = $e(async () => {
12698
12701
  try {
@@ -14520,10 +14523,10 @@ const Pg = (e) => {
14520
14523
  showStepTitles: i = !0,
14521
14524
  completedSteps: a = []
14522
14525
  }) => {
14523
- const o = Ye(
14526
+ const o = Qe(
14524
14527
  () => Array.from({ length: t }, (f, d) => d + 1),
14525
14528
  [t]
14526
- ), s = Ye(
14529
+ ), s = Qe(
14527
14530
  () => Math.round(e / t * 100),
14528
14531
  [e, t]
14529
14532
  ), l = (f) => n[f - 1] || `Step ${f}`, u = (f) => f === e || a.includes(f) || f === e + 1 && a.includes(e);
@@ -14649,7 +14652,7 @@ const Pg = (e) => {
14649
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) => {
14650
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;
14651
14654
  return /* @__PURE__ */ te(
14652
- Qe,
14655
+ Ge,
14653
14656
  {
14654
14657
  type: c,
14655
14658
  variant: y,
@@ -14689,7 +14692,7 @@ const Pg = (e) => {
14689
14692
  }, m = (v, T) => {
14690
14693
  const { buttonType: P, buttonVariant: A } = c(v), S = y(v.color);
14691
14694
  return /* @__PURE__ */ p(
14692
- Qe,
14695
+ Ge,
14693
14696
  {
14694
14697
  type: P,
14695
14698
  variant: A,
@@ -14841,7 +14844,7 @@ const Pg = (e) => {
14841
14844
  Vt(() => {
14842
14845
  G.current = i;
14843
14846
  }, [i]);
14844
- const pe = Ye(() => {
14847
+ const pe = Qe(() => {
14845
14848
  try {
14846
14849
  return JSON.stringify($);
14847
14850
  } catch {
@@ -14865,7 +14868,7 @@ const Pg = (e) => {
14865
14868
  const N = j[F];
14866
14869
  return typeof (N == null ? void 0 : N.message) == "string" ? N.message : `${F} is invalid`;
14867
14870
  }).length === 0;
14868
- }, re = Ye(() => {
14871
+ }, re = Qe(() => {
14869
14872
  if (!_) return !0;
14870
14873
  const g = r.filter((x) => x.step === R);
14871
14874
  for (const x of g)
@@ -14885,7 +14888,7 @@ const Pg = (e) => {
14885
14888
  for (const F of x.items || [])
14886
14889
  Array.isArray(F.fields) && M.push(...J(F.fields));
14887
14890
  return M;
14888
- }, []), oe = $e((g, M) => mi(g, M), []), ce = Ye(() => {
14891
+ }, []), oe = $e((g, M) => mi(g, M), []), ce = Qe(() => {
14889
14892
  if (_)
14890
14893
  return re;
14891
14894
  const g = mi(r, $);
@@ -14918,12 +14921,12 @@ const Pg = (e) => {
14918
14921
  if (z.type === "dragdroplist" && Array.isArray(he)) {
14919
14922
  const ve = z, xe = ve.serialize;
14920
14923
  if (!xe) continue;
14921
- 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 = (() => {
14922
14925
  if (typeof ve.chipText == "function") return ve.chipText;
14923
- 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];
14924
14927
  })();
14925
14928
  let Le = he;
14926
- 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;
14927
14930
  }
14928
14931
  }
14929
14932
  return N;
@@ -14933,7 +14936,7 @@ const Pg = (e) => {
14933
14936
  g && (g.preventDefault(), g.stopPropagation()), _ && R < D && await de() && ue(R + 1);
14934
14937
  }, Ne = (g) => {
14935
14938
  g && (g.preventDefault(), g.stopPropagation()), _ && R > 1 && ue(R - 1);
14936
- }, 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({
14937
14940
  palette: {
14938
14941
  primary: {
14939
14942
  main: t.primaryColor || "#1976d2"
@@ -15027,7 +15030,7 @@ const Pg = (e) => {
15027
15030
  },
15028
15031
  children: /* @__PURE__ */ te(K, { sx: { display: "flex", gap: 2 }, children: [
15029
15032
  _ && R > 1 && /* @__PURE__ */ p(
15030
- Qe,
15033
+ Ge,
15031
15034
  {
15032
15035
  type: "button",
15033
15036
  variant: "outlined",
@@ -15038,7 +15041,7 @@ const Pg = (e) => {
15038
15041
  _ ? (
15039
15042
  // Multi-step form: Show Next for non-final steps, Submit for final step
15040
15043
  R < D ? /* @__PURE__ */ p(
15041
- Qe,
15044
+ Ge,
15042
15045
  {
15043
15046
  type: "button",
15044
15047
  variant: "contained",
@@ -15049,7 +15052,7 @@ const Pg = (e) => {
15049
15052
  children: "Next"
15050
15053
  }
15051
15054
  ) : /* @__PURE__ */ p(
15052
- Qe,
15055
+ Ge,
15053
15056
  {
15054
15057
  type: "submit",
15055
15058
  variant: "contained",
@@ -15062,7 +15065,7 @@ const Pg = (e) => {
15062
15065
  ) : (
15063
15066
  // Single-step form: Show Submit button (disabled if invalid)
15064
15067
  /* @__PURE__ */ p(
15065
- Qe,
15068
+ Ge,
15066
15069
  {
15067
15070
  type: "submit",
15068
15071
  variant: "contained",
@@ -15076,13 +15079,13 @@ const Pg = (e) => {
15076
15079
  ] })
15077
15080
  }
15078
15081
  ) : null;
15079
- }, Ze = Ye(() => {
15082
+ }, Xe = Qe(() => {
15080
15083
  const g = [];
15081
15084
  let M = [];
15082
15085
  for (const x of h)
15083
15086
  x.type === "section" && M.length > 0 ? (g.push(M), M = [x]) : M.push(x);
15084
15087
  return M.length > 0 && g.push(M), g;
15085
- }, [h]), at = /* @__PURE__ */ te(
15088
+ }, [h]), et = /* @__PURE__ */ te(
15086
15089
  K,
15087
15090
  {
15088
15091
  component: "form",
@@ -15109,7 +15112,7 @@ const Pg = (e) => {
15109
15112
  showStepTitles: (A == null ? void 0 : A.showStepTitles) !== !1
15110
15113
  }
15111
15114
  ),
15112
- Ze.map((g, M) => {
15115
+ Xe.map((g, M) => {
15113
15116
  const x = g.find((he) => he.type === "section");
15114
15117
  if (x && !W(x, $))
15115
15118
  return null;
@@ -15132,7 +15135,7 @@ const Pg = (e) => {
15132
15135
  }, z = /* @__PURE__ */ p(Ii, { children: g.map((he) => {
15133
15136
  if (!W(he, $))
15134
15137
  return null;
15135
- const ve = Ge(he);
15138
+ const ve = Ze(he);
15136
15139
  return /* @__PURE__ */ p(K, { sx: { gridColumn: `span ${ve}` }, children: /* @__PURE__ */ p(
15137
15140
  qc,
15138
15141
  {
@@ -15159,7 +15162,7 @@ const Pg = (e) => {
15159
15162
  Pt()
15160
15163
  ]
15161
15164
  }
15162
- ), Je = m ? /* @__PURE__ */ p(
15165
+ ), Ke = m ? /* @__PURE__ */ p(
15163
15166
  mt,
15164
15167
  {
15165
15168
  sx: {
@@ -15170,10 +15173,10 @@ const Pg = (e) => {
15170
15173
  ...w
15171
15174
  },
15172
15175
  ...v,
15173
- children: at
15176
+ children: et
15174
15177
  }
15175
- ) : at;
15176
- return rt ? /* @__PURE__ */ p(Hu, { theme: rt, children: Je }) : Je;
15178
+ ) : et;
15179
+ return nt ? /* @__PURE__ */ p(Hu, { theme: nt, children: Ke }) : Ke;
15177
15180
  }, Xy = ({
15178
15181
  src: e,
15179
15182
  alt: t,
@@ -17102,13 +17105,13 @@ var ao = {
17102
17105
  fileRejections: []
17103
17106
  };
17104
17107
  function gu() {
17105
- 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() {
17106
17109
  return vy(r);
17107
- }, [r]), I = Ye(function() {
17110
+ }, [r]), I = Qe(function() {
17108
17111
  return yy(r);
17109
- }, [r]), L = Ye(function() {
17112
+ }, [r]), L = Qe(function() {
17110
17113
  return typeof w == "function" ? w : Sl;
17111
- }, [w]), Y = Ye(function() {
17114
+ }, [w]), Y = Qe(function() {
17112
17115
  return typeof m == "function" ? m : Sl;
17113
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() {
17114
17117
  !pe.current && G && setTimeout(function() {
@@ -17183,14 +17186,14 @@ function gu() {
17183
17186
  }, [j, f, D]), ue = $e(function(x, F) {
17184
17187
  var N = [], U = [];
17185
17188
  x.forEach(function(z) {
17186
- 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;
17187
17190
  if (xe && vt && !ne)
17188
17191
  N.push(z);
17189
17192
  else {
17190
- var Xe = [Ae, Le];
17191
- ne && (Xe = Xe.concat(ne)), U.push({
17193
+ var Je = [Ae, Le];
17194
+ ne && (Je = Je.concat(ne)), U.push({
17192
17195
  file: z,
17193
- errors: Xe.filter(function(rr) {
17196
+ errors: Je.filter(function(rr) {
17194
17197
  return rr;
17195
17198
  })
17196
17199
  });
@@ -17241,44 +17244,44 @@ function gu() {
17241
17244
  }), L(), q.current.value = null, q.current.click());
17242
17245
  }, [$, L, Y, v, ue, W, I, s]), Ne = $e(function(x) {
17243
17246
  !j.current || !j.current.isEqualNode(x.target) || (x.key === " " || x.key === "Enter" || x.keyCode === 32 || x.keyCode === 13) && (x.preventDefault(), Z());
17244
- }, [j, Z]), Ge = $e(function() {
17247
+ }, [j, Z]), Ze = $e(function() {
17245
17248
  $({
17246
17249
  type: "focus"
17247
17250
  });
17248
- }, []), rt = $e(function() {
17251
+ }, []), nt = $e(function() {
17249
17252
  $({
17250
17253
  type: "blur"
17251
17254
  });
17252
17255
  }, []), Pt = $e(function() {
17253
17256
  A || (my() ? setTimeout(Z, 0) : Z());
17254
- }, [A, Z]), Ze = function(F) {
17257
+ }, [A, Z]), Xe = function(F) {
17255
17258
  return n ? null : F;
17256
- }, at = function(F) {
17257
- return S ? null : Ze(F);
17258
- }, Je = function(F) {
17259
- return _ ? null : Ze(F);
17259
+ }, et = function(F) {
17260
+ return S ? null : Xe(F);
17261
+ }, Ke = function(F) {
17262
+ return _ ? null : Xe(F);
17260
17263
  }, b = function(F) {
17261
17264
  D && F.stopPropagation();
17262
- }, k = Ye(function() {
17265
+ }, k = Qe(function() {
17263
17266
  return function() {
17264
- 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);
17265
17268
  return ze(ze(io({
17266
- onKeyDown: at(Lt(z, Ne)),
17267
- onFocus: at(Lt(he, Ge)),
17268
- onBlur: at(Lt(ve, rt)),
17269
- onClick: Ze(Lt(xe, Pt)),
17270
- onDragEnter: Je(Lt(Ae, J)),
17271
- onDragOver: Je(Lt(Me, oe)),
17272
- onDragLeave: Je(Lt(et, ce)),
17273
- 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)),
17274
17277
  role: typeof U == "string" && U !== "" ? U : "presentation"
17275
17278
  }, N, j), !n && !S ? {
17276
17279
  tabIndex: 0
17277
17280
  } : {}), Le);
17278
17281
  };
17279
- }, [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) {
17280
17283
  x.stopPropagation();
17281
- }, []), M = Ye(function() {
17284
+ }, []), M = Qe(function() {
17282
17285
  return function() {
17283
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({
17284
17287
  accept: h,
@@ -17296,8 +17299,8 @@ function gu() {
17296
17299
  width: "1px",
17297
17300
  whiteSpace: "nowrap"
17298
17301
  },
17299
- onChange: Ze(Lt(U, Se)),
17300
- onClick: Ze(Lt(z, g)),
17302
+ onChange: Xe(Lt(U, Se)),
17303
+ onClick: Xe(Lt(z, g)),
17301
17304
  tabIndex: -1
17302
17305
  }, N, q);
17303
17306
  return ze(ze({}, ve), he);
@@ -17309,7 +17312,7 @@ function gu() {
17309
17312
  getInputProps: M,
17310
17313
  rootRef: j,
17311
17314
  inputRef: q,
17312
- open: Ze(Z)
17315
+ open: Xe(Z)
17313
17316
  });
17314
17317
  }
17315
17318
  function Py(e, t) {
@@ -17573,7 +17576,7 @@ const Dy = yt(/* @__PURE__ */ p("path", {
17573
17576
  ),
17574
17577
  /* @__PURE__ */ p(me, { sx: { fontSize: "16px", fontWeight: 600, color: "primary.main" }, children: s }),
17575
17578
  /* @__PURE__ */ p(me, { sx: { fontSize: "12px", fontWeight: 400, color: "primary.main" }, children: l }),
17576
- /* @__PURE__ */ p(Qe, { onClick: () => {
17579
+ /* @__PURE__ */ p(Ge, { onClick: () => {
17577
17580
  var j;
17578
17581
  return (j = S.current) == null ? void 0 : j.click();
17579
17582
  }, sx: { my: 2 }, startIcon: /* @__PURE__ */ p(Oi, {}), variant: "contained", children: u }),
@@ -17606,7 +17609,7 @@ const Dy = yt(/* @__PURE__ */ p("path", {
17606
17609
  justifyContent: Y()
17607
17610
  },
17608
17611
  children: /* @__PURE__ */ p(
17609
- Qe,
17612
+ Ge,
17610
17613
  {
17611
17614
  variant: "contained",
17612
17615
  onClick: H,
@@ -17652,7 +17655,7 @@ export {
17652
17655
  Pg as generateSchema,
17653
17656
  Bc as getApiConfig,
17654
17657
  Xr as hasApiConfig,
17655
- it as neutral,
17658
+ at as neutral,
17656
17659
  qy as primary,
17657
17660
  Wy as secondary,
17658
17661
  Gy as shouldShowField,