fluid-dnd 1.3.0-beta.0 → 1.3.2-beta.0

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,1300 @@
1
+ var Te = Object.defineProperty;
2
+ var Ee = (t, e, n) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var j = (t, e, n) => Ee(t, typeof e != "symbol" ? e + "" : e, n);
4
+ const U = "draggable", Xt = "droppable", Lt = "handler-class", Ft = "dragging", Wt = "dragging-handler-class", Vt = "dropping", oe = "grabbing", ye = "grab", Kt = "disable-transition", nt = (t, e) => t.classList.contains(e), bt = (t, e, n = !1) => {
5
+ t.classList.toggle(e, n);
6
+ }, st = (t, e) => {
7
+ t.classList.add(e);
8
+ }, Ct = (t, e) => {
9
+ t.classList.remove(e);
10
+ }, Ce = (t, e) => At(e).every(
11
+ (n) => nt(t, n)
12
+ ), gt = (t) => t ? `.${At(t).join(".")}` : "", Ae = (t, e) => {
13
+ if (!e)
14
+ return;
15
+ const n = At(e);
16
+ t.classList.add(...n);
17
+ }, At = (t) => t ? t.split(" ").filter((e) => e) : [], V = "horizontal", tt = "vertical", xe = () => {
18
+ const { scrollX: t, scrollY: e } = window;
19
+ return { scrollX: t, scrollY: e };
20
+ }, zt = (t) => !t || t.trim().length == 0 || t == "normal" ? 0 : parseFloat(t), we = (t) => t ? parseInt(t) : -1, Be = (t) => {
21
+ const e = getComputedStyle(t), n = new DOMMatrixReadOnly(e.transform);
22
+ return {
23
+ x: n.m41,
24
+ y: n.m42
25
+ };
26
+ }, re = (t, e) => t.x1 > e.x1 ? re(e, t) : t.x2 < e.x1 ? 0 : t.x2 >= e.x2 ? t.x2 - t.x1 : t.x2 - e.x1, pt = (t, e) => !Me(t, e), Me = (t, e) => {
27
+ const n = Ot(t), s = Ot(e), o = Qt(n, s, tt), r = Qt(n, s, V);
28
+ return o >= Math.min(n.height, s.height) / 2 && r >= Math.min(n.width, s.width) / 2;
29
+ }, Qt = (t, e, n) => {
30
+ const { before: s, distance: o } = B(n);
31
+ return re(
32
+ {
33
+ x1: t[s],
34
+ x2: t[s] + t[o]
35
+ },
36
+ {
37
+ x1: e[s],
38
+ x2: e[s] + e[o]
39
+ }
40
+ );
41
+ }, L = (t, e) => t ? zt(getComputedStyle(t)[e]) : 0, Ut = (t) => {
42
+ const { scrollLeft: e, scrollTop: n } = t;
43
+ return { scrollLeft: e, scrollTop: n };
44
+ }, Ot = (t) => t.getBoundingClientRect(), B = (t) => {
45
+ const e = t == V;
46
+ return {
47
+ beforeMargin: e ? "marginLeft" : "marginTop",
48
+ afterMargin: e ? "marginRight" : "marginBottom",
49
+ borderBeforeWidth: e ? "borderLeftWidth" : "borderTopWidth",
50
+ before: e ? "left" : "top",
51
+ after: e ? "right" : "down",
52
+ gap: e ? "columnGap" : "rowGap",
53
+ distance: e ? "width" : "height",
54
+ axis: e ? "x" : "y",
55
+ offset: e ? "offsetX" : "offsetY",
56
+ scroll: e ? "scrollX" : "scrollY",
57
+ scrollElement: e ? "scrollLeft" : "scrollTop",
58
+ page: e ? "pageX" : "pageY",
59
+ inner: e ? "innerWidth" : "innerHeight",
60
+ offsetElement: e ? "offsetLeft" : "offsetTop",
61
+ scrollDistance: e ? "scrollWidth" : "scrollHeight",
62
+ clientDistance: e ? "clientWidth" : "clientHeight",
63
+ paddingBefore: e ? "paddingLeft" : "paddingTop",
64
+ getRect: Ot
65
+ };
66
+ }, Mt = (t, e) => Re(t, e), ie = (t) => [...t.children].filter(
67
+ (n) => nt(n, U)
68
+ ), Re = (t, e) => {
69
+ const n = [...e.children].filter(
70
+ (o) => nt(o, U) && !o.isEqualNode(t)
71
+ ).toReversed(), s = [...e.children].findLastIndex(
72
+ (o) => o.isEqualNode(t)
73
+ );
74
+ return [
75
+ n,
76
+ s,
77
+ e
78
+ ];
79
+ }, Le = (t) => {
80
+ let e = t.parentElement;
81
+ for (; e; ) {
82
+ if (window.getComputedStyle(e).position === "fixed")
83
+ return e;
84
+ e = e.parentElement;
85
+ }
86
+ return null;
87
+ }, ce = (t, e) => {
88
+ const {
89
+ before: n,
90
+ borderBeforeWidth: s
91
+ } = B(e), o = Le(t);
92
+ return o ? Ot(o)[n] + L(o, s) : 0;
93
+ }, Tt = (t) => window.TouchEvent && t instanceof TouchEvent, it = (t) => t instanceof HTMLElement, ae = (t) => t instanceof MouseEvent, Oe = ["onmouseup", "onmousedown", "onmousemove"], Ne = (t, e, n) => {
94
+ t && (t.style.height = `${e}px`, t.style.width = `${n}px`);
95
+ }, Et = (t, e, n) => {
96
+ !t || !it(t) || (n == 0 && e == 0 ? t.style.transform = "" : t.style.transform = `translate(${n}px,${e}px)`);
97
+ }, Fe = (t, e, n, s) => {
98
+ t[e] = (o) => {
99
+ if (o.defaultPrevented)
100
+ return;
101
+ s && s(o);
102
+ const r = _t(o);
103
+ n(r);
104
+ };
105
+ }, It = (t, e, n, s) => {
106
+ n && (Pe(e) ? t[e] = n : Fe(t, e, n, s));
107
+ }, Pe = (t) => Oe.includes(t), $e = (t) => {
108
+ const { target: e } = t;
109
+ return {
110
+ clientX: 0,
111
+ clientY: 0,
112
+ pageX: 0,
113
+ pageY: 0,
114
+ screenX: 0,
115
+ screenY: 0,
116
+ target: e,
117
+ offsetX: 0,
118
+ offsetY: 0
119
+ };
120
+ }, Ge = (t, e) => {
121
+ const n = (s, o) => Ye(e, window, o, s);
122
+ if (ae(t)) {
123
+ const { offsetX: s, offsetY: o } = t;
124
+ return [s, o];
125
+ } else {
126
+ const s = t.target;
127
+ return [
128
+ n(s, V),
129
+ n(s, tt)
130
+ ];
131
+ }
132
+ }, _t = (t) => {
133
+ const e = Ie(t);
134
+ if (!e)
135
+ return $e(t);
136
+ const [n, s] = Ge(t, e), { clientX: o, clientY: r, pageX: c, pageY: l, screenX: f, screenY: g, target: m } = e;
137
+ return {
138
+ clientX: o,
139
+ clientY: r,
140
+ pageX: c,
141
+ pageY: l,
142
+ screenX: f,
143
+ screenY: g,
144
+ target: m,
145
+ offsetX: n,
146
+ offsetY: s
147
+ };
148
+ }, Ie = (t) => {
149
+ if (Tt(t))
150
+ return t.touches[0] ?? t.changedTouches[0];
151
+ if (ae(t))
152
+ return t;
153
+ }, Ye = (t, e, n, s) => {
154
+ const { page: o, scroll: r, before: c, borderBeforeWidth: l, getRect: f } = B(n), g = f(s);
155
+ return t[o] - e[r] - g[c] - L(s, l);
156
+ }, Pt = (t, e, n = "ease-out", s = "transform") => {
157
+ it(t) && (t.style.transitionDuration = `${e}ms`, t.style.transitionTimingFunction = `${n}`, t.style.transitionProperty = `${s}`);
158
+ }, le = (t, e, n) => {
159
+ !t || !it(t) || (t[e] = () => {
160
+ n();
161
+ });
162
+ }, Xe = (t) => {
163
+ var e = t.querySelector("style");
164
+ if (!e) {
165
+ var n = document.createElement("style");
166
+ return t.appendChild(n), n;
167
+ }
168
+ return e;
169
+ }, We = (t, e) => {
170
+ const n = /\.-?[_a-zA-Z0-9-*\s<>():]+/g, [s] = e.match(n) || [];
171
+ for (const o of t.cssRules) {
172
+ const [r] = o.cssText.match(n) || [];
173
+ if (s === r)
174
+ return !0;
175
+ }
176
+ return !1;
177
+ }, Ve = (t, e) => {
178
+ e.forEach((n) => {
179
+ _e(t, n);
180
+ });
181
+ }, _e = (t, e) => {
182
+ var s;
183
+ var n = Xe(t);
184
+ n.sheet && (We(n.sheet, e) || (s = n.sheet) == null || s.insertRule(e, n.sheet.cssRules.length));
185
+ }, ue = (t, e = {}) => {
186
+ for (const n of Object.keys(e)) {
187
+ const s = e[n];
188
+ s != null && He(t, `--${n}`, s);
189
+ }
190
+ }, He = (t, e, n) => t && t.style.setProperty(e, n), fe = "startDrag", Nt = "drag", jt = "startDrop", qe = "drop", at = "temp-child", de = "cubic-bezier(0.2, 0, 0, 1)", ze = (t) => t === qe || t === jt, Ht = (t) => !t || t.length == 0 ? 0 : zt(t.replace("px", "")), je = (t, e) => {
191
+ const n = getComputedStyle(t)[e];
192
+ if (n.match("%")) {
193
+ const o = zt(n.replace("%", "")), { width: r } = t.getBoundingClientRect();
194
+ return r * (o / 100);
195
+ }
196
+ return Ht(n);
197
+ }, Zt = (t, e) => {
198
+ if (!(t instanceof Element))
199
+ return [
200
+ 0,
201
+ !1
202
+ ];
203
+ const n = je(t, e), s = getComputedStyle(t).display, o = n > 0 || s === "flex";
204
+ return [n, o];
205
+ }, Ze = (t) => {
206
+ const { top: e, left: n } = getComputedStyle(t);
207
+ return [Ht(e), Ht(n)];
208
+ }, ke = (t, e) => {
209
+ const { gap: n } = B(e), [s, o] = Zt(t, n);
210
+ return o ? s : 0;
211
+ };
212
+ function yt(t, e, n, s, o = t.previousElementSibling, r = t.nextElementSibling) {
213
+ let { height: c, width: l } = Je(
214
+ n,
215
+ t,
216
+ o,
217
+ r
218
+ );
219
+ return pt(t, s) && e == Nt && (c = 0, l = 0), { height: c, width: l };
220
+ }
221
+ const Je = (t, e, n, s) => {
222
+ const {
223
+ afterMargin: o,
224
+ beforeMargin: r,
225
+ distance: c,
226
+ gap: l,
227
+ getRect: f
228
+ } = B(t), g = L(e, o), m = L(e, r), b = L(s, r), [M, O] = Zt(
229
+ e.parentElement,
230
+ l
231
+ ), F = f(e)[c];
232
+ if (O)
233
+ return te(F, m, g, M, 0, t);
234
+ const [y, p, T] = Ke(
235
+ n,
236
+ b,
237
+ g,
238
+ m,
239
+ o
240
+ );
241
+ return te(F, p, y, 0, T, t);
242
+ }, Ke = (t, e, n, s, o) => {
243
+ const r = Math.max(e, n);
244
+ let c = s, l = e;
245
+ if (t) {
246
+ const f = L(
247
+ t,
248
+ o
249
+ );
250
+ c = Math.max(f, s), l = Math.max(l, f);
251
+ }
252
+ return [r, c, l];
253
+ }, te = (t, e, n, s, o, r) => Qe(r, t + e + n + s - o), Qe = (t, e) => t == V ? { width: e, height: 0 } : { width: 0, height: e }, ee = (t, e) => {
254
+ const {
255
+ borderBeforeWidth: n,
256
+ paddingBefore: s,
257
+ axis: o,
258
+ getRect: r
259
+ } = B(t), c = L(e, n), l = L(e, s), f = r(e)[o];
260
+ return c + l + f;
261
+ }, Ue = (t, e) => {
262
+ const [n, s] = Ze(e), o = ee(tt, t);
263
+ return [
264
+ ee(V, t) - s,
265
+ o - n
266
+ ];
267
+ };
268
+ function tn(t, e, n, s, o, r, c, l, f) {
269
+ let g = 0, m = 0;
270
+ const b = !!(n < 0 && f);
271
+ if (n === s && !b)
272
+ return ne(
273
+ { height: g, width: m },
274
+ t,
275
+ o,
276
+ c,
277
+ b
278
+ );
279
+ const [M, O, F, y] = sn(e, n, s, f);
280
+ if (b) {
281
+ const [et, ut] = Ue(l, f);
282
+ g += ut, m += et;
283
+ }
284
+ const {
285
+ scrollElement: p,
286
+ beforeMargin: T,
287
+ afterMargin: R,
288
+ distance: w,
289
+ gap: P
290
+ } = B(t), [X, Z] = Zt(l, P), [
291
+ _,
292
+ H,
293
+ $
294
+ ] = rn(
295
+ T,
296
+ R,
297
+ M,
298
+ O == null ? void 0 : O.previousElementSibling,
299
+ y,
300
+ Z,
301
+ b
302
+ ), [k, q, J] = on(
303
+ T,
304
+ R,
305
+ w,
306
+ F,
307
+ X,
308
+ Z
309
+ ), I = nn(
310
+ q,
311
+ k,
312
+ J,
313
+ H,
314
+ _,
315
+ X
316
+ ), z = b ? l[p] : en(p, l, r), Y = (y ? I - $ : $ - I) - z;
317
+ return t === tt ? g += Y : t === V && (m += Y), ne(
318
+ { height: g, width: m },
319
+ t,
320
+ o,
321
+ c,
322
+ b
323
+ );
324
+ }
325
+ const en = (t, e, n) => {
326
+ const s = e[t], o = n[t];
327
+ return s - o;
328
+ }, nn = (t, e, n, s, o, r) => {
329
+ const c = Math.max(e, o);
330
+ return Math.max(n, s) + t + c + r;
331
+ }, sn = (t, e, n, s) => {
332
+ const o = e < n, [r, c] = [e, n].toSorted(
333
+ (m, b) => m - b
334
+ ), l = t[e] ?? s, f = t[n];
335
+ let g = o ? t.slice(r + 1, c + 1) : t.slice(r, c);
336
+ return r < 0 && s && (g = t.slice(r + 1, c)), [
337
+ l,
338
+ f,
339
+ g,
340
+ o
341
+ ];
342
+ }, on = (t, e, n, s, o, r) => {
343
+ if (s.length == 0)
344
+ return [0, 0, 0];
345
+ const c = L(s[0], t);
346
+ let l = 0, f = -c;
347
+ for (const [g, m] of s.entries()) {
348
+ const b = m.getBoundingClientRect()[n], M = L(m, t);
349
+ r && (l += M), r && g > 0 ? l += o : l = Math.max(l, M), f += l + b, l = L(m, e);
350
+ }
351
+ return [c, f, l];
352
+ }, ne = (t, e, n, s, o) => {
353
+ const { scroll: r, distance: c } = B(e), l = window[r], f = n[r], g = o ? 0 : f - 2 * l + s[r];
354
+ return t[c] += g, t;
355
+ }, rn = (t, e, n, s, o, r, c) => {
356
+ const l = o ? n.previousElementSibling : s;
357
+ return cn(
358
+ t,
359
+ e,
360
+ l,
361
+ n,
362
+ r,
363
+ c
364
+ );
365
+ }, cn = (t, e, n, s, o, r) => {
366
+ if (o)
367
+ return [0, 0, 0];
368
+ const c = L(
369
+ r ? null : n,
370
+ e
371
+ ), l = L(s, t);
372
+ let f = Math.max(c, l);
373
+ return [c, l, f];
374
+ }, kt = (t, e, n, s = () => !0) => {
375
+ const o = new MutationObserver((r) => {
376
+ if (r = r.filter(s), r.length > 0) {
377
+ const c = r[0];
378
+ t(o, c);
379
+ }
380
+ });
381
+ return o.observe(e, n), o;
382
+ }, an = (t, e, n) => {
383
+ n != 0 && (e === "vertical" ? t.scrollBy(0, n) : t.scrollBy(n, 0));
384
+ }, ln = (t, e, n) => {
385
+ const { scrollDistance: s, clientDistance: o, scrollElement: r } = B(t);
386
+ return n[r] / (e[s] - e[o]);
387
+ }, un = "startDrag", ge = "cubic-bezier(0.2, 0, 0, 1)", pe = 50, qt = (t) => it(t) ? t.classList.contains(at) : !1, fn = (t, e, n) => {
388
+ let s = yt(
389
+ e,
390
+ un,
391
+ n,
392
+ t
393
+ );
394
+ const o = ke(t, n), { distance: r } = B(n);
395
+ s[r] -= o;
396
+ const [c, l] = dn(n, e);
397
+ return s[l] = c, s;
398
+ }, dn = (t, e) => {
399
+ const n = t == V ? tt : V, { distance: s, getRect: o } = B(n);
400
+ return [
401
+ o(e)[s],
402
+ s
403
+ ];
404
+ }, ht = (t, e, n) => {
405
+ Ne(t, e, n), t.style.minWidth = `${n}px`;
406
+ }, gn = (t, e, n) => (s) => {
407
+ e.contains(t) && (ht(t, n.height, n.width), s.disconnect());
408
+ }, pn = (t, e) => {
409
+ if (!e)
410
+ return;
411
+ const { droppable: n, config: s, scroll: o } = t, { direction: r } = s, c = ln(s.direction, n, o) > 0.99, { scrollDistance: l, clientDistance: f, scrollElement: g } = B(r);
412
+ c && (n[g] = n[l] - n[f]);
413
+ }, he = (t, e, n, s) => {
414
+ if (!n)
415
+ return;
416
+ const { droppable: o, config: r } = n, { direction: c, animationDuration: l } = r;
417
+ if (pn(n, e), o.querySelector(`.${at}`) || !t)
418
+ return;
419
+ var f = t.tagName == "LI" ? "DIV" : t.tagName, g = document.createElement(f);
420
+ st(g, at), ht(g, 0, 0);
421
+ const m = fn(o, t, c);
422
+ return Pt(
423
+ g,
424
+ l,
425
+ ge,
426
+ "width, min-width, height"
427
+ ), [g, m, o];
428
+ }, Yt = (t, e, n, s, o) => {
429
+ const r = he(t, n, s);
430
+ if (!r)
431
+ return;
432
+ const [c, l, f] = r;
433
+ e.isSameNode(f) && ht(c, l.height, l.width), kt(
434
+ gn(c, f, l),
435
+ f,
436
+ {
437
+ childList: !0,
438
+ subtree: !0
439
+ }
440
+ ), f.appendChild(c);
441
+ }, hn = (t, e, n) => {
442
+ const s = he(t, e, n);
443
+ if (!s)
444
+ return;
445
+ const [o, r, c] = s;
446
+ c.appendChild(o), mn(o, r);
447
+ }, mn = (t, e) => requestAnimationFrame(() => {
448
+ ht(t, e.height, e.width), requestAnimationFrame(() => {
449
+ Pt(
450
+ t,
451
+ 0,
452
+ ge,
453
+ "width, min-width, height"
454
+ );
455
+ });
456
+ }), Sn = (t, e, n, s, o = !0) => {
457
+ if (n) {
458
+ var r = document.querySelectorAll(
459
+ `${gt(n)} > .${at}`
460
+ );
461
+ r.forEach((c) => {
462
+ const l = c.parentElement;
463
+ if (l != null && l.isSameNode(e) || !o && (l != null && l.isSameNode(t)))
464
+ return;
465
+ ht(c, 0, 0), setTimeout(() => {
466
+ var g;
467
+ (g = c.parentNode) == null || g.removeChild(c);
468
+ }, s + pe);
469
+ });
470
+ }
471
+ }, vt = (t, e, n = !1) => {
472
+ var s = t.querySelectorAll(`.${at}`);
473
+ s.forEach((o) => {
474
+ const r = o;
475
+ n ? (ht(r, 0, 0), setTimeout(() => {
476
+ t.contains(r) && t.removeChild(r);
477
+ }, e + pe)) : t.removeChild(o);
478
+ });
479
+ }, Dn = 50;
480
+ function vn(t, e, n, s, o, r) {
481
+ let c = e;
482
+ const {
483
+ direction: l,
484
+ handlerSelector: f,
485
+ onRemoveAtEvent: g,
486
+ animationDuration: m,
487
+ delayBeforeInsert: b,
488
+ draggingClass: M
489
+ } = t, O = (u, a, h, D, C) => {
490
+ if (!D)
491
+ return;
492
+ const { droppable: E, config: v } = D, A = yt(
493
+ u,
494
+ a,
495
+ v.direction,
496
+ E
497
+ );
498
+ ze(a) ? Z(
499
+ u,
500
+ a,
501
+ A,
502
+ h,
503
+ D,
504
+ C
505
+ ) : T(
506
+ u,
507
+ a,
508
+ A,
509
+ D
510
+ );
511
+ }, F = (u, a, h, D, C) => {
512
+ const E = yt(
513
+ a,
514
+ "insert",
515
+ t.direction,
516
+ h
517
+ ), { onInsertEvent: v } = t, A = ie(h);
518
+ for (const [N, x] of A.entries())
519
+ nt(x, U) && N >= u && X(x, E);
520
+ C(), setTimeout(() => {
521
+ v(u, D), me(u, h, t), et(a), W(a, n), vt(n, 0, !0);
522
+ }, b);
523
+ }, y = (u, a, h, D) => {
524
+ if (!h || !h.droppable || !h.config)
525
+ return;
526
+ const { droppable: C, config: E } = h;
527
+ let [v] = Mt(a, C);
528
+ v = [a, ...v].toReversed();
529
+ const A = yt(
530
+ a,
531
+ "remove",
532
+ E.direction,
533
+ C
534
+ );
535
+ for (const [N, x] of v.entries())
536
+ N >= u && (P(x, A), setTimeout(() => {
537
+ D(x);
538
+ }, m));
539
+ }, p = (u) => {
540
+ vt(n, m, !0), setTimeout(() => {
541
+ et(u), W(u, n);
542
+ }, m);
543
+ }, T = (u, a, h, D) => {
544
+ const { config: C, droppable: E } = D, [v] = Mt(u, E), A = pt(u, E);
545
+ v.length == 0 && w(
546
+ h,
547
+ 1,
548
+ C.direction,
549
+ v
550
+ );
551
+ for (const [N, x] of v.entries()) {
552
+ if (!nt(x, U))
553
+ continue;
554
+ const G = R(
555
+ C.direction,
556
+ u,
557
+ x,
558
+ h
559
+ );
560
+ if (!A && G)
561
+ h = G;
562
+ else if (!A)
563
+ continue;
564
+ const K = v.length - N;
565
+ w(
566
+ h,
567
+ K,
568
+ C.direction,
569
+ v
570
+ ), a === fe ? P(x, h) : a === Nt && X(x, h);
571
+ }
572
+ }, R = (u, a, h, D) => {
573
+ const { before: C, distance: E, axis: v, getRect: A } = B(u), N = A(a), x = A(h), G = N[C], K = x[C], mt = x[E], ft = K + mt / 2, St = Be(h)[v], rt = ft - St;
574
+ return G > rt ? { height: 0, width: 0 } : D;
575
+ }, w = (u, a, h, D) => {
576
+ const C = D.filter(
577
+ (v) => nt(v, U)
578
+ ).length, { distance: E } = B(h);
579
+ u[E] == 0 ? c = Math.max(c, a) : c = Math.min(c, a - 1), c = Math.min(c, C);
580
+ }, P = (u, a) => {
581
+ const { width: h, height: D } = a;
582
+ Et(u, D, h);
583
+ }, X = (u, a) => {
584
+ const { width: h, height: D } = a;
585
+ Et(u, D, h), Pt(u, m, de);
586
+ }, Z = (u, a, h, D, C, E) => {
587
+ const { droppable: v, scroll: A, config: N } = C, [x, G] = Mt(
588
+ u,
589
+ v
590
+ ), K = x.toReversed(), mt = G === -1 ? K.length : G;
591
+ K.splice(mt, 0, u);
592
+ const [ft, St, rt] = _(
593
+ u,
594
+ G,
595
+ K,
596
+ v
597
+ );
598
+ h = yt(
599
+ u,
600
+ a,
601
+ N.direction,
602
+ n,
603
+ ft,
604
+ St
605
+ );
606
+ const $t = xe(), xt = tn(
607
+ N.direction,
608
+ K,
609
+ G,
610
+ rt,
611
+ $t,
612
+ A,
613
+ D,
614
+ v,
615
+ u
616
+ );
617
+ x.length == 0 && H(
618
+ void 0,
619
+ h,
620
+ u,
621
+ xt
622
+ );
623
+ for (const [Gt, wt] of x.toReversed().entries()) {
624
+ let Bt = h;
625
+ rt - 1 >= Gt && (Bt = { height: 0, width: 0 }), a === jt && !nt(wt, at) && H(
626
+ wt,
627
+ Bt,
628
+ u,
629
+ xt
630
+ );
631
+ }
632
+ $(
633
+ rt,
634
+ u,
635
+ N,
636
+ v,
637
+ E
638
+ );
639
+ }, _ = (u, a, h, D) => {
640
+ const E = pt(u, D) ? a : c, v = () => a < E ? [E, E + 1] : a > E ? [E - 1, E] : [E - 1, E + 1], [A, N] = v(), x = h[A] ?? null, G = h[N] ?? null;
641
+ return [
642
+ x,
643
+ G,
644
+ E
645
+ ];
646
+ }, H = (u, a, h, D) => {
647
+ Et(u, a.height, a.width), Et(
648
+ h,
649
+ D.height,
650
+ D.width
651
+ );
652
+ }, $ = (u, a, h, D, C) => {
653
+ const { onInsertEvent: E, onDragEnd: v } = h;
654
+ st(a, Vt), J(a, n, D, () => {
655
+ if (Ct(a, Vt), C != null) {
656
+ const A = g(C, !0);
657
+ A != null && (E(u, A, !0), v({ value: A, index: u })), q(a), k();
658
+ }
659
+ });
660
+ }, k = () => {
661
+ if (s) {
662
+ var u = document.querySelectorAll(
663
+ `${gt(s)} > .${U}`
664
+ );
665
+ for (const a of u)
666
+ Y(a);
667
+ }
668
+ }, q = (u) => {
669
+ setTimeout(() => {
670
+ Ct(u, M);
671
+ }, Dn);
672
+ }, J = (u, a, h, D) => {
673
+ setTimeout(() => {
674
+ D && D(), I(a, h), z(h), et(u), W(u, a), W(u, h);
675
+ }, m);
676
+ }, I = (u, a) => {
677
+ u.isSameNode(a) ? vt(u, m) : (vt(u, m, !0), vt(a, m));
678
+ }, z = (u) => {
679
+ if (n.isSameNode(u))
680
+ return;
681
+ var [a] = n.querySelectorAll(`.${at}`);
682
+ if (!a)
683
+ return;
684
+ const { distance: h } = B(l);
685
+ it(a) && (a.style[h] = "0px");
686
+ }, W = (u, a) => {
687
+ const [h] = Mt(u, a);
688
+ for (const D of [...h, u])
689
+ Y(D);
690
+ }, Y = (u) => {
691
+ it(u) && (u.style.transition = "", u.style.transform = "");
692
+ }, et = (u) => {
693
+ r(), ot(u, !1), u.style.transform = "", u.style.transition = "", u.style.top = "", u.style.left = "", ue(u, {
694
+ fixedHeight: "",
695
+ fixedWidth: ""
696
+ });
697
+ }, ut = (u, a) => {
698
+ const h = a.querySelector(f);
699
+ bt(document.body, oe, u), bt(h || a, Wt, u);
700
+ }, ot = (u, a) => {
701
+ bt(u, Ft, a), ut(a, u), o.toggleGrabClass(!a);
702
+ };
703
+ return [
704
+ O,
705
+ y,
706
+ F,
707
+ p,
708
+ ot
709
+ ];
710
+ }
711
+ const bn = (t) => t.addedNodes.values().filter((n) => !qt(n)).toArray().length > 0, me = (t, e, n) => {
712
+ const { insertingFromClass: s, animationDuration: o } = n, r = kt(() => {
713
+ const l = ie(e)[t];
714
+ st(l, s), st(l, Kt), setTimeout(() => {
715
+ Ct(l, Kt), Ct(l, s), r.disconnect();
716
+ }, o);
717
+ }, e, {
718
+ childList: !0
719
+ }, bn);
720
+ }, Nn = (t, e, n, s) => {
721
+ if (!e)
722
+ return;
723
+ const { onInsertEvent: o, delayBeforeInsert: r } = t;
724
+ setTimeout(() => {
725
+ o(n, s), me(n, e, t);
726
+ }, r);
727
+ }, Tn = (t, e) => {
728
+ const n = (l, f) => t.removeAtEvent(l, f), s = (l, f, g) => t.insertEvent(l, f, g), o = () => t.getLength(), r = (l) => t.getValue(l), c = (l) => l;
729
+ return {
730
+ direction: (e == null ? void 0 : e.direction) ?? tt,
731
+ handlerSelector: (e == null ? void 0 : e.handlerSelector) ?? U,
732
+ draggingClass: (e == null ? void 0 : e.draggingClass) ?? "dragging",
733
+ droppableClass: (e == null ? void 0 : e.droppableClass) ?? "droppable-hover",
734
+ isDraggable: (e == null ? void 0 : e.isDraggable) ?? (() => !0),
735
+ onDragStart: (e == null ? void 0 : e.onDragStart) ?? (() => {
736
+ }),
737
+ onDragEnd: (e == null ? void 0 : e.onDragEnd) ?? (() => {
738
+ }),
739
+ droppableGroup: e == null ? void 0 : e.droppableGroup,
740
+ onRemoveAtEvent: n,
741
+ onInsertEvent: s,
742
+ onGetLegth: o,
743
+ onGetValue: r,
744
+ animationDuration: (e == null ? void 0 : e.animationDuration) ?? 200,
745
+ removingClass: (e == null ? void 0 : e.removingClass) ?? "removing",
746
+ insertingFromClass: (e == null ? void 0 : e.insertingFromClass) ?? "from-inserting",
747
+ delayBeforeRemove: (e == null ? void 0 : e.delayBeforeRemove) ?? 200,
748
+ delayBeforeInsert: (e == null ? void 0 : e.delayBeforeInsert) ?? 200,
749
+ mapFrom: (e == null ? void 0 : e.mapFrom) ?? c
750
+ };
751
+ }, En = (t, e) => {
752
+ const { config: n, droppable: s } = t, { onInsertEvent: o, onDragEnd: r } = n;
753
+ return {
754
+ ...n,
755
+ onDragEnd: (f) => {
756
+ const { index: g, value: m } = f;
757
+ r({ index: g, value: e(m, s) });
758
+ },
759
+ onInsertEvent: (f, g) => o(f, e(g, s), !0)
760
+ };
761
+ }, yn = (t) => {
762
+ let e = { offsetX: 0, offsetY: 0 }, n = { top: 0, left: 0 }, s = { x: 0, y: 0 };
763
+ const o = (f) => {
764
+ t.style.transform = `translate( ${f.x}px, ${f.y}px)`;
765
+ }, r = (f) => {
766
+ t.style.top = `${f.top}px`, t.style.left = `${f.left}px`;
767
+ };
768
+ return [
769
+ (f, g, m, b) => {
770
+ const M = (y) => {
771
+ const {
772
+ beforeMargin: p,
773
+ borderBeforeWidth: T,
774
+ before: R,
775
+ offset: w,
776
+ scroll: P,
777
+ page: X,
778
+ inner: Z,
779
+ distance: _,
780
+ axis: H,
781
+ getRect: $
782
+ } = B(y), k = m[X], q = window[P], J = window[Z], I = $(f)[_], z = L(f, T), W = L(f, p), Y = k - e[w], et = ce(f, y);
783
+ if (Y >= q - I / 2 && Y <= q + J) {
784
+ const ot = Y - n[R] - z - W - q - et;
785
+ return O(y), ot;
786
+ }
787
+ return s[H];
788
+ }, O = (y) => {
789
+ if (f && nt(f, Ft) && y === b) {
790
+ const { before: p, distance: T, axis: R, getRect: w } = B(b), P = w(f)[T], X = w(g), Z = n[p] - X[p] + s[R], H = X[T] - P, $ = Z / H, k = P / H, q = 0.1, J = 0.2, I = 0.8;
791
+ let z = 0;
792
+ const W = pt(f, g);
793
+ !W && $ < J && $ > -k ? z = $ / J - 1 : !W && $ > I && $ < 1 + k && (z = 1 / (1 - I) * ($ - I));
794
+ const Y = q * P * z;
795
+ an(g, b, Y);
796
+ }
797
+ }, F = (y) => {
798
+ const { axis: p } = B(y);
799
+ s[p] = M(y), o(s);
800
+ };
801
+ F(V), F(tt);
802
+ },
803
+ (f, g) => {
804
+ const [m, b, M, O] = xn(
805
+ f,
806
+ g,
807
+ t
808
+ );
809
+ n = {
810
+ top: m,
811
+ left: b
812
+ }, r(n), e = { offsetX: M, offsetY: O };
813
+ }
814
+ ];
815
+ }, Rt = (t, e, n) => {
816
+ const { borderBeforeWidth: s, before: o, getRect: r } = B(t);
817
+ return r(e)[o] - r(n)[o] - L(n, s);
818
+ }, Cn = (t, e) => {
819
+ let { offsetX: n, offsetY: s, target: o } = t, r = An(o, e);
820
+ const c = o;
821
+ return c && r && !c.isSameNode(r) && (n += Rt(V, c, r), s += Rt(tt, c, r)), r && e != o && (n += Rt(V, r, e), s += Rt(tt, r, e)), [n, s];
822
+ }, An = (t, e) => {
823
+ const n = t == null ? void 0 : t.closest(`.${Lt}`);
824
+ return n && n.isSameNode(e) ? t : n;
825
+ }, se = (t, e, n, s) => {
826
+ const { offset: o, beforeMargin: r, page: c, borderBeforeWidth: l, scroll: f } = B(t), g = ce(n, t);
827
+ return e[c] - s[o] - L(n, r) - L(n, l) - window[f] - g;
828
+ }, xn = (t, e, n) => {
829
+ const [s, o] = Cn(t, n);
830
+ return [
831
+ se(tt, t, e, {
832
+ offsetX: s,
833
+ offsetY: o
834
+ }),
835
+ se(V, t, e, {
836
+ offsetX: s,
837
+ offsetY: o
838
+ }),
839
+ s,
840
+ o
841
+ ];
842
+ }, Q = class Q {
843
+ static addConfig(e, n) {
844
+ const s = Q.configs.filter(
845
+ (r) => !r.droppable.isSameNode(e)
846
+ ), o = Ut(e);
847
+ s.push({
848
+ droppable: e,
849
+ config: n,
850
+ scroll: o
851
+ }), Q.configs = s;
852
+ }
853
+ static updateScrolls(e, n) {
854
+ for (const s of Q.configs) {
855
+ const { droppable: o } = s;
856
+ (n && Ce(o, n) || o.isSameNode(e)) && (s.scroll = Ut(o));
857
+ }
858
+ }
859
+ static getConfig(e) {
860
+ return Q.configs.find(
861
+ ({ droppable: s }) => s.isSameNode(e)
862
+ );
863
+ }
864
+ };
865
+ j(Q, "configs", []), j(Q, "removeObsoleteConfigs", () => {
866
+ const e = Q.configs.filter(
867
+ ({ droppable: n }) => document.contains(n)
868
+ );
869
+ Q.configs = e;
870
+ });
871
+ let lt = Q;
872
+ class wn {
873
+ constructor(e, n, s, o, r, c) {
874
+ j(this, "initial");
875
+ j(this, "current");
876
+ j(this, "parent");
877
+ j(this, "draggableElement");
878
+ j(this, "groupClass");
879
+ j(this, "dragEvent");
880
+ j(this, "changeDroppable");
881
+ j(this, "mapFrom");
882
+ this.parent = s, this.draggableElement = e, this.groupClass = n, this.dragEvent = o, this.mapFrom = c, this.initial = s ? lt.getConfig(s) : void 0, this.changeDroppable = r;
883
+ }
884
+ getDraggableAncestor(e, n, s) {
885
+ return document.elementsFromPoint(e, n).filter((o) => !o.isSameNode(s));
886
+ }
887
+ getElementBelow(e, n, s = !0) {
888
+ const o = (c) => {
889
+ const [l] = c.getDraggableAncestor(
890
+ n.clientX,
891
+ n.clientY,
892
+ e
893
+ );
894
+ return l;
895
+ };
896
+ let r = null;
897
+ return s ? (e.hidden = !0, r = o(this), e.hidden = !1) : r = o(this), r;
898
+ }
899
+ getCurrent(e, n, s = !0) {
900
+ const o = this.getElementBelow(e, n, s);
901
+ return !this.groupClass || !o ? void 0 : o.closest(
902
+ gt(this.groupClass)
903
+ );
904
+ }
905
+ isOutsideOfAllDroppables(e) {
906
+ return (this.groupClass ? Array.from(
907
+ document.querySelectorAll(gt(this.groupClass))
908
+ ) : [this.parent]).every(
909
+ (s) => pt(e, s)
910
+ );
911
+ }
912
+ isNotInsideAnotherDroppable(e, n) {
913
+ return !pt(e, n) || this.isOutsideOfAllDroppables(e);
914
+ }
915
+ onScrollEvent() {
916
+ this.dragEvent();
917
+ }
918
+ setOnScroll(e) {
919
+ le(e, "onscroll", () => {
920
+ this.onScrollEvent();
921
+ });
922
+ }
923
+ getConfigFrom(e) {
924
+ const n = lt.getConfig(e);
925
+ if (n)
926
+ return e.isSameNode(this.parent) ? n : {
927
+ ...n,
928
+ config: En(n, this.mapFrom)
929
+ };
930
+ }
931
+ getCurrentConfig(e) {
932
+ var o;
933
+ const n = this.draggableElement;
934
+ if (this.current && this.isNotInsideAnotherDroppable(
935
+ n,
936
+ (o = this.current) == null ? void 0 : o.droppable
937
+ ))
938
+ return this.current;
939
+ const s = this.getCurrent(n, e);
940
+ return s ? (it(s) && !s.onscroll && this.setOnScroll(s), this.getConfigFrom(s)) : this.getConfigFrom(this.parent);
941
+ }
942
+ updateConfig(e) {
943
+ const n = this.current;
944
+ this.current = this.getCurrentConfig(e), this.changeDroppable(this.current, n);
945
+ }
946
+ isOutside(e, n = !0) {
947
+ const s = this.draggableElement;
948
+ return !this.getCurrent(s, e, n);
949
+ }
950
+ }
951
+ function Bn(t, e, n, s, o) {
952
+ const {
953
+ handlerSelector: r,
954
+ isDraggable: c,
955
+ droppableGroup: l,
956
+ animationDuration: f,
957
+ delayBeforeRemove: g,
958
+ draggingClass: m,
959
+ removingClass: b,
960
+ onRemoveAtEvent: M,
961
+ droppableClass: O,
962
+ onDragStart: F
963
+ } = n, y = At(l).map((i) => `droppable-group-${i}`).join(" ");
964
+ let p = 0, T = {
965
+ scrollX: 0,
966
+ scrollY: 0
967
+ }, R = { pageX: 0, pageY: 0 }, w, P;
968
+ const [X, Z] = yn(
969
+ t
970
+ ), [
971
+ _,
972
+ H,
973
+ $,
974
+ k,
975
+ q
976
+ ] = vn(
977
+ n,
978
+ e,
979
+ s,
980
+ y,
981
+ o,
982
+ () => p = 0
983
+ /* NOT_DRAGGING */
984
+ ), J = () => {
985
+ st(t, U);
986
+ }, I = (i) => {
987
+ st(i, Lt), o.addSubscriber(i);
988
+ }, z = () => {
989
+ if (c(t)) {
990
+ const i = t.querySelector(r);
991
+ I(i || t);
992
+ }
993
+ }, W = () => {
994
+ z(), J();
995
+ }, Y = (i) => {
996
+ const d = i == null ? void 0 : i.querySelector(`.${Lt}`), S = d == null ? void 0 : d.parentElement;
997
+ return d && S && nt(S, Xt) && !S.isSameNode(s) ? null : d;
998
+ }, et = (i) => {
999
+ const d = Y(i) ?? i;
1000
+ d && c(i) && (It(
1001
+ d,
1002
+ "onmousedown",
1003
+ G("mousemove", "mouseup")
1004
+ ), It(
1005
+ d,
1006
+ "ontouchstart",
1007
+ G("touchmove", "touchend"),
1008
+ (S) => {
1009
+ P = {
1010
+ x: S.touches[0].clientX,
1011
+ y: S.touches[0].clientY
1012
+ };
1013
+ }
1014
+ ), ut(d)), i != null && i.isSameNode(d) || It(i, "onmousedown", K), st(s, Xt);
1015
+ }, ut = (i) => {
1016
+ const d = i.querySelectorAll("img");
1017
+ Array.from(d).forEach((S) => {
1018
+ S.onmousedown = () => !1;
1019
+ });
1020
+ }, ot = () => {
1021
+ if (R.pageX == 0 && R.pageY == 0 || !a.current)
1022
+ return;
1023
+ const { droppable: i, config: d } = a.current;
1024
+ X(t, i, R, d.direction), _(
1025
+ t,
1026
+ Nt,
1027
+ T,
1028
+ a.current
1029
+ );
1030
+ }, u = (i, d) => {
1031
+ d && p == 2 && !(i != null && i.droppable.isSameNode(d.droppable)) && _(
1032
+ t,
1033
+ Nt,
1034
+ T,
1035
+ d
1036
+ );
1037
+ }, a = new wn(
1038
+ t,
1039
+ y,
1040
+ s,
1041
+ ot,
1042
+ u,
1043
+ n.mapFrom
1044
+ ), h = (i) => {
1045
+ if (!a.current)
1046
+ return;
1047
+ const d = y ? Array.from(
1048
+ document.querySelectorAll(gt(y))
1049
+ ) : [s];
1050
+ for (const S of d)
1051
+ S.classList.toggle(
1052
+ O,
1053
+ !i && S.isSameNode(a.current.droppable)
1054
+ );
1055
+ }, D = (i, d = !1) => {
1056
+ a.updateConfig(i);
1057
+ const S = a.isOutside(i);
1058
+ h(S), p === 1 && !d ? rt(i) : p === 2 && (C(S), xt(i));
1059
+ }, C = (i = !0) => {
1060
+ if (!a.current)
1061
+ return;
1062
+ const { droppable: d } = a.current;
1063
+ Sn(
1064
+ d,
1065
+ s,
1066
+ y,
1067
+ f,
1068
+ i
1069
+ ), !i && Yt(
1070
+ t,
1071
+ s,
1072
+ p == 1,
1073
+ a.current
1074
+ );
1075
+ }, E = (i) => {
1076
+ if (Tt(i) && P && p == 1) {
1077
+ const d = Math.abs(i.touches[0].clientX - P.x), S = Math.abs(i.touches[0].clientY - P.y);
1078
+ if (Math.abs(d) > 5 && Math.abs(S) > 5)
1079
+ return clearTimeout(w), !1;
1080
+ }
1081
+ return !0;
1082
+ }, v = (i) => {
1083
+ clearTimeout(w);
1084
+ const d = _t(i);
1085
+ if (Tt(i) && i.cancelable && i.preventDefault(), Tt(i) && !i.cancelable || !E(i)) {
1086
+ ft("touchmove", i);
1087
+ return;
1088
+ }
1089
+ D(d, Tt(i));
1090
+ }, A = (i, d) => {
1091
+ i == "touchmove" ? w = setTimeout(() => {
1092
+ d();
1093
+ }, 150) : d();
1094
+ }, N = (i, d) => {
1095
+ const { clientX: S, clientY: dt } = i, ct = document.elementFromPoint(S, dt), Dt = ct == null ? void 0 : ct.closest(`.${U}`);
1096
+ return Dt && d.isSameNode(Dt);
1097
+ }, x = (i) => {
1098
+ const d = n.onGetValue(e);
1099
+ return { index: e, element: i, value: d };
1100
+ }, G = (i, d) => (S) => {
1101
+ if (!N(S, t))
1102
+ return;
1103
+ lt.updateScrolls(s, y);
1104
+ const { scrollX: dt, scrollY: ct } = window;
1105
+ if (T = { scrollX: dt, scrollY: ct }, p === 0) {
1106
+ p = 1;
1107
+ const Dt = x(t);
1108
+ Dt && F(Dt), A(i, () => {
1109
+ i == "touchmove" && (a.updateConfig(S), h(a.isOutside(S)), rt(S));
1110
+ }), document.addEventListener(i, v, {
1111
+ passive: !1
1112
+ }), Gt(s), document.addEventListener(d, mt(i), {
1113
+ once: !0
1114
+ });
1115
+ }
1116
+ }, K = (i) => a.updateConfig(i), mt = (i) => (d) => {
1117
+ ft(i, d);
1118
+ }, ft = (i, d) => {
1119
+ h(!0);
1120
+ const S = _t(d);
1121
+ Bt(a.isOutside(S, !1)), clearTimeout(w), document.removeEventListener(i, v), a.updateConfig(S);
1122
+ const dt = a.getCurrentConfig(S);
1123
+ if (dt) {
1124
+ const { droppable: ct } = dt;
1125
+ St(ct);
1126
+ }
1127
+ s.onscroll = null;
1128
+ }, St = (i) => {
1129
+ if (i.onscroll = null, !y)
1130
+ return;
1131
+ const d = Array.from(
1132
+ document.querySelectorAll(gt(y))
1133
+ );
1134
+ for (const S of d)
1135
+ it(S) && (S.onscroll = null);
1136
+ }, rt = (i) => {
1137
+ Yt(
1138
+ t,
1139
+ s,
1140
+ p == 1,
1141
+ a.current
1142
+ ), $t(), _(
1143
+ t,
1144
+ fe,
1145
+ T,
1146
+ a.current
1147
+ ), Se(t), Z(i, t);
1148
+ }, $t = () => {
1149
+ p = 2;
1150
+ }, xt = (i) => {
1151
+ const { pageX: d, pageY: S } = i;
1152
+ R = { pageX: d, pageY: S }, ot();
1153
+ }, Gt = (i) => le(i, "onscroll", wt), wt = () => ot(), Bt = (i) => {
1154
+ if (p !== 2 && p !== 1) {
1155
+ p = 0;
1156
+ return;
1157
+ }
1158
+ p = 3, Jt(t), t.classList.contains(Ft) && _(
1159
+ t,
1160
+ jt,
1161
+ T,
1162
+ i ? a.initial : a.current,
1163
+ e
1164
+ );
1165
+ }, Jt = (i) => {
1166
+ Pt(i, f, de), Et(i, 0, 0);
1167
+ }, Se = (i) => {
1168
+ const { height: d, width: S } = i.getBoundingClientRect();
1169
+ ue(i, {
1170
+ fixedHeight: `${d}px`,
1171
+ fixedWidth: `${S}px`
1172
+ }), q(i, !0), bt(i, m, !0), i.style.transition = "";
1173
+ }, De = (i, d) => {
1174
+ Ct(t, b), Yt(
1175
+ t,
1176
+ s,
1177
+ p == 1,
1178
+ a.initial
1179
+ ), H(
1180
+ i,
1181
+ t,
1182
+ d,
1183
+ (S) => {
1184
+ Jt(S), k(t);
1185
+ }
1186
+ ), M(e, !0);
1187
+ }, ve = (i) => {
1188
+ if (!a.initial)
1189
+ return;
1190
+ const d = a.initial;
1191
+ i == e && (st(t, b), setTimeout(() => {
1192
+ De(i, d);
1193
+ }, g));
1194
+ }, be = (i, d) => {
1195
+ (i === e || i === n.onGetLegth() && e === i - 1) && $(
1196
+ i,
1197
+ t,
1198
+ s,
1199
+ d,
1200
+ () => {
1201
+ hn(
1202
+ t,
1203
+ p == 1,
1204
+ a.initial
1205
+ );
1206
+ }
1207
+ );
1208
+ };
1209
+ return W(), et(t), [ve, be];
1210
+ }
1211
+ const Mn = (t, e) => {
1212
+ t && Ae(e, t);
1213
+ }, Rn = () => {
1214
+ Ve(document.body, [
1215
+ `.${U}{touch-action:manipulation;user-select:none;box-sizing:border-box!important;-webkit-user-select:none;}`,
1216
+ `.${Lt}{pointer-events:auto!important;}`,
1217
+ `.${ye}{cursor:grab;}`,
1218
+ ".temp-child{touch-action:none;pointer-events:none;box-sizing:border-box!important;}",
1219
+ ".droppable{box-sizing:border-box!important;}",
1220
+ `.${Ft}{position:fixed;z-index:5000;width:var(--fixedWidth)!important;height:var(--fixedHeight)!important;}`,
1221
+ `.${Wt}{pointer-events:none!important;}`,
1222
+ `.${Vt}{pointer-events:none!important;}`,
1223
+ `.${oe}{cursor:grabbing;}`,
1224
+ ".disable-transition{transition:none!important;}"
1225
+ ]);
1226
+ };
1227
+ function Ln(t, e, n, s = "index") {
1228
+ const o = s;
1229
+ let r = [], c = [];
1230
+ const { droppableGroup: l } = t;
1231
+ if (!n)
1232
+ return [
1233
+ r,
1234
+ c
1235
+ ];
1236
+ const f = At(l).map((g) => `droppable-group-${g}`).join(" ");
1237
+ Rn(), Mn(f, n);
1238
+ for (const g of n.children) {
1239
+ const m = g.getAttribute(o), b = we(m), M = g;
1240
+ if (M && b >= 0) {
1241
+ const [O, F] = Bn(
1242
+ M,
1243
+ b,
1244
+ t,
1245
+ n,
1246
+ e
1247
+ );
1248
+ r.push(O), c.push(F);
1249
+ }
1250
+ }
1251
+ return [
1252
+ r,
1253
+ c
1254
+ ];
1255
+ }
1256
+ function Fn(t, e, n, s = "index", o = !0) {
1257
+ let r = [], c = [];
1258
+ const l = Tn(t, n), f = (p) => {
1259
+ for (const T of r)
1260
+ T(p);
1261
+ }, g = (p, T) => {
1262
+ if (l.onGetLegth() === 0)
1263
+ t.insertToListEmpty(l, p, T);
1264
+ else
1265
+ for (const w of c)
1266
+ w(p, T);
1267
+ }, m = (p) => {
1268
+ const [T, R] = Ln(l, e, p, s);
1269
+ r = T, c = R;
1270
+ }, b = (p) => {
1271
+ const T = p.addedNodes.values().filter((w) => !qt(w)).toArray(), R = p.removedNodes.values().filter((w) => !qt(w)).toArray();
1272
+ return T.length > 0 || R.length > 0;
1273
+ }, M = (p) => {
1274
+ kt(
1275
+ (T) => {
1276
+ m(p), o || T.disconnect();
1277
+ },
1278
+ p,
1279
+ { childList: !0 },
1280
+ b
1281
+ );
1282
+ }, O = (p) => {
1283
+ st(p, Xt);
1284
+ }, F = (p) => {
1285
+ lt.addConfig(
1286
+ p,
1287
+ l
1288
+ );
1289
+ };
1290
+ return [f, g, (p) => {
1291
+ p && (O(p), F(p), M(p), m(p), lt.removeObsoleteConfigs());
1292
+ }];
1293
+ }
1294
+ export {
1295
+ ye as G,
1296
+ st as a,
1297
+ Fn as d,
1298
+ Nn as i,
1299
+ bt as t
1300
+ };