@blofin/blofin-ui 1.0.0-beta.7 → 1.0.0-beta.8

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.
@@ -1,27 +1,27 @@
1
1
  "use client";
2
- import { j as M } from "./jsx-runtime-ba6e4aac.js";
3
- import * as Se from "react";
4
- import V, { useLayoutEffect as Fn, useEffect as O, useRef as N, useMemo as T, useCallback as W, useState as Z, createContext as Ge, memo as $n, useReducer as Hn, useContext as Ce } from "react";
5
- import { c as $ } from "./index-c57db938.js";
6
- import { c as Ke } from "./clsx.m-e965ef18.js";
7
- import { unstable_batchedUpdates as rt, createPortal as Xn } from "react-dom";
8
- import { u as Wn } from "./useTheme-81e2a73e.js";
9
- var U = /* @__PURE__ */ ((e) => (e.default = "default", e.desc = "desc", e.asc = "asc", e))(U || {});
10
- const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
2
+ import { j as z } from "./jsx-runtime-ba6e4aac.js";
3
+ import * as Ce from "react";
4
+ import V, { useLayoutEffect as $n, useEffect as M, useRef as L, useMemo as O, useCallback as K, useState as Q, createContext as Je, memo as Fn, useReducer as Hn, useContext as Ie } from "react";
5
+ import { c as W } from "./index-c57db938.js";
6
+ import { c as Me } from "./clsx.m-e965ef18.js";
7
+ import { unstable_batchedUpdates as rt, createPortal as Wn } from "react-dom";
8
+ import { u as Xn } from "./useTheme-81e2a73e.js";
9
+ var ne = /* @__PURE__ */ ((e) => (e.default = "default", e.desc = "desc", e.asc = "asc", e))(ne || {});
10
+ const Yn = W("bu-w-full bu-rounded-lg", {
11
11
  variants: {
12
12
  theme: {
13
13
  light: "bu-bg-light-background",
14
14
  dark: "bu-bg-dark-background"
15
15
  }
16
16
  }
17
- }), Kn = $("bu-w-full bu-border-collapse"), Un = $("bu-sticky bu-top-0 bu-z-[100]", {
17
+ }), Kn = W("bu-w-full bu-border-collapse"), Un = W("bu-sticky bu-top-0 bu-z-[100]", {
18
18
  variants: {
19
19
  theme: {
20
20
  light: "bu-bg-light-background",
21
21
  dark: "bu-bg-dark-background"
22
22
  }
23
23
  }
24
- }), rn = $(
24
+ }), rn = W(
25
25
  "bu-relative bu-z-[999] bu-h-[25px] bu-select-none bu-border-b bu-px-[4px] bu-text-left bu-text-[12px] bu-font-medium bu-transition-all bu-duration-300",
26
26
  {
27
27
  variants: {
@@ -35,28 +35,28 @@ const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
35
35
  }
36
36
  }
37
37
  }
38
- ), on = $("bu-sticky bu-left-0 bu-top-0 bu-z-[1000]", {
38
+ ), on = W("bu-sticky bu-left-0 bu-top-0 bu-z-[1000]", {
39
39
  variants: {
40
40
  theme: {
41
41
  light: "bu-bg-light-background",
42
42
  dark: "bu-bg-dark-background"
43
43
  }
44
44
  }
45
- }), sn = $("bu-sticky bu-right-0 bu-top-0 bu-z-[1000]", {
45
+ }), sn = W("bu-sticky bu-right-0 bu-top-0 bu-z-[1000]", {
46
46
  variants: {
47
47
  theme: {
48
48
  light: "bu-bg-light-background",
49
49
  dark: "bu-bg-dark-background"
50
50
  }
51
51
  }
52
- }), Vn = $("bu-cursor-pointer", {
52
+ }), Vn = W("bu-cursor-pointer", {
53
53
  variants: {
54
54
  theme: {
55
55
  light: "hover:bu-bg-light-hover-fill-primary",
56
56
  dark: "hover:bu-bg-dark-hover-fill-primary"
57
57
  }
58
58
  }
59
- }), qn = $(
59
+ }), qn = W(
60
60
  "bu-pointer-events-auto bu-opacity-0 bu-transition-opacity bu-duration-200 group-hover:bu-opacity-100",
61
61
  {
62
62
  variants: {
@@ -66,14 +66,14 @@ const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
66
66
  }
67
67
  }
68
68
  }
69
- ), an = $("bu-z-[1002] !bu-cursor-grabbing bu-opacity-60 bu-shadow-lg", {
69
+ ), an = W("bu-z-[1002] !bu-cursor-grabbing bu-opacity-60 bu-shadow-lg", {
70
70
  variants: {
71
71
  theme: {
72
72
  light: "bu-bg-light-background",
73
73
  dark: "bu-bg-dark-background"
74
74
  }
75
75
  }
76
- }), Gn = $("bu-ml-2 bu-inline-flex bu-flex-col bu-align-middle"), Jn = $(
76
+ }), Gn = W("bu-ml-2 bu-inline-flex bu-flex-col bu-align-middle"), Jn = W(
77
77
  "bu-h-0 bu-w-0 bu-border-l-4 bu-border-r-4 bu-border-transparent",
78
78
  {
79
79
  variants: {
@@ -91,42 +91,42 @@ const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
91
91
  }
92
92
  }
93
93
  }
94
- ), _n = $("", {
94
+ ), _n = W("", {
95
95
  variants: {
96
96
  theme: {
97
97
  light: "bu-bg-light-background",
98
98
  dark: "bu-bg-dark-background"
99
99
  }
100
100
  }
101
- }), Zn = $("bu-group bu-border-b bu-transition-colors bu-duration-200", {
101
+ }), Zn = W("bu-group bu-border-b bu-transition-colors bu-duration-200", {
102
102
  variants: {
103
103
  theme: {
104
104
  light: "bu-hover:bu-bg-light-fill-primary bu-border-light-line-primary",
105
105
  dark: "bu-hover:bu-bg-dark-fill-primary bu-border-dark-line-primary"
106
106
  }
107
107
  }
108
- }), ln = $("bu-h-[60px] bu-border-b bu-px-[4px] bu-text-[12px]", {
108
+ }), ln = W("bu-h-[60px] bu-border-b bu-px-[4px] bu-text-[12px]", {
109
109
  variants: {
110
110
  theme: {
111
111
  light: "bu-border-light-line-primary bu-text-light-label group-hover:bu-bg-light-fill-primary",
112
112
  dark: "bu-border-dark-line-primary bu-text-dark-label group-hover:bu-bg-dark-fill-primary"
113
113
  }
114
114
  }
115
- }), cn = $("bu-sticky bu-left-0", {
115
+ }), cn = W("bu-sticky bu-left-0", {
116
116
  variants: {
117
117
  theme: {
118
118
  light: "bu-bg-light-background group-hover:bu-bg-light-fill-primary",
119
119
  dark: "bu-bg-dark-background group-hover:bu-bg-dark-fill-primary"
120
120
  }
121
121
  }
122
- }), un = $("bu-sticky bu-right-0", {
122
+ }), un = W("bu-sticky bu-right-0", {
123
123
  variants: {
124
124
  theme: {
125
125
  light: "bu-bg-light-background group-hover:bu-bg-light-fill-primary",
126
126
  dark: "bu-bg-dark-background group-hover:bu-bg-dark-fill-primary"
127
127
  }
128
128
  }
129
- }), Qn = $("bu-px-5 bu-py-10 bu-text-center", {
129
+ }), Qn = W("bu-px-5 bu-py-10 bu-text-center", {
130
130
  variants: {
131
131
  theme: {
132
132
  light: "bu-text-light-label-60",
@@ -168,7 +168,7 @@ const Yn = $("bu-w-full bu-overflow-auto bu-rounded-lg", {
168
168
  function rr() {
169
169
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
170
170
  t[n] = arguments[n];
171
- return T(
171
+ return O(
172
172
  () => (r) => {
173
173
  t.forEach((o) => o(r));
174
174
  },
@@ -177,62 +177,62 @@ function rr() {
177
177
  );
178
178
  }
179
179
  const dt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
180
- function Ne(e) {
180
+ function ze(e) {
181
181
  const t = Object.prototype.toString.call(e);
182
182
  return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
183
183
  t === "[object global]";
184
184
  }
185
- function Et(e) {
185
+ function It(e) {
186
186
  return "nodeType" in e;
187
187
  }
188
188
  function q(e) {
189
189
  var t, n;
190
- return e ? Ne(e) ? e : Et(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
190
+ return e ? ze(e) ? e : It(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
191
191
  }
192
- function It(e) {
192
+ function Et(e) {
193
193
  const {
194
194
  Document: t
195
195
  } = q(e);
196
196
  return e instanceof t;
197
197
  }
198
- function Je(e) {
199
- return Ne(e) ? !1 : e instanceof q(e).HTMLElement;
198
+ function _e(e) {
199
+ return ze(e) ? !1 : e instanceof q(e).HTMLElement;
200
200
  }
201
201
  function dn(e) {
202
202
  return e instanceof q(e).SVGElement;
203
203
  }
204
- function Me(e) {
205
- return e ? Ne(e) ? e.document : Et(e) ? It(e) ? e : Je(e) || dn(e) ? e.ownerDocument : document : document : document;
204
+ function je(e) {
205
+ return e ? ze(e) ? e.document : It(e) ? Et(e) ? e : _e(e) || dn(e) ? e.ownerDocument : document : document : document;
206
206
  }
207
- const ue = dt ? Fn : O;
207
+ const fe = dt ? $n : M;
208
208
  function kt(e) {
209
- const t = N(e);
210
- return ue(() => {
209
+ const t = L(e);
210
+ return fe(() => {
211
211
  t.current = e;
212
- }), W(function() {
212
+ }), K(function() {
213
213
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
214
214
  r[o] = arguments[o];
215
215
  return t.current == null ? void 0 : t.current(...r);
216
216
  }, []);
217
217
  }
218
218
  function or() {
219
- const e = N(null), t = W((r, o) => {
219
+ const e = L(null), t = K((r, o) => {
220
220
  e.current = setInterval(r, o);
221
- }, []), n = W(() => {
221
+ }, []), n = K(() => {
222
222
  e.current !== null && (clearInterval(e.current), e.current = null);
223
223
  }, []);
224
224
  return [t, n];
225
225
  }
226
- function Ue(e, t) {
226
+ function Ve(e, t) {
227
227
  t === void 0 && (t = [e]);
228
- const n = N(e);
229
- return ue(() => {
228
+ const n = L(e);
229
+ return fe(() => {
230
230
  n.current !== e && (n.current = e);
231
231
  }, t), n;
232
232
  }
233
- function _e(e, t) {
234
- const n = N();
235
- return T(
233
+ function Ze(e, t) {
234
+ const n = L();
235
+ return O(
236
236
  () => {
237
237
  const r = e(n.current);
238
238
  return n.current = r, r;
@@ -242,7 +242,7 @@ function _e(e, t) {
242
242
  );
243
243
  }
244
244
  function at(e) {
245
- const t = kt(e), n = N(null), r = W(
245
+ const t = kt(e), n = L(null), r = K(
246
246
  (o) => {
247
247
  o !== n.current && (t == null || t(o, n.current)), n.current = o;
248
248
  },
@@ -252,14 +252,14 @@ function at(e) {
252
252
  return [n, r];
253
253
  }
254
254
  function mt(e) {
255
- const t = N();
256
- return O(() => {
255
+ const t = L();
256
+ return M(() => {
257
257
  t.current = e;
258
258
  }, [e]), t.current;
259
259
  }
260
260
  let pt = {};
261
- function Ze(e, t) {
262
- return T(() => {
261
+ function Qe(e, t) {
262
+ return O(() => {
263
263
  if (t)
264
264
  return t;
265
265
  const n = pt[e] == null ? 0 : pt[e] + 1;
@@ -272,9 +272,9 @@ function fn(e) {
272
272
  r[o - 1] = arguments[o];
273
273
  return r.reduce((i, s) => {
274
274
  const a = Object.entries(s);
275
- for (const [l, d] of a) {
276
- const u = i[l];
277
- u != null && (i[l] = u + e * d);
275
+ for (const [l, u] of a) {
276
+ const c = i[l];
277
+ c != null && (i[l] = c + e * u);
278
278
  }
279
279
  return i;
280
280
  }, {
@@ -282,11 +282,11 @@ function fn(e) {
282
282
  });
283
283
  };
284
284
  }
285
- const Oe = /* @__PURE__ */ fn(1), lt = /* @__PURE__ */ fn(-1);
285
+ const Le = /* @__PURE__ */ fn(1), lt = /* @__PURE__ */ fn(-1);
286
286
  function ir(e) {
287
287
  return "clientX" in e && "clientY" in e;
288
288
  }
289
- function At(e) {
289
+ function Tt(e) {
290
290
  if (!e)
291
291
  return !1;
292
292
  const {
@@ -329,7 +329,7 @@ function St(e) {
329
329
  y: e.clientY
330
330
  } : null;
331
331
  }
332
- const Ve = /* @__PURE__ */ Object.freeze({
332
+ const qe = /* @__PURE__ */ Object.freeze({
333
333
  Translate: {
334
334
  toString(e) {
335
335
  if (!e)
@@ -355,7 +355,7 @@ const Ve = /* @__PURE__ */ Object.freeze({
355
355
  Transform: {
356
356
  toString(e) {
357
357
  if (e)
358
- return [Ve.Translate.toString(e), Ve.Scale.toString(e)].join(" ");
358
+ return [qe.Translate.toString(e), qe.Scale.toString(e)].join(" ");
359
359
  }
360
360
  },
361
361
  Transition: {
@@ -414,26 +414,26 @@ function ur(e) {
414
414
  }, n);
415
415
  }
416
416
  function dr() {
417
- const [e, t] = Z("");
417
+ const [e, t] = Q("");
418
418
  return {
419
- announce: W((r) => {
419
+ announce: K((r) => {
420
420
  r != null && t(r);
421
421
  }, []),
422
422
  announcement: e
423
423
  };
424
424
  }
425
- const hn = /* @__PURE__ */ Ge(null);
425
+ const hn = /* @__PURE__ */ Je(null);
426
426
  function fr(e) {
427
- const t = Ce(hn);
428
- O(() => {
427
+ const t = Ie(hn);
428
+ M(() => {
429
429
  if (!t)
430
430
  throw new Error("useDndMonitor must be used within a children of <DndContext>");
431
431
  return t(e);
432
432
  }, [e, t]);
433
433
  }
434
434
  function hr() {
435
- const [e] = Z(() => /* @__PURE__ */ new Set()), t = W((r) => (e.add(r), () => e.delete(r)), [e]);
436
- return [W((r) => {
435
+ const [e] = Q(() => /* @__PURE__ */ new Set()), t = K((r) => (e.add(r), () => e.delete(r)), [e]);
436
+ return [K((r) => {
437
437
  let {
438
438
  type: o,
439
439
  event: i
@@ -488,77 +488,77 @@ function vr(e) {
488
488
  const {
489
489
  announce: i,
490
490
  announcement: s
491
- } = dr(), a = Ze("DndLiveRegion"), [l, d] = Z(!1);
492
- if (O(() => {
493
- d(!0);
494
- }, []), fr(T(() => ({
495
- onDragStart(c) {
491
+ } = dr(), a = Qe("DndLiveRegion"), [l, u] = Q(!1);
492
+ if (M(() => {
493
+ u(!0);
494
+ }, []), fr(O(() => ({
495
+ onDragStart(d) {
496
496
  let {
497
- active: h
498
- } = c;
497
+ active: f
498
+ } = d;
499
499
  i(t.onDragStart({
500
- active: h
500
+ active: f
501
501
  }));
502
502
  },
503
- onDragMove(c) {
503
+ onDragMove(d) {
504
504
  let {
505
- active: h,
506
- over: f
507
- } = c;
505
+ active: f,
506
+ over: h
507
+ } = d;
508
508
  t.onDragMove && i(t.onDragMove({
509
- active: h,
510
- over: f
509
+ active: f,
510
+ over: h
511
511
  }));
512
512
  },
513
- onDragOver(c) {
513
+ onDragOver(d) {
514
514
  let {
515
- active: h,
516
- over: f
517
- } = c;
515
+ active: f,
516
+ over: h
517
+ } = d;
518
518
  i(t.onDragOver({
519
- active: h,
520
- over: f
519
+ active: f,
520
+ over: h
521
521
  }));
522
522
  },
523
- onDragEnd(c) {
523
+ onDragEnd(d) {
524
524
  let {
525
- active: h,
526
- over: f
527
- } = c;
525
+ active: f,
526
+ over: h
527
+ } = d;
528
528
  i(t.onDragEnd({
529
- active: h,
530
- over: f
529
+ active: f,
530
+ over: h
531
531
  }));
532
532
  },
533
- onDragCancel(c) {
533
+ onDragCancel(d) {
534
534
  let {
535
- active: h,
536
- over: f
537
- } = c;
535
+ active: f,
536
+ over: h
537
+ } = d;
538
538
  i(t.onDragCancel({
539
- active: h,
540
- over: f
539
+ active: f,
540
+ over: h
541
541
  }));
542
542
  }
543
543
  }), [i, t])), !l)
544
544
  return null;
545
- const u = V.createElement(V.Fragment, null, V.createElement(cr, {
545
+ const c = V.createElement(V.Fragment, null, V.createElement(cr, {
546
546
  id: r,
547
547
  value: o.draggable
548
548
  }), V.createElement(ur, {
549
549
  id: a,
550
550
  announcement: s
551
551
  }));
552
- return n ? Xn(u, n) : u;
552
+ return n ? Wn(c, n) : c;
553
553
  }
554
- var z;
554
+ var $;
555
555
  (function(e) {
556
556
  e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
557
- })(z || (z = {}));
557
+ })($ || ($ = {}));
558
558
  function ct() {
559
559
  }
560
560
  function Kt(e, t) {
561
- return T(
561
+ return O(
562
562
  () => ({
563
563
  sensor: e,
564
564
  options: t ?? {}
@@ -570,7 +570,7 @@ function Kt(e, t) {
570
570
  function pr() {
571
571
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
572
572
  t[n] = arguments[n];
573
- return T(
573
+ return O(
574
574
  () => [...t].filter((r) => r != null),
575
575
  // eslint-disable-next-line react-hooks/exhaustive-deps
576
576
  [...t]
@@ -631,12 +631,12 @@ const Sr = (e) => {
631
631
  id: a
632
632
  } = s, l = n.get(a);
633
633
  if (l) {
634
- const d = yr(Ut(l), o);
634
+ const u = yr(Ut(l), o);
635
635
  i.push({
636
636
  id: a,
637
637
  data: {
638
638
  droppableContainer: s,
639
- value: d
639
+ value: u
640
640
  }
641
641
  });
642
642
  }
@@ -646,8 +646,8 @@ const Sr = (e) => {
646
646
  function Dr(e, t) {
647
647
  const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
648
648
  if (r < o && n < i) {
649
- const l = t.width * t.height, d = e.width * e.height, u = s * a, c = u / (l + d - u);
650
- return Number(c.toFixed(4));
649
+ const l = t.width * t.height, u = e.width * e.height, c = s * a, d = c / (l + u - c);
650
+ return Number(d.toFixed(4));
651
651
  }
652
652
  return 0;
653
653
  }
@@ -688,7 +688,7 @@ function gn(e, t) {
688
688
  y: e.top - t.top
689
689
  } : ie;
690
690
  }
691
- function Er(e) {
691
+ function Ir(e) {
692
692
  return function(n) {
693
693
  for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
694
694
  o[i - 1] = arguments[i];
@@ -703,7 +703,7 @@ function Er(e) {
703
703
  });
704
704
  };
705
705
  }
706
- const Ir = /* @__PURE__ */ Er(1);
706
+ const Er = /* @__PURE__ */ Ir(1);
707
707
  function kr(e) {
708
708
  if (e.startsWith("matrix3d(")) {
709
709
  const t = e.slice(9, -1).split(/, /);
@@ -724,7 +724,7 @@ function kr(e) {
724
724
  }
725
725
  return null;
726
726
  }
727
- function Ar(e, t, n) {
727
+ function Tr(e, t, n) {
728
728
  const r = kr(t);
729
729
  if (!r)
730
730
  return e;
@@ -733,28 +733,28 @@ function Ar(e, t, n) {
733
733
  scaleY: i,
734
734
  x: s,
735
735
  y: a
736
- } = r, l = e.left - s - (1 - o) * parseFloat(n), d = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = o ? e.width / o : e.width, c = i ? e.height / i : e.height;
736
+ } = r, l = e.left - s - (1 - o) * parseFloat(n), u = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), c = o ? e.width / o : e.width, d = i ? e.height / i : e.height;
737
737
  return {
738
- width: u,
739
- height: c,
740
- top: d,
741
- right: l + u,
742
- bottom: d + c,
738
+ width: c,
739
+ height: d,
740
+ top: u,
741
+ right: l + c,
742
+ bottom: u + d,
743
743
  left: l
744
744
  };
745
745
  }
746
- const Tr = {
746
+ const Ar = {
747
747
  ignoreTransform: !1
748
748
  };
749
- function Le(e, t) {
750
- t === void 0 && (t = Tr);
749
+ function Pe(e, t) {
750
+ t === void 0 && (t = Ar);
751
751
  let n = e.getBoundingClientRect();
752
752
  if (t.ignoreTransform) {
753
753
  const {
754
- transform: d,
755
- transformOrigin: u
754
+ transform: u,
755
+ transformOrigin: c
756
756
  } = q(e).getComputedStyle(e);
757
- d && (n = Ar(n, d, u));
757
+ u && (n = Tr(n, u, c));
758
758
  }
759
759
  const {
760
760
  top: r,
@@ -774,11 +774,11 @@ function Le(e, t) {
774
774
  };
775
775
  }
776
776
  function Vt(e) {
777
- return Le(e, {
777
+ return Pe(e, {
778
778
  ignoreTransform: !0
779
779
  });
780
780
  }
781
- function Or(e) {
781
+ function Nr(e) {
782
782
  const t = e.innerWidth, n = e.innerHeight;
783
783
  return {
784
784
  top: 0,
@@ -789,7 +789,7 @@ function Or(e) {
789
789
  height: n
790
790
  };
791
791
  }
792
- function Nr(e, t) {
792
+ function Or(e, t) {
793
793
  return t === void 0 && (t = q(e).getComputedStyle(e)), t.position === "fixed";
794
794
  }
795
795
  function Mr(e, t) {
@@ -800,32 +800,32 @@ function Mr(e, t) {
800
800
  return typeof i == "string" ? n.test(i) : !1;
801
801
  });
802
802
  }
803
- function Tt(e, t) {
803
+ function At(e, t) {
804
804
  const n = [];
805
805
  function r(o) {
806
806
  if (t != null && n.length >= t || !o)
807
807
  return n;
808
- if (It(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
808
+ if (Et(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
809
809
  return n.push(o.scrollingElement), n;
810
- if (!Je(o) || dn(o) || n.includes(o))
810
+ if (!_e(o) || dn(o) || n.includes(o))
811
811
  return n;
812
812
  const i = q(e).getComputedStyle(o);
813
- return o !== e && Mr(o, i) && n.push(o), Nr(o, i) ? n : r(o.parentNode);
813
+ return o !== e && Mr(o, i) && n.push(o), Or(o, i) ? n : r(o.parentNode);
814
814
  }
815
815
  return e ? r(e) : n;
816
816
  }
817
817
  function bn(e) {
818
- const [t] = Tt(e, 1);
818
+ const [t] = At(e, 1);
819
819
  return t ?? null;
820
820
  }
821
821
  function yt(e) {
822
- return !dt || !e ? null : Ne(e) ? e : Et(e) ? It(e) || e === Me(e).scrollingElement ? window : Je(e) ? e : null : null;
822
+ return !dt || !e ? null : ze(e) ? e : It(e) ? Et(e) || e === je(e).scrollingElement ? window : _e(e) ? e : null : null;
823
823
  }
824
824
  function vn(e) {
825
- return Ne(e) ? e.scrollX : e.scrollLeft;
825
+ return ze(e) ? e.scrollX : e.scrollLeft;
826
826
  }
827
827
  function pn(e) {
828
- return Ne(e) ? e.scrollY : e.scrollTop;
828
+ return ze(e) ? e.scrollY : e.scrollTop;
829
829
  }
830
830
  function Dt(e) {
831
831
  return {
@@ -833,10 +833,10 @@ function Dt(e) {
833
833
  y: pn(e)
834
834
  };
835
835
  }
836
- var P;
836
+ var F;
837
837
  (function(e) {
838
838
  e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
839
- })(P || (P = {}));
839
+ })(F || (F = {}));
840
840
  function yn(e) {
841
841
  return !dt || !e ? !1 : e === document.scrollingElement;
842
842
  }
@@ -876,23 +876,23 @@ function zr(e, t, n, r, o) {
876
876
  } = n;
877
877
  r === void 0 && (r = 10), o === void 0 && (o = Lr);
878
878
  const {
879
- isTop: d,
880
- isBottom: u,
881
- isLeft: c,
882
- isRight: h
883
- } = xn(e), f = {
879
+ isTop: u,
880
+ isBottom: c,
881
+ isLeft: d,
882
+ isRight: f
883
+ } = xn(e), h = {
884
884
  x: 0,
885
885
  y: 0
886
- }, b = {
886
+ }, v = {
887
887
  x: 0,
888
888
  y: 0
889
889
  }, g = {
890
890
  height: t.height * o.y,
891
891
  width: t.width * o.x
892
892
  };
893
- return !d && i <= t.top + g.height ? (f.y = P.Backward, b.y = r * Math.abs((t.top + g.height - i) / g.height)) : !u && l >= t.bottom - g.height && (f.y = P.Forward, b.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !h && a >= t.right - g.width ? (f.x = P.Forward, b.x = r * Math.abs((t.right - g.width - a) / g.width)) : !c && s <= t.left + g.width && (f.x = P.Backward, b.x = r * Math.abs((t.left + g.width - s) / g.width)), {
894
- direction: f,
895
- speed: b
893
+ return !u && i <= t.top + g.height ? (h.y = F.Backward, v.y = r * Math.abs((t.top + g.height - i) / g.height)) : !c && l >= t.bottom - g.height && (h.y = F.Forward, v.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !f && a >= t.right - g.width ? (h.x = F.Forward, v.x = r * Math.abs((t.right - g.width - a) / g.width)) : !d && s <= t.left + g.width && (h.x = F.Backward, v.x = r * Math.abs((t.left + g.width - s) / g.width)), {
894
+ direction: h,
895
+ speed: v
896
896
  };
897
897
  }
898
898
  function jr(e) {
@@ -926,16 +926,16 @@ function jr(e) {
926
926
  };
927
927
  }
928
928
  function wn(e) {
929
- return e.reduce((t, n) => Oe(t, Dt(n)), ie);
929
+ return e.reduce((t, n) => Le(t, Dt(n)), ie);
930
930
  }
931
- function Br(e) {
931
+ function Pr(e) {
932
932
  return e.reduce((t, n) => t + vn(n), 0);
933
933
  }
934
- function Pr(e) {
934
+ function Br(e) {
935
935
  return e.reduce((t, n) => t + pn(n), 0);
936
936
  }
937
- function Fr(e, t) {
938
- if (t === void 0 && (t = Le), !e)
937
+ function $r(e, t) {
938
+ if (t === void 0 && (t = Pe), !e)
939
939
  return;
940
940
  const {
941
941
  top: n,
@@ -948,20 +948,20 @@ function Fr(e, t) {
948
948
  inline: "center"
949
949
  });
950
950
  }
951
- const $r = [["x", ["left", "right"], Br], ["y", ["top", "bottom"], Pr]];
952
- class Ot {
951
+ const Fr = [["x", ["left", "right"], Pr], ["y", ["top", "bottom"], Br]];
952
+ class Nt {
953
953
  constructor(t, n) {
954
954
  this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
955
- const r = Tt(n), o = wn(r);
955
+ const r = At(n), o = wn(r);
956
956
  this.rect = {
957
957
  ...t
958
958
  }, this.width = t.width, this.height = t.height;
959
- for (const [i, s, a] of $r)
959
+ for (const [i, s, a] of Fr)
960
960
  for (const l of s)
961
961
  Object.defineProperty(this, l, {
962
962
  get: () => {
963
- const d = a(r), u = o[i] - d;
964
- return this.rect[l] + u;
963
+ const u = a(r), c = o[i] - u;
964
+ return this.rect[l] + c;
965
965
  },
966
966
  enumerable: !0
967
967
  });
@@ -970,7 +970,7 @@ class Ot {
970
970
  });
971
971
  }
972
972
  }
973
- class Xe {
973
+ class Ye {
974
974
  constructor(t) {
975
975
  this.target = void 0, this.listeners = [], this.removeAll = () => {
976
976
  this.listeners.forEach((n) => {
@@ -988,20 +988,20 @@ function Hr(e) {
988
988
  const {
989
989
  EventTarget: t
990
990
  } = q(e);
991
- return e instanceof t ? e : Me(e);
991
+ return e instanceof t ? e : je(e);
992
992
  }
993
993
  function xt(e, t) {
994
994
  const n = Math.abs(e.x), r = Math.abs(e.y);
995
995
  return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
996
996
  }
997
- var te;
997
+ var re;
998
998
  (function(e) {
999
999
  e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
1000
- })(te || (te = {}));
1000
+ })(re || (re = {}));
1001
1001
  function qt(e) {
1002
1002
  e.preventDefault();
1003
1003
  }
1004
- function Xr(e) {
1004
+ function Wr(e) {
1005
1005
  e.stopPropagation();
1006
1006
  }
1007
1007
  var E;
@@ -1012,7 +1012,7 @@ const mn = {
1012
1012
  start: [E.Space, E.Enter],
1013
1013
  cancel: [E.Esc],
1014
1014
  end: [E.Space, E.Enter, E.Tab]
1015
- }, Wr = (e, t) => {
1015
+ }, Xr = (e, t) => {
1016
1016
  let {
1017
1017
  currentCoordinates: n
1018
1018
  } = t;
@@ -1039,7 +1039,7 @@ const mn = {
1039
1039
  };
1040
1040
  }
1041
1041
  };
1042
- class Nt {
1042
+ class Ot {
1043
1043
  constructor(t) {
1044
1044
  this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
1045
1045
  const {
@@ -1047,27 +1047,27 @@ class Nt {
1047
1047
  target: n
1048
1048
  }
1049
1049
  } = t;
1050
- this.props = t, this.listeners = new Xe(Me(n)), this.windowListeners = new Xe(q(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
1050
+ this.props = t, this.listeners = new Ye(je(n)), this.windowListeners = new Ye(q(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
1051
1051
  }
1052
1052
  attach() {
1053
- this.handleStart(), this.windowListeners.add(te.Resize, this.handleCancel), this.windowListeners.add(te.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(te.Keydown, this.handleKeyDown));
1053
+ this.handleStart(), this.windowListeners.add(re.Resize, this.handleCancel), this.windowListeners.add(re.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(re.Keydown, this.handleKeyDown));
1054
1054
  }
1055
1055
  handleStart() {
1056
1056
  const {
1057
1057
  activeNode: t,
1058
1058
  onStart: n
1059
1059
  } = this.props, r = t.node.current;
1060
- r && Fr(r), n(ie);
1060
+ r && $r(r), n(ie);
1061
1061
  }
1062
1062
  handleKeyDown(t) {
1063
- if (At(t)) {
1063
+ if (Tt(t)) {
1064
1064
  const {
1065
1065
  active: n,
1066
1066
  context: r,
1067
1067
  options: o
1068
1068
  } = this.props, {
1069
1069
  keyboardCodes: i = mn,
1070
- coordinateGetter: s = Wr,
1070
+ coordinateGetter: s = Xr,
1071
1071
  scrollBehavior: a = "smooth"
1072
1072
  } = o, {
1073
1073
  code: l
@@ -1081,67 +1081,67 @@ class Nt {
1081
1081
  return;
1082
1082
  }
1083
1083
  const {
1084
- collisionRect: d
1085
- } = r.current, u = d ? {
1086
- x: d.left,
1087
- y: d.top
1084
+ collisionRect: u
1085
+ } = r.current, c = u ? {
1086
+ x: u.left,
1087
+ y: u.top
1088
1088
  } : ie;
1089
- this.referenceCoordinates || (this.referenceCoordinates = u);
1090
- const c = s(t, {
1089
+ this.referenceCoordinates || (this.referenceCoordinates = c);
1090
+ const d = s(t, {
1091
1091
  active: n,
1092
1092
  context: r.current,
1093
- currentCoordinates: u
1093
+ currentCoordinates: c
1094
1094
  });
1095
- if (c) {
1096
- const h = lt(c, u), f = {
1095
+ if (d) {
1096
+ const f = lt(d, c), h = {
1097
1097
  x: 0,
1098
1098
  y: 0
1099
1099
  }, {
1100
- scrollableAncestors: b
1100
+ scrollableAncestors: v
1101
1101
  } = r.current;
1102
- for (const g of b) {
1103
- const p = t.code, {
1104
- isTop: m,
1105
- isRight: x,
1106
- isLeft: S,
1107
- isBottom: D,
1108
- maxScroll: C,
1109
- minScroll: R
1110
- } = xn(g), y = jr(g), w = {
1111
- x: Math.min(p === E.Right ? y.right - y.width / 2 : y.right, Math.max(p === E.Right ? y.left : y.left + y.width / 2, c.x)),
1112
- y: Math.min(p === E.Down ? y.bottom - y.height / 2 : y.bottom, Math.max(p === E.Down ? y.top : y.top + y.height / 2, c.y))
1113
- }, I = p === E.Right && !x || p === E.Left && !S, A = p === E.Down && !D || p === E.Up && !m;
1114
- if (I && w.x !== c.x) {
1115
- const v = g.scrollLeft + h.x, H = p === E.Right && v <= C.x || p === E.Left && v >= R.x;
1116
- if (H && !h.y) {
1102
+ for (const g of v) {
1103
+ const b = t.code, {
1104
+ isTop: x,
1105
+ isRight: p,
1106
+ isLeft: y,
1107
+ isBottom: R,
1108
+ maxScroll: S,
1109
+ minScroll: I
1110
+ } = xn(g), m = jr(g), w = {
1111
+ x: Math.min(b === E.Right ? m.right - m.width / 2 : m.right, Math.max(b === E.Right ? m.left : m.left + m.width / 2, d.x)),
1112
+ y: Math.min(b === E.Down ? m.bottom - m.height / 2 : m.bottom, Math.max(b === E.Down ? m.top : m.top + m.height / 2, d.y))
1113
+ }, D = b === E.Right && !p || b === E.Left && !y, N = b === E.Down && !R || b === E.Up && !x;
1114
+ if (D && w.x !== d.x) {
1115
+ const C = g.scrollLeft + f.x, P = b === E.Right && C <= S.x || b === E.Left && C >= I.x;
1116
+ if (P && !f.y) {
1117
1117
  g.scrollTo({
1118
- left: v,
1118
+ left: C,
1119
1119
  behavior: a
1120
1120
  });
1121
1121
  return;
1122
1122
  }
1123
- H ? f.x = g.scrollLeft - v : f.x = p === E.Right ? g.scrollLeft - C.x : g.scrollLeft - R.x, f.x && g.scrollBy({
1124
- left: -f.x,
1123
+ P ? h.x = g.scrollLeft - C : h.x = b === E.Right ? g.scrollLeft - S.x : g.scrollLeft - I.x, h.x && g.scrollBy({
1124
+ left: -h.x,
1125
1125
  behavior: a
1126
1126
  });
1127
1127
  break;
1128
- } else if (A && w.y !== c.y) {
1129
- const v = g.scrollTop + h.y, H = p === E.Down && v <= C.y || p === E.Up && v >= R.y;
1130
- if (H && !h.x) {
1128
+ } else if (N && w.y !== d.y) {
1129
+ const C = g.scrollTop + f.y, P = b === E.Down && C <= S.y || b === E.Up && C >= I.y;
1130
+ if (P && !f.x) {
1131
1131
  g.scrollTo({
1132
- top: v,
1132
+ top: C,
1133
1133
  behavior: a
1134
1134
  });
1135
1135
  return;
1136
1136
  }
1137
- H ? f.y = g.scrollTop - v : f.y = p === E.Down ? g.scrollTop - C.y : g.scrollTop - R.y, f.y && g.scrollBy({
1138
- top: -f.y,
1137
+ P ? h.y = g.scrollTop - C : h.y = b === E.Down ? g.scrollTop - S.y : g.scrollTop - I.y, h.y && g.scrollBy({
1138
+ top: -h.y,
1139
1139
  behavior: a
1140
1140
  });
1141
1141
  break;
1142
1142
  }
1143
1143
  }
1144
- this.handleMove(t, Oe(lt(c, this.referenceCoordinates), f));
1144
+ this.handleMove(t, Le(lt(d, this.referenceCoordinates), h));
1145
1145
  }
1146
1146
  }
1147
1147
  }
@@ -1167,7 +1167,7 @@ class Nt {
1167
1167
  this.listeners.removeAll(), this.windowListeners.removeAll();
1168
1168
  }
1169
1169
  }
1170
- Nt.activators = [{
1170
+ Ot.activators = [{
1171
1171
  eventName: "onKeyDown",
1172
1172
  handler: (e, t, n) => {
1173
1173
  let {
@@ -1203,7 +1203,7 @@ class Mt {
1203
1203
  } = t, {
1204
1204
  target: s
1205
1205
  } = i;
1206
- this.props = t, this.events = n, this.document = Me(s), this.documentListeners = new Xe(this.document), this.listeners = new Xe(r), this.windowListeners = new Xe(q(s)), this.initialCoordinates = (o = St(i)) != null ? o : ie, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1206
+ this.props = t, this.events = n, this.document = je(s), this.documentListeners = new Ye(this.document), this.listeners = new Ye(r), this.windowListeners = new Ye(q(s)), this.initialCoordinates = (o = St(i)) != null ? o : ie, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1207
1207
  }
1208
1208
  attach() {
1209
1209
  const {
@@ -1217,7 +1217,7 @@ class Mt {
1217
1217
  } = this;
1218
1218
  if (this.listeners.add(t.move.name, this.handleMove, {
1219
1219
  passive: !1
1220
- }), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(te.Resize, this.handleCancel), this.windowListeners.add(te.DragStart, qt), this.windowListeners.add(te.VisibilityChange, this.handleCancel), this.windowListeners.add(te.ContextMenu, qt), this.documentListeners.add(te.Keydown, this.handleKeydown), n) {
1220
+ }), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(re.Resize, this.handleCancel), this.windowListeners.add(re.DragStart, qt), this.windowListeners.add(re.VisibilityChange, this.handleCancel), this.windowListeners.add(re.ContextMenu, qt), this.documentListeners.add(re.Keydown, this.handleKeydown), n) {
1221
1221
  if (r != null && r({
1222
1222
  event: this.props.event,
1223
1223
  activeNode: this.props.activeNode,
@@ -1251,9 +1251,9 @@ class Mt {
1251
1251
  } = this, {
1252
1252
  onStart: n
1253
1253
  } = this.props;
1254
- t && (this.activated = !0, this.documentListeners.add(te.Click, Xr, {
1254
+ t && (this.activated = !0, this.documentListeners.add(re.Click, Wr, {
1255
1255
  capture: !0
1256
- }), this.removeTextSelection(), this.documentListeners.add(te.SelectionChange, this.removeTextSelection), n(t));
1256
+ }), this.removeTextSelection(), this.documentListeners.add(re.SelectionChange, this.removeTextSelection), n(t));
1257
1257
  }
1258
1258
  handleMove(t) {
1259
1259
  var n;
@@ -1269,17 +1269,17 @@ class Mt {
1269
1269
  } = i;
1270
1270
  if (!o)
1271
1271
  return;
1272
- const l = (n = St(t)) != null ? n : ie, d = lt(o, l);
1272
+ const l = (n = St(t)) != null ? n : ie, u = lt(o, l);
1273
1273
  if (!r && a) {
1274
1274
  if (Gt(a)) {
1275
- if (a.tolerance != null && xt(d, a.tolerance))
1275
+ if (a.tolerance != null && xt(u, a.tolerance))
1276
1276
  return this.handleCancel();
1277
- if (xt(d, a.distance))
1277
+ if (xt(u, a.distance))
1278
1278
  return this.handleStart();
1279
1279
  }
1280
- if (Jt(a) && xt(d, a.tolerance))
1280
+ if (Jt(a) && xt(u, a.tolerance))
1281
1281
  return this.handleCancel();
1282
- this.handlePending(a, d);
1282
+ this.handlePending(a, u);
1283
1283
  return;
1284
1284
  }
1285
1285
  t.cancelable && t.preventDefault(), s(l);
@@ -1321,7 +1321,7 @@ class Lt extends Mt {
1321
1321
  constructor(t) {
1322
1322
  const {
1323
1323
  event: n
1324
- } = t, r = Me(n.target);
1324
+ } = t, r = je(n.target);
1325
1325
  super(t, Yr, r);
1326
1326
  }
1327
1327
  }
@@ -1352,7 +1352,7 @@ var Ct;
1352
1352
  })(Ct || (Ct = {}));
1353
1353
  class Ur extends Mt {
1354
1354
  constructor(t) {
1355
- super(t, Kr, Me(t.event.target));
1355
+ super(t, Kr, je(t.event.target));
1356
1356
  }
1357
1357
  }
1358
1358
  Ur.activators = [{
@@ -1410,10 +1410,10 @@ Vr.activators = [{
1410
1410
  }), !0);
1411
1411
  }
1412
1412
  }];
1413
- var We;
1413
+ var Ke;
1414
1414
  (function(e) {
1415
1415
  e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
1416
- })(We || (We = {}));
1416
+ })(Ke || (Ke = {}));
1417
1417
  var ut;
1418
1418
  (function(e) {
1419
1419
  e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
@@ -1421,73 +1421,73 @@ var ut;
1421
1421
  function qr(e) {
1422
1422
  let {
1423
1423
  acceleration: t,
1424
- activator: n = We.Pointer,
1424
+ activator: n = Ke.Pointer,
1425
1425
  canScroll: r,
1426
1426
  draggingRect: o,
1427
1427
  enabled: i,
1428
1428
  interval: s = 5,
1429
1429
  order: a = ut.TreeOrder,
1430
1430
  pointerCoordinates: l,
1431
- scrollableAncestors: d,
1432
- scrollableAncestorRects: u,
1433
- delta: c,
1434
- threshold: h
1431
+ scrollableAncestors: u,
1432
+ scrollableAncestorRects: c,
1433
+ delta: d,
1434
+ threshold: f
1435
1435
  } = e;
1436
- const f = Jr({
1437
- delta: c,
1436
+ const h = Jr({
1437
+ delta: d,
1438
1438
  disabled: !i
1439
- }), [b, g] = or(), p = N({
1439
+ }), [v, g] = or(), b = L({
1440
1440
  x: 0,
1441
1441
  y: 0
1442
- }), m = N({
1442
+ }), x = L({
1443
1443
  x: 0,
1444
1444
  y: 0
1445
- }), x = T(() => {
1445
+ }), p = O(() => {
1446
1446
  switch (n) {
1447
- case We.Pointer:
1447
+ case Ke.Pointer:
1448
1448
  return l ? {
1449
1449
  top: l.y,
1450
1450
  bottom: l.y,
1451
1451
  left: l.x,
1452
1452
  right: l.x
1453
1453
  } : null;
1454
- case We.DraggableRect:
1454
+ case Ke.DraggableRect:
1455
1455
  return o;
1456
1456
  }
1457
- }, [n, o, l]), S = N(null), D = W(() => {
1458
- const R = S.current;
1459
- if (!R)
1457
+ }, [n, o, l]), y = L(null), R = K(() => {
1458
+ const I = y.current;
1459
+ if (!I)
1460
1460
  return;
1461
- const y = p.current.x * m.current.x, w = p.current.y * m.current.y;
1462
- R.scrollBy(y, w);
1463
- }, []), C = T(() => a === ut.TreeOrder ? [...d].reverse() : d, [a, d]);
1464
- O(
1461
+ const m = b.current.x * x.current.x, w = b.current.y * x.current.y;
1462
+ I.scrollBy(m, w);
1463
+ }, []), S = O(() => a === ut.TreeOrder ? [...u].reverse() : u, [a, u]);
1464
+ M(
1465
1465
  () => {
1466
- if (!i || !d.length || !x) {
1466
+ if (!i || !u.length || !p) {
1467
1467
  g();
1468
1468
  return;
1469
1469
  }
1470
- for (const R of C) {
1471
- if ((r == null ? void 0 : r(R)) === !1)
1470
+ for (const I of S) {
1471
+ if ((r == null ? void 0 : r(I)) === !1)
1472
1472
  continue;
1473
- const y = d.indexOf(R), w = u[y];
1473
+ const m = u.indexOf(I), w = c[m];
1474
1474
  if (!w)
1475
1475
  continue;
1476
1476
  const {
1477
- direction: I,
1478
- speed: A
1479
- } = zr(R, w, x, t, h);
1480
- for (const v of ["x", "y"])
1481
- f[v][I[v]] || (A[v] = 0, I[v] = 0);
1482
- if (A.x > 0 || A.y > 0) {
1483
- g(), S.current = R, b(D, s), p.current = A, m.current = I;
1477
+ direction: D,
1478
+ speed: N
1479
+ } = zr(I, w, p, t, f);
1480
+ for (const C of ["x", "y"])
1481
+ h[C][D[C]] || (N[C] = 0, D[C] = 0);
1482
+ if (N.x > 0 || N.y > 0) {
1483
+ g(), y.current = I, v(R, s), b.current = N, x.current = D;
1484
1484
  return;
1485
1485
  }
1486
1486
  }
1487
- p.current = {
1487
+ b.current = {
1488
1488
  x: 0,
1489
1489
  y: 0
1490
- }, m.current = {
1490
+ }, x.current = {
1491
1491
  x: 0,
1492
1492
  y: 0
1493
1493
  }, g();
@@ -1495,32 +1495,32 @@ function qr(e) {
1495
1495
  // eslint-disable-next-line react-hooks/exhaustive-deps
1496
1496
  [
1497
1497
  t,
1498
- D,
1498
+ R,
1499
1499
  r,
1500
1500
  g,
1501
1501
  i,
1502
1502
  s,
1503
1503
  // eslint-disable-next-line react-hooks/exhaustive-deps
1504
- JSON.stringify(x),
1504
+ JSON.stringify(p),
1505
1505
  // eslint-disable-next-line react-hooks/exhaustive-deps
1506
- JSON.stringify(f),
1507
- b,
1508
- d,
1509
- C,
1506
+ JSON.stringify(h),
1507
+ v,
1510
1508
  u,
1509
+ S,
1510
+ c,
1511
1511
  // eslint-disable-next-line react-hooks/exhaustive-deps
1512
- JSON.stringify(h)
1512
+ JSON.stringify(f)
1513
1513
  ]
1514
1514
  );
1515
1515
  }
1516
1516
  const Gr = {
1517
1517
  x: {
1518
- [P.Backward]: !1,
1519
- [P.Forward]: !1
1518
+ [F.Backward]: !1,
1519
+ [F.Forward]: !1
1520
1520
  },
1521
1521
  y: {
1522
- [P.Backward]: !1,
1523
- [P.Forward]: !1
1522
+ [F.Backward]: !1,
1523
+ [F.Forward]: !1
1524
1524
  }
1525
1525
  };
1526
1526
  function Jr(e) {
@@ -1529,7 +1529,7 @@ function Jr(e) {
1529
1529
  disabled: n
1530
1530
  } = e;
1531
1531
  const r = mt(t);
1532
- return _e((o) => {
1532
+ return Ze((o) => {
1533
1533
  if (n || !r || !o)
1534
1534
  return Gr;
1535
1535
  const i = {
@@ -1538,25 +1538,25 @@ function Jr(e) {
1538
1538
  };
1539
1539
  return {
1540
1540
  x: {
1541
- [P.Backward]: o.x[P.Backward] || i.x === -1,
1542
- [P.Forward]: o.x[P.Forward] || i.x === 1
1541
+ [F.Backward]: o.x[F.Backward] || i.x === -1,
1542
+ [F.Forward]: o.x[F.Forward] || i.x === 1
1543
1543
  },
1544
1544
  y: {
1545
- [P.Backward]: o.y[P.Backward] || i.y === -1,
1546
- [P.Forward]: o.y[P.Forward] || i.y === 1
1545
+ [F.Backward]: o.y[F.Backward] || i.y === -1,
1546
+ [F.Forward]: o.y[F.Forward] || i.y === 1
1547
1547
  }
1548
1548
  };
1549
1549
  }, [n, t, r]);
1550
1550
  }
1551
1551
  function _r(e, t) {
1552
1552
  const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
1553
- return _e((o) => {
1553
+ return Ze((o) => {
1554
1554
  var i;
1555
1555
  return t == null ? null : (i = r ?? o) != null ? i : null;
1556
1556
  }, [r, t]);
1557
1557
  }
1558
1558
  function Zr(e, t) {
1559
- return T(() => e.reduce((n, r) => {
1559
+ return O(() => e.reduce((n, r) => {
1560
1560
  const {
1561
1561
  sensor: o
1562
1562
  } = r, i = o.activators.map((s) => ({
@@ -1566,10 +1566,10 @@ function Zr(e, t) {
1566
1566
  return [...n, ...i];
1567
1567
  }, []), [e, t]);
1568
1568
  }
1569
- var qe;
1569
+ var Ge;
1570
1570
  (function(e) {
1571
1571
  e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1572
- })(qe || (qe = {}));
1572
+ })(Ge || (Ge = {}));
1573
1573
  var Rt;
1574
1574
  (function(e) {
1575
1575
  e.Optimized = "optimized";
@@ -1581,63 +1581,63 @@ function Qr(e, t) {
1581
1581
  dependencies: r,
1582
1582
  config: o
1583
1583
  } = t;
1584
- const [i, s] = Z(null), {
1584
+ const [i, s] = Q(null), {
1585
1585
  frequency: a,
1586
1586
  measure: l,
1587
- strategy: d
1588
- } = o, u = N(e), c = p(), h = Ue(c), f = W(function(m) {
1589
- m === void 0 && (m = []), !h.current && s((x) => x === null ? m : x.concat(m.filter((S) => !x.includes(S))));
1590
- }, [h]), b = N(null), g = _e((m) => {
1591
- if (c && !n)
1587
+ strategy: u
1588
+ } = o, c = L(e), d = b(), f = Ve(d), h = K(function(x) {
1589
+ x === void 0 && (x = []), !f.current && s((p) => p === null ? x : p.concat(x.filter((y) => !p.includes(y))));
1590
+ }, [f]), v = L(null), g = Ze((x) => {
1591
+ if (d && !n)
1592
1592
  return _t;
1593
- if (!m || m === _t || u.current !== e || i != null) {
1594
- const x = /* @__PURE__ */ new Map();
1595
- for (let S of e) {
1596
- if (!S)
1593
+ if (!x || x === _t || c.current !== e || i != null) {
1594
+ const p = /* @__PURE__ */ new Map();
1595
+ for (let y of e) {
1596
+ if (!y)
1597
1597
  continue;
1598
- if (i && i.length > 0 && !i.includes(S.id) && S.rect.current) {
1599
- x.set(S.id, S.rect.current);
1598
+ if (i && i.length > 0 && !i.includes(y.id) && y.rect.current) {
1599
+ p.set(y.id, y.rect.current);
1600
1600
  continue;
1601
1601
  }
1602
- const D = S.node.current, C = D ? new Ot(l(D), D) : null;
1603
- S.rect.current = C, C && x.set(S.id, C);
1602
+ const R = y.node.current, S = R ? new Nt(l(R), R) : null;
1603
+ y.rect.current = S, S && p.set(y.id, S);
1604
1604
  }
1605
- return x;
1605
+ return p;
1606
1606
  }
1607
- return m;
1608
- }, [e, i, n, c, l]);
1609
- return O(() => {
1610
- u.current = e;
1611
- }, [e]), O(
1607
+ return x;
1608
+ }, [e, i, n, d, l]);
1609
+ return M(() => {
1610
+ c.current = e;
1611
+ }, [e]), M(
1612
1612
  () => {
1613
- c || f();
1613
+ d || h();
1614
1614
  },
1615
1615
  // eslint-disable-next-line react-hooks/exhaustive-deps
1616
- [n, c]
1617
- ), O(
1616
+ [n, d]
1617
+ ), M(
1618
1618
  () => {
1619
1619
  i && i.length > 0 && s(null);
1620
1620
  },
1621
1621
  //eslint-disable-next-line react-hooks/exhaustive-deps
1622
1622
  [JSON.stringify(i)]
1623
- ), O(
1623
+ ), M(
1624
1624
  () => {
1625
- c || typeof a != "number" || b.current !== null || (b.current = setTimeout(() => {
1626
- f(), b.current = null;
1625
+ d || typeof a != "number" || v.current !== null || (v.current = setTimeout(() => {
1626
+ h(), v.current = null;
1627
1627
  }, a));
1628
1628
  },
1629
1629
  // eslint-disable-next-line react-hooks/exhaustive-deps
1630
- [a, c, f, ...r]
1630
+ [a, d, h, ...r]
1631
1631
  ), {
1632
1632
  droppableRects: g,
1633
- measureDroppableContainers: f,
1633
+ measureDroppableContainers: h,
1634
1634
  measuringScheduled: i != null
1635
1635
  };
1636
- function p() {
1637
- switch (d) {
1638
- case qe.Always:
1636
+ function b() {
1637
+ switch (u) {
1638
+ case Ge.Always:
1639
1639
  return !1;
1640
- case qe.BeforeDragging:
1640
+ case Ge.BeforeDragging:
1641
1641
  return n;
1642
1642
  default:
1643
1643
  return !n;
@@ -1645,7 +1645,7 @@ function Qr(e, t) {
1645
1645
  }
1646
1646
  }
1647
1647
  function Sn(e, t) {
1648
- return _e((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1648
+ return Ze((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1649
1649
  }
1650
1650
  function eo(e, t) {
1651
1651
  return Sn(e, t);
@@ -1655,7 +1655,7 @@ function to(e) {
1655
1655
  callback: t,
1656
1656
  disabled: n
1657
1657
  } = e;
1658
- const r = kt(t), o = T(() => {
1658
+ const r = kt(t), o = O(() => {
1659
1659
  if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1660
1660
  return;
1661
1661
  const {
@@ -1663,14 +1663,14 @@ function to(e) {
1663
1663
  } = window;
1664
1664
  return new i(r);
1665
1665
  }, [r, n]);
1666
- return O(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1666
+ return M(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1667
1667
  }
1668
1668
  function ft(e) {
1669
1669
  let {
1670
1670
  callback: t,
1671
1671
  disabled: n
1672
1672
  } = e;
1673
- const r = kt(t), o = T(
1673
+ const r = kt(t), o = O(
1674
1674
  () => {
1675
1675
  if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1676
1676
  return;
@@ -1682,35 +1682,35 @@ function ft(e) {
1682
1682
  // eslint-disable-next-line react-hooks/exhaustive-deps
1683
1683
  [n]
1684
1684
  );
1685
- return O(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1685
+ return M(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1686
1686
  }
1687
1687
  function no(e) {
1688
- return new Ot(Le(e), e);
1688
+ return new Nt(Pe(e), e);
1689
1689
  }
1690
1690
  function Zt(e, t, n) {
1691
1691
  t === void 0 && (t = no);
1692
- const [r, o] = Z(null);
1692
+ const [r, o] = Q(null);
1693
1693
  function i() {
1694
1694
  o((l) => {
1695
1695
  if (!e)
1696
1696
  return null;
1697
1697
  if (e.isConnected === !1) {
1698
- var d;
1699
- return (d = l ?? n) != null ? d : null;
1698
+ var u;
1699
+ return (u = l ?? n) != null ? u : null;
1700
1700
  }
1701
- const u = t(e);
1702
- return JSON.stringify(l) === JSON.stringify(u) ? l : u;
1701
+ const c = t(e);
1702
+ return JSON.stringify(l) === JSON.stringify(c) ? l : c;
1703
1703
  });
1704
1704
  }
1705
1705
  const s = to({
1706
1706
  callback(l) {
1707
1707
  if (e)
1708
- for (const d of l) {
1708
+ for (const u of l) {
1709
1709
  const {
1710
- type: u,
1711
- target: c
1712
- } = d;
1713
- if (u === "childList" && c instanceof HTMLElement && c.contains(e)) {
1710
+ type: c,
1711
+ target: d
1712
+ } = u;
1713
+ if (c === "childList" && d instanceof HTMLElement && d.contains(e)) {
1714
1714
  i();
1715
1715
  break;
1716
1716
  }
@@ -1719,7 +1719,7 @@ function Zt(e, t, n) {
1719
1719
  }), a = ft({
1720
1720
  callback: i
1721
1721
  });
1722
- return ue(() => {
1722
+ return fe(() => {
1723
1723
  i(), e ? (a == null || a.observe(e), s == null || s.observe(document.body, {
1724
1724
  childList: !0,
1725
1725
  subtree: !0
@@ -1732,25 +1732,25 @@ function ro(e) {
1732
1732
  }
1733
1733
  const Qt = [];
1734
1734
  function oo(e) {
1735
- const t = N(e), n = _e((r) => e ? r && r !== Qt && e && t.current && e.parentNode === t.current.parentNode ? r : Tt(e) : Qt, [e]);
1736
- return O(() => {
1735
+ const t = L(e), n = Ze((r) => e ? r && r !== Qt && e && t.current && e.parentNode === t.current.parentNode ? r : At(e) : Qt, [e]);
1736
+ return M(() => {
1737
1737
  t.current = e;
1738
1738
  }, [e]), n;
1739
1739
  }
1740
1740
  function io(e) {
1741
- const [t, n] = Z(null), r = N(e), o = W((i) => {
1741
+ const [t, n] = Q(null), r = L(e), o = K((i) => {
1742
1742
  const s = yt(i.target);
1743
1743
  s && n((a) => a ? (a.set(s, Dt(s)), new Map(a)) : null);
1744
1744
  }, []);
1745
- return O(() => {
1745
+ return M(() => {
1746
1746
  const i = r.current;
1747
1747
  if (e !== i) {
1748
1748
  s(i);
1749
1749
  const a = e.map((l) => {
1750
- const d = yt(l);
1751
- return d ? (d.addEventListener("scroll", o, {
1750
+ const u = yt(l);
1751
+ return u ? (u.addEventListener("scroll", o, {
1752
1752
  passive: !0
1753
- }), [d, Dt(d)]) : null;
1753
+ }), [u, Dt(u)]) : null;
1754
1754
  }).filter((l) => l != null);
1755
1755
  n(a.length ? new Map(a) : null), r.current = e;
1756
1756
  }
@@ -1759,28 +1759,28 @@ function io(e) {
1759
1759
  };
1760
1760
  function s(a) {
1761
1761
  a.forEach((l) => {
1762
- const d = yt(l);
1763
- d == null || d.removeEventListener("scroll", o);
1762
+ const u = yt(l);
1763
+ u == null || u.removeEventListener("scroll", o);
1764
1764
  });
1765
1765
  }
1766
- }, [o, e]), T(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Oe(i, s), ie) : wn(e) : ie, [e, t]);
1766
+ }, [o, e]), O(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Le(i, s), ie) : wn(e) : ie, [e, t]);
1767
1767
  }
1768
1768
  function en(e, t) {
1769
1769
  t === void 0 && (t = []);
1770
- const n = N(null);
1771
- return O(
1770
+ const n = L(null);
1771
+ return M(
1772
1772
  () => {
1773
1773
  n.current = null;
1774
1774
  },
1775
1775
  // eslint-disable-next-line react-hooks/exhaustive-deps
1776
1776
  t
1777
- ), O(() => {
1777
+ ), M(() => {
1778
1778
  const r = e !== ie;
1779
1779
  r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1780
1780
  }, [e]), n.current ? lt(e, n.current) : ie;
1781
1781
  }
1782
1782
  function so(e) {
1783
- O(
1783
+ M(
1784
1784
  () => {
1785
1785
  if (!dt)
1786
1786
  return;
@@ -1806,7 +1806,7 @@ function so(e) {
1806
1806
  );
1807
1807
  }
1808
1808
  function ao(e, t) {
1809
- return T(() => e.reduce((n, r) => {
1809
+ return O(() => e.reduce((n, r) => {
1810
1810
  let {
1811
1811
  eventName: o,
1812
1812
  handler: i
@@ -1817,19 +1817,19 @@ function ao(e, t) {
1817
1817
  }, {}), [e, t]);
1818
1818
  }
1819
1819
  function Dn(e) {
1820
- return T(() => e ? Or(e) : null, [e]);
1820
+ return O(() => e ? Nr(e) : null, [e]);
1821
1821
  }
1822
1822
  const tn = [];
1823
1823
  function lo(e, t) {
1824
- t === void 0 && (t = Le);
1825
- const [n] = e, r = Dn(n ? q(n) : null), [o, i] = Z(tn);
1824
+ t === void 0 && (t = Pe);
1825
+ const [n] = e, r = Dn(n ? q(n) : null), [o, i] = Q(tn);
1826
1826
  function s() {
1827
- i(() => e.length ? e.map((l) => yn(l) ? r : new Ot(t(l), l)) : tn);
1827
+ i(() => e.length ? e.map((l) => yn(l) ? r : new Nt(t(l), l)) : tn);
1828
1828
  }
1829
1829
  const a = ft({
1830
1830
  callback: s
1831
1831
  });
1832
- return ue(() => {
1832
+ return fe(() => {
1833
1833
  a == null || a.disconnect(), s(), e.forEach((l) => a == null ? void 0 : a.observe(l));
1834
1834
  }, [e]), o;
1835
1835
  }
@@ -1839,34 +1839,34 @@ function co(e) {
1839
1839
  if (e.children.length > 1)
1840
1840
  return e;
1841
1841
  const t = e.children[0];
1842
- return Je(t) ? t : e;
1842
+ return _e(t) ? t : e;
1843
1843
  }
1844
1844
  function uo(e) {
1845
1845
  let {
1846
1846
  measure: t
1847
1847
  } = e;
1848
- const [n, r] = Z(null), o = W((d) => {
1848
+ const [n, r] = Q(null), o = K((u) => {
1849
1849
  for (const {
1850
- target: u
1851
- } of d)
1852
- if (Je(u)) {
1853
- r((c) => {
1854
- const h = t(u);
1855
- return c ? {
1856
- ...c,
1857
- width: h.width,
1858
- height: h.height
1859
- } : h;
1850
+ target: c
1851
+ } of u)
1852
+ if (_e(c)) {
1853
+ r((d) => {
1854
+ const f = t(c);
1855
+ return d ? {
1856
+ ...d,
1857
+ width: f.width,
1858
+ height: f.height
1859
+ } : f;
1860
1860
  });
1861
1861
  break;
1862
1862
  }
1863
1863
  }, [t]), i = ft({
1864
1864
  callback: o
1865
- }), s = W((d) => {
1866
- const u = co(d);
1867
- i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
1865
+ }), s = K((u) => {
1866
+ const c = co(u);
1867
+ i == null || i.disconnect(), c && (i == null || i.observe(c)), r(c ? t(c) : null);
1868
1868
  }, [t, i]), [a, l] = at(s);
1869
- return T(() => ({
1869
+ return O(() => ({
1870
1870
  nodeRef: a,
1871
1871
  rect: n,
1872
1872
  setRef: l
@@ -1876,7 +1876,7 @@ const fo = [{
1876
1876
  sensor: Lt,
1877
1877
  options: {}
1878
1878
  }, {
1879
- sensor: Nt,
1879
+ sensor: Ot,
1880
1880
  options: {}
1881
1881
  }], ho = {
1882
1882
  current: {}
@@ -1886,14 +1886,14 @@ const fo = [{
1886
1886
  },
1887
1887
  droppable: {
1888
1888
  measure: Vt,
1889
- strategy: qe.WhileDragging,
1889
+ strategy: Ge.WhileDragging,
1890
1890
  frequency: Rt.Optimized
1891
1891
  },
1892
1892
  dragOverlay: {
1893
- measure: Le
1893
+ measure: Pe
1894
1894
  }
1895
1895
  };
1896
- class Ye extends Map {
1896
+ class Ue extends Map {
1897
1897
  get(t) {
1898
1898
  var n;
1899
1899
  return t != null && (n = super.get(t)) != null ? n : void 0;
@@ -1923,7 +1923,7 @@ const go = {
1923
1923
  containerNodeRect: null,
1924
1924
  draggableNodes: /* @__PURE__ */ new Map(),
1925
1925
  droppableRects: /* @__PURE__ */ new Map(),
1926
- droppableContainers: /* @__PURE__ */ new Ye(),
1926
+ droppableContainers: /* @__PURE__ */ new Ue(),
1927
1927
  over: null,
1928
1928
  dragOverlay: {
1929
1929
  nodeRef: {
@@ -1950,7 +1950,7 @@ const go = {
1950
1950
  draggableNodes: /* @__PURE__ */ new Map(),
1951
1951
  over: null,
1952
1952
  measureDroppableContainers: ct
1953
- }, ht = /* @__PURE__ */ Ge(bo), Cn = /* @__PURE__ */ Ge(go);
1953
+ }, ht = /* @__PURE__ */ Je(bo), Cn = /* @__PURE__ */ Je(go);
1954
1954
  function vo() {
1955
1955
  return {
1956
1956
  draggable: {
@@ -1966,13 +1966,13 @@ function vo() {
1966
1966
  }
1967
1967
  },
1968
1968
  droppable: {
1969
- containers: new Ye()
1969
+ containers: new Ue()
1970
1970
  }
1971
1971
  };
1972
1972
  }
1973
1973
  function po(e, t) {
1974
1974
  switch (t.type) {
1975
- case z.DragStart:
1975
+ case $.DragStart:
1976
1976
  return {
1977
1977
  ...e,
1978
1978
  draggable: {
@@ -1981,7 +1981,7 @@ function po(e, t) {
1981
1981
  active: t.active
1982
1982
  }
1983
1983
  };
1984
- case z.DragMove:
1984
+ case $.DragMove:
1985
1985
  return e.draggable.active == null ? e : {
1986
1986
  ...e,
1987
1987
  draggable: {
@@ -1992,8 +1992,8 @@ function po(e, t) {
1992
1992
  }
1993
1993
  }
1994
1994
  };
1995
- case z.DragEnd:
1996
- case z.DragCancel:
1995
+ case $.DragEnd:
1996
+ case $.DragCancel:
1997
1997
  return {
1998
1998
  ...e,
1999
1999
  draggable: {
@@ -2009,12 +2009,12 @@ function po(e, t) {
2009
2009
  }
2010
2010
  }
2011
2011
  };
2012
- case z.RegisterDroppable: {
2012
+ case $.RegisterDroppable: {
2013
2013
  const {
2014
2014
  element: n
2015
2015
  } = t, {
2016
2016
  id: r
2017
- } = n, o = new Ye(e.droppable.containers);
2017
+ } = n, o = new Ue(e.droppable.containers);
2018
2018
  return o.set(r, n), {
2019
2019
  ...e,
2020
2020
  droppable: {
@@ -2023,7 +2023,7 @@ function po(e, t) {
2023
2023
  }
2024
2024
  };
2025
2025
  }
2026
- case z.SetDroppableDisabled: {
2026
+ case $.SetDroppableDisabled: {
2027
2027
  const {
2028
2028
  id: n,
2029
2029
  key: r,
@@ -2031,7 +2031,7 @@ function po(e, t) {
2031
2031
  } = t, i = e.droppable.containers.get(n);
2032
2032
  if (!i || r !== i.key)
2033
2033
  return e;
2034
- const s = new Ye(e.droppable.containers);
2034
+ const s = new Ue(e.droppable.containers);
2035
2035
  return s.set(n, {
2036
2036
  ...i,
2037
2037
  disabled: o
@@ -2043,14 +2043,14 @@ function po(e, t) {
2043
2043
  }
2044
2044
  };
2045
2045
  }
2046
- case z.UnregisterDroppable: {
2046
+ case $.UnregisterDroppable: {
2047
2047
  const {
2048
2048
  id: n,
2049
2049
  key: r
2050
2050
  } = t, o = e.droppable.containers.get(n);
2051
2051
  if (!o || r !== o.key)
2052
2052
  return e;
2053
- const i = new Ye(e.droppable.containers);
2053
+ const i = new Ue(e.droppable.containers);
2054
2054
  return i.delete(n), {
2055
2055
  ...e,
2056
2056
  droppable: {
@@ -2071,27 +2071,27 @@ function yo(e) {
2071
2071
  active: n,
2072
2072
  activatorEvent: r,
2073
2073
  draggableNodes: o
2074
- } = Ce(ht), i = mt(r), s = mt(n == null ? void 0 : n.id);
2075
- return O(() => {
2074
+ } = Ie(ht), i = mt(r), s = mt(n == null ? void 0 : n.id);
2075
+ return M(() => {
2076
2076
  if (!t && !r && i && s != null) {
2077
- if (!At(i) || document.activeElement === i.target)
2077
+ if (!Tt(i) || document.activeElement === i.target)
2078
2078
  return;
2079
2079
  const a = o.get(s);
2080
2080
  if (!a)
2081
2081
  return;
2082
2082
  const {
2083
2083
  activatorNode: l,
2084
- node: d
2084
+ node: u
2085
2085
  } = a;
2086
- if (!l.current && !d.current)
2086
+ if (!l.current && !u.current)
2087
2087
  return;
2088
2088
  requestAnimationFrame(() => {
2089
- for (const u of [l.current, d.current]) {
2090
- if (!u)
2089
+ for (const c of [l.current, u.current]) {
2090
+ if (!c)
2091
2091
  continue;
2092
- const c = ar(u);
2093
- if (c) {
2094
- c.focus();
2092
+ const d = ar(c);
2093
+ if (d) {
2094
+ d.focus();
2095
2095
  break;
2096
2096
  }
2097
2097
  }
@@ -2110,7 +2110,7 @@ function xo(e, t) {
2110
2110
  }), n) : n;
2111
2111
  }
2112
2112
  function wo(e) {
2113
- return T(
2113
+ return O(
2114
2114
  () => ({
2115
2115
  draggable: {
2116
2116
  ...st.draggable,
@@ -2136,246 +2136,246 @@ function mo(e) {
2136
2136
  initialRect: r,
2137
2137
  config: o = !0
2138
2138
  } = e;
2139
- const i = N(!1), {
2139
+ const i = L(!1), {
2140
2140
  x: s,
2141
2141
  y: a
2142
2142
  } = typeof o == "boolean" ? {
2143
2143
  x: o,
2144
2144
  y: o
2145
2145
  } : o;
2146
- ue(() => {
2146
+ fe(() => {
2147
2147
  if (!s && !a || !t) {
2148
2148
  i.current = !1;
2149
2149
  return;
2150
2150
  }
2151
2151
  if (i.current || !r)
2152
2152
  return;
2153
- const d = t == null ? void 0 : t.node.current;
2154
- if (!d || d.isConnected === !1)
2153
+ const u = t == null ? void 0 : t.node.current;
2154
+ if (!u || u.isConnected === !1)
2155
2155
  return;
2156
- const u = n(d), c = gn(u, r);
2157
- if (s || (c.x = 0), a || (c.y = 0), i.current = !0, Math.abs(c.x) > 0 || Math.abs(c.y) > 0) {
2158
- const h = bn(d);
2159
- h && h.scrollBy({
2160
- top: c.y,
2161
- left: c.x
2156
+ const c = n(u), d = gn(c, r);
2157
+ if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
2158
+ const f = bn(u);
2159
+ f && f.scrollBy({
2160
+ top: d.y,
2161
+ left: d.x
2162
2162
  });
2163
2163
  }
2164
2164
  }, [t, s, a, r, n]);
2165
2165
  }
2166
- const Rn = /* @__PURE__ */ Ge({
2166
+ const Rn = /* @__PURE__ */ Je({
2167
2167
  ...ie,
2168
2168
  scaleX: 1,
2169
2169
  scaleY: 1
2170
2170
  });
2171
- var me;
2171
+ var De;
2172
2172
  (function(e) {
2173
2173
  e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
2174
- })(me || (me = {}));
2175
- const So = /* @__PURE__ */ $n(function(t) {
2174
+ })(De || (De = {}));
2175
+ const So = /* @__PURE__ */ Fn(function(t) {
2176
2176
  var n, r, o, i;
2177
2177
  let {
2178
2178
  id: s,
2179
2179
  accessibility: a,
2180
2180
  autoScroll: l = !0,
2181
- children: d,
2182
- sensors: u = fo,
2183
- collisionDetection: c = Cr,
2184
- measuring: h,
2185
- modifiers: f,
2186
- ...b
2181
+ children: u,
2182
+ sensors: c = fo,
2183
+ collisionDetection: d = Cr,
2184
+ measuring: f,
2185
+ modifiers: h,
2186
+ ...v
2187
2187
  } = t;
2188
- const g = Hn(po, void 0, vo), [p, m] = g, [x, S] = hr(), [D, C] = Z(me.Uninitialized), R = D === me.Initialized, {
2188
+ const g = Hn(po, void 0, vo), [b, x] = g, [p, y] = hr(), [R, S] = Q(De.Uninitialized), I = R === De.Initialized, {
2189
2189
  draggable: {
2190
- active: y,
2190
+ active: m,
2191
2191
  nodes: w,
2192
- translate: I
2192
+ translate: D
2193
2193
  },
2194
2194
  droppable: {
2195
- containers: A
2195
+ containers: N
2196
2196
  }
2197
- } = p, v = y != null ? w.get(y) : null, H = N({
2197
+ } = b, C = m != null ? w.get(m) : null, P = L({
2198
2198
  initial: null,
2199
2199
  translated: null
2200
- }), j = T(() => {
2201
- var X;
2202
- return y != null ? {
2203
- id: y,
2200
+ }), j = O(() => {
2201
+ var Y;
2202
+ return m != null ? {
2203
+ id: m,
2204
2204
  // It's possible for the active node to unmount while dragging
2205
- data: (X = v == null ? void 0 : v.data) != null ? X : ho,
2206
- rect: H
2205
+ data: (Y = C == null ? void 0 : C.data) != null ? Y : ho,
2206
+ rect: P
2207
2207
  } : null;
2208
- }, [y, v]), L = N(null), [ne, Y] = Z(null), [B, se] = Z(null), re = Ue(b, Object.values(b)), ze = Ze("DndDescribedBy", s), Qe = T(() => A.getEnabled(), [A]), K = wo(h), {
2209
- droppableRects: de,
2210
- measureDroppableContainers: De,
2211
- measuringScheduled: je
2212
- } = Qr(Qe, {
2213
- dragging: R,
2214
- dependencies: [I.x, I.y],
2215
- config: K.droppable
2216
- }), Q = _r(w, y), et = T(() => B ? St(B) : null, [B]), be = Pn(), fe = eo(Q, K.draggable.measure);
2208
+ }, [m, C]), T = L(null), [G, U] = Q(null), [k, se] = Q(null), B = Ve(v, Object.values(v)), ae = Qe("DndDescribedBy", s), le = O(() => N.getEnabled(), [N]), X = wo(f), {
2209
+ droppableRects: he,
2210
+ measureDroppableContainers: Re,
2211
+ measuringScheduled: Be
2212
+ } = Qr(le, {
2213
+ dragging: I,
2214
+ dependencies: [D.x, D.y],
2215
+ config: X.droppable
2216
+ }), ee = _r(w, m), et = O(() => k ? St(k) : null, [k]), pe = Bn(), ge = eo(ee, X.draggable.measure);
2217
2217
  mo({
2218
- activeNode: y != null ? w.get(y) : null,
2219
- config: be.layoutShiftCompensation,
2220
- initialRect: fe,
2221
- measure: K.draggable.measure
2218
+ activeNode: m != null ? w.get(m) : null,
2219
+ config: pe.layoutShiftCompensation,
2220
+ initialRect: ge,
2221
+ measure: X.draggable.measure
2222
2222
  });
2223
- const k = Zt(Q, K.draggable.measure, fe), Be = Zt(Q ? Q.parentElement : null), ae = N({
2223
+ const A = Zt(ee, X.draggable.measure, ge), $e = Zt(ee ? ee.parentElement : null), ce = L({
2224
2224
  activatorEvent: null,
2225
2225
  active: null,
2226
- activeNode: Q,
2226
+ activeNode: ee,
2227
2227
  collisionRect: null,
2228
2228
  collisions: null,
2229
- droppableRects: de,
2229
+ droppableRects: he,
2230
2230
  draggableNodes: w,
2231
2231
  draggingNode: null,
2232
2232
  draggingNodeRect: null,
2233
- droppableContainers: A,
2233
+ droppableContainers: N,
2234
2234
  over: null,
2235
2235
  scrollableAncestors: [],
2236
2236
  scrollAdjustedTranslate: null
2237
- }), Re = A.getNodeFor((n = ae.current.over) == null ? void 0 : n.id), he = uo({
2238
- measure: K.dragOverlay.measure
2239
- }), Ee = (r = he.nodeRef.current) != null ? r : Q, Ie = R ? (o = he.rect) != null ? o : k : null, jt = !!(he.nodeRef.current && he.rect), Bt = ro(jt ? null : k), gt = Dn(Ee ? q(Ee) : null), ve = oo(R ? Re ?? Q : null), tt = lo(ve), nt = xo(f, {
2237
+ }), Ee = N.getNodeFor((n = ce.current.over) == null ? void 0 : n.id), be = uo({
2238
+ measure: X.dragOverlay.measure
2239
+ }), ke = (r = be.nodeRef.current) != null ? r : ee, Te = I ? (o = be.rect) != null ? o : A : null, jt = !!(be.nodeRef.current && be.rect), Pt = ro(jt ? null : A), gt = Dn(ke ? q(ke) : null), ye = oo(I ? Ee ?? ee : null), tt = lo(ye), nt = xo(h, {
2240
2240
  transform: {
2241
- x: I.x - Bt.x,
2242
- y: I.y - Bt.y,
2241
+ x: D.x - Pt.x,
2242
+ y: D.y - Pt.y,
2243
2243
  scaleX: 1,
2244
2244
  scaleY: 1
2245
2245
  },
2246
- activatorEvent: B,
2246
+ activatorEvent: k,
2247
2247
  active: j,
2248
- activeNodeRect: k,
2249
- containerNodeRect: Be,
2250
- draggingNodeRect: Ie,
2251
- over: ae.current.over,
2252
- overlayNodeRect: he.rect,
2253
- scrollableAncestors: ve,
2248
+ activeNodeRect: A,
2249
+ containerNodeRect: $e,
2250
+ draggingNodeRect: Te,
2251
+ over: ce.current.over,
2252
+ overlayNodeRect: be.rect,
2253
+ scrollableAncestors: ye,
2254
2254
  scrollableAncestorRects: tt,
2255
2255
  windowRect: gt
2256
- }), Pt = et ? Oe(et, I) : null, Ft = io(ve), On = en(Ft), Nn = en(Ft, [k]), ke = Oe(nt, On), Ae = Ie ? Ir(Ie, nt) : null, Pe = j && Ae ? c({
2256
+ }), Bt = et ? Le(et, D) : null, $t = io(ye), Nn = en($t), On = en($t, [A]), Ae = Le(nt, Nn), Ne = Te ? Er(Te, nt) : null, Fe = j && Ne ? d({
2257
2257
  active: j,
2258
- collisionRect: Ae,
2259
- droppableRects: de,
2260
- droppableContainers: Qe,
2261
- pointerCoordinates: Pt
2262
- }) : null, $t = mr(Pe, "id"), [pe, Ht] = Z(null), Mn = jt ? nt : Oe(nt, Nn), Ln = Rr(Mn, (i = pe == null ? void 0 : pe.rect) != null ? i : null, k), bt = N(null), Xt = W(
2263
- (X, G) => {
2258
+ collisionRect: Ne,
2259
+ droppableRects: he,
2260
+ droppableContainers: le,
2261
+ pointerCoordinates: Bt
2262
+ }) : null, Ft = mr(Fe, "id"), [xe, Ht] = Q(null), Mn = jt ? nt : Le(nt, On), Ln = Rr(Mn, (i = xe == null ? void 0 : xe.rect) != null ? i : null, A), bt = L(null), Wt = K(
2263
+ (Y, J) => {
2264
2264
  let {
2265
- sensor: J,
2266
- options: ye
2267
- } = G;
2268
- if (L.current == null)
2265
+ sensor: _,
2266
+ options: we
2267
+ } = J;
2268
+ if (T.current == null)
2269
2269
  return;
2270
- const ee = w.get(L.current);
2271
- if (!ee)
2270
+ const te = w.get(T.current);
2271
+ if (!te)
2272
2272
  return;
2273
- const _ = X.nativeEvent, le = new J({
2274
- active: L.current,
2275
- activeNode: ee,
2276
- event: _,
2277
- options: ye,
2273
+ const Z = Y.nativeEvent, ue = new _({
2274
+ active: T.current,
2275
+ activeNode: te,
2276
+ event: Z,
2277
+ options: we,
2278
2278
  // Sensors need to be instantiated with refs for arguments that change over time
2279
2279
  // otherwise they are frozen in time with the stale arguments
2280
- context: ae,
2281
- onAbort(F) {
2282
- if (!w.get(F))
2280
+ context: ce,
2281
+ onAbort(H) {
2282
+ if (!w.get(H))
2283
2283
  return;
2284
2284
  const {
2285
- onDragAbort: ce
2286
- } = re.current, ge = {
2287
- id: F
2285
+ onDragAbort: de
2286
+ } = B.current, ve = {
2287
+ id: H
2288
2288
  };
2289
- ce == null || ce(ge), x({
2289
+ de == null || de(ve), p({
2290
2290
  type: "onDragAbort",
2291
- event: ge
2291
+ event: ve
2292
2292
  });
2293
2293
  },
2294
- onPending(F, xe, ce, ge) {
2295
- if (!w.get(F))
2294
+ onPending(H, me, de, ve) {
2295
+ if (!w.get(H))
2296
2296
  return;
2297
2297
  const {
2298
- onDragPending: $e
2299
- } = re.current, we = {
2300
- id: F,
2301
- constraint: xe,
2302
- initialCoordinates: ce,
2303
- offset: ge
2298
+ onDragPending: We
2299
+ } = B.current, Se = {
2300
+ id: H,
2301
+ constraint: me,
2302
+ initialCoordinates: de,
2303
+ offset: ve
2304
2304
  };
2305
- $e == null || $e(we), x({
2305
+ We == null || We(Se), p({
2306
2306
  type: "onDragPending",
2307
- event: we
2307
+ event: Se
2308
2308
  });
2309
2309
  },
2310
- onStart(F) {
2311
- const xe = L.current;
2312
- if (xe == null)
2310
+ onStart(H) {
2311
+ const me = T.current;
2312
+ if (me == null)
2313
2313
  return;
2314
- const ce = w.get(xe);
2315
- if (!ce)
2314
+ const de = w.get(me);
2315
+ if (!de)
2316
2316
  return;
2317
2317
  const {
2318
- onDragStart: ge
2319
- } = re.current, Fe = {
2320
- activatorEvent: _,
2318
+ onDragStart: ve
2319
+ } = B.current, He = {
2320
+ activatorEvent: Z,
2321
2321
  active: {
2322
- id: xe,
2323
- data: ce.data,
2324
- rect: H
2322
+ id: me,
2323
+ data: de.data,
2324
+ rect: P
2325
2325
  }
2326
2326
  };
2327
2327
  rt(() => {
2328
- ge == null || ge(Fe), C(me.Initializing), m({
2329
- type: z.DragStart,
2330
- initialCoordinates: F,
2331
- active: xe
2332
- }), x({
2328
+ ve == null || ve(He), S(De.Initializing), x({
2329
+ type: $.DragStart,
2330
+ initialCoordinates: H,
2331
+ active: me
2332
+ }), p({
2333
2333
  type: "onDragStart",
2334
- event: Fe
2335
- }), Y(bt.current), se(_);
2334
+ event: He
2335
+ }), U(bt.current), se(Z);
2336
2336
  });
2337
2337
  },
2338
- onMove(F) {
2339
- m({
2340
- type: z.DragMove,
2341
- coordinates: F
2338
+ onMove(H) {
2339
+ x({
2340
+ type: $.DragMove,
2341
+ coordinates: H
2342
2342
  });
2343
2343
  },
2344
- onEnd: Te(z.DragEnd),
2345
- onCancel: Te(z.DragCancel)
2344
+ onEnd: Oe($.DragEnd),
2345
+ onCancel: Oe($.DragCancel)
2346
2346
  });
2347
- bt.current = le;
2348
- function Te(F) {
2347
+ bt.current = ue;
2348
+ function Oe(H) {
2349
2349
  return async function() {
2350
2350
  const {
2351
- active: ce,
2352
- collisions: ge,
2353
- over: Fe,
2354
- scrollAdjustedTranslate: $e
2355
- } = ae.current;
2356
- let we = null;
2357
- if (ce && $e) {
2351
+ active: de,
2352
+ collisions: ve,
2353
+ over: He,
2354
+ scrollAdjustedTranslate: We
2355
+ } = ce.current;
2356
+ let Se = null;
2357
+ if (de && We) {
2358
2358
  const {
2359
- cancelDrop: He
2360
- } = re.current;
2361
- we = {
2362
- activatorEvent: _,
2363
- active: ce,
2364
- collisions: ge,
2365
- delta: $e,
2366
- over: Fe
2367
- }, F === z.DragEnd && typeof He == "function" && await Promise.resolve(He(we)) && (F = z.DragCancel);
2359
+ cancelDrop: Xe
2360
+ } = B.current;
2361
+ Se = {
2362
+ activatorEvent: Z,
2363
+ active: de,
2364
+ collisions: ve,
2365
+ delta: We,
2366
+ over: He
2367
+ }, H === $.DragEnd && typeof Xe == "function" && await Promise.resolve(Xe(Se)) && (H = $.DragCancel);
2368
2368
  }
2369
- L.current = null, rt(() => {
2370
- m({
2371
- type: F
2372
- }), C(me.Uninitialized), Ht(null), Y(null), se(null), bt.current = null;
2373
- const He = F === z.DragEnd ? "onDragEnd" : "onDragCancel";
2374
- if (we) {
2375
- const vt = re.current[He];
2376
- vt == null || vt(we), x({
2377
- type: He,
2378
- event: we
2369
+ T.current = null, rt(() => {
2370
+ x({
2371
+ type: H
2372
+ }), S(De.Uninitialized), Ht(null), U(null), se(null), bt.current = null;
2373
+ const Xe = H === $.DragEnd ? "onDragEnd" : "onDragCancel";
2374
+ if (Se) {
2375
+ const vt = B.current[Xe];
2376
+ vt == null || vt(Se), p({
2377
+ type: Xe,
2378
+ event: Se
2379
2379
  });
2380
2380
  }
2381
2381
  });
@@ -2384,174 +2384,174 @@ const So = /* @__PURE__ */ $n(function(t) {
2384
2384
  },
2385
2385
  // eslint-disable-next-line react-hooks/exhaustive-deps
2386
2386
  [w]
2387
- ), zn = W((X, G) => (J, ye) => {
2388
- const ee = J.nativeEvent, _ = w.get(ye);
2387
+ ), zn = K((Y, J) => (_, we) => {
2388
+ const te = _.nativeEvent, Z = w.get(we);
2389
2389
  if (
2390
2390
  // Another sensor is already instantiating
2391
- L.current !== null || // No active draggable
2392
- !_ || // Event has already been captured
2393
- ee.dndKit || ee.defaultPrevented
2391
+ T.current !== null || // No active draggable
2392
+ !Z || // Event has already been captured
2393
+ te.dndKit || te.defaultPrevented
2394
2394
  )
2395
2395
  return;
2396
- const le = {
2397
- active: _
2396
+ const ue = {
2397
+ active: Z
2398
2398
  };
2399
- X(J, G.options, le) === !0 && (ee.dndKit = {
2400
- capturedBy: G.sensor
2401
- }, L.current = ye, Xt(J, G));
2402
- }, [w, Xt]), Wt = Zr(u, zn);
2403
- so(u), ue(() => {
2404
- k && D === me.Initializing && C(me.Initialized);
2405
- }, [k, D]), O(
2399
+ Y(_, J.options, ue) === !0 && (te.dndKit = {
2400
+ capturedBy: J.sensor
2401
+ }, T.current = we, Wt(_, J));
2402
+ }, [w, Wt]), Xt = Zr(c, zn);
2403
+ so(c), fe(() => {
2404
+ A && R === De.Initializing && S(De.Initialized);
2405
+ }, [A, R]), M(
2406
2406
  () => {
2407
2407
  const {
2408
- onDragMove: X
2409
- } = re.current, {
2410
- active: G,
2411
- activatorEvent: J,
2412
- collisions: ye,
2413
- over: ee
2414
- } = ae.current;
2415
- if (!G || !J)
2408
+ onDragMove: Y
2409
+ } = B.current, {
2410
+ active: J,
2411
+ activatorEvent: _,
2412
+ collisions: we,
2413
+ over: te
2414
+ } = ce.current;
2415
+ if (!J || !_)
2416
2416
  return;
2417
- const _ = {
2418
- active: G,
2419
- activatorEvent: J,
2420
- collisions: ye,
2417
+ const Z = {
2418
+ active: J,
2419
+ activatorEvent: _,
2420
+ collisions: we,
2421
2421
  delta: {
2422
- x: ke.x,
2423
- y: ke.y
2422
+ x: Ae.x,
2423
+ y: Ae.y
2424
2424
  },
2425
- over: ee
2425
+ over: te
2426
2426
  };
2427
2427
  rt(() => {
2428
- X == null || X(_), x({
2428
+ Y == null || Y(Z), p({
2429
2429
  type: "onDragMove",
2430
- event: _
2430
+ event: Z
2431
2431
  });
2432
2432
  });
2433
2433
  },
2434
2434
  // eslint-disable-next-line react-hooks/exhaustive-deps
2435
- [ke.x, ke.y]
2436
- ), O(
2435
+ [Ae.x, Ae.y]
2436
+ ), M(
2437
2437
  () => {
2438
2438
  const {
2439
- active: X,
2440
- activatorEvent: G,
2441
- collisions: J,
2442
- droppableContainers: ye,
2443
- scrollAdjustedTranslate: ee
2444
- } = ae.current;
2445
- if (!X || L.current == null || !G || !ee)
2439
+ active: Y,
2440
+ activatorEvent: J,
2441
+ collisions: _,
2442
+ droppableContainers: we,
2443
+ scrollAdjustedTranslate: te
2444
+ } = ce.current;
2445
+ if (!Y || T.current == null || !J || !te)
2446
2446
  return;
2447
2447
  const {
2448
- onDragOver: _
2449
- } = re.current, le = ye.get($t), Te = le && le.rect.current ? {
2450
- id: le.id,
2451
- rect: le.rect.current,
2452
- data: le.data,
2453
- disabled: le.disabled
2454
- } : null, F = {
2455
- active: X,
2456
- activatorEvent: G,
2457
- collisions: J,
2448
+ onDragOver: Z
2449
+ } = B.current, ue = we.get(Ft), Oe = ue && ue.rect.current ? {
2450
+ id: ue.id,
2451
+ rect: ue.rect.current,
2452
+ data: ue.data,
2453
+ disabled: ue.disabled
2454
+ } : null, H = {
2455
+ active: Y,
2456
+ activatorEvent: J,
2457
+ collisions: _,
2458
2458
  delta: {
2459
- x: ee.x,
2460
- y: ee.y
2459
+ x: te.x,
2460
+ y: te.y
2461
2461
  },
2462
- over: Te
2462
+ over: Oe
2463
2463
  };
2464
2464
  rt(() => {
2465
- Ht(Te), _ == null || _(F), x({
2465
+ Ht(Oe), Z == null || Z(H), p({
2466
2466
  type: "onDragOver",
2467
- event: F
2467
+ event: H
2468
2468
  });
2469
2469
  });
2470
2470
  },
2471
2471
  // eslint-disable-next-line react-hooks/exhaustive-deps
2472
- [$t]
2473
- ), ue(() => {
2474
- ae.current = {
2475
- activatorEvent: B,
2472
+ [Ft]
2473
+ ), fe(() => {
2474
+ ce.current = {
2475
+ activatorEvent: k,
2476
2476
  active: j,
2477
- activeNode: Q,
2478
- collisionRect: Ae,
2479
- collisions: Pe,
2480
- droppableRects: de,
2477
+ activeNode: ee,
2478
+ collisionRect: Ne,
2479
+ collisions: Fe,
2480
+ droppableRects: he,
2481
2481
  draggableNodes: w,
2482
- draggingNode: Ee,
2483
- draggingNodeRect: Ie,
2484
- droppableContainers: A,
2485
- over: pe,
2486
- scrollableAncestors: ve,
2487
- scrollAdjustedTranslate: ke
2488
- }, H.current = {
2489
- initial: Ie,
2490
- translated: Ae
2482
+ draggingNode: ke,
2483
+ draggingNodeRect: Te,
2484
+ droppableContainers: N,
2485
+ over: xe,
2486
+ scrollableAncestors: ye,
2487
+ scrollAdjustedTranslate: Ae
2488
+ }, P.current = {
2489
+ initial: Te,
2490
+ translated: Ne
2491
2491
  };
2492
- }, [j, Q, Pe, Ae, w, Ee, Ie, de, A, pe, ve, ke]), qr({
2493
- ...be,
2494
- delta: I,
2495
- draggingRect: Ae,
2496
- pointerCoordinates: Pt,
2497
- scrollableAncestors: ve,
2492
+ }, [j, ee, Fe, Ne, w, ke, Te, he, N, xe, ye, Ae]), qr({
2493
+ ...pe,
2494
+ delta: D,
2495
+ draggingRect: Ne,
2496
+ pointerCoordinates: Bt,
2497
+ scrollableAncestors: ye,
2498
2498
  scrollableAncestorRects: tt
2499
2499
  });
2500
- const jn = T(() => ({
2500
+ const jn = O(() => ({
2501
2501
  active: j,
2502
- activeNode: Q,
2503
- activeNodeRect: k,
2504
- activatorEvent: B,
2505
- collisions: Pe,
2506
- containerNodeRect: Be,
2507
- dragOverlay: he,
2502
+ activeNode: ee,
2503
+ activeNodeRect: A,
2504
+ activatorEvent: k,
2505
+ collisions: Fe,
2506
+ containerNodeRect: $e,
2507
+ dragOverlay: be,
2508
2508
  draggableNodes: w,
2509
- droppableContainers: A,
2510
- droppableRects: de,
2511
- over: pe,
2512
- measureDroppableContainers: De,
2513
- scrollableAncestors: ve,
2509
+ droppableContainers: N,
2510
+ droppableRects: he,
2511
+ over: xe,
2512
+ measureDroppableContainers: Re,
2513
+ scrollableAncestors: ye,
2514
2514
  scrollableAncestorRects: tt,
2515
- measuringConfiguration: K,
2516
- measuringScheduled: je,
2515
+ measuringConfiguration: X,
2516
+ measuringScheduled: Be,
2517
2517
  windowRect: gt
2518
- }), [j, Q, k, B, Pe, Be, he, w, A, de, pe, De, ve, tt, K, je, gt]), Bn = T(() => ({
2519
- activatorEvent: B,
2520
- activators: Wt,
2518
+ }), [j, ee, A, k, Fe, $e, be, w, N, he, xe, Re, ye, tt, X, Be, gt]), Pn = O(() => ({
2519
+ activatorEvent: k,
2520
+ activators: Xt,
2521
2521
  active: j,
2522
- activeNodeRect: k,
2522
+ activeNodeRect: A,
2523
2523
  ariaDescribedById: {
2524
- draggable: ze
2524
+ draggable: ae
2525
2525
  },
2526
- dispatch: m,
2526
+ dispatch: x,
2527
2527
  draggableNodes: w,
2528
- over: pe,
2529
- measureDroppableContainers: De
2530
- }), [B, Wt, j, k, m, ze, w, pe, De]);
2528
+ over: xe,
2529
+ measureDroppableContainers: Re
2530
+ }), [k, Xt, j, A, x, ae, w, xe, Re]);
2531
2531
  return V.createElement(hn.Provider, {
2532
- value: S
2532
+ value: y
2533
2533
  }, V.createElement(ht.Provider, {
2534
- value: Bn
2534
+ value: Pn
2535
2535
  }, V.createElement(Cn.Provider, {
2536
2536
  value: jn
2537
2537
  }, V.createElement(Rn.Provider, {
2538
2538
  value: Ln
2539
- }, d)), V.createElement(yo, {
2539
+ }, u)), V.createElement(yo, {
2540
2540
  disabled: (a == null ? void 0 : a.restoreFocus) === !1
2541
2541
  })), V.createElement(vr, {
2542
2542
  ...a,
2543
- hiddenTextDescribedById: ze
2543
+ hiddenTextDescribedById: ae
2544
2544
  }));
2545
- function Pn() {
2546
- const X = (ne == null ? void 0 : ne.autoScrollEnabled) === !1, G = typeof l == "object" ? l.enabled === !1 : l === !1, J = R && !X && !G;
2545
+ function Bn() {
2546
+ const Y = (G == null ? void 0 : G.autoScrollEnabled) === !1, J = typeof l == "object" ? l.enabled === !1 : l === !1, _ = I && !Y && !J;
2547
2547
  return typeof l == "object" ? {
2548
2548
  ...l,
2549
- enabled: J
2549
+ enabled: _
2550
2550
  } : {
2551
- enabled: J
2551
+ enabled: _
2552
2552
  };
2553
2553
  }
2554
- }), Do = /* @__PURE__ */ Ge(null), nn = "button", Co = "Draggable";
2554
+ }), Do = /* @__PURE__ */ Je(null), nn = "button", Co = "Draggable";
2555
2555
  function Ro(e) {
2556
2556
  let {
2557
2557
  id: t,
@@ -2559,141 +2559,141 @@ function Ro(e) {
2559
2559
  disabled: r = !1,
2560
2560
  attributes: o
2561
2561
  } = e;
2562
- const i = Ze(Co), {
2562
+ const i = Qe(Co), {
2563
2563
  activators: s,
2564
2564
  activatorEvent: a,
2565
2565
  active: l,
2566
- activeNodeRect: d,
2567
- ariaDescribedById: u,
2568
- draggableNodes: c,
2569
- over: h
2570
- } = Ce(ht), {
2571
- role: f = nn,
2572
- roleDescription: b = "draggable",
2566
+ activeNodeRect: u,
2567
+ ariaDescribedById: c,
2568
+ draggableNodes: d,
2569
+ over: f
2570
+ } = Ie(ht), {
2571
+ role: h = nn,
2572
+ roleDescription: v = "draggable",
2573
2573
  tabIndex: g = 0
2574
- } = o ?? {}, p = (l == null ? void 0 : l.id) === t, m = Ce(p ? Rn : Do), [x, S] = at(), [D, C] = at(), R = ao(s, t), y = Ue(n);
2575
- ue(
2576
- () => (c.set(t, {
2574
+ } = o ?? {}, b = (l == null ? void 0 : l.id) === t, x = Ie(b ? Rn : Do), [p, y] = at(), [R, S] = at(), I = ao(s, t), m = Ve(n);
2575
+ fe(
2576
+ () => (d.set(t, {
2577
2577
  id: t,
2578
2578
  key: i,
2579
- node: x,
2580
- activatorNode: D,
2581
- data: y
2579
+ node: p,
2580
+ activatorNode: R,
2581
+ data: m
2582
2582
  }), () => {
2583
- const I = c.get(t);
2584
- I && I.key === i && c.delete(t);
2583
+ const D = d.get(t);
2584
+ D && D.key === i && d.delete(t);
2585
2585
  }),
2586
2586
  // eslint-disable-next-line react-hooks/exhaustive-deps
2587
- [c, t]
2587
+ [d, t]
2588
2588
  );
2589
- const w = T(() => ({
2590
- role: f,
2589
+ const w = O(() => ({
2590
+ role: h,
2591
2591
  tabIndex: g,
2592
2592
  "aria-disabled": r,
2593
- "aria-pressed": p && f === nn ? !0 : void 0,
2594
- "aria-roledescription": b,
2595
- "aria-describedby": u.draggable
2596
- }), [r, f, g, p, b, u.draggable]);
2593
+ "aria-pressed": b && h === nn ? !0 : void 0,
2594
+ "aria-roledescription": v,
2595
+ "aria-describedby": c.draggable
2596
+ }), [r, h, g, b, v, c.draggable]);
2597
2597
  return {
2598
2598
  active: l,
2599
2599
  activatorEvent: a,
2600
- activeNodeRect: d,
2600
+ activeNodeRect: u,
2601
2601
  attributes: w,
2602
- isDragging: p,
2603
- listeners: r ? void 0 : R,
2604
- node: x,
2605
- over: h,
2606
- setNodeRef: S,
2607
- setActivatorNodeRef: C,
2608
- transform: m
2602
+ isDragging: b,
2603
+ listeners: r ? void 0 : I,
2604
+ node: p,
2605
+ over: f,
2606
+ setNodeRef: y,
2607
+ setActivatorNodeRef: S,
2608
+ transform: x
2609
2609
  };
2610
2610
  }
2611
- function Eo() {
2612
- return Ce(Cn);
2611
+ function Io() {
2612
+ return Ie(Cn);
2613
2613
  }
2614
- const Io = "Droppable", ko = {
2614
+ const Eo = "Droppable", ko = {
2615
2615
  timeout: 25
2616
2616
  };
2617
- function Ao(e) {
2617
+ function To(e) {
2618
2618
  let {
2619
2619
  data: t,
2620
2620
  disabled: n = !1,
2621
2621
  id: r,
2622
2622
  resizeObserverConfig: o
2623
2623
  } = e;
2624
- const i = Ze(Io), {
2624
+ const i = Qe(Eo), {
2625
2625
  active: s,
2626
2626
  dispatch: a,
2627
2627
  over: l,
2628
- measureDroppableContainers: d
2629
- } = Ce(ht), u = N({
2628
+ measureDroppableContainers: u
2629
+ } = Ie(ht), c = L({
2630
2630
  disabled: n
2631
- }), c = N(!1), h = N(null), f = N(null), {
2632
- disabled: b,
2631
+ }), d = L(!1), f = L(null), h = L(null), {
2632
+ disabled: v,
2633
2633
  updateMeasurementsFor: g,
2634
- timeout: p
2634
+ timeout: b
2635
2635
  } = {
2636
2636
  ...ko,
2637
2637
  ...o
2638
- }, m = Ue(g ?? r), x = W(
2638
+ }, x = Ve(g ?? r), p = K(
2639
2639
  () => {
2640
- if (!c.current) {
2641
- c.current = !0;
2640
+ if (!d.current) {
2641
+ d.current = !0;
2642
2642
  return;
2643
2643
  }
2644
- f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
2645
- d(Array.isArray(m.current) ? m.current : [m.current]), f.current = null;
2646
- }, p);
2644
+ h.current != null && clearTimeout(h.current), h.current = setTimeout(() => {
2645
+ u(Array.isArray(x.current) ? x.current : [x.current]), h.current = null;
2646
+ }, b);
2647
2647
  },
2648
2648
  //eslint-disable-next-line react-hooks/exhaustive-deps
2649
- [p]
2650
- ), S = ft({
2651
- callback: x,
2652
- disabled: b || !s
2653
- }), D = W((w, I) => {
2654
- S && (I && (S.unobserve(I), c.current = !1), w && S.observe(w));
2655
- }, [S]), [C, R] = at(D), y = Ue(t);
2656
- return O(() => {
2657
- !S || !C.current || (S.disconnect(), c.current = !1, S.observe(C.current));
2658
- }, [C, S]), O(
2649
+ [b]
2650
+ ), y = ft({
2651
+ callback: p,
2652
+ disabled: v || !s
2653
+ }), R = K((w, D) => {
2654
+ y && (D && (y.unobserve(D), d.current = !1), w && y.observe(w));
2655
+ }, [y]), [S, I] = at(R), m = Ve(t);
2656
+ return M(() => {
2657
+ !y || !S.current || (y.disconnect(), d.current = !1, y.observe(S.current));
2658
+ }, [S, y]), M(
2659
2659
  () => (a({
2660
- type: z.RegisterDroppable,
2660
+ type: $.RegisterDroppable,
2661
2661
  element: {
2662
2662
  id: r,
2663
2663
  key: i,
2664
2664
  disabled: n,
2665
- node: C,
2666
- rect: h,
2667
- data: y
2665
+ node: S,
2666
+ rect: f,
2667
+ data: m
2668
2668
  }
2669
2669
  }), () => a({
2670
- type: z.UnregisterDroppable,
2670
+ type: $.UnregisterDroppable,
2671
2671
  key: i,
2672
2672
  id: r
2673
2673
  })),
2674
2674
  // eslint-disable-next-line react-hooks/exhaustive-deps
2675
2675
  [r]
2676
- ), O(() => {
2677
- n !== u.current.disabled && (a({
2678
- type: z.SetDroppableDisabled,
2676
+ ), M(() => {
2677
+ n !== c.current.disabled && (a({
2678
+ type: $.SetDroppableDisabled,
2679
2679
  id: r,
2680
2680
  key: i,
2681
2681
  disabled: n
2682
- }), u.current.disabled = n);
2682
+ }), c.current.disabled = n);
2683
2683
  }, [r, i, n, a]), {
2684
2684
  active: s,
2685
- rect: h,
2685
+ rect: f,
2686
2686
  isOver: (l == null ? void 0 : l.id) === r,
2687
- node: C,
2687
+ node: S,
2688
2688
  over: l,
2689
- setNodeRef: R
2689
+ setNodeRef: I
2690
2690
  };
2691
2691
  }
2692
2692
  function zt(e, t, n) {
2693
2693
  const r = e.slice();
2694
2694
  return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
2695
2695
  }
2696
- function To(e, t) {
2696
+ function Ao(e, t) {
2697
2697
  return e.reduce((n, r, o) => {
2698
2698
  const i = t.get(r);
2699
2699
  return i && (n[o] = i), n;
@@ -2702,7 +2702,7 @@ function To(e, t) {
2702
2702
  function ot(e) {
2703
2703
  return e !== null && e >= 0;
2704
2704
  }
2705
- function Oo(e, t) {
2705
+ function No(e, t) {
2706
2706
  if (e === t)
2707
2707
  return !0;
2708
2708
  if (e.length !== t.length)
@@ -2712,7 +2712,7 @@ function Oo(e, t) {
2712
2712
  return !1;
2713
2713
  return !0;
2714
2714
  }
2715
- function No(e) {
2715
+ function Oo(e) {
2716
2716
  return typeof e == "boolean" ? {
2717
2717
  draggable: e,
2718
2718
  droppable: e
@@ -2735,9 +2735,9 @@ const it = {
2735
2735
  return null;
2736
2736
  const l = Lo(n, s, o);
2737
2737
  if (s === o) {
2738
- const d = n[i];
2739
- return d ? {
2740
- x: o < i ? d.left + d.width - (a.left + a.width) : d.left - a.left,
2738
+ const u = n[i];
2739
+ return u ? {
2740
+ x: o < i ? u.left + u.width - (a.left + a.width) : u.left - a.left,
2741
2741
  y: 0,
2742
2742
  ...it
2743
2743
  } : null;
@@ -2760,7 +2760,7 @@ function Lo(e, t, n) {
2760
2760
  const r = e[t], o = e[t - 1], i = e[t + 1];
2761
2761
  return !r || !o && !i ? 0 : n < t ? o ? r.left - (o.left + o.width) : i.left - (r.left + r.width) : i ? i.left - (r.left + r.width) : r.left - (o.left + o.width);
2762
2762
  }
2763
- const En = (e) => {
2763
+ const In = (e) => {
2764
2764
  let {
2765
2765
  rects: t,
2766
2766
  activeIndex: n,
@@ -2774,15 +2774,15 @@ const En = (e) => {
2774
2774
  scaleX: a.width / s.width,
2775
2775
  scaleY: a.height / s.height
2776
2776
  };
2777
- }, In = "Sortable", kn = /* @__PURE__ */ V.createContext({
2777
+ }, En = "Sortable", kn = /* @__PURE__ */ V.createContext({
2778
2778
  activeIndex: -1,
2779
- containerId: In,
2779
+ containerId: En,
2780
2780
  disableTransforms: !1,
2781
2781
  items: [],
2782
2782
  overIndex: -1,
2783
2783
  useDragOverlay: !1,
2784
2784
  sortedRects: [],
2785
- strategy: En,
2785
+ strategy: In,
2786
2786
  disabled: {
2787
2787
  draggable: !1,
2788
2788
  droppable: !1
@@ -2793,38 +2793,38 @@ function zo(e) {
2793
2793
  children: t,
2794
2794
  id: n,
2795
2795
  items: r,
2796
- strategy: o = En,
2796
+ strategy: o = In,
2797
2797
  disabled: i = !1
2798
2798
  } = e;
2799
2799
  const {
2800
2800
  active: s,
2801
2801
  dragOverlay: a,
2802
2802
  droppableRects: l,
2803
- over: d,
2804
- measureDroppableContainers: u
2805
- } = Eo(), c = Ze(In, n), h = a.rect !== null, f = T(() => r.map((R) => typeof R == "object" && "id" in R ? R.id : R), [r]), b = s != null, g = s ? f.indexOf(s.id) : -1, p = d ? f.indexOf(d.id) : -1, m = N(f), x = !Oo(f, m.current), S = p !== -1 && g === -1 || x, D = No(i);
2806
- ue(() => {
2807
- x && b && u(f);
2808
- }, [x, f, b, u]), O(() => {
2809
- m.current = f;
2810
- }, [f]);
2811
- const C = T(
2803
+ over: u,
2804
+ measureDroppableContainers: c
2805
+ } = Io(), d = Qe(En, n), f = a.rect !== null, h = O(() => r.map((I) => typeof I == "object" && "id" in I ? I.id : I), [r]), v = s != null, g = s ? h.indexOf(s.id) : -1, b = u ? h.indexOf(u.id) : -1, x = L(h), p = !No(h, x.current), y = b !== -1 && g === -1 || p, R = Oo(i);
2806
+ fe(() => {
2807
+ p && v && c(h);
2808
+ }, [p, h, v, c]), M(() => {
2809
+ x.current = h;
2810
+ }, [h]);
2811
+ const S = O(
2812
2812
  () => ({
2813
2813
  activeIndex: g,
2814
- containerId: c,
2815
- disabled: D,
2816
- disableTransforms: S,
2817
- items: f,
2818
- overIndex: p,
2819
- useDragOverlay: h,
2820
- sortedRects: To(f, l),
2814
+ containerId: d,
2815
+ disabled: R,
2816
+ disableTransforms: y,
2817
+ items: h,
2818
+ overIndex: b,
2819
+ useDragOverlay: f,
2820
+ sortedRects: Ao(h, l),
2821
2821
  strategy: o
2822
2822
  }),
2823
2823
  // eslint-disable-next-line react-hooks/exhaustive-deps
2824
- [g, c, D.draggable, D.droppable, S, f, p, l, h, o]
2824
+ [g, d, R.draggable, R.droppable, y, h, b, l, f, o]
2825
2825
  );
2826
2826
  return V.createElement(kn.Provider, {
2827
- value: C
2827
+ value: S
2828
2828
  }, t);
2829
2829
  }
2830
2830
  const jo = (e) => {
@@ -2835,7 +2835,7 @@ const jo = (e) => {
2835
2835
  overIndex: o
2836
2836
  } = e;
2837
2837
  return zt(n, r, o).indexOf(t);
2838
- }, An = (e) => {
2838
+ }, Tn = (e) => {
2839
2839
  let {
2840
2840
  containerId: t,
2841
2841
  isSorting: n,
@@ -2845,50 +2845,50 @@ const jo = (e) => {
2845
2845
  newIndex: s,
2846
2846
  previousItems: a,
2847
2847
  previousContainerId: l,
2848
- transition: d
2848
+ transition: u
2849
2849
  } = e;
2850
- return !d || !r || a !== i && o === s ? !1 : n ? !0 : s !== o && t === l;
2851
- }, Bo = {
2850
+ return !u || !r || a !== i && o === s ? !1 : n ? !0 : s !== o && t === l;
2851
+ }, Po = {
2852
2852
  duration: 200,
2853
2853
  easing: "ease"
2854
- }, Tn = "transform", Po = /* @__PURE__ */ Ve.Transition.toString({
2855
- property: Tn,
2854
+ }, An = "transform", Bo = /* @__PURE__ */ qe.Transition.toString({
2855
+ property: An,
2856
2856
  duration: 0,
2857
2857
  easing: "linear"
2858
- }), Fo = {
2858
+ }), $o = {
2859
2859
  roleDescription: "sortable"
2860
2860
  };
2861
- function $o(e) {
2861
+ function Fo(e) {
2862
2862
  let {
2863
2863
  disabled: t,
2864
2864
  index: n,
2865
2865
  node: r,
2866
2866
  rect: o
2867
2867
  } = e;
2868
- const [i, s] = Z(null), a = N(n);
2869
- return ue(() => {
2868
+ const [i, s] = Q(null), a = L(n);
2869
+ return fe(() => {
2870
2870
  if (!t && n !== a.current && r.current) {
2871
2871
  const l = o.current;
2872
2872
  if (l) {
2873
- const d = Le(r.current, {
2873
+ const u = Pe(r.current, {
2874
2874
  ignoreTransform: !0
2875
- }), u = {
2876
- x: l.left - d.left,
2877
- y: l.top - d.top,
2878
- scaleX: l.width / d.width,
2879
- scaleY: l.height / d.height
2875
+ }), c = {
2876
+ x: l.left - u.left,
2877
+ y: l.top - u.top,
2878
+ scaleX: l.width / u.width,
2879
+ scaleY: l.height / u.height
2880
2880
  };
2881
- (u.x || u.y) && s(u);
2881
+ (c.x || c.y) && s(c);
2882
2882
  }
2883
2883
  }
2884
2884
  n !== a.current && (a.current = n);
2885
- }, [t, n, r, o]), O(() => {
2885
+ }, [t, n, r, o]), M(() => {
2886
2886
  i && s(null);
2887
2887
  }, [i]), i;
2888
2888
  }
2889
2889
  function Ho(e) {
2890
2890
  let {
2891
- animateLayoutChanges: t = An,
2891
+ animateLayoutChanges: t = Tn,
2892
2892
  attributes: n,
2893
2893
  disabled: r,
2894
2894
  data: o,
@@ -2896,143 +2896,143 @@ function Ho(e) {
2896
2896
  id: s,
2897
2897
  strategy: a,
2898
2898
  resizeObserverConfig: l,
2899
- transition: d = Bo
2899
+ transition: u = Po
2900
2900
  } = e;
2901
2901
  const {
2902
- items: u,
2903
- containerId: c,
2904
- activeIndex: h,
2905
- disabled: f,
2906
- disableTransforms: b,
2902
+ items: c,
2903
+ containerId: d,
2904
+ activeIndex: f,
2905
+ disabled: h,
2906
+ disableTransforms: v,
2907
2907
  sortedRects: g,
2908
- overIndex: p,
2909
- useDragOverlay: m,
2910
- strategy: x
2911
- } = Ce(kn), S = Xo(r, f), D = u.indexOf(s), C = T(() => ({
2908
+ overIndex: b,
2909
+ useDragOverlay: x,
2910
+ strategy: p
2911
+ } = Ie(kn), y = Wo(r, h), R = c.indexOf(s), S = O(() => ({
2912
2912
  sortable: {
2913
- containerId: c,
2914
- index: D,
2915
- items: u
2913
+ containerId: d,
2914
+ index: R,
2915
+ items: c
2916
2916
  },
2917
2917
  ...o
2918
- }), [c, o, D, u]), R = T(() => u.slice(u.indexOf(s)), [u, s]), {
2919
- rect: y,
2918
+ }), [d, o, R, c]), I = O(() => c.slice(c.indexOf(s)), [c, s]), {
2919
+ rect: m,
2920
2920
  node: w,
2921
- isOver: I,
2922
- setNodeRef: A
2923
- } = Ao({
2921
+ isOver: D,
2922
+ setNodeRef: N
2923
+ } = To({
2924
2924
  id: s,
2925
- data: C,
2926
- disabled: S.droppable,
2925
+ data: S,
2926
+ disabled: y.droppable,
2927
2927
  resizeObserverConfig: {
2928
- updateMeasurementsFor: R,
2928
+ updateMeasurementsFor: I,
2929
2929
  ...l
2930
2930
  }
2931
2931
  }), {
2932
- active: v,
2933
- activatorEvent: H,
2932
+ active: C,
2933
+ activatorEvent: P,
2934
2934
  activeNodeRect: j,
2935
- attributes: L,
2936
- setNodeRef: ne,
2937
- listeners: Y,
2938
- isDragging: B,
2935
+ attributes: T,
2936
+ setNodeRef: G,
2937
+ listeners: U,
2938
+ isDragging: k,
2939
2939
  over: se,
2940
- setActivatorNodeRef: re,
2941
- transform: ze
2940
+ setActivatorNodeRef: B,
2941
+ transform: ae
2942
2942
  } = Ro({
2943
2943
  id: s,
2944
- data: C,
2944
+ data: S,
2945
2945
  attributes: {
2946
- ...Fo,
2946
+ ...$o,
2947
2947
  ...n
2948
2948
  },
2949
- disabled: S.draggable
2950
- }), Qe = rr(A, ne), K = !!v, de = K && !b && ot(h) && ot(p), De = !m && B, je = De && de ? ze : null, et = de ? je ?? (a ?? x)({
2949
+ disabled: y.draggable
2950
+ }), le = rr(N, G), X = !!C, he = X && !v && ot(f) && ot(b), Re = !x && k, Be = Re && he ? ae : null, et = he ? Be ?? (a ?? p)({
2951
2951
  rects: g,
2952
2952
  activeNodeRect: j,
2953
- activeIndex: h,
2954
- overIndex: p,
2955
- index: D
2956
- }) : null, be = ot(h) && ot(p) ? i({
2953
+ activeIndex: f,
2954
+ overIndex: b,
2955
+ index: R
2956
+ }) : null, pe = ot(f) && ot(b) ? i({
2957
2957
  id: s,
2958
- items: u,
2959
- activeIndex: h,
2960
- overIndex: p
2961
- }) : D, fe = v == null ? void 0 : v.id, k = N({
2962
- activeId: fe,
2963
- items: u,
2964
- newIndex: be,
2965
- containerId: c
2966
- }), Be = u !== k.current.items, ae = t({
2967
- active: v,
2968
- containerId: c,
2969
- isDragging: B,
2970
- isSorting: K,
2958
+ items: c,
2959
+ activeIndex: f,
2960
+ overIndex: b
2961
+ }) : R, ge = C == null ? void 0 : C.id, A = L({
2962
+ activeId: ge,
2963
+ items: c,
2964
+ newIndex: pe,
2965
+ containerId: d
2966
+ }), $e = c !== A.current.items, ce = t({
2967
+ active: C,
2968
+ containerId: d,
2969
+ isDragging: k,
2970
+ isSorting: X,
2971
2971
  id: s,
2972
- index: D,
2973
- items: u,
2974
- newIndex: k.current.newIndex,
2975
- previousItems: k.current.items,
2976
- previousContainerId: k.current.containerId,
2977
- transition: d,
2978
- wasDragging: k.current.activeId != null
2979
- }), Re = $o({
2980
- disabled: !ae,
2981
- index: D,
2972
+ index: R,
2973
+ items: c,
2974
+ newIndex: A.current.newIndex,
2975
+ previousItems: A.current.items,
2976
+ previousContainerId: A.current.containerId,
2977
+ transition: u,
2978
+ wasDragging: A.current.activeId != null
2979
+ }), Ee = Fo({
2980
+ disabled: !ce,
2981
+ index: R,
2982
2982
  node: w,
2983
- rect: y
2983
+ rect: m
2984
2984
  });
2985
- return O(() => {
2986
- K && k.current.newIndex !== be && (k.current.newIndex = be), c !== k.current.containerId && (k.current.containerId = c), u !== k.current.items && (k.current.items = u);
2987
- }, [K, be, c, u]), O(() => {
2988
- if (fe === k.current.activeId)
2985
+ return M(() => {
2986
+ X && A.current.newIndex !== pe && (A.current.newIndex = pe), d !== A.current.containerId && (A.current.containerId = d), c !== A.current.items && (A.current.items = c);
2987
+ }, [X, pe, d, c]), M(() => {
2988
+ if (ge === A.current.activeId)
2989
2989
  return;
2990
- if (fe != null && k.current.activeId == null) {
2991
- k.current.activeId = fe;
2990
+ if (ge != null && A.current.activeId == null) {
2991
+ A.current.activeId = ge;
2992
2992
  return;
2993
2993
  }
2994
- const Ee = setTimeout(() => {
2995
- k.current.activeId = fe;
2994
+ const ke = setTimeout(() => {
2995
+ A.current.activeId = ge;
2996
2996
  }, 50);
2997
- return () => clearTimeout(Ee);
2998
- }, [fe]), {
2999
- active: v,
3000
- activeIndex: h,
3001
- attributes: L,
3002
- data: C,
3003
- rect: y,
3004
- index: D,
3005
- newIndex: be,
3006
- items: u,
3007
- isOver: I,
3008
- isSorting: K,
3009
- isDragging: B,
3010
- listeners: Y,
2997
+ return () => clearTimeout(ke);
2998
+ }, [ge]), {
2999
+ active: C,
3000
+ activeIndex: f,
3001
+ attributes: T,
3002
+ data: S,
3003
+ rect: m,
3004
+ index: R,
3005
+ newIndex: pe,
3006
+ items: c,
3007
+ isOver: D,
3008
+ isSorting: X,
3009
+ isDragging: k,
3010
+ listeners: U,
3011
3011
  node: w,
3012
- overIndex: p,
3012
+ overIndex: b,
3013
3013
  over: se,
3014
- setNodeRef: Qe,
3015
- setActivatorNodeRef: re,
3016
- setDroppableNodeRef: A,
3017
- setDraggableNodeRef: ne,
3018
- transform: Re ?? et,
3019
- transition: he()
3014
+ setNodeRef: le,
3015
+ setActivatorNodeRef: B,
3016
+ setDroppableNodeRef: N,
3017
+ setDraggableNodeRef: G,
3018
+ transform: Ee ?? et,
3019
+ transition: be()
3020
3020
  };
3021
- function he() {
3021
+ function be() {
3022
3022
  if (
3023
3023
  // Temporarily disable transitions for a single frame to set up derived transforms
3024
- Re || // Or to prevent items jumping to back to their "new" position when items change
3025
- Be && k.current.newIndex === D
3024
+ Ee || // Or to prevent items jumping to back to their "new" position when items change
3025
+ $e && A.current.newIndex === R
3026
3026
  )
3027
- return Po;
3028
- if (!(De && !At(H) || !d) && (K || ae))
3029
- return Ve.Transition.toString({
3030
- ...d,
3031
- property: Tn
3027
+ return Bo;
3028
+ if (!(Re && !Tt(P) || !u) && (X || ce))
3029
+ return qe.Transition.toString({
3030
+ ...u,
3031
+ property: An
3032
3032
  });
3033
3033
  }
3034
3034
  }
3035
- function Xo(e, t) {
3035
+ function Wo(e, t) {
3036
3036
  var n, r;
3037
3037
  return typeof e == "boolean" ? {
3038
3038
  draggable: e,
@@ -3044,7 +3044,7 @@ function Xo(e, t) {
3044
3044
  };
3045
3045
  }
3046
3046
  E.Down, E.Right, E.Up, E.Left;
3047
- const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
3047
+ const Xo = ({ className: e }) => /* @__PURE__ */ z.jsxs(
3048
3048
  "svg",
3049
3049
  {
3050
3050
  width: "16",
@@ -3054,8 +3054,8 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
3054
3054
  className: e,
3055
3055
  style: { flexShrink: 0 },
3056
3056
  children: [
3057
- /* @__PURE__ */ M.jsx("rect", { x: "4", y: "5", width: "8", height: "2", rx: "1" }),
3058
- /* @__PURE__ */ M.jsx("rect", { x: "4", y: "9", width: "8", height: "2", rx: "1" })
3057
+ /* @__PURE__ */ z.jsx("rect", { x: "4", y: "5", width: "8", height: "2", rx: "1" }),
3058
+ /* @__PURE__ */ z.jsx("rect", { x: "4", y: "9", width: "8", height: "2", rx: "1" })
3059
3059
  ]
3060
3060
  }
3061
3061
  ), Yo = ({
@@ -3069,106 +3069,114 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
3069
3069
  dragHandleIcon: a,
3070
3070
  theme: l = "light"
3071
3071
  }) => {
3072
- const d = Se.useRef(null), [u, c] = Se.useState(null), h = (y) => {
3073
- const { isSorting: w, wasDragging: I } = y;
3074
- return w || I ? An(y) : !0;
3072
+ const u = Ce.useRef(null), [c, d] = Ce.useState(null), f = (D) => {
3073
+ const { isSorting: N, wasDragging: C } = D;
3074
+ return N || C ? Tn(D) : !0;
3075
3075
  }, {
3076
- attributes: f,
3077
- listeners: b,
3076
+ attributes: h,
3077
+ listeners: v,
3078
3078
  setNodeRef: g,
3079
- transform: p,
3080
- transition: m,
3081
- isDragging: x
3079
+ transform: b,
3080
+ transition: x,
3081
+ isDragging: p
3082
3082
  } = Ho({
3083
3083
  id: e.key || `col-${t}`,
3084
3084
  disabled: !s || !!e.fixed,
3085
- animateLayoutChanges: h,
3085
+ animateLayoutChanges: f,
3086
3086
  transition: {
3087
3087
  duration: 250,
3088
3088
  easing: "cubic-bezier(0.25, 1, 0.5, 1)"
3089
3089
  }
3090
- }), S = Se.useCallback(
3091
- (y) => {
3092
- d.current = y, g(y);
3090
+ }), y = Ce.useCallback(
3091
+ (D) => {
3092
+ u.current = D, g(D);
3093
3093
  },
3094
3094
  [g]
3095
3095
  );
3096
- Se.useEffect(() => {
3097
- if (x && d.current) {
3098
- const y = d.current.getBoundingClientRect().width;
3099
- c(y);
3096
+ Ce.useEffect(() => {
3097
+ if (p && u.current) {
3098
+ const D = u.current.getBoundingClientRect().width;
3099
+ d(D);
3100
3100
  } else
3101
- x || c(null);
3102
- }, [x]);
3103
- const D = () => {
3104
- const y = x && u ? `${u}px` : e.width || "auto";
3105
- let w = "auto";
3106
- e.fixed ? w = x ? 1001 : 1e3 : x && (w = 100);
3107
- const I = {
3108
- transform: p ? Ve.Translate.toString(p) : void 0,
3109
- transition: m || "transform 250ms cubic-bezier(0.25, 1, 0.5, 1)",
3101
+ p || d(null);
3102
+ }, [p]);
3103
+ const R = () => {
3104
+ const D = p && c ? `${c}px` : e.width || "auto";
3105
+ let N = "auto";
3106
+ e.fixed ? N = p ? 1001 : 1e3 : p && (N = 100);
3107
+ const C = {
3108
+ transform: b ? qe.Translate.toString(b) : void 0,
3109
+ transition: x || "transform 250ms cubic-bezier(0.25, 1, 0.5, 1)",
3110
3110
  willChange: "transform",
3111
- width: y,
3111
+ width: D,
3112
3112
  textAlign: oe.getTextAlign(e.align),
3113
- opacity: x ? 0.5 : 1,
3114
- zIndex: w,
3113
+ opacity: p ? 0.5 : 1,
3114
+ // cursor 由 className 控制,不在 inline style 中设置
3115
+ zIndex: N,
3115
3116
  whiteSpace: "nowrap",
3116
3117
  overflow: "hidden",
3117
3118
  textOverflow: "ellipsis"
3118
3119
  };
3119
- if (x && u && (I.minWidth = `${u}px`, I.maxWidth = `${u}px`), e.fixed === "left") {
3120
- let A = 0;
3121
- for (let v = 0; v < t; v++)
3122
- n[v].fixed === "left" && (A += parseInt(n[v].width || "150"));
3123
- I.left = `${A}px`;
3120
+ if (p && c && (C.minWidth = `${c}px`, C.maxWidth = `${c}px`), e.fixed === "left") {
3121
+ let P = 0;
3122
+ for (let j = 0; j < t; j++)
3123
+ n[j].fixed === "left" && (P += parseInt(n[j].width || "150"));
3124
+ C.left = `${P}px`;
3124
3125
  } else if (e.fixed === "right") {
3125
- let A = 0;
3126
- for (let v = t + 1; v < n.length; v++)
3127
- n[v].fixed === "right" && (A += parseInt(n[v].width || "150"));
3128
- I.right = `${A}px`;
3126
+ let P = 0;
3127
+ for (let j = t + 1; j < n.length; j++)
3128
+ n[j].fixed === "right" && (P += parseInt(n[j].width || "150"));
3129
+ C.right = `${P}px`;
3129
3130
  }
3130
- return I;
3131
- }, C = Ke(
3131
+ return C;
3132
+ }, S = Me(
3132
3133
  "bu-group",
3133
3134
  oe.getThClasses({
3134
3135
  theme: l,
3135
3136
  fixed: e.fixed,
3136
3137
  sortable: e.filter,
3137
- isDragging: x,
3138
+ isDragging: p,
3138
3139
  draggable: s
3139
3140
  })
3140
- ), R = s && !e.fixed;
3141
- return /* @__PURE__ */ M.jsx(
3141
+ ), I = s && !e.fixed, m = e.filter && e.key, w = (D) => {
3142
+ m && (D.target.closest(".drag-handle-icon") || o(e));
3143
+ };
3144
+ return /* @__PURE__ */ z.jsx(
3142
3145
  "th",
3143
3146
  {
3144
- ref: S,
3145
- className: C,
3146
- style: D(),
3147
- ...f,
3148
- ...b,
3149
- onClick: () => o(e),
3150
- children: /* @__PURE__ */ M.jsxs(
3147
+ ref: y,
3148
+ className: S,
3149
+ style: R(),
3150
+ ...h,
3151
+ ...v,
3152
+ onClick: w,
3153
+ children: /* @__PURE__ */ z.jsxs(
3151
3154
  "div",
3152
3155
  {
3153
3156
  className: "bu-relative bu-flex bu-items-center bu-gap-2",
3154
3157
  style: { justifyContent: e.align || "center" },
3155
3158
  children: [
3156
- /* @__PURE__ */ M.jsxs("div", { className: "bu-flex bu-items-center", children: [
3159
+ /* @__PURE__ */ z.jsxs("div", { className: "bu-flex bu-items-center", children: [
3157
3160
  e.renderHeader ? e.renderHeader([]) : e.title,
3158
3161
  i(e),
3159
3162
  e.renderEndIcon ? e.renderEndIcon() : null
3160
3163
  ] }),
3161
- R && /* @__PURE__ */ M.jsx(
3164
+ I && /* @__PURE__ */ z.jsx(
3162
3165
  "span",
3163
3166
  {
3164
- className: Ke(
3167
+ "data-drag-handle": !0,
3168
+ className: `${Me(
3165
3169
  oe.dragHandle({
3166
3170
  theme: l
3167
3171
  }),
3168
- "group-hover:bu-opacity-100",
3169
- "bu-ml-[4px] bu-flex bu-items-center"
3170
- ),
3171
- children: a !== null && (a || /* @__PURE__ */ M.jsx(Wo, {}))
3172
+ "group-hover:bu-opacity-100"
3173
+ )} drag-handle-icon`,
3174
+ style: {
3175
+ display: "flex",
3176
+ alignItems: "center",
3177
+ marginLeft: "4px"
3178
+ },
3179
+ children: a !== null && (a || /* @__PURE__ */ z.jsx(Xo, {}))
3172
3180
  }
3173
3181
  )
3174
3182
  ]
@@ -3185,22 +3193,22 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
3185
3193
  theadClass: i,
3186
3194
  draggable: s = !1,
3187
3195
  dragHandleIcon: a,
3188
- theme: l = "light"
3189
- } = e, d = (c) => {
3190
- c.filter && c.key && r(c.key, c.type);
3191
- }, u = (c) => {
3192
- if (!c.filter || !c.key)
3196
+ theme: l = "light",
3197
+ rowIdPrefix: u
3198
+ } = e, c = (f) => {
3199
+ f.filter && f.key && r(f.key, f.type);
3200
+ }, d = (f) => {
3201
+ if (!f.filter || !f.key)
3193
3202
  return null;
3194
- const h = n[c.key] || U.default, f = l === "dark" ? "#EBECF5" : "#0A0A0A", b = "#F80", g = h !== U.default;
3195
- return /* @__PURE__ */ M.jsx(
3203
+ const h = n[f.key] || ne.default, v = l === "dark" ? "rgba(235, 236, 245, 0.20)" : "rgba(10, 10, 10, 0.20)", g = l === "dark" ? "rgba(235, 236, 245, 0.60)" : "rgba(10, 10, 10, 0.60)", b = h !== ne.default;
3204
+ return /* @__PURE__ */ z.jsx(
3196
3205
  "span",
3197
3206
  {
3198
- className: Ke(
3207
+ className: Me(
3199
3208
  "bu-inline-flex bu-align-middle bu-transition-opacity bu-duration-200",
3200
- "bu-ml-[4px]",
3201
- g ? "bu-opacity-100" : "bu-opacity-0 group-hover:bu-opacity-100"
3209
+ "bu-ml-[4px]"
3202
3210
  ),
3203
- children: /* @__PURE__ */ M.jsxs(
3211
+ children: /* @__PURE__ */ z.jsxs(
3204
3212
  "svg",
3205
3213
  {
3206
3214
  xmlns: "http://www.w3.org/2000/svg",
@@ -3208,21 +3216,23 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
3208
3216
  height: "10",
3209
3217
  viewBox: "0 0 6 10",
3210
3218
  fill: "none",
3219
+ className: Me(
3220
+ "bu-transition-opacity bu-duration-200",
3221
+ b ? "bu-opacity-100" : "bu-opacity-0 group-hover:bu-opacity-100"
3222
+ ),
3211
3223
  children: [
3212
- /* @__PURE__ */ M.jsx(
3224
+ /* @__PURE__ */ z.jsx(
3213
3225
  "path",
3214
3226
  {
3215
3227
  d: "M5.4847 3.04301V4.10942H0.151367V3.04301L2.81803 0.376343L5.4847 3.04301Z",
3216
- fill: h === U.asc ? b : f,
3217
- fillOpacity: h === U.asc ? "1" : "0.2"
3228
+ fill: h === ne.asc ? g : v
3218
3229
  }
3219
3230
  ),
3220
- /* @__PURE__ */ M.jsx(
3231
+ /* @__PURE__ */ z.jsx(
3221
3232
  "path",
3222
3233
  {
3223
3234
  d: "M5.4847 5.89067V6.95707L2.81803 9.62374L0.151367 6.95707V5.89067H5.4847Z",
3224
- fill: h === U.desc ? b : f,
3225
- fillOpacity: h === U.desc ? "1" : "0.2"
3235
+ fill: h === ne.desc ? g : v
3226
3236
  }
3227
3237
  )
3228
3238
  ]
@@ -3231,66 +3241,67 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
3231
3241
  }
3232
3242
  );
3233
3243
  };
3234
- return /* @__PURE__ */ M.jsx("thead", { className: Ke(oe.thead({ theme: l }), i), children: /* @__PURE__ */ M.jsx("tr", { children: t.map((c, h) => /* @__PURE__ */ M.jsx(
3244
+ return /* @__PURE__ */ z.jsx("thead", { className: Me(oe.thead({ theme: l }), i), children: /* @__PURE__ */ z.jsx("tr", { id: u ? `${u}-thead` : "", children: t.map((f, h) => /* @__PURE__ */ z.jsx(
3235
3245
  Yo,
3236
3246
  {
3237
- column: c,
3247
+ column: f,
3238
3248
  index: h,
3239
3249
  columns: t,
3240
- sortState: c.key ? n[c.key] : void 0,
3241
- onSort: d,
3242
- renderSortIcon: u,
3243
- isDragging: c.key === o,
3250
+ sortState: f.key ? n[f.key] : void 0,
3251
+ onSort: c,
3252
+ renderSortIcon: d,
3253
+ isDragging: f.key === o,
3244
3254
  draggable: s,
3245
3255
  dragHandleIcon: a,
3246
3256
  theme: l
3247
3257
  },
3248
- c.key || h
3258
+ f.key || h
3249
3259
  )) }) });
3250
3260
  }, Uo = (e) => {
3251
- const { columns: t, data: n, rowKey: r, tdClass: o, tbodyClass: i, theme: s = "light" } = e, a = (u, c) => {
3252
- const h = {
3253
- textAlign: oe.getTextAlign(u.align)
3261
+ const { columns: t, data: n, rowKey: r, tdClass: o, tbodyClass: i, theme: s = "light" } = e, a = (c, d) => {
3262
+ const f = {
3263
+ textAlign: oe.getTextAlign(c.align)
3254
3264
  };
3255
- if (u.fixed === "left") {
3256
- let f = 0;
3257
- for (let b = 0; b < c; b++)
3258
- t[b].fixed === "left" && (f += parseInt(t[b].width || "150"));
3259
- h.left = `${f}px`;
3260
- } else if (u.fixed === "right") {
3261
- let f = 0;
3262
- for (let b = c + 1; b < t.length; b++)
3263
- t[b].fixed === "right" && (f += parseInt(t[b].width || "150"));
3264
- h.right = `${f}px`;
3265
+ if (c.fixed === "left") {
3266
+ let h = 0;
3267
+ for (let v = 0; v < d; v++)
3268
+ t[v].fixed === "left" && (h += parseInt(t[v].width || "150"));
3269
+ f.left = `${h}px`;
3270
+ } else if (c.fixed === "right") {
3271
+ let h = 0;
3272
+ for (let v = d + 1; v < t.length; v++)
3273
+ t[v].fixed === "right" && (h += parseInt(t[v].width || "150"));
3274
+ f.right = `${h}px`;
3265
3275
  }
3266
- return h;
3267
- }, l = (u, c, h) => u.render ? u.render(c, h) : u.key ? c[u.key] : null, d = (u, c, h) => {
3268
- if (u.onCell)
3269
- return u.onCell(c, h);
3276
+ return f;
3277
+ }, l = (c, d, f) => c.render ? c.render(d, f) : c.key ? d[c.key] : null, u = (c, d, f) => {
3278
+ if (c.onCell)
3279
+ return c.onCell(d, f);
3270
3280
  };
3271
- return /* @__PURE__ */ M.jsx("tbody", { className: Ke(oe.tbody({ theme: s }), i), children: n.map((u, c) => /* @__PURE__ */ M.jsx(
3281
+ return /* @__PURE__ */ z.jsx("tbody", { className: Me(oe.tbody({ theme: s }), i), children: n.map((c, d) => /* @__PURE__ */ z.jsx(
3272
3282
  "tr",
3273
3283
  {
3284
+ id: e.rowIdPrefix ? `${e.rowIdPrefix}-${d}` : "",
3274
3285
  className: oe.tr({ theme: s }),
3275
- children: t.map((h, f) => {
3276
- const b = d(h, u, c);
3277
- return b === 0 ? null : /* @__PURE__ */ M.jsx(
3286
+ children: t.map((f, h) => {
3287
+ const v = u(f, c, d);
3288
+ return v === 0 ? null : /* @__PURE__ */ z.jsx(
3278
3289
  "td",
3279
3290
  {
3280
3291
  className: oe.getTdClasses({
3281
3292
  theme: s,
3282
- fixed: h.fixed,
3293
+ fixed: f.fixed,
3283
3294
  customClass: o
3284
3295
  }),
3285
- style: a(h, f),
3286
- colSpan: b,
3287
- children: l(h, u, c)
3296
+ style: a(f, h),
3297
+ colSpan: v,
3298
+ children: l(f, c, d)
3288
3299
  },
3289
- h.key || f
3300
+ f.key || h
3290
3301
  );
3291
3302
  })
3292
3303
  },
3293
- u[r] || c
3304
+ c[r] || d
3294
3305
  )) });
3295
3306
  }, Vo = (e) => {
3296
3307
  let {
@@ -3310,104 +3321,126 @@ const Wo = ({ className: e }) => /* @__PURE__ */ M.jsxs(
3310
3321
  tbodyClass: s,
3311
3322
  renderEmpty: a,
3312
3323
  onSortChange: l,
3313
- tableLayout: d = "auto",
3314
- draggable: u = !1,
3324
+ tableLayout: u = "auto",
3325
+ draggable: c = !1,
3315
3326
  // 默认不启用拖拽
3316
- onColumnsChange: c,
3317
- dragHandleIcon: h,
3318
- maxHeight: f
3319
- } = e, { theme: b } = Wn(), [g, p] = Se.useState(t), [m, x] = Se.useState({}), [S, D] = Se.useState(null), C = pr(
3327
+ onColumnsChange: d,
3328
+ dragHandleIcon: f,
3329
+ maxHeight: h,
3330
+ rowIdPrefix: v
3331
+ } = e, { theme: g } = Xn(), [b, x] = Ce.useState(t), [p, y] = Ce.useState({}), [R, S] = Ce.useState(null), I = pr(
3320
3332
  Kt(Lt, {
3321
3333
  activationConstraint: {
3322
3334
  distance: 8
3323
3335
  // 8px 移动后才激活拖拽
3324
3336
  }
3325
3337
  }),
3326
- Kt(Nt)
3338
+ Kt(Ot)
3327
3339
  );
3328
- Se.useEffect(() => {
3329
- p(t);
3340
+ Ce.useEffect(() => {
3341
+ x(t);
3330
3342
  }, [t]);
3331
- const R = (v, H) => {
3332
- const j = m[v] || U.default;
3333
- let L;
3334
- j === U.default ? L = U.desc : j === U.desc ? L = U.asc : L = U.default;
3335
- const ne = H || "single";
3336
- let Y;
3337
- if (ne === "single" ? Y = { [v]: L } : (Y = { ...m, [v]: L }, L === U.default && delete Y[v]), x(Y), l)
3338
- if (ne === "single")
3339
- l({ sortKey: v, sort: L });
3343
+ const m = (T, G) => {
3344
+ const U = p[T] || ne.default;
3345
+ let k;
3346
+ U === ne.default ? k = ne.desc : U === ne.desc ? k = ne.asc : k = ne.default;
3347
+ const se = G || "single";
3348
+ let B;
3349
+ if (se === "single" ? B = { [T]: k } : (B = { ...p, [T]: k }, k === ne.default && delete B[T]), y(B), l)
3350
+ if (se === "single")
3351
+ l({ sortKey: T, sort: k });
3340
3352
  else {
3341
- const B = Object.entries(Y).map(([se, re]) => ({
3342
- sortKey: se,
3343
- sort: re
3353
+ const ae = Object.entries(B).map(([le, X]) => ({
3354
+ sortKey: le,
3355
+ sort: X
3344
3356
  }));
3345
- l(B);
3357
+ l(ae);
3346
3358
  }
3347
- }, y = (v) => {
3348
- D(v.active.id);
3349
- }, w = (v) => {
3350
- const { active: H, over: j } = v;
3351
- D(null), !(!j || H.id === j.id) && p((L) => {
3352
- const ne = L.findIndex((se) => se.key === H.id), Y = L.findIndex((se) => se.key === j.id);
3353
- if (ne === -1 || Y === -1 || L[Y].fixed)
3354
- return L;
3355
- const B = zt(L, ne, Y);
3356
- return c && c(B), B;
3359
+ }, w = (T) => {
3360
+ S(T.active.id);
3361
+ }, D = (T) => {
3362
+ const { active: G, over: U } = T;
3363
+ S(null), !(!U || G.id === U.id) && x((k) => {
3364
+ const se = k.findIndex((le) => le.key === G.id), B = k.findIndex((le) => le.key === U.id);
3365
+ if (se === -1 || B === -1 || k[B].fixed)
3366
+ return k;
3367
+ const ae = zt(k, se, B);
3368
+ return d && d(ae), ae;
3357
3369
  });
3358
- }, I = g.filter((v) => !v.fixed && v.key).map((v) => v.key), A = () => /* @__PURE__ */ M.jsx(
3370
+ }, N = b.filter((T) => !T.fixed && T.key).map((T) => T.key), P = (() => {
3371
+ const T = b.reduce((G, U) => {
3372
+ if (U.width) {
3373
+ const k = parseInt(U.width);
3374
+ return G + (isNaN(k) ? 150 : k);
3375
+ }
3376
+ return G + 150;
3377
+ }, 0);
3378
+ return T > 0 ? `${T}px` : void 0;
3379
+ })(), j = () => /* @__PURE__ */ z.jsx(
3359
3380
  "div",
3360
3381
  {
3361
- className: oe.container({ theme: b }),
3362
- style: f ? { maxHeight: f, overflow: "auto" } : void 0,
3363
- children: n.length > 0 ? /* @__PURE__ */ M.jsxs("table", { className: oe.table(), style: { tableLayout: d }, children: [
3364
- /* @__PURE__ */ M.jsx(
3365
- Ko,
3366
- {
3367
- columns: g,
3368
- sortStates: m,
3369
- onSort: R,
3370
- activeId: u ? S : null,
3371
- theadClass: o,
3372
- draggable: u,
3373
- dragHandleIcon: h,
3374
- theme: b
3375
- }
3376
- ),
3377
- /* @__PURE__ */ M.jsx(
3378
- Uo,
3379
- {
3380
- columns: g,
3381
- data: n,
3382
- rowKey: r,
3383
- tdClass: i,
3384
- tbodyClass: s,
3385
- theme: b
3386
- }
3387
- )
3388
- ] }) : /* @__PURE__ */ M.jsx("div", { className: oe.empty({ theme: b }), children: a || "No Data" })
3382
+ className: oe.container({ theme: g }),
3383
+ style: h ? { maxHeight: h, overflowX: "auto", overflowY: "auto" } : { overflowX: "auto" },
3384
+ children: n.length > 0 ? /* @__PURE__ */ z.jsxs(
3385
+ "table",
3386
+ {
3387
+ className: oe.table(),
3388
+ style: {
3389
+ tableLayout: u,
3390
+ minWidth: u === "fixed" ? P : void 0
3391
+ },
3392
+ children: [
3393
+ /* @__PURE__ */ z.jsx(
3394
+ Ko,
3395
+ {
3396
+ columns: b,
3397
+ sortStates: p,
3398
+ onSort: m,
3399
+ activeId: c ? R : null,
3400
+ theadClass: o,
3401
+ draggable: c,
3402
+ dragHandleIcon: f,
3403
+ theme: g,
3404
+ rowIdPrefix: v
3405
+ }
3406
+ ),
3407
+ /* @__PURE__ */ z.jsx(
3408
+ Uo,
3409
+ {
3410
+ columns: b,
3411
+ data: n,
3412
+ rowKey: r,
3413
+ tdClass: i,
3414
+ tbodyClass: s,
3415
+ theme: g,
3416
+ rowIdPrefix: v
3417
+ }
3418
+ )
3419
+ ]
3420
+ }
3421
+ ) : /* @__PURE__ */ z.jsx("div", { className: oe.empty({ theme: g }), children: a || "No Data" })
3389
3422
  }
3390
3423
  );
3391
- return u ? /* @__PURE__ */ M.jsx(
3424
+ return c ? /* @__PURE__ */ z.jsx(
3392
3425
  So,
3393
3426
  {
3394
- sensors: C,
3427
+ sensors: I,
3395
3428
  collisionDetection: Sr,
3396
- onDragStart: y,
3397
- onDragEnd: w,
3429
+ onDragStart: w,
3430
+ onDragEnd: D,
3398
3431
  modifiers: [Vo],
3399
- children: /* @__PURE__ */ M.jsx(
3432
+ children: /* @__PURE__ */ z.jsx(
3400
3433
  zo,
3401
3434
  {
3402
- items: I,
3435
+ items: N,
3403
3436
  strategy: Mo,
3404
- children: A()
3437
+ children: j()
3405
3438
  }
3406
3439
  )
3407
3440
  }
3408
- ) : A();
3441
+ ) : j();
3409
3442
  };
3410
3443
  export {
3411
3444
  ei as P,
3412
- U as S
3445
+ ne as S
3413
3446
  };