@luzmo/analytics-components-kit 1.0.1-alpha.2 → 1.0.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -0
- package/custom-elements.json +1550 -0
- package/lib/area-chart-slots.config-BLxiYX05.cjs +20 -0
- package/lib/area-chart-slots.config-C0c2ZzBh.js +52 -0
- package/lib/async-directive-CPjMHOPu.cjs +24 -0
- package/lib/async-directive-SCUUQ3Mh.js +114 -0
- package/lib/bar-chart-slots.config-GSSL7XVA.js +47 -0
- package/lib/bar-chart-slots.config-Jx1PveTM.cjs +20 -0
- package/lib/bar-chart.config-B57geUzJ.cjs +20 -0
- package/lib/bar-chart.config-CQ6HAvs2.js +153 -0
- package/lib/bar-chart.en-BqYbiHO3.cjs +20 -0
- package/lib/bar-chart.en-FwT00qdU.js +69 -0
- package/lib/bar-chart.fr-DGx9smEh.cjs +20 -0
- package/lib/bar-chart.fr-DbxKiM0j.js +44 -0
- package/lib/bar-chart.nl-BYzVExsz.cjs +20 -0
- package/lib/bar-chart.nl-ahX1ARpH.js +44 -0
- package/lib/button-base-B4PdJFVe.cjs +27 -0
- package/lib/button-base-CtfPWS-P.js +142 -0
- package/lib/column-chart.config-B57geUzJ.cjs +20 -0
- package/lib/column-chart.config-C9hP0kX7.js +153 -0
- package/lib/cs-DVZ0Tapy.js +89 -0
- package/lib/cs-I9E81keK.cjs +20 -0
- package/lib/da-DHy05oSR.js +97 -0
- package/lib/da-QkdvupDg.cjs +20 -0
- package/lib/de-Dn5mUzha.cjs +20 -0
- package/lib/de-iM39JlAt.js +109 -0
- package/lib/decompose-numeric-format-B3rVVHpO.cjs +20 -0
- package/lib/decompose-numeric-format-BuZcjH2k.js +39 -0
- package/lib/directive-helpers-BSB0tfc9.cjs +32 -0
- package/lib/directive-helpers-eY1rHtyn.js +154 -0
- package/lib/divider.module-BW8qaMVq.js +211 -0
- package/lib/divider.module-DEy88Ieh.cjs +20 -0
- package/lib/donut-chart-slots.config-BEwhfq27.js +39 -0
- package/lib/donut-chart-slots.config-DIp-24lO.cjs +20 -0
- package/lib/donut-chart.config-3DhKiSSM.js +177 -0
- package/lib/donut-chart.config-DLWJUlHx.cjs +20 -0
- package/lib/donut-chart.en-Blb9oSdU.cjs +20 -0
- package/lib/donut-chart.en-CzjT4-XN.js +85 -0
- package/lib/donut-chart.fr-BeTVa2wh.cjs +20 -0
- package/lib/donut-chart.fr-DftPrKbG.js +39 -0
- package/lib/donut-chart.nl-D9YGbOce.cjs +20 -0
- package/lib/donut-chart.nl-NMatXfhK.js +39 -0
- package/lib/draggable-data-item/index.cjs +20 -0
- package/lib/draggable-data-item/index.js +30 -0
- package/lib/droppable-slot/index.cjs +20 -0
- package/lib/droppable-slot/index.js +30 -0
- package/lib/en-BDBzmAXX.cjs +202 -0
- package/lib/en-CIeY2T5K.js +1980 -0
- package/lib/en-GB-BqYHIX1v.cjs +20 -0
- package/lib/en-GB-CYx--4nh.js +28 -0
- package/lib/es-CwyPlN5d.cjs +20 -0
- package/lib/es-KhTq4jX8.js +305 -0
- package/lib/fi-Dh_ebgpe.js +97 -0
- package/lib/fi-rijeZE5V.cjs +20 -0
- package/lib/fr-BcgE-6S_.cjs +20 -0
- package/lib/fr-CU727YF1.js +305 -0
- package/lib/get-css-variable-BHHQ0SnL.js +1444 -0
- package/lib/get-css-variable-D439CdH9.cjs +24 -0
- package/lib/he-Au3xg6lR.js +89 -0
- package/lib/he-O6Ih8Bqh.cjs +20 -0
- package/lib/hu-BnZ8y3xQ.cjs +20 -0
- package/lib/hu-DNJ-P_MW.js +97 -0
- package/lib/if-defined-BbzmSG-O.js +757 -0
- package/lib/if-defined-V7yEJWI3.cjs +54 -0
- package/lib/imageobject.config-B7ld9bj3.cjs +20 -0
- package/lib/imageobject.config-DZLp9Elq.js +127 -0
- package/lib/index-0314DjEl.cjs +20 -0
- package/lib/index-B9h2L_hV.js +3048 -0
- package/lib/index-BDXFsKUM.cjs +146 -0
- package/lib/index-Bd4cKS9O.js +155 -0
- package/lib/index-BmAD29P2.js +106 -0
- package/lib/index-Bo1DpZ-1.cjs +58 -0
- package/lib/index-C4ePDYEC.cjs +41 -0
- package/lib/index-C9xEN5Ji.js +82 -0
- package/lib/index-CBCm4_7S.js +869 -0
- package/lib/index-CM80_HQw.js +442 -0
- package/lib/index-CcF-9wyF.cjs +71 -0
- package/lib/index-CfEm5P0J.cjs +196 -0
- package/lib/index-CrWoFMZ3.cjs +22 -0
- package/lib/index-CtEJZdT0.js +1627 -0
- package/lib/index-CvX-HLY1.cjs +322 -0
- package/lib/index-D37RwuEH.js +1584 -0
- package/lib/index-D5puKlcm.cjs +96 -0
- package/lib/index-DGz6jCKo.cjs +26 -0
- package/lib/index-DJp_9h0l.js +327 -0
- package/lib/index-DSbgZduE.js +501 -0
- package/lib/index-D_KYpfBM.js +24 -0
- package/lib/index-DdtjeKYI.js +928 -0
- package/lib/index-Dj7PF4Q9.cjs +63 -0
- package/lib/index-Dq3HAOaM.js +127 -0
- package/lib/index-DrIA0eFE.js +392 -0
- package/lib/index-jt6FL_uE.cjs +20 -0
- package/lib/index-kJR406YZ.cjs +112 -0
- package/lib/index-v8ZTprPO.cjs +51 -0
- package/lib/index.cjs +875 -0
- package/lib/index.js +6411 -0
- package/lib/it-Bh5U73z6.js +305 -0
- package/lib/it-PshtLMkq.cjs +20 -0
- package/lib/ja-CCcHUL61.js +89 -0
- package/lib/ja-KIS2HdaG.cjs +20 -0
- package/lib/ko--l4qmjLV.cjs +20 -0
- package/lib/ko-DhapsZMM.js +89 -0
- package/lib/line-chart.config-BZcvfO2c.cjs +20 -0
- package/lib/line-chart.config-CIVN6uLI.js +115 -0
- package/lib/mk-B9HPSuKa.js +97 -0
- package/lib/mk-DZlj-edb.cjs +20 -0
- package/lib/nl-BKlDqOXb.cjs +20 -0
- package/lib/nl-BwSt5Bf4.js +109 -0
- package/lib/no-D-DofYnx.js +109 -0
- package/lib/no-D_SzxhTu.cjs +20 -0
- package/lib/observe-slot-text-DOYmGOZe.js +181 -0
- package/lib/observe-slot-text-oJ0a2KY9.cjs +42 -0
- package/lib/picker/index.cjs +20 -0
- package/lib/picker/index.js +32 -0
- package/lib/pl-D_L_0Boq.js +97 -0
- package/lib/pl-PIK23rK_.cjs +20 -0
- package/lib/popover-Bwnkg-5-.js +67 -0
- package/lib/popover-CQGN8nbX.cjs +32 -0
- package/lib/progress-circle/index.cjs +35 -0
- package/lib/progress-circle/index.js +104 -0
- package/lib/pt-B0BBS5VB.js +89 -0
- package/lib/pt-Dqlu4MS5.cjs +20 -0
- package/lib/ru-Vo-m3O_2.js +108 -0
- package/lib/ru-zyNDTB04.cjs +20 -0
- package/lib/sv-1DPTltNQ.cjs +20 -0
- package/lib/sv-CiozMaev.js +89 -0
- package/lib/textobject.config-C8opcGG4.js +52 -0
- package/lib/textobject.config-DbAajFz8.cjs +20 -0
- package/lib/tr-BkmWvOG2.cjs +20 -0
- package/lib/tr-D_D4i5iv.js +109 -0
- package/lib/zh-CN-DTZ4OmdP.cjs +20 -0
- package/lib/zh-CN-wsl7eFSd.js +89 -0
- package/lib/zh-TW-DTZ4OmdP.cjs +20 -0
- package/lib/zh-TW-wsl7eFSd.js +89 -0
- package/package.json +19 -24
- package/37.js +0 -1
- package/729.js +0 -1
- package/common-31743c5a.js +0 -13
- package/common-b02547a0.js +0 -1
- package/common-b49d9a9d.js +0 -1
- package/common-b5232813.js +0 -56
- package/common-cefd4f4c.js +0 -1
- package/common-d6cb565f.js +0 -1
- package/common-fd868059.js +0 -1
- package/common-fedaf338.js +0 -32
- package/edit-option-picker/index.js +0 -314
- package/edit-option-slider/index.js +0 -102
- package/edit-option-toggle/index.js +0 -114
- package/index.js +0 -346
- package/vendors-93cc3efa.js +0 -1
- package/vendors-bb3d84b5.js +0 -1
@@ -0,0 +1,1444 @@
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
2
|
+
*
|
3
|
+
* Copyright © 2024 Luzmo
|
4
|
+
* All rights reserved.
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
7
|
+
* This license allows users with a current active Luzmo account
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
11
|
+
*
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
|
+
* SOFTWARE.
|
19
|
+
* */
|
20
|
+
function ne(e) {
|
21
|
+
return e == null;
|
22
|
+
}
|
23
|
+
function je(e) {
|
24
|
+
return typeof e == "string" || e instanceof String;
|
25
|
+
}
|
26
|
+
function xe(e) {
|
27
|
+
return !Number.isNaN(e) && Number.isFinite(e);
|
28
|
+
}
|
29
|
+
function Ie(e) {
|
30
|
+
return typeof e == "boolean";
|
31
|
+
}
|
32
|
+
function Ce(e) {
|
33
|
+
return e !== null && typeof e == "object" && !Array.isArray(e);
|
34
|
+
}
|
35
|
+
function Fe(e) {
|
36
|
+
return e !== null && typeof e == "object" && Object.keys(e).length === 0;
|
37
|
+
}
|
38
|
+
function At(e, r, t) {
|
39
|
+
if (je(e) || xe(e) || Ie(e))
|
40
|
+
return e.toString();
|
41
|
+
if (ne(e) || !Ce(e) || Fe(e))
|
42
|
+
return "";
|
43
|
+
let n = "";
|
44
|
+
const a = Object.keys(e);
|
45
|
+
return r && e[r] && (n = e[r]), (ne(n) || n === "") && (a != null && a.length) && (n = e[a[0]]), n;
|
46
|
+
}
|
47
|
+
function Me(e) {
|
48
|
+
if (Array.isArray(e)) return e;
|
49
|
+
}
|
50
|
+
function He(e, r) {
|
51
|
+
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
52
|
+
if (t != null) {
|
53
|
+
var n, a, i, o, l = [], u = !0, c = !1;
|
54
|
+
try {
|
55
|
+
if (i = (t = t.call(e)).next, r !== 0) for (; !(u = (n = i.call(t)).done) && (l.push(n.value), l.length !== r); u = !0) ;
|
56
|
+
} catch (f) {
|
57
|
+
c = !0, a = f;
|
58
|
+
} finally {
|
59
|
+
try {
|
60
|
+
if (!u && t.return != null && (o = t.return(), Object(o) !== o)) return;
|
61
|
+
} finally {
|
62
|
+
if (c) throw a;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
return l;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
function V(e, r) {
|
69
|
+
(r == null || r > e.length) && (r = e.length);
|
70
|
+
for (var t = 0, n = Array(r); t < r; t++) n[t] = e[t];
|
71
|
+
return n;
|
72
|
+
}
|
73
|
+
function he(e, r) {
|
74
|
+
if (e) {
|
75
|
+
if (typeof e == "string") return V(e, r);
|
76
|
+
var t = {}.toString.call(e).slice(8, -1);
|
77
|
+
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? V(e, r) : void 0;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
function Ke() {
|
81
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
82
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
83
|
+
}
|
84
|
+
function Oe(e, r) {
|
85
|
+
return Me(e) || He(e, r) || he(e, r) || Ke();
|
86
|
+
}
|
87
|
+
var X = {}, k = {}, ae;
|
88
|
+
function we() {
|
89
|
+
if (ae) return k;
|
90
|
+
ae = 1, Object.defineProperty(k, "__esModule", { value: !0 }), k.bind = void 0;
|
91
|
+
function e(r, t) {
|
92
|
+
var n = t.type, a = t.listener, i = t.options;
|
93
|
+
return r.addEventListener(n, a, i), function() {
|
94
|
+
r.removeEventListener(n, a, i);
|
95
|
+
};
|
96
|
+
}
|
97
|
+
return k.bind = e, k;
|
98
|
+
}
|
99
|
+
var M = {}, ie;
|
100
|
+
function Re() {
|
101
|
+
if (ie) return M;
|
102
|
+
ie = 1;
|
103
|
+
var e = M && M.__assign || function() {
|
104
|
+
return e = Object.assign || function(i) {
|
105
|
+
for (var o, l = 1, u = arguments.length; l < u; l++) {
|
106
|
+
o = arguments[l];
|
107
|
+
for (var c in o) Object.prototype.hasOwnProperty.call(o, c) && (i[c] = o[c]);
|
108
|
+
}
|
109
|
+
return i;
|
110
|
+
}, e.apply(this, arguments);
|
111
|
+
};
|
112
|
+
Object.defineProperty(M, "__esModule", { value: !0 }), M.bindAll = void 0;
|
113
|
+
var r = /* @__PURE__ */ we();
|
114
|
+
function t(i) {
|
115
|
+
if (!(typeof i > "u"))
|
116
|
+
return typeof i == "boolean" ? {
|
117
|
+
capture: i
|
118
|
+
} : i;
|
119
|
+
}
|
120
|
+
function n(i, o) {
|
121
|
+
if (o == null)
|
122
|
+
return i;
|
123
|
+
var l = e(e({}, i), { options: e(e({}, t(o)), t(i.options)) });
|
124
|
+
return l;
|
125
|
+
}
|
126
|
+
function a(i, o, l) {
|
127
|
+
var u = o.map(function(c) {
|
128
|
+
var f = n(c, l);
|
129
|
+
return (0, r.bind)(i, f);
|
130
|
+
});
|
131
|
+
return function() {
|
132
|
+
u.forEach(function(f) {
|
133
|
+
return f();
|
134
|
+
});
|
135
|
+
};
|
136
|
+
}
|
137
|
+
return M.bindAll = a, M;
|
138
|
+
}
|
139
|
+
var oe;
|
140
|
+
function ke() {
|
141
|
+
return oe || (oe = 1, function(e) {
|
142
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.bindAll = e.bind = void 0;
|
143
|
+
var r = /* @__PURE__ */ we();
|
144
|
+
Object.defineProperty(e, "bind", { enumerable: !0, get: function() {
|
145
|
+
return r.bind;
|
146
|
+
} });
|
147
|
+
var t = /* @__PURE__ */ Re();
|
148
|
+
Object.defineProperty(e, "bindAll", { enumerable: !0, get: function() {
|
149
|
+
return t.bindAll;
|
150
|
+
} });
|
151
|
+
}(X)), X;
|
152
|
+
}
|
153
|
+
var H = /* @__PURE__ */ ke();
|
154
|
+
function L(e) {
|
155
|
+
"@babel/helpers - typeof";
|
156
|
+
return L = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
157
|
+
return typeof r;
|
158
|
+
} : function(r) {
|
159
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
160
|
+
}, L(e);
|
161
|
+
}
|
162
|
+
function Ne(e, r) {
|
163
|
+
if (L(e) != "object" || !e) return e;
|
164
|
+
var t = e[Symbol.toPrimitive];
|
165
|
+
if (t !== void 0) {
|
166
|
+
var n = t.call(e, r);
|
167
|
+
if (L(n) != "object") return n;
|
168
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
169
|
+
}
|
170
|
+
return (r === "string" ? String : Number)(e);
|
171
|
+
}
|
172
|
+
function We(e) {
|
173
|
+
var r = Ne(e, "string");
|
174
|
+
return L(r) == "symbol" ? r : r + "";
|
175
|
+
}
|
176
|
+
function _(e, r, t) {
|
177
|
+
return (r = We(r)) in e ? Object.defineProperty(e, r, {
|
178
|
+
value: t,
|
179
|
+
enumerable: !0,
|
180
|
+
configurable: !0,
|
181
|
+
writable: !0
|
182
|
+
}) : e[r] = t, e;
|
183
|
+
}
|
184
|
+
var De = 2147483647, Se = "data-pdnd-honey-pot";
|
185
|
+
function ue(e, r) {
|
186
|
+
var t = Object.keys(e);
|
187
|
+
if (Object.getOwnPropertySymbols) {
|
188
|
+
var n = Object.getOwnPropertySymbols(e);
|
189
|
+
r && (n = n.filter(function(a) {
|
190
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
191
|
+
})), t.push.apply(t, n);
|
192
|
+
}
|
193
|
+
return t;
|
194
|
+
}
|
195
|
+
function le(e) {
|
196
|
+
for (var r = 1; r < arguments.length; r++) {
|
197
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
198
|
+
r % 2 ? ue(Object(t), !0).forEach(function(n) {
|
199
|
+
_(e, n, t[n]);
|
200
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ue(Object(t)).forEach(function(n) {
|
201
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
202
|
+
});
|
203
|
+
}
|
204
|
+
return e;
|
205
|
+
}
|
206
|
+
var $ = 2, ce = $ / 2;
|
207
|
+
function Le(e) {
|
208
|
+
return {
|
209
|
+
x: Math.floor(e.x),
|
210
|
+
y: Math.floor(e.y)
|
211
|
+
};
|
212
|
+
}
|
213
|
+
function $e(e) {
|
214
|
+
return {
|
215
|
+
x: e.x - ce,
|
216
|
+
y: e.y - ce
|
217
|
+
};
|
218
|
+
}
|
219
|
+
function Be(e) {
|
220
|
+
return {
|
221
|
+
x: Math.max(e.x, 0),
|
222
|
+
y: Math.max(e.y, 0)
|
223
|
+
};
|
224
|
+
}
|
225
|
+
function Ue(e) {
|
226
|
+
return {
|
227
|
+
x: Math.min(e.x, window.innerWidth - $),
|
228
|
+
y: Math.min(e.y, window.innerHeight - $)
|
229
|
+
};
|
230
|
+
}
|
231
|
+
function se(e) {
|
232
|
+
var r = e.client, t = Ue(Be($e(Le(r))));
|
233
|
+
return DOMRect.fromRect({
|
234
|
+
x: t.x,
|
235
|
+
y: t.y,
|
236
|
+
width: $,
|
237
|
+
height: $
|
238
|
+
});
|
239
|
+
}
|
240
|
+
function de(e) {
|
241
|
+
var r = e.clientRect;
|
242
|
+
return {
|
243
|
+
left: "".concat(r.left, "px"),
|
244
|
+
top: "".concat(r.top, "px"),
|
245
|
+
width: "".concat(r.width, "px"),
|
246
|
+
height: "".concat(r.height, "px")
|
247
|
+
};
|
248
|
+
}
|
249
|
+
function Xe(e) {
|
250
|
+
var r = e.client, t = e.clientRect;
|
251
|
+
return (
|
252
|
+
// is within horizontal bounds
|
253
|
+
r.x >= t.x && r.x <= t.x + t.width && // is within vertical bounds
|
254
|
+
r.y >= t.y && r.y <= t.y + t.height
|
255
|
+
);
|
256
|
+
}
|
257
|
+
function Ye(e) {
|
258
|
+
var r = e.initial, t = document.createElement("div");
|
259
|
+
t.setAttribute(Se, "true");
|
260
|
+
var n = se({
|
261
|
+
client: r
|
262
|
+
});
|
263
|
+
Object.assign(t.style, le(le({
|
264
|
+
// Setting a background color explicitly to avoid any inherited styles.
|
265
|
+
// Looks like this could be `opacity: 0`, but worried that _might_
|
266
|
+
// cause the element to be ignored on some platforms.
|
267
|
+
// When debugging, set backgroundColor to something like "red".
|
268
|
+
backgroundColor: "transparent",
|
269
|
+
position: "fixed",
|
270
|
+
// Being explicit to avoid inheriting styles
|
271
|
+
padding: 0,
|
272
|
+
margin: 0,
|
273
|
+
boxSizing: "border-box"
|
274
|
+
}, de({
|
275
|
+
clientRect: n
|
276
|
+
})), {}, {
|
277
|
+
// We want this element to absorb pointer events,
|
278
|
+
// it's kind of the whole point 😉
|
279
|
+
pointerEvents: "auto",
|
280
|
+
// Want to make sure the honey pot is top of everything else.
|
281
|
+
// Don't need to worry about native drag previews, as they will
|
282
|
+
// have been rendered (and removed) before the honey pot is rendered
|
283
|
+
zIndex: De
|
284
|
+
})), document.body.appendChild(t);
|
285
|
+
var a = H.bind(window, {
|
286
|
+
type: "pointermove",
|
287
|
+
listener: function(o) {
|
288
|
+
var l = {
|
289
|
+
x: o.clientX,
|
290
|
+
y: o.clientY
|
291
|
+
};
|
292
|
+
n = se({
|
293
|
+
client: l
|
294
|
+
}), Object.assign(t.style, de({
|
295
|
+
clientRect: n
|
296
|
+
}));
|
297
|
+
},
|
298
|
+
// using capture so we are less likely to be impacted by event stopping
|
299
|
+
options: {
|
300
|
+
capture: !0
|
301
|
+
}
|
302
|
+
});
|
303
|
+
return function(o) {
|
304
|
+
var l = o.current;
|
305
|
+
if (a(), Xe({
|
306
|
+
client: l,
|
307
|
+
clientRect: n
|
308
|
+
})) {
|
309
|
+
t.remove();
|
310
|
+
return;
|
311
|
+
}
|
312
|
+
function u() {
|
313
|
+
c(), t.remove();
|
314
|
+
}
|
315
|
+
var c = H.bindAll(window, [
|
316
|
+
{
|
317
|
+
type: "pointerdown",
|
318
|
+
listener: u
|
319
|
+
},
|
320
|
+
{
|
321
|
+
type: "pointermove",
|
322
|
+
listener: u
|
323
|
+
},
|
324
|
+
{
|
325
|
+
type: "focusin",
|
326
|
+
listener: u
|
327
|
+
},
|
328
|
+
{
|
329
|
+
type: "focusout",
|
330
|
+
listener: u
|
331
|
+
},
|
332
|
+
// a 'pointerdown' should happen before 'dragstart', but just being super safe
|
333
|
+
{
|
334
|
+
type: "dragstart",
|
335
|
+
listener: u
|
336
|
+
},
|
337
|
+
// if the user has dragged something out of the window
|
338
|
+
// and then is dragging something back into the window
|
339
|
+
// the first events we will see are "dragenter" (and then "dragover").
|
340
|
+
// So if we see any of these we need to clear the post drag fix.
|
341
|
+
{
|
342
|
+
type: "dragenter",
|
343
|
+
listener: u
|
344
|
+
},
|
345
|
+
{
|
346
|
+
type: "dragover",
|
347
|
+
listener: u
|
348
|
+
}
|
349
|
+
// Not adding a "wheel" event listener, as "wheel" by itself does not
|
350
|
+
// resolve the bug.
|
351
|
+
], {
|
352
|
+
// Using `capture` so less likely to be impacted by other code stopping events
|
353
|
+
capture: !0
|
354
|
+
});
|
355
|
+
};
|
356
|
+
}
|
357
|
+
function qe() {
|
358
|
+
var e = null;
|
359
|
+
function r() {
|
360
|
+
return e = null, H.bind(window, {
|
361
|
+
type: "pointermove",
|
362
|
+
listener: function(a) {
|
363
|
+
e = {
|
364
|
+
x: a.clientX,
|
365
|
+
y: a.clientY
|
366
|
+
};
|
367
|
+
},
|
368
|
+
// listening for pointer move in capture phase
|
369
|
+
// so we are less likely to be impacted by events being stopped.
|
370
|
+
options: {
|
371
|
+
capture: !0
|
372
|
+
}
|
373
|
+
});
|
374
|
+
}
|
375
|
+
function t() {
|
376
|
+
var n = null;
|
377
|
+
return function(i) {
|
378
|
+
var o = i.eventName, l = i.payload;
|
379
|
+
if (o === "onDragStart") {
|
380
|
+
var u, c = l.location.initial.input, f = (u = e) !== null && u !== void 0 ? u : {
|
381
|
+
x: c.clientX,
|
382
|
+
y: c.clientY
|
383
|
+
};
|
384
|
+
n = Ye({
|
385
|
+
initial: f
|
386
|
+
});
|
387
|
+
}
|
388
|
+
if (o === "onDrop") {
|
389
|
+
var v, p = l.location.current.input;
|
390
|
+
(v = n) === null || v === void 0 || v({
|
391
|
+
current: {
|
392
|
+
x: p.clientX,
|
393
|
+
y: p.clientY
|
394
|
+
}
|
395
|
+
}), n = null, e = null;
|
396
|
+
}
|
397
|
+
};
|
398
|
+
}
|
399
|
+
return {
|
400
|
+
bindEvents: r,
|
401
|
+
getOnPostDispatch: t
|
402
|
+
};
|
403
|
+
}
|
404
|
+
function ze(e) {
|
405
|
+
if (Array.isArray(e)) return V(e);
|
406
|
+
}
|
407
|
+
function Ge(e) {
|
408
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
409
|
+
}
|
410
|
+
function Ve() {
|
411
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
412
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
413
|
+
}
|
414
|
+
function Te(e) {
|
415
|
+
return ze(e) || Ge(e) || he(e) || Ve();
|
416
|
+
}
|
417
|
+
function Ae(e) {
|
418
|
+
return e instanceof Element && e.hasAttribute(Se);
|
419
|
+
}
|
420
|
+
function Ze(e) {
|
421
|
+
var r = document.elementsFromPoint(e.x, e.y), t = Oe(r, 2), n = t[0], a = t[1];
|
422
|
+
return n ? Ae(n) ? a ?? null : n : null;
|
423
|
+
}
|
424
|
+
function ee(e) {
|
425
|
+
var r = null;
|
426
|
+
return function() {
|
427
|
+
if (!r) {
|
428
|
+
for (var n = arguments.length, a = new Array(n), i = 0; i < n; i++)
|
429
|
+
a[i] = arguments[i];
|
430
|
+
var o = e.apply(this, a);
|
431
|
+
r = {
|
432
|
+
result: o
|
433
|
+
};
|
434
|
+
}
|
435
|
+
return r.result;
|
436
|
+
};
|
437
|
+
}
|
438
|
+
var Je = ee(function() {
|
439
|
+
return navigator.userAgent.includes("Firefox");
|
440
|
+
}), U = ee(function() {
|
441
|
+
var r = navigator, t = r.userAgent;
|
442
|
+
return t.includes("AppleWebKit") && !t.includes("Chrome");
|
443
|
+
}), Z = {
|
444
|
+
isLeavingWindow: Symbol("leaving"),
|
445
|
+
isEnteringWindow: Symbol("entering")
|
446
|
+
};
|
447
|
+
function Qe(e) {
|
448
|
+
var r = e.dragLeave;
|
449
|
+
return U() ? r.hasOwnProperty(Z.isLeavingWindow) : !1;
|
450
|
+
}
|
451
|
+
(function() {
|
452
|
+
if (typeof window > "u" || !U())
|
453
|
+
return;
|
454
|
+
function r() {
|
455
|
+
return {
|
456
|
+
enterCount: 0,
|
457
|
+
isOverWindow: !1
|
458
|
+
};
|
459
|
+
}
|
460
|
+
var t = r();
|
461
|
+
function n() {
|
462
|
+
t = r();
|
463
|
+
}
|
464
|
+
H.bindAll(
|
465
|
+
window,
|
466
|
+
[{
|
467
|
+
type: "dragstart",
|
468
|
+
listener: function() {
|
469
|
+
t.enterCount = 0, t.isOverWindow = !0;
|
470
|
+
}
|
471
|
+
}, {
|
472
|
+
type: "drop",
|
473
|
+
listener: n
|
474
|
+
}, {
|
475
|
+
type: "dragend",
|
476
|
+
listener: n
|
477
|
+
}, {
|
478
|
+
type: "dragenter",
|
479
|
+
listener: function(i) {
|
480
|
+
!t.isOverWindow && t.enterCount === 0 && (i[Z.isEnteringWindow] = !0), t.isOverWindow = !0, t.enterCount++;
|
481
|
+
}
|
482
|
+
}, {
|
483
|
+
type: "dragleave",
|
484
|
+
listener: function(i) {
|
485
|
+
t.enterCount--, t.isOverWindow && t.enterCount === 0 && (i[Z.isLeavingWindow] = !0, t.isOverWindow = !1);
|
486
|
+
}
|
487
|
+
}],
|
488
|
+
// using `capture: true` so that adding event listeners
|
489
|
+
// in bubble phase will have the correct symbols
|
490
|
+
{
|
491
|
+
capture: !0
|
492
|
+
}
|
493
|
+
);
|
494
|
+
})();
|
495
|
+
function _e(e) {
|
496
|
+
return "nodeName" in e;
|
497
|
+
}
|
498
|
+
function et(e) {
|
499
|
+
return _e(e) && e.ownerDocument !== document;
|
500
|
+
}
|
501
|
+
function tt(e) {
|
502
|
+
var r = e.dragLeave, t = r.type, n = r.relatedTarget;
|
503
|
+
return t !== "dragleave" ? !1 : U() ? Qe({
|
504
|
+
dragLeave: r
|
505
|
+
}) : n == null ? !0 : Je() ? et(n) : n instanceof HTMLIFrameElement;
|
506
|
+
}
|
507
|
+
function rt(e) {
|
508
|
+
var r = e.onDragEnd;
|
509
|
+
return [
|
510
|
+
// ## Detecting drag ending for removed draggables
|
511
|
+
//
|
512
|
+
// If a draggable element is removed during a drag and the user drops:
|
513
|
+
// 1. if over a valid drop target: we get a "drop" event to know the drag is finished
|
514
|
+
// 2. if not over a valid drop target (or cancelled): we get nothing
|
515
|
+
// The "dragend" event will not fire on the source draggable if it has been
|
516
|
+
// removed from the DOM.
|
517
|
+
// So we need to figure out if a drag operation has finished by looking at other events
|
518
|
+
// We can do this by looking at other events
|
519
|
+
// ### First detection: "pointermove" events
|
520
|
+
// 1. "pointermove" events cannot fire during a drag and drop operation
|
521
|
+
// according to the spec. So if we get a "pointermove" it means that
|
522
|
+
// the drag and drop operations has finished. So if we get a "pointermove"
|
523
|
+
// we know that the drag is over
|
524
|
+
// 2. 🦊😤 Drag and drop operations are _supposed_ to suppress
|
525
|
+
// other pointer events. However, firefox will allow a few
|
526
|
+
// pointer event to get through after a drag starts.
|
527
|
+
// The most I've seen is 3
|
528
|
+
{
|
529
|
+
type: "pointermove",
|
530
|
+
listener: /* @__PURE__ */ function() {
|
531
|
+
var t = 0;
|
532
|
+
return function() {
|
533
|
+
if (t < 20) {
|
534
|
+
t++;
|
535
|
+
return;
|
536
|
+
}
|
537
|
+
r();
|
538
|
+
};
|
539
|
+
}()
|
540
|
+
},
|
541
|
+
// ### Second detection: "pointerdown" events
|
542
|
+
// If we receive this event then we know that a drag operation has finished
|
543
|
+
// and potentially another one is about to start.
|
544
|
+
// Note: `pointerdown` fires on all browsers / platforms before "dragstart"
|
545
|
+
{
|
546
|
+
type: "pointerdown",
|
547
|
+
listener: r
|
548
|
+
}
|
549
|
+
];
|
550
|
+
}
|
551
|
+
function N(e) {
|
552
|
+
return {
|
553
|
+
altKey: e.altKey,
|
554
|
+
button: e.button,
|
555
|
+
buttons: e.buttons,
|
556
|
+
ctrlKey: e.ctrlKey,
|
557
|
+
metaKey: e.metaKey,
|
558
|
+
shiftKey: e.shiftKey,
|
559
|
+
clientX: e.clientX,
|
560
|
+
clientY: e.clientY,
|
561
|
+
pageX: e.pageX,
|
562
|
+
pageY: e.pageY
|
563
|
+
};
|
564
|
+
}
|
565
|
+
var nt = function(r) {
|
566
|
+
var t = [], n = null, a = function() {
|
567
|
+
for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
|
568
|
+
l[u] = arguments[u];
|
569
|
+
t = l, !n && (n = requestAnimationFrame(function() {
|
570
|
+
n = null, r.apply(void 0, t);
|
571
|
+
}));
|
572
|
+
};
|
573
|
+
return a.cancel = function() {
|
574
|
+
n && (cancelAnimationFrame(n), n = null);
|
575
|
+
}, a;
|
576
|
+
}, Y = nt(function(e) {
|
577
|
+
return e();
|
578
|
+
}), B = /* @__PURE__ */ function() {
|
579
|
+
var e = null;
|
580
|
+
function r(n) {
|
581
|
+
var a = requestAnimationFrame(function() {
|
582
|
+
e = null, n();
|
583
|
+
});
|
584
|
+
e = {
|
585
|
+
frameId: a,
|
586
|
+
fn: n
|
587
|
+
};
|
588
|
+
}
|
589
|
+
function t() {
|
590
|
+
e && (cancelAnimationFrame(e.frameId), e.fn(), e = null);
|
591
|
+
}
|
592
|
+
return {
|
593
|
+
schedule: r,
|
594
|
+
flush: t
|
595
|
+
};
|
596
|
+
}();
|
597
|
+
function at(e) {
|
598
|
+
var r = e.source, t = e.initial, n = e.dispatchEvent, a = {
|
599
|
+
dropTargets: []
|
600
|
+
};
|
601
|
+
function i(l) {
|
602
|
+
n(l), a = {
|
603
|
+
dropTargets: l.payload.location.current.dropTargets
|
604
|
+
};
|
605
|
+
}
|
606
|
+
var o = {
|
607
|
+
start: function(u) {
|
608
|
+
var c = u.nativeSetDragImage, f = {
|
609
|
+
current: t,
|
610
|
+
previous: a,
|
611
|
+
initial: t
|
612
|
+
};
|
613
|
+
i({
|
614
|
+
eventName: "onGenerateDragPreview",
|
615
|
+
payload: {
|
616
|
+
source: r,
|
617
|
+
location: f,
|
618
|
+
nativeSetDragImage: c
|
619
|
+
}
|
620
|
+
}), B.schedule(function() {
|
621
|
+
i({
|
622
|
+
eventName: "onDragStart",
|
623
|
+
payload: {
|
624
|
+
source: r,
|
625
|
+
location: f
|
626
|
+
}
|
627
|
+
});
|
628
|
+
});
|
629
|
+
},
|
630
|
+
dragUpdate: function(u) {
|
631
|
+
var c = u.current;
|
632
|
+
B.flush(), Y.cancel(), i({
|
633
|
+
eventName: "onDropTargetChange",
|
634
|
+
payload: {
|
635
|
+
source: r,
|
636
|
+
location: {
|
637
|
+
initial: t,
|
638
|
+
previous: a,
|
639
|
+
current: c
|
640
|
+
}
|
641
|
+
}
|
642
|
+
});
|
643
|
+
},
|
644
|
+
drag: function(u) {
|
645
|
+
var c = u.current;
|
646
|
+
Y(function() {
|
647
|
+
B.flush();
|
648
|
+
var f = {
|
649
|
+
initial: t,
|
650
|
+
previous: a,
|
651
|
+
current: c
|
652
|
+
};
|
653
|
+
i({
|
654
|
+
eventName: "onDrag",
|
655
|
+
payload: {
|
656
|
+
source: r,
|
657
|
+
location: f
|
658
|
+
}
|
659
|
+
});
|
660
|
+
});
|
661
|
+
},
|
662
|
+
drop: function(u) {
|
663
|
+
var c = u.current, f = u.updatedSourcePayload;
|
664
|
+
B.flush(), Y.cancel(), i({
|
665
|
+
eventName: "onDrop",
|
666
|
+
payload: {
|
667
|
+
source: f ?? r,
|
668
|
+
location: {
|
669
|
+
current: c,
|
670
|
+
previous: a,
|
671
|
+
initial: t
|
672
|
+
}
|
673
|
+
}
|
674
|
+
});
|
675
|
+
}
|
676
|
+
};
|
677
|
+
return o;
|
678
|
+
}
|
679
|
+
var J = {
|
680
|
+
isActive: !1
|
681
|
+
};
|
682
|
+
function Ee() {
|
683
|
+
return !J.isActive;
|
684
|
+
}
|
685
|
+
function it(e) {
|
686
|
+
return e.dataTransfer ? e.dataTransfer.setDragImage.bind(e.dataTransfer) : null;
|
687
|
+
}
|
688
|
+
function ot(e) {
|
689
|
+
var r = e.current, t = e.next;
|
690
|
+
if (r.length !== t.length)
|
691
|
+
return !0;
|
692
|
+
for (var n = 0; n < r.length; n++)
|
693
|
+
if (r[n].element !== t[n].element)
|
694
|
+
return !0;
|
695
|
+
return !1;
|
696
|
+
}
|
697
|
+
function ut(e) {
|
698
|
+
var r = e.event, t = e.dragType, n = e.getDropTargetsOver, a = e.dispatchEvent;
|
699
|
+
if (!Ee())
|
700
|
+
return;
|
701
|
+
var i = lt({
|
702
|
+
event: r,
|
703
|
+
dragType: t,
|
704
|
+
getDropTargetsOver: n
|
705
|
+
});
|
706
|
+
J.isActive = !0;
|
707
|
+
var o = {
|
708
|
+
current: i
|
709
|
+
};
|
710
|
+
q({
|
711
|
+
event: r,
|
712
|
+
current: i.dropTargets
|
713
|
+
});
|
714
|
+
var l = at({
|
715
|
+
source: t.payload,
|
716
|
+
dispatchEvent: a,
|
717
|
+
initial: i
|
718
|
+
});
|
719
|
+
function u(s) {
|
720
|
+
var d = ot({
|
721
|
+
current: o.current.dropTargets,
|
722
|
+
next: s.dropTargets
|
723
|
+
});
|
724
|
+
o.current = s, d && l.dragUpdate({
|
725
|
+
current: o.current
|
726
|
+
});
|
727
|
+
}
|
728
|
+
function c(s) {
|
729
|
+
var d = N(s), g = Ae(s.target) ? Ze({
|
730
|
+
x: d.clientX,
|
731
|
+
y: d.clientY
|
732
|
+
}) : s.target, y = n({
|
733
|
+
target: g,
|
734
|
+
event: s,
|
735
|
+
input: d,
|
736
|
+
source: t.payload,
|
737
|
+
current: o.current.dropTargets
|
738
|
+
});
|
739
|
+
y.length && (s.preventDefault(), q({
|
740
|
+
event: s,
|
741
|
+
current: y
|
742
|
+
})), u({
|
743
|
+
dropTargets: y,
|
744
|
+
input: d
|
745
|
+
});
|
746
|
+
}
|
747
|
+
function f() {
|
748
|
+
o.current.dropTargets.length && u({
|
749
|
+
dropTargets: [],
|
750
|
+
input: o.current.input
|
751
|
+
}), l.drop({
|
752
|
+
current: o.current,
|
753
|
+
updatedSourcePayload: null
|
754
|
+
}), v();
|
755
|
+
}
|
756
|
+
function v() {
|
757
|
+
J.isActive = !1, p();
|
758
|
+
}
|
759
|
+
var p = H.bindAll(
|
760
|
+
window,
|
761
|
+
[{
|
762
|
+
// 👋 Note: we are repurposing the `dragover` event as our `drag` event
|
763
|
+
// this is because firefox does not publish pointer coordinates during
|
764
|
+
// a `drag` event, but does for every other type of drag event
|
765
|
+
// `dragover` fires on all elements that are being dragged over
|
766
|
+
// Because we are binding to `window` - our `dragover` is effectively the same as a `drag`
|
767
|
+
// 🦊😤
|
768
|
+
type: "dragover",
|
769
|
+
listener: function(d) {
|
770
|
+
c(d), l.drag({
|
771
|
+
current: o.current
|
772
|
+
});
|
773
|
+
}
|
774
|
+
}, {
|
775
|
+
type: "dragenter",
|
776
|
+
listener: c
|
777
|
+
}, {
|
778
|
+
type: "dragleave",
|
779
|
+
listener: function(d) {
|
780
|
+
tt({
|
781
|
+
dragLeave: d
|
782
|
+
}) && (u({
|
783
|
+
input: o.current.input,
|
784
|
+
dropTargets: []
|
785
|
+
}), t.startedFrom === "external" && f());
|
786
|
+
}
|
787
|
+
}, {
|
788
|
+
// A "drop" can only happen if the browser allowed the drop
|
789
|
+
type: "drop",
|
790
|
+
listener: function(d) {
|
791
|
+
if (o.current = {
|
792
|
+
dropTargets: o.current.dropTargets,
|
793
|
+
input: N(d)
|
794
|
+
}, !o.current.dropTargets.length) {
|
795
|
+
f();
|
796
|
+
return;
|
797
|
+
}
|
798
|
+
d.preventDefault(), q({
|
799
|
+
event: d,
|
800
|
+
current: o.current.dropTargets
|
801
|
+
}), l.drop({
|
802
|
+
current: o.current,
|
803
|
+
// When dropping something native, we need to extract the latest
|
804
|
+
// `.items` from the "drop" event as it is now accessible
|
805
|
+
updatedSourcePayload: t.type === "external" ? t.getDropPayload(d) : null
|
806
|
+
}), v();
|
807
|
+
}
|
808
|
+
}, {
|
809
|
+
// "dragend" fires when on the drag source (eg a draggable element)
|
810
|
+
// when the drag is finished.
|
811
|
+
// "dragend" will fire after "drop" (if there was a successful drop)
|
812
|
+
// "dragend" does not fire if the draggable source has been removed during the drag
|
813
|
+
// or for external drag sources (eg files)
|
814
|
+
// This "dragend" listener will not fire if there was a successful drop
|
815
|
+
// as we will have already removed the event listener
|
816
|
+
type: "dragend",
|
817
|
+
listener: function(d) {
|
818
|
+
o.current = {
|
819
|
+
dropTargets: o.current.dropTargets,
|
820
|
+
input: N(d)
|
821
|
+
}, f();
|
822
|
+
}
|
823
|
+
}].concat(Te(rt({
|
824
|
+
onDragEnd: f
|
825
|
+
}))),
|
826
|
+
// Once we have started a managed drag operation it is important that we see / own all drag events
|
827
|
+
// We got one adoption bug pop up where some code was stopping (`event.stopPropagation()`)
|
828
|
+
// all "drop" events in the bubble phase on the `document.body`.
|
829
|
+
// This meant that we never saw the "drop" event.
|
830
|
+
{
|
831
|
+
capture: !0
|
832
|
+
}
|
833
|
+
);
|
834
|
+
l.start({
|
835
|
+
nativeSetDragImage: it(r)
|
836
|
+
});
|
837
|
+
}
|
838
|
+
function q(e) {
|
839
|
+
var r, t = e.event, n = e.current, a = (r = n[0]) === null || r === void 0 ? void 0 : r.dropEffect;
|
840
|
+
a != null && t.dataTransfer && (t.dataTransfer.dropEffect = a);
|
841
|
+
}
|
842
|
+
function lt(e) {
|
843
|
+
var r = e.event, t = e.dragType, n = e.getDropTargetsOver, a = N(r);
|
844
|
+
if (t.startedFrom === "external")
|
845
|
+
return {
|
846
|
+
input: a,
|
847
|
+
dropTargets: []
|
848
|
+
};
|
849
|
+
var i = n({
|
850
|
+
input: a,
|
851
|
+
source: t.payload,
|
852
|
+
target: r.target,
|
853
|
+
event: r,
|
854
|
+
current: []
|
855
|
+
});
|
856
|
+
return {
|
857
|
+
input: a,
|
858
|
+
dropTargets: i
|
859
|
+
};
|
860
|
+
}
|
861
|
+
var fe = {
|
862
|
+
canStart: Ee,
|
863
|
+
start: ut
|
864
|
+
}, Q = /* @__PURE__ */ new Map();
|
865
|
+
function ct(e) {
|
866
|
+
var r = e.typeKey, t = e.mount, n = Q.get(r);
|
867
|
+
if (n)
|
868
|
+
return n.usageCount++, n;
|
869
|
+
var a = {
|
870
|
+
typeKey: r,
|
871
|
+
unmount: t(),
|
872
|
+
usageCount: 1
|
873
|
+
};
|
874
|
+
return Q.set(r, a), a;
|
875
|
+
}
|
876
|
+
function st(e) {
|
877
|
+
var r = ct(e);
|
878
|
+
return function() {
|
879
|
+
r.usageCount--, !(r.usageCount > 0) && (r.unmount(), Q.delete(e.typeKey));
|
880
|
+
};
|
881
|
+
}
|
882
|
+
function te() {
|
883
|
+
for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++)
|
884
|
+
r[t] = arguments[t];
|
885
|
+
return function() {
|
886
|
+
r.forEach(function(a) {
|
887
|
+
return a();
|
888
|
+
});
|
889
|
+
};
|
890
|
+
}
|
891
|
+
function Pe(e, r) {
|
892
|
+
var t = r.attribute, n = r.value;
|
893
|
+
return e.setAttribute(t, n), function() {
|
894
|
+
return e.removeAttribute(t);
|
895
|
+
};
|
896
|
+
}
|
897
|
+
function pe(e, r) {
|
898
|
+
var t = Object.keys(e);
|
899
|
+
if (Object.getOwnPropertySymbols) {
|
900
|
+
var n = Object.getOwnPropertySymbols(e);
|
901
|
+
r && (n = n.filter(function(a) {
|
902
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
903
|
+
})), t.push.apply(t, n);
|
904
|
+
}
|
905
|
+
return t;
|
906
|
+
}
|
907
|
+
function F(e) {
|
908
|
+
for (var r = 1; r < arguments.length; r++) {
|
909
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
910
|
+
r % 2 ? pe(Object(t), !0).forEach(function(n) {
|
911
|
+
_(e, n, t[n]);
|
912
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : pe(Object(t)).forEach(function(n) {
|
913
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
914
|
+
});
|
915
|
+
}
|
916
|
+
return e;
|
917
|
+
}
|
918
|
+
function z(e, r) {
|
919
|
+
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
920
|
+
if (!t) {
|
921
|
+
if (Array.isArray(e) || (t = dt(e)) || r) {
|
922
|
+
t && (e = t);
|
923
|
+
var n = 0, a = function() {
|
924
|
+
};
|
925
|
+
return { s: a, n: function() {
|
926
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
927
|
+
}, e: function(c) {
|
928
|
+
throw c;
|
929
|
+
}, f: a };
|
930
|
+
}
|
931
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
932
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
933
|
+
}
|
934
|
+
var i, o = !0, l = !1;
|
935
|
+
return { s: function() {
|
936
|
+
t = t.call(e);
|
937
|
+
}, n: function() {
|
938
|
+
var c = t.next();
|
939
|
+
return o = c.done, c;
|
940
|
+
}, e: function(c) {
|
941
|
+
l = !0, i = c;
|
942
|
+
}, f: function() {
|
943
|
+
try {
|
944
|
+
o || t.return == null || t.return();
|
945
|
+
} finally {
|
946
|
+
if (l) throw i;
|
947
|
+
}
|
948
|
+
} };
|
949
|
+
}
|
950
|
+
function dt(e, r) {
|
951
|
+
if (e) {
|
952
|
+
if (typeof e == "string") return ve(e, r);
|
953
|
+
var t = {}.toString.call(e).slice(8, -1);
|
954
|
+
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ve(e, r) : void 0;
|
955
|
+
}
|
956
|
+
}
|
957
|
+
function ve(e, r) {
|
958
|
+
(r == null || r > e.length) && (r = e.length);
|
959
|
+
for (var t = 0, n = Array(r); t < r; t++) n[t] = e[t];
|
960
|
+
return n;
|
961
|
+
}
|
962
|
+
function G(e) {
|
963
|
+
return e.slice(0).reverse();
|
964
|
+
}
|
965
|
+
function ft(e) {
|
966
|
+
var r = e.typeKey, t = e.defaultDropEffect, n = /* @__PURE__ */ new WeakMap(), a = "data-drop-target-for-".concat(r), i = "[".concat(a, "]");
|
967
|
+
function o(s) {
|
968
|
+
return n.set(s.element, s), function() {
|
969
|
+
return n.delete(s.element);
|
970
|
+
};
|
971
|
+
}
|
972
|
+
function l(s) {
|
973
|
+
return te(Pe(s.element, {
|
974
|
+
attribute: a,
|
975
|
+
value: "true"
|
976
|
+
}), o(s));
|
977
|
+
}
|
978
|
+
function u(s) {
|
979
|
+
var d, g, y, S, O = s.source, w = s.target, m = s.input, T = s.event, b = s.result, h = b === void 0 ? [] : b;
|
980
|
+
if (T === void 0)
|
981
|
+
return h;
|
982
|
+
const E = T.composedPath();
|
983
|
+
if (w = E.find((K) => K instanceof Element ? K.hasAttribute("data-drop-target-for-element") : !1), w = w ?? E[0], !(w instanceof Element))
|
984
|
+
return w instanceof Node ? u({
|
985
|
+
source: O,
|
986
|
+
target: w.parentElement,
|
987
|
+
input: m,
|
988
|
+
result: h
|
989
|
+
}) : h;
|
990
|
+
var j = w.closest(i);
|
991
|
+
if (j == null)
|
992
|
+
return h;
|
993
|
+
var D = n.get(j);
|
994
|
+
if (D == null)
|
995
|
+
return h;
|
996
|
+
var P = {
|
997
|
+
input: m,
|
998
|
+
source: O,
|
999
|
+
element: D.element
|
1000
|
+
};
|
1001
|
+
if (D.canDrop && !D.canDrop(P))
|
1002
|
+
return u({
|
1003
|
+
source: O,
|
1004
|
+
target: D.element.parentElement,
|
1005
|
+
input: m,
|
1006
|
+
result: h
|
1007
|
+
});
|
1008
|
+
var x = (d = (g = D.getData) === null || g === void 0 ? void 0 : g.call(D, P)) !== null && d !== void 0 ? d : {}, A = (y = (S = D.getDropEffect) === null || S === void 0 ? void 0 : S.call(D, P)) !== null && y !== void 0 ? y : t, I = {
|
1009
|
+
data: x,
|
1010
|
+
element: D.element,
|
1011
|
+
dropEffect: A,
|
1012
|
+
// we are collecting _actual_ drop targets, so these are
|
1013
|
+
// being applied _not_ due to stickiness
|
1014
|
+
isActiveDueToStickiness: !1
|
1015
|
+
};
|
1016
|
+
return u({
|
1017
|
+
source: O,
|
1018
|
+
target: D.element.parentElement,
|
1019
|
+
input: m,
|
1020
|
+
// Using bubble ordering. Same ordering as `event.getPath()`
|
1021
|
+
result: [].concat(Te(h), [I])
|
1022
|
+
});
|
1023
|
+
}
|
1024
|
+
function c(s) {
|
1025
|
+
var d = s.eventName, g = s.payload, y = z(g.location.current.dropTargets), S;
|
1026
|
+
try {
|
1027
|
+
for (y.s(); !(S = y.n()).done; ) {
|
1028
|
+
var O, w = S.value, m = n.get(w.element), T = F(F({}, g), {}, {
|
1029
|
+
self: w
|
1030
|
+
});
|
1031
|
+
m == null || (O = m[d]) === null || O === void 0 || O.call(
|
1032
|
+
m,
|
1033
|
+
// I cannot seem to get the types right here.
|
1034
|
+
// TS doesn't seem to like that one event can need `nativeSetDragImage`
|
1035
|
+
// @ts-expect-error
|
1036
|
+
T
|
1037
|
+
);
|
1038
|
+
}
|
1039
|
+
} catch (b) {
|
1040
|
+
y.e(b);
|
1041
|
+
} finally {
|
1042
|
+
y.f();
|
1043
|
+
}
|
1044
|
+
}
|
1045
|
+
var f = {
|
1046
|
+
onGenerateDragPreview: c,
|
1047
|
+
onDrag: c,
|
1048
|
+
onDragStart: c,
|
1049
|
+
onDrop: c,
|
1050
|
+
onDropTargetChange: function(d) {
|
1051
|
+
var g = d.payload, y = new Set(g.location.current.dropTargets.map(function(R) {
|
1052
|
+
return R.element;
|
1053
|
+
})), S = /* @__PURE__ */ new Set(), O = z(g.location.previous.dropTargets), w;
|
1054
|
+
try {
|
1055
|
+
for (O.s(); !(w = O.n()).done; ) {
|
1056
|
+
var m, T = w.value;
|
1057
|
+
S.add(T.element);
|
1058
|
+
var b = n.get(T.element), h = y.has(T.element), E = F(F({}, g), {}, {
|
1059
|
+
self: T
|
1060
|
+
});
|
1061
|
+
if (b == null || (m = b.onDropTargetChange) === null || m === void 0 || m.call(b, E), !h) {
|
1062
|
+
var j;
|
1063
|
+
b == null || (j = b.onDragLeave) === null || j === void 0 || j.call(b, E);
|
1064
|
+
}
|
1065
|
+
}
|
1066
|
+
} catch (R) {
|
1067
|
+
O.e(R);
|
1068
|
+
} finally {
|
1069
|
+
O.f();
|
1070
|
+
}
|
1071
|
+
var D = z(g.location.current.dropTargets), P;
|
1072
|
+
try {
|
1073
|
+
for (D.s(); !(P = D.n()).done; ) {
|
1074
|
+
var x, A, I = P.value;
|
1075
|
+
if (!S.has(I.element)) {
|
1076
|
+
var K = F(F({}, g), {}, {
|
1077
|
+
self: I
|
1078
|
+
}), C = n.get(I.element);
|
1079
|
+
C == null || (x = C.onDropTargetChange) === null || x === void 0 || x.call(C, K), C == null || (A = C.onDragEnter) === null || A === void 0 || A.call(C, K);
|
1080
|
+
}
|
1081
|
+
}
|
1082
|
+
} catch (R) {
|
1083
|
+
D.e(R);
|
1084
|
+
} finally {
|
1085
|
+
D.f();
|
1086
|
+
}
|
1087
|
+
}
|
1088
|
+
};
|
1089
|
+
function v(s) {
|
1090
|
+
f[s.eventName](s);
|
1091
|
+
}
|
1092
|
+
function p(s) {
|
1093
|
+
var d = s.source, g = s.target, y = s.input, S = s.event, O = s.current, w = u({
|
1094
|
+
source: d,
|
1095
|
+
target: g,
|
1096
|
+
event: S,
|
1097
|
+
input: y
|
1098
|
+
});
|
1099
|
+
if (w.length >= O.length)
|
1100
|
+
return w;
|
1101
|
+
for (var m = G(O), T = G(w), b = [], h = 0; h < m.length; h++) {
|
1102
|
+
var E, j = m[h], D = T[h];
|
1103
|
+
if (D != null) {
|
1104
|
+
b.push(D);
|
1105
|
+
continue;
|
1106
|
+
}
|
1107
|
+
var P = b[h - 1], x = m[h - 1];
|
1108
|
+
if ((P == null ? void 0 : P.element) !== (x == null ? void 0 : x.element))
|
1109
|
+
break;
|
1110
|
+
var A = n.get(j.element);
|
1111
|
+
if (!A)
|
1112
|
+
break;
|
1113
|
+
var I = {
|
1114
|
+
input: y,
|
1115
|
+
source: d,
|
1116
|
+
element: A.element
|
1117
|
+
};
|
1118
|
+
if (A.canDrop && !A.canDrop(I) || !((E = A.getIsSticky) !== null && E !== void 0 && E.call(A, I)))
|
1119
|
+
break;
|
1120
|
+
b.push(F(F({}, j), {}, {
|
1121
|
+
// making it clear to consumers this drop target is active due to stickiness
|
1122
|
+
isActiveDueToStickiness: !0
|
1123
|
+
}));
|
1124
|
+
}
|
1125
|
+
return G(b);
|
1126
|
+
}
|
1127
|
+
return {
|
1128
|
+
dropTargetForConsumers: l,
|
1129
|
+
getIsOver: p,
|
1130
|
+
dispatchEvent: v
|
1131
|
+
};
|
1132
|
+
}
|
1133
|
+
function pt(e, r) {
|
1134
|
+
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
1135
|
+
if (!t) {
|
1136
|
+
if (Array.isArray(e) || (t = vt(e)) || r) {
|
1137
|
+
t && (e = t);
|
1138
|
+
var n = 0, a = function() {
|
1139
|
+
};
|
1140
|
+
return { s: a, n: function() {
|
1141
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
1142
|
+
}, e: function(c) {
|
1143
|
+
throw c;
|
1144
|
+
}, f: a };
|
1145
|
+
}
|
1146
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
1147
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
1148
|
+
}
|
1149
|
+
var i, o = !0, l = !1;
|
1150
|
+
return { s: function() {
|
1151
|
+
t = t.call(e);
|
1152
|
+
}, n: function() {
|
1153
|
+
var c = t.next();
|
1154
|
+
return o = c.done, c;
|
1155
|
+
}, e: function(c) {
|
1156
|
+
l = !0, i = c;
|
1157
|
+
}, f: function() {
|
1158
|
+
try {
|
1159
|
+
o || t.return == null || t.return();
|
1160
|
+
} finally {
|
1161
|
+
if (l) throw i;
|
1162
|
+
}
|
1163
|
+
} };
|
1164
|
+
}
|
1165
|
+
function vt(e, r) {
|
1166
|
+
if (e) {
|
1167
|
+
if (typeof e == "string") return ge(e, r);
|
1168
|
+
var t = {}.toString.call(e).slice(8, -1);
|
1169
|
+
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ge(e, r) : void 0;
|
1170
|
+
}
|
1171
|
+
}
|
1172
|
+
function ge(e, r) {
|
1173
|
+
(r == null || r > e.length) && (r = e.length);
|
1174
|
+
for (var t = 0, n = Array(r); t < r; t++) n[t] = e[t];
|
1175
|
+
return n;
|
1176
|
+
}
|
1177
|
+
function ye(e, r) {
|
1178
|
+
var t = Object.keys(e);
|
1179
|
+
if (Object.getOwnPropertySymbols) {
|
1180
|
+
var n = Object.getOwnPropertySymbols(e);
|
1181
|
+
r && (n = n.filter(function(a) {
|
1182
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
1183
|
+
})), t.push.apply(t, n);
|
1184
|
+
}
|
1185
|
+
return t;
|
1186
|
+
}
|
1187
|
+
function gt(e) {
|
1188
|
+
for (var r = 1; r < arguments.length; r++) {
|
1189
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
1190
|
+
r % 2 ? ye(Object(t), !0).forEach(function(n) {
|
1191
|
+
_(e, n, t[n]);
|
1192
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ye(Object(t)).forEach(function(n) {
|
1193
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
1194
|
+
});
|
1195
|
+
}
|
1196
|
+
return e;
|
1197
|
+
}
|
1198
|
+
function yt() {
|
1199
|
+
var e = /* @__PURE__ */ new Set(), r = null;
|
1200
|
+
function t(i) {
|
1201
|
+
r && (!i.canMonitor || i.canMonitor(r.canMonitorArgs)) && r.active.add(i);
|
1202
|
+
}
|
1203
|
+
function n(i) {
|
1204
|
+
var o = gt({}, i);
|
1205
|
+
return e.add(o), t(o), function() {
|
1206
|
+
e.delete(o), r && r.active.delete(o);
|
1207
|
+
};
|
1208
|
+
}
|
1209
|
+
function a(i) {
|
1210
|
+
var o = i.eventName, l = i.payload;
|
1211
|
+
if (o === "onGenerateDragPreview") {
|
1212
|
+
r = {
|
1213
|
+
canMonitorArgs: {
|
1214
|
+
initial: l.location.initial,
|
1215
|
+
source: l.source
|
1216
|
+
},
|
1217
|
+
active: /* @__PURE__ */ new Set()
|
1218
|
+
};
|
1219
|
+
var u = pt(e), c;
|
1220
|
+
try {
|
1221
|
+
for (u.s(); !(c = u.n()).done; ) {
|
1222
|
+
var f = c.value;
|
1223
|
+
t(f);
|
1224
|
+
}
|
1225
|
+
} catch (y) {
|
1226
|
+
u.e(y);
|
1227
|
+
} finally {
|
1228
|
+
u.f();
|
1229
|
+
}
|
1230
|
+
}
|
1231
|
+
if (r) {
|
1232
|
+
for (var v = Array.from(r.active), p = 0, s = v; p < s.length; p++) {
|
1233
|
+
var d = s[p];
|
1234
|
+
if (r.active.has(d)) {
|
1235
|
+
var g;
|
1236
|
+
(g = d[o]) === null || g === void 0 || g.call(d, l);
|
1237
|
+
}
|
1238
|
+
}
|
1239
|
+
o === "onDrop" && (r.active.clear(), r = null);
|
1240
|
+
}
|
1241
|
+
}
|
1242
|
+
return {
|
1243
|
+
dispatchEvent: a,
|
1244
|
+
monitorForConsumers: n
|
1245
|
+
};
|
1246
|
+
}
|
1247
|
+
function mt(e) {
|
1248
|
+
var r = e.typeKey, t = e.mount, n = e.dispatchEventToSource, a = e.onPostDispatch, i = e.defaultDropEffect, o = yt(), l = ft({
|
1249
|
+
typeKey: r,
|
1250
|
+
defaultDropEffect: i
|
1251
|
+
});
|
1252
|
+
function u(v) {
|
1253
|
+
n == null || n(v), l.dispatchEvent(v), o.dispatchEvent(v), a == null || a(v);
|
1254
|
+
}
|
1255
|
+
function c(v) {
|
1256
|
+
var p = v.event, s = v.dragType;
|
1257
|
+
fe.start({
|
1258
|
+
event: p,
|
1259
|
+
dragType: s,
|
1260
|
+
getDropTargetsOver: l.getIsOver,
|
1261
|
+
dispatchEvent: u
|
1262
|
+
});
|
1263
|
+
}
|
1264
|
+
function f() {
|
1265
|
+
function v() {
|
1266
|
+
var p = {
|
1267
|
+
canStart: fe.canStart,
|
1268
|
+
start: c
|
1269
|
+
};
|
1270
|
+
return t(p);
|
1271
|
+
}
|
1272
|
+
return st({
|
1273
|
+
typeKey: r,
|
1274
|
+
mount: v
|
1275
|
+
});
|
1276
|
+
}
|
1277
|
+
return {
|
1278
|
+
registerUsage: f,
|
1279
|
+
dropTarget: l.dropTargetForConsumers,
|
1280
|
+
monitor: o.monitorForConsumers
|
1281
|
+
};
|
1282
|
+
}
|
1283
|
+
var bt = ee(function() {
|
1284
|
+
return navigator.userAgent.toLocaleLowerCase().includes("android");
|
1285
|
+
}), ht = "pdnd:android-fallback", me = "text/plain", Ot = "text/uri-list", wt = "application/vnd.pdnd", W = /* @__PURE__ */ new WeakMap();
|
1286
|
+
function Dt(e) {
|
1287
|
+
return W.set(e.element, e), function() {
|
1288
|
+
W.delete(e.element);
|
1289
|
+
};
|
1290
|
+
}
|
1291
|
+
var be = qe(), re = mt({
|
1292
|
+
typeKey: "element",
|
1293
|
+
defaultDropEffect: "move",
|
1294
|
+
mount: function(r) {
|
1295
|
+
return te(be.bindEvents(), H.bind(document, {
|
1296
|
+
type: "dragstart",
|
1297
|
+
listener: function(n) {
|
1298
|
+
var a, i, o, l, u, c;
|
1299
|
+
if (!r.canStart(n) || n.defaultPrevented || !n.dataTransfer)
|
1300
|
+
return;
|
1301
|
+
const v = n.composedPath().find((h) => h instanceof HTMLElement && W.has(h));
|
1302
|
+
if (!v)
|
1303
|
+
return null;
|
1304
|
+
const p = W.get(v);
|
1305
|
+
if (!p)
|
1306
|
+
return null;
|
1307
|
+
var s = N(n), d = {
|
1308
|
+
element: p.element,
|
1309
|
+
dragHandle: (a = p.dragHandle) !== null && a !== void 0 ? a : null,
|
1310
|
+
input: s
|
1311
|
+
};
|
1312
|
+
if (p.canDrag && !p.canDrag(d))
|
1313
|
+
return n.preventDefault(), null;
|
1314
|
+
if (p.dragHandle) {
|
1315
|
+
const E = (v.shadowRoot || document).elementFromPoint(s.clientX, s.clientY);
|
1316
|
+
if (!p.dragHandle.contains(E))
|
1317
|
+
return n.preventDefault(), null;
|
1318
|
+
}
|
1319
|
+
var g = (i = (o = p.getInitialDataForExternal) === null || o === void 0 ? void 0 : o.call(p, d)) !== null && i !== void 0 ? i : null;
|
1320
|
+
if (g)
|
1321
|
+
for (var y = 0, S = Object.entries(g); y < S.length; y++) {
|
1322
|
+
var O = Oe(S[y], 2), w = O[0], m = O[1];
|
1323
|
+
n.dataTransfer.setData(w, m ?? "");
|
1324
|
+
}
|
1325
|
+
bt() && !n.dataTransfer.types.includes(me) && !n.dataTransfer.types.includes(Ot) && n.dataTransfer.setData(me, ht), n.dataTransfer.setData(wt, "");
|
1326
|
+
var T = {
|
1327
|
+
element: p.element,
|
1328
|
+
dragHandle: (l = p.dragHandle) !== null && l !== void 0 ? l : null,
|
1329
|
+
data: (u = (c = p.getInitialData) === null || c === void 0 ? void 0 : c.call(p, d)) !== null && u !== void 0 ? u : {}
|
1330
|
+
}, b = {
|
1331
|
+
type: "element",
|
1332
|
+
payload: T,
|
1333
|
+
startedFrom: "internal"
|
1334
|
+
};
|
1335
|
+
r.start({
|
1336
|
+
event: n,
|
1337
|
+
dragType: b
|
1338
|
+
});
|
1339
|
+
}
|
1340
|
+
}));
|
1341
|
+
},
|
1342
|
+
dispatchEventToSource: function(r) {
|
1343
|
+
var t, n, a = r.eventName, i = r.payload;
|
1344
|
+
(t = W.get(i.source.element)) === null || t === void 0 || (n = t[a]) === null || n === void 0 || n.call(
|
1345
|
+
t,
|
1346
|
+
// I cannot seem to get the types right here.
|
1347
|
+
// TS doesn't seem to like that one event can need `nativeSetDragImage`
|
1348
|
+
// @ts-expect-error
|
1349
|
+
i
|
1350
|
+
);
|
1351
|
+
},
|
1352
|
+
onPostDispatch: be.getOnPostDispatch()
|
1353
|
+
}), Et = re.dropTarget, St = re.monitor;
|
1354
|
+
function Pt(e) {
|
1355
|
+
return te(
|
1356
|
+
// making the draggable register the adapter rather than drop targets
|
1357
|
+
// this is because you *must* have a draggable element to start a drag
|
1358
|
+
// but you _might_ not have any drop targets immediately
|
1359
|
+
// (You might create drop targets async)
|
1360
|
+
re.registerUsage(),
|
1361
|
+
Dt(e),
|
1362
|
+
Pe(e.element, {
|
1363
|
+
attribute: "draggable",
|
1364
|
+
value: "true"
|
1365
|
+
})
|
1366
|
+
);
|
1367
|
+
}
|
1368
|
+
function Tt() {
|
1369
|
+
return {
|
1370
|
+
x: 0,
|
1371
|
+
y: 0
|
1372
|
+
};
|
1373
|
+
}
|
1374
|
+
function jt(e) {
|
1375
|
+
var r = e.render, t = e.nativeSetDragImage, n = e.getOffset, a = n === void 0 ? Tt : n, i = document.createElement("div");
|
1376
|
+
Object.assign(i.style, {
|
1377
|
+
// Ensuring we don't cause reflow when adding the element to the page
|
1378
|
+
// Using `position:fixed` rather than `position:absolute` so we are
|
1379
|
+
// positioned on the current viewport.
|
1380
|
+
// `position:fixed` also creates a new stacking context, so we don't need to do that here
|
1381
|
+
position: "fixed",
|
1382
|
+
// According to `mdn`, the element can be offscreen:
|
1383
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setDragImage#imgelement
|
1384
|
+
//
|
1385
|
+
// However, that information does not appear in the specs:
|
1386
|
+
// https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-setdragimage-dev
|
1387
|
+
//
|
1388
|
+
// If the element is _completely_ offscreen, Safari@17.1 will cancel the drag
|
1389
|
+
top: 0,
|
1390
|
+
left: 0,
|
1391
|
+
// Using maximum possible z-index so that this element will always be on top
|
1392
|
+
// https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index
|
1393
|
+
// Did not use `layers` in `@atlaskit/theme` because:
|
1394
|
+
// 1. This element is not a 'layer' in the conventional sense, as this element
|
1395
|
+
// is only created for a single frame for the browser to take a photo of it,
|
1396
|
+
// and then it is destroyed
|
1397
|
+
// 2. Did not want to add a dependency onto `@atlaskit/theme`
|
1398
|
+
// 3. Want to always be on top of product UI which might have higher z-index's
|
1399
|
+
zIndex: De,
|
1400
|
+
// Avoiding any additional events caused by the new element (being super safe)
|
1401
|
+
pointerEvents: "none"
|
1402
|
+
}), document.body.append(i);
|
1403
|
+
var o = r({
|
1404
|
+
container: i
|
1405
|
+
});
|
1406
|
+
queueMicrotask(function() {
|
1407
|
+
var c = a({
|
1408
|
+
container: i
|
1409
|
+
});
|
1410
|
+
if (U()) {
|
1411
|
+
var f = i.getBoundingClientRect();
|
1412
|
+
if (f.width === 0)
|
1413
|
+
return;
|
1414
|
+
i.style.left = "-".concat(f.width - 1e-4, "px");
|
1415
|
+
}
|
1416
|
+
t == null || t(i, c.x, c.y);
|
1417
|
+
});
|
1418
|
+
function l() {
|
1419
|
+
u(), o == null || o(), document.body.removeChild(i);
|
1420
|
+
}
|
1421
|
+
var u = St({
|
1422
|
+
// Remove portal in the dragstart event so that the user will never see it
|
1423
|
+
onDragStart: l,
|
1424
|
+
// Backup: remove portal when the drop finishes (this would be an error case)
|
1425
|
+
onDrop: l
|
1426
|
+
});
|
1427
|
+
}
|
1428
|
+
const xt = (e, r) => {
|
1429
|
+
let t = getComputedStyle(e).getPropertyValue(r);
|
1430
|
+
for (; !t && e.parentElement; )
|
1431
|
+
e = e.parentElement, t = getComputedStyle(e).getPropertyValue(r);
|
1432
|
+
return t.trim();
|
1433
|
+
};
|
1434
|
+
export {
|
1435
|
+
_,
|
1436
|
+
Et as a,
|
1437
|
+
je as b,
|
1438
|
+
xe as c,
|
1439
|
+
Pt as d,
|
1440
|
+
xt as g,
|
1441
|
+
ne as i,
|
1442
|
+
At as l,
|
1443
|
+
jt as s
|
1444
|
+
};
|