@commercetools/nimbus 0.0.0-canary-20251023151517 → 0.0.0-canary-20251023154609

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,168 +1,168 @@
1
- import { jsx as w, jsxs as Ye, Fragment as it } from "react/jsx-runtime";
2
- import A, { useState as X, useEffect as R, useRef as K, version as at, useCallback as J, useImperativeHandle as lt, useMemo as Se, forwardRef as Ze, useContext as W, createContext as dt, createElement as st } from "react";
3
- import { defineMessages as ct, useIntl as Je } from "react-intl";
4
- import { $ as pt } from "./Button-CafJrK0a.es.js";
5
- import { b as Dt, a as We, c as gt } from "./RSPContexts-DV4cFLUV.es.js";
6
- import { f as mt, h as he, k as ft } from "./SelectionManager-Dn0USbbI.es.js";
7
- import { a as Ke, d as Qe, f as be, $ as _e } from "./utils-DF3YB901.es.js";
8
- import { $ as me, b as Bt, a as bt, c as xt, d as sn } from "./DragAndDrop-CMsguxa3.es.js";
9
- import { a as ke } from "./ListBox-C4BToxCj.es.js";
10
- import { a as Et, $ as Ct } from "./SelectionIndicator-B27AsfqE.es.js";
11
- import { $ as $t } from "./Text-DOcU1ycg.es.js";
12
- import { $ as yt, e as vt, f as ht, g as kt, h as mn } from "./CollectionBuilder-D6lZ-33j.es.js";
13
- import { c as _, b as eu, $ as uu, a as Pe } from "./mergeProps-_eTFpDiB.es.js";
14
- import { $ as tu } from "./filterDOMProps-BSVCO5jK.es.js";
15
- import { $ as ru } from "./useObjectRef-CaJ5pgjX.es.js";
16
- import { $ as En } from "./inertValue-B7loUihk.es.js";
17
- import { b as At, a as Tt, $ as Ft } from "./useGridListItem-Cr6HZ3kJ.es.js";
18
- import { $ as St } from "./useGridSelectionCheckbox-Cb6QZ_p2.es.js";
19
- import { $ as Kt } from "./useHover-CKzcGypZ.es.js";
20
- import { $ as nu } from "./useFocusRing-BOzVUoTi.es.js";
21
- import { b as Pt } from "./FocusScope-CZUuDxle.es.js";
22
- import { a as Ie } from "./VisuallyHidden-D6n3An4K.es.js";
23
- import { $ as It, a as zt } from "./useListState-DXCqV37_.es.js";
24
- import { $ as wt } from "./useCollator-BjnMaGJd.es.js";
25
- import { $ as ou } from "./context-DW7UvQ8z.es.js";
26
- import { $ as Re } from "./ListKeyboardDelegate-D7v3HUvw.es.js";
27
- import { f as Ot, b as Vt, e as iu, d as au, c as ne } from "./useFocusVisible-BLRuz6I4.es.js";
28
- import { $ as oe } from "./LiveAnnouncer-CsPyaceH.es.js";
29
- import { d as jt } from "./Dialog-Cx5MzP6O.es.js";
30
- import { $ as Lt } from "./getScrollParent-DWQTVYMz.es.js";
31
- import { b as ze, $ as Rt } from "./scrollIntoView-CaRCBiMb.es.js";
32
- import { b as Mt, c as Nt, a as Ht, f as Ut } from "./platform-Z5fvtFmM.es.js";
33
- import { $ as fe } from "./useLocalizedStringFormatter-DaRRUvyV.es.js";
34
- import { $ as Gt } from "./useGlobalListeners-BOOfV5Wh.es.js";
35
- import { flushSync as qt } from "react-dom";
36
- import { useSlotRecipe as Xt } from "@chakra-ui/react/styled-system";
37
- import { e as lu } from "./extract-style-props-CTU5PJnh.es.js";
38
- import { createSlotRecipeContext as Yt } from "@chakra-ui/react";
39
- import { DragIndicator as Zt, Close as Jt } from "@commercetools/nimbus-icons";
40
- import { C as Wt } from "./checkbox-B-1U4AKF.es.js";
41
- import { I as Me } from "./icon-button-CNauu_zf.es.js";
1
+ import { jsx as w, jsxs as We, Fragment as dt } from "react/jsx-runtime";
2
+ import A, { useState as X, useEffect as L, useRef as S, version as st, useCallback as J, useImperativeHandle as ct, useMemo as Ke, forwardRef as Qe, useContext as W, createContext as pt, createElement as Dt } from "react";
3
+ import { defineMessages as gt, useIntl as _e } from "react-intl";
4
+ import { $ as mt } from "./Button-CafJrK0a.es.js";
5
+ import { b as ft, a as eu, c as Bt } from "./RSPContexts-DV4cFLUV.es.js";
6
+ import { f as xt, h as ke, k as bt } from "./SelectionManager-Dn0USbbI.es.js";
7
+ import { a as Pe, d as uu, f as be, $ as tu } from "./utils-DF3YB901.es.js";
8
+ import { $ as fe, b as Et, a as Ct, c as $t, d as gn } from "./DragAndDrop-CMsguxa3.es.js";
9
+ import { a as Ae } from "./ListBox-C4BToxCj.es.js";
10
+ import { a as yt, $ as vt } from "./SelectionIndicator-B27AsfqE.es.js";
11
+ import { $ as ht } from "./Text-DOcU1ycg.es.js";
12
+ import { $ as kt, e as At, f as Tt, g as Ft, h as bn } from "./CollectionBuilder-D6lZ-33j.es.js";
13
+ import { c as ee, b as ru, $ as nu, a as Ie } from "./mergeProps-_eTFpDiB.es.js";
14
+ import { $ as ou } from "./filterDOMProps-BSVCO5jK.es.js";
15
+ import { $ as iu } from "./useObjectRef-CaJ5pgjX.es.js";
16
+ import { $ as vn } from "./inertValue-B7loUihk.es.js";
17
+ import { b as St, a as Kt, $ as Pt } from "./useGridListItem-Cr6HZ3kJ.es.js";
18
+ import { $ as It } from "./useGridSelectionCheckbox-Cb6QZ_p2.es.js";
19
+ import { $ as zt } from "./useHover-CKzcGypZ.es.js";
20
+ import { $ as au } from "./useFocusRing-BOzVUoTi.es.js";
21
+ import { b as wt } from "./FocusScope-CZUuDxle.es.js";
22
+ import { a as ze } from "./VisuallyHidden-D6n3An4K.es.js";
23
+ import { $ as Ot, a as Vt } from "./useListState-DXCqV37_.es.js";
24
+ import { $ as jt } from "./useCollator-BjnMaGJd.es.js";
25
+ import { $ as lu } from "./context-DW7UvQ8z.es.js";
26
+ import { $ as Me } from "./ListKeyboardDelegate-D7v3HUvw.es.js";
27
+ import { f as Lt, b as Rt, e as du, d as su, c as oe } from "./useFocusVisible-BLRuz6I4.es.js";
28
+ import { $ as ie } from "./LiveAnnouncer-CsPyaceH.es.js";
29
+ import { d as Mt } from "./Dialog-Cx5MzP6O.es.js";
30
+ import { $ as Nt } from "./getScrollParent-DWQTVYMz.es.js";
31
+ import { b as we, $ as Ht } from "./scrollIntoView-CaRCBiMb.es.js";
32
+ import { b as Ut, c as qt, a as Gt, f as Xt } from "./platform-Z5fvtFmM.es.js";
33
+ import { $ as Be } from "./useLocalizedStringFormatter-DaRRUvyV.es.js";
34
+ import { $ as Yt } from "./useGlobalListeners-BOOfV5Wh.es.js";
35
+ import { flushSync as Zt } from "react-dom";
36
+ import { useSlotRecipe as Jt } from "@chakra-ui/react/styled-system";
37
+ import { e as cu } from "./extract-style-props-CTU5PJnh.es.js";
38
+ import { createSlotRecipeContext as Wt } from "@chakra-ui/react";
39
+ import { DragIndicator as Qt, Close as _t } from "@commercetools/nimbus-icons";
40
+ import { C as er } from "./checkbox-B-1U4AKF.es.js";
41
+ import { I as Ne } from "./icon-button-CNauu_zf.es.js";
42
42
  import { F as Y } from "./form-field-CH7MhZMM.es.js";
43
43
  var I = /* @__PURE__ */ (function(e) {
44
44
  return e[e.none = 0] = "none", e[e.cancel = 0] = "cancel", e[e.move = 1] = "move", e[e.copy = 2] = "copy", e[e.link = 4] = "link", e[e.all = 7] = "all", e;
45
45
  })({});
46
- const du = {
46
+ const pu = {
47
47
  ...I,
48
48
  copyMove: 3,
49
49
  copyLink: 6,
50
50
  linkMove: 5,
51
51
  all: 7,
52
52
  uninitialized: 7
53
- }, su = /* @__PURE__ */ cu(du);
54
- su[7] = "all";
55
- const ue = {
53
+ }, Du = /* @__PURE__ */ gu(pu);
54
+ Du[7] = "all";
55
+ const te = {
56
56
  none: "cancel",
57
57
  link: "link",
58
58
  copy: "copy",
59
59
  move: "move"
60
- }, xe = /* @__PURE__ */ cu(ue);
61
- function cu(e) {
60
+ }, Ee = /* @__PURE__ */ gu(te);
61
+ function gu(e) {
62
62
  let u = {};
63
63
  for (let r in e) u[e[r]] = r;
64
64
  return u;
65
65
  }
66
- const Qt = /* @__PURE__ */ new Set([
66
+ const ur = /* @__PURE__ */ new Set([
67
67
  "text/plain",
68
68
  "text/uri-list",
69
69
  "text/html"
70
- ]), ce = "application/vnd.react-aria.items+json", pe = "application/octet-stream", we = /* @__PURE__ */ new WeakMap(), pu = /* @__PURE__ */ Symbol();
71
- function _t(e) {
72
- let { id: u } = we.get(e) || {};
70
+ ]), pe = "application/vnd.react-aria.items+json", De = "application/octet-stream", Oe = /* @__PURE__ */ new WeakMap(), mu = /* @__PURE__ */ Symbol();
71
+ function tr(e) {
72
+ let { id: u } = Oe.get(e) || {};
73
73
  if (!u) throw new Error("Droppable item outside a droppable collection");
74
74
  return u;
75
75
  }
76
- function er(e) {
77
- let { ref: u } = we.get(e) || {};
76
+ function rr(e) {
77
+ let { ref: u } = Oe.get(e) || {};
78
78
  if (!u) throw new Error("Droppable item outside a droppable collection");
79
79
  return u;
80
80
  }
81
- function q(e) {
81
+ function G(e) {
82
82
  let u = /* @__PURE__ */ new Set();
83
83
  for (let r of e) for (let t of Object.keys(r)) u.add(t);
84
84
  return u;
85
85
  }
86
- function Du(e) {
86
+ function fu(e) {
87
87
  return e || (e = "virtual"), e === "pointer" && (e = "virtual"), e === "virtual" && typeof window < "u" && "ontouchstart" in window && (e = "touch"), e;
88
88
  }
89
- function Oe() {
90
- return Du(Ot());
89
+ function Ve() {
90
+ return fu(Lt());
91
91
  }
92
- function gu() {
93
- return Du(Vt());
92
+ function Bu() {
93
+ return fu(Rt());
94
94
  }
95
- function ur(e, u) {
96
- let r = /* @__PURE__ */ new Map(), t = !1, o = [];
97
- for (let n of u) {
98
- let a = Object.keys(n);
95
+ function nr(e, u) {
96
+ let r = /* @__PURE__ */ new Map(), t = !1, n = [];
97
+ for (let o of u) {
98
+ let a = Object.keys(o);
99
99
  a.length > 1 && (t = !0);
100
100
  let l = {};
101
101
  for (let m of a) {
102
- let p = r.get(m);
103
- p ? t = !0 : (p = [], r.set(m, p));
104
- let g = n[m];
105
- l[m] = g, p.push(g);
102
+ let g = r.get(m);
103
+ g ? t = !0 : (g = [], r.set(m, g));
104
+ let c = o[m];
105
+ l[m] = c, g.push(c);
106
106
  }
107
- o.push(l);
107
+ n.push(l);
108
108
  }
109
- for (let [n, a] of r) if (Qt.has(n)) {
109
+ for (let [o, a] of r) if (ur.has(o)) {
110
110
  let l = a.join(`
111
111
  `);
112
- e.items.add(l, n);
112
+ e.items.add(l, o);
113
113
  } else
114
- e.items.add(a[0], n);
114
+ e.items.add(a[0], o);
115
115
  if (t) {
116
- let n = JSON.stringify(o);
117
- e.items.add(n, ce);
116
+ let o = JSON.stringify(n);
117
+ e.items.add(o, pe);
118
118
  }
119
119
  }
120
- class ie {
120
+ class ae {
121
121
  has(u) {
122
- return this.includesUnknownTypes || u === pu && this.types.has(pe) ? !0 : typeof u == "string" && this.types.has(u);
122
+ return this.includesUnknownTypes || u === mu && this.types.has(De) ? !0 : typeof u == "string" && this.types.has(u);
123
123
  }
124
124
  constructor(u) {
125
125
  this.types = /* @__PURE__ */ new Set();
126
126
  let r = !1;
127
- for (let t of u.items) t.type !== ce && (t.kind === "file" && (r = !0), t.type ? this.types.add(t.type) : this.types.add(pe));
127
+ for (let t of u.items) t.type !== pe && (t.kind === "file" && (r = !0), t.type ? this.types.add(t.type) : this.types.add(De));
128
128
  this.includesUnknownTypes = !r && u.types.includes("Files");
129
129
  }
130
130
  }
131
- function tr(e) {
131
+ function or(e) {
132
132
  let u = [];
133
133
  if (!e) return u;
134
134
  let r = !1;
135
- if (e.types.includes(ce)) try {
136
- let t = e.getData(ce), o = JSON.parse(t);
137
- for (let n of o) u.push({
135
+ if (e.types.includes(pe)) try {
136
+ let t = e.getData(pe), n = JSON.parse(t);
137
+ for (let o of n) u.push({
138
138
  kind: "text",
139
- types: new Set(Object.keys(n)),
140
- getText: (a) => Promise.resolve(n[a])
139
+ types: new Set(Object.keys(o)),
140
+ getText: (a) => Promise.resolve(o[a])
141
141
  });
142
142
  r = !0;
143
143
  } catch {
144
144
  }
145
145
  if (!r) {
146
146
  let t = /* @__PURE__ */ new Map();
147
- for (let o of e.items)
148
- if (o.kind === "string")
149
- t.set(o.type || pe, e.getData(o.type));
150
- else if (o.kind === "file")
151
- if (typeof o.webkitGetAsEntry == "function") {
152
- let n = o.webkitGetAsEntry();
153
- if (!n) continue;
154
- n.isFile ? u.push(Ae(o.getAsFile())) : n.isDirectory && u.push(mu(n));
147
+ for (let n of e.items)
148
+ if (n.kind === "string")
149
+ t.set(n.type || De, e.getData(n.type));
150
+ else if (n.kind === "file")
151
+ if (typeof n.webkitGetAsEntry == "function") {
152
+ let o = n.webkitGetAsEntry();
153
+ if (!o) continue;
154
+ o.isFile ? u.push(Te(n.getAsFile())) : o.isDirectory && u.push(xu(o));
155
155
  } else
156
- u.push(Ae(o.getAsFile()));
156
+ u.push(Te(n.getAsFile()));
157
157
  t.size > 0 && u.push({
158
158
  kind: "text",
159
159
  types: new Set(t.keys()),
160
- getText: (o) => Promise.resolve(t.get(o))
160
+ getText: (n) => Promise.resolve(t.get(n))
161
161
  });
162
162
  }
163
163
  return u;
164
164
  }
165
- function rr(e) {
165
+ function ir(e) {
166
166
  return typeof e.text == "function" ? e.text() : new Promise((u, r) => {
167
167
  let t = new FileReader();
168
168
  t.onload = () => {
@@ -170,109 +170,109 @@ function rr(e) {
170
170
  }, t.onerror = r, t.readAsText(e);
171
171
  });
172
172
  }
173
- function Ae(e) {
173
+ function Te(e) {
174
174
  if (!e) throw new Error("No file provided");
175
175
  return {
176
176
  kind: "file",
177
- type: e.type || pe,
177
+ type: e.type || De,
178
178
  name: e.name,
179
- getText: () => rr(e),
179
+ getText: () => ir(e),
180
180
  getFile: () => Promise.resolve(e)
181
181
  };
182
182
  }
183
- function mu(e) {
183
+ function xu(e) {
184
184
  return {
185
185
  kind: "directory",
186
186
  name: e.name,
187
- getEntries: () => nr(e)
187
+ getEntries: () => ar(e)
188
188
  };
189
189
  }
190
- async function* nr(e) {
190
+ async function* ar(e) {
191
191
  let u = e.createReader(), r;
192
192
  do {
193
- r = await new Promise((t, o) => {
194
- u.readEntries(t, o);
193
+ r = await new Promise((t, n) => {
194
+ u.readEntries(t, n);
195
195
  });
196
196
  for (let t of r)
197
197
  if (t.isFile) {
198
- let o = await or(t);
199
- yield Ae(o);
200
- } else t.isDirectory && (yield mu(t));
198
+ let n = await lr(t);
199
+ yield Te(n);
200
+ } else t.isDirectory && (yield xu(t));
201
201
  } while (r.length > 0);
202
202
  }
203
- function or(e) {
203
+ function lr(e) {
204
204
  return new Promise((u, r) => e.file(u, r));
205
205
  }
206
- function Ne(e) {
206
+ function He(e) {
207
207
  return e.kind === "text";
208
208
  }
209
209
  let z = {
210
210
  draggingKeys: /* @__PURE__ */ new Set()
211
211
  };
212
- function ir(e) {
212
+ function dr(e) {
213
213
  z.draggingCollectionRef = e;
214
214
  }
215
- function ar(e) {
215
+ function sr(e) {
216
216
  z.draggingKeys = e;
217
217
  }
218
218
  function Z(e) {
219
219
  z.dropCollectionRef = e;
220
220
  }
221
- function fu() {
221
+ function bu() {
222
222
  z = {
223
223
  draggingKeys: /* @__PURE__ */ new Set()
224
224
  };
225
225
  }
226
- function lr(e) {
226
+ function cr(e) {
227
227
  z = e;
228
228
  }
229
229
  function H(e) {
230
230
  let { draggingCollectionRef: u, dropCollectionRef: r } = z;
231
231
  return u?.current != null && u.current === (e?.current || r?.current);
232
232
  }
233
- let se;
234
- function De(e) {
235
- se = e;
233
+ let ce;
234
+ function ge(e) {
235
+ ce = e;
236
236
  }
237
- let Te = I.none;
238
- function Ee(e) {
239
- Te = e;
237
+ let Fe = I.none;
238
+ function Ce(e) {
239
+ Fe = e;
240
240
  }
241
- let Fe = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map(), j = null, ge = /* @__PURE__ */ new Set();
242
- function Bu(e) {
243
- return Fe.set(e.element, e), j?.updateValidDropTargets(), () => {
244
- Fe.delete(e.element), j?.updateValidDropTargets();
241
+ let Se = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), j = null, me = /* @__PURE__ */ new Set();
242
+ function Eu(e) {
243
+ return Se.set(e.element, e), j?.updateValidDropTargets(), () => {
244
+ Se.delete(e.element), j?.updateValidDropTargets();
245
245
  };
246
246
  }
247
- function dr(e) {
248
- return te.set(e.element, e), () => {
249
- te.delete(e.element);
247
+ function pr(e) {
248
+ return re.set(e.element, e), () => {
249
+ re.delete(e.element);
250
250
  };
251
251
  }
252
- function sr(e, u) {
252
+ function Dr(e, u) {
253
253
  if (j) throw new Error("Cannot begin dragging while already dragging");
254
- j = new mr(e, u), requestAnimationFrame(() => {
255
- j && (j.setup(), gu() === "keyboard" && j.next());
254
+ j = new xr(e, u), requestAnimationFrame(() => {
255
+ j && (j.setup(), Bu() === "keyboard" && j.next());
256
256
  });
257
- for (let r of ge) r();
257
+ for (let r of me) r();
258
258
  }
259
- function Ve() {
259
+ function je() {
260
260
  let [e, u] = X(j);
261
- return R(() => {
261
+ return L(() => {
262
262
  let r = () => u(j);
263
- return ge.add(r), () => {
264
- ge.delete(r);
263
+ return me.add(r), () => {
264
+ me.delete(r);
265
265
  };
266
266
  }, []), e;
267
267
  }
268
- function cr() {
268
+ function gr() {
269
269
  return !!j;
270
270
  }
271
- function pr() {
271
+ function mr() {
272
272
  j = null;
273
- for (let e of ge) e();
273
+ for (let e of me) e();
274
274
  }
275
- const He = [
275
+ const Ue = [
276
276
  "pointerdown",
277
277
  "pointermove",
278
278
  "pointerenter",
@@ -292,25 +292,25 @@ const He = [
292
292
  "touchend",
293
293
  "focusin",
294
294
  "focusout"
295
- ], Dr = [
295
+ ], fr = [
296
296
  "pointerup",
297
297
  "mouseup",
298
298
  "touchend"
299
- ], gr = {
299
+ ], Br = {
300
300
  keyboard: "dragStartedKeyboard",
301
301
  touch: "dragStartedTouch",
302
302
  virtual: "dragStartedVirtual"
303
303
  };
304
- class mr {
304
+ class xr {
305
305
  setup() {
306
306
  document.addEventListener("keydown", this.onKeyDown, !0), document.addEventListener("keyup", this.onKeyUp, !0), window.addEventListener("focus", this.onFocus, !0), window.addEventListener("blur", this.onBlur, !0), document.addEventListener("click", this.onClick, !0), document.addEventListener("pointerdown", this.onPointerDown, !0);
307
- for (let u of He) document.addEventListener(u, this.cancelEvent, !0);
308
- this.mutationObserver = new MutationObserver(() => this.updateValidDropTargets()), this.updateValidDropTargets(), oe(this.stringFormatter.format(gr[gu()]));
307
+ for (let u of Ue) document.addEventListener(u, this.cancelEvent, !0);
308
+ this.mutationObserver = new MutationObserver(() => this.updateValidDropTargets()), this.updateValidDropTargets(), ie(this.stringFormatter.format(Br[Bu()]));
309
309
  }
310
310
  teardown() {
311
311
  var u, r, t;
312
312
  document.removeEventListener("keydown", this.onKeyDown, !0), document.removeEventListener("keyup", this.onKeyUp, !0), window.removeEventListener("focus", this.onFocus, !0), window.removeEventListener("blur", this.onBlur, !0), document.removeEventListener("click", this.onClick, !0), document.removeEventListener("pointerdown", this.onPointerDown, !0);
313
- for (let o of He) document.removeEventListener(o, this.cancelEvent, !0);
313
+ for (let n of Ue) document.removeEventListener(n, this.cancelEvent, !0);
314
314
  (u = this.mutationObserver) === null || u === void 0 || u.disconnect(), (r = (t = this).restoreAriaHidden) === null || r === void 0 || r.call(t);
315
315
  }
316
316
  onKeyDown(u) {
@@ -328,8 +328,8 @@ class mr {
328
328
  }
329
329
  }
330
330
  getCurrentActivateButton() {
331
- var u, r, t, o, n, a;
332
- return (a = (n = (r = this.currentDropItem) === null || r === void 0 || (u = r.activateButtonRef) === null || u === void 0 ? void 0 : u.current) !== null && n !== void 0 ? n : (o = this.currentDropTarget) === null || o === void 0 || (t = o.activateButtonRef) === null || t === void 0 ? void 0 : t.current) !== null && a !== void 0 ? a : null;
331
+ var u, r, t, n, o, a;
332
+ return (a = (o = (r = this.currentDropItem) === null || r === void 0 || (u = r.activateButtonRef) === null || u === void 0 ? void 0 : u.current) !== null && o !== void 0 ? o : (n = this.currentDropTarget) === null || n === void 0 || (t = n.activateButtonRef) === null || t === void 0 ? void 0 : t.current) !== null && a !== void 0 ? a : null;
333
333
  }
334
334
  onFocus(u) {
335
335
  let r = this.getCurrentActivateButton();
@@ -338,13 +338,13 @@ class mr {
338
338
  return;
339
339
  }
340
340
  if (u.target !== this.dragTarget.element && this.cancelEvent(u), !(u.target instanceof HTMLElement) || u.target === this.dragTarget.element) return;
341
- let t = this.validDropTargets.find((n) => n.element === u.target) || this.validDropTargets.find((n) => n.element.contains(u.target));
341
+ let t = this.validDropTargets.find((o) => o.element === u.target) || this.validDropTargets.find((o) => o.element.contains(u.target));
342
342
  if (!t) {
343
343
  this.currentDropTarget ? this.currentDropTarget.element.focus() : this.dragTarget.element.focus();
344
344
  return;
345
345
  }
346
- let o = te.get(u.target);
347
- t && this.setCurrentDropTarget(t, o);
346
+ let n = re.get(u.target);
347
+ t && this.setCurrentDropTarget(t, n);
348
348
  }
349
349
  onBlur(u) {
350
350
  let r = this.getCurrentActivateButton();
@@ -355,16 +355,16 @@ class mr {
355
355
  u.target !== this.dragTarget.element && this.cancelEvent(u), (!u.relatedTarget || !(u.relatedTarget instanceof HTMLElement)) && (this.currentDropTarget ? this.currentDropTarget.element.focus() : this.dragTarget.element.focus());
356
356
  }
357
357
  onClick(u) {
358
- if (this.cancelEvent(u), iu(u) || this.isVirtualClick) {
358
+ if (this.cancelEvent(u), du(u) || this.isVirtualClick) {
359
359
  var r, t;
360
360
  let a = [
361
- ...te.values()
362
- ].find((p) => {
363
- var g, B;
364
- return p.element === u.target || ((B = p.activateButtonRef) === null || B === void 0 || (g = B.current) === null || g === void 0 ? void 0 : g.contains(u.target));
365
- }), l = this.validDropTargets.find((p) => p.element.contains(u.target));
366
- var o;
367
- let m = (o = a == null || (r = a.activateButtonRef) === null || r === void 0 ? void 0 : r.current) !== null && o !== void 0 ? o : l == null || (t = l.activateButtonRef) === null || t === void 0 ? void 0 : t.current;
361
+ ...re.values()
362
+ ].find((g) => {
363
+ var c, B;
364
+ return g.element === u.target || ((B = g.activateButtonRef) === null || B === void 0 || (c = B.current) === null || c === void 0 ? void 0 : c.contains(u.target));
365
+ }), l = this.validDropTargets.find((g) => g.element.contains(u.target));
366
+ var n;
367
+ let m = (n = a == null || (r = a.activateButtonRef) === null || r === void 0 ? void 0 : r.current) !== null && n !== void 0 ? n : l == null || (t = l.activateButtonRef) === null || t === void 0 ? void 0 : t.current;
368
368
  if (m?.contains(u.target) && l) {
369
369
  this.activate(l, a);
370
370
  return;
@@ -377,43 +377,43 @@ class mr {
377
377
  }
378
378
  }
379
379
  onPointerDown(u) {
380
- this.cancelEvent(u), this.isVirtualClick = au(u);
380
+ this.cancelEvent(u), this.isVirtualClick = su(u);
381
381
  }
382
382
  cancelEvent(u) {
383
383
  var r;
384
- (u.type === "focusin" || u.type === "focusout") && (u.target === ((r = this.dragTarget) === null || r === void 0 ? void 0 : r.element) || u.target === this.getCurrentActivateButton()) || (Dr.includes(u.type) || u.preventDefault(), u.stopPropagation(), u.stopImmediatePropagation());
384
+ (u.type === "focusin" || u.type === "focusout") && (u.target === ((r = this.dragTarget) === null || r === void 0 ? void 0 : r.element) || u.target === this.getCurrentActivateButton()) || (fr.includes(u.type) || u.preventDefault(), u.stopPropagation(), u.stopImmediatePropagation());
385
385
  }
386
386
  updateValidDropTargets() {
387
387
  if (!this.mutationObserver) return;
388
- if (this.mutationObserver.disconnect(), this.restoreAriaHidden && this.restoreAriaHidden(), this.validDropTargets = fr(this.dragTarget), this.validDropTargets.length > 0) {
389
- let o = this.findNearestDropTarget();
388
+ if (this.mutationObserver.disconnect(), this.restoreAriaHidden && this.restoreAriaHidden(), this.validDropTargets = br(this.dragTarget), this.validDropTargets.length > 0) {
389
+ let n = this.findNearestDropTarget();
390
390
  this.validDropTargets = [
391
- ...this.validDropTargets.slice(o),
392
- ...this.validDropTargets.slice(0, o)
391
+ ...this.validDropTargets.slice(n),
392
+ ...this.validDropTargets.slice(0, n)
393
393
  ];
394
394
  }
395
395
  this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget) && this.setCurrentDropTarget(this.validDropTargets[0]);
396
- let u = q(this.dragTarget.items), r = [
397
- ...te.values()
398
- ].filter((o) => typeof o.getDropOperation == "function" ? o.getDropOperation(u, this.dragTarget.allowedDropOperations) !== "cancel" : !0), t = this.validDropTargets.filter((o) => !r.some((n) => o.element.contains(n.element)));
399
- this.restoreAriaHidden = jt([
396
+ let u = G(this.dragTarget.items), r = [
397
+ ...re.values()
398
+ ].filter((n) => typeof n.getDropOperation == "function" ? n.getDropOperation(u, this.dragTarget.allowedDropOperations) !== "cancel" : !0), t = this.validDropTargets.filter((n) => !r.some((o) => n.element.contains(o.element)));
399
+ this.restoreAriaHidden = Mt([
400
400
  this.dragTarget.element,
401
- ...r.flatMap((o) => {
402
- var n, a;
403
- return !((n = o.activateButtonRef) === null || n === void 0) && n.current ? [
404
- o.element,
405
- (a = o.activateButtonRef) === null || a === void 0 ? void 0 : a.current
401
+ ...r.flatMap((n) => {
402
+ var o, a;
403
+ return !((o = n.activateButtonRef) === null || o === void 0) && o.current ? [
404
+ n.element,
405
+ (a = n.activateButtonRef) === null || a === void 0 ? void 0 : a.current
406
406
  ] : [
407
- o.element
407
+ n.element
408
408
  ];
409
409
  }),
410
- ...t.flatMap((o) => {
411
- var n, a;
412
- return !((n = o.activateButtonRef) === null || n === void 0) && n.current ? [
413
- o.element,
414
- (a = o.activateButtonRef) === null || a === void 0 ? void 0 : a.current
410
+ ...t.flatMap((n) => {
411
+ var o, a;
412
+ return !((o = n.activateButtonRef) === null || o === void 0) && o.current ? [
413
+ n.element,
414
+ (a = n.activateButtonRef) === null || a === void 0 ? void 0 : a.current
415
415
  ] : [
416
- o.element
416
+ n.element
417
417
  ];
418
418
  })
419
419
  ], {
@@ -453,9 +453,9 @@ class mr {
453
453
  }
454
454
  findNearestDropTarget() {
455
455
  let u = this.dragTarget.element.getBoundingClientRect(), r = 1 / 0, t = -1;
456
- for (let o = 0; o < this.validDropTargets.length; o++) {
457
- let a = this.validDropTargets[o].element.getBoundingClientRect(), l = a.left - u.left, m = a.top - u.top, p = l * l + m * m;
458
- p < r && (r = p, t = o);
456
+ for (let n = 0; n < this.validDropTargets.length; n++) {
457
+ let a = this.validDropTargets[n].element.getBoundingClientRect(), l = a.left - u.left, m = a.top - u.top, g = l * l + m * m;
458
+ g < r && (r = g, t = n);
459
459
  }
460
460
  return t;
461
461
  }
@@ -483,12 +483,12 @@ class mr {
483
483
  }
484
484
  if (r != null && r !== this.currentDropItem && (this.currentDropTarget && typeof this.currentDropTarget.onDropTargetEnter == "function" && this.currentDropTarget.onDropTargetEnter(r.target), r.element.focus(), this.currentDropItem = r, !this.initialFocused)) {
485
485
  let t = r?.element.getAttribute("aria-label");
486
- t && oe(t, "polite"), this.initialFocused = !0;
486
+ t && ie(t, "polite"), this.initialFocused = !0;
487
487
  }
488
488
  }
489
489
  end() {
490
490
  var u;
491
- if (this.teardown(), pr(), typeof this.dragTarget.onDragEnd == "function") {
491
+ if (this.teardown(), mr(), typeof this.dragTarget.onDragEnd == "function") {
492
492
  let t = (this.currentDropTarget && this.dropOperation !== "cancel" ? this.currentDropTarget : this.dragTarget).element.getBoundingClientRect();
493
493
  this.dragTarget.onDragEnd({
494
494
  type: "dragend",
@@ -502,7 +502,7 @@ class mr {
502
502
  }))), this.setCurrentDropTarget(null);
503
503
  }
504
504
  cancel() {
505
- this.setCurrentDropTarget(null), this.end(), this.dragTarget.element.closest('[aria-hidden="true"], [inert]') || this.dragTarget.element.focus(), oe(this.stringFormatter.format("dropCanceled"));
505
+ this.setCurrentDropTarget(null), this.end(), this.dragTarget.element.closest('[aria-hidden="true"], [inert]') || this.dragTarget.element.focus(), ie(this.stringFormatter.format("dropCanceled"));
506
506
  }
507
507
  drop(u) {
508
508
  if (!this.currentDropTarget) {
@@ -510,53 +510,53 @@ class mr {
510
510
  return;
511
511
  }
512
512
  if (typeof u?.getDropOperation == "function") {
513
- let t = q(this.dragTarget.items);
513
+ let t = G(this.dragTarget.items);
514
514
  this.dropOperation = u.getDropOperation(t, this.dragTarget.allowedDropOperations);
515
515
  } else if (typeof this.currentDropTarget.getDropOperation == "function") {
516
- let t = q(this.dragTarget.items);
516
+ let t = G(this.dragTarget.items);
517
517
  this.dropOperation = this.currentDropTarget.getDropOperation(t, this.dragTarget.allowedDropOperations);
518
518
  } else
519
519
  this.dropOperation = this.dragTarget.allowedDropOperations[0];
520
520
  if (typeof this.currentDropTarget.onDrop == "function") {
521
- let t = this.dragTarget.items.map((n) => ({
521
+ let t = this.dragTarget.items.map((o) => ({
522
522
  kind: "text",
523
- types: new Set(Object.keys(n)),
524
- getText: (a) => Promise.resolve(n[a])
525
- })), o = this.currentDropTarget.element.getBoundingClientRect();
523
+ types: new Set(Object.keys(o)),
524
+ getText: (a) => Promise.resolve(o[a])
525
+ })), n = this.currentDropTarget.element.getBoundingClientRect();
526
526
  var r;
527
527
  this.currentDropTarget.onDrop({
528
528
  type: "drop",
529
- x: o.left + o.width / 2,
530
- y: o.top + o.height / 2,
529
+ x: n.left + n.width / 2,
530
+ y: n.top + n.height / 2,
531
531
  items: t,
532
532
  dropOperation: this.dropOperation
533
533
  }, (r = u?.target) !== null && r !== void 0 ? r : null);
534
534
  }
535
- this.end(), oe(this.stringFormatter.format("dropComplete"));
535
+ this.end(), ie(this.stringFormatter.format("dropComplete"));
536
536
  }
537
537
  activate(u, r) {
538
538
  if (u && typeof u.onDropActivate == "function") {
539
539
  var t;
540
- let o = (t = r?.target) !== null && t !== void 0 ? t : null, n = u.element.getBoundingClientRect();
540
+ let n = (t = r?.target) !== null && t !== void 0 ? t : null, o = u.element.getBoundingClientRect();
541
541
  u.onDropActivate({
542
542
  type: "dropactivate",
543
- x: n.left + n.width / 2,
544
- y: n.top + n.height / 2
545
- }, o);
543
+ x: o.left + o.width / 2,
544
+ y: o.top + o.height / 2
545
+ }, n);
546
546
  }
547
547
  }
548
548
  constructor(u, r) {
549
549
  this.validDropTargets = [], this.currentDropTarget = null, this.currentDropItem = null, this.dropOperation = null, this.mutationObserver = null, this.restoreAriaHidden = null, this.isVirtualClick = !1, this.dragTarget = u, this.stringFormatter = r, this.onKeyDown = this.onKeyDown.bind(this), this.onKeyUp = this.onKeyUp.bind(this), this.onFocus = this.onFocus.bind(this), this.onBlur = this.onBlur.bind(this), this.onClick = this.onClick.bind(this), this.onPointerDown = this.onPointerDown.bind(this), this.cancelEvent = this.cancelEvent.bind(this), this.initialFocused = !1;
550
550
  }
551
551
  }
552
- function fr(e) {
553
- let u = q(e.items);
552
+ function br(e) {
553
+ let u = G(e.items);
554
554
  return [
555
- ...Fe.values()
555
+ ...Se.values()
556
556
  ].filter((r) => r.element.closest('[aria-hidden="true"], [inert]') ? !1 : typeof r.getDropOperation == "function" ? r.getDropOperation(u, e.allowedDropOperations) !== "cancel" : !0);
557
557
  }
558
- var bu = {};
559
- bu = {
558
+ var Cu = {};
559
+ Cu = {
560
560
  dragDescriptionKeyboard: "اضغط Enter لبدء السحب.",
561
561
  dragDescriptionKeyboardAlt: "اضغط على Alt + Enter لبدء السحب.",
562
562
  dragDescriptionLongPress: "اضغط باستمرار لبدء السحب.",
@@ -597,8 +597,8 @@ bu = {
597
597
  insertBefore: (e) => `أدخل قبل ${e.itemText}`,
598
598
  insertBetween: (e) => `أدخل بين ${e.beforeItemText} و ${e.afterItemText}`
599
599
  };
600
- var xu = {};
601
- xu = {
600
+ var $u = {};
601
+ $u = {
602
602
  dragDescriptionKeyboard: "Натиснете „Enter“, за да започнете да плъзгате.",
603
603
  dragDescriptionKeyboardAlt: "Натиснете Alt + Enter, за да започнете да плъзгате.",
604
604
  dragDescriptionLongPress: "Натиснете продължително, за да започнете да плъзгате.",
@@ -639,8 +639,8 @@ xu = {
639
639
  insertBefore: (e) => `Вмъкни преди ${e.itemText}`,
640
640
  insertBetween: (e) => `Вмъкни между ${e.beforeItemText} и ${e.afterItemText}`
641
641
  };
642
- var Eu = {};
643
- Eu = {
642
+ var yu = {};
643
+ yu = {
644
644
  dragDescriptionKeyboard: "Stisknutím klávesy Enter začnete s přetahováním.",
645
645
  dragDescriptionKeyboardAlt: "Stisknutím Alt + Enter zahájíte přetahování.",
646
646
  dragDescriptionLongPress: "Dlouhým stisknutím zahájíte přetahování.",
@@ -682,8 +682,8 @@ Eu = {
682
682
  insertBefore: (e) => `Vložit před ${e.itemText}`,
683
683
  insertBetween: (e) => `Vložit mezi ${e.beforeItemText} a ${e.afterItemText}`
684
684
  };
685
- var Cu = {};
686
- Cu = {
685
+ var vu = {};
686
+ vu = {
687
687
  dragDescriptionKeyboard: "Tryk på Enter for at starte med at trække.",
688
688
  dragDescriptionKeyboardAlt: "Tryk på Alt + Enter for at starte med at trække.",
689
689
  dragDescriptionLongPress: "Tryk længe for at starte med at trække.",
@@ -724,8 +724,8 @@ Cu = {
724
724
  insertBefore: (e) => `Indsæt før ${e.itemText}`,
725
725
  insertBetween: (e) => `Indsæt mellem ${e.beforeItemText} og ${e.afterItemText}`
726
726
  };
727
- var $u = {};
728
- $u = {
727
+ var hu = {};
728
+ hu = {
729
729
  dragDescriptionKeyboard: "Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.",
730
730
  dragDescriptionKeyboardAlt: "Alt + Eingabe drücken, um den Ziehvorgang zu starten.",
731
731
  dragDescriptionLongPress: "Lang drücken, um mit dem Ziehen zu beginnen.",
@@ -766,8 +766,8 @@ $u = {
766
766
  insertBefore: (e) => `Vor ${e.itemText} einfügen`,
767
767
  insertBetween: (e) => `Zwischen ${e.beforeItemText} und ${e.afterItemText} einfügen`
768
768
  };
769
- var yu = {};
770
- yu = {
769
+ var ku = {};
770
+ ku = {
771
771
  dragDescriptionKeyboard: "Πατήστε Enter για έναρξη της μεταφοράς.",
772
772
  dragDescriptionKeyboardAlt: "Πατήστε Alt + Enter για έναρξη της μεταφοράς.",
773
773
  dragDescriptionLongPress: "Πατήστε παρατεταμένα για να ξεκινήσετε τη μεταφορά.",
@@ -808,8 +808,8 @@ yu = {
808
808
  insertBefore: (e) => `Εισαγωγή πριν από ${e.itemText}`,
809
809
  insertBetween: (e) => `Εισαγωγή μεταξύ ${e.beforeItemText} και ${e.afterItemText}`
810
810
  };
811
- var vu = {};
812
- vu = {
811
+ var Au = {};
812
+ Au = {
813
813
  dragItem: (e) => `Drag ${e.itemText}`,
814
814
  dragSelectedItems: (e, u) => `Drag ${u.plural(e.count, {
815
815
  one: () => `${u.number(e.count)} selected item`,
@@ -850,8 +850,8 @@ vu = {
850
850
  insertBetween: (e) => `Insert between ${e.beforeItemText} and ${e.afterItemText}`,
851
851
  insertAfter: (e) => `Insert after ${e.itemText}`
852
852
  };
853
- var hu = {};
854
- hu = {
853
+ var Tu = {};
854
+ Tu = {
855
855
  dragDescriptionKeyboard: "Pulse Intro para empezar a arrastrar.",
856
856
  dragDescriptionKeyboardAlt: "Pulse Intro para empezar a arrastrar.",
857
857
  dragDescriptionLongPress: "Mantenga pulsado para comenzar a arrastrar.",
@@ -892,8 +892,8 @@ hu = {
892
892
  insertBefore: (e) => `Insertar antes de ${e.itemText}`,
893
893
  insertBetween: (e) => `Insertar entre ${e.beforeItemText} y ${e.afterItemText}`
894
894
  };
895
- var ku = {};
896
- ku = {
895
+ var Fu = {};
896
+ Fu = {
897
897
  dragDescriptionKeyboard: "Lohistamise alustamiseks vajutage klahvi Enter.",
898
898
  dragDescriptionKeyboardAlt: "Lohistamise alustamiseks vajutage klahvikombinatsiooni Alt + Enter.",
899
899
  dragDescriptionLongPress: "Vajutage pikalt lohistamise alustamiseks.",
@@ -934,8 +934,8 @@ ku = {
934
934
  insertBefore: (e) => `Sisesta ${e.itemText} ette`,
935
935
  insertBetween: (e) => `Sisesta ${e.beforeItemText} ja ${e.afterItemText} vahele`
936
936
  };
937
- var Au = {};
938
- Au = {
937
+ var Su = {};
938
+ Su = {
939
939
  dragDescriptionKeyboard: "Aloita vetäminen painamalla Enter-näppäintä.",
940
940
  dragDescriptionKeyboardAlt: "Aloita vetäminen painamalla Alt + Enter -näppäinyhdistelmää.",
941
941
  dragDescriptionLongPress: "Aloita vetäminen pitämällä painettuna.",
@@ -976,8 +976,8 @@ Au = {
976
976
  insertBefore: (e) => `Lisää ennen kohdetta ${e.itemText}`,
977
977
  insertBetween: (e) => `Lisää kohteiden ${e.beforeItemText} ja ${e.afterItemText} väliin`
978
978
  };
979
- var Tu = {};
980
- Tu = {
979
+ var Ku = {};
980
+ Ku = {
981
981
  dragDescriptionKeyboard: "Appuyez sur Entrée pour commencer le déplacement.",
982
982
  dragDescriptionKeyboardAlt: "Appuyez sur Alt + Entrée pour commencer à faire glisser.",
983
983
  dragDescriptionLongPress: "Appuyez de manière prolongée pour commencer à faire glisser.",
@@ -1018,8 +1018,8 @@ Tu = {
1018
1018
  insertBefore: (e) => `Insérer avant ${e.itemText}`,
1019
1019
  insertBetween: (e) => `Insérer entre ${e.beforeItemText} et ${e.afterItemText}`
1020
1020
  };
1021
- var Fu = {};
1022
- Fu = {
1021
+ var Pu = {};
1022
+ Pu = {
1023
1023
  dragDescriptionKeyboard: "הקש על Enter כדי להתחיל לגרור.",
1024
1024
  dragDescriptionKeyboardAlt: "הקש Alt + Enter כדי להתחיל לגרור.",
1025
1025
  dragDescriptionLongPress: "לחץ לחיצה ארוכה כדי להתחיל לגרור.",
@@ -1060,8 +1060,8 @@ Fu = {
1060
1060
  insertBefore: (e) => `הוסף לפני ${e.itemText}`,
1061
1061
  insertBetween: (e) => `הוסף בין ${e.beforeItemText} לבין ${e.afterItemText}`
1062
1062
  };
1063
- var Su = {};
1064
- Su = {
1063
+ var Iu = {};
1064
+ Iu = {
1065
1065
  dragDescriptionKeyboard: "Pritisnite Enter da biste počeli povlačiti.",
1066
1066
  dragDescriptionKeyboardAlt: "Pritisnite Alt + Enter za početak povlačenja.",
1067
1067
  dragDescriptionLongPress: "Dugo pritisnite za početak povlačenja.",
@@ -1102,8 +1102,8 @@ Su = {
1102
1102
  insertBefore: (e) => `Ispustite ispred stavke ${e.itemText}`,
1103
1103
  insertBetween: (e) => `Umetnite između stavki ${e.beforeItemText} i ${e.afterItemText}`
1104
1104
  };
1105
- var Ku = {};
1106
- Ku = {
1105
+ var zu = {};
1106
+ zu = {
1107
1107
  dragDescriptionKeyboard: "Nyomja le az Enter billentyűt a húzás megkezdéséhez.",
1108
1108
  dragDescriptionKeyboardAlt: "Nyomja le az Alt + Enter billentyűket a húzás megkezdéséhez.",
1109
1109
  dragDescriptionLongPress: "Hosszan nyomja meg a húzás elindításához.",
@@ -1144,8 +1144,8 @@ Ku = {
1144
1144
  insertBefore: (e) => `Beszúrás ${e.itemText} elé`,
1145
1145
  insertBetween: (e) => `Beszúrás ${e.beforeItemText} és ${e.afterItemText} közé`
1146
1146
  };
1147
- var Pu = {};
1148
- Pu = {
1147
+ var wu = {};
1148
+ wu = {
1149
1149
  dragDescriptionKeyboard: "Premi Invio per iniziare a trascinare.",
1150
1150
  dragDescriptionKeyboardAlt: "Premi Alt + Invio per iniziare a trascinare.",
1151
1151
  dragDescriptionLongPress: "Premi a lungo per iniziare a trascinare.",
@@ -1186,8 +1186,8 @@ Pu = {
1186
1186
  insertBefore: (e) => `Inserisci prima di ${e.itemText}`,
1187
1187
  insertBetween: (e) => `Inserisci tra ${e.beforeItemText} e ${e.afterItemText}`
1188
1188
  };
1189
- var Iu = {};
1190
- Iu = {
1189
+ var Ou = {};
1190
+ Ou = {
1191
1191
  dragDescriptionKeyboard: "Enter キーを押してドラッグを開始してください。",
1192
1192
  dragDescriptionKeyboardAlt: "Alt+Enter キーを押してドラッグを開始します。",
1193
1193
  dragDescriptionLongPress: "長押ししてドラッグを開始します。",
@@ -1228,8 +1228,8 @@ Iu = {
1228
1228
  insertBefore: (e) => `${e.itemText} の前に挿入`,
1229
1229
  insertBetween: (e) => `${e.beforeItemText} と ${e.afterItemText} の間に挿入`
1230
1230
  };
1231
- var zu = {};
1232
- zu = {
1231
+ var Vu = {};
1232
+ Vu = {
1233
1233
  dragDescriptionKeyboard: "드래그를 시작하려면 Enter를 누르세요.",
1234
1234
  dragDescriptionKeyboardAlt: "드래그를 시작하려면 Alt + Enter를 누르십시오.",
1235
1235
  dragDescriptionLongPress: "드래그를 시작하려면 길게 누르십시오.",
@@ -1270,8 +1270,8 @@ zu = {
1270
1270
  insertBefore: (e) => `${e.itemText} 이전에 삽입`,
1271
1271
  insertBetween: (e) => `${e.beforeItemText} 및 ${e.afterItemText} 사이에 삽입`
1272
1272
  };
1273
- var wu = {};
1274
- wu = {
1273
+ var ju = {};
1274
+ ju = {
1275
1275
  dragDescriptionKeyboard: "Paspauskite „Enter“, kad pradėtumėte vilkti.",
1276
1276
  dragDescriptionKeyboardAlt: "Paspauskite „Alt + Enter“, kad pradėtumėte vilkti.",
1277
1277
  dragDescriptionLongPress: "Palaikykite nuspaudę, kad pradėtumėte vilkti.",
@@ -1312,8 +1312,8 @@ wu = {
1312
1312
  insertBefore: (e) => `Įterpti prieš ${e.itemText}`,
1313
1313
  insertBetween: (e) => `Įterpti tarp ${e.beforeItemText} ir ${e.afterItemText}`
1314
1314
  };
1315
- var Ou = {};
1316
- Ou = {
1315
+ var Lu = {};
1316
+ Lu = {
1317
1317
  dragDescriptionKeyboard: "Nospiediet Enter, lai sāktu vilkšanu.",
1318
1318
  dragDescriptionKeyboardAlt: "Nospiediet taustiņu kombināciju Alt+Enter, lai sāktu vilkšanu.",
1319
1319
  dragDescriptionLongPress: "Turiet nospiestu, lai sāktu vilkšanu.",
@@ -1354,8 +1354,8 @@ Ou = {
1354
1354
  insertBefore: (e) => `Ievietojiet pirms ${e.itemText}`,
1355
1355
  insertBetween: (e) => `Ievietojiet starp ${e.beforeItemText} un ${e.afterItemText}`
1356
1356
  };
1357
- var Vu = {};
1358
- Vu = {
1357
+ var Ru = {};
1358
+ Ru = {
1359
1359
  dragDescriptionKeyboard: "Trykk på Enter for å begynne å dra.",
1360
1360
  dragDescriptionKeyboardAlt: "Trykk på Alt + Enter for å begynne å dra.",
1361
1361
  dragDescriptionLongPress: "Trykk lenge for å begynne å dra.",
@@ -1396,8 +1396,8 @@ Vu = {
1396
1396
  insertBefore: (e) => `Sett inn før ${e.itemText}`,
1397
1397
  insertBetween: (e) => `Sett inn mellom ${e.beforeItemText} og ${e.afterItemText}`
1398
1398
  };
1399
- var ju = {};
1400
- ju = {
1399
+ var Mu = {};
1400
+ Mu = {
1401
1401
  dragDescriptionKeyboard: "Druk op Enter om te slepen.",
1402
1402
  dragDescriptionKeyboardAlt: "Druk op Alt + Enter om te slepen.",
1403
1403
  dragDescriptionLongPress: "Houd lang ingedrukt om te slepen.",
@@ -1438,8 +1438,8 @@ ju = {
1438
1438
  insertBefore: (e) => `Plaatsen vóór ${e.itemText}`,
1439
1439
  insertBetween: (e) => `Plaatsen tussen ${e.beforeItemText} en ${e.afterItemText}`
1440
1440
  };
1441
- var Lu = {};
1442
- Lu = {
1441
+ var Nu = {};
1442
+ Nu = {
1443
1443
  dragDescriptionKeyboard: "Naciśnij Enter, aby rozpocząć przeciąganie.",
1444
1444
  dragDescriptionKeyboardAlt: "Naciśnij Alt + Enter, aby rozpocząć przeciąganie.",
1445
1445
  dragDescriptionLongPress: "Naciśnij i przytrzymaj, aby rozpocząć przeciąganie.",
@@ -1480,8 +1480,8 @@ Lu = {
1480
1480
  insertBefore: (e) => `Umieść przed ${e.itemText}`,
1481
1481
  insertBetween: (e) => `Umieść między ${e.beforeItemText} i ${e.afterItemText}`
1482
1482
  };
1483
- var Ru = {};
1484
- Ru = {
1483
+ var Hu = {};
1484
+ Hu = {
1485
1485
  dragDescriptionKeyboard: "Pressione Enter para começar a arrastar.",
1486
1486
  dragDescriptionKeyboardAlt: "Pressione Alt + Enter para começar a arrastar.",
1487
1487
  dragDescriptionLongPress: "Pressione e segure para começar a arrastar.",
@@ -1522,8 +1522,8 @@ Ru = {
1522
1522
  insertBefore: (e) => `Inserir antes de ${e.itemText}`,
1523
1523
  insertBetween: (e) => `Inserir entre ${e.beforeItemText} e ${e.afterItemText}`
1524
1524
  };
1525
- var Mu = {};
1526
- Mu = {
1525
+ var Uu = {};
1526
+ Uu = {
1527
1527
  dragDescriptionKeyboard: "Prima Enter para iniciar o arrasto.",
1528
1528
  dragDescriptionKeyboardAlt: "Prima Alt + Enter para iniciar o arrasto.",
1529
1529
  dragDescriptionLongPress: "Prima longamente para começar a arrastar.",
@@ -1564,8 +1564,8 @@ Mu = {
1564
1564
  insertBefore: (e) => `Inserir antes de ${e.itemText}`,
1565
1565
  insertBetween: (e) => `Inserir entre ${e.beforeItemText} e ${e.afterItemText}`
1566
1566
  };
1567
- var Nu = {};
1568
- Nu = {
1567
+ var qu = {};
1568
+ qu = {
1569
1569
  dragDescriptionKeyboard: "Apăsați pe Enter pentru a începe glisarea.",
1570
1570
  dragDescriptionKeyboardAlt: "Apăsați pe Alt + Enter pentru a începe glisarea.",
1571
1571
  dragDescriptionLongPress: "Apăsați lung pentru a începe glisarea.",
@@ -1606,8 +1606,8 @@ Nu = {
1606
1606
  insertBefore: (e) => `Inserați înainte de ${e.itemText}`,
1607
1607
  insertBetween: (e) => `Inserați între ${e.beforeItemText} și ${e.afterItemText}`
1608
1608
  };
1609
- var Hu = {};
1610
- Hu = {
1609
+ var Gu = {};
1610
+ Gu = {
1611
1611
  dragDescriptionKeyboard: "Нажмите клавишу Enter для начала перетаскивания.",
1612
1612
  dragDescriptionKeyboardAlt: "Нажмите Alt + Enter, чтобы начать перетаскивать.",
1613
1613
  dragDescriptionLongPress: "Нажмите и удерживайте, чтобы начать перетаскивать.",
@@ -1648,8 +1648,8 @@ Hu = {
1648
1648
  insertBefore: (e) => `Вставить перед ${e.itemText}`,
1649
1649
  insertBetween: (e) => `Вставить между ${e.beforeItemText} и ${e.afterItemText}`
1650
1650
  };
1651
- var Uu = {};
1652
- Uu = {
1651
+ var Xu = {};
1652
+ Xu = {
1653
1653
  dragDescriptionKeyboard: "Stlačením klávesu Enter začnete presúvanie.",
1654
1654
  dragDescriptionKeyboardAlt: "Stlačením klávesov Alt + Enter začnete presúvanie.",
1655
1655
  dragDescriptionLongPress: "Dlhým stlačením začnete presúvanie.",
@@ -1690,8 +1690,8 @@ Uu = {
1690
1690
  insertBefore: (e) => `Vložiť pred položku ${e.itemText}`,
1691
1691
  insertBetween: (e) => `Vložiť medzi položky ${e.beforeItemText} a ${e.afterItemText}`
1692
1692
  };
1693
- var Gu = {};
1694
- Gu = {
1693
+ var Yu = {};
1694
+ Yu = {
1695
1695
  dragDescriptionKeyboard: "Pritisnite tipko Enter za začetek vlečenja.",
1696
1696
  dragDescriptionKeyboardAlt: "Pritisnite tipki Alt + Enter za začetek vlečenja.",
1697
1697
  dragDescriptionLongPress: "Pritisnite in zadržite za začetek vlečenja.",
@@ -1732,8 +1732,8 @@ Gu = {
1732
1732
  insertBefore: (e) => `Vstavi pred ${e.itemText}`,
1733
1733
  insertBetween: (e) => `Vstavi med ${e.beforeItemText} in ${e.afterItemText}`
1734
1734
  };
1735
- var qu = {};
1736
- qu = {
1735
+ var Zu = {};
1736
+ Zu = {
1737
1737
  dragDescriptionKeyboard: "Pritisnite Enter da biste započeli prevlačenje.",
1738
1738
  dragDescriptionKeyboardAlt: "Pritisnite Alt + Enter da biste započeli prevlačenje.",
1739
1739
  dragDescriptionLongPress: "Pritisnite dugo da biste započeli prevlačenje.",
@@ -1774,8 +1774,8 @@ qu = {
1774
1774
  insertBefore: (e) => `Umetnite ispred ${e.itemText}`,
1775
1775
  insertBetween: (e) => `Umetnite između ${e.beforeItemText} i ${e.afterItemText}`
1776
1776
  };
1777
- var Xu = {};
1778
- Xu = {
1777
+ var Ju = {};
1778
+ Ju = {
1779
1779
  dragDescriptionKeyboard: "Tryck på enter för att börja dra.",
1780
1780
  dragDescriptionKeyboardAlt: "Tryck på Alt + Retur för att börja dra.",
1781
1781
  dragDescriptionLongPress: "Tryck länge för att börja dra.",
@@ -1816,8 +1816,8 @@ Xu = {
1816
1816
  insertBefore: (e) => `Infoga före ${e.itemText}`,
1817
1817
  insertBetween: (e) => `Infoga mellan ${e.beforeItemText} och ${e.afterItemText}`
1818
1818
  };
1819
- var Yu = {};
1820
- Yu = {
1819
+ var Wu = {};
1820
+ Wu = {
1821
1821
  dragDescriptionKeyboard: "Sürüklemeyi başlatmak için Enter'a basın.",
1822
1822
  dragDescriptionKeyboardAlt: "Sürüklemeyi başlatmak için Alt + Enter'a basın.",
1823
1823
  dragDescriptionLongPress: "Sürüklemeye başlamak için uzun basın.",
@@ -1858,8 +1858,8 @@ Yu = {
1858
1858
  insertBefore: (e) => `${e.itemText}’den önce gir`,
1859
1859
  insertBetween: (e) => `${e.beforeItemText} ve ${e.afterItemText} arasına gir`
1860
1860
  };
1861
- var Zu = {};
1862
- Zu = {
1861
+ var Qu = {};
1862
+ Qu = {
1863
1863
  dragDescriptionKeyboard: "Натисніть Enter, щоб почати перетягування.",
1864
1864
  dragDescriptionKeyboardAlt: "Натисніть Alt + Enter, щоб почати перетягування.",
1865
1865
  dragDescriptionLongPress: "Натисніть і утримуйте, щоб почати перетягування.",
@@ -1900,8 +1900,8 @@ Zu = {
1900
1900
  insertBefore: (e) => `Вставити перед ${e.itemText}`,
1901
1901
  insertBetween: (e) => `Вставити між ${e.beforeItemText} і ${e.afterItemText}`
1902
1902
  };
1903
- var Ju = {};
1904
- Ju = {
1903
+ var _u = {};
1904
+ _u = {
1905
1905
  dragDescriptionKeyboard: "按 Enter 开始拖动。",
1906
1906
  dragDescriptionKeyboardAlt: "按 Alt + Enter 开始拖动。",
1907
1907
  dragDescriptionLongPress: "长按以开始拖动。",
@@ -1942,8 +1942,8 @@ Ju = {
1942
1942
  insertBefore: (e) => `插入到 ${e.itemText} 之前`,
1943
1943
  insertBetween: (e) => `插入到 ${e.beforeItemText} 和 ${e.afterItemText} 之间`
1944
1944
  };
1945
- var Wu = {};
1946
- Wu = {
1945
+ var et = {};
1946
+ et = {
1947
1947
  dragDescriptionKeyboard: "按 Enter 鍵以開始拖曳。",
1948
1948
  dragDescriptionKeyboardAlt: "按 Alt+Enter 鍵以開始拖曳。",
1949
1949
  dragDescriptionLongPress: "長按以開始拖曳。",
@@ -1984,47 +1984,47 @@ Wu = {
1984
1984
  insertBefore: (e) => `插入至「${e.itemText}」之前`,
1985
1985
  insertBetween: (e) => `插入至「${e.beforeItemText}」和「${e.afterItemText}」之間`
1986
1986
  };
1987
- var re = {};
1988
- re = {
1989
- "ar-AE": bu,
1990
- "bg-BG": xu,
1991
- "cs-CZ": Eu,
1992
- "da-DK": Cu,
1993
- "de-DE": $u,
1994
- "el-GR": yu,
1995
- "en-US": vu,
1996
- "es-ES": hu,
1997
- "et-EE": ku,
1998
- "fi-FI": Au,
1999
- "fr-FR": Tu,
2000
- "he-IL": Fu,
2001
- "hr-HR": Su,
2002
- "hu-HU": Ku,
2003
- "it-IT": Pu,
2004
- "ja-JP": Iu,
2005
- "ko-KR": zu,
2006
- "lt-LT": wu,
2007
- "lv-LV": Ou,
2008
- "nb-NO": Vu,
2009
- "nl-NL": ju,
2010
- "pl-PL": Lu,
2011
- "pt-BR": Ru,
2012
- "pt-PT": Mu,
2013
- "ro-RO": Nu,
2014
- "ru-RU": Hu,
2015
- "sk-SK": Uu,
2016
- "sl-SI": Gu,
2017
- "sr-SP": qu,
2018
- "sv-SE": Xu,
2019
- "tr-TR": Yu,
2020
- "uk-UA": Zu,
2021
- "zh-CN": Ju,
2022
- "zh-TW": Wu
1987
+ var ne = {};
1988
+ ne = {
1989
+ "ar-AE": Cu,
1990
+ "bg-BG": $u,
1991
+ "cs-CZ": yu,
1992
+ "da-DK": vu,
1993
+ "de-DE": hu,
1994
+ "el-GR": ku,
1995
+ "en-US": Au,
1996
+ "es-ES": Tu,
1997
+ "et-EE": Fu,
1998
+ "fi-FI": Su,
1999
+ "fr-FR": Ku,
2000
+ "he-IL": Pu,
2001
+ "hr-HR": Iu,
2002
+ "hu-HU": zu,
2003
+ "it-IT": wu,
2004
+ "ja-JP": Ou,
2005
+ "ko-KR": Vu,
2006
+ "lt-LT": ju,
2007
+ "lv-LV": Lu,
2008
+ "nb-NO": Ru,
2009
+ "nl-NL": Mu,
2010
+ "pl-PL": Nu,
2011
+ "pt-BR": Hu,
2012
+ "pt-PT": Uu,
2013
+ "ro-RO": qu,
2014
+ "ru-RU": Gu,
2015
+ "sk-SK": Xu,
2016
+ "sl-SI": Yu,
2017
+ "sr-SP": Zu,
2018
+ "sv-SE": Ju,
2019
+ "tr-TR": Wu,
2020
+ "uk-UA": Qu,
2021
+ "zh-CN": _u,
2022
+ "zh-TW": et
2023
2023
  };
2024
- function Br(e) {
2024
+ function Er(e) {
2025
2025
  return e && e.__esModule ? e.default : e;
2026
2026
  }
2027
- const Ue = {
2027
+ const qe = {
2028
2028
  keyboard: {
2029
2029
  start: "dragDescriptionKeyboard",
2030
2030
  end: "endDragKeyboard"
@@ -2038,130 +2038,130 @@ const Ue = {
2038
2038
  end: "endDragVirtual"
2039
2039
  }
2040
2040
  };
2041
- function br(e) {
2042
- let { hasDragButton: u, isDisabled: r } = e, t = fe(Br(re), "@react-aria/dnd"), o = K({
2041
+ function Cr(e) {
2042
+ let { hasDragButton: u, isDisabled: r } = e, t = Be(Er(ne), "@react-aria/dnd"), n = S({
2043
2043
  options: e,
2044
2044
  x: 0,
2045
2045
  y: 0
2046
2046
  }).current;
2047
- o.options = e;
2048
- let n = K(null), [a, l] = X(!1), m = (c) => {
2049
- n.current = c, l(!!c);
2050
- }, { addGlobalListener: p, removeAllGlobalListeners: g } = Gt(), B = K(null), D = (c) => {
2051
- var E, y, h;
2052
- if (c.defaultPrevented) return;
2053
- if (c.stopPropagation(), B.current === "virtual") {
2054
- c.preventDefault(), s(c.target), B.current = null;
2047
+ n.options = e;
2048
+ let o = S(null), [a, l] = X(!1), m = (s) => {
2049
+ o.current = s, l(!!s);
2050
+ }, { addGlobalListener: g, removeAllGlobalListeners: c } = Yt(), B = S(null), p = (s) => {
2051
+ var b, $, h;
2052
+ if (s.defaultPrevented) return;
2053
+ if (s.stopPropagation(), B.current === "virtual") {
2054
+ s.preventDefault(), D(s.target), B.current = null;
2055
2055
  return;
2056
2056
  }
2057
2057
  typeof e.onDragStart == "function" && e.onDragStart({
2058
2058
  type: "dragstart",
2059
- x: c.clientX,
2060
- y: c.clientY
2059
+ x: s.clientX,
2060
+ y: s.clientY
2061
2061
  });
2062
2062
  let k = e.getItems();
2063
- (E = (y = c.dataTransfer).clearData) === null || E === void 0 || E.call(y), ur(c.dataTransfer, k);
2063
+ (b = ($ = s.dataTransfer).clearData) === null || b === void 0 || b.call($), nr(s.dataTransfer, k);
2064
2064
  let T = I.all;
2065
2065
  if (typeof e.getAllowedDropOperations == "function") {
2066
2066
  let v = e.getAllowedDropOperations();
2067
2067
  T = I.none;
2068
2068
  for (let F of v) T |= I[F] || I.none;
2069
2069
  }
2070
- Ee(T);
2071
- let S = su[T] || "none";
2072
- c.dataTransfer.effectAllowed = S === "cancel" ? "none" : S, typeof ((h = e.preview) === null || h === void 0 ? void 0 : h.current) == "function" && e.preview.current(k, (v, F, P) => {
2070
+ Ce(T);
2071
+ let K = Du[T] || "none";
2072
+ s.dataTransfer.effectAllowed = K === "cancel" ? "none" : K, typeof ((h = e.preview) === null || h === void 0 ? void 0 : h.current) == "function" && e.preview.current(k, (v, F, P) => {
2073
2073
  if (!v) return;
2074
- let V = v.getBoundingClientRect(), L = c.currentTarget.getBoundingClientRect(), M = c.clientX - L.x, U = c.clientY - L.y;
2074
+ let V = v.getBoundingClientRect(), R = s.currentTarget.getBoundingClientRect(), M = s.clientX - R.x, U = s.clientY - R.y;
2075
2075
  (M > V.width || U > V.height) && (M = V.width / 2, U = V.height / 2);
2076
- let N = M, G = U;
2077
- typeof F == "number" && typeof P == "number" && (N = F, G = P), N = Math.max(0, Math.min(N, V.width)), G = Math.max(0, Math.min(G, V.height));
2078
- let Be = 2 * Math.round(V.height / 2);
2079
- v.style.height = `${Be}px`, c.dataTransfer.setDragImage(v, N, G);
2080
- }), p(window, "drop", (v) => {
2076
+ let N = M, q = U;
2077
+ typeof F == "number" && typeof P == "number" && (N = F, q = P), N = Math.max(0, Math.min(N, V.width)), q = Math.max(0, Math.min(q, V.height));
2078
+ let xe = 2 * Math.round(V.height / 2);
2079
+ v.style.height = `${xe}px`, s.dataTransfer.setDragImage(v, N, q);
2080
+ }), g(window, "drop", (v) => {
2081
2081
  v.preventDefault(), v.stopPropagation(), console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.");
2082
2082
  }, {
2083
2083
  once: !0
2084
- }), o.x = c.clientX, o.y = c.clientY;
2085
- let O = c.target;
2084
+ }), n.x = s.clientX, n.y = s.clientY;
2085
+ let O = s.target;
2086
2086
  requestAnimationFrame(() => {
2087
2087
  m(O);
2088
2088
  });
2089
- }, C = (c) => {
2090
- c.stopPropagation(), !(c.clientX === o.x && c.clientY === o.y) && (typeof e.onDragMove == "function" && e.onDragMove({
2089
+ }, C = (s) => {
2090
+ s.stopPropagation(), !(s.clientX === n.x && s.clientY === n.y) && (typeof e.onDragMove == "function" && e.onDragMove({
2091
2091
  type: "dragmove",
2092
- x: c.clientX,
2093
- y: c.clientY
2094
- }), o.x = c.clientX, o.y = c.clientY);
2095
- }, b = (c) => {
2096
- if (c.stopPropagation(), typeof e.onDragEnd == "function") {
2097
- let E = {
2092
+ x: s.clientX,
2093
+ y: s.clientY
2094
+ }), n.x = s.clientX, n.y = s.clientY);
2095
+ }, f = (s) => {
2096
+ if (s.stopPropagation(), typeof e.onDragEnd == "function") {
2097
+ let b = {
2098
2098
  type: "dragend",
2099
- x: c.clientX,
2100
- y: c.clientY,
2101
- dropOperation: ue[c.dataTransfer.dropEffect]
2099
+ x: s.clientX,
2100
+ y: s.clientY,
2101
+ dropOperation: te[s.dataTransfer.dropEffect]
2102
2102
  };
2103
- se && (E.dropOperation = ue[se]), e.onDragEnd(E);
2103
+ ce && (b.dropOperation = te[ce]), e.onDragEnd(b);
2104
2104
  }
2105
- m(null), g(), Ee(I.none), De(void 0);
2105
+ m(null), c(), Ce(I.none), ge(void 0);
2106
2106
  };
2107
- R(() => () => {
2108
- if (n.current && (!n.current.isConnected || parseInt(at, 10) < 17)) {
2109
- if (typeof o.options.onDragEnd == "function") {
2110
- let c = {
2107
+ L(() => () => {
2108
+ if (o.current && (!o.current.isConnected || parseInt(st, 10) < 17)) {
2109
+ if (typeof n.options.onDragEnd == "function") {
2110
+ let s = {
2111
2111
  type: "dragend",
2112
2112
  x: 0,
2113
2113
  y: 0,
2114
- dropOperation: ue[se || "none"]
2114
+ dropOperation: te[ce || "none"]
2115
2115
  };
2116
- o.options.onDragEnd(c);
2116
+ n.options.onDragEnd(s);
2117
2117
  }
2118
- m(null), Ee(I.none), De(void 0);
2118
+ m(null), Ce(I.none), ge(void 0);
2119
2119
  }
2120
2120
  }, [
2121
- o
2121
+ n
2122
2122
  ]);
2123
- let x = (c) => {
2124
- c.pointerType !== "keyboard" && c.pointerType !== "virtual" || s(c.target);
2125
- }, s = (c) => {
2126
- if (typeof o.options.onDragStart == "function") {
2127
- let E = c.getBoundingClientRect();
2128
- o.options.onDragStart({
2123
+ let x = (s) => {
2124
+ s.pointerType !== "keyboard" && s.pointerType !== "virtual" || D(s.target);
2125
+ }, D = (s) => {
2126
+ if (typeof n.options.onDragStart == "function") {
2127
+ let b = s.getBoundingClientRect();
2128
+ n.options.onDragStart({
2129
2129
  type: "dragstart",
2130
- x: E.x + E.width / 2,
2131
- y: E.y + E.height / 2
2130
+ x: b.x + b.width / 2,
2131
+ y: b.y + b.height / 2
2132
2132
  });
2133
2133
  }
2134
- sr({
2135
- element: c,
2136
- items: o.options.getItems(),
2137
- allowedDropOperations: typeof o.options.getAllowedDropOperations == "function" ? o.options.getAllowedDropOperations() : [
2134
+ Dr({
2135
+ element: s,
2136
+ items: n.options.getItems(),
2137
+ allowedDropOperations: typeof n.options.getAllowedDropOperations == "function" ? n.options.getAllowedDropOperations() : [
2138
2138
  "move",
2139
2139
  "copy",
2140
2140
  "link"
2141
2141
  ],
2142
- onDragEnd(E) {
2143
- m(null), typeof o.options.onDragEnd == "function" && o.options.onDragEnd(E);
2142
+ onDragEnd(b) {
2143
+ m(null), typeof n.options.onDragEnd == "function" && n.options.onDragEnd(b);
2144
2144
  }
2145
- }, t), m(c);
2146
- }, f = Oe(), $ = a ? Ue[f].end : Ue[f].start, i = ze(t.format($)), d = {};
2145
+ }, t), m(s);
2146
+ }, E = Ve(), y = a ? qe[E].end : qe[E].start, i = we(t.format(y)), d = {};
2147
2147
  return u || (d = {
2148
2148
  ...i,
2149
- onPointerDown(c) {
2150
- if (B.current = au(c.nativeEvent) ? "virtual" : c.pointerType, c.width < 1 && c.height < 1)
2149
+ onPointerDown(s) {
2150
+ if (B.current = su(s.nativeEvent) ? "virtual" : s.pointerType, s.width < 1 && s.height < 1)
2151
2151
  B.current = "virtual";
2152
2152
  else {
2153
- let E = c.currentTarget.getBoundingClientRect(), y = c.clientX - E.x, h = c.clientY - E.y, k = E.width / 2, T = E.height / 2;
2154
- Math.abs(y - k) <= 0.5 && Math.abs(h - T) <= 0.5 ? B.current = "virtual" : B.current = c.pointerType;
2153
+ let b = s.currentTarget.getBoundingClientRect(), $ = s.clientX - b.x, h = s.clientY - b.y, k = b.width / 2, T = b.height / 2;
2154
+ Math.abs($ - k) <= 0.5 && Math.abs(h - T) <= 0.5 ? B.current = "virtual" : B.current = s.pointerType;
2155
2155
  }
2156
2156
  },
2157
- onKeyDownCapture(c) {
2158
- c.target === c.currentTarget && c.key === "Enter" && (c.preventDefault(), c.stopPropagation());
2157
+ onKeyDownCapture(s) {
2158
+ s.target === s.currentTarget && s.key === "Enter" && (s.preventDefault(), s.stopPropagation());
2159
2159
  },
2160
- onKeyUpCapture(c) {
2161
- c.target === c.currentTarget && c.key === "Enter" && (c.preventDefault(), c.stopPropagation(), s(c.target));
2160
+ onKeyUpCapture(s) {
2161
+ s.target === s.currentTarget && s.key === "Enter" && (s.preventDefault(), s.stopPropagation(), D(s.target));
2162
2162
  },
2163
- onClick(c) {
2164
- (iu(c.nativeEvent) || B.current === "virtual") && (c.preventDefault(), c.stopPropagation(), s(c.target));
2163
+ onClick(s) {
2164
+ (du(s.nativeEvent) || B.current === "virtual") && (s.preventDefault(), s.stopPropagation(), D(s.target));
2165
2165
  }
2166
2166
  }), r ? {
2167
2167
  dragProps: {
@@ -2173,9 +2173,9 @@ function br(e) {
2173
2173
  dragProps: {
2174
2174
  ...d,
2175
2175
  draggable: "true",
2176
- onDragStart: D,
2176
+ onDragStart: p,
2177
2177
  onDrag: C,
2178
- onDragEnd: b
2178
+ onDragEnd: f
2179
2179
  },
2180
2180
  dragButtonProps: {
2181
2181
  ...i,
@@ -2184,19 +2184,19 @@ function br(e) {
2184
2184
  isDragging: a
2185
2185
  };
2186
2186
  }
2187
- function xr(e) {
2187
+ function $r(e) {
2188
2188
  return e && e.__esModule ? e.default : e;
2189
2189
  }
2190
- const Er = {
2190
+ const yr = {
2191
2191
  keyboard: "dropDescriptionKeyboard",
2192
2192
  touch: "dropDescriptionTouch",
2193
2193
  virtual: "dropDescriptionVirtual"
2194
2194
  };
2195
- function Qu() {
2196
- let e = fe(xr(re), "@react-aria/dnd"), u = Oe(), r = Ve();
2195
+ function ut() {
2196
+ let e = Be($r(ne), "@react-aria/dnd"), u = Ve(), r = je();
2197
2197
  return {
2198
2198
  dropProps: {
2199
- ...ze(r ? e.format(Er[u]) : ""),
2199
+ ...we(r ? e.format(yr[u]) : ""),
2200
2200
  // Mobile Safari does not properly bubble click events on elements except links or inputs
2201
2201
  // unless there is an onclick handler bound directly to the element itself. By adding this
2202
2202
  // handler, React will take care of adding that for us, and we are able to handle document
@@ -2207,9 +2207,9 @@ function Qu() {
2207
2207
  }
2208
2208
  };
2209
2209
  }
2210
- const Cr = 800;
2211
- function $r(e) {
2212
- let { hasDropButton: u, isDisabled: r } = e, [t, o] = X(!1), n = K({
2210
+ const vr = 800;
2211
+ function hr(e) {
2212
+ let { hasDropButton: u, isDisabled: r } = e, [t, n] = X(!1), o = S({
2213
2213
  x: 0,
2214
2214
  y: 0,
2215
2215
  dragOverElements: /* @__PURE__ */ new Set(),
@@ -2217,7 +2217,7 @@ function $r(e) {
2217
2217
  allowedOperations: I.all,
2218
2218
  dropActivateTimer: void 0
2219
2219
  }).current, a = (i) => {
2220
- if (o(!0), typeof e.onDropEnter == "function") {
2220
+ if (n(!0), typeof e.onDropEnter == "function") {
2221
2221
  let d = i.currentTarget.getBoundingClientRect();
2222
2222
  e.onDropEnter({
2223
2223
  type: "dropenter",
@@ -2226,7 +2226,7 @@ function $r(e) {
2226
2226
  });
2227
2227
  }
2228
2228
  }, l = (i) => {
2229
- if (o(!1), typeof e.onDropExit == "function") {
2229
+ if (n(!1), typeof e.onDropExit == "function") {
2230
2230
  let d = i.currentTarget.getBoundingClientRect();
2231
2231
  e.onDropExit({
2232
2232
  type: "dropexit",
@@ -2237,106 +2237,106 @@ function $r(e) {
2237
2237
  }, m = (i) => {
2238
2238
  i.preventDefault(), i.stopPropagation();
2239
2239
  let d = Ge(i);
2240
- if (i.clientX === n.x && i.clientY === n.y && d === n.allowedOperations) {
2241
- i.dataTransfer.dropEffect = n.dropEffect;
2240
+ if (i.clientX === o.x && i.clientY === o.y && d === o.allowedOperations) {
2241
+ i.dataTransfer.dropEffect = o.dropEffect;
2242
2242
  return;
2243
2243
  }
2244
- n.x = i.clientX, n.y = i.clientY;
2245
- let c = n.dropEffect;
2246
- if (d !== n.allowedOperations) {
2247
- let E = Ce(d), y = E[0];
2244
+ o.x = i.clientX, o.y = i.clientY;
2245
+ let s = o.dropEffect;
2246
+ if (d !== o.allowedOperations) {
2247
+ let b = $e(d), $ = b[0];
2248
2248
  if (typeof e.getDropOperation == "function") {
2249
- let h = new ie(i.dataTransfer);
2250
- y = ae(d, e.getDropOperation(h, E));
2249
+ let h = new ae(i.dataTransfer);
2250
+ $ = le(d, e.getDropOperation(h, b));
2251
2251
  }
2252
- n.dropEffect = xe[y] || "none";
2252
+ o.dropEffect = Ee[$] || "none";
2253
2253
  }
2254
2254
  if (typeof e.getDropOperationForPoint == "function") {
2255
- let E = new ie(i.dataTransfer), y = i.currentTarget.getBoundingClientRect(), h = ae(d, e.getDropOperationForPoint(E, Ce(d), n.x - y.x, n.y - y.y));
2256
- n.dropEffect = xe[h] || "none";
2255
+ let b = new ae(i.dataTransfer), $ = i.currentTarget.getBoundingClientRect(), h = le(d, e.getDropOperationForPoint(b, $e(d), o.x - $.x, o.y - $.y));
2256
+ o.dropEffect = Ee[h] || "none";
2257
2257
  }
2258
- if (n.allowedOperations = d, i.dataTransfer.dropEffect = n.dropEffect, n.dropEffect === "none" && c !== "none" ? l(i) : n.dropEffect !== "none" && c === "none" && a(i), typeof e.onDropMove == "function" && n.dropEffect !== "none") {
2259
- let E = i.currentTarget.getBoundingClientRect();
2258
+ if (o.allowedOperations = d, i.dataTransfer.dropEffect = o.dropEffect, o.dropEffect === "none" && s !== "none" ? l(i) : o.dropEffect !== "none" && s === "none" && a(i), typeof e.onDropMove == "function" && o.dropEffect !== "none") {
2259
+ let b = i.currentTarget.getBoundingClientRect();
2260
2260
  e.onDropMove({
2261
2261
  type: "dropmove",
2262
- x: n.x - E.x,
2263
- y: n.y - E.y
2262
+ x: o.x - b.x,
2263
+ y: o.y - b.y
2264
2264
  });
2265
2265
  }
2266
- if (clearTimeout(n.dropActivateTimer), e.onDropActivate && typeof e.onDropActivate == "function" && n.dropEffect !== "none") {
2267
- let E = e.onDropActivate, y = i.currentTarget.getBoundingClientRect();
2268
- n.dropActivateTimer = setTimeout(() => {
2269
- E({
2266
+ if (clearTimeout(o.dropActivateTimer), e.onDropActivate && typeof e.onDropActivate == "function" && o.dropEffect !== "none") {
2267
+ let b = e.onDropActivate, $ = i.currentTarget.getBoundingClientRect();
2268
+ o.dropActivateTimer = setTimeout(() => {
2269
+ b({
2270
2270
  type: "dropactivate",
2271
- x: n.x - y.x,
2272
- y: n.y - y.y
2271
+ x: o.x - $.x,
2272
+ y: o.y - $.y
2273
2273
  });
2274
- }, Cr);
2274
+ }, vr);
2275
2275
  }
2276
- }, p = (i) => {
2277
- if (i.preventDefault(), i.stopPropagation(), n.dragOverElements.add(i.target), n.dragOverElements.size > 1) return;
2278
- let d = Ge(i), c = Ce(d), E = c[0];
2276
+ }, g = (i) => {
2277
+ if (i.preventDefault(), i.stopPropagation(), o.dragOverElements.add(i.target), o.dragOverElements.size > 1) return;
2278
+ let d = Ge(i), s = $e(d), b = s[0];
2279
2279
  if (typeof e.getDropOperation == "function") {
2280
- let y = new ie(i.dataTransfer);
2281
- E = ae(d, e.getDropOperation(y, c));
2280
+ let $ = new ae(i.dataTransfer);
2281
+ b = le(d, e.getDropOperation($, s));
2282
2282
  }
2283
2283
  if (typeof e.getDropOperationForPoint == "function") {
2284
- let y = new ie(i.dataTransfer), h = i.currentTarget.getBoundingClientRect();
2285
- E = ae(d, e.getDropOperationForPoint(y, c, i.clientX - h.x, i.clientY - h.y));
2284
+ let $ = new ae(i.dataTransfer), h = i.currentTarget.getBoundingClientRect();
2285
+ b = le(d, e.getDropOperationForPoint($, s, i.clientX - h.x, i.clientY - h.y));
2286
2286
  }
2287
- n.x = i.clientX, n.y = i.clientY, n.allowedOperations = d, n.dropEffect = xe[E] || "none", i.dataTransfer.dropEffect = n.dropEffect, E !== "cancel" && a(i);
2288
- }, g = (i) => {
2289
- i.preventDefault(), i.stopPropagation(), n.dragOverElements.delete(i.target);
2290
- for (let d of n.dragOverElements) i.currentTarget.contains(d) || n.dragOverElements.delete(d);
2291
- n.dragOverElements.size > 0 || (n.dropEffect !== "none" && l(i), clearTimeout(n.dropActivateTimer));
2287
+ o.x = i.clientX, o.y = i.clientY, o.allowedOperations = d, o.dropEffect = Ee[b] || "none", i.dataTransfer.dropEffect = o.dropEffect, b !== "cancel" && a(i);
2288
+ }, c = (i) => {
2289
+ i.preventDefault(), i.stopPropagation(), o.dragOverElements.delete(i.target);
2290
+ for (let d of o.dragOverElements) i.currentTarget.contains(d) || o.dragOverElements.delete(d);
2291
+ o.dragOverElements.size > 0 || (o.dropEffect !== "none" && l(i), clearTimeout(o.dropActivateTimer));
2292
2292
  }, B = (i) => {
2293
- if (i.preventDefault(), i.stopPropagation(), De(n.dropEffect), typeof e.onDrop == "function") {
2294
- let c = ue[n.dropEffect], E = tr(i.dataTransfer), y = i.currentTarget.getBoundingClientRect(), h = {
2293
+ if (i.preventDefault(), i.stopPropagation(), ge(o.dropEffect), typeof e.onDrop == "function") {
2294
+ let s = te[o.dropEffect], b = or(i.dataTransfer), $ = i.currentTarget.getBoundingClientRect(), h = {
2295
2295
  type: "drop",
2296
- x: i.clientX - y.x,
2297
- y: i.clientY - y.y,
2298
- items: E,
2299
- dropOperation: c
2296
+ x: i.clientX - $.x,
2297
+ y: i.clientY - $.y,
2298
+ items: b,
2299
+ dropOperation: s
2300
2300
  };
2301
2301
  e.onDrop(h);
2302
2302
  }
2303
2303
  let d = {
2304
2304
  ...z
2305
2305
  };
2306
- n.dragOverElements.clear(), l(i), clearTimeout(n.dropActivateTimer), d.draggingCollectionRef == null ? De(void 0) : lr(d);
2307
- }, D = _((i) => {
2306
+ o.dragOverElements.clear(), l(i), clearTimeout(o.dropActivateTimer), d.draggingCollectionRef == null ? ge(void 0) : cr(d);
2307
+ }, p = ee((i) => {
2308
2308
  typeof e.onDropEnter == "function" && e.onDropEnter(i);
2309
- }), C = _((i) => {
2309
+ }), C = ee((i) => {
2310
2310
  typeof e.onDropExit == "function" && e.onDropExit(i);
2311
- }), b = _((i) => {
2311
+ }), f = ee((i) => {
2312
2312
  typeof e.onDropActivate == "function" && e.onDropActivate(i);
2313
- }), x = _((i) => {
2313
+ }), x = ee((i) => {
2314
2314
  typeof e.onDrop == "function" && e.onDrop(i);
2315
- }), s = _((i, d) => e.getDropOperation ? e.getDropOperation(i, d) : d[0]), { ref: f } = e;
2316
- eu(() => {
2317
- if (!(r || !f.current))
2318
- return Bu({
2319
- element: f.current,
2320
- getDropOperation: s,
2315
+ }), D = ee((i, d) => e.getDropOperation ? e.getDropOperation(i, d) : d[0]), { ref: E } = e;
2316
+ ru(() => {
2317
+ if (!(r || !E.current))
2318
+ return Eu({
2319
+ element: E.current,
2320
+ getDropOperation: D,
2321
2321
  onDropEnter(i) {
2322
- o(!0), D(i);
2322
+ n(!0), p(i);
2323
2323
  },
2324
2324
  onDropExit(i) {
2325
- o(!1), C(i);
2325
+ n(!1), C(i);
2326
2326
  },
2327
2327
  onDrop: x,
2328
- onDropActivate: b
2328
+ onDropActivate: f
2329
2329
  });
2330
2330
  }, [
2331
2331
  r,
2332
- f,
2333
- s,
2332
+ E,
2334
2333
  D,
2334
+ p,
2335
2335
  C,
2336
2336
  x,
2337
- b
2337
+ f
2338
2338
  ]);
2339
- let { dropProps: $ } = Qu();
2339
+ let { dropProps: y } = ut();
2340
2340
  return r ? {
2341
2341
  dropProps: {},
2342
2342
  dropButtonProps: {
@@ -2345,65 +2345,65 @@ function $r(e) {
2345
2345
  isDropTarget: !1
2346
2346
  } : {
2347
2347
  dropProps: {
2348
- ...!u && $,
2349
- onDragEnter: p,
2348
+ ...!u && y,
2349
+ onDragEnter: g,
2350
2350
  onDragOver: m,
2351
- onDragLeave: g,
2351
+ onDragLeave: c,
2352
2352
  onDrop: B
2353
2353
  },
2354
2354
  dropButtonProps: {
2355
- ...u && $
2355
+ ...u && y
2356
2356
  },
2357
2357
  isDropTarget: t
2358
2358
  };
2359
2359
  }
2360
2360
  function Ge(e) {
2361
- let u = du[e.dataTransfer.effectAllowed];
2362
- Te && (u &= Te);
2361
+ let u = pu[e.dataTransfer.effectAllowed];
2362
+ Fe && (u &= Fe);
2363
2363
  let r = I.none;
2364
- return Mt() ? (e.altKey && (r |= I.copy), e.ctrlKey && !Nt() && (r |= I.link), e.metaKey && (r |= I.move)) : (e.altKey && (r |= I.link), e.shiftKey && (r |= I.move), e.ctrlKey && (r |= I.copy)), r ? u & r : u;
2364
+ return Ut() ? (e.altKey && (r |= I.copy), e.ctrlKey && !qt() && (r |= I.link), e.metaKey && (r |= I.move)) : (e.altKey && (r |= I.link), e.shiftKey && (r |= I.move), e.ctrlKey && (r |= I.copy)), r ? u & r : u;
2365
2365
  }
2366
- function Ce(e) {
2366
+ function $e(e) {
2367
2367
  let u = [];
2368
2368
  return e & I.move && u.push("move"), e & I.copy && u.push("copy"), e & I.link && u.push("link"), u;
2369
2369
  }
2370
- function ae(e, u) {
2370
+ function le(e, u) {
2371
2371
  let r = I[u];
2372
2372
  return e & r ? u : "cancel";
2373
2373
  }
2374
- function yr(e, u, r, t, o = !1, n = !1) {
2374
+ function kr(e, u, r, t, n = !1, o = !1) {
2375
2375
  switch (t) {
2376
2376
  case "left":
2377
- return o ? $e(e, u, r, n, "left") : ye(e, u, r, n, "left");
2377
+ return n ? ye(e, u, r, o, "left") : ve(e, u, r, o, "left");
2378
2378
  case "right":
2379
- return o ? ye(e, u, r, n, "right") : $e(e, u, r, n, "right");
2379
+ return n ? ve(e, u, r, o, "right") : ye(e, u, r, o, "right");
2380
2380
  case "up":
2381
- return ye(e, u, r, n);
2381
+ return ve(e, u, r, o);
2382
2382
  case "down":
2383
- return $e(e, u, r, n);
2383
+ return ye(e, u, r, o);
2384
2384
  }
2385
2385
  }
2386
- function $e(e, u, r, t = !1, o = null) {
2386
+ function ye(e, u, r, t = !1, n = null) {
2387
2387
  if (!r) return {
2388
2388
  type: "root"
2389
2389
  };
2390
2390
  if (r.type === "root") {
2391
- var n, a;
2392
- let g = (a = (n = e.getFirstKey) === null || n === void 0 ? void 0 : n.call(e)) !== null && a !== void 0 ? a : null;
2393
- return g != null ? {
2391
+ var o, a;
2392
+ let c = (a = (o = e.getFirstKey) === null || o === void 0 ? void 0 : o.call(e)) !== null && a !== void 0 ? a : null;
2393
+ return c != null ? {
2394
2394
  type: "item",
2395
- key: g,
2395
+ key: c,
2396
2396
  dropPosition: "before"
2397
2397
  } : null;
2398
2398
  }
2399
2399
  if (r.type === "item") {
2400
- var l, m, p;
2401
- let g = null;
2402
- o ? g = o === "right" ? (l = e.getKeyRightOf) === null || l === void 0 ? void 0 : l.call(e, r.key) : (m = e.getKeyLeftOf) === null || m === void 0 ? void 0 : m.call(e, r.key) : g = (p = e.getKeyBelow) === null || p === void 0 ? void 0 : p.call(e, r.key);
2400
+ var l, m, g;
2401
+ let c = null;
2402
+ n ? c = n === "right" ? (l = e.getKeyRightOf) === null || l === void 0 ? void 0 : l.call(e, r.key) : (m = e.getKeyLeftOf) === null || m === void 0 ? void 0 : m.call(e, r.key) : c = (g = e.getKeyBelow) === null || g === void 0 ? void 0 : g.call(e, r.key);
2403
2403
  let B = u.getKeyAfter(r.key);
2404
- if (g != null && g !== B) return {
2404
+ if (c != null && c !== B) return {
2405
2405
  type: "item",
2406
- key: g,
2406
+ key: c,
2407
2407
  dropPosition: r.dropPosition
2408
2408
  };
2409
2409
  switch (r.dropPosition) {
@@ -2414,8 +2414,8 @@ function $e(e, u, r, t = !1, o = null) {
2414
2414
  dropPosition: "on"
2415
2415
  };
2416
2416
  case "on": {
2417
- let D = u.getItem(r.key), C = g != null ? u.getItem(g) : null;
2418
- return D && C && C.level >= D.level ? {
2417
+ let p = u.getItem(r.key), C = c != null ? u.getItem(c) : null;
2418
+ return p && C && C.level >= p.level ? {
2419
2419
  type: "item",
2420
2420
  key: C.key,
2421
2421
  dropPosition: "before"
@@ -2426,9 +2426,9 @@ function $e(e, u, r, t = !1, o = null) {
2426
2426
  };
2427
2427
  }
2428
2428
  case "after": {
2429
- let D = u.getItem(r.key);
2430
- if (D && D.nextKey == null && D.parentKey != null) {
2431
- let C = u.getItem(D.parentKey);
2429
+ let p = u.getItem(r.key);
2430
+ if (p && p.nextKey == null && p.parentKey != null) {
2431
+ let C = u.getItem(p.parentKey);
2432
2432
  if (C?.nextKey != null) return {
2433
2433
  type: "item",
2434
2434
  key: C.nextKey,
@@ -2440,9 +2440,9 @@ function $e(e, u, r, t = !1, o = null) {
2440
2440
  dropPosition: "after"
2441
2441
  };
2442
2442
  }
2443
- if (D?.nextKey != null) return {
2443
+ if (p?.nextKey != null) return {
2444
2444
  type: "item",
2445
- key: D.nextKey,
2445
+ key: p.nextKey,
2446
2446
  dropPosition: "on"
2447
2447
  };
2448
2448
  }
@@ -2452,41 +2452,41 @@ function $e(e, u, r, t = !1, o = null) {
2452
2452
  type: "root"
2453
2453
  } : null;
2454
2454
  }
2455
- function ye(e, u, r, t = !1, o = null) {
2455
+ function ve(e, u, r, t = !1, n = null) {
2456
2456
  if (!r || t && r.type === "root") {
2457
- var n;
2458
- let p = null, g = (n = e.getLastKey) === null || n === void 0 ? void 0 : n.call(e);
2459
- for (; g != null; ) {
2460
- p = g;
2461
- let B = u.getItem(g);
2462
- g = B?.parentKey;
2457
+ var o;
2458
+ let g = null, c = (o = e.getLastKey) === null || o === void 0 ? void 0 : o.call(e);
2459
+ for (; c != null; ) {
2460
+ g = c;
2461
+ let B = u.getItem(c);
2462
+ c = B?.parentKey;
2463
2463
  }
2464
- return p != null ? {
2464
+ return g != null ? {
2465
2465
  type: "item",
2466
- key: p,
2466
+ key: g,
2467
2467
  dropPosition: "after"
2468
2468
  } : null;
2469
2469
  }
2470
2470
  if (r.type === "item") {
2471
2471
  var a, l, m;
2472
- let p = null;
2473
- o ? p = o === "left" ? (a = e.getKeyLeftOf) === null || a === void 0 ? void 0 : a.call(e, r.key) : (l = e.getKeyRightOf) === null || l === void 0 ? void 0 : l.call(e, r.key) : p = (m = e.getKeyAbove) === null || m === void 0 ? void 0 : m.call(e, r.key);
2474
- let g = u.getKeyBefore(r.key);
2475
- if (p != null && p !== g) return {
2472
+ let g = null;
2473
+ n ? g = n === "left" ? (a = e.getKeyLeftOf) === null || a === void 0 ? void 0 : a.call(e, r.key) : (l = e.getKeyRightOf) === null || l === void 0 ? void 0 : l.call(e, r.key) : g = (m = e.getKeyAbove) === null || m === void 0 ? void 0 : m.call(e, r.key);
2474
+ let c = u.getKeyBefore(r.key);
2475
+ if (g != null && g !== c) return {
2476
2476
  type: "item",
2477
- key: p,
2477
+ key: g,
2478
2478
  dropPosition: r.dropPosition
2479
2479
  };
2480
2480
  switch (r.dropPosition) {
2481
2481
  case "before": {
2482
2482
  let B = u.getItem(r.key);
2483
2483
  if (B && B.prevKey != null) {
2484
- let D = qe(u, B.prevKey);
2485
- if (D) return D;
2484
+ let p = Xe(u, B.prevKey);
2485
+ if (p) return p;
2486
2486
  }
2487
- return p != null ? {
2487
+ return g != null ? {
2488
2488
  type: "item",
2489
- key: p,
2489
+ key: g,
2490
2490
  dropPosition: "on"
2491
2491
  } : {
2492
2492
  type: "root"
@@ -2499,7 +2499,7 @@ function ye(e, u, r, t = !1, o = null) {
2499
2499
  dropPosition: "before"
2500
2500
  };
2501
2501
  case "after": {
2502
- let B = qe(u, r.key);
2502
+ let B = Xe(u, r.key);
2503
2503
  return B || {
2504
2504
  type: "item",
2505
2505
  key: r.key,
@@ -2512,11 +2512,11 @@ function ye(e, u, r, t = !1, o = null) {
2512
2512
  type: "root"
2513
2513
  } : null;
2514
2514
  }
2515
- function qe(e, u) {
2516
- let r = e.getItem(u), t = e.getKeyAfter(u), o = t != null ? e.getItem(t) : null;
2517
- if (r && o && o.level > r.level) {
2518
- let n = mt(r, e), a = null;
2519
- for (let l of n) l.type === "item" && (a = l);
2515
+ function Xe(e, u) {
2516
+ let r = e.getItem(u), t = e.getKeyAfter(u), n = t != null ? e.getItem(t) : null;
2517
+ if (r && n && n.level > r.level) {
2518
+ let o = xt(r, e), a = null;
2519
+ for (let l of o) l.type === "item" && (a = l);
2520
2520
  if (a) return {
2521
2521
  type: "item",
2522
2522
  key: a.key,
@@ -2525,250 +2525,250 @@ function qe(e, u) {
2525
2525
  }
2526
2526
  return null;
2527
2527
  }
2528
- const le = 20;
2529
- function vr(e) {
2530
- let u = K(null), r = K(!0), t = K(!0);
2531
- R(() => {
2528
+ const de = 20;
2529
+ function Ar(e) {
2530
+ let u = S(null), r = S(!0), t = S(!0);
2531
+ L(() => {
2532
2532
  if (e.current) {
2533
- u.current = Rt(e.current) ? e.current : Lt(e.current);
2533
+ u.current = Ht(e.current) ? e.current : Nt(e.current);
2534
2534
  let a = window.getComputedStyle(u.current);
2535
2535
  r.current = /(auto|scroll)/.test(a.overflowX), t.current = /(auto|scroll)/.test(a.overflowY);
2536
2536
  }
2537
2537
  }, [
2538
2538
  e
2539
2539
  ]);
2540
- let o = K({
2540
+ let n = S({
2541
2541
  timer: void 0,
2542
2542
  dx: 0,
2543
2543
  dy: 0
2544
2544
  }).current;
2545
- R(() => () => {
2546
- o.timer && (cancelAnimationFrame(o.timer), o.timer = void 0);
2545
+ L(() => () => {
2546
+ n.timer && (cancelAnimationFrame(n.timer), n.timer = void 0);
2547
2547
  }, [
2548
- o
2548
+ n
2549
2549
  ]);
2550
- let n = J(() => {
2551
- r.current && u.current && (u.current.scrollLeft += o.dx), t.current && u.current && (u.current.scrollTop += o.dy), o.timer && (o.timer = requestAnimationFrame(n));
2550
+ let o = J(() => {
2551
+ r.current && u.current && (u.current.scrollLeft += n.dx), t.current && u.current && (u.current.scrollTop += n.dy), n.timer && (n.timer = requestAnimationFrame(o));
2552
2552
  }, [
2553
2553
  u,
2554
- o
2554
+ n
2555
2555
  ]);
2556
2556
  return {
2557
2557
  move(a, l) {
2558
- if (!Ht() || Ut() || !u.current) return;
2559
- let m = u.current.getBoundingClientRect(), p = le, g = le, B = m.height - le, D = m.width - le;
2560
- a < p || a > D || l < g || l > B ? (a < p ? o.dx = a - p : a > D && (o.dx = a - D), l < g ? o.dy = l - g : l > B && (o.dy = l - B), o.timer || (o.timer = requestAnimationFrame(n))) : this.stop();
2558
+ if (!Gt() || Xt() || !u.current) return;
2559
+ let m = u.current.getBoundingClientRect(), g = de, c = de, B = m.height - de, p = m.width - de;
2560
+ a < g || a > p || l < c || l > B ? (a < g ? n.dx = a - g : a > p && (n.dx = a - p), l < c ? n.dy = l - c : l > B && (n.dy = l - B), n.timer || (n.timer = requestAnimationFrame(o))) : this.stop();
2561
2561
  },
2562
2562
  stop() {
2563
- o.timer && (cancelAnimationFrame(o.timer), o.timer = void 0);
2563
+ n.timer && (cancelAnimationFrame(n.timer), n.timer = void 0);
2564
2564
  }
2565
2565
  };
2566
2566
  }
2567
- function hr(e, u, r) {
2568
- let t = K({
2567
+ function Tr(e, u, r) {
2568
+ let t = S({
2569
2569
  props: e,
2570
2570
  state: u,
2571
2571
  nextTarget: null,
2572
2572
  dropOperation: null
2573
2573
  }).current;
2574
2574
  t.props = e, t.state = u;
2575
- let o = J(async (D) => {
2576
- let { onInsert: C, onRootDrop: b, onItemDrop: x, onReorder: s, onMove: f, acceptedDragTypes: $ = "all", shouldAcceptItemDrop: i } = t.props, { draggingKeys: d } = z, c = H(r), { target: E, dropOperation: y, items: h } = D, k = h;
2577
- ($ !== "all" || i) && (k = h.filter((T) => {
2578
- let S;
2579
- return T.kind === "directory" ? S = /* @__PURE__ */ new Set([
2580
- pu
2581
- ]) : S = T.kind === "file" ? /* @__PURE__ */ new Set([
2575
+ let n = J(async (p) => {
2576
+ let { onInsert: C, onRootDrop: f, onItemDrop: x, onReorder: D, onMove: E, acceptedDragTypes: y = "all", shouldAcceptItemDrop: i } = t.props, { draggingKeys: d } = z, s = H(r), { target: b, dropOperation: $, items: h } = p, k = h;
2577
+ (y !== "all" || i) && (k = h.filter((T) => {
2578
+ let K;
2579
+ return T.kind === "directory" ? K = /* @__PURE__ */ new Set([
2580
+ mu
2581
+ ]) : K = T.kind === "file" ? /* @__PURE__ */ new Set([
2582
2582
  T.type
2583
- ]) : T.types, $ === "all" || $.some((O) => S.has(O)) ? E.type === "item" && E.dropPosition === "on" && i ? i(E, S) : !0 : !1;
2584
- })), k.length > 0 && (E.type === "root" && b && await b({
2583
+ ]) : T.types, y === "all" || y.some((O) => K.has(O)) ? b.type === "item" && b.dropPosition === "on" && i ? i(b, K) : !0 : !1;
2584
+ })), k.length > 0 && (b.type === "root" && f && await f({
2585
2585
  items: k,
2586
- dropOperation: y
2587
- }), E.type === "item" && (E.dropPosition === "on" && x && await x({
2586
+ dropOperation: $
2587
+ }), b.type === "item" && (b.dropPosition === "on" && x && await x({
2588
2588
  items: k,
2589
- dropOperation: y,
2590
- isInternal: c,
2591
- target: E
2592
- }), f && c && await f({
2589
+ dropOperation: $,
2590
+ isInternal: s,
2591
+ target: b
2592
+ }), E && s && await E({
2593
2593
  keys: d,
2594
- dropOperation: y,
2595
- target: E
2596
- }), E.dropPosition !== "on" && (!c && C && await C({
2594
+ dropOperation: $,
2595
+ target: b
2596
+ }), b.dropPosition !== "on" && (!s && C && await C({
2597
2597
  items: k,
2598
- dropOperation: y,
2599
- target: E
2600
- }), c && s && await s({
2598
+ dropOperation: $,
2599
+ target: b
2600
+ }), s && D && await D({
2601
2601
  keys: d,
2602
- dropOperation: y,
2603
- target: E
2602
+ dropOperation: $,
2603
+ target: b
2604
2604
  }))));
2605
2605
  }, [
2606
2606
  t,
2607
2607
  r
2608
- ]), n = vr(r), { dropProps: a } = $r({
2608
+ ]), o = Ar(r), { dropProps: a } = hr({
2609
2609
  ref: r,
2610
2610
  onDropEnter() {
2611
2611
  t.nextTarget != null && u.setTarget(t.nextTarget);
2612
2612
  },
2613
- onDropMove(D) {
2614
- t.nextTarget != null && u.setTarget(t.nextTarget), n.move(D.x, D.y);
2613
+ onDropMove(p) {
2614
+ t.nextTarget != null && u.setTarget(t.nextTarget), o.move(p.x, p.y);
2615
2615
  },
2616
- getDropOperationForPoint(D, C, b, x) {
2617
- let { draggingKeys: s, dropCollectionRef: f } = z, $ = H(r), i = (c) => u.getDropOperation({
2618
- target: c,
2619
- types: D,
2616
+ getDropOperationForPoint(p, C, f, x) {
2617
+ let { draggingKeys: D, dropCollectionRef: E } = z, y = H(r), i = (s) => u.getDropOperation({
2618
+ target: s,
2619
+ types: p,
2620
2620
  allowedOperations: C,
2621
- isInternal: $,
2622
- draggingKeys: s
2623
- }) !== "cancel", d = e.dropTargetDelegate.getDropTargetFromPoint(b, x, i);
2621
+ isInternal: y,
2622
+ draggingKeys: D
2623
+ }) !== "cancel", d = e.dropTargetDelegate.getDropTargetFromPoint(f, x, i);
2624
2624
  if (!d)
2625
2625
  return t.dropOperation = "cancel", t.nextTarget = null, "cancel";
2626
2626
  if (t.dropOperation = u.getDropOperation({
2627
2627
  target: d,
2628
- types: D,
2628
+ types: p,
2629
2629
  allowedOperations: C,
2630
- isInternal: $,
2631
- draggingKeys: s
2630
+ isInternal: y,
2631
+ draggingKeys: D
2632
2632
  }), t.dropOperation === "cancel") {
2633
- let c = {
2633
+ let s = {
2634
2634
  type: "root"
2635
- }, E = u.getDropOperation({
2636
- target: c,
2637
- types: D,
2635
+ }, b = u.getDropOperation({
2636
+ target: s,
2637
+ types: p,
2638
2638
  allowedOperations: C,
2639
- isInternal: $,
2640
- draggingKeys: s
2639
+ isInternal: y,
2640
+ draggingKeys: D
2641
2641
  });
2642
- E !== "cancel" && (d = c, t.dropOperation = E);
2642
+ b !== "cancel" && (d = s, t.dropOperation = b);
2643
2643
  }
2644
- return d && t.dropOperation !== "cancel" && r?.current !== f?.current && Z(r), t.nextTarget = t.dropOperation === "cancel" ? null : d, t.dropOperation;
2644
+ return d && t.dropOperation !== "cancel" && r?.current !== E?.current && Z(r), t.nextTarget = t.dropOperation === "cancel" ? null : d, t.dropOperation;
2645
2645
  },
2646
2646
  onDropExit() {
2647
- Z(void 0), u.setTarget(null), n.stop();
2647
+ Z(void 0), u.setTarget(null), o.stop();
2648
2648
  },
2649
- onDropActivate(D) {
2649
+ onDropActivate(p) {
2650
2650
  var C;
2651
2651
  ((C = u.target) === null || C === void 0 ? void 0 : C.type) === "item" && typeof e.onDropActivate == "function" && e.onDropActivate({
2652
2652
  type: "dropactivate",
2653
- x: D.x,
2654
- y: D.y,
2653
+ x: p.x,
2654
+ y: p.y,
2655
2655
  target: u.target
2656
2656
  });
2657
2657
  },
2658
- onDrop(D) {
2659
- Z(r), u.target && p(D, u.target);
2658
+ onDrop(p) {
2659
+ Z(r), u.target && g(p, u.target);
2660
2660
  let { draggingCollectionRef: C } = z;
2661
- C == null && fu();
2661
+ C == null && bu();
2662
2662
  }
2663
- }), l = K(null), m = J(() => {
2664
- let { state: D } = t;
2663
+ }), l = S(null), m = J(() => {
2664
+ let { state: p } = t;
2665
2665
  if (l.current) {
2666
2666
  var C;
2667
- let { target: s, collection: f, selectedKeys: $, focusedKey: i, isInternal: d, draggingKeys: c } = l.current;
2668
- if (D.collection.size > f.size && D.selectionManager.isSelectionEqual($)) {
2669
- let E = /* @__PURE__ */ new Set();
2670
- for (let y of D.collection.getKeys()) f.getItem(y) || E.add(y);
2671
- if (D.selectionManager.setSelectedKeys(E), D.selectionManager.focusedKey === i) {
2672
- let y = E.keys().next().value;
2673
- if (y != null) {
2674
- let h = D.collection.getItem(y);
2675
- h?.type === "cell" && (y = h.parentKey), y != null && D.selectionManager.setFocusedKey(y), D.selectionManager.selectionMode === "none" && ne("keyboard");
2667
+ let { target: D, collection: E, selectedKeys: y, focusedKey: i, isInternal: d, draggingKeys: s } = l.current;
2668
+ if (p.collection.size > E.size && p.selectionManager.isSelectionEqual(y)) {
2669
+ let b = /* @__PURE__ */ new Set();
2670
+ for (let $ of p.collection.getKeys()) E.getItem($) || b.add($);
2671
+ if (p.selectionManager.setSelectedKeys(b), p.selectionManager.focusedKey === i) {
2672
+ let $ = b.keys().next().value;
2673
+ if ($ != null) {
2674
+ let h = p.collection.getItem($);
2675
+ h?.type === "cell" && ($ = h.parentKey), $ != null && p.selectionManager.setFocusedKey($), p.selectionManager.selectionMode === "none" && oe("keyboard");
2676
2676
  }
2677
2677
  }
2678
- } else if (i != null && D.selectionManager.focusedKey === i && d && s.type === "item" && s.dropPosition !== "on" && c.has((C = D.collection.getItem(i)) === null || C === void 0 ? void 0 : C.parentKey)) {
2679
- var b, x;
2680
- D.selectionManager.setFocusedKey((x = (b = D.collection.getItem(i)) === null || b === void 0 ? void 0 : b.parentKey) !== null && x !== void 0 ? x : null), ne("keyboard");
2681
- } else D.selectionManager.focusedKey === i && s.type === "item" && s.dropPosition === "on" && D.collection.getItem(s.key) != null ? (D.selectionManager.setFocusedKey(s.key), ne("keyboard")) : D.selectionManager.focusedKey != null && !D.selectionManager.isSelected(D.selectionManager.focusedKey) && ne("keyboard");
2682
- D.selectionManager.setFocused(!0);
2678
+ } else if (i != null && p.selectionManager.focusedKey === i && d && D.type === "item" && D.dropPosition !== "on" && s.has((C = p.collection.getItem(i)) === null || C === void 0 ? void 0 : C.parentKey)) {
2679
+ var f, x;
2680
+ p.selectionManager.setFocusedKey((x = (f = p.collection.getItem(i)) === null || f === void 0 ? void 0 : f.parentKey) !== null && x !== void 0 ? x : null), oe("keyboard");
2681
+ } else p.selectionManager.focusedKey === i && D.type === "item" && D.dropPosition === "on" && p.collection.getItem(D.key) != null ? (p.selectionManager.setFocusedKey(D.key), oe("keyboard")) : p.selectionManager.focusedKey != null && !p.selectionManager.isSelected(p.selectionManager.focusedKey) && oe("keyboard");
2682
+ p.selectionManager.setFocused(!0);
2683
2683
  }
2684
2684
  }, [
2685
2685
  t
2686
- ]), p = J((D, C) => {
2687
- let { state: b } = t;
2686
+ ]), g = J((p, C) => {
2687
+ let { state: f } = t;
2688
2688
  l.current = {
2689
2689
  timeout: void 0,
2690
- focusedKey: b.selectionManager.focusedKey,
2691
- collection: b.collection,
2692
- selectedKeys: b.selectionManager.selectedKeys,
2690
+ focusedKey: f.selectionManager.focusedKey,
2691
+ collection: f.collection,
2692
+ selectedKeys: f.selectionManager.selectedKeys,
2693
2693
  draggingKeys: z.draggingKeys,
2694
2694
  isInternal: H(r),
2695
2695
  target: C
2696
- }, (t.props.onDrop || o)({
2696
+ }, (t.props.onDrop || n)({
2697
2697
  type: "drop",
2698
- x: D.x,
2699
- y: D.y,
2698
+ x: p.x,
2699
+ y: p.y,
2700
2700
  target: C,
2701
- items: D.items,
2702
- dropOperation: D.dropOperation
2701
+ items: p.items,
2702
+ dropOperation: p.dropOperation
2703
2703
  }), l.current.timeout = setTimeout(() => {
2704
2704
  m(), l.current = null;
2705
2705
  }, 50);
2706
2706
  }, [
2707
2707
  t,
2708
- o,
2708
+ n,
2709
2709
  r,
2710
2710
  m
2711
2711
  ]);
2712
- R(() => () => {
2712
+ L(() => () => {
2713
2713
  l.current && clearTimeout(l.current.timeout);
2714
- }, []), eu(() => {
2714
+ }, []), ru(() => {
2715
2715
  l.current && u.collection !== l.current.collection && m();
2716
2716
  });
2717
- let { direction: g } = ou();
2718
- R(() => {
2717
+ let { direction: c } = lu();
2718
+ L(() => {
2719
2719
  if (!r.current) return;
2720
- let D = (x, s = !0, f = "down") => yr(t.props.keyboardDelegate, t.state.collection, x, f, g === "rtl", s), C = (x, s = !0) => D(x, s, "up"), b = (x, s, f, $, i = !0) => {
2721
- let d = 0, c, { draggingKeys: E } = z, y = H(r);
2720
+ let p = (x, D = !0, E = "down") => kr(t.props.keyboardDelegate, t.state.collection, x, E, c === "rtl", D), C = (x, D = !0) => p(x, D, "up"), f = (x, D, E, y, i = !0) => {
2721
+ let d = 0, s, { draggingKeys: b } = z, $ = H(r);
2722
2722
  do {
2723
- let h = $(x, i);
2723
+ let h = y(x, i);
2724
2724
  if (!h) return null;
2725
- x = h, c = t.state.getDropOperation({
2725
+ x = h, s = t.state.getDropOperation({
2726
2726
  target: h,
2727
- types: s,
2728
- allowedOperations: f,
2729
- isInternal: y,
2730
- draggingKeys: E
2727
+ types: D,
2728
+ allowedOperations: E,
2729
+ isInternal: $,
2730
+ draggingKeys: b
2731
2731
  }), x.type === "root" && d++;
2732
- } while (c === "cancel" && !t.state.isDropTarget(x) && d < 2);
2733
- return c === "cancel" ? null : x;
2732
+ } while (s === "cancel" && !t.state.isDropTarget(x) && d < 2);
2733
+ return s === "cancel" ? null : x;
2734
2734
  };
2735
- return Bu({
2735
+ return Eu({
2736
2736
  element: r.current,
2737
2737
  preventFocusOnDrop: !0,
2738
- getDropOperation(x, s) {
2738
+ getDropOperation(x, D) {
2739
2739
  if (t.state.target) {
2740
- let { draggingKeys: $ } = z, i = H(r);
2740
+ let { draggingKeys: y } = z, i = H(r);
2741
2741
  return t.state.getDropOperation({
2742
2742
  target: t.state.target,
2743
2743
  types: x,
2744
- allowedOperations: s,
2744
+ allowedOperations: D,
2745
2745
  isInternal: i,
2746
- draggingKeys: $
2746
+ draggingKeys: y
2747
2747
  });
2748
2748
  }
2749
- return b(null, x, s, D) ? "move" : "cancel";
2749
+ return f(null, x, D, p) ? "move" : "cancel";
2750
2750
  },
2751
- onDropEnter(x, s) {
2752
- let f = q(s.items), $ = t.state.selectionManager, i = null;
2751
+ onDropEnter(x, D) {
2752
+ let E = G(D.items), y = t.state.selectionManager, i = null;
2753
2753
  Z(r);
2754
- let d = $.focusedKey, c = "after", E = d != null ? t.state.collection.getItem(d) : null;
2755
- if (E?.type === "cell" && (d = E.parentKey), d != null && $.isSelected(d) && ($.selectedKeys.size > 1 && $.firstSelectedKey === d ? c = "before" : d = $.lastSelectedKey), d != null) {
2754
+ let d = y.focusedKey, s = "after", b = d != null ? t.state.collection.getItem(d) : null;
2755
+ if (b?.type === "cell" && (d = b.parentKey), d != null && y.isSelected(d) && (y.selectedKeys.size > 1 && y.firstSelectedKey === d ? s = "before" : d = y.lastSelectedKey), d != null) {
2756
2756
  i = {
2757
2757
  type: "item",
2758
2758
  key: d,
2759
- dropPosition: c
2759
+ dropPosition: s
2760
2760
  };
2761
2761
  let { draggingKeys: h } = z, k = H(r);
2762
- var y;
2762
+ var $;
2763
2763
  t.state.getDropOperation({
2764
2764
  target: i,
2765
- types: f,
2766
- allowedOperations: s.allowedDropOperations,
2765
+ types: E,
2766
+ allowedOperations: D.allowedDropOperations,
2767
2767
  isInternal: k,
2768
2768
  draggingKeys: h
2769
- }) === "cancel" && (i = (y = b(i, f, s.allowedDropOperations, D, !1)) !== null && y !== void 0 ? y : b(i, f, s.allowedDropOperations, C, !1));
2769
+ }) === "cancel" && (i = ($ = f(i, E, D.allowedDropOperations, p, !1)) !== null && $ !== void 0 ? $ : f(i, E, D.allowedDropOperations, C, !1));
2770
2770
  }
2771
- i || (i = b(null, f, s.allowedDropOperations, D)), t.state.setTarget(i);
2771
+ i || (i = f(null, E, D.allowedDropOperations, p)), t.state.setTarget(i);
2772
2772
  },
2773
2773
  onDropExit() {
2774
2774
  Z(void 0), t.state.setTarget(null);
@@ -2776,71 +2776,71 @@ function hr(e, u, r) {
2776
2776
  onDropTargetEnter(x) {
2777
2777
  t.state.setTarget(x);
2778
2778
  },
2779
- onDropActivate(x, s) {
2780
- s?.type === "item" && s?.dropPosition === "on" && typeof t.props.onDropActivate == "function" && t.props.onDropActivate({
2779
+ onDropActivate(x, D) {
2780
+ D?.type === "item" && D?.dropPosition === "on" && typeof t.props.onDropActivate == "function" && t.props.onDropActivate({
2781
2781
  type: "dropactivate",
2782
2782
  x: x.x,
2783
2783
  y: x.y,
2784
- target: s
2784
+ target: D
2785
2785
  });
2786
2786
  },
2787
- onDrop(x, s) {
2788
- Z(r), t.state.target && p(x, s || t.state.target);
2787
+ onDrop(x, D) {
2788
+ Z(r), t.state.target && g(x, D || t.state.target);
2789
2789
  },
2790
- onKeyDown(x, s) {
2791
- var f, $;
2792
- let { keyboardDelegate: i } = t.props, d = q(s.items);
2790
+ onKeyDown(x, D) {
2791
+ var E, y;
2792
+ let { keyboardDelegate: i } = t.props, d = G(D.items);
2793
2793
  switch (x.key) {
2794
2794
  case "ArrowDown":
2795
2795
  if (i.getKeyBelow) {
2796
- let v = b(t.state.target, d, s.allowedDropOperations, (F, P) => D(F, P, "down"));
2796
+ let v = f(t.state.target, d, D.allowedDropOperations, (F, P) => p(F, P, "down"));
2797
2797
  t.state.setTarget(v);
2798
2798
  }
2799
2799
  break;
2800
2800
  case "ArrowUp":
2801
2801
  if (i.getKeyAbove) {
2802
- let v = b(t.state.target, d, s.allowedDropOperations, (F, P) => D(F, P, "up"));
2802
+ let v = f(t.state.target, d, D.allowedDropOperations, (F, P) => p(F, P, "up"));
2803
2803
  t.state.setTarget(v);
2804
2804
  }
2805
2805
  break;
2806
2806
  case "ArrowLeft":
2807
2807
  if (i.getKeyLeftOf) {
2808
- let v = b(t.state.target, d, s.allowedDropOperations, (F, P) => D(F, P, "left"));
2808
+ let v = f(t.state.target, d, D.allowedDropOperations, (F, P) => p(F, P, "left"));
2809
2809
  t.state.setTarget(v);
2810
2810
  }
2811
2811
  break;
2812
2812
  case "ArrowRight":
2813
2813
  if (i.getKeyRightOf) {
2814
- let v = b(t.state.target, d, s.allowedDropOperations, (F, P) => D(F, P, "right"));
2814
+ let v = f(t.state.target, d, D.allowedDropOperations, (F, P) => p(F, P, "right"));
2815
2815
  t.state.setTarget(v);
2816
2816
  }
2817
2817
  break;
2818
2818
  case "Home":
2819
2819
  if (i.getFirstKey) {
2820
- let v = b(null, d, s.allowedDropOperations, D);
2820
+ let v = f(null, d, D.allowedDropOperations, p);
2821
2821
  t.state.setTarget(v);
2822
2822
  }
2823
2823
  break;
2824
2824
  case "End":
2825
2825
  if (i.getLastKey) {
2826
- let v = b(null, d, s.allowedDropOperations, C);
2826
+ let v = f(null, d, D.allowedDropOperations, C);
2827
2827
  t.state.setTarget(v);
2828
2828
  }
2829
2829
  break;
2830
2830
  case "PageDown":
2831
2831
  if (i.getKeyPageBelow) {
2832
2832
  let v = t.state.target;
2833
- if (!v) v = b(null, d, s.allowedDropOperations, D);
2833
+ if (!v) v = f(null, d, D.allowedDropOperations, p);
2834
2834
  else {
2835
- var c, E;
2836
- let F = (c = i.getFirstKey) === null || c === void 0 ? void 0 : c.call(i);
2835
+ var s, b;
2836
+ let F = (s = i.getFirstKey) === null || s === void 0 ? void 0 : s.call(i);
2837
2837
  v.type === "item" && (F = v.key);
2838
2838
  let P = null;
2839
2839
  F != null && (P = i.getKeyPageBelow(F));
2840
2840
  let V = v.type === "item" ? v.dropPosition : "after";
2841
- if (P == null || v.type === "item" && v.key === ((E = i.getLastKey) === null || E === void 0 ? void 0 : E.call(i))) {
2842
- var y, h;
2843
- P = (h = (y = i.getLastKey) === null || y === void 0 ? void 0 : y.call(i)) !== null && h !== void 0 ? h : null, V = "after";
2841
+ if (P == null || v.type === "item" && v.key === ((b = i.getLastKey) === null || b === void 0 ? void 0 : b.call(i))) {
2842
+ var $, h;
2843
+ P = (h = ($ = i.getLastKey) === null || $ === void 0 ? void 0 : $.call(i)) !== null && h !== void 0 ? h : null, V = "after";
2844
2844
  }
2845
2845
  if (P == null) break;
2846
2846
  v = {
@@ -2848,15 +2848,15 @@ function hr(e, u, r) {
2848
2848
  key: P,
2849
2849
  dropPosition: V
2850
2850
  };
2851
- let { draggingCollectionRef: L, draggingKeys: M } = z, U = L?.current === r?.current, N = t.state.getDropOperation({
2851
+ let { draggingCollectionRef: R, draggingKeys: M } = z, U = R?.current === r?.current, N = t.state.getDropOperation({
2852
2852
  target: v,
2853
2853
  types: d,
2854
- allowedOperations: s.allowedDropOperations,
2854
+ allowedOperations: D.allowedDropOperations,
2855
2855
  isInternal: U,
2856
2856
  draggingKeys: M
2857
2857
  });
2858
2858
  var k;
2859
- N === "cancel" && (v = (k = b(v, d, s.allowedDropOperations, D, !1)) !== null && k !== void 0 ? k : b(v, d, s.allowedDropOperations, C, !1));
2859
+ N === "cancel" && (v = (k = f(v, d, D.allowedDropOperations, p, !1)) !== null && k !== void 0 ? k : f(v, d, D.allowedDropOperations, C, !1));
2860
2860
  }
2861
2861
  t.state.setTarget(v ?? t.state.target);
2862
2862
  }
@@ -2864,54 +2864,54 @@ function hr(e, u, r) {
2864
2864
  case "PageUp": {
2865
2865
  if (!i.getKeyPageAbove) break;
2866
2866
  let v = t.state.target;
2867
- if (!v) v = b(null, d, s.allowedDropOperations, C);
2867
+ if (!v) v = f(null, d, D.allowedDropOperations, C);
2868
2868
  else if (v.type === "item") {
2869
2869
  var T;
2870
2870
  if (v.key === ((T = i.getFirstKey) === null || T === void 0 ? void 0 : T.call(i))) v = {
2871
2871
  type: "root"
2872
2872
  };
2873
2873
  else {
2874
- let L = i.getKeyPageAbove(v.key), M = v.dropPosition;
2875
- if (L == null) {
2876
- var S;
2877
- L = (S = i.getFirstKey) === null || S === void 0 ? void 0 : S.call(i), M = "before";
2874
+ let R = i.getKeyPageAbove(v.key), M = v.dropPosition;
2875
+ if (R == null) {
2876
+ var K;
2877
+ R = (K = i.getFirstKey) === null || K === void 0 ? void 0 : K.call(i), M = "before";
2878
2878
  }
2879
- if (L == null) break;
2879
+ if (R == null) break;
2880
2880
  v = {
2881
2881
  type: "item",
2882
- key: L,
2882
+ key: R,
2883
2883
  dropPosition: M
2884
2884
  };
2885
2885
  }
2886
2886
  let { draggingKeys: F } = z, P = H(r), V = t.state.getDropOperation({
2887
2887
  target: v,
2888
2888
  types: d,
2889
- allowedOperations: s.allowedDropOperations,
2889
+ allowedOperations: D.allowedDropOperations,
2890
2890
  isInternal: P,
2891
2891
  draggingKeys: F
2892
2892
  });
2893
2893
  var O;
2894
- V === "cancel" && (v = (O = b(v, d, s.allowedDropOperations, C, !1)) !== null && O !== void 0 ? O : b(v, d, s.allowedDropOperations, D, !1));
2894
+ V === "cancel" && (v = (O = f(v, d, D.allowedDropOperations, C, !1)) !== null && O !== void 0 ? O : f(v, d, D.allowedDropOperations, p, !1));
2895
2895
  }
2896
2896
  t.state.setTarget(v ?? t.state.target);
2897
2897
  break;
2898
2898
  }
2899
2899
  }
2900
- (f = ($ = t.props).onKeyDown) === null || f === void 0 || f.call($, x);
2900
+ (E = (y = t.props).onKeyDown) === null || E === void 0 || E.call(y, x);
2901
2901
  }
2902
2902
  });
2903
2903
  }, [
2904
2904
  t,
2905
2905
  r,
2906
- p,
2907
- g
2906
+ g,
2907
+ c
2908
2908
  ]);
2909
- let B = uu();
2910
- return we.set(u, {
2909
+ let B = nu();
2910
+ return Oe.set(u, {
2911
2911
  id: B,
2912
2912
  ref: r
2913
2913
  }), {
2914
- collectionProps: Pe(a, {
2914
+ collectionProps: Ie(a, {
2915
2915
  id: B,
2916
2916
  // Remove description from collection element. If dropping on the entire collection,
2917
2917
  // there should be a drop indicator that has this description, so no need to double announce.
@@ -2919,20 +2919,20 @@ function hr(e, u, r) {
2919
2919
  })
2920
2920
  };
2921
2921
  }
2922
- function _u(e, u, r) {
2923
- let { dropProps: t } = Qu(), o = er(u);
2924
- R(() => {
2925
- if (r.current) return dr({
2922
+ function tt(e, u, r) {
2923
+ let { dropProps: t } = ut(), n = rr(u);
2924
+ L(() => {
2925
+ if (r.current) return pr({
2926
2926
  element: r.current,
2927
2927
  target: e.target,
2928
- getDropOperation(g, B) {
2929
- let { draggingKeys: D } = z, C = H(o);
2928
+ getDropOperation(c, B) {
2929
+ let { draggingKeys: p } = z, C = H(n);
2930
2930
  return u.getDropOperation({
2931
2931
  target: e.target,
2932
- types: g,
2932
+ types: c,
2933
2933
  allowedOperations: B,
2934
2934
  isInternal: C,
2935
- draggingKeys: D
2935
+ draggingKeys: p
2936
2936
  });
2937
2937
  },
2938
2938
  activateButtonRef: e.activateButtonRef
@@ -2941,86 +2941,86 @@ function _u(e, u, r) {
2941
2941
  r,
2942
2942
  e.target,
2943
2943
  u,
2944
- o,
2944
+ n,
2945
2945
  e.activateButtonRef
2946
2946
  ]);
2947
- let n = Ve(), { draggingKeys: a } = z, l = H(o), m = n && u.getDropOperation({
2947
+ let o = je(), { draggingKeys: a } = z, l = H(n), m = o && u.getDropOperation({
2948
2948
  target: e.target,
2949
- types: q(n.dragTarget.items),
2950
- allowedOperations: n.dragTarget.allowedDropOperations,
2949
+ types: G(o.dragTarget.items),
2950
+ allowedOperations: o.dragTarget.allowedDropOperations,
2951
2951
  isInternal: l,
2952
2952
  draggingKeys: a
2953
- }) !== "cancel", p = u.isDropTarget(e.target);
2954
- return R(() => {
2955
- n && p && r.current && r.current.focus();
2953
+ }) !== "cancel", g = u.isDropTarget(e.target);
2954
+ return L(() => {
2955
+ o && g && r.current && r.current.focus();
2956
2956
  }, [
2957
- p,
2958
- n,
2957
+ g,
2958
+ o,
2959
2959
  r
2960
2960
  ]), {
2961
2961
  dropProps: {
2962
2962
  ...t,
2963
- "aria-hidden": !n || m ? void 0 : "true"
2963
+ "aria-hidden": !o || m ? void 0 : "true"
2964
2964
  },
2965
- isDropTarget: p
2965
+ isDropTarget: g
2966
2966
  };
2967
2967
  }
2968
- function kr(e) {
2968
+ function Fr(e) {
2969
2969
  return e && e.__esModule ? e.default : e;
2970
2970
  }
2971
- function Ar(e, u, r) {
2972
- let { target: t } = e, { collection: o } = u, n = fe(kr(re), "@react-aria/dnd"), a = Ve(), { dropProps: l } = _u(e, u, r), m = uu(), p = (s) => {
2973
- var f, $, i, d;
2974
- return s == null ? "" : (d = (i = (f = o.getTextValue) === null || f === void 0 ? void 0 : f.call(o, s)) !== null && i !== void 0 ? i : ($ = o.getItem(s)) === null || $ === void 0 ? void 0 : $.textValue) !== null && d !== void 0 ? d : "";
2975
- }, g = "", B;
2971
+ function Sr(e, u, r) {
2972
+ let { target: t } = e, { collection: n } = u, o = Be(Fr(ne), "@react-aria/dnd"), a = je(), { dropProps: l } = tt(e, u, r), m = nu(), g = (D) => {
2973
+ var E, y, i, d;
2974
+ return D == null ? "" : (d = (i = (E = n.getTextValue) === null || E === void 0 ? void 0 : E.call(n, D)) !== null && i !== void 0 ? i : (y = n.getItem(D)) === null || y === void 0 ? void 0 : y.textValue) !== null && d !== void 0 ? d : "";
2975
+ }, c = "", B;
2976
2976
  if (t.type === "root")
2977
- g = n.format("dropOnRoot"), B = `${m} ${_t(u)}`;
2978
- else if (t.dropPosition === "on") g = n.format("dropOnItem", {
2979
- itemText: p(t.key)
2977
+ c = o.format("dropOnRoot"), B = `${m} ${tr(u)}`;
2978
+ else if (t.dropPosition === "on") c = o.format("dropOnItem", {
2979
+ itemText: g(t.key)
2980
2980
  });
2981
2981
  else {
2982
- let s, f;
2982
+ let D, E;
2983
2983
  if (t.dropPosition === "before") {
2984
- var D;
2985
- let $ = (D = o.getItem(t.key)) === null || D === void 0 ? void 0 : D.prevKey, i = $ != null ? o.getItem($) : null;
2986
- s = i?.type === "item" ? i.key : null;
2987
- } else s = t.key;
2984
+ var p;
2985
+ let y = (p = n.getItem(t.key)) === null || p === void 0 ? void 0 : p.prevKey, i = y != null ? n.getItem(y) : null;
2986
+ D = i?.type === "item" ? i.key : null;
2987
+ } else D = t.key;
2988
2988
  if (t.dropPosition === "after") {
2989
2989
  var C;
2990
- let $ = (C = o.getItem(t.key)) === null || C === void 0 ? void 0 : C.nextKey, i = $ != null ? o.getItem($) : null;
2991
- f = i?.type === "item" ? i.key : null;
2992
- } else f = t.key;
2993
- s != null && f != null ? g = n.format("insertBetween", {
2994
- beforeItemText: p(s),
2995
- afterItemText: p(f)
2996
- }) : s != null ? g = n.format("insertAfter", {
2997
- itemText: p(s)
2998
- }) : f != null && (g = n.format("insertBefore", {
2999
- itemText: p(f)
2990
+ let y = (C = n.getItem(t.key)) === null || C === void 0 ? void 0 : C.nextKey, i = y != null ? n.getItem(y) : null;
2991
+ E = i?.type === "item" ? i.key : null;
2992
+ } else E = t.key;
2993
+ D != null && E != null ? c = o.format("insertBetween", {
2994
+ beforeItemText: g(D),
2995
+ afterItemText: g(E)
2996
+ }) : D != null ? c = o.format("insertAfter", {
2997
+ itemText: g(D)
2998
+ }) : E != null && (c = o.format("insertBefore", {
2999
+ itemText: g(E)
3000
3000
  }));
3001
3001
  }
3002
- let b = u.isDropTarget(t), x = a ? l["aria-hidden"] : "true";
3002
+ let f = u.isDropTarget(t), x = a ? l["aria-hidden"] : "true";
3003
3003
  return {
3004
3004
  dropIndicatorProps: {
3005
3005
  ...l,
3006
3006
  id: m,
3007
- "aria-roledescription": n.format("dropIndicator"),
3008
- "aria-label": g,
3007
+ "aria-roledescription": o.format("dropIndicator"),
3008
+ "aria-label": c,
3009
3009
  "aria-labelledby": B,
3010
3010
  "aria-hidden": x,
3011
3011
  tabIndex: -1
3012
3012
  },
3013
- isDropTarget: b,
3013
+ isDropTarget: f,
3014
3014
  // If aria-hidden, we are either not in a drag session or the drop target is invalid.
3015
3015
  // In that case, there's no need to render anything at all unless we need to show the indicator visually.
3016
3016
  // This can happen when dragging using the native DnD API as opposed to keyboard dragging.
3017
- isHidden: !b && !!x
3017
+ isHidden: !f && !!x
3018
3018
  };
3019
3019
  }
3020
- function Tr(e) {
3020
+ function Kr(e) {
3021
3021
  return e && e.__esModule ? e.default : e;
3022
3022
  }
3023
- const Fr = {
3023
+ const Pr = {
3024
3024
  keyboard: {
3025
3025
  selected: "dragSelectedKeyboard",
3026
3026
  notSelected: "dragDescriptionKeyboard"
@@ -3034,80 +3034,80 @@ const Fr = {
3034
3034
  notSelected: "dragDescriptionVirtual"
3035
3035
  }
3036
3036
  };
3037
- function Sr(e, u) {
3038
- let r = fe(Tr(re), "@react-aria/dnd"), t = u.isDisabled || u.selectionManager.isDisabled(e.key), { dragProps: o, dragButtonProps: n } = br({
3037
+ function Ir(e, u) {
3038
+ let r = Be(Kr(ne), "@react-aria/dnd"), t = u.isDisabled || u.selectionManager.isDisabled(e.key), { dragProps: n, dragButtonProps: o } = Cr({
3039
3039
  getItems() {
3040
3040
  return u.getItems(e.key);
3041
3041
  },
3042
3042
  preview: u.preview,
3043
3043
  getAllowedDropOperations: u.getAllowedDropOperations,
3044
3044
  hasDragButton: e.hasDragButton,
3045
- onDragStart(f) {
3046
- u.startDrag(e.key, f), ar(u.draggingKeys);
3045
+ onDragStart(E) {
3046
+ u.startDrag(e.key, E), sr(u.draggingKeys);
3047
3047
  },
3048
- onDragMove(f) {
3049
- u.moveDrag(f);
3048
+ onDragMove(E) {
3049
+ u.moveDrag(E);
3050
3050
  },
3051
- onDragEnd(f) {
3052
- let { dropOperation: $ } = f, i = $ === "cancel" ? !1 : H();
3051
+ onDragEnd(E) {
3052
+ let { dropOperation: y } = E, i = y === "cancel" ? !1 : H();
3053
3053
  u.endDrag({
3054
- ...f,
3054
+ ...E,
3055
3055
  keys: u.draggingKeys,
3056
3056
  isInternal: i
3057
- }), fu();
3057
+ }), bu();
3058
3058
  }
3059
- }), a = u.collection.getItem(e.key), l = u.getKeysForDrag(e.key).size, m = l > 1 && u.selectionManager.isSelected(e.key), p, g, B = Oe();
3059
+ }), a = u.collection.getItem(e.key), l = u.getKeysForDrag(e.key).size, m = l > 1 && u.selectionManager.isSelected(e.key), g, c, B = Ve();
3060
3060
  if (!e.hasDragButton && u.selectionManager.selectionMode !== "none") {
3061
- let f = Fr[B][m ? "selected" : "notSelected"];
3062
- e.hasAction && B === "keyboard" && (f += "Alt"), m ? g = r.format(f, {
3061
+ let E = Pr[B][m ? "selected" : "notSelected"];
3062
+ e.hasAction && B === "keyboard" && (E += "Alt"), m ? c = r.format(E, {
3063
3063
  count: l
3064
- }) : g = r.format(f), delete o.onClick;
3065
- } else if (m) p = r.format("dragSelectedItems", {
3064
+ }) : c = r.format(E), delete n.onClick;
3065
+ } else if (m) g = r.format("dragSelectedItems", {
3066
3066
  count: l
3067
3067
  });
3068
3068
  else {
3069
- var D, C, b, x;
3070
- let f = (x = (b = (D = (C = u.collection).getTextValue) === null || D === void 0 ? void 0 : D.call(C, e.key)) !== null && b !== void 0 ? b : a?.textValue) !== null && x !== void 0 ? x : "";
3071
- p = r.format("dragItem", {
3072
- itemText: f
3069
+ var p, C, f, x;
3070
+ let E = (x = (f = (p = (C = u.collection).getTextValue) === null || p === void 0 ? void 0 : p.call(C, e.key)) !== null && f !== void 0 ? f : a?.textValue) !== null && x !== void 0 ? x : "";
3071
+ g = r.format("dragItem", {
3072
+ itemText: E
3073
3073
  });
3074
3074
  }
3075
- let s = ze(g);
3076
- if (g && Object.assign(o, s), !e.hasDragButton && e.hasAction) {
3077
- let { onKeyDownCapture: f, onKeyUpCapture: $ } = o;
3078
- B === "touch" && delete o["aria-describedby"], o.onKeyDownCapture = (i) => {
3079
- i.altKey && f?.(i);
3080
- }, o.onKeyUpCapture = (i) => {
3081
- i.altKey && $?.(i);
3075
+ let D = we(c);
3076
+ if (c && Object.assign(n, D), !e.hasDragButton && e.hasAction) {
3077
+ let { onKeyDownCapture: E, onKeyUpCapture: y } = n;
3078
+ B === "touch" && delete n["aria-describedby"], n.onKeyDownCapture = (i) => {
3079
+ i.altKey && E?.(i);
3080
+ }, n.onKeyUpCapture = (i) => {
3081
+ i.altKey && y?.(i);
3082
3082
  };
3083
3083
  }
3084
3084
  return {
3085
- dragProps: t ? {} : o,
3085
+ dragProps: t ? {} : n,
3086
3086
  dragButtonProps: {
3087
- ...n,
3087
+ ...o,
3088
3088
  isDisabled: t,
3089
- "aria-label": p
3089
+ "aria-label": g
3090
3090
  }
3091
3091
  };
3092
3092
  }
3093
- function Kr(e, u, r) {
3093
+ function zr(e, u, r) {
3094
3094
  let { draggingCollectionRef: t } = z;
3095
- u.draggingKeys.size > 0 && t?.current !== r.current && ir(r);
3095
+ u.draggingKeys.size > 0 && t?.current !== r.current && dr(r);
3096
3096
  }
3097
- const Pr = /* @__PURE__ */ A.forwardRef(function(u, r) {
3098
- let t = u.children, [o, n] = X(null), a = K(null), l = K(void 0);
3099
- return lt(r, () => (m, p) => {
3100
- let g = t(m), B, D, C;
3101
- g && typeof g == "object" && "element" in g ? (B = g.element, D = g.x, C = g.y) : B = g, qt(() => {
3102
- n(B);
3103
- }), p(a.current, D, C), l.current = requestAnimationFrame(() => {
3104
- n(null);
3097
+ const wr = /* @__PURE__ */ A.forwardRef(function(u, r) {
3098
+ let t = u.children, [n, o] = X(null), a = S(null), l = S(void 0);
3099
+ return ct(r, () => (m, g) => {
3100
+ let c = t(m), B, p, C;
3101
+ c && typeof c == "object" && "element" in c ? (B = c.element, p = c.x, C = c.y) : B = c, Zt(() => {
3102
+ o(B);
3103
+ }), g(a.current, p, C), l.current = requestAnimationFrame(() => {
3104
+ o(null);
3105
3105
  });
3106
3106
  }, [
3107
3107
  t
3108
- ]), R(() => () => {
3108
+ ]), L(() => () => {
3109
3109
  l.current && cancelAnimationFrame(l.current);
3110
- }, []), o ? /* @__PURE__ */ A.createElement("div", {
3110
+ }, []), n ? /* @__PURE__ */ A.createElement("div", {
3111
3111
  style: {
3112
3112
  zIndex: -100,
3113
3113
  position: "absolute",
@@ -3115,9 +3115,9 @@ const Pr = /* @__PURE__ */ A.forwardRef(function(u, r) {
3115
3115
  left: -1e5
3116
3116
  },
3117
3117
  ref: a
3118
- }, o) : null;
3118
+ }, n) : null;
3119
3119
  });
3120
- class Ir {
3120
+ class Or {
3121
3121
  getPrimaryStart(u) {
3122
3122
  return this.orientation === "horizontal" ? u.left : u.top;
3123
3123
  }
@@ -3140,43 +3140,43 @@ class Ir {
3140
3140
  return this.getFlowEnd(u) - this.getFlowStart(u);
3141
3141
  }
3142
3142
  getDropTargetFromPoint(u, r, t) {
3143
- var o;
3143
+ var n;
3144
3144
  if (this.collection[Symbol.iterator]().next().done || !this.ref.current) return {
3145
3145
  type: "root"
3146
3146
  };
3147
- let n = this.ref.current.getBoundingClientRect(), a = this.orientation === "horizontal" ? u : r, l = this.orientation === "horizontal" ? r : u;
3148
- a += this.getPrimaryStart(n), l += this.getSecondaryStart(n);
3149
- let m = this.layout === "stack" ? a : l, p = this.orientation === "horizontal" && this.direction === "rtl", g = this.layout === "grid" && this.orientation === "vertical" && this.direction === "rtl", B = this.layout === "stack" ? p : g, D = (o = this.ref.current) === null || o === void 0 ? void 0 : o.dataset.collection, C = this.ref.current.querySelectorAll(D ? `[data-collection="${CSS.escape(D)}"]` : "[data-key]"), b = /* @__PURE__ */ new Map();
3150
- for (let d of C) d instanceof HTMLElement && d.dataset.key != null && b.set(d.dataset.key, d);
3147
+ let o = this.ref.current.getBoundingClientRect(), a = this.orientation === "horizontal" ? u : r, l = this.orientation === "horizontal" ? r : u;
3148
+ a += this.getPrimaryStart(o), l += this.getSecondaryStart(o);
3149
+ let m = this.layout === "stack" ? a : l, g = this.orientation === "horizontal" && this.direction === "rtl", c = this.layout === "grid" && this.orientation === "vertical" && this.direction === "rtl", B = this.layout === "stack" ? g : c, p = (n = this.ref.current) === null || n === void 0 ? void 0 : n.dataset.collection, C = this.ref.current.querySelectorAll(p ? `[data-collection="${CSS.escape(p)}"]` : "[data-key]"), f = /* @__PURE__ */ new Map();
3150
+ for (let d of C) d instanceof HTMLElement && d.dataset.key != null && f.set(d.dataset.key, d);
3151
3151
  let x = [
3152
3152
  ...this.collection
3153
- ].filter((d) => d.type === "item"), s = 0, f = x.length;
3154
- for (; s < f; ) {
3155
- let d = Math.floor((s + f) / 2), c = x[d], E = b.get(String(c.key));
3156
- if (!E) break;
3157
- let y = E.getBoundingClientRect(), h = (k) => {
3158
- k ? s = d + 1 : f = d;
3153
+ ].filter((d) => d.type === "item"), D = 0, E = x.length;
3154
+ for (; D < E; ) {
3155
+ let d = Math.floor((D + E) / 2), s = x[d], b = f.get(String(s.key));
3156
+ if (!b) break;
3157
+ let $ = b.getBoundingClientRect(), h = (k) => {
3158
+ k ? D = d + 1 : E = d;
3159
3159
  };
3160
- if (a < this.getPrimaryStart(y)) h(p);
3161
- else if (a > this.getPrimaryEnd(y)) h(!p);
3162
- else if (l < this.getSecondaryStart(y)) h(g);
3163
- else if (l > this.getSecondaryEnd(y)) h(!g);
3160
+ if (a < this.getPrimaryStart($)) h(g);
3161
+ else if (a > this.getPrimaryEnd($)) h(!g);
3162
+ else if (l < this.getSecondaryStart($)) h(c);
3163
+ else if (l > this.getSecondaryEnd($)) h(!c);
3164
3164
  else {
3165
3165
  let k = {
3166
3166
  type: "item",
3167
- key: c.key,
3167
+ key: s.key,
3168
3168
  dropPosition: "on"
3169
3169
  };
3170
3170
  if (t(k))
3171
- m <= this.getFlowStart(y) + 5 && t({
3171
+ m <= this.getFlowStart($) + 5 && t({
3172
3172
  ...k,
3173
3173
  dropPosition: "before"
3174
- }) ? k.dropPosition = B ? "after" : "before" : m >= this.getFlowEnd(y) - 5 && t({
3174
+ }) ? k.dropPosition = B ? "after" : "before" : m >= this.getFlowEnd($) - 5 && t({
3175
3175
  ...k,
3176
3176
  dropPosition: "after"
3177
3177
  }) && (k.dropPosition = B ? "before" : "after");
3178
3178
  else {
3179
- let T = this.getFlowStart(y) + this.getFlowSize(y) / 2;
3179
+ let T = this.getFlowStart($) + this.getFlowSize($) / 2;
3180
3180
  m <= T && t({
3181
3181
  ...k,
3182
3182
  dropPosition: "before"
@@ -3188,14 +3188,14 @@ class Ir {
3188
3188
  return k;
3189
3189
  }
3190
3190
  }
3191
- let $ = x[Math.min(s, x.length - 1)], i = b.get(String($.key));
3192
- return n = i?.getBoundingClientRect(), n && (a < this.getPrimaryStart(n) || Math.abs(m - this.getFlowStart(n)) < Math.abs(m - this.getFlowEnd(n))) ? {
3191
+ let y = x[Math.min(D, x.length - 1)], i = f.get(String(y.key));
3192
+ return o = i?.getBoundingClientRect(), o && (a < this.getPrimaryStart(o) || Math.abs(m - this.getFlowStart(o)) < Math.abs(m - this.getFlowEnd(o))) ? {
3193
3193
  type: "item",
3194
- key: $.key,
3194
+ key: y.key,
3195
3195
  dropPosition: B ? "after" : "before"
3196
3196
  } : {
3197
3197
  type: "item",
3198
- key: $.key,
3198
+ key: y.key,
3199
3199
  dropPosition: B ? "before" : "after"
3200
3200
  };
3201
3201
  }
@@ -3203,96 +3203,96 @@ class Ir {
3203
3203
  this.collection = u, this.ref = r, this.layout = t?.layout || "stack", this.orientation = t?.orientation || "vertical", this.direction = t?.direction || "ltr";
3204
3204
  }
3205
3205
  }
3206
- function zr(e, u) {
3206
+ function Vr(e, u) {
3207
3207
  let { key: r } = e;
3208
- const { checkboxProps: t } = St(e, u);
3208
+ const { checkboxProps: t } = It(e, u);
3209
3209
  return {
3210
3210
  checkboxProps: {
3211
3211
  ...t,
3212
- "aria-labelledby": `${t.id} ${At(u, r)}`
3212
+ "aria-labelledby": `${t.id} ${St(u, r)}`
3213
3213
  }
3214
3214
  };
3215
3215
  }
3216
- function wr(e) {
3217
- let { getItems: u, isDisabled: r, collection: t, selectionManager: o, onDragStart: n, onDragMove: a, onDragEnd: l, preview: m, getAllowedDropOperations: p } = e, [, g] = X(!1), B = K(/* @__PURE__ */ new Set()), D = K(null), C = (b) => {
3216
+ function jr(e) {
3217
+ let { getItems: u, isDisabled: r, collection: t, selectionManager: n, onDragStart: o, onDragMove: a, onDragEnd: l, preview: m, getAllowedDropOperations: g } = e, [, c] = X(!1), B = S(/* @__PURE__ */ new Set()), p = S(null), C = (f) => {
3218
3218
  let x = /* @__PURE__ */ new Set();
3219
- if (o.isSelected(b)) for (let s of o.selectedKeys) {
3220
- let f = t.getItem(s);
3221
- if (f) {
3222
- let $ = !1, i = f.parentKey;
3219
+ if (n.isSelected(f)) for (let D of n.selectedKeys) {
3220
+ let E = t.getItem(D);
3221
+ if (E) {
3222
+ let y = !1, i = E.parentKey;
3223
3223
  for (; i != null; ) {
3224
- if (o.selectedKeys.has(i)) {
3225
- $ = !0;
3224
+ if (n.selectedKeys.has(i)) {
3225
+ y = !0;
3226
3226
  break;
3227
3227
  }
3228
3228
  let d = t.getItem(i);
3229
3229
  i = d ? d.parentKey : null;
3230
3230
  }
3231
- $ || x.add(s);
3231
+ y || x.add(D);
3232
3232
  }
3233
3233
  }
3234
- else x.add(b);
3234
+ else x.add(f);
3235
3235
  return x;
3236
3236
  };
3237
3237
  return {
3238
3238
  collection: t,
3239
- selectionManager: o,
3239
+ selectionManager: n,
3240
3240
  get draggedKey() {
3241
- return D.current;
3241
+ return p.current;
3242
3242
  },
3243
3243
  get draggingKeys() {
3244
3244
  return B.current;
3245
3245
  },
3246
- isDragging(b) {
3247
- return B.current.has(b);
3246
+ isDragging(f) {
3247
+ return B.current.has(f);
3248
3248
  },
3249
3249
  getKeysForDrag: C,
3250
- getItems(b) {
3251
- let x = C(b), s = [];
3252
- for (let $ of x) {
3253
- var f;
3254
- let i = (f = t.getItem($)) === null || f === void 0 ? void 0 : f.value;
3255
- i != null && s.push(i);
3250
+ getItems(f) {
3251
+ let x = C(f), D = [];
3252
+ for (let y of x) {
3253
+ var E;
3254
+ let i = (E = t.getItem(y)) === null || E === void 0 ? void 0 : E.value;
3255
+ i != null && D.push(i);
3256
3256
  }
3257
- return u(C(b), s);
3257
+ return u(C(f), D);
3258
3258
  },
3259
3259
  isDisabled: r,
3260
3260
  preview: m,
3261
- getAllowedDropOperations: p,
3262
- startDrag(b, x) {
3263
- let s = C(b);
3264
- B.current = s, D.current = b, o.setFocused(!1), g(!0), typeof n == "function" && n({
3261
+ getAllowedDropOperations: g,
3262
+ startDrag(f, x) {
3263
+ let D = C(f);
3264
+ B.current = D, p.current = f, n.setFocused(!1), c(!0), typeof o == "function" && o({
3265
3265
  ...x,
3266
- keys: s
3266
+ keys: D
3267
3267
  });
3268
3268
  },
3269
- moveDrag(b) {
3269
+ moveDrag(f) {
3270
3270
  typeof a == "function" && a({
3271
- ...b,
3271
+ ...f,
3272
3272
  keys: B.current
3273
3273
  });
3274
3274
  },
3275
- endDrag(b) {
3276
- let { isInternal: x } = b;
3275
+ endDrag(f) {
3276
+ let { isInternal: x } = f;
3277
3277
  typeof l == "function" && l({
3278
- ...b,
3278
+ ...f,
3279
3279
  keys: B.current,
3280
3280
  isInternal: x
3281
- }), B.current = /* @__PURE__ */ new Set(), D.current = null, g(!1);
3281
+ }), B.current = /* @__PURE__ */ new Set(), p.current = null, c(!1);
3282
3282
  }
3283
3283
  };
3284
3284
  }
3285
- function Or(e) {
3286
- let { acceptedDragTypes: u = "all", isDisabled: r, onInsert: t, onRootDrop: o, onItemDrop: n, onReorder: a, onMove: l, shouldAcceptItemDrop: m, collection: p, selectionManager: g, onDropEnter: B, getDropOperation: D, onDrop: C } = e, [b, x] = X(null), s = K(null), f = (i) => {
3285
+ function Lr(e) {
3286
+ let { acceptedDragTypes: u = "all", isDisabled: r, onInsert: t, onRootDrop: n, onItemDrop: o, onReorder: a, onMove: l, shouldAcceptItemDrop: m, collection: g, selectionManager: c, onDropEnter: B, getDropOperation: p, onDrop: C } = e, [f, x] = X(null), D = S(null), E = (i) => {
3287
3287
  if (i.dropPosition === "before") {
3288
- let d = p.getItem(i.key);
3288
+ let d = g.getItem(i.key);
3289
3289
  return d && d.prevKey != null ? {
3290
3290
  type: "item",
3291
3291
  key: d.prevKey,
3292
3292
  dropPosition: "after"
3293
3293
  } : null;
3294
3294
  } else if (i.dropPosition === "after") {
3295
- let d = p.getItem(i.key);
3295
+ let d = g.getItem(i.key);
3296
3296
  return d && d.nextKey != null ? {
3297
3297
  type: "item",
3298
3298
  key: d.nextKey,
@@ -3300,36 +3300,36 @@ function Or(e) {
3300
3300
  } : null;
3301
3301
  }
3302
3302
  return null;
3303
- }, $ = J((i) => {
3304
- let { target: d, types: c, allowedOperations: E, isInternal: y, draggingKeys: h } = i;
3303
+ }, y = J((i) => {
3304
+ let { target: d, types: s, allowedOperations: b, isInternal: $, draggingKeys: h } = i;
3305
3305
  if (r || !d) return "cancel";
3306
- if (u === "all" || u.some((k) => c.has(k))) {
3307
- let k = t && d.type === "item" && !y && (d.dropPosition === "before" || d.dropPosition === "after"), T = a && d.type === "item" && y && (d.dropPosition === "before" || d.dropPosition === "after") && Vr(p, d, h), S = d.type !== "item" || d.dropPosition !== "on" || !m || m(d, c), O = l && d.type === "item" && y && S, v = o && d.type === "root" && !y, F = n && d.type === "item" && d.dropPosition === "on" && !(y && d.key != null && h.has(d.key)) && S;
3306
+ if (u === "all" || u.some((k) => s.has(k))) {
3307
+ let k = t && d.type === "item" && !$ && (d.dropPosition === "before" || d.dropPosition === "after"), T = a && d.type === "item" && $ && (d.dropPosition === "before" || d.dropPosition === "after") && Rr(g, d, h), K = d.type !== "item" || d.dropPosition !== "on" || !m || m(d, s), O = l && d.type === "item" && $ && K, v = n && d.type === "root" && !$, F = o && d.type === "item" && d.dropPosition === "on" && !($ && d.key != null && h.has(d.key)) && K;
3308
3308
  if (C || k || T || O || v || F)
3309
- return D ? D(d, c, E) : E[0];
3309
+ return p ? p(d, s, b) : b[0];
3310
3310
  }
3311
3311
  return "cancel";
3312
3312
  }, [
3313
3313
  r,
3314
- p,
3314
+ g,
3315
3315
  u,
3316
- D,
3316
+ p,
3317
3317
  t,
3318
- o,
3319
3318
  n,
3319
+ o,
3320
3320
  m,
3321
3321
  a,
3322
3322
  l,
3323
3323
  C
3324
3324
  ]);
3325
3325
  return {
3326
- collection: p,
3327
- selectionManager: g,
3326
+ collection: g,
3327
+ selectionManager: c,
3328
3328
  isDisabled: r,
3329
- target: b,
3329
+ target: f,
3330
3330
  setTarget(i) {
3331
3331
  if (this.isDropTarget(i)) return;
3332
- let d = s.current;
3332
+ let d = D.current;
3333
3333
  d && typeof e.onDropExit == "function" && e.onDropExit({
3334
3334
  type: "dropexit",
3335
3335
  x: 0,
@@ -3340,18 +3340,18 @@ function Or(e) {
3340
3340
  x: 0,
3341
3341
  y: 0,
3342
3342
  target: i
3343
- }), s.current = i ?? null, x(i ?? null);
3343
+ }), D.current = i ?? null, x(i ?? null);
3344
3344
  },
3345
3345
  isDropTarget(i) {
3346
- let d = s.current;
3347
- return !d || !i ? !1 : ve(i, d) ? !0 : i?.type === "item" && d?.type === "item" && i.key !== d.key && i.dropPosition !== d.dropPosition && i.dropPosition !== "on" && d.dropPosition !== "on" ? ve(f(i), d) || ve(i, f(d)) : !1;
3346
+ let d = D.current;
3347
+ return !d || !i ? !1 : he(i, d) ? !0 : i?.type === "item" && d?.type === "item" && i.key !== d.key && i.dropPosition !== d.dropPosition && i.dropPosition !== "on" && d.dropPosition !== "on" ? he(E(i), d) || he(i, E(d)) : !1;
3348
3348
  },
3349
3349
  getDropOperation(i) {
3350
- return $(i);
3350
+ return y(i);
3351
3351
  }
3352
3352
  };
3353
3353
  }
3354
- function ve(e, u) {
3354
+ function he(e, u) {
3355
3355
  if (!e) return !u;
3356
3356
  switch (e.type) {
3357
3357
  case "root":
@@ -3360,174 +3360,174 @@ function ve(e, u) {
3360
3360
  return u?.type === "item" && u?.key === e.key && u?.dropPosition === e.dropPosition;
3361
3361
  }
3362
3362
  }
3363
- function Vr(e, u, r) {
3363
+ function Rr(e, u, r) {
3364
3364
  let t = e.getItem(u.key);
3365
- for (let o of r) {
3366
- let n = e.getItem(o);
3367
- if (n?.parentKey !== t?.parentKey) return !1;
3365
+ for (let n of r) {
3366
+ let o = e.getItem(n);
3367
+ if (o?.parentKey !== t?.parentKey) return !1;
3368
3368
  }
3369
3369
  return !0;
3370
3370
  }
3371
- function jr(e) {
3372
- let { initialItems: u = [], initialSelectedKeys: r, getKey: t = (p) => {
3373
- var g;
3374
- return (g = p.id) !== null && g !== void 0 ? g : p.key;
3375
- }, filter: o, initialFilterText: n = "" } = e, [a, l] = X({
3371
+ function Mr(e) {
3372
+ let { initialItems: u = [], initialSelectedKeys: r, getKey: t = (g) => {
3373
+ var c;
3374
+ return (c = g.id) !== null && c !== void 0 ? c : g.key;
3375
+ }, filter: n, initialFilterText: o = "" } = e, [a, l] = X({
3376
3376
  items: u,
3377
3377
  selectedKeys: r === "all" ? "all" : new Set(r || []),
3378
- filterText: n
3379
- }), m = Se(() => o ? a.items.filter((p) => o(p, a.filterText)) : a.items, [
3378
+ filterText: o
3379
+ }), m = Ke(() => n ? a.items.filter((g) => n(g, a.filterText)) : a.items, [
3380
3380
  a.items,
3381
3381
  a.filterText,
3382
- o
3382
+ n
3383
3383
  ]);
3384
3384
  return {
3385
3385
  ...a,
3386
3386
  items: m,
3387
- ...Lr({
3387
+ ...Nr({
3388
3388
  getKey: t
3389
3389
  }, l),
3390
- getItem(p) {
3391
- return a.items.find((g) => t(g) === p);
3390
+ getItem(g) {
3391
+ return a.items.find((c) => t(c) === g);
3392
3392
  }
3393
3393
  };
3394
3394
  }
3395
- function Lr(e, u) {
3395
+ function Nr(e, u) {
3396
3396
  let { cursor: r, getKey: t } = e;
3397
3397
  return {
3398
- setSelectedKeys(o) {
3399
- u((n) => ({
3400
- ...n,
3401
- selectedKeys: o
3398
+ setSelectedKeys(n) {
3399
+ u((o) => ({
3400
+ ...o,
3401
+ selectedKeys: n
3402
3402
  }));
3403
3403
  },
3404
- addKeysToSelection(o) {
3405
- u((n) => n.selectedKeys === "all" ? n : o === "all" ? {
3406
- ...n,
3404
+ addKeysToSelection(n) {
3405
+ u((o) => o.selectedKeys === "all" ? o : n === "all" ? {
3406
+ ...o,
3407
3407
  selectedKeys: "all"
3408
3408
  } : {
3409
- ...n,
3409
+ ...o,
3410
3410
  selectedKeys: /* @__PURE__ */ new Set([
3411
- ...n.selectedKeys,
3412
- ...o
3411
+ ...o.selectedKeys,
3412
+ ...n
3413
3413
  ])
3414
3414
  });
3415
3415
  },
3416
- removeKeysFromSelection(o) {
3417
- u((n) => {
3418
- if (o === "all") return {
3419
- ...n,
3416
+ removeKeysFromSelection(n) {
3417
+ u((o) => {
3418
+ if (n === "all") return {
3419
+ ...o,
3420
3420
  selectedKeys: /* @__PURE__ */ new Set()
3421
3421
  };
3422
- let a = n.selectedKeys === "all" ? new Set(n.items.map(t)) : new Set(n.selectedKeys);
3423
- for (let l of o) a.delete(l);
3422
+ let a = o.selectedKeys === "all" ? new Set(o.items.map(t)) : new Set(o.selectedKeys);
3423
+ for (let l of n) a.delete(l);
3424
3424
  return {
3425
- ...n,
3425
+ ...o,
3426
3426
  selectedKeys: a
3427
3427
  };
3428
3428
  });
3429
3429
  },
3430
- setFilterText(o) {
3431
- u((n) => ({
3432
- ...n,
3433
- filterText: o
3430
+ setFilterText(n) {
3431
+ u((o) => ({
3432
+ ...o,
3433
+ filterText: n
3434
3434
  }));
3435
3435
  },
3436
- insert(o, ...n) {
3437
- u((a) => ee(a, o, ...n));
3436
+ insert(n, ...o) {
3437
+ u((a) => ue(a, n, ...o));
3438
3438
  },
3439
- insertBefore(o, ...n) {
3439
+ insertBefore(n, ...o) {
3440
3440
  u((a) => {
3441
- let l = a.items.findIndex((m) => t?.(m) === o);
3441
+ let l = a.items.findIndex((m) => t?.(m) === n);
3442
3442
  if (l === -1)
3443
3443
  if (a.items.length === 0) l = 0;
3444
3444
  else return a;
3445
- return ee(a, l, ...n);
3445
+ return ue(a, l, ...o);
3446
3446
  });
3447
3447
  },
3448
- insertAfter(o, ...n) {
3448
+ insertAfter(n, ...o) {
3449
3449
  u((a) => {
3450
- let l = a.items.findIndex((m) => t?.(m) === o);
3450
+ let l = a.items.findIndex((m) => t?.(m) === n);
3451
3451
  if (l === -1)
3452
3452
  if (a.items.length === 0) l = 0;
3453
3453
  else return a;
3454
- return ee(a, l + 1, ...n);
3454
+ return ue(a, l + 1, ...o);
3455
3455
  });
3456
3456
  },
3457
- prepend(...o) {
3458
- u((n) => ee(n, 0, ...o));
3457
+ prepend(...n) {
3458
+ u((o) => ue(o, 0, ...n));
3459
3459
  },
3460
- append(...o) {
3461
- u((n) => ee(n, n.items.length, ...o));
3460
+ append(...n) {
3461
+ u((o) => ue(o, o.items.length, ...n));
3462
3462
  },
3463
- remove(...o) {
3464
- u((n) => {
3465
- let a = new Set(o), l = n.items.filter((p) => !a.has(t(p))), m = "all";
3466
- if (n.selectedKeys !== "all") {
3467
- m = new Set(n.selectedKeys);
3468
- for (let p of o) m.delete(p);
3463
+ remove(...n) {
3464
+ u((o) => {
3465
+ let a = new Set(n), l = o.items.filter((g) => !a.has(t(g))), m = "all";
3466
+ if (o.selectedKeys !== "all") {
3467
+ m = new Set(o.selectedKeys);
3468
+ for (let g of n) m.delete(g);
3469
3469
  }
3470
3470
  return r == null && l.length === 0 && (m = /* @__PURE__ */ new Set()), {
3471
- ...n,
3471
+ ...o,
3472
3472
  items: l,
3473
3473
  selectedKeys: m
3474
3474
  };
3475
3475
  });
3476
3476
  },
3477
3477
  removeSelectedItems() {
3478
- u((o) => {
3479
- if (o.selectedKeys === "all") return {
3480
- ...o,
3478
+ u((n) => {
3479
+ if (n.selectedKeys === "all") return {
3480
+ ...n,
3481
3481
  items: [],
3482
3482
  selectedKeys: /* @__PURE__ */ new Set()
3483
3483
  };
3484
- let n = o.selectedKeys, a = o.items.filter((l) => !n.has(t(l)));
3484
+ let o = n.selectedKeys, a = n.items.filter((l) => !o.has(t(l)));
3485
3485
  return {
3486
- ...o,
3486
+ ...n,
3487
3487
  items: a,
3488
3488
  selectedKeys: /* @__PURE__ */ new Set()
3489
3489
  };
3490
3490
  });
3491
3491
  },
3492
- move(o, n) {
3492
+ move(n, o) {
3493
3493
  u((a) => {
3494
- let l = a.items.findIndex((g) => t(g) === o);
3494
+ let l = a.items.findIndex((c) => t(c) === n);
3495
3495
  if (l === -1) return a;
3496
- let m = a.items.slice(), [p] = m.splice(l, 1);
3497
- return m.splice(n, 0, p), {
3496
+ let m = a.items.slice(), [g] = m.splice(l, 1);
3497
+ return m.splice(o, 0, g), {
3498
3498
  ...a,
3499
3499
  items: m
3500
3500
  };
3501
3501
  });
3502
3502
  },
3503
- moveBefore(o, n) {
3503
+ moveBefore(n, o) {
3504
3504
  u((a) => {
3505
- let l = a.items.findIndex((g) => t(g) === o);
3505
+ let l = a.items.findIndex((c) => t(c) === n);
3506
3506
  if (l === -1) return a;
3507
- let p = (Array.isArray(n) ? n : [
3508
- ...n
3509
- ]).map((g) => a.items.findIndex((B) => t(B) === g)).sort((g, B) => g - B);
3510
- return Xe(a, p, l);
3507
+ let g = (Array.isArray(o) ? o : [
3508
+ ...o
3509
+ ]).map((c) => a.items.findIndex((B) => t(B) === c)).sort((c, B) => c - B);
3510
+ return Ye(a, g, l);
3511
3511
  });
3512
3512
  },
3513
- moveAfter(o, n) {
3513
+ moveAfter(n, o) {
3514
3514
  u((a) => {
3515
- let l = a.items.findIndex((g) => t(g) === o);
3515
+ let l = a.items.findIndex((c) => t(c) === n);
3516
3516
  if (l === -1) return a;
3517
- let p = (Array.isArray(n) ? n : [
3518
- ...n
3519
- ]).map((g) => a.items.findIndex((B) => t(B) === g)).sort((g, B) => g - B);
3520
- return Xe(a, p, l + 1);
3517
+ let g = (Array.isArray(o) ? o : [
3518
+ ...o
3519
+ ]).map((c) => a.items.findIndex((B) => t(B) === c)).sort((c, B) => c - B);
3520
+ return Ye(a, g, l + 1);
3521
3521
  });
3522
3522
  },
3523
- update(o, n) {
3523
+ update(n, o) {
3524
3524
  u((a) => {
3525
- let l = a.items.findIndex((m) => t(m) === o);
3525
+ let l = a.items.findIndex((m) => t(m) === n);
3526
3526
  return l === -1 ? a : {
3527
3527
  ...a,
3528
3528
  items: [
3529
3529
  ...a.items.slice(0, l),
3530
- n,
3530
+ o,
3531
3531
  ...a.items.slice(l + 1)
3532
3532
  ]
3533
3533
  };
@@ -3535,7 +3535,7 @@ function Lr(e, u) {
3535
3535
  }
3536
3536
  };
3537
3537
  }
3538
- function ee(e, u, ...r) {
3538
+ function ue(e, u, ...r) {
3539
3539
  return {
3540
3540
  ...e,
3541
3541
  items: [
@@ -3545,134 +3545,134 @@ function ee(e, u, ...r) {
3545
3545
  ]
3546
3546
  };
3547
3547
  }
3548
- function Xe(e, u, r) {
3549
- r -= u.filter((n) => n < r).length;
3550
- let t = u.map((n) => ({
3551
- from: n,
3548
+ function Ye(e, u, r) {
3549
+ r -= u.filter((o) => o < r).length;
3550
+ let t = u.map((o) => ({
3551
+ from: o,
3552
3552
  to: r++
3553
3553
  }));
3554
- for (let n = 0; n < t.length; n++) {
3555
- let a = t[n].from;
3556
- for (let l = n; l < t.length; l++)
3554
+ for (let o = 0; o < t.length; o++) {
3555
+ let a = t[o].from;
3556
+ for (let l = o; l < t.length; l++)
3557
3557
  t[l].from > a && t[l].from--;
3558
3558
  }
3559
- for (let n = 0; n < t.length; n++) {
3560
- let a = t[n];
3561
- for (let l = t.length - 1; l > n; l--) {
3559
+ for (let o = 0; o < t.length; o++) {
3560
+ let a = t[o];
3561
+ for (let l = t.length - 1; l > o; l--) {
3562
3562
  let m = t[l];
3563
3563
  m.from < a.to ? a.to++ : m.from++;
3564
3564
  }
3565
3565
  }
3566
- let o = e.items.slice();
3567
- for (let n of t) {
3568
- let [a] = o.splice(n.from, 1);
3569
- o.splice(n.to, 0, a);
3566
+ let n = e.items.slice();
3567
+ for (let o of t) {
3568
+ let [a] = n.splice(o.from, 1);
3569
+ n.splice(o.to, 0, a);
3570
3570
  }
3571
3571
  return {
3572
3572
  ...e,
3573
- items: o
3573
+ items: n
3574
3574
  };
3575
3575
  }
3576
- const Rr = /* @__PURE__ */ dt(null), Mr = /* @__PURE__ */ Ze(function(u, r) {
3577
- return [u, r] = _e(u, r, Rr), /* @__PURE__ */ A.createElement(ht, {
3578
- content: /* @__PURE__ */ A.createElement(kt, u)
3579
- }, (t) => /* @__PURE__ */ A.createElement(Nr, {
3576
+ const Hr = /* @__PURE__ */ pt(null), Ur = /* @__PURE__ */ Qe(function(u, r) {
3577
+ return [u, r] = tu(u, r, Hr), /* @__PURE__ */ A.createElement(Tt, {
3578
+ content: /* @__PURE__ */ A.createElement(Ft, u)
3579
+ }, (t) => /* @__PURE__ */ A.createElement(qr, {
3580
3580
  props: u,
3581
3581
  collection: t,
3582
3582
  gridListRef: r
3583
3583
  }));
3584
3584
  });
3585
- function Nr({ props: e, collection: u, gridListRef: r }) {
3586
- [e, r] = _e(e, r, We);
3587
- let { shouldUseVirtualFocus: t, filter: o, disallowTypeAhead: n, ...a } = e, { dragAndDropHooks: l, keyboardNavigationBehavior: m = "arrow", layout: p = "stack" } = e, { CollectionRoot: g, isVirtualized: B, layoutDelegate: D, dropTargetDelegate: C } = W(he), b = It({
3585
+ function qr({ props: e, collection: u, gridListRef: r }) {
3586
+ [e, r] = tu(e, r, eu);
3587
+ let { shouldUseVirtualFocus: t, filter: n, disallowTypeAhead: o, ...a } = e, { dragAndDropHooks: l, keyboardNavigationBehavior: m = "arrow", layout: g = "stack" } = e, { CollectionRoot: c, isVirtualized: B, layoutDelegate: p, dropTargetDelegate: C } = W(ke), f = Ot({
3588
3588
  ...a,
3589
3589
  collection: u,
3590
3590
  children: void 0,
3591
- layoutDelegate: D
3592
- }), x = zt(b, o), s = wt({
3591
+ layoutDelegate: p
3592
+ }), x = Vt(f, n), D = jt({
3593
3593
  usage: "search",
3594
3594
  sensitivity: "base"
3595
- }), { disabledBehavior: f, disabledKeys: $ } = x.selectionManager, { direction: i } = ou(), d = Se(() => new Re({
3595
+ }), { disabledBehavior: E, disabledKeys: y } = x.selectionManager, { direction: i } = lu(), d = Ke(() => new Me({
3596
3596
  collection: x.collection,
3597
- collator: s,
3597
+ collator: D,
3598
3598
  ref: r,
3599
- disabledKeys: $,
3600
- disabledBehavior: f,
3601
- layoutDelegate: D,
3602
- layout: p,
3599
+ disabledKeys: y,
3600
+ disabledBehavior: E,
3601
+ layoutDelegate: p,
3602
+ layout: g,
3603
3603
  direction: i
3604
3604
  }), [
3605
3605
  x.collection,
3606
3606
  r,
3607
+ g,
3608
+ y,
3609
+ E,
3607
3610
  p,
3608
- $,
3609
- f,
3610
3611
  D,
3611
- s,
3612
3612
  i
3613
- ]), { gridProps: c } = Ft({
3613
+ ]), { gridProps: s } = Pt({
3614
3614
  ...a,
3615
3615
  keyboardDelegate: d,
3616
3616
  // Only tab navigation is supported in grid layout.
3617
- keyboardNavigationBehavior: p === "grid" ? "tab" : m,
3617
+ keyboardNavigationBehavior: g === "grid" ? "tab" : m,
3618
3618
  isVirtualized: B,
3619
3619
  shouldSelectOnPressUp: e.shouldSelectOnPressUp
3620
- }, x, r), E = x.selectionManager, y = !!l?.useDraggableCollectionState, h = !!l?.useDroppableCollectionState, k = K(y), T = K(h);
3621
- R(() => {
3622
- process.env.NODE_ENV !== "production" && (k.current !== y && console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."), T.current !== h && console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));
3620
+ }, x, r), b = x.selectionManager, $ = !!l?.useDraggableCollectionState, h = !!l?.useDroppableCollectionState, k = S($), T = S(h);
3621
+ L(() => {
3622
+ process.env.NODE_ENV !== "production" && (k.current !== $ && console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."), T.current !== h && console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));
3623
3623
  }, [
3624
- y,
3624
+ $,
3625
3625
  h
3626
3626
  ]);
3627
- let S, O, v, F = !1, P = null, V = K(null);
3628
- if (y && l) {
3629
- S = l.useDraggableCollectionState({
3627
+ let K, O, v, F = !1, P = null, V = S(null);
3628
+ if ($ && l) {
3629
+ K = l.useDraggableCollectionState({
3630
3630
  collection: x.collection,
3631
- selectionManager: E,
3631
+ selectionManager: b,
3632
3632
  preview: l.renderDragPreview ? V : void 0
3633
- }), l.useDraggableCollection({}, S, r);
3634
- let Q = l.DragPreview;
3635
- P = l.renderDragPreview ? /* @__PURE__ */ A.createElement(Q, {
3633
+ }), l.useDraggableCollection({}, K, r);
3634
+ let _ = l.DragPreview;
3635
+ P = l.renderDragPreview ? /* @__PURE__ */ A.createElement(_, {
3636
3636
  ref: V
3637
3637
  }, l.renderDragPreview) : null;
3638
3638
  }
3639
3639
  if (h && l) {
3640
3640
  O = l.useDroppableCollectionState({
3641
3641
  collection: x.collection,
3642
- selectionManager: E
3642
+ selectionManager: b
3643
3643
  });
3644
- let Q = new Re({
3644
+ let _ = new Me({
3645
3645
  collection: x.collection,
3646
- disabledKeys: E.disabledKeys,
3647
- disabledBehavior: E.disabledBehavior,
3646
+ disabledKeys: b.disabledKeys,
3647
+ disabledBehavior: b.disabledBehavior,
3648
3648
  ref: r
3649
- }), ot = l.dropTargetDelegate || C || new l.ListDropTargetDelegate(u, r, {
3650
- layout: p,
3649
+ }), lt = l.dropTargetDelegate || C || new l.ListDropTargetDelegate(u, r, {
3650
+ layout: g,
3651
3651
  direction: i
3652
3652
  });
3653
3653
  v = l.useDroppableCollection({
3654
- keyboardDelegate: Q,
3655
- dropTargetDelegate: ot
3654
+ keyboardDelegate: _,
3655
+ dropTargetDelegate: lt
3656
3656
  }, O, r), F = O.isDropTarget({
3657
3657
  type: "root"
3658
3658
  });
3659
3659
  }
3660
- let { focusProps: L, isFocused: M, isFocusVisible: U } = nu(), N = x.collection.size === 0, G = {
3660
+ let { focusProps: R, isFocused: M, isFocusVisible: U } = au(), N = x.collection.size === 0, q = {
3661
3661
  isDropTarget: F,
3662
3662
  isEmpty: N,
3663
3663
  isFocused: M,
3664
3664
  isFocusVisible: U,
3665
- layout: p,
3665
+ layout: g,
3666
3666
  state: x
3667
- }, Be = Ke({
3667
+ }, xe = Pe({
3668
3668
  className: e.className,
3669
3669
  style: e.style,
3670
3670
  defaultClassName: "react-aria-GridList",
3671
- values: G
3672
- }), Le = null, rt = null;
3671
+ values: q
3672
+ }), Re = null, it = null;
3673
3673
  if (N && e.renderEmptyState) {
3674
- let Q = e.renderEmptyState(G);
3675
- Le = /* @__PURE__ */ A.createElement("div", {
3674
+ let _ = e.renderEmptyState(q);
3675
+ Re = /* @__PURE__ */ A.createElement("div", {
3676
3676
  role: "row",
3677
3677
  "aria-rowindex": 1,
3678
3678
  style: {
@@ -3683,13 +3683,13 @@ function Nr({ props: e, collection: u, gridListRef: r }) {
3683
3683
  style: {
3684
3684
  display: "contents"
3685
3685
  }
3686
- }, Q));
3686
+ }, _));
3687
3687
  }
3688
- let nt = tu(e, {
3688
+ let at = ou(e, {
3689
3689
  global: !0
3690
3690
  });
3691
- return /* @__PURE__ */ A.createElement(Pt, null, /* @__PURE__ */ A.createElement("div", {
3692
- ...Pe(nt, Be, c, L, v?.collectionProps, rt),
3691
+ return /* @__PURE__ */ A.createElement(wt, null, /* @__PURE__ */ A.createElement("div", {
3692
+ ...Ie(at, xe, s, R, v?.collectionProps, it),
3693
3693
  ref: r,
3694
3694
  slot: e.slot || void 0,
3695
3695
  onScroll: e.onScroll,
@@ -3697,63 +3697,63 @@ function Nr({ props: e, collection: u, gridListRef: r }) {
3697
3697
  "data-empty": N || void 0,
3698
3698
  "data-focused": M || void 0,
3699
3699
  "data-focus-visible": U || void 0,
3700
- "data-layout": p
3701
- }, /* @__PURE__ */ A.createElement(Qe, {
3700
+ "data-layout": g
3701
+ }, /* @__PURE__ */ A.createElement(uu, {
3702
3702
  values: [
3703
3703
  [
3704
- ke,
3704
+ Ae,
3705
3705
  x
3706
3706
  ],
3707
3707
  [
3708
- me,
3708
+ fe,
3709
3709
  {
3710
3710
  dragAndDropHooks: l,
3711
- dragState: S,
3711
+ dragState: K,
3712
3712
  dropState: O
3713
3713
  }
3714
3714
  ],
3715
3715
  [
3716
- Bt,
3716
+ Et,
3717
3717
  {
3718
- render: Ur
3718
+ render: Xr
3719
3719
  }
3720
3720
  ]
3721
3721
  ]
3722
- }, h && /* @__PURE__ */ A.createElement(Xr, null), /* @__PURE__ */ A.createElement(Ct, null, /* @__PURE__ */ A.createElement(g, {
3722
+ }, h && /* @__PURE__ */ A.createElement(Jr, null), /* @__PURE__ */ A.createElement(vt, null, /* @__PURE__ */ A.createElement(c, {
3723
3723
  collection: x.collection,
3724
3724
  scrollRef: r,
3725
- persistedKeys: xt(E, l, O),
3726
- renderDropIndicator: bt(l, O)
3727
- }))), Le, P));
3725
+ persistedKeys: $t(b, l, O),
3726
+ renderDropIndicator: Ct(l, O)
3727
+ }))), Re, P));
3728
3728
  }
3729
- const Hr = /* @__PURE__ */ yt(vt, function(u, r, t) {
3730
- let o = W(ke), { dragAndDropHooks: n, dragState: a, dropState: l } = W(me), m = ru(r), { isVirtualized: p } = W(he), { rowProps: g, gridCellProps: B, descriptionProps: D, ...C } = Tt({
3729
+ const Gr = /* @__PURE__ */ kt(At, function(u, r, t) {
3730
+ let n = W(Ae), { dragAndDropHooks: o, dragState: a, dropState: l } = W(fe), m = iu(r), { isVirtualized: g } = W(ke), { rowProps: c, gridCellProps: B, descriptionProps: p, ...C } = Kt({
3731
3731
  node: t,
3732
3732
  shouldSelectOnPressUp: !!a,
3733
- isVirtualized: p
3734
- }, o, m), { hoverProps: b, isHovered: x } = Kt({
3733
+ isVirtualized: g
3734
+ }, n, m), { hoverProps: f, isHovered: x } = zt({
3735
3735
  isDisabled: !C.allowsSelection && !C.hasAction,
3736
3736
  onHoverStart: t.props.onHoverStart,
3737
3737
  onHoverChange: t.props.onHoverChange,
3738
3738
  onHoverEnd: t.props.onHoverEnd
3739
- }), { isFocusVisible: s, focusProps: f } = nu(), { checkboxProps: $ } = zr({
3739
+ }), { isFocusVisible: D, focusProps: E } = au(), { checkboxProps: y } = Vr({
3740
3740
  key: t.key
3741
- }, o), i = o.selectionManager.disabledBehavior === "all" && C.isDisabled ? {
3741
+ }, n), i = n.selectionManager.disabledBehavior === "all" && C.isDisabled ? {
3742
3742
  isDisabled: !0
3743
3743
  } : {}, d = null;
3744
- a && n && (d = n.useDraggableItem({
3744
+ a && o && (d = o.useDraggableItem({
3745
3745
  key: t.key,
3746
3746
  hasDragButton: !0
3747
3747
  }, a));
3748
- let c = null, E = K(null), { visuallyHiddenProps: y } = Ie();
3749
- l && n && (c = n.useDropIndicator({
3748
+ let s = null, b = S(null), { visuallyHiddenProps: $ } = ze();
3749
+ l && o && (s = o.useDropIndicator({
3750
3750
  target: {
3751
3751
  type: "item",
3752
3752
  key: t.key,
3753
3753
  dropPosition: "on"
3754
3754
  }
3755
- }, l, E));
3756
- let h = a && a.isDragging(t.key), k = Ke({
3755
+ }, l, b));
3756
+ let h = a && a.isDragging(t.key), k = Pe({
3757
3757
  ...u,
3758
3758
  id: void 0,
3759
3759
  children: t.rendered,
@@ -3761,25 +3761,25 @@ const Hr = /* @__PURE__ */ yt(vt, function(u, r, t) {
3761
3761
  values: {
3762
3762
  ...C,
3763
3763
  isHovered: x,
3764
- isFocusVisible: s,
3765
- selectionMode: o.selectionManager.selectionMode,
3766
- selectionBehavior: o.selectionManager.selectionBehavior,
3764
+ isFocusVisible: D,
3765
+ selectionMode: n.selectionManager.selectionMode,
3766
+ selectionBehavior: n.selectionManager.selectionBehavior,
3767
3767
  allowsDragging: !!a,
3768
3768
  isDragging: h,
3769
- isDropTarget: c?.isDropTarget
3769
+ isDropTarget: s?.isDropTarget
3770
3770
  }
3771
- }), T = K(null);
3772
- R(() => {
3771
+ }), T = S(null);
3772
+ L(() => {
3773
3773
  a && !T.current && console.warn('Draggable items in a GridList must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');
3774
- }, []), R(() => {
3774
+ }, []), L(() => {
3775
3775
  !t.textValue && process.env.NODE_ENV !== "production" && console.warn("A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.");
3776
3776
  }, [
3777
3777
  t.textValue
3778
3778
  ]);
3779
- let S = tu(u, {
3779
+ let K = ou(u, {
3780
3780
  global: !0
3781
3781
  });
3782
- return delete S.id, delete S.onClick, /* @__PURE__ */ A.createElement(A.Fragment, null, c && !c.isHidden && /* @__PURE__ */ A.createElement("div", {
3782
+ return delete K.id, delete K.onClick, /* @__PURE__ */ A.createElement(A.Fragment, null, s && !s.isHidden && /* @__PURE__ */ A.createElement("div", {
3783
3783
  role: "row",
3784
3784
  style: {
3785
3785
  position: "absolute"
@@ -3788,40 +3788,40 @@ const Hr = /* @__PURE__ */ yt(vt, function(u, r, t) {
3788
3788
  role: "gridcell"
3789
3789
  }, /* @__PURE__ */ A.createElement("div", {
3790
3790
  role: "button",
3791
- ...y,
3792
- ...c?.dropIndicatorProps,
3793
- ref: E
3791
+ ...$,
3792
+ ...s?.dropIndicatorProps,
3793
+ ref: b
3794
3794
  }))), /* @__PURE__ */ A.createElement("div", {
3795
- ...Pe(S, k, g, f, b, d?.dragProps),
3795
+ ...Ie(K, k, c, E, f, d?.dragProps),
3796
3796
  ref: m,
3797
3797
  "data-selected": C.isSelected || void 0,
3798
3798
  "data-disabled": C.isDisabled || void 0,
3799
3799
  "data-hovered": x || void 0,
3800
3800
  "data-focused": C.isFocused || void 0,
3801
- "data-focus-visible": s || void 0,
3801
+ "data-focus-visible": D || void 0,
3802
3802
  "data-pressed": C.isPressed || void 0,
3803
3803
  "data-allows-dragging": !!a || void 0,
3804
3804
  "data-dragging": h || void 0,
3805
- "data-drop-target": c?.isDropTarget || void 0,
3806
- "data-selection-mode": o.selectionManager.selectionMode === "none" ? void 0 : o.selectionManager.selectionMode
3805
+ "data-drop-target": s?.isDropTarget || void 0,
3806
+ "data-selection-mode": n.selectionManager.selectionMode === "none" ? void 0 : n.selectionManager.selectionMode
3807
3807
  }, /* @__PURE__ */ A.createElement("div", {
3808
3808
  ...B,
3809
3809
  style: {
3810
3810
  display: "contents"
3811
3811
  }
3812
- }, /* @__PURE__ */ A.createElement(Qe, {
3812
+ }, /* @__PURE__ */ A.createElement(uu, {
3813
3813
  values: [
3814
3814
  [
3815
- Dt,
3815
+ ft,
3816
3816
  {
3817
3817
  slots: {
3818
3818
  [be]: {},
3819
- selection: $
3819
+ selection: y
3820
3820
  }
3821
3821
  }
3822
3822
  ],
3823
3823
  [
3824
- pt,
3824
+ mt,
3825
3825
  {
3826
3826
  slots: {
3827
3827
  [be]: i,
@@ -3836,32 +3836,32 @@ const Hr = /* @__PURE__ */ yt(vt, function(u, r, t) {
3836
3836
  }
3837
3837
  ],
3838
3838
  [
3839
- $t,
3839
+ ht,
3840
3840
  {
3841
3841
  slots: {
3842
3842
  [be]: {},
3843
- description: D
3843
+ description: p
3844
3844
  }
3845
3845
  }
3846
3846
  ],
3847
3847
  [
3848
- he,
3849
- ft
3848
+ ke,
3849
+ bt
3850
3850
  ],
3851
3851
  [
3852
- ke,
3852
+ Ae,
3853
3853
  null
3854
3854
  ],
3855
3855
  [
3856
- We,
3856
+ eu,
3857
3857
  null
3858
3858
  ],
3859
3859
  [
3860
- gt,
3860
+ Bt,
3861
3861
  null
3862
3862
  ],
3863
3863
  [
3864
- Et,
3864
+ yt,
3865
3865
  {
3866
3866
  isSelected: C.isSelected
3867
3867
  }
@@ -3869,20 +3869,20 @@ const Hr = /* @__PURE__ */ yt(vt, function(u, r, t) {
3869
3869
  ]
3870
3870
  }, k.children))));
3871
3871
  });
3872
- function Ur(e, u) {
3873
- u = ru(u);
3874
- let { dragAndDropHooks: r, dropState: t } = W(me), o = K(null), { dropIndicatorProps: n, isHidden: a, isDropTarget: l } = r.useDropIndicator(e, t, o);
3875
- return a ? null : /* @__PURE__ */ A.createElement(qr, {
3872
+ function Xr(e, u) {
3873
+ u = iu(u);
3874
+ let { dragAndDropHooks: r, dropState: t } = W(fe), n = S(null), { dropIndicatorProps: o, isHidden: a, isDropTarget: l } = r.useDropIndicator(e, t, n);
3875
+ return a ? null : /* @__PURE__ */ A.createElement(Zr, {
3876
3876
  ...e,
3877
- dropIndicatorProps: n,
3877
+ dropIndicatorProps: o,
3878
3878
  isDropTarget: l,
3879
- buttonRef: o,
3879
+ buttonRef: n,
3880
3880
  ref: u
3881
3881
  });
3882
3882
  }
3883
- function Gr(e, u) {
3884
- let { dropIndicatorProps: r, isDropTarget: t, buttonRef: o, ...n } = e, { visuallyHiddenProps: a } = Ie(), l = Ke({
3885
- ...n,
3883
+ function Yr(e, u) {
3884
+ let { dropIndicatorProps: r, isDropTarget: t, buttonRef: n, ...o } = e, { visuallyHiddenProps: a } = ze(), l = Pe({
3885
+ ...o,
3886
3886
  defaultClassName: "react-aria-DropIndicator",
3887
3887
  values: {
3888
3888
  isDropTarget: t
@@ -3899,19 +3899,19 @@ function Gr(e, u) {
3899
3899
  ...a,
3900
3900
  role: "button",
3901
3901
  ...r,
3902
- ref: o
3902
+ ref: n
3903
3903
  }), l.children));
3904
3904
  }
3905
- const qr = /* @__PURE__ */ Ze(Gr);
3906
- function Xr() {
3907
- let { dragAndDropHooks: e, dropState: u } = W(me), r = K(null), { dropIndicatorProps: t } = e.useDropIndicator({
3905
+ const Zr = /* @__PURE__ */ Qe(Yr);
3906
+ function Jr() {
3907
+ let { dragAndDropHooks: e, dropState: u } = W(fe), r = S(null), { dropIndicatorProps: t } = e.useDropIndicator({
3908
3908
  target: {
3909
3909
  type: "root"
3910
3910
  }
3911
- }, u, r), o = u.isDropTarget({
3911
+ }, u, r), n = u.isDropTarget({
3912
3912
  type: "root"
3913
- }), { visuallyHiddenProps: n } = Ie();
3914
- return !o && t["aria-hidden"] ? null : /* @__PURE__ */ A.createElement("div", {
3913
+ }), { visuallyHiddenProps: o } = ze();
3914
+ return !n && t["aria-hidden"] ? null : /* @__PURE__ */ A.createElement("div", {
3915
3915
  role: "row",
3916
3916
  "aria-hidden": t["aria-hidden"],
3917
3917
  style: {
@@ -3921,37 +3921,89 @@ function Xr() {
3921
3921
  role: "gridcell"
3922
3922
  }, /* @__PURE__ */ A.createElement("div", {
3923
3923
  role: "button",
3924
- ...n,
3924
+ ...o,
3925
3925
  ...t,
3926
3926
  ref: r
3927
3927
  })));
3928
3928
  }
3929
- function Yr(e) {
3929
+ function Wr(e) {
3930
3930
  return {
3931
- dragAndDropHooks: Se(() => {
3932
- let { onDrop: r, onInsert: t, onItemDrop: o, onReorder: n, onMove: a, onRootDrop: l, getItems: m, renderDragPreview: p, renderDropIndicator: g, dropTargetDelegate: B } = e, D = !!m, C = !!(r || t || o || n || a || l), b = {};
3933
- return D && (b.useDraggableCollectionState = function(s) {
3934
- return wr({
3935
- ...s,
3931
+ dragAndDropHooks: Ke(() => {
3932
+ let { onDrop: r, onInsert: t, onItemDrop: n, onReorder: o, onMove: a, onRootDrop: l, getItems: m, renderDragPreview: g, renderDropIndicator: c, dropTargetDelegate: B } = e, p = !!m, C = !!(r || t || n || o || a || l), f = {};
3933
+ return p && (f.useDraggableCollectionState = function(D) {
3934
+ return jr({
3935
+ ...D,
3936
3936
  ...e
3937
3937
  });
3938
- }, b.useDraggableCollection = Kr, b.useDraggableItem = Sr, b.DragPreview = Pr, b.renderDragPreview = p, b.isVirtualDragging = cr), C && (b.useDroppableCollectionState = function(s) {
3939
- return Or({
3940
- ...s,
3938
+ }, f.useDraggableCollection = zr, f.useDraggableItem = Ir, f.DragPreview = wr, f.renderDragPreview = g, f.isVirtualDragging = gr), C && (f.useDroppableCollectionState = function(D) {
3939
+ return Lr({
3940
+ ...D,
3941
3941
  ...e
3942
3942
  });
3943
- }, b.useDroppableItem = _u, b.useDroppableCollection = function(s, f, $) {
3944
- return hr({
3945
- ...s,
3943
+ }, f.useDroppableItem = tt, f.useDroppableCollection = function(D, E, y) {
3944
+ return Tr({
3945
+ ...D,
3946
3946
  ...e
3947
- }, f, $);
3948
- }, b.useDropIndicator = Ar, b.renderDropIndicator = g, b.dropTargetDelegate = B, b.ListDropTargetDelegate = Ir), b;
3947
+ }, E, y);
3948
+ }, f.useDropIndicator = Sr, f.renderDropIndicator = c, f.dropTargetDelegate = B, f.ListDropTargetDelegate = Or), f;
3949
3949
  }, [
3950
3950
  e
3951
3951
  ])
3952
3952
  };
3953
3953
  }
3954
- const et = /* @__PURE__ */ ct({
3954
+ var Ze = Object.prototype.hasOwnProperty;
3955
+ function Je(e, u, r) {
3956
+ for (r of e.keys())
3957
+ if (Q(r, u)) return r;
3958
+ }
3959
+ function Q(e, u) {
3960
+ var r, t, n;
3961
+ if (e === u) return !0;
3962
+ if (e && u && (r = e.constructor) === u.constructor) {
3963
+ if (r === Date) return e.getTime() === u.getTime();
3964
+ if (r === RegExp) return e.toString() === u.toString();
3965
+ if (r === Array) {
3966
+ if ((t = e.length) === u.length)
3967
+ for (; t-- && Q(e[t], u[t]); ) ;
3968
+ return t === -1;
3969
+ }
3970
+ if (r === Set) {
3971
+ if (e.size !== u.size)
3972
+ return !1;
3973
+ for (t of e)
3974
+ if (n = t, n && typeof n == "object" && (n = Je(u, n), !n) || !u.has(n)) return !1;
3975
+ return !0;
3976
+ }
3977
+ if (r === Map) {
3978
+ if (e.size !== u.size)
3979
+ return !1;
3980
+ for (t of e)
3981
+ if (n = t[0], n && typeof n == "object" && (n = Je(u, n), !n) || !Q(t[1], u.get(n)))
3982
+ return !1;
3983
+ return !0;
3984
+ }
3985
+ if (r === ArrayBuffer)
3986
+ e = new Uint8Array(e), u = new Uint8Array(u);
3987
+ else if (r === DataView) {
3988
+ if ((t = e.byteLength) === u.byteLength)
3989
+ for (; t-- && e.getInt8(t) === u.getInt8(t); ) ;
3990
+ return t === -1;
3991
+ }
3992
+ if (ArrayBuffer.isView(e)) {
3993
+ if ((t = e.byteLength) === u.byteLength)
3994
+ for (; t-- && e[t] === u[t]; ) ;
3995
+ return t === -1;
3996
+ }
3997
+ if (!r || typeof e == "object") {
3998
+ t = 0;
3999
+ for (r in e)
4000
+ if (Ze.call(e, r) && ++t && !Ze.call(u, r) || !(r in u) || !Q(e[r], u[r])) return !1;
4001
+ return Object.keys(u).length === t;
4002
+ }
4003
+ }
4004
+ return e !== e && u !== u;
4005
+ }
4006
+ const rt = /* @__PURE__ */ gt({
3955
4007
  emptyMessage: {
3956
4008
  id: "Nimbus.DraggableList.emptyMessage",
3957
4009
  description: "message displayed when drag-and-drop enabled list is empty",
@@ -3962,166 +4014,188 @@ const et = /* @__PURE__ */ ct({
3962
4014
  description: "label for button that removes an item from the list",
3963
4015
  defaultMessage: "remove item"
3964
4016
  }
3965
- }), { withProvider: Zr, withContext: je } = /* @__PURE__ */ Yt({
4017
+ }), { withProvider: Qr, withContext: Le } = /* @__PURE__ */ Wt({
3966
4018
  key: "draggableList"
3967
- }), Jr = /* @__PURE__ */ Zr("div", "root"), Wr = /* @__PURE__ */ je("div", "item"), Qr = /* @__PURE__ */ je("div", "itemContent"), _r = /* @__PURE__ */ je("div", "empty"), ut = ({
4019
+ }), _r = /* @__PURE__ */ Qr("div", "root"), en = /* @__PURE__ */ Le("div", "item"), un = /* @__PURE__ */ Le("div", "itemContent"), tn = /* @__PURE__ */ Le("div", "empty"), nt = ({
3968
4020
  children: e,
3969
4021
  id: u,
3970
4022
  onRemoveItem: r,
3971
4023
  textValue: t,
3972
- ...o
4024
+ ...n
3973
4025
  }) => {
3974
- const { formatMessage: n } = Je(), a = typeof e == "string" ? e : void 0, [l, m] = lu(o);
3975
- return /* @__PURE__ */ w(Wr, { ...l, asChild: !0, children: /* @__PURE__ */ w(
3976
- Hr,
4026
+ const { formatMessage: o } = _e(), a = typeof e == "string" ? e : void 0, [l, m] = cu(n);
4027
+ return /* @__PURE__ */ w(en, { ...l, asChild: !0, children: /* @__PURE__ */ w(
4028
+ Gr,
3977
4029
  {
3978
4030
  id: u,
3979
4031
  textValue: t ?? a,
3980
4032
  ...m,
3981
- children: ({ allowsDragging: p, selectionBehavior: g, selectionMode: B }) => /* @__PURE__ */ Ye(it, { children: [
3982
- p && // @ts-expect-error slot="drag" handles adding the required props
4033
+ children: ({ allowsDragging: g, selectionBehavior: c, selectionMode: B }) => /* @__PURE__ */ We(dt, { children: [
4034
+ g && // @ts-expect-error slot="drag" handles adding the required props
3983
4035
  /* @__PURE__ */ w(
3984
- Me,
4036
+ Ne,
3985
4037
  {
3986
4038
  slot: "drag",
3987
4039
  size: "2xs",
3988
4040
  variant: "ghost",
3989
4041
  flex: "0 0 auto",
3990
4042
  colorPalette: "neutral",
3991
- children: /* @__PURE__ */ w(Zt, {})
4043
+ children: /* @__PURE__ */ w(Qt, {})
3992
4044
  }
3993
4045
  ),
3994
- B === "multiple" && g === "toggle" && /* @__PURE__ */ w(Wt, { flex: "0 0 auto", slot: "selection" }),
3995
- /* @__PURE__ */ w(Qr, { children: e }),
4046
+ B === "multiple" && c === "toggle" && /* @__PURE__ */ w(er, { flex: "0 0 auto", slot: "selection" }),
4047
+ /* @__PURE__ */ w(un, { children: e }),
3996
4048
  r && /* @__PURE__ */ w(
3997
- Me,
4049
+ Ne,
3998
4050
  {
3999
- "aria-label": n(et.removeButtonLabel),
4051
+ "aria-label": o(rt.removeButtonLabel),
4000
4052
  size: "2xs",
4001
4053
  variant: "ghost",
4002
4054
  onPress: u ? () => r(u) : void 0,
4003
4055
  flex: "0 0 auto",
4004
4056
  colorPalette: "neutral",
4005
- children: /* @__PURE__ */ w(Jt, {})
4057
+ children: /* @__PURE__ */ w(_t, {})
4006
4058
  }
4007
4059
  )
4008
4060
  ] })
4009
4061
  }
4010
4062
  ) });
4011
- }, de = "nimbus-draggable-list-item", tt = ({
4063
+ }, se = "nimbus-draggable-list-item", rn = (e) => e.key ?? e.id, ot = ({
4012
4064
  children: e,
4013
4065
  ref: u,
4014
4066
  items: r = [],
4015
- onUpdateItems: t,
4067
+ getKey: t = rn,
4068
+ onUpdateItems: n,
4016
4069
  removableItems: o,
4017
- renderEmptyState: n,
4018
- ...a
4070
+ renderEmptyState: a,
4071
+ ...l
4019
4072
  }) => {
4020
- const { formatMessage: l } = Je(), m = n ?? l(et.emptyMessage), p = jr({ initialItems: r });
4021
- R(() => {
4022
- t?.(p.items);
4023
- }, [p.items, t]);
4024
- const { dragAndDropHooks: g } = Yr({
4073
+ const { formatMessage: m } = _e(), g = a ?? m(rt.emptyMessage), c = Mr({
4074
+ initialItems: r,
4075
+ getKey: t
4076
+ }), B = S(!1), p = S(r ?? []);
4077
+ L(() => {
4078
+ if (r !== p.current && !Q(r, p.current) && !Q(r, c.items)) {
4079
+ B.current = !0;
4080
+ const i = c.items.map((s) => t(s));
4081
+ if (c.remove(...i), c.append(...r), c.selectedKeys !== "all" && c.selectedKeys.size > 0) {
4082
+ const s = new Set(r.map(($) => t($))), b = new Set(
4083
+ [...c.selectedKeys].filter(($) => s.has($))
4084
+ );
4085
+ c.setSelectedKeys(b);
4086
+ }
4087
+ p.current = r;
4088
+ let d = !1;
4089
+ return queueMicrotask(() => {
4090
+ d || (B.current = !1);
4091
+ }), () => {
4092
+ d = !0;
4093
+ };
4094
+ }
4095
+ }, [r, t]), L(() => {
4096
+ B.current || (p.current = c.items, n?.(c.items));
4097
+ }, [c.items, n]);
4098
+ const { dragAndDropHooks: C } = Wr({
4025
4099
  // Provide item data to drag'n'drop handler
4026
- getItems(s, f) {
4027
- return f.map(($) => ({
4028
- [de]: JSON.stringify($)
4100
+ getItems(i, d) {
4101
+ return d.map((s) => ({
4102
+ [se]: JSON.stringify(s)
4029
4103
  //TODO: also handle text/plain item type (to allow dropping items into list that are not list items)?
4030
4104
  }));
4031
4105
  },
4032
4106
  // Accept `nimbus-draggable-list-item` drag item type
4033
- acceptedDragTypes: [de],
4107
+ acceptedDragTypes: [se],
4034
4108
  // Ensure items are always moved rather than copied
4035
4109
  getDropOperation: () => "move",
4036
4110
  // Handle dropping items from other lists between list items
4037
- async onInsert(s) {
4038
- const f = await Promise.all(
4039
- s.items.filter(Ne).map(
4040
- async ($) => JSON.parse(await $.getText(de))
4111
+ async onInsert(i) {
4112
+ const d = await Promise.all(
4113
+ i.items.filter(He).map(
4114
+ async (s) => JSON.parse(await s.getText(se))
4041
4115
  )
4042
4116
  );
4043
- s.target.dropPosition === "before" ? p.insertBefore(s.target.key, ...f) : s.target.dropPosition === "after" && p.insertAfter(s.target.key, ...f);
4117
+ i.target.dropPosition === "before" ? c.insertBefore(i.target.key, ...d) : i.target.dropPosition === "after" && c.insertAfter(i.target.key, ...d);
4044
4118
  },
4045
4119
  // Handle drops on list when empty
4046
- async onRootDrop(s) {
4047
- const f = await Promise.all(
4048
- s.items.filter(Ne).map(
4049
- async ($) => JSON.parse(await $.getText(de))
4120
+ async onRootDrop(i) {
4121
+ const d = await Promise.all(
4122
+ i.items.filter(He).map(
4123
+ async (s) => JSON.parse(await s.getText(se))
4050
4124
  )
4051
4125
  );
4052
- p.append(...f);
4126
+ c.append(...d);
4053
4127
  },
4054
4128
  // Handle reordering within list
4055
- onReorder(s) {
4056
- s.target.dropPosition === "before" ? p.moveBefore(s.target.key, s.keys) : s.target.dropPosition === "after" && p.moveAfter(s.target.key, s.keys);
4129
+ onReorder(i) {
4130
+ i.target.dropPosition === "before" ? c.moveBefore(i.target.key, i.keys) : i.target.dropPosition === "after" && c.moveAfter(i.target.key, i.keys);
4057
4131
  },
4058
4132
  // Remove the items from the source list on drop
4059
4133
  // if they were moved to a different list.
4060
- async onDragEnd(s) {
4061
- s.dropOperation === "move" && !s.isInternal && p.remove(...s.keys);
4134
+ async onDragEnd(i) {
4135
+ i.dropOperation === "move" && !i.isInternal && c.remove(...i.keys);
4062
4136
  }
4063
- }), B = J(
4064
- (s) => {
4065
- p.remove(s);
4137
+ }), f = J(
4138
+ (i) => {
4139
+ c.remove(i);
4066
4140
  },
4067
- [p.remove]
4141
+ [c.remove]
4068
4142
  );
4069
4143
  if (!e && r?.length > 0 && (!r?.[0]?.key || !r?.[0]?.label))
4070
4144
  throw new Error(
4071
4145
  'Nimbus DraggableList: when "children" is not provided, items must have both "key" and "label" properties'
4072
4146
  );
4073
- const D = Xt({ key: "draggableList" }), [C] = D.splitVariantProps(a), [b, x] = lu(a);
4074
- return /* @__PURE__ */ w(Jr, { ...b, ...C, asChild: !0, children: /* @__PURE__ */ w(
4075
- Mr,
4147
+ const x = Jt({ key: "draggableList" }), [D] = x.splitVariantProps(l), [E, y] = cu(l);
4148
+ return /* @__PURE__ */ w(_r, { ...E, ...D, asChild: !0, children: /* @__PURE__ */ w(
4149
+ Ur,
4076
4150
  {
4077
4151
  ref: u,
4078
- ...x,
4079
- renderEmptyState: () => /* @__PURE__ */ w(_r, { children: m }),
4080
- dragAndDropHooks: g,
4081
- items: p.items,
4082
- dependencies: [B],
4083
- children: (s) => e ? typeof e == "function" ? e({
4084
- ...s,
4085
- onRemoveItem: o ? B : void 0
4086
- }) : e : /* @__PURE__ */ st(
4087
- ut,
4152
+ ...y,
4153
+ renderEmptyState: () => /* @__PURE__ */ w(tn, { children: g }),
4154
+ dragAndDropHooks: C,
4155
+ items: c.items,
4156
+ dependencies: [f],
4157
+ children: (i) => e ? typeof e == "function" ? e({
4158
+ ...i,
4159
+ onRemoveItem: o ? f : void 0
4160
+ }) : e : /* @__PURE__ */ Dt(
4161
+ nt,
4088
4162
  {
4089
- ...s,
4090
- key: s.key,
4091
- onRemoveItem: o ? B : void 0
4163
+ ...i,
4164
+ key: i.key,
4165
+ onRemoveItem: o ? f : void 0
4092
4166
  },
4093
- s.label
4167
+ i.label
4094
4168
  )
4095
4169
  }
4096
4170
  ) });
4097
- }, en = ({
4171
+ }, nn = ({
4098
4172
  label: e,
4099
4173
  description: u,
4100
4174
  error: r,
4101
4175
  infoBox: t,
4102
- isRequired: o,
4103
- isInvalid: n,
4176
+ isRequired: n,
4177
+ isInvalid: o,
4104
4178
  isDisabled: a,
4105
4179
  isReadOnly: l,
4106
4180
  id: m,
4107
- items: p,
4108
- ...g
4109
- }) => /* @__PURE__ */ Ye(
4181
+ items: g,
4182
+ ...c
4183
+ }) => /* @__PURE__ */ We(
4110
4184
  Y.Root,
4111
4185
  {
4112
4186
  id: m,
4113
- isRequired: o,
4114
- isInvalid: n,
4187
+ isRequired: n,
4188
+ isInvalid: o,
4115
4189
  isDisabled: a,
4116
4190
  isReadOnly: l,
4117
4191
  children: [
4118
4192
  /* @__PURE__ */ w(Y.Label, { children: e }),
4119
4193
  /* @__PURE__ */ w(Y.Input, { children: /* @__PURE__ */ w(
4120
- tt,
4194
+ ot,
4121
4195
  {
4122
- disabledKeys: a ? p?.map((B) => B.key) : void 0,
4123
- items: p,
4124
- ...g
4196
+ disabledKeys: a ? g?.map((B) => B.key) : void 0,
4197
+ items: g,
4198
+ ...c
4125
4199
  }
4126
4200
  ) }),
4127
4201
  u && /* @__PURE__ */ w(Y.Description, { children: u }),
@@ -4129,7 +4203,7 @@ const et = /* @__PURE__ */ ct({
4129
4203
  t && /* @__PURE__ */ w(Y.InfoBox, { children: t })
4130
4204
  ]
4131
4205
  }
4132
- ), Xn = {
4206
+ ), Wn = {
4133
4207
  /**
4134
4208
  * # DraggableList.Root
4135
4209
  *
@@ -4157,7 +4231,7 @@ const et = /* @__PURE__ */ ct({
4157
4231
  * <DraggableList.Root items={itemsWithKeyAndLabel} aria-label="Priority list" />
4158
4232
  * ```
4159
4233
  */
4160
- Root: tt,
4234
+ Root: ot,
4161
4235
  /**
4162
4236
  * # DraggableList.Item
4163
4237
  *
@@ -4179,7 +4253,7 @@ const et = /* @__PURE__ */ ct({
4179
4253
  * </DraggableList.Root>
4180
4254
  * ```
4181
4255
  */
4182
- Item: ut,
4256
+ Item: nt,
4183
4257
  /**
4184
4258
  * # DraggableList.Field
4185
4259
  *
@@ -4200,12 +4274,12 @@ const et = /* @__PURE__ */ ct({
4200
4274
  * />
4201
4275
  * ```
4202
4276
  */
4203
- Field: en
4277
+ Field: nn
4204
4278
  };
4205
4279
  export {
4206
- Xn as D,
4207
- tt as a,
4208
- ut as b,
4209
- en as c
4280
+ Wn as D,
4281
+ ot as a,
4282
+ nt as b,
4283
+ nn as c
4210
4284
  };
4211
- //# sourceMappingURL=draggable-list-BVbOhuq3.es.js.map
4285
+ //# sourceMappingURL=draggable-list-D1fi4DB4.es.js.map