@object-ui/plugin-kanban 3.1.3 → 3.1.4

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.
@@ -0,0 +1,2414 @@
1
+ import e, { cloneElement as t, createContext as n, forwardRef as r, memo as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useReducer as u, useRef as d, useState as f } from "react";
2
+ import { createPortal as p, unstable_batchedUpdates as m } from "react-dom";
3
+ //#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.4/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
4
+ function h() {
5
+ var e = [...arguments];
6
+ return l(() => (t) => {
7
+ e.forEach((e) => e(t));
8
+ }, e);
9
+ }
10
+ var g = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
11
+ function _(e) {
12
+ let t = Object.prototype.toString.call(e);
13
+ return t === "[object Window]" || t === "[object global]";
14
+ }
15
+ function v(e) {
16
+ return "nodeType" in e;
17
+ }
18
+ function y(e) {
19
+ return e ? _(e) ? e : v(e) ? e.ownerDocument?.defaultView ?? window : window : window;
20
+ }
21
+ function b(e) {
22
+ let { Document: t } = y(e);
23
+ return e instanceof t;
24
+ }
25
+ function x(e) {
26
+ return _(e) ? !1 : e instanceof y(e).HTMLElement;
27
+ }
28
+ function S(e) {
29
+ return e instanceof y(e).SVGElement;
30
+ }
31
+ function C(e) {
32
+ return e ? _(e) ? e.document : v(e) ? b(e) ? e : x(e) || S(e) ? e.ownerDocument : document : document : document;
33
+ }
34
+ var w = g ? c : s;
35
+ function T(e) {
36
+ let t = d(e);
37
+ return w(() => {
38
+ t.current = e;
39
+ }), a(function() {
40
+ var e = [...arguments];
41
+ return t.current == null ? void 0 : t.current(...e);
42
+ }, []);
43
+ }
44
+ function E() {
45
+ let e = d(null);
46
+ return [a((t, n) => {
47
+ e.current = setInterval(t, n);
48
+ }, []), a(() => {
49
+ e.current !== null && (clearInterval(e.current), e.current = null);
50
+ }, [])];
51
+ }
52
+ function ee(e, t) {
53
+ t === void 0 && (t = [e]);
54
+ let n = d(e);
55
+ return w(() => {
56
+ n.current !== e && (n.current = e);
57
+ }, t), n;
58
+ }
59
+ function D(e, t) {
60
+ let n = d();
61
+ return l(() => {
62
+ let t = e(n.current);
63
+ return n.current = t, t;
64
+ }, [...t]);
65
+ }
66
+ function O(e) {
67
+ let t = T(e), n = d(null);
68
+ return [n, a((e) => {
69
+ e !== n.current && t?.(e, n.current), n.current = e;
70
+ }, [])];
71
+ }
72
+ function k(e) {
73
+ let t = d();
74
+ return s(() => {
75
+ t.current = e;
76
+ }, [e]), t.current;
77
+ }
78
+ var A = {};
79
+ function j(e, t) {
80
+ return l(() => {
81
+ if (t) return t;
82
+ let n = A[e] == null ? 0 : A[e] + 1;
83
+ return A[e] = n, e + "-" + n;
84
+ }, [e, t]);
85
+ }
86
+ function te(e) {
87
+ return function(t) {
88
+ return [...arguments].slice(1).reduce((t, n) => {
89
+ let r = Object.entries(n);
90
+ for (let [n, i] of r) {
91
+ let r = t[n];
92
+ r != null && (t[n] = r + e * i);
93
+ }
94
+ return t;
95
+ }, { ...t });
96
+ };
97
+ }
98
+ var ne = /* @__PURE__ */ te(1), re = /* @__PURE__ */ te(-1);
99
+ function M(e) {
100
+ return "clientX" in e && "clientY" in e;
101
+ }
102
+ function N(e) {
103
+ if (!e) return !1;
104
+ let { KeyboardEvent: t } = y(e.target);
105
+ return t && e instanceof t;
106
+ }
107
+ function ie(e) {
108
+ if (!e) return !1;
109
+ let { TouchEvent: t } = y(e.target);
110
+ return t && e instanceof t;
111
+ }
112
+ function ae(e) {
113
+ if (ie(e)) {
114
+ if (e.touches && e.touches.length) {
115
+ let { clientX: t, clientY: n } = e.touches[0];
116
+ return {
117
+ x: t,
118
+ y: n
119
+ };
120
+ } else if (e.changedTouches && e.changedTouches.length) {
121
+ let { clientX: t, clientY: n } = e.changedTouches[0];
122
+ return {
123
+ x: t,
124
+ y: n
125
+ };
126
+ }
127
+ }
128
+ return M(e) ? {
129
+ x: e.clientX,
130
+ y: e.clientY
131
+ } : null;
132
+ }
133
+ var P = /* @__PURE__ */ Object.freeze({
134
+ Translate: { toString(e) {
135
+ if (!e) return;
136
+ let { x: t, y: n } = e;
137
+ return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)";
138
+ } },
139
+ Scale: { toString(e) {
140
+ if (!e) return;
141
+ let { scaleX: t, scaleY: n } = e;
142
+ return "scaleX(" + t + ") scaleY(" + n + ")";
143
+ } },
144
+ Transform: { toString(e) {
145
+ if (e) return [P.Translate.toString(e), P.Scale.toString(e)].join(" ");
146
+ } },
147
+ Transition: { toString(e) {
148
+ let { property: t, duration: n, easing: r } = e;
149
+ return t + " " + n + "ms " + r;
150
+ } }
151
+ }), F = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
152
+ function oe(e) {
153
+ return e.matches(F) ? e : e.querySelector(F);
154
+ }
155
+ //#endregion
156
+ //#region ../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@19.2.4/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
157
+ var I = { display: "none" };
158
+ function se(t) {
159
+ let { id: n, value: r } = t;
160
+ return e.createElement("div", {
161
+ id: n,
162
+ style: I
163
+ }, r);
164
+ }
165
+ function L(t) {
166
+ let { id: n, announcement: r, ariaLiveType: i = "assertive" } = t;
167
+ return e.createElement("div", {
168
+ id: n,
169
+ style: {
170
+ position: "fixed",
171
+ top: 0,
172
+ left: 0,
173
+ width: 1,
174
+ height: 1,
175
+ margin: -1,
176
+ border: 0,
177
+ padding: 0,
178
+ overflow: "hidden",
179
+ clip: "rect(0 0 0 0)",
180
+ clipPath: "inset(100%)",
181
+ whiteSpace: "nowrap"
182
+ },
183
+ role: "status",
184
+ "aria-live": i,
185
+ "aria-atomic": !0
186
+ }, r);
187
+ }
188
+ function R() {
189
+ let [e, t] = f("");
190
+ return {
191
+ announce: a((e) => {
192
+ e != null && t(e);
193
+ }, []),
194
+ announcement: e
195
+ };
196
+ }
197
+ //#endregion
198
+ //#region ../../node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@dnd-kit/core/dist/core.esm.js
199
+ var ce = /* @__PURE__ */ n(null);
200
+ function z(e) {
201
+ let t = o(ce);
202
+ s(() => {
203
+ if (!t) throw Error("useDndMonitor must be used within a children of <DndContext>");
204
+ return t(e);
205
+ }, [e, t]);
206
+ }
207
+ function le() {
208
+ let [e] = f(() => /* @__PURE__ */ new Set()), t = a((t) => (e.add(t), () => e.delete(t)), [e]);
209
+ return [a((t) => {
210
+ let { type: n, event: r } = t;
211
+ e.forEach((e) => e[n]?.call(e, r));
212
+ }, [e]), t];
213
+ }
214
+ var B = { draggable: "\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n " }, V = {
215
+ onDragStart(e) {
216
+ let { active: t } = e;
217
+ return "Picked up draggable item " + t.id + ".";
218
+ },
219
+ onDragOver(e) {
220
+ let { active: t, over: n } = e;
221
+ return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
222
+ },
223
+ onDragEnd(e) {
224
+ let { active: t, over: n } = e;
225
+ return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
226
+ },
227
+ onDragCancel(e) {
228
+ let { active: t } = e;
229
+ return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
230
+ }
231
+ };
232
+ function ue(t) {
233
+ let { announcements: n = V, container: r, hiddenTextDescribedById: i, screenReaderInstructions: a = B } = t, { announce: o, announcement: c } = R(), u = j("DndLiveRegion"), [d, m] = f(!1);
234
+ if (s(() => {
235
+ m(!0);
236
+ }, []), z(l(() => ({
237
+ onDragStart(e) {
238
+ let { active: t } = e;
239
+ o(n.onDragStart({ active: t }));
240
+ },
241
+ onDragMove(e) {
242
+ let { active: t, over: r } = e;
243
+ n.onDragMove && o(n.onDragMove({
244
+ active: t,
245
+ over: r
246
+ }));
247
+ },
248
+ onDragOver(e) {
249
+ let { active: t, over: r } = e;
250
+ o(n.onDragOver({
251
+ active: t,
252
+ over: r
253
+ }));
254
+ },
255
+ onDragEnd(e) {
256
+ let { active: t, over: r } = e;
257
+ o(n.onDragEnd({
258
+ active: t,
259
+ over: r
260
+ }));
261
+ },
262
+ onDragCancel(e) {
263
+ let { active: t, over: r } = e;
264
+ o(n.onDragCancel({
265
+ active: t,
266
+ over: r
267
+ }));
268
+ }
269
+ }), [o, n])), !d) return null;
270
+ let h = e.createElement(e.Fragment, null, e.createElement(se, {
271
+ id: i,
272
+ value: a.draggable
273
+ }), e.createElement(L, {
274
+ id: u,
275
+ announcement: c
276
+ }));
277
+ return r ? p(h, r) : h;
278
+ }
279
+ var H;
280
+ (function(e) {
281
+ e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
282
+ })(H ||= {});
283
+ function U() {}
284
+ function de(e, t) {
285
+ return l(() => ({
286
+ sensor: e,
287
+ options: t ?? {}
288
+ }), [e, t]);
289
+ }
290
+ function fe() {
291
+ var e = [...arguments];
292
+ return l(() => [...e].filter((e) => e != null), [...e]);
293
+ }
294
+ var W = /* @__PURE__ */ Object.freeze({
295
+ x: 0,
296
+ y: 0
297
+ });
298
+ function G(e, t) {
299
+ return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
300
+ }
301
+ function pe(e, t) {
302
+ let n = ae(e);
303
+ if (!n) return "0 0";
304
+ let r = {
305
+ x: (n.x - t.left) / t.width * 100,
306
+ y: (n.y - t.top) / t.height * 100
307
+ };
308
+ return r.x + "% " + r.y + "%";
309
+ }
310
+ function me(e, t) {
311
+ let { data: { value: n } } = e, { data: { value: r } } = t;
312
+ return n - r;
313
+ }
314
+ function he(e, t) {
315
+ let { data: { value: n } } = e, { data: { value: r } } = t;
316
+ return r - n;
317
+ }
318
+ function K(e) {
319
+ let { left: t, top: n, height: r, width: i } = e;
320
+ return [
321
+ {
322
+ x: t,
323
+ y: n
324
+ },
325
+ {
326
+ x: t + i,
327
+ y: n
328
+ },
329
+ {
330
+ x: t,
331
+ y: n + r
332
+ },
333
+ {
334
+ x: t + i,
335
+ y: n + r
336
+ }
337
+ ];
338
+ }
339
+ function ge(e, t) {
340
+ if (!e || e.length === 0) return null;
341
+ let [n] = e;
342
+ return t ? n[t] : n;
343
+ }
344
+ var _e = (e) => {
345
+ let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = K(t), a = [];
346
+ for (let e of r) {
347
+ let { id: t } = e, r = n.get(t);
348
+ if (r) {
349
+ let n = K(r), o = i.reduce((e, t, r) => e + G(n[r], t), 0), s = Number((o / 4).toFixed(4));
350
+ a.push({
351
+ id: t,
352
+ data: {
353
+ droppableContainer: e,
354
+ value: s
355
+ }
356
+ });
357
+ }
358
+ }
359
+ return a.sort(me);
360
+ };
361
+ function ve(e, t) {
362
+ let n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), i = Math.min(t.left + t.width, e.left + e.width), a = Math.min(t.top + t.height, e.top + e.height), o = i - r, s = a - n;
363
+ if (r < i && n < a) {
364
+ let n = t.width * t.height, r = e.width * e.height, i = o * s, a = i / (n + r - i);
365
+ return Number(a.toFixed(4));
366
+ }
367
+ return 0;
368
+ }
369
+ var ye = (e) => {
370
+ let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = [];
371
+ for (let e of r) {
372
+ let { id: r } = e, a = n.get(r);
373
+ if (a) {
374
+ let n = ve(a, t);
375
+ n > 0 && i.push({
376
+ id: r,
377
+ data: {
378
+ droppableContainer: e,
379
+ value: n
380
+ }
381
+ });
382
+ }
383
+ }
384
+ return i.sort(he);
385
+ };
386
+ function be(e, t, n) {
387
+ return {
388
+ ...e,
389
+ scaleX: t && n ? t.width / n.width : 1,
390
+ scaleY: t && n ? t.height / n.height : 1
391
+ };
392
+ }
393
+ function xe(e, t) {
394
+ return e && t ? {
395
+ x: e.left - t.left,
396
+ y: e.top - t.top
397
+ } : W;
398
+ }
399
+ function Se(e) {
400
+ return function(t) {
401
+ return [...arguments].slice(1).reduce((t, n) => ({
402
+ ...t,
403
+ top: t.top + e * n.y,
404
+ bottom: t.bottom + e * n.y,
405
+ left: t.left + e * n.x,
406
+ right: t.right + e * n.x
407
+ }), { ...t });
408
+ };
409
+ }
410
+ var Ce = /* @__PURE__ */ Se(1);
411
+ function we(e) {
412
+ if (e.startsWith("matrix3d(")) {
413
+ let t = e.slice(9, -1).split(/, /);
414
+ return {
415
+ x: +t[12],
416
+ y: +t[13],
417
+ scaleX: +t[0],
418
+ scaleY: +t[5]
419
+ };
420
+ } else if (e.startsWith("matrix(")) {
421
+ let t = e.slice(7, -1).split(/, /);
422
+ return {
423
+ x: +t[4],
424
+ y: +t[5],
425
+ scaleX: +t[0],
426
+ scaleY: +t[3]
427
+ };
428
+ }
429
+ return null;
430
+ }
431
+ function q(e, t, n) {
432
+ let r = we(t);
433
+ if (!r) return e;
434
+ let { scaleX: i, scaleY: a, x: o, y: s } = r, c = e.left - o - (1 - i) * parseFloat(n), l = e.top - s - (1 - a) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = i ? e.width / i : e.width, d = a ? e.height / a : e.height;
435
+ return {
436
+ width: u,
437
+ height: d,
438
+ top: l,
439
+ right: c + u,
440
+ bottom: l + d,
441
+ left: c
442
+ };
443
+ }
444
+ var Te = { ignoreTransform: !1 };
445
+ function J(e, t) {
446
+ t === void 0 && (t = Te);
447
+ let n = e.getBoundingClientRect();
448
+ if (t.ignoreTransform) {
449
+ let { transform: t, transformOrigin: r } = y(e).getComputedStyle(e);
450
+ t && (n = q(n, t, r));
451
+ }
452
+ let { top: r, left: i, width: a, height: o, bottom: s, right: c } = n;
453
+ return {
454
+ top: r,
455
+ left: i,
456
+ width: a,
457
+ height: o,
458
+ bottom: s,
459
+ right: c
460
+ };
461
+ }
462
+ function Ee(e) {
463
+ return J(e, { ignoreTransform: !0 });
464
+ }
465
+ function De(e) {
466
+ let t = e.innerWidth, n = e.innerHeight;
467
+ return {
468
+ top: 0,
469
+ left: 0,
470
+ right: t,
471
+ bottom: n,
472
+ width: t,
473
+ height: n
474
+ };
475
+ }
476
+ function Oe(e, t) {
477
+ return t === void 0 && (t = y(e).getComputedStyle(e)), t.position === "fixed";
478
+ }
479
+ function ke(e, t) {
480
+ t === void 0 && (t = y(e).getComputedStyle(e));
481
+ let n = /(auto|scroll|overlay)/;
482
+ return [
483
+ "overflow",
484
+ "overflowX",
485
+ "overflowY"
486
+ ].some((e) => {
487
+ let r = t[e];
488
+ return typeof r == "string" ? n.test(r) : !1;
489
+ });
490
+ }
491
+ function Y(e, t) {
492
+ let n = [];
493
+ function r(i) {
494
+ if (t != null && n.length >= t || !i) return n;
495
+ if (b(i) && i.scrollingElement != null && !n.includes(i.scrollingElement)) return n.push(i.scrollingElement), n;
496
+ if (!x(i) || S(i) || n.includes(i)) return n;
497
+ let a = y(e).getComputedStyle(i);
498
+ return i !== e && ke(i, a) && n.push(i), Oe(i, a) ? n : r(i.parentNode);
499
+ }
500
+ return e ? r(e) : n;
501
+ }
502
+ function Ae(e) {
503
+ let [t] = Y(e, 1);
504
+ return t ?? null;
505
+ }
506
+ function je(e) {
507
+ return !g || !e ? null : _(e) ? e : v(e) ? b(e) || e === C(e).scrollingElement ? window : x(e) ? e : null : null;
508
+ }
509
+ function Me(e) {
510
+ return _(e) ? e.scrollX : e.scrollLeft;
511
+ }
512
+ function X(e) {
513
+ return _(e) ? e.scrollY : e.scrollTop;
514
+ }
515
+ function Ne(e) {
516
+ return {
517
+ x: Me(e),
518
+ y: X(e)
519
+ };
520
+ }
521
+ var Z;
522
+ (function(e) {
523
+ e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
524
+ })(Z ||= {});
525
+ function Pe(e) {
526
+ return !g || !e ? !1 : e === document.scrollingElement;
527
+ }
528
+ function Fe(e) {
529
+ let t = {
530
+ x: 0,
531
+ y: 0
532
+ }, n = Pe(e) ? {
533
+ height: window.innerHeight,
534
+ width: window.innerWidth
535
+ } : {
536
+ height: e.clientHeight,
537
+ width: e.clientWidth
538
+ }, r = {
539
+ x: e.scrollWidth - n.width,
540
+ y: e.scrollHeight - n.height
541
+ };
542
+ return {
543
+ isTop: e.scrollTop <= t.y,
544
+ isLeft: e.scrollLeft <= t.x,
545
+ isBottom: e.scrollTop >= r.y,
546
+ isRight: e.scrollLeft >= r.x,
547
+ maxScroll: r,
548
+ minScroll: t
549
+ };
550
+ }
551
+ var Ie = {
552
+ x: .2,
553
+ y: .2
554
+ };
555
+ function Le(e, t, n, r, i) {
556
+ let { top: a, left: o, right: s, bottom: c } = n;
557
+ r === void 0 && (r = 10), i === void 0 && (i = Ie);
558
+ let { isTop: l, isBottom: u, isLeft: d, isRight: f } = Fe(e), p = {
559
+ x: 0,
560
+ y: 0
561
+ }, m = {
562
+ x: 0,
563
+ y: 0
564
+ }, h = {
565
+ height: t.height * i.y,
566
+ width: t.width * i.x
567
+ };
568
+ return !l && a <= t.top + h.height ? (p.y = Z.Backward, m.y = r * Math.abs((t.top + h.height - a) / h.height)) : !u && c >= t.bottom - h.height && (p.y = Z.Forward, m.y = r * Math.abs((t.bottom - h.height - c) / h.height)), !f && s >= t.right - h.width ? (p.x = Z.Forward, m.x = r * Math.abs((t.right - h.width - s) / h.width)) : !d && o <= t.left + h.width && (p.x = Z.Backward, m.x = r * Math.abs((t.left + h.width - o) / h.width)), {
569
+ direction: p,
570
+ speed: m
571
+ };
572
+ }
573
+ function Re(e) {
574
+ if (e === document.scrollingElement) {
575
+ let { innerWidth: e, innerHeight: t } = window;
576
+ return {
577
+ top: 0,
578
+ left: 0,
579
+ right: e,
580
+ bottom: t,
581
+ width: e,
582
+ height: t
583
+ };
584
+ }
585
+ let { top: t, left: n, right: r, bottom: i } = e.getBoundingClientRect();
586
+ return {
587
+ top: t,
588
+ left: n,
589
+ right: r,
590
+ bottom: i,
591
+ width: e.clientWidth,
592
+ height: e.clientHeight
593
+ };
594
+ }
595
+ function ze(e) {
596
+ return e.reduce((e, t) => ne(e, Ne(t)), W);
597
+ }
598
+ function Be(e) {
599
+ return e.reduce((e, t) => e + Me(t), 0);
600
+ }
601
+ function Ve(e) {
602
+ return e.reduce((e, t) => e + X(t), 0);
603
+ }
604
+ function He(e, t) {
605
+ if (t === void 0 && (t = J), !e) return;
606
+ let { top: n, left: r, bottom: i, right: a } = t(e);
607
+ Ae(e) && (i <= 0 || a <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
608
+ block: "center",
609
+ inline: "center"
610
+ });
611
+ }
612
+ var Ue = [[
613
+ "x",
614
+ ["left", "right"],
615
+ Be
616
+ ], [
617
+ "y",
618
+ ["top", "bottom"],
619
+ Ve
620
+ ]], We = class {
621
+ constructor(e, t) {
622
+ this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
623
+ let n = Y(t), r = ze(n);
624
+ this.rect = { ...e }, this.width = e.width, this.height = e.height;
625
+ for (let [e, t, i] of Ue) for (let a of t) Object.defineProperty(this, a, {
626
+ get: () => {
627
+ let t = i(n), o = r[e] - t;
628
+ return this.rect[a] + o;
629
+ },
630
+ enumerable: !0
631
+ });
632
+ Object.defineProperty(this, "rect", { enumerable: !1 });
633
+ }
634
+ }, Ge = class {
635
+ constructor(e) {
636
+ this.target = void 0, this.listeners = [], this.removeAll = () => {
637
+ this.listeners.forEach((e) => this.target?.removeEventListener(...e));
638
+ }, this.target = e;
639
+ }
640
+ add(e, t, n) {
641
+ var r;
642
+ (r = this.target) == null || r.addEventListener(e, t, n), this.listeners.push([
643
+ e,
644
+ t,
645
+ n
646
+ ]);
647
+ }
648
+ };
649
+ function Ke(e) {
650
+ let { EventTarget: t } = y(e);
651
+ return e instanceof t ? e : C(e);
652
+ }
653
+ function qe(e, t) {
654
+ let n = Math.abs(e.x), r = Math.abs(e.y);
655
+ return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
656
+ }
657
+ var Q;
658
+ (function(e) {
659
+ e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
660
+ })(Q ||= {});
661
+ function Je(e) {
662
+ e.preventDefault();
663
+ }
664
+ function Ye(e) {
665
+ e.stopPropagation();
666
+ }
667
+ var $;
668
+ (function(e) {
669
+ e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
670
+ })($ ||= {});
671
+ var Xe = {
672
+ start: [$.Space, $.Enter],
673
+ cancel: [$.Esc],
674
+ end: [
675
+ $.Space,
676
+ $.Enter,
677
+ $.Tab
678
+ ]
679
+ }, Ze = (e, t) => {
680
+ let { currentCoordinates: n } = t;
681
+ switch (e.code) {
682
+ case $.Right: return {
683
+ ...n,
684
+ x: n.x + 25
685
+ };
686
+ case $.Left: return {
687
+ ...n,
688
+ x: n.x - 25
689
+ };
690
+ case $.Down: return {
691
+ ...n,
692
+ y: n.y + 25
693
+ };
694
+ case $.Up: return {
695
+ ...n,
696
+ y: n.y - 25
697
+ };
698
+ }
699
+ }, Qe = class {
700
+ constructor(e) {
701
+ this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
702
+ let { event: { target: t } } = e;
703
+ this.props = e, this.listeners = new Ge(C(t)), this.windowListeners = new Ge(y(t)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
704
+ }
705
+ attach() {
706
+ this.handleStart(), this.windowListeners.add(Q.Resize, this.handleCancel), this.windowListeners.add(Q.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Q.Keydown, this.handleKeyDown));
707
+ }
708
+ handleStart() {
709
+ let { activeNode: e, onStart: t } = this.props, n = e.node.current;
710
+ n && He(n), t(W);
711
+ }
712
+ handleKeyDown(e) {
713
+ if (N(e)) {
714
+ let { active: t, context: n, options: r } = this.props, { keyboardCodes: i = Xe, coordinateGetter: a = Ze, scrollBehavior: o = "smooth" } = r, { code: s } = e;
715
+ if (i.end.includes(s)) {
716
+ this.handleEnd(e);
717
+ return;
718
+ }
719
+ if (i.cancel.includes(s)) {
720
+ this.handleCancel(e);
721
+ return;
722
+ }
723
+ let { collisionRect: c } = n.current, l = c ? {
724
+ x: c.left,
725
+ y: c.top
726
+ } : W;
727
+ this.referenceCoordinates ||= l;
728
+ let u = a(e, {
729
+ active: t,
730
+ context: n.current,
731
+ currentCoordinates: l
732
+ });
733
+ if (u) {
734
+ let t = re(u, l), r = {
735
+ x: 0,
736
+ y: 0
737
+ }, { scrollableAncestors: i } = n.current;
738
+ for (let n of i) {
739
+ let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } = Fe(n), p = Re(n), m = {
740
+ x: Math.min(i === $.Right ? p.right - p.width / 2 : p.right, Math.max(i === $.Right ? p.left : p.left + p.width / 2, u.x)),
741
+ y: Math.min(i === $.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(i === $.Down ? p.top : p.top + p.height / 2, u.y))
742
+ }, h = i === $.Right && !s || i === $.Left && !c, g = i === $.Down && !l || i === $.Up && !a;
743
+ if (h && m.x !== u.x) {
744
+ let e = n.scrollLeft + t.x, a = i === $.Right && e <= d.x || i === $.Left && e >= f.x;
745
+ if (a && !t.y) {
746
+ n.scrollTo({
747
+ left: e,
748
+ behavior: o
749
+ });
750
+ return;
751
+ }
752
+ a ? r.x = n.scrollLeft - e : r.x = i === $.Right ? n.scrollLeft - d.x : n.scrollLeft - f.x, r.x && n.scrollBy({
753
+ left: -r.x,
754
+ behavior: o
755
+ });
756
+ break;
757
+ } else if (g && m.y !== u.y) {
758
+ let e = n.scrollTop + t.y, a = i === $.Down && e <= d.y || i === $.Up && e >= f.y;
759
+ if (a && !t.x) {
760
+ n.scrollTo({
761
+ top: e,
762
+ behavior: o
763
+ });
764
+ return;
765
+ }
766
+ a ? r.y = n.scrollTop - e : r.y = i === $.Down ? n.scrollTop - d.y : n.scrollTop - f.y, r.y && n.scrollBy({
767
+ top: -r.y,
768
+ behavior: o
769
+ });
770
+ break;
771
+ }
772
+ }
773
+ this.handleMove(e, ne(re(u, this.referenceCoordinates), r));
774
+ }
775
+ }
776
+ }
777
+ handleMove(e, t) {
778
+ let { onMove: n } = this.props;
779
+ e.preventDefault(), n(t);
780
+ }
781
+ handleEnd(e) {
782
+ let { onEnd: t } = this.props;
783
+ e.preventDefault(), this.detach(), t();
784
+ }
785
+ handleCancel(e) {
786
+ let { onCancel: t } = this.props;
787
+ e.preventDefault(), this.detach(), t();
788
+ }
789
+ detach() {
790
+ this.listeners.removeAll(), this.windowListeners.removeAll();
791
+ }
792
+ };
793
+ Qe.activators = [{
794
+ eventName: "onKeyDown",
795
+ handler: (e, t, n) => {
796
+ let { keyboardCodes: r = Xe, onActivation: i } = t, { active: a } = n, { code: o } = e.nativeEvent;
797
+ if (r.start.includes(o)) {
798
+ let t = a.activatorNode.current;
799
+ return t && e.target !== t ? !1 : (e.preventDefault(), i?.({ event: e.nativeEvent }), !0);
800
+ }
801
+ return !1;
802
+ }
803
+ }];
804
+ function $e(e) {
805
+ return !!(e && "distance" in e);
806
+ }
807
+ function et(e) {
808
+ return !!(e && "delay" in e);
809
+ }
810
+ var tt = class {
811
+ constructor(e, t, n) {
812
+ n === void 0 && (n = Ke(e.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = e, this.events = t;
813
+ let { event: r } = e, { target: i } = r;
814
+ this.props = e, this.events = t, this.document = C(i), this.documentListeners = new Ge(this.document), this.listeners = new Ge(n), this.windowListeners = new Ge(y(i)), this.initialCoordinates = ae(r) ?? W, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
815
+ }
816
+ attach() {
817
+ let { events: e, props: { options: { activationConstraint: t, bypassActivationConstraint: n } } } = this;
818
+ if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(Q.Resize, this.handleCancel), this.windowListeners.add(Q.DragStart, Je), this.windowListeners.add(Q.VisibilityChange, this.handleCancel), this.windowListeners.add(Q.ContextMenu, Je), this.documentListeners.add(Q.Keydown, this.handleKeydown), t) {
819
+ if (n != null && n({
820
+ event: this.props.event,
821
+ activeNode: this.props.activeNode,
822
+ options: this.props.options
823
+ })) return this.handleStart();
824
+ if (et(t)) {
825
+ this.timeoutId = setTimeout(this.handleStart, t.delay), this.handlePending(t);
826
+ return;
827
+ }
828
+ if ($e(t)) {
829
+ this.handlePending(t);
830
+ return;
831
+ }
832
+ }
833
+ this.handleStart();
834
+ }
835
+ detach() {
836
+ this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
837
+ }
838
+ handlePending(e, t) {
839
+ let { active: n, onPending: r } = this.props;
840
+ r(n, e, this.initialCoordinates, t);
841
+ }
842
+ handleStart() {
843
+ let { initialCoordinates: e } = this, { onStart: t } = this.props;
844
+ e && (this.activated = !0, this.documentListeners.add(Q.Click, Ye, { capture: !0 }), this.removeTextSelection(), this.documentListeners.add(Q.SelectionChange, this.removeTextSelection), t(e));
845
+ }
846
+ handleMove(e) {
847
+ let { activated: t, initialCoordinates: n, props: r } = this, { onMove: i, options: { activationConstraint: a } } = r;
848
+ if (!n) return;
849
+ let o = ae(e) ?? W, s = re(n, o);
850
+ if (!t && a) {
851
+ if ($e(a)) {
852
+ if (a.tolerance != null && qe(s, a.tolerance)) return this.handleCancel();
853
+ if (qe(s, a.distance)) return this.handleStart();
854
+ }
855
+ if (et(a) && qe(s, a.tolerance)) return this.handleCancel();
856
+ this.handlePending(a, s);
857
+ return;
858
+ }
859
+ e.cancelable && e.preventDefault(), i(o);
860
+ }
861
+ handleEnd() {
862
+ let { onAbort: e, onEnd: t } = this.props;
863
+ this.detach(), this.activated || e(this.props.active), t();
864
+ }
865
+ handleCancel() {
866
+ let { onAbort: e, onCancel: t } = this.props;
867
+ this.detach(), this.activated || e(this.props.active), t();
868
+ }
869
+ handleKeydown(e) {
870
+ e.code === $.Esc && this.handleCancel();
871
+ }
872
+ removeTextSelection() {
873
+ var e;
874
+ (e = this.document.getSelection()) == null || e.removeAllRanges();
875
+ }
876
+ }, nt = {
877
+ cancel: { name: "pointercancel" },
878
+ move: { name: "pointermove" },
879
+ end: { name: "pointerup" }
880
+ }, rt = class extends tt {
881
+ constructor(e) {
882
+ let { event: t } = e, n = C(t.target);
883
+ super(e, nt, n);
884
+ }
885
+ };
886
+ rt.activators = [{
887
+ eventName: "onPointerDown",
888
+ handler: (e, t) => {
889
+ let { nativeEvent: n } = e, { onActivation: r } = t;
890
+ return !n.isPrimary || n.button !== 0 ? !1 : (r?.({ event: n }), !0);
891
+ }
892
+ }];
893
+ var it = {
894
+ move: { name: "mousemove" },
895
+ end: { name: "mouseup" }
896
+ }, at;
897
+ (function(e) {
898
+ e[e.RightClick = 2] = "RightClick";
899
+ })(at ||= {});
900
+ var ot = class extends tt {
901
+ constructor(e) {
902
+ super(e, it, C(e.event.target));
903
+ }
904
+ };
905
+ ot.activators = [{
906
+ eventName: "onMouseDown",
907
+ handler: (e, t) => {
908
+ let { nativeEvent: n } = e, { onActivation: r } = t;
909
+ return n.button === at.RightClick ? !1 : (r?.({ event: n }), !0);
910
+ }
911
+ }];
912
+ var st = {
913
+ cancel: { name: "touchcancel" },
914
+ move: { name: "touchmove" },
915
+ end: { name: "touchend" }
916
+ }, ct = class extends tt {
917
+ constructor(e) {
918
+ super(e, st);
919
+ }
920
+ static setup() {
921
+ return window.addEventListener(st.move.name, e, {
922
+ capture: !1,
923
+ passive: !1
924
+ }), function() {
925
+ window.removeEventListener(st.move.name, e);
926
+ };
927
+ function e() {}
928
+ }
929
+ };
930
+ ct.activators = [{
931
+ eventName: "onTouchStart",
932
+ handler: (e, t) => {
933
+ let { nativeEvent: n } = e, { onActivation: r } = t, { touches: i } = n;
934
+ return i.length > 1 ? !1 : (r?.({ event: n }), !0);
935
+ }
936
+ }];
937
+ var lt;
938
+ (function(e) {
939
+ e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
940
+ })(lt ||= {});
941
+ var ut;
942
+ (function(e) {
943
+ e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
944
+ })(ut ||= {});
945
+ function dt(e) {
946
+ let { acceleration: t, activator: n = lt.Pointer, canScroll: r, draggingRect: i, enabled: o, interval: c = 5, order: u = ut.TreeOrder, pointerCoordinates: f, scrollableAncestors: p, scrollableAncestorRects: m, delta: h, threshold: g } = e, _ = pt({
947
+ delta: h,
948
+ disabled: !o
949
+ }), [v, y] = E(), b = d({
950
+ x: 0,
951
+ y: 0
952
+ }), x = d({
953
+ x: 0,
954
+ y: 0
955
+ }), S = l(() => {
956
+ switch (n) {
957
+ case lt.Pointer: return f ? {
958
+ top: f.y,
959
+ bottom: f.y,
960
+ left: f.x,
961
+ right: f.x
962
+ } : null;
963
+ case lt.DraggableRect: return i;
964
+ }
965
+ }, [
966
+ n,
967
+ i,
968
+ f
969
+ ]), C = d(null), w = a(() => {
970
+ let e = C.current;
971
+ if (!e) return;
972
+ let t = b.current.x * x.current.x, n = b.current.y * x.current.y;
973
+ e.scrollBy(t, n);
974
+ }, []), T = l(() => u === ut.TreeOrder ? [...p].reverse() : p, [u, p]);
975
+ s(() => {
976
+ if (!o || !p.length || !S) {
977
+ y();
978
+ return;
979
+ }
980
+ for (let e of T) {
981
+ if (r?.(e) === !1) continue;
982
+ let n = m[p.indexOf(e)];
983
+ if (!n) continue;
984
+ let { direction: i, speed: a } = Le(e, n, S, t, g);
985
+ for (let e of ["x", "y"]) _[e][i[e]] || (a[e] = 0, i[e] = 0);
986
+ if (a.x > 0 || a.y > 0) {
987
+ y(), C.current = e, v(w, c), b.current = a, x.current = i;
988
+ return;
989
+ }
990
+ }
991
+ b.current = {
992
+ x: 0,
993
+ y: 0
994
+ }, x.current = {
995
+ x: 0,
996
+ y: 0
997
+ }, y();
998
+ }, [
999
+ t,
1000
+ w,
1001
+ r,
1002
+ y,
1003
+ o,
1004
+ c,
1005
+ JSON.stringify(S),
1006
+ JSON.stringify(_),
1007
+ v,
1008
+ p,
1009
+ T,
1010
+ m,
1011
+ JSON.stringify(g)
1012
+ ]);
1013
+ }
1014
+ var ft = {
1015
+ x: {
1016
+ [Z.Backward]: !1,
1017
+ [Z.Forward]: !1
1018
+ },
1019
+ y: {
1020
+ [Z.Backward]: !1,
1021
+ [Z.Forward]: !1
1022
+ }
1023
+ };
1024
+ function pt(e) {
1025
+ let { delta: t, disabled: n } = e, r = k(t);
1026
+ return D((e) => {
1027
+ if (n || !r || !e) return ft;
1028
+ let i = {
1029
+ x: Math.sign(t.x - r.x),
1030
+ y: Math.sign(t.y - r.y)
1031
+ };
1032
+ return {
1033
+ x: {
1034
+ [Z.Backward]: e.x[Z.Backward] || i.x === -1,
1035
+ [Z.Forward]: e.x[Z.Forward] || i.x === 1
1036
+ },
1037
+ y: {
1038
+ [Z.Backward]: e.y[Z.Backward] || i.y === -1,
1039
+ [Z.Forward]: e.y[Z.Forward] || i.y === 1
1040
+ }
1041
+ };
1042
+ }, [
1043
+ n,
1044
+ t,
1045
+ r
1046
+ ]);
1047
+ }
1048
+ function mt(e, t) {
1049
+ let n = t == null ? void 0 : e.get(t), r = n ? n.node.current : null;
1050
+ return D((e) => t == null ? null : r ?? e ?? null, [r, t]);
1051
+ }
1052
+ function ht(e, t) {
1053
+ return l(() => e.reduce((e, n) => {
1054
+ let { sensor: r } = n, i = r.activators.map((e) => ({
1055
+ eventName: e.eventName,
1056
+ handler: t(e.handler, n)
1057
+ }));
1058
+ return [...e, ...i];
1059
+ }, []), [e, t]);
1060
+ }
1061
+ var gt;
1062
+ (function(e) {
1063
+ e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1064
+ })(gt ||= {});
1065
+ var _t;
1066
+ (function(e) {
1067
+ e.Optimized = "optimized";
1068
+ })(_t ||= {});
1069
+ var vt = /* @__PURE__ */ new Map();
1070
+ function yt(e, t) {
1071
+ let { dragging: n, dependencies: r, config: i } = t, [o, c] = f(null), { frequency: l, measure: u, strategy: p } = i, m = d(e), h = b(), g = ee(h), _ = a(function(e) {
1072
+ e === void 0 && (e = []), !g.current && c((t) => t === null ? e : t.concat(e.filter((e) => !t.includes(e))));
1073
+ }, [g]), v = d(null), y = D((t) => {
1074
+ if (h && !n) return vt;
1075
+ if (!t || t === vt || m.current !== e || o != null) {
1076
+ let t = /* @__PURE__ */ new Map();
1077
+ for (let n of e) {
1078
+ if (!n) continue;
1079
+ if (o && o.length > 0 && !o.includes(n.id) && n.rect.current) {
1080
+ t.set(n.id, n.rect.current);
1081
+ continue;
1082
+ }
1083
+ let e = n.node.current, r = e ? new We(u(e), e) : null;
1084
+ n.rect.current = r, r && t.set(n.id, r);
1085
+ }
1086
+ return t;
1087
+ }
1088
+ return t;
1089
+ }, [
1090
+ e,
1091
+ o,
1092
+ n,
1093
+ h,
1094
+ u
1095
+ ]);
1096
+ return s(() => {
1097
+ m.current = e;
1098
+ }, [e]), s(() => {
1099
+ h || _();
1100
+ }, [n, h]), s(() => {
1101
+ o && o.length > 0 && c(null);
1102
+ }, [JSON.stringify(o)]), s(() => {
1103
+ h || typeof l != "number" || v.current !== null || (v.current = setTimeout(() => {
1104
+ _(), v.current = null;
1105
+ }, l));
1106
+ }, [
1107
+ l,
1108
+ h,
1109
+ _,
1110
+ ...r
1111
+ ]), {
1112
+ droppableRects: y,
1113
+ measureDroppableContainers: _,
1114
+ measuringScheduled: o != null
1115
+ };
1116
+ function b() {
1117
+ switch (p) {
1118
+ case gt.Always: return !1;
1119
+ case gt.BeforeDragging: return n;
1120
+ default: return !n;
1121
+ }
1122
+ }
1123
+ }
1124
+ function bt(e, t) {
1125
+ return D((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1126
+ }
1127
+ function xt(e, t) {
1128
+ return bt(e, t);
1129
+ }
1130
+ function St(e) {
1131
+ let { callback: t, disabled: n } = e, r = T(t), i = l(() => {
1132
+ if (n || typeof window > "u" || window.MutationObserver === void 0) return;
1133
+ let { MutationObserver: e } = window;
1134
+ return new e(r);
1135
+ }, [r, n]);
1136
+ return s(() => () => i?.disconnect(), [i]), i;
1137
+ }
1138
+ function Ct(e) {
1139
+ let { callback: t, disabled: n } = e, r = T(t), i = l(() => {
1140
+ if (n || typeof window > "u" || window.ResizeObserver === void 0) return;
1141
+ let { ResizeObserver: e } = window;
1142
+ return new e(r);
1143
+ }, [n]);
1144
+ return s(() => () => i?.disconnect(), [i]), i;
1145
+ }
1146
+ function wt(e) {
1147
+ return new We(J(e), e);
1148
+ }
1149
+ function Tt(e, t, n) {
1150
+ t === void 0 && (t = wt);
1151
+ let [r, i] = f(null);
1152
+ function a() {
1153
+ i((r) => {
1154
+ if (!e) return null;
1155
+ if (e.isConnected === !1) return r ?? n ?? null;
1156
+ let i = t(e);
1157
+ return JSON.stringify(r) === JSON.stringify(i) ? r : i;
1158
+ });
1159
+ }
1160
+ let o = St({ callback(t) {
1161
+ if (e) for (let n of t) {
1162
+ let { type: t, target: r } = n;
1163
+ if (t === "childList" && r instanceof HTMLElement && r.contains(e)) {
1164
+ a();
1165
+ break;
1166
+ }
1167
+ }
1168
+ } }), s = Ct({ callback: a });
1169
+ return w(() => {
1170
+ a(), e ? (s?.observe(e), o?.observe(document.body, {
1171
+ childList: !0,
1172
+ subtree: !0
1173
+ })) : (s?.disconnect(), o?.disconnect());
1174
+ }, [e]), r;
1175
+ }
1176
+ function Et(e) {
1177
+ return xe(e, bt(e));
1178
+ }
1179
+ var Dt = [];
1180
+ function Ot(e) {
1181
+ let t = d(e), n = D((n) => e ? n && n !== Dt && e && t.current && e.parentNode === t.current.parentNode ? n : Y(e) : Dt, [e]);
1182
+ return s(() => {
1183
+ t.current = e;
1184
+ }, [e]), n;
1185
+ }
1186
+ function kt(e) {
1187
+ let [t, n] = f(null), r = d(e), i = a((e) => {
1188
+ let t = je(e.target);
1189
+ t && n((e) => e ? (e.set(t, Ne(t)), new Map(e)) : null);
1190
+ }, []);
1191
+ return s(() => {
1192
+ let t = r.current;
1193
+ if (e !== t) {
1194
+ a(t);
1195
+ let o = e.map((e) => {
1196
+ let t = je(e);
1197
+ return t ? (t.addEventListener("scroll", i, { passive: !0 }), [t, Ne(t)]) : null;
1198
+ }).filter((e) => e != null);
1199
+ n(o.length ? new Map(o) : null), r.current = e;
1200
+ }
1201
+ return () => {
1202
+ a(e), a(t);
1203
+ };
1204
+ function a(e) {
1205
+ e.forEach((e) => {
1206
+ je(e)?.removeEventListener("scroll", i);
1207
+ });
1208
+ }
1209
+ }, [i, e]), l(() => e.length ? t ? Array.from(t.values()).reduce((e, t) => ne(e, t), W) : ze(e) : W, [e, t]);
1210
+ }
1211
+ function At(e, t) {
1212
+ t === void 0 && (t = []);
1213
+ let n = d(null);
1214
+ return s(() => {
1215
+ n.current = null;
1216
+ }, t), s(() => {
1217
+ let t = e !== W;
1218
+ t && !n.current && (n.current = e), !t && n.current && (n.current = null);
1219
+ }, [e]), n.current ? re(e, n.current) : W;
1220
+ }
1221
+ function jt(e) {
1222
+ s(() => {
1223
+ if (!g) return;
1224
+ let t = e.map((e) => {
1225
+ let { sensor: t } = e;
1226
+ return t.setup == null ? void 0 : t.setup();
1227
+ });
1228
+ return () => {
1229
+ for (let e of t) e?.();
1230
+ };
1231
+ }, e.map((e) => {
1232
+ let { sensor: t } = e;
1233
+ return t;
1234
+ }));
1235
+ }
1236
+ function Mt(e, t) {
1237
+ return l(() => e.reduce((e, n) => {
1238
+ let { eventName: r, handler: i } = n;
1239
+ return e[r] = (e) => {
1240
+ i(e, t);
1241
+ }, e;
1242
+ }, {}), [e, t]);
1243
+ }
1244
+ function Nt(e) {
1245
+ return l(() => e ? De(e) : null, [e]);
1246
+ }
1247
+ var Pt = [];
1248
+ function Ft(e, t) {
1249
+ t === void 0 && (t = J);
1250
+ let [n] = e, r = Nt(n ? y(n) : null), [i, a] = f(Pt);
1251
+ function o() {
1252
+ a(() => e.length ? e.map((e) => Pe(e) ? r : new We(t(e), e)) : Pt);
1253
+ }
1254
+ let s = Ct({ callback: o });
1255
+ return w(() => {
1256
+ s?.disconnect(), o(), e.forEach((e) => s?.observe(e));
1257
+ }, [e]), i;
1258
+ }
1259
+ function It(e) {
1260
+ if (!e) return null;
1261
+ if (e.children.length > 1) return e;
1262
+ let t = e.children[0];
1263
+ return x(t) ? t : e;
1264
+ }
1265
+ function Lt(e) {
1266
+ let { measure: t } = e, [n, r] = f(null), i = Ct({ callback: a((e) => {
1267
+ for (let { target: n } of e) if (x(n)) {
1268
+ r((e) => {
1269
+ let r = t(n);
1270
+ return e ? {
1271
+ ...e,
1272
+ width: r.width,
1273
+ height: r.height
1274
+ } : r;
1275
+ });
1276
+ break;
1277
+ }
1278
+ }, [t]) }), [o, s] = O(a((e) => {
1279
+ let n = It(e);
1280
+ i?.disconnect(), n && i?.observe(n), r(n ? t(n) : null);
1281
+ }, [t, i]));
1282
+ return l(() => ({
1283
+ nodeRef: o,
1284
+ rect: n,
1285
+ setRef: s
1286
+ }), [
1287
+ n,
1288
+ o,
1289
+ s
1290
+ ]);
1291
+ }
1292
+ var Rt = [{
1293
+ sensor: rt,
1294
+ options: {}
1295
+ }, {
1296
+ sensor: Qe,
1297
+ options: {}
1298
+ }], zt = { current: {} }, Bt = {
1299
+ draggable: { measure: Ee },
1300
+ droppable: {
1301
+ measure: Ee,
1302
+ strategy: gt.WhileDragging,
1303
+ frequency: _t.Optimized
1304
+ },
1305
+ dragOverlay: { measure: J }
1306
+ }, Vt = class extends Map {
1307
+ get(e) {
1308
+ return e == null ? void 0 : super.get(e) ?? void 0;
1309
+ }
1310
+ toArray() {
1311
+ return Array.from(this.values());
1312
+ }
1313
+ getEnabled() {
1314
+ return this.toArray().filter((e) => {
1315
+ let { disabled: t } = e;
1316
+ return !t;
1317
+ });
1318
+ }
1319
+ getNodeFor(e) {
1320
+ return this.get(e)?.node.current ?? void 0;
1321
+ }
1322
+ }, Ht = {
1323
+ activatorEvent: null,
1324
+ active: null,
1325
+ activeNode: null,
1326
+ activeNodeRect: null,
1327
+ collisions: null,
1328
+ containerNodeRect: null,
1329
+ draggableNodes: /* @__PURE__ */ new Map(),
1330
+ droppableRects: /* @__PURE__ */ new Map(),
1331
+ droppableContainers: /* @__PURE__ */ new Vt(),
1332
+ over: null,
1333
+ dragOverlay: {
1334
+ nodeRef: { current: null },
1335
+ rect: null,
1336
+ setRef: U
1337
+ },
1338
+ scrollableAncestors: [],
1339
+ scrollableAncestorRects: [],
1340
+ measuringConfiguration: Bt,
1341
+ measureDroppableContainers: U,
1342
+ windowRect: null,
1343
+ measuringScheduled: !1
1344
+ }, Ut = {
1345
+ activatorEvent: null,
1346
+ activators: [],
1347
+ active: null,
1348
+ activeNodeRect: null,
1349
+ ariaDescribedById: { draggable: "" },
1350
+ dispatch: U,
1351
+ draggableNodes: /* @__PURE__ */ new Map(),
1352
+ over: null,
1353
+ measureDroppableContainers: U
1354
+ }, Wt = /* @__PURE__ */ n(Ut), Gt = /* @__PURE__ */ n(Ht);
1355
+ function Kt() {
1356
+ return {
1357
+ draggable: {
1358
+ active: null,
1359
+ initialCoordinates: {
1360
+ x: 0,
1361
+ y: 0
1362
+ },
1363
+ nodes: /* @__PURE__ */ new Map(),
1364
+ translate: {
1365
+ x: 0,
1366
+ y: 0
1367
+ }
1368
+ },
1369
+ droppable: { containers: new Vt() }
1370
+ };
1371
+ }
1372
+ function qt(e, t) {
1373
+ switch (t.type) {
1374
+ case H.DragStart: return {
1375
+ ...e,
1376
+ draggable: {
1377
+ ...e.draggable,
1378
+ initialCoordinates: t.initialCoordinates,
1379
+ active: t.active
1380
+ }
1381
+ };
1382
+ case H.DragMove: return e.draggable.active == null ? e : {
1383
+ ...e,
1384
+ draggable: {
1385
+ ...e.draggable,
1386
+ translate: {
1387
+ x: t.coordinates.x - e.draggable.initialCoordinates.x,
1388
+ y: t.coordinates.y - e.draggable.initialCoordinates.y
1389
+ }
1390
+ }
1391
+ };
1392
+ case H.DragEnd:
1393
+ case H.DragCancel: return {
1394
+ ...e,
1395
+ draggable: {
1396
+ ...e.draggable,
1397
+ active: null,
1398
+ initialCoordinates: {
1399
+ x: 0,
1400
+ y: 0
1401
+ },
1402
+ translate: {
1403
+ x: 0,
1404
+ y: 0
1405
+ }
1406
+ }
1407
+ };
1408
+ case H.RegisterDroppable: {
1409
+ let { element: n } = t, { id: r } = n, i = new Vt(e.droppable.containers);
1410
+ return i.set(r, n), {
1411
+ ...e,
1412
+ droppable: {
1413
+ ...e.droppable,
1414
+ containers: i
1415
+ }
1416
+ };
1417
+ }
1418
+ case H.SetDroppableDisabled: {
1419
+ let { id: n, key: r, disabled: i } = t, a = e.droppable.containers.get(n);
1420
+ if (!a || r !== a.key) return e;
1421
+ let o = new Vt(e.droppable.containers);
1422
+ return o.set(n, {
1423
+ ...a,
1424
+ disabled: i
1425
+ }), {
1426
+ ...e,
1427
+ droppable: {
1428
+ ...e.droppable,
1429
+ containers: o
1430
+ }
1431
+ };
1432
+ }
1433
+ case H.UnregisterDroppable: {
1434
+ let { id: n, key: r } = t, i = e.droppable.containers.get(n);
1435
+ if (!i || r !== i.key) return e;
1436
+ let a = new Vt(e.droppable.containers);
1437
+ return a.delete(n), {
1438
+ ...e,
1439
+ droppable: {
1440
+ ...e.droppable,
1441
+ containers: a
1442
+ }
1443
+ };
1444
+ }
1445
+ default: return e;
1446
+ }
1447
+ }
1448
+ function Jt(e) {
1449
+ let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = o(Wt), a = k(r), c = k(n?.id);
1450
+ return s(() => {
1451
+ if (!t && !r && a && c != null) {
1452
+ if (!N(a) || document.activeElement === a.target) return;
1453
+ let e = i.get(c);
1454
+ if (!e) return;
1455
+ let { activatorNode: t, node: n } = e;
1456
+ if (!t.current && !n.current) return;
1457
+ requestAnimationFrame(() => {
1458
+ for (let e of [t.current, n.current]) {
1459
+ if (!e) continue;
1460
+ let t = oe(e);
1461
+ if (t) {
1462
+ t.focus();
1463
+ break;
1464
+ }
1465
+ }
1466
+ });
1467
+ }
1468
+ }, [
1469
+ r,
1470
+ t,
1471
+ i,
1472
+ c,
1473
+ a
1474
+ ]), null;
1475
+ }
1476
+ function Yt(e, t) {
1477
+ let { transform: n, ...r } = t;
1478
+ return e != null && e.length ? e.reduce((e, t) => t({
1479
+ transform: e,
1480
+ ...r
1481
+ }), n) : n;
1482
+ }
1483
+ function Xt(e) {
1484
+ return l(() => ({
1485
+ draggable: {
1486
+ ...Bt.draggable,
1487
+ ...e?.draggable
1488
+ },
1489
+ droppable: {
1490
+ ...Bt.droppable,
1491
+ ...e?.droppable
1492
+ },
1493
+ dragOverlay: {
1494
+ ...Bt.dragOverlay,
1495
+ ...e?.dragOverlay
1496
+ }
1497
+ }), [
1498
+ e?.draggable,
1499
+ e?.droppable,
1500
+ e?.dragOverlay
1501
+ ]);
1502
+ }
1503
+ function Zt(e) {
1504
+ let { activeNode: t, measure: n, initialRect: r, config: i = !0 } = e, a = d(!1), { x: o, y: s } = typeof i == "boolean" ? {
1505
+ x: i,
1506
+ y: i
1507
+ } : i;
1508
+ w(() => {
1509
+ if (!o && !s || !t) {
1510
+ a.current = !1;
1511
+ return;
1512
+ }
1513
+ if (a.current || !r) return;
1514
+ let e = t?.node.current;
1515
+ if (!e || e.isConnected === !1) return;
1516
+ let i = xe(n(e), r);
1517
+ if (o || (i.x = 0), s || (i.y = 0), a.current = !0, Math.abs(i.x) > 0 || Math.abs(i.y) > 0) {
1518
+ let t = Ae(e);
1519
+ t && t.scrollBy({
1520
+ top: i.y,
1521
+ left: i.x
1522
+ });
1523
+ }
1524
+ }, [
1525
+ t,
1526
+ o,
1527
+ s,
1528
+ r,
1529
+ n
1530
+ ]);
1531
+ }
1532
+ var Qt = /* @__PURE__ */ n({
1533
+ ...W,
1534
+ scaleX: 1,
1535
+ scaleY: 1
1536
+ }), $t;
1537
+ (function(e) {
1538
+ e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
1539
+ })($t ||= {});
1540
+ var en = /* @__PURE__ */ i(function(t) {
1541
+ let { id: n, accessibility: r, autoScroll: i = !0, children: o, sensors: c = Rt, collisionDetection: p = ye, measuring: h, modifiers: g, ..._ } = t, [v, b] = u(qt, void 0, Kt), [x, S] = le(), [C, T] = f($t.Uninitialized), E = C === $t.Initialized, { draggable: { active: D, nodes: O, translate: k }, droppable: { containers: A } } = v, te = D == null ? null : O.get(D), re = d({
1542
+ initial: null,
1543
+ translated: null
1544
+ }), M = l(() => D == null ? null : {
1545
+ id: D,
1546
+ data: te?.data ?? zt,
1547
+ rect: re
1548
+ }, [D, te]), N = d(null), [ie, P] = f(null), [F, oe] = f(null), I = ee(_, Object.values(_)), se = j("DndDescribedBy", n), L = l(() => A.getEnabled(), [A]), R = Xt(h), { droppableRects: z, measureDroppableContainers: B, measuringScheduled: V } = yt(L, {
1549
+ dragging: E,
1550
+ dependencies: [k.x, k.y],
1551
+ config: R.droppable
1552
+ }), U = mt(O, D), de = l(() => F ? ae(F) : null, [F]), fe = ze(), W = xt(U, R.draggable.measure);
1553
+ Zt({
1554
+ activeNode: D == null ? null : O.get(D),
1555
+ config: fe.layoutShiftCompensation,
1556
+ initialRect: W,
1557
+ measure: R.draggable.measure
1558
+ });
1559
+ let G = Tt(U, R.draggable.measure, W), pe = Tt(U ? U.parentElement : null), me = d({
1560
+ activatorEvent: null,
1561
+ active: null,
1562
+ activeNode: U,
1563
+ collisionRect: null,
1564
+ collisions: null,
1565
+ droppableRects: z,
1566
+ draggableNodes: O,
1567
+ draggingNode: null,
1568
+ draggingNodeRect: null,
1569
+ droppableContainers: A,
1570
+ over: null,
1571
+ scrollableAncestors: [],
1572
+ scrollAdjustedTranslate: null
1573
+ }), he = A.getNodeFor(me.current.over?.id), K = Lt({ measure: R.dragOverlay.measure }), _e = K.nodeRef.current ?? U, ve = E ? K.rect ?? G : null, xe = !!(K.nodeRef.current && K.rect), Se = Et(xe ? null : G), we = Nt(_e ? y(_e) : null), q = Ot(E ? he ?? U : null), Te = Ft(q), J = Yt(g, {
1574
+ transform: {
1575
+ x: k.x - Se.x,
1576
+ y: k.y - Se.y,
1577
+ scaleX: 1,
1578
+ scaleY: 1
1579
+ },
1580
+ activatorEvent: F,
1581
+ active: M,
1582
+ activeNodeRect: G,
1583
+ containerNodeRect: pe,
1584
+ draggingNodeRect: ve,
1585
+ over: me.current.over,
1586
+ overlayNodeRect: K.rect,
1587
+ scrollableAncestors: q,
1588
+ scrollableAncestorRects: Te,
1589
+ windowRect: we
1590
+ }), Ee = de ? ne(de, k) : null, De = kt(q), Oe = At(De), ke = At(De, [G]), Y = ne(J, Oe), Ae = ve ? Ce(ve, J) : null, je = M && Ae ? p({
1591
+ active: M,
1592
+ collisionRect: Ae,
1593
+ droppableRects: z,
1594
+ droppableContainers: L,
1595
+ pointerCoordinates: Ee
1596
+ }) : null, Me = ge(je, "id"), [X, Ne] = f(null), Z = be(xe ? J : ne(J, ke), X?.rect ?? null, G), Pe = d(null), Fe = a((e, t) => {
1597
+ let { sensor: n, options: r } = t;
1598
+ if (N.current == null) return;
1599
+ let i = O.get(N.current);
1600
+ if (!i) return;
1601
+ let a = e.nativeEvent;
1602
+ Pe.current = new n({
1603
+ active: N.current,
1604
+ activeNode: i,
1605
+ event: a,
1606
+ options: r,
1607
+ context: me,
1608
+ onAbort(e) {
1609
+ if (!O.get(e)) return;
1610
+ let { onDragAbort: t } = I.current, n = { id: e };
1611
+ t?.(n), x({
1612
+ type: "onDragAbort",
1613
+ event: n
1614
+ });
1615
+ },
1616
+ onPending(e, t, n, r) {
1617
+ if (!O.get(e)) return;
1618
+ let { onDragPending: i } = I.current, a = {
1619
+ id: e,
1620
+ constraint: t,
1621
+ initialCoordinates: n,
1622
+ offset: r
1623
+ };
1624
+ i?.(a), x({
1625
+ type: "onDragPending",
1626
+ event: a
1627
+ });
1628
+ },
1629
+ onStart(e) {
1630
+ let t = N.current;
1631
+ if (t == null) return;
1632
+ let n = O.get(t);
1633
+ if (!n) return;
1634
+ let { onDragStart: r } = I.current, i = {
1635
+ activatorEvent: a,
1636
+ active: {
1637
+ id: t,
1638
+ data: n.data,
1639
+ rect: re
1640
+ }
1641
+ };
1642
+ m(() => {
1643
+ r?.(i), T($t.Initializing), b({
1644
+ type: H.DragStart,
1645
+ initialCoordinates: e,
1646
+ active: t
1647
+ }), x({
1648
+ type: "onDragStart",
1649
+ event: i
1650
+ }), P(Pe.current), oe(a);
1651
+ });
1652
+ },
1653
+ onMove(e) {
1654
+ b({
1655
+ type: H.DragMove,
1656
+ coordinates: e
1657
+ });
1658
+ },
1659
+ onEnd: o(H.DragEnd),
1660
+ onCancel: o(H.DragCancel)
1661
+ });
1662
+ function o(e) {
1663
+ return async function() {
1664
+ let { active: t, collisions: n, over: r, scrollAdjustedTranslate: i } = me.current, o = null;
1665
+ if (t && i) {
1666
+ let { cancelDrop: s } = I.current;
1667
+ o = {
1668
+ activatorEvent: a,
1669
+ active: t,
1670
+ collisions: n,
1671
+ delta: i,
1672
+ over: r
1673
+ }, e === H.DragEnd && typeof s == "function" && await Promise.resolve(s(o)) && (e = H.DragCancel);
1674
+ }
1675
+ N.current = null, m(() => {
1676
+ b({ type: e }), T($t.Uninitialized), Ne(null), P(null), oe(null), Pe.current = null;
1677
+ let t = e === H.DragEnd ? "onDragEnd" : "onDragCancel";
1678
+ if (o) {
1679
+ let e = I.current[t];
1680
+ e?.(o), x({
1681
+ type: t,
1682
+ event: o
1683
+ });
1684
+ }
1685
+ });
1686
+ };
1687
+ }
1688
+ }, [O]), Ie = ht(c, a((e, t) => (n, r) => {
1689
+ let i = n.nativeEvent, a = O.get(r);
1690
+ if (N.current !== null || !a || i.dndKit || i.defaultPrevented) return;
1691
+ let o = { active: a };
1692
+ e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, N.current = r, Fe(n, t));
1693
+ }, [O, Fe]));
1694
+ jt(c), w(() => {
1695
+ G && C === $t.Initializing && T($t.Initialized);
1696
+ }, [G, C]), s(() => {
1697
+ let { onDragMove: e } = I.current, { active: t, activatorEvent: n, collisions: r, over: i } = me.current;
1698
+ if (!t || !n) return;
1699
+ let a = {
1700
+ active: t,
1701
+ activatorEvent: n,
1702
+ collisions: r,
1703
+ delta: {
1704
+ x: Y.x,
1705
+ y: Y.y
1706
+ },
1707
+ over: i
1708
+ };
1709
+ m(() => {
1710
+ e?.(a), x({
1711
+ type: "onDragMove",
1712
+ event: a
1713
+ });
1714
+ });
1715
+ }, [Y.x, Y.y]), s(() => {
1716
+ let { active: e, activatorEvent: t, collisions: n, droppableContainers: r, scrollAdjustedTranslate: i } = me.current;
1717
+ if (!e || N.current == null || !t || !i) return;
1718
+ let { onDragOver: a } = I.current, o = r.get(Me), s = o && o.rect.current ? {
1719
+ id: o.id,
1720
+ rect: o.rect.current,
1721
+ data: o.data,
1722
+ disabled: o.disabled
1723
+ } : null, c = {
1724
+ active: e,
1725
+ activatorEvent: t,
1726
+ collisions: n,
1727
+ delta: {
1728
+ x: i.x,
1729
+ y: i.y
1730
+ },
1731
+ over: s
1732
+ };
1733
+ m(() => {
1734
+ Ne(s), a?.(c), x({
1735
+ type: "onDragOver",
1736
+ event: c
1737
+ });
1738
+ });
1739
+ }, [Me]), w(() => {
1740
+ me.current = {
1741
+ activatorEvent: F,
1742
+ active: M,
1743
+ activeNode: U,
1744
+ collisionRect: Ae,
1745
+ collisions: je,
1746
+ droppableRects: z,
1747
+ draggableNodes: O,
1748
+ draggingNode: _e,
1749
+ draggingNodeRect: ve,
1750
+ droppableContainers: A,
1751
+ over: X,
1752
+ scrollableAncestors: q,
1753
+ scrollAdjustedTranslate: Y
1754
+ }, re.current = {
1755
+ initial: ve,
1756
+ translated: Ae
1757
+ };
1758
+ }, [
1759
+ M,
1760
+ U,
1761
+ je,
1762
+ Ae,
1763
+ O,
1764
+ _e,
1765
+ ve,
1766
+ z,
1767
+ A,
1768
+ X,
1769
+ q,
1770
+ Y
1771
+ ]), dt({
1772
+ ...fe,
1773
+ delta: k,
1774
+ draggingRect: Ae,
1775
+ pointerCoordinates: Ee,
1776
+ scrollableAncestors: q,
1777
+ scrollableAncestorRects: Te
1778
+ });
1779
+ let Le = l(() => ({
1780
+ active: M,
1781
+ activeNode: U,
1782
+ activeNodeRect: G,
1783
+ activatorEvent: F,
1784
+ collisions: je,
1785
+ containerNodeRect: pe,
1786
+ dragOverlay: K,
1787
+ draggableNodes: O,
1788
+ droppableContainers: A,
1789
+ droppableRects: z,
1790
+ over: X,
1791
+ measureDroppableContainers: B,
1792
+ scrollableAncestors: q,
1793
+ scrollableAncestorRects: Te,
1794
+ measuringConfiguration: R,
1795
+ measuringScheduled: V,
1796
+ windowRect: we
1797
+ }), [
1798
+ M,
1799
+ U,
1800
+ G,
1801
+ F,
1802
+ je,
1803
+ pe,
1804
+ K,
1805
+ O,
1806
+ A,
1807
+ z,
1808
+ X,
1809
+ B,
1810
+ q,
1811
+ Te,
1812
+ R,
1813
+ V,
1814
+ we
1815
+ ]), Re = l(() => ({
1816
+ activatorEvent: F,
1817
+ activators: Ie,
1818
+ active: M,
1819
+ activeNodeRect: G,
1820
+ ariaDescribedById: { draggable: se },
1821
+ dispatch: b,
1822
+ draggableNodes: O,
1823
+ over: X,
1824
+ measureDroppableContainers: B
1825
+ }), [
1826
+ F,
1827
+ Ie,
1828
+ M,
1829
+ G,
1830
+ b,
1831
+ se,
1832
+ O,
1833
+ X,
1834
+ B
1835
+ ]);
1836
+ return e.createElement(ce.Provider, { value: S }, e.createElement(Wt.Provider, { value: Re }, e.createElement(Gt.Provider, { value: Le }, e.createElement(Qt.Provider, { value: Z }, o)), e.createElement(Jt, { disabled: r?.restoreFocus === !1 })), e.createElement(ue, {
1837
+ ...r,
1838
+ hiddenTextDescribedById: se
1839
+ }));
1840
+ function ze() {
1841
+ let e = ie?.autoScrollEnabled === !1, t = typeof i == "object" ? i.enabled === !1 : i === !1, n = E && !e && !t;
1842
+ return typeof i == "object" ? {
1843
+ ...i,
1844
+ enabled: n
1845
+ } : { enabled: n };
1846
+ }
1847
+ }), tn = /* @__PURE__ */ n(null), nn = "button", rn = "Draggable";
1848
+ function an(e) {
1849
+ let { id: t, data: n, disabled: r = !1, attributes: i } = e, a = j(rn), { activators: s, activatorEvent: c, active: u, activeNodeRect: d, ariaDescribedById: f, draggableNodes: p, over: m } = o(Wt), { role: h = nn, roleDescription: g = "draggable", tabIndex: _ = 0 } = i ?? {}, v = u?.id === t, y = o(v ? Qt : tn), [b, x] = O(), [S, C] = O(), T = Mt(s, t), E = ee(n);
1850
+ return w(() => (p.set(t, {
1851
+ id: t,
1852
+ key: a,
1853
+ node: b,
1854
+ activatorNode: S,
1855
+ data: E
1856
+ }), () => {
1857
+ let e = p.get(t);
1858
+ e && e.key === a && p.delete(t);
1859
+ }), [p, t]), {
1860
+ active: u,
1861
+ activatorEvent: c,
1862
+ activeNodeRect: d,
1863
+ attributes: l(() => ({
1864
+ role: h,
1865
+ tabIndex: _,
1866
+ "aria-disabled": r,
1867
+ "aria-pressed": v && h === nn ? !0 : void 0,
1868
+ "aria-roledescription": g,
1869
+ "aria-describedby": f.draggable
1870
+ }), [
1871
+ r,
1872
+ h,
1873
+ _,
1874
+ v,
1875
+ g,
1876
+ f.draggable
1877
+ ]),
1878
+ isDragging: v,
1879
+ listeners: r ? void 0 : T,
1880
+ node: b,
1881
+ over: m,
1882
+ setNodeRef: x,
1883
+ setActivatorNodeRef: C,
1884
+ transform: y
1885
+ };
1886
+ }
1887
+ function on() {
1888
+ return o(Gt);
1889
+ }
1890
+ var sn = "Droppable", cn = { timeout: 25 };
1891
+ function ln(e) {
1892
+ let { data: t, disabled: n = !1, id: r, resizeObserverConfig: i } = e, c = j(sn), { active: l, dispatch: u, over: f, measureDroppableContainers: p } = o(Wt), m = d({ disabled: n }), h = d(!1), g = d(null), _ = d(null), { disabled: v, updateMeasurementsFor: y, timeout: b } = {
1893
+ ...cn,
1894
+ ...i
1895
+ }, x = ee(y ?? r), S = Ct({
1896
+ callback: a(() => {
1897
+ if (!h.current) {
1898
+ h.current = !0;
1899
+ return;
1900
+ }
1901
+ _.current != null && clearTimeout(_.current), _.current = setTimeout(() => {
1902
+ p(Array.isArray(x.current) ? x.current : [x.current]), _.current = null;
1903
+ }, b);
1904
+ }, [b]),
1905
+ disabled: v || !l
1906
+ }), [C, w] = O(a((e, t) => {
1907
+ S && (t && (S.unobserve(t), h.current = !1), e && S.observe(e));
1908
+ }, [S])), T = ee(t);
1909
+ return s(() => {
1910
+ !S || !C.current || (S.disconnect(), h.current = !1, S.observe(C.current));
1911
+ }, [C, S]), s(() => (u({
1912
+ type: H.RegisterDroppable,
1913
+ element: {
1914
+ id: r,
1915
+ key: c,
1916
+ disabled: n,
1917
+ node: C,
1918
+ rect: g,
1919
+ data: T
1920
+ }
1921
+ }), () => u({
1922
+ type: H.UnregisterDroppable,
1923
+ key: c,
1924
+ id: r
1925
+ })), [r]), s(() => {
1926
+ n !== m.current.disabled && (u({
1927
+ type: H.SetDroppableDisabled,
1928
+ id: r,
1929
+ key: c,
1930
+ disabled: n
1931
+ }), m.current.disabled = n);
1932
+ }, [
1933
+ r,
1934
+ c,
1935
+ n,
1936
+ u
1937
+ ]), {
1938
+ active: l,
1939
+ rect: g,
1940
+ isOver: f?.id === r,
1941
+ node: C,
1942
+ over: f,
1943
+ setNodeRef: w
1944
+ };
1945
+ }
1946
+ function un(n) {
1947
+ let { animation: r, children: i } = n, [a, o] = f(null), [s, c] = f(null), l = k(i);
1948
+ return !i && !a && l && o(l), w(() => {
1949
+ if (!s) return;
1950
+ let e = a?.key, t = a?.props.id;
1951
+ if (e == null || t == null) {
1952
+ o(null);
1953
+ return;
1954
+ }
1955
+ Promise.resolve(r(t, s)).then(() => {
1956
+ o(null);
1957
+ });
1958
+ }, [
1959
+ r,
1960
+ a,
1961
+ s
1962
+ ]), e.createElement(e.Fragment, null, i, a ? t(a, { ref: c }) : null);
1963
+ }
1964
+ var dn = {
1965
+ x: 0,
1966
+ y: 0,
1967
+ scaleX: 1,
1968
+ scaleY: 1
1969
+ };
1970
+ function fn(t) {
1971
+ let { children: n } = t;
1972
+ return e.createElement(Wt.Provider, { value: Ut }, e.createElement(Qt.Provider, { value: dn }, n));
1973
+ }
1974
+ var pn = {
1975
+ position: "fixed",
1976
+ touchAction: "none"
1977
+ }, mn = (e) => N(e) ? "transform 250ms ease" : void 0, hn = /* @__PURE__ */ r((t, n) => {
1978
+ let { as: r, activatorEvent: i, adjustScale: a, children: o, className: s, rect: c, style: l, transform: u, transition: d = mn } = t;
1979
+ if (!c) return null;
1980
+ let f = a ? u : {
1981
+ ...u,
1982
+ scaleX: 1,
1983
+ scaleY: 1
1984
+ }, p = {
1985
+ ...pn,
1986
+ width: c.width,
1987
+ height: c.height,
1988
+ top: c.top,
1989
+ left: c.left,
1990
+ transform: P.Transform.toString(f),
1991
+ transformOrigin: a && i ? pe(i, c) : void 0,
1992
+ transition: typeof d == "function" ? d(i) : d,
1993
+ ...l
1994
+ };
1995
+ return e.createElement(r, {
1996
+ className: s,
1997
+ style: p,
1998
+ ref: n
1999
+ }, o);
2000
+ }), gn = {
2001
+ duration: 250,
2002
+ easing: "ease",
2003
+ keyframes: (e) => {
2004
+ let { transform: { initial: t, final: n } } = e;
2005
+ return [{ transform: P.Transform.toString(t) }, { transform: P.Transform.toString(n) }];
2006
+ },
2007
+ sideEffects: /* @__PURE__ */ ((e) => (t) => {
2008
+ let { active: n, dragOverlay: r } = t, i = {}, { styles: a, className: o } = e;
2009
+ if (a != null && a.active) for (let [e, t] of Object.entries(a.active)) t !== void 0 && (i[e] = n.node.style.getPropertyValue(e), n.node.style.setProperty(e, t));
2010
+ if (a != null && a.dragOverlay) for (let [e, t] of Object.entries(a.dragOverlay)) t !== void 0 && r.node.style.setProperty(e, t);
2011
+ return o != null && o.active && n.node.classList.add(o.active), o != null && o.dragOverlay && r.node.classList.add(o.dragOverlay), function() {
2012
+ for (let [e, t] of Object.entries(i)) n.node.style.setProperty(e, t);
2013
+ o != null && o.active && n.node.classList.remove(o.active);
2014
+ };
2015
+ })({ styles: { active: { opacity: "0" } } })
2016
+ };
2017
+ function _n(e) {
2018
+ let { config: t, draggableNodes: n, droppableContainers: r, measuringConfiguration: i } = e;
2019
+ return T((e, a) => {
2020
+ if (t === null) return;
2021
+ let o = n.get(e);
2022
+ if (!o) return;
2023
+ let s = o.node.current;
2024
+ if (!s) return;
2025
+ let c = It(a);
2026
+ if (!c) return;
2027
+ let { transform: l } = y(a).getComputedStyle(a), u = we(l);
2028
+ if (!u) return;
2029
+ let d = typeof t == "function" ? t : vn(t);
2030
+ return He(s, i.draggable.measure), d({
2031
+ active: {
2032
+ id: e,
2033
+ data: o.data,
2034
+ node: s,
2035
+ rect: i.draggable.measure(s)
2036
+ },
2037
+ draggableNodes: n,
2038
+ dragOverlay: {
2039
+ node: a,
2040
+ rect: i.dragOverlay.measure(c)
2041
+ },
2042
+ droppableContainers: r,
2043
+ measuringConfiguration: i,
2044
+ transform: u
2045
+ });
2046
+ });
2047
+ }
2048
+ function vn(e) {
2049
+ let { duration: t, easing: n, sideEffects: r, keyframes: i } = {
2050
+ ...gn,
2051
+ ...e
2052
+ };
2053
+ return (e) => {
2054
+ let { active: a, dragOverlay: o, transform: s, ...c } = e;
2055
+ if (!t) return;
2056
+ let l = {
2057
+ x: o.rect.left - a.rect.left,
2058
+ y: o.rect.top - a.rect.top
2059
+ }, u = {
2060
+ scaleX: s.scaleX === 1 ? 1 : a.rect.width * s.scaleX / o.rect.width,
2061
+ scaleY: s.scaleY === 1 ? 1 : a.rect.height * s.scaleY / o.rect.height
2062
+ }, d = {
2063
+ x: s.x - l.x,
2064
+ y: s.y - l.y,
2065
+ ...u
2066
+ }, f = i({
2067
+ ...c,
2068
+ active: a,
2069
+ dragOverlay: o,
2070
+ transform: {
2071
+ initial: s,
2072
+ final: d
2073
+ }
2074
+ }), [p] = f, m = f[f.length - 1];
2075
+ if (JSON.stringify(p) === JSON.stringify(m)) return;
2076
+ let h = r?.({
2077
+ active: a,
2078
+ dragOverlay: o,
2079
+ ...c
2080
+ }), g = o.node.animate(f, {
2081
+ duration: t,
2082
+ easing: n,
2083
+ fill: "forwards"
2084
+ });
2085
+ return new Promise((e) => {
2086
+ g.onfinish = () => {
2087
+ h?.(), e();
2088
+ };
2089
+ });
2090
+ };
2091
+ }
2092
+ var yn = 0;
2093
+ function bn(e) {
2094
+ return l(() => {
2095
+ if (e != null) return yn++, yn;
2096
+ }, [e]);
2097
+ }
2098
+ var xn = /* @__PURE__ */ e.memo((t) => {
2099
+ let { adjustScale: n = !1, children: r, dropAnimation: i, style: a, transition: s, modifiers: c, wrapperElement: l = "div", className: u, zIndex: d = 999 } = t, { activatorEvent: f, active: p, activeNodeRect: m, containerNodeRect: h, draggableNodes: g, droppableContainers: _, dragOverlay: v, over: y, measuringConfiguration: b, scrollableAncestors: x, scrollableAncestorRects: S, windowRect: C } = on(), w = o(Qt), T = bn(p?.id), E = Yt(c, {
2100
+ activatorEvent: f,
2101
+ active: p,
2102
+ activeNodeRect: m,
2103
+ containerNodeRect: h,
2104
+ draggingNodeRect: v.rect,
2105
+ over: y,
2106
+ overlayNodeRect: v.rect,
2107
+ scrollableAncestors: x,
2108
+ scrollableAncestorRects: S,
2109
+ transform: w,
2110
+ windowRect: C
2111
+ }), ee = bt(m), D = _n({
2112
+ config: i,
2113
+ draggableNodes: g,
2114
+ droppableContainers: _,
2115
+ measuringConfiguration: b
2116
+ }), O = ee ? v.setRef : void 0;
2117
+ return e.createElement(fn, null, e.createElement(un, { animation: D }, p && T ? e.createElement(hn, {
2118
+ key: T,
2119
+ id: p.id,
2120
+ ref: O,
2121
+ as: l,
2122
+ activatorEvent: f,
2123
+ adjustScale: n,
2124
+ className: u,
2125
+ transition: s,
2126
+ rect: ee,
2127
+ style: {
2128
+ zIndex: d,
2129
+ ...a
2130
+ },
2131
+ transform: E
2132
+ }, r) : null));
2133
+ });
2134
+ //#endregion
2135
+ //#region ../../node_modules/.pnpm/@dnd-kit+sortable@10.0.0_@dnd-kit+core@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4__react@19.2.4/node_modules/@dnd-kit/sortable/dist/sortable.esm.js
2136
+ function Sn(e, t, n) {
2137
+ let r = e.slice();
2138
+ return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
2139
+ }
2140
+ function Cn(e, t) {
2141
+ return e.reduce((e, n, r) => {
2142
+ let i = t.get(n);
2143
+ return i && (e[r] = i), e;
2144
+ }, Array(e.length));
2145
+ }
2146
+ function wn(e) {
2147
+ return e !== null && e >= 0;
2148
+ }
2149
+ function Tn(e, t) {
2150
+ if (e === t) return !0;
2151
+ if (e.length !== t.length) return !1;
2152
+ for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
2153
+ return !0;
2154
+ }
2155
+ function En(e) {
2156
+ return typeof e == "boolean" ? {
2157
+ draggable: e,
2158
+ droppable: e
2159
+ } : e;
2160
+ }
2161
+ var Dn = (e) => {
2162
+ let { rects: t, activeIndex: n, overIndex: r, index: i } = e, a = Sn(t, r, n), o = t[i], s = a[i];
2163
+ return !s || !o ? null : {
2164
+ x: s.left - o.left,
2165
+ y: s.top - o.top,
2166
+ scaleX: s.width / o.width,
2167
+ scaleY: s.height / o.height
2168
+ };
2169
+ }, On = {
2170
+ scaleX: 1,
2171
+ scaleY: 1
2172
+ }, kn = (e) => {
2173
+ let { activeIndex: t, activeNodeRect: n, index: r, rects: i, overIndex: a } = e, o = i[t] ?? n;
2174
+ if (!o) return null;
2175
+ if (r === t) {
2176
+ let e = i[a];
2177
+ return e ? {
2178
+ x: 0,
2179
+ y: t < a ? e.top + e.height - (o.top + o.height) : e.top - o.top,
2180
+ ...On
2181
+ } : null;
2182
+ }
2183
+ let s = An(i, r, t);
2184
+ return r > t && r <= a ? {
2185
+ x: 0,
2186
+ y: -o.height - s,
2187
+ ...On
2188
+ } : r < t && r >= a ? {
2189
+ x: 0,
2190
+ y: o.height + s,
2191
+ ...On
2192
+ } : {
2193
+ x: 0,
2194
+ y: 0,
2195
+ ...On
2196
+ };
2197
+ };
2198
+ function An(e, t, n) {
2199
+ let r = e[t], i = e[t - 1], a = e[t + 1];
2200
+ return r ? n < t ? i ? r.top - (i.top + i.height) : a ? a.top - (r.top + r.height) : 0 : a ? a.top - (r.top + r.height) : i ? r.top - (i.top + i.height) : 0 : 0;
2201
+ }
2202
+ var jn = "Sortable", Mn = /* @__PURE__ */ e.createContext({
2203
+ activeIndex: -1,
2204
+ containerId: jn,
2205
+ disableTransforms: !1,
2206
+ items: [],
2207
+ overIndex: -1,
2208
+ useDragOverlay: !1,
2209
+ sortedRects: [],
2210
+ strategy: Dn,
2211
+ disabled: {
2212
+ draggable: !1,
2213
+ droppable: !1
2214
+ }
2215
+ });
2216
+ function Nn(t) {
2217
+ let { children: n, id: r, items: i, strategy: a = Dn, disabled: o = !1 } = t, { active: c, dragOverlay: u, droppableRects: f, over: p, measureDroppableContainers: m } = on(), h = j(jn, r), g = u.rect !== null, _ = l(() => i.map((e) => typeof e == "object" && "id" in e ? e.id : e), [i]), v = c != null, y = c ? _.indexOf(c.id) : -1, b = p ? _.indexOf(p.id) : -1, x = d(_), S = !Tn(_, x.current), C = b !== -1 && y === -1 || S, T = En(o);
2218
+ w(() => {
2219
+ S && v && m(_);
2220
+ }, [
2221
+ S,
2222
+ _,
2223
+ v,
2224
+ m
2225
+ ]), s(() => {
2226
+ x.current = _;
2227
+ }, [_]);
2228
+ let E = l(() => ({
2229
+ activeIndex: y,
2230
+ containerId: h,
2231
+ disabled: T,
2232
+ disableTransforms: C,
2233
+ items: _,
2234
+ overIndex: b,
2235
+ useDragOverlay: g,
2236
+ sortedRects: Cn(_, f),
2237
+ strategy: a
2238
+ }), [
2239
+ y,
2240
+ h,
2241
+ T.draggable,
2242
+ T.droppable,
2243
+ C,
2244
+ _,
2245
+ b,
2246
+ f,
2247
+ g,
2248
+ a
2249
+ ]);
2250
+ return e.createElement(Mn.Provider, { value: E }, n);
2251
+ }
2252
+ var Pn = (e) => {
2253
+ let { id: t, items: n, activeIndex: r, overIndex: i } = e;
2254
+ return Sn(n, r, i).indexOf(t);
2255
+ }, Fn = (e) => {
2256
+ let { containerId: t, isSorting: n, wasDragging: r, index: i, items: a, newIndex: o, previousItems: s, previousContainerId: c, transition: l } = e;
2257
+ return !l || !r || s !== a && i === o ? !1 : n ? !0 : o !== i && t === c;
2258
+ }, In = {
2259
+ duration: 200,
2260
+ easing: "ease"
2261
+ }, Ln = "transform", Rn = /* @__PURE__ */ P.Transition.toString({
2262
+ property: Ln,
2263
+ duration: 0,
2264
+ easing: "linear"
2265
+ }), zn = { roleDescription: "sortable" };
2266
+ function Bn(e) {
2267
+ let { disabled: t, index: n, node: r, rect: i } = e, [a, o] = f(null), c = d(n);
2268
+ return w(() => {
2269
+ if (!t && n !== c.current && r.current) {
2270
+ let e = i.current;
2271
+ if (e) {
2272
+ let t = J(r.current, { ignoreTransform: !0 }), n = {
2273
+ x: e.left - t.left,
2274
+ y: e.top - t.top,
2275
+ scaleX: e.width / t.width,
2276
+ scaleY: e.height / t.height
2277
+ };
2278
+ (n.x || n.y) && o(n);
2279
+ }
2280
+ }
2281
+ n !== c.current && (c.current = n);
2282
+ }, [
2283
+ t,
2284
+ n,
2285
+ r,
2286
+ i
2287
+ ]), s(() => {
2288
+ a && o(null);
2289
+ }, [a]), a;
2290
+ }
2291
+ function Vn(e) {
2292
+ let { animateLayoutChanges: t = Fn, attributes: n, disabled: r, data: i, getNewIndex: a = Pn, id: c, strategy: u, resizeObserverConfig: f, transition: p = In } = e, { items: m, containerId: g, activeIndex: _, disabled: v, disableTransforms: y, sortedRects: b, overIndex: x, useDragOverlay: S, strategy: C } = o(Mn), w = Hn(r, v), T = m.indexOf(c), E = l(() => ({
2293
+ sortable: {
2294
+ containerId: g,
2295
+ index: T,
2296
+ items: m
2297
+ },
2298
+ ...i
2299
+ }), [
2300
+ g,
2301
+ i,
2302
+ T,
2303
+ m
2304
+ ]), ee = l(() => m.slice(m.indexOf(c)), [m, c]), { rect: D, node: O, isOver: k, setNodeRef: A } = ln({
2305
+ id: c,
2306
+ data: E,
2307
+ disabled: w.droppable,
2308
+ resizeObserverConfig: {
2309
+ updateMeasurementsFor: ee,
2310
+ ...f
2311
+ }
2312
+ }), { active: j, activatorEvent: te, activeNodeRect: ne, attributes: re, setNodeRef: M, listeners: ie, isDragging: ae, over: F, setActivatorNodeRef: oe, transform: I } = an({
2313
+ id: c,
2314
+ data: E,
2315
+ attributes: {
2316
+ ...zn,
2317
+ ...n
2318
+ },
2319
+ disabled: w.draggable
2320
+ }), se = h(A, M), L = !!j, R = L && !y && wn(_) && wn(x), ce = !S && ae, z = R ? (ce && R ? I : null) ?? (u ?? C)({
2321
+ rects: b,
2322
+ activeNodeRect: ne,
2323
+ activeIndex: _,
2324
+ overIndex: x,
2325
+ index: T
2326
+ }) : null, le = wn(_) && wn(x) ? a({
2327
+ id: c,
2328
+ items: m,
2329
+ activeIndex: _,
2330
+ overIndex: x
2331
+ }) : T, B = j?.id, V = d({
2332
+ activeId: B,
2333
+ items: m,
2334
+ newIndex: le,
2335
+ containerId: g
2336
+ }), ue = m !== V.current.items, H = t({
2337
+ active: j,
2338
+ containerId: g,
2339
+ isDragging: ae,
2340
+ isSorting: L,
2341
+ id: c,
2342
+ index: T,
2343
+ items: m,
2344
+ newIndex: V.current.newIndex,
2345
+ previousItems: V.current.items,
2346
+ previousContainerId: V.current.containerId,
2347
+ transition: p,
2348
+ wasDragging: V.current.activeId != null
2349
+ }), U = Bn({
2350
+ disabled: !H,
2351
+ index: T,
2352
+ node: O,
2353
+ rect: D
2354
+ });
2355
+ return s(() => {
2356
+ L && V.current.newIndex !== le && (V.current.newIndex = le), g !== V.current.containerId && (V.current.containerId = g), m !== V.current.items && (V.current.items = m);
2357
+ }, [
2358
+ L,
2359
+ le,
2360
+ g,
2361
+ m
2362
+ ]), s(() => {
2363
+ if (B === V.current.activeId) return;
2364
+ if (B != null && V.current.activeId == null) {
2365
+ V.current.activeId = B;
2366
+ return;
2367
+ }
2368
+ let e = setTimeout(() => {
2369
+ V.current.activeId = B;
2370
+ }, 50);
2371
+ return () => clearTimeout(e);
2372
+ }, [B]), {
2373
+ active: j,
2374
+ activeIndex: _,
2375
+ attributes: re,
2376
+ data: E,
2377
+ rect: D,
2378
+ index: T,
2379
+ newIndex: le,
2380
+ items: m,
2381
+ isOver: k,
2382
+ isSorting: L,
2383
+ isDragging: ae,
2384
+ listeners: ie,
2385
+ node: O,
2386
+ overIndex: x,
2387
+ over: F,
2388
+ setNodeRef: se,
2389
+ setActivatorNodeRef: oe,
2390
+ setDroppableNodeRef: A,
2391
+ setDraggableNodeRef: M,
2392
+ transform: U ?? z,
2393
+ transition: de()
2394
+ };
2395
+ function de() {
2396
+ if (U || ue && V.current.newIndex === T) return Rn;
2397
+ if (!(ce && !N(te) || !p) && (L || H)) return P.Transition.toString({
2398
+ ...p,
2399
+ property: Ln
2400
+ });
2401
+ }
2402
+ }
2403
+ function Hn(e, t) {
2404
+ return typeof e == "boolean" ? {
2405
+ draggable: e,
2406
+ droppable: !1
2407
+ } : {
2408
+ draggable: e?.draggable ?? t.draggable,
2409
+ droppable: e?.droppable ?? t.droppable
2410
+ };
2411
+ }
2412
+ $.Down, $.Right, $.Up, $.Left;
2413
+ //#endregion
2414
+ export { en as a, ct as c, fe as d, P as f, kn as i, _e as l, Sn as n, xn as o, Vn as r, rt as s, Nn as t, de as u };