@unizap/uniui 1.0.55 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/uniui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as Gt from "react";
2
- import ke, { useRef as me, useState as J, useEffect as pe, useMemo as Ae, useReducer as tr, useCallback as ce, forwardRef as Oe, useImperativeHandle as _n, Fragment as nr, memo as rr, useLayoutEffect as or } from "react";
2
+ import ke, { useRef as me, useState as ee, useEffect as pe, useMemo as Ae, useReducer as tr, useCallback as ce, forwardRef as Oe, useImperativeHandle as _n, Fragment as nr, memo as rr, useLayoutEffect as or } from "react";
3
3
  import { createPortal as Ge } from "react-dom";
4
4
  function Mn(e) {
5
5
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -52,20 +52,20 @@ function ar() {
52
52
  function e(x) {
53
53
  if (x == null) return null;
54
54
  if (typeof x == "function")
55
- return x.$$typeof === X ? null : x.displayName || x.name || null;
55
+ return x.$$typeof === U ? null : x.displayName || x.name || null;
56
56
  if (typeof x == "string") return x;
57
57
  switch (x) {
58
58
  case g:
59
59
  return "Fragment";
60
- case h:
61
- return "Profiler";
62
60
  case w:
61
+ return "Profiler";
62
+ case h:
63
63
  return "StrictMode";
64
64
  case b:
65
65
  return "Suspense";
66
- case z:
66
+ case A:
67
67
  return "SuspenseList";
68
- case ee:
68
+ case J:
69
69
  return "Activity";
70
70
  }
71
71
  if (typeof x == "object")
@@ -83,7 +83,7 @@ function ar() {
83
83
  return x = x.displayName, x || (x = j.displayName || j.name || "", x = x !== "" ? "ForwardRef(" + x + ")" : "ForwardRef"), x;
84
84
  case R:
85
85
  return j = x.displayName || null, j !== null ? j : e(x.type) || "Memo";
86
- case A:
86
+ case O:
87
87
  j = x._payload, x = x._init;
88
88
  try {
89
89
  return e(x(j));
@@ -114,7 +114,7 @@ function ar() {
114
114
  }
115
115
  function r(x) {
116
116
  if (x === g) return "<>";
117
- if (typeof x == "object" && x !== null && x.$$typeof === A)
117
+ if (typeof x == "object" && x !== null && x.$$typeof === O)
118
118
  return "<...>";
119
119
  try {
120
120
  var j = e(x);
@@ -124,7 +124,7 @@ function ar() {
124
124
  }
125
125
  }
126
126
  function o() {
127
- var x = Q.A;
127
+ var x = K.A;
128
128
  return x === null ? null : x.getOwner();
129
129
  }
130
130
  function i() {
@@ -151,16 +151,16 @@ function ar() {
151
151
  }
152
152
  function c() {
153
153
  var x = e(this.type);
154
- return K[x] || (K[x] = !0, console.error(
154
+ return Q[x] || (Q[x] = !0, console.error(
155
155
  "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."
156
156
  )), x = this.props.ref, x !== void 0 ? x : null;
157
157
  }
158
- function d(x, j, L, E, P, O, k, B) {
159
- return L = O.ref, x = {
158
+ function d(x, j, L, E, P, T, k, B) {
159
+ return L = T.ref, x = {
160
160
  $$typeof: f,
161
161
  type: x,
162
162
  key: j,
163
- props: O,
163
+ props: T,
164
164
  _owner: P
165
165
  }, (L !== void 0 ? L : null) !== null ? Object.defineProperty(x, "ref", {
166
166
  enumerable: !1,
@@ -187,7 +187,7 @@ function ar() {
187
187
  value: B
188
188
  }), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
189
189
  }
190
- function p(x, j, L, E, P, O, k, B) {
190
+ function p(x, j, L, E, P, T, k, B) {
191
191
  var N = j.children;
192
192
  if (N !== void 0)
193
193
  if (E)
@@ -205,7 +205,7 @@ function ar() {
205
205
  var G = Object.keys(j).filter(function(se) {
206
206
  return se !== "key";
207
207
  });
208
- E = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", U[N + E] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
208
+ E = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", X[N + E] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
209
209
  `A props object containing a "key" prop is being spread into JSX:
210
210
  let props = %s;
211
211
  <%s {...props} />
@@ -216,7 +216,7 @@ React keys must be passed directly to JSX without using spread:
216
216
  N,
217
217
  G,
218
218
  N
219
- ), U[N + E] = !0);
219
+ ), X[N + E] = !0);
220
220
  }
221
221
  if (N = null, L !== void 0 && (t(L), N = "" + L), l(j) && (t(j.key), N = "" + j.key), "key" in j) {
222
222
  L = {};
@@ -229,7 +229,7 @@ React keys must be passed directly to JSX without using spread:
229
229
  ), d(
230
230
  x,
231
231
  N,
232
- O,
232
+ T,
233
233
  P,
234
234
  o(),
235
235
  L,
@@ -240,7 +240,7 @@ React keys must be passed directly to JSX without using spread:
240
240
  function m(x) {
241
241
  typeof x == "object" && x !== null && x.$$typeof === f && x._store && (x._store.validated = 1);
242
242
  }
243
- var u = ke, f = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), y = Symbol.for("react.context"), $ = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), ee = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), Q = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, de = Object.prototype.hasOwnProperty, D = Array.isArray, T = console.createTask ? console.createTask : function() {
243
+ var u = ke, f = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), y = Symbol.for("react.context"), $ = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), J = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), K = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, de = Object.prototype.hasOwnProperty, D = Array.isArray, z = console.createTask ? console.createTask : function() {
244
244
  return null;
245
245
  };
246
246
  u = {
@@ -248,12 +248,12 @@ React keys must be passed directly to JSX without using spread:
248
248
  return x();
249
249
  }
250
250
  };
251
- var q, K = {}, V = u["react-stack-bottom-frame"].bind(
251
+ var q, Q = {}, V = u["react-stack-bottom-frame"].bind(
252
252
  u,
253
253
  i
254
- )(), ve = T(r(i)), U = {};
254
+ )(), ve = z(r(i)), X = {};
255
255
  Ve.Fragment = g, Ve.jsx = function(x, j, L, E, P) {
256
- var O = 1e4 > Q.recentlyCreatedOwnerStacks++;
256
+ var T = 1e4 > K.recentlyCreatedOwnerStacks++;
257
257
  return p(
258
258
  x,
259
259
  j,
@@ -261,11 +261,11 @@ React keys must be passed directly to JSX without using spread:
261
261
  !1,
262
262
  E,
263
263
  P,
264
- O ? Error("react-stack-top-frame") : V,
265
- O ? T(r(x)) : ve
264
+ T ? Error("react-stack-top-frame") : V,
265
+ T ? z(r(x)) : ve
266
266
  );
267
267
  }, Ve.jsxs = function(x, j, L, E, P) {
268
- var O = 1e4 > Q.recentlyCreatedOwnerStacks++;
268
+ var T = 1e4 > K.recentlyCreatedOwnerStacks++;
269
269
  return p(
270
270
  x,
271
271
  j,
@@ -273,8 +273,8 @@ React keys must be passed directly to JSX without using spread:
273
273
  !0,
274
274
  E,
275
275
  P,
276
- O ? Error("react-stack-top-frame") : V,
277
- O ? T(r(x)) : ve
276
+ T ? Error("react-stack-top-frame") : V,
277
+ T ? z(r(x)) : ve
278
278
  );
279
279
  };
280
280
  }()), Ve;
@@ -622,24 +622,26 @@ const we = {
622
622
  autoFocus: f = !1,
623
623
  href: v,
624
624
  target: g,
625
+ id: h,
625
626
  ...w
626
627
  }) => {
627
- var b;
628
- const h = me(null), S = me(null), y = (z) => {
629
- const R = h.current;
630
- if (!R) return;
631
- const A = document.createElement("span"), ee = R.getBoundingClientRect(), X = Math.max(ee.width, ee.height);
632
- A.style.width = A.style.height = `${X}px`, A.style.left = `${z.clientX - ee.left - X / 2}px`, A.style.top = `${z.clientY - ee.top - X / 2}px`, A.className = "ripple", R.appendChild(A), setTimeout(() => A.remove(), 600), l == null || l(z);
633
- }, $ = ((b = we[r]) == null ? void 0 : b[t === "filled" ? "filled" : t === "outlined" ? "outline" : "transparent"]) || "";
628
+ var A;
629
+ const S = me(null), y = me(null), $ = (R) => {
630
+ const O = S.current;
631
+ if (!O) return;
632
+ const J = document.createElement("span"), U = O.getBoundingClientRect(), K = Math.max(U.width, U.height);
633
+ J.style.width = J.style.height = `${K}px`, J.style.left = `${R.clientX - U.left - K / 2}px`, J.style.top = `${R.clientY - U.top - K / 2}px`, J.className = "ripple", O.appendChild(J), setTimeout(() => J.remove(), 600), l == null || l(R);
634
+ }, b = ((A = we[r]) == null ? void 0 : A[t === "filled" ? "filled" : t === "outlined" ? "outline" : "transparent"]) || "";
634
635
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: v ? /* @__PURE__ */ a.jsxs(
635
636
  "a",
636
637
  {
637
- ref: S,
638
+ ref: y,
639
+ id: h,
638
640
  href: v,
639
641
  target: g,
640
642
  className: `relative leading-none no-underline inline-flex font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
641
643
  ${t === "outlined" && "border"}
642
- ${$}
644
+ ${b}
643
645
  ${s}
644
646
  ${m === "small" ? "text-sm h-8 px-3" : m === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
645
647
  ${c ? "w-full" : ""}
@@ -655,13 +657,14 @@ const we = {
655
657
  ) : /* @__PURE__ */ a.jsxs(
656
658
  "button",
657
659
  {
658
- ref: h,
660
+ ref: S,
661
+ id: h,
659
662
  type: u,
660
663
  disabled: d,
661
- onClick: y,
664
+ onClick: $,
662
665
  className: `relative leading-none font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
663
666
  ${t === "outlined" && "border"}
664
- ${$}
667
+ ${b}
665
668
  ${s}
666
669
  ${m === "small" ? "text-sm h-8 px-3" : m === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
667
670
  ${c ? "w-full" : ""}
@@ -742,7 +745,7 @@ const we = {
742
745
  menuClassName: r = "",
743
746
  stayOpenOnSelect: o = !1
744
747
  }) => {
745
- const [i, l] = J(!1), s = me(null);
748
+ const [i, l] = ee(!1), s = me(null);
746
749
  return pe(() => {
747
750
  const c = (d) => {
748
751
  s.current && !s.current.contains(d.target) && l(!1);
@@ -801,11 +804,11 @@ var Ut;
801
804
  function sr() {
802
805
  if (Ut) return ae;
803
806
  Ut = 1;
804
- var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, h = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
807
+ var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
805
808
  function y(b) {
806
809
  if (typeof b == "object" && b !== null) {
807
- var z = b.$$typeof;
808
- switch (z) {
810
+ var A = b.$$typeof;
811
+ switch (A) {
809
812
  case n:
810
813
  switch (b = b.type, b) {
811
814
  case c:
@@ -824,11 +827,11 @@ function sr() {
824
827
  case l:
825
828
  return b;
826
829
  default:
827
- return z;
830
+ return A;
828
831
  }
829
832
  }
830
833
  case t:
831
- return z;
834
+ return A;
832
835
  }
833
836
  }
834
837
  }
@@ -860,7 +863,7 @@ function sr() {
860
863
  }, ae.isSuspense = function(b) {
861
864
  return y(b) === m;
862
865
  }, ae.isValidElementType = function(b) {
863
- return typeof b == "string" || typeof b == "function" || b === r || b === d || b === i || b === o || b === m || b === u || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === f || b.$$typeof === l || b.$$typeof === s || b.$$typeof === p || b.$$typeof === w || b.$$typeof === h || b.$$typeof === S || b.$$typeof === g);
866
+ return typeof b == "string" || typeof b == "function" || b === r || b === d || b === i || b === o || b === m || b === u || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === f || b.$$typeof === l || b.$$typeof === s || b.$$typeof === p || b.$$typeof === h || b.$$typeof === w || b.$$typeof === S || b.$$typeof === g);
864
867
  }, ae.typeOf = y, ae;
865
868
  }
866
869
  var le = {};
@@ -875,10 +878,10 @@ var le = {};
875
878
  var Xt;
876
879
  function cr() {
877
880
  return Xt || (Xt = 1, process.env.NODE_ENV !== "production" && function() {
878
- var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, h = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
881
+ var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
879
882
  function y(_) {
880
883
  return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
881
- _ === r || _ === d || _ === i || _ === o || _ === m || _ === u || typeof _ == "object" && _ !== null && (_.$$typeof === v || _.$$typeof === f || _.$$typeof === l || _.$$typeof === s || _.$$typeof === p || _.$$typeof === w || _.$$typeof === h || _.$$typeof === S || _.$$typeof === g);
884
+ _ === r || _ === d || _ === i || _ === o || _ === m || _ === u || typeof _ == "object" && _ !== null && (_.$$typeof === v || _.$$typeof === f || _.$$typeof === l || _.$$typeof === s || _.$$typeof === p || _.$$typeof === h || _.$$typeof === w || _.$$typeof === S || _.$$typeof === g);
882
885
  }
883
886
  function $(_) {
884
887
  if (typeof _ == "object" && _ !== null) {
@@ -912,8 +915,8 @@ function cr() {
912
915
  }
913
916
  }
914
917
  }
915
- var b = c, z = d, R = s, A = l, ee = n, X = p, Q = r, de = v, D = f, T = t, q = i, K = o, V = m, ve = !1;
916
- function U(_) {
918
+ var b = c, A = d, R = s, O = l, J = n, U = p, K = r, de = v, D = f, z = t, q = i, Q = o, V = m, ve = !1;
919
+ function X(_) {
917
920
  return ve || (ve = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(_) || $(_) === c;
918
921
  }
919
922
  function x(_) {
@@ -931,7 +934,7 @@ function cr() {
931
934
  function P(_) {
932
935
  return $(_) === p;
933
936
  }
934
- function O(_) {
937
+ function T(_) {
935
938
  return $(_) === r;
936
939
  }
937
940
  function k(_) {
@@ -952,7 +955,7 @@ function cr() {
952
955
  function se(_) {
953
956
  return $(_) === m;
954
957
  }
955
- le.AsyncMode = b, le.ConcurrentMode = z, le.ContextConsumer = R, le.ContextProvider = A, le.Element = ee, le.ForwardRef = X, le.Fragment = Q, le.Lazy = de, le.Memo = D, le.Portal = T, le.Profiler = q, le.StrictMode = K, le.Suspense = V, le.isAsyncMode = U, le.isConcurrentMode = x, le.isContextConsumer = j, le.isContextProvider = L, le.isElement = E, le.isForwardRef = P, le.isFragment = O, le.isLazy = k, le.isMemo = B, le.isPortal = N, le.isProfiler = G, le.isStrictMode = Y, le.isSuspense = se, le.isValidElementType = y, le.typeOf = $;
958
+ le.AsyncMode = b, le.ConcurrentMode = A, le.ContextConsumer = R, le.ContextProvider = O, le.Element = J, le.ForwardRef = U, le.Fragment = K, le.Lazy = de, le.Memo = D, le.Portal = z, le.Profiler = q, le.StrictMode = Q, le.Suspense = V, le.isAsyncMode = X, le.isConcurrentMode = x, le.isContextConsumer = j, le.isContextProvider = L, le.isElement = E, le.isForwardRef = P, le.isFragment = T, le.isLazy = k, le.isMemo = B, le.isPortal = N, le.isProfiler = G, le.isStrictMode = Y, le.isSuspense = se, le.isValidElementType = y, le.typeOf = $;
956
959
  }()), le;
957
960
  }
958
961
  var Kt;
@@ -1095,23 +1098,23 @@ function dr() {
1095
1098
  return j;
1096
1099
  }
1097
1100
  var u = "<<anonymous>>", f = {
1098
- array: h("array"),
1099
- bigint: h("bigint"),
1100
- bool: h("boolean"),
1101
- func: h("function"),
1102
- number: h("number"),
1103
- object: h("object"),
1104
- string: h("string"),
1105
- symbol: h("symbol"),
1101
+ array: w("array"),
1102
+ bigint: w("bigint"),
1103
+ bool: w("boolean"),
1104
+ func: w("function"),
1105
+ number: w("number"),
1106
+ object: w("object"),
1107
+ string: w("string"),
1108
+ symbol: w("symbol"),
1106
1109
  any: S(),
1107
1110
  arrayOf: y,
1108
1111
  element: $(),
1109
1112
  elementType: b(),
1110
- instanceOf: z,
1111
- node: X(),
1112
- objectOf: A,
1113
+ instanceOf: A,
1114
+ node: U(),
1115
+ objectOf: O,
1113
1116
  oneOf: R,
1114
- oneOfType: ee,
1117
+ oneOfType: J,
1115
1118
  shape: de,
1116
1119
  exact: D
1117
1120
  };
@@ -1122,10 +1125,10 @@ function dr() {
1122
1125
  this.message = x, this.data = j && typeof j == "object" ? j : {}, this.stack = "";
1123
1126
  }
1124
1127
  g.prototype = Error.prototype;
1125
- function w(x) {
1128
+ function h(x) {
1126
1129
  if (process.env.NODE_ENV !== "production")
1127
1130
  var j = {}, L = 0;
1128
- function E(O, k, B, N, G, Y, se) {
1131
+ function E(T, k, B, N, G, Y, se) {
1129
1132
  if (N = N || u, Y = Y || B, se !== t) {
1130
1133
  if (c) {
1131
1134
  var _ = new Error(
@@ -1140,84 +1143,84 @@ function dr() {
1140
1143
  ), j[F] = !0, L++);
1141
1144
  }
1142
1145
  }
1143
- return k[B] == null ? O ? k[B] === null ? new g("The " + G + " `" + Y + "` is marked as required " + ("in `" + N + "`, but its value is `null`.")) : new g("The " + G + " `" + Y + "` is marked as required in " + ("`" + N + "`, but its value is `undefined`.")) : null : x(k, B, N, G, Y);
1146
+ return k[B] == null ? T ? k[B] === null ? new g("The " + G + " `" + Y + "` is marked as required " + ("in `" + N + "`, but its value is `null`.")) : new g("The " + G + " `" + Y + "` is marked as required in " + ("`" + N + "`, but its value is `undefined`.")) : null : x(k, B, N, G, Y);
1144
1147
  }
1145
1148
  var P = E.bind(null, !1);
1146
1149
  return P.isRequired = E.bind(null, !0), P;
1147
1150
  }
1148
- function h(x) {
1149
- function j(L, E, P, O, k, B) {
1150
- var N = L[E], G = K(N);
1151
+ function w(x) {
1152
+ function j(L, E, P, T, k, B) {
1153
+ var N = L[E], G = Q(N);
1151
1154
  if (G !== x) {
1152
1155
  var Y = V(N);
1153
1156
  return new g(
1154
- "Invalid " + O + " `" + k + "` of type " + ("`" + Y + "` supplied to `" + P + "`, expected ") + ("`" + x + "`."),
1157
+ "Invalid " + T + " `" + k + "` of type " + ("`" + Y + "` supplied to `" + P + "`, expected ") + ("`" + x + "`."),
1155
1158
  { expectedType: x }
1156
1159
  );
1157
1160
  }
1158
1161
  return null;
1159
1162
  }
1160
- return w(j);
1163
+ return h(j);
1161
1164
  }
1162
1165
  function S() {
1163
- return w(l);
1166
+ return h(l);
1164
1167
  }
1165
1168
  function y(x) {
1166
- function j(L, E, P, O, k) {
1169
+ function j(L, E, P, T, k) {
1167
1170
  if (typeof x != "function")
1168
1171
  return new g("Property `" + k + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
1169
1172
  var B = L[E];
1170
1173
  if (!Array.isArray(B)) {
1171
- var N = K(B);
1172
- return new g("Invalid " + O + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected an array."));
1174
+ var N = Q(B);
1175
+ return new g("Invalid " + T + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected an array."));
1173
1176
  }
1174
1177
  for (var G = 0; G < B.length; G++) {
1175
- var Y = x(B, G, P, O, k + "[" + G + "]", t);
1178
+ var Y = x(B, G, P, T, k + "[" + G + "]", t);
1176
1179
  if (Y instanceof Error)
1177
1180
  return Y;
1178
1181
  }
1179
1182
  return null;
1180
1183
  }
1181
- return w(j);
1184
+ return h(j);
1182
1185
  }
1183
1186
  function $() {
1184
- function x(j, L, E, P, O) {
1187
+ function x(j, L, E, P, T) {
1185
1188
  var k = j[L];
1186
1189
  if (!s(k)) {
1187
- var B = K(k);
1188
- return new g("Invalid " + P + " `" + O + "` of type " + ("`" + B + "` supplied to `" + E + "`, expected a single ReactElement."));
1190
+ var B = Q(k);
1191
+ return new g("Invalid " + P + " `" + T + "` of type " + ("`" + B + "` supplied to `" + E + "`, expected a single ReactElement."));
1189
1192
  }
1190
1193
  return null;
1191
1194
  }
1192
- return w(x);
1195
+ return h(x);
1193
1196
  }
1194
1197
  function b() {
1195
- function x(j, L, E, P, O) {
1198
+ function x(j, L, E, P, T) {
1196
1199
  var k = j[L];
1197
1200
  if (!e.isValidElementType(k)) {
1198
- var B = K(k);
1199
- return new g("Invalid " + P + " `" + O + "` of type " + ("`" + B + "` supplied to `" + E + "`, expected a single ReactElement type."));
1201
+ var B = Q(k);
1202
+ return new g("Invalid " + P + " `" + T + "` of type " + ("`" + B + "` supplied to `" + E + "`, expected a single ReactElement type."));
1200
1203
  }
1201
1204
  return null;
1202
1205
  }
1203
- return w(x);
1206
+ return h(x);
1204
1207
  }
1205
- function z(x) {
1206
- function j(L, E, P, O, k) {
1208
+ function A(x) {
1209
+ function j(L, E, P, T, k) {
1207
1210
  if (!(L[E] instanceof x)) {
1208
- var B = x.name || u, N = U(L[E]);
1209
- return new g("Invalid " + O + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected ") + ("instance of `" + B + "`."));
1211
+ var B = x.name || u, N = X(L[E]);
1212
+ return new g("Invalid " + T + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected ") + ("instance of `" + B + "`."));
1210
1213
  }
1211
1214
  return null;
1212
1215
  }
1213
- return w(j);
1216
+ return h(j);
1214
1217
  }
1215
1218
  function R(x) {
1216
1219
  if (!Array.isArray(x))
1217
1220
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
1218
1221
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
1219
1222
  ) : i("Invalid argument supplied to oneOf, expected an array.")), l;
1220
- function j(L, E, P, O, k) {
1223
+ function j(L, E, P, T, k) {
1221
1224
  for (var B = L[E], N = 0; N < x.length; N++)
1222
1225
  if (v(B, x[N]))
1223
1226
  return null;
@@ -1225,28 +1228,28 @@ function dr() {
1225
1228
  var F = V(_);
1226
1229
  return F === "symbol" ? String(_) : _;
1227
1230
  });
1228
- return new g("Invalid " + O + " `" + k + "` of value `" + String(B) + "` " + ("supplied to `" + P + "`, expected one of " + G + "."));
1231
+ return new g("Invalid " + T + " `" + k + "` of value `" + String(B) + "` " + ("supplied to `" + P + "`, expected one of " + G + "."));
1229
1232
  }
1230
- return w(j);
1233
+ return h(j);
1231
1234
  }
1232
- function A(x) {
1233
- function j(L, E, P, O, k) {
1235
+ function O(x) {
1236
+ function j(L, E, P, T, k) {
1234
1237
  if (typeof x != "function")
1235
1238
  return new g("Property `" + k + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
1236
- var B = L[E], N = K(B);
1239
+ var B = L[E], N = Q(B);
1237
1240
  if (N !== "object")
1238
- return new g("Invalid " + O + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected an object."));
1241
+ return new g("Invalid " + T + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected an object."));
1239
1242
  for (var G in B)
1240
1243
  if (r(B, G)) {
1241
- var Y = x(B, G, P, O, k + "." + G, t);
1244
+ var Y = x(B, G, P, T, k + "." + G, t);
1242
1245
  if (Y instanceof Error)
1243
1246
  return Y;
1244
1247
  }
1245
1248
  return null;
1246
1249
  }
1247
- return w(j);
1250
+ return h(j);
1248
1251
  }
1249
- function ee(x) {
1252
+ function J(x) {
1250
1253
  if (!Array.isArray(x))
1251
1254
  return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), l;
1252
1255
  for (var j = 0; j < x.length; j++) {
@@ -1256,9 +1259,9 @@ function dr() {
1256
1259
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ve(L) + " at index " + j + "."
1257
1260
  ), l;
1258
1261
  }
1259
- function E(P, O, k, B, N) {
1262
+ function E(P, T, k, B, N) {
1260
1263
  for (var G = [], Y = 0; Y < x.length; Y++) {
1261
- var se = x[Y], _ = se(P, O, k, B, N, t);
1264
+ var se = x[Y], _ = se(P, T, k, B, N, t);
1262
1265
  if (_ == null)
1263
1266
  return null;
1264
1267
  _.data && r(_.data, "expectedType") && G.push(_.data.expectedType);
@@ -1266,60 +1269,60 @@ function dr() {
1266
1269
  var F = G.length > 0 ? ", expected one of type [" + G.join(", ") + "]" : "";
1267
1270
  return new g("Invalid " + B + " `" + N + "` supplied to " + ("`" + k + "`" + F + "."));
1268
1271
  }
1269
- return w(E);
1272
+ return h(E);
1270
1273
  }
1271
- function X() {
1272
- function x(j, L, E, P, O) {
1273
- return T(j[L]) ? null : new g("Invalid " + P + " `" + O + "` supplied to " + ("`" + E + "`, expected a ReactNode."));
1274
+ function U() {
1275
+ function x(j, L, E, P, T) {
1276
+ return z(j[L]) ? null : new g("Invalid " + P + " `" + T + "` supplied to " + ("`" + E + "`, expected a ReactNode."));
1274
1277
  }
1275
- return w(x);
1278
+ return h(x);
1276
1279
  }
1277
- function Q(x, j, L, E, P) {
1280
+ function K(x, j, L, E, P) {
1278
1281
  return new g(
1279
1282
  (x || "React class") + ": " + j + " type `" + L + "." + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
1280
1283
  );
1281
1284
  }
1282
1285
  function de(x) {
1283
- function j(L, E, P, O, k) {
1284
- var B = L[E], N = K(B);
1286
+ function j(L, E, P, T, k) {
1287
+ var B = L[E], N = Q(B);
1285
1288
  if (N !== "object")
1286
- return new g("Invalid " + O + " `" + k + "` of type `" + N + "` " + ("supplied to `" + P + "`, expected `object`."));
1289
+ return new g("Invalid " + T + " `" + k + "` of type `" + N + "` " + ("supplied to `" + P + "`, expected `object`."));
1287
1290
  for (var G in x) {
1288
1291
  var Y = x[G];
1289
1292
  if (typeof Y != "function")
1290
- return Q(P, O, k, G, V(Y));
1291
- var se = Y(B, G, P, O, k + "." + G, t);
1293
+ return K(P, T, k, G, V(Y));
1294
+ var se = Y(B, G, P, T, k + "." + G, t);
1292
1295
  if (se)
1293
1296
  return se;
1294
1297
  }
1295
1298
  return null;
1296
1299
  }
1297
- return w(j);
1300
+ return h(j);
1298
1301
  }
1299
1302
  function D(x) {
1300
- function j(L, E, P, O, k) {
1301
- var B = L[E], N = K(B);
1303
+ function j(L, E, P, T, k) {
1304
+ var B = L[E], N = Q(B);
1302
1305
  if (N !== "object")
1303
- return new g("Invalid " + O + " `" + k + "` of type `" + N + "` " + ("supplied to `" + P + "`, expected `object`."));
1306
+ return new g("Invalid " + T + " `" + k + "` of type `" + N + "` " + ("supplied to `" + P + "`, expected `object`."));
1304
1307
  var G = n({}, L[E], x);
1305
1308
  for (var Y in G) {
1306
1309
  var se = x[Y];
1307
1310
  if (r(x, Y) && typeof se != "function")
1308
- return Q(P, O, k, Y, V(se));
1311
+ return K(P, T, k, Y, V(se));
1309
1312
  if (!se)
1310
1313
  return new g(
1311
- "Invalid " + O + " `" + k + "` key `" + Y + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(L[E], null, " ") + `
1314
+ "Invalid " + T + " `" + k + "` key `" + Y + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(L[E], null, " ") + `
1312
1315
  Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1313
1316
  );
1314
- var _ = se(B, Y, P, O, k + "." + Y, t);
1317
+ var _ = se(B, Y, P, T, k + "." + Y, t);
1315
1318
  if (_)
1316
1319
  return _;
1317
1320
  }
1318
1321
  return null;
1319
1322
  }
1320
- return w(j);
1323
+ return h(j);
1321
1324
  }
1322
- function T(x) {
1325
+ function z(x) {
1323
1326
  switch (typeof x) {
1324
1327
  case "number":
1325
1328
  case "string":
@@ -1329,7 +1332,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1329
1332
  return !x;
1330
1333
  case "object":
1331
1334
  if (Array.isArray(x))
1332
- return x.every(T);
1335
+ return x.every(z);
1333
1336
  if (x === null || s(x))
1334
1337
  return !0;
1335
1338
  var j = m(x);
@@ -1337,12 +1340,12 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1337
1340
  var L = j.call(x), E;
1338
1341
  if (j !== x.entries) {
1339
1342
  for (; !(E = L.next()).done; )
1340
- if (!T(E.value))
1343
+ if (!z(E.value))
1341
1344
  return !1;
1342
1345
  } else
1343
1346
  for (; !(E = L.next()).done; ) {
1344
1347
  var P = E.value;
1345
- if (P && !T(P[1]))
1348
+ if (P && !z(P[1]))
1346
1349
  return !1;
1347
1350
  }
1348
1351
  } else
@@ -1355,14 +1358,14 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1355
1358
  function q(x, j) {
1356
1359
  return x === "symbol" ? !0 : j ? j["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && j instanceof Symbol : !1;
1357
1360
  }
1358
- function K(x) {
1361
+ function Q(x) {
1359
1362
  var j = typeof x;
1360
1363
  return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : q(j, x) ? "symbol" : j;
1361
1364
  }
1362
1365
  function V(x) {
1363
1366
  if (typeof x > "u" || x === null)
1364
1367
  return "" + x;
1365
- var j = K(x);
1368
+ var j = Q(x);
1366
1369
  if (j === "object") {
1367
1370
  if (x instanceof Date)
1368
1371
  return "date";
@@ -1385,7 +1388,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1385
1388
  return j;
1386
1389
  }
1387
1390
  }
1388
- function U(x) {
1391
+ function X(x) {
1389
1392
  return !x.constructor || !x.constructor.name ? u : x.constructor.name;
1390
1393
  }
1391
1394
  return f.checkPropTypes = o, f.resetWarningCache = o.resetWarningCache, f.PropTypes = f, f;
@@ -3350,19 +3353,19 @@ var Nt = {
3350
3353
  fileRejections: []
3351
3354
  };
3352
3355
  function Hn() {
3353
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = fe(fe({}, Vn), e), t = n.accept, r = n.disabled, o = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, d = n.onDragEnter, p = n.onDragLeave, m = n.onDragOver, u = n.onDrop, f = n.onDropAccepted, v = n.onDropRejected, g = n.onFileDialogCancel, w = n.onFileDialogOpen, h = n.useFsAccessApi, S = n.autoFocus, y = n.preventDropOnDocument, $ = n.noClick, b = n.noKeyboard, z = n.noDrag, R = n.noDragEventsBubbling, A = n.onError, ee = n.validator, X = Ae(function() {
3356
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = fe(fe({}, Vn), e), t = n.accept, r = n.disabled, o = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, d = n.onDragEnter, p = n.onDragLeave, m = n.onDragOver, u = n.onDrop, f = n.onDropAccepted, v = n.onDropRejected, g = n.onFileDialogCancel, h = n.onFileDialogOpen, w = n.useFsAccessApi, S = n.autoFocus, y = n.preventDropOnDocument, $ = n.noClick, b = n.noKeyboard, A = n.noDrag, R = n.noDragEventsBubbling, O = n.onError, J = n.validator, U = Ae(function() {
3354
3357
  return Ur(t);
3355
- }, [t]), Q = Ae(function() {
3358
+ }, [t]), K = Ae(function() {
3356
3359
  return Wr(t);
3357
3360
  }, [t]), de = Ae(function() {
3358
- return typeof w == "function" ? w : vn;
3359
- }, [w]), D = Ae(function() {
3361
+ return typeof h == "function" ? h : vn;
3362
+ }, [h]), D = Ae(function() {
3360
3363
  return typeof g == "function" ? g : vn;
3361
- }, [g]), T = me(null), q = me(null), K = tr(uo, Nt), V = bt(K, 2), ve = V[0], U = V[1], x = ve.isFocused, j = ve.isFileDialogActive, L = me(typeof window < "u" && window.isSecureContext && h && Zr()), E = function() {
3364
+ }, [g]), z = me(null), q = me(null), Q = tr(uo, Nt), V = bt(Q, 2), ve = V[0], X = V[1], x = ve.isFocused, j = ve.isFileDialogActive, L = me(typeof window < "u" && window.isSecureContext && w && Zr()), E = function() {
3362
3365
  !L.current && j && setTimeout(function() {
3363
3366
  if (q.current) {
3364
3367
  var I = q.current.files;
3365
- I.length || (U({
3368
+ I.length || (X({
3366
3369
  type: "closeDialog"
3367
3370
  }), D());
3368
3371
  }
@@ -3373,32 +3376,32 @@ function Hn() {
3373
3376
  window.removeEventListener("focus", E, !1);
3374
3377
  };
3375
3378
  }, [q, j, D, L]);
3376
- var P = me([]), O = function(I) {
3377
- T.current && T.current.contains(I.target) || (I.preventDefault(), P.current = []);
3379
+ var P = me([]), T = function(I) {
3380
+ z.current && z.current.contains(I.target) || (I.preventDefault(), P.current = []);
3378
3381
  };
3379
3382
  pe(function() {
3380
- return y && (document.addEventListener("dragover", mn, !1), document.addEventListener("drop", O, !1)), function() {
3381
- y && (document.removeEventListener("dragover", mn), document.removeEventListener("drop", O));
3383
+ return y && (document.addEventListener("dragover", mn, !1), document.addEventListener("drop", T, !1)), function() {
3384
+ y && (document.removeEventListener("dragover", mn), document.removeEventListener("drop", T));
3382
3385
  };
3383
- }, [T, y]), pe(function() {
3384
- return !r && S && T.current && T.current.focus(), function() {
3386
+ }, [z, y]), pe(function() {
3387
+ return !r && S && z.current && z.current.focus(), function() {
3385
3388
  };
3386
- }, [T, S, r]);
3389
+ }, [z, S, r]);
3387
3390
  var k = ce(function(M) {
3388
- A ? A(M) : console.error(M);
3389
- }, [A]), B = ce(function(M) {
3391
+ O ? O(M) : console.error(M);
3392
+ }, [O]), B = ce(function(M) {
3390
3393
  M.preventDefault(), M.persist(), Se(M), P.current = [].concat(no(P.current), [M.target]), Ke(M) && Promise.resolve(o(M)).then(function(I) {
3391
3394
  if (!(rt(M) && !R)) {
3392
3395
  var ne = I.length, xe = ne > 0 && qr({
3393
3396
  files: I,
3394
- accept: X,
3397
+ accept: U,
3395
3398
  minSize: l,
3396
3399
  maxSize: i,
3397
3400
  multiple: s,
3398
3401
  maxFiles: c,
3399
- validator: ee
3402
+ validator: J
3400
3403
  }), ye = ne > 0 && !xe;
3401
- U({
3404
+ X({
3402
3405
  isDragAccept: xe,
3403
3406
  isDragReject: ye,
3404
3407
  isDragActive: !0,
@@ -3408,7 +3411,7 @@ function Hn() {
3408
3411
  }).catch(function(I) {
3409
3412
  return k(I);
3410
3413
  });
3411
- }, [o, d, k, R, X, l, i, s, c, ee]), N = ce(function(M) {
3414
+ }, [o, d, k, R, U, l, i, s, c, J]), N = ce(function(M) {
3412
3415
  M.preventDefault(), M.persist(), Se(M);
3413
3416
  var I = Ke(M);
3414
3417
  if (I && M.dataTransfer)
@@ -3420,18 +3423,18 @@ function Hn() {
3420
3423
  }, [m, R]), G = ce(function(M) {
3421
3424
  M.preventDefault(), M.persist(), Se(M);
3422
3425
  var I = P.current.filter(function(xe) {
3423
- return T.current && T.current.contains(xe);
3426
+ return z.current && z.current.contains(xe);
3424
3427
  }), ne = I.indexOf(M.target);
3425
- ne !== -1 && I.splice(ne, 1), P.current = I, !(I.length > 0) && (U({
3428
+ ne !== -1 && I.splice(ne, 1), P.current = I, !(I.length > 0) && (X({
3426
3429
  type: "setDraggedFiles",
3427
3430
  isDragActive: !1,
3428
3431
  isDragAccept: !1,
3429
3432
  isDragReject: !1
3430
3433
  }), Ke(M) && p && p(M));
3431
- }, [T, p, R]), Y = ce(function(M, I) {
3434
+ }, [z, p, R]), Y = ce(function(M, I) {
3432
3435
  var ne = [], xe = [];
3433
3436
  M.forEach(function(ye) {
3434
- var De = zn(ye, X), Ne = bt(De, 2), at = Ne[0], lt = Ne[1], st = Tn(ye, l, i), Ye = bt(st, 2), ct = Ye[0], ut = Ye[1], pt = ee ? ee(ye) : null;
3437
+ var De = zn(ye, U), Ne = bt(De, 2), at = Ne[0], lt = Ne[1], st = Tn(ye, l, i), Ye = bt(st, 2), ct = Ye[0], ut = Ye[1], pt = J ? J(ye) : null;
3435
3438
  if (at && ct && !pt)
3436
3439
  ne.push(ye);
3437
3440
  else {
@@ -3448,53 +3451,53 @@ function Hn() {
3448
3451
  file: ye,
3449
3452
  errors: [Hr]
3450
3453
  });
3451
- }), ne.splice(0)), U({
3454
+ }), ne.splice(0)), X({
3452
3455
  acceptedFiles: ne,
3453
3456
  fileRejections: xe,
3454
3457
  isDragReject: xe.length > 0,
3455
3458
  type: "setFiles"
3456
3459
  }), u && u(ne, xe, I), xe.length > 0 && v && v(xe, I), ne.length > 0 && f && f(ne, I);
3457
- }, [U, s, X, l, i, c, u, f, v, ee]), se = ce(function(M) {
3460
+ }, [X, s, U, l, i, c, u, f, v, J]), se = ce(function(M) {
3458
3461
  M.preventDefault(), M.persist(), Se(M), P.current = [], Ke(M) && Promise.resolve(o(M)).then(function(I) {
3459
3462
  rt(M) && !R || Y(I, M);
3460
3463
  }).catch(function(I) {
3461
3464
  return k(I);
3462
- }), U({
3465
+ }), X({
3463
3466
  type: "reset"
3464
3467
  });
3465
3468
  }, [o, Y, k, R]), _ = ce(function() {
3466
3469
  if (L.current) {
3467
- U({
3470
+ X({
3468
3471
  type: "openDialog"
3469
3472
  }), de();
3470
3473
  var M = {
3471
3474
  multiple: s,
3472
- types: Q
3475
+ types: K
3473
3476
  };
3474
3477
  window.showOpenFilePicker(M).then(function(I) {
3475
3478
  return o(I);
3476
3479
  }).then(function(I) {
3477
- Y(I, null), U({
3480
+ Y(I, null), X({
3478
3481
  type: "closeDialog"
3479
3482
  });
3480
3483
  }).catch(function(I) {
3481
- Xr(I) ? (D(I), U({
3484
+ Xr(I) ? (D(I), X({
3482
3485
  type: "closeDialog"
3483
3486
  })) : Kr(I) ? (L.current = !1, q.current ? (q.current.value = null, q.current.click()) : k(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : k(I);
3484
3487
  });
3485
3488
  return;
3486
3489
  }
3487
- q.current && (U({
3490
+ q.current && (X({
3488
3491
  type: "openDialog"
3489
3492
  }), de(), q.current.value = null, q.current.click());
3490
- }, [U, de, D, h, Y, k, Q, s]), F = ce(function(M) {
3491
- !T.current || !T.current.isEqualNode(M.target) || (M.key === " " || M.key === "Enter" || M.keyCode === 32 || M.keyCode === 13) && (M.preventDefault(), _());
3492
- }, [T, _]), re = ce(function() {
3493
- U({
3493
+ }, [X, de, D, w, Y, k, K, s]), F = ce(function(M) {
3494
+ !z.current || !z.current.isEqualNode(M.target) || (M.key === " " || M.key === "Enter" || M.keyCode === 32 || M.keyCode === 13) && (M.preventDefault(), _());
3495
+ }, [z, _]), re = ce(function() {
3496
+ X({
3494
3497
  type: "focus"
3495
3498
  });
3496
3499
  }, []), oe = ce(function() {
3497
- U({
3500
+ X({
3498
3501
  type: "blur"
3499
3502
  });
3500
3503
  }, []), ge = ce(function() {
@@ -3504,7 +3507,7 @@ function Hn() {
3504
3507
  }, te = function(I) {
3505
3508
  return b ? null : H(I);
3506
3509
  }, je = function(I) {
3507
- return z ? null : H(I);
3510
+ return A ? null : H(I);
3508
3511
  }, Se = function(I) {
3509
3512
  R && I.stopPropagation();
3510
3513
  }, C = Ae(function() {
@@ -3520,16 +3523,16 @@ function Hn() {
3520
3523
  onDragLeave: je(Re(Ye, G)),
3521
3524
  onDrop: je(Re(ct, se)),
3522
3525
  role: typeof xe == "string" && xe !== "" ? xe : "presentation"
3523
- }, ne, T), !r && !b ? {
3526
+ }, ne, z), !r && !b ? {
3524
3527
  tabIndex: 0
3525
3528
  } : {}), ut);
3526
3529
  };
3527
- }, [T, F, re, oe, ge, B, N, G, se, b, z, r]), ie = ce(function(M) {
3530
+ }, [z, F, re, oe, ge, B, N, G, se, b, A, r]), ie = ce(function(M) {
3528
3531
  M.stopPropagation();
3529
3532
  }, []), he = Ae(function() {
3530
3533
  return function() {
3531
3534
  var M = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, I = M.refKey, ne = I === void 0 ? "ref" : I, xe = M.onChange, ye = M.onClick, De = ot(M, to), Ne = Pt({
3532
- accept: X,
3535
+ accept: U,
3533
3536
  multiple: s,
3534
3537
  type: "file",
3535
3538
  style: {
@@ -3555,7 +3558,7 @@ function Hn() {
3555
3558
  isFocused: x && !r,
3556
3559
  getRootProps: C,
3557
3560
  getInputProps: he,
3558
- rootRef: T,
3561
+ rootRef: z,
3559
3562
  inputRef: q,
3560
3563
  open: H(_)
3561
3564
  });
@@ -3620,37 +3623,37 @@ const Ti = ({
3620
3623
  subLabelClass: f = "",
3621
3624
  showList: v = !0,
3622
3625
  listView: g = !0,
3623
- showListImage: w = !1,
3624
- uploadedFiles: h = [],
3626
+ showListImage: h = !1,
3627
+ uploadedFiles: w = [],
3625
3628
  // New prop for pre-uploaded files
3626
3629
  onDeleteCallback: S = () => {
3627
3630
  }
3628
3631
  //
3629
3632
  }) => {
3630
- const [y, $] = J(h), [b, z] = J([]);
3633
+ const [y, $] = ee(w), [b, A] = ee([]);
3631
3634
  pe(() => {
3632
- (h.length !== y.length || h.some((D, T) => D !== y[T])) && $(h);
3633
- }, [h]);
3635
+ (w.length !== y.length || w.some((D, z) => D !== y[z])) && $(w);
3636
+ }, [w]);
3634
3637
  const R = ce(
3635
- (D, T) => {
3638
+ (D, z) => {
3636
3639
  const q = [];
3637
- if (T.length > 0 && T.forEach((K) => {
3638
- K.errors.forEach((V) => {
3640
+ if (z.length > 0 && z.forEach((Q) => {
3641
+ Q.errors.forEach((V) => {
3639
3642
  V.code === "file-too-large" && q.push(
3640
- `${K.file.name} is too large (max ${(o / 1024 / 1024).toFixed(2)}MB)`
3643
+ `${Q.file.name} is too large (max ${(o / 1024 / 1024).toFixed(2)}MB)`
3641
3644
  ), V.code === "file-invalid-type" && q.push(
3642
- `${K.file.name} has an invalid file type`
3645
+ `${Q.file.name} has an invalid file type`
3643
3646
  );
3644
3647
  });
3645
3648
  }), i !== void 0 && (r ? y.length : 0) + D.length > i && q.push(
3646
3649
  `You can only upload up to ${i} file${i > 1 ? "s" : ""}.`
3647
3650
  ), q.length > 0) {
3648
- z(q), n == null || n(q);
3651
+ A(q), n == null || n(q);
3649
3652
  return;
3650
3653
  } else
3651
- z([]);
3654
+ A([]);
3652
3655
  D.length > 0 && ($(
3653
- (K) => r ? [...K, ...D] : D
3656
+ (Q) => r ? [...Q, ...D] : D
3654
3657
  ), e(D));
3655
3658
  },
3656
3659
  [
@@ -3661,9 +3664,9 @@ const Ti = ({
3661
3664
  y,
3662
3665
  r
3663
3666
  ]
3664
- ), A = (D) => {
3665
- $((T) => T.filter((q, K) => K !== D)), S(y);
3666
- }, { getRootProps: ee, getInputProps: X, isDragActive: Q, isDragReject: de } = Hn({
3667
+ ), O = (D) => {
3668
+ $((z) => z.filter((q, Q) => Q !== D)), S(y);
3669
+ }, { getRootProps: J, getInputProps: U, isDragActive: K, isDragReject: de } = Hn({
3667
3670
  onDrop: R,
3668
3671
  accept: t,
3669
3672
  multiple: r,
@@ -3675,7 +3678,7 @@ const Ti = ({
3675
3678
  {
3676
3679
  className: `
3677
3680
  border border-style-dashed rounded-lg p-0 overflow-hidden transition
3678
- ${Q ? "border-color-blue-500 bg-color-blue-50" : "border-color-gray-200 bg-color-gray-50"}
3681
+ ${K ? "border-color-blue-500 bg-color-blue-50" : "border-color-gray-200 bg-color-gray-50"}
3679
3682
  ${de ? "border-color-red-500 bg-color-red-50" : ""}
3680
3683
  ${l ? "opacity-50 cursor-not-allowed" : ""}
3681
3684
  ${p}
@@ -3684,31 +3687,31 @@ const Ti = ({
3684
3687
  /* @__PURE__ */ a.jsxs(
3685
3688
  "div",
3686
3689
  {
3687
- ...ee(),
3690
+ ...J(),
3688
3691
  className: "flex flex-col items-center justify-center text-center px-6 pt-6 pb-4 cursor-pointer",
3689
3692
  children: [
3690
- /* @__PURE__ */ a.jsx("input", { ...X() }),
3693
+ /* @__PURE__ */ a.jsx("input", { ...U() }),
3691
3694
  /* @__PURE__ */ a.jsx("div", { className: `text-4xl mb-2 ${m}`, children: d }),
3692
3695
  /* @__PURE__ */ a.jsx("p", { className: `text-sm font-medium ${u}`, children: s }),
3693
3696
  c && /* @__PURE__ */ a.jsx("p", { className: `text-xs mt-1 ${f}`, children: c })
3694
3697
  ]
3695
3698
  }
3696
3699
  ),
3697
- b.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "text-left text-sm text-color-red-600 px-6 pb-2 space-y-1", children: b.map((D, T) => /* @__PURE__ */ a.jsxs("p", { children: [
3700
+ b.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "text-left text-sm text-color-red-600 px-6 pb-2 space-y-1", children: b.map((D, z) => /* @__PURE__ */ a.jsxs("p", { children: [
3698
3701
  "• ",
3699
3702
  D
3700
- ] }, T)) }),
3703
+ ] }, z)) }),
3701
3704
  v && y.length > 0 && /* @__PURE__ */ a.jsx(
3702
3705
  "ul",
3703
3706
  {
3704
3707
  className: `w-full ${g ? "space-y-2" : "grid grid-columns-2 gap-2"} px-4 pb-4`,
3705
- children: y.map((D, T) => /* @__PURE__ */ a.jsxs(
3708
+ children: y.map((D, z) => /* @__PURE__ */ a.jsxs(
3706
3709
  "li",
3707
3710
  {
3708
3711
  className: "flex items-center justify-between bg-color-white rounded-md px-4 py-2 shadow-sm",
3709
3712
  children: [
3710
3713
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3", children: [
3711
- w && /* @__PURE__ */ a.jsx("div", { className: "w-10 h-10 rounded bg-color-gray-100 overflow-hidden shrink-0", children: /* @__PURE__ */ a.jsx(
3714
+ h && /* @__PURE__ */ a.jsx("div", { className: "w-10 h-10 rounded bg-color-gray-100 overflow-hidden shrink-0", children: /* @__PURE__ */ a.jsx(
3712
3715
  "img",
3713
3716
  {
3714
3717
  src: D.type.startsWith("image/") ? URL.createObjectURL(D) : "https://img.icons8.com/ios-filled/50/pdf-2.png",
@@ -3727,14 +3730,14 @@ const Ti = ({
3727
3730
  "button",
3728
3731
  {
3729
3732
  className: "ml-2 p-1 bg-color-red-50 rounded-full text-color-red-500 hover:text-color-red-700 cursor-pointer",
3730
- onClick: () => A(T),
3733
+ onClick: () => O(z),
3731
3734
  children: /* @__PURE__ */ a.jsx("svg", { className: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" }) })
3732
3735
  }
3733
3736
  )
3734
3737
  ] })
3735
3738
  ]
3736
3739
  },
3737
- T
3740
+ z
3738
3741
  ))
3739
3742
  }
3740
3743
  )
@@ -3749,7 +3752,7 @@ function po({
3749
3752
  },
3750
3753
  placementTop: r
3751
3754
  }) {
3752
- const [o, i] = J(!1), l = me(null);
3755
+ const [o, i] = ee(!1), l = me(null);
3753
3756
  return pe(() => {
3754
3757
  function s(c) {
3755
3758
  l.current && !l.current.contains(c.target) && i(!1);
@@ -3815,23 +3818,23 @@ const go = {
3815
3818
  rounded: d = "medium",
3816
3819
  ...p
3817
3820
  }, m) => {
3818
- const u = me([]), f = (g, w) => {
3821
+ const u = me([]), f = (g, h) => {
3819
3822
  var y;
3820
- const h = g.target.value.replace(/[^0-9]/g, "").slice(0, 1);
3821
- if (!h && t[w] === void 0) return;
3822
- const S = t.substring(0, w) + h + t.substring(w + 1, i);
3823
- r == null || r(S), h && w < i - 1 && ((y = u.current[w + 1]) == null || y.focus()), o && S.length === i && !S.split("").some(($) => !$) && o(S);
3824
- }, v = (g, w) => {
3825
- var h, S, y;
3826
- g.key === "Backspace" && !t[w] && w > 0 ? (r == null || r(
3827
- t.substring(0, w - 1) + "" + t.substring(w, i)
3828
- ), (h = u.current[w - 1]) == null || h.focus(), g.preventDefault()) : g.key === "ArrowLeft" && w > 0 ? ((S = u.current[w - 1]) == null || S.focus(), g.preventDefault()) : g.key === "ArrowRight" && w < i - 1 && ((y = u.current[w + 1]) == null || y.focus(), g.preventDefault());
3823
+ const w = g.target.value.replace(/[^0-9]/g, "").slice(0, 1);
3824
+ if (!w && t[h] === void 0) return;
3825
+ const S = t.substring(0, h) + w + t.substring(h + 1, i);
3826
+ r == null || r(S), w && h < i - 1 && ((y = u.current[h + 1]) == null || y.focus()), o && S.length === i && !S.split("").some(($) => !$) && o(S);
3827
+ }, v = (g, h) => {
3828
+ var w, S, y;
3829
+ g.key === "Backspace" && !t[h] && h > 0 ? (r == null || r(
3830
+ t.substring(0, h - 1) + "" + t.substring(h, i)
3831
+ ), (w = u.current[h - 1]) == null || w.focus(), g.preventDefault()) : g.key === "ArrowLeft" && h > 0 ? ((S = u.current[h - 1]) == null || S.focus(), g.preventDefault()) : g.key === "ArrowRight" && h < i - 1 && ((y = u.current[h + 1]) == null || y.focus(), g.preventDefault());
3829
3832
  };
3830
- return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((g, w) => /* @__PURE__ */ a.jsx(
3833
+ return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((g, h) => /* @__PURE__ */ a.jsx(
3831
3834
  "input",
3832
3835
  {
3833
- ref: (h) => {
3834
- u.current[w] = h;
3836
+ ref: (w) => {
3837
+ u.current[h] = w;
3835
3838
  },
3836
3839
  type: "text",
3837
3840
  inputMode: "numeric",
@@ -3845,12 +3848,12 @@ const go = {
3845
3848
  ${fo[d]}
3846
3849
  ${n}
3847
3850
  `,
3848
- value: t[w] || "",
3849
- onChange: (h) => f(h, w),
3850
- onKeyDown: (h) => v(h, w),
3851
+ value: t[h] || "",
3852
+ onChange: (w) => f(w, h),
3853
+ onKeyDown: (w) => v(w, h),
3851
3854
  ...p
3852
3855
  },
3853
- w
3856
+ h
3854
3857
  )) });
3855
3858
  }
3856
3859
  );
@@ -3880,8 +3883,8 @@ const vo = {
3880
3883
  label: f,
3881
3884
  labelClass: v = "",
3882
3885
  variant: g = "outlined",
3883
- size: w = "medium",
3884
- ...h
3886
+ size: h = "medium",
3887
+ ...w
3885
3888
  }, S) => {
3886
3889
  const y = m ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", $ = m ? "text-color-red-500" : c;
3887
3890
  return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
@@ -3891,7 +3894,7 @@ const vo = {
3891
3894
  /* @__PURE__ */ a.jsx(
3892
3895
  "input",
3893
3896
  {
3894
- ...h,
3897
+ ...w,
3895
3898
  ref: S,
3896
3899
  type: o,
3897
3900
  inputMode: i,
@@ -3900,7 +3903,7 @@ const vo = {
3900
3903
  value: n,
3901
3904
  maxLength: u,
3902
3905
  onChange: r,
3903
- className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${vo[w]} ${s}`
3906
+ className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${vo[h]} ${s}`
3904
3907
  }
3905
3908
  ),
3906
3909
  p && /* @__PURE__ */ a.jsx("span", { className: `pr-3 ${$}`, children: p })
@@ -3911,7 +3914,7 @@ const vo = {
3911
3914
  );
3912
3915
  qn.displayName = "TextInput";
3913
3916
  const wo = Oe((e, n) => {
3914
- const [t, r] = J(!1);
3917
+ const [t, r] = ee(!1);
3915
3918
  return /* @__PURE__ */ a.jsx(
3916
3919
  qn,
3917
3920
  {
@@ -3983,8 +3986,8 @@ const Bn = ({
3983
3986
  const p = me(null), m = (v) => {
3984
3987
  const g = p.current;
3985
3988
  if (!g) return;
3986
- const w = document.createElement("span"), h = g.getBoundingClientRect(), S = Math.max(h.width, h.height);
3987
- w.style.width = w.style.height = `${S}px`, w.style.left = `${v.clientX - h.left - S / 2}px`, w.style.top = `${v.clientY - h.top - S / 2}px`, w.className = "ripple_small", g.appendChild(w), setTimeout(() => w.remove(), 600), r == null || r(v);
3989
+ const h = document.createElement("span"), w = g.getBoundingClientRect(), S = Math.max(w.width, w.height);
3990
+ h.style.width = h.style.height = `${S}px`, h.style.left = `${v.clientX - w.left - S / 2}px`, h.style.top = `${v.clientY - w.top - S / 2}px`, h.className = "ripple_small", g.appendChild(h), setTimeout(() => h.remove(), 600), r == null || r(v);
3988
3991
  }, u = ((f = we[n]) == null ? void 0 : f[e === "filled" ? "filled" : e === "outlined" ? "outline" : "transparent"]) || "";
3989
3992
  return /* @__PURE__ */ a.jsx(
3990
3993
  "button",
@@ -4028,8 +4031,8 @@ const Bn = ({
4028
4031
  avatar: p,
4029
4032
  icon: m
4030
4033
  }) => {
4031
- var h, S;
4032
- const u = (h = we[n]) == null ? void 0 : h.filled, f = (S = we[n]) == null ? void 0 : S.outline, v = bo[r], g = `inline-flex items-center rounded-full font-medium leading-none ${t === "outlined" ? `border ${f}` : u} ${v} ${i ? "cursor-pointer transition hover:opacity-80" : ""}`.trim(), w = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
4034
+ var w, S;
4035
+ const u = (w = we[n]) == null ? void 0 : w.filled, f = (S = we[n]) == null ? void 0 : S.outline, v = bo[r], g = `inline-flex items-center rounded-full font-medium leading-none ${t === "outlined" ? `border ${f}` : u} ${v} ${i ? "cursor-pointer transition hover:opacity-80" : ""}`.trim(), h = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
4033
4036
  p && /* @__PURE__ */ a.jsx(Bn, { ...typeof p == "object" ? p : {}, className: `-ml-1 mr-1 ${hn[r]}` }),
4034
4037
  m && /* @__PURE__ */ a.jsx("span", { className: "mr-1 -ml-1", children: m }),
4035
4038
  /* @__PURE__ */ a.jsx("span", { children: e }),
@@ -4055,14 +4058,14 @@ const Bn = ({
4055
4058
  target: d,
4056
4059
  className: `no-underline ${g} ${o}`,
4057
4060
  onClick: i,
4058
- children: w
4061
+ children: h
4059
4062
  }
4060
4063
  ) : /* @__PURE__ */ a.jsx(
4061
4064
  "span",
4062
4065
  {
4063
4066
  className: `${g} ${o}`,
4064
4067
  onClick: i,
4065
- children: w
4068
+ children: h
4066
4069
  }
4067
4070
  );
4068
4071
  }, Di = ({
@@ -4337,22 +4340,22 @@ function Je(e, n, t, r) {
4337
4340
  id: [r, `${f}`].filter(Boolean).join("_"),
4338
4341
  headers: []
4339
4342
  }, g = [];
4340
- u.forEach((w) => {
4341
- const h = [...g].reverse()[0], S = w.column.depth === v.depth;
4343
+ u.forEach((h) => {
4344
+ const w = [...g].reverse()[0], S = h.column.depth === v.depth;
4342
4345
  let y, $ = !1;
4343
- if (S && w.column.parent ? y = w.column.parent : (y = w.column, $ = !0), h && (h == null ? void 0 : h.column) === y)
4344
- h.subHeaders.push(w);
4346
+ if (S && h.column.parent ? y = h.column.parent : (y = h.column, $ = !0), w && (w == null ? void 0 : w.column) === y)
4347
+ w.subHeaders.push(h);
4345
4348
  else {
4346
4349
  const b = wn(t, y, {
4347
- id: [r, f, y.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
4350
+ id: [r, f, y.id, h == null ? void 0 : h.id].filter(Boolean).join("_"),
4348
4351
  isPlaceholder: $,
4349
- placeholderId: $ ? `${g.filter((z) => z.column === y).length}` : void 0,
4352
+ placeholderId: $ ? `${g.filter((A) => A.column === y).length}` : void 0,
4350
4353
  depth: f,
4351
4354
  index: g.length
4352
4355
  });
4353
- b.subHeaders.push(w), g.push(b);
4356
+ b.subHeaders.push(h), g.push(b);
4354
4357
  }
4355
- v.headers.push(w), w.headerGroup = v;
4358
+ v.headers.push(h), h.headerGroup = v;
4356
4359
  }), c.push(v), f > 0 && d(g, f - 1);
4357
4360
  }, p = n.map((u, f) => wn(t, u, {
4358
4361
  depth: l,
@@ -4360,18 +4363,18 @@ function Je(e, n, t, r) {
4360
4363
  }));
4361
4364
  d(p, l - 1), c.reverse();
4362
4365
  const m = (u) => u.filter((v) => v.column.getIsVisible()).map((v) => {
4363
- let g = 0, w = 0, h = [0];
4364
- v.subHeaders && v.subHeaders.length ? (h = [], m(v.subHeaders).forEach((y) => {
4366
+ let g = 0, h = 0, w = [0];
4367
+ v.subHeaders && v.subHeaders.length ? (w = [], m(v.subHeaders).forEach((y) => {
4365
4368
  let {
4366
4369
  colSpan: $,
4367
4370
  rowSpan: b
4368
4371
  } = y;
4369
- g += $, h.push(b);
4372
+ g += $, w.push(b);
4370
4373
  })) : g = 1;
4371
- const S = Math.min(...h);
4372
- return w = w + S, v.colSpan = g, v.rowSpan = w, {
4374
+ const S = Math.min(...w);
4375
+ return h = h + S, v.colSpan = g, v.rowSpan = h, {
4373
4376
  colSpan: g,
4374
- rowSpan: w
4377
+ rowSpan: h
4375
4378
  };
4376
4379
  });
4377
4380
  return m((o = (i = c[0]) == null ? void 0 : i.headers) != null ? o : []), c;
@@ -4872,24 +4875,24 @@ const Io = {
4872
4875
  return (i) => {
4873
4876
  if (!r || !o || (i.persist == null || i.persist(), St(i) && i.touches && i.touches.length > 1))
4874
4877
  return;
4875
- const l = e.getSize(), s = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[r.id, r.getSize()]], c = St(i) ? Math.round(i.touches[0].clientX) : i.clientX, d = {}, p = (h, S) => {
4878
+ const l = e.getSize(), s = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[r.id, r.getSize()]], c = St(i) ? Math.round(i.touches[0].clientX) : i.clientX, d = {}, p = (w, S) => {
4876
4879
  typeof S == "number" && (n.setColumnSizingInfo((y) => {
4877
4880
  var $, b;
4878
- const z = n.options.columnResizeDirection === "rtl" ? -1 : 1, R = (S - (($ = y == null ? void 0 : y.startOffset) != null ? $ : 0)) * z, A = Math.max(R / ((b = y == null ? void 0 : y.startSize) != null ? b : 0), -0.999999);
4879
- return y.columnSizingStart.forEach((ee) => {
4880
- let [X, Q] = ee;
4881
- d[X] = Math.round(Math.max(Q + Q * A, 0) * 100) / 100;
4881
+ const A = n.options.columnResizeDirection === "rtl" ? -1 : 1, R = (S - (($ = y == null ? void 0 : y.startOffset) != null ? $ : 0)) * A, O = Math.max(R / ((b = y == null ? void 0 : y.startSize) != null ? b : 0), -0.999999);
4882
+ return y.columnSizingStart.forEach((J) => {
4883
+ let [U, K] = J;
4884
+ d[U] = Math.round(Math.max(K + K * O, 0) * 100) / 100;
4882
4885
  }), {
4883
4886
  ...y,
4884
4887
  deltaOffset: R,
4885
- deltaPercentage: A
4888
+ deltaPercentage: O
4886
4889
  };
4887
- }), (n.options.columnResizeMode === "onChange" || h === "end") && n.setColumnSizing((y) => ({
4890
+ }), (n.options.columnResizeMode === "onChange" || w === "end") && n.setColumnSizing((y) => ({
4888
4891
  ...y,
4889
4892
  ...d
4890
4893
  })));
4891
- }, m = (h) => p("move", h), u = (h) => {
4892
- p("end", h), n.setColumnSizingInfo((S) => ({
4894
+ }, m = (w) => p("move", w), u = (w) => {
4895
+ p("end", w), n.setColumnSizingInfo((S) => ({
4893
4896
  ...S,
4894
4897
  isResizingColumn: !1,
4895
4898
  startOffset: null,
@@ -4899,21 +4902,21 @@ const Io = {
4899
4902
  columnSizingStart: []
4900
4903
  }));
4901
4904
  }, f = t || typeof document < "u" ? document : null, v = {
4902
- moveHandler: (h) => m(h.clientX),
4903
- upHandler: (h) => {
4904
- f == null || f.removeEventListener("mousemove", v.moveHandler), f == null || f.removeEventListener("mouseup", v.upHandler), u(h.clientX);
4905
+ moveHandler: (w) => m(w.clientX),
4906
+ upHandler: (w) => {
4907
+ f == null || f.removeEventListener("mousemove", v.moveHandler), f == null || f.removeEventListener("mouseup", v.upHandler), u(w.clientX);
4905
4908
  }
4906
4909
  }, g = {
4907
- moveHandler: (h) => (h.cancelable && (h.preventDefault(), h.stopPropagation()), m(h.touches[0].clientX), !1),
4908
- upHandler: (h) => {
4910
+ moveHandler: (w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), m(w.touches[0].clientX), !1),
4911
+ upHandler: (w) => {
4909
4912
  var S;
4910
- f == null || f.removeEventListener("touchmove", g.moveHandler), f == null || f.removeEventListener("touchend", g.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), u((S = h.touches[0]) == null ? void 0 : S.clientX);
4913
+ f == null || f.removeEventListener("touchmove", g.moveHandler), f == null || f.removeEventListener("touchend", g.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), u((S = w.touches[0]) == null ? void 0 : S.clientX);
4911
4914
  }
4912
- }, w = qo() ? {
4915
+ }, h = qo() ? {
4913
4916
  passive: !1
4914
4917
  } : !1;
4915
- St(i) ? (f == null || f.addEventListener("touchmove", g.moveHandler, w), f == null || f.addEventListener("touchend", g.upHandler, w)) : (f == null || f.addEventListener("mousemove", v.moveHandler, w), f == null || f.addEventListener("mouseup", v.upHandler, w)), n.setColumnSizingInfo((h) => ({
4916
- ...h,
4918
+ St(i) ? (f == null || f.addEventListener("touchmove", g.moveHandler, h), f == null || f.addEventListener("touchend", g.upHandler, h)) : (f == null || f.addEventListener("mousemove", v.moveHandler, h), f == null || f.addEventListener("mouseup", v.upHandler, h)), n.setColumnSizingInfo((w) => ({
4919
+ ...w,
4917
4920
  startOffset: c,
4918
4921
  startSize: l,
4919
4922
  deltaOffset: 0,
@@ -5702,8 +5705,8 @@ function ii(e) {
5702
5705
  },
5703
5706
  // footer: props => props.header.column.id,
5704
5707
  cell: (v) => {
5705
- var g, w;
5706
- return (g = (w = v.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? g : null;
5708
+ var g, h;
5709
+ return (g = (h = v.renderValue()) == null || h.toString == null ? void 0 : h.toString()) != null ? g : null;
5707
5710
  },
5708
5711
  ...o._features.reduce((v, g) => Object.assign(v, g.getDefaultColumnDef == null ? void 0 : g.getDefaultColumnDef()), {}),
5709
5712
  ...u
@@ -5711,10 +5714,10 @@ function ii(e) {
5711
5714
  }, W(e, "debugColumns", "_getDefaultColumnDef")),
5712
5715
  _getColumnDefs: () => o.options.columns,
5713
5716
  getAllColumns: Z(() => [o._getColumnDefs()], (u) => {
5714
- const f = function(v, g, w) {
5715
- return w === void 0 && (w = 0), v.map((h) => {
5716
- const S = So(o, h, w, g), y = h;
5717
- return S.columns = y.columns ? f(y.columns, S, w + 1) : [], S;
5717
+ const f = function(v, g, h) {
5718
+ return h === void 0 && (h = 0), v.map((w) => {
5719
+ const S = So(o, w, h, g), y = w;
5720
+ return S.columns = y.columns ? f(y.columns, S, h + 1) : [], S;
5718
5721
  });
5719
5722
  };
5720
5723
  return f(u);
@@ -5812,10 +5815,11 @@ const si = {
5812
5815
  component: n,
5813
5816
  className: t = "",
5814
5817
  children: r,
5815
- color: o = "dark"
5818
+ id: o,
5819
+ color: i = "dark"
5816
5820
  }) => {
5817
- var s;
5818
- const l = n || {
5821
+ var c;
5822
+ const s = n || {
5819
5823
  h1: "h1",
5820
5824
  h2: "h2",
5821
5825
  h3: "h3",
@@ -5829,7 +5833,14 @@ const si = {
5829
5833
  caption: "span",
5830
5834
  overline: "span"
5831
5835
  }[e] || "p";
5832
- return /* @__PURE__ */ a.jsx(l, { className: `${si[e]} ${(s = we[o]) == null ? void 0 : s.text} ${t}`, children: r });
5836
+ return /* @__PURE__ */ a.jsx(
5837
+ s,
5838
+ {
5839
+ className: `${si[e]} ${(c = we[i]) == null ? void 0 : c.text} ${t}`,
5840
+ ...o ? { id: o } : {},
5841
+ children: r
5842
+ }
5843
+ );
5833
5844
  }, ui = ({
5834
5845
  total: e,
5835
5846
  currentPage: n,
@@ -5903,78 +5914,83 @@ const si = {
5903
5914
  ] });
5904
5915
  }, Vi = ({
5905
5916
  data: e,
5906
- columns: n = [],
5907
- pageSize: t,
5908
- pageIndex: r,
5909
- onPageSizeChange: o,
5910
- onPageChange: i,
5911
- rowOptionArray: l = [5, 10, 15],
5912
- totalRecords: s = e.length,
5913
- className: c = "",
5914
- paginationClassName: d = "",
5915
- tdClassName: p = "",
5916
- thClassName: m = "",
5917
- responsive: u = !1
5917
+ id: n,
5918
+ columns: t = [],
5919
+ pageSize: r,
5920
+ pageIndex: o,
5921
+ onPageSizeChange: i,
5922
+ onPageChange: l,
5923
+ rowOptionArray: s = [5, 10, 15],
5924
+ totalRecords: c = e.length,
5925
+ className: d = "",
5926
+ paginationClassName: p = "",
5927
+ tdClassName: m = "",
5928
+ thClassName: u = "",
5929
+ responsive: f = !1
5918
5930
  }) => {
5919
- const f = li({
5931
+ const v = li({
5920
5932
  data: e,
5921
- columns: n,
5933
+ columns: t,
5922
5934
  getCoreRowModel: ai(),
5923
5935
  manualPagination: !0,
5924
- pageCount: Math.ceil(s / t),
5936
+ pageCount: Math.ceil(c / r),
5925
5937
  state: {
5926
- pagination: { pageIndex: r, pageSize: t }
5938
+ pagination: { pageIndex: o, pageSize: r }
5927
5939
  }
5928
5940
  });
5929
5941
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(
5930
5942
  "div",
5931
5943
  {
5932
- className: `relative overflow-y-auto flex flex-col ${c} `,
5944
+ className: `relative overflow-y-auto flex flex-col ${d} `,
5933
5945
  children: [
5934
- /* @__PURE__ */ a.jsx("div", { className: `${u ? "overflow-x-auto" : ""}`, children: /* @__PURE__ */ a.jsxs("table", { className: "w-full relative border-collapse", children: [
5935
- /* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children: f.getHeaderGroups().map((v) => /* @__PURE__ */ a.jsx("tr", { children: v.headers.map((g) => /* @__PURE__ */ a.jsx(
5936
- "th",
5937
- {
5938
- className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${m}`,
5939
- children: g.isPlaceholder ? null : g.column.columnDef.header instanceof Function ? g.column.columnDef.header(
5940
- g.getContext()
5941
- ) : g.column.columnDef.header
5942
- },
5943
- g.id
5944
- )) }, v.id)) }),
5945
- /* @__PURE__ */ a.jsx("tbody", { className: "", children: f.getRowModel().rows.map((v) => /* @__PURE__ */ a.jsx(
5946
+ /* @__PURE__ */ a.jsx("div", { className: `${f ? "overflow-x-auto" : ""}`, children: /* @__PURE__ */ a.jsxs("table", { id: n, className: "w-full relative border-collapse", children: [
5947
+ /* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children: v.getHeaderGroups().map((g) => /* @__PURE__ */ a.jsx("tr", { children: g.headers.map((h) => {
5948
+ var w;
5949
+ return /* @__PURE__ */ a.jsx(
5950
+ "th",
5951
+ {
5952
+ className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${u}`,
5953
+ id: ((w = h.column.columnDef.meta) == null ? void 0 : w.headerId) || h.id,
5954
+ children: h.isPlaceholder ? null : h.column.columnDef.header instanceof Function ? h.column.columnDef.header(
5955
+ h.getContext()
5956
+ ) : h.column.columnDef.header
5957
+ },
5958
+ h.id
5959
+ );
5960
+ }) }, g.id)) }),
5961
+ /* @__PURE__ */ a.jsx("tbody", { className: "", children: v.getRowModel().rows.map((g) => /* @__PURE__ */ a.jsx(
5946
5962
  "tr",
5947
5963
  {
5948
5964
  className: "border-b border-color-gray-200",
5949
- children: v.getVisibleCells().map((g) => /* @__PURE__ */ a.jsx(
5965
+ children: g.getVisibleCells().map((h) => /* @__PURE__ */ a.jsx(
5950
5966
  "td",
5951
5967
  {
5952
- className: `px-2 py-4 font-normal text-sm text-color-gray-800 ${p}`,
5953
- children: g.column.columnDef.cell instanceof Function ? g.column.columnDef.cell(
5954
- g.getContext()
5955
- ) : g.getValue()
5968
+ className: `px-2 py-4 font-normal text-sm text-color-gray-800 ${m}`,
5969
+ children: h.column.columnDef.cell instanceof Function ? h.column.columnDef.cell(
5970
+ h.getContext()
5971
+ ) : h.getValue()
5956
5972
  },
5957
- g.id
5973
+ h.id
5958
5974
  ))
5959
5975
  },
5960
- v.id
5976
+ g.id
5961
5977
  )) })
5962
5978
  ] }) }),
5963
5979
  /* @__PURE__ */ a.jsxs(
5964
5980
  "div",
5965
5981
  {
5966
- className: `w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${d} sticky bottom-0 z-10`,
5982
+ className: `w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${p} sticky bottom-0 z-10`,
5967
5983
  children: [
5968
5984
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
5969
5985
  /* @__PURE__ */ a.jsx(ci, { variant: "body2", className: "hidden md:!flex", children: "Rows per page" }),
5970
5986
  /* @__PURE__ */ a.jsx(
5971
5987
  po,
5972
5988
  {
5973
- options: l,
5974
- selectedValue: t,
5989
+ options: s,
5990
+ selectedValue: r,
5975
5991
  placementTop: !0,
5976
- onChange: (v) => {
5977
- o(v), i(0);
5992
+ onChange: (g) => {
5993
+ i(g), l(0);
5978
5994
  }
5979
5995
  }
5980
5996
  )
@@ -5982,10 +5998,10 @@ const si = {
5982
5998
  /* @__PURE__ */ a.jsx(
5983
5999
  ui,
5984
6000
  {
5985
- total: s,
5986
- pageSize: t,
5987
- currentPage: r + 1,
5988
- onPageChange: (v) => i(v - 1)
6001
+ total: c,
6002
+ pageSize: r,
6003
+ currentPage: o + 1,
6004
+ onPageChange: (g) => l(g - 1)
5989
6005
  }
5990
6006
  )
5991
6007
  ]
@@ -6043,29 +6059,29 @@ const si = {
6043
6059
  labelClass: f = "",
6044
6060
  variant: v = "outlined",
6045
6061
  size: g = "medium",
6046
- ...w
6047
- }, h) => {
6048
- const [S, y] = J(""), $ = n !== void 0, b = $ ? n : S, z = p ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", R = p ? "text-color-red-500" : s, A = (ee) => {
6049
- let X = ee.target.value.replace(/(?!^\+)[^\d]/g, "");
6050
- X.startsWith("+") && (X = "+" + X.slice(1).replace(/\+/g, "")), X = X.replace(/\s/g, ""), (!m || X.replace(/^\+/, "").length <= m) && (t && t({
6051
- ...ee,
6052
- target: { ...ee.target, value: X }
6053
- }), $ || y(X));
6062
+ ...h
6063
+ }, w) => {
6064
+ const [S, y] = ee(""), $ = n !== void 0, b = $ ? n : S, A = p ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", R = p ? "text-color-red-500" : s, O = (J) => {
6065
+ let U = J.target.value.replace(/(?!^\+)[^\d]/g, "");
6066
+ U.startsWith("+") && (U = "+" + U.slice(1).replace(/\+/g, "")), U = U.replace(/\s/g, ""), (!m || U.replace(/^\+/, "").length <= m) && (t && t({
6067
+ ...J,
6068
+ target: { ...J.target, value: U }
6069
+ }), $ || y(U));
6054
6070
  };
6055
6071
  return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
6056
6072
  u && /* @__PURE__ */ a.jsx("label", { className: `text-sm font-medium text-color-gray-700 mb-1 block ${f}`, children: u }),
6057
- /* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${z} ${di[v]} ${i}`, children: [
6073
+ /* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${A} ${di[v]} ${i}`, children: [
6058
6074
  c && /* @__PURE__ */ a.jsx("span", { className: `pl-3 ${R}`, children: c }),
6059
6075
  /* @__PURE__ */ a.jsx(
6060
6076
  "input",
6061
6077
  {
6062
- ...w,
6063
- ref: h,
6078
+ ...h,
6079
+ ref: w,
6064
6080
  type: "text",
6065
6081
  inputMode: "numeric",
6066
6082
  placeholder: e,
6067
6083
  value: b,
6068
- onChange: A,
6084
+ onChange: O,
6069
6085
  className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${pi[g]} ${l}`
6070
6086
  }
6071
6087
  ),
@@ -6228,29 +6244,29 @@ const Yi = rr(function({
6228
6244
  showMarks: f = !1,
6229
6245
  marks: v = [],
6230
6246
  range: g = !1,
6231
- minDistance: w = 0
6247
+ minDistance: h = 0
6232
6248
  }) {
6233
- const h = n !== void 0, [S, y] = J(() => t !== void 0 ? t : g ? [i, l] : i), $ = h ? n : S, b = Array.isArray($) ? $[0] : $, [z, R] = Array.isArray($) ? $ : [$, $], A = _t[c] || _t.blue, ee = yn[d] ?? yn.medium, X = ce(
6249
+ const w = n !== void 0, [S, y] = ee(() => t !== void 0 ? t : g ? [i, l] : i), $ = w ? n : S, b = Array.isArray($) ? $[0] : $, [A, R] = Array.isArray($) ? $ : [$, $], O = _t[c] || _t.blue, J = yn[d] ?? yn.medium, U = ce(
6234
6250
  (F) => (F - i) / (l - i) * 100,
6235
6251
  [i, l]
6236
- ), Q = X(b), de = X(z), D = X(R), T = ce((F) => Math.max(i, Math.min(l, F)), [i, l]), q = ce((F) => Math.round(F / s) * s, [s]), K = vi(r), V = ce(
6252
+ ), K = U(b), de = U(A), D = U(R), z = ce((F) => Math.max(i, Math.min(l, F)), [i, l]), q = ce((F) => Math.round(F / s) * s, [s]), Q = vi(r), V = ce(
6237
6253
  (F, re = !0) => {
6238
- h || y(F), re ? K.schedule(F) : K.flush(F);
6254
+ w || y(F), re ? Q.schedule(F) : Q.flush(F);
6239
6255
  },
6240
- [h, K]
6256
+ [w, Q]
6241
6257
  ), ve = ce(() => {
6242
- const F = K.last.current;
6243
- F != null && (K.flush(F), o == null || o(F));
6244
- }, [K, o]), U = ce(
6258
+ const F = Q.last.current;
6259
+ F != null && (Q.flush(F), o == null || o(F));
6260
+ }, [Q, o]), X = ce(
6245
6261
  (F, re) => {
6246
6262
  if (g && Array.isArray(F)) {
6247
- let [oe, ge] = F, H = q(T(oe)), te = q(T(ge));
6248
- return te - H < w && (re === "min" ? te = T(H + w) : re === "max" && (H = T(te - w))), H > te && (re === "min" ? H = te : te = H), [H, te];
6263
+ let [oe, ge] = F, H = q(z(oe)), te = q(z(ge));
6264
+ return te - H < h && (re === "min" ? te = z(H + h) : re === "max" && (H = z(te - h))), H > te && (re === "min" ? H = te : te = H), [H, te];
6249
6265
  } else if (!g && typeof F == "number")
6250
- return q(T(F));
6266
+ return q(z(F));
6251
6267
  return F;
6252
6268
  },
6253
- [g, T, q, w]
6269
+ [g, z, q, h]
6254
6270
  ), x = me(null), j = ce(
6255
6271
  (F) => {
6256
6272
  var ge;
@@ -6262,11 +6278,11 @@ const Yi = rr(function({
6262
6278
  [i, l, g, b]
6263
6279
  ), L = ce(
6264
6280
  (F) => {
6265
- const re = Math.abs(F - z), oe = Math.abs(F - R);
6281
+ const re = Math.abs(F - A), oe = Math.abs(F - R);
6266
6282
  return re <= oe ? "min" : "max";
6267
6283
  },
6268
- [z, R]
6269
- ), [E, P] = J(null), [O, k] = J(null), [B, N] = J(null), G = ce(
6284
+ [A, R]
6285
+ ), [E, P] = ee(null), [T, k] = ee(null), [B, N] = ee(null), G = ce(
6270
6286
  (F, re) => {
6271
6287
  var ge, H;
6272
6288
  if (p) return;
@@ -6274,17 +6290,17 @@ const Yi = rr(function({
6274
6290
  const oe = j(F.clientX);
6275
6291
  if (g) {
6276
6292
  const te = re || L(oe);
6277
- P(te), V(te === "min" ? U([oe, R], "min") : U([z, oe], "max"));
6293
+ P(te), V(te === "min" ? X([oe, R], "min") : X([A, oe], "max"));
6278
6294
  } else
6279
- P("single"), V(U(oe, "single"));
6295
+ P("single"), V(X(oe, "single"));
6280
6296
  },
6281
6297
  [
6282
6298
  p,
6283
6299
  g,
6284
6300
  j,
6285
6301
  L,
6286
- U,
6287
- z,
6302
+ X,
6303
+ A,
6288
6304
  R,
6289
6305
  V
6290
6306
  ]
@@ -6292,7 +6308,7 @@ const Yi = rr(function({
6292
6308
  (F) => {
6293
6309
  if (p || B == null || E == null) return;
6294
6310
  const re = j(F.clientX);
6295
- g ? E === "min" ? V(U([re, R], "min")) : E === "max" && V(U([z, re], "max")) : V(U(re, "single"));
6311
+ g ? E === "min" ? V(X([re, R], "min")) : E === "max" && V(X([A, re], "max")) : V(X(re, "single"));
6296
6312
  },
6297
6313
  [
6298
6314
  p,
@@ -6300,8 +6316,8 @@ const Yi = rr(function({
6300
6316
  E,
6301
6317
  g,
6302
6318
  j,
6303
- U,
6304
- z,
6319
+ X,
6320
+ A,
6305
6321
  R,
6306
6322
  V
6307
6323
  ]
@@ -6310,7 +6326,7 @@ const Yi = rr(function({
6310
6326
  }, [E, ve]), _ = ce(
6311
6327
  (F, re) => {
6312
6328
  if (p) return;
6313
- const oe = g ? re === "min" ? z : R : b;
6329
+ const oe = g ? re === "min" ? A : R : b;
6314
6330
  let ge = oe;
6315
6331
  const H = (l - i) / 10;
6316
6332
  switch (F.key) {
@@ -6337,21 +6353,21 @@ const Yi = rr(function({
6337
6353
  default:
6338
6354
  return;
6339
6355
  }
6340
- F.preventDefault(), V(g ? re === "min" ? U([ge, R], "min") : U([z, ge], "max") : U(ge, "single"), !1), o == null || o(h ? n : $);
6356
+ F.preventDefault(), V(g ? re === "min" ? X([ge, R], "min") : X([A, ge], "max") : X(ge, "single"), !1), o == null || o(w ? n : $);
6341
6357
  },
6342
6358
  [
6343
6359
  p,
6344
6360
  g,
6345
6361
  b,
6346
- z,
6362
+ A,
6347
6363
  R,
6348
6364
  s,
6349
6365
  i,
6350
6366
  l,
6351
- U,
6367
+ X,
6352
6368
  V,
6353
6369
  o,
6354
- h,
6370
+ w,
6355
6371
  n,
6356
6372
  $
6357
6373
  ]
@@ -6363,14 +6379,14 @@ const Yi = rr(function({
6363
6379
  document.body.style.userSelect = F;
6364
6380
  };
6365
6381
  }, [E]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${m}`, children: /* @__PURE__ */ a.jsxs("div", { className: "relative flex items-center", children: [
6366
- g && /* @__PURE__ */ a.jsx("div", { className: "mr-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem]", children: /* @__PURE__ */ a.jsx("div", { className: "range-min", children: /* @__PURE__ */ a.jsx("div", { children: z }) }) }),
6382
+ g && /* @__PURE__ */ a.jsx("div", { className: "mr-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem]", children: /* @__PURE__ */ a.jsx("div", { className: "range-min", children: /* @__PURE__ */ a.jsx("div", { children: A }) }) }),
6367
6383
  /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
6368
6384
  /* @__PURE__ */ a.jsxs(
6369
6385
  "div",
6370
6386
  {
6371
6387
  ref: x,
6372
6388
  className: `
6373
- relative w-full ${ee.track} ${A.track} rounded-full
6389
+ relative w-full ${J.track} ${O.track} rounded-full
6374
6390
  ${p ? "opacity-60 cursor-not-allowed" : "cursor-pointer"}
6375
6391
  `,
6376
6392
  onPointerDown: (F) => G(F),
@@ -6381,18 +6397,18 @@ const Yi = rr(function({
6381
6397
  g ? /* @__PURE__ */ a.jsx(
6382
6398
  "div",
6383
6399
  {
6384
- className: `absolute top-0 ${ee.track} ${A.progress} rounded-full ${E ? "" : "transition-all duration-150"}`,
6400
+ className: `absolute top-0 ${J.track} ${O.progress} rounded-full ${E ? "" : "transition-all duration-150"}`,
6385
6401
  style: { left: `${de}%`, width: `${D - de}%` }
6386
6402
  }
6387
6403
  ) : /* @__PURE__ */ a.jsx(
6388
6404
  "div",
6389
6405
  {
6390
- className: `absolute top-0 left-0 ${ee.track} ${A.progress} rounded-full ${E ? "" : "transition-all duration-150"}`,
6391
- style: { width: `${Q}%` }
6406
+ className: `absolute top-0 left-0 ${J.track} ${O.progress} rounded-full ${E ? "" : "transition-all duration-150"}`,
6407
+ style: { width: `${K}%` }
6392
6408
  }
6393
6409
  ),
6394
6410
  f && v.map((F, re) => {
6395
- const oe = X(F.value);
6411
+ const oe = U(F.value);
6396
6412
  return /* @__PURE__ */ a.jsx(
6397
6413
  "div",
6398
6414
  {
@@ -6407,13 +6423,13 @@ const Yi = rr(function({
6407
6423
  {
6408
6424
  className: `
6409
6425
  absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2
6410
- ${ee.thumb} ${A.thumb} ${A.thumbHover} ${A.thumbActive}
6426
+ ${J.thumb} ${O.thumb} ${O.thumbHover} ${O.thumbActive}
6411
6427
  rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
6412
6428
  ${E === "single" ? "cursor-grabbing scale-110" : E ? "" : "transition-all duration-150"}
6413
- ${O === "single" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
6429
+ ${T === "single" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
6414
6430
  shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
6415
6431
  `,
6416
- style: { left: `${Q}%` },
6432
+ style: { left: `${K}%` },
6417
6433
  tabIndex: p ? -1 : 0,
6418
6434
  role: "slider",
6419
6435
  "aria-orientation": "horizontal",
@@ -6433,10 +6449,10 @@ const Yi = rr(function({
6433
6449
  {
6434
6450
  className: `
6435
6451
  absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
6436
- ${ee.thumb} ${A.thumb} ${A.thumbHover} ${A.thumbActive}
6452
+ ${J.thumb} ${O.thumb} ${O.thumbHover} ${O.thumbActive}
6437
6453
  rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
6438
6454
  ${E === "min" ? "cursor-grabbing scale-110 z-20" : E ? "" : "transition-all duration-150"}
6439
- ${O === "min" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
6455
+ ${T === "min" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
6440
6456
  shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
6441
6457
  `,
6442
6458
  style: { left: `${de}%` },
@@ -6445,7 +6461,7 @@ const Yi = rr(function({
6445
6461
  "aria-orientation": "horizontal",
6446
6462
  "aria-valuemin": i,
6447
6463
  "aria-valuemax": l,
6448
- "aria-valuenow": z,
6464
+ "aria-valuenow": A,
6449
6465
  "aria-disabled": p,
6450
6466
  "aria-label": "Minimum value",
6451
6467
  onKeyDown: (F) => _(F, "min"),
@@ -6459,10 +6475,10 @@ const Yi = rr(function({
6459
6475
  {
6460
6476
  className: `
6461
6477
  absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
6462
- ${ee.thumb} ${A.thumb} ${A.thumbHover} ${A.thumbActive}
6478
+ ${J.thumb} ${O.thumb} ${O.thumbHover} ${O.thumbActive}
6463
6479
  rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
6464
6480
  ${E === "max" ? "cursor-grabbing scale-110 z-20" : E ? "" : "transition-all duration-150"}
6465
- ${O === "max" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
6481
+ ${T === "max" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
6466
6482
  shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
6467
6483
  `,
6468
6484
  style: { left: `${D}%` },
@@ -6489,7 +6505,7 @@ const Yi = rr(function({
6489
6505
  {
6490
6506
  className: "relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",
6491
6507
  children: v.map((F, re) => {
6492
- const oe = X(F.value);
6508
+ const oe = U(F.value);
6493
6509
  return /* @__PURE__ */ a.jsx(
6494
6510
  "div",
6495
6511
  {
@@ -6697,20 +6713,20 @@ const Yi = rr(function({
6697
6713
  }) => {
6698
6714
  const [f, v] = ke.useState(null), g = (y, $) => {
6699
6715
  if (t || r || !n) return;
6700
- const { left: b, width: z } = y.target.getBoundingClientRect(), R = (y.clientX - b) / z;
6701
- let A = $ - 1 + Math.ceil(R / o) * o;
6702
- A = Math.min(i, Math.max(o, Math.round(A / o) * o)), n(A);
6703
- }, w = (y, $) => {
6716
+ const { left: b, width: A } = y.target.getBoundingClientRect(), R = (y.clientX - b) / A;
6717
+ let O = $ - 1 + Math.ceil(R / o) * o;
6718
+ O = Math.min(i, Math.max(o, Math.round(O / o) * o)), n(O);
6719
+ }, h = (y, $) => {
6704
6720
  if (t || r) return;
6705
- const { left: b, width: z } = y.target.getBoundingClientRect(), R = (y.clientX - b) / z;
6706
- let A = $ - 1 + Math.ceil(R / o) * o;
6707
- A = Math.min(i, Math.max(o, Math.round(A / o) * o)), v(A);
6708
- }, h = () => v(null), S = [];
6721
+ const { left: b, width: A } = y.target.getBoundingClientRect(), R = (y.clientX - b) / A;
6722
+ let O = $ - 1 + Math.ceil(R / o) * o;
6723
+ O = Math.min(i, Math.max(o, Math.round(O / o) * o)), v(O);
6724
+ }, w = () => v(null), S = [];
6709
6725
  for (let y = 1; y <= i; y++) {
6710
- let $ = (f !== null ? f : e) >= y, b = !$ && (f !== null ? f : e) > y - 1, z = $ ? s || ke.cloneElement(Cn, { className: `fill-color-yellow-500 ${tt[l]}` }) : c || ke.cloneElement(jn, { className: `stroke-color-gray-300 ${tt[l]}` });
6726
+ let $ = (f !== null ? f : e) >= y, b = !$ && (f !== null ? f : e) > y - 1, A = $ ? s || ke.cloneElement(Cn, { className: `fill-color-yellow-500 ${tt[l]}` }) : c || ke.cloneElement(jn, { className: `stroke-color-gray-300 ${tt[l]}` });
6711
6727
  if (b) {
6712
6728
  const R = ((f !== null ? f : e) - (y - 1)) * 100;
6713
- z = /* @__PURE__ */ a.jsxs("span", { className: "relative block", children: [
6729
+ A = /* @__PURE__ */ a.jsxs("span", { className: "relative block", children: [
6714
6730
  /* @__PURE__ */ a.jsx(
6715
6731
  "span",
6716
6732
  {
@@ -6732,13 +6748,13 @@ const Yi = rr(function({
6732
6748
  {
6733
6749
  className: `inline-block ${r ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
6734
6750
  onClick: (R) => g(R, y),
6735
- onMouseMove: (R) => w(R, y),
6736
- onMouseLeave: h,
6751
+ onMouseMove: (R) => h(R, y),
6752
+ onMouseLeave: w,
6737
6753
  tabIndex: t || r ? -1 : 0,
6738
6754
  "aria-label": `Rate ${y}`,
6739
6755
  role: "radio",
6740
6756
  "aria-checked": e === y,
6741
- children: z
6757
+ children: A
6742
6758
  },
6743
6759
  y
6744
6760
  )
@@ -6749,7 +6765,7 @@ const Yi = rr(function({
6749
6765
  p && f !== null ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: u[f] || f }) : m ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: u[e] || e }) : null
6750
6766
  ] });
6751
6767
  }, hi = () => {
6752
- const [e, n] = J("desktop");
6768
+ const [e, n] = ee("desktop");
6753
6769
  return pe(() => {
6754
6770
  const t = () => {
6755
6771
  const r = window.innerWidth;
@@ -6785,61 +6801,61 @@ const Yi = rr(function({
6785
6801
  swipeable: f = !0,
6786
6802
  thumbWidth: v = 60,
6787
6803
  orientation: g = "horizontal",
6788
- nextIcon: w,
6789
- prevIcon: h,
6804
+ nextIcon: h,
6805
+ prevIcon: w,
6790
6806
  className: S,
6791
6807
  mobile: y,
6792
6808
  tablet: $,
6793
6809
  desktop: b
6794
6810
  }) => {
6795
- const z = hi(), R = ze(
6811
+ const A = hi(), R = ze(
6796
6812
  y == null ? void 0 : y.perview,
6797
6813
  $ == null ? void 0 : $.perview,
6798
6814
  b == null ? void 0 : b.perview,
6799
6815
  c,
6800
- z
6801
- ), A = ze(
6816
+ A
6817
+ ), O = ze(
6802
6818
  y == null ? void 0 : y.gap,
6803
6819
  $ == null ? void 0 : $.gap,
6804
6820
  b == null ? void 0 : b.gap,
6805
6821
  d,
6806
- z
6807
- ), ee = ze(
6822
+ A
6823
+ ), J = ze(
6808
6824
  y == null ? void 0 : y.showArrows,
6809
6825
  $ == null ? void 0 : $.showArrows,
6810
6826
  b == null ? void 0 : b.showArrows,
6811
6827
  o,
6812
- z
6813
- ), X = ze(
6828
+ A
6829
+ ), U = ze(
6814
6830
  y == null ? void 0 : y.showIndicators,
6815
6831
  $ == null ? void 0 : $.showIndicators,
6816
6832
  b == null ? void 0 : b.showIndicators,
6817
6833
  r,
6818
- z
6819
- ), Q = ze(
6834
+ A
6835
+ ), K = ze(
6820
6836
  y == null ? void 0 : y.showThumbs,
6821
6837
  $ == null ? void 0 : $.showThumbs,
6822
6838
  b == null ? void 0 : b.showThumbs,
6823
6839
  m,
6824
- z
6840
+ A
6825
6841
  ), de = ze(
6826
6842
  y == null ? void 0 : y.swipeable,
6827
6843
  $ == null ? void 0 : $.swipeable,
6828
6844
  b == null ? void 0 : b.swipeable,
6829
6845
  f,
6830
- z
6831
- ), D = e.length, T = Math.min(Math.max(R, 0.1), D), [q, K] = J(0), [V, ve] = J(!1), [U, x] = J(!1), [j, L] = J(0), E = me(null), P = me(0), O = me(0), k = T >= D ? 0 : Math.max(0, D - T), B = (H) => Math.max(0, Math.min(H, k)), N = (H) => K(
6846
+ A
6847
+ ), D = e.length, z = Math.min(Math.max(R, 0.1), D), [q, Q] = ee(0), [V, ve] = ee(!1), [X, x] = ee(!1), [j, L] = ee(0), E = me(null), P = me(0), T = me(0), k = z >= D ? 0 : Math.max(0, D - z), B = (H) => Math.max(0, Math.min(H, k)), N = (H) => Q(
6832
6848
  s && k > 0 ? (H % (k + 1) + (k + 1)) % (k + 1) : B(H)
6833
6849
  ), G = () => {
6834
- s && k > 0 ? K(q === 0 ? k : q - 1) : N(q - 1);
6850
+ s && k > 0 ? Q(q === 0 ? k : q - 1) : N(q - 1);
6835
6851
  }, Y = () => {
6836
- s && k > 0 ? K(q >= k ? 0 : q + 1) : N(q + 1);
6852
+ s && k > 0 ? Q(q >= k ? 0 : q + 1) : N(q + 1);
6837
6853
  };
6838
6854
  pe(() => {
6839
- if (!i || u && V || U || k === 0)
6855
+ if (!i || u && V || X || k === 0)
6840
6856
  return;
6841
6857
  const H = setInterval(() => {
6842
- K((te) => {
6858
+ Q((te) => {
6843
6859
  const je = te + 1;
6844
6860
  return je > k ? s ? 0 : te : je;
6845
6861
  });
@@ -6850,29 +6866,29 @@ const Yi = rr(function({
6850
6866
  l,
6851
6867
  V,
6852
6868
  u,
6853
- U,
6869
+ X,
6854
6870
  k,
6855
6871
  s
6856
6872
  ]), pe(() => {
6857
- q > k && K(Math.min(q, k));
6873
+ q > k && Q(Math.min(q, k));
6858
6874
  }, [k, q]);
6859
6875
  const se = (H, te) => {
6860
- !de || k === 0 || (x(!0), P.current = g === "horizontal" ? H : te, O.current = P.current);
6876
+ !de || k === 0 || (x(!0), P.current = g === "horizontal" ? H : te, T.current = P.current);
6861
6877
  }, _ = (H, te) => {
6862
- U && (O.current = g === "horizontal" ? H : te, L(O.current - P.current));
6878
+ X && (T.current = g === "horizontal" ? H : te, L(T.current - P.current));
6863
6879
  }, F = () => {
6864
- if (!U) return;
6865
- Math.abs(O.current - P.current) > 50 && (O.current < P.current ? Y() : G()), x(!1), L(0);
6880
+ if (!X) return;
6881
+ Math.abs(T.current - P.current) > 50 && (T.current < P.current ? Y() : G()), x(!1), L(0);
6866
6882
  }, re = () => {
6867
6883
  const H = g === "horizontal" ? "X" : "Y";
6868
6884
  let te = 0;
6869
- if (U && E.current && k > 0) {
6885
+ if (X && E.current && k > 0) {
6870
6886
  const M = g === "horizontal" ? E.current.offsetWidth : E.current.offsetHeight;
6871
- te = j / M * 100 * (T / D);
6887
+ te = j / M * 100 * (z / D);
6872
6888
  }
6873
- const Se = Math.min(q, k) * (100 / D) - te, C = q >= k, he = q <= 0 ? 0 : C ? A / (R / 2) : A / R;
6889
+ const Se = Math.min(q, k) * (100 / D) - te, C = q >= k, he = q <= 0 ? 0 : C ? O / (R / 2) : O / R;
6874
6890
  return `translate${H}(calc(-${Se}% - ${he}px))`;
6875
- }, oe = () => T >= D ? 1 : Math.floor(k) + 1, ge = () => k === 0 ? 0 : Math.round(q / k * (oe() - 1));
6891
+ }, oe = () => z >= D ? 1 : Math.floor(k) + 1, ge = () => k === 0 ? 0 : Math.round(q / k * (oe() - 1));
6876
6892
  return /* @__PURE__ */ a.jsxs(
6877
6893
  "div",
6878
6894
  {
@@ -6885,9 +6901,9 @@ const Yi = rr(function({
6885
6901
  "div",
6886
6902
  {
6887
6903
  ref: E,
6888
- className: `w-full overflow-hidden relative ${de && k > 0 ? U ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
6904
+ className: `w-full overflow-hidden relative ${de && k > 0 ? X ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
6889
6905
  style: {
6890
- height: Q ? `calc(${t} - ${v + 20}px)` : t
6906
+ height: K ? `calc(${t} - ${v + 20}px)` : t
6891
6907
  },
6892
6908
  onMouseDown: (H) => {
6893
6909
  H.preventDefault(), se(H.clientX, H.clientY);
@@ -6904,28 +6920,28 @@ const Yi = rr(function({
6904
6920
  {
6905
6921
  className: `flex ${g === "horizontal" ? "flex-row" : "flex-col"} transition-all duration-300 ease-in-out`,
6906
6922
  style: {
6907
- width: g === "vertical" ? "100%" : `calc(${D * 100 / T}% + ${(D - 1) * A}px)`,
6908
- height: g === "vertical" ? `${D * 100 / T}%` : "100%",
6923
+ width: g === "vertical" ? "100%" : `calc(${D * 100 / z}% + ${(D - 1) * O}px)`,
6924
+ height: g === "vertical" ? `${D * 100 / z}%` : "100%",
6909
6925
  transform: re(),
6910
- gap: `${A}px`,
6911
- transitionProperty: U ? "none" : "transform"
6926
+ gap: `${O}px`,
6927
+ transitionProperty: X ? "none" : "transform"
6912
6928
  },
6913
6929
  children: e.map((H, te) => /* @__PURE__ */ a.jsx(
6914
6930
  "div",
6915
6931
  {
6916
6932
  className: "shrink-0 flex items-center justify-center",
6917
6933
  style: {
6918
- width: g === "horizontal" ? `calc(${100 / D}% - ${A / R}px)` : "100%",
6919
- height: g === "vertical" ? `calc(${100 / D}% - ${A * (D - 1) / D}px)` : "100%"
6934
+ width: g === "horizontal" ? `calc(${100 / D}% - ${O / R}px)` : "100%",
6935
+ height: g === "vertical" ? `calc(${100 / D}% - ${O * (D - 1) / D}px)` : "100%"
6920
6936
  },
6921
- onClick: () => !U && (p == null ? void 0 : p(te)),
6937
+ onClick: () => !X && (p == null ? void 0 : p(te)),
6922
6938
  children: H
6923
6939
  },
6924
6940
  te
6925
6941
  ))
6926
6942
  }
6927
6943
  ),
6928
- ee && k > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
6944
+ J && k > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
6929
6945
  /* @__PURE__ */ a.jsx(
6930
6946
  "button",
6931
6947
  {
@@ -6933,7 +6949,7 @@ const Yi = rr(function({
6933
6949
  onClick: G,
6934
6950
  className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-8 h-8 md:w-10 md:h-10 flex items-center justify-center text-sm md:text-lg font-bold text-color-gray-800 hover:bg-color-white transition-color cursor-pointer
6935
6951
  ${g === "horizontal" ? "left-1 md:left-2 top-1/2 -translate-y-1/2" : "left-1/2 top-1 md:top-2 -translate-x-1/2"}`,
6936
- children: h || (g === "horizontal" ? "‹" : "↑")
6952
+ children: w || (g === "horizontal" ? "‹" : "↑")
6937
6953
  }
6938
6954
  ),
6939
6955
  /* @__PURE__ */ a.jsx(
@@ -6943,11 +6959,11 @@ const Yi = rr(function({
6943
6959
  onClick: Y,
6944
6960
  className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-8 h-8 md:w-10 md:h-10 flex items-center justify-center text-sm md:text-lg font-bold text-color-gray-800 hover:bg-color-white transition-color cursor-pointer
6945
6961
  ${g === "horizontal" ? "right-1 md:right-2 top-1/2 -translate-y-1/2" : "left-1/2 bottom-1 md:bottom-2 -translate-x-1/2"}`,
6946
- children: w || (g === "horizontal" ? "›" : "↓")
6962
+ children: h || (g === "horizontal" ? "›" : "↓")
6947
6963
  }
6948
6964
  )
6949
6965
  ] }),
6950
- X && oe() > 1 && /* @__PURE__ */ a.jsx(
6966
+ U && oe() > 1 && /* @__PURE__ */ a.jsx(
6951
6967
  "div",
6952
6968
  {
6953
6969
  className: `uniui-indicator flex gap-1 mt-2 md:mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${g === "horizontal" ? "bottom-2 md:bottom-3 left-1/2 -translate-x-1/2" : "top-1/2 right-2 md:right-3 -translate-y-1/2 rotate-90"} z-10`,
@@ -6970,8 +6986,8 @@ const Yi = rr(function({
6970
6986
  ]
6971
6987
  }
6972
6988
  ),
6973
- Q && /* @__PURE__ */ a.jsx("div", { className: "uniui-thumb flex gap-1 md:gap-2 mt-2 md:mt-3 justify-center flex-wrap", children: e.map((H, te) => {
6974
- const je = te === Math.round(q), Se = z === "mobile" ? v * 0.8 : v;
6989
+ K && /* @__PURE__ */ a.jsx("div", { className: "uniui-thumb flex gap-1 md:gap-2 mt-2 md:mt-3 justify-center flex-wrap", children: e.map((H, te) => {
6990
+ const je = te === Math.round(q), Se = A === "mobile" ? v * 0.8 : v;
6975
6991
  return /* @__PURE__ */ a.jsx(
6976
6992
  "div",
6977
6993
  {
@@ -6980,7 +6996,7 @@ const Yi = rr(function({
6980
6996
  0,
6981
6997
  Math.min(
6982
6998
  k,
6983
- te - Math.floor(T / 2)
6999
+ te - Math.floor(z / 2)
6984
7000
  )
6985
7001
  );
6986
7002
  N(C);
@@ -7039,39 +7055,41 @@ const Yi = rr(function({
7039
7055
  disabled: t = !1,
7040
7056
  type: r = "button",
7041
7057
  color: o = "green",
7042
- variant: i = "ios"
7058
+ variant: i = "ios",
7043
7059
  // <-- default to ios
7060
+ id: l
7044
7061
  }) => {
7045
- var m, u, f;
7046
- const [l, s] = J(e), [c, d] = J(!1), p = async () => {
7047
- if (!(t || c))
7062
+ var u, f, v;
7063
+ const [s, c] = ee(e), [d, p] = ee(!1), m = async () => {
7064
+ if (!(t || d))
7048
7065
  if (n) {
7049
- d(!0);
7066
+ p(!0);
7050
7067
  try {
7051
- await n(!l), s(!l);
7052
- } catch (v) {
7053
- console.error("Toggle failed", v);
7068
+ await n(!s), c(!s);
7069
+ } catch (g) {
7070
+ console.error("Toggle failed", g);
7054
7071
  } finally {
7055
- d(!1);
7072
+ p(!1);
7056
7073
  }
7057
7074
  } else
7058
- s(!l);
7075
+ c(!s);
7059
7076
  };
7060
7077
  return i === "android" ? /* @__PURE__ */ a.jsxs(
7061
7078
  "button",
7062
7079
  {
7063
- onClick: p,
7080
+ onClick: m,
7081
+ id: l,
7064
7082
  type: r,
7065
7083
  disabled: t,
7066
7084
  className: `relative w-10 h-3 flex items-center transition-color duration-300
7067
7085
  } ${t ? "bg-color-gray-200 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
7068
7086
  children: [
7069
- /* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${l ? `${(m = we[o]) == null ? void 0 : m.filled}` : "bg-color-gray-400"}` }),
7087
+ /* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${s ? `${(u = we[o]) == null ? void 0 : u.filled}` : "bg-color-gray-400"}` }),
7070
7088
  /* @__PURE__ */ a.jsx(
7071
7089
  "div",
7072
7090
  {
7073
- className: `flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${l ? `translate-x-5 ${(u = we[o]) == null ? void 0 : u.filled}` : "translate-x-0 bg-color-white"}`,
7074
- children: c ? /* @__PURE__ */ a.jsx("svg", { className: "animate-spin text-color-gray-500 size-3", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" }) }) : null
7091
+ className: `flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${s ? `translate-x-5 ${(f = we[o]) == null ? void 0 : f.filled}` : "translate-x-0 bg-color-white"}`,
7092
+ children: d ? /* @__PURE__ */ a.jsx("svg", { className: "animate-spin text-color-gray-500 size-3", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" }) }) : null
7075
7093
  }
7076
7094
  )
7077
7095
  ]
@@ -7079,15 +7097,16 @@ const Yi = rr(function({
7079
7097
  ) : /* @__PURE__ */ a.jsx(
7080
7098
  "button",
7081
7099
  {
7082
- onClick: p,
7100
+ onClick: m,
7101
+ id: l,
7083
7102
  type: r,
7084
7103
  disabled: t,
7085
- className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${l ? (f = we[o]) == null ? void 0 : f.filled : "bg-color-gray-300"} ${t ? "bg-color-gray-300 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
7104
+ className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${s ? (v = we[o]) == null ? void 0 : v.filled : "bg-color-gray-300"} ${t ? "bg-color-gray-300 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
7086
7105
  children: /* @__PURE__ */ a.jsx(
7087
7106
  "div",
7088
7107
  {
7089
- className: `absolute top-[4px] left-1 w-4 h-4 bg-color-white rounded-full flex items-center justify-center transition-all duration-300 ${l ? "translate-x-[19px]" : "-translate-x-0"}`,
7090
- children: c ? /* @__PURE__ */ a.jsx("svg", { className: "animate-spin text-color-gray-500 size-3", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" }) }) : null
7108
+ className: `absolute top-[4px] left-1 w-4 h-4 bg-color-white rounded-full flex items-center justify-center transition-all duration-300 ${s ? "translate-x-[19px]" : "-translate-x-0"}`,
7109
+ children: d ? /* @__PURE__ */ a.jsx("svg", { className: "animate-spin text-color-gray-500 size-3", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" }) }) : null
7091
7110
  }
7092
7111
  )
7093
7112
  }
@@ -7252,13 +7271,13 @@ const Yi = rr(function({
7252
7271
  color: l = "blue",
7253
7272
  className: s = "",
7254
7273
  radioClass: c
7255
- }) => /* @__PURE__ */ a.jsx("div", { className: `flex ${o === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label: d, value: p, disabled: m }) => {
7256
- var f, v;
7257
- const u = i || m;
7274
+ }) => /* @__PURE__ */ a.jsx("div", { className: `flex ${o === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label: d, value: p, disabled: m, id: u }) => {
7275
+ var v, g;
7276
+ const f = i || m;
7258
7277
  return /* @__PURE__ */ a.jsxs(
7259
7278
  "label",
7260
7279
  {
7261
- className: `relative flex items-center cursor-pointer select-none transition ${u ? "opacity-50 cursor-not-allowed" : "hover:opacity-90"}`,
7280
+ className: `relative flex items-center cursor-pointer select-none transition ${f ? "opacity-50 cursor-not-allowed" : "hover:opacity-90"}`,
7262
7281
  children: [
7263
7282
  /* @__PURE__ */ a.jsx(
7264
7283
  "input",
@@ -7266,19 +7285,20 @@ const Yi = rr(function({
7266
7285
  type: "radio",
7267
7286
  name: e,
7268
7287
  value: p,
7269
- disabled: u,
7288
+ disabled: f,
7270
7289
  checked: t === p,
7271
- onChange: () => !u && (r == null ? void 0 : r(p)),
7272
- className: "sr-only peer"
7290
+ onChange: () => !f && (r == null ? void 0 : r(p)),
7291
+ className: "sr-only peer",
7292
+ ...u && { id: u }
7273
7293
  }
7274
7294
  ),
7275
7295
  /* @__PURE__ */ a.jsx(
7276
7296
  "div",
7277
7297
  {
7278
- className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(f = we[l]) == null ? void 0 : f.peer} ${c}`
7298
+ className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(v = we[l]) == null ? void 0 : v.peer} ${c}`
7279
7299
  }
7280
7300
  ),
7281
- /* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm ${(v = we[l]) == null ? void 0 : v.peer}`, children: d })
7301
+ /* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm ${(g = we[l]) == null ? void 0 : g.peer}`, children: d })
7282
7302
  ]
7283
7303
  },
7284
7304
  p
@@ -7330,7 +7350,7 @@ const Yi = rr(function({
7330
7350
  children: n,
7331
7351
  position: t = "top"
7332
7352
  }) => {
7333
- const [r, o] = J(!1), [i, l] = J({ top: 0, left: 0 }), s = me(null), c = me(null);
7353
+ const [r, o] = ee(!1), [i, l] = ee({ top: 0, left: 0 }), s = me(null), c = me(null);
7334
7354
  return pe(() => {
7335
7355
  if (r && s.current && c.current) {
7336
7356
  const d = s.current.getBoundingClientRect(), p = c.current.getBoundingClientRect();
@@ -7401,17 +7421,17 @@ const Ci = {
7401
7421
  fullWidth: d = !1,
7402
7422
  maxWidth: p
7403
7423
  }, m) => {
7404
- const [u, f] = J(e || !1), [v, g] = J(!1), [w, h] = J(!1);
7424
+ const [u, f] = ee(e || !1), [v, g] = ee(!1), [h, w] = ee(!1);
7405
7425
  pe(() => {
7406
7426
  e !== void 0 && f(e);
7407
7427
  }, [e]), _n(m, () => ({
7408
7428
  open: () => f(!0),
7409
7429
  close: () => {
7410
- h(!1), setTimeout(() => f(!1), 300);
7430
+ w(!1), setTimeout(() => f(!1), 300);
7411
7431
  }
7412
7432
  })), pe(() => {
7413
7433
  let y;
7414
- return u ? (g(!0), y = setTimeout(() => h(!0), 10)) : h(!1), () => clearTimeout(y);
7434
+ return u ? (g(!0), y = setTimeout(() => w(!0), 10)) : w(!1), () => clearTimeout(y);
7415
7435
  }, [u]);
7416
7436
  const S = () => {
7417
7437
  u || g(!1);
@@ -7429,7 +7449,7 @@ const Ci = {
7429
7449
  {
7430
7450
  className: yi(
7431
7451
  "fixed inset-0 z-50 flex items-center justify-center transition-opacity duration-300",
7432
- w ? "opacity-100" : "opacity-0 pointer-events-none"
7452
+ h ? "opacity-100" : "opacity-0 pointer-events-none"
7433
7453
  ),
7434
7454
  children: [
7435
7455
  /* @__PURE__ */ a.jsx(
@@ -7444,7 +7464,7 @@ const Ci = {
7444
7464
  /* @__PURE__ */ a.jsxs(
7445
7465
  "div",
7446
7466
  {
7447
- className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${w ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${c ? "w-full h-[calc(100%_-_40px)] m-5" : `${d ? "w-full" : "w-auto"} ${p ? Ci[p] : ""} mx-5`} ${r}`,
7467
+ className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${h ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${c ? "w-full h-[calc(100%_-_40px)] m-5" : `${d ? "w-full" : "w-auto"} ${p ? Ci[p] : ""} mx-5`} ${r}`,
7448
7468
  onTransitionEnd: S,
7449
7469
  children: [
7450
7470
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
@@ -7476,8 +7496,8 @@ const Ci = {
7476
7496
  }
7477
7497
  );
7478
7498
  function oa({ items: e, trigger: n, className: t, dropdownItemClass: r, positioning: o = "fixed" }) {
7479
- const [i, l] = J(!1), [s, c] = J({ top: 0, left: 0 }), [d, p] = J(!1), m = me(null), u = me(null), f = (g) => {
7480
- g.stopPropagation(), l((w) => !w), p(!1), i || c(o === "fixed" ? {
7499
+ const [i, l] = ee(!1), [s, c] = ee({ top: 0, left: 0 }), [d, p] = ee(!1), m = me(null), u = me(null), f = (g) => {
7500
+ g.stopPropagation(), l((h) => !h), p(!1), i || c(o === "fixed" ? {
7481
7501
  top: g.clientY,
7482
7502
  left: g.clientX
7483
7503
  } : {
@@ -7487,23 +7507,23 @@ function oa({ items: e, trigger: n, className: t, dropdownItemClass: r, position
7487
7507
  };
7488
7508
  or(() => {
7489
7509
  if (i && u.current) {
7490
- const g = u.current.getBoundingClientRect(), w = window.innerWidth, h = window.innerHeight;
7510
+ const g = u.current.getBoundingClientRect(), h = window.innerWidth, w = window.innerHeight;
7491
7511
  let { left: S, top: y } = s;
7492
7512
  const $ = S, b = y;
7493
7513
  if (o === "fixed")
7494
- S + g.width > w && (S = w - g.width - 12), S < 12 && (S = 12), y + g.height > h && (y = b - g.height), y < 12 && (y = 12);
7514
+ S + g.width > h && (S = h - g.width - 12), S < 12 && (S = 12), y + g.height > w && (y = b - g.height), y < 12 && (y = 12);
7495
7515
  else {
7496
- const z = window.scrollX, R = window.scrollY;
7497
- S - z + g.width > w && (S = z + w - g.width - 12), S < z + 12 && (S = z + 12), y - R + g.height > h && (y = b - g.height), y < R + 12 && (y = R + 12);
7516
+ const A = window.scrollX, R = window.scrollY;
7517
+ S - A + g.width > h && (S = A + h - g.width - 12), S < A + 12 && (S = A + 12), y - R + g.height > w && (y = b - g.height), y < R + 12 && (y = R + 12);
7498
7518
  }
7499
7519
  (S !== $ || y !== b) && c({ top: y, left: S }), setTimeout(() => {
7500
7520
  p(!0);
7501
7521
  }, 150);
7502
7522
  }
7503
7523
  }, [i, o]), pe(() => {
7504
- const g = (w) => {
7505
- var h;
7506
- u.current && !u.current.contains(w.target) && !((h = m.current) != null && h.contains(w.target)) && l(!1);
7524
+ const g = (h) => {
7525
+ var w;
7526
+ u.current && !u.current.contains(h.target) && !((w = m.current) != null && w.contains(h.target)) && l(!1);
7507
7527
  };
7508
7528
  return i && document.addEventListener("mousedown", g), () => {
7509
7529
  document.removeEventListener("mousedown", g);
@@ -7518,13 +7538,13 @@ function oa({ items: e, trigger: n, className: t, dropdownItemClass: r, position
7518
7538
  top: s.top,
7519
7539
  left: s.left
7520
7540
  },
7521
- children: e.map((g, w) => /* @__PURE__ */ a.jsxs(
7541
+ children: e.map((g, h) => /* @__PURE__ */ a.jsxs(
7522
7542
  "button",
7523
7543
  {
7524
7544
  disabled: g.disabled,
7525
7545
  onClick: () => {
7526
- var h;
7527
- (h = g.onClick) == null || h.call(g), l(!1);
7546
+ var w;
7547
+ (w = g.onClick) == null || w.call(g), l(!1);
7528
7548
  },
7529
7549
  className: `flex items-center gap-3 w-full text-left px-3 py-2 bg-color-transparent hover:bg-color-gray-100 transition-all cursor-pointer rounded-md text-md text-color-gray-700 ${g.disabled ? "opacity-50 hover:bg-color-transparent !cursor-not-allowed" : ""} ${r} ${g.itemClass}`,
7530
7550
  children: [
@@ -7532,7 +7552,7 @@ function oa({ items: e, trigger: n, className: t, dropdownItemClass: r, position
7532
7552
  /* @__PURE__ */ a.jsx("span", { children: g.label })
7533
7553
  ]
7534
7554
  },
7535
- w
7555
+ h
7536
7556
  ))
7537
7557
  }
7538
7558
  );
@@ -7555,21 +7575,21 @@ const $i = ({
7555
7575
  showCloseIcon: s = !0,
7556
7576
  anchor: c = "left"
7557
7577
  }) => {
7558
- const [d, p] = J(!1), [m, u] = J(!1);
7578
+ const [d, p] = ee(!1), [m, u] = ee(!1);
7559
7579
  pe(() => {
7560
- let w;
7561
- return e ? (p(!0), w = setTimeout(() => {
7580
+ let h;
7581
+ return e ? (p(!0), h = setTimeout(() => {
7562
7582
  u(!0);
7563
- }, 10)) : u(!1), () => clearTimeout(w);
7583
+ }, 10)) : u(!1), () => clearTimeout(h);
7564
7584
  }, [e]);
7565
7585
  const f = () => {
7566
7586
  e || p(!1);
7567
7587
  };
7568
7588
  if (pe(() => {
7569
- const w = (h) => {
7570
- h.key === "Escape" && (n == null || n());
7589
+ const h = (w) => {
7590
+ w.key === "Escape" && (n == null || n());
7571
7591
  };
7572
- return e && document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
7592
+ return e && document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
7573
7593
  }, [e, n]), pe(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
7574
7594
  document.body.style.overflow = "";
7575
7595
  }), [e]), !d) return null;
@@ -7640,7 +7660,7 @@ const $i = ({
7640
7660
  titleClass: c = "",
7641
7661
  contentClass: d = ""
7642
7662
  }) => {
7643
- const [p, m] = J(i), u = o !== void 0, f = u ? o : p, v = () => {
7663
+ const [p, m] = ee(i), u = o !== void 0, f = u ? o : p, v = () => {
7644
7664
  const g = !f;
7645
7665
  u || m(g), l == null || l(g);
7646
7666
  };
@@ -7692,7 +7712,7 @@ const $i = ({
7692
7712
  className: o = "",
7693
7713
  autoCloseDuration: i = 5e3
7694
7714
  }) => {
7695
- const [l, s] = J(!0), c = me(null);
7715
+ const [l, s] = ee(!0), c = me(null);
7696
7716
  return pe(() => {
7697
7717
  let d;
7698
7718
  return r && (requestAnimationFrame(() => {
@@ -7825,62 +7845,62 @@ const $i = ({
7825
7845
  hideFutureDates: f = !1,
7826
7846
  defaultDate: v,
7827
7847
  fromDate: g,
7828
- toDate: w,
7829
- minimumDate: h,
7848
+ toDate: h,
7849
+ minimumDate: w,
7830
7850
  maxDate: S
7831
7851
  }) => {
7832
- const [y, $] = J(!1), [b, z] = J(null), [R, A] = J(
7833
- g || w ? /* @__PURE__ */ new Date() : v ? new Date(typeof v == "string" ? parseInt(v) : v) : /* @__PURE__ */ new Date()
7834
- ), [ee, X] = J(
7852
+ const [y, $] = ee(!1), [b, A] = ee(null), [R, O] = ee(
7853
+ g || h ? /* @__PURE__ */ new Date() : v ? new Date(typeof v == "string" ? parseInt(v) : v) : /* @__PURE__ */ new Date()
7854
+ ), [J, U] = ee(
7835
7855
  u ? new Date(u) : v && !u ? new Date(typeof v == "string" ? parseInt(v) : v) : null
7836
- ), [Q, de] = J(g ? new Date(g) : null), [D, T] = J(w ? new Date(w) : null), [q, K] = J(null), [V, ve] = J({ hour: 12, minute: 0, ampm: "AM" }), U = me(null), [x, j] = J(
7856
+ ), [K, de] = ee(g ? new Date(g) : null), [D, z] = ee(h ? new Date(h) : null), [q, Q] = ee(null), [V, ve] = ee({ hour: 12, minute: 0, ampm: "AM" }), X = me(null), [x, j] = ee(
7837
7857
  u ? new Date(u) : v && !u ? new Date(typeof v == "string" ? parseInt(v) : v) : null
7838
- ), [L, E] = J(g ? new Date(g) : null), [P, O] = J(w ? new Date(w) : null);
7858
+ ), [L, E] = ee(g ? new Date(g) : null), [P, T] = ee(h ? new Date(h) : null);
7839
7859
  pe(() => {
7840
7860
  if (u)
7841
- X(new Date(u)), j(new Date(u));
7861
+ U(new Date(u)), j(new Date(u));
7842
7862
  else if (!u && v) {
7843
7863
  const C = new Date(typeof v == "string" ? parseInt(v) : v);
7844
- X(C), j(C);
7864
+ U(C), j(C);
7845
7865
  } else
7846
- X(null), j(null);
7866
+ U(null), j(null);
7847
7867
  }, [u, v]), pe(() => {
7848
- g && (de(new Date(g)), E(new Date(g)), X(new Date(g)), j(new Date(g)));
7868
+ g && (de(new Date(g)), E(new Date(g)), U(new Date(g)), j(new Date(g)));
7849
7869
  }, [g]), pe(() => {
7850
- w && (T(new Date(w)), O(new Date(w)), X(new Date(w)), j(new Date(w)));
7851
- }, [w]);
7870
+ h && (z(new Date(h)), T(new Date(h)), U(new Date(h)), j(new Date(h)));
7871
+ }, [h]);
7852
7872
  const k = (C) => {
7853
- C.stopPropagation(), z(C.currentTarget), $(!0), x ? A(new Date(x)) : v && !x && A(new Date(typeof v == "string" ? parseInt(v) : v));
7873
+ C.stopPropagation(), A(C.currentTarget), $(!0), x ? O(new Date(x)) : v && !x && O(new Date(typeof v == "string" ? parseInt(v) : v));
7854
7874
  }, B = (C) => {
7855
7875
  if (p && C.getTime() < p || m && C.getTime() > m || f && C.getTime() > (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) return !0;
7856
7876
  if (S) {
7857
7877
  const ie = typeof S == "string" ? new Date(S) : typeof S == "number" ? new Date(S) : S;
7858
7878
  if (C.getTime() > ie.getTime()) return !0;
7859
7879
  }
7860
- if (h) {
7861
- const ie = typeof h == "string" ? new Date(h) : typeof h == "number" ? new Date(h) : h;
7880
+ if (w) {
7881
+ const ie = typeof w == "string" ? new Date(w) : typeof w == "number" ? new Date(w) : w;
7862
7882
  if (C.getTime() < ie.getTime()) return !0;
7863
7883
  }
7864
7884
  return !1;
7865
7885
  }, N = (C) => {
7866
- n === "inline" && U.current && !U.current.contains(C.target) && (e === "single" ? ee || X(null) : e === "range" && (!Q || !D) && (de(null), T(null)), $(!1));
7886
+ n === "inline" && X.current && !X.current.contains(C.target) && (e === "single" ? J || U(null) : e === "range" && (!K || !D) && (de(null), z(null)), $(!1));
7867
7887
  };
7868
7888
  pe(() => (y ? document.addEventListener("mousedown", N) : document.removeEventListener("mousedown", N), () => {
7869
7889
  document.removeEventListener("mousedown", N);
7870
7890
  }), [y]);
7871
7891
  const G = (C) => {
7872
- !C || B(C) || (e === "single" ? X(C) : e === "range" && (!Q || Q && D ? (de(C), T(null)) : C >= Q ? T(C) : de(C)));
7892
+ !C || B(C) || (e === "single" ? U(C) : e === "range" && (!K || K && D ? (de(C), z(null)) : C >= K ? z(C) : de(C)));
7873
7893
  }, Y = (C) => {
7874
7894
  if (!C || B(C)) {
7875
- K(null);
7895
+ Q(null);
7876
7896
  return;
7877
7897
  }
7878
- e === "range" && Q && !D && K(C);
7898
+ e === "range" && K && !D && Q(C);
7879
7899
  }, se = () => {
7880
- K(null);
7900
+ Q(null);
7881
7901
  }, _ = () => {
7882
7902
  if ($(!1), e === "single") {
7883
- const C = r ? /* @__PURE__ */ new Date() : ee, ie = C ? new Date(
7903
+ const C = r ? /* @__PURE__ */ new Date() : J, ie = C ? new Date(
7884
7904
  C.getFullYear(),
7885
7905
  C.getMonth(),
7886
7906
  C.getDate(),
@@ -7891,15 +7911,15 @@ const $i = ({
7891
7911
  const he = ie ? ie.getTime() : null;
7892
7912
  i == null || i(he), l == null || l(he);
7893
7913
  } else if (e === "range") {
7894
- E(Q), O(D);
7914
+ E(K), T(D);
7895
7915
  const C = {
7896
- startDate: Q ? Q.getTime() : null,
7916
+ startDate: K ? K.getTime() : null,
7897
7917
  endDate: D ? D.getTime() : null
7898
7918
  };
7899
7919
  i == null || i(C), l == null || l(C);
7900
7920
  }
7901
7921
  }, F = () => {
7902
- $(!1), X(x), de(L), T(P), A(x ? new Date(x) : /* @__PURE__ */ new Date()), s == null || s();
7922
+ $(!1), U(x), de(L), z(P), O(x ? new Date(x) : /* @__PURE__ */ new Date()), s == null || s();
7903
7923
  }, re = () => {
7904
7924
  const C = new Date(R.getFullYear(), R.getMonth(), 1), ie = new Date(R.getFullYear(), R.getMonth() + 1, 0), he = (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999), M = [], I = C.getDay();
7905
7925
  for (let ne = 0; ne < I; ne++)
@@ -7910,8 +7930,8 @@ const $i = ({
7910
7930
  }
7911
7931
  return M;
7912
7932
  }, oe = () => {
7913
- if (h) {
7914
- const C = typeof h == "string" ? new Date(h) : typeof h == "number" ? new Date(h) : h;
7933
+ if (w) {
7934
+ const C = typeof w == "string" ? new Date(w) : typeof w == "number" ? new Date(w) : w;
7915
7935
  if (R.getFullYear() < C.getFullYear() || R.getFullYear() === C.getFullYear() && R.getMonth() <= C.getMonth()) return !1;
7916
7936
  }
7917
7937
  if (p) {
@@ -7936,13 +7956,13 @@ const $i = ({
7936
7956
  }, H = (C) => {
7937
7957
  if (!C) return !1;
7938
7958
  if (e === "single")
7939
- return (ee == null ? void 0 : ee.toDateString()) === C.toDateString();
7959
+ return (J == null ? void 0 : J.toDateString()) === C.toDateString();
7940
7960
  if (e === "range") {
7941
- if (Q && !D && q) {
7942
- const ie = Q < q ? Q : q, he = Q < q ? q : Q;
7961
+ if (K && !D && q) {
7962
+ const ie = K < q ? K : q, he = K < q ? q : K;
7943
7963
  return C >= ie && C <= he;
7944
7964
  }
7945
- return Q && D && C >= Q && C <= D;
7965
+ return K && D && C >= K && C <= D;
7946
7966
  }
7947
7967
  return !1;
7948
7968
  }, te = (C, ie) => {
@@ -7986,7 +8006,7 @@ const $i = ({
7986
8006
  ] }), Se = /* @__PURE__ */ a.jsxs(
7987
8007
  "div",
7988
8008
  {
7989
- ref: U,
8009
+ ref: X,
7990
8010
  className: `${n === "dialog" ? "relative w-full" : "absolute z-50 mt-2 w-72 rounded-lg border border-color-gray-200 bg-color-white shadow-xl p-4"}`,
7991
8011
  style: n === "dialog" ? void 0 : {
7992
8012
  position: "absolute",
@@ -8004,7 +8024,7 @@ const $i = ({
8004
8024
  color: "gray",
8005
8025
  roundedFull: !0,
8006
8026
  disabled: !oe(),
8007
- onClick: () => A(new Date(R.getFullYear(), R.getMonth() - 1, 1)),
8027
+ onClick: () => O(new Date(R.getFullYear(), R.getMonth() - 1, 1)),
8008
8028
  icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" }) })
8009
8029
  }
8010
8030
  ),
@@ -8014,13 +8034,13 @@ const $i = ({
8014
8034
  {
8015
8035
  className: "text-sm outline-none",
8016
8036
  value: R.getMonth(),
8017
- onChange: (C) => A(new Date(R.getFullYear(), parseInt(C.target.value), 1)),
8037
+ onChange: (C) => O(new Date(R.getFullYear(), parseInt(C.target.value), 1)),
8018
8038
  children: kn.map((C, ie) => {
8019
8039
  const he = R.getFullYear(), M = ie, I = /* @__PURE__ */ new Date();
8020
8040
  if (f && he === I.getFullYear() && M > I.getMonth())
8021
8041
  return null;
8022
- if (h) {
8023
- const ne = typeof h == "string" ? new Date(h) : typeof h == "number" ? new Date(h) : h;
8042
+ if (w) {
8043
+ const ne = typeof w == "string" ? new Date(w) : typeof w == "number" ? new Date(w) : w;
8024
8044
  if (he === ne.getFullYear() && M < ne.getMonth() || he < ne.getFullYear())
8025
8045
  return null;
8026
8046
  }
@@ -8038,11 +8058,11 @@ const $i = ({
8038
8058
  {
8039
8059
  className: "text-sm outline-none",
8040
8060
  value: R.getFullYear(),
8041
- onChange: (C) => A(new Date(parseInt(C.target.value), R.getMonth(), 1)),
8061
+ onChange: (C) => O(new Date(parseInt(C.target.value), R.getMonth(), 1)),
8042
8062
  children: Array.from({ length: 150 }, (C, ie) => (/* @__PURE__ */ new Date()).getFullYear() - 100 + ie).filter((C) => {
8043
8063
  if (f && C > (/* @__PURE__ */ new Date()).getFullYear()) return !1;
8044
- if (h) {
8045
- const ie = typeof h == "string" ? new Date(h) : typeof h == "number" ? new Date(h) : h;
8064
+ if (w) {
8065
+ const ie = typeof w == "string" ? new Date(w) : typeof w == "number" ? new Date(w) : w;
8046
8066
  if (C < ie.getFullYear()) return !1;
8047
8067
  }
8048
8068
  if (S || m) {
@@ -8062,7 +8082,7 @@ const $i = ({
8062
8082
  color: "gray",
8063
8083
  roundedFull: !0,
8064
8084
  disabled: !ge(),
8065
- onClick: () => A(new Date(R.getFullYear(), R.getMonth() + 1, 1)),
8085
+ onClick: () => O(new Date(R.getFullYear(), R.getMonth() + 1, 1)),
8066
8086
  icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) })
8067
8087
  }
8068
8088
  )
@@ -8111,8 +8131,8 @@ const $i = ({
8111
8131
  children: [
8112
8132
  e === "single" ? x && u !== null ? te(x) : c : (
8113
8133
  // Display rangeStart immediately if set, even if rangeEnd is null
8114
- Q || L || P ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
8115
- te(Q || L, "start"),
8134
+ K || L || P ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
8135
+ te(K || L, "start"),
8116
8136
  " -",
8117
8137
  " ",
8118
8138
  te(D || P, "end")
@@ -8207,7 +8227,7 @@ function ga({
8207
8227
  onItemSelect: l,
8208
8228
  className: s = ""
8209
8229
  }) {
8210
- const [c, d] = J(r), p = (m) => {
8230
+ const [c, d] = ee(r), p = (m) => {
8211
8231
  d(m), m.onClick && m.onClick(), l && l(m);
8212
8232
  };
8213
8233
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(