@max-ts/components 1.4.2 → 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
@@ -52,145 +52,145 @@ var ln = {};
52
52
  var $o;
53
53
  function Kl() {
54
54
  return $o || ($o = 1, process.env.NODE_ENV !== "production" && function() {
55
- function e(E) {
56
- if (E == null) return null;
57
- if (typeof E == "function")
58
- return E.$$typeof === L ? null : E.displayName || E.name || null;
59
- if (typeof E == "string") return E;
60
- switch (E) {
61
- case S:
55
+ function e(O) {
56
+ if (O == null) return null;
57
+ if (typeof O == "function")
58
+ return O.$$typeof === z ? null : O.displayName || O.name || null;
59
+ if (typeof O == "string") return O;
60
+ switch (O) {
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
- case O:
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";
73
73
  }
74
- if (typeof E == "object")
75
- switch (typeof E.tag == "number" && console.error(
74
+ if (typeof O == "object")
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
- ), E.$$typeof) {
78
- case x:
77
+ ), O.$$typeof) {
78
+ case w:
79
79
  return "Portal";
80
80
  case $:
81
- return (E.displayName || "Context") + ".Provider";
81
+ return (O.displayName || "Context") + ".Provider";
82
82
  case m:
83
- return (E._context.displayName || "Context") + ".Consumer";
84
- case j:
85
- var _ = E.render;
86
- return E = E.displayName, E || (E = _.displayName || _.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
87
- case C:
88
- return _ = E.displayName || null, _ !== null ? _ : e(E.type) || "Memo";
83
+ return (O._context.displayName || "Context") + ".Consumer";
89
84
  case A:
90
- _ = E._payload, E = E._init;
85
+ var _ = O.render;
86
+ return O = O.displayName, O || (O = _.displayName || _.name || "", O = O !== "" ? "ForwardRef(" + O + ")" : "ForwardRef"), O;
87
+ case k:
88
+ return _ = O.displayName || null, _ !== null ? _ : e(O.type) || "Memo";
89
+ case j:
90
+ _ = O._payload, O = O._init;
91
91
  try {
92
- return e(E(_));
92
+ return e(O(_));
93
93
  } catch {
94
94
  }
95
95
  }
96
96
  return null;
97
97
  }
98
- function t(E) {
99
- return "" + E;
98
+ function t(O) {
99
+ return "" + O;
100
100
  }
101
- function n(E) {
101
+ function n(O) {
102
102
  try {
103
- t(E);
103
+ t(O);
104
104
  var _ = !1;
105
105
  } catch {
106
106
  _ = !0;
107
107
  }
108
108
  if (_) {
109
109
  _ = console;
110
- var H = _.error, G = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
110
+ var H = _.error, G = typeof Symbol == "function" && Symbol.toStringTag && O[Symbol.toStringTag] || O.constructor.name || "Object";
111
111
  return H.call(
112
112
  _,
113
113
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
114
114
  G
115
- ), t(E);
115
+ ), t(O);
116
116
  }
117
117
  }
118
- function r(E) {
119
- if (E === S) return "<>";
120
- if (typeof E == "object" && E !== null && E.$$typeof === A)
118
+ function r(O) {
119
+ if (O === M) return "<>";
120
+ if (typeof O == "object" && O !== null && O.$$typeof === j)
121
121
  return "<...>";
122
122
  try {
123
- var _ = e(E);
123
+ var _ = e(O);
124
124
  return _ ? "<" + _ + ">" : "<...>";
125
125
  } catch {
126
126
  return "<...>";
127
127
  }
128
128
  }
129
129
  function o() {
130
- var E = z.A;
131
- return E === null ? null : E.getOwner();
130
+ var O = L.A;
131
+ return O === null ? null : O.getOwner();
132
132
  }
133
133
  function a() {
134
134
  return Error("react-stack-top-frame");
135
135
  }
136
- function i(E) {
137
- if (N.call(E, "key")) {
138
- var _ = Object.getOwnPropertyDescriptor(E, "key").get;
136
+ function i(O) {
137
+ if (N.call(O, "key")) {
138
+ var _ = Object.getOwnPropertyDescriptor(O, "key").get;
139
139
  if (_ && _.isReactWarning) return !1;
140
140
  }
141
- return E.key !== void 0;
141
+ return O.key !== void 0;
142
142
  }
143
- function s(E, _) {
143
+ function s(O, _) {
144
144
  function H() {
145
145
  Y || (Y = !0, console.error(
146
146
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
147
147
  _
148
148
  ));
149
149
  }
150
- H.isReactWarning = !0, Object.defineProperty(E, "key", {
150
+ H.isReactWarning = !0, Object.defineProperty(O, "key", {
151
151
  get: H,
152
152
  configurable: !0
153
153
  });
154
154
  }
155
155
  function c() {
156
- var E = e(this.type);
157
- return B[E] || (B[E] = !0, console.error(
156
+ var O = e(this.type);
157
+ return B[O] || (B[O] = !0, console.error(
158
158
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
159
- )), E = this.props.ref, E !== void 0 ? E : null;
159
+ )), O = this.props.ref, O !== void 0 ? O : null;
160
160
  }
161
- function d(E, _, H, G, le, se, re, we) {
162
- return H = se.ref, E = {
161
+ function d(O, _, H, G, le, se, re, we) {
162
+ return H = se.ref, O = {
163
163
  $$typeof: v,
164
- type: E,
164
+ type: O,
165
165
  key: _,
166
166
  props: se,
167
167
  _owner: le
168
- }, (H !== void 0 ? H : null) !== null ? Object.defineProperty(E, "ref", {
168
+ }, (H !== void 0 ? H : null) !== null ? Object.defineProperty(O, "ref", {
169
169
  enumerable: !1,
170
170
  get: c
171
- }) : Object.defineProperty(E, "ref", { enumerable: !1, value: null }), E._store = {}, Object.defineProperty(E._store, "validated", {
171
+ }) : Object.defineProperty(O, "ref", { enumerable: !1, value: null }), O._store = {}, Object.defineProperty(O._store, "validated", {
172
172
  configurable: !1,
173
173
  enumerable: !1,
174
174
  writable: !0,
175
175
  value: 0
176
- }), Object.defineProperty(E, "_debugInfo", {
176
+ }), Object.defineProperty(O, "_debugInfo", {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
180
  value: null
181
- }), Object.defineProperty(E, "_debugStack", {
181
+ }), Object.defineProperty(O, "_debugStack", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
185
  value: re
186
- }), Object.defineProperty(E, "_debugTask", {
186
+ }), Object.defineProperty(O, "_debugTask", {
187
187
  configurable: !1,
188
188
  enumerable: !1,
189
189
  writable: !0,
190
190
  value: we
191
- }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
191
+ }), Object.freeze && (Object.freeze(O.props), Object.freeze(O)), O;
192
192
  }
193
- function f(E, _, H, G, le, se, re, we) {
193
+ function f(O, _, H, G, le, se, re, we) {
194
194
  var ae = _.children;
195
195
  if (ae !== void 0)
196
196
  if (G)
@@ -204,7 +204,7 @@ function Kl() {
204
204
  );
205
205
  else u(ae);
206
206
  if (N.call(_, "key")) {
207
- ae = e(E);
207
+ ae = e(O);
208
208
  var Se = Object.keys(_).filter(function(Ue) {
209
209
  return Ue !== "key";
210
210
  });
@@ -228,9 +228,9 @@ React keys must be passed directly to JSX without using spread:
228
228
  } else H = _;
229
229
  return ae && s(
230
230
  H,
231
- typeof E == "function" ? E.displayName || E.name || "Unknown" : E
231
+ typeof O == "function" ? O.displayName || O.name || "Unknown" : O
232
232
  ), d(
233
- E,
233
+ O,
234
234
  ae,
235
235
  se,
236
236
  le,
@@ -240,44 +240,44 @@ React keys must be passed directly to JSX without using spread:
240
240
  we
241
241
  );
242
242
  }
243
- function u(E) {
244
- typeof E == "object" && E !== null && E.$$typeof === v && E._store && (E._store.validated = 1);
243
+ function u(O) {
244
+ typeof O == "object" && O !== null && O.$$typeof === v && O._store && (O._store.validated = 1);
245
245
  }
246
- var p = g, v = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), L = 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, U = 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 = {
250
- "react-stack-bottom-frame": function(E) {
251
- return E();
250
+ "react-stack-bottom-frame": function(O) {
251
+ return O();
252
252
  }
253
253
  };
254
254
  var Y, B = {}, Z = p["react-stack-bottom-frame"].bind(
255
255
  p,
256
256
  a
257
257
  )(), oe = U(r(a)), te = {};
258
- ln.Fragment = S, ln.jsx = function(E, _, H, G, le) {
259
- var se = 1e4 > z.recentlyCreatedOwnerStacks++;
258
+ ln.Fragment = M, ln.jsx = function(O, _, H, G, le) {
259
+ var se = 1e4 > L.recentlyCreatedOwnerStacks++;
260
260
  return f(
261
- E,
261
+ O,
262
262
  _,
263
263
  H,
264
264
  !1,
265
265
  G,
266
266
  le,
267
267
  se ? Error("react-stack-top-frame") : Z,
268
- se ? U(r(E)) : oe
268
+ se ? U(r(O)) : oe
269
269
  );
270
- }, ln.jsxs = function(E, _, H, G, le) {
271
- var se = 1e4 > z.recentlyCreatedOwnerStacks++;
270
+ }, ln.jsxs = function(O, _, H, G, le) {
271
+ var se = 1e4 > L.recentlyCreatedOwnerStacks++;
272
272
  return f(
273
- E,
273
+ O,
274
274
  _,
275
275
  H,
276
276
  !0,
277
277
  G,
278
278
  le,
279
279
  se ? Error("react-stack-top-frame") : Z,
280
- se ? U(r(E)) : 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,24 +1711,24 @@ const eu = ({
1711
1711
  isDisabled: r
1712
1712
  }) => {
1713
1713
  if ("actions" in e) {
1714
- const { icon: v, disabled: x, disabledReason: S, 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: S || 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: m, onClick: $, ...j }) => /* @__PURE__ */ At(
1728
+ ({ name: m, onClick: $, ...A }) => /* @__PURE__ */ At(
1729
1729
  st,
1730
1730
  {
1731
- ...j,
1731
+ ...A,
1732
1732
  key: m,
1733
1733
  tooltipPlacement: n,
1734
1734
  onClick: t($)
@@ -1739,7 +1739,7 @@ const eu = ({
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: S,
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 : S,
2122
+ title: v ? w : M,
2123
2123
  withoutContainer: !(t || v),
2124
2124
  children: /* @__PURE__ */ l.jsx(
2125
2125
  Cu,
@@ -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 = (S) => {
2763
+ }, [n, e, t]), w = (M) => {
2764
2764
  if (d) {
2765
- const k = S.target.value?.trim();
2765
+ const C = M.target.value?.trim();
2766
2766
  u.onChange?.({
2767
- ...S,
2768
- target: { ...S.target, value: k }
2767
+ ...M,
2768
+ target: { ...M.target, value: C }
2769
2769
  });
2770
2770
  }
2771
- f?.(S);
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, S = v || x || a || i, k = ve(
2812
+ const [f, u] = me(""), p = Zu(e), v = f.length >= 1, w = o.length > 0, M = v || w || a || i, C = ve(
2813
2813
  (m, $) => t ? t(m, $) : JSON.stringify(m) === JSON.stringify($),
2814
2814
  [t]
2815
2815
  );
2816
2816
  return {
2817
2817
  isValueEmpty: p,
2818
- isPopperVisible: S,
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: (m, $, j) => {
2824
- d?.(m, $, j), a || u($);
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: S = "Закрыть",
2842
- openText: k = "Открыть",
2840
+ overflowOption: w,
2841
+ closeText: M = "Закрыть",
2842
+ openText: C = "Открыть",
2843
2843
  clearText: b = "Очистить",
2844
2844
  loadingText: m = /* @__PURE__ */ l.jsx(Mn, { color: "primary" }),
2845
2845
  isLoadedDataError: $,
2846
- loadedDataError: j,
2847
- noOptionsText: O,
2848
- autoHighlight: M,
2849
- renderInput: C,
2850
- renderTags: A,
2846
+ loadedDataError: A,
2847
+ noOptionsText: E,
2848
+ autoHighlight: S,
2849
+ renderInput: k,
2850
+ renderTags: j,
2851
2851
  renderOption: T,
2852
- ...L
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,27 +2891,27 @@ 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
- (Y, B, Z) => A ? A(Y, B, Z) : Y.map((oe, te) => {
2902
- const E = c?.(oe) || "";
2901
+ (Y, B, Z) => j ? j(Y, B, Z) : Y.map((oe, te) => {
2902
+ const O = c?.(oe) || "";
2903
2903
  return /* @__PURE__ */ At(
2904
2904
  no,
2905
2905
  {
2906
2906
  deleteIcon: /* @__PURE__ */ l.jsx(Gt, {}),
2907
2907
  color: "grey",
2908
- label: E,
2908
+ label: O,
2909
2909
  ...B({ index: te }),
2910
- key: E
2910
+ key: O
2911
2911
  }
2912
2912
  );
2913
2913
  }),
2914
- [c, A]
2914
+ [c, j]
2915
2915
  ), U = ve(
2916
2916
  (Y) => n ? /* @__PURE__ */ l.jsx(ul, { ...Y }) : null,
2917
2917
  [n]
@@ -2919,11 +2919,11 @@ const Iu = {
2919
2919
  return /* @__PURE__ */ l.jsx(
2920
2920
  dl,
2921
2921
  {
2922
- ...L,
2922
+ ...z,
2923
2923
  size: p,
2924
2924
  clearText: b,
2925
- closeText: S,
2926
- openText: k,
2925
+ closeText: M,
2926
+ openText: C,
2927
2927
  loadingText: m,
2928
2928
  multiple: u,
2929
2929
  disableCloseOnSelect: u,
@@ -2937,7 +2937,7 @@ const Iu = {
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,33 +2953,33 @@ 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), [S, k] = me([]), b = ve(
2957
- Ra((O) => {
2958
- x.current?.abort();
2959
- const M = new AbortController();
2960
- x.current = M, e(O, M?.signal).then((C) => {
2961
- k(C), v(C.length === 0);
2956
+ const [c, d] = me(!1), [f, u] = me(!0), [p, v] = me(!0), w = Le(null), [M, C] = me([]), b = ve(
2957
+ Ra((E) => {
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]
2967
2967
  );
2968
2968
  return {
2969
- handleOpen: (O) => {
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
- i?.(O);
2975
+ i?.(E);
2976
2976
  },
2977
- handleInputChange: (O, 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?.(O, 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: S,
2982
+ options: M,
2983
2983
  isLoadingData: c,
2984
2984
  emptyOptionsText: p ? a : td
2985
2985
  };
@@ -2999,9 +2999,9 @@ const Iu = {
2999
2999
  isSuccess: u,
3000
3000
  isError: p,
3001
3001
  isLoading: v,
3002
- isFullWidth: x,
3003
- onOpen: S,
3004
- noOptionsText: k,
3002
+ isFullWidth: w,
3003
+ onOpen: M,
3004
+ noOptionsText: C,
3005
3005
  onInputChange: b,
3006
3006
  ...m
3007
3007
  } = e;
@@ -3010,7 +3010,7 @@ const Iu = {
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,
@@ -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((S) => /* @__PURE__ */ l.jsx(ye, { component: "p", children: S }, S));
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(($) => $[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,
@@ -3858,7 +3858,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
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,38 +3873,38 @@ 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: S,
3878
- onSelectRow: k,
3876
+ activeRowId: w,
3877
+ keyId: M,
3878
+ onSelectRow: C,
3879
3879
  onRowClick: b,
3880
3880
  // В этот rest-оператор попадают специфичные пропсы (атрибуты) virtuoso
3881
3881
  // Необходимы для NewDataGridInfinite
3882
3882
  ...m
3883
- } = e, { isDisabledLastCell: $ = !0, isNotSelectable: j } = c || {}, O = () => !d || j ? null : d && !j && /* @__PURE__ */ l.jsx(
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 = $ ? void 0 : [u.length - 1];
3892
- return u?.map((A, T) => {
3893
- const L = `${t}-${T}`, z = wf(
3890
+ ), S = ve(() => {
3891
+ const k = $ ? void 0 : [u.length - 1];
3892
+ return u?.map((j, T) => {
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(
3899
3899
  mf,
3900
3900
  {
3901
3901
  row: s,
3902
- cell: A,
3902
+ cell: j,
3903
3903
  emptyCellValue: p,
3904
- startAdornment: N && O(),
3905
- isDisabled: z
3904
+ startAdornment: N && E(),
3905
+ isDisabled: L
3906
3906
  },
3907
- L
3907
+ z
3908
3908
  );
3909
3909
  });
3910
3910
  }, [u, a]);
@@ -3914,7 +3914,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
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,14 +3953,14 @@ 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: S, options: k, ...b }) => {
3956
+ } = e, w = Re(() => o.map(({ children: M, options: C, ...b }) => {
3957
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
  },
@@ -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, S = () => !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: S(),
4117
+ startAdornment: M(),
4118
4118
  onSort: n
4119
4119
  },
4120
4120
  f
@@ -4208,18 +4208,18 @@ const Of = y("div", {
4208
4208
  }, [n, o]);
4209
4209
  const p = Hf(t), v = Re(() => f.filter(
4210
4210
  (m) => !r.find(($) => $[e] === m[e])
4211
- ).length, [f, r, e]), x = ve(() => n.length <= 1 ? t.map((m) => ({ ...m, sortable: !1 })) : t, [t, n]), S = o ? u.current : n, k = (m) => {
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
4214
  if (m.target.checked) {
4215
- const j = Ul(
4215
+ const A = Ul(
4216
4216
  [...r, ...f],
4217
4217
  ql(e)
4218
4218
  );
4219
- return i(j);
4219
+ return i(A);
4220
4220
  }
4221
4221
  const $ = r.filter(
4222
- (j) => !n.find((O) => O[e] === j[e])
4222
+ (A) => !n.find((E) => E[e] === A[e])
4223
4223
  );
4224
4224
  i($);
4225
4225
  }, b = ve(
@@ -4229,7 +4229,7 @@ const Of = y("div", {
4229
4229
  return i([...r, m]);
4230
4230
  i(
4231
4231
  r.filter(
4232
- (j) => j[e] !== m[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: S,
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,26 +4266,26 @@ const Of = y("div", {
4266
4266
  minDisplayRows: u = ff,
4267
4267
  errorMsg: p,
4268
4268
  footer: v,
4269
- noDataPlaceholder: x,
4270
- isLoading: S,
4271
- isError: k,
4269
+ noDataPlaceholder: w,
4270
+ isLoading: M,
4271
+ isError: C,
4272
4272
  keyId: b,
4273
4273
  activeRowId: m,
4274
4274
  emptyCellValue: $ = i,
4275
- className: j,
4276
- onRowClick: O,
4277
- onSort: M,
4278
- noDataOptions: C,
4279
- onRetry: A
4280
- } = e, T = t ? zf : ui, L = ve(() => S ? null : x || /* @__PURE__ */ l.jsx(Lf, { ...C }), [x, C, S]);
4281
- return /* @__PURE__ */ l.jsxs(Vf, { $maxHeight: f, className: j, children: [
4275
+ className: A,
4276
+ onRowClick: E,
4277
+ onSort: S,
4278
+ noDataOptions: k,
4279
+ onRetry: j
4280
+ } = e, T = t ? zf : ui, z = ve(() => M ? null : w || /* @__PURE__ */ l.jsx(Lf, { ...k }), [w, k, M]);
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(
4284
4284
  Nf,
4285
4285
  {
4286
4286
  ...n,
4287
4287
  sorting: d,
4288
- onSort: M
4288
+ onSort: S
4289
4289
  }
4290
4290
  ),
4291
4291
  /* @__PURE__ */ l.jsx(
@@ -4299,12 +4299,12 @@ const Of = y("div", {
4299
4299
  rows: a,
4300
4300
  columns: s,
4301
4301
  emptyCellValue: $,
4302
- isLoading: S,
4303
- isError: k,
4302
+ isLoading: M,
4303
+ isError: C,
4304
4304
  errorMsg: p,
4305
- noDataPlaceholder: L(),
4306
- onRowClick: O,
4307
- onRetry: A
4305
+ noDataPlaceholder: z(),
4306
+ onRowClick: E,
4307
+ onRetry: j
4308
4308
  }
4309
4309
  )
4310
4310
  ] }),
@@ -4333,9 +4333,9 @@ const Of = y("div", {
4333
4333
  disabledReason: u,
4334
4334
  disabled: p,
4335
4335
  loading: v,
4336
- isBlockingOperation: x,
4337
- loadingNote: S,
4338
- onClick: k,
4336
+ isBlockingOperation: w,
4337
+ loadingNote: M,
4338
+ onClick: C,
4339
4339
  ...b
4340
4340
  } = n, m = ($) => /* @__PURE__ */ l.jsx(
4341
4341
  Te,
@@ -4363,10 +4363,10 @@ const Of = y("div", {
4363
4363
  text: d,
4364
4364
  confirmButtonProps: f,
4365
4365
  actionComponent: ($) => m($),
4366
- onConfirm: r(k)
4366
+ onConfirm: r(C)
4367
4367
  }
4368
4368
  ) : m({
4369
- onClick: r(k)
4369
+ onClick: r(C)
4370
4370
  }) });
4371
4371
  }, qf = ({
4372
4372
  action: e,
@@ -4534,32 +4534,32 @@ 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 S = 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;
4540
+ let C = 0, b = 0;
4541
4541
  for (let m = 1; m < e.length; m += 1) {
4542
4542
  const $ = p.firstChild?.cloneNode(
4543
4543
  !0
4544
- ), j = n(e[m]), O = di($, S);
4545
- if (!O)
4544
+ ), A = n(e[m]), E = di($, M);
4545
+ if (!E)
4546
4546
  throw new Error("Could not find text node");
4547
- O.textContent = j, p.appendChild($);
4548
- const C = $.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), S = p.firstElementChild?.getBoundingClientRect().width || 0, k = p.getBoundingClientRect().width - S, 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 m = c(b, k, x);
4562
+ const m = c(b, C, w);
4563
4563
  a(1 + m);
4564
4564
  };
4565
4565
  Yr(() => {
@@ -4579,8 +4579,8 @@ 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), S = v === o - 1 && o <= e.length;
4583
- return { label: x, shrinks: S, onDelete: () => {
4582
+ const w = n(p), M = v === o - 1 && o <= e.length;
4583
+ return { label: w, shrinks: M, onDelete: () => {
4584
4584
  const b = e?.filter((m) => typeof m == "string" ? m !== p : m[t] !== p[t]);
4585
4585
  r(b?.length ? b : []);
4586
4586
  } };
@@ -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 S = {
4677
+ const M = {
4678
4678
  target: {
4679
4679
  value: a ? [] : ""
4680
4680
  }
4681
4681
  };
4682
- t?.call({}, S);
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 = (S) => String(S),
4708
+ getOptionLabel: t = (M) => String(M),
4709
4709
  placeholder: n,
4710
4710
  helperText: r,
4711
4711
  loading: o,
@@ -4718,24 +4718,24 @@ 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: S,
4725
- isShowingClearButton: k,
4724
+ isOpened: M,
4725
+ isShowingClearButton: C,
4726
4726
  isNoData: b,
4727
4727
  onClearAll: m,
4728
4728
  openSelect: $,
4729
- closeSelect: j,
4730
- resetButtonRef: O
4729
+ closeSelect: A,
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) {
4738
- const A = (T) => p?.(T ? {
4736
+ }), S = (k) => {
4737
+ if (Array.isArray(k) && k.length) {
4738
+ const j = (T) => p?.(T ? {
4739
4739
  target: {
4740
4740
  value: T
4741
4741
  }
@@ -4747,38 +4747,38 @@ 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
- onChange: A,
4753
+ onChange: j,
4754
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: S,
4765
+ ...w,
4766
+ open: M,
4767
4767
  id: u || d,
4768
4768
  disabled: s,
4769
4769
  onOpen: $,
4770
- onClose: j,
4771
- renderValue: M,
4770
+ onClose: A,
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
- ref: O,
4781
+ ref: E,
4782
4782
  onClick: m
4783
4783
  }
4784
4784
  ),
@@ -4788,7 +4788,7 @@ function pi({
4788
4788
  variant: "text",
4789
4789
  disabled: s,
4790
4790
  onClick: $,
4791
- children: S ? /* @__PURE__ */ l.jsx(Ws, { size: 16 }) : /* @__PURE__ */ l.jsx(Gr, { size: 16 })
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 {
@@ -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), S = t && p < a(t) || n && p > a(n) || !1;
6722
- return { value: x, label: v, disabled: S };
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 S = 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: S,
6752
+ value: s(w),
6753
+ label: M,
6754
6754
  disabled: !1
6755
6755
  };
6756
6756
  });
@@ -6803,63 +6803,63 @@ 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, S = e.current.cloneNode(!0);
6807
- if (S instanceof HTMLElement ? (gr(S).forEach(($) => {
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
6808
  if (!($ instanceof HTMLElement))
6809
6809
  return;
6810
- const j = Vg($);
6811
- j && $.contains(j) && $.removeChild(j);
6812
- const O = mr($);
6813
- O && O.classList.remove(p);
6814
- const M = yr($);
6815
- M && M.classList.remove(v);
6816
- }), i.current = S) : 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
6810
+ const A = Vg($);
6811
+ A && $.contains(A) && $.removeChild(A);
6812
+ const E = mr($);
6813
+ E && E.classList.remove(p);
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((m) => m instanceof HTMLElement) && k && k.every((m) => m 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
6822
  const m = zg(e.current);
6823
- m && (m.style.zIndex = "1"), b.forEach(($, j) => {
6824
- const O = k[j];
6825
- if (!O)
6823
+ m && (m.style.zIndex = "1"), b.forEach(($, A) => {
6824
+ const E = C[A];
6825
+ if (!E)
6826
6826
  return;
6827
6827
  $.style.position = "relative", $.style.overflow = "hidden";
6828
- const M = mr($);
6829
- M && M.classList.add(p);
6830
- const C = yr($);
6831
- C && C.classList.add(v);
6832
- const A = () => {
6833
- c.current = !1, e.current && (e.current.style.isolation = ""), m && (m.style.zIndex = ""), M && M.classList.remove(p), C && C.classList.remove(v), $.style.position = "", $.style.overflow = "", $.contains(O) && $.removeChild(O);
6828
+ const S = mr($);
6829
+ S && S.classList.add(p);
6830
+ const k = yr($);
6831
+ k && k.classList.add(v);
6832
+ const j = () => {
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
- O.style.pointerEvents = "none", O.style.position = "absolute", O.style.overflow = "hidden", O.setAttribute("aria-hidden", "true");
6836
- const T = Hg(O);
6835
+ E.style.pointerEvents = "none", E.style.position = "absolute", E.style.overflow = "hidden", E.setAttribute("aria-hidden", "true");
6836
+ const T = Hg(E);
6837
6837
  T && (T.style.opacity = "0");
6838
- const L = mr(O);
6839
- L && (L.classList.add(u ? n[Ke.caption_before_exit] : n[Ke.caption_after_exit]), L.addEventListener("animationend", A));
6840
- const z = yr(O);
6841
- z && z.classList.add(u ? n[Ke.weeks_before_exit] : n[Ke.weeks_after_exit]), $.insertBefore(O, $.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: S, isAfter: k, startOfBroadcastWeek: b, startOfISOWeek: m, startOfWeek: $ } = r, j = c ? b(o, r) : i ? m(o) : $(o), O = c ? p(a, r) : i ? v(x(a)) : S(x(a)), M = f(O, j), C = u(a, o) + 1, A = [];
6848
- for (let z = 0; z <= M; z++) {
6849
- const N = d(j, 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
- A.push(N);
6852
+ j.push(N);
6853
6853
  }
6854
- const L = (c ? 35 : 42) * C;
6855
- if (s && A.length < L) {
6856
- const z = L - A.length;
6857
- for (let N = 0; N < z; N++) {
6858
- const W = d(A[A.length - 1], 1);
6859
- A.push(W);
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
+ const W = d(j[j.length - 1], 1);
6859
+ j.push(W);
6860
6860
  }
6861
6861
  }
6862
- return A;
6862
+ return j;
6863
6863
  }
6864
6864
  function Ug(e) {
6865
6865
  const t = [];
@@ -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((S, k) => {
6915
- const b = n.broadcastCalendar ? u(k, r) : n.ISOWeek ? p(k) : v(k), m = n.broadcastCalendar ? a(k, r) : n.ISOWeek ? i(s(k)) : c(s(k)), $ = t.filter((C) => C >= b && C <= m), j = n.broadcastCalendar ? 35 : 42;
6916
- if (n.fixedWeeks && $.length < j) {
6917
- const C = t.filter((A) => {
6918
- const T = j - $.length;
6919
- return A > m && A <= o(m, 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
- $.push(...C);
6921
+ $.push(...k);
6922
6922
  }
6923
- const O = $.reduce((C, A) => {
6924
- const T = n.ISOWeek ? d(A) : f(A), L = C.find((N) => N.weekNumber === T), z = new Ri(A, k, r);
6925
- return L ? L.days.push(z) : C.push(new Qg(T, [z])), C;
6926
- }, []), M = new Xg(k, O);
6927
- return S.push(M), S;
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: S } = e;
6934
- !n && x && (n = x), !n && p && (n = t.newDate(p, 0, 1)), !r && S && (r = S), !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), S = Kg(s, r, e, t), { disableNavigation: k, onMonthChange: b } = e, m = (M) => p.some((C) => C.days.some((A) => A.isEqualTo(M))), $ = (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: S,
6989
+ previousMonth: w,
6990
+ nextMonth: M,
6991
6991
  goToMonth: $,
6992
- goToDay: (M) => {
6993
- m(M) || $(M.date);
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: S, max: k, min: b, startOfBroadcastWeek: m, startOfISOWeek: $, startOfWeek: j } = 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 ? m(C, i) : s ? $(C) : j(C),
7063
- endOfWeek: (C) => c ? v(C, i) : s ? x(C) : S(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,22 +7082,22 @@ 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: (S) => !!c?.isEqualTo(S),
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: (S, k) => {
7091
+ moveFocus: (M, C) => {
7092
7092
  if (!d)
7093
7093
  return;
7094
- const b = Yi(S, 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, S = 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]: [],
@@ -7105,47 +7105,47 @@ function im(e, t, n) {
7105
7105
  [De.today]: []
7106
7106
  }, m = {};
7107
7107
  for (const $ of e) {
7108
- const { date: j, displayMonth: O } = $, M = !!(O && !f(j, O)), C = !!(S && p(j, S)), A = !!(k && x(j, k)), T = !!(r && $t(j, r, n)), L = !!(o && $t(j, o, n)) || C || A || // Broadcast calendar will show outside days as default
7109
- !s && !i && M || s && i === !1 && M, z = d(j, c ?? n.today());
7110
- M && b.outside.push($), T && b.disabled.push($), L && b.hidden.push($), z && b.today.push($), a && Object.keys(a).forEach((N) => {
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(j, W, n) && (m[N] ? m[N].push($) : m[N] = [$]);
7112
+ W && $t(A, W, n) && (m[N] ? m[N].push($) : m[N] = [$]);
7113
7113
  });
7114
7114
  }
7115
7115
  return ($) => {
7116
- const j = {
7116
+ const A = {
7117
7117
  [De.focused]: !1,
7118
7118
  [De.disabled]: !1,
7119
7119
  [De.hidden]: !1,
7120
7120
  [De.outside]: !1,
7121
7121
  [De.today]: !1
7122
- }, O = {};
7123
- for (const M in b) {
7124
- const C = b[M];
7125
- j[M] = C.some((A) => A === $);
7122
+ }, E = {};
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 m)
7128
- O[M] = m[M].some((C) => C === $);
7127
+ for (const S in m)
7128
+ E[S] = m[S].some((k) => k === $);
7129
7129
  return {
7130
- ...j,
7130
+ ...A,
7131
7131
  // custom modifiers should override all the previous ones
7132
- ...O
7132
+ ...E
7133
7133
  };
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, S) => {
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, S), 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: S, max: k } = e, b = p ? lm(p, d, S, 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: S, onPrevClick: k, showWeekNumber: b, styles: m } = e, { formatCaption: $, formatDay: j, formatMonthDropdown: O, formatWeekNumber: M, formatWeekNumberHeader: C, formatWeekdayName: A, formatYearDropdown: T } = n, L = nm(e, o), { days: z, months: N, navStart: W, navEnd: U, previousMonth: Y, nextMonth: B, goToMonth: Z } = L, oe = im(z, e, o), { isSelected: te, select: E, selected: _ } = pm(e, o) ?? {}, { blur: H, focused: G, isFocusTarget: le, moveFocus: se, setFocused: re } = am(e, L, 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), k?.(Y));
7284
- }, [Y, Z, k]), ie = ve(() => {
7285
- B && (Z(B), S?.(B));
7286
- }, [Z, B, S]), Ie = ve((Q, de) => (ce) => {
7287
- ce.preventDefault(), ce.stopPropagation(), re(Q), E?.(Q.date, de, ce), f?.(Q.date, de, ce);
7288
- }, [E, f, re]), ct = 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
+ ce.preventDefault(), ce.stopPropagation(), re(Q), O?.(Q.date, de, ce), f?.(Q.date, de, ce);
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,8 +7309,8 @@ 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) => {
@@ -7329,7 +7329,7 @@ function hm(e) {
7329
7329
  const nt = {
7330
7330
  dayPickerProps: e,
7331
7331
  selected: _,
7332
- select: E,
7332
+ select: O,
7333
7333
  isSelected: te,
7334
7334
  months: N,
7335
7335
  nextMonth: B,
@@ -7360,7 +7360,7 @@ function hm(e) {
7360
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
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, O(Q.date, o)),
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
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
7365
  g.createElement("span", { role: "status", "aria-live": "polite", style: {
7366
7366
  border: 0,
@@ -7381,15 +7381,15 @@ function hm(e) {
7381
7381
  !e.hideWeekdays && g.createElement(
7382
7382
  t.Weekdays,
7383
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" }, C()),
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" }, A(He, o.options, o)))
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
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
7389
  { className: i[X.Week], key: He.weekNumber, style: m?.[X.Week], week: He },
7390
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(_)) {
@@ -7397,7 +7397,7 @@ function hm(e) {
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
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: w(be, fe), onMouseEnter: D(be, fe), onMouseLeave: I(be, fe) }, j(rt, o.options, o)) : !fe.hidden && j(be.date, o.options, o));
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
  )
@@ -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, S = { value: v, options: x, fallbackOptions: x }, k = { 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(M) {
8443
- var C;
8444
- b.value = M, m == null || (C = m.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
8446
  var $ = function() {
8447
- var M = function() {
8448
- var C, A;
8449
- b.selectionStart = (C = a.selectionStart) !== null && C !== void 0 ? C : 0, b.selectionEnd = (A = a.selectionEnd) !== null && A !== void 0 ? A : 0, k.id = window.setTimeout(M);
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);
8452
- }, j = function() {
8453
- window.clearTimeout(k.id), k.id = -1, k.cachedId = -1;
8454
- }, O = function(M) {
8451
+ C.id = window.setTimeout(S);
8452
+ }, A = function() {
8453
+ window.clearTimeout(C.id), C.id = -1, C.cachedId = -1;
8454
+ }, E = function(S) {
8455
8455
  try {
8456
- var C, A;
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, L = a.selectionStart, z = a.selectionEnd;
8460
- if (L === 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), L > b.selectionStart ? N = "insert" : L <= b.selectionStart && L < b.selectionEnd ? N = "deleteBackward" : L === 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.");
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
8463
  var U = "", Y = b.selectionStart, B = b.selectionEnd;
8464
- if (N === "insert") U = T.slice(b.selectionStart, L);
8464
+ if (N === "insert") U = T.slice(b.selectionStart, z);
8465
8465
  else {
8466
8466
  var Z = W.length - T.length;
8467
- Y = L, B = L + Z;
8467
+ Y = z, B = z + Z;
8468
8468
  }
8469
- S.value !== W ? S.options = S.fallbackOptions : S.fallbackOptions = S.options;
8470
- var oe = S.options, te = r({ inputType: N, previousValue: W, previousOptions: oe, value: T, addedValue: U, changeStart: Y, changeEnd: B, selectionStart: L, selectionEnd: z }), E = te.options, _ = gy(te, my);
8471
- a.value = _.value, a.setSelectionRange(_.selectionStart, _.selectionEnd), S.value = _.value, S.options = E, b.selectionStart = _.selectionStart, b.selectionEnd = _.selectionEnd, (C = a._valueTracker) === null || C === void 0 || (A = C.setValue) === null || A === void 0 || A.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 && $(), a.addEventListener("focus", $), a.addEventListener("blur", j), a.addEventListener("input", O), o.set(a, { onFocus: $, onBlur: j, onInput: O });
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,15 +8500,15 @@ 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, S = 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(S).filter(function(O) {
8506
- return O.length > 1;
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
+ 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), m = -1, $ = 0; $ < b.length; $++) {
8510
- var j = Object.prototype.hasOwnProperty.call(S, b[$]);
8511
- if (!(b[$] === v[$] || j && S[b[$]].test(v[$]))) {
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
8512
  m = $;
8513
8513
  break;
8514
8514
  }
@@ -8516,23 +8516,23 @@ var ts = function(e) {
8516
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), S = x.mask, k = x.replacement, b = x.showMask, m = x.separate, $ = Ln(Ln({}, a === "insert" ? { inputType: a, data: c } : { inputType: a, data: null }), {}, { value: i, selectionStart: d, selectionEnd: f }), j = p?.($);
8520
- if (j === !1) throw new yn("Custom tracking stop.");
8521
- j === null ? c = "" : j !== !0 && j !== void 0 && (c = j);
8522
- var O = v?.($);
8523
- O?.mask !== void 0 && (S = O.mask), O?.replacement !== void 0 && (k = typeof O?.replacement == "string" ? on(O?.replacement) : O.replacement), O?.showMask !== void 0 && (b = O.showMask), O?.separate !== void 0 && (m = O.separate);
8524
- var M = Wr(i, Ln({ end: d }, s)), C = Wr(i, Ln({ start: f }, s)), A = RegExp("[^".concat(Object.keys(k).join(""), "]"), "g"), T = S.replace(A, "");
8525
- if (M && (M = mn(M, { replacementChars: T, replacement: k, separate: m }), 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.");
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
+ if (A === !1) throw new yn("Custom tracking stop.");
8521
+ A === null ? c = "" : A !== !0 && A !== void 0 && (c = A);
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
8526
  if (m) {
8527
- var L = S.slice(d, f).replace(A, ""), z = L.length - c.length;
8528
- z < 0 ? C = C.slice(-z) : z > 0 && (C = L.slice(-z) + C);
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: m }));
8531
- var N = Xi(M + c + C, { mask: S, replacement: k, separate: m, showMask: b }), W = function(U) {
8532
- var Y, B, Z, oe = U.inputType, te = U.value, E = U.addedValue, _ = U.beforeChangeValue, H = U.mask, G = U.replacement, le = U.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
- }), re = (Y = se[_.length + E.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 + E.length]) === null || Z === void 0 ? void 0 : Z.index;
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;
8536
8536
  if (oe === "insert") {
8537
8537
  if (re !== void 0) return re + 1;
8538
8538
  if (ae !== void 0) return ae;
@@ -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: S, replacement: k, separate: m });
8554
- return { value: N, selectionStart: W, selectionEnd: W, options: { mask: S, replacement: k, separate: m } };
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) {
@@ -8589,56 +8589,58 @@ const ns = ({ maskProps: e, ...t }) => {
8589
8589
  className: d,
8590
8590
  fullWidth: f,
8591
8591
  size: u,
8592
- ...p
8593
- } = e, [v, x] = me(null), [S, k] = me(null), [b, m] = me(/* @__PURE__ */ new Date()), [$, j] = me(""), O = () => a && i ? "dropdown" : a ? "dropdown-months" : i ? "dropdown-years" : "label", M = (L) => {
8594
- k(L.currentTarget);
8595
- }, C = () => {
8596
- k(null);
8597
- }, A = (L) => {
8598
- L ? (o?.(L), m(L), j(
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(
8599
8600
  L.toLocaleString("ru-RU", {
8600
8601
  day: "2-digit",
8601
8602
  month: "2-digit",
8602
8603
  year: "numeric"
8603
8604
  })
8604
- )) : (j(""), o?.(void 0)), C();
8605
- }, T = (L) => {
8606
- x(null), j(L.target.value);
8607
- const [z, N, W] = L.target.value.split(".").map(Number);
8608
- if (Number.isNaN(z) || Number.isNaN(N) || Number.isNaN(W) || z < 1 || z > 31 || N < 1 || N > 12 || W < 1e3) {
8609
- x("Некорректная дата");
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("Некорректная дата");
8610
8611
  return;
8611
8612
  }
8612
- const U = new Date(W, N - 1, z);
8613
- o?.(U), m(U);
8613
+ const Y = new Date(U, W - 1, N);
8614
+ o?.(Y), $(Y);
8614
8615
  };
8615
8616
  return it(() => {
8616
- r ? (j(
8617
+ r ? (E(
8617
8618
  r.toLocaleString("ru-RU", {
8618
8619
  day: "2-digit",
8619
8620
  month: "2-digit",
8620
8621
  year: "numeric"
8621
8622
  })
8622
- ), m(r)) : j("");
8623
+ ), $(r)) : E("");
8623
8624
  }, [r]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8624
8625
  /* @__PURE__ */ l.jsx(
8625
8626
  ns,
8626
8627
  {
8627
- value: $,
8628
- onChange: T,
8628
+ value: A,
8629
+ onChange: z,
8629
8630
  label: t,
8630
8631
  disabled: n,
8631
8632
  className: d,
8632
8633
  fullWidth: f,
8633
8634
  size: u,
8634
- endAdornment: /* @__PURE__ */ l.jsx(Ze, { variant: "text", onClick: M, children: /* @__PURE__ */ l.jsx(_a, {}) }),
8635
+ name: p,
8636
+ endAdornment: /* @__PURE__ */ l.jsx(Ze, { variant: "text", onClick: k, children: /* @__PURE__ */ l.jsx(_a, {}) }),
8635
8637
  maskProps: {
8636
8638
  mask: "__.__.____",
8637
8639
  replacement: { _: /\d/ },
8638
8640
  showMask: !0
8639
8641
  },
8640
8642
  placeholder: "дд.мм.гггг",
8641
- error: !!v || s,
8643
+ error: !!w || s,
8642
8644
  helperText: s || c
8643
8645
  }
8644
8646
  ),
@@ -8646,9 +8648,9 @@ const ns = ({ maskProps: e, ...t }) => {
8646
8648
  ro,
8647
8649
  {
8648
8650
  title: "Заголовок",
8649
- open: !!S,
8650
- anchorEl: S,
8651
- onClose: C,
8651
+ open: !!C,
8652
+ anchorEl: C,
8653
+ onClose: j,
8652
8654
  anchorOrigin: {
8653
8655
  vertical: "bottom",
8654
8656
  horizontal: "right"
@@ -8660,13 +8662,13 @@ const ns = ({ maskProps: e, ...t }) => {
8660
8662
  children: /* @__PURE__ */ l.jsx(by, { children: /* @__PURE__ */ l.jsx(
8661
8663
  ty,
8662
8664
  {
8663
- month: b,
8664
- onMonthChange: m,
8665
+ month: m,
8666
+ onMonthChange: $,
8665
8667
  selected: r,
8666
- onSelect: A,
8667
- ...p,
8668
+ onSelect: T,
8669
+ ...v,
8668
8670
  mode: "single",
8669
- captionLayout: O()
8671
+ captionLayout: S()
8670
8672
  }
8671
8673
  ) })
8672
8674
  }
@@ -8884,13 +8886,13 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
8884
8886
  }) => {
8885
8887
  const a = ve(
8886
8888
  (s, c) => {
8887
- 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;
8888
8890
  if (d)
8889
8891
  return d(s, c);
8890
8892
  if (v === "tag")
8891
8893
  return /* @__PURE__ */ l.jsx(Ht.Value, { children: /* @__PURE__ */ l.jsx(no, { label: s, color: f, variant: "light" }) });
8892
8894
  if (v === "guid") {
8893
- const S = Wy(u);
8895
+ const M = Wy(u);
8894
8896
  return /* @__PURE__ */ l.jsx(
8895
8897
  Ny,
8896
8898
  {
@@ -8898,8 +8900,8 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
8898
8900
  $isCopy: u,
8899
8901
  color: f,
8900
8902
  copyPosition: p,
8901
- copyText: x,
8902
- children: /* @__PURE__ */ l.jsx(Py, { tooltipProps: S, children: s })
8903
+ copyText: w,
8904
+ children: /* @__PURE__ */ l.jsx(Py, { tooltipProps: M, children: s })
8903
8905
  }
8904
8906
  );
8905
8907
  }
@@ -9127,37 +9129,37 @@ function s0({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
9127
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(() => {
9128
9130
  let p = e.current, v = t.current;
9129
9131
  if (!p || !v || c || n === "none") return;
9130
- let x = p, S = x.getBoundingClientRect().left + x.offsetWidth, k = x.getBoundingClientRect().top + x.offsetHeight / 2, b = S - o0, m = k;
9132
+ let w = p, M = w.getBoundingClientRect().left + w.offsetWidth, C = w.getBoundingClientRect().top + w.offsetHeight / 2, b = M - o0, m = C;
9131
9133
  document.querySelectorAll(i0).length === 0 && document.elementFromPoint(b, m) === p || (a(!0), d(!0));
9132
9134
  }, [e, t, c, n]);
9133
9135
  return K.useEffect(() => {
9134
9136
  let p = e.current;
9135
9137
  if (!p || n === "none") return;
9136
9138
  function v() {
9137
- let S = window.innerWidth - p.getBoundingClientRect().right;
9138
- s(S >= is);
9139
+ let M = window.innerWidth - p.getBoundingClientRect().right;
9140
+ s(M >= is);
9139
9141
  }
9140
9142
  v();
9141
- let x = setInterval(v, 1e3);
9143
+ let w = setInterval(v, 1e3);
9142
9144
  return () => {
9143
- clearInterval(x);
9145
+ clearInterval(w);
9144
9146
  };
9145
9147
  }, [e, n]), K.useEffect(() => {
9146
9148
  let p = r || document.activeElement === t.current;
9147
9149
  if (n === "none" || !p) return;
9148
- let v = setTimeout(u, 0), x = setTimeout(u, 2e3), S = setTimeout(u, 5e3), k = setTimeout(() => {
9150
+ let v = setTimeout(u, 0), w = setTimeout(u, 2e3), M = setTimeout(u, 5e3), C = setTimeout(() => {
9149
9151
  d(!0);
9150
9152
  }, 6e3);
9151
9153
  return () => {
9152
- clearTimeout(v), clearTimeout(x), clearTimeout(S), clearTimeout(k);
9154
+ clearTimeout(v), clearTimeout(w), clearTimeout(M), clearTimeout(C);
9153
9155
  };
9154
9156
  }, [t, r, n, u]), { hasPWMBadge: o, willPushPWMBadge: f, PWM_BADGE_SPACE_WIDTH: a0 };
9155
9157
  }
9156
9158
  var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9157
- 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: S, children: k } = n, b = t0(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), m, $, j, O, M;
9158
- let [C, A] = K.useState(typeof b.defaultValue == "string" ? b.defaultValue : ""), T = r ?? C, L = r0(T), z = K.useCallback((q) => {
9159
- o?.(q), A(q);
9160
- }, [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: z, 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: [(j = W.current) == null ? void 0 : j.selectionStart, (O = W.current) == null ? void 0 : O.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] });
9161
9163
  K.useImperativeHandle(t, () => W.current, []), K.useEffect(() => {
9162
9164
  let q = W.current, J = U.current;
9163
9165
  if (!q || !J) return;
@@ -9167,14 +9169,14 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9167
9169
  H(null), le(null);
9168
9170
  return;
9169
9171
  }
9170
- let ie = q.selectionStart, Ie = q.selectionEnd, ct = q.selectionDirection, h = q.maxLength, w = q.value, D = B.current.prev, I = -1, F = -1, P;
9171
- if (w.length !== 0 && ie !== null && Ie !== null) {
9172
- 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;
9173
9175
  if (Ce && !nt) {
9174
9176
  let Q = ie;
9175
9177
  if (Q === 0) I = 0, F = 1, P = "forward";
9176
9178
  else if (Q === h) I = Q - 1, F = Q, P = "backward";
9177
- else if (h > 1 && w.length > 1) {
9179
+ else if (h > 1 && x.length > 1) {
9178
9180
  let de = 0;
9179
9181
  if (D[0] !== null && D[1] !== null) {
9180
9182
  P = Q < D[1] ? "backward" : "forward";
@@ -9189,7 +9191,7 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9189
9191
  let V = I !== -1 ? I : ie, ne = F !== -1 ? F : Ie, ue = P ?? ct;
9190
9192
  H(V), le(ne), B.current.prev = [V, ne, ue];
9191
9193
  }
9192
- if (document.addEventListener("selectionchange", $e, { capture: !0 }), $e(), document.activeElement === q && E(!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")) {
9193
9195
  let ie = document.createElement("style");
9194
9196
  if (ie.id = "input-otp-style", document.head.appendChild(ie), ie.sheet) {
9195
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;";
@@ -9205,7 +9207,7 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9205
9207
  document.removeEventListener("selectionchange", $e, { capture: !0 }), Ne.disconnect();
9206
9208
  };
9207
9209
  }, []);
9208
- let [Z, oe] = K.useState(!1), [te, E] = K.useState(!1), [_, H] = K.useState(null), [G, le] = K.useState(null);
9210
+ let [Z, oe] = K.useState(!1), [te, O] = K.useState(!1), [_, H] = K.useState(null), [G, le] = K.useState(null);
9209
9211
  K.useEffect(() => {
9210
9212
  n0(() => {
9211
9213
  var q, J, $e, ke;
@@ -9214,22 +9216,22 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9214
9216
  Ne !== null && ie !== null && (H(Ne), le(ie), B.current.prev = [Ne, ie, Ie]);
9215
9217
  });
9216
9218
  }, [T, te]), K.useEffect(() => {
9217
- L !== void 0 && T !== L && L.length < a && T.length === a && f?.(T);
9218
- }, [a, f, L, T]);
9219
+ z !== void 0 && T !== z && z.length < a && T.length === a && f?.(T);
9220
+ }, [a, f, z, T]);
9219
9221
  let se = s0({ containerRef: U, inputRef: W, pushPasswordManagerStrategy: u, isFocused: te }), re = K.useCallback((q) => {
9220
9222
  let J = q.currentTarget.value.slice(0, a);
9221
9223
  if (J.length > 0 && N && !N.test(J)) {
9222
9224
  q.preventDefault();
9223
9225
  return;
9224
9226
  }
9225
- typeof L == "string" && J.length < L.length && document.dispatchEvent(new Event("selectionchange")), z(J);
9226
- }, [a, z, L, N]), we = K.useCallback(() => {
9227
+ typeof z == "string" && J.length < z.length && document.dispatchEvent(new Event("selectionchange")), L(J);
9228
+ }, [a, L, z, N]), we = K.useCallback(() => {
9227
9229
  var q;
9228
9230
  if (W.current) {
9229
9231
  let J = Math.min(W.current.value.length, a - 1), $e = W.current.value.length;
9230
9232
  (q = W.current) == null || q.setSelectionRange(J, $e), H(J), le($e);
9231
9233
  }
9232
- E(!0);
9234
+ O(!0);
9233
9235
  }, [a]), ae = K.useCallback((q) => {
9234
9236
  var J, $e;
9235
9237
  let ke = W.current;
@@ -9238,10 +9240,10 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9238
9240
  q.preventDefault();
9239
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);
9240
9242
  if (h.length > 0 && N && !N.test(h)) return;
9241
- ke.value = h, z(h);
9242
- let w = Math.min(h.length, a - 1), D = h.length;
9243
- ke.setSelectionRange(w, D), H(w), le(D);
9244
- }, [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: (q) => {
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) => {
9245
9247
  var J;
9246
9248
  ae(q), (J = b.onPaste) == null || J.call(b, q);
9247
9249
  }, onChange: re, onMouseOver: (q) => {
@@ -9255,13 +9257,13 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9255
9257
  we(), (J = b.onFocus) == null || J.call(b, q);
9256
9258
  }, onBlur: (q) => {
9257
9259
  var J;
9258
- E(!1), (J = b.onBlur) == null || J.call(b, q);
9260
+ O(!1), (J = b.onBlur) == null || J.call(b, q);
9259
9261
  } })), [re, we, ae, d, Ee, a, G, _, b, N?.source, T]), lt = K.useMemo(() => ({ slots: Array.from({ length: a }).map((q, J) => {
9260
9262
  var $e;
9261
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;
9262
9264
  return { char: Ne, placeholderChar: ie, isActive: ke, hasFakeCaret: ke && Ne === null };
9263
- }), isFocused: te, isHovering: !b.disabled && Z }), [te, Z, a, G, _, b.disabled, T]), Wt = K.useMemo(() => S ? S(lt) : K.createElement(l0.Provider, { value: lt }, k), [k, lt, S]);
9264
- return K.createElement(K.Fragment, null, x !== null && K.createElement("noscript", null, K.createElement("style", null, x)), 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)));
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)));
9265
9267
  });
9266
9268
  ss.displayName = "Input";
9267
9269
  function dn(e, t) {
@@ -9672,36 +9674,36 @@ class _0 {
9672
9674
  });
9673
9675
  else if (N0(d) && !d.ok) {
9674
9676
  a = !1;
9675
- 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" && !g.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 : {
9676
9678
  message: u
9677
9679
  };
9678
9680
  this.create({
9679
9681
  id: r,
9680
9682
  type: "error",
9681
9683
  description: p,
9682
- ...x
9684
+ ...w
9683
9685
  });
9684
9686
  } else if (d instanceof Error) {
9685
9687
  a = !1;
9686
- 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" && !g.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 : {
9687
9689
  message: u
9688
9690
  };
9689
9691
  this.create({
9690
9692
  id: r,
9691
9693
  type: "error",
9692
9694
  description: p,
9693
- ...x
9695
+ ...w
9694
9696
  });
9695
9697
  } else if (n.success !== void 0) {
9696
9698
  a = !1;
9697
- 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" && !g.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 : {
9698
9700
  message: u
9699
9701
  };
9700
9702
  this.create({
9701
9703
  id: r,
9702
9704
  type: "success",
9703
9705
  description: p,
9704
- ...x
9706
+ ...w
9705
9707
  });
9706
9708
  }
9707
9709
  }).catch(async (d) => {
@@ -9773,20 +9775,20 @@ function q0(e) {
9773
9775
  }
9774
9776
  const X0 = (e) => {
9775
9777
  var t, n, r, o, a, i, s, c, d;
9776
- const { invert: f, toast: u, unstyled: p, interacting: v, setHeights: x, visibleToasts: S, heights: k, index: b, toasts: m, expanded: $, removeToast: j, defaultRichColors: O, closeButton: M, style: C, cancelButtonStyle: A, actionButtonStyle: T, className: L = "", descriptionClassName: z = "", duration: N, position: W, gap: U, expandByDefault: Y, classNames: B, icons: Z, closeButtonAriaLabel: oe = "Close toast" } = e, [te, E] = 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 <= S, h = u.type, w = u.dismissible !== !1, D = u.className || "", I = u.descriptionClassName || "", F = g.useMemo(() => k.findIndex((ee) => ee.toastId === u.id) || 0, [
9777
- 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,
9778
9780
  u.id
9779
9781
  ]), P = g.useMemo(() => {
9780
9782
  var ee;
9781
- return (ee = u.closeButton) != null ? ee : M;
9783
+ return (ee = u.closeButton) != null ? ee : S;
9782
9784
  }, [
9783
9785
  u.closeButton,
9784
- M
9786
+ S
9785
9787
  ]), V = g.useMemo(() => u.duration || N || ga, [
9786
9788
  u.duration,
9787
9789
  N
9788
- ]), ne = g.useRef(0), ue = g.useRef(0), Ce = g.useRef(0), nt = g.useRef(null), [Q, de] = W.split("-"), ce = g.useMemo(() => k.reduce((ee, Oe, Pe) => Pe >= F ? ee : ee + Oe.height, 0), [
9789
- 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,
9790
9792
  F
9791
9793
  ]), qe = A0(), He = u.invert || f, ut = h === "loading";
9792
9794
  ue.current = g.useMemo(() => F * U + ce, [
@@ -9802,24 +9804,24 @@ const X0 = (e) => {
9802
9804
  const ee = ie.current;
9803
9805
  if (ee) {
9804
9806
  const Oe = ee.getBoundingClientRect().height;
9805
- return $e(Oe), x((Pe) => [
9807
+ return $e(Oe), w((Pe) => [
9806
9808
  {
9807
9809
  toastId: u.id,
9808
9810
  height: Oe,
9809
9811
  position: u.position
9810
9812
  },
9811
9813
  ...Pe
9812
- ]), () => x((Pe) => Pe.filter((Je) => Je.toastId !== u.id));
9814
+ ]), () => w((Pe) => Pe.filter((Je) => Je.toastId !== u.id));
9813
9815
  }
9814
9816
  }, [
9815
- x,
9817
+ w,
9816
9818
  u.id
9817
9819
  ]), g.useLayoutEffect(() => {
9818
9820
  if (!G) return;
9819
9821
  const ee = ie.current, Oe = ee.style.height;
9820
9822
  ee.style.height = "auto";
9821
9823
  const Pe = ee.getBoundingClientRect().height;
9822
- 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 ? {
9823
9825
  ...Be,
9824
9826
  height: Pe
9825
9827
  } : Be) : [
@@ -9834,17 +9836,17 @@ const X0 = (e) => {
9834
9836
  G,
9835
9837
  u.title,
9836
9838
  u.description,
9837
- x,
9839
+ w,
9838
9840
  u.id
9839
9841
  ]);
9840
9842
  const be = g.useCallback(() => {
9841
- re(!0), q(ue.current), x((ee) => ee.filter((Oe) => Oe.toastId !== u.id)), setTimeout(() => {
9842
- j(u);
9843
+ re(!0), q(ue.current), w((ee) => ee.filter((Oe) => Oe.toastId !== u.id)), setTimeout(() => {
9844
+ A(u);
9843
9845
  }, U0);
9844
9846
  }, [
9845
9847
  u,
9846
- j,
9847
- x,
9848
+ A,
9849
+ w,
9848
9850
  ue
9849
9851
  ]);
9850
9852
  g.useEffect(() => {
@@ -9893,9 +9895,9 @@ const X0 = (e) => {
9893
9895
  return /* @__PURE__ */ g.createElement("li", {
9894
9896
  tabIndex: 0,
9895
9897
  ref: ie,
9896
- className: gt(L, 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]),
9897
9899
  "data-sonner-toast": "",
9898
- "data-rich-colors": (Fn = u.richColors) != null ? Fn : O,
9900
+ "data-rich-colors": (Fn = u.richColors) != null ? Fn : E,
9899
9901
  "data-styled": !(u.jsx || u.unstyled || p),
9900
9902
  "data-mounted": G,
9901
9903
  "data-promise": !!u.promise,
@@ -9907,7 +9909,7 @@ const X0 = (e) => {
9907
9909
  "data-index": b,
9908
9910
  "data-front": Ie,
9909
9911
  "data-swiping": we,
9910
- "data-dismissible": w,
9912
+ "data-dismissible": x,
9911
9913
  "data-type": h,
9912
9914
  "data-invert": He,
9913
9915
  "data-swipe-out": Se,
@@ -9919,21 +9921,21 @@ const X0 = (e) => {
9919
9921
  "--z-index": m.length - b,
9920
9922
  "--offset": `${se ? Wt : ue.current}px`,
9921
9923
  "--initial-height": Y ? "auto" : `${J}px`,
9922
- ...C,
9924
+ ...k,
9923
9925
  ...u.style
9924
9926
  },
9925
9927
  onDragEnd: () => {
9926
- ae(!1), E(null), nt.current = null;
9928
+ ae(!1), O(null), nt.current = null;
9927
9929
  },
9928
9930
  onPointerDown: (ee) => {
9929
- ut || !w || (Ne.current = /* @__PURE__ */ new Date(), q(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 = {
9930
9932
  x: ee.clientX,
9931
9933
  y: ee.clientY
9932
9934
  }));
9933
9935
  },
9934
9936
  onPointerUp: () => {
9935
9937
  var ee, Oe, Pe;
9936
- if (Se || !w) return;
9938
+ if (Se || !x) return;
9937
9939
  nt.current = null;
9938
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;
9939
9941
  if (Math.abs(ot) >= G0 || In > 0.11) {
@@ -9943,15 +9945,15 @@ const X0 = (e) => {
9943
9945
  var dt, ft;
9944
9946
  (dt = ie.current) == null || dt.style.setProperty("--swipe-amount-x", "0px"), (ft = ie.current) == null || ft.style.setProperty("--swipe-amount-y", "0px");
9945
9947
  }
9946
- lt(!1), ae(!1), E(null);
9948
+ lt(!1), ae(!1), O(null);
9947
9949
  },
9948
9950
  onPointerMove: (ee) => {
9949
9951
  var Oe, Pe, Je;
9950
- 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;
9951
9953
  const Be = ee.clientY - nt.current.y, ot = ee.clientX - nt.current.x;
9952
9954
  var In;
9953
9955
  const dt = (In = e.swipeDirections) != null ? In : q0(W);
9954
- !te && (Math.abs(ot) > 1 || Math.abs(Be) > 1) && E(Math.abs(ot) > Math.abs(Be) ? "x" : "y");
9956
+ !te && (Math.abs(ot) > 1 || Math.abs(Be) > 1) && O(Math.abs(ot) > Math.abs(Be) ? "x" : "y");
9955
9957
  let ft = {
9956
9958
  x: 0,
9957
9959
  y: 0
@@ -9978,7 +9980,7 @@ const X0 = (e) => {
9978
9980
  "aria-label": oe,
9979
9981
  "data-disabled": ut,
9980
9982
  "data-close-button": !0,
9981
- onClick: ut || !w ? () => {
9983
+ onClick: ut || !x ? () => {
9982
9984
  } : () => {
9983
9985
  be(), u.onDismiss == null || u.onDismiss.call(u, u);
9984
9986
  },
@@ -9994,13 +9996,13 @@ const X0 = (e) => {
9994
9996
  className: gt(B?.title, u == null || (i = u.classNames) == null ? void 0 : i.title)
9995
9997
  }, u.jsx ? u.jsx : typeof u.title == "function" ? u.title() : u.title), u.description ? /* @__PURE__ */ g.createElement("div", {
9996
9998
  "data-description": "",
9997
- className: gt(z, I, B?.description, u == null || (s = u.classNames) == null ? void 0 : s.description)
9999
+ className: gt(L, I, B?.description, u == null || (s = u.classNames) == null ? void 0 : s.description)
9998
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", {
9999
10001
  "data-button": !0,
10000
10002
  "data-cancel": !0,
10001
- style: u.cancelButtonStyle || A,
10003
+ style: u.cancelButtonStyle || j,
10002
10004
  onClick: (ee) => {
10003
- 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());
10004
10006
  },
10005
10007
  className: gt(B?.cancelButton, u == null || (c = u.classNames) == null ? void 0 : c.cancelButton)
10006
10008
  }, u.cancel.label) : null, /* @__PURE__ */ g.isValidElement(u.action) ? u.action : u.action && Vn(u.action) ? /* @__PURE__ */ g.createElement("button", {
@@ -10049,13 +10051,13 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10049
10051
  const { invert: r, position: o = "bottom-right", hotkey: a = [
10050
10052
  "altKey",
10051
10053
  "KeyT"
10052
- ], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: v, style: x, visibleToasts: S = L0, toastOptions: k, dir: b = ma(), gap: m = Y0, icons: $, containerAriaLabel: j = "Notifications" } = t, [O, M] = g.useState([]), C = g.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([
10053
10055
  o
10054
- ].concat(O.filter((_) => _.position).map((_) => _.position)))), [
10055
- O,
10056
+ ].concat(E.filter((_) => _.position).map((_) => _.position)))), [
10057
+ E,
10056
10058
  o
10057
- ]), [A, T] = g.useState([]), [L, z] = 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), E = g.useCallback((_) => {
10058
- 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) => {
10059
10061
  var G;
10060
10062
  return (G = H.find((le) => le.id === _.id)) != null && G.delete || Xe.dismiss(_.id), H.filter(({ id: le }) => le !== _.id);
10061
10063
  });
@@ -10063,7 +10065,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10063
10065
  return g.useEffect(() => Xe.subscribe((_) => {
10064
10066
  if (_.dismiss) {
10065
10067
  requestAnimationFrame(() => {
10066
- M((H) => H.map((G) => G.id === _.id ? {
10068
+ S((H) => H.map((G) => G.id === _.id ? {
10067
10069
  ...G,
10068
10070
  delete: !0
10069
10071
  } : G));
@@ -10072,7 +10074,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10072
10074
  }
10073
10075
  setTimeout(() => {
10074
10076
  Zl.flushSync(() => {
10075
- M((H) => {
10077
+ S((H) => {
10076
10078
  const G = H.findIndex((le) => le.id === _.id);
10077
10079
  return G !== -1 ? [
10078
10080
  ...H.slice(0, G),
@@ -10089,7 +10091,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10089
10091
  });
10090
10092
  });
10091
10093
  }), [
10092
- O
10094
+ E
10093
10095
  ]), g.useEffect(() => {
10094
10096
  if (u !== "system") {
10095
10097
  Y(u);
@@ -10113,17 +10115,17 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10113
10115
  }, [
10114
10116
  u
10115
10117
  ]), g.useEffect(() => {
10116
- O.length <= 1 && z(!1);
10118
+ E.length <= 1 && L(!1);
10117
10119
  }, [
10118
- O
10120
+ E
10119
10121
  ]), g.useEffect(() => {
10120
10122
  const _ = (H) => {
10121
10123
  var G;
10122
10124
  if (a.every((re) => H[re] || H.code === re)) {
10123
10125
  var se;
10124
- z(!0), (se = B.current) == null || se.focus();
10126
+ L(!0), (se = B.current) == null || se.focus();
10125
10127
  }
10126
- 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);
10127
10129
  };
10128
10130
  return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
10129
10131
  }, [
@@ -10140,16 +10142,16 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10140
10142
  ]), // Remove item from normal navigation flow, only available via hotkey
10141
10143
  /* @__PURE__ */ g.createElement("section", {
10142
10144
  ref: n,
10143
- "aria-label": `${j} ${Z}`,
10145
+ "aria-label": `${A} ${Z}`,
10144
10146
  tabIndex: -1,
10145
10147
  "aria-live": "polite",
10146
10148
  "aria-relevant": "additions text",
10147
10149
  "aria-atomic": "false",
10148
10150
  suppressHydrationWarning: !0
10149
- }, C.map((_, H) => {
10151
+ }, k.map((_, H) => {
10150
10152
  var G;
10151
10153
  const [le, se] = _.split("-");
10152
- return O.length ? /* @__PURE__ */ g.createElement("ol", {
10154
+ return E.length ? /* @__PURE__ */ g.createElement("ol", {
10153
10155
  key: _,
10154
10156
  dir: b === "auto" ? ma() : b,
10155
10157
  tabIndex: -1,
@@ -10158,13 +10160,13 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10158
10160
  "data-sonner-toaster": !0,
10159
10161
  "data-sonner-theme": U,
10160
10162
  "data-y-position": le,
10161
- "data-lifted": L && O.length > 1 && !i,
10163
+ "data-lifted": z && E.length > 1 && !i,
10162
10164
  "data-x-position": se,
10163
10165
  style: {
10164
- "--front-toast-height": `${((G = A[0]) == null ? void 0 : G.height) || 0}px`,
10166
+ "--front-toast-height": `${((G = j[0]) == null ? void 0 : G.height) || 0}px`,
10165
10167
  "--width": `${H0}px`,
10166
10168
  "--gap": `${m}px`,
10167
- ...x,
10169
+ ...w,
10168
10170
  ...Q0(d, f)
10169
10171
  },
10170
10172
  onBlur: (re) => {
@@ -10175,17 +10177,17 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10175
10177
  onFocus: (re) => {
10176
10178
  re.target instanceof HTMLElement && re.target.dataset.dismissible === "false" || te.current || (te.current = !0, oe.current = re.relatedTarget);
10177
10179
  },
10178
- onMouseEnter: () => z(!0),
10179
- onMouseMove: () => z(!0),
10180
+ onMouseEnter: () => L(!0),
10181
+ onMouseMove: () => L(!0),
10180
10182
  onMouseLeave: () => {
10181
- N || z(!1);
10183
+ N || L(!1);
10182
10184
  },
10183
- onDragEnd: () => z(!1),
10185
+ onDragEnd: () => L(!1),
10184
10186
  onPointerDown: (re) => {
10185
10187
  re.target instanceof HTMLElement && re.target.dataset.dismissible === "false" || W(!0);
10186
10188
  },
10187
10189
  onPointerUp: () => W(!1)
10188
- }, O.filter((re) => !re.position && H === 0 || re.position === _).map((re, we) => {
10190
+ }, E.filter((re) => !re.position && H === 0 || re.position === _).map((re, we) => {
10189
10191
  var ae, Se;
10190
10192
  return /* @__PURE__ */ g.createElement(X0, {
10191
10193
  key: re.id,
@@ -10193,27 +10195,27 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10193
10195
  index: we,
10194
10196
  toast: re,
10195
10197
  defaultRichColors: p,
10196
- duration: (ae = k?.duration) != null ? ae : v,
10197
- className: k?.className,
10198
- descriptionClassName: k?.descriptionClassName,
10198
+ duration: (ae = C?.duration) != null ? ae : v,
10199
+ className: C?.className,
10200
+ descriptionClassName: C?.descriptionClassName,
10199
10201
  invert: r,
10200
- visibleToasts: S,
10201
- closeButton: (Se = k?.closeButton) != null ? Se : s,
10202
+ visibleToasts: M,
10203
+ closeButton: (Se = C?.closeButton) != null ? Se : s,
10202
10204
  interacting: N,
10203
10205
  position: _,
10204
- style: k?.style,
10205
- unstyled: k?.unstyled,
10206
- classNames: k?.classNames,
10207
- cancelButtonStyle: k?.cancelButtonStyle,
10208
- actionButtonStyle: k?.actionButtonStyle,
10209
- closeButtonAriaLabel: k?.closeButtonAriaLabel,
10210
- removeToast: E,
10211
- toasts: O.filter((Ee) => Ee.position == re.position),
10212
- heights: A.filter((Ee) => Ee.position == re.position),
10206
+ style: C?.style,
10207
+ unstyled: C?.unstyled,
10208
+ classNames: C?.classNames,
10209
+ cancelButtonStyle: C?.cancelButtonStyle,
10210
+ actionButtonStyle: C?.actionButtonStyle,
10211
+ closeButtonAriaLabel: C?.closeButtonAriaLabel,
10212
+ removeToast: O,
10213
+ toasts: E.filter((Ee) => Ee.position == re.position),
10214
+ heights: j.filter((Ee) => Ee.position == re.position),
10213
10215
  setHeights: T,
10214
10216
  expandByDefault: i,
10215
10217
  gap: m,
10216
- expanded: L,
10218
+ expanded: z,
10217
10219
  swipeDirections: t.swipeDirections
10218
10220
  });
10219
10221
  })) : null;
@@ -10417,7 +10419,7 @@ lr.Footer = uv;
10417
10419
  lr.Aside = av;
10418
10420
  const cx = (e) => /* @__PURE__ */ l.jsx(_l, { ...e });
10419
10421
  function wv({
10420
- value: e = /* @__PURE__ */ new Date(),
10422
+ value: e,
10421
10423
  onSelect: t,
10422
10424
  minDate: n,
10423
10425
  maxDate: r,
@@ -10431,7 +10433,7 @@ function wv({
10431
10433
  disabled: o
10432
10434
  })
10433
10435
  ), i = (s) => {
10434
- t?.(new Date(s.getFullYear(), e.getMonth(), 1));
10436
+ t?.(new Date(s.getFullYear(), e.getMonth(), e.getDate()));
10435
10437
  };
10436
10438
  return /* @__PURE__ */ l.jsx(to, { variant: "light", name: e.getFullYear().toString(), children: a?.map(({ value: s, label: c, disabled: d }) => /* @__PURE__ */ l.jsx(
10437
10439
  st,
@@ -10500,15 +10502,16 @@ const kv = [
10500
10502
  min: f = new Date(2e3, 0, 1),
10501
10503
  className: u,
10502
10504
  size: p,
10503
- fullWidth: v
10504
- } = e, [x, S] = me(null), k = (j) => {
10505
- S(j.currentTarget);
10506
- }, b = () => {
10507
- S(null);
10508
- }, m = (j) => {
10509
- const O = r?.getFullYear() || (/* @__PURE__ */ new Date()).getFullYear(), M = new Date(O, j, 1);
10510
- o?.(M), b();
10511
- }, $ = a === "month" ? r?.toLocaleDateString("ru-RU", {
10505
+ fullWidth: v,
10506
+ name: w
10507
+ } = e, M = /* @__PURE__ */ new Date(), [C, b] = me(null), m = (S) => {
10508
+ b(S.currentTarget);
10509
+ }, $ = () => {
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", {
10512
10515
  month: "long",
10513
10516
  year: "numeric"
10514
10517
  }) : Mv(r);
@@ -10517,11 +10520,12 @@ const kv = [
10517
10520
  rn,
10518
10521
  {
10519
10522
  label: t,
10520
- value: $,
10523
+ value: E,
10521
10524
  disabled: n,
10522
10525
  size: p,
10523
10526
  fullWidth: v,
10524
- endAdornment: /* @__PURE__ */ l.jsx(Ze, { disabled: n, variant: "text", onClick: k, children: /* @__PURE__ */ l.jsx(_a, {}) }),
10527
+ name: w,
10528
+ endAdornment: /* @__PURE__ */ l.jsx(Ze, { disabled: n, variant: "text", onClick: m, children: /* @__PURE__ */ l.jsx(_a, {}) }),
10525
10529
  placeholder: i,
10526
10530
  error: s,
10527
10531
  helperText: c,
@@ -10531,9 +10535,9 @@ const kv = [
10531
10535
  /* @__PURE__ */ l.jsx(
10532
10536
  ro,
10533
10537
  {
10534
- open: !!x,
10535
- anchorEl: x,
10536
- onClose: b,
10538
+ open: !!C,
10539
+ anchorEl: C,
10540
+ onClose: $,
10537
10541
  anchorOrigin: {
10538
10542
  vertical: "bottom",
10539
10543
  horizontal: "right"
@@ -10546,32 +10550,32 @@ const kv = [
10546
10550
  /* @__PURE__ */ l.jsx(
10547
10551
  wv,
10548
10552
  {
10549
- value: r || /* @__PURE__ */ new Date(),
10553
+ value: r || M,
10550
10554
  onSelect: o,
10551
10555
  minDate: f,
10552
10556
  maxDate: d
10553
10557
  }
10554
10558
  ),
10555
- a === "month" ? /* @__PURE__ */ l.jsx(Sv, { children: kv.map((j, O) => /* @__PURE__ */ l.jsx(
10559
+ a === "month" ? /* @__PURE__ */ l.jsx(Sv, { children: kv.map((S, k) => /* @__PURE__ */ l.jsx(
10556
10560
  Fe,
10557
10561
  {
10558
10562
  variant: "text",
10559
10563
  size: "small",
10560
- onClick: () => m(O),
10561
- selected: r?.getMonth() === O,
10562
- children: j
10564
+ onClick: () => A(k),
10565
+ selected: r?.getMonth() === k,
10566
+ children: S
10563
10567
  },
10564
- j
10565
- )) }) : /* @__PURE__ */ l.jsx($v, { children: fs.map((j, O) => /* @__PURE__ */ l.jsx(
10568
+ S
10569
+ )) }) : /* @__PURE__ */ l.jsx($v, { children: fs.map((S, k) => /* @__PURE__ */ l.jsx(
10566
10570
  Fe,
10567
10571
  {
10568
10572
  variant: "text",
10569
10573
  size: "small",
10570
- onClick: () => m(O * 3),
10571
- selected: ps(r?.getMonth() || 0) === O,
10572
- children: j
10574
+ onClick: () => A(k * 3),
10575
+ selected: ps(r?.getMonth() || 0) === k,
10576
+ children: S
10573
10577
  },
10574
- j
10578
+ S
10575
10579
  )) })
10576
10580
  ] })
10577
10581
  }
@@ -10961,16 +10965,16 @@ function gx({
10961
10965
  }) {
10962
10966
  const [d, f] = me(e), [u, p] = me(t), v = (m, $) => {
10963
10967
  Array.isArray($) && (f($[0]), p($[1]));
10964
- }, x = (m) => {
10968
+ }, w = (m) => {
10965
10969
  const { value: $ } = m.target;
10966
10970
  Number.isNaN(+$) || f(+$);
10967
- }, S = (m) => {
10971
+ }, M = (m) => {
10968
10972
  const { value: $ } = m.target;
10969
10973
  Number.isNaN(+$) || p(+$);
10970
- }, k = (m) => {
10974
+ }, C = (m) => {
10971
10975
  if (m.key === "Enter") {
10972
- const $ = d >= e && d <= t ? d : e, j = u >= e && u <= t ? u : t;
10973
- n($, j);
10976
+ const $ = d >= e && d <= t ? d : e, A = u >= e && u <= t ? u : t;
10977
+ n($, A);
10974
10978
  }
10975
10979
  }, b = (m, $) => {
10976
10980
  Array.isArray($) && n($[0], $[1]);
@@ -10987,8 +10991,8 @@ function gx({
10987
10991
  type: "text",
10988
10992
  name: "minVal",
10989
10993
  value: d,
10990
- onChange: x,
10991
- onKeyDown: k
10994
+ onChange: w,
10995
+ onKeyDown: C
10992
10996
  }
10993
10997
  ),
10994
10998
  /* @__PURE__ */ l.jsx(va, { children: "до" }),
@@ -10998,8 +11002,8 @@ function gx({
10998
11002
  type: "text",
10999
11003
  name: "minVal",
11000
11004
  value: u,
11001
- onChange: S,
11002
- onKeyDown: k
11005
+ onChange: M,
11006
+ onKeyDown: C
11003
11007
  }
11004
11008
  ),
11005
11009
  /* @__PURE__ */ l.jsx(Gv, { children: /* @__PURE__ */ l.jsx(
@@ -11054,7 +11058,7 @@ const Uv = y(zs)`
11054
11058
  f(b.target.value), u.current && clearTimeout(u.current), u.current = setTimeout(() => {
11055
11059
  n?.(b);
11056
11060
  }, i);
11057
- }, x = () => {
11061
+ }, w = () => {
11058
11062
  f(""), p.current && (p.current.value = ""), u.current && clearTimeout(u.current);
11059
11063
  const b = new InputEvent("input", {
11060
11064
  bubbles: !0,
@@ -11064,23 +11068,23 @@ const Uv = y(zs)`
11064
11068
  writable: !0,
11065
11069
  value: p.current
11066
11070
  }), n?.(b), p.current?.focus();
11067
- }, S = () => {
11071
+ }, M = () => {
11068
11072
  p.current?.focus();
11069
- }, k = !!d.length;
11073
+ }, C = !!d.length;
11070
11074
  return /* @__PURE__ */ l.jsx(
11071
11075
  Xv,
11072
11076
  {
11073
11077
  margin: e,
11074
11078
  placeholder: t,
11075
- startAdornment: /* @__PURE__ */ l.jsx(Uv, { onClick: S }),
11079
+ startAdornment: /* @__PURE__ */ l.jsx(Uv, { onClick: M }),
11076
11080
  disabled: r,
11077
11081
  endAdornment: /* @__PURE__ */ l.jsx(
11078
11082
  qv,
11079
11083
  {
11080
11084
  variant: "text",
11081
- onClick: x,
11082
- disabled: r || !k,
11083
- $isActive: k,
11085
+ onClick: w,
11086
+ disabled: r || !C,
11087
+ $isActive: C,
11084
11088
  children: /* @__PURE__ */ l.jsx(Qv, {})
11085
11089
  }
11086
11090
  ),
@@ -11513,9 +11517,9 @@ function hb(e) {
11513
11517
  enumerable: !0,
11514
11518
  get: () => R(c.errors, n)
11515
11519
  }
11516
- }), [c, n]), p = g.useCallback((k) => f.current.onChange({
11520
+ }), [c, n]), p = g.useCallback((C) => f.current.onChange({
11517
11521
  target: {
11518
- value: ms(k),
11522
+ value: ms(C),
11519
11523
  name: n
11520
11524
  },
11521
11525
  type: Qn.CHANGE
@@ -11525,33 +11529,33 @@ function hb(e) {
11525
11529
  name: n
11526
11530
  },
11527
11531
  type: Qn.BLUR
11528
- }), [n, o._formValues]), x = g.useCallback((k) => {
11532
+ }), [n, o._formValues]), w = g.useCallback((C) => {
11529
11533
  const b = R(o._fields, n);
11530
- b && k && (b._f.ref = k);
11531
- }, [o._fields, n]), S = g.useMemo(() => ({
11534
+ b && C && (b._f.ref = C);
11535
+ }, [o._fields, n]), M = g.useMemo(() => ({
11532
11536
  name: n,
11533
11537
  value: s,
11534
11538
  ...et(r) || c.disabled ? { disabled: c.disabled || r } : {},
11535
11539
  onChange: p,
11536
11540
  onBlur: v,
11537
- ref: x
11538
- }), [n, r, c.disabled, p, v, x, s]);
11541
+ ref: w
11542
+ }), [n, r, c.disabled, p, v, w, s]);
11539
11543
  return g.useEffect(() => {
11540
- const k = o._options.shouldUnregister || a;
11544
+ const C = o._options.shouldUnregister || a;
11541
11545
  o.register(n, {
11542
11546
  ...d.current.rules,
11543
11547
  ...et(d.current.disabled) ? { disabled: d.current.disabled } : {}
11544
11548
  });
11545
11549
  const b = (m, $) => {
11546
- const j = R(o._fields, m);
11547
- j && j._f && (j._f.mount = $);
11550
+ const A = R(o._fields, m);
11551
+ A && A._f && (A._f.mount = $);
11548
11552
  };
11549
- if (b(n, !0), k) {
11553
+ if (b(n, !0), C) {
11550
11554
  const m = Me(R(o._options.defaultValues, n));
11551
11555
  pe(o._defaultValues, n, m), xe(R(o._formValues, n)) && pe(o._formValues, n, m);
11552
11556
  }
11553
11557
  return !i && o.register(n), () => {
11554
- (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);
11555
11559
  };
11556
11560
  }, [n, o, i, a]), g.useEffect(() => {
11557
11561
  o._setDisabledField({
@@ -11559,10 +11563,10 @@ function hb(e) {
11559
11563
  name: n
11560
11564
  });
11561
11565
  }, [r, n, o]), g.useMemo(() => ({
11562
- field: S,
11566
+ field: M,
11563
11567
  formState: c,
11564
11568
  fieldState: u
11565
- }), [S, c, u]);
11569
+ }), [M, c, u]);
11566
11570
  }
11567
11571
  const _n = (e) => e.render(hb(e));
11568
11572
  var gb = (e, t, n, r, o) => t ? {
@@ -11765,29 +11769,29 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
11765
11769
  value: e,
11766
11770
  message: ""
11767
11771
  }, Hr = async (e, t, n, r, o, a) => {
11768
- const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: v, validate: x, name: S, valueAsNumber: k, mount: b } = e._f, m = R(n, S);
11769
- if (!b || t.has(S))
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))
11770
11774
  return {};
11771
- const $ = s ? s[0] : i, j = (N) => {
11775
+ const $ = s ? s[0] : i, A = (N) => {
11772
11776
  o && $.reportValidity && ($.setCustomValidity(et(N) ? "" : N || ""), $.reportValidity());
11773
- }, O = {}, M = ho(i), C = Tn(i), A = M || C, T = (k || po(i)) && xe(i.value) && xe(m) || Zn(i) && i.value === "" || m === "" || Array.isArray(m) && !m.length, L = gb.bind(null, S, r, O), z = (N, W, U, Y = Ct.maxLength, B = Ct.minLength) => {
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) => {
11774
11778
  const Z = N ? W : U;
11775
- O[S] = {
11779
+ E[M] = {
11776
11780
  type: N ? Y : B,
11777
11781
  message: Z,
11778
11782
  ref: i,
11779
- ...L(N ? Y : B, Z)
11783
+ ...z(N ? Y : B, Z)
11780
11784
  };
11781
11785
  };
11782
- if (a ? !Array.isArray(m) || !m.length : c && (!A && (T || Ge(m)) || et(m) && !m || 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)) {
11783
11787
  const { value: N, message: W } = Yn(c) ? { value: !!c, message: c } : Jt(c);
11784
- if (N && (O[S] = {
11788
+ if (N && (E[M] = {
11785
11789
  type: Ct.required,
11786
11790
  message: W,
11787
11791
  ref: $,
11788
- ...L(Ct.required, W)
11792
+ ...z(Ct.required, W)
11789
11793
  }, !r))
11790
- return j(W), O;
11794
+ return A(W), E;
11791
11795
  }
11792
11796
  if (!T && (!Ge(u) || !Ge(p))) {
11793
11797
  let N, W;
@@ -11796,54 +11800,54 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
11796
11800
  const B = i.valueAsNumber || m && +m;
11797
11801
  Ge(U.value) || (N = B > U.value), Ge(Y.value) || (W = B < Y.value);
11798
11802
  } else {
11799
- const B = i.valueAsDate || new Date(m), Z = (E) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + E), oe = i.type == "time", te = i.type == "week";
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";
11800
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));
11801
11805
  }
11802
- if ((N || W) && (z(!!N, U.message, Y.message, Ct.max, Ct.min), !r))
11803
- return j(O[S].message), O;
11806
+ if ((N || W) && (L(!!N, U.message, Y.message, Ct.max, Ct.min), !r))
11807
+ return A(E[M].message), E;
11804
11808
  }
11805
11809
  if ((d || f) && !T && (wt(m) || a && Array.isArray(m))) {
11806
11810
  const N = Jt(d), W = Jt(f), U = !Ge(N.value) && m.length > +N.value, Y = !Ge(W.value) && m.length < +W.value;
11807
- if ((U || Y) && (z(U, N.message, W.message), !r))
11808
- return j(O[S].message), O;
11811
+ if ((U || Y) && (L(U, N.message, W.message), !r))
11812
+ return A(E[M].message), E;
11809
11813
  }
11810
11814
  if (v && !T && wt(m)) {
11811
11815
  const { value: N, message: W } = Jt(v);
11812
- if (Kn(N) && !m.match(N) && (O[S] = {
11816
+ if (Kn(N) && !m.match(N) && (E[M] = {
11813
11817
  type: Ct.pattern,
11814
11818
  message: W,
11815
11819
  ref: i,
11816
- ...L(Ct.pattern, W)
11820
+ ...z(Ct.pattern, W)
11817
11821
  }, !r))
11818
- return j(W), O;
11822
+ return A(W), E;
11819
11823
  }
11820
- if (x) {
11821
- if (pt(x)) {
11822
- const N = await x(m, n), W = Oa(N, $);
11823
- if (W && (O[S] = {
11824
+ if (w) {
11825
+ if (pt(w)) {
11826
+ const N = await w(m, n), W = Oa(N, $);
11827
+ if (W && (E[M] = {
11824
11828
  ...W,
11825
- ...L(Ct.validate, W.message)
11829
+ ...z(Ct.validate, W.message)
11826
11830
  }, !r))
11827
- return j(W.message), O;
11828
- } else if (je(x)) {
11831
+ return A(W.message), E;
11832
+ } else if (je(w)) {
11829
11833
  let N = {};
11830
- for (const W in x) {
11834
+ for (const W in w) {
11831
11835
  if (!Ve(N) && !r)
11832
11836
  break;
11833
- const U = Oa(await x[W](m, n), $, W);
11837
+ const U = Oa(await w[W](m, n), $, W);
11834
11838
  U && (N = {
11835
11839
  ...U,
11836
- ...L(W, U.message)
11837
- }, j(U.message), r && (O[S] = N));
11840
+ ...z(W, U.message)
11841
+ }, A(U.message), r && (E[M] = N));
11838
11842
  }
11839
- if (!Ve(N) && (O[S] = {
11843
+ if (!Ve(N) && (E[M] = {
11840
11844
  ref: $,
11841
11845
  ...N
11842
11846
  }, !r))
11843
- return O;
11847
+ return E;
11844
11848
  }
11845
11849
  }
11846
- return j(!0), O;
11850
+ return A(!0), E;
11847
11851
  };
11848
11852
  const Mb = {
11849
11853
  mode: at.onSubmit,
@@ -11897,23 +11901,23 @@ function Db(e = {}) {
11897
11901
  const p = {
11898
11902
  array: wa(),
11899
11903
  state: wa()
11900
- }, v = en(t.mode), x = en(t.reValidateMode), S = t.criteriaMode === at.all, k = (h) => (w) => {
11901
- 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);
11902
11906
  }, b = async (h) => {
11903
11907
  if (!t.disabled && (f.isValid || u.isValid || h)) {
11904
- const w = t.resolver ? Ve((await T()).errors) : await z(r, !0);
11905
- w !== n.isValid && p.state.next({
11906
- 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
11907
11911
  });
11908
11912
  }
11909
- }, m = (h, w) => {
11913
+ }, m = (h, x) => {
11910
11914
  !t.disabled && (f.isValidating || f.validatingFields || u.isValidating || u.validatingFields) && ((h || Array.from(s.mount)).forEach((D) => {
11911
- D && (w ? pe(n.validatingFields, D, w) : Ae(n.validatingFields, D));
11915
+ D && (x ? pe(n.validatingFields, D, x) : Ae(n.validatingFields, D));
11912
11916
  }), p.state.next({
11913
11917
  validatingFields: n.validatingFields,
11914
11918
  isValidating: !Ve(n.validatingFields)
11915
11919
  }));
11916
- }, $ = (h, w = [], D, I, F = !0, P = !0) => {
11920
+ }, $ = (h, x = [], D, I, F = !0, P = !0) => {
11917
11921
  if (I && D && !t.disabled) {
11918
11922
  if (i.action = !0, P && Array.isArray(R(r, h))) {
11919
11923
  const V = D(R(r, h), I.argA, I.argB);
@@ -11929,29 +11933,29 @@ function Db(e = {}) {
11929
11933
  }
11930
11934
  (f.dirtyFields || u.dirtyFields) && (n.dirtyFields = fn(o, a)), p.state.next({
11931
11935
  name: h,
11932
- isDirty: W(h, w),
11936
+ isDirty: W(h, x),
11933
11937
  dirtyFields: n.dirtyFields,
11934
11938
  errors: n.errors,
11935
11939
  isValid: n.isValid
11936
11940
  });
11937
11941
  } else
11938
- pe(a, h, w);
11939
- }, j = (h, w) => {
11940
- 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({
11941
11945
  errors: n.errors
11942
11946
  });
11943
- }, O = (h) => {
11947
+ }, E = (h) => {
11944
11948
  n.errors = h, p.state.next({
11945
11949
  errors: n.errors,
11946
11950
  isValid: !1
11947
11951
  });
11948
- }, M = (h, w, D, I) => {
11952
+ }, S = (h, x, D, I) => {
11949
11953
  const F = R(r, h);
11950
11954
  if (F) {
11951
11955
  const P = R(a, h, xe(D) ? R(o, h) : D);
11952
- 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();
11953
11957
  }
11954
- }, C = (h, w, D, I, F) => {
11958
+ }, k = (h, x, D, I, F) => {
11955
11959
  let P = !1, V = !1;
11956
11960
  const ne = {
11957
11961
  name: h
@@ -11959,7 +11963,7 @@ function Db(e = {}) {
11959
11963
  if (!t.disabled) {
11960
11964
  if (!D || I) {
11961
11965
  (f.isDirty || u.isDirty) && (V = n.isDirty, n.isDirty = ne.isDirty = W(), P = V !== ne.isDirty);
11962
- const ue = Tt(R(o, h), w);
11966
+ const ue = Tt(R(o, h), x);
11963
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;
11964
11968
  }
11965
11969
  if (D) {
@@ -11969,12 +11973,12 @@ function Db(e = {}) {
11969
11973
  P && F && p.state.next(ne);
11970
11974
  }
11971
11975
  return P ? ne : {};
11972
- }, A = (h, w, D, I) => {
11973
- const F = R(n.errors, h), P = (f.isValid || u.isValid) && et(w) && n.isValid !== w;
11974
- if (t.delayError && D ? (c = k(() => j(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) {
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) {
11975
11979
  const V = {
11976
11980
  ...I,
11977
- ...P && et(w) ? { isValid: w } : {},
11981
+ ...P && et(x) ? { isValid: x } : {},
11978
11982
  errors: n.errors,
11979
11983
  name: h
11980
11984
  };
@@ -11985,19 +11989,19 @@ function Db(e = {}) {
11985
11989
  }
11986
11990
  }, T = async (h) => {
11987
11991
  m(h, !0);
11988
- const w = await t.resolver(a, t.context, bb(h || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
11989
- return m(h), w;
11990
- }, L = async (h) => {
11991
- const { errors: w } = await T(h);
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);
11992
11996
  if (h)
11993
11997
  for (const D of h) {
11994
- const I = R(w, D);
11998
+ const I = R(x, D);
11995
11999
  I ? pe(n.errors, D, I) : Ae(n.errors, D);
11996
12000
  }
11997
12001
  else
11998
- n.errors = w;
11999
- return w;
12000
- }, z = async (h, w, D = {
12002
+ n.errors = x;
12003
+ return x;
12004
+ }, L = async (h, x, D = {
12001
12005
  valid: !0
12002
12006
  }) => {
12003
12007
  for (const I in h) {
@@ -12007,41 +12011,41 @@ function Db(e = {}) {
12007
12011
  if (P) {
12008
12012
  const ne = s.array.has(P.name), ue = F._f && xb(F._f);
12009
12013
  ue && f.validatingFields && m([I], !0);
12010
- const Ce = await Hr(F, s.disabled, a, S, t.shouldUseNativeValidation && !w, ne);
12011
- if (ue && f.validatingFields && m([I]), Ce[P.name] && (D.valid = !1, w))
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))
12012
12016
  break;
12013
- !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));
12014
12018
  }
12015
- !Ve(V) && await z(V, w, D);
12019
+ !Ve(V) && await L(V, x, D);
12016
12020
  }
12017
12021
  }
12018
12022
  return D.valid;
12019
12023
  }, N = () => {
12020
12024
  for (const h of s.unMount) {
12021
- const w = R(r, h);
12022
- 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);
12023
12027
  }
12024
12028
  s.unMount = /* @__PURE__ */ new Set();
12025
- }, W = (h, w) => !t.disabled && (h && w && pe(a, h, w), !Tt(H(), o)), U = (h, w, D) => ws(h, s, {
12026
- ...i.mount ? a : xe(w) ? o : wt(h) ? { [h]: w } : w
12027
- }, 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 = {}) => {
12028
12032
  const I = R(r, h);
12029
- let F = w;
12033
+ let F = x;
12030
12034
  if (I) {
12031
12035
  const P = I._f;
12032
- P && (!P.disabled && pe(a, h, Ms(w, P)), F = Zn(P.ref) && Ge(w) ? "" : w, 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({
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({
12033
12037
  name: h,
12034
12038
  values: Me(a)
12035
12039
  })));
12036
12040
  }
12037
- (D.shouldDirty || D.shouldTouch) && C(h, F, D.shouldTouch, D.shouldDirty, !0), D.shouldValidate && _(h);
12038
- }, Z = (h, w, D) => {
12039
- for (const I in w) {
12040
- const F = w[I], P = `${h}.${I}`, V = R(r, P);
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);
12041
12045
  (s.array.has(h) || je(F) || V && !V._f) && !zt(F) ? Z(P, F, D) : B(P, F, D);
12042
12046
  }
12043
- }, oe = (h, w, D = {}) => {
12044
- 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);
12045
12049
  pe(a, h, P), F ? (p.array.next({
12046
12050
  name: h,
12047
12051
  values: Me(a)
@@ -12055,16 +12059,16 @@ function Db(e = {}) {
12055
12059
  });
12056
12060
  }, te = async (h) => {
12057
12061
  i.mount = !0;
12058
- const w = h.target;
12059
- let D = w.name, I = !0;
12062
+ const x = h.target;
12063
+ let D = x.name, I = !0;
12060
12064
  const F = R(r, D), P = (V) => {
12061
12065
  I = Number.isNaN(V) || zt(V) && isNaN(V.getTime()) || Tt(V, R(a, D, V));
12062
12066
  };
12063
12067
  if (F) {
12064
12068
  let V, ne;
12065
- 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);
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);
12066
12070
  pe(a, D, ue), Ce ? (F._f.onBlur && F._f.onBlur(h), c && c(0)) : F._f.onChange && F._f.onChange(h);
12067
- const de = C(D, ue, Ce), ce = !Ve(de) || Q;
12071
+ const de = k(D, ue, Ce), ce = !Ve(de) || Q;
12068
12072
  if (!Ce && p.state.next({
12069
12073
  name: D,
12070
12074
  type: h.type,
@@ -12078,61 +12082,61 @@ function Db(e = {}) {
12078
12082
  V = ut.error, D = ut.name, ne = Ve(qe);
12079
12083
  }
12080
12084
  } else
12081
- m([D], !0), V = (await Hr(F, s.disabled, a, S, t.shouldUseNativeValidation))[D], m([D]), P(ue), I && (V ? ne = !1 : (f.isValid || u.isValid) && (ne = await z(r, !0)));
12082
- I && (F._f.deps && _(F._f.deps), A(D, ne, V, 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));
12083
12087
  }
12084
- }, E = (h, w) => {
12085
- if (R(n.errors, w) && h.focus)
12088
+ }, O = (h, x) => {
12089
+ if (R(n.errors, x) && h.focus)
12086
12090
  return h.focus(), 1;
12087
- }, _ = async (h, w = {}) => {
12091
+ }, _ = async (h, x = {}) => {
12088
12092
  let D, I;
12089
12093
  const F = Qe(h);
12090
12094
  if (t.resolver) {
12091
- const P = await L(xe(h) ? h : F);
12095
+ const P = await z(xe(h) ? h : F);
12092
12096
  D = Ve(P), I = h ? !F.some((V) => R(P, V)) : D;
12093
12097
  } else h ? (I = (await Promise.all(F.map(async (P) => {
12094
12098
  const V = R(r, P);
12095
- return await z(V && V._f ? { [P]: V } : V);
12096
- }))).every(Boolean), !(!I && !n.isValid) && b()) : I = D = await z(r);
12099
+ return await L(V && V._f ? { [P]: V } : V);
12100
+ }))).every(Boolean), !(!I && !n.isValid) && b()) : I = D = await L(r);
12097
12101
  return p.state.next({
12098
12102
  ...!wt(h) || (f.isValid || u.isValid) && D !== n.isValid ? {} : { name: h },
12099
12103
  ...t.resolver || !h ? { isValid: D } : {},
12100
12104
  errors: n.errors
12101
- }), w.shouldFocus && !I && nn(r, E, h ? F : s.mount), I;
12105
+ }), x.shouldFocus && !I && nn(r, O, h ? F : s.mount), I;
12102
12106
  }, H = (h) => {
12103
- const w = {
12107
+ const x = {
12104
12108
  ...i.mount ? a : o
12105
12109
  };
12106
- return xe(h) ? w : wt(h) ? R(w, h) : h.map((D) => R(w, D));
12107
- }, G = (h, w) => ({
12108
- invalid: !!R((w || n).errors, h),
12109
- isDirty: !!R((w || n).dirtyFields, h),
12110
- 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),
12111
12115
  isValidating: !!R(n.validatingFields, h),
12112
- isTouched: !!R((w || n).touchedFields, h)
12116
+ isTouched: !!R((x || n).touchedFields, h)
12113
12117
  }), le = (h) => {
12114
- 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({
12115
12119
  errors: h ? n.errors : {}
12116
12120
  });
12117
- }, se = (h, w, D) => {
12121
+ }, se = (h, x, D) => {
12118
12122
  const I = (R(r, h, { _f: {} })._f || {}).ref, F = R(n.errors, h) || {}, { ref: P, message: V, type: ne, ...ue } = F;
12119
12123
  pe(n.errors, h, {
12120
12124
  ...ue,
12121
- ...w,
12125
+ ...x,
12122
12126
  ref: I
12123
12127
  }), p.state.next({
12124
12128
  name: h,
12125
12129
  errors: n.errors,
12126
12130
  isValid: !1
12127
12131
  }), D && D.shouldFocus && I && I.focus && I.focus();
12128
- }, re = (h, w) => pt(h) ? p.state.subscribe({
12129
- next: (D) => h(U(void 0, w), D)
12130
- }) : U(h, w, !0), we = (h) => p.state.subscribe({
12131
- next: (w) => {
12132
- 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({
12133
12137
  values: { ...a },
12134
12138
  ...n,
12135
- ...w
12139
+ ...x
12136
12140
  });
12137
12141
  }
12138
12142
  }).unsubscribe, ae = (h) => (i.mount = !0, u = {
@@ -12141,47 +12145,47 @@ function Db(e = {}) {
12141
12145
  }, we({
12142
12146
  ...h,
12143
12147
  formState: u
12144
- })), Se = (h, w = {}) => {
12148
+ })), Se = (h, x = {}) => {
12145
12149
  for (const D of h ? Qe(h) : s.mount)
12146
- 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);
12147
12151
  p.state.next({
12148
12152
  values: Me(a)
12149
12153
  }), p.state.next({
12150
12154
  ...n,
12151
- ...w.keepDirty ? { isDirty: W() } : {}
12152
- }), !w.keepIsValid && b();
12153
- }, Ee = ({ disabled: h, name: w }) => {
12154
- (et(h) && i.mount || h || s.disabled.has(w)) && (h ? s.disabled.add(w) : s.disabled.delete(w));
12155
- }, 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 = {}) => {
12156
12160
  let D = R(r, h);
12157
- const I = et(w.disabled) || et(t.disabled);
12161
+ const I = et(x.disabled) || et(t.disabled);
12158
12162
  return pe(r, h, {
12159
12163
  ...D || {},
12160
12164
  _f: {
12161
12165
  ...D && D._f ? D._f : { ref: { name: h } },
12162
12166
  name: h,
12163
12167
  mount: !0,
12164
- ...w
12168
+ ...x
12165
12169
  }
12166
12170
  }), s.mount.add(h), D ? Ee({
12167
- disabled: et(w.disabled) ? w.disabled : t.disabled,
12171
+ disabled: et(x.disabled) ? x.disabled : t.disabled,
12168
12172
  name: h
12169
- }) : M(h, !0, w.value), {
12170
- ...I ? { disabled: w.disabled || t.disabled } : {},
12173
+ }) : S(h, !0, x.value), {
12174
+ ...I ? { disabled: x.disabled || t.disabled } : {},
12171
12175
  ...t.progressive ? {
12172
- required: !!w.required,
12173
- min: pn(w.min),
12174
- max: pn(w.max),
12175
- minLength: pn(w.minLength),
12176
- maxLength: pn(w.maxLength),
12177
- 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)
12178
12182
  } : {},
12179
12183
  name: h,
12180
12184
  onChange: te,
12181
12185
  onBlur: te,
12182
12186
  ref: (F) => {
12183
12187
  if (F) {
12184
- Ue(h, w), D = R(r, h);
12188
+ Ue(h, x), D = R(r, h);
12185
12189
  const P = xe(F.value) && F.querySelectorAll && F.querySelectorAll("input,select,textarea")[0] || F, V = mb(P), ne = D._f.refs || [];
12186
12190
  if (V ? ne.find((ue) => ue === P) : P === D._f.ref)
12187
12191
  return;
@@ -12197,19 +12201,19 @@ function Db(e = {}) {
12197
12201
  ref: { type: P.type, name: h }
12198
12202
  } : { ref: P }
12199
12203
  }
12200
- }), M(h, !1, void 0, P);
12204
+ }), S(h, !1, void 0, P);
12201
12205
  } else
12202
- 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);
12203
12207
  }
12204
12208
  };
12205
- }, lt = () => t.shouldFocusError && nn(r, E, s.mount), Wt = (h) => {
12206
- et(h) && (p.state.next({ disabled: h }), nn(r, (w, D) => {
12209
+ }, lt = () => t.shouldFocusError && nn(r, O, s.mount), Wt = (h) => {
12210
+ et(h) && (p.state.next({ disabled: h }), nn(r, (x, D) => {
12207
12211
  const I = R(r, D);
12208
- 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) => {
12209
12213
  F.disabled = I._f.disabled || h;
12210
12214
  }));
12211
12215
  }, 0, !1));
12212
- }, q = (h, w) => async (D) => {
12216
+ }, q = (h, x) => async (D) => {
12213
12217
  let I;
12214
12218
  D && (D.preventDefault && D.preventDefault(), D.persist && D.persist());
12215
12219
  let F = Me(a);
@@ -12219,7 +12223,7 @@ function Db(e = {}) {
12219
12223
  const { errors: P, values: V } = await T();
12220
12224
  n.errors = P, F = V;
12221
12225
  } else
12222
- await z(r);
12226
+ await L(r);
12223
12227
  if (s.disabled.size)
12224
12228
  for (const P of s.disabled)
12225
12229
  pe(F, P, void 0);
@@ -12233,7 +12237,7 @@ function Db(e = {}) {
12233
12237
  I = P;
12234
12238
  }
12235
12239
  } else
12236
- w && await w({ ...n.errors }, D), lt(), setTimeout(lt);
12240
+ x && await x({ ...n.errors }, D), lt(), setTimeout(lt);
12237
12241
  if (p.state.next({
12238
12242
  isSubmitted: !0,
12239
12243
  isSubmitting: !1,
@@ -12242,12 +12246,12 @@ function Db(e = {}) {
12242
12246
  errors: n.errors
12243
12247
  }), I)
12244
12248
  throw I;
12245
- }, J = (h, w = {}) => {
12246
- 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 }));
12247
- }, $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 = {}) => {
12248
12252
  const D = h ? Me(h) : o, I = Me(D), F = Ve(h), P = F ? o : I;
12249
- if (w.keepDefaultValues || (o = D), !w.keepValues) {
12250
- if (w.keepDirtyValues) {
12253
+ if (x.keepDefaultValues || (o = D), !x.keepValues) {
12254
+ if (x.keepDirtyValues) {
12251
12255
  const V = /* @__PURE__ */ new Set([
12252
12256
  ...s.mount,
12253
12257
  ...Object.keys(fn(o, a))
@@ -12279,28 +12283,28 @@ function Db(e = {}) {
12279
12283
  });
12280
12284
  }
12281
12285
  s = {
12282
- mount: w.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
12286
+ mount: x.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
12283
12287
  unMount: /* @__PURE__ */ new Set(),
12284
12288
  array: /* @__PURE__ */ new Set(),
12285
12289
  disabled: /* @__PURE__ */ new Set(),
12286
12290
  watch: /* @__PURE__ */ new Set(),
12287
12291
  watchAll: !1,
12288
12292
  focus: ""
12289
- }, i.mount = !f.isValid || !!w.keepIsValid || !!w.keepDirtyValues, i.watch = !!t.shouldUnregister, p.state.next({
12290
- submitCount: w.keepSubmitCount ? n.submitCount : 0,
12291
- isDirty: F ? !1 : w.keepDirty ? n.isDirty : !!(w.keepDefaultValues && !Tt(h, o)),
12292
- isSubmitted: w.keepIsSubmitted ? n.isSubmitted : !1,
12293
- dirtyFields: F ? {} : w.keepDirtyValues ? w.keepDefaultValues && a ? fn(o, a) : n.dirtyFields : w.keepDefaultValues && h ? fn(o, h) : w.keepDirty ? n.dirtyFields : {},
12294
- touchedFields: w.keepTouched ? n.touchedFields : {},
12295
- errors: w.keepErrors ? n.errors : {},
12296
- 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,
12297
12301
  isSubmitting: !1
12298
12302
  });
12299
- }, 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 = {}) => {
12300
12304
  const D = R(r, h), I = D && D._f;
12301
12305
  if (I) {
12302
12306
  const F = I.refs ? I.refs[0] : I.ref;
12303
- F.focus && (F.focus(), w.shouldSelect && pt(F.select) && F.select());
12307
+ F.focus && (F.focus(), x.shouldSelect && pt(F.select) && F.select());
12304
12308
  }
12305
12309
  }, ie = (h) => {
12306
12310
  n = {
@@ -12321,7 +12325,7 @@ function Db(e = {}) {
12321
12325
  _setValid: b,
12322
12326
  _setFieldArray: $,
12323
12327
  _setDisabledField: Ee,
12324
- _setErrors: O,
12328
+ _setErrors: E,
12325
12329
  _getFieldArray: Y,
12326
12330
  _reset: $e,
12327
12331
  _resetDefaultValues: () => pt(t.defaultValues) && t.defaultValues().then((h) => {
@@ -12422,100 +12426,100 @@ var Er = (e, t) => xe(t) ? [] : Ob(e, Qe(t).sort((n, r) => n - r)), jr = (e, t,
12422
12426
  function Mx(e) {
12423
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);
12424
12428
  u.current = r, f.current = s, n._names.array.add(r), i && n.register(r, i), g.useEffect(() => n._subjects.array.subscribe({
12425
- next: ({ values: M, name: C }) => {
12426
- if (C === u.current || !C) {
12427
- const A = R(M, u.current);
12428
- Array.isArray(A) && (c(A), d.current = A.map(jt));
12429
+ next: ({ values: S, name: k }) => {
12430
+ if (k === u.current || !k) {
12431
+ const j = R(S, u.current);
12432
+ Array.isArray(j) && (c(j), d.current = j.map(jt));
12429
12433
  }
12430
12434
  }
12431
12435
  }).unsubscribe, [n]);
12432
- const v = g.useCallback((M) => {
12433
- p.current = !0, n._setFieldArray(r, M);
12434
- }, [n, r]), x = (M, C) => {
12435
- const A = Qe(Me(M)), T = Sr(n._getFieldArray(r), A);
12436
- n._names.focus = Cr(r, T.length - 1, C), d.current = Sr(d.current, A.map(jt)), v(T), c(T), n._setFieldArray(r, T, Sr, {
12437
- 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)
12438
12442
  });
12439
- }, S = (M, C) => {
12440
- const A = Qe(Me(M)), T = Or(n._getFieldArray(r), A);
12441
- n._names.focus = Cr(r, 0, C), d.current = Or(d.current, A.map(jt)), v(T), c(T), n._setFieldArray(r, T, Or, {
12442
- 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)
12443
12447
  });
12444
- }, k = (M) => {
12445
- const C = Er(n._getFieldArray(r), M);
12446
- 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, {
12447
- 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
12448
12452
  });
12449
- }, b = (M, C, A) => {
12450
- const T = Qe(Me(C)), L = Mr(n._getFieldArray(r), M, T);
12451
- n._names.focus = Cr(r, M, A), d.current = Mr(d.current, M, T.map(jt)), v(L), c(L), n._setFieldArray(r, L, Mr, {
12452
- argA: M,
12453
- 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)
12454
12458
  });
12455
- }, m = (M, C) => {
12456
- const A = n._getFieldArray(r);
12457
- jr(A, M, C), jr(d.current, M, C), v(A), c(A), n._setFieldArray(r, A, jr, {
12458
- argA: M,
12459
- argB: C
12459
+ }, m = (S, k) => {
12460
+ const j = n._getFieldArray(r);
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
12460
12464
  }, !1);
12461
- }, $ = (M, C) => {
12462
- const A = n._getFieldArray(r);
12463
- Dr(A, M, C), Dr(d.current, M, C), v(A), c(A), n._setFieldArray(r, A, Dr, {
12464
- argA: M,
12465
- argB: C
12465
+ }, $ = (S, k) => {
12466
+ const j = n._getFieldArray(r);
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
12466
12470
  }, !1);
12467
- }, j = (M, C) => {
12468
- const A = Me(C), T = Ea(n._getFieldArray(r), M, A);
12469
- d.current = [...T].map((L, z) => !L || z === M ? jt() : d.current[z]), v(T), c([...T]), n._setFieldArray(r, T, Ea, {
12470
- argA: M,
12471
- argB: A
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,
12475
+ argB: j
12472
12476
  }, !0, !1);
12473
- }, O = (M) => {
12474
- const C = Qe(Me(M));
12475
- d.current = C.map(jt), v([...C]), c([...C]), n._setFieldArray(r, [...C], (A) => A, {}, !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);
12476
12480
  };
12477
12481
  return g.useEffect(() => {
12478
12482
  if (n._state.action = !1, zr(r, n._names) && n._subjects.state.next({
12479
12483
  ...n._formState
12480
12484
  }), p.current && (!en(n._options.mode).isOnSubmit || n._formState.isSubmitted) && !en(n._options.reValidateMode).isOnSubmit)
12481
12485
  if (n._options.resolver)
12482
- n._runSchema([r]).then((M) => {
12483
- const C = R(M.errors, r), A = R(n._formState.errors, r);
12484
- (A ? !C && A.type || C && (A.type !== C.type || A.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({
12485
12489
  errors: n._formState.errors
12486
12490
  }));
12487
12491
  });
12488
12492
  else {
12489
- const M = R(n._fields, r);
12490
- 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({
12491
- 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)
12492
12496
  }));
12493
12497
  }
12494
12498
  n._subjects.state.next({
12495
12499
  name: r,
12496
12500
  values: Me(n._formValues)
12497
- }), n._names.focus && nn(n._fields, (M, C) => {
12498
- if (n._names.focus && C.startsWith(n._names.focus) && M.focus)
12499
- 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;
12500
12504
  }), n._names.focus = "", n._setValid(), p.current = !1;
12501
12505
  }, [s, r, n]), g.useEffect(() => (!R(n._formValues, r) && n._setFieldArray(r), () => {
12502
- const M = (C, A) => {
12503
- const T = R(n._fields, C);
12504
- T && T._f && (T._f.mount = A);
12506
+ const S = (k, j) => {
12507
+ const T = R(n._fields, k);
12508
+ T && T._f && (T._f.mount = j);
12505
12509
  };
12506
- n._options.shouldUnregister || a ? n.unregister(r) : M(r, !1);
12510
+ n._options.shouldUnregister || a ? n.unregister(r) : S(r, !1);
12507
12511
  }), [r, n, o, a]), {
12508
12512
  swap: g.useCallback(m, [v, r, n]),
12509
12513
  move: g.useCallback($, [v, r, n]),
12510
- prepend: g.useCallback(S, [v, r, n]),
12511
- append: g.useCallback(x, [v, r, n]),
12512
- remove: g.useCallback(k, [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]),
12513
12517
  insert: g.useCallback(b, [v, r, n]),
12514
- update: g.useCallback(j, [v, r, n]),
12515
- replace: g.useCallback(O, [v, r, n]),
12516
- fields: g.useMemo(() => s.map((M, C) => ({
12517
- ...M,
12518
- [o]: d.current[C] || jt()
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()
12519
12523
  })), [s, o])
12520
12524
  };
12521
12525
  }