@frontify/fondue-components 28.0.0 → 29.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fondue-components.js +60 -56
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +1 -1
- package/dist/fondue-components100.js +22 -16
- package/dist/fondue-components100.js.map +1 -1
- package/dist/fondue-components101.js +34 -151
- package/dist/fondue-components101.js.map +1 -1
- package/dist/fondue-components102.js +10 -44
- package/dist/fondue-components102.js.map +1 -1
- package/dist/fondue-components103.js +67 -13
- package/dist/fondue-components103.js.map +1 -1
- package/dist/fondue-components104.js +13 -13
- package/dist/fondue-components105.js +26 -111
- package/dist/fondue-components105.js.map +1 -1
- package/dist/fondue-components106.js +18 -12
- package/dist/fondue-components106.js.map +1 -1
- package/dist/fondue-components107.js +25 -17
- package/dist/fondue-components107.js.map +1 -1
- package/dist/fondue-components108.js +8 -12
- package/dist/fondue-components108.js.map +1 -1
- package/dist/fondue-components109.js +30 -16
- package/dist/fondue-components109.js.map +1 -1
- package/dist/fondue-components11.js +3 -3
- package/dist/fondue-components110.js +7 -6
- package/dist/fondue-components110.js.map +1 -1
- package/dist/fondue-components111.js +16 -11
- package/dist/fondue-components111.js.map +1 -1
- package/dist/fondue-components112.js +125 -69
- package/dist/fondue-components112.js.map +1 -1
- package/dist/fondue-components113.js +11 -15
- package/dist/fondue-components113.js.map +1 -1
- package/dist/fondue-components114.js +36 -7
- package/dist/fondue-components114.js.map +1 -1
- package/dist/fondue-components115.js +14 -89
- package/dist/fondue-components115.js.map +1 -1
- package/dist/fondue-components116.js +14 -80
- package/dist/fondue-components116.js.map +1 -1
- package/dist/fondue-components117.js +109 -29
- package/dist/fondue-components117.js.map +1 -1
- package/dist/fondue-components118.js +12 -28
- package/dist/fondue-components118.js.map +1 -1
- package/dist/fondue-components119.js +20 -0
- package/dist/fondue-components119.js.map +1 -0
- package/dist/fondue-components12.js +3 -3
- package/dist/fondue-components120.js +12 -40
- package/dist/fondue-components120.js.map +1 -1
- package/dist/fondue-components121.js +216 -18
- package/dist/fondue-components121.js.map +1 -1
- package/dist/fondue-components122.js +17 -19
- package/dist/fondue-components122.js.map +1 -1
- package/dist/fondue-components123.js +15 -38
- package/dist/fondue-components123.js.map +1 -1
- package/dist/fondue-components124.js +150 -67
- package/dist/fondue-components124.js.map +1 -1
- package/dist/fondue-components125.js +44 -30
- package/dist/fondue-components125.js.map +1 -1
- package/dist/fondue-components126.js +5 -9
- package/dist/fondue-components126.js.map +1 -1
- package/dist/fondue-components127.js +4 -152
- package/dist/fondue-components127.js.map +1 -1
- package/dist/fondue-components128.js +28 -107
- package/dist/fondue-components128.js.map +1 -1
- package/dist/fondue-components13.js +61 -35
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components130.js +41 -16
- package/dist/fondue-components130.js.map +1 -1
- package/dist/fondue-components131.js +6 -29
- package/dist/fondue-components131.js.map +1 -1
- package/dist/fondue-components132.js +12 -13
- package/dist/fondue-components132.js.map +1 -1
- package/dist/fondue-components133.js +70 -6
- package/dist/fondue-components133.js.map +1 -1
- package/dist/fondue-components134.js +18 -0
- package/dist/fondue-components134.js.map +1 -0
- package/dist/fondue-components135.js +10 -0
- package/dist/fondue-components135.js.map +1 -0
- package/dist/fondue-components136.js +92 -0
- package/dist/fondue-components136.js.map +1 -0
- package/dist/fondue-components137.js +84 -0
- package/dist/fondue-components137.js.map +1 -0
- package/dist/fondue-components138.js +34 -0
- package/dist/fondue-components138.js.map +1 -0
- package/dist/fondue-components139.js +173 -0
- package/dist/fondue-components139.js.map +1 -0
- package/dist/fondue-components14.js +36 -121
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components140.js +63 -0
- package/dist/fondue-components140.js.map +1 -0
- package/dist/fondue-components141.js +12 -0
- package/dist/fondue-components141.js.map +1 -0
- package/dist/fondue-components142.js +259 -0
- package/dist/fondue-components142.js.map +1 -0
- package/dist/fondue-components143.js +22 -0
- package/dist/fondue-components143.js.map +1 -0
- package/dist/fondue-components144.js +73 -0
- package/dist/fondue-components144.js.map +1 -0
- package/dist/fondue-components145.js +1355 -0
- package/dist/fondue-components145.js.map +1 -0
- package/dist/fondue-components146.js +944 -0
- package/dist/fondue-components146.js.map +1 -0
- package/dist/fondue-components147.js +201 -0
- package/dist/fondue-components147.js.map +1 -0
- package/dist/fondue-components148.js +24 -0
- package/dist/fondue-components148.js.map +1 -0
- package/dist/fondue-components149.js +43 -0
- package/dist/fondue-components149.js.map +1 -0
- package/dist/fondue-components15.js +121 -36
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components150.js +71 -0
- package/dist/fondue-components150.js.map +1 -0
- package/dist/fondue-components151.js +34 -0
- package/dist/fondue-components151.js.map +1 -0
- package/dist/fondue-components152.js +12 -0
- package/dist/fondue-components152.js.map +1 -0
- package/dist/fondue-components153.js +156 -0
- package/dist/fondue-components153.js.map +1 -0
- package/dist/fondue-components154.js +111 -0
- package/dist/fondue-components154.js.map +1 -0
- package/dist/{fondue-components129.js → fondue-components155.js} +1 -1
- package/dist/{fondue-components129.js.map → fondue-components155.js.map} +1 -1
- package/dist/fondue-components156.js +19 -0
- package/dist/fondue-components156.js.map +1 -0
- package/dist/fondue-components157.js +32 -0
- package/dist/fondue-components157.js.map +1 -0
- package/dist/fondue-components158.js +16 -0
- package/dist/fondue-components158.js.map +1 -0
- package/dist/fondue-components159.js +10 -0
- package/dist/fondue-components159.js.map +1 -0
- package/dist/fondue-components16.js +30 -39
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +44 -41
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +42 -57
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +55 -41
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +39 -16
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +17 -43
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +42 -69
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +69 -17
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +71 -74
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +18 -36
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +72 -50
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +36 -23
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +50 -50
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +23 -100
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +50 -28
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +92 -188
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +31 -144
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +192 -129
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +141 -27
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +123 -71
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +28 -120
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +80 -35
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +119 -52
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +36 -20
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +3 -3
- package/dist/fondue-components40.js +56 -25
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +20 -7
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +25 -8
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +8 -41
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +8 -4
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +41 -5
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +3 -11
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +5 -32
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +12 -53
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +32 -131
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +53 -20
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +131 -53
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +20 -7
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +53 -13
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +7 -16
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +13 -5
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +17 -18
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +4 -18
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +18 -44
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +18 -24
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +1 -1
- package/dist/fondue-components60.js +43 -22
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +24 -4
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +22 -12
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +6 -4
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +4 -17
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +12 -10
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +4 -36
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +17 -6
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +10 -4
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +34 -10
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +1 -1
- package/dist/fondue-components70.js +6 -8
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +4 -12
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +11 -3
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +50 -23
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +44 -17
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +6 -20
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +6 -20
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +12 -19
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +24 -16
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +13 -19
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components8.js +5 -5
- package/dist/fondue-components80.js +5 -8
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +12 -10
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +47 -10
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +20 -4
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +628 -12
- package/dist/fondue-components84.js.map +1 -1
- package/dist/fondue-components85.js +8 -22
- package/dist/fondue-components85.js.map +1 -1
- package/dist/fondue-components86.js +13 -34
- package/dist/fondue-components86.js.map +1 -1
- package/dist/fondue-components87.js +4 -10
- package/dist/fondue-components87.js.map +1 -1
- package/dist/fondue-components88.js +23 -66
- package/dist/fondue-components88.js.map +1 -1
- package/dist/fondue-components89.js +14 -12
- package/dist/fondue-components89.js.map +1 -1
- package/dist/fondue-components9.js +5 -5
- package/dist/fondue-components90.js +20 -25
- package/dist/fondue-components90.js.map +1 -1
- package/dist/fondue-components91.js +20 -19
- package/dist/fondue-components91.js.map +1 -1
- package/dist/fondue-components92.js +20 -25
- package/dist/fondue-components92.js.map +1 -1
- package/dist/fondue-components93.js +20 -9
- package/dist/fondue-components93.js.map +1 -1
- package/dist/fondue-components94.js +19 -31
- package/dist/fondue-components94.js.map +1 -1
- package/dist/fondue-components95.js +8 -7
- package/dist/fondue-components95.js.map +1 -1
- package/dist/fondue-components96.js +10 -4
- package/dist/fondue-components96.js.map +1 -1
- package/dist/fondue-components97.js +10 -4
- package/dist/fondue-components97.js.map +1 -1
- package/dist/fondue-components98.js +6 -216
- package/dist/fondue-components98.js.map +1 -1
- package/dist/fondue-components99.js +12 -18
- package/dist/fondue-components99.js.map +1 -1
- package/dist/index.d.ts +102 -4
- package/dist/style.css +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,1355 @@
|
|
|
1
|
+
import { Droppable as rr, Draggable as ir, descriptor as sr, Sensor as ke, configurator as tt, ActivationController as or, Plugin as nt, CorePlugin as Vt, ActivationConstraint as Gt } from "@dnd-kit/abstract";
|
|
2
|
+
import { resolveCustomizable as mi } from "@dnd-kit/abstract";
|
|
3
|
+
import { DOMRectangle as L, ScrollDirection as I, PositionObserver as ar, Listeners as Jt, isElement as te, isKeyboardEvent as rt, scrollIntoViewIfNeeded as lr, getDocument as it, isPointerEvent as cr, isHTMLElement as Qt, getFrameTransform as xe, getEventCoordinates as ne, getDocuments as dr, scheduler as Zt, isInteractiveElement as ur, isTextInput as hr, getRoot as Oe, canScroll as fr, detectScrollIntent as pr, getScrollableAncestors as Lt, isDocument as vr, isShadowRoot as mr, getComputedStyles as en, parseTranslate as tn, getFixedPositionOffset as nn, Styles as gr, supportsPopover as Ft, showPopover as ve, getWindow as rn, prefersReducedMotion as sn, getElementFromPoint as yr, getFrameElement as zt, cloneElement as br, supportsStyle as Nt, generateUniqueId as _r, ProxiedElements as Kt, getFinalKeyframe as wr, animateTransform as Sr } from "./fondue-components146.js";
|
|
4
|
+
import { computed as Xt, deepEqual as Er, effects as kr, reactive as W, derived as Ne } from "./fondue-components139.js";
|
|
5
|
+
import { Axes as on, Point as xr, Rectangle as an, exceedsDistance as Xe } from "./fondue-components147.js";
|
|
6
|
+
import { defaultCollisionDetection as Or } from "./fondue-components144.js";
|
|
7
|
+
import { untracked as P, signal as ln, effect as Me, batch as Ar } from "./fondue-components142.js";
|
|
8
|
+
var Dr = Object.create, st = Object.defineProperty, Cr = Object.defineProperties, Tr = Object.getOwnPropertyDescriptor, Pr = Object.getOwnPropertyDescriptors, Ae = Object.getOwnPropertySymbols, cn = Object.prototype.hasOwnProperty, dn = Object.prototype.propertyIsEnumerable, un = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), ie = (e) => {
|
|
9
|
+
throw TypeError(e);
|
|
10
|
+
}, Ye = (e, t, n) => t in e ? st(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, De = (e, t) => {
|
|
11
|
+
for (var n in t || (t = {}))
|
|
12
|
+
cn.call(t, n) && Ye(e, n, t[n]);
|
|
13
|
+
if (Ae)
|
|
14
|
+
for (var n of Ae(t))
|
|
15
|
+
dn.call(t, n) && Ye(e, n, t[n]);
|
|
16
|
+
return e;
|
|
17
|
+
}, hn = (e, t) => Cr(e, Pr(t)), Yt = (e, t) => st(e, "name", { value: t, configurable: !0 }), fn = (e, t) => {
|
|
18
|
+
var n = {};
|
|
19
|
+
for (var r in e)
|
|
20
|
+
cn.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
21
|
+
if (e != null && Ae)
|
|
22
|
+
for (var r of Ae(e))
|
|
23
|
+
t.indexOf(r) < 0 && dn.call(e, r) && (n[r] = e[r]);
|
|
24
|
+
return n;
|
|
25
|
+
}, se = (e) => {
|
|
26
|
+
var t;
|
|
27
|
+
return [, , , Dr((t = e == null ? void 0 : e[un("metadata")]) != null ? t : null)];
|
|
28
|
+
}, pn = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], ue = (e) => e !== void 0 && typeof e != "function" ? ie("Function expected") : e, Mr = (e, t, n, r, i) => ({ kind: pn[e], name: t, metadata: r, addInitializer: (s) => n._ ? ie("Already initialized") : i.push(ue(s || null)) }), j = (e, t) => Ye(t, un("metadata"), e[3]), b = (e, t, n, r) => {
|
|
29
|
+
for (var i = 0, s = e[t >> 1], o = s && s.length; i < o; i++) t & 1 ? s[i].call(n) : r = s[i].call(n, r);
|
|
30
|
+
return r;
|
|
31
|
+
}, D = (e, t, n, r, i, s) => {
|
|
32
|
+
var o, a, l, h, u, d = t & 7, f = !!(t & 8), c = !!(t & 16), p = d > 3 ? e.length + 1 : d ? f ? 1 : 2 : 0, w = pn[d + 5], k = d > 3 && (e[p - 1] = []), C = e[p] || (e[p] = []), y = d && (!c && !f && (i = i.prototype), d < 5 && (d > 3 || !c) && Tr(d < 4 ? i : { get [n]() {
|
|
33
|
+
return g(this, s);
|
|
34
|
+
}, set [n](v) {
|
|
35
|
+
return A(this, s, v);
|
|
36
|
+
} }, n));
|
|
37
|
+
d ? c && d < 4 && Yt(s, (d > 2 ? "set " : d > 1 ? "get " : "") + n) : Yt(i, n);
|
|
38
|
+
for (var E = r.length - 1; E >= 0; E--)
|
|
39
|
+
h = Mr(d, n, l = {}, e[3], C), d && (h.static = f, h.private = c, u = h.access = { has: c ? (v) => Ir(i, v) : (v) => n in v }, d ^ 3 && (u.get = c ? (v) => (d ^ 1 ? g : B)(v, i, d ^ 4 ? s : y.get) : (v) => v[n]), d > 2 && (u.set = c ? (v, T) => A(v, i, T, d ^ 4 ? s : y.set) : (v, T) => v[n] = T)), a = (0, r[E])(d ? d < 4 ? c ? s : y[w] : d > 4 ? void 0 : { get: y.get, set: y.set } : i, h), l._ = 1, d ^ 4 || a === void 0 ? ue(a) && (d > 4 ? k.unshift(a) : d ? c ? s = a : y[w] = a : i = a) : typeof a != "object" || a === null ? ie("Object expected") : (ue(o = a.get) && (y.get = o), ue(o = a.set) && (y.set = o), ue(o = a.init) && k.unshift(o));
|
|
40
|
+
return d || j(e, i), y && st(i, n, y), c ? d ^ 4 ? s : y : i;
|
|
41
|
+
}, ot = (e, t, n) => t.has(e) || ie("Cannot " + n), Ir = (e, t) => Object(t) !== t ? ie('Cannot use the "in" operator on this value') : e.has(t), g = (e, t, n) => (ot(e, t, "read from private field"), n ? n.call(e) : t.get(e)), _ = (e, t, n) => t.has(e) ? ie("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), A = (e, t, n, r) => (ot(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), B = (e, t, n) => (ot(e, t, "access private method"), n), Ce = /* @__PURE__ */ new Map(), vn, mn, gn, yn, Ue, fe, F, at, re, bn, _n, wn, Sn, oe = class extends (Ue = Vt, yn = [W], gn = [Ne], mn = [Ne], vn = [Ne], Ue) {
|
|
42
|
+
constructor(e) {
|
|
43
|
+
super(e), b(F, 5, this), _(this, re), _(this, fe, /* @__PURE__ */ new Set()), _(this, at, b(F, 8, this, /* @__PURE__ */ new Set())), b(F, 11, this), this.registerEffect(B(this, re, bn));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Registers CSS rules to be injected into the active drag operation's
|
|
47
|
+
* document and shadow roots. The StyleSheetManager handles tracking
|
|
48
|
+
* which roots need the styles and cleaning up when they're no longer needed.
|
|
49
|
+
*
|
|
50
|
+
* Returns a cleanup function that unregisters the rules.
|
|
51
|
+
*/
|
|
52
|
+
register(e) {
|
|
53
|
+
return g(this, fe).add(e), () => {
|
|
54
|
+
g(this, fe).delete(e);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Adds an additional root to track for style injection.
|
|
59
|
+
* Returns a cleanup function that removes the root.
|
|
60
|
+
*/
|
|
61
|
+
addRoot(e) {
|
|
62
|
+
return P(() => {
|
|
63
|
+
const t = new Set(this.additionalRoots);
|
|
64
|
+
t.add(e), this.additionalRoots = t;
|
|
65
|
+
}), () => {
|
|
66
|
+
P(() => {
|
|
67
|
+
const t = new Set(this.additionalRoots);
|
|
68
|
+
t.delete(e), this.additionalRoots = t;
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
get sourceRoot() {
|
|
73
|
+
var e;
|
|
74
|
+
const { source: t } = this.manager.dragOperation;
|
|
75
|
+
return Oe((e = t == null ? void 0 : t.element) != null ? e : null);
|
|
76
|
+
}
|
|
77
|
+
get targetRoot() {
|
|
78
|
+
var e;
|
|
79
|
+
const { target: t } = this.manager.dragOperation;
|
|
80
|
+
return Oe((e = t == null ? void 0 : t.element) != null ? e : null);
|
|
81
|
+
}
|
|
82
|
+
get roots() {
|
|
83
|
+
const { status: e } = this.manager.dragOperation;
|
|
84
|
+
if (e.initializing || e.initialized) {
|
|
85
|
+
const t = [this.sourceRoot, this.targetRoot].filter(
|
|
86
|
+
(n) => n != null
|
|
87
|
+
);
|
|
88
|
+
return /* @__PURE__ */ new Set([...t, ...this.additionalRoots]);
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ new Set();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
F = se(Ue);
|
|
94
|
+
fe = /* @__PURE__ */ new WeakMap();
|
|
95
|
+
at = /* @__PURE__ */ new WeakMap();
|
|
96
|
+
re = /* @__PURE__ */ new WeakSet();
|
|
97
|
+
bn = function() {
|
|
98
|
+
const { roots: e } = this, t = [];
|
|
99
|
+
for (const n of e)
|
|
100
|
+
for (const r of g(this, fe))
|
|
101
|
+
t.push(B(this, re, _n).call(this, n, r));
|
|
102
|
+
return () => {
|
|
103
|
+
for (const n of t)
|
|
104
|
+
n();
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
_n = function(e, t) {
|
|
108
|
+
let n = Ce.get(e);
|
|
109
|
+
n || (n = /* @__PURE__ */ new Map(), Ce.set(e, n));
|
|
110
|
+
let r = n.get(t);
|
|
111
|
+
if (!r) {
|
|
112
|
+
const s = vr(e) ? B(this, re, wn).call(this, e, n, t) : B(this, re, Sn).call(this, e, n, t);
|
|
113
|
+
if (!s)
|
|
114
|
+
return () => {
|
|
115
|
+
};
|
|
116
|
+
r = s, n.set(t, r);
|
|
117
|
+
}
|
|
118
|
+
r.refCount++;
|
|
119
|
+
let i = !1;
|
|
120
|
+
return () => {
|
|
121
|
+
i || (i = !0, r.refCount--, r.refCount === 0 && r.cleanup());
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
wn = function(e, t, n) {
|
|
125
|
+
const r = e.createElement("style");
|
|
126
|
+
r.textContent = n, e.head.prepend(r);
|
|
127
|
+
const i = new MutationObserver((s) => {
|
|
128
|
+
for (const o of s)
|
|
129
|
+
for (const a of Array.from(o.removedNodes))
|
|
130
|
+
if (a === r) {
|
|
131
|
+
e.head.prepend(r);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
return i.observe(e.head, { childList: !0 }), {
|
|
136
|
+
refCount: 0,
|
|
137
|
+
cleanup: () => {
|
|
138
|
+
i.disconnect(), r.remove(), t.delete(n), t.size === 0 && Ce.delete(e);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
Sn = function(e, t, n) {
|
|
143
|
+
!("adoptedStyleSheets" in e && Array.isArray(e.adoptedStyleSheets)) && process.env.NODE_ENV !== "production" && console.error(
|
|
144
|
+
"Cannot inject styles: This browser doesn't support adoptedStyleSheets"
|
|
145
|
+
);
|
|
146
|
+
const r = e.ownerDocument.defaultView, { CSSStyleSheet: i } = r ?? {};
|
|
147
|
+
if (!i)
|
|
148
|
+
return process.env.NODE_ENV !== "production" && console.error(
|
|
149
|
+
"Cannot inject styles: CSSStyleSheet constructor not available"
|
|
150
|
+
), null;
|
|
151
|
+
const s = new i();
|
|
152
|
+
return s.replaceSync(n), e.adoptedStyleSheets.push(s), {
|
|
153
|
+
refCount: 0,
|
|
154
|
+
cleanup: () => {
|
|
155
|
+
var o;
|
|
156
|
+
if (mr(e) && ((o = e.host) != null && o.isConnected)) {
|
|
157
|
+
const a = e.adoptedStyleSheets.indexOf(s);
|
|
158
|
+
a !== -1 && e.adoptedStyleSheets.splice(a, 1);
|
|
159
|
+
}
|
|
160
|
+
t.delete(n), t.size === 0 && Ce.delete(e);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
D(F, 4, "additionalRoots", yn, oe, at);
|
|
165
|
+
D(F, 2, "sourceRoot", gn, oe);
|
|
166
|
+
D(F, 2, "targetRoot", mn, oe);
|
|
167
|
+
D(F, 2, "roots", vn, oe);
|
|
168
|
+
j(F, oe);
|
|
169
|
+
var be = "data-dnd-", Be = `${be}dropping`, x = "--dnd-", R = `${be}dragging`, Te = `${be}placeholder`, $r = [
|
|
170
|
+
R,
|
|
171
|
+
Te,
|
|
172
|
+
"popover",
|
|
173
|
+
"aria-pressed",
|
|
174
|
+
"aria-grabbing"
|
|
175
|
+
], Rr = ["view-transition-name"], Wr = `
|
|
176
|
+
:is(:root,:host) [${R}] {
|
|
177
|
+
position: fixed !important;
|
|
178
|
+
pointer-events: none !important;
|
|
179
|
+
touch-action: none;
|
|
180
|
+
z-index: calc(infinity);
|
|
181
|
+
will-change: translate;
|
|
182
|
+
top: var(${x}top, 0px) !important;
|
|
183
|
+
left: var(${x}left, 0px) !important;
|
|
184
|
+
right: unset !important;
|
|
185
|
+
bottom: unset !important;
|
|
186
|
+
width: var(${x}width, auto);
|
|
187
|
+
max-width: var(${x}width, auto);
|
|
188
|
+
height: var(${x}height, auto);
|
|
189
|
+
max-height: var(${x}height, auto);
|
|
190
|
+
transition: var(${x}transition) !important;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:is(:root,:host) [${Te}] {
|
|
194
|
+
transition: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:is(:root,:host) [${Te}='hidden'] {
|
|
198
|
+
visibility: hidden;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[${R}] * {
|
|
202
|
+
pointer-events: none !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
[${R}]:not([${Be}]) {
|
|
206
|
+
translate: var(${x}translate) !important;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
[${R}][style*='${x}scale'] {
|
|
210
|
+
scale: var(${x}scale) !important;
|
|
211
|
+
transform-origin: var(${x}transform-origin) !important;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@layer dnd-kit {
|
|
215
|
+
:where([${R}][popover]) {
|
|
216
|
+
overflow: visible;
|
|
217
|
+
background: unset;
|
|
218
|
+
border: unset;
|
|
219
|
+
margin: unset;
|
|
220
|
+
padding: unset;
|
|
221
|
+
color: inherit;
|
|
222
|
+
|
|
223
|
+
&:is(input, button) {
|
|
224
|
+
border: revert;
|
|
225
|
+
background: revert;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
[${R}]::backdrop, [${be}overlay]:not([${R}]) {
|
|
230
|
+
display: none;
|
|
231
|
+
visibility: hidden;
|
|
232
|
+
}
|
|
233
|
+
`.replace(/\n+/g, " ").replace(/\s+/g, " ").trim();
|
|
234
|
+
function Lr(e, t = "hidden") {
|
|
235
|
+
return P(() => {
|
|
236
|
+
const { element: n, manager: r } = e;
|
|
237
|
+
if (!n || !r) return;
|
|
238
|
+
const i = Fr(
|
|
239
|
+
n,
|
|
240
|
+
r.registry.droppables
|
|
241
|
+
), s = [], o = br(n), { remove: a } = o;
|
|
242
|
+
return zr(i, o, s), Nr(o, t), o.remove = () => {
|
|
243
|
+
s.forEach((l) => l()), a.call(o);
|
|
244
|
+
}, o;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function Fr(e, t) {
|
|
248
|
+
const n = /* @__PURE__ */ new Map();
|
|
249
|
+
for (const r of t)
|
|
250
|
+
if (r.element && (e === r.element || e.contains(r.element))) {
|
|
251
|
+
const i = `${be}${_r("dom-id")}`;
|
|
252
|
+
r.element.setAttribute(i, ""), n.set(r, i);
|
|
253
|
+
}
|
|
254
|
+
return n;
|
|
255
|
+
}
|
|
256
|
+
function zr(e, t, n) {
|
|
257
|
+
for (const [r, i] of e) {
|
|
258
|
+
if (!r.element) continue;
|
|
259
|
+
const s = `[${i}]`, o = t.matches(s) ? t : t.querySelector(s);
|
|
260
|
+
if (r.element.removeAttribute(i), !o) continue;
|
|
261
|
+
const a = r.element;
|
|
262
|
+
r.proxy = o, o.removeAttribute(i), Kt.set(a, o), n.push(() => {
|
|
263
|
+
Kt.delete(a), r.proxy = void 0;
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function Nr(e, t = "hidden") {
|
|
268
|
+
e.setAttribute("inert", "true"), e.setAttribute("tab-index", "-1"), e.setAttribute("aria-hidden", "true"), e.setAttribute(Te, t);
|
|
269
|
+
}
|
|
270
|
+
function En(e, t) {
|
|
271
|
+
return e === t ? !0 : zt(e) === zt(t);
|
|
272
|
+
}
|
|
273
|
+
function Ut(e) {
|
|
274
|
+
const { target: t } = e;
|
|
275
|
+
"newState" in e && e.newState === "closed" && te(t) && t.hasAttribute("popover") && requestAnimationFrame(() => ve(t));
|
|
276
|
+
}
|
|
277
|
+
function je(e) {
|
|
278
|
+
return e.tagName === "TR";
|
|
279
|
+
}
|
|
280
|
+
function Kr(e, t, n) {
|
|
281
|
+
const r = new MutationObserver((i) => {
|
|
282
|
+
let s = !1;
|
|
283
|
+
for (const o of i) {
|
|
284
|
+
if (o.target !== e) {
|
|
285
|
+
s = !0;
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
if (o.type !== "attributes")
|
|
289
|
+
continue;
|
|
290
|
+
const a = o.attributeName;
|
|
291
|
+
if (a.startsWith("aria-") || $r.includes(a))
|
|
292
|
+
continue;
|
|
293
|
+
const l = e.getAttribute(a);
|
|
294
|
+
if (a === "style") {
|
|
295
|
+
if (Nt(e) && Nt(t)) {
|
|
296
|
+
const h = e.style;
|
|
297
|
+
for (const u of Array.from(t.style))
|
|
298
|
+
h.getPropertyValue(u) === "" && t.style.removeProperty(u);
|
|
299
|
+
for (const u of Array.from(h)) {
|
|
300
|
+
if (Rr.includes(u) || u.startsWith(x))
|
|
301
|
+
continue;
|
|
302
|
+
const d = h.getPropertyValue(u);
|
|
303
|
+
t.style.setProperty(u, d);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
} else l !== null ? t.setAttribute(a, l) : t.removeAttribute(a);
|
|
307
|
+
}
|
|
308
|
+
s && n && (t.innerHTML = e.innerHTML);
|
|
309
|
+
});
|
|
310
|
+
return r.observe(e, {
|
|
311
|
+
attributes: !0,
|
|
312
|
+
subtree: !0,
|
|
313
|
+
childList: !0
|
|
314
|
+
}), r;
|
|
315
|
+
}
|
|
316
|
+
function Xr(e, t, n) {
|
|
317
|
+
const r = new MutationObserver((i) => {
|
|
318
|
+
for (const s of i)
|
|
319
|
+
if (s.addedNodes.length !== 0)
|
|
320
|
+
for (const o of Array.from(s.addedNodes)) {
|
|
321
|
+
if (o.contains(e) && e.nextElementSibling !== t) {
|
|
322
|
+
e.insertAdjacentElement("afterend", t), ve(n);
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
if (o.contains(t) && t.previousElementSibling !== e) {
|
|
326
|
+
t.insertAdjacentElement("beforebegin", e), ve(n);
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
return r.observe(e.ownerDocument.body, {
|
|
332
|
+
childList: !0,
|
|
333
|
+
subtree: !0
|
|
334
|
+
}), r;
|
|
335
|
+
}
|
|
336
|
+
function Yr(e) {
|
|
337
|
+
return new ResizeObserver(() => {
|
|
338
|
+
var t, n;
|
|
339
|
+
const r = new L(e.placeholder, {
|
|
340
|
+
frameTransform: e.frameTransform,
|
|
341
|
+
ignoreTransforms: !0
|
|
342
|
+
}), i = (t = e.transformOrigin) != null ? t : { x: 1, y: 1 }, s = (e.width - r.width) * i.x + e.delta.x, o = (e.height - r.height) * i.y + e.delta.y, a = nn();
|
|
343
|
+
if (e.styles.set(
|
|
344
|
+
{
|
|
345
|
+
width: r.width - e.widthOffset,
|
|
346
|
+
height: r.height - e.heightOffset,
|
|
347
|
+
top: e.top + o + a.y,
|
|
348
|
+
left: e.left + s + a.x
|
|
349
|
+
},
|
|
350
|
+
x
|
|
351
|
+
), (n = e.getElementMutationObserver()) == null || n.takeRecords(), je(e.element) && je(e.placeholder)) {
|
|
352
|
+
const l = Array.from(e.element.cells), h = Array.from(e.placeholder.cells);
|
|
353
|
+
e.getSavedCellWidths() || e.setSavedCellWidths(l.map((u) => u.style.width));
|
|
354
|
+
for (const [u, d] of l.entries()) {
|
|
355
|
+
const f = h[u];
|
|
356
|
+
d.style.width = `${f.getBoundingClientRect().width}px`;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
e.dragOperation.shape = new L(e.feedbackElement);
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
var Ur = 250, Br = "ease";
|
|
363
|
+
function jr(e) {
|
|
364
|
+
var t, n, r, i;
|
|
365
|
+
const { animation: s } = e;
|
|
366
|
+
if (typeof s == "function") {
|
|
367
|
+
const y = s({
|
|
368
|
+
element: e.element,
|
|
369
|
+
feedbackElement: e.feedbackElement,
|
|
370
|
+
placeholder: e.placeholder,
|
|
371
|
+
translate: e.translate,
|
|
372
|
+
moved: e.moved
|
|
373
|
+
});
|
|
374
|
+
Promise.resolve(y).then(() => {
|
|
375
|
+
e.cleanup(), requestAnimationFrame(e.restoreFocus);
|
|
376
|
+
});
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
const {
|
|
380
|
+
duration: o = Ur,
|
|
381
|
+
easing: a = Br
|
|
382
|
+
} = s ?? {};
|
|
383
|
+
ve(e.feedbackElement);
|
|
384
|
+
const [, l] = (t = wr(
|
|
385
|
+
e.feedbackElement,
|
|
386
|
+
(y) => "translate" in y
|
|
387
|
+
)) != null ? t : [];
|
|
388
|
+
l == null || l.pause();
|
|
389
|
+
const h = (n = e.placeholder) != null ? n : e.element, u = {
|
|
390
|
+
frameTransform: En(e.feedbackElement, h) ? null : void 0
|
|
391
|
+
}, d = new L(e.feedbackElement, u), f = (r = tn(en(e.feedbackElement).translate)) != null ? r : e.translate, c = new L(h, u), p = an.delta(d, c, e.alignment), w = {
|
|
392
|
+
x: f.x - p.x,
|
|
393
|
+
y: f.y - p.y
|
|
394
|
+
}, k = Math.round(d.intrinsicHeight) !== Math.round(c.intrinsicHeight) ? {
|
|
395
|
+
minHeight: [
|
|
396
|
+
`${d.intrinsicHeight}px`,
|
|
397
|
+
`${c.intrinsicHeight}px`
|
|
398
|
+
],
|
|
399
|
+
maxHeight: [
|
|
400
|
+
`${d.intrinsicHeight}px`,
|
|
401
|
+
`${c.intrinsicHeight}px`
|
|
402
|
+
]
|
|
403
|
+
} : {}, C = Math.round(d.intrinsicWidth) !== Math.round(c.intrinsicWidth) ? {
|
|
404
|
+
minWidth: [
|
|
405
|
+
`${d.intrinsicWidth}px`,
|
|
406
|
+
`${c.intrinsicWidth}px`
|
|
407
|
+
],
|
|
408
|
+
maxWidth: [
|
|
409
|
+
`${d.intrinsicWidth}px`,
|
|
410
|
+
`${c.intrinsicWidth}px`
|
|
411
|
+
]
|
|
412
|
+
} : {};
|
|
413
|
+
e.styles.set({ transition: e.transition }, x), e.feedbackElement.setAttribute(Be, ""), (i = e.getElementMutationObserver()) == null || i.takeRecords(), Sr({
|
|
414
|
+
element: e.feedbackElement,
|
|
415
|
+
keyframes: hn(De(De({}, k), C), {
|
|
416
|
+
translate: [
|
|
417
|
+
`${f.x}px ${f.y}px 0`,
|
|
418
|
+
`${w.x}px ${w.y}px 0`
|
|
419
|
+
]
|
|
420
|
+
}),
|
|
421
|
+
options: {
|
|
422
|
+
duration: sn(rn(e.feedbackElement)) ? 0 : e.moved || e.feedbackElement !== e.element ? o : 0,
|
|
423
|
+
easing: a
|
|
424
|
+
}
|
|
425
|
+
}).then(() => {
|
|
426
|
+
e.feedbackElement.removeAttribute(Be), l == null || l.finish(), e.cleanup(), requestAnimationFrame(e.restoreFocus);
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
var kn, He, me, lt, Ee, xn, On, Pe = class extends (He = nt, kn = [W], He) {
|
|
430
|
+
constructor(t, n) {
|
|
431
|
+
super(t, n), _(this, Ee), _(this, lt, b(me, 8, this)), b(me, 11, this), this.state = {
|
|
432
|
+
initial: {},
|
|
433
|
+
current: {}
|
|
434
|
+
};
|
|
435
|
+
const r = t.registry.plugins.get(
|
|
436
|
+
oe
|
|
437
|
+
), i = r == null ? void 0 : r.register(Wr);
|
|
438
|
+
if (i) {
|
|
439
|
+
const s = this.destroy.bind(this);
|
|
440
|
+
this.destroy = () => {
|
|
441
|
+
i(), s();
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
this.registerEffect(B(this, Ee, xn).bind(this, r)), this.registerEffect(B(this, Ee, On));
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
me = se(He);
|
|
448
|
+
lt = /* @__PURE__ */ new WeakMap();
|
|
449
|
+
Ee = /* @__PURE__ */ new WeakSet();
|
|
450
|
+
xn = function(e) {
|
|
451
|
+
const { overlay: t } = this;
|
|
452
|
+
if (!t || !e) return;
|
|
453
|
+
const n = Oe(t);
|
|
454
|
+
if (n)
|
|
455
|
+
return e.addRoot(n);
|
|
456
|
+
};
|
|
457
|
+
On = function() {
|
|
458
|
+
var e, t, n;
|
|
459
|
+
const { state: r, manager: i, options: s } = this, { dragOperation: o } = i, { position: a, source: l, status: h } = o;
|
|
460
|
+
if (h.idle) {
|
|
461
|
+
r.current = {}, r.initial = {};
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (!l) return;
|
|
465
|
+
const { element: u, feedback: d } = l;
|
|
466
|
+
if (!u || d === "none" || !h.initialized || h.initializing)
|
|
467
|
+
return;
|
|
468
|
+
const { initial: f } = r, c = (e = this.overlay) != null ? e : u, p = xe(c), w = xe(u), k = !En(u, c), C = new L(u, {
|
|
469
|
+
frameTransform: k ? w : null,
|
|
470
|
+
ignoreTransforms: !k
|
|
471
|
+
}), y = {
|
|
472
|
+
x: w.scaleX / p.scaleX,
|
|
473
|
+
y: w.scaleY / p.scaleY
|
|
474
|
+
};
|
|
475
|
+
let { width: E, height: v, top: T, left: ae } = C;
|
|
476
|
+
k && (E = E / y.x, v = v / y.y);
|
|
477
|
+
const le = new gr(c), {
|
|
478
|
+
transition: _e,
|
|
479
|
+
translate: yt,
|
|
480
|
+
boxSizing: Nn,
|
|
481
|
+
paddingBlockStart: Kn,
|
|
482
|
+
paddingBlockEnd: Xn,
|
|
483
|
+
paddingInlineStart: Yn,
|
|
484
|
+
paddingInlineEnd: Un,
|
|
485
|
+
borderInlineStartWidth: Bn,
|
|
486
|
+
borderInlineEndWidth: jn,
|
|
487
|
+
borderBlockStartWidth: Hn,
|
|
488
|
+
borderBlockEndWidth: qn
|
|
489
|
+
} = en(u), bt = d === "clone", _t = Nn === "content-box", wt = _t ? parseInt(Yn) + parseInt(Un) + parseInt(Bn) + parseInt(jn) : 0, St = _t ? parseInt(Kn) + parseInt(Xn) + parseInt(Hn) + parseInt(qn) : 0, O = d !== "move" && !this.overlay ? Lr(l, bt ? "clone" : "hidden") : null, $e = P(
|
|
490
|
+
() => rt(i.dragOperation.activatorEvent)
|
|
491
|
+
);
|
|
492
|
+
if (yt !== "none") {
|
|
493
|
+
const m = tn(yt);
|
|
494
|
+
m && !f.translate && (f.translate = m);
|
|
495
|
+
}
|
|
496
|
+
if (!f.transformOrigin) {
|
|
497
|
+
const m = P(() => a.current);
|
|
498
|
+
f.transformOrigin = {
|
|
499
|
+
x: (m.x - ae * p.scaleX - p.x) / (E * p.scaleX),
|
|
500
|
+
y: (m.y - T * p.scaleY - p.y) / (v * p.scaleY)
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
const { transformOrigin: H } = f, Et = T * p.scaleY + p.y, kt = ae * p.scaleX + p.x;
|
|
504
|
+
if (!f.coordinates && (f.coordinates = {
|
|
505
|
+
x: kt,
|
|
506
|
+
y: Et
|
|
507
|
+
}, y.x !== 1 || y.y !== 1)) {
|
|
508
|
+
const { scaleX: m, scaleY: S } = w, { x: $, y: q } = H;
|
|
509
|
+
f.coordinates.x += (E * m - E) * $, f.coordinates.y += (v * S - v) * q;
|
|
510
|
+
}
|
|
511
|
+
f.dimensions || (f.dimensions = { width: E, height: v }), f.frameTransform || (f.frameTransform = p);
|
|
512
|
+
const xt = {
|
|
513
|
+
x: f.coordinates.x - kt,
|
|
514
|
+
y: f.coordinates.y - Et
|
|
515
|
+
}, Ot = {
|
|
516
|
+
width: (f.dimensions.width * f.frameTransform.scaleX - E * p.scaleX) * H.x,
|
|
517
|
+
height: (f.dimensions.height * f.frameTransform.scaleY - v * p.scaleY) * H.y
|
|
518
|
+
}, Re = {
|
|
519
|
+
x: xt.x / p.scaleX + Ot.width,
|
|
520
|
+
y: xt.y / p.scaleY + Ot.height
|
|
521
|
+
}, At = {
|
|
522
|
+
left: ae + Re.x,
|
|
523
|
+
top: T + Re.y
|
|
524
|
+
};
|
|
525
|
+
c.setAttribute(R, "true");
|
|
526
|
+
const Dt = P(() => o.transform), Ct = (t = f.translate) != null ? t : { x: 0, y: 0 }, Vn = Dt.x * p.scaleX + Ct.x, Gn = Dt.y * p.scaleY + Ct.y, Tt = nn();
|
|
527
|
+
le.set(
|
|
528
|
+
{
|
|
529
|
+
width: E - wt,
|
|
530
|
+
height: v - St,
|
|
531
|
+
top: At.top + Tt.y,
|
|
532
|
+
left: At.left + Tt.x,
|
|
533
|
+
translate: `${Vn}px ${Gn}px 0`,
|
|
534
|
+
transition: _e ? `${_e}, translate 0ms linear` : "",
|
|
535
|
+
scale: k ? `${y.x} ${y.y}` : "",
|
|
536
|
+
"transform-origin": `${H.x * 100}% ${H.y * 100}%`
|
|
537
|
+
},
|
|
538
|
+
x
|
|
539
|
+
), O && (u.insertAdjacentElement("afterend", O), s != null && s.rootElement && (typeof s.rootElement == "function" ? s.rootElement(l) : s.rootElement).appendChild(u)), Ft(c) && (c.hasAttribute("popover") || c.setAttribute("popover", "manual"), ve(c), c.addEventListener("beforetoggle", Ut));
|
|
540
|
+
let X, We, we;
|
|
541
|
+
const Pt = Yr({
|
|
542
|
+
placeholder: O,
|
|
543
|
+
element: u,
|
|
544
|
+
feedbackElement: c,
|
|
545
|
+
frameTransform: p,
|
|
546
|
+
transformOrigin: H,
|
|
547
|
+
width: E,
|
|
548
|
+
height: v,
|
|
549
|
+
top: T,
|
|
550
|
+
left: ae,
|
|
551
|
+
widthOffset: wt,
|
|
552
|
+
heightOffset: St,
|
|
553
|
+
delta: Re,
|
|
554
|
+
styles: le,
|
|
555
|
+
dragOperation: o,
|
|
556
|
+
getElementMutationObserver: () => X,
|
|
557
|
+
getSavedCellWidths: () => we,
|
|
558
|
+
setSavedCellWidths: (m) => {
|
|
559
|
+
we = m;
|
|
560
|
+
}
|
|
561
|
+
}), Mt = new L(c);
|
|
562
|
+
P(() => o.shape = Mt);
|
|
563
|
+
const Le = rn(c), It = (m) => {
|
|
564
|
+
this.manager.actions.stop({ event: m });
|
|
565
|
+
}, Jn = sn(Le);
|
|
566
|
+
$e && Le.addEventListener("resize", It), P(() => l.status) === "idle" && requestAnimationFrame(() => l.status = "dragging"), O && (Pt.observe(O), X = Kr(
|
|
567
|
+
u,
|
|
568
|
+
O,
|
|
569
|
+
bt
|
|
570
|
+
), We = Xr(
|
|
571
|
+
u,
|
|
572
|
+
O,
|
|
573
|
+
c
|
|
574
|
+
));
|
|
575
|
+
const $t = (n = i.dragOperation.source) == null ? void 0 : n.id, Qn = () => {
|
|
576
|
+
var m;
|
|
577
|
+
if (!$e || $t == null) return;
|
|
578
|
+
const S = i.registry.draggables.get($t), $ = (m = S == null ? void 0 : S.handle) != null ? m : S == null ? void 0 : S.element;
|
|
579
|
+
Qt($) && $.focus();
|
|
580
|
+
}, Fe = () => {
|
|
581
|
+
var m;
|
|
582
|
+
if (X == null || X.disconnect(), We == null || We.disconnect(), Pt.disconnect(), Le.removeEventListener("resize", It), Ft(c) && (c.removeEventListener(
|
|
583
|
+
"beforetoggle",
|
|
584
|
+
Ut
|
|
585
|
+
), c.removeAttribute("popover")), c.removeAttribute(R), le.reset(), we && je(u)) {
|
|
586
|
+
const $ = Array.from(u.cells);
|
|
587
|
+
for (const [q, V] of $.entries())
|
|
588
|
+
V.style.width = (m = we[q]) != null ? m : "";
|
|
589
|
+
}
|
|
590
|
+
l.status = "idle";
|
|
591
|
+
const S = r.current.translate != null;
|
|
592
|
+
O && (S || O.parentElement !== c.parentElement) && c.isConnected && O.replaceWith(c), O == null || O.remove();
|
|
593
|
+
}, Zn = s == null ? void 0 : s.dropAnimation, Rt = this, er = kr(
|
|
594
|
+
// Update transform on move
|
|
595
|
+
() => {
|
|
596
|
+
var m;
|
|
597
|
+
const { transform: S, status: $ } = o;
|
|
598
|
+
if (!(!S.x && !S.y && !r.current.translate) && $.dragging) {
|
|
599
|
+
const q = (m = f.translate) != null ? m : { x: 0, y: 0 }, V = {
|
|
600
|
+
x: S.x / p.scaleX + q.x,
|
|
601
|
+
y: S.y / p.scaleY + q.y
|
|
602
|
+
}, Wt = r.current.translate, tr = P(() => o.modifiers), ze = P(() => {
|
|
603
|
+
var ce;
|
|
604
|
+
return (ce = o.shape) == null ? void 0 : ce.current;
|
|
605
|
+
}), nr = $e && !Jn ? "250ms cubic-bezier(0.25, 1, 0.5, 1)" : "0ms linear";
|
|
606
|
+
if (le.set(
|
|
607
|
+
{
|
|
608
|
+
transition: `${_e}, translate ${nr}`,
|
|
609
|
+
translate: `${V.x}px ${V.y}px 0`
|
|
610
|
+
},
|
|
611
|
+
x
|
|
612
|
+
), X == null || X.takeRecords(), ze && ze !== Mt && Wt && !tr.length) {
|
|
613
|
+
const ce = xr.delta(V, Wt);
|
|
614
|
+
o.shape = an.from(
|
|
615
|
+
ze.boundingRectangle
|
|
616
|
+
).translate(
|
|
617
|
+
ce.x * p.scaleX,
|
|
618
|
+
ce.y * p.scaleY
|
|
619
|
+
);
|
|
620
|
+
} else
|
|
621
|
+
o.shape = new L(c);
|
|
622
|
+
r.current.translate = V;
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
// Drop animation
|
|
626
|
+
function() {
|
|
627
|
+
if (o.status.dropped) {
|
|
628
|
+
this.dispose(), l.status = "dropping";
|
|
629
|
+
const m = Rt.dropAnimation !== void 0 ? Rt.dropAnimation : Zn;
|
|
630
|
+
let S = r.current.translate;
|
|
631
|
+
const $ = S != null;
|
|
632
|
+
if (!S && u !== c && (S = { x: 0, y: 0 }), !S || m === null) {
|
|
633
|
+
Fe();
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
i.renderer.rendering.then(() => {
|
|
637
|
+
jr({
|
|
638
|
+
element: u,
|
|
639
|
+
feedbackElement: c,
|
|
640
|
+
placeholder: O,
|
|
641
|
+
translate: S,
|
|
642
|
+
moved: $,
|
|
643
|
+
transition: _e,
|
|
644
|
+
alignment: l.alignment,
|
|
645
|
+
styles: le,
|
|
646
|
+
animation: m ?? void 0,
|
|
647
|
+
getElementMutationObserver: () => X,
|
|
648
|
+
cleanup: Fe,
|
|
649
|
+
restoreFocus: Qn
|
|
650
|
+
});
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
);
|
|
655
|
+
return () => {
|
|
656
|
+
Fe(), er();
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
D(me, 4, "overlay", kn, Pe, lt);
|
|
660
|
+
j(me, Pe);
|
|
661
|
+
Pe.configure = tt(Pe);
|
|
662
|
+
var de = !0, Hr = !1, An, Dn, Cn, Tn, N, ct, dt;
|
|
663
|
+
Tn = (Cn = [W], I.Forward), Dn = (An = [W], I.Reverse);
|
|
664
|
+
var ge = class {
|
|
665
|
+
constructor() {
|
|
666
|
+
_(this, ct, b(N, 8, this, de)), b(N, 11, this), _(this, dt, b(N, 12, this, de)), b(N, 15, this);
|
|
667
|
+
}
|
|
668
|
+
isLocked(e) {
|
|
669
|
+
return e === I.Idle ? !1 : e == null ? this[I.Forward] === de && this[I.Reverse] === de : this[e] === de;
|
|
670
|
+
}
|
|
671
|
+
unlock(e) {
|
|
672
|
+
e !== I.Idle && (this[e] = Hr);
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
N = se(null);
|
|
676
|
+
ct = /* @__PURE__ */ new WeakMap();
|
|
677
|
+
dt = /* @__PURE__ */ new WeakMap();
|
|
678
|
+
D(N, 4, Tn, Cn, ge, ct);
|
|
679
|
+
D(N, 4, Dn, An, ge, dt);
|
|
680
|
+
j(N, ge);
|
|
681
|
+
var qr = [I.Forward, I.Reverse], Bt = class {
|
|
682
|
+
constructor() {
|
|
683
|
+
this.x = new ge(), this.y = new ge();
|
|
684
|
+
}
|
|
685
|
+
isLocked() {
|
|
686
|
+
return this.x.isLocked() && this.y.isLocked();
|
|
687
|
+
}
|
|
688
|
+
}, Vr = class extends nt {
|
|
689
|
+
constructor(e) {
|
|
690
|
+
super(e);
|
|
691
|
+
const t = ln(new Bt());
|
|
692
|
+
let n = null;
|
|
693
|
+
this.signal = t, Me(() => {
|
|
694
|
+
const { status: r } = e.dragOperation;
|
|
695
|
+
if (!r.initialized) {
|
|
696
|
+
n = null, t.value = new Bt();
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
const { delta: i } = e.dragOperation.position;
|
|
700
|
+
if (n) {
|
|
701
|
+
const s = {
|
|
702
|
+
x: jt(i.x, n.x),
|
|
703
|
+
y: jt(i.y, n.y)
|
|
704
|
+
}, o = t.peek();
|
|
705
|
+
Ar(() => {
|
|
706
|
+
for (const a of on)
|
|
707
|
+
for (const l of qr)
|
|
708
|
+
s[a] === l && o[a].unlock(l);
|
|
709
|
+
t.value = o;
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
n = i;
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
get current() {
|
|
716
|
+
return this.signal.peek();
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
function jt(e, t) {
|
|
720
|
+
return Math.sign(e - t);
|
|
721
|
+
}
|
|
722
|
+
var Pn, qe, ye, ut, z, Ve, ht = class extends (qe = Vt, Pn = [W], qe) {
|
|
723
|
+
constructor(e) {
|
|
724
|
+
super(e), _(this, ut, b(ye, 8, this, !1)), b(ye, 11, this), _(this, z), _(this, Ve, () => {
|
|
725
|
+
if (!g(this, z))
|
|
726
|
+
return;
|
|
727
|
+
const { element: s, by: o } = g(this, z);
|
|
728
|
+
o.y && (s.scrollTop += o.y), o.x && (s.scrollLeft += o.x);
|
|
729
|
+
}), this.scroll = (s) => {
|
|
730
|
+
var o;
|
|
731
|
+
if (this.disabled)
|
|
732
|
+
return !1;
|
|
733
|
+
const a = this.getScrollableElements();
|
|
734
|
+
if (!a)
|
|
735
|
+
return A(this, z, void 0), !1;
|
|
736
|
+
const { position: l } = this.manager.dragOperation, h = l == null ? void 0 : l.current;
|
|
737
|
+
if (h) {
|
|
738
|
+
const { by: u } = s ?? {}, d = u ? {
|
|
739
|
+
x: Ht(u.x),
|
|
740
|
+
y: Ht(u.y)
|
|
741
|
+
} : void 0, f = d ? void 0 : this.scrollIntentTracker.current;
|
|
742
|
+
if (f != null && f.isLocked())
|
|
743
|
+
return !1;
|
|
744
|
+
for (const c of a) {
|
|
745
|
+
const p = fr(c, u);
|
|
746
|
+
if (p.x || p.y) {
|
|
747
|
+
const { speed: w, direction: k } = pr(
|
|
748
|
+
c,
|
|
749
|
+
h,
|
|
750
|
+
d
|
|
751
|
+
);
|
|
752
|
+
if (f)
|
|
753
|
+
for (const C of on)
|
|
754
|
+
f[C].isLocked(k[C]) && (w[C] = 0, k[C] = 0);
|
|
755
|
+
if (k.x || k.y) {
|
|
756
|
+
const { x: C, y } = u ?? k, E = C * w.x, v = y * w.y;
|
|
757
|
+
if (E || v) {
|
|
758
|
+
const T = (o = g(this, z)) == null ? void 0 : o.by;
|
|
759
|
+
if (this.autoScrolling && T && (T.x && !E || T.y && !v))
|
|
760
|
+
continue;
|
|
761
|
+
return A(this, z, {
|
|
762
|
+
element: c,
|
|
763
|
+
by: {
|
|
764
|
+
x: E,
|
|
765
|
+
y: v
|
|
766
|
+
}
|
|
767
|
+
}), Zt.schedule(g(this, Ve)), !0;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return A(this, z, void 0), !1;
|
|
774
|
+
};
|
|
775
|
+
let t = null, n = null;
|
|
776
|
+
const r = Xt(() => {
|
|
777
|
+
const { position: s, source: o } = e.dragOperation;
|
|
778
|
+
if (!s)
|
|
779
|
+
return null;
|
|
780
|
+
const a = yr(
|
|
781
|
+
Oe(o == null ? void 0 : o.element),
|
|
782
|
+
s.current
|
|
783
|
+
);
|
|
784
|
+
return a && (t = a), a ?? t;
|
|
785
|
+
}), i = Xt(() => {
|
|
786
|
+
const s = r.value, { documentElement: o } = it(s);
|
|
787
|
+
if (!s || s === o) {
|
|
788
|
+
const { target: a } = e.dragOperation, l = a == null ? void 0 : a.element;
|
|
789
|
+
if (l) {
|
|
790
|
+
const h = Lt(l, {
|
|
791
|
+
excludeElement: !1
|
|
792
|
+
});
|
|
793
|
+
return n = h, h;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
if (s) {
|
|
797
|
+
const a = Lt(s, {
|
|
798
|
+
excludeElement: !1
|
|
799
|
+
});
|
|
800
|
+
return this.autoScrolling && n && a.size < (n == null ? void 0 : n.size) ? n : (n = a, a);
|
|
801
|
+
}
|
|
802
|
+
return n = null, null;
|
|
803
|
+
}, Er);
|
|
804
|
+
this.getScrollableElements = () => i.value, this.scrollIntentTracker = new Vr(e), this.destroy = e.monitor.addEventListener("dragmove", (s) => {
|
|
805
|
+
this.disabled || s.defaultPrevented || !rt(e.dragOperation.activatorEvent) || !s.by || this.scroll({ by: s.by }) && s.preventDefault();
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
ye = se(qe);
|
|
810
|
+
ut = /* @__PURE__ */ new WeakMap();
|
|
811
|
+
z = /* @__PURE__ */ new WeakMap();
|
|
812
|
+
Ve = /* @__PURE__ */ new WeakMap();
|
|
813
|
+
D(ye, 4, "autoScrolling", Pn, ht, ut);
|
|
814
|
+
j(ye, ht);
|
|
815
|
+
function Ht(e) {
|
|
816
|
+
return e > 0 ? I.Forward : e < 0 ? I.Reverse : I.Idle;
|
|
817
|
+
}
|
|
818
|
+
var Gr = class {
|
|
819
|
+
constructor(e) {
|
|
820
|
+
this.scheduler = e, this.pending = !1, this.tasks = /* @__PURE__ */ new Set(), this.resolvers = /* @__PURE__ */ new Set(), this.flush = () => {
|
|
821
|
+
const { tasks: t, resolvers: n } = this;
|
|
822
|
+
this.pending = !1, this.tasks = /* @__PURE__ */ new Set(), this.resolvers = /* @__PURE__ */ new Set();
|
|
823
|
+
for (const r of t)
|
|
824
|
+
r();
|
|
825
|
+
for (const r of n)
|
|
826
|
+
r();
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
schedule(e) {
|
|
830
|
+
return this.tasks.add(e), this.pending || (this.pending = !0, this.scheduler(this.flush)), new Promise((t) => this.resolvers.add(t));
|
|
831
|
+
}
|
|
832
|
+
}, Jr = new Gr((e) => {
|
|
833
|
+
typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : e();
|
|
834
|
+
}), Qr = 10, Zr = class extends nt {
|
|
835
|
+
constructor(e, t) {
|
|
836
|
+
super(e);
|
|
837
|
+
const n = e.registry.plugins.get(ht);
|
|
838
|
+
if (!n)
|
|
839
|
+
throw new Error("AutoScroller plugin depends on Scroller plugin");
|
|
840
|
+
this.destroy = Me(() => {
|
|
841
|
+
if (this.disabled)
|
|
842
|
+
return;
|
|
843
|
+
const { position: r, status: i } = e.dragOperation;
|
|
844
|
+
if (i.dragging)
|
|
845
|
+
if (n.scroll()) {
|
|
846
|
+
n.autoScrolling = !0;
|
|
847
|
+
const o = setInterval(
|
|
848
|
+
() => Jr.schedule(n.scroll),
|
|
849
|
+
Qr
|
|
850
|
+
);
|
|
851
|
+
return () => {
|
|
852
|
+
clearInterval(o);
|
|
853
|
+
};
|
|
854
|
+
} else
|
|
855
|
+
n.autoScrolling = !1;
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
}, he = Object.freeze({
|
|
859
|
+
offset: 10,
|
|
860
|
+
keyboardCodes: {
|
|
861
|
+
start: ["Space", "Enter"],
|
|
862
|
+
cancel: ["Escape"],
|
|
863
|
+
end: ["Space", "Enter", "Tab"],
|
|
864
|
+
up: ["ArrowUp"],
|
|
865
|
+
down: ["ArrowDown"],
|
|
866
|
+
left: ["ArrowLeft"],
|
|
867
|
+
right: ["ArrowRight"]
|
|
868
|
+
},
|
|
869
|
+
preventActivation(e, t) {
|
|
870
|
+
var n;
|
|
871
|
+
const r = (n = t.handle) != null ? n : t.element;
|
|
872
|
+
return e.target !== r;
|
|
873
|
+
}
|
|
874
|
+
}), J, Ge = class extends ke {
|
|
875
|
+
constructor(t, n) {
|
|
876
|
+
super(t), this.manager = t, this.options = n, _(this, J, []), this.listeners = new Jt(), this.handleSourceKeyDown = (r, i, s) => {
|
|
877
|
+
if (this.disabled || r.defaultPrevented || !te(r.target) || i.disabled)
|
|
878
|
+
return;
|
|
879
|
+
const {
|
|
880
|
+
keyboardCodes: o = he.keyboardCodes,
|
|
881
|
+
preventActivation: a = he.preventActivation
|
|
882
|
+
} = s ?? {};
|
|
883
|
+
o.start.includes(r.code) && this.manager.dragOperation.status.idle && (a != null && a(r, i) || this.handleStart(r, i, s));
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
bind(t, n = this.options) {
|
|
887
|
+
return Me(() => {
|
|
888
|
+
var i;
|
|
889
|
+
const s = (i = t.handle) != null ? i : t.element, o = (a) => {
|
|
890
|
+
rt(a) && this.handleSourceKeyDown(a, t, n);
|
|
891
|
+
};
|
|
892
|
+
if (s)
|
|
893
|
+
return s.addEventListener("keydown", o), () => {
|
|
894
|
+
s.removeEventListener("keydown", o);
|
|
895
|
+
};
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
handleStart(t, n, r) {
|
|
899
|
+
const { element: i } = n;
|
|
900
|
+
if (!i)
|
|
901
|
+
throw new Error("Source draggable does not have an associated element");
|
|
902
|
+
t.preventDefault(), t.stopImmediatePropagation(), lr(i);
|
|
903
|
+
const { center: s } = new L(i);
|
|
904
|
+
if (this.manager.actions.start({
|
|
905
|
+
event: t,
|
|
906
|
+
coordinates: {
|
|
907
|
+
x: s.x,
|
|
908
|
+
y: s.y
|
|
909
|
+
},
|
|
910
|
+
source: n
|
|
911
|
+
}).signal.aborted) return this.cleanup();
|
|
912
|
+
this.sideEffects();
|
|
913
|
+
const a = it(i), l = [
|
|
914
|
+
this.listeners.bind(a, [
|
|
915
|
+
{
|
|
916
|
+
type: "keydown",
|
|
917
|
+
listener: (h) => this.handleKeyDown(h, n, r),
|
|
918
|
+
options: { capture: !0 }
|
|
919
|
+
}
|
|
920
|
+
])
|
|
921
|
+
];
|
|
922
|
+
g(this, J).push(...l);
|
|
923
|
+
}
|
|
924
|
+
handleKeyDown(t, n, r) {
|
|
925
|
+
const { keyboardCodes: i = he.keyboardCodes } = r ?? {};
|
|
926
|
+
if (G(t, [...i.end, ...i.cancel])) {
|
|
927
|
+
t.preventDefault();
|
|
928
|
+
const s = G(t, i.cancel);
|
|
929
|
+
this.handleEnd(t, s);
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
G(t, i.up) ? this.handleMove("up", t) : G(t, i.down) && this.handleMove("down", t), G(t, i.left) ? this.handleMove("left", t) : G(t, i.right) && this.handleMove("right", t);
|
|
933
|
+
}
|
|
934
|
+
handleEnd(t, n) {
|
|
935
|
+
this.manager.actions.stop({
|
|
936
|
+
event: t,
|
|
937
|
+
canceled: n
|
|
938
|
+
}), this.cleanup();
|
|
939
|
+
}
|
|
940
|
+
handleMove(t, n) {
|
|
941
|
+
var r, i;
|
|
942
|
+
const { shape: s } = this.manager.dragOperation, o = n.shiftKey ? 5 : 1;
|
|
943
|
+
let a = {
|
|
944
|
+
x: 0,
|
|
945
|
+
y: 0
|
|
946
|
+
}, l = (i = (r = this.options) == null ? void 0 : r.offset) != null ? i : he.offset;
|
|
947
|
+
if (typeof l == "number" && (l = { x: l, y: l }), !!s) {
|
|
948
|
+
switch (t) {
|
|
949
|
+
case "up":
|
|
950
|
+
a = { x: 0, y: -l.y * o };
|
|
951
|
+
break;
|
|
952
|
+
case "down":
|
|
953
|
+
a = { x: 0, y: l.y * o };
|
|
954
|
+
break;
|
|
955
|
+
case "left":
|
|
956
|
+
a = { x: -l.x * o, y: 0 };
|
|
957
|
+
break;
|
|
958
|
+
case "right":
|
|
959
|
+
a = { x: l.x * o, y: 0 };
|
|
960
|
+
break;
|
|
961
|
+
}
|
|
962
|
+
(a.x || a.y) && (n.preventDefault(), this.manager.actions.move({
|
|
963
|
+
event: n,
|
|
964
|
+
by: a
|
|
965
|
+
}));
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
sideEffects() {
|
|
969
|
+
const t = this.manager.registry.plugins.get(Zr);
|
|
970
|
+
(t == null ? void 0 : t.disabled) === !1 && (t.disable(), g(this, J).push(() => {
|
|
971
|
+
t.enable();
|
|
972
|
+
}));
|
|
973
|
+
}
|
|
974
|
+
cleanup() {
|
|
975
|
+
g(this, J).forEach((t) => t()), A(this, J, []);
|
|
976
|
+
}
|
|
977
|
+
destroy() {
|
|
978
|
+
this.cleanup(), this.listeners.clear();
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
J = /* @__PURE__ */ new WeakMap();
|
|
982
|
+
Ge.configure = tt(Ge);
|
|
983
|
+
Ge.defaults = he;
|
|
984
|
+
function G(e, t) {
|
|
985
|
+
return t.includes(e.code);
|
|
986
|
+
}
|
|
987
|
+
var Y, ei = class extends Gt {
|
|
988
|
+
constructor() {
|
|
989
|
+
super(...arguments), _(this, Y);
|
|
990
|
+
}
|
|
991
|
+
onEvent(e) {
|
|
992
|
+
switch (e.type) {
|
|
993
|
+
case "pointerdown":
|
|
994
|
+
A(this, Y, ne(e));
|
|
995
|
+
break;
|
|
996
|
+
case "pointermove":
|
|
997
|
+
if (!g(this, Y)) return;
|
|
998
|
+
const { x: t, y: n } = ne(e), r = {
|
|
999
|
+
x: t - g(this, Y).x,
|
|
1000
|
+
y: n - g(this, Y).y
|
|
1001
|
+
}, { tolerance: i } = this.options;
|
|
1002
|
+
if (i && Xe(r, i)) {
|
|
1003
|
+
this.abort();
|
|
1004
|
+
return;
|
|
1005
|
+
}
|
|
1006
|
+
Xe(r, this.options.value) && this.activate(e);
|
|
1007
|
+
break;
|
|
1008
|
+
case "pointerup":
|
|
1009
|
+
this.abort();
|
|
1010
|
+
break;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
abort() {
|
|
1014
|
+
A(this, Y, void 0);
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
Y = /* @__PURE__ */ new WeakMap();
|
|
1018
|
+
var Q, U, ti = class extends Gt {
|
|
1019
|
+
constructor() {
|
|
1020
|
+
super(...arguments), _(this, Q), _(this, U);
|
|
1021
|
+
}
|
|
1022
|
+
onEvent(e) {
|
|
1023
|
+
switch (e.type) {
|
|
1024
|
+
case "pointerdown":
|
|
1025
|
+
A(this, U, ne(e)), A(this, Q, setTimeout(
|
|
1026
|
+
() => this.activate(e),
|
|
1027
|
+
this.options.value
|
|
1028
|
+
));
|
|
1029
|
+
break;
|
|
1030
|
+
case "pointermove":
|
|
1031
|
+
if (!g(this, U)) return;
|
|
1032
|
+
const { x: t, y: n } = ne(e), r = {
|
|
1033
|
+
x: t - g(this, U).x,
|
|
1034
|
+
y: n - g(this, U).y
|
|
1035
|
+
};
|
|
1036
|
+
Xe(r, this.options.tolerance) && this.abort();
|
|
1037
|
+
break;
|
|
1038
|
+
case "pointerup":
|
|
1039
|
+
this.abort();
|
|
1040
|
+
break;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
abort() {
|
|
1044
|
+
g(this, Q) && (clearTimeout(g(this, Q)), A(this, U, void 0), A(this, Q, void 0));
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1047
|
+
Q = /* @__PURE__ */ new WeakMap();
|
|
1048
|
+
U = /* @__PURE__ */ new WeakMap();
|
|
1049
|
+
var ee = class {
|
|
1050
|
+
};
|
|
1051
|
+
ee.Delay = ti;
|
|
1052
|
+
ee.Distance = ei;
|
|
1053
|
+
var Je = Object.freeze({
|
|
1054
|
+
activationConstraints(e, t) {
|
|
1055
|
+
var n;
|
|
1056
|
+
const { pointerType: r, target: i } = e;
|
|
1057
|
+
if (!(r === "mouse" && te(i) && (t.handle === i || (n = t.handle) != null && n.contains(i))))
|
|
1058
|
+
return r === "touch" ? [
|
|
1059
|
+
new ee.Delay({ value: 250, tolerance: 5 })
|
|
1060
|
+
] : hr(i) && !e.defaultPrevented ? [
|
|
1061
|
+
new ee.Delay({ value: 200, tolerance: 0 })
|
|
1062
|
+
] : [
|
|
1063
|
+
new ee.Delay({ value: 200, tolerance: 10 }),
|
|
1064
|
+
new ee.Distance({ value: 5 })
|
|
1065
|
+
];
|
|
1066
|
+
},
|
|
1067
|
+
preventActivation(e, t) {
|
|
1068
|
+
var n;
|
|
1069
|
+
const { target: r } = e;
|
|
1070
|
+
return r === t.element || r === t.handle || !te(r) || (n = t.handle) != null && n.contains(r) ? !1 : ur(r);
|
|
1071
|
+
}
|
|
1072
|
+
}), Z, Qe = class extends ke {
|
|
1073
|
+
constructor(t, n) {
|
|
1074
|
+
super(t), this.manager = t, this.options = n, _(this, Z, /* @__PURE__ */ new Set()), this.listeners = new Jt(), this.latest = {
|
|
1075
|
+
event: void 0,
|
|
1076
|
+
coordinates: void 0
|
|
1077
|
+
}, this.handleMove = () => {
|
|
1078
|
+
const { event: r, coordinates: i } = this.latest;
|
|
1079
|
+
!r || !i || this.manager.actions.move({ event: r, to: i });
|
|
1080
|
+
}, this.handleCancel = this.handleCancel.bind(this), this.handlePointerUp = this.handlePointerUp.bind(this), this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
1081
|
+
}
|
|
1082
|
+
activationConstraints(t, n, r = this.options) {
|
|
1083
|
+
const { activationConstraints: i = Je.activationConstraints } = r ?? {};
|
|
1084
|
+
return typeof i == "function" ? i(t, n) : i;
|
|
1085
|
+
}
|
|
1086
|
+
bind(t, n = this.options) {
|
|
1087
|
+
return Me(() => {
|
|
1088
|
+
var i;
|
|
1089
|
+
const s = new AbortController(), { signal: o } = s, a = (h) => {
|
|
1090
|
+
cr(h) && this.handlePointerDown(h, t, n);
|
|
1091
|
+
};
|
|
1092
|
+
let l = [(i = t.handle) != null ? i : t.element];
|
|
1093
|
+
n != null && n.activatorElements && (Array.isArray(n.activatorElements) ? l = n.activatorElements : l = n.activatorElements(t));
|
|
1094
|
+
for (const h of l)
|
|
1095
|
+
h && (ii(h.ownerDocument.defaultView), h.addEventListener("pointerdown", a, { signal: o }));
|
|
1096
|
+
return () => s.abort();
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
handlePointerDown(t, n, r) {
|
|
1100
|
+
if (this.disabled || !t.isPrimary || t.button !== 0 || !te(t.target) || n.disabled || ni(t) || !this.manager.dragOperation.status.idle)
|
|
1101
|
+
return;
|
|
1102
|
+
const { preventActivation: i = Je.preventActivation } = r ?? {};
|
|
1103
|
+
if (i != null && i(t, n))
|
|
1104
|
+
return;
|
|
1105
|
+
const { target: s } = t, o = Qt(s) && s.draggable && s.getAttribute("draggable") === "true", a = xe(n.element), { x: l, y: h } = ne(t);
|
|
1106
|
+
this.initialCoordinates = {
|
|
1107
|
+
x: l * a.scaleX + a.x,
|
|
1108
|
+
y: h * a.scaleY + a.y
|
|
1109
|
+
};
|
|
1110
|
+
const u = this.activationConstraints(t, n, r);
|
|
1111
|
+
t.sensor = this;
|
|
1112
|
+
const d = new or(
|
|
1113
|
+
u,
|
|
1114
|
+
(w) => this.handleStart(n, w)
|
|
1115
|
+
);
|
|
1116
|
+
d.signal.onabort = () => this.handleCancel(t), d.onEvent(t), this.controller = d;
|
|
1117
|
+
const f = dr(), c = this.listeners.bind(f, [
|
|
1118
|
+
{
|
|
1119
|
+
type: "pointermove",
|
|
1120
|
+
listener: (w) => this.handlePointerMove(w, n)
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
type: "pointerup",
|
|
1124
|
+
listener: this.handlePointerUp,
|
|
1125
|
+
options: {
|
|
1126
|
+
capture: !0
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
type: "pointercancel",
|
|
1131
|
+
listener: this.handleCancel
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
// Cancel activation if there is a competing Drag and Drop interaction
|
|
1135
|
+
type: "dragstart",
|
|
1136
|
+
listener: o ? this.handleCancel : Se,
|
|
1137
|
+
options: {
|
|
1138
|
+
capture: !0
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
]), p = () => {
|
|
1142
|
+
c(), this.initialCoordinates = void 0;
|
|
1143
|
+
};
|
|
1144
|
+
g(this, Z).add(p);
|
|
1145
|
+
}
|
|
1146
|
+
handlePointerMove(t, n) {
|
|
1147
|
+
var r, i;
|
|
1148
|
+
if (((r = this.controller) == null ? void 0 : r.activated) === !1) {
|
|
1149
|
+
(i = this.controller) == null || i.onEvent(t);
|
|
1150
|
+
return;
|
|
1151
|
+
}
|
|
1152
|
+
if (this.manager.dragOperation.status.dragging) {
|
|
1153
|
+
const s = ne(t), o = xe(n.element);
|
|
1154
|
+
s.x = s.x * o.scaleX + o.x, s.y = s.y * o.scaleY + o.y, t.preventDefault(), t.stopPropagation(), this.latest.event = t, this.latest.coordinates = s, Zt.schedule(this.handleMove);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
handlePointerUp(t) {
|
|
1158
|
+
const { status: n } = this.manager.dragOperation;
|
|
1159
|
+
if (!n.idle) {
|
|
1160
|
+
t.preventDefault(), t.stopPropagation();
|
|
1161
|
+
const r = !n.initialized;
|
|
1162
|
+
this.manager.actions.stop({ event: t, canceled: r });
|
|
1163
|
+
}
|
|
1164
|
+
this.cleanup();
|
|
1165
|
+
}
|
|
1166
|
+
handleKeyDown(t) {
|
|
1167
|
+
t.key === "Escape" && (t.preventDefault(), this.handleCancel(t));
|
|
1168
|
+
}
|
|
1169
|
+
handleStart(t, n) {
|
|
1170
|
+
const { manager: r, initialCoordinates: i } = this;
|
|
1171
|
+
if (!i || !r.dragOperation.status.idle || n.defaultPrevented)
|
|
1172
|
+
return;
|
|
1173
|
+
if (r.actions.start({
|
|
1174
|
+
coordinates: i,
|
|
1175
|
+
event: n,
|
|
1176
|
+
source: t
|
|
1177
|
+
}).signal.aborted) return this.cleanup();
|
|
1178
|
+
n.preventDefault();
|
|
1179
|
+
const a = it(n.target).body;
|
|
1180
|
+
a.setPointerCapture(n.pointerId);
|
|
1181
|
+
const l = te(n.target) ? [n.target, a] : a, h = this.listeners.bind(l, [
|
|
1182
|
+
{
|
|
1183
|
+
// Prevent scrolling on touch devices
|
|
1184
|
+
type: "touchmove",
|
|
1185
|
+
listener: Se,
|
|
1186
|
+
options: {
|
|
1187
|
+
passive: !1
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
// Prevent click events
|
|
1192
|
+
type: "click",
|
|
1193
|
+
listener: Se
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
type: "contextmenu",
|
|
1197
|
+
listener: Se
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
type: "keydown",
|
|
1201
|
+
listener: this.handleKeyDown
|
|
1202
|
+
}
|
|
1203
|
+
]);
|
|
1204
|
+
g(this, Z).add(h);
|
|
1205
|
+
}
|
|
1206
|
+
handleCancel(t) {
|
|
1207
|
+
const { dragOperation: n } = this.manager;
|
|
1208
|
+
n.status.initialized && this.manager.actions.stop({ event: t, canceled: !0 }), this.cleanup();
|
|
1209
|
+
}
|
|
1210
|
+
cleanup() {
|
|
1211
|
+
this.latest = {
|
|
1212
|
+
event: void 0,
|
|
1213
|
+
coordinates: void 0
|
|
1214
|
+
}, g(this, Z).forEach((t) => t()), g(this, Z).clear();
|
|
1215
|
+
}
|
|
1216
|
+
destroy() {
|
|
1217
|
+
this.cleanup(), this.listeners.clear();
|
|
1218
|
+
}
|
|
1219
|
+
};
|
|
1220
|
+
Z = /* @__PURE__ */ new WeakMap();
|
|
1221
|
+
Qe.configure = tt(Qe);
|
|
1222
|
+
Qe.defaults = Je;
|
|
1223
|
+
function ni(e) {
|
|
1224
|
+
return "sensor" in e;
|
|
1225
|
+
}
|
|
1226
|
+
function Se(e) {
|
|
1227
|
+
e.preventDefault();
|
|
1228
|
+
}
|
|
1229
|
+
function ri() {
|
|
1230
|
+
}
|
|
1231
|
+
var qt = /* @__PURE__ */ new WeakSet();
|
|
1232
|
+
function ii(e) {
|
|
1233
|
+
!e || qt.has(e) || (e.addEventListener("touchmove", ri, {
|
|
1234
|
+
capture: !1,
|
|
1235
|
+
passive: !1
|
|
1236
|
+
}), qt.add(e));
|
|
1237
|
+
}
|
|
1238
|
+
var Mn, In, $n, Ze, M, ft, pt, vt, Ie = class extends (Ze = ir, $n = [W], In = [W], Mn = [W], Ze) {
|
|
1239
|
+
constructor(e, t) {
|
|
1240
|
+
var n = e, {
|
|
1241
|
+
element: r,
|
|
1242
|
+
effects: i = () => [],
|
|
1243
|
+
handle: s,
|
|
1244
|
+
feedback: o = "default"
|
|
1245
|
+
} = n, a = fn(n, [
|
|
1246
|
+
"element",
|
|
1247
|
+
"effects",
|
|
1248
|
+
"handle",
|
|
1249
|
+
"feedback"
|
|
1250
|
+
]);
|
|
1251
|
+
super(
|
|
1252
|
+
De({
|
|
1253
|
+
effects: () => [
|
|
1254
|
+
...i(),
|
|
1255
|
+
() => {
|
|
1256
|
+
var l, h;
|
|
1257
|
+
const { manager: u } = this;
|
|
1258
|
+
if (!u) return;
|
|
1259
|
+
const f = ((h = (l = this.sensors) == null ? void 0 : l.map(sr)) != null ? h : [
|
|
1260
|
+
...u.sensors
|
|
1261
|
+
]).map((c) => {
|
|
1262
|
+
const p = c instanceof ke ? c : u.registry.register(c.plugin), w = c instanceof ke ? void 0 : c.options;
|
|
1263
|
+
return p.bind(this, w);
|
|
1264
|
+
});
|
|
1265
|
+
return function() {
|
|
1266
|
+
f.forEach((p) => p());
|
|
1267
|
+
};
|
|
1268
|
+
}
|
|
1269
|
+
]
|
|
1270
|
+
}, a),
|
|
1271
|
+
t
|
|
1272
|
+
), _(this, ft, b(M, 8, this)), b(M, 11, this), _(this, pt, b(M, 12, this)), b(M, 15, this), _(this, vt, b(M, 16, this)), b(M, 19, this), this.element = r, this.handle = s, this.feedback = o;
|
|
1273
|
+
}
|
|
1274
|
+
};
|
|
1275
|
+
M = se(Ze);
|
|
1276
|
+
ft = /* @__PURE__ */ new WeakMap();
|
|
1277
|
+
pt = /* @__PURE__ */ new WeakMap();
|
|
1278
|
+
vt = /* @__PURE__ */ new WeakMap();
|
|
1279
|
+
D(M, 4, "handle", $n, Ie, ft);
|
|
1280
|
+
D(M, 4, "element", In, Ie, pt);
|
|
1281
|
+
D(M, 4, "feedback", Mn, Ie, vt);
|
|
1282
|
+
j(M, Ie);
|
|
1283
|
+
var Rn, Wn, et, K, mt, Ke, Ln, Fn, pe, gt, zn = class extends (et = rr, Wn = [W], Rn = [W], et) {
|
|
1284
|
+
constructor(e, t) {
|
|
1285
|
+
var n = e, { element: r, effects: i = () => [] } = n, s = fn(n, ["element", "effects"]);
|
|
1286
|
+
const { collisionDetector: o = Or } = s, a = (h) => {
|
|
1287
|
+
const { manager: u, element: d } = this;
|
|
1288
|
+
if (!d || h === null) {
|
|
1289
|
+
this.shape = void 0;
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
if (!u) return;
|
|
1293
|
+
const f = new L(d), c = P(() => this.shape);
|
|
1294
|
+
return f && (c != null && c.equals(f)) ? c : (this.shape = f, f);
|
|
1295
|
+
}, l = ln(!1);
|
|
1296
|
+
super(
|
|
1297
|
+
hn(De({}, s), {
|
|
1298
|
+
collisionDetector: o,
|
|
1299
|
+
effects: () => [
|
|
1300
|
+
...i(),
|
|
1301
|
+
() => {
|
|
1302
|
+
const { element: h, manager: u } = this;
|
|
1303
|
+
if (!u) return;
|
|
1304
|
+
const { dragOperation: d } = u, { source: f } = d;
|
|
1305
|
+
l.value = !!(f && d.status.initialized && h && !this.disabled && this.accepts(f));
|
|
1306
|
+
},
|
|
1307
|
+
() => {
|
|
1308
|
+
const { element: h } = this;
|
|
1309
|
+
if (l.value && h) {
|
|
1310
|
+
const u = new ar(
|
|
1311
|
+
h,
|
|
1312
|
+
a
|
|
1313
|
+
);
|
|
1314
|
+
return () => {
|
|
1315
|
+
u.disconnect(), this.shape = void 0;
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
},
|
|
1319
|
+
() => {
|
|
1320
|
+
var h;
|
|
1321
|
+
if ((h = this.manager) != null && h.dragOperation.status.initialized)
|
|
1322
|
+
return () => {
|
|
1323
|
+
this.shape = void 0;
|
|
1324
|
+
};
|
|
1325
|
+
}
|
|
1326
|
+
]
|
|
1327
|
+
}),
|
|
1328
|
+
t
|
|
1329
|
+
), _(this, pe), _(this, mt, b(K, 8, this)), b(K, 11, this), _(this, gt, b(K, 12, this)), b(K, 15, this), this.element = r, this.refreshShape = () => a();
|
|
1330
|
+
}
|
|
1331
|
+
set element(e) {
|
|
1332
|
+
A(this, pe, e, Fn);
|
|
1333
|
+
}
|
|
1334
|
+
get element() {
|
|
1335
|
+
var e;
|
|
1336
|
+
return (e = this.proxy) != null ? e : g(this, pe, Ln);
|
|
1337
|
+
}
|
|
1338
|
+
};
|
|
1339
|
+
K = se(et);
|
|
1340
|
+
mt = /* @__PURE__ */ new WeakMap();
|
|
1341
|
+
pe = /* @__PURE__ */ new WeakSet();
|
|
1342
|
+
gt = /* @__PURE__ */ new WeakMap();
|
|
1343
|
+
Ke = D(K, 20, "#element", Wn, pe, mt), Ln = Ke.get, Fn = Ke.set;
|
|
1344
|
+
D(K, 4, "proxy", Rn, zn, gt);
|
|
1345
|
+
j(K, zn);
|
|
1346
|
+
export {
|
|
1347
|
+
Zr as AutoScroller,
|
|
1348
|
+
Ie as Draggable,
|
|
1349
|
+
zn as Droppable,
|
|
1350
|
+
ee as PointerActivationConstraints,
|
|
1351
|
+
ht as Scroller,
|
|
1352
|
+
oe as StyleSheetManager,
|
|
1353
|
+
mi as resolveCustomizable
|
|
1354
|
+
};
|
|
1355
|
+
//# sourceMappingURL=fondue-components145.js.map
|