@max-ts/components 1.4.1 → 1.4.3

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/lib/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as K from "react";
2
- import m, { useMemo as Re, forwardRef as Ft, useState as me, Fragment as Es, createElement as At, useRef as Le, useEffect as it, useCallback as ve, useLayoutEffect as Yr, createContext as $n, useContext as tt, Component as js, Children as Ts, useId as Ps } from "react";
2
+ import g, { useMemo as Re, forwardRef as Ft, useState as me, Fragment as Es, createElement as At, useRef as Le, useEffect as it, useCallback as ve, useLayoutEffect as Yr, createContext as $n, useContext as tt, Component as js, Children as Ts, useId as Ps } from "react";
3
3
  import { ChevronDown as Gr, X as Gt, EllipsisVertical as ja, Ellipsis as As, TriangleAlert as Ta, CircleCheck as Ur, OctagonAlert as qr, Info as Pa, CircleX as Aa, Copy as _s, ArrowDownUp as mo, ArrowDownWideNarrow as Fs, ArrowDownNarrowWide as Ns, ChevronUp as Ws, Calendar1 as _a, ArrowDownToLine as yo, SquareArrowOutUpRight as Is, PanelLeftOpen as Rs, PanelLeftClose as Bs, ChevronLeft as Ls, ChevronsUpDown as Vs, Search as zs } from "lucide-react";
4
4
  import { CircularProgress as Hs, styled as y, Button as Ys, buttonClasses as Fa, drawerClasses as Gs, backdropClasses as Na, listClasses as vo, paperClasses as Wa, menuItemClasses as cr, stepLabelClasses as Us, outlinedInputClasses as qs, inputBaseClasses as ur, createTheme as Xs, Collapse as Qs, useTheme as Xr, Typography as Ia, useMediaQuery as Zs, Drawer as Js, MenuList as Ks, Menu as el, ClickAwayListener as Qr, tooltipClasses as Rt, Tooltip as tl, MenuItem as nl, alertClasses as bo, iconButtonClasses as rl, Alert as ol, AlertTitle as al, Checkbox as il, debounce as Ra, Chip as sl, FormHelperText as ll, TextField as cl, ListItemIcon as Ba, Popper as ul, Autocomplete as dl, SvgIcon as Zr, Avatar as fl, Badge as pl, FormControl as La, FormControlLabel as Va, Popover as hl, DialogTitle as gl, dialogClasses as xo, Dialog as ml, DialogActions as yl, DialogContent as vl, DialogContentText as bl, Link as Tr, LinearProgress as za, Pagination as xl, selectClasses as wl, Select as kl, InputLabel as Cl, formControlClasses as Sl, Divider as $l, FormLabel as Ml, keyframes as Dl, svgIconClasses as Ol, List as El, ListItem as jl, ListItemButton as Tl, ListItemText as Pl, ListSubheader as Al, Paper as _l, menuClasses as Fl, Radio as Nl, css as Wl, RadioGroup as Il, sliderClasses as an, Slider as Rl, alpha as Bl, skeletonClasses as wo, Skeleton as Ll, switchClasses as ko, Switch as Vl, Tab as zl, Tabs as Co, ThemeProvider as Hl, CssBaseline as Yl } from "@mui/material";
5
5
  import { Breadcrumbs as Wx, ButtonBase as Ix, ButtonGroup as Rx, Card as Bx, CardActions as Lx, CardContent as Vx, CardHeader as zx, buttonClasses as Hx, cardActionsClasses as Yx, cardClasses as Gx, cardContentClasses as Ux, cardHeaderClasses as qx, keyframes as Xx, styled as Qx, useTheme as Zx } from "@mui/material";
@@ -55,18 +55,18 @@ function Kl() {
55
55
  function e(O) {
56
56
  if (O == null) return null;
57
57
  if (typeof O == "function")
58
- return O.$$typeof === V ? null : O.displayName || O.name || null;
58
+ return O.$$typeof === z ? null : O.displayName || O.name || null;
59
59
  if (typeof O == "string") return O;
60
60
  switch (O) {
61
- case $:
61
+ case M:
62
62
  return "Fragment";
63
63
  case b:
64
64
  return "Profiler";
65
- case k:
65
+ case C:
66
66
  return "StrictMode";
67
67
  case E:
68
68
  return "Suspense";
69
- case M:
69
+ case S:
70
70
  return "SuspenseList";
71
71
  case T:
72
72
  return "Activity";
@@ -75,16 +75,16 @@ function Kl() {
75
75
  switch (typeof O.tag == "number" && console.error(
76
76
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
77
77
  ), O.$$typeof) {
78
- case x:
78
+ case w:
79
79
  return "Portal";
80
- case S:
80
+ case $:
81
81
  return (O.displayName || "Context") + ".Provider";
82
- case g:
82
+ case m:
83
83
  return (O._context.displayName || "Context") + ".Consumer";
84
84
  case A:
85
85
  var _ = O.render;
86
86
  return O = O.displayName, O || (O = _.displayName || _.name || "", O = O !== "" ? "ForwardRef(" + O + ")" : "ForwardRef"), O;
87
- case C:
87
+ case k:
88
88
  return _ = O.displayName || null, _ !== null ? _ : e(O.type) || "Memo";
89
89
  case j:
90
90
  _ = O._payload, O = O._init;
@@ -116,7 +116,7 @@ function Kl() {
116
116
  }
117
117
  }
118
118
  function r(O) {
119
- if (O === $) return "<>";
119
+ if (O === M) return "<>";
120
120
  if (typeof O == "object" && O !== null && O.$$typeof === j)
121
121
  return "<...>";
122
122
  try {
@@ -127,7 +127,7 @@ function Kl() {
127
127
  }
128
128
  }
129
129
  function o() {
130
- var O = z.A;
130
+ var O = L.A;
131
131
  return O === null ? null : O.getOwner();
132
132
  }
133
133
  function a() {
@@ -243,7 +243,7 @@ React keys must be passed directly to JSX without using spread:
243
243
  function u(O) {
244
244
  typeof O == "object" && O !== null && O.$$typeof === v && O._store && (O._store.validated = 1);
245
245
  }
246
- var p = m, v = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), S = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), z = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, W = Array.isArray, q = console.createTask ? console.createTask : function() {
246
+ var p = g, v = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), M = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), z = Symbol.for("react.client.reference"), L = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, W = Array.isArray, U = console.createTask ? console.createTask : function() {
247
247
  return null;
248
248
  };
249
249
  p = {
@@ -254,9 +254,9 @@ React keys must be passed directly to JSX without using spread:
254
254
  var Y, B = {}, Z = p["react-stack-bottom-frame"].bind(
255
255
  p,
256
256
  a
257
- )(), oe = q(r(a)), te = {};
258
- ln.Fragment = $, ln.jsx = function(O, _, H, G, le) {
259
- var se = 1e4 > z.recentlyCreatedOwnerStacks++;
257
+ )(), oe = U(r(a)), te = {};
258
+ ln.Fragment = M, ln.jsx = function(O, _, H, G, le) {
259
+ var se = 1e4 > L.recentlyCreatedOwnerStacks++;
260
260
  return f(
261
261
  O,
262
262
  _,
@@ -265,10 +265,10 @@ React keys must be passed directly to JSX without using spread:
265
265
  G,
266
266
  le,
267
267
  se ? Error("react-stack-top-frame") : Z,
268
- se ? q(r(O)) : oe
268
+ se ? U(r(O)) : oe
269
269
  );
270
270
  }, ln.jsxs = function(O, _, H, G, le) {
271
- var se = 1e4 > z.recentlyCreatedOwnerStacks++;
271
+ var se = 1e4 > L.recentlyCreatedOwnerStacks++;
272
272
  return f(
273
273
  O,
274
274
  _,
@@ -277,7 +277,7 @@ React keys must be passed directly to JSX without using spread:
277
277
  G,
278
278
  le,
279
279
  se ? Error("react-stack-top-frame") : Z,
280
- se ? q(r(O)) : oe
280
+ se ? U(r(O)) : oe
281
281
  );
282
282
  };
283
283
  }()), ln;
@@ -1684,8 +1684,8 @@ const eu = ({
1684
1684
  if (c)
1685
1685
  r?.(!n, v);
1686
1686
  else {
1687
- const x = !i;
1688
- s(x), r?.(x, v);
1687
+ const w = !i;
1688
+ s(w), r?.(w, v);
1689
1689
  }
1690
1690
  }, p = typeof e == "string" ? au : Es;
1691
1691
  return /* @__PURE__ */ l.jsxs("div", { ref: a, children: [
@@ -1711,35 +1711,35 @@ const eu = ({
1711
1711
  isDisabled: r
1712
1712
  }) => {
1713
1713
  if ("actions" in e) {
1714
- const { icon: v, disabled: x, disabledReason: $, name: k, actions: b } = e;
1714
+ const { icon: v, disabled: w, disabledReason: M, name: C, actions: b } = e;
1715
1715
  return /* @__PURE__ */ l.jsx(
1716
1716
  Te,
1717
1717
  {
1718
- title: $ || k,
1718
+ title: M || C,
1719
1719
  placement: n,
1720
- withoutContainer: !(r || x),
1720
+ withoutContainer: !(r || w),
1721
1721
  children: /* @__PURE__ */ l.jsx(
1722
1722
  Dn,
1723
1723
  {
1724
1724
  icon: v,
1725
1725
  variant: "text",
1726
- disabled: r || x,
1726
+ disabled: r || w,
1727
1727
  children: b.map(
1728
- ({ name: g, onClick: S, ...A }) => /* @__PURE__ */ At(
1728
+ ({ name: m, onClick: $, ...A }) => /* @__PURE__ */ At(
1729
1729
  st,
1730
1730
  {
1731
1731
  ...A,
1732
- key: g,
1732
+ key: m,
1733
1733
  tooltipPlacement: n,
1734
- onClick: t(S)
1734
+ onClick: t($)
1735
1735
  },
1736
- g
1736
+ m
1737
1737
  )
1738
1738
  )
1739
1739
  }
1740
1740
  )
1741
1741
  },
1742
- k
1742
+ C
1743
1743
  );
1744
1744
  }
1745
1745
  const {
@@ -2111,15 +2111,15 @@ const yu = y(
2111
2111
  isNested: u,
2112
2112
  actions: p,
2113
2113
  disabled: v,
2114
- disabledReason: x,
2115
- note: $,
2116
- isBlockingOperation: k,
2114
+ disabledReason: w,
2115
+ note: M,
2116
+ isBlockingOperation: C,
2117
2117
  ...b
2118
2118
  } = r;
2119
2119
  return /* @__PURE__ */ l.jsx(
2120
2120
  Te,
2121
2121
  {
2122
- title: v ? x : $,
2122
+ title: v ? w : M,
2123
2123
  withoutContainer: !(t || v),
2124
2124
  children: /* @__PURE__ */ l.jsx(
2125
2125
  Cu,
@@ -2129,7 +2129,7 @@ const yu = y(
2129
2129
  name: f,
2130
2130
  size: n,
2131
2131
  children: p.map(
2132
- ({ text: g, ...S }) => /* @__PURE__ */ l.jsx(st, { ...S, children: g }, g)
2132
+ ({ text: m, ...$ }) => /* @__PURE__ */ l.jsx(st, { ...$, children: m }, m)
2133
2133
  )
2134
2134
  }
2135
2135
  )
@@ -2279,13 +2279,13 @@ const yu = y(
2279
2279
  ...i
2280
2280
  }) => {
2281
2281
  const { severity: s = "info", slots: c, ...d } = i, f = (u) => {
2282
- const { variant: p, color: v, ...x } = u;
2282
+ const { variant: p, color: v, ...w } = u;
2283
2283
  return /* @__PURE__ */ l.jsx(
2284
2284
  Pu,
2285
2285
  {
2286
2286
  variant: "text",
2287
2287
  color: "primary",
2288
- ...x
2288
+ ...w
2289
2289
  }
2290
2290
  );
2291
2291
  };
@@ -2760,15 +2760,15 @@ const Iu = {
2760
2760
  return /* @__PURE__ */ l.jsx(Ar, { error: !0, children: n });
2761
2761
  if (n)
2762
2762
  return n;
2763
- }, [n, e, t]), x = ($) => {
2763
+ }, [n, e, t]), w = (M) => {
2764
2764
  if (d) {
2765
- const k = $.target.value?.trim();
2765
+ const C = M.target.value?.trim();
2766
2766
  u.onChange?.({
2767
- ...$,
2768
- target: { ...$.target, value: k }
2767
+ ...M,
2768
+ target: { ...M.target, value: C }
2769
2769
  });
2770
2770
  }
2771
- f?.($);
2771
+ f?.(M);
2772
2772
  };
2773
2773
  return /* @__PURE__ */ l.jsx(
2774
2774
  cl,
@@ -2787,7 +2787,7 @@ const Iu = {
2787
2787
  maxLength: c,
2788
2788
  ...i
2789
2789
  },
2790
- onBlur: x,
2790
+ onBlur: w,
2791
2791
  ...u
2792
2792
  }
2793
2793
  );
@@ -2809,19 +2809,19 @@ const Iu = {
2809
2809
  noOptionsText: c = "Нет данных",
2810
2810
  onInputChange: d
2811
2811
  }) => {
2812
- const [f, u] = me(""), p = Zu(e), v = f.length >= 1, x = o.length > 0, $ = v || x || a || i, k = ve(
2813
- (g, S) => t ? t(g, S) : JSON.stringify(g) === JSON.stringify(S),
2812
+ const [f, u] = me(""), p = Zu(e), v = f.length >= 1, w = o.length > 0, M = v || w || a || i, C = ve(
2813
+ (m, $) => t ? t(m, $) : JSON.stringify(m) === JSON.stringify($),
2814
2814
  [t]
2815
2815
  );
2816
2816
  return {
2817
2817
  isValueEmpty: p,
2818
- isPopperVisible: $,
2818
+ isPopperVisible: M,
2819
2819
  autocompleteProps: {
2820
- isOptionEqualToValue: k,
2820
+ isOptionEqualToValue: C,
2821
2821
  autoHighlight: r ? !1 : n,
2822
2822
  noOptionsText: i ? s : c,
2823
- onInputChange: (g, S, A) => {
2824
- d?.(g, S, A), a || u(S);
2823
+ onInputChange: (m, $, A) => {
2824
+ d?.(m, $, A), a || u($);
2825
2825
  }
2826
2826
  }
2827
2827
  };
@@ -2837,20 +2837,20 @@ const Iu = {
2837
2837
  multiple: u,
2838
2838
  size: p = "medium",
2839
2839
  placeholder: v = Xu,
2840
- overflowOption: x,
2841
- closeText: $ = "Закрыть",
2842
- openText: k = "Открыть",
2840
+ overflowOption: w,
2841
+ closeText: M = "Закрыть",
2842
+ openText: C = "Открыть",
2843
2843
  clearText: b = "Очистить",
2844
- loadingText: g = /* @__PURE__ */ l.jsx(Mn, { color: "primary" }),
2845
- isLoadedDataError: S,
2844
+ loadingText: m = /* @__PURE__ */ l.jsx(Mn, { color: "primary" }),
2845
+ isLoadedDataError: $,
2846
2846
  loadedDataError: A,
2847
2847
  noOptionsText: E,
2848
- autoHighlight: M,
2849
- renderInput: C,
2848
+ autoHighlight: S,
2849
+ renderInput: k,
2850
2850
  renderTags: j,
2851
2851
  renderOption: T,
2852
- ...V
2853
- } = e, z = ve(
2852
+ ...z
2853
+ } = e, L = ve(
2854
2854
  (Y) => {
2855
2855
  const B = {
2856
2856
  ...Y,
@@ -2863,11 +2863,11 @@ const Iu = {
2863
2863
  helperText: d,
2864
2864
  size: p
2865
2865
  };
2866
- return C ? C(B) : /* @__PURE__ */ l.jsx(rn, { ...B });
2866
+ return k ? k(B) : /* @__PURE__ */ l.jsx(rn, { ...B });
2867
2867
  },
2868
2868
  [
2869
2869
  t,
2870
- C,
2870
+ k,
2871
2871
  f,
2872
2872
  o,
2873
2873
  v,
@@ -2891,12 +2891,12 @@ const Iu = {
2891
2891
  Nt,
2892
2892
  {
2893
2893
  rowsCount: qu,
2894
- ...x,
2894
+ ...w,
2895
2895
  children: Y.key
2896
2896
  }
2897
2897
  ));
2898
2898
  },
2899
- [u, x, T]
2899
+ [u, w, T]
2900
2900
  ), W = ve(
2901
2901
  (Y, B, Z) => j ? j(Y, B, Z) : Y.map((oe, te) => {
2902
2902
  const O = c?.(oe) || "";
@@ -2912,19 +2912,19 @@ const Iu = {
2912
2912
  );
2913
2913
  }),
2914
2914
  [c, j]
2915
- ), q = ve(
2915
+ ), U = ve(
2916
2916
  (Y) => n ? /* @__PURE__ */ l.jsx(ul, { ...Y }) : null,
2917
2917
  [n]
2918
2918
  );
2919
2919
  return /* @__PURE__ */ l.jsx(
2920
2920
  dl,
2921
2921
  {
2922
- ...V,
2922
+ ...z,
2923
2923
  size: p,
2924
2924
  clearText: b,
2925
- closeText: $,
2926
- openText: k,
2927
- loadingText: g,
2925
+ closeText: M,
2926
+ openText: C,
2927
+ loadingText: m,
2928
2928
  multiple: u,
2929
2929
  disableCloseOnSelect: u,
2930
2930
  clearIcon: /* @__PURE__ */ l.jsx(Zr, { children: /* @__PURE__ */ l.jsx(Aa, {}) }),
@@ -2933,11 +2933,11 @@ const Iu = {
2933
2933
  slotProps: {
2934
2934
  clearIndicator: { disableRipple: !0 },
2935
2935
  popper: {
2936
- component: q
2936
+ component: U
2937
2937
  }
2938
2938
  },
2939
2939
  getOptionLabel: c,
2940
- renderInput: z,
2940
+ renderInput: L,
2941
2941
  renderTags: W,
2942
2942
  renderOption: N,
2943
2943
  ...r
@@ -2953,14 +2953,14 @@ const Iu = {
2953
2953
  onOpen: i,
2954
2954
  onInputChange: s
2955
2955
  }) => {
2956
- const [c, d] = me(!1), [f, u] = me(!0), [p, v] = me(!0), x = Le(null), [$, k] = me([]), b = ve(
2956
+ const [c, d] = me(!1), [f, u] = me(!0), [p, v] = me(!0), w = Le(null), [M, C] = me([]), b = ve(
2957
2957
  Ra((E) => {
2958
- x.current?.abort();
2959
- const M = new AbortController();
2960
- x.current = M, e(E, M?.signal).then((C) => {
2961
- k(C), v(C.length === 0);
2958
+ w.current?.abort();
2959
+ const S = new AbortController();
2960
+ w.current = S, e(E, S?.signal).then((k) => {
2961
+ C(k), v(k.length === 0);
2962
2962
  }).finally(() => {
2963
- d(!1), x.current = null;
2963
+ d(!1), w.current = null;
2964
2964
  });
2965
2965
  }, t),
2966
2966
  [e, t, a]
@@ -2969,17 +2969,17 @@ const Iu = {
2969
2969
  handleOpen: (E) => {
2970
2970
  if (f) {
2971
2971
  u(!1);
2972
- const M = r && o ? o(r) : "";
2973
- (r || n === 0) && (d(!0), b(M));
2972
+ const S = r && o ? o(r) : "";
2973
+ (r || n === 0) && (d(!0), b(S));
2974
2974
  }
2975
2975
  i?.(E);
2976
2976
  },
2977
- handleInputChange: (E, M, C) => {
2978
- if (!M || M.length < n)
2979
- return b && b.clear(), v(!1), d(!1), k([]);
2980
- d(!0), f || b(M), s?.(E, M, C);
2977
+ handleInputChange: (E, S, k) => {
2978
+ if (!S || S.length < n)
2979
+ return b && b.clear(), v(!1), d(!1), C([]);
2980
+ d(!0), f || b(S), s?.(E, S, k);
2981
2981
  },
2982
- options: $,
2982
+ options: M,
2983
2983
  isLoadingData: c,
2984
2984
  emptyOptionsText: p ? a : td
2985
2985
  };
@@ -2999,18 +2999,18 @@ const Iu = {
2999
2999
  isSuccess: u,
3000
3000
  isError: p,
3001
3001
  isLoading: v,
3002
- isFullWidth: x,
3003
- onOpen: $,
3004
- noOptionsText: k,
3002
+ isFullWidth: w,
3003
+ onOpen: M,
3004
+ noOptionsText: C,
3005
3005
  onInputChange: b,
3006
- ...g
3006
+ ...m
3007
3007
  } = e;
3008
3008
  return /* @__PURE__ */ l.jsx(
3009
3009
  Ka,
3010
3010
  {
3011
3011
  options: t,
3012
3012
  disabled: d,
3013
- fullWidth: x,
3013
+ fullWidth: w,
3014
3014
  loading: v || n,
3015
3015
  onOpen: r,
3016
3016
  error: p,
@@ -3018,7 +3018,7 @@ const Iu = {
3018
3018
  success: u,
3019
3019
  noOptionsText: a,
3020
3020
  onInputChange: o,
3021
- ...g
3021
+ ...m
3022
3022
  }
3023
3023
  );
3024
3024
  }, od = y(fl)`
@@ -3346,12 +3346,12 @@ const Iu = {
3346
3346
  text: u,
3347
3347
  variant: p,
3348
3348
  onClick: v,
3349
- ...x
3349
+ ...w
3350
3350
  } = i.cancel || {};
3351
3351
  return /* @__PURE__ */ l.jsxs(Sd, { title: o, open: r, onClose: s, ...c, children: [
3352
3352
  a && /* @__PURE__ */ l.jsx(Od, { children: /* @__PURE__ */ l.jsx(jd, { children: a }) }),
3353
3353
  /* @__PURE__ */ l.jsxs(Md, { children: [
3354
- t && /* @__PURE__ */ l.jsx(Td, { ...x, ...n, children: u }),
3354
+ t && /* @__PURE__ */ l.jsx(Td, { ...w, ...n, children: u }),
3355
3355
  /* @__PURE__ */ l.jsx(Fe, { ...f, children: d })
3356
3356
  ] })
3357
3357
  ] });
@@ -3590,12 +3590,12 @@ const qd = y("div")`
3590
3590
  errorList: u,
3591
3591
  onRetry: p,
3592
3592
  actions: v = /* @__PURE__ */ l.jsx(Fe, { onClick: p, children: "Попробовать снова" })
3593
- } = r, x = u.map(($) => /* @__PURE__ */ l.jsx(ye, { component: "p", children: $ }, $));
3593
+ } = r, w = u.map((M) => /* @__PURE__ */ l.jsx(ye, { component: "p", children: M }, M));
3594
3594
  return /* @__PURE__ */ l.jsx(
3595
3595
  bn,
3596
3596
  {
3597
3597
  title: c,
3598
- description: x,
3598
+ description: w,
3599
3599
  imgAlt: d,
3600
3600
  imgSrc: f,
3601
3601
  Actions: v
@@ -3832,7 +3832,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3832
3832
  onSelectRow: s,
3833
3833
  onRowClick: c
3834
3834
  }) => {
3835
- const [d, f] = me(!1), u = n[e], { isDisabled: p, disabledReason: v } = o || {}, x = a && !!i?.find((S) => S[e] === u);
3835
+ const [d, f] = me(!1), u = n[e], { isDisabled: p, disabledReason: v } = o || {}, w = a && !!i?.find(($) => $[e] === u);
3836
3836
  return {
3837
3837
  rowId: u,
3838
3838
  disabled: p,
@@ -3843,22 +3843,22 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3843
3843
  onClick: () => {
3844
3844
  p || c?.(n);
3845
3845
  },
3846
- onMouseMove: (S) => {
3846
+ onMouseMove: ($) => {
3847
3847
  if (!p)
3848
3848
  return;
3849
- S.target.getAttribute(_r) === "true" || f(!1);
3849
+ $.target.getAttribute(_r) === "true" || f(!1);
3850
3850
  }
3851
3851
  },
3852
3852
  tooltipProps: {
3853
3853
  open: d,
3854
3854
  title: v,
3855
- onOpen: (S) => {
3856
- S.target.getAttribute(_r) === "true" && f(!0);
3855
+ onOpen: ($) => {
3856
+ $.target.getAttribute(_r) === "true" && f(!0);
3857
3857
  },
3858
3858
  onClose: () => f(!1)
3859
3859
  },
3860
3860
  checkboxProps: {
3861
- checked: x,
3861
+ checked: w,
3862
3862
  disabled: p,
3863
3863
  onChange: s(n)
3864
3864
  }
@@ -3873,26 +3873,26 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3873
3873
  columns: u,
3874
3874
  emptyCellValue: p,
3875
3875
  selectedRows: v,
3876
- activeRowId: x,
3877
- keyId: $,
3878
- onSelectRow: k,
3876
+ activeRowId: w,
3877
+ keyId: M,
3878
+ onSelectRow: C,
3879
3879
  onRowClick: b,
3880
3880
  // В этот rest-оператор попадают специфичные пропсы (атрибуты) virtuoso
3881
3881
  // Необходимы для NewDataGridInfinite
3882
- ...g
3883
- } = e, { isDisabledLastCell: S = !0, isNotSelectable: A } = c || {}, E = () => !d || A ? null : d && !A && /* @__PURE__ */ l.jsx(
3882
+ ...m
3883
+ } = e, { isDisabledLastCell: $ = !0, isNotSelectable: A } = c || {}, E = () => !d || A ? null : d && !A && /* @__PURE__ */ l.jsx(
3884
3884
  bf,
3885
3885
  {
3886
3886
  inert: a ? !0 : void 0,
3887
- onClick: (C) => C.stopPropagation(),
3887
+ onClick: (k) => k.stopPropagation(),
3888
3888
  children: /* @__PURE__ */ l.jsx(or, { ...n, style: { padding: 0 } })
3889
3889
  }
3890
- ), M = ve(() => {
3891
- const C = S ? void 0 : [u.length - 1];
3890
+ ), S = ve(() => {
3891
+ const k = $ ? void 0 : [u.length - 1];
3892
3892
  return u?.map((j, T) => {
3893
- const V = `${t}-${T}`, z = wf(
3893
+ const z = `${t}-${T}`, L = wf(
3894
3894
  a,
3895
- C,
3895
+ k,
3896
3896
  T
3897
3897
  ), N = !T;
3898
3898
  return /* @__PURE__ */ l.jsx(
@@ -3902,19 +3902,19 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3902
3902
  cell: j,
3903
3903
  emptyCellValue: p,
3904
3904
  startAdornment: N && E(),
3905
- isDisabled: z
3905
+ isDisabled: L
3906
3906
  },
3907
- V
3907
+ z
3908
3908
  );
3909
3909
  });
3910
3910
  }, [u, a]);
3911
- return /* @__PURE__ */ l.jsx(yf, { $gridColumns: f, className: i, ...g, children: /* @__PURE__ */ l.jsx(Te, { followCursor: !0, arrow: !1, ...o, children: /* @__PURE__ */ l.jsx(
3911
+ return /* @__PURE__ */ l.jsx(yf, { $gridColumns: f, className: i, ...m, children: /* @__PURE__ */ l.jsx(Te, { followCursor: !0, arrow: !1, ...o, children: /* @__PURE__ */ l.jsx(
3912
3912
  vf,
3913
3913
  {
3914
3914
  $gridColumns: f,
3915
3915
  [_r]: a,
3916
3916
  ...r,
3917
- children: M()
3917
+ children: S()
3918
3918
  }
3919
3919
  ) }) });
3920
3920
  }, Cf = y("ul", {
@@ -3953,18 +3953,18 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3953
3953
  noDataPlaceholder: u,
3954
3954
  onRetry: p,
3955
3955
  ...v
3956
- } = e, x = Re(() => o.map(({ children: $, options: k, ...b }) => {
3957
- const g = b[f];
3956
+ } = e, w = Re(() => o.map(({ children: M, options: C, ...b }) => {
3957
+ const m = b[f];
3958
3958
  return /* @__PURE__ */ l.jsx(
3959
3959
  kf,
3960
3960
  {
3961
3961
  row: b,
3962
3962
  selectedRows: a,
3963
- options: k,
3963
+ options: C,
3964
3964
  keyId: f,
3965
3965
  ...v
3966
3966
  },
3967
- g
3967
+ m
3968
3968
  );
3969
3969
  }), [o, f, a, v]);
3970
3970
  return /* @__PURE__ */ l.jsx(Cf, { $isEmpty: n, $minDisplayRows: d, children: /* @__PURE__ */ l.jsx(
@@ -3977,7 +3977,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3977
3977
  imgSrc: t.defaultErrorImgSrc,
3978
3978
  onRetry: p
3979
3979
  },
3980
- children: o.length ? x : u
3980
+ children: o.length ? w : u
3981
3981
  }
3982
3982
  ) });
3983
3983
  }, Mf = y("footer", {
@@ -4105,7 +4105,7 @@ const Of = y("div", {
4105
4105
  };
4106
4106
  }, Nf = (e) => {
4107
4107
  const { checkboxProps: t, handleSort: n } = Ff(e), { columns: r, gridColumns: o, isSelectable: a, sorting: i, onSelectAllRows: s } = e, c = Re(() => r.map(({ field: d, label: f, sortable: u, align: p }, v) => {
4108
- const x = !v, $ = () => !x || !a ? null : /* @__PURE__ */ l.jsx(_f, { children: /* @__PURE__ */ l.jsx(or, { ...t, onChange: s }) });
4108
+ const w = !v, M = () => !w || !a ? null : /* @__PURE__ */ l.jsx(_f, { children: /* @__PURE__ */ l.jsx(or, { ...t, onChange: s }) });
4109
4109
  return /* @__PURE__ */ l.jsx(
4110
4110
  Pf,
4111
4111
  {
@@ -4114,7 +4114,7 @@ const Of = y("div", {
4114
4114
  label: f,
4115
4115
  isSortable: u,
4116
4116
  align: p,
4117
- startAdornment: $(),
4117
+ startAdornment: M(),
4118
4118
  onSort: n
4119
4119
  },
4120
4120
  f
@@ -4201,35 +4201,35 @@ const Of = y("div", {
4201
4201
  onSelectRow: i
4202
4202
  }) => {
4203
4203
  const s = !!n?.length, c = !!i, d = o || a, f = n.filter(
4204
- (g) => !(g.options?.isDisabled || g.options?.isNotSelectable)
4204
+ (m) => !(m.options?.isDisabled || m.options?.isNotSelectable)
4205
4205
  ), u = Le([]);
4206
4206
  it(() => {
4207
4207
  o || (u.current = n);
4208
4208
  }, [n, o]);
4209
4209
  const p = Hf(t), v = Re(() => f.filter(
4210
- (g) => !r.find((S) => S[e] === g[e])
4211
- ).length, [f, r, e]), x = ve(() => n.length <= 1 ? t.map((g) => ({ ...g, sortable: !1 })) : t, [t, n]), $ = o ? u.current : n, k = (g) => {
4210
+ (m) => !r.find(($) => $[e] === m[e])
4211
+ ).length, [f, r, e]), w = ve(() => n.length <= 1 ? t.map((m) => ({ ...m, sortable: !1 })) : t, [t, n]), M = o ? u.current : n, C = (m) => {
4212
4212
  if (!i)
4213
4213
  return;
4214
- if (g.target.checked) {
4214
+ if (m.target.checked) {
4215
4215
  const A = Ul(
4216
4216
  [...r, ...f],
4217
4217
  ql(e)
4218
4218
  );
4219
4219
  return i(A);
4220
4220
  }
4221
- const S = r.filter(
4221
+ const $ = r.filter(
4222
4222
  (A) => !n.find((E) => E[e] === A[e])
4223
4223
  );
4224
- i(S);
4224
+ i($);
4225
4225
  }, b = ve(
4226
- (g) => (S) => {
4226
+ (m) => ($) => {
4227
4227
  if (i) {
4228
- if (S.target.checked)
4229
- return i([...r, g]);
4228
+ if ($.target.checked)
4229
+ return i([...r, m]);
4230
4230
  i(
4231
4231
  r.filter(
4232
- (A) => A[e] !== g[e]
4232
+ (A) => A[e] !== m[e]
4233
4233
  )
4234
4234
  );
4235
4235
  }
@@ -4238,14 +4238,14 @@ const Of = y("div", {
4238
4238
  );
4239
4239
  return {
4240
4240
  isDataGridDisabled: d,
4241
- renderRows: $,
4241
+ renderRows: M,
4242
4242
  headProps: {
4243
4243
  rowsCount: f.length,
4244
4244
  uncheckedRowsCount: v,
4245
4245
  gridColumns: p,
4246
4246
  isSelectable: c,
4247
- columns: x(),
4248
- onSelectAllRows: k
4247
+ columns: w(),
4248
+ onSelectAllRows: C
4249
4249
  },
4250
4250
  bodyProps: {
4251
4251
  gridColumns: p,
@@ -4266,18 +4266,18 @@ const Of = y("div", {
4266
4266
  minDisplayRows: u = ff,
4267
4267
  errorMsg: p,
4268
4268
  footer: v,
4269
- noDataPlaceholder: x,
4270
- isLoading: $,
4271
- isError: k,
4269
+ noDataPlaceholder: w,
4270
+ isLoading: M,
4271
+ isError: C,
4272
4272
  keyId: b,
4273
- activeRowId: g,
4274
- emptyCellValue: S = i,
4273
+ activeRowId: m,
4274
+ emptyCellValue: $ = i,
4275
4275
  className: A,
4276
4276
  onRowClick: E,
4277
- onSort: M,
4278
- noDataOptions: C,
4277
+ onSort: S,
4278
+ noDataOptions: k,
4279
4279
  onRetry: j
4280
- } = e, T = t ? zf : ui, V = ve(() => $ ? null : x || /* @__PURE__ */ l.jsx(Lf, { ...C }), [x, C, $]);
4280
+ } = e, T = t ? zf : ui, z = ve(() => M ? null : w || /* @__PURE__ */ l.jsx(Lf, { ...k }), [w, k, M]);
4281
4281
  return /* @__PURE__ */ l.jsxs(Vf, { $maxHeight: f, className: A, children: [
4282
4282
  /* @__PURE__ */ l.jsxs(T, { inert: t ? !0 : void 0, children: [
4283
4283
  /* @__PURE__ */ l.jsx(
@@ -4285,24 +4285,24 @@ const Of = y("div", {
4285
4285
  {
4286
4286
  ...n,
4287
4287
  sorting: d,
4288
- onSort: M
4288
+ onSort: S
4289
4289
  }
4290
4290
  ),
4291
4291
  /* @__PURE__ */ l.jsx(
4292
4292
  $f,
4293
4293
  {
4294
4294
  ...r,
4295
- activeRowId: g,
4295
+ activeRowId: m,
4296
4296
  keyId: b,
4297
4297
  selectedRows: c,
4298
4298
  minDisplayRows: u,
4299
4299
  rows: a,
4300
4300
  columns: s,
4301
- emptyCellValue: S,
4302
- isLoading: $,
4303
- isError: k,
4301
+ emptyCellValue: $,
4302
+ isLoading: M,
4303
+ isError: C,
4304
4304
  errorMsg: p,
4305
- noDataPlaceholder: V(),
4305
+ noDataPlaceholder: z(),
4306
4306
  onRowClick: E,
4307
4307
  onRetry: j
4308
4308
  }
@@ -4333,11 +4333,11 @@ const Of = y("div", {
4333
4333
  disabledReason: u,
4334
4334
  disabled: p,
4335
4335
  loading: v,
4336
- isBlockingOperation: x,
4337
- loadingNote: $,
4338
- onClick: k,
4336
+ isBlockingOperation: w,
4337
+ loadingNote: M,
4338
+ onClick: C,
4339
4339
  ...b
4340
- } = n, g = (S) => /* @__PURE__ */ l.jsx(
4340
+ } = n, m = ($) => /* @__PURE__ */ l.jsx(
4341
4341
  Te,
4342
4342
  {
4343
4343
  withoutContainer: !p,
@@ -4350,7 +4350,7 @@ const Of = y("div", {
4350
4350
  loading: v,
4351
4351
  ...b,
4352
4352
  variant: "text",
4353
- ...S,
4353
+ ...$,
4354
4354
  children: s
4355
4355
  }
4356
4356
  )
@@ -4362,11 +4362,11 @@ const Of = y("div", {
4362
4362
  {
4363
4363
  text: d,
4364
4364
  confirmButtonProps: f,
4365
- actionComponent: (S) => g(S),
4366
- onConfirm: r(k)
4365
+ actionComponent: ($) => m($),
4366
+ onConfirm: r(C)
4367
4367
  }
4368
- ) : g({
4369
- onClick: r(k)
4368
+ ) : m({
4369
+ onClick: r(C)
4370
4370
  }) });
4371
4371
  }, qf = ({
4372
4372
  action: e,
@@ -4534,33 +4534,33 @@ const Of = y("div", {
4534
4534
  getOptionLabel: n,
4535
4535
  onChange: r
4536
4536
  }) => {
4537
- const [o, a] = me(1), i = Le(!1), s = Le(null), c = (p, v, x) => {
4538
- const $ = n(e[0]);
4537
+ const [o, a] = me(1), i = Le(!1), s = Le(null), c = (p, v, w) => {
4538
+ const M = n(e[0]);
4539
4539
  document.body.appendChild(p);
4540
- let k = 0, b = 0;
4541
- for (let g = 1; g < e.length; g += 1) {
4542
- const S = p.firstChild?.cloneNode(
4540
+ let C = 0, b = 0;
4541
+ for (let m = 1; m < e.length; m += 1) {
4542
+ const $ = p.firstChild?.cloneNode(
4543
4543
  !0
4544
- ), A = n(e[g]), E = di(S, $);
4544
+ ), A = n(e[m]), E = di($, M);
4545
4545
  if (!E)
4546
4546
  throw new Error("Could not find text node");
4547
- E.textContent = A, p.appendChild(S);
4548
- const C = S.getBoundingClientRect().width + x;
4549
- if (k + C > v)
4547
+ E.textContent = A, p.appendChild($);
4548
+ const k = $.getBoundingClientRect().width + w;
4549
+ if (C + k > v)
4550
4550
  break;
4551
- b += 1, k += C;
4551
+ b += 1, C += k;
4552
4552
  }
4553
4553
  return document.body.removeChild(p), b;
4554
4554
  }, d = () => {
4555
4555
  const p = s.current;
4556
4556
  if (!p)
4557
4557
  throw new Error("Tags container ref is not set");
4558
- const v = window.getComputedStyle(p), x = Number.parseInt(v.columnGap), $ = p.firstElementChild?.getBoundingClientRect().width || 0, k = p.getBoundingClientRect().width - $, b = p.cloneNode(!0);
4558
+ const v = window.getComputedStyle(p), w = Number.parseInt(v.columnGap), M = p.firstElementChild?.getBoundingClientRect().width || 0, C = p.getBoundingClientRect().width - M, b = p.cloneNode(!0);
4559
4559
  for (; b.lastElementChild && b.children.length > 1; )
4560
4560
  b.removeChild(b.lastElementChild);
4561
4561
  b.style.visibility = "hidden";
4562
- const g = c(b, k, x);
4563
- a(1 + g);
4562
+ const m = c(b, C, w);
4563
+ a(1 + m);
4564
4564
  };
4565
4565
  Yr(() => {
4566
4566
  typeof window > "u" || !e || !e.length || (d(), i.current = !0);
@@ -4579,9 +4579,9 @@ const Of = y("div", {
4579
4579
  return p.observe(s.current), () => p.disconnect();
4580
4580
  }, [e]);
4581
4581
  const f = (p, v) => {
4582
- const x = n(p), $ = v === o - 1 && o <= e.length;
4583
- return { label: x, shrinks: $, onDelete: () => {
4584
- const b = e?.filter((g) => typeof g == "string" ? g !== p : g[t] !== p[t]);
4582
+ const w = n(p), M = v === o - 1 && o <= e.length;
4583
+ return { label: w, shrinks: M, onDelete: () => {
4584
+ const b = e?.filter((m) => typeof m == "string" ? m !== p : m[t] !== p[t]);
4585
4585
  r(b?.length ? b : []);
4586
4586
  } };
4587
4587
  }, u = e?.slice(0, o);
@@ -4674,16 +4674,16 @@ function up({
4674
4674
  const [s, c] = me(
4675
4675
  o || r || !1
4676
4676
  ), d = Le(null), f = () => c(!0), u = () => c(!1), p = () => {
4677
- const $ = {
4677
+ const M = {
4678
4678
  target: {
4679
4679
  value: a ? [] : ""
4680
4680
  }
4681
4681
  };
4682
- t?.call({}, $);
4683
- }, v = i && !(!e || Array.isArray(e) && e.length === 0 || typeof e == "string" && e.length === 0), x = !Ts.count(n);
4682
+ t?.call({}, M);
4683
+ }, v = i && !(!e || Array.isArray(e) && e.length === 0 || typeof e == "string" && e.length === 0), w = !Ts.count(n);
4684
4684
  return {
4685
4685
  isOpened: s,
4686
- isNoData: x,
4686
+ isNoData: w,
4687
4687
  isShowingClearButton: v,
4688
4688
  resetButtonRef: d,
4689
4689
  openSelect: f,
@@ -4705,7 +4705,7 @@ const dp = ({ onClick: e, disabled: t, ref: n }) => /* @__PURE__ */ l.jsx(
4705
4705
  );
4706
4706
  function pi({
4707
4707
  required: e,
4708
- getOptionLabel: t = ($) => String($),
4708
+ getOptionLabel: t = (M) => String(M),
4709
4709
  placeholder: n,
4710
4710
  helperText: r,
4711
4711
  loading: o,
@@ -4718,23 +4718,23 @@ function pi({
4718
4718
  id: u,
4719
4719
  onChange: p,
4720
4720
  isShowClearButton: v,
4721
- ...x
4721
+ ...w
4722
4722
  }) {
4723
4723
  const {
4724
- isOpened: $,
4725
- isShowingClearButton: k,
4724
+ isOpened: M,
4725
+ isShowingClearButton: C,
4726
4726
  isNoData: b,
4727
- onClearAll: g,
4728
- openSelect: S,
4727
+ onClearAll: m,
4728
+ openSelect: $,
4729
4729
  closeSelect: A,
4730
4730
  resetButtonRef: E
4731
4731
  } = up({
4732
- ...x,
4732
+ ...w,
4733
4733
  children: i,
4734
4734
  onChange: p,
4735
4735
  isShowClearButton: v
4736
- }), M = (C) => {
4737
- if (Array.isArray(C) && C.length) {
4736
+ }), S = (k) => {
4737
+ if (Array.isArray(k) && k.length) {
4738
4738
  const j = (T) => p?.(T ? {
4739
4739
  target: {
4740
4740
  value: T
@@ -4747,39 +4747,39 @@ function pi({
4747
4747
  return /* @__PURE__ */ l.jsx(
4748
4748
  op,
4749
4749
  {
4750
- data: C,
4750
+ data: k,
4751
4751
  keyId: "value",
4752
4752
  getOptionLabel: t,
4753
4753
  onChange: j,
4754
- onClick: S
4754
+ onClick: $
4755
4755
  }
4756
4756
  );
4757
4757
  }
4758
- return (Array.isArray(C) || typeof C == "string") && !C.length ? n : t(C);
4758
+ return (Array.isArray(k) || typeof k == "string") && !k.length ? n : t(k);
4759
4759
  };
4760
4760
  return /* @__PURE__ */ l.jsxs(La, { error: c, fullWidth: f, children: [
4761
4761
  d && /* @__PURE__ */ l.jsx(Cl, { htmlFor: u || d, required: e, children: d }),
4762
4762
  /* @__PURE__ */ l.jsxs(
4763
4763
  cp,
4764
4764
  {
4765
- ...x,
4766
- open: $,
4765
+ ...w,
4766
+ open: M,
4767
4767
  id: u || d,
4768
4768
  disabled: s,
4769
- onOpen: S,
4769
+ onOpen: $,
4770
4770
  onClose: A,
4771
- renderValue: M,
4771
+ renderValue: S,
4772
4772
  IconComponent: () => null,
4773
4773
  displayEmpty: !0,
4774
4774
  fullWidth: f,
4775
4775
  onChange: p,
4776
4776
  endAdornment: /* @__PURE__ */ l.jsxs(lp, { children: [
4777
- k && /* @__PURE__ */ l.jsx(
4777
+ C && /* @__PURE__ */ l.jsx(
4778
4778
  dp,
4779
4779
  {
4780
4780
  disabled: s,
4781
4781
  ref: E,
4782
- onClick: g
4782
+ onClick: m
4783
4783
  }
4784
4784
  ),
4785
4785
  /* @__PURE__ */ l.jsx(
@@ -4787,8 +4787,8 @@ function pi({
4787
4787
  {
4788
4788
  variant: "text",
4789
4789
  disabled: s,
4790
- onClick: S,
4791
- children: $ ? /* @__PURE__ */ l.jsx(Ws, { size: 16 }) : /* @__PURE__ */ l.jsx(Gr, { size: 16 })
4790
+ onClick: $,
4791
+ children: M ? /* @__PURE__ */ l.jsx(Ws, { size: 16 }) : /* @__PURE__ */ l.jsx(Gr, { size: 16 })
4792
4792
  }
4793
4793
  )
4794
4794
  ] }),
@@ -4869,7 +4869,7 @@ const hi = 20, fp = [20, 50, 100], pp = y("div")`
4869
4869
  disabled: u,
4870
4870
  isShowClearButton: !1,
4871
4871
  onChange: o,
4872
- children: d.map((x) => /* @__PURE__ */ l.jsx(st, { value: x, children: x }, x))
4872
+ children: d.map((w) => /* @__PURE__ */ l.jsx(st, { value: w, children: w }, w))
4873
4873
  }
4874
4874
  )
4875
4875
  ] }),
@@ -4978,8 +4978,8 @@ function gi(e) {
4978
4978
  const c = gn(e.timeZone, e), f = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - c, u = c !== t, p = f - s;
4979
4979
  if (u && p) {
4980
4980
  Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + p);
4981
- const v = gn(e.timeZone, e), x = c - v;
4982
- x && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + x), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + x));
4981
+ const v = gn(e.timeZone, e), w = c - v;
4982
+ w && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + w), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + w));
4983
4983
  }
4984
4984
  }
4985
4985
  class Pt extends xt {
@@ -6514,65 +6514,65 @@ function Hh(e, t, n = {}) {
6514
6514
  return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [a]) => (n[a] ? o.push(n[a]) : t[De[a]] ? o.push(t[De[a]]) : t[ht[a]] && o.push(t[ht[a]]), o), [t[X.Day]]);
6515
6515
  }
6516
6516
  function Yh(e) {
6517
- return m.createElement("button", { ...e });
6517
+ return g.createElement("button", { ...e });
6518
6518
  }
6519
6519
  function Gh(e) {
6520
- return m.createElement("span", { ...e });
6520
+ return g.createElement("span", { ...e });
6521
6521
  }
6522
6522
  function Uh(e) {
6523
6523
  const { size: t = 24, orientation: n = "left", className: r } = e;
6524
- return m.createElement(
6524
+ return g.createElement(
6525
6525
  "svg",
6526
6526
  { className: r, width: t, height: t, viewBox: "0 0 24 24" },
6527
- n === "up" && m.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
6528
- n === "down" && m.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
6529
- n === "left" && m.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
6530
- n === "right" && m.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
6527
+ n === "up" && g.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
6528
+ n === "down" && g.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
6529
+ n === "left" && g.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
6530
+ n === "right" && g.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
6531
6531
  );
6532
6532
  }
6533
6533
  function qh(e) {
6534
6534
  const { day: t, modifiers: n, ...r } = e;
6535
- return m.createElement("td", { ...r });
6535
+ return g.createElement("td", { ...r });
6536
6536
  }
6537
6537
  function Xh(e) {
6538
- const { day: t, modifiers: n, ...r } = e, o = m.useRef(null);
6539
- return m.useEffect(() => {
6538
+ const { day: t, modifiers: n, ...r } = e, o = g.useRef(null);
6539
+ return g.useEffect(() => {
6540
6540
  n.focused && o.current?.focus();
6541
- }, [n.focused]), m.createElement("button", { ref: o, ...r });
6541
+ }, [n.focused]), g.createElement("button", { ref: o, ...r });
6542
6542
  }
6543
6543
  function Qh(e) {
6544
6544
  const { options: t, className: n, components: r, classNames: o, ...a } = e, i = [o[X.Dropdown], n].join(" "), s = t?.find(({ value: c }) => c === a.value);
6545
- return m.createElement(
6545
+ return g.createElement(
6546
6546
  "span",
6547
6547
  { "data-disabled": a.disabled, className: o[X.DropdownRoot] },
6548
- m.createElement(r.Select, { className: i, ...a }, t?.map(({ value: c, label: d, disabled: f }) => m.createElement(r.Option, { key: c, value: c, disabled: f }, d))),
6549
- m.createElement(
6548
+ g.createElement(r.Select, { className: i, ...a }, t?.map(({ value: c, label: d, disabled: f }) => g.createElement(r.Option, { key: c, value: c, disabled: f }, d))),
6549
+ g.createElement(
6550
6550
  "span",
6551
6551
  { className: o[X.CaptionLabel], "aria-hidden": !0 },
6552
6552
  s?.label,
6553
- m.createElement(r.Chevron, { orientation: "down", size: 18, className: o[X.Chevron] })
6553
+ g.createElement(r.Chevron, { orientation: "down", size: 18, className: o[X.Chevron] })
6554
6554
  )
6555
6555
  );
6556
6556
  }
6557
6557
  function ji(e) {
6558
- return m.createElement("div", { ...e });
6558
+ return g.createElement("div", { ...e });
6559
6559
  }
6560
6560
  function Zh(e) {
6561
- return m.createElement("div", { ...e });
6561
+ return g.createElement("div", { ...e });
6562
6562
  }
6563
6563
  function Jh(e) {
6564
6564
  const { calendarMonth: t, displayIndex: n, ...r } = e;
6565
- return m.createElement("div", { ...r }, e.children);
6565
+ return g.createElement("div", { ...r }, e.children);
6566
6566
  }
6567
6567
  function Ti(e) {
6568
6568
  const { calendarMonth: t, displayIndex: n, ...r } = e;
6569
- return m.createElement("div", { ...r });
6569
+ return g.createElement("div", { ...r });
6570
6570
  }
6571
6571
  function Kh(e) {
6572
- return m.createElement("table", { ...e });
6572
+ return g.createElement("table", { ...e });
6573
6573
  }
6574
6574
  function Pi(e) {
6575
- return m.createElement("div", { ...e });
6575
+ return g.createElement("div", { ...e });
6576
6576
  }
6577
6577
  const Ai = $n(void 0);
6578
6578
  function En() {
@@ -6583,7 +6583,7 @@ function En() {
6583
6583
  }
6584
6584
  function eg(e) {
6585
6585
  const { components: t } = En();
6586
- return m.createElement(t.Dropdown, { ...e });
6586
+ return g.createElement(t.Dropdown, { ...e });
6587
6587
  }
6588
6588
  function _i(e) {
6589
6589
  const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: o, ...a } = e, { components: i, classNames: s, labels: { labelPrevious: c, labelNext: d } } = En(), f = ve((p) => {
@@ -6591,66 +6591,66 @@ function _i(e) {
6591
6591
  }, [o, n]), u = ve((p) => {
6592
6592
  r && t?.(p);
6593
6593
  }, [r, t]);
6594
- return m.createElement(
6594
+ return g.createElement(
6595
6595
  "nav",
6596
6596
  { ...a },
6597
- m.createElement(
6597
+ g.createElement(
6598
6598
  i.PreviousMonthButton,
6599
6599
  { type: "button", className: s[X.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: u },
6600
- m.createElement(i.Chevron, { disabled: r ? void 0 : !0, className: s[X.Chevron], orientation: "left" })
6600
+ g.createElement(i.Chevron, { disabled: r ? void 0 : !0, className: s[X.Chevron], orientation: "left" })
6601
6601
  ),
6602
- m.createElement(
6602
+ g.createElement(
6603
6603
  i.NextMonthButton,
6604
6604
  { type: "button", className: s[X.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": d(o), onClick: f },
6605
- m.createElement(i.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: s[X.Chevron] })
6605
+ g.createElement(i.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: s[X.Chevron] })
6606
6606
  )
6607
6607
  );
6608
6608
  }
6609
6609
  function tg(e) {
6610
6610
  const { components: t } = En();
6611
- return m.createElement(t.Button, { ...e });
6611
+ return g.createElement(t.Button, { ...e });
6612
6612
  }
6613
6613
  function ng(e) {
6614
- return m.createElement("option", { ...e });
6614
+ return g.createElement("option", { ...e });
6615
6615
  }
6616
6616
  function rg(e) {
6617
6617
  const { components: t } = En();
6618
- return m.createElement(t.Button, { ...e });
6618
+ return g.createElement(t.Button, { ...e });
6619
6619
  }
6620
6620
  function og(e) {
6621
6621
  const { rootRef: t, ...n } = e;
6622
- return m.createElement("div", { ...n, ref: t });
6622
+ return g.createElement("div", { ...n, ref: t });
6623
6623
  }
6624
6624
  function ag(e) {
6625
- return m.createElement("select", { ...e });
6625
+ return g.createElement("select", { ...e });
6626
6626
  }
6627
6627
  function ig(e) {
6628
6628
  const { week: t, ...n } = e;
6629
- return m.createElement("tr", { ...n });
6629
+ return g.createElement("tr", { ...n });
6630
6630
  }
6631
6631
  function sg(e) {
6632
- return m.createElement("th", { ...e });
6632
+ return g.createElement("th", { ...e });
6633
6633
  }
6634
6634
  function lg(e) {
6635
- return m.createElement(
6635
+ return g.createElement(
6636
6636
  "thead",
6637
6637
  { "aria-hidden": !0 },
6638
- m.createElement("tr", { ...e })
6638
+ g.createElement("tr", { ...e })
6639
6639
  );
6640
6640
  }
6641
6641
  function cg(e) {
6642
6642
  const { week: t, ...n } = e;
6643
- return m.createElement("th", { ...n });
6643
+ return g.createElement("th", { ...n });
6644
6644
  }
6645
6645
  function ug(e) {
6646
- return m.createElement("th", { ...e });
6646
+ return g.createElement("th", { ...e });
6647
6647
  }
6648
6648
  function dg(e) {
6649
- return m.createElement("tbody", { ...e });
6649
+ return g.createElement("tbody", { ...e });
6650
6650
  }
6651
6651
  function fg(e) {
6652
6652
  const { components: t } = En();
6653
- return m.createElement(t.Dropdown, { ...e });
6653
+ return g.createElement(t.Dropdown, { ...e });
6654
6654
  }
6655
6655
  const pg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: Yh, CaptionLabel: Gh, Chevron: Uh, Day: qh, DayButton: Xh, Dropdown: Qh, DropdownNav: ji, Footer: Zh, Month: Jh, MonthCaption: Ti, MonthGrid: Kh, Months: Pi, MonthsDropdown: eg, Nav: _i, NextMonthButton: tg, Option: ng, PreviousMonthButton: rg, Root: og, Select: ag, Week: ig, WeekNumber: cg, WeekNumberHeader: ug, Weekday: sg, Weekdays: lg, Weeks: dg, YearsDropdown: fg }, Symbol.toStringTag, { value: "Module" }));
6656
6656
  function hg(e) {
@@ -6718,8 +6718,8 @@ function Mg(e, t, n, r, o) {
6718
6718
  start: i(e),
6719
6719
  end: s(e)
6720
6720
  }).map((p) => {
6721
- const v = r.formatMonthDropdown(p, o), x = d(p), $ = t && p < a(t) || n && p > a(n) || !1;
6722
- return { value: x, label: v, disabled: $ };
6721
+ const v = r.formatMonthDropdown(p, o), w = d(p), M = t && p < a(t) || n && p > a(n) || !1;
6722
+ return { value: w, label: v, disabled: M };
6723
6723
  });
6724
6724
  }
6725
6725
  function Dg(e, t = {}, n = {}) {
@@ -6746,11 +6746,11 @@ function Eg(e, t, n, r) {
6746
6746
  let v = f;
6747
6747
  for (; c(v, u) || d(v, u); )
6748
6748
  p.push(v), v = i(v, 1);
6749
- return p.map((x) => {
6750
- const $ = n.formatYearDropdown(x, r);
6749
+ return p.map((w) => {
6750
+ const M = n.formatYearDropdown(w, r);
6751
6751
  return {
6752
- value: s(x),
6753
- label: $,
6752
+ value: s(w),
6753
+ label: M,
6754
6754
  disabled: !1
6755
6755
  };
6756
6756
  });
@@ -6803,58 +6803,58 @@ function Yg(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
6803
6803
  !(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
6804
6804
  r.length === 0 || d.length === 0 || r.length !== d.length)
6805
6805
  return;
6806
- const f = a.isSameMonth(r[0].date, d[0].date), u = a.isAfter(r[0].date, d[0].date), p = u ? n[Ke.caption_after_enter] : n[Ke.caption_before_enter], v = u ? n[Ke.weeks_after_enter] : n[Ke.weeks_before_enter], x = i.current, $ = e.current.cloneNode(!0);
6807
- if ($ instanceof HTMLElement ? (gr($).forEach((S) => {
6808
- if (!(S instanceof HTMLElement))
6806
+ const f = a.isSameMonth(r[0].date, d[0].date), u = a.isAfter(r[0].date, d[0].date), p = u ? n[Ke.caption_after_enter] : n[Ke.caption_before_enter], v = u ? n[Ke.weeks_after_enter] : n[Ke.weeks_before_enter], w = i.current, M = e.current.cloneNode(!0);
6807
+ if (M instanceof HTMLElement ? (gr(M).forEach(($) => {
6808
+ if (!($ instanceof HTMLElement))
6809
6809
  return;
6810
- const A = Vg(S);
6811
- A && S.contains(A) && S.removeChild(A);
6812
- const E = mr(S);
6810
+ const A = Vg($);
6811
+ A && $.contains(A) && $.removeChild(A);
6812
+ const E = mr($);
6813
6813
  E && E.classList.remove(p);
6814
- const M = yr(S);
6815
- M && M.classList.remove(v);
6816
- }), i.current = $) : i.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
6814
+ const S = yr($);
6815
+ S && S.classList.remove(v);
6816
+ }), i.current = M) : i.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
6817
6817
  o)
6818
6818
  return;
6819
- const k = x instanceof HTMLElement ? gr(x) : [], b = gr(e.current);
6820
- if (b && b.every((g) => g instanceof HTMLElement) && k && k.every((g) => g instanceof HTMLElement)) {
6819
+ const C = w instanceof HTMLElement ? gr(w) : [], b = gr(e.current);
6820
+ if (b && b.every((m) => m instanceof HTMLElement) && C && C.every((m) => m instanceof HTMLElement)) {
6821
6821
  c.current = !0, e.current.style.isolation = "isolate";
6822
- const g = zg(e.current);
6823
- g && (g.style.zIndex = "1"), b.forEach((S, A) => {
6824
- const E = k[A];
6822
+ const m = zg(e.current);
6823
+ m && (m.style.zIndex = "1"), b.forEach(($, A) => {
6824
+ const E = C[A];
6825
6825
  if (!E)
6826
6826
  return;
6827
- S.style.position = "relative", S.style.overflow = "hidden";
6828
- const M = mr(S);
6829
- M && M.classList.add(p);
6830
- const C = yr(S);
6831
- C && C.classList.add(v);
6827
+ $.style.position = "relative", $.style.overflow = "hidden";
6828
+ const S = mr($);
6829
+ S && S.classList.add(p);
6830
+ const k = yr($);
6831
+ k && k.classList.add(v);
6832
6832
  const j = () => {
6833
- c.current = !1, e.current && (e.current.style.isolation = ""), g && (g.style.zIndex = ""), M && M.classList.remove(p), C && C.classList.remove(v), S.style.position = "", S.style.overflow = "", S.contains(E) && S.removeChild(E);
6833
+ c.current = !1, e.current && (e.current.style.isolation = ""), m && (m.style.zIndex = ""), S && S.classList.remove(p), k && k.classList.remove(v), $.style.position = "", $.style.overflow = "", $.contains(E) && $.removeChild(E);
6834
6834
  };
6835
6835
  E.style.pointerEvents = "none", E.style.position = "absolute", E.style.overflow = "hidden", E.setAttribute("aria-hidden", "true");
6836
6836
  const T = Hg(E);
6837
6837
  T && (T.style.opacity = "0");
6838
- const V = mr(E);
6839
- V && (V.classList.add(u ? n[Ke.caption_before_exit] : n[Ke.caption_after_exit]), V.addEventListener("animationend", j));
6840
- const z = yr(E);
6841
- z && z.classList.add(u ? n[Ke.weeks_before_exit] : n[Ke.weeks_after_exit]), S.insertBefore(E, S.firstChild);
6838
+ const z = mr(E);
6839
+ z && (z.classList.add(u ? n[Ke.caption_before_exit] : n[Ke.caption_after_exit]), z.addEventListener("animationend", j));
6840
+ const L = yr(E);
6841
+ L && L.classList.add(u ? n[Ke.weeks_before_exit] : n[Ke.weeks_after_exit]), $.insertBefore(E, $.firstChild);
6842
6842
  });
6843
6843
  }
6844
6844
  });
6845
6845
  }
6846
6846
  function Gg(e, t, n, r) {
6847
- const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: f, differenceInCalendarMonths: u, endOfBroadcastWeek: p, endOfISOWeek: v, endOfMonth: x, endOfWeek: $, isAfter: k, startOfBroadcastWeek: b, startOfISOWeek: g, startOfWeek: S } = r, A = c ? b(o, r) : i ? g(o) : S(o), E = c ? p(a, r) : i ? v(x(a)) : $(x(a)), M = f(E, A), C = u(a, o) + 1, j = [];
6848
- for (let z = 0; z <= M; z++) {
6849
- const N = d(A, z);
6850
- if (t && k(N, t))
6847
+ const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: f, differenceInCalendarMonths: u, endOfBroadcastWeek: p, endOfISOWeek: v, endOfMonth: w, endOfWeek: M, isAfter: C, startOfBroadcastWeek: b, startOfISOWeek: m, startOfWeek: $ } = r, A = c ? b(o, r) : i ? m(o) : $(o), E = c ? p(a, r) : i ? v(w(a)) : M(w(a)), S = f(E, A), k = u(a, o) + 1, j = [];
6848
+ for (let L = 0; L <= S; L++) {
6849
+ const N = d(A, L);
6850
+ if (t && C(N, t))
6851
6851
  break;
6852
6852
  j.push(N);
6853
6853
  }
6854
- const V = (c ? 35 : 42) * C;
6855
- if (s && j.length < V) {
6856
- const z = V - j.length;
6857
- for (let N = 0; N < z; N++) {
6854
+ const z = (c ? 35 : 42) * k;
6855
+ if (s && j.length < z) {
6856
+ const L = z - j.length;
6857
+ for (let N = 0; N < L; N++) {
6858
6858
  const W = d(j[j.length - 1], 1);
6859
6859
  j.push(W);
6860
6860
  }
@@ -6911,29 +6911,29 @@ class Qg {
6911
6911
  }
6912
6912
  }
6913
6913
  function Zg(e, t, n, r) {
6914
- const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: f, startOfBroadcastWeek: u, startOfISOWeek: p, startOfWeek: v } = r, x = e.reduce(($, k) => {
6915
- const b = n.broadcastCalendar ? u(k, r) : n.ISOWeek ? p(k) : v(k), g = n.broadcastCalendar ? a(k, r) : n.ISOWeek ? i(s(k)) : c(s(k)), S = t.filter((C) => C >= b && C <= g), A = n.broadcastCalendar ? 35 : 42;
6916
- if (n.fixedWeeks && S.length < A) {
6917
- const C = t.filter((j) => {
6918
- const T = A - S.length;
6919
- return j > g && j <= o(g, T);
6914
+ const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: f, startOfBroadcastWeek: u, startOfISOWeek: p, startOfWeek: v } = r, w = e.reduce((M, C) => {
6915
+ const b = n.broadcastCalendar ? u(C, r) : n.ISOWeek ? p(C) : v(C), m = n.broadcastCalendar ? a(C, r) : n.ISOWeek ? i(s(C)) : c(s(C)), $ = t.filter((k) => k >= b && k <= m), A = n.broadcastCalendar ? 35 : 42;
6916
+ if (n.fixedWeeks && $.length < A) {
6917
+ const k = t.filter((j) => {
6918
+ const T = A - $.length;
6919
+ return j > m && j <= o(m, T);
6920
6920
  });
6921
- S.push(...C);
6921
+ $.push(...k);
6922
6922
  }
6923
- const E = S.reduce((C, j) => {
6924
- const T = n.ISOWeek ? d(j) : f(j), V = C.find((N) => N.weekNumber === T), z = new Ri(j, k, r);
6925
- return V ? V.days.push(z) : C.push(new Qg(T, [z])), C;
6926
- }, []), M = new Xg(k, E);
6927
- return $.push(M), $;
6923
+ const E = $.reduce((k, j) => {
6924
+ const T = n.ISOWeek ? d(j) : f(j), z = k.find((N) => N.weekNumber === T), L = new Ri(j, C, r);
6925
+ return z ? z.days.push(L) : k.push(new Qg(T, [L])), k;
6926
+ }, []), S = new Xg(C, E);
6927
+ return M.push(S), M;
6928
6928
  }, []);
6929
- return n.reverseMonths ? x.reverse() : x;
6929
+ return n.reverseMonths ? w.reverse() : w;
6930
6930
  }
6931
6931
  function Jg(e, t) {
6932
6932
  let { startMonth: n, endMonth: r } = e;
6933
- const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: f, today: u } = t, { fromYear: p, toYear: v, fromMonth: x, toMonth: $ } = e;
6934
- !n && x && (n = x), !n && p && (n = t.newDate(p, 0, 1)), !r && $ && (r = $), !r && v && (r = f(v, 11, 31));
6935
- const k = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
6936
- return n ? n = i(n) : p ? n = f(p, 0, 1) : !n && k && (n = o(c(e.today ?? u(), -100))), r ? r = s(r) : v ? r = f(v, 11, 31) : !r && k && (r = d(e.today ?? u())), [
6933
+ const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: f, today: u } = t, { fromYear: p, toYear: v, fromMonth: w, toMonth: M } = e;
6934
+ !n && w && (n = w), !n && p && (n = t.newDate(p, 0, 1)), !r && M && (r = M), !r && v && (r = f(v, 11, 31));
6935
+ const C = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
6936
+ return n ? n = i(n) : p ? n = f(p, 0, 1) : !n && C && (n = o(c(e.today ?? u(), -100))), r ? r = s(r) : v ? r = f(v, 11, 31) : !r && C && (r = d(e.today ?? u())), [
6937
6937
  n && a(n),
6938
6938
  r && a(r)
6939
6939
  ];
@@ -6971,14 +6971,14 @@ function nm(e, t) {
6971
6971
  e.month ? i : void 0
6972
6972
  );
6973
6973
  it(() => {
6974
- const M = Ko(e, t);
6975
- c(M);
6974
+ const S = Ko(e, t);
6975
+ c(S);
6976
6976
  }, [e.timeZone]);
6977
- const d = qg(s, r, e, t), f = Gg(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = Zg(d, f, e, t), p = tm(u), v = Ug(u), x = em(s, n, e, t), $ = Kg(s, r, e, t), { disableNavigation: k, onMonthChange: b } = e, g = (M) => p.some((C) => C.days.some((j) => j.isEqualTo(M))), S = (M) => {
6978
- if (k)
6977
+ const d = qg(s, r, e, t), f = Gg(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = Zg(d, f, e, t), p = tm(u), v = Ug(u), w = em(s, n, e, t), M = Kg(s, r, e, t), { disableNavigation: C, onMonthChange: b } = e, m = (S) => p.some((k) => k.days.some((j) => j.isEqualTo(S))), $ = (S) => {
6978
+ if (C)
6979
6979
  return;
6980
- let C = o(M);
6981
- n && C < o(n) && (C = o(n)), r && C > o(r) && (C = o(r)), c(C), b?.(C);
6980
+ let k = o(S);
6981
+ n && k < o(n) && (k = o(n)), r && k > o(r) && (k = o(r)), c(k), b?.(k);
6982
6982
  };
6983
6983
  return {
6984
6984
  months: u,
@@ -6986,11 +6986,11 @@ function nm(e, t) {
6986
6986
  days: v,
6987
6987
  navStart: n,
6988
6988
  navEnd: r,
6989
- previousMonth: x,
6990
- nextMonth: $,
6991
- goToMonth: S,
6992
- goToDay: (M) => {
6993
- g(M) || S(M.date);
6989
+ previousMonth: w,
6990
+ nextMonth: M,
6991
+ goToMonth: $,
6992
+ goToDay: (S) => {
6993
+ m(S) || $(S.date);
6994
6994
  }
6995
6995
  };
6996
6996
  }
@@ -7053,16 +7053,16 @@ function $t(e, t, n = Ot) {
7053
7053
  });
7054
7054
  }
7055
7055
  function om(e, t, n, r, o, a, i) {
7056
- const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: v, endOfISOWeek: x, endOfWeek: $, max: k, min: b, startOfBroadcastWeek: g, startOfISOWeek: S, startOfWeek: A } = i;
7057
- let M = {
7056
+ const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: v, endOfISOWeek: w, endOfWeek: M, max: C, min: b, startOfBroadcastWeek: m, startOfISOWeek: $, startOfWeek: A } = i;
7057
+ let S = {
7058
7058
  day: d,
7059
7059
  week: u,
7060
7060
  month: f,
7061
7061
  year: p,
7062
- startOfWeek: (C) => c ? g(C, i) : s ? S(C) : A(C),
7063
- endOfWeek: (C) => c ? v(C, i) : s ? x(C) : $(C)
7062
+ startOfWeek: (k) => c ? m(k, i) : s ? $(k) : A(k),
7063
+ endOfWeek: (k) => c ? v(k, i) : s ? w(k) : M(k)
7064
7064
  }[e](n, t === "after" ? 1 : -1);
7065
- return t === "before" && r ? M = k([r, M]) : t === "after" && o && (M = b([o, M])), M;
7065
+ return t === "before" && r ? S = C([r, S]) : t === "after" && o && (S = b([o, S])), S;
7066
7066
  }
7067
7067
  function Yi(e, t, n, r, o, a, i, s = 0) {
7068
7068
  if (s > 365)
@@ -7082,37 +7082,37 @@ function Yi(e, t, n, r, o, a, i, s = 0) {
7082
7082
  function am(e, t, n, r, o) {
7083
7083
  const { autoFocus: a } = e, [i, s] = me(), c = rm(t.days, n, r || (() => !1), i), [d, f] = me(a ? c : void 0);
7084
7084
  return {
7085
- isFocusTarget: ($) => !!c?.isEqualTo($),
7085
+ isFocusTarget: (M) => !!c?.isEqualTo(M),
7086
7086
  setFocused: f,
7087
7087
  focused: d,
7088
7088
  blur: () => {
7089
7089
  s(d), f(void 0);
7090
7090
  },
7091
- moveFocus: ($, k) => {
7091
+ moveFocus: (M, C) => {
7092
7092
  if (!d)
7093
7093
  return;
7094
- const b = Yi($, k, d, t.navStart, t.navEnd, e, o);
7094
+ const b = Yi(M, C, d, t.navStart, t.navEnd, e, o);
7095
7095
  b && (t.goToDay(b), f(b));
7096
7096
  }
7097
7097
  };
7098
7098
  }
7099
7099
  function im(e, t, n) {
7100
- const { disabled: r, hidden: o, modifiers: a, showOutsideDays: i, broadcastCalendar: s, today: c } = t, { isSameDay: d, isSameMonth: f, startOfMonth: u, isBefore: p, endOfMonth: v, isAfter: x } = n, $ = t.startMonth && u(t.startMonth), k = t.endMonth && v(t.endMonth), b = {
7100
+ const { disabled: r, hidden: o, modifiers: a, showOutsideDays: i, broadcastCalendar: s, today: c } = t, { isSameDay: d, isSameMonth: f, startOfMonth: u, isBefore: p, endOfMonth: v, isAfter: w } = n, M = t.startMonth && u(t.startMonth), C = t.endMonth && v(t.endMonth), b = {
7101
7101
  [De.focused]: [],
7102
7102
  [De.outside]: [],
7103
7103
  [De.disabled]: [],
7104
7104
  [De.hidden]: [],
7105
7105
  [De.today]: []
7106
- }, g = {};
7107
- for (const S of e) {
7108
- const { date: A, displayMonth: E } = S, M = !!(E && !f(A, E)), C = !!($ && p(A, $)), j = !!(k && x(A, k)), T = !!(r && $t(A, r, n)), V = !!(o && $t(A, o, n)) || C || j || // Broadcast calendar will show outside days as default
7109
- !s && !i && M || s && i === !1 && M, z = d(A, c ?? n.today());
7110
- M && b.outside.push(S), T && b.disabled.push(S), V && b.hidden.push(S), z && b.today.push(S), a && Object.keys(a).forEach((N) => {
7106
+ }, m = {};
7107
+ for (const $ of e) {
7108
+ const { date: A, displayMonth: E } = $, S = !!(E && !f(A, E)), k = !!(M && p(A, M)), j = !!(C && w(A, C)), T = !!(r && $t(A, r, n)), z = !!(o && $t(A, o, n)) || k || j || // Broadcast calendar will show outside days as default
7109
+ !s && !i && S || s && i === !1 && S, L = d(A, c ?? n.today());
7110
+ S && b.outside.push($), T && b.disabled.push($), z && b.hidden.push($), L && b.today.push($), a && Object.keys(a).forEach((N) => {
7111
7111
  const W = a?.[N];
7112
- W && $t(A, W, n) && (g[N] ? g[N].push(S) : g[N] = [S]);
7112
+ W && $t(A, W, n) && (m[N] ? m[N].push($) : m[N] = [$]);
7113
7113
  });
7114
7114
  }
7115
- return (S) => {
7115
+ return ($) => {
7116
7116
  const A = {
7117
7117
  [De.focused]: !1,
7118
7118
  [De.disabled]: !1,
@@ -7120,12 +7120,12 @@ function im(e, t, n) {
7120
7120
  [De.outside]: !1,
7121
7121
  [De.today]: !1
7122
7122
  }, E = {};
7123
- for (const M in b) {
7124
- const C = b[M];
7125
- A[M] = C.some((j) => j === S);
7123
+ for (const S in b) {
7124
+ const k = b[S];
7125
+ A[S] = k.some((j) => j === $);
7126
7126
  }
7127
- for (const M in g)
7128
- E[M] = g[M].some((C) => C === S);
7127
+ for (const S in m)
7128
+ E[S] = m[S].some((k) => k === $);
7129
7129
  return {
7130
7130
  ...A,
7131
7131
  // custom modifiers should override all the previous ones
@@ -7134,18 +7134,18 @@ function im(e, t, n) {
7134
7134
  };
7135
7135
  }
7136
7136
  function sm(e, t) {
7137
- const { selected: n, required: r, onSelect: o } = e, [a, i] = sr(n, o ? n : void 0), s = o ? n : a, { isSameDay: c } = t, d = (v) => s?.some((x) => c(x, v)) ?? !1, { min: f, max: u } = e;
7137
+ const { selected: n, required: r, onSelect: o } = e, [a, i] = sr(n, o ? n : void 0), s = o ? n : a, { isSameDay: c } = t, d = (v) => s?.some((w) => c(w, v)) ?? !1, { min: f, max: u } = e;
7138
7138
  return {
7139
7139
  selected: s,
7140
- select: (v, x, $) => {
7141
- let k = [...s ?? []];
7140
+ select: (v, w, M) => {
7141
+ let C = [...s ?? []];
7142
7142
  if (d(v)) {
7143
7143
  if (s?.length === f || r && s?.length === 1)
7144
7144
  return;
7145
- k = s?.filter((b) => !c(b, v));
7145
+ C = s?.filter((b) => !c(b, v));
7146
7146
  } else
7147
- s?.length === u ? k = [v] : k = [...k, v];
7148
- return o || i(k), o?.(k, v, x, $), k;
7147
+ s?.length === u ? C = [v] : C = [...C, v];
7148
+ return o || i(C), o?.(C, v, w, M), C;
7149
7149
  },
7150
7150
  isSelected: d
7151
7151
  };
@@ -7215,9 +7215,9 @@ function dm(e, t) {
7215
7215
  const { disabled: n, excludeDisabled: r, selected: o, required: a, onSelect: i } = e, [s, c] = sr(o, i ? o : void 0), d = i ? o : s;
7216
7216
  return {
7217
7217
  selected: d,
7218
- select: (p, v, x) => {
7219
- const { min: $, max: k } = e, b = p ? lm(p, d, $, k, a, t) : void 0;
7220
- return r && n && b?.from && b.to && um({ from: b.from, to: b.to }, n, t) && (b.from = p, b.to = void 0), i || c(b), i?.(b, p, v, x), b;
7218
+ select: (p, v, w) => {
7219
+ const { min: M, max: C } = e, b = p ? lm(p, d, M, C, a, t) : void 0;
7220
+ return r && n && b?.from && b.to && um({ from: b.from, to: b.to }, n, t) && (b.from = p, b.to = void 0), i || c(b), i?.(b, p, v, w), b;
7221
7221
  },
7222
7222
  isSelected: (p) => d && St(d, p, !1, t)
7223
7223
  };
@@ -7227,8 +7227,8 @@ function fm(e, t) {
7227
7227
  return {
7228
7228
  selected: s,
7229
7229
  select: (u, p, v) => {
7230
- let x = u;
7231
- return !r && s && s && c(u, s) && (x = void 0), o || i(x), o?.(x, u, p, v), x;
7230
+ let w = u;
7231
+ return !r && s && s && c(u, s) && (w = void 0), o || i(w), o?.(w, u, p, v), w;
7232
7232
  },
7233
7233
  isSelected: (u) => s ? c(s, u) : !1
7234
7234
  };
@@ -7279,17 +7279,17 @@ function hm(e) {
7279
7279
  e.formatters,
7280
7280
  e.labels,
7281
7281
  e.classNames
7282
- ]), { captionLayout: s, mode: c, onDayBlur: d, onDayClick: f, onDayFocus: u, onDayKeyDown: p, onDayMouseEnter: v, onDayMouseLeave: x, onNextClick: $, onPrevClick: k, showWeekNumber: b, styles: g } = e, { formatCaption: S, formatDay: A, formatMonthDropdown: E, formatWeekNumber: M, formatWeekNumberHeader: C, formatWeekdayName: j, formatYearDropdown: T } = n, V = nm(e, o), { days: z, months: N, navStart: W, navEnd: q, previousMonth: Y, nextMonth: B, goToMonth: Z } = V, oe = im(z, e, o), { isSelected: te, select: O, selected: _ } = pm(e, o) ?? {}, { blur: H, focused: G, isFocusTarget: le, moveFocus: se, setFocused: re } = am(e, V, oe, te ?? (() => !1), o), { labelDayButton: we, labelGridcell: ae, labelGrid: Se, labelMonthDropdown: Ee, labelNav: Ue, labelWeekday: lt, labelWeekNumber: Wt, labelWeekNumberHeader: U, labelYearDropdown: J } = r, $e = Re(() => Og(o, e.ISOWeek), [o, e.ISOWeek]), ke = c !== void 0 || f !== void 0, Ne = ve(() => {
7283
- Y && (Z(Y), k?.(Y));
7284
- }, [Y, Z, k]), ie = ve(() => {
7285
- B && (Z(B), $?.(B));
7286
- }, [Z, B, $]), Ie = ve((Q, de) => (ce) => {
7282
+ ]), { captionLayout: s, mode: c, onDayBlur: d, onDayClick: f, onDayFocus: u, onDayKeyDown: p, onDayMouseEnter: v, onDayMouseLeave: w, onNextClick: M, onPrevClick: C, showWeekNumber: b, styles: m } = e, { formatCaption: $, formatDay: A, formatMonthDropdown: E, formatWeekNumber: S, formatWeekNumberHeader: k, formatWeekdayName: j, formatYearDropdown: T } = n, z = nm(e, o), { days: L, months: N, navStart: W, navEnd: U, previousMonth: Y, nextMonth: B, goToMonth: Z } = z, oe = im(L, e, o), { isSelected: te, select: O, selected: _ } = pm(e, o) ?? {}, { blur: H, focused: G, isFocusTarget: le, moveFocus: se, setFocused: re } = am(e, z, oe, te ?? (() => !1), o), { labelDayButton: we, labelGridcell: ae, labelGrid: Se, labelMonthDropdown: Ee, labelNav: Ue, labelWeekday: lt, labelWeekNumber: Wt, labelWeekNumberHeader: q, labelYearDropdown: J } = r, $e = Re(() => Og(o, e.ISOWeek), [o, e.ISOWeek]), ke = c !== void 0 || f !== void 0, Ne = ve(() => {
7283
+ Y && (Z(Y), C?.(Y));
7284
+ }, [Y, Z, C]), ie = ve(() => {
7285
+ B && (Z(B), M?.(B));
7286
+ }, [Z, B, M]), Ie = ve((Q, de) => (ce) => {
7287
7287
  ce.preventDefault(), ce.stopPropagation(), re(Q), O?.(Q.date, de, ce), f?.(Q.date, de, ce);
7288
7288
  }, [O, f, re]), ct = ve((Q, de) => (ce) => {
7289
7289
  re(Q), u?.(Q.date, de, ce);
7290
7290
  }, [u, re]), h = ve((Q, de) => (ce) => {
7291
7291
  H(), d?.(Q.date, de, ce);
7292
- }, [H, d]), w = ve((Q, de) => (ce) => {
7292
+ }, [H, d]), x = ve((Q, de) => (ce) => {
7293
7293
  const qe = {
7294
7294
  ArrowLeft: ["day", e.dir === "rtl" ? "after" : "before"],
7295
7295
  ArrowRight: ["day", e.dir === "rtl" ? "before" : "after"],
@@ -7309,17 +7309,17 @@ function hm(e) {
7309
7309
  }, [se, p, e.dir]), D = ve((Q, de) => (ce) => {
7310
7310
  v?.(Q.date, de, ce);
7311
7311
  }, [v]), I = ve((Q, de) => (ce) => {
7312
- x?.(Q.date, de, ce);
7313
- }, [x]), F = ve((Q) => (de) => {
7312
+ w?.(Q.date, de, ce);
7313
+ }, [w]), F = ve((Q) => (de) => {
7314
7314
  const ce = Number(de.target.value), qe = o.setMonth(o.startOfMonth(Q), ce);
7315
7315
  Z(qe);
7316
7316
  }, [o, Z]), P = ve((Q) => (de) => {
7317
7317
  const ce = Number(de.target.value), qe = o.setYear(o.startOfMonth(Q), ce);
7318
7318
  Z(qe);
7319
- }, [o, Z]), { className: L, style: ne } = Re(() => ({
7319
+ }, [o, Z]), { className: V, style: ne } = Re(() => ({
7320
7320
  className: [i[X.Root], e.className].filter(Boolean).join(" "),
7321
- style: { ...g?.[X.Root], ...e.style }
7322
- }), [i, e.className, e.style, g]), ue = gg(e), Ce = Le(null);
7321
+ style: { ...m?.[X.Root], ...e.style }
7322
+ }), [i, e.className, e.style, m]), ue = gg(e), Ce = Le(null);
7323
7323
  Yg(Ce, !!e.animate, {
7324
7324
  classNames: i,
7325
7325
  months: N,
@@ -7338,31 +7338,31 @@ function hm(e) {
7338
7338
  getModifiers: oe,
7339
7339
  components: t,
7340
7340
  classNames: i,
7341
- styles: g,
7341
+ styles: m,
7342
7342
  labels: r,
7343
7343
  formatters: n
7344
7344
  };
7345
- return m.createElement(
7345
+ return g.createElement(
7346
7346
  Ai.Provider,
7347
7347
  { value: nt },
7348
- m.createElement(
7348
+ g.createElement(
7349
7349
  t.Root,
7350
- { rootRef: e.animate ? Ce : void 0, className: L, style: ne, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], ...ue },
7351
- m.createElement(
7350
+ { rootRef: e.animate ? Ce : void 0, className: V, style: ne, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], ...ue },
7351
+ g.createElement(
7352
7352
  t.Months,
7353
- { className: i[X.Months], style: g?.[X.Months] },
7354
- !e.hideNavigation && m.createElement(t.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: i[X.Nav], style: g?.[X.Nav], "aria-label": Ue(), onPreviousClick: Ne, onNextClick: ie, previousMonth: Y, nextMonth: B }),
7353
+ { className: i[X.Months], style: m?.[X.Months] },
7354
+ !e.hideNavigation && g.createElement(t.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: i[X.Nav], style: m?.[X.Nav], "aria-label": Ue(), onPreviousClick: Ne, onNextClick: ie, previousMonth: Y, nextMonth: B }),
7355
7355
  N.map((Q, de) => {
7356
- const ce = Mg(Q.date, W, q, n, o), qe = Eg(W, q, n, o);
7357
- return m.createElement(
7356
+ const ce = Mg(Q.date, W, U, n, o), qe = Eg(W, U, n, o);
7357
+ return g.createElement(
7358
7358
  t.Month,
7359
- { "data-animated-month": e.animate ? "true" : void 0, className: i[X.Month], style: g?.[X.Month], key: de, displayIndex: de, calendarMonth: Q },
7360
- m.createElement(t.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: i[X.MonthCaption], style: g?.[X.MonthCaption], calendarMonth: Q, displayIndex: de }, s?.startsWith("dropdown") ? m.createElement(
7359
+ { "data-animated-month": e.animate ? "true" : void 0, className: i[X.Month], style: m?.[X.Month], key: de, displayIndex: de, calendarMonth: Q },
7360
+ g.createElement(t.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: i[X.MonthCaption], style: m?.[X.MonthCaption], calendarMonth: Q, displayIndex: de }, s?.startsWith("dropdown") ? g.createElement(
7361
7361
  t.DropdownNav,
7362
- { className: i[X.Dropdowns], style: g?.[X.Dropdowns] },
7363
- s === "dropdown" || s === "dropdown-months" ? m.createElement(t.MonthsDropdown, { className: i[X.MonthsDropdown], "aria-label": Ee(), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: F(Q.date), options: ce, style: g?.[X.Dropdown], value: o.getMonth(Q.date) }) : m.createElement("span", null, E(Q.date, o)),
7364
- s === "dropdown" || s === "dropdown-years" ? m.createElement(t.YearsDropdown, { className: i[X.YearsDropdown], "aria-label": J(o.options), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: P(Q.date), options: qe, style: g?.[X.Dropdown], value: o.getYear(Q.date) }) : m.createElement("span", null, T(Q.date, o)),
7365
- m.createElement("span", { role: "status", "aria-live": "polite", style: {
7362
+ { className: i[X.Dropdowns], style: m?.[X.Dropdowns] },
7363
+ s === "dropdown" || s === "dropdown-months" ? g.createElement(t.MonthsDropdown, { className: i[X.MonthsDropdown], "aria-label": Ee(), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: F(Q.date), options: ce, style: m?.[X.Dropdown], value: o.getMonth(Q.date) }) : g.createElement("span", null, E(Q.date, o)),
7364
+ s === "dropdown" || s === "dropdown-years" ? g.createElement(t.YearsDropdown, { className: i[X.YearsDropdown], "aria-label": J(o.options), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: P(Q.date), options: qe, style: m?.[X.Dropdown], value: o.getYear(Q.date) }) : g.createElement("span", null, T(Q.date, o)),
7365
+ g.createElement("span", { role: "status", "aria-live": "polite", style: {
7366
7366
  border: 0,
7367
7367
  clip: "rect(0 0 0 0)",
7368
7368
  height: "1px",
@@ -7373,38 +7373,38 @@ function hm(e) {
7373
7373
  width: "1px",
7374
7374
  whiteSpace: "nowrap",
7375
7375
  wordWrap: "normal"
7376
- } }, S(Q.date, o.options, o))
7377
- ) : m.createElement(t.CaptionLabel, { className: i[X.CaptionLabel], role: "status", "aria-live": "polite" }, S(Q.date, o.options, o))),
7378
- m.createElement(
7376
+ } }, $(Q.date, o.options, o))
7377
+ ) : g.createElement(t.CaptionLabel, { className: i[X.CaptionLabel], role: "status", "aria-live": "polite" }, $(Q.date, o.options, o))),
7378
+ g.createElement(
7379
7379
  t.MonthGrid,
7380
- { role: "grid", "aria-multiselectable": c === "multiple" || c === "range", "aria-label": Se(Q.date, o.options, o) || void 0, className: i[X.MonthGrid], style: g?.[X.MonthGrid] },
7381
- !e.hideWeekdays && m.createElement(
7380
+ { role: "grid", "aria-multiselectable": c === "multiple" || c === "range", "aria-label": Se(Q.date, o.options, o) || void 0, className: i[X.MonthGrid], style: m?.[X.MonthGrid] },
7381
+ !e.hideWeekdays && g.createElement(
7382
7382
  t.Weekdays,
7383
- { "data-animated-weekdays": e.animate ? "true" : void 0, className: i[X.Weekdays], style: g?.[X.Weekdays] },
7384
- b && m.createElement(t.WeekNumberHeader, { "aria-label": U(o.options), className: i[X.WeekNumberHeader], style: g?.[X.WeekNumberHeader], scope: "col" }, C()),
7385
- $e.map((He, ut) => m.createElement(t.Weekday, { "aria-label": lt(He, o.options, o), className: i[X.Weekday], key: ut, style: g?.[X.Weekday], scope: "col" }, j(He, o.options, o)))
7383
+ { "data-animated-weekdays": e.animate ? "true" : void 0, className: i[X.Weekdays], style: m?.[X.Weekdays] },
7384
+ b && g.createElement(t.WeekNumberHeader, { "aria-label": q(o.options), className: i[X.WeekNumberHeader], style: m?.[X.WeekNumberHeader], scope: "col" }, k()),
7385
+ $e.map((He, ut) => g.createElement(t.Weekday, { "aria-label": lt(He, o.options, o), className: i[X.Weekday], key: ut, style: m?.[X.Weekday], scope: "col" }, j(He, o.options, o)))
7386
7386
  ),
7387
- m.createElement(t.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: i[X.Weeks], style: g?.[X.Weeks] }, Q.weeks.map((He, ut) => m.createElement(
7387
+ g.createElement(t.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: i[X.Weeks], style: m?.[X.Weeks] }, Q.weeks.map((He, ut) => g.createElement(
7388
7388
  t.Week,
7389
- { className: i[X.Week], key: He.weekNumber, style: g?.[X.Week], week: He },
7390
- b && m.createElement(t.WeekNumber, { week: He, style: g?.[X.WeekNumber], "aria-label": Wt(He.weekNumber, {
7389
+ { className: i[X.Week], key: He.weekNumber, style: m?.[X.Week], week: He },
7390
+ b && g.createElement(t.WeekNumber, { week: He, style: m?.[X.WeekNumber], "aria-label": Wt(He.weekNumber, {
7391
7391
  locale: a
7392
- }), className: i[X.WeekNumber], scope: "row", role: "rowheader" }, M(He.weekNumber)),
7392
+ }), className: i[X.WeekNumber], scope: "row", role: "rowheader" }, S(He.weekNumber)),
7393
7393
  He.days.map((be) => {
7394
7394
  const { date: rt } = be, fe = oe(be);
7395
7395
  if (fe[De.focused] = !fe.hidden && !!G?.isEqualTo(be), fe[ht.selected] = te?.(rt) || fe.selected, ao(_)) {
7396
7396
  const { from: Oe, to: Pe } = _;
7397
7397
  fe[ht.range_start] = !!(Oe && Pe && o.isSameDay(rt, Oe)), fe[ht.range_end] = !!(Oe && Pe && o.isSameDay(rt, Pe)), fe[ht.range_middle] = St(_, rt, !0, o);
7398
7398
  }
7399
- const Fn = Dg(fe, g, e.modifiersStyles), Nn = Hh(fe, i, e.modifiersClassNames), ee = !ke && !fe.hidden ? ae(rt, fe, o.options, o) : void 0;
7400
- return m.createElement(t.Day, { key: `${o.format(rt, "yyyy-MM-dd")}_${o.format(be.displayMonth, "yyyy-MM")}`, day: be, modifiers: fe, className: Nn.join(" "), style: Fn, role: "gridcell", "aria-selected": fe.selected || void 0, "aria-label": ee, "data-day": o.format(rt, "yyyy-MM-dd"), "data-month": be.outside ? o.format(rt, "yyyy-MM") : void 0, "data-selected": fe.selected || void 0, "data-disabled": fe.disabled || void 0, "data-hidden": fe.hidden || void 0, "data-outside": be.outside || void 0, "data-focused": fe.focused || void 0, "data-today": fe.today || void 0 }, !fe.hidden && ke ? m.createElement(t.DayButton, { className: i[X.DayButton], style: g?.[X.DayButton], type: "button", day: be, modifiers: fe, disabled: fe.disabled || void 0, tabIndex: le(be) ? 0 : -1, "aria-label": we(rt, fe, o.options, o), onClick: Ie(be, fe), onBlur: h(be, fe), onFocus: ct(be, fe), onKeyDown: w(be, fe), onMouseEnter: D(be, fe), onMouseLeave: I(be, fe) }, A(rt, o.options, o)) : !fe.hidden && A(be.date, o.options, o));
7399
+ const Fn = Dg(fe, m, e.modifiersStyles), Nn = Hh(fe, i, e.modifiersClassNames), ee = !ke && !fe.hidden ? ae(rt, fe, o.options, o) : void 0;
7400
+ return g.createElement(t.Day, { key: `${o.format(rt, "yyyy-MM-dd")}_${o.format(be.displayMonth, "yyyy-MM")}`, day: be, modifiers: fe, className: Nn.join(" "), style: Fn, role: "gridcell", "aria-selected": fe.selected || void 0, "aria-label": ee, "data-day": o.format(rt, "yyyy-MM-dd"), "data-month": be.outside ? o.format(rt, "yyyy-MM") : void 0, "data-selected": fe.selected || void 0, "data-disabled": fe.disabled || void 0, "data-hidden": fe.hidden || void 0, "data-outside": be.outside || void 0, "data-focused": fe.focused || void 0, "data-today": fe.today || void 0 }, !fe.hidden && ke ? g.createElement(t.DayButton, { className: i[X.DayButton], style: m?.[X.DayButton], type: "button", day: be, modifiers: fe, disabled: fe.disabled || void 0, tabIndex: le(be) ? 0 : -1, "aria-label": we(rt, fe, o.options, o), onClick: Ie(be, fe), onBlur: h(be, fe), onFocus: ct(be, fe), onKeyDown: x(be, fe), onMouseEnter: D(be, fe), onMouseLeave: I(be, fe) }, A(rt, o.options, o)) : !fe.hidden && A(be.date, o.options, o));
7401
7401
  })
7402
7402
  )))
7403
7403
  )
7404
7404
  );
7405
7405
  })
7406
7406
  ),
7407
- e.footer && m.createElement(t.Footer, { className: i[X.Footer], style: g?.[X.Footer], role: "status", "aria-live": "polite" }, e.footer)
7407
+ e.footer && g.createElement(t.Footer, { className: i[X.Footer], style: m?.[X.Footer], role: "status", "aria-live": "polite" }, e.footer)
7408
7408
  )
7409
7409
  );
7410
7410
  }
@@ -8438,42 +8438,42 @@ var yn = function(e) {
8438
8438
  this.register = function(a) {
8439
8439
  var i;
8440
8440
  if (ua.includes(a.type)) {
8441
- var s = (i = a._wrapperState) !== null && i !== void 0 ? i : {}, c = s.initialValue, d = c === void 0 ? "" : c, f = s.controlled, u = f !== void 0 && f, p = n({ initialValue: a.value || d, controlled: u }), v = p.value, x = p.options, $ = { value: v, options: x, fallbackOptions: x }, k = { id: -1, cachedId: -1 }, b = { value: "", selectionStart: 0, selectionEnd: 0 }, g = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
8442
- Object.defineProperty(a, "value", la(la({}, g), {}, { set: function(M) {
8443
- var C;
8444
- b.value = M, g == null || (C = g.set) === null || C === void 0 || C.call(a, M);
8441
+ var s = (i = a._wrapperState) !== null && i !== void 0 ? i : {}, c = s.initialValue, d = c === void 0 ? "" : c, f = s.controlled, u = f !== void 0 && f, p = n({ initialValue: a.value || d, controlled: u }), v = p.value, w = p.options, M = { value: v, options: w, fallbackOptions: w }, C = { id: -1, cachedId: -1 }, b = { value: "", selectionStart: 0, selectionEnd: 0 }, m = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
8442
+ Object.defineProperty(a, "value", la(la({}, m), {}, { set: function(S) {
8443
+ var k;
8444
+ b.value = S, m == null || (k = m.set) === null || k === void 0 || k.call(a, S);
8445
8445
  } })), a.value = v;
8446
- var S = function() {
8447
- var M = function() {
8448
- var C, j;
8449
- b.selectionStart = (C = a.selectionStart) !== null && C !== void 0 ? C : 0, b.selectionEnd = (j = a.selectionEnd) !== null && j !== void 0 ? j : 0, k.id = window.setTimeout(M);
8446
+ var $ = function() {
8447
+ var S = function() {
8448
+ var k, j;
8449
+ b.selectionStart = (k = a.selectionStart) !== null && k !== void 0 ? k : 0, b.selectionEnd = (j = a.selectionEnd) !== null && j !== void 0 ? j : 0, C.id = window.setTimeout(S);
8450
8450
  };
8451
- k.id = window.setTimeout(M);
8451
+ C.id = window.setTimeout(S);
8452
8452
  }, A = function() {
8453
- window.clearTimeout(k.id), k.id = -1, k.cachedId = -1;
8454
- }, E = function(M) {
8453
+ window.clearTimeout(C.id), C.id = -1, C.cachedId = -1;
8454
+ }, E = function(S) {
8455
8455
  try {
8456
- var C, j;
8457
- if (k.cachedId === k.id) throw new yn("The input selection has not been updated.");
8458
- k.cachedId = k.id;
8459
- var T = a.value, V = a.selectionStart, z = a.selectionEnd;
8460
- if (V === null || z === null) throw new yn("The selection attributes have not been initialized.");
8456
+ var k, j;
8457
+ if (C.cachedId === C.id) throw new yn("The input selection has not been updated.");
8458
+ C.cachedId = C.id;
8459
+ var T = a.value, z = a.selectionStart, L = a.selectionEnd;
8460
+ if (z === null || L === null) throw new yn("The selection attributes have not been initialized.");
8461
8461
  var N, W = b.value;
8462
- if (M.inputType === void 0 && (b.selectionStart = 0, b.selectionEnd = W.length), V > b.selectionStart ? N = "insert" : V <= b.selectionStart && V < b.selectionEnd ? N = "deleteBackward" : V === b.selectionEnd && T.length < W.length && (N = "deleteForward"), N === void 0 || (N === "deleteBackward" || N === "deleteForward") && T.length > W.length) throw new yn("Input type detection error.");
8463
- var q = "", Y = b.selectionStart, B = b.selectionEnd;
8464
- if (N === "insert") q = T.slice(b.selectionStart, V);
8462
+ if (S.inputType === void 0 && (b.selectionStart = 0, b.selectionEnd = W.length), z > b.selectionStart ? N = "insert" : z <= b.selectionStart && z < b.selectionEnd ? N = "deleteBackward" : z === b.selectionEnd && T.length < W.length && (N = "deleteForward"), N === void 0 || (N === "deleteBackward" || N === "deleteForward") && T.length > W.length) throw new yn("Input type detection error.");
8463
+ var U = "", Y = b.selectionStart, B = b.selectionEnd;
8464
+ if (N === "insert") U = T.slice(b.selectionStart, z);
8465
8465
  else {
8466
8466
  var Z = W.length - T.length;
8467
- Y = V, B = V + Z;
8467
+ Y = z, B = z + Z;
8468
8468
  }
8469
- $.value !== W ? $.options = $.fallbackOptions : $.fallbackOptions = $.options;
8470
- var oe = $.options, te = r({ inputType: N, previousValue: W, previousOptions: oe, value: T, addedValue: q, changeStart: Y, changeEnd: B, selectionStart: V, selectionEnd: z }), O = te.options, _ = gy(te, my);
8471
- a.value = _.value, a.setSelectionRange(_.selectionStart, _.selectionEnd), $.value = _.value, $.options = O, b.selectionStart = _.selectionStart, b.selectionEnd = _.selectionEnd, (C = a._valueTracker) === null || C === void 0 || (j = C.setValue) === null || j === void 0 || j.call(C, W);
8469
+ M.value !== W ? M.options = M.fallbackOptions : M.fallbackOptions = M.options;
8470
+ var oe = M.options, te = r({ inputType: N, previousValue: W, previousOptions: oe, value: T, addedValue: U, changeStart: Y, changeEnd: B, selectionStart: z, selectionEnd: L }), O = te.options, _ = gy(te, my);
8471
+ a.value = _.value, a.setSelectionRange(_.selectionStart, _.selectionEnd), M.value = _.value, M.options = O, b.selectionStart = _.selectionStart, b.selectionEnd = _.selectionEnd, (k = a._valueTracker) === null || k === void 0 || (j = k.setValue) === null || j === void 0 || j.call(k, W);
8472
8472
  } catch (H) {
8473
- if (a.value = b.value, a.setSelectionRange(b.selectionStart, b.selectionEnd), M.preventDefault(), M.stopPropagation(), H.name !== "SyntheticChangeError") throw H;
8473
+ if (a.value = b.value, a.setSelectionRange(b.selectionStart, b.selectionEnd), S.preventDefault(), S.stopPropagation(), H.name !== "SyntheticChangeError") throw H;
8474
8474
  }
8475
8475
  };
8476
- document.activeElement === a && S(), a.addEventListener("focus", S), a.addEventListener("blur", A), a.addEventListener("input", E), o.set(a, { onFocus: S, onBlur: A, onInput: E });
8476
+ document.activeElement === a && $(), a.addEventListener("focus", $), a.addEventListener("blur", A), a.addEventListener("input", E), o.set(a, { onFocus: $, onBlur: A, onInput: E });
8477
8477
  } else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(ua.join(", "), "."));
8478
8478
  }, this.unregister = function(a) {
8479
8479
  var i = o.get(a);
@@ -8500,36 +8500,36 @@ var ts = function(e) {
8500
8500
  return ry(this, t), (n = ny(this, t, [{ init: function(o) {
8501
8501
  var a = o.initialValue, i = o.controlled, s = Zt(r), c = s.mask, d = s.replacement, f = s.separate, u = s.showMask;
8502
8502
  return a = i || a ? a : u ? c : "", process.env.NODE_ENV !== "production" && function(p) {
8503
- var v = p.initialValue, x = p.mask, $ = p.replacement;
8504
- v.length > x.length && console.error(vr(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(v, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8505
- var k = Object.keys($).filter(function(E) {
8503
+ var v = p.initialValue, w = p.mask, M = p.replacement;
8504
+ v.length > w.length && console.error(vr(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(v, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8505
+ var C = Object.keys(M).filter(function(E) {
8506
8506
  return E.length > 1;
8507
8507
  });
8508
- k.length > 0 && console.error(vr(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(k.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8509
- for (var b = x.slice(0, v.length), g = -1, S = 0; S < b.length; S++) {
8510
- var A = Object.prototype.hasOwnProperty.call($, b[S]);
8511
- if (!(b[S] === v[S] || A && $[b[S]].test(v[S]))) {
8512
- g = S;
8508
+ C.length > 0 && console.error(vr(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(C.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8509
+ for (var b = w.slice(0, v.length), m = -1, $ = 0; $ < b.length; $++) {
8510
+ var A = Object.prototype.hasOwnProperty.call(M, b[$]);
8511
+ if (!(b[$] === v[$] || A && M[b[$]].test(v[$]))) {
8512
+ m = $;
8513
8513
  break;
8514
8514
  }
8515
8515
  }
8516
- g !== -1 && console.error(vr(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(g, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(v, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8516
+ m !== -1 && console.error(vr(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(m, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(v, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8517
8517
  }({ initialValue: a, mask: c, replacement: d }), { value: a, options: { mask: c, replacement: d, separate: f } };
8518
8518
  }, tracking: function(o) {
8519
- var a = o.inputType, i = o.previousValue, s = o.previousOptions, c = o.addedValue, d = o.changeStart, f = o.changeEnd, u = Zt(r), p = u.track, v = u.modify, x = iy(u, yy), $ = x.mask, k = x.replacement, b = x.showMask, g = x.separate, S = Ln(Ln({}, a === "insert" ? { inputType: a, data: c } : { inputType: a, data: null }), {}, { value: i, selectionStart: d, selectionEnd: f }), A = p?.(S);
8519
+ var a = o.inputType, i = o.previousValue, s = o.previousOptions, c = o.addedValue, d = o.changeStart, f = o.changeEnd, u = Zt(r), p = u.track, v = u.modify, w = iy(u, yy), M = w.mask, C = w.replacement, b = w.showMask, m = w.separate, $ = Ln(Ln({}, a === "insert" ? { inputType: a, data: c } : { inputType: a, data: null }), {}, { value: i, selectionStart: d, selectionEnd: f }), A = p?.($);
8520
8520
  if (A === !1) throw new yn("Custom tracking stop.");
8521
8521
  A === null ? c = "" : A !== !0 && A !== void 0 && (c = A);
8522
- var E = v?.(S);
8523
- E?.mask !== void 0 && ($ = E.mask), E?.replacement !== void 0 && (k = typeof E?.replacement == "string" ? on(E?.replacement) : E.replacement), E?.showMask !== void 0 && (b = E.showMask), E?.separate !== void 0 && (g = E.separate);
8524
- var M = Wr(i, Ln({ end: d }, s)), C = Wr(i, Ln({ start: f }, s)), j = RegExp("[^".concat(Object.keys(k).join(""), "]"), "g"), T = $.replace(j, "");
8525
- if (M && (M = mn(M, { replacementChars: T, replacement: k, separate: g }), T = T.slice(M.length)), c && (c = mn(c, { replacementChars: T, replacement: k, separate: !1 }), T = T.slice(c.length)), a === "insert" && c === "") throw new yn("The character does not match the key value of the `replacement` object.");
8526
- if (g) {
8527
- var V = $.slice(d, f).replace(j, ""), z = V.length - c.length;
8528
- z < 0 ? C = C.slice(-z) : z > 0 && (C = V.slice(-z) + C);
8522
+ var E = v?.($);
8523
+ E?.mask !== void 0 && (M = E.mask), E?.replacement !== void 0 && (C = typeof E?.replacement == "string" ? on(E?.replacement) : E.replacement), E?.showMask !== void 0 && (b = E.showMask), E?.separate !== void 0 && (m = E.separate);
8524
+ var S = Wr(i, Ln({ end: d }, s)), k = Wr(i, Ln({ start: f }, s)), j = RegExp("[^".concat(Object.keys(C).join(""), "]"), "g"), T = M.replace(j, "");
8525
+ if (S && (S = mn(S, { replacementChars: T, replacement: C, separate: m }), T = T.slice(S.length)), c && (c = mn(c, { replacementChars: T, replacement: C, separate: !1 }), T = T.slice(c.length)), a === "insert" && c === "") throw new yn("The character does not match the key value of the `replacement` object.");
8526
+ if (m) {
8527
+ var z = M.slice(d, f).replace(j, ""), L = z.length - c.length;
8528
+ L < 0 ? k = k.slice(-L) : L > 0 && (k = z.slice(-L) + k);
8529
8529
  }
8530
- C && (C = mn(C, { replacementChars: T, replacement: k, separate: g }));
8531
- var N = Xi(M + c + C, { mask: $, replacement: k, separate: g, showMask: b }), W = function(q) {
8532
- var Y, B, Z, oe = q.inputType, te = q.value, O = q.addedValue, _ = q.beforeChangeValue, H = q.mask, G = q.replacement, le = q.separate, se = Qi(te, { mask: H, replacement: G }).filter(function(Ee) {
8530
+ k && (k = mn(k, { replacementChars: T, replacement: C, separate: m }));
8531
+ var N = Xi(S + c + k, { mask: M, replacement: C, separate: m, showMask: b }), W = function(U) {
8532
+ var Y, B, Z, oe = U.inputType, te = U.value, O = U.addedValue, _ = U.beforeChangeValue, H = U.mask, G = U.replacement, le = U.separate, se = Qi(te, { mask: H, replacement: G }).filter(function(Ee) {
8533
8533
  var Ue = Ee.type;
8534
8534
  return Ue === "input" || le && Ue === "replacement";
8535
8535
  }), re = (Y = se[_.length + O.length - 1]) === null || Y === void 0 ? void 0 : Y.index, we = (B = se[_.length - 1]) === null || B === void 0 ? void 0 : B.index, ae = (Z = se[_.length + O.length]) === null || Z === void 0 ? void 0 : Z.index;
@@ -8550,8 +8550,8 @@ var ts = function(e) {
8550
8550
  return Object.prototype.hasOwnProperty.call(G, Ee);
8551
8551
  });
8552
8552
  return Se !== -1 ? Se : te.length;
8553
- }({ inputType: a, value: N, addedValue: c, beforeChangeValue: M, mask: $, replacement: k, separate: g });
8554
- return { value: N, selectionStart: W, selectionEnd: W, options: { mask: $, replacement: k, separate: g } };
8553
+ }({ inputType: a, value: N, addedValue: c, beforeChangeValue: S, mask: M, replacement: C, separate: m });
8554
+ return { value: N, selectionStart: W, selectionEnd: W, options: { mask: M, replacement: C, separate: m } };
8555
8555
  } }])).format = function(o) {
8556
8556
  return Zi(o, Zt(r));
8557
8557
  }, n.formatToParts = function(o) {
@@ -8587,54 +8587,60 @@ const ns = ({ maskProps: e, ...t }) => {
8587
8587
  error: s,
8588
8588
  helperText: c,
8589
8589
  className: d,
8590
- ...f
8591
- } = e, [u, p] = me(null), [v, x] = me(null), [$, k] = me(/* @__PURE__ */ new Date()), [b, g] = me(""), S = () => a && i ? "dropdown" : a ? "dropdown-months" : i ? "dropdown-years" : "label", A = (j) => {
8592
- x(j.currentTarget);
8593
- }, E = () => {
8594
- x(null);
8595
- }, M = (j) => {
8596
- j ? (o?.(j), k(j), g(
8597
- j.toLocaleString("ru-RU", {
8590
+ fullWidth: f,
8591
+ size: u,
8592
+ name: p,
8593
+ ...v
8594
+ } = e, [w, M] = me(null), [C, b] = me(null), [m, $] = me(/* @__PURE__ */ new Date()), [A, E] = me(""), S = () => a && i ? "dropdown" : a ? "dropdown-months" : i ? "dropdown-years" : "label", k = (L) => {
8595
+ b(L.currentTarget);
8596
+ }, j = () => {
8597
+ b(null);
8598
+ }, T = (L) => {
8599
+ L ? (o?.(L), $(L), E(
8600
+ L.toLocaleString("ru-RU", {
8598
8601
  day: "2-digit",
8599
8602
  month: "2-digit",
8600
8603
  year: "numeric"
8601
8604
  })
8602
- )) : (g(""), o?.(void 0)), E();
8603
- }, C = (j) => {
8604
- p(null), g(j.target.value);
8605
- const [T, V, z] = j.target.value.split(".").map(Number);
8606
- if (Number.isNaN(T) || Number.isNaN(V) || Number.isNaN(z) || T < 1 || T > 31 || V < 1 || V > 12 || z < 1e3) {
8607
- p("Некорректная дата");
8605
+ )) : (E(""), o?.(void 0)), j();
8606
+ }, z = (L) => {
8607
+ M(null), E(L.target.value);
8608
+ const [N, W, U] = L.target.value.split(".").map(Number);
8609
+ if (Number.isNaN(N) || Number.isNaN(W) || Number.isNaN(U) || N < 1 || N > 31 || W < 1 || W > 12 || U < 1e3) {
8610
+ M("Некорректная дата");
8608
8611
  return;
8609
8612
  }
8610
- const N = new Date(z, V - 1, T);
8611
- o?.(N), k(N);
8613
+ const Y = new Date(U, W - 1, N);
8614
+ o?.(Y), $(Y);
8612
8615
  };
8613
8616
  return it(() => {
8614
- r ? (g(
8617
+ r ? (E(
8615
8618
  r.toLocaleString("ru-RU", {
8616
8619
  day: "2-digit",
8617
8620
  month: "2-digit",
8618
8621
  year: "numeric"
8619
8622
  })
8620
- ), k(r)) : g("");
8623
+ ), $(r)) : E("");
8621
8624
  }, [r]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8622
8625
  /* @__PURE__ */ l.jsx(
8623
8626
  ns,
8624
8627
  {
8625
- value: b,
8626
- onChange: C,
8628
+ value: A,
8629
+ onChange: z,
8627
8630
  label: t,
8628
8631
  disabled: n,
8629
8632
  className: d,
8630
- endAdornment: /* @__PURE__ */ l.jsx(Ze, { variant: "text", onClick: A, children: /* @__PURE__ */ l.jsx(_a, {}) }),
8633
+ fullWidth: f,
8634
+ size: u,
8635
+ name: p,
8636
+ endAdornment: /* @__PURE__ */ l.jsx(Ze, { variant: "text", onClick: k, children: /* @__PURE__ */ l.jsx(_a, {}) }),
8631
8637
  maskProps: {
8632
8638
  mask: "__.__.____",
8633
8639
  replacement: { _: /\d/ },
8634
8640
  showMask: !0
8635
8641
  },
8636
8642
  placeholder: "дд.мм.гггг",
8637
- error: !!u || s,
8643
+ error: !!w || s,
8638
8644
  helperText: s || c
8639
8645
  }
8640
8646
  ),
@@ -8642,9 +8648,9 @@ const ns = ({ maskProps: e, ...t }) => {
8642
8648
  ro,
8643
8649
  {
8644
8650
  title: "Заголовок",
8645
- open: !!v,
8646
- anchorEl: v,
8647
- onClose: E,
8651
+ open: !!C,
8652
+ anchorEl: C,
8653
+ onClose: j,
8648
8654
  anchorOrigin: {
8649
8655
  vertical: "bottom",
8650
8656
  horizontal: "right"
@@ -8656,11 +8662,11 @@ const ns = ({ maskProps: e, ...t }) => {
8656
8662
  children: /* @__PURE__ */ l.jsx(by, { children: /* @__PURE__ */ l.jsx(
8657
8663
  ty,
8658
8664
  {
8659
- month: $,
8660
- onMonthChange: k,
8665
+ month: m,
8666
+ onMonthChange: $,
8661
8667
  selected: r,
8662
- onSelect: M,
8663
- ...f,
8668
+ onSelect: T,
8669
+ ...v,
8664
8670
  mode: "single",
8665
8671
  captionLayout: S()
8666
8672
  }
@@ -8880,13 +8886,13 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
8880
8886
  }) => {
8881
8887
  const a = ve(
8882
8888
  (s, c) => {
8883
- const { renderValue: d, color: f, canCopy: u, copyPosition: p, variant: v, copyText: x } = c;
8889
+ const { renderValue: d, color: f, canCopy: u, copyPosition: p, variant: v, copyText: w } = c;
8884
8890
  if (d)
8885
8891
  return d(s, c);
8886
8892
  if (v === "tag")
8887
8893
  return /* @__PURE__ */ l.jsx(Ht.Value, { children: /* @__PURE__ */ l.jsx(no, { label: s, color: f, variant: "light" }) });
8888
8894
  if (v === "guid") {
8889
- const $ = Wy(u);
8895
+ const M = Wy(u);
8890
8896
  return /* @__PURE__ */ l.jsx(
8891
8897
  Ny,
8892
8898
  {
@@ -8894,8 +8900,8 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
8894
8900
  $isCopy: u,
8895
8901
  color: f,
8896
8902
  copyPosition: p,
8897
- copyText: x,
8898
- children: /* @__PURE__ */ l.jsx(Py, { tooltipProps: $, children: s })
8903
+ copyText: w,
8904
+ children: /* @__PURE__ */ l.jsx(Py, { tooltipProps: M, children: s })
8899
8905
  }
8900
8906
  );
8901
8907
  }
@@ -9123,54 +9129,54 @@ function s0({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
9123
9129
  let [o, a] = K.useState(!1), [i, s] = K.useState(!1), [c, d] = K.useState(!1), f = K.useMemo(() => n === "none" ? !1 : (n === "increase-width" || n === "experimental-no-flickering") && o && i, [o, i, n]), u = K.useCallback(() => {
9124
9130
  let p = e.current, v = t.current;
9125
9131
  if (!p || !v || c || n === "none") return;
9126
- let x = p, $ = x.getBoundingClientRect().left + x.offsetWidth, k = x.getBoundingClientRect().top + x.offsetHeight / 2, b = $ - o0, g = k;
9127
- document.querySelectorAll(i0).length === 0 && document.elementFromPoint(b, g) === p || (a(!0), d(!0));
9132
+ let w = p, M = w.getBoundingClientRect().left + w.offsetWidth, C = w.getBoundingClientRect().top + w.offsetHeight / 2, b = M - o0, m = C;
9133
+ document.querySelectorAll(i0).length === 0 && document.elementFromPoint(b, m) === p || (a(!0), d(!0));
9128
9134
  }, [e, t, c, n]);
9129
9135
  return K.useEffect(() => {
9130
9136
  let p = e.current;
9131
9137
  if (!p || n === "none") return;
9132
9138
  function v() {
9133
- let $ = window.innerWidth - p.getBoundingClientRect().right;
9134
- s($ >= is);
9139
+ let M = window.innerWidth - p.getBoundingClientRect().right;
9140
+ s(M >= is);
9135
9141
  }
9136
9142
  v();
9137
- let x = setInterval(v, 1e3);
9143
+ let w = setInterval(v, 1e3);
9138
9144
  return () => {
9139
- clearInterval(x);
9145
+ clearInterval(w);
9140
9146
  };
9141
9147
  }, [e, n]), K.useEffect(() => {
9142
9148
  let p = r || document.activeElement === t.current;
9143
9149
  if (n === "none" || !p) return;
9144
- let v = setTimeout(u, 0), x = setTimeout(u, 2e3), $ = setTimeout(u, 5e3), k = setTimeout(() => {
9150
+ let v = setTimeout(u, 0), w = setTimeout(u, 2e3), M = setTimeout(u, 5e3), C = setTimeout(() => {
9145
9151
  d(!0);
9146
9152
  }, 6e3);
9147
9153
  return () => {
9148
- clearTimeout(v), clearTimeout(x), clearTimeout($), clearTimeout(k);
9154
+ clearTimeout(v), clearTimeout(w), clearTimeout(M), clearTimeout(C);
9149
9155
  };
9150
9156
  }, [t, r, n, u]), { hasPWMBadge: o, willPushPWMBadge: f, PWM_BADGE_SPACE_WIDTH: a0 };
9151
9157
  }
9152
9158
  var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9153
- var n = e, { value: r, onChange: o, maxLength: a, textAlign: i = "left", pattern: s, placeholder: c, inputMode: d = "numeric", onComplete: f, pushPasswordManagerStrategy: u = "increase-width", pasteTransformer: p, containerClassName: v, noScriptCSSFallback: x = c0, render: $, children: k } = n, b = t0(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), g, S, A, E, M;
9154
- let [C, j] = K.useState(typeof b.defaultValue == "string" ? b.defaultValue : ""), T = r ?? C, V = r0(T), z = K.useCallback((U) => {
9155
- o?.(U), j(U);
9156
- }, [o]), N = K.useMemo(() => s ? typeof s == "string" ? new RegExp(s) : s : null, [s]), W = K.useRef(null), q = K.useRef(null), Y = K.useRef({ value: T, onChange: z, isIOS: typeof window < "u" && ((S = (g = window?.CSS) == null ? void 0 : g.supports) == null ? void 0 : S.call(g, "-webkit-touch-callout", "none")) }), B = K.useRef({ prev: [(A = W.current) == null ? void 0 : A.selectionStart, (E = W.current) == null ? void 0 : E.selectionEnd, (M = W.current) == null ? void 0 : M.selectionDirection] });
9159
+ var n = e, { value: r, onChange: o, maxLength: a, textAlign: i = "left", pattern: s, placeholder: c, inputMode: d = "numeric", onComplete: f, pushPasswordManagerStrategy: u = "increase-width", pasteTransformer: p, containerClassName: v, noScriptCSSFallback: w = c0, render: M, children: C } = n, b = t0(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), m, $, A, E, S;
9160
+ let [k, j] = K.useState(typeof b.defaultValue == "string" ? b.defaultValue : ""), T = r ?? k, z = r0(T), L = K.useCallback((q) => {
9161
+ o?.(q), j(q);
9162
+ }, [o]), N = K.useMemo(() => s ? typeof s == "string" ? new RegExp(s) : s : null, [s]), W = K.useRef(null), U = K.useRef(null), Y = K.useRef({ value: T, onChange: L, isIOS: typeof window < "u" && (($ = (m = window?.CSS) == null ? void 0 : m.supports) == null ? void 0 : $.call(m, "-webkit-touch-callout", "none")) }), B = K.useRef({ prev: [(A = W.current) == null ? void 0 : A.selectionStart, (E = W.current) == null ? void 0 : E.selectionEnd, (S = W.current) == null ? void 0 : S.selectionDirection] });
9157
9163
  K.useImperativeHandle(t, () => W.current, []), K.useEffect(() => {
9158
- let U = W.current, J = q.current;
9159
- if (!U || !J) return;
9160
- Y.current.value !== U.value && Y.current.onChange(U.value), B.current.prev = [U.selectionStart, U.selectionEnd, U.selectionDirection];
9164
+ let q = W.current, J = U.current;
9165
+ if (!q || !J) return;
9166
+ Y.current.value !== q.value && Y.current.onChange(q.value), B.current.prev = [q.selectionStart, q.selectionEnd, q.selectionDirection];
9161
9167
  function $e() {
9162
- if (document.activeElement !== U) {
9168
+ if (document.activeElement !== q) {
9163
9169
  H(null), le(null);
9164
9170
  return;
9165
9171
  }
9166
- let ie = U.selectionStart, Ie = U.selectionEnd, ct = U.selectionDirection, h = U.maxLength, w = U.value, D = B.current.prev, I = -1, F = -1, P;
9167
- if (w.length !== 0 && ie !== null && Ie !== null) {
9168
- let Ce = ie === Ie, nt = ie === w.length && w.length < h;
9172
+ let ie = q.selectionStart, Ie = q.selectionEnd, ct = q.selectionDirection, h = q.maxLength, x = q.value, D = B.current.prev, I = -1, F = -1, P;
9173
+ if (x.length !== 0 && ie !== null && Ie !== null) {
9174
+ let Ce = ie === Ie, nt = ie === x.length && x.length < h;
9169
9175
  if (Ce && !nt) {
9170
9176
  let Q = ie;
9171
9177
  if (Q === 0) I = 0, F = 1, P = "forward";
9172
9178
  else if (Q === h) I = Q - 1, F = Q, P = "backward";
9173
- else if (h > 1 && w.length > 1) {
9179
+ else if (h > 1 && x.length > 1) {
9174
9180
  let de = 0;
9175
9181
  if (D[0] !== null && D[1] !== null) {
9176
9182
  P = Q < D[1] ? "backward" : "forward";
@@ -9182,10 +9188,10 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9182
9188
  }
9183
9189
  I !== -1 && F !== -1 && I !== F && W.current.setSelectionRange(I, F, P);
9184
9190
  }
9185
- let L = I !== -1 ? I : ie, ne = F !== -1 ? F : Ie, ue = P ?? ct;
9186
- H(L), le(ne), B.current.prev = [L, ne, ue];
9191
+ let V = I !== -1 ? I : ie, ne = F !== -1 ? F : Ie, ue = P ?? ct;
9192
+ H(V), le(ne), B.current.prev = [V, ne, ue];
9187
9193
  }
9188
- if (document.addEventListener("selectionchange", $e, { capture: !0 }), $e(), document.activeElement === U && O(!0), !document.getElementById("input-otp-style")) {
9194
+ if (document.addEventListener("selectionchange", $e, { capture: !0 }), $e(), document.activeElement === q && O(!0), !document.getElementById("input-otp-style")) {
9189
9195
  let ie = document.createElement("style");
9190
9196
  if (ie.id = "input-otp-style", document.head.appendChild(ie), ie.sheet) {
9191
9197
  let Ie = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
@@ -9193,71 +9199,71 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9193
9199
  }
9194
9200
  }
9195
9201
  let ke = () => {
9196
- J && J.style.setProperty("--root-height", `${U.clientHeight}px`);
9202
+ J && J.style.setProperty("--root-height", `${q.clientHeight}px`);
9197
9203
  };
9198
9204
  ke();
9199
9205
  let Ne = new ResizeObserver(ke);
9200
- return Ne.observe(U), () => {
9206
+ return Ne.observe(q), () => {
9201
9207
  document.removeEventListener("selectionchange", $e, { capture: !0 }), Ne.disconnect();
9202
9208
  };
9203
9209
  }, []);
9204
9210
  let [Z, oe] = K.useState(!1), [te, O] = K.useState(!1), [_, H] = K.useState(null), [G, le] = K.useState(null);
9205
9211
  K.useEffect(() => {
9206
9212
  n0(() => {
9207
- var U, J, $e, ke;
9208
- (U = W.current) == null || U.dispatchEvent(new Event("input"));
9213
+ var q, J, $e, ke;
9214
+ (q = W.current) == null || q.dispatchEvent(new Event("input"));
9209
9215
  let Ne = (J = W.current) == null ? void 0 : J.selectionStart, ie = ($e = W.current) == null ? void 0 : $e.selectionEnd, Ie = (ke = W.current) == null ? void 0 : ke.selectionDirection;
9210
9216
  Ne !== null && ie !== null && (H(Ne), le(ie), B.current.prev = [Ne, ie, Ie]);
9211
9217
  });
9212
9218
  }, [T, te]), K.useEffect(() => {
9213
- V !== void 0 && T !== V && V.length < a && T.length === a && f?.(T);
9214
- }, [a, f, V, T]);
9215
- let se = s0({ containerRef: q, inputRef: W, pushPasswordManagerStrategy: u, isFocused: te }), re = K.useCallback((U) => {
9216
- let J = U.currentTarget.value.slice(0, a);
9219
+ z !== void 0 && T !== z && z.length < a && T.length === a && f?.(T);
9220
+ }, [a, f, z, T]);
9221
+ let se = s0({ containerRef: U, inputRef: W, pushPasswordManagerStrategy: u, isFocused: te }), re = K.useCallback((q) => {
9222
+ let J = q.currentTarget.value.slice(0, a);
9217
9223
  if (J.length > 0 && N && !N.test(J)) {
9218
- U.preventDefault();
9224
+ q.preventDefault();
9219
9225
  return;
9220
9226
  }
9221
- typeof V == "string" && J.length < V.length && document.dispatchEvent(new Event("selectionchange")), z(J);
9222
- }, [a, z, V, N]), we = K.useCallback(() => {
9223
- var U;
9227
+ typeof z == "string" && J.length < z.length && document.dispatchEvent(new Event("selectionchange")), L(J);
9228
+ }, [a, L, z, N]), we = K.useCallback(() => {
9229
+ var q;
9224
9230
  if (W.current) {
9225
9231
  let J = Math.min(W.current.value.length, a - 1), $e = W.current.value.length;
9226
- (U = W.current) == null || U.setSelectionRange(J, $e), H(J), le($e);
9232
+ (q = W.current) == null || q.setSelectionRange(J, $e), H(J), le($e);
9227
9233
  }
9228
9234
  O(!0);
9229
- }, [a]), ae = K.useCallback((U) => {
9235
+ }, [a]), ae = K.useCallback((q) => {
9230
9236
  var J, $e;
9231
9237
  let ke = W.current;
9232
- if (!p && (!Y.current.isIOS || !U.clipboardData || !ke)) return;
9233
- let Ne = U.clipboardData.getData("text/plain"), ie = p ? p(Ne) : Ne;
9234
- U.preventDefault();
9238
+ if (!p && (!Y.current.isIOS || !q.clipboardData || !ke)) return;
9239
+ let Ne = q.clipboardData.getData("text/plain"), ie = p ? p(Ne) : Ne;
9240
+ q.preventDefault();
9235
9241
  let Ie = (J = W.current) == null ? void 0 : J.selectionStart, ct = ($e = W.current) == null ? void 0 : $e.selectionEnd, h = (Ie !== ct ? T.slice(0, Ie) + ie + T.slice(ct) : T.slice(0, Ie) + ie + T.slice(Ie)).slice(0, a);
9236
9242
  if (h.length > 0 && N && !N.test(h)) return;
9237
- ke.value = h, z(h);
9238
- let w = Math.min(h.length, a - 1), D = h.length;
9239
- ke.setSelectionRange(w, D), H(w), le(D);
9240
- }, [a, z, N, T]), Se = K.useMemo(() => ({ position: "relative", cursor: b.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [b.disabled]), Ee = K.useMemo(() => ({ position: "absolute", inset: 0, width: se.willPushPWMBadge ? `calc(100% + ${se.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: se.willPushPWMBadge ? `inset(0 ${se.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: i, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [se.PWM_BADGE_SPACE_WIDTH, se.willPushPWMBadge, i]), Ue = K.useMemo(() => K.createElement("input", e0(Ky({ autoComplete: b.autoComplete || "one-time-code" }, b), { "data-input-otp": !0, "data-input-otp-placeholder-shown": T.length === 0 || void 0, "data-input-otp-mss": _, "data-input-otp-mse": G, inputMode: d, pattern: N?.source, "aria-placeholder": c, style: Ee, maxLength: a, value: T, ref: W, onPaste: (U) => {
9243
+ ke.value = h, L(h);
9244
+ let x = Math.min(h.length, a - 1), D = h.length;
9245
+ ke.setSelectionRange(x, D), H(x), le(D);
9246
+ }, [a, L, N, T]), Se = K.useMemo(() => ({ position: "relative", cursor: b.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [b.disabled]), Ee = K.useMemo(() => ({ position: "absolute", inset: 0, width: se.willPushPWMBadge ? `calc(100% + ${se.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: se.willPushPWMBadge ? `inset(0 ${se.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: i, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [se.PWM_BADGE_SPACE_WIDTH, se.willPushPWMBadge, i]), Ue = K.useMemo(() => K.createElement("input", e0(Ky({ autoComplete: b.autoComplete || "one-time-code" }, b), { "data-input-otp": !0, "data-input-otp-placeholder-shown": T.length === 0 || void 0, "data-input-otp-mss": _, "data-input-otp-mse": G, inputMode: d, pattern: N?.source, "aria-placeholder": c, style: Ee, maxLength: a, value: T, ref: W, onPaste: (q) => {
9241
9247
  var J;
9242
- ae(U), (J = b.onPaste) == null || J.call(b, U);
9243
- }, onChange: re, onMouseOver: (U) => {
9248
+ ae(q), (J = b.onPaste) == null || J.call(b, q);
9249
+ }, onChange: re, onMouseOver: (q) => {
9244
9250
  var J;
9245
- oe(!0), (J = b.onMouseOver) == null || J.call(b, U);
9246
- }, onMouseLeave: (U) => {
9251
+ oe(!0), (J = b.onMouseOver) == null || J.call(b, q);
9252
+ }, onMouseLeave: (q) => {
9247
9253
  var J;
9248
- oe(!1), (J = b.onMouseLeave) == null || J.call(b, U);
9249
- }, onFocus: (U) => {
9254
+ oe(!1), (J = b.onMouseLeave) == null || J.call(b, q);
9255
+ }, onFocus: (q) => {
9250
9256
  var J;
9251
- we(), (J = b.onFocus) == null || J.call(b, U);
9252
- }, onBlur: (U) => {
9257
+ we(), (J = b.onFocus) == null || J.call(b, q);
9258
+ }, onBlur: (q) => {
9253
9259
  var J;
9254
- O(!1), (J = b.onBlur) == null || J.call(b, U);
9255
- } })), [re, we, ae, d, Ee, a, G, _, b, N?.source, T]), lt = K.useMemo(() => ({ slots: Array.from({ length: a }).map((U, J) => {
9260
+ O(!1), (J = b.onBlur) == null || J.call(b, q);
9261
+ } })), [re, we, ae, d, Ee, a, G, _, b, N?.source, T]), lt = K.useMemo(() => ({ slots: Array.from({ length: a }).map((q, J) => {
9256
9262
  var $e;
9257
9263
  let ke = te && _ !== null && G !== null && (_ === G && J === _ || J >= _ && J < G), Ne = T[J] !== void 0 ? T[J] : null, ie = T[0] !== void 0 ? null : ($e = c?.[J]) != null ? $e : null;
9258
9264
  return { char: Ne, placeholderChar: ie, isActive: ke, hasFakeCaret: ke && Ne === null };
9259
- }), isFocused: te, isHovering: !b.disabled && Z }), [te, Z, a, G, _, b.disabled, T]), Wt = K.useMemo(() => $ ? $(lt) : K.createElement(l0.Provider, { value: lt }, k), [k, lt, $]);
9260
- return K.createElement(K.Fragment, null, x !== null && K.createElement("noscript", null, K.createElement("style", null, x)), K.createElement("div", { ref: q, "data-input-otp-container": !0, style: Se, className: v }, Wt, K.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, Ue)));
9265
+ }), isFocused: te, isHovering: !b.disabled && Z }), [te, Z, a, G, _, b.disabled, T]), Wt = K.useMemo(() => M ? M(lt) : K.createElement(l0.Provider, { value: lt }, C), [C, lt, M]);
9266
+ return K.createElement(K.Fragment, null, w !== null && K.createElement("noscript", null, K.createElement("style", null, w)), K.createElement("div", { ref: U, "data-input-otp-container": !0, style: Se, className: v }, Wt, K.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, Ue)));
9261
9267
  });
9262
9268
  ss.displayName = "Input";
9263
9269
  function dn(e, t) {
@@ -9499,58 +9505,58 @@ const $0 = (e) => {
9499
9505
  default:
9500
9506
  return null;
9501
9507
  }
9502
- }, M0 = Array(12).fill(0), D0 = ({ visible: e, className: t }) => /* @__PURE__ */ m.createElement("div", {
9508
+ }, M0 = Array(12).fill(0), D0 = ({ visible: e, className: t }) => /* @__PURE__ */ g.createElement("div", {
9503
9509
  className: [
9504
9510
  "sonner-loading-wrapper",
9505
9511
  t
9506
9512
  ].filter(Boolean).join(" "),
9507
9513
  "data-visible": e
9508
- }, /* @__PURE__ */ m.createElement("div", {
9514
+ }, /* @__PURE__ */ g.createElement("div", {
9509
9515
  className: "sonner-spinner"
9510
- }, M0.map((n, r) => /* @__PURE__ */ m.createElement("div", {
9516
+ }, M0.map((n, r) => /* @__PURE__ */ g.createElement("div", {
9511
9517
  className: "sonner-loading-bar",
9512
9518
  key: `spinner-bar-${r}`
9513
- })))), O0 = /* @__PURE__ */ m.createElement("svg", {
9519
+ })))), O0 = /* @__PURE__ */ g.createElement("svg", {
9514
9520
  xmlns: "http://www.w3.org/2000/svg",
9515
9521
  viewBox: "0 0 20 20",
9516
9522
  fill: "currentColor",
9517
9523
  height: "20",
9518
9524
  width: "20"
9519
- }, /* @__PURE__ */ m.createElement("path", {
9525
+ }, /* @__PURE__ */ g.createElement("path", {
9520
9526
  fillRule: "evenodd",
9521
9527
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
9522
9528
  clipRule: "evenodd"
9523
- })), E0 = /* @__PURE__ */ m.createElement("svg", {
9529
+ })), E0 = /* @__PURE__ */ g.createElement("svg", {
9524
9530
  xmlns: "http://www.w3.org/2000/svg",
9525
9531
  viewBox: "0 0 24 24",
9526
9532
  fill: "currentColor",
9527
9533
  height: "20",
9528
9534
  width: "20"
9529
- }, /* @__PURE__ */ m.createElement("path", {
9535
+ }, /* @__PURE__ */ g.createElement("path", {
9530
9536
  fillRule: "evenodd",
9531
9537
  d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
9532
9538
  clipRule: "evenodd"
9533
- })), j0 = /* @__PURE__ */ m.createElement("svg", {
9539
+ })), j0 = /* @__PURE__ */ g.createElement("svg", {
9534
9540
  xmlns: "http://www.w3.org/2000/svg",
9535
9541
  viewBox: "0 0 20 20",
9536
9542
  fill: "currentColor",
9537
9543
  height: "20",
9538
9544
  width: "20"
9539
- }, /* @__PURE__ */ m.createElement("path", {
9545
+ }, /* @__PURE__ */ g.createElement("path", {
9540
9546
  fillRule: "evenodd",
9541
9547
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
9542
9548
  clipRule: "evenodd"
9543
- })), T0 = /* @__PURE__ */ m.createElement("svg", {
9549
+ })), T0 = /* @__PURE__ */ g.createElement("svg", {
9544
9550
  xmlns: "http://www.w3.org/2000/svg",
9545
9551
  viewBox: "0 0 20 20",
9546
9552
  fill: "currentColor",
9547
9553
  height: "20",
9548
9554
  width: "20"
9549
- }, /* @__PURE__ */ m.createElement("path", {
9555
+ }, /* @__PURE__ */ g.createElement("path", {
9550
9556
  fillRule: "evenodd",
9551
9557
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
9552
9558
  clipRule: "evenodd"
9553
- })), P0 = /* @__PURE__ */ m.createElement("svg", {
9559
+ })), P0 = /* @__PURE__ */ g.createElement("svg", {
9554
9560
  xmlns: "http://www.w3.org/2000/svg",
9555
9561
  width: "12",
9556
9562
  height: "12",
@@ -9560,19 +9566,19 @@ const $0 = (e) => {
9560
9566
  strokeWidth: "1.5",
9561
9567
  strokeLinecap: "round",
9562
9568
  strokeLinejoin: "round"
9563
- }, /* @__PURE__ */ m.createElement("line", {
9569
+ }, /* @__PURE__ */ g.createElement("line", {
9564
9570
  x1: "18",
9565
9571
  y1: "6",
9566
9572
  x2: "6",
9567
9573
  y2: "18"
9568
- }), /* @__PURE__ */ m.createElement("line", {
9574
+ }), /* @__PURE__ */ g.createElement("line", {
9569
9575
  x1: "6",
9570
9576
  y1: "6",
9571
9577
  x2: "18",
9572
9578
  y2: "18"
9573
9579
  })), A0 = () => {
9574
- const [e, t] = m.useState(document.hidden);
9575
- return m.useEffect(() => {
9580
+ const [e, t] = g.useState(document.hidden);
9581
+ return g.useEffect(() => {
9576
9582
  const n = () => {
9577
9583
  t(document.hidden);
9578
9584
  };
@@ -9660,7 +9666,7 @@ class _0 {
9660
9666
  if (i = [
9661
9667
  "resolve",
9662
9668
  d
9663
- ], m.isValidElement(d))
9669
+ ], g.isValidElement(d))
9664
9670
  a = !1, this.create({
9665
9671
  id: r,
9666
9672
  type: "default",
@@ -9668,36 +9674,36 @@ class _0 {
9668
9674
  });
9669
9675
  else if (N0(d) && !d.ok) {
9670
9676
  a = !1;
9671
- const u = typeof n.error == "function" ? await n.error(`HTTP error! status: ${d.status}`) : n.error, p = typeof n.description == "function" ? await n.description(`HTTP error! status: ${d.status}`) : n.description, x = typeof u == "object" && !m.isValidElement(u) ? u : {
9677
+ const u = typeof n.error == "function" ? await n.error(`HTTP error! status: ${d.status}`) : n.error, p = typeof n.description == "function" ? await n.description(`HTTP error! status: ${d.status}`) : n.description, w = typeof u == "object" && !g.isValidElement(u) ? u : {
9672
9678
  message: u
9673
9679
  };
9674
9680
  this.create({
9675
9681
  id: r,
9676
9682
  type: "error",
9677
9683
  description: p,
9678
- ...x
9684
+ ...w
9679
9685
  });
9680
9686
  } else if (d instanceof Error) {
9681
9687
  a = !1;
9682
- const u = typeof n.error == "function" ? await n.error(d) : n.error, p = typeof n.description == "function" ? await n.description(d) : n.description, x = typeof u == "object" && !m.isValidElement(u) ? u : {
9688
+ const u = typeof n.error == "function" ? await n.error(d) : n.error, p = typeof n.description == "function" ? await n.description(d) : n.description, w = typeof u == "object" && !g.isValidElement(u) ? u : {
9683
9689
  message: u
9684
9690
  };
9685
9691
  this.create({
9686
9692
  id: r,
9687
9693
  type: "error",
9688
9694
  description: p,
9689
- ...x
9695
+ ...w
9690
9696
  });
9691
9697
  } else if (n.success !== void 0) {
9692
9698
  a = !1;
9693
- const u = typeof n.success == "function" ? await n.success(d) : n.success, p = typeof n.description == "function" ? await n.description(d) : n.description, x = typeof u == "object" && !m.isValidElement(u) ? u : {
9699
+ const u = typeof n.success == "function" ? await n.success(d) : n.success, p = typeof n.description == "function" ? await n.description(d) : n.description, w = typeof u == "object" && !g.isValidElement(u) ? u : {
9694
9700
  message: u
9695
9701
  };
9696
9702
  this.create({
9697
9703
  id: r,
9698
9704
  type: "success",
9699
9705
  description: p,
9700
- ...x
9706
+ ...w
9701
9707
  });
9702
9708
  }
9703
9709
  }).catch(async (d) => {
@@ -9706,7 +9712,7 @@ class _0 {
9706
9712
  d
9707
9713
  ], n.error !== void 0) {
9708
9714
  a = !1;
9709
- const f = typeof n.error == "function" ? await n.error(d) : n.error, u = typeof n.description == "function" ? await n.description(d) : n.description, v = typeof f == "object" && !m.isValidElement(f) ? f : {
9715
+ const f = typeof n.error == "function" ? await n.error(d) : n.error, u = typeof n.description == "function" ? await n.description(d) : n.description, v = typeof f == "object" && !g.isValidElement(f) ? f : {
9710
9716
  message: f
9711
9717
  };
9712
9718
  this.create({
@@ -9769,53 +9775,53 @@ function q0(e) {
9769
9775
  }
9770
9776
  const X0 = (e) => {
9771
9777
  var t, n, r, o, a, i, s, c, d;
9772
- const { invert: f, toast: u, unstyled: p, interacting: v, setHeights: x, visibleToasts: $, heights: k, index: b, toasts: g, expanded: S, removeToast: A, defaultRichColors: E, closeButton: M, style: C, cancelButtonStyle: j, actionButtonStyle: T, className: V = "", descriptionClassName: z = "", duration: N, position: W, gap: q, expandByDefault: Y, classNames: B, icons: Z, closeButtonAriaLabel: oe = "Close toast" } = e, [te, O] = m.useState(null), [_, H] = m.useState(null), [G, le] = m.useState(!1), [se, re] = m.useState(!1), [we, ae] = m.useState(!1), [Se, Ee] = m.useState(!1), [Ue, lt] = m.useState(!1), [Wt, U] = m.useState(0), [J, $e] = m.useState(0), ke = m.useRef(u.duration || N || ga), Ne = m.useRef(null), ie = m.useRef(null), Ie = b === 0, ct = b + 1 <= $, h = u.type, w = u.dismissible !== !1, D = u.className || "", I = u.descriptionClassName || "", F = m.useMemo(() => k.findIndex((ee) => ee.toastId === u.id) || 0, [
9773
- k,
9778
+ const { invert: f, toast: u, unstyled: p, interacting: v, setHeights: w, visibleToasts: M, heights: C, index: b, toasts: m, expanded: $, removeToast: A, defaultRichColors: E, closeButton: S, style: k, cancelButtonStyle: j, actionButtonStyle: T, className: z = "", descriptionClassName: L = "", duration: N, position: W, gap: U, expandByDefault: Y, classNames: B, icons: Z, closeButtonAriaLabel: oe = "Close toast" } = e, [te, O] = g.useState(null), [_, H] = g.useState(null), [G, le] = g.useState(!1), [se, re] = g.useState(!1), [we, ae] = g.useState(!1), [Se, Ee] = g.useState(!1), [Ue, lt] = g.useState(!1), [Wt, q] = g.useState(0), [J, $e] = g.useState(0), ke = g.useRef(u.duration || N || ga), Ne = g.useRef(null), ie = g.useRef(null), Ie = b === 0, ct = b + 1 <= M, h = u.type, x = u.dismissible !== !1, D = u.className || "", I = u.descriptionClassName || "", F = g.useMemo(() => C.findIndex((ee) => ee.toastId === u.id) || 0, [
9779
+ C,
9774
9780
  u.id
9775
- ]), P = m.useMemo(() => {
9781
+ ]), P = g.useMemo(() => {
9776
9782
  var ee;
9777
- return (ee = u.closeButton) != null ? ee : M;
9783
+ return (ee = u.closeButton) != null ? ee : S;
9778
9784
  }, [
9779
9785
  u.closeButton,
9780
- M
9781
- ]), L = m.useMemo(() => u.duration || N || ga, [
9786
+ S
9787
+ ]), V = g.useMemo(() => u.duration || N || ga, [
9782
9788
  u.duration,
9783
9789
  N
9784
- ]), ne = m.useRef(0), ue = m.useRef(0), Ce = m.useRef(0), nt = m.useRef(null), [Q, de] = W.split("-"), ce = m.useMemo(() => k.reduce((ee, Oe, Pe) => Pe >= F ? ee : ee + Oe.height, 0), [
9785
- k,
9790
+ ]), ne = g.useRef(0), ue = g.useRef(0), Ce = g.useRef(0), nt = g.useRef(null), [Q, de] = W.split("-"), ce = g.useMemo(() => C.reduce((ee, Oe, Pe) => Pe >= F ? ee : ee + Oe.height, 0), [
9791
+ C,
9786
9792
  F
9787
9793
  ]), qe = A0(), He = u.invert || f, ut = h === "loading";
9788
- ue.current = m.useMemo(() => F * q + ce, [
9794
+ ue.current = g.useMemo(() => F * U + ce, [
9789
9795
  F,
9790
9796
  ce
9791
- ]), m.useEffect(() => {
9792
- ke.current = L;
9797
+ ]), g.useEffect(() => {
9798
+ ke.current = V;
9793
9799
  }, [
9794
- L
9795
- ]), m.useEffect(() => {
9800
+ V
9801
+ ]), g.useEffect(() => {
9796
9802
  le(!0);
9797
- }, []), m.useEffect(() => {
9803
+ }, []), g.useEffect(() => {
9798
9804
  const ee = ie.current;
9799
9805
  if (ee) {
9800
9806
  const Oe = ee.getBoundingClientRect().height;
9801
- return $e(Oe), x((Pe) => [
9807
+ return $e(Oe), w((Pe) => [
9802
9808
  {
9803
9809
  toastId: u.id,
9804
9810
  height: Oe,
9805
9811
  position: u.position
9806
9812
  },
9807
9813
  ...Pe
9808
- ]), () => x((Pe) => Pe.filter((Je) => Je.toastId !== u.id));
9814
+ ]), () => w((Pe) => Pe.filter((Je) => Je.toastId !== u.id));
9809
9815
  }
9810
9816
  }, [
9811
- x,
9817
+ w,
9812
9818
  u.id
9813
- ]), m.useLayoutEffect(() => {
9819
+ ]), g.useLayoutEffect(() => {
9814
9820
  if (!G) return;
9815
9821
  const ee = ie.current, Oe = ee.style.height;
9816
9822
  ee.style.height = "auto";
9817
9823
  const Pe = ee.getBoundingClientRect().height;
9818
- ee.style.height = Oe, $e(Pe), x((Je) => Je.find((Be) => Be.toastId === u.id) ? Je.map((Be) => Be.toastId === u.id ? {
9824
+ ee.style.height = Oe, $e(Pe), w((Je) => Je.find((Be) => Be.toastId === u.id) ? Je.map((Be) => Be.toastId === u.id ? {
9819
9825
  ...Be,
9820
9826
  height: Pe
9821
9827
  } : Be) : [
@@ -9830,23 +9836,23 @@ const X0 = (e) => {
9830
9836
  G,
9831
9837
  u.title,
9832
9838
  u.description,
9833
- x,
9839
+ w,
9834
9840
  u.id
9835
9841
  ]);
9836
- const be = m.useCallback(() => {
9837
- re(!0), U(ue.current), x((ee) => ee.filter((Oe) => Oe.toastId !== u.id)), setTimeout(() => {
9842
+ const be = g.useCallback(() => {
9843
+ re(!0), q(ue.current), w((ee) => ee.filter((Oe) => Oe.toastId !== u.id)), setTimeout(() => {
9838
9844
  A(u);
9839
9845
  }, U0);
9840
9846
  }, [
9841
9847
  u,
9842
9848
  A,
9843
- x,
9849
+ w,
9844
9850
  ue
9845
9851
  ]);
9846
- m.useEffect(() => {
9852
+ g.useEffect(() => {
9847
9853
  if (u.promise && h === "loading" || u.duration === 1 / 0 || u.type === "loading") return;
9848
9854
  let ee;
9849
- return S || v || qe ? (() => {
9855
+ return $ || v || qe ? (() => {
9850
9856
  if (Ce.current < ne.current) {
9851
9857
  const Je = (/* @__PURE__ */ new Date()).getTime() - ne.current;
9852
9858
  ke.current = ke.current - Je;
@@ -9858,13 +9864,13 @@ const X0 = (e) => {
9858
9864
  }, ke.current));
9859
9865
  })(), () => clearTimeout(ee);
9860
9866
  }, [
9861
- S,
9867
+ $,
9862
9868
  v,
9863
9869
  u,
9864
9870
  h,
9865
9871
  qe,
9866
9872
  be
9867
- ]), m.useEffect(() => {
9873
+ ]), g.useEffect(() => {
9868
9874
  u.delete && be();
9869
9875
  }, [
9870
9876
  be,
@@ -9874,22 +9880,22 @@ const X0 = (e) => {
9874
9880
  var ee;
9875
9881
  if (Z?.loading) {
9876
9882
  var Oe;
9877
- return /* @__PURE__ */ m.createElement("div", {
9883
+ return /* @__PURE__ */ g.createElement("div", {
9878
9884
  className: gt(B?.loader, u == null || (Oe = u.classNames) == null ? void 0 : Oe.loader, "sonner-loader"),
9879
9885
  "data-visible": h === "loading"
9880
9886
  }, Z.loading);
9881
9887
  }
9882
- return /* @__PURE__ */ m.createElement(D0, {
9888
+ return /* @__PURE__ */ g.createElement(D0, {
9883
9889
  className: gt(B?.loader, u == null || (ee = u.classNames) == null ? void 0 : ee.loader),
9884
9890
  visible: h === "loading"
9885
9891
  });
9886
9892
  }
9887
9893
  const fe = u.icon || Z?.[h] || $0(h);
9888
9894
  var Fn, Nn;
9889
- return /* @__PURE__ */ m.createElement("li", {
9895
+ return /* @__PURE__ */ g.createElement("li", {
9890
9896
  tabIndex: 0,
9891
9897
  ref: ie,
9892
- className: gt(V, D, B?.toast, u == null || (t = u.classNames) == null ? void 0 : t.toast, B?.default, B?.[h], u == null || (n = u.classNames) == null ? void 0 : n[h]),
9898
+ className: gt(z, D, B?.toast, u == null || (t = u.classNames) == null ? void 0 : t.toast, B?.default, B?.[h], u == null || (n = u.classNames) == null ? void 0 : n[h]),
9893
9899
  "data-sonner-toast": "",
9894
9900
  "data-rich-colors": (Fn = u.richColors) != null ? Fn : E,
9895
9901
  "data-styled": !(u.jsx || u.unstyled || p),
@@ -9903,37 +9909,37 @@ const X0 = (e) => {
9903
9909
  "data-index": b,
9904
9910
  "data-front": Ie,
9905
9911
  "data-swiping": we,
9906
- "data-dismissible": w,
9912
+ "data-dismissible": x,
9907
9913
  "data-type": h,
9908
9914
  "data-invert": He,
9909
9915
  "data-swipe-out": Se,
9910
9916
  "data-swipe-direction": _,
9911
- "data-expanded": !!(S || Y && G),
9917
+ "data-expanded": !!($ || Y && G),
9912
9918
  style: {
9913
9919
  "--index": b,
9914
9920
  "--toasts-before": b,
9915
- "--z-index": g.length - b,
9921
+ "--z-index": m.length - b,
9916
9922
  "--offset": `${se ? Wt : ue.current}px`,
9917
9923
  "--initial-height": Y ? "auto" : `${J}px`,
9918
- ...C,
9924
+ ...k,
9919
9925
  ...u.style
9920
9926
  },
9921
9927
  onDragEnd: () => {
9922
9928
  ae(!1), O(null), nt.current = null;
9923
9929
  },
9924
9930
  onPointerDown: (ee) => {
9925
- ut || !w || (Ne.current = /* @__PURE__ */ new Date(), U(ue.current), ee.target.setPointerCapture(ee.pointerId), ee.target.tagName !== "BUTTON" && (ae(!0), nt.current = {
9931
+ ut || !x || (Ne.current = /* @__PURE__ */ new Date(), q(ue.current), ee.target.setPointerCapture(ee.pointerId), ee.target.tagName !== "BUTTON" && (ae(!0), nt.current = {
9926
9932
  x: ee.clientX,
9927
9933
  y: ee.clientY
9928
9934
  }));
9929
9935
  },
9930
9936
  onPointerUp: () => {
9931
9937
  var ee, Oe, Pe;
9932
- if (Se || !w) return;
9938
+ if (Se || !x) return;
9933
9939
  nt.current = null;
9934
9940
  const Je = Number(((ee = ie.current) == null ? void 0 : ee.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Wn = Number(((Oe = ie.current) == null ? void 0 : Oe.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Be = (/* @__PURE__ */ new Date()).getTime() - ((Pe = Ne.current) == null ? void 0 : Pe.getTime()), ot = te === "x" ? Je : Wn, In = Math.abs(ot) / Be;
9935
9941
  if (Math.abs(ot) >= G0 || In > 0.11) {
9936
- U(ue.current), u.onDismiss == null || u.onDismiss.call(u, u), H(te === "x" ? Je > 0 ? "right" : "left" : Wn > 0 ? "down" : "up"), be(), Ee(!0);
9942
+ q(ue.current), u.onDismiss == null || u.onDismiss.call(u, u), H(te === "x" ? Je > 0 ? "right" : "left" : Wn > 0 ? "down" : "up"), be(), Ee(!0);
9937
9943
  return;
9938
9944
  } else {
9939
9945
  var dt, ft;
@@ -9943,7 +9949,7 @@ const X0 = (e) => {
9943
9949
  },
9944
9950
  onPointerMove: (ee) => {
9945
9951
  var Oe, Pe, Je;
9946
- if (!nt.current || !w || ((Oe = window.getSelection()) == null ? void 0 : Oe.toString().length) > 0) return;
9952
+ if (!nt.current || !x || ((Oe = window.getSelection()) == null ? void 0 : Oe.toString().length) > 0) return;
9947
9953
  const Be = ee.clientY - nt.current.y, ot = ee.clientX - nt.current.x;
9948
9954
  var In;
9949
9955
  const dt = (In = e.swipeDirections) != null ? In : q0(W);
@@ -9970,36 +9976,36 @@ const X0 = (e) => {
9970
9976
  }
9971
9977
  (Math.abs(ft.x) > 0 || Math.abs(ft.y) > 0) && lt(!0), (Pe = ie.current) == null || Pe.style.setProperty("--swipe-amount-x", `${ft.x}px`), (Je = ie.current) == null || Je.style.setProperty("--swipe-amount-y", `${ft.y}px`);
9972
9978
  }
9973
- }, P && !u.jsx && h !== "loading" ? /* @__PURE__ */ m.createElement("button", {
9979
+ }, P && !u.jsx && h !== "loading" ? /* @__PURE__ */ g.createElement("button", {
9974
9980
  "aria-label": oe,
9975
9981
  "data-disabled": ut,
9976
9982
  "data-close-button": !0,
9977
- onClick: ut || !w ? () => {
9983
+ onClick: ut || !x ? () => {
9978
9984
  } : () => {
9979
9985
  be(), u.onDismiss == null || u.onDismiss.call(u, u);
9980
9986
  },
9981
9987
  className: gt(B?.closeButton, u == null || (r = u.classNames) == null ? void 0 : r.closeButton)
9982
- }, (Nn = Z?.close) != null ? Nn : P0) : null, (h || u.icon || u.promise) && u.icon !== null && (Z?.[h] !== null || u.icon) ? /* @__PURE__ */ m.createElement("div", {
9988
+ }, (Nn = Z?.close) != null ? Nn : P0) : null, (h || u.icon || u.promise) && u.icon !== null && (Z?.[h] !== null || u.icon) ? /* @__PURE__ */ g.createElement("div", {
9983
9989
  "data-icon": "",
9984
9990
  className: gt(B?.icon, u == null || (o = u.classNames) == null ? void 0 : o.icon)
9985
- }, u.promise || u.type === "loading" && !u.icon ? u.icon || rt() : null, u.type !== "loading" ? fe : null) : null, /* @__PURE__ */ m.createElement("div", {
9991
+ }, u.promise || u.type === "loading" && !u.icon ? u.icon || rt() : null, u.type !== "loading" ? fe : null) : null, /* @__PURE__ */ g.createElement("div", {
9986
9992
  "data-content": "",
9987
9993
  className: gt(B?.content, u == null || (a = u.classNames) == null ? void 0 : a.content)
9988
- }, /* @__PURE__ */ m.createElement("div", {
9994
+ }, /* @__PURE__ */ g.createElement("div", {
9989
9995
  "data-title": "",
9990
9996
  className: gt(B?.title, u == null || (i = u.classNames) == null ? void 0 : i.title)
9991
- }, u.jsx ? u.jsx : typeof u.title == "function" ? u.title() : u.title), u.description ? /* @__PURE__ */ m.createElement("div", {
9997
+ }, u.jsx ? u.jsx : typeof u.title == "function" ? u.title() : u.title), u.description ? /* @__PURE__ */ g.createElement("div", {
9992
9998
  "data-description": "",
9993
- className: gt(z, I, B?.description, u == null || (s = u.classNames) == null ? void 0 : s.description)
9994
- }, typeof u.description == "function" ? u.description() : u.description) : null), /* @__PURE__ */ m.isValidElement(u.cancel) ? u.cancel : u.cancel && Vn(u.cancel) ? /* @__PURE__ */ m.createElement("button", {
9999
+ className: gt(L, I, B?.description, u == null || (s = u.classNames) == null ? void 0 : s.description)
10000
+ }, typeof u.description == "function" ? u.description() : u.description) : null), /* @__PURE__ */ g.isValidElement(u.cancel) ? u.cancel : u.cancel && Vn(u.cancel) ? /* @__PURE__ */ g.createElement("button", {
9995
10001
  "data-button": !0,
9996
10002
  "data-cancel": !0,
9997
10003
  style: u.cancelButtonStyle || j,
9998
10004
  onClick: (ee) => {
9999
- Vn(u.cancel) && w && (u.cancel.onClick == null || u.cancel.onClick.call(u.cancel, ee), be());
10005
+ Vn(u.cancel) && x && (u.cancel.onClick == null || u.cancel.onClick.call(u.cancel, ee), be());
10000
10006
  },
10001
10007
  className: gt(B?.cancelButton, u == null || (c = u.classNames) == null ? void 0 : c.cancelButton)
10002
- }, u.cancel.label) : null, /* @__PURE__ */ m.isValidElement(u.action) ? u.action : u.action && Vn(u.action) ? /* @__PURE__ */ m.createElement("button", {
10008
+ }, u.cancel.label) : null, /* @__PURE__ */ g.isValidElement(u.action) ? u.action : u.action && Vn(u.action) ? /* @__PURE__ */ g.createElement("button", {
10003
10009
  "data-button": !0,
10004
10010
  "data-action": !0,
10005
10011
  style: u.actionButtonStyle || T,
@@ -10041,25 +10047,25 @@ function Q0(e, t) {
10041
10047
  }) : c(s);
10042
10048
  }), n;
10043
10049
  }
10044
- const Z0 = /* @__PURE__ */ m.forwardRef(function(t, n) {
10050
+ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10045
10051
  const { invert: r, position: o = "bottom-right", hotkey: a = [
10046
10052
  "altKey",
10047
10053
  "KeyT"
10048
- ], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: v, style: x, visibleToasts: $ = L0, toastOptions: k, dir: b = ma(), gap: g = Y0, icons: S, containerAriaLabel: A = "Notifications" } = t, [E, M] = m.useState([]), C = m.useMemo(() => Array.from(new Set([
10054
+ ], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: v, style: w, visibleToasts: M = L0, toastOptions: C, dir: b = ma(), gap: m = Y0, icons: $, containerAriaLabel: A = "Notifications" } = t, [E, S] = g.useState([]), k = g.useMemo(() => Array.from(new Set([
10049
10055
  o
10050
10056
  ].concat(E.filter((_) => _.position).map((_) => _.position)))), [
10051
10057
  E,
10052
10058
  o
10053
- ]), [j, T] = m.useState([]), [V, z] = m.useState(!1), [N, W] = m.useState(!1), [q, Y] = m.useState(u !== "system" ? u : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), B = m.useRef(null), Z = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), oe = m.useRef(null), te = m.useRef(!1), O = m.useCallback((_) => {
10054
- M((H) => {
10059
+ ]), [j, T] = g.useState([]), [z, L] = g.useState(!1), [N, W] = g.useState(!1), [U, Y] = g.useState(u !== "system" ? u : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), B = g.useRef(null), Z = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), oe = g.useRef(null), te = g.useRef(!1), O = g.useCallback((_) => {
10060
+ S((H) => {
10055
10061
  var G;
10056
10062
  return (G = H.find((le) => le.id === _.id)) != null && G.delete || Xe.dismiss(_.id), H.filter(({ id: le }) => le !== _.id);
10057
10063
  });
10058
10064
  }, []);
10059
- return m.useEffect(() => Xe.subscribe((_) => {
10065
+ return g.useEffect(() => Xe.subscribe((_) => {
10060
10066
  if (_.dismiss) {
10061
10067
  requestAnimationFrame(() => {
10062
- M((H) => H.map((G) => G.id === _.id ? {
10068
+ S((H) => H.map((G) => G.id === _.id ? {
10063
10069
  ...G,
10064
10070
  delete: !0
10065
10071
  } : G));
@@ -10068,7 +10074,7 @@ const Z0 = /* @__PURE__ */ m.forwardRef(function(t, n) {
10068
10074
  }
10069
10075
  setTimeout(() => {
10070
10076
  Zl.flushSync(() => {
10071
- M((H) => {
10077
+ S((H) => {
10072
10078
  const G = H.findIndex((le) => le.id === _.id);
10073
10079
  return G !== -1 ? [
10074
10080
  ...H.slice(0, G),
@@ -10086,7 +10092,7 @@ const Z0 = /* @__PURE__ */ m.forwardRef(function(t, n) {
10086
10092
  });
10087
10093
  }), [
10088
10094
  E
10089
- ]), m.useEffect(() => {
10095
+ ]), g.useEffect(() => {
10090
10096
  if (u !== "system") {
10091
10097
  Y(u);
10092
10098
  return;
@@ -10108,23 +10114,23 @@ const Z0 = /* @__PURE__ */ m.forwardRef(function(t, n) {
10108
10114
  }
10109
10115
  }, [
10110
10116
  u
10111
- ]), m.useEffect(() => {
10112
- E.length <= 1 && z(!1);
10117
+ ]), g.useEffect(() => {
10118
+ E.length <= 1 && L(!1);
10113
10119
  }, [
10114
10120
  E
10115
- ]), m.useEffect(() => {
10121
+ ]), g.useEffect(() => {
10116
10122
  const _ = (H) => {
10117
10123
  var G;
10118
10124
  if (a.every((re) => H[re] || H.code === re)) {
10119
10125
  var se;
10120
- z(!0), (se = B.current) == null || se.focus();
10126
+ L(!0), (se = B.current) == null || se.focus();
10121
10127
  }
10122
- H.code === "Escape" && (document.activeElement === B.current || (G = B.current) != null && G.contains(document.activeElement)) && z(!1);
10128
+ H.code === "Escape" && (document.activeElement === B.current || (G = B.current) != null && G.contains(document.activeElement)) && L(!1);
10123
10129
  };
10124
10130
  return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
10125
10131
  }, [
10126
10132
  a
10127
- ]), m.useEffect(() => {
10133
+ ]), g.useEffect(() => {
10128
10134
  if (B.current)
10129
10135
  return () => {
10130
10136
  oe.current && (oe.current.focus({
@@ -10134,7 +10140,7 @@ const Z0 = /* @__PURE__ */ m.forwardRef(function(t, n) {
10134
10140
  }, [
10135
10141
  B.current
10136
10142
  ]), // Remove item from normal navigation flow, only available via hotkey
10137
- /* @__PURE__ */ m.createElement("section", {
10143
+ /* @__PURE__ */ g.createElement("section", {
10138
10144
  ref: n,
10139
10145
  "aria-label": `${A} ${Z}`,
10140
10146
  tabIndex: -1,
@@ -10142,25 +10148,25 @@ const Z0 = /* @__PURE__ */ m.forwardRef(function(t, n) {
10142
10148
  "aria-relevant": "additions text",
10143
10149
  "aria-atomic": "false",
10144
10150
  suppressHydrationWarning: !0
10145
- }, C.map((_, H) => {
10151
+ }, k.map((_, H) => {
10146
10152
  var G;
10147
10153
  const [le, se] = _.split("-");
10148
- return E.length ? /* @__PURE__ */ m.createElement("ol", {
10154
+ return E.length ? /* @__PURE__ */ g.createElement("ol", {
10149
10155
  key: _,
10150
10156
  dir: b === "auto" ? ma() : b,
10151
10157
  tabIndex: -1,
10152
10158
  ref: B,
10153
10159
  className: c,
10154
10160
  "data-sonner-toaster": !0,
10155
- "data-sonner-theme": q,
10161
+ "data-sonner-theme": U,
10156
10162
  "data-y-position": le,
10157
- "data-lifted": V && E.length > 1 && !i,
10163
+ "data-lifted": z && E.length > 1 && !i,
10158
10164
  "data-x-position": se,
10159
10165
  style: {
10160
10166
  "--front-toast-height": `${((G = j[0]) == null ? void 0 : G.height) || 0}px`,
10161
10167
  "--width": `${H0}px`,
10162
- "--gap": `${g}px`,
10163
- ...x,
10168
+ "--gap": `${m}px`,
10169
+ ...w,
10164
10170
  ...Q0(d, f)
10165
10171
  },
10166
10172
  onBlur: (re) => {
@@ -10171,45 +10177,45 @@ const Z0 = /* @__PURE__ */ m.forwardRef(function(t, n) {
10171
10177
  onFocus: (re) => {
10172
10178
  re.target instanceof HTMLElement && re.target.dataset.dismissible === "false" || te.current || (te.current = !0, oe.current = re.relatedTarget);
10173
10179
  },
10174
- onMouseEnter: () => z(!0),
10175
- onMouseMove: () => z(!0),
10180
+ onMouseEnter: () => L(!0),
10181
+ onMouseMove: () => L(!0),
10176
10182
  onMouseLeave: () => {
10177
- N || z(!1);
10183
+ N || L(!1);
10178
10184
  },
10179
- onDragEnd: () => z(!1),
10185
+ onDragEnd: () => L(!1),
10180
10186
  onPointerDown: (re) => {
10181
10187
  re.target instanceof HTMLElement && re.target.dataset.dismissible === "false" || W(!0);
10182
10188
  },
10183
10189
  onPointerUp: () => W(!1)
10184
10190
  }, E.filter((re) => !re.position && H === 0 || re.position === _).map((re, we) => {
10185
10191
  var ae, Se;
10186
- return /* @__PURE__ */ m.createElement(X0, {
10192
+ return /* @__PURE__ */ g.createElement(X0, {
10187
10193
  key: re.id,
10188
- icons: S,
10194
+ icons: $,
10189
10195
  index: we,
10190
10196
  toast: re,
10191
10197
  defaultRichColors: p,
10192
- duration: (ae = k?.duration) != null ? ae : v,
10193
- className: k?.className,
10194
- descriptionClassName: k?.descriptionClassName,
10198
+ duration: (ae = C?.duration) != null ? ae : v,
10199
+ className: C?.className,
10200
+ descriptionClassName: C?.descriptionClassName,
10195
10201
  invert: r,
10196
- visibleToasts: $,
10197
- closeButton: (Se = k?.closeButton) != null ? Se : s,
10202
+ visibleToasts: M,
10203
+ closeButton: (Se = C?.closeButton) != null ? Se : s,
10198
10204
  interacting: N,
10199
10205
  position: _,
10200
- style: k?.style,
10201
- unstyled: k?.unstyled,
10202
- classNames: k?.classNames,
10203
- cancelButtonStyle: k?.cancelButtonStyle,
10204
- actionButtonStyle: k?.actionButtonStyle,
10205
- closeButtonAriaLabel: k?.closeButtonAriaLabel,
10206
+ style: C?.style,
10207
+ unstyled: C?.unstyled,
10208
+ classNames: C?.classNames,
10209
+ cancelButtonStyle: C?.cancelButtonStyle,
10210
+ actionButtonStyle: C?.actionButtonStyle,
10211
+ closeButtonAriaLabel: C?.closeButtonAriaLabel,
10206
10212
  removeToast: O,
10207
10213
  toasts: E.filter((Ee) => Ee.position == re.position),
10208
10214
  heights: j.filter((Ee) => Ee.position == re.position),
10209
10215
  setHeights: T,
10210
10216
  expandByDefault: i,
10211
- gap: g,
10212
- expanded: V,
10217
+ gap: m,
10218
+ expanded: z,
10213
10219
  swipeDirections: t.swipeDirections
10214
10220
  });
10215
10221
  })) : null;
@@ -10413,7 +10419,7 @@ lr.Footer = uv;
10413
10419
  lr.Aside = av;
10414
10420
  const cx = (e) => /* @__PURE__ */ l.jsx(_l, { ...e });
10415
10421
  function wv({
10416
- value: e = /* @__PURE__ */ new Date(),
10422
+ value: e,
10417
10423
  onSelect: t,
10418
10424
  minDate: n,
10419
10425
  maxDate: r,
@@ -10427,7 +10433,7 @@ function wv({
10427
10433
  disabled: o
10428
10434
  })
10429
10435
  ), i = (s) => {
10430
- t?.(new Date(s.getFullYear(), e.getMonth(), 1));
10436
+ t?.(new Date(s.getFullYear(), e.getMonth(), e.getDate()));
10431
10437
  };
10432
10438
  return /* @__PURE__ */ l.jsx(to, { variant: "light", name: e.getFullYear().toString(), children: a?.map(({ value: s, label: c, disabled: d }) => /* @__PURE__ */ l.jsx(
10433
10439
  st,
@@ -10494,15 +10500,18 @@ const kv = [
10494
10500
  helperText: c,
10495
10501
  max: d = new Date(2050, 0, 1),
10496
10502
  min: f = new Date(2e3, 0, 1),
10497
- className: u
10498
- } = e, [p, v] = me(null), x = (g) => {
10499
- v(g.currentTarget);
10503
+ className: u,
10504
+ size: p,
10505
+ fullWidth: v,
10506
+ name: w
10507
+ } = e, M = /* @__PURE__ */ new Date(), [C, b] = me(null), m = (S) => {
10508
+ b(S.currentTarget);
10500
10509
  }, $ = () => {
10501
- v(null);
10502
- }, k = (g) => {
10503
- const S = r?.getFullYear() || (/* @__PURE__ */ new Date()).getFullYear(), A = new Date(S, g, 1);
10504
- o?.(A), $();
10505
- }, b = a === "month" ? r?.toLocaleDateString("ru-RU", {
10510
+ b(null);
10511
+ }, A = (S) => {
10512
+ const k = r?.getFullYear() || M.getFullYear(), j = new Date(k, S, r?.getDate() || 1);
10513
+ o?.(j), $();
10514
+ }, E = a === "month" ? r?.toLocaleDateString("ru-RU", {
10506
10515
  month: "long",
10507
10516
  year: "numeric"
10508
10517
  }) : Mv(r);
@@ -10511,9 +10520,12 @@ const kv = [
10511
10520
  rn,
10512
10521
  {
10513
10522
  label: t,
10514
- value: b,
10523
+ value: E,
10515
10524
  disabled: n,
10516
- endAdornment: /* @__PURE__ */ l.jsx(Ze, { disabled: n, variant: "text", onClick: x, children: /* @__PURE__ */ l.jsx(_a, {}) }),
10525
+ size: p,
10526
+ fullWidth: v,
10527
+ name: w,
10528
+ endAdornment: /* @__PURE__ */ l.jsx(Ze, { disabled: n, variant: "text", onClick: m, children: /* @__PURE__ */ l.jsx(_a, {}) }),
10517
10529
  placeholder: i,
10518
10530
  error: s,
10519
10531
  helperText: c,
@@ -10523,8 +10535,8 @@ const kv = [
10523
10535
  /* @__PURE__ */ l.jsx(
10524
10536
  ro,
10525
10537
  {
10526
- open: !!p,
10527
- anchorEl: p,
10538
+ open: !!C,
10539
+ anchorEl: C,
10528
10540
  onClose: $,
10529
10541
  anchorOrigin: {
10530
10542
  vertical: "bottom",
@@ -10538,32 +10550,32 @@ const kv = [
10538
10550
  /* @__PURE__ */ l.jsx(
10539
10551
  wv,
10540
10552
  {
10541
- value: r || /* @__PURE__ */ new Date(),
10553
+ value: r || M,
10542
10554
  onSelect: o,
10543
10555
  minDate: f,
10544
10556
  maxDate: d
10545
10557
  }
10546
10558
  ),
10547
- a === "month" ? /* @__PURE__ */ l.jsx(Sv, { children: kv.map((g, S) => /* @__PURE__ */ l.jsx(
10559
+ a === "month" ? /* @__PURE__ */ l.jsx(Sv, { children: kv.map((S, k) => /* @__PURE__ */ l.jsx(
10548
10560
  Fe,
10549
10561
  {
10550
10562
  variant: "text",
10551
10563
  size: "small",
10552
- onClick: () => k(S),
10553
- selected: r?.getMonth() === S,
10554
- children: g
10564
+ onClick: () => A(k),
10565
+ selected: r?.getMonth() === k,
10566
+ children: S
10555
10567
  },
10556
- g
10557
- )) }) : /* @__PURE__ */ l.jsx($v, { children: fs.map((g, S) => /* @__PURE__ */ l.jsx(
10568
+ S
10569
+ )) }) : /* @__PURE__ */ l.jsx($v, { children: fs.map((S, k) => /* @__PURE__ */ l.jsx(
10558
10570
  Fe,
10559
10571
  {
10560
10572
  variant: "text",
10561
10573
  size: "small",
10562
- onClick: () => k(S * 3),
10563
- selected: ps(r?.getMonth() || 0) === S,
10564
- children: g
10574
+ onClick: () => A(k * 3),
10575
+ selected: ps(r?.getMonth() || 0) === k,
10576
+ children: S
10565
10577
  },
10566
- g
10578
+ S
10567
10579
  )) })
10568
10580
  ] })
10569
10581
  }
@@ -10951,21 +10963,21 @@ function gx({
10951
10963
  title: s,
10952
10964
  size: c
10953
10965
  }) {
10954
- const [d, f] = me(e), [u, p] = me(t), v = (g, S) => {
10955
- Array.isArray(S) && (f(S[0]), p(S[1]));
10956
- }, x = (g) => {
10957
- const { value: S } = g.target;
10958
- Number.isNaN(+S) || f(+S);
10959
- }, $ = (g) => {
10960
- const { value: S } = g.target;
10961
- Number.isNaN(+S) || p(+S);
10962
- }, k = (g) => {
10963
- if (g.key === "Enter") {
10964
- const S = d >= e && d <= t ? d : e, A = u >= e && u <= t ? u : t;
10965
- n(S, A);
10966
- }
10967
- }, b = (g, S) => {
10968
- Array.isArray(S) && n(S[0], S[1]);
10966
+ const [d, f] = me(e), [u, p] = me(t), v = (m, $) => {
10967
+ Array.isArray($) && (f($[0]), p($[1]));
10968
+ }, w = (m) => {
10969
+ const { value: $ } = m.target;
10970
+ Number.isNaN(+$) || f(+$);
10971
+ }, M = (m) => {
10972
+ const { value: $ } = m.target;
10973
+ Number.isNaN(+$) || p(+$);
10974
+ }, C = (m) => {
10975
+ if (m.key === "Enter") {
10976
+ const $ = d >= e && d <= t ? d : e, A = u >= e && u <= t ? u : t;
10977
+ n($, A);
10978
+ }
10979
+ }, b = (m, $) => {
10980
+ Array.isArray($) && n($[0], $[1]);
10969
10981
  };
10970
10982
  return it(() => {
10971
10983
  f(r || e), p(o || t);
@@ -10979,8 +10991,8 @@ function gx({
10979
10991
  type: "text",
10980
10992
  name: "minVal",
10981
10993
  value: d,
10982
- onChange: x,
10983
- onKeyDown: k
10994
+ onChange: w,
10995
+ onKeyDown: C
10984
10996
  }
10985
10997
  ),
10986
10998
  /* @__PURE__ */ l.jsx(va, { children: "до" }),
@@ -10990,8 +11002,8 @@ function gx({
10990
11002
  type: "text",
10991
11003
  name: "minVal",
10992
11004
  value: u,
10993
- onChange: $,
10994
- onKeyDown: k
11005
+ onChange: M,
11006
+ onKeyDown: C
10995
11007
  }
10996
11008
  ),
10997
11009
  /* @__PURE__ */ l.jsx(Gv, { children: /* @__PURE__ */ l.jsx(
@@ -11046,7 +11058,7 @@ const Uv = y(zs)`
11046
11058
  f(b.target.value), u.current && clearTimeout(u.current), u.current = setTimeout(() => {
11047
11059
  n?.(b);
11048
11060
  }, i);
11049
- }, x = () => {
11061
+ }, w = () => {
11050
11062
  f(""), p.current && (p.current.value = ""), u.current && clearTimeout(u.current);
11051
11063
  const b = new InputEvent("input", {
11052
11064
  bubbles: !0,
@@ -11056,23 +11068,23 @@ const Uv = y(zs)`
11056
11068
  writable: !0,
11057
11069
  value: p.current
11058
11070
  }), n?.(b), p.current?.focus();
11059
- }, $ = () => {
11071
+ }, M = () => {
11060
11072
  p.current?.focus();
11061
- }, k = !!d.length;
11073
+ }, C = !!d.length;
11062
11074
  return /* @__PURE__ */ l.jsx(
11063
11075
  Xv,
11064
11076
  {
11065
11077
  margin: e,
11066
11078
  placeholder: t,
11067
- startAdornment: /* @__PURE__ */ l.jsx(Uv, { onClick: $ }),
11079
+ startAdornment: /* @__PURE__ */ l.jsx(Uv, { onClick: M }),
11068
11080
  disabled: r,
11069
11081
  endAdornment: /* @__PURE__ */ l.jsx(
11070
11082
  qv,
11071
11083
  {
11072
11084
  variant: "text",
11073
- onClick: x,
11074
- disabled: r || !k,
11075
- $isActive: k,
11085
+ onClick: w,
11086
+ disabled: r || !C,
11087
+ $isActive: C,
11076
11088
  children: /* @__PURE__ */ l.jsx(Qv, {})
11077
11089
  }
11078
11090
  ),
@@ -11415,9 +11427,9 @@ const Qn = {
11415
11427
  pattern: "pattern",
11416
11428
  required: "required",
11417
11429
  validate: "validate"
11418
- }, bs = m.createContext(null), An = () => m.useContext(bs), db = (e) => {
11430
+ }, bs = g.createContext(null), An = () => g.useContext(bs), db = (e) => {
11419
11431
  const { children: t, ...n } = e;
11420
- return m.createElement(bs.Provider, { value: n }, t);
11432
+ return g.createElement(bs.Provider, { value: n }, t);
11421
11433
  };
11422
11434
  var xs = (e, t, n, r = !0) => {
11423
11435
  const o = {
@@ -11434,7 +11446,7 @@ var xs = (e, t, n, r = !0) => {
11434
11446
  };
11435
11447
  const fo = typeof window < "u" ? K.useLayoutEffect : K.useEffect;
11436
11448
  function fb(e) {
11437
- const t = An(), { control: n = t.control, disabled: r, name: o, exact: a } = e || {}, [i, s] = m.useState(n._formState), c = m.useRef({
11449
+ const t = An(), { control: n = t.control, disabled: r, name: o, exact: a } = e || {}, [i, s] = g.useState(n._formState), c = g.useRef({
11438
11450
  isDirty: !1,
11439
11451
  isLoading: !1,
11440
11452
  dirtyFields: !1,
@@ -11454,13 +11466,13 @@ function fb(e) {
11454
11466
  ...d
11455
11467
  });
11456
11468
  }
11457
- }), [o, r, a]), m.useEffect(() => {
11469
+ }), [o, r, a]), g.useEffect(() => {
11458
11470
  c.current.isValid && n._setValid(!0);
11459
- }, [n]), m.useMemo(() => xs(i, n, c.current, !1), [i, n]);
11471
+ }, [n]), g.useMemo(() => xs(i, n, c.current, !1), [i, n]);
11460
11472
  }
11461
11473
  var wt = (e) => typeof e == "string", ws = (e, t, n, r, o) => wt(e) ? (r && t.watch.add(e), R(n, e, o)) : Array.isArray(e) ? e.map((a) => (r && t.watch.add(a), R(n, a))) : (r && (t.watchAll = !0), n);
11462
11474
  function pb(e) {
11463
- const t = An(), { control: n = t.control, name: r, defaultValue: o, disabled: a, exact: i } = e || {}, s = m.useRef(o), [c, d] = m.useState(n._getWatch(r, s.current));
11475
+ const t = An(), { control: n = t.control, name: r, defaultValue: o, disabled: a, exact: i } = e || {}, s = g.useRef(o), [c, d] = g.useState(n._getWatch(r, s.current));
11464
11476
  return fo(() => n._subscribe({
11465
11477
  name: r,
11466
11478
  formState: {
@@ -11468,7 +11480,7 @@ function pb(e) {
11468
11480
  },
11469
11481
  exact: i,
11470
11482
  callback: (f) => !a && d(ws(r, n._names, f.values || n._formValues, !1, s.current))
11471
- }), [r, n, a, i]), m.useEffect(() => n._removeUnmounted()), c;
11483
+ }), [r, n, a, i]), g.useEffect(() => n._removeUnmounted()), c;
11472
11484
  }
11473
11485
  function hb(e) {
11474
11486
  const t = An(), { name: n, disabled: r, control: o = t.control, shouldUnregister: a } = e, i = ys(o._names.array, n), s = pb({
@@ -11480,11 +11492,11 @@ function hb(e) {
11480
11492
  control: o,
11481
11493
  name: n,
11482
11494
  exact: !0
11483
- }), d = m.useRef(e), f = m.useRef(o.register(n, {
11495
+ }), d = g.useRef(e), f = g.useRef(o.register(n, {
11484
11496
  ...e.rules,
11485
11497
  value: s,
11486
11498
  ...et(e.disabled) ? { disabled: e.disabled } : {}
11487
- })), u = m.useMemo(() => Object.defineProperties({}, {
11499
+ })), u = g.useMemo(() => Object.defineProperties({}, {
11488
11500
  invalid: {
11489
11501
  enumerable: !0,
11490
11502
  get: () => !!R(c.errors, n)
@@ -11505,56 +11517,56 @@ function hb(e) {
11505
11517
  enumerable: !0,
11506
11518
  get: () => R(c.errors, n)
11507
11519
  }
11508
- }), [c, n]), p = m.useCallback((k) => f.current.onChange({
11520
+ }), [c, n]), p = g.useCallback((C) => f.current.onChange({
11509
11521
  target: {
11510
- value: ms(k),
11522
+ value: ms(C),
11511
11523
  name: n
11512
11524
  },
11513
11525
  type: Qn.CHANGE
11514
- }), [n]), v = m.useCallback(() => f.current.onBlur({
11526
+ }), [n]), v = g.useCallback(() => f.current.onBlur({
11515
11527
  target: {
11516
11528
  value: R(o._formValues, n),
11517
11529
  name: n
11518
11530
  },
11519
11531
  type: Qn.BLUR
11520
- }), [n, o._formValues]), x = m.useCallback((k) => {
11532
+ }), [n, o._formValues]), w = g.useCallback((C) => {
11521
11533
  const b = R(o._fields, n);
11522
- b && k && (b._f.ref = k);
11523
- }, [o._fields, n]), $ = m.useMemo(() => ({
11534
+ b && C && (b._f.ref = C);
11535
+ }, [o._fields, n]), M = g.useMemo(() => ({
11524
11536
  name: n,
11525
11537
  value: s,
11526
11538
  ...et(r) || c.disabled ? { disabled: c.disabled || r } : {},
11527
11539
  onChange: p,
11528
11540
  onBlur: v,
11529
- ref: x
11530
- }), [n, r, c.disabled, p, v, x, s]);
11531
- return m.useEffect(() => {
11532
- const k = o._options.shouldUnregister || a;
11541
+ ref: w
11542
+ }), [n, r, c.disabled, p, v, w, s]);
11543
+ return g.useEffect(() => {
11544
+ const C = o._options.shouldUnregister || a;
11533
11545
  o.register(n, {
11534
11546
  ...d.current.rules,
11535
11547
  ...et(d.current.disabled) ? { disabled: d.current.disabled } : {}
11536
11548
  });
11537
- const b = (g, S) => {
11538
- const A = R(o._fields, g);
11539
- A && A._f && (A._f.mount = S);
11549
+ const b = (m, $) => {
11550
+ const A = R(o._fields, m);
11551
+ A && A._f && (A._f.mount = $);
11540
11552
  };
11541
- if (b(n, !0), k) {
11542
- const g = Me(R(o._options.defaultValues, n));
11543
- pe(o._defaultValues, n, g), xe(R(o._formValues, n)) && pe(o._formValues, n, g);
11553
+ if (b(n, !0), C) {
11554
+ const m = Me(R(o._options.defaultValues, n));
11555
+ pe(o._defaultValues, n, m), xe(R(o._formValues, n)) && pe(o._formValues, n, m);
11544
11556
  }
11545
11557
  return !i && o.register(n), () => {
11546
- (i ? k && !o._state.action : k) ? o.unregister(n) : b(n, !1);
11558
+ (i ? C && !o._state.action : C) ? o.unregister(n) : b(n, !1);
11547
11559
  };
11548
- }, [n, o, i, a]), m.useEffect(() => {
11560
+ }, [n, o, i, a]), g.useEffect(() => {
11549
11561
  o._setDisabledField({
11550
11562
  disabled: r,
11551
11563
  name: n
11552
11564
  });
11553
- }, [r, n, o]), m.useMemo(() => ({
11554
- field: $,
11565
+ }, [r, n, o]), g.useMemo(() => ({
11566
+ field: M,
11555
11567
  formState: c,
11556
11568
  fieldState: u
11557
- }), [$, c, u]);
11569
+ }), [M, c, u]);
11558
11570
  }
11559
11571
  const _n = (e) => e.render(hb(e));
11560
11572
  var gb = (e, t, n, r, o) => t ? {
@@ -11757,79 +11769,79 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
11757
11769
  value: e,
11758
11770
  message: ""
11759
11771
  }, Hr = async (e, t, n, r, o, a) => {
11760
- const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: v, validate: x, name: $, valueAsNumber: k, mount: b } = e._f, g = R(n, $);
11761
- if (!b || t.has($))
11772
+ const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: v, validate: w, name: M, valueAsNumber: C, mount: b } = e._f, m = R(n, M);
11773
+ if (!b || t.has(M))
11762
11774
  return {};
11763
- const S = s ? s[0] : i, A = (N) => {
11764
- o && S.reportValidity && (S.setCustomValidity(et(N) ? "" : N || ""), S.reportValidity());
11765
- }, E = {}, M = ho(i), C = Tn(i), j = M || C, T = (k || po(i)) && xe(i.value) && xe(g) || Zn(i) && i.value === "" || g === "" || Array.isArray(g) && !g.length, V = gb.bind(null, $, r, E), z = (N, W, q, Y = Ct.maxLength, B = Ct.minLength) => {
11766
- const Z = N ? W : q;
11767
- E[$] = {
11775
+ const $ = s ? s[0] : i, A = (N) => {
11776
+ o && $.reportValidity && ($.setCustomValidity(et(N) ? "" : N || ""), $.reportValidity());
11777
+ }, E = {}, S = ho(i), k = Tn(i), j = S || k, T = (C || po(i)) && xe(i.value) && xe(m) || Zn(i) && i.value === "" || m === "" || Array.isArray(m) && !m.length, z = gb.bind(null, M, r, E), L = (N, W, U, Y = Ct.maxLength, B = Ct.minLength) => {
11778
+ const Z = N ? W : U;
11779
+ E[M] = {
11768
11780
  type: N ? Y : B,
11769
11781
  message: Z,
11770
11782
  ref: i,
11771
- ...V(N ? Y : B, Z)
11783
+ ...z(N ? Y : B, Z)
11772
11784
  };
11773
11785
  };
11774
- if (a ? !Array.isArray(g) || !g.length : c && (!j && (T || Ge(g)) || et(g) && !g || C && !$s(s).isValid || M && !Ds(s).isValid)) {
11786
+ if (a ? !Array.isArray(m) || !m.length : c && (!j && (T || Ge(m)) || et(m) && !m || k && !$s(s).isValid || S && !Ds(s).isValid)) {
11775
11787
  const { value: N, message: W } = Yn(c) ? { value: !!c, message: c } : Jt(c);
11776
- if (N && (E[$] = {
11788
+ if (N && (E[M] = {
11777
11789
  type: Ct.required,
11778
11790
  message: W,
11779
- ref: S,
11780
- ...V(Ct.required, W)
11791
+ ref: $,
11792
+ ...z(Ct.required, W)
11781
11793
  }, !r))
11782
11794
  return A(W), E;
11783
11795
  }
11784
11796
  if (!T && (!Ge(u) || !Ge(p))) {
11785
11797
  let N, W;
11786
- const q = Jt(p), Y = Jt(u);
11787
- if (!Ge(g) && !isNaN(g)) {
11788
- const B = i.valueAsNumber || g && +g;
11789
- Ge(q.value) || (N = B > q.value), Ge(Y.value) || (W = B < Y.value);
11798
+ const U = Jt(p), Y = Jt(u);
11799
+ if (!Ge(m) && !isNaN(m)) {
11800
+ const B = i.valueAsNumber || m && +m;
11801
+ Ge(U.value) || (N = B > U.value), Ge(Y.value) || (W = B < Y.value);
11790
11802
  } else {
11791
- const B = i.valueAsDate || new Date(g), Z = (O) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + O), oe = i.type == "time", te = i.type == "week";
11792
- wt(q.value) && g && (N = oe ? Z(g) > Z(q.value) : te ? g > q.value : B > new Date(q.value)), wt(Y.value) && g && (W = oe ? Z(g) < Z(Y.value) : te ? g < Y.value : B < new Date(Y.value));
11803
+ const B = i.valueAsDate || new Date(m), Z = (O) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + O), oe = i.type == "time", te = i.type == "week";
11804
+ wt(U.value) && m && (N = oe ? Z(m) > Z(U.value) : te ? m > U.value : B > new Date(U.value)), wt(Y.value) && m && (W = oe ? Z(m) < Z(Y.value) : te ? m < Y.value : B < new Date(Y.value));
11793
11805
  }
11794
- if ((N || W) && (z(!!N, q.message, Y.message, Ct.max, Ct.min), !r))
11795
- return A(E[$].message), E;
11806
+ if ((N || W) && (L(!!N, U.message, Y.message, Ct.max, Ct.min), !r))
11807
+ return A(E[M].message), E;
11796
11808
  }
11797
- if ((d || f) && !T && (wt(g) || a && Array.isArray(g))) {
11798
- const N = Jt(d), W = Jt(f), q = !Ge(N.value) && g.length > +N.value, Y = !Ge(W.value) && g.length < +W.value;
11799
- if ((q || Y) && (z(q, N.message, W.message), !r))
11800
- return A(E[$].message), E;
11809
+ if ((d || f) && !T && (wt(m) || a && Array.isArray(m))) {
11810
+ const N = Jt(d), W = Jt(f), U = !Ge(N.value) && m.length > +N.value, Y = !Ge(W.value) && m.length < +W.value;
11811
+ if ((U || Y) && (L(U, N.message, W.message), !r))
11812
+ return A(E[M].message), E;
11801
11813
  }
11802
- if (v && !T && wt(g)) {
11814
+ if (v && !T && wt(m)) {
11803
11815
  const { value: N, message: W } = Jt(v);
11804
- if (Kn(N) && !g.match(N) && (E[$] = {
11816
+ if (Kn(N) && !m.match(N) && (E[M] = {
11805
11817
  type: Ct.pattern,
11806
11818
  message: W,
11807
11819
  ref: i,
11808
- ...V(Ct.pattern, W)
11820
+ ...z(Ct.pattern, W)
11809
11821
  }, !r))
11810
11822
  return A(W), E;
11811
11823
  }
11812
- if (x) {
11813
- if (pt(x)) {
11814
- const N = await x(g, n), W = Oa(N, S);
11815
- if (W && (E[$] = {
11824
+ if (w) {
11825
+ if (pt(w)) {
11826
+ const N = await w(m, n), W = Oa(N, $);
11827
+ if (W && (E[M] = {
11816
11828
  ...W,
11817
- ...V(Ct.validate, W.message)
11829
+ ...z(Ct.validate, W.message)
11818
11830
  }, !r))
11819
11831
  return A(W.message), E;
11820
- } else if (je(x)) {
11832
+ } else if (je(w)) {
11821
11833
  let N = {};
11822
- for (const W in x) {
11834
+ for (const W in w) {
11823
11835
  if (!Ve(N) && !r)
11824
11836
  break;
11825
- const q = Oa(await x[W](g, n), S, W);
11826
- q && (N = {
11827
- ...q,
11828
- ...V(W, q.message)
11829
- }, A(q.message), r && (E[$] = N));
11837
+ const U = Oa(await w[W](m, n), $, W);
11838
+ U && (N = {
11839
+ ...U,
11840
+ ...z(W, U.message)
11841
+ }, A(U.message), r && (E[M] = N));
11830
11842
  }
11831
- if (!Ve(N) && (E[$] = {
11832
- ref: S,
11843
+ if (!Ve(N) && (E[M] = {
11844
+ ref: $,
11833
11845
  ...N
11834
11846
  }, !r))
11835
11847
  return E;
@@ -11889,47 +11901,47 @@ function Db(e = {}) {
11889
11901
  const p = {
11890
11902
  array: wa(),
11891
11903
  state: wa()
11892
- }, v = en(t.mode), x = en(t.reValidateMode), $ = t.criteriaMode === at.all, k = (h) => (w) => {
11893
- clearTimeout(d), d = setTimeout(h, w);
11904
+ }, v = en(t.mode), w = en(t.reValidateMode), M = t.criteriaMode === at.all, C = (h) => (x) => {
11905
+ clearTimeout(d), d = setTimeout(h, x);
11894
11906
  }, b = async (h) => {
11895
11907
  if (!t.disabled && (f.isValid || u.isValid || h)) {
11896
- const w = t.resolver ? Ve((await T()).errors) : await z(r, !0);
11897
- w !== n.isValid && p.state.next({
11898
- isValid: w
11908
+ const x = t.resolver ? Ve((await T()).errors) : await L(r, !0);
11909
+ x !== n.isValid && p.state.next({
11910
+ isValid: x
11899
11911
  });
11900
11912
  }
11901
- }, g = (h, w) => {
11913
+ }, m = (h, x) => {
11902
11914
  !t.disabled && (f.isValidating || f.validatingFields || u.isValidating || u.validatingFields) && ((h || Array.from(s.mount)).forEach((D) => {
11903
- D && (w ? pe(n.validatingFields, D, w) : Ae(n.validatingFields, D));
11915
+ D && (x ? pe(n.validatingFields, D, x) : Ae(n.validatingFields, D));
11904
11916
  }), p.state.next({
11905
11917
  validatingFields: n.validatingFields,
11906
11918
  isValidating: !Ve(n.validatingFields)
11907
11919
  }));
11908
- }, S = (h, w = [], D, I, F = !0, P = !0) => {
11920
+ }, $ = (h, x = [], D, I, F = !0, P = !0) => {
11909
11921
  if (I && D && !t.disabled) {
11910
11922
  if (i.action = !0, P && Array.isArray(R(r, h))) {
11911
- const L = D(R(r, h), I.argA, I.argB);
11912
- F && pe(r, h, L);
11923
+ const V = D(R(r, h), I.argA, I.argB);
11924
+ F && pe(r, h, V);
11913
11925
  }
11914
11926
  if (P && Array.isArray(R(n.errors, h))) {
11915
- const L = D(R(n.errors, h), I.argA, I.argB);
11916
- F && pe(n.errors, h, L), $b(n.errors, h);
11927
+ const V = D(R(n.errors, h), I.argA, I.argB);
11928
+ F && pe(n.errors, h, V), $b(n.errors, h);
11917
11929
  }
11918
11930
  if ((f.touchedFields || u.touchedFields) && P && Array.isArray(R(n.touchedFields, h))) {
11919
- const L = D(R(n.touchedFields, h), I.argA, I.argB);
11920
- F && pe(n.touchedFields, h, L);
11931
+ const V = D(R(n.touchedFields, h), I.argA, I.argB);
11932
+ F && pe(n.touchedFields, h, V);
11921
11933
  }
11922
11934
  (f.dirtyFields || u.dirtyFields) && (n.dirtyFields = fn(o, a)), p.state.next({
11923
11935
  name: h,
11924
- isDirty: W(h, w),
11936
+ isDirty: W(h, x),
11925
11937
  dirtyFields: n.dirtyFields,
11926
11938
  errors: n.errors,
11927
11939
  isValid: n.isValid
11928
11940
  });
11929
11941
  } else
11930
- pe(a, h, w);
11931
- }, A = (h, w) => {
11932
- pe(n.errors, h, w), p.state.next({
11942
+ pe(a, h, x);
11943
+ }, A = (h, x) => {
11944
+ pe(n.errors, h, x), p.state.next({
11933
11945
  errors: n.errors
11934
11946
  });
11935
11947
  }, E = (h) => {
@@ -11937,22 +11949,22 @@ function Db(e = {}) {
11937
11949
  errors: n.errors,
11938
11950
  isValid: !1
11939
11951
  });
11940
- }, M = (h, w, D, I) => {
11952
+ }, S = (h, x, D, I) => {
11941
11953
  const F = R(r, h);
11942
11954
  if (F) {
11943
11955
  const P = R(a, h, xe(D) ? R(o, h) : D);
11944
- xe(P) || I && I.defaultChecked || w ? pe(a, h, w ? P : $a(F._f)) : B(h, P), i.mount && b();
11956
+ xe(P) || I && I.defaultChecked || x ? pe(a, h, x ? P : $a(F._f)) : B(h, P), i.mount && b();
11945
11957
  }
11946
- }, C = (h, w, D, I, F) => {
11947
- let P = !1, L = !1;
11958
+ }, k = (h, x, D, I, F) => {
11959
+ let P = !1, V = !1;
11948
11960
  const ne = {
11949
11961
  name: h
11950
11962
  };
11951
11963
  if (!t.disabled) {
11952
11964
  if (!D || I) {
11953
- (f.isDirty || u.isDirty) && (L = n.isDirty, n.isDirty = ne.isDirty = W(), P = L !== ne.isDirty);
11954
- const ue = Tt(R(o, h), w);
11955
- L = !!R(n.dirtyFields, h), ue ? Ae(n.dirtyFields, h) : pe(n.dirtyFields, h, !0), ne.dirtyFields = n.dirtyFields, P = P || (f.dirtyFields || u.dirtyFields) && L !== !ue;
11965
+ (f.isDirty || u.isDirty) && (V = n.isDirty, n.isDirty = ne.isDirty = W(), P = V !== ne.isDirty);
11966
+ const ue = Tt(R(o, h), x);
11967
+ V = !!R(n.dirtyFields, h), ue ? Ae(n.dirtyFields, h) : pe(n.dirtyFields, h, !0), ne.dirtyFields = n.dirtyFields, P = P || (f.dirtyFields || u.dirtyFields) && V !== !ue;
11956
11968
  }
11957
11969
  if (D) {
11958
11970
  const ue = R(n.touchedFields, h);
@@ -11961,79 +11973,79 @@ function Db(e = {}) {
11961
11973
  P && F && p.state.next(ne);
11962
11974
  }
11963
11975
  return P ? ne : {};
11964
- }, j = (h, w, D, I) => {
11965
- const F = R(n.errors, h), P = (f.isValid || u.isValid) && et(w) && n.isValid !== w;
11966
- if (t.delayError && D ? (c = k(() => A(h, D)), c(t.delayError)) : (clearTimeout(d), c = null, D ? pe(n.errors, h, D) : Ae(n.errors, h)), (D ? !Tt(F, D) : F) || !Ve(I) || P) {
11967
- const L = {
11976
+ }, j = (h, x, D, I) => {
11977
+ const F = R(n.errors, h), P = (f.isValid || u.isValid) && et(x) && n.isValid !== x;
11978
+ if (t.delayError && D ? (c = C(() => A(h, D)), c(t.delayError)) : (clearTimeout(d), c = null, D ? pe(n.errors, h, D) : Ae(n.errors, h)), (D ? !Tt(F, D) : F) || !Ve(I) || P) {
11979
+ const V = {
11968
11980
  ...I,
11969
- ...P && et(w) ? { isValid: w } : {},
11981
+ ...P && et(x) ? { isValid: x } : {},
11970
11982
  errors: n.errors,
11971
11983
  name: h
11972
11984
  };
11973
11985
  n = {
11974
11986
  ...n,
11975
- ...L
11976
- }, p.state.next(L);
11987
+ ...V
11988
+ }, p.state.next(V);
11977
11989
  }
11978
11990
  }, T = async (h) => {
11979
- g(h, !0);
11980
- const w = await t.resolver(a, t.context, bb(h || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
11981
- return g(h), w;
11982
- }, V = async (h) => {
11983
- const { errors: w } = await T(h);
11991
+ m(h, !0);
11992
+ const x = await t.resolver(a, t.context, bb(h || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
11993
+ return m(h), x;
11994
+ }, z = async (h) => {
11995
+ const { errors: x } = await T(h);
11984
11996
  if (h)
11985
11997
  for (const D of h) {
11986
- const I = R(w, D);
11998
+ const I = R(x, D);
11987
11999
  I ? pe(n.errors, D, I) : Ae(n.errors, D);
11988
12000
  }
11989
12001
  else
11990
- n.errors = w;
11991
- return w;
11992
- }, z = async (h, w, D = {
12002
+ n.errors = x;
12003
+ return x;
12004
+ }, L = async (h, x, D = {
11993
12005
  valid: !0
11994
12006
  }) => {
11995
12007
  for (const I in h) {
11996
12008
  const F = h[I];
11997
12009
  if (F) {
11998
- const { _f: P, ...L } = F;
12010
+ const { _f: P, ...V } = F;
11999
12011
  if (P) {
12000
12012
  const ne = s.array.has(P.name), ue = F._f && xb(F._f);
12001
- ue && f.validatingFields && g([I], !0);
12002
- const Ce = await Hr(F, s.disabled, a, $, t.shouldUseNativeValidation && !w, ne);
12003
- if (ue && f.validatingFields && g([I]), Ce[P.name] && (D.valid = !1, w))
12013
+ ue && f.validatingFields && m([I], !0);
12014
+ const Ce = await Hr(F, s.disabled, a, M, t.shouldUseNativeValidation && !x, ne);
12015
+ if (ue && f.validatingFields && m([I]), Ce[P.name] && (D.valid = !1, x))
12004
12016
  break;
12005
- !w && (R(Ce, P.name) ? ne ? Os(n.errors, Ce, P.name) : pe(n.errors, P.name, Ce[P.name]) : Ae(n.errors, P.name));
12017
+ !x && (R(Ce, P.name) ? ne ? Os(n.errors, Ce, P.name) : pe(n.errors, P.name, Ce[P.name]) : Ae(n.errors, P.name));
12006
12018
  }
12007
- !Ve(L) && await z(L, w, D);
12019
+ !Ve(V) && await L(V, x, D);
12008
12020
  }
12009
12021
  }
12010
12022
  return D.valid;
12011
12023
  }, N = () => {
12012
12024
  for (const h of s.unMount) {
12013
- const w = R(r, h);
12014
- w && (w._f.refs ? w._f.refs.every((D) => !kr(D)) : !kr(w._f.ref)) && Se(h);
12025
+ const x = R(r, h);
12026
+ x && (x._f.refs ? x._f.refs.every((D) => !kr(D)) : !kr(x._f.ref)) && Se(h);
12015
12027
  }
12016
12028
  s.unMount = /* @__PURE__ */ new Set();
12017
- }, W = (h, w) => !t.disabled && (h && w && pe(a, h, w), !Tt(H(), o)), q = (h, w, D) => ws(h, s, {
12018
- ...i.mount ? a : xe(w) ? o : wt(h) ? { [h]: w } : w
12019
- }, D, w), Y = (h) => Pn(R(i.mount ? a : o, h, t.shouldUnregister ? R(o, h, []) : [])), B = (h, w, D = {}) => {
12029
+ }, W = (h, x) => !t.disabled && (h && x && pe(a, h, x), !Tt(H(), o)), U = (h, x, D) => ws(h, s, {
12030
+ ...i.mount ? a : xe(x) ? o : wt(h) ? { [h]: x } : x
12031
+ }, D, x), Y = (h) => Pn(R(i.mount ? a : o, h, t.shouldUnregister ? R(o, h, []) : [])), B = (h, x, D = {}) => {
12020
12032
  const I = R(r, h);
12021
- let F = w;
12033
+ let F = x;
12022
12034
  if (I) {
12023
12035
  const P = I._f;
12024
- P && (!P.disabled && pe(a, h, Ms(w, P)), F = Zn(P.ref) && Ge(w) ? "" : w, ks(P.ref) ? [...P.ref.options].forEach((L) => L.selected = F.includes(L.value)) : P.refs ? Tn(P.ref) ? P.refs.length > 1 ? P.refs.forEach((L) => (!L.defaultChecked || !L.disabled) && (L.checked = Array.isArray(F) ? !!F.find((ne) => ne === L.value) : F === L.value)) : P.refs[0] && (P.refs[0].checked = !!F) : P.refs.forEach((L) => L.checked = L.value === F) : po(P.ref) ? P.ref.value = "" : (P.ref.value = F, P.ref.type || p.state.next({
12036
+ P && (!P.disabled && pe(a, h, Ms(x, P)), F = Zn(P.ref) && Ge(x) ? "" : x, ks(P.ref) ? [...P.ref.options].forEach((V) => V.selected = F.includes(V.value)) : P.refs ? Tn(P.ref) ? P.refs.length > 1 ? P.refs.forEach((V) => (!V.defaultChecked || !V.disabled) && (V.checked = Array.isArray(F) ? !!F.find((ne) => ne === V.value) : F === V.value)) : P.refs[0] && (P.refs[0].checked = !!F) : P.refs.forEach((V) => V.checked = V.value === F) : po(P.ref) ? P.ref.value = "" : (P.ref.value = F, P.ref.type || p.state.next({
12025
12037
  name: h,
12026
12038
  values: Me(a)
12027
12039
  })));
12028
12040
  }
12029
- (D.shouldDirty || D.shouldTouch) && C(h, F, D.shouldTouch, D.shouldDirty, !0), D.shouldValidate && _(h);
12030
- }, Z = (h, w, D) => {
12031
- for (const I in w) {
12032
- const F = w[I], P = `${h}.${I}`, L = R(r, P);
12033
- (s.array.has(h) || je(F) || L && !L._f) && !zt(F) ? Z(P, F, D) : B(P, F, D);
12041
+ (D.shouldDirty || D.shouldTouch) && k(h, F, D.shouldTouch, D.shouldDirty, !0), D.shouldValidate && _(h);
12042
+ }, Z = (h, x, D) => {
12043
+ for (const I in x) {
12044
+ const F = x[I], P = `${h}.${I}`, V = R(r, P);
12045
+ (s.array.has(h) || je(F) || V && !V._f) && !zt(F) ? Z(P, F, D) : B(P, F, D);
12034
12046
  }
12035
- }, oe = (h, w, D = {}) => {
12036
- const I = R(r, h), F = s.array.has(h), P = Me(w);
12047
+ }, oe = (h, x, D = {}) => {
12048
+ const I = R(r, h), F = s.array.has(h), P = Me(x);
12037
12049
  pe(a, h, P), F ? (p.array.next({
12038
12050
  name: h,
12039
12051
  values: Me(a)
@@ -12047,16 +12059,16 @@ function Db(e = {}) {
12047
12059
  });
12048
12060
  }, te = async (h) => {
12049
12061
  i.mount = !0;
12050
- const w = h.target;
12051
- let D = w.name, I = !0;
12052
- const F = R(r, D), P = (L) => {
12053
- I = Number.isNaN(L) || zt(L) && isNaN(L.getTime()) || Tt(L, R(a, D, L));
12062
+ const x = h.target;
12063
+ let D = x.name, I = !0;
12064
+ const F = R(r, D), P = (V) => {
12065
+ I = Number.isNaN(V) || zt(V) && isNaN(V.getTime()) || Tt(V, R(a, D, V));
12054
12066
  };
12055
12067
  if (F) {
12056
- let L, ne;
12057
- const ue = w.type ? $a(F._f) : ms(h), Ce = h.type === Qn.BLUR || h.type === Qn.FOCUS_OUT, nt = !wb(F._f) && !t.resolver && !R(n.errors, D) && !F._f.deps || Sb(Ce, R(n.touchedFields, D), n.isSubmitted, x, v), Q = zr(D, s, Ce);
12068
+ let V, ne;
12069
+ const ue = x.type ? $a(F._f) : ms(h), Ce = h.type === Qn.BLUR || h.type === Qn.FOCUS_OUT, nt = !wb(F._f) && !t.resolver && !R(n.errors, D) && !F._f.deps || Sb(Ce, R(n.touchedFields, D), n.isSubmitted, w, v), Q = zr(D, s, Ce);
12058
12070
  pe(a, D, ue), Ce ? (F._f.onBlur && F._f.onBlur(h), c && c(0)) : F._f.onChange && F._f.onChange(h);
12059
- const de = C(D, ue, Ce), ce = !Ve(de) || Q;
12071
+ const de = k(D, ue, Ce), ce = !Ve(de) || Q;
12060
12072
  if (!Ce && p.state.next({
12061
12073
  name: D,
12062
12074
  type: h.type,
@@ -12067,64 +12079,64 @@ function Db(e = {}) {
12067
12079
  const { errors: qe } = await T([D]);
12068
12080
  if (P(ue), I) {
12069
12081
  const He = Da(n.errors, r, D), ut = Da(qe, r, He.name || D);
12070
- L = ut.error, D = ut.name, ne = Ve(qe);
12082
+ V = ut.error, D = ut.name, ne = Ve(qe);
12071
12083
  }
12072
12084
  } else
12073
- g([D], !0), L = (await Hr(F, s.disabled, a, $, t.shouldUseNativeValidation))[D], g([D]), P(ue), I && (L ? ne = !1 : (f.isValid || u.isValid) && (ne = await z(r, !0)));
12074
- I && (F._f.deps && _(F._f.deps), j(D, ne, L, de));
12085
+ m([D], !0), V = (await Hr(F, s.disabled, a, M, t.shouldUseNativeValidation))[D], m([D]), P(ue), I && (V ? ne = !1 : (f.isValid || u.isValid) && (ne = await L(r, !0)));
12086
+ I && (F._f.deps && _(F._f.deps), j(D, ne, V, de));
12075
12087
  }
12076
- }, O = (h, w) => {
12077
- if (R(n.errors, w) && h.focus)
12088
+ }, O = (h, x) => {
12089
+ if (R(n.errors, x) && h.focus)
12078
12090
  return h.focus(), 1;
12079
- }, _ = async (h, w = {}) => {
12091
+ }, _ = async (h, x = {}) => {
12080
12092
  let D, I;
12081
12093
  const F = Qe(h);
12082
12094
  if (t.resolver) {
12083
- const P = await V(xe(h) ? h : F);
12084
- D = Ve(P), I = h ? !F.some((L) => R(P, L)) : D;
12095
+ const P = await z(xe(h) ? h : F);
12096
+ D = Ve(P), I = h ? !F.some((V) => R(P, V)) : D;
12085
12097
  } else h ? (I = (await Promise.all(F.map(async (P) => {
12086
- const L = R(r, P);
12087
- return await z(L && L._f ? { [P]: L } : L);
12088
- }))).every(Boolean), !(!I && !n.isValid) && b()) : I = D = await z(r);
12098
+ const V = R(r, P);
12099
+ return await L(V && V._f ? { [P]: V } : V);
12100
+ }))).every(Boolean), !(!I && !n.isValid) && b()) : I = D = await L(r);
12089
12101
  return p.state.next({
12090
12102
  ...!wt(h) || (f.isValid || u.isValid) && D !== n.isValid ? {} : { name: h },
12091
12103
  ...t.resolver || !h ? { isValid: D } : {},
12092
12104
  errors: n.errors
12093
- }), w.shouldFocus && !I && nn(r, O, h ? F : s.mount), I;
12105
+ }), x.shouldFocus && !I && nn(r, O, h ? F : s.mount), I;
12094
12106
  }, H = (h) => {
12095
- const w = {
12107
+ const x = {
12096
12108
  ...i.mount ? a : o
12097
12109
  };
12098
- return xe(h) ? w : wt(h) ? R(w, h) : h.map((D) => R(w, D));
12099
- }, G = (h, w) => ({
12100
- invalid: !!R((w || n).errors, h),
12101
- isDirty: !!R((w || n).dirtyFields, h),
12102
- error: R((w || n).errors, h),
12110
+ return xe(h) ? x : wt(h) ? R(x, h) : h.map((D) => R(x, D));
12111
+ }, G = (h, x) => ({
12112
+ invalid: !!R((x || n).errors, h),
12113
+ isDirty: !!R((x || n).dirtyFields, h),
12114
+ error: R((x || n).errors, h),
12103
12115
  isValidating: !!R(n.validatingFields, h),
12104
- isTouched: !!R((w || n).touchedFields, h)
12116
+ isTouched: !!R((x || n).touchedFields, h)
12105
12117
  }), le = (h) => {
12106
- h && Qe(h).forEach((w) => Ae(n.errors, w)), p.state.next({
12118
+ h && Qe(h).forEach((x) => Ae(n.errors, x)), p.state.next({
12107
12119
  errors: h ? n.errors : {}
12108
12120
  });
12109
- }, se = (h, w, D) => {
12110
- const I = (R(r, h, { _f: {} })._f || {}).ref, F = R(n.errors, h) || {}, { ref: P, message: L, type: ne, ...ue } = F;
12121
+ }, se = (h, x, D) => {
12122
+ const I = (R(r, h, { _f: {} })._f || {}).ref, F = R(n.errors, h) || {}, { ref: P, message: V, type: ne, ...ue } = F;
12111
12123
  pe(n.errors, h, {
12112
12124
  ...ue,
12113
- ...w,
12125
+ ...x,
12114
12126
  ref: I
12115
12127
  }), p.state.next({
12116
12128
  name: h,
12117
12129
  errors: n.errors,
12118
12130
  isValid: !1
12119
12131
  }), D && D.shouldFocus && I && I.focus && I.focus();
12120
- }, re = (h, w) => pt(h) ? p.state.subscribe({
12121
- next: (D) => h(q(void 0, w), D)
12122
- }) : q(h, w, !0), we = (h) => p.state.subscribe({
12123
- next: (w) => {
12124
- Cb(h.name, w.name, h.exact) && kb(w, h.formState || f, ie, h.reRenderRoot) && h.callback({
12132
+ }, re = (h, x) => pt(h) ? p.state.subscribe({
12133
+ next: (D) => h(U(void 0, x), D)
12134
+ }) : U(h, x, !0), we = (h) => p.state.subscribe({
12135
+ next: (x) => {
12136
+ Cb(h.name, x.name, h.exact) && kb(x, h.formState || f, ie, h.reRenderRoot) && h.callback({
12125
12137
  values: { ...a },
12126
12138
  ...n,
12127
- ...w
12139
+ ...x
12128
12140
  });
12129
12141
  }
12130
12142
  }).unsubscribe, ae = (h) => (i.mount = !0, u = {
@@ -12133,54 +12145,54 @@ function Db(e = {}) {
12133
12145
  }, we({
12134
12146
  ...h,
12135
12147
  formState: u
12136
- })), Se = (h, w = {}) => {
12148
+ })), Se = (h, x = {}) => {
12137
12149
  for (const D of h ? Qe(h) : s.mount)
12138
- s.mount.delete(D), s.array.delete(D), w.keepValue || (Ae(r, D), Ae(a, D)), !w.keepError && Ae(n.errors, D), !w.keepDirty && Ae(n.dirtyFields, D), !w.keepTouched && Ae(n.touchedFields, D), !w.keepIsValidating && Ae(n.validatingFields, D), !t.shouldUnregister && !w.keepDefaultValue && Ae(o, D);
12150
+ s.mount.delete(D), s.array.delete(D), x.keepValue || (Ae(r, D), Ae(a, D)), !x.keepError && Ae(n.errors, D), !x.keepDirty && Ae(n.dirtyFields, D), !x.keepTouched && Ae(n.touchedFields, D), !x.keepIsValidating && Ae(n.validatingFields, D), !t.shouldUnregister && !x.keepDefaultValue && Ae(o, D);
12139
12151
  p.state.next({
12140
12152
  values: Me(a)
12141
12153
  }), p.state.next({
12142
12154
  ...n,
12143
- ...w.keepDirty ? { isDirty: W() } : {}
12144
- }), !w.keepIsValid && b();
12145
- }, Ee = ({ disabled: h, name: w }) => {
12146
- (et(h) && i.mount || h || s.disabled.has(w)) && (h ? s.disabled.add(w) : s.disabled.delete(w));
12147
- }, Ue = (h, w = {}) => {
12155
+ ...x.keepDirty ? { isDirty: W() } : {}
12156
+ }), !x.keepIsValid && b();
12157
+ }, Ee = ({ disabled: h, name: x }) => {
12158
+ (et(h) && i.mount || h || s.disabled.has(x)) && (h ? s.disabled.add(x) : s.disabled.delete(x));
12159
+ }, Ue = (h, x = {}) => {
12148
12160
  let D = R(r, h);
12149
- const I = et(w.disabled) || et(t.disabled);
12161
+ const I = et(x.disabled) || et(t.disabled);
12150
12162
  return pe(r, h, {
12151
12163
  ...D || {},
12152
12164
  _f: {
12153
12165
  ...D && D._f ? D._f : { ref: { name: h } },
12154
12166
  name: h,
12155
12167
  mount: !0,
12156
- ...w
12168
+ ...x
12157
12169
  }
12158
12170
  }), s.mount.add(h), D ? Ee({
12159
- disabled: et(w.disabled) ? w.disabled : t.disabled,
12171
+ disabled: et(x.disabled) ? x.disabled : t.disabled,
12160
12172
  name: h
12161
- }) : M(h, !0, w.value), {
12162
- ...I ? { disabled: w.disabled || t.disabled } : {},
12173
+ }) : S(h, !0, x.value), {
12174
+ ...I ? { disabled: x.disabled || t.disabled } : {},
12163
12175
  ...t.progressive ? {
12164
- required: !!w.required,
12165
- min: pn(w.min),
12166
- max: pn(w.max),
12167
- minLength: pn(w.minLength),
12168
- maxLength: pn(w.maxLength),
12169
- pattern: pn(w.pattern)
12176
+ required: !!x.required,
12177
+ min: pn(x.min),
12178
+ max: pn(x.max),
12179
+ minLength: pn(x.minLength),
12180
+ maxLength: pn(x.maxLength),
12181
+ pattern: pn(x.pattern)
12170
12182
  } : {},
12171
12183
  name: h,
12172
12184
  onChange: te,
12173
12185
  onBlur: te,
12174
12186
  ref: (F) => {
12175
12187
  if (F) {
12176
- Ue(h, w), D = R(r, h);
12177
- const P = xe(F.value) && F.querySelectorAll && F.querySelectorAll("input,select,textarea")[0] || F, L = mb(P), ne = D._f.refs || [];
12178
- if (L ? ne.find((ue) => ue === P) : P === D._f.ref)
12188
+ Ue(h, x), D = R(r, h);
12189
+ const P = xe(F.value) && F.querySelectorAll && F.querySelectorAll("input,select,textarea")[0] || F, V = mb(P), ne = D._f.refs || [];
12190
+ if (V ? ne.find((ue) => ue === P) : P === D._f.ref)
12179
12191
  return;
12180
12192
  pe(r, h, {
12181
12193
  _f: {
12182
12194
  ...D._f,
12183
- ...L ? {
12195
+ ...V ? {
12184
12196
  refs: [
12185
12197
  ...ne.filter(kr),
12186
12198
  P,
@@ -12189,29 +12201,29 @@ function Db(e = {}) {
12189
12201
  ref: { type: P.type, name: h }
12190
12202
  } : { ref: P }
12191
12203
  }
12192
- }), M(h, !1, void 0, P);
12204
+ }), S(h, !1, void 0, P);
12193
12205
  } else
12194
- D = R(r, h, {}), D._f && (D._f.mount = !1), (t.shouldUnregister || w.shouldUnregister) && !(ys(s.array, h) && i.action) && s.unMount.add(h);
12206
+ D = R(r, h, {}), D._f && (D._f.mount = !1), (t.shouldUnregister || x.shouldUnregister) && !(ys(s.array, h) && i.action) && s.unMount.add(h);
12195
12207
  }
12196
12208
  };
12197
12209
  }, lt = () => t.shouldFocusError && nn(r, O, s.mount), Wt = (h) => {
12198
- et(h) && (p.state.next({ disabled: h }), nn(r, (w, D) => {
12210
+ et(h) && (p.state.next({ disabled: h }), nn(r, (x, D) => {
12199
12211
  const I = R(r, D);
12200
- I && (w.disabled = I._f.disabled || h, Array.isArray(I._f.refs) && I._f.refs.forEach((F) => {
12212
+ I && (x.disabled = I._f.disabled || h, Array.isArray(I._f.refs) && I._f.refs.forEach((F) => {
12201
12213
  F.disabled = I._f.disabled || h;
12202
12214
  }));
12203
12215
  }, 0, !1));
12204
- }, U = (h, w) => async (D) => {
12216
+ }, q = (h, x) => async (D) => {
12205
12217
  let I;
12206
12218
  D && (D.preventDefault && D.preventDefault(), D.persist && D.persist());
12207
12219
  let F = Me(a);
12208
12220
  if (p.state.next({
12209
12221
  isSubmitting: !0
12210
12222
  }), t.resolver) {
12211
- const { errors: P, values: L } = await T();
12212
- n.errors = P, F = L;
12223
+ const { errors: P, values: V } = await T();
12224
+ n.errors = P, F = V;
12213
12225
  } else
12214
- await z(r);
12226
+ await L(r);
12215
12227
  if (s.disabled.size)
12216
12228
  for (const P of s.disabled)
12217
12229
  pe(F, P, void 0);
@@ -12225,7 +12237,7 @@ function Db(e = {}) {
12225
12237
  I = P;
12226
12238
  }
12227
12239
  } else
12228
- w && await w({ ...n.errors }, D), lt(), setTimeout(lt);
12240
+ x && await x({ ...n.errors }, D), lt(), setTimeout(lt);
12229
12241
  if (p.state.next({
12230
12242
  isSubmitted: !0,
12231
12243
  isSubmitting: !1,
@@ -12234,22 +12246,22 @@ function Db(e = {}) {
12234
12246
  errors: n.errors
12235
12247
  }), I)
12236
12248
  throw I;
12237
- }, J = (h, w = {}) => {
12238
- R(r, h) && (xe(w.defaultValue) ? oe(h, Me(R(o, h))) : (oe(h, w.defaultValue), pe(o, h, Me(w.defaultValue))), w.keepTouched || Ae(n.touchedFields, h), w.keepDirty || (Ae(n.dirtyFields, h), n.isDirty = w.defaultValue ? W(h, Me(R(o, h))) : W()), w.keepError || (Ae(n.errors, h), f.isValid && b()), p.state.next({ ...n }));
12239
- }, $e = (h, w = {}) => {
12249
+ }, J = (h, x = {}) => {
12250
+ R(r, h) && (xe(x.defaultValue) ? oe(h, Me(R(o, h))) : (oe(h, x.defaultValue), pe(o, h, Me(x.defaultValue))), x.keepTouched || Ae(n.touchedFields, h), x.keepDirty || (Ae(n.dirtyFields, h), n.isDirty = x.defaultValue ? W(h, Me(R(o, h))) : W()), x.keepError || (Ae(n.errors, h), f.isValid && b()), p.state.next({ ...n }));
12251
+ }, $e = (h, x = {}) => {
12240
12252
  const D = h ? Me(h) : o, I = Me(D), F = Ve(h), P = F ? o : I;
12241
- if (w.keepDefaultValues || (o = D), !w.keepValues) {
12242
- if (w.keepDirtyValues) {
12243
- const L = /* @__PURE__ */ new Set([
12253
+ if (x.keepDefaultValues || (o = D), !x.keepValues) {
12254
+ if (x.keepDirtyValues) {
12255
+ const V = /* @__PURE__ */ new Set([
12244
12256
  ...s.mount,
12245
12257
  ...Object.keys(fn(o, a))
12246
12258
  ]);
12247
- for (const ne of Array.from(L))
12259
+ for (const ne of Array.from(V))
12248
12260
  R(n.dirtyFields, ne) ? pe(P, ne, R(a, ne)) : oe(ne, R(P, ne));
12249
12261
  } else {
12250
12262
  if (co && xe(h))
12251
- for (const L of s.mount) {
12252
- const ne = R(r, L);
12263
+ for (const V of s.mount) {
12264
+ const ne = R(r, V);
12253
12265
  if (ne && ne._f) {
12254
12266
  const ue = Array.isArray(ne._f.refs) ? ne._f.refs[0] : ne._f.ref;
12255
12267
  if (Zn(ue)) {
@@ -12261,8 +12273,8 @@ function Db(e = {}) {
12261
12273
  }
12262
12274
  }
12263
12275
  }
12264
- for (const L of s.mount)
12265
- oe(L, R(P, L));
12276
+ for (const V of s.mount)
12277
+ oe(V, R(P, V));
12266
12278
  }
12267
12279
  a = Me(P), p.array.next({
12268
12280
  values: { ...P }
@@ -12271,28 +12283,28 @@ function Db(e = {}) {
12271
12283
  });
12272
12284
  }
12273
12285
  s = {
12274
- mount: w.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
12286
+ mount: x.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
12275
12287
  unMount: /* @__PURE__ */ new Set(),
12276
12288
  array: /* @__PURE__ */ new Set(),
12277
12289
  disabled: /* @__PURE__ */ new Set(),
12278
12290
  watch: /* @__PURE__ */ new Set(),
12279
12291
  watchAll: !1,
12280
12292
  focus: ""
12281
- }, i.mount = !f.isValid || !!w.keepIsValid || !!w.keepDirtyValues, i.watch = !!t.shouldUnregister, p.state.next({
12282
- submitCount: w.keepSubmitCount ? n.submitCount : 0,
12283
- isDirty: F ? !1 : w.keepDirty ? n.isDirty : !!(w.keepDefaultValues && !Tt(h, o)),
12284
- isSubmitted: w.keepIsSubmitted ? n.isSubmitted : !1,
12285
- dirtyFields: F ? {} : w.keepDirtyValues ? w.keepDefaultValues && a ? fn(o, a) : n.dirtyFields : w.keepDefaultValues && h ? fn(o, h) : w.keepDirty ? n.dirtyFields : {},
12286
- touchedFields: w.keepTouched ? n.touchedFields : {},
12287
- errors: w.keepErrors ? n.errors : {},
12288
- isSubmitSuccessful: w.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
12293
+ }, i.mount = !f.isValid || !!x.keepIsValid || !!x.keepDirtyValues, i.watch = !!t.shouldUnregister, p.state.next({
12294
+ submitCount: x.keepSubmitCount ? n.submitCount : 0,
12295
+ isDirty: F ? !1 : x.keepDirty ? n.isDirty : !!(x.keepDefaultValues && !Tt(h, o)),
12296
+ isSubmitted: x.keepIsSubmitted ? n.isSubmitted : !1,
12297
+ dirtyFields: F ? {} : x.keepDirtyValues ? x.keepDefaultValues && a ? fn(o, a) : n.dirtyFields : x.keepDefaultValues && h ? fn(o, h) : x.keepDirty ? n.dirtyFields : {},
12298
+ touchedFields: x.keepTouched ? n.touchedFields : {},
12299
+ errors: x.keepErrors ? n.errors : {},
12300
+ isSubmitSuccessful: x.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
12289
12301
  isSubmitting: !1
12290
12302
  });
12291
- }, ke = (h, w) => $e(pt(h) ? h(a) : h, w), Ne = (h, w = {}) => {
12303
+ }, ke = (h, x) => $e(pt(h) ? h(a) : h, x), Ne = (h, x = {}) => {
12292
12304
  const D = R(r, h), I = D && D._f;
12293
12305
  if (I) {
12294
12306
  const F = I.refs ? I.refs[0] : I.ref;
12295
- F.focus && (F.focus(), w.shouldSelect && pt(F.select) && F.select());
12307
+ F.focus && (F.focus(), x.shouldSelect && pt(F.select) && F.select());
12296
12308
  }
12297
12309
  }, ie = (h) => {
12298
12310
  n = {
@@ -12304,14 +12316,14 @@ function Db(e = {}) {
12304
12316
  register: Ue,
12305
12317
  unregister: Se,
12306
12318
  getFieldState: G,
12307
- handleSubmit: U,
12319
+ handleSubmit: q,
12308
12320
  setError: se,
12309
12321
  _subscribe: we,
12310
12322
  _runSchema: T,
12311
- _getWatch: q,
12323
+ _getWatch: U,
12312
12324
  _getDirty: W,
12313
12325
  _setValid: b,
12314
- _setFieldArray: S,
12326
+ _setFieldArray: $,
12315
12327
  _setDisabledField: Ee,
12316
12328
  _setErrors: E,
12317
12329
  _getFieldArray: Y,
@@ -12362,7 +12374,7 @@ function Db(e = {}) {
12362
12374
  subscribe: ae,
12363
12375
  trigger: _,
12364
12376
  register: Ue,
12365
- handleSubmit: U,
12377
+ handleSubmit: q,
12366
12378
  watch: re,
12367
12379
  setValue: oe,
12368
12380
  getValues: H,
@@ -12412,107 +12424,107 @@ var Er = (e, t) => xe(t) ? [] : Ob(e, Qe(t).sort((n, r) => n - r)), jr = (e, t,
12412
12424
  [e[t], e[n]] = [e[n], e[t]];
12413
12425
  }, Ea = (e, t, n) => (e[t] = n, e);
12414
12426
  function Mx(e) {
12415
- const t = An(), { control: n = t.control, name: r, keyName: o = "id", shouldUnregister: a, rules: i } = e, [s, c] = m.useState(n._getFieldArray(r)), d = m.useRef(n._getFieldArray(r).map(jt)), f = m.useRef(s), u = m.useRef(r), p = m.useRef(!1);
12416
- u.current = r, f.current = s, n._names.array.add(r), i && n.register(r, i), m.useEffect(() => n._subjects.array.subscribe({
12417
- next: ({ values: M, name: C }) => {
12418
- if (C === u.current || !C) {
12419
- const j = R(M, u.current);
12427
+ const t = An(), { control: n = t.control, name: r, keyName: o = "id", shouldUnregister: a, rules: i } = e, [s, c] = g.useState(n._getFieldArray(r)), d = g.useRef(n._getFieldArray(r).map(jt)), f = g.useRef(s), u = g.useRef(r), p = g.useRef(!1);
12428
+ u.current = r, f.current = s, n._names.array.add(r), i && n.register(r, i), g.useEffect(() => n._subjects.array.subscribe({
12429
+ next: ({ values: S, name: k }) => {
12430
+ if (k === u.current || !k) {
12431
+ const j = R(S, u.current);
12420
12432
  Array.isArray(j) && (c(j), d.current = j.map(jt));
12421
12433
  }
12422
12434
  }
12423
12435
  }).unsubscribe, [n]);
12424
- const v = m.useCallback((M) => {
12425
- p.current = !0, n._setFieldArray(r, M);
12426
- }, [n, r]), x = (M, C) => {
12427
- const j = Qe(Me(M)), T = Sr(n._getFieldArray(r), j);
12428
- n._names.focus = Cr(r, T.length - 1, C), d.current = Sr(d.current, j.map(jt)), v(T), c(T), n._setFieldArray(r, T, Sr, {
12429
- argA: $r(M)
12436
+ const v = g.useCallback((S) => {
12437
+ p.current = !0, n._setFieldArray(r, S);
12438
+ }, [n, r]), w = (S, k) => {
12439
+ const j = Qe(Me(S)), T = Sr(n._getFieldArray(r), j);
12440
+ n._names.focus = Cr(r, T.length - 1, k), d.current = Sr(d.current, j.map(jt)), v(T), c(T), n._setFieldArray(r, T, Sr, {
12441
+ argA: $r(S)
12430
12442
  });
12431
- }, $ = (M, C) => {
12432
- const j = Qe(Me(M)), T = Or(n._getFieldArray(r), j);
12433
- n._names.focus = Cr(r, 0, C), d.current = Or(d.current, j.map(jt)), v(T), c(T), n._setFieldArray(r, T, Or, {
12434
- argA: $r(M)
12443
+ }, M = (S, k) => {
12444
+ const j = Qe(Me(S)), T = Or(n._getFieldArray(r), j);
12445
+ n._names.focus = Cr(r, 0, k), d.current = Or(d.current, j.map(jt)), v(T), c(T), n._setFieldArray(r, T, Or, {
12446
+ argA: $r(S)
12435
12447
  });
12436
- }, k = (M) => {
12437
- const C = Er(n._getFieldArray(r), M);
12438
- d.current = Er(d.current, M), v(C), c(C), !Array.isArray(R(n._fields, r)) && pe(n._fields, r, void 0), n._setFieldArray(r, C, Er, {
12439
- argA: M
12448
+ }, C = (S) => {
12449
+ const k = Er(n._getFieldArray(r), S);
12450
+ d.current = Er(d.current, S), v(k), c(k), !Array.isArray(R(n._fields, r)) && pe(n._fields, r, void 0), n._setFieldArray(r, k, Er, {
12451
+ argA: S
12440
12452
  });
12441
- }, b = (M, C, j) => {
12442
- const T = Qe(Me(C)), V = Mr(n._getFieldArray(r), M, T);
12443
- n._names.focus = Cr(r, M, j), d.current = Mr(d.current, M, T.map(jt)), v(V), c(V), n._setFieldArray(r, V, Mr, {
12444
- argA: M,
12445
- argB: $r(C)
12453
+ }, b = (S, k, j) => {
12454
+ const T = Qe(Me(k)), z = Mr(n._getFieldArray(r), S, T);
12455
+ n._names.focus = Cr(r, S, j), d.current = Mr(d.current, S, T.map(jt)), v(z), c(z), n._setFieldArray(r, z, Mr, {
12456
+ argA: S,
12457
+ argB: $r(k)
12446
12458
  });
12447
- }, g = (M, C) => {
12459
+ }, m = (S, k) => {
12448
12460
  const j = n._getFieldArray(r);
12449
- jr(j, M, C), jr(d.current, M, C), v(j), c(j), n._setFieldArray(r, j, jr, {
12450
- argA: M,
12451
- argB: C
12461
+ jr(j, S, k), jr(d.current, S, k), v(j), c(j), n._setFieldArray(r, j, jr, {
12462
+ argA: S,
12463
+ argB: k
12452
12464
  }, !1);
12453
- }, S = (M, C) => {
12465
+ }, $ = (S, k) => {
12454
12466
  const j = n._getFieldArray(r);
12455
- Dr(j, M, C), Dr(d.current, M, C), v(j), c(j), n._setFieldArray(r, j, Dr, {
12456
- argA: M,
12457
- argB: C
12467
+ Dr(j, S, k), Dr(d.current, S, k), v(j), c(j), n._setFieldArray(r, j, Dr, {
12468
+ argA: S,
12469
+ argB: k
12458
12470
  }, !1);
12459
- }, A = (M, C) => {
12460
- const j = Me(C), T = Ea(n._getFieldArray(r), M, j);
12461
- d.current = [...T].map((V, z) => !V || z === M ? jt() : d.current[z]), v(T), c([...T]), n._setFieldArray(r, T, Ea, {
12462
- argA: M,
12471
+ }, A = (S, k) => {
12472
+ const j = Me(k), T = Ea(n._getFieldArray(r), S, j);
12473
+ d.current = [...T].map((z, L) => !z || L === S ? jt() : d.current[L]), v(T), c([...T]), n._setFieldArray(r, T, Ea, {
12474
+ argA: S,
12463
12475
  argB: j
12464
12476
  }, !0, !1);
12465
- }, E = (M) => {
12466
- const C = Qe(Me(M));
12467
- d.current = C.map(jt), v([...C]), c([...C]), n._setFieldArray(r, [...C], (j) => j, {}, !0, !1);
12477
+ }, E = (S) => {
12478
+ const k = Qe(Me(S));
12479
+ d.current = k.map(jt), v([...k]), c([...k]), n._setFieldArray(r, [...k], (j) => j, {}, !0, !1);
12468
12480
  };
12469
- return m.useEffect(() => {
12481
+ return g.useEffect(() => {
12470
12482
  if (n._state.action = !1, zr(r, n._names) && n._subjects.state.next({
12471
12483
  ...n._formState
12472
12484
  }), p.current && (!en(n._options.mode).isOnSubmit || n._formState.isSubmitted) && !en(n._options.reValidateMode).isOnSubmit)
12473
12485
  if (n._options.resolver)
12474
- n._runSchema([r]).then((M) => {
12475
- const C = R(M.errors, r), j = R(n._formState.errors, r);
12476
- (j ? !C && j.type || C && (j.type !== C.type || j.message !== C.message) : C && C.type) && (C ? pe(n._formState.errors, r, C) : Ae(n._formState.errors, r), n._subjects.state.next({
12486
+ n._runSchema([r]).then((S) => {
12487
+ const k = R(S.errors, r), j = R(n._formState.errors, r);
12488
+ (j ? !k && j.type || k && (j.type !== k.type || j.message !== k.message) : k && k.type) && (k ? pe(n._formState.errors, r, k) : Ae(n._formState.errors, r), n._subjects.state.next({
12477
12489
  errors: n._formState.errors
12478
12490
  }));
12479
12491
  });
12480
12492
  else {
12481
- const M = R(n._fields, r);
12482
- M && M._f && !(en(n._options.reValidateMode).isOnSubmit && en(n._options.mode).isOnSubmit) && Hr(M, n._names.disabled, n._formValues, n._options.criteriaMode === at.all, n._options.shouldUseNativeValidation, !0).then((C) => !Ve(C) && n._subjects.state.next({
12483
- errors: Os(n._formState.errors, C, r)
12493
+ const S = R(n._fields, r);
12494
+ S && S._f && !(en(n._options.reValidateMode).isOnSubmit && en(n._options.mode).isOnSubmit) && Hr(S, n._names.disabled, n._formValues, n._options.criteriaMode === at.all, n._options.shouldUseNativeValidation, !0).then((k) => !Ve(k) && n._subjects.state.next({
12495
+ errors: Os(n._formState.errors, k, r)
12484
12496
  }));
12485
12497
  }
12486
12498
  n._subjects.state.next({
12487
12499
  name: r,
12488
12500
  values: Me(n._formValues)
12489
- }), n._names.focus && nn(n._fields, (M, C) => {
12490
- if (n._names.focus && C.startsWith(n._names.focus) && M.focus)
12491
- return M.focus(), 1;
12501
+ }), n._names.focus && nn(n._fields, (S, k) => {
12502
+ if (n._names.focus && k.startsWith(n._names.focus) && S.focus)
12503
+ return S.focus(), 1;
12492
12504
  }), n._names.focus = "", n._setValid(), p.current = !1;
12493
- }, [s, r, n]), m.useEffect(() => (!R(n._formValues, r) && n._setFieldArray(r), () => {
12494
- const M = (C, j) => {
12495
- const T = R(n._fields, C);
12505
+ }, [s, r, n]), g.useEffect(() => (!R(n._formValues, r) && n._setFieldArray(r), () => {
12506
+ const S = (k, j) => {
12507
+ const T = R(n._fields, k);
12496
12508
  T && T._f && (T._f.mount = j);
12497
12509
  };
12498
- n._options.shouldUnregister || a ? n.unregister(r) : M(r, !1);
12510
+ n._options.shouldUnregister || a ? n.unregister(r) : S(r, !1);
12499
12511
  }), [r, n, o, a]), {
12500
- swap: m.useCallback(g, [v, r, n]),
12501
- move: m.useCallback(S, [v, r, n]),
12502
- prepend: m.useCallback($, [v, r, n]),
12503
- append: m.useCallback(x, [v, r, n]),
12504
- remove: m.useCallback(k, [v, r, n]),
12505
- insert: m.useCallback(b, [v, r, n]),
12506
- update: m.useCallback(A, [v, r, n]),
12507
- replace: m.useCallback(E, [v, r, n]),
12508
- fields: m.useMemo(() => s.map((M, C) => ({
12509
- ...M,
12510
- [o]: d.current[C] || jt()
12512
+ swap: g.useCallback(m, [v, r, n]),
12513
+ move: g.useCallback($, [v, r, n]),
12514
+ prepend: g.useCallback(M, [v, r, n]),
12515
+ append: g.useCallback(w, [v, r, n]),
12516
+ remove: g.useCallback(C, [v, r, n]),
12517
+ insert: g.useCallback(b, [v, r, n]),
12518
+ update: g.useCallback(A, [v, r, n]),
12519
+ replace: g.useCallback(E, [v, r, n]),
12520
+ fields: g.useMemo(() => s.map((S, k) => ({
12521
+ ...S,
12522
+ [o]: d.current[k] || jt()
12511
12523
  })), [s, o])
12512
12524
  };
12513
12525
  }
12514
12526
  function Eb(e = {}) {
12515
- const t = m.useRef(void 0), n = m.useRef(void 0), [r, o] = m.useState({
12527
+ const t = g.useRef(void 0), n = g.useRef(void 0), [r, o] = g.useState({
12516
12528
  isDirty: !1,
12517
12529
  isValidating: !1,
12518
12530
  isLoading: pt(e.defaultValues),
@@ -12544,22 +12556,22 @@ function Eb(e = {}) {
12544
12556
  ...s,
12545
12557
  isReady: !0
12546
12558
  })), a._formState.isReady = !0, i;
12547
- }, [a]), m.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), m.useEffect(() => {
12559
+ }, [a]), g.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), g.useEffect(() => {
12548
12560
  e.mode && (a._options.mode = e.mode), e.reValidateMode && (a._options.reValidateMode = e.reValidateMode), e.errors && !Ve(e.errors) && a._setErrors(e.errors);
12549
- }, [a, e.errors, e.mode, e.reValidateMode]), m.useEffect(() => {
12561
+ }, [a, e.errors, e.mode, e.reValidateMode]), g.useEffect(() => {
12550
12562
  e.shouldUnregister && a._subjects.state.next({
12551
12563
  values: a._getWatch()
12552
12564
  });
12553
- }, [a, e.shouldUnregister]), m.useEffect(() => {
12565
+ }, [a, e.shouldUnregister]), g.useEffect(() => {
12554
12566
  if (a._proxyFormState.isDirty) {
12555
12567
  const i = a._getDirty();
12556
12568
  i !== r.isDirty && a._subjects.state.next({
12557
12569
  isDirty: i
12558
12570
  });
12559
12571
  }
12560
- }, [a, r.isDirty]), m.useEffect(() => {
12572
+ }, [a, r.isDirty]), g.useEffect(() => {
12561
12573
  e.values && !Tt(e.values, n.current) ? (a._reset(e.values, a._options.resetOptions), n.current = e.values, o((i) => ({ ...i }))) : a._resetDefaultValues();
12562
- }, [a, e.values]), m.useEffect(() => {
12574
+ }, [a, e.values]), g.useEffect(() => {
12563
12575
  a._state.mount || (a._setValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted();
12564
12576
  }), t.current.formState = xs(r, a), t.current;
12565
12577
  }