nam-rich-text-editor 9.2.0 → 9.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import Qr, { forwardRef as Zr, useRef as Ft, useImperativeHandle as eo, useEffect as In } from "react";
1
+ import Qr, { forwardRef as Zr, useRef as Xe, useEffect as Ht, useImperativeHandle as eo } from "react";
2
2
  function to() {
3
3
  const v = document.createElement("select");
4
4
  return v.innerHTML = `
@@ -176,63 +176,69 @@ const To = [
176
176
  ["path", { d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" }],
177
177
  ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2" }]
178
178
  ];
179
- function _o() {
180
- const v = document.createDocumentFragment();
181
- return [
182
- { command: "bold", icon: io, title: "Bold" },
183
- { command: "italic", icon: so, title: "Italic" },
184
- { command: "underline", icon: Co, title: "Underline" },
185
- { command: "strikeThrough", icon: bo, title: "Strikethrough" }
186
- ].forEach((p) => {
187
- const u = document.createElement("div");
188
- u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (g) => {
189
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
190
- });
191
- const m = ye(p.icon, { width: 16, height: 16 });
192
- u.appendChild(m), u.title = p.title, u.style.fontWeight = p.command === "bold" ? "bold" : "normal", u.style.fontStyle = p.command === "italic" ? "italic" : "normal", u.style.textDecoration = p.command === "underline" ? "underline" : "none", u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => document.execCommand(p.command), v.appendChild(u);
193
- }), v;
194
- }
195
- let Je = null;
196
- function pe(v) {
179
+ let Qe = null;
180
+ function de(v) {
197
181
  if (v) {
198
- Je = v.cloneRange();
182
+ Qe = v.cloneRange();
199
183
  return;
200
184
  }
201
185
  const h = window.getSelection();
202
186
  if (!h || h.rangeCount === 0) {
203
- Je = null;
187
+ Qe = null;
204
188
  return;
205
189
  }
206
- Je = h.getRangeAt(0).cloneRange();
190
+ Qe = h.getRangeAt(0).cloneRange();
207
191
  }
208
- function Ne() {
192
+ function Ae() {
209
193
  const v = window.getSelection();
210
- v && (v.removeAllRanges(), Je && v.addRange(Je.cloneRange()));
194
+ v && (v.removeAllRanges(), Qe && v.addRange(Qe.cloneRange()));
211
195
  }
212
196
  function Fn(v, h) {
213
197
  const p = window.getSelection();
214
198
  if (!p || p.rangeCount === 0) return;
215
199
  const u = p.getRangeAt(0);
216
200
  if (!u.collapsed) {
217
- const E = document.createElement("span");
218
- E.style[v] = h;
219
- const x = u.extractContents();
220
- E.appendChild(x), u.insertNode(E), p.removeAllRanges();
221
- const C = document.createRange();
222
- C.selectNodeContents(E), p.addRange(C), pe(C);
201
+ const w = document.createElement("span");
202
+ w.style[v] = h;
203
+ const y = u.extractContents();
204
+ w.appendChild(y), u.insertNode(w), p.removeAllRanges();
205
+ const _ = document.createRange();
206
+ _.selectNodeContents(w), p.addRange(_), de(_);
223
207
  return;
224
208
  }
225
209
  const m = document.createElement("span");
226
210
  m.style[v] = h, m.appendChild(document.createTextNode("​")), u.insertNode(m), p.removeAllRanges();
227
211
  const g = document.createRange();
228
- g.setStart(m.firstChild, 0), g.setEnd(m.firstChild, 0), p.addRange(g), pe(g);
212
+ g.setStart(m.firstChild, 0), g.setEnd(m.firstChild, 0), p.addRange(g), de(g);
229
213
  }
230
- function Mo(v) {
214
+ function _o(v) {
231
215
  Fn("color", v);
232
216
  }
233
- function Ro(v) {
217
+ function Mo(v) {
234
218
  Fn("backgroundColor", v);
235
219
  }
220
+ function Ro() {
221
+ const v = document.createDocumentFragment();
222
+ return [
223
+ { command: "bold", icon: io, title: "Bold" },
224
+ { command: "italic", icon: so, title: "Italic" },
225
+ { command: "underline", icon: Co, title: "Underline" },
226
+ { command: "strikeThrough", icon: bo, title: "Strikethrough" }
227
+ ].forEach((p) => {
228
+ const u = document.createElement("div");
229
+ u.setAttribute("role", "button"), u.tabIndex = 0, u.style.userSelect = "none", u.addEventListener("keydown", (g) => {
230
+ (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
231
+ });
232
+ const m = ye(p.icon, { width: 16, height: 16 });
233
+ u.appendChild(m), u.title = p.title, u.style.fontWeight = p.command === "bold" ? "bold" : "normal", u.style.fontStyle = p.command === "italic" ? "italic" : "normal", u.style.textDecoration = p.command === "underline" ? "underline" : "none", u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (g) => {
234
+ g.preventDefault(), de();
235
+ }), u.onclick = (g) => {
236
+ g.preventDefault();
237
+ const w = u.closest(".editor-container")?.querySelector(".editor");
238
+ w && (Ae(), w.focus()), document.execCommand(p.command), w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
239
+ }, v.appendChild(u);
240
+ }), v;
241
+ }
236
242
  function Ao() {
237
243
  const v = document.createDocumentFragment(), h = document.createElement("input");
238
244
  h.type = "color", h.style.display = "none", h.title = "Text Color";
@@ -240,7 +246,7 @@ function Ao() {
240
246
  p.setAttribute("role", "button"), p.tabIndex = 0, p.style.userSelect = "none", p.addEventListener("keydown", (g) => {
241
247
  (g.key === "Enter" || g.key === " ") && (g.preventDefault(), p.click());
242
248
  }), p.textContent = "A", p.style.color = "#000", p.style.fontSize = "16px", p.style.fontWeight = "bold", p.style.border = "1px solid #ccc", p.style.borderRadius = "4px", p.style.padding = "4px 8px", p.style.cursor = "pointer", p.style.backgroundColor = "#fff", p.title = "Text Color", p.onclick = () => h.click(), h.onchange = () => {
243
- Ne(), Mo(h.value), p.style.color = h.value;
249
+ Ae(), _o(h.value), p.style.color = h.value;
244
250
  }, v.appendChild(p), v.appendChild(h);
245
251
  const u = document.createElement("input");
246
252
  u.type = "color", u.style.display = "none", u.title = "Background Color";
@@ -248,7 +254,7 @@ function Ao() {
248
254
  return m.setAttribute("role", "button"), m.tabIndex = 0, m.style.userSelect = "none", m.addEventListener("keydown", (g) => {
249
255
  (g.key === "Enter" || g.key === " ") && (g.preventDefault(), m.click());
250
256
  }), m.textContent = "BA", m.style.color = "#000", m.style.fontSize = "14px", m.style.fontWeight = "bold", m.style.border = "1px solid #ccc", m.style.borderRadius = "4px", m.style.padding = "4px 6px", m.style.cursor = "pointer", m.style.backgroundColor = "#fff", m.title = "Background Color", m.onclick = () => u.click(), u.onchange = () => {
251
- Ne(), Ro(u.value), m.style.backgroundColor = u.value, m.style.color = "#000";
257
+ Ae(), Mo(u.value), m.style.backgroundColor = u.value, m.style.color = "#000";
252
258
  }, v.appendChild(m), v.appendChild(u), v;
253
259
  }
254
260
  function Io() {
@@ -284,38 +290,42 @@ function Io() {
284
290
  (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
285
291
  });
286
292
  const m = ye(p.icon, { width: 16, height: 16 });
287
- u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => {
288
- const g = window.getSelection();
289
- if (g && g.rangeCount > 0) {
290
- let x = g.anchorNode;
291
- for (; x && x.nodeType !== Node.ELEMENT_NODE; )
292
- x = x.parentNode;
293
- let C = x, _ = null;
294
- for (; C && C !== document.body && !C.classList.contains("editor"); ) {
295
- if ((C.tagName === "DIV" || C.tagName === "P") && C.querySelector(".editor-image-wrapper")) {
296
- _ = C;
297
- break;
298
- }
299
- if (C.tagName === "P") {
300
- _ = C;
301
- break;
293
+ u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (g) => {
294
+ g.preventDefault();
295
+ }), u.onclick = (g) => {
296
+ g.preventDefault(), g.stopPropagation();
297
+ const y = u.closest(".editor-container")?.querySelector(".editor");
298
+ if (!y) return;
299
+ const _ = window.__selectedImageContainer;
300
+ if (console.log("Align clicked, selectedContainer:", _), _ && y.contains(_)) {
301
+ _.style.textAlign = p.align, console.log("Applied align:", p.align, "to container"), y.dispatchEvent(new Event("input", { bubbles: !0 }));
302
+ return;
303
+ }
304
+ const M = window.getSelection();
305
+ if (M && M.rangeCount > 0 && M.anchorNode) {
306
+ let C = M.anchorNode;
307
+ for (; C && C.nodeType !== Node.ELEMENT_NODE; )
308
+ C = C.parentNode;
309
+ let T = C;
310
+ for (; T && T !== y && T !== document.body; ) {
311
+ if (T.tagName === "P" || T.classList.contains("editor-image-container")) {
312
+ T.style.textAlign = p.align, y.dispatchEvent(new Event("input", { bubbles: !0 }));
313
+ return;
302
314
  }
303
- C = C.parentElement;
304
- }
305
- if (_) {
306
- _.style.textAlign = p.align;
307
- const M = u.closest(".editor-container")?.querySelector(".editor");
308
- M && M.dispatchEvent(new Event("input", { bubbles: !0 }));
309
- return;
315
+ T = T.parentElement;
310
316
  }
311
317
  }
312
- document.execCommand(p.command);
313
- const E = u.closest(".editor-container")?.querySelector(".editor");
314
- E && E.dispatchEvent(new Event("input", { bubbles: !0 }));
318
+ document.execCommand(p.command), y.dispatchEvent(new Event("input", { bubbles: !0 }));
315
319
  }, v.appendChild(u);
316
320
  }), v;
317
321
  }
318
- function Po() {
322
+ function Po(v) {
323
+ v.querySelectorAll("p > ul, p > ol").forEach((p) => {
324
+ const u = p.parentElement;
325
+ u && u.tagName === "P" && (u.parentNode?.insertBefore(p, u.nextSibling), !u.textContent?.trim() && !u.querySelector("img") && u.remove());
326
+ });
327
+ }
328
+ function Oo() {
319
329
  const v = document.createDocumentFragment();
320
330
  return [
321
331
  { command: "insertUnorderedList", icon: fo, title: "Bullet List" },
@@ -326,10 +336,18 @@ function Po() {
326
336
  (g.key === "Enter" || g.key === " ") && (g.preventDefault(), u.click());
327
337
  });
328
338
  const m = ye(p.icon, { width: 16, height: 16 });
329
- u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => document.execCommand(p.command), v.appendChild(u);
339
+ u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.addEventListener("mousedown", (g) => {
340
+ g.preventDefault(), de();
341
+ }), u.onclick = (g) => {
342
+ g.preventDefault();
343
+ const w = u.closest(".editor-container")?.querySelector(".editor");
344
+ w ? (Ae(), w.focus(), document.execCommand(p.command), setTimeout(() => {
345
+ Po(w), w.dispatchEvent(new Event("input", { bubbles: !0 }));
346
+ }, 0)) : document.execCommand(p.command);
347
+ }, v.appendChild(u);
330
348
  }), v;
331
349
  }
332
- function Oo() {
350
+ function Do() {
333
351
  const v = document.createDocumentFragment();
334
352
  return [
335
353
  { command: "indent", icon: uo, title: "Increase Indent" },
@@ -343,7 +361,7 @@ function Oo() {
343
361
  u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => document.execCommand(p.command), v.appendChild(u);
344
362
  }), v;
345
363
  }
346
- function Do() {
364
+ function No() {
347
365
  const v = document.createDocumentFragment();
348
366
  return [
349
367
  { command: "undo", icon: So, title: "Undo" },
@@ -357,18 +375,18 @@ function Do() {
357
375
  u.appendChild(m), u.title = p.title, u.style.border = "1px solid #e1e1e1", u.style.backgroundColor = "#ffffff", u.style.padding = "6px 10px", u.style.borderRadius = "3px", u.style.cursor = "pointer", u.style.color = "#000000", u.onmouseover = () => u.style.backgroundColor = "#f0f0f0", u.onmouseout = () => u.style.backgroundColor = "#ffffff", u.onclick = () => document.execCommand(p.command), v.appendChild(u);
358
376
  }), v;
359
377
  }
360
- function No() {
378
+ function zo() {
361
379
  const v = document.createElement("div");
362
380
  v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (p) => {
363
381
  (p.key === "Enter" || p.key === " ") && (p.preventDefault(), v.click());
364
382
  });
365
383
  const h = ye(ao, { width: 16, height: 16 });
366
- return v.appendChild(h), v.title = "Insert Image", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "6px 10px", v.style.borderRadius = "3px", v.style.cursor = "pointer", v.style.color = "#000000", v.onmouseover = () => v.style.backgroundColor = "#f0f0f0", v.onmouseout = () => v.style.backgroundColor = "#ffffff", v.onmousedown = () => pe(), v;
384
+ return v.appendChild(h), v.title = "Insert Image", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "6px 10px", v.style.borderRadius = "3px", v.style.cursor = "pointer", v.style.color = "#000000", v.onmouseover = () => v.style.backgroundColor = "#f0f0f0", v.onmouseout = () => v.style.backgroundColor = "#ffffff", v.onmousedown = () => de(), v;
367
385
  }
368
- function zo() {
386
+ function Lo() {
369
387
  const v = document.createElement("div");
370
- v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (E) => {
371
- (E.key === "Enter" || E.key === " ") && (E.preventDefault(), v.click());
388
+ v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (w) => {
389
+ (w.key === "Enter" || w.key === " ") && (w.preventDefault(), v.click());
372
390
  });
373
391
  const h = ye(ho, {
374
392
  width: 16,
@@ -380,29 +398,29 @@ function zo() {
380
398
  v.appendChild(h), v.title = "Toggle Fullscreen", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "6px 10px", v.style.borderRadius = "3px", v.style.cursor = "pointer", v.style.color = "#000000", v.onmouseover = () => v.style.backgroundColor = "#f0f0f0", v.onmouseout = () => v.style.backgroundColor = "#ffffff";
381
399
  let u = !1, m = "", g = "";
382
400
  return v.onclick = () => {
383
- const E = v.closest(
401
+ const w = v.closest(
384
402
  ".editor-container"
385
403
  );
386
- if (!E) return;
387
- const x = E.querySelector(".editor");
404
+ if (!w) return;
405
+ const y = w.querySelector(".editor");
388
406
  if (u)
389
- m ? E.setAttribute("style", m) : E.removeAttribute("style"), x && (g ? x.setAttribute("style", g) : x.removeAttribute("style")), v.replaceChild(h, p), u = !1;
407
+ m ? w.setAttribute("style", m) : w.removeAttribute("style"), y && (g ? y.setAttribute("style", g) : y.removeAttribute("style")), v.replaceChild(h, p), u = !1;
390
408
  else {
391
- m = E.getAttribute("style") || "", g = x && x.getAttribute("style") || "", E.style.position = "fixed", E.style.top = "0", E.style.left = "0", E.style.width = "100vw", E.style.height = "100vh", E.style.margin = "0", E.style.padding = "0";
409
+ m = w.getAttribute("style") || "", g = y && y.getAttribute("style") || "", w.style.position = "fixed", w.style.top = "0", w.style.left = "0", w.style.width = "100vw", w.style.height = "100vh", w.style.margin = "0", w.style.padding = "0";
392
410
  try {
393
- let C = 9998;
394
- document.querySelectorAll("body *").forEach((_) => {
395
- const M = window.getComputedStyle(_).getPropertyValue("z-index"), D = parseInt(M, 10);
396
- !isNaN(D) && D > 0 && (C = Math.max(C, D));
397
- }), E.style.zIndex = String(Math.max(C + 1, 9999));
411
+ let _ = 9998;
412
+ document.querySelectorAll("body *").forEach((M) => {
413
+ const C = window.getComputedStyle(M).getPropertyValue("z-index"), T = parseInt(C, 10);
414
+ !isNaN(T) && T > 0 && (_ = Math.max(_, T));
415
+ }), w.style.zIndex = String(Math.max(_ + 1, 9999));
398
416
  } catch {
399
- E.style.zIndex = "9999";
417
+ w.style.zIndex = "9999";
400
418
  }
401
- E.style.backgroundColor = "#ffffff", E.style.display = "flex", E.style.flexDirection = "column", E.style.boxSizing = "border-box", x && (x.style.flex = "1 1 0", x.style.overflowY = "auto", x.style.border = "none", x.style.borderRadius = "0", x.style.boxShadow = "none", x.style.height = "", x.style.minHeight = "0", x.style.maxHeight = "none", x.style.padding = "20px", x.style.boxSizing = "border-box"), v.replaceChild(p, h), u = !0;
419
+ w.style.backgroundColor = "#ffffff", w.style.display = "flex", w.style.flexDirection = "column", w.style.boxSizing = "border-box", y && (y.style.flex = "1 1 0", y.style.overflowY = "auto", y.style.border = "none", y.style.borderRadius = "0", y.style.boxShadow = "none", y.style.height = "", y.style.minHeight = "0", y.style.maxHeight = "none", y.style.padding = "20px", y.style.boxSizing = "border-box"), v.replaceChild(p, h), u = !0;
402
420
  }
403
421
  }, v;
404
422
  }
405
- function Lo(v) {
423
+ function Fo(v) {
406
424
  const h = document.createDocumentFragment(), p = document.createElement("div");
407
425
  p.style.position = "fixed", p.style.top = "0", p.style.left = "0", p.style.width = "100%", p.style.height = "100%", p.style.backgroundColor = "rgba(0, 0, 0, 0.5)", p.style.display = "none", p.style.zIndex = "1000", p.style.alignItems = "center", p.style.justifyContent = "center", p.style.flexDirection = "column";
408
426
  const u = document.createElement("div");
@@ -411,84 +429,84 @@ function Lo(v) {
411
429
  m.textContent = "Insert Hyperlink", m.style.margin = "0 0 15px 0", m.style.fontSize = "18px", m.style.fontWeight = "bold";
412
430
  const g = document.createElement("input");
413
431
  g.type = "url", g.placeholder = "Enter URL (e.g., https://example.com)", g.style.width = "100%", g.style.padding = "8px", g.style.border = "1px solid #ccc", g.style.borderRadius = "4px", g.style.marginBottom = "15px", g.style.boxSizing = "border-box";
414
- const E = document.createElement("div");
415
- E.style.display = "flex", E.style.gap = "10px", E.style.justifyContent = "flex-end";
416
- const x = document.createElement("div");
417
- x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.textContent = "Cancel", x.style.padding = "8px 16px", x.style.border = "1px solid #ccc", x.style.borderRadius = "4px", x.style.backgroundColor = "#f5f5f5", x.style.cursor = "pointer", x.addEventListener("keydown", (A) => {
418
- (A.key === "Enter" || A.key === " " || A.key === "Escape") && (A.preventDefault(), x.click());
419
- }), x.onclick = () => {
420
- p.style.display = "none", g.value = "", C = null;
432
+ const w = document.createElement("div");
433
+ w.style.display = "flex", w.style.gap = "10px", w.style.justifyContent = "flex-end";
434
+ const y = document.createElement("div");
435
+ y.setAttribute("role", "button"), y.tabIndex = 0, y.style.userSelect = "none", y.textContent = "Cancel", y.style.padding = "8px 16px", y.style.border = "1px solid #ccc", y.style.borderRadius = "4px", y.style.backgroundColor = "#f5f5f5", y.style.cursor = "pointer", y.addEventListener("keydown", (A) => {
436
+ (A.key === "Enter" || A.key === " " || A.key === "Escape") && (A.preventDefault(), y.click());
437
+ }), y.onclick = () => {
438
+ p.style.display = "none", g.value = "", _ = null;
421
439
  };
422
- let C = null;
423
- const _ = document.createElement("div");
424
- _.setAttribute("role", "button"), _.tabIndex = 0, _.style.userSelect = "none", _.textContent = "Insert", _.style.padding = "8px 16px", _.style.border = "none", _.style.borderRadius = "4px", _.style.backgroundColor = "#007bff", _.style.color = "#fff", _.style.cursor = "pointer", _.addEventListener("keydown", (A) => {
425
- (A.key === "Enter" || A.key === " ") && (A.preventDefault(), _.click());
426
- }), _.onclick = () => {
440
+ let _ = null;
441
+ const M = document.createElement("div");
442
+ M.setAttribute("role", "button"), M.tabIndex = 0, M.style.userSelect = "none", M.textContent = "Insert", M.style.padding = "8px 16px", M.style.border = "none", M.style.borderRadius = "4px", M.style.backgroundColor = "#007bff", M.style.color = "#fff", M.style.cursor = "pointer", M.addEventListener("keydown", (A) => {
443
+ (A.key === "Enter" || A.key === " ") && (A.preventDefault(), M.click());
444
+ }), M.onclick = () => {
427
445
  const A = g.value.trim();
428
446
  if (A)
429
- if (C)
430
- C.setAttribute("href", A), C.setAttribute("target", "_blank"), C.setAttribute("rel", "noopener noreferrer"), C.setAttribute("tabindex", "0");
447
+ if (_)
448
+ _.setAttribute("href", A), _.setAttribute("target", "_blank"), _.setAttribute("rel", "noopener noreferrer"), _.setAttribute("tabindex", "0");
431
449
  else {
432
- Ne(), document.execCommand("createLink", !1, A);
433
- const N = window.getSelection();
434
- if (N && N.rangeCount > 0) {
435
- let B = N.getRangeAt(0).startContainer;
436
- for (; B && B.nodeType !== Node.ELEMENT_NODE; )
437
- B = B.parentNode;
438
- let q = B;
439
- for (; q && q !== document.body; ) {
440
- if (q.tagName === "A") {
441
- const Q = q;
442
- Q.setAttribute("target", "_blank"), Q.setAttribute("rel", "noopener noreferrer"), Q.setAttribute("tabindex", "0");
450
+ Ae(), document.execCommand("createLink", !1, A);
451
+ const j = window.getSelection();
452
+ if (j && j.rangeCount > 0) {
453
+ let F = j.getRangeAt(0).startContainer;
454
+ for (; F && F.nodeType !== Node.ELEMENT_NODE; )
455
+ F = F.parentNode;
456
+ let N = F;
457
+ for (; N && N !== document.body; ) {
458
+ if (N.tagName === "A") {
459
+ const $ = N;
460
+ $.setAttribute("target", "_blank"), $.setAttribute("rel", "noopener noreferrer"), $.setAttribute("tabindex", "0");
443
461
  break;
444
462
  }
445
- q = q.parentElement;
463
+ N = N.parentElement;
446
464
  }
447
465
  }
448
466
  }
449
- p.style.display = "none", g.value = "", C = null;
450
- }, E.appendChild(x), E.appendChild(_), u.appendChild(m), u.appendChild(g), u.appendChild(E), p.appendChild(u), document.body.appendChild(p), g.onkeydown = (A) => {
451
- A.key === "Enter" ? _.click() : A.key === "Escape" && x.click();
467
+ p.style.display = "none", g.value = "", _ = null;
468
+ }, w.appendChild(y), w.appendChild(M), u.appendChild(m), u.appendChild(g), u.appendChild(w), p.appendChild(u), document.body.appendChild(p), g.onkeydown = (A) => {
469
+ A.key === "Enter" ? M.click() : A.key === "Escape" && y.click();
452
470
  };
453
- const M = document.createElement("div");
454
- M.setAttribute("role", "button"), M.tabIndex = 0, M.style.userSelect = "none";
455
- const D = ye(lo, { width: 16, height: 16 });
456
- M.appendChild(D), M.title = "Insert Hyperlink", M.style.border = "1px solid #e1e1e1", M.style.backgroundColor = "#ffffff", M.style.padding = "6px 10px", M.style.borderRadius = "3px", M.style.cursor = "pointer", M.style.color = "#000000", M.onmouseover = () => M.style.backgroundColor = "#f0f0f0", M.onmouseout = () => M.style.backgroundColor = "#ffffff", M.onmousedown = () => {
457
- C = null;
471
+ const C = document.createElement("div");
472
+ C.setAttribute("role", "button"), C.tabIndex = 0, C.style.userSelect = "none";
473
+ const T = ye(lo, { width: 16, height: 16 });
474
+ C.appendChild(T), C.title = "Insert Hyperlink", C.style.border = "1px solid #e1e1e1", C.style.backgroundColor = "#ffffff", C.style.padding = "6px 10px", C.style.borderRadius = "3px", C.style.cursor = "pointer", C.style.color = "#000000", C.onmouseover = () => C.style.backgroundColor = "#f0f0f0", C.onmouseout = () => C.style.backgroundColor = "#ffffff", C.onmousedown = () => {
475
+ _ = null;
458
476
  const A = window.getSelection();
459
477
  if (A && A.rangeCount > 0) {
460
- let B = A.getRangeAt(0).startContainer;
461
- for (; B && B.nodeType !== Node.ELEMENT_NODE; )
462
- B = B.parentNode;
463
- let q = B;
464
- for (; q && q !== document.body; ) {
465
- if (q.tagName === "A") {
466
- C = q, g.value = C.getAttribute("href") || "";
478
+ let F = A.getRangeAt(0).startContainer;
479
+ for (; F && F.nodeType !== Node.ELEMENT_NODE; )
480
+ F = F.parentNode;
481
+ let N = F;
482
+ for (; N && N !== document.body; ) {
483
+ if (N.tagName === "A") {
484
+ _ = N, g.value = _.getAttribute("href") || "";
467
485
  break;
468
486
  }
469
- q = q.parentElement;
487
+ N = N.parentElement;
470
488
  }
471
489
  }
472
- pe();
473
- }, M.addEventListener("keydown", (A) => {
474
- (A.key === "Enter" || A.key === " ") && (A.preventDefault(), M.click());
475
- }), M.onclick = () => {
490
+ de();
491
+ }, C.addEventListener("keydown", (A) => {
492
+ (A.key === "Enter" || A.key === " ") && (A.preventDefault(), C.click());
493
+ }), C.onclick = () => {
476
494
  p.style.display = "flex", g.focus();
477
- }, h.appendChild(M);
478
- const U = v.querySelector(".editor");
479
- return U && U.addEventListener("click", (A) => {
480
- const N = A.target;
481
- if (N.tagName === "A") {
495
+ }, h.appendChild(C);
496
+ const P = v.querySelector(".editor");
497
+ return P && P.addEventListener("click", (A) => {
498
+ const j = A.target;
499
+ if (j.tagName === "A") {
482
500
  A.preventDefault();
483
- const B = N.getAttribute("href");
484
- B && window.open(B, "_blank");
501
+ const F = j.getAttribute("href");
502
+ F && window.open(F, "_blank");
485
503
  }
486
504
  }), h;
487
505
  }
488
- function Fo() {
506
+ function jo() {
489
507
  const v = document.createDocumentFragment(), h = document.createElement("div");
490
- h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (Z) => {
491
- (Z.key === "Enter" || Z.key === " ") && (Z.preventDefault(), h.click());
508
+ h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (ne) => {
509
+ (ne.key === "Enter" || ne.key === " ") && (ne.preventDefault(), h.click());
492
510
  });
493
511
  const p = ye(mo, { width: 16, height: 16 });
494
512
  h.appendChild(p), h.title = "Insert Quote", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "6px 10px", h.style.borderRadius = "3px", h.style.cursor = "pointer", h.style.color = "#000000", h.onmouseover = () => h.style.backgroundColor = "#f0f0f0", h.onmouseout = () => h.style.backgroundColor = "#ffffff";
@@ -498,136 +516,136 @@ function Fo() {
498
516
  m.className = "rte-modal";
499
517
  const g = document.createElement("div");
500
518
  g.className = "rte-modal-header";
501
- const E = document.createElement("h3");
502
- E.textContent = "Insert Quote", E.className = "rte-modal-title";
503
- const x = document.createElement("div");
504
- x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.className = "rte-modal-close", x.innerHTML = "×", x.onclick = () => {
505
- u.style.display = "none", ne = null;
506
- }, g.appendChild(E), g.appendChild(x);
507
- const C = document.createElement("div");
508
- C.className = "rte-modal-form";
509
- const _ = document.createElement("label");
510
- _.textContent = "Title", _.className = "rte-label";
511
- const M = document.createElement("input");
512
- M.type = "text", M.placeholder = "e.g., Article title or source", M.className = "rte-input";
513
- const D = document.createElement("label");
514
- D.textContent = "Source URL", D.className = "rte-label";
515
- const U = document.createElement("input");
516
- U.type = "url", U.placeholder = "https://example.com", U.className = "rte-input";
519
+ const w = document.createElement("h3");
520
+ w.textContent = "Insert Quote", w.className = "rte-modal-title";
521
+ const y = document.createElement("div");
522
+ y.setAttribute("role", "button"), y.tabIndex = 0, y.style.userSelect = "none", y.className = "rte-modal-close", y.innerHTML = "×", y.onclick = () => {
523
+ u.style.display = "none", te = null;
524
+ }, g.appendChild(w), g.appendChild(y);
525
+ const _ = document.createElement("div");
526
+ _.className = "rte-modal-form";
527
+ const M = document.createElement("label");
528
+ M.textContent = "Title", M.className = "rte-label";
529
+ const C = document.createElement("input");
530
+ C.type = "text", C.placeholder = "e.g., Article title or source", C.className = "rte-input";
531
+ const T = document.createElement("label");
532
+ T.textContent = "Source URL", T.className = "rte-label";
533
+ const P = document.createElement("input");
534
+ P.type = "url", P.placeholder = "https://example.com", P.className = "rte-input";
517
535
  const A = document.createElement("div");
518
536
  A.className = "rte-preview-label", A.textContent = "Preview";
537
+ const j = document.createElement("div");
538
+ j.className = "rte-modal-preview";
539
+ const F = document.createElement("div");
540
+ F.className = "rte-blockquote-title";
519
541
  const N = document.createElement("div");
520
- N.className = "rte-modal-preview";
521
- const B = document.createElement("div");
522
- B.className = "rte-blockquote-title";
523
- const q = document.createElement("div");
524
- q.className = "rte-blockquote-content";
525
- const Q = document.createElement("div");
526
- Q.className = "rte-blockquote-footer", N.appendChild(B), N.appendChild(q), N.appendChild(Q), C.appendChild(_), C.appendChild(M), C.appendChild(D), C.appendChild(U), C.appendChild(A), C.appendChild(N);
527
- const J = document.createElement("div");
528
- J.className = "rte-modal-actions";
529
- const re = document.createElement("div");
530
- re.setAttribute("role", "button"), re.tabIndex = 0, re.style.userSelect = "none", re.className = "rte-btn-danger", re.textContent = "Remove", re.style.display = "none", re.onclick = () => {
531
- ne && (ne.remove(), ne = null), u.style.display = "none";
542
+ N.className = "rte-blockquote-content";
543
+ const $ = document.createElement("div");
544
+ $.className = "rte-blockquote-footer", j.appendChild(F), j.appendChild(N), j.appendChild($), _.appendChild(M), _.appendChild(C), _.appendChild(T), _.appendChild(P), _.appendChild(A), _.appendChild(j);
545
+ const L = document.createElement("div");
546
+ L.className = "rte-modal-actions";
547
+ const V = document.createElement("div");
548
+ V.setAttribute("role", "button"), V.tabIndex = 0, V.style.userSelect = "none", V.className = "rte-btn-danger", V.textContent = "Remove", V.style.display = "none", V.onclick = () => {
549
+ te && (te.remove(), te = null), u.style.display = "none";
532
550
  };
533
- const te = document.createElement("div");
534
- te.setAttribute("role", "button"), te.tabIndex = 0, te.style.userSelect = "none", te.className = "rte-btn-muted", te.textContent = "Cancel", te.onclick = () => {
535
- u.style.display = "none", ne = null;
551
+ const Z = document.createElement("div");
552
+ Z.setAttribute("role", "button"), Z.tabIndex = 0, Z.style.userSelect = "none", Z.className = "rte-btn-muted", Z.textContent = "Cancel", Z.onclick = () => {
553
+ u.style.display = "none", te = null;
536
554
  };
537
555
  const ie = document.createElement("div");
538
556
  ie.setAttribute("role", "button"), ie.tabIndex = 0, ie.style.userSelect = "none", ie.className = "rte-btn-primary", ie.textContent = "Apply", ie.onclick = () => {
539
- const Z = M.value.trim();
540
- let F = U.value.trim();
541
- if (F && !/^https?:\/\//i.test(F) && (F = `https://${F}`), ne) {
542
- const le = ne.querySelector(
557
+ const ne = C.value.trim();
558
+ let W = P.value.trim();
559
+ if (W && !/^https?:\/\//i.test(W) && (W = `https://${W}`), te) {
560
+ const le = te.querySelector(
543
561
  ".rte-blockquote-title"
544
562
  );
545
- if (Z)
546
- if (le) le.textContent = Z;
563
+ if (ne)
564
+ if (le) le.textContent = ne;
547
565
  else {
548
- const X = document.createElement("div");
549
- X.className = "rte-blockquote-title", X.textContent = Z, ne.insertBefore(X, ne.firstChild);
566
+ const J = document.createElement("div");
567
+ J.className = "rte-blockquote-title", J.textContent = ne, te.insertBefore(J, te.firstChild);
550
568
  }
551
569
  else le && le.remove();
552
- const ce = ne.querySelector(
570
+ const ce = te.querySelector(
553
571
  ".rte-blockquote-footer"
554
572
  );
555
- if (F)
573
+ if (W)
556
574
  if (ce) {
557
- const X = ce.querySelector("a");
558
- X.href = F, X.textContent = F;
575
+ const J = ce.querySelector("a");
576
+ J.href = W, J.textContent = W;
559
577
  } else {
560
- const X = document.createElement("footer");
561
- X.className = "rte-blockquote-footer";
562
- const G = document.createElement("cite"), Y = document.createElement("a");
563
- Y.href = F, Y.textContent = F, Y.target = "_blank", Y.rel = "noopener noreferrer", G.appendChild(Y), X.appendChild(G), ne.appendChild(X);
578
+ const J = document.createElement("footer");
579
+ J.className = "rte-blockquote-footer";
580
+ const Q = document.createElement("cite"), X = document.createElement("a");
581
+ X.href = W, X.textContent = W, X.target = "_blank", X.rel = "noopener noreferrer", Q.appendChild(X), J.appendChild(Q), te.appendChild(J);
564
582
  }
565
583
  else ce && ce.remove();
566
584
  } else {
567
- Ne();
585
+ Ae();
568
586
  const le = window.getSelection();
569
587
  if (!le || le.rangeCount === 0) {
570
588
  u.style.display = "none";
571
589
  return;
572
590
  }
573
- const ce = le.getRangeAt(0), X = ce.extractContents(), G = document.createElement("blockquote");
574
- if (G.className = "rte-blockquote", Z) {
575
- const ee = document.createElement("div");
576
- ee.className = "rte-blockquote-title", ee.textContent = Z, G.appendChild(ee);
591
+ const ce = le.getRangeAt(0), J = ce.extractContents(), Q = document.createElement("blockquote");
592
+ if (Q.className = "rte-blockquote", ne) {
593
+ const re = document.createElement("div");
594
+ re.className = "rte-blockquote-title", re.textContent = ne, Q.appendChild(re);
577
595
  }
578
- const Y = document.createElement("p");
579
- if (Y.appendChild(X), G.appendChild(Y), F) {
580
- const ee = document.createElement("footer");
581
- ee.className = "rte-blockquote-footer";
582
- const se = document.createElement("cite"), de = document.createElement("a");
583
- de.href = F, de.textContent = F, de.target = "_blank", de.rel = "noopener noreferrer", se.appendChild(de), ee.appendChild(se), G.appendChild(ee);
596
+ const X = document.createElement("p");
597
+ if (X.appendChild(J), Q.appendChild(X), W) {
598
+ const re = document.createElement("footer");
599
+ re.className = "rte-blockquote-footer";
600
+ const se = document.createElement("cite"), pe = document.createElement("a");
601
+ pe.href = W, pe.textContent = W, pe.target = "_blank", pe.rel = "noopener noreferrer", se.appendChild(pe), re.appendChild(se), Q.appendChild(re);
584
602
  }
585
- ce.insertNode(G), le.removeAllRanges();
603
+ ce.insertNode(Q), le.removeAllRanges();
586
604
  const oe = document.createRange();
587
- oe.setStartAfter(G), oe.collapse(!0), le.addRange(oe), pe(oe);
605
+ oe.setStartAfter(Q), oe.collapse(!0), le.addRange(oe), de(oe);
588
606
  }
589
- u.style.display = "none", M.value = "", U.value = "", ne = null;
590
- }, J.appendChild(re), J.appendChild(te), J.appendChild(ie), m.appendChild(g), m.appendChild(C), m.appendChild(J), u.appendChild(m), document.body.appendChild(u);
591
- let ne = null, b = "";
607
+ u.style.display = "none", C.value = "", P.value = "", te = null;
608
+ }, L.appendChild(V), L.appendChild(Z), L.appendChild(ie), m.appendChild(g), m.appendChild(_), m.appendChild(L), u.appendChild(m), document.body.appendChild(u);
609
+ let te = null, x = "";
592
610
  return h.onmousedown = () => {
593
- ne = null, b = "";
594
- const Z = window.getSelection();
595
- if (Z && Z.rangeCount > 0) {
596
- const F = Z.getRangeAt(0), le = document.createElement("div");
597
- le.appendChild(F.cloneContents()), b = le.innerHTML || F.toString();
598
- let ce = F.startContainer;
611
+ te = null, x = "";
612
+ const ne = window.getSelection();
613
+ if (ne && ne.rangeCount > 0) {
614
+ const W = ne.getRangeAt(0), le = document.createElement("div");
615
+ le.appendChild(W.cloneContents()), x = le.innerHTML || W.toString();
616
+ let ce = W.startContainer;
599
617
  for (; ce && ce.nodeType !== Node.ELEMENT_NODE; )
600
618
  ce = ce.parentNode;
601
- let X = ce;
602
- for (; X && X !== document.body; ) {
603
- if (X.tagName === "BLOCKQUOTE") {
604
- ne = X;
605
- const G = ne.querySelector(
619
+ let J = ce;
620
+ for (; J && J !== document.body; ) {
621
+ if (J.tagName === "BLOCKQUOTE") {
622
+ te = J;
623
+ const Q = te.querySelector(
606
624
  ".rte-blockquote-title"
607
- ), Y = ne.querySelector(
625
+ ), X = te.querySelector(
608
626
  ".rte-blockquote-footer a"
609
627
  );
610
- M.value = G && G.textContent || "", U.value = Y && Y.href || "", re.style.display = "inline-block";
611
- const oe = ne.querySelector("p");
612
- q.innerHTML = oe ? oe.innerHTML : ne.innerHTML, B.textContent = G && G.textContent || "", Q.innerHTML = Y ? `<a href="${Y.href}">${Y.href}</a>` : "";
628
+ C.value = Q && Q.textContent || "", P.value = X && X.href || "", V.style.display = "inline-block";
629
+ const oe = te.querySelector("p");
630
+ N.innerHTML = oe ? oe.innerHTML : te.innerHTML, F.textContent = Q && Q.textContent || "", $.innerHTML = X ? `<a href="${X.href}">${X.href}</a>` : "";
613
631
  break;
614
632
  }
615
- X = X.parentElement;
633
+ J = J.parentElement;
616
634
  }
617
635
  }
618
- ne || (q.innerHTML = b || "<em>Selected text will appear here</em>", B.textContent = "", Q.innerHTML = "", re.style.display = "none"), pe();
619
- }, M.oninput = () => B.textContent = M.value, U.oninput = () => {
620
- const Z = U.value.trim();
621
- if (!Z) Q.innerHTML = "";
636
+ te || (N.innerHTML = x || "<em>Selected text will appear here</em>", F.textContent = "", $.innerHTML = "", V.style.display = "none"), de();
637
+ }, C.oninput = () => F.textContent = C.value, P.oninput = () => {
638
+ const ne = P.value.trim();
639
+ if (!ne) $.innerHTML = "";
622
640
  else {
623
- const F = /^https?:\/\//i.test(Z) ? Z : `https://${Z}`;
624
- Q.innerHTML = `<a href="${F}" target="_blank" rel="noopener noreferrer">${F}</a>`;
641
+ const W = /^https?:\/\//i.test(ne) ? ne : `https://${ne}`;
642
+ $.innerHTML = `<a href="${W}" target="_blank" rel="noopener noreferrer">${W}</a>`;
625
643
  }
626
644
  }, h.onclick = () => {
627
- u.style.display = "flex", M.focus();
645
+ u.style.display = "flex", C.focus();
628
646
  }, v.appendChild(h), v;
629
647
  }
630
- function jo() {
648
+ function Ho() {
631
649
  const v = document.createDocumentFragment(), h = document.createElement("div");
632
650
  h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (u) => {
633
651
  (u.key === "Enter" || u.key === " ") && (u.preventDefault(), h.click());
@@ -635,7 +653,7 @@ function jo() {
635
653
  const p = ye(yo, { width: 16, height: 16 });
636
654
  return h.appendChild(p), h.title = "Remove Formatting", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "6px 10px", h.style.borderRadius = "3px", h.style.cursor = "pointer", h.style.color = "#000000", h.onmouseover = () => h.style.backgroundColor = "#f0f0f0", h.onmouseout = () => h.style.backgroundColor = "#ffffff", h.onclick = () => document.execCommand("removeFormat"), v.appendChild(h), v;
637
655
  }
638
- function Ho(v) {
656
+ function Bo(v) {
639
657
  const h = document.createDocumentFragment(), p = document.createElement("div");
640
658
  p.className = "rte-modal-overlay", p.style.display = "none";
641
659
  const u = document.createElement("div");
@@ -644,105 +662,105 @@ function Ho(v) {
644
662
  m.className = "rte-modal-header";
645
663
  const g = document.createElement("h3");
646
664
  g.className = "rte-modal-title", g.textContent = "Insert Video";
647
- const E = document.createElement("div");
648
- E.setAttribute("role", "button"), E.tabIndex = 0, E.style.userSelect = "none", E.className = "rte-modal-close", E.innerHTML = "&times;", E.onclick = () => p.style.display = "none", m.appendChild(g), m.appendChild(E);
649
- const x = document.createElement("div");
650
- x.className = "rte-modal-form";
651
- const C = document.createElement("label");
652
- C.className = "rte-label", C.textContent = "Video URL";
653
- const _ = document.createElement("input");
654
- _.type = "url", _.className = "rte-input", _.placeholder = "https://... or YouTube URL";
655
- const M = document.createElement("div");
656
- M.className = "rte-preview-label", M.textContent = "Preview";
657
- const D = document.createElement("div");
658
- D.className = "rte-modal-preview";
659
- const U = document.createElement("div");
660
- U.className = "rte-form-left";
665
+ const w = document.createElement("div");
666
+ w.setAttribute("role", "button"), w.tabIndex = 0, w.style.userSelect = "none", w.className = "rte-modal-close", w.innerHTML = "&times;", w.onclick = () => p.style.display = "none", m.appendChild(g), m.appendChild(w);
667
+ const y = document.createElement("div");
668
+ y.className = "rte-modal-form";
669
+ const _ = document.createElement("label");
670
+ _.className = "rte-label", _.textContent = "Video URL";
671
+ const M = document.createElement("input");
672
+ M.type = "url", M.className = "rte-input", M.placeholder = "https://... or YouTube URL";
673
+ const C = document.createElement("div");
674
+ C.className = "rte-preview-label", C.textContent = "Preview";
675
+ const T = document.createElement("div");
676
+ T.className = "rte-modal-preview";
677
+ const P = document.createElement("div");
678
+ P.className = "rte-form-left";
661
679
  const A = document.createElement("div");
662
680
  A.className = "rte-form-right";
681
+ const j = document.createElement("div");
682
+ j.className = "rte-field", j.appendChild(_), j.appendChild(M);
683
+ const F = document.createElement("div");
684
+ F.className = "rte-dim-row";
663
685
  const N = document.createElement("div");
664
- N.className = "rte-field", N.appendChild(C), N.appendChild(_);
665
- const B = document.createElement("div");
666
- B.className = "rte-dim-row";
667
- const q = document.createElement("div");
668
- q.style.display = "flex", q.style.flexDirection = "column";
669
- const Q = document.createElement("label");
670
- Q.className = "rte-label", Q.textContent = "Width (px)";
671
- const J = document.createElement("input");
672
- J.type = "text", J.className = "rte-dim-input", J.placeholder = "e.g., 560", q.appendChild(Q), q.appendChild(J);
673
- const re = document.createElement("div");
674
- re.style.display = "flex", re.style.flexDirection = "column";
675
- const te = document.createElement("label");
676
- te.className = "rte-label", te.textContent = "Height (px)";
686
+ N.style.display = "flex", N.style.flexDirection = "column";
687
+ const $ = document.createElement("label");
688
+ $.className = "rte-label", $.textContent = "Width (px)";
689
+ const L = document.createElement("input");
690
+ L.type = "text", L.className = "rte-dim-input", L.placeholder = "e.g., 560", N.appendChild($), N.appendChild(L);
691
+ const V = document.createElement("div");
692
+ V.style.display = "flex", V.style.flexDirection = "column";
693
+ const Z = document.createElement("label");
694
+ Z.className = "rte-label", Z.textContent = "Height (px)";
677
695
  const ie = document.createElement("input");
678
- ie.type = "text", ie.className = "rte-dim-input", ie.placeholder = "e.g., 315", re.appendChild(te), re.appendChild(ie), B.appendChild(q), B.appendChild(re), U.appendChild(N), U.appendChild(B), A.appendChild(M), A.appendChild(D), x.appendChild(U), x.appendChild(A);
696
+ ie.type = "text", ie.className = "rte-dim-input", ie.placeholder = "e.g., 315", V.appendChild(Z), V.appendChild(ie), F.appendChild(N), F.appendChild(V), P.appendChild(j), P.appendChild(F), A.appendChild(C), A.appendChild(T), y.appendChild(P), y.appendChild(A);
697
+ const te = document.createElement("div");
698
+ te.className = "rte-modal-actions";
699
+ const x = document.createElement("div");
700
+ x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.className = "rte-btn-muted", x.textContent = "Cancel", x.onclick = () => p.style.display = "none";
679
701
  const ne = document.createElement("div");
680
- ne.className = "rte-modal-actions";
681
- const b = document.createElement("div");
682
- b.setAttribute("role", "button"), b.tabIndex = 0, b.style.userSelect = "none", b.className = "rte-btn-muted", b.textContent = "Cancel", b.onclick = () => p.style.display = "none";
683
- const Z = document.createElement("div");
684
- Z.setAttribute("role", "button"), Z.tabIndex = 0, Z.style.userSelect = "none", Z.className = "rte-btn-primary", Z.textContent = "Insert", ne.appendChild(b), ne.appendChild(Z), u.appendChild(m), u.appendChild(x), u.appendChild(ne), p.appendChild(u), document.body.appendChild(p);
685
- const F = document.createElement("div");
686
- F.setAttribute("role", "button"), F.tabIndex = 0, F.style.userSelect = "none";
702
+ ne.setAttribute("role", "button"), ne.tabIndex = 0, ne.style.userSelect = "none", ne.className = "rte-btn-primary", ne.textContent = "Insert", te.appendChild(x), te.appendChild(ne), u.appendChild(m), u.appendChild(y), u.appendChild(te), p.appendChild(u), document.body.appendChild(p);
703
+ const W = document.createElement("div");
704
+ W.setAttribute("role", "button"), W.tabIndex = 0, W.style.userSelect = "none";
687
705
  const le = ye(To, { width: 16, height: 16 });
688
- F.appendChild(le), F.title = "Insert Video", F.style.border = "1px solid #e1e1e1", F.style.backgroundColor = "#ffffff", F.style.padding = "6px 10px", F.style.borderRadius = "3px", F.style.cursor = "pointer", F.style.color = "#000000", F.onmouseover = () => F.style.backgroundColor = "#f0f0f0", F.onmouseout = () => F.style.backgroundColor = "#ffffff", F.onmousedown = () => pe(), F.addEventListener("keydown", (G) => {
689
- (G.key === "Enter" || G.key === " ") && (G.preventDefault(), F.click());
690
- }), F.onclick = () => {
691
- D.innerHTML = "<em>No URL entered</em>", _.value = "", p.style.display = "flex", _.focus();
706
+ W.appendChild(le), W.title = "Insert Video", W.style.border = "1px solid #e1e1e1", W.style.backgroundColor = "#ffffff", W.style.padding = "6px 10px", W.style.borderRadius = "3px", W.style.cursor = "pointer", W.style.color = "#000000", W.onmouseover = () => W.style.backgroundColor = "#f0f0f0", W.onmouseout = () => W.style.backgroundColor = "#ffffff", W.onmousedown = () => de(), W.addEventListener("keydown", (Q) => {
707
+ (Q.key === "Enter" || Q.key === " ") && (Q.preventDefault(), W.click());
708
+ }), W.onclick = () => {
709
+ T.innerHTML = "<em>No URL entered</em>", M.value = "", p.style.display = "flex", M.focus();
692
710
  };
693
711
  const ce = () => {
694
- const G = _.value.trim(), Y = J && J.value.trim() || "", oe = ie && ie.value.trim() || "", ee = parseInt(Y, 10), se = parseInt(oe, 10);
695
- if (!G) {
696
- D.innerHTML = "<em>No preview</em>";
712
+ const Q = M.value.trim(), X = L && L.value.trim() || "", oe = ie && ie.value.trim() || "", re = parseInt(X, 10), se = parseInt(oe, 10);
713
+ if (!Q) {
714
+ T.innerHTML = "<em>No preview</em>";
697
715
  return;
698
716
  }
699
- const de = G.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
700
- if (de) {
701
- const w = de[1], z = Number.isFinite(ee) ? ee : 320, j = Number.isFinite(se) ? se : 180;
702
- D.innerHTML = `<iframe width="${z}" height="${j}" src="https://www.youtube.com/embed/${w}" frameborder="0" allowfullscreen></iframe>`;
717
+ const pe = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
718
+ if (pe) {
719
+ const E = pe[1], H = Number.isFinite(re) ? re : 320, q = Number.isFinite(se) ? se : 180;
720
+ T.innerHTML = `<iframe width="${H}" height="${q}" src="https://www.youtube.com/embed/${E}" frameborder="0" allowfullscreen></iframe>`;
703
721
  return;
704
722
  }
705
- const fe = Number.isFinite(ee) ? `${ee}px` : "320px", he = Number.isFinite(se) ? `${se}px` : "auto";
706
- D.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${G}"></video>`;
723
+ const fe = Number.isFinite(re) ? `${re}px` : "320px", he = Number.isFinite(se) ? `${se}px` : "auto";
724
+ T.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${Q}"></video>`;
707
725
  };
708
- _.oninput = ce, typeof J < "u" && (J.oninput = ce), typeof ie < "u" && (ie.oninput = ce), Z.onclick = () => {
709
- const G = _.value.trim(), Y = J && J.value.trim() || "", oe = ie && ie.value.trim() || "", ee = parseInt(Y, 10), se = parseInt(oe, 10);
710
- if (!G) {
726
+ M.oninput = ce, typeof L < "u" && (L.oninput = ce), typeof ie < "u" && (ie.oninput = ce), ne.onclick = () => {
727
+ const Q = M.value.trim(), X = L && L.value.trim() || "", oe = ie && ie.value.trim() || "", re = parseInt(X, 10), se = parseInt(oe, 10);
728
+ if (!Q) {
711
729
  p.style.display = "none";
712
730
  return;
713
731
  }
714
- Ne();
715
- const de = window.getSelection();
716
- if (!de || de.rangeCount === 0) {
732
+ Ae();
733
+ const pe = window.getSelection();
734
+ if (!pe || pe.rangeCount === 0) {
717
735
  p.style.display = "none";
718
736
  return;
719
737
  }
720
- const fe = de.getRangeAt(0), he = G.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
721
- let w;
738
+ const fe = pe.getRangeAt(0), he = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
739
+ let E;
722
740
  if (he) {
723
- const j = he[1], $ = document.createElement("div"), xe = Number.isFinite(ee) ? ee : 560, we = Number.isFinite(se) ? se : 315;
724
- $.innerHTML = `<iframe width="${xe}" height="${we}" src="https://www.youtube.com/embed/${j}" frameborder="0" allowfullscreen></iframe>`, $.contentEditable = "false", $.className = "editor-video-wrapper", $.style.display = "block", $.style.maxWidth = "100%", $.style.width = "auto", $.style.height = "auto", $.style.boxSizing = "border-box", $.style.userSelect = "none", w = $;
741
+ const q = he[1], G = document.createElement("div"), xe = Number.isFinite(re) ? re : 560, we = Number.isFinite(se) ? se : 315;
742
+ G.innerHTML = `<iframe width="${xe}" height="${we}" src="https://www.youtube.com/embed/${q}" frameborder="0" allowfullscreen></iframe>`, G.contentEditable = "false", G.className = "editor-video-wrapper", G.style.display = "block", G.style.maxWidth = "100%", G.style.width = "auto", G.style.height = "auto", G.style.boxSizing = "border-box", G.style.userSelect = "none", E = G;
725
743
  } else {
726
- const j = document.createElement("div"), $ = document.createElement("video");
727
- $.controls = !0, $.src = G, Number.isFinite(ee) && ($.width = ee), Number.isFinite(se) && ($.height = se), $.style.maxWidth = "100%", $.style.display = "block", j.appendChild($), j.contentEditable = "false", j.className = "editor-video-wrapper", j.style.display = "block", j.style.maxWidth = "100%", j.style.width = "auto", j.style.height = "auto", j.style.boxSizing = "border-box", j.style.userSelect = "none", w = j;
744
+ const q = document.createElement("div"), G = document.createElement("video");
745
+ G.controls = !0, G.src = Q, Number.isFinite(re) && (G.width = re), Number.isFinite(se) && (G.height = se), G.style.maxWidth = "100%", G.style.display = "block", q.appendChild(G), q.contentEditable = "false", q.className = "editor-video-wrapper", q.style.display = "block", q.style.maxWidth = "100%", q.style.width = "auto", q.style.height = "auto", q.style.boxSizing = "border-box", q.style.userSelect = "none", E = q;
728
746
  }
729
- fe.insertNode(w), de.removeAllRanges();
730
- const z = document.createRange();
731
- z.setStartAfter(w), z.collapse(!0), de.addRange(z), pe(z);
747
+ fe.insertNode(E), pe.removeAllRanges();
748
+ const H = document.createRange();
749
+ H.setStartAfter(E), H.collapse(!0), pe.addRange(H), de(H);
732
750
  try {
733
- const j = X;
734
- j && typeof j.focus == "function" && (j.focus(), j.dispatchEvent(new Event("input", { bubbles: !0 })));
751
+ const q = J;
752
+ q && typeof q.focus == "function" && (q.focus(), q.dispatchEvent(new Event("input", { bubbles: !0 })));
735
753
  } catch {
736
754
  }
737
- p.style.display = "none", _.value = "", D.innerHTML = "";
755
+ p.style.display = "none", M.value = "", T.innerHTML = "";
738
756
  };
739
- const X = v.querySelector(".editor");
740
- return X && X.addEventListener("click", (G) => {
741
- const Y = G.target;
742
- Y && Y.tagName === "VIDEO" && Y.focus();
743
- }), h.appendChild(F), h;
757
+ const J = v.querySelector(".editor");
758
+ return J && J.addEventListener("click", (Q) => {
759
+ const X = Q.target;
760
+ X && X.tagName === "VIDEO" && X.focus();
761
+ }), h.appendChild(W), h;
744
762
  }
745
- function Bo(v) {
763
+ function Wo(v) {
746
764
  const h = document.createElement("div");
747
765
  h.style.display = "flex", h.style.flexWrap = "wrap", h.style.gap = "8px", h.style.marginBottom = "10px", h.style.padding = "12px", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.borderRadius = "4px", h.style.boxShadow = "0 1px 3px rgba(0,0,0,0.1)";
748
766
  const p = to();
@@ -761,24 +779,24 @@ function Bo(v) {
761
779
  <option value="h3">Heading 3</option>
762
780
  <option value="h4">Heading 4</option>
763
781
  `, u.onchange = () => {
764
- const Q = u.value, J = Q === "p" ? "P" : Q.toUpperCase();
765
- document.execCommand("formatBlock", !1, `<${J}>`);
782
+ const $ = u.value, L = $ === "p" ? "P" : $.toUpperCase();
783
+ document.execCommand("formatBlock", !1, `<${L}>`);
766
784
  }, h.appendChild(u), document.addEventListener("selectionchange", () => {
767
785
  try {
768
- const Q = window.getSelection();
769
- if (!Q || !Q.anchorNode) return;
770
- let J = Q.anchorNode;
771
- for (; J && J.nodeType !== Node.ELEMENT_NODE; )
772
- J = J.parentNode;
773
- if (!J) return;
774
- let re = J;
775
- for (; re && re !== document.body && re !== h.parentElement; ) {
776
- const te = re.tagName?.toUpperCase?.();
777
- if (te === "H1" || te === "H2" || te === "H3" || te === "H4" || te === "P") {
778
- u.value = te === "P" ? "p" : te.toLowerCase();
786
+ const $ = window.getSelection();
787
+ if (!$ || !$.anchorNode) return;
788
+ let L = $.anchorNode;
789
+ for (; L && L.nodeType !== Node.ELEMENT_NODE; )
790
+ L = L.parentNode;
791
+ if (!L) return;
792
+ let V = L;
793
+ for (; V && V !== document.body && V !== h.parentElement; ) {
794
+ const Z = V.tagName?.toUpperCase?.();
795
+ if (Z === "H1" || Z === "H2" || Z === "H3" || Z === "H4" || Z === "P") {
796
+ u.value = Z === "P" ? "p" : Z.toLowerCase();
779
797
  return;
780
798
  }
781
- re = re.parentElement;
799
+ V = V.parentElement;
782
800
  }
783
801
  u.value = "p";
784
802
  } catch {
@@ -794,164 +812,40 @@ function Bo(v) {
794
812
  <option value="6">24pt</option>
795
813
  <option value="7">36pt</option>
796
814
  `, m.style.border = "1px solid #e1e1e1", m.style.backgroundColor = "#ffffff", m.style.padding = "4px", m.style.borderRadius = "3px", m.style.color = "#000000", m.onchange = () => document.execCommand("fontSize", !1, m.value), h.appendChild(m);
797
- const g = _o();
815
+ const g = Ro();
798
816
  h.appendChild(g);
799
- const E = Ao();
800
- h.appendChild(E);
801
- const x = Io();
802
- h.appendChild(x);
803
- const C = Po();
804
- h.appendChild(C);
817
+ const w = Ao();
818
+ h.appendChild(w);
819
+ const y = Io();
820
+ h.appendChild(y);
805
821
  const _ = Oo();
806
822
  h.appendChild(_);
807
823
  const M = Do();
808
824
  h.appendChild(M);
809
- const D = No();
810
- h.appendChild(D);
811
- const U = Lo(v);
812
- h.appendChild(U);
813
- const A = Fo();
825
+ const C = No();
826
+ h.appendChild(C);
827
+ const T = zo();
828
+ h.appendChild(T);
829
+ const P = Fo(v);
830
+ h.appendChild(P);
831
+ const A = jo();
814
832
  h.appendChild(A);
815
- const N = jo();
816
- h.appendChild(N);
817
- const B = Ho(v);
818
- h.appendChild(B);
819
- const q = zo();
820
- return h.appendChild(q), h;
833
+ const j = Ho();
834
+ h.appendChild(j);
835
+ const F = Bo(v);
836
+ h.appendChild(F);
837
+ const N = Lo();
838
+ return h.appendChild(N), h;
821
839
  }
822
840
  function qo(v) {
823
- const p = new DOMParser().parseFromString(v, "text/html");
824
- return Array.from(p.querySelectorAll("img")).forEach((m) => {
825
- if (!p.body.contains(m) || m.closest(".editor-image-wrapper")) return;
826
- const E = m.getAttribute("src") || m.src;
827
- if (!E) return;
828
- const x = document.createElement("img");
829
- x.src = E, m.alt && (x.alt = m.alt), m.title && (x.title = m.title), x.style.maxWidth = "100%", x.style.width = "100%", x.style.height = "auto", x.style.cursor = "pointer", x.draggable = !1;
830
- const C = m.getAttribute("width") || m.style.width || (m.naturalWidth > 0 ? `${m.naturalWidth}px` : null), _ = document.createElement("div");
831
- _.className = "editor-image-wrapper", _.style.display = "inline-block", _.style.position = "relative", _.style.maxWidth = "100%", _.style.width = C && C !== "0px" ? C.includes("px") ? C : `${C}px` : "300px", _.style.height = "auto", _.contentEditable = "false", _.style.boxSizing = "border-box", _.style.touchAction = "none", _.style.userSelect = "none", _.appendChild(x);
832
- const M = document.createElement("p");
833
- M.style.margin = "10px 0", M.style.textAlign = "left", M.style.display = "block", M.appendChild(_);
834
- let D = m;
835
- const U = m.closest("figure"), A = m.closest("picture");
836
- if (U && p.body.contains(U))
837
- D = U;
838
- else if (A && p.body.contains(A))
839
- D = A;
840
- else {
841
- let N = m.parentNode;
842
- for (; N && N !== p.body && N.parentNode !== p.body && Array.from(N.childNodes).filter(
843
- (q) => q.nodeType === Node.ELEMENT_NODE || q.nodeType === Node.TEXT_NODE && q.textContent?.trim()
844
- ).length === 1; )
845
- D = N, N = N.parentNode;
846
- }
847
- D && D.parentNode && p.body.contains(D) ? D.parentNode.replaceChild(M, D) : m.parentNode && p.body.contains(m) && m.parentNode.replaceChild(M, m);
848
- }), p.body.innerHTML;
849
- }
850
- function Wo(v, h) {
851
- const p = document.createElement("div");
852
- p.classList.add("editor"), p.contentEditable = "true", p.style.color = "#000000", p.style.border = "1px solid #e1e1e1", p.style.height = "400px", p.style.overflowY = "auto", p.style.padding = "15px", p.style.fontFamily = "Arial, sans-serif", p.style.fontSize = "14px", p.style.lineHeight = "1.5", p.style.outline = "none", p.style.backgroundColor = "#ffffff", p.style.borderRadius = "4px", p.style.boxShadow = "inset 0 1px 3px rgba(0,0,0,0.1)", p.style.direction = "ltr", p.style.textAlign = "left", p.style.scrollbarWidth = "none", p.style.msOverflowStyle = "none";
853
- const u = document.createElement("style");
854
- return u.textContent = ".editor::-webkit-scrollbar { display: none; }", document.querySelector("style[data-editor-scrollbar]") || (u.setAttribute("data-editor-scrollbar", "true"), document.head.appendChild(u)), p.innerHTML = "", p.addEventListener("dragover", (m) => {
855
- m.preventDefault(), m.stopPropagation();
856
- }), p.addEventListener("drop", (m) => {
857
- m.preventDefault(), m.stopPropagation();
858
- const g = m.clientX, E = m.clientY;
859
- let x = null;
860
- if (document.caretRangeFromPoint)
861
- x = document.caretRangeFromPoint(g, E);
862
- else if (document.caretPositionFromPoint) {
863
- const _ = document.caretPositionFromPoint(g, E);
864
- _ && (x = document.createRange(), x.setStart(_.offsetNode, _.offset));
865
- }
866
- const C = m.dataTransfer?.files;
867
- if (C && C.length > 0)
868
- for (let _ = 0; _ < C.length; _++) {
869
- const M = C[_];
870
- if (M.type.startsWith("image/")) {
871
- const D = new FileReader();
872
- D.onload = (U) => {
873
- const A = document.createElement("img");
874
- A.src = U.target?.result, A.style.maxWidth = "100%", A.style.width = "100%", A.style.height = "auto", A.style.cursor = "pointer", A.draggable = !1;
875
- const N = document.createElement("div");
876
- N.className = "editor-image-wrapper", N.style.display = "inline-block", N.style.position = "relative", N.style.maxWidth = "100%", N.style.width = "auto", N.style.height = "auto", N.contentEditable = "false", N.style.userSelect = "none", N.style.boxSizing = "border-box", N.style.touchAction = "none", N.appendChild(A);
877
- const B = document.createElement("div");
878
- if (B.contentEditable = "true", B.style.margin = "10px 0", B.style.textAlign = "left", B.style.display = "block", B.appendChild(N), x)
879
- try {
880
- x.insertNode(B);
881
- const q = window.getSelection();
882
- if (q) {
883
- q.removeAllRanges();
884
- const Q = document.createRange();
885
- Q.setStartAfter(B), Q.collapse(!0), q.addRange(Q), pe(Q);
886
- }
887
- } catch {
888
- p.appendChild(B);
889
- }
890
- else
891
- p.appendChild(B);
892
- p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
893
- }, D.readAsDataURL(M);
894
- }
895
- }
896
- }), p.addEventListener("paste", (m) => {
897
- m.preventDefault();
898
- const g = m.clipboardData;
899
- if (!g) return;
900
- let E = g.getData("text/html");
901
- E ? E = qo(E) : E = g.getData("text/plain");
902
- const x = window.getSelection();
903
- if (x && x.rangeCount > 0) {
904
- const C = x.getRangeAt(0), _ = document.createElement("div");
905
- _.innerHTML = E;
906
- const M = document.createDocumentFragment();
907
- for (; _.firstChild; )
908
- M.appendChild(_.firstChild);
909
- C.deleteContents(), C.insertNode(M), C.collapse(!1), x.removeAllRanges(), x.addRange(C);
910
- } else {
911
- const C = document.createElement("div");
912
- for (C.innerHTML = E; C.firstChild; )
913
- p.appendChild(C.firstChild);
914
- }
915
- p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), pe();
916
- }), p.addEventListener("click", (m) => {
917
- const g = m.target;
918
- let E = g;
919
- if (g.tagName === "IMG" && (E = g.parentElement), E && E.classList.contains("editor-image-wrapper")) {
920
- m.preventDefault(), m.stopPropagation(), h(E);
921
- const x = E.parentElement;
922
- if (x && (x.tagName === "DIV" || x.tagName === "P") && x.querySelector(".editor-image-wrapper"))
923
- try {
924
- const C = window.getSelection();
925
- if (C) {
926
- const _ = document.createRange();
927
- _.selectNodeContents(x), C.removeAllRanges(), C.addRange(_), pe();
928
- }
929
- } catch {
930
- }
931
- } else
932
- pe();
933
- }), p.addEventListener("keyup", () => pe()), p.addEventListener("mouseup", () => pe()), p.addEventListener("focus", () => pe()), window.addEventListener("selectionchange", () => {
934
- try {
935
- const m = window.getSelection();
936
- if (!m || !m.anchorNode) return;
937
- let g = m.anchorNode;
938
- for (; g && g.nodeType !== Node.ELEMENT_NODE; )
939
- g = g.parentNode;
940
- if (!g) return;
941
- p.contains(g) && pe();
942
- } catch {
943
- }
944
- }), p;
945
- }
946
- function Yo(v) {
947
841
  return v && v.__esModule && Object.prototype.hasOwnProperty.call(v, "default") ? v.default : v;
948
842
  }
949
- var Ke = { exports: {} }, $o = Ke.exports, Pn;
950
- function Vo() {
843
+ var Je = { exports: {} }, Yo = Je.exports, Pn;
844
+ function $o() {
951
845
  return Pn || (Pn = 1, (function(v, h) {
952
846
  (function(p, u) {
953
847
  v.exports = u();
954
- })($o, (function() {
848
+ })(Yo, (function() {
955
849
  function p(t, e) {
956
850
  var n = Object.keys(t);
957
851
  if (Object.getOwnPropertySymbols) {
@@ -966,7 +860,7 @@ function Vo() {
966
860
  for (var e = 1; e < arguments.length; e++) {
967
861
  var n = arguments[e] != null ? arguments[e] : {};
968
862
  e % 2 ? p(Object(n), !0).forEach((function(r) {
969
- C(t, r, n[r]);
863
+ _(t, r, n[r]);
970
864
  })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : p(Object(n)).forEach((function(r) {
971
865
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
972
866
  }));
@@ -983,33 +877,33 @@ function Vo() {
983
877
  function g(t, e) {
984
878
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
985
879
  }
986
- function E(t, e) {
880
+ function w(t, e) {
987
881
  for (var n = 0; n < e.length; n++) {
988
882
  var r = e[n];
989
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, B(r.key), r);
883
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, F(r.key), r);
990
884
  }
991
885
  }
992
- function x(t, e, n) {
993
- return e && E(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
886
+ function y(t, e, n) {
887
+ return e && w(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
994
888
  }
995
- function C(t, e, n) {
996
- return (e = B(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
889
+ function _(t, e, n) {
890
+ return (e = F(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
997
891
  }
998
- function _(t, e) {
892
+ function M(t, e) {
999
893
  if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
1000
- t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && D(t, e);
894
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && T(t, e);
1001
895
  }
1002
- function M(t) {
1003
- return M = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
896
+ function C(t) {
897
+ return C = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
1004
898
  return e.__proto__ || Object.getPrototypeOf(e);
1005
- }, M(t);
899
+ }, C(t);
1006
900
  }
1007
- function D(t, e) {
1008
- return D = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
901
+ function T(t, e) {
902
+ return T = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
1009
903
  return n.__proto__ = r, n;
1010
- }, D(t, e);
904
+ }, T(t, e);
1011
905
  }
1012
- function U(t) {
906
+ function P(t) {
1013
907
  if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1014
908
  return t;
1015
909
  }
@@ -1025,31 +919,31 @@ function Vo() {
1025
919
  }
1026
920
  })();
1027
921
  return function() {
1028
- var n, r = M(t);
922
+ var n, r = C(t);
1029
923
  if (e) {
1030
- var o = M(this).constructor;
924
+ var o = C(this).constructor;
1031
925
  n = Reflect.construct(r, arguments, o);
1032
926
  } else n = r.apply(this, arguments);
1033
927
  return (function(i, a) {
1034
928
  if (a && (typeof a == "object" || typeof a == "function")) return a;
1035
929
  if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
1036
- return U(i);
930
+ return P(i);
1037
931
  })(this, n);
1038
932
  };
1039
933
  }
1040
- function N() {
1041
- return N = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
934
+ function j() {
935
+ return j = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
1042
936
  var r = (function(i, a) {
1043
- for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = M(i)) !== null; ) ;
937
+ for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = C(i)) !== null; ) ;
1044
938
  return i;
1045
939
  })(t, e);
1046
940
  if (r) {
1047
941
  var o = Object.getOwnPropertyDescriptor(r, e);
1048
942
  return o.get ? o.get.call(arguments.length < 3 ? t : n) : o.value;
1049
943
  }
1050
- }, N.apply(this, arguments);
944
+ }, j.apply(this, arguments);
1051
945
  }
1052
- function B(t) {
946
+ function F(t) {
1053
947
  var e = (function(n, r) {
1054
948
  if (typeof n != "object" || n === null) return n;
1055
949
  var o = n[Symbol.toPrimitive];
@@ -1062,27 +956,27 @@ function Vo() {
1062
956
  })(t, "string");
1063
957
  return typeof e == "symbol" ? e : e + "";
1064
958
  }
1065
- var q = function(t) {
959
+ var N = function(t) {
1066
960
  return !(!t || !t.Window) && t instanceof t.Window;
1067
- }, Q = void 0, J = void 0;
1068
- function re(t) {
1069
- Q = t;
961
+ }, $ = void 0, L = void 0;
962
+ function V(t) {
963
+ $ = t;
1070
964
  var e = t.document.createTextNode("");
1071
- e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), J = t;
965
+ e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), L = t;
1072
966
  }
1073
- function te(t) {
1074
- return q(t) ? t : (t.ownerDocument || t).defaultView || J.window;
967
+ function Z(t) {
968
+ return N(t) ? t : (t.ownerDocument || t).defaultView || L.window;
1075
969
  }
1076
- typeof window < "u" && window && re(window);
970
+ typeof window < "u" && window && V(window);
1077
971
  var ie = function(t) {
1078
972
  return !!t && m(t) === "object";
1079
- }, ne = function(t) {
973
+ }, te = function(t) {
1080
974
  return typeof t == "function";
1081
- }, b = { window: function(t) {
1082
- return t === J || q(t);
975
+ }, x = { window: function(t) {
976
+ return t === L || N(t);
1083
977
  }, docFrag: function(t) {
1084
978
  return ie(t) && t.nodeType === 11;
1085
- }, object: ie, func: ne, number: function(t) {
979
+ }, object: ie, func: te, number: function(t) {
1086
980
  return typeof t == "number";
1087
981
  }, bool: function(t) {
1088
982
  return typeof t == "boolean";
@@ -1090,21 +984,21 @@ function Vo() {
1090
984
  return typeof t == "string";
1091
985
  }, element: function(t) {
1092
986
  if (!t || m(t) !== "object") return !1;
1093
- var e = te(t) || J;
987
+ var e = Z(t) || L;
1094
988
  return /object|function/.test(typeof Element > "u" ? "undefined" : m(Element)) ? t instanceof Element || t instanceof e.Element : t.nodeType === 1 && typeof t.nodeName == "string";
1095
989
  }, plainObject: function(t) {
1096
990
  return ie(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
1097
991
  }, array: function(t) {
1098
- return ie(t) && t.length !== void 0 && ne(t.splice);
992
+ return ie(t) && t.length !== void 0 && te(t.splice);
1099
993
  } };
1100
- function Z(t) {
994
+ function ne(t) {
1101
995
  var e = t.interaction;
1102
996
  if (e.prepared.name === "drag") {
1103
997
  var n = e.prepared.axis;
1104
998
  n === "x" ? (e.coords.cur.page.y = e.coords.start.page.y, e.coords.cur.client.y = e.coords.start.client.y, e.coords.velocity.client.y = 0, e.coords.velocity.page.y = 0) : n === "y" && (e.coords.cur.page.x = e.coords.start.page.x, e.coords.cur.client.x = e.coords.start.client.x, e.coords.velocity.client.x = 0, e.coords.velocity.page.x = 0);
1105
999
  }
1106
1000
  }
1107
- function F(t) {
1001
+ function W(t) {
1108
1002
  var e = t.iEvent, n = t.interaction;
1109
1003
  if (n.prepared.name === "drag") {
1110
1004
  var r = n.prepared.axis;
@@ -1117,25 +1011,25 @@ function Vo() {
1117
1011
  var le = { id: "actions/drag", install: function(t) {
1118
1012
  var e = t.actions, n = t.Interactable, r = t.defaults;
1119
1013
  n.prototype.draggable = le.draggable, e.map.drag = le, e.methodDict.drag = "draggable", r.actions.drag = le.defaults;
1120
- }, listeners: { "interactions:before-action-move": Z, "interactions:action-resume": Z, "interactions:action-move": F, "auto-start:check": function(t) {
1014
+ }, listeners: { "interactions:before-action-move": ne, "interactions:action-resume": ne, "interactions:action-move": W, "auto-start:check": function(t) {
1121
1015
  var e = t.interaction, n = t.interactable, r = t.buttons, o = n.options.drag;
1122
1016
  if (o && o.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (r & n.options.drag.mouseButtons) != 0)) return t.action = { name: "drag", axis: o.lockAxis === "start" ? o.startAxis : o.lockAxis }, !1;
1123
1017
  } }, draggable: function(t) {
1124
- return b.object(t) ? (this.options.drag.enabled = t.enabled !== !1, this.setPerAction("drag", t), this.setOnEvents("drag", t), /^(xy|x|y|start)$/.test(t.lockAxis) && (this.options.drag.lockAxis = t.lockAxis), /^(xy|x|y)$/.test(t.startAxis) && (this.options.drag.startAxis = t.startAxis), this) : b.bool(t) ? (this.options.drag.enabled = t, this) : this.options.drag;
1125
- }, beforeMove: Z, move: F, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
1018
+ return x.object(t) ? (this.options.drag.enabled = t.enabled !== !1, this.setPerAction("drag", t), this.setOnEvents("drag", t), /^(xy|x|y|start)$/.test(t.lockAxis) && (this.options.drag.lockAxis = t.lockAxis), /^(xy|x|y)$/.test(t.startAxis) && (this.options.drag.startAxis = t.startAxis), this) : x.bool(t) ? (this.options.drag.enabled = t, this) : this.options.drag;
1019
+ }, beforeMove: ne, move: W, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
1126
1020
  return "move";
1127
1021
  }, filterEventType: function(t) {
1128
1022
  return t.search("drag") === 0;
1129
- } }, ce = le, X = { init: function(t) {
1023
+ } }, ce = le, J = { init: function(t) {
1130
1024
  var e = t;
1131
- X.document = e.document, X.DocumentFragment = e.DocumentFragment || G, X.SVGElement = e.SVGElement || G, X.SVGSVGElement = e.SVGSVGElement || G, X.SVGElementInstance = e.SVGElementInstance || G, X.Element = e.Element || G, X.HTMLElement = e.HTMLElement || X.Element, X.Event = e.Event, X.Touch = e.Touch || G, X.PointerEvent = e.PointerEvent || e.MSPointerEvent;
1025
+ J.document = e.document, J.DocumentFragment = e.DocumentFragment || Q, J.SVGElement = e.SVGElement || Q, J.SVGSVGElement = e.SVGSVGElement || Q, J.SVGElementInstance = e.SVGElementInstance || Q, J.Element = e.Element || Q, J.HTMLElement = e.HTMLElement || J.Element, J.Event = e.Event, J.Touch = e.Touch || Q, J.PointerEvent = e.PointerEvent || e.MSPointerEvent;
1132
1026
  }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
1133
- function G() {
1027
+ function Q() {
1134
1028
  }
1135
- var Y = X, oe = { init: function(t) {
1136
- var e = Y.Element, n = t.navigator || {};
1137
- oe.supportsTouch = "ontouchstart" in t || b.func(t.DocumentTouch) && Y.document instanceof t.DocumentTouch, oe.supportsPointerEvent = n.pointerEnabled !== !1 && !!Y.PointerEvent, oe.isIOS = /iP(hone|od|ad)/.test(n.platform), oe.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), oe.isIe9 = /MSIE 9/.test(n.userAgent), oe.isOperaMobile = n.appName === "Opera" && oe.supportsTouch && /Presto/.test(n.userAgent), oe.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", oe.pEventTypes = oe.supportsPointerEvent ? Y.PointerEvent === t.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, oe.wheelEvent = Y.document && "onmousewheel" in Y.document ? "mousewheel" : "wheel";
1138
- }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, ee = oe;
1029
+ var X = J, oe = { init: function(t) {
1030
+ var e = X.Element, n = t.navigator || {};
1031
+ oe.supportsTouch = "ontouchstart" in t || x.func(t.DocumentTouch) && X.document instanceof t.DocumentTouch, oe.supportsPointerEvent = n.pointerEnabled !== !1 && !!X.PointerEvent, oe.isIOS = /iP(hone|od|ad)/.test(n.platform), oe.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), oe.isIe9 = /MSIE 9/.test(n.userAgent), oe.isOperaMobile = n.appName === "Opera" && oe.supportsTouch && /Presto/.test(n.userAgent), oe.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", oe.pEventTypes = oe.supportsPointerEvent ? X.PointerEvent === t.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, oe.wheelEvent = X.document && "onmousewheel" in X.document ? "mousewheel" : "wheel";
1032
+ }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, re = oe;
1139
1033
  function se(t, e) {
1140
1034
  if (t.contains) return t.contains(e);
1141
1035
  for (; e; ) {
@@ -1144,8 +1038,8 @@ function Vo() {
1144
1038
  }
1145
1039
  return !1;
1146
1040
  }
1147
- function de(t, e) {
1148
- for (; b.element(t); ) {
1041
+ function pe(t, e) {
1042
+ for (; x.element(t); ) {
1149
1043
  if (he(t, e)) return t;
1150
1044
  t = fe(t);
1151
1045
  }
@@ -1153,40 +1047,40 @@ function Vo() {
1153
1047
  }
1154
1048
  function fe(t) {
1155
1049
  var e = t.parentNode;
1156
- if (b.docFrag(e)) {
1157
- for (; (e = e.host) && b.docFrag(e); ) ;
1050
+ if (x.docFrag(e)) {
1051
+ for (; (e = e.host) && x.docFrag(e); ) ;
1158
1052
  return e;
1159
1053
  }
1160
1054
  return e;
1161
1055
  }
1162
1056
  function he(t, e) {
1163
- return J !== Q && (e = e.replace(/\/deep\//g, " ")), t[ee.prefixedMatchesSelector](e);
1057
+ return L !== $ && (e = e.replace(/\/deep\//g, " ")), t[re.prefixedMatchesSelector](e);
1164
1058
  }
1165
- var w = function(t) {
1059
+ var E = function(t) {
1166
1060
  return t.parentNode || t.host;
1167
1061
  };
1168
- function z(t, e) {
1169
- for (var n, r = [], o = t; (n = w(o)) && o !== e && n !== o.ownerDocument; ) r.unshift(o), o = n;
1062
+ function H(t, e) {
1063
+ for (var n, r = [], o = t; (n = E(o)) && o !== e && n !== o.ownerDocument; ) r.unshift(o), o = n;
1170
1064
  return r;
1171
1065
  }
1172
- function j(t, e, n) {
1173
- for (; b.element(t); ) {
1066
+ function q(t, e, n) {
1067
+ for (; x.element(t); ) {
1174
1068
  if (he(t, e)) return !0;
1175
1069
  if ((t = fe(t)) === n) return he(t, e);
1176
1070
  }
1177
1071
  return !1;
1178
1072
  }
1179
- function $(t) {
1073
+ function G(t) {
1180
1074
  return t.correspondingUseElement || t;
1181
1075
  }
1182
1076
  function xe(t) {
1183
- var e = t instanceof Y.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1077
+ var e = t instanceof X.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1184
1078
  return e && { left: e.left, right: e.right, top: e.top, bottom: e.bottom, width: e.width || e.right - e.left, height: e.height || e.bottom - e.top };
1185
1079
  }
1186
1080
  function we(t) {
1187
1081
  var e, n = xe(t);
1188
- if (!ee.isIOS7 && n) {
1189
- var r = { x: (e = (e = te(t)) || J).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1082
+ if (!re.isIOS7 && n) {
1083
+ var r = { x: (e = (e = Z(t)) || L).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1190
1084
  n.left += r.x, n.right += r.x, n.top += r.y, n.bottom += r.y;
1191
1085
  }
1192
1086
  return n;
@@ -1196,57 +1090,57 @@ function Vo() {
1196
1090
  return e;
1197
1091
  }
1198
1092
  function Ee(t) {
1199
- return !!b.string(t) && (Y.document.querySelector(t), !0);
1093
+ return !!x.string(t) && (X.document.querySelector(t), !0);
1200
1094
  }
1201
- function P(t, e) {
1095
+ function D(t, e) {
1202
1096
  for (var n in e) t[n] = e[n];
1203
1097
  return t;
1204
1098
  }
1205
- function Qe(t, e, n) {
1206
- return t === "parent" ? fe(n) : t === "self" ? e.getRect(n) : de(n, t);
1099
+ function et(t, e, n) {
1100
+ return t === "parent" ? fe(n) : t === "self" ? e.getRect(n) : pe(n, t);
1207
1101
  }
1208
1102
  function ze(t, e, n, r) {
1209
1103
  var o = t;
1210
- return b.string(o) ? o = Qe(o, e, n) : b.func(o) && (o = o.apply(void 0, r)), b.element(o) && (o = we(o)), o;
1104
+ return x.string(o) ? o = et(o, e, n) : x.func(o) && (o = o.apply(void 0, r)), x.element(o) && (o = we(o)), o;
1211
1105
  }
1212
- function Ze(t) {
1106
+ function tt(t) {
1213
1107
  return t && { x: "x" in t ? t.x : t.left, y: "y" in t ? t.y : t.top };
1214
1108
  }
1215
- function vt(t) {
1216
- return !t || "x" in t && "y" in t || ((t = P({}, t)).x = t.left || 0, t.y = t.top || 0, t.width = t.width || (t.right || 0) - t.x, t.height = t.height || (t.bottom || 0) - t.y), t;
1109
+ function gt(t) {
1110
+ return !t || "x" in t && "y" in t || ((t = D({}, t)).x = t.left || 0, t.y = t.top || 0, t.width = t.width || (t.right || 0) - t.x, t.height = t.height || (t.bottom || 0) - t.y), t;
1217
1111
  }
1218
- function et(t, e, n) {
1112
+ function nt(t, e, n) {
1219
1113
  t.left && (e.left += n.x), t.right && (e.right += n.x), t.top && (e.top += n.y), t.bottom && (e.bottom += n.y), e.width = e.right - e.left, e.height = e.bottom - e.top;
1220
1114
  }
1221
1115
  function Le(t, e, n) {
1222
1116
  var r = n && t.options[n];
1223
- return Ze(ze(r && r.origin || t.options.origin, t, e, [t && e])) || { x: 0, y: 0 };
1117
+ return tt(ze(r && r.origin || t.options.origin, t, e, [t && e])) || { x: 0, y: 0 };
1224
1118
  }
1225
- function Ae(t, e) {
1119
+ function Ie(t, e) {
1226
1120
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(l) {
1227
1121
  return !0;
1228
1122
  }, r = arguments.length > 3 ? arguments[3] : void 0;
1229
- if (r = r || {}, b.string(t) && t.search(" ") !== -1 && (t = Ht(t)), b.array(t)) return t.forEach((function(l) {
1230
- return Ae(l, e, n, r);
1123
+ if (r = r || {}, x.string(t) && t.search(" ") !== -1 && (t = Bt(t)), x.array(t)) return t.forEach((function(l) {
1124
+ return Ie(l, e, n, r);
1231
1125
  })), r;
1232
- if (b.object(t) && (e = t, t = ""), b.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
1233
- else if (b.array(e)) for (var o = 0, i = e; o < i.length; o++) {
1126
+ if (x.object(t) && (e = t, t = ""), x.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
1127
+ else if (x.array(e)) for (var o = 0, i = e; o < i.length; o++) {
1234
1128
  var a = i[o];
1235
- Ae(t, a, n, r);
1129
+ Ie(t, a, n, r);
1236
1130
  }
1237
- else if (b.object(e)) for (var s in e)
1238
- Ae(Ht(s).map((function(l) {
1131
+ else if (x.object(e)) for (var s in e)
1132
+ Ie(Bt(s).map((function(l) {
1239
1133
  return "".concat(t).concat(l);
1240
1134
  })), e[s], n, r);
1241
1135
  return r;
1242
1136
  }
1243
- function Ht(t) {
1137
+ function Bt(t) {
1244
1138
  return t.trim().split(/ +/);
1245
1139
  }
1246
1140
  var Fe = function(t, e) {
1247
1141
  return Math.sqrt(t * t + e * e);
1248
1142
  }, jn = ["webkit", "moz"];
1249
- function tt(t, e) {
1143
+ function rt(t, e) {
1250
1144
  t.__set || (t.__set = {});
1251
1145
  var n = function(o) {
1252
1146
  if (jn.some((function(i) {
@@ -1261,35 +1155,35 @@ function Vo() {
1261
1155
  for (var r in e) n(r);
1262
1156
  return t;
1263
1157
  }
1264
- function nt(t, e) {
1158
+ function ot(t, e) {
1265
1159
  t.page = t.page || {}, t.page.x = e.page.x, t.page.y = e.page.y, t.client = t.client || {}, t.client.x = e.client.x, t.client.y = e.client.y, t.timeStamp = e.timeStamp;
1266
1160
  }
1267
- function Bt(t) {
1161
+ function Wt(t) {
1268
1162
  t.page.x = 0, t.page.y = 0, t.client.x = 0, t.client.y = 0;
1269
1163
  }
1270
1164
  function qt(t) {
1271
- return t instanceof Y.Event || t instanceof Y.Touch;
1165
+ return t instanceof X.Event || t instanceof X.Touch;
1272
1166
  }
1273
- function rt(t, e, n) {
1167
+ function it(t, e, n) {
1274
1168
  return t = t || "page", (n = n || {}).x = e[t + "X"], n.y = e[t + "Y"], n;
1275
1169
  }
1276
- function Wt(t, e) {
1277
- return e = e || { x: 0, y: 0 }, ee.isOperaMobile && qt(t) ? (rt("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : rt("page", t, e), e;
1170
+ function Yt(t, e) {
1171
+ return e = e || { x: 0, y: 0 }, re.isOperaMobile && qt(t) ? (it("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : it("page", t, e), e;
1278
1172
  }
1279
1173
  function je(t) {
1280
- return b.number(t.pointerId) ? t.pointerId : t.identifier;
1174
+ return x.number(t.pointerId) ? t.pointerId : t.identifier;
1281
1175
  }
1282
1176
  function Hn(t, e, n) {
1283
- var r = e.length > 1 ? Yt(e) : e[0];
1284
- Wt(r, t.page), (function(o, i) {
1285
- i = i || {}, ee.isOperaMobile && qt(o) ? rt("screen", o, i) : rt("client", o, i);
1177
+ var r = e.length > 1 ? $t(e) : e[0];
1178
+ Yt(r, t.page), (function(o, i) {
1179
+ i = i || {}, re.isOperaMobile && qt(o) ? it("screen", o, i) : it("client", o, i);
1286
1180
  })(r, t.client), t.timeStamp = n;
1287
1181
  }
1288
- function mt(t) {
1182
+ function yt(t) {
1289
1183
  var e = [];
1290
- return b.array(t) ? (e[0] = t[0], e[1] = t[1]) : t.type === "touchend" ? t.touches.length === 1 ? (e[0] = t.touches[0], e[1] = t.changedTouches[0]) : t.touches.length === 0 && (e[0] = t.changedTouches[0], e[1] = t.changedTouches[1]) : (e[0] = t.touches[0], e[1] = t.touches[1]), e;
1184
+ return x.array(t) ? (e[0] = t[0], e[1] = t[1]) : t.type === "touchend" ? t.touches.length === 1 ? (e[0] = t.touches[0], e[1] = t.changedTouches[0]) : t.touches.length === 0 && (e[0] = t.changedTouches[0], e[1] = t.changedTouches[1]) : (e[0] = t.touches[0], e[1] = t.touches[1]), e;
1291
1185
  }
1292
- function Yt(t) {
1186
+ function $t(t) {
1293
1187
  for (var e = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, n = 0; n < t.length; n++) {
1294
1188
  var r = t[n];
1295
1189
  for (var o in e) e[o] += r[o];
@@ -1297,56 +1191,56 @@ function Vo() {
1297
1191
  for (var i in e) e[i] /= t.length;
1298
1192
  return e;
1299
1193
  }
1300
- function gt(t) {
1194
+ function bt(t) {
1301
1195
  if (!t.length) return null;
1302
- var e = mt(t), n = Math.min(e[0].pageX, e[1].pageX), r = Math.min(e[0].pageY, e[1].pageY), o = Math.max(e[0].pageX, e[1].pageX), i = Math.max(e[0].pageY, e[1].pageY);
1196
+ var e = yt(t), n = Math.min(e[0].pageX, e[1].pageX), r = Math.min(e[0].pageY, e[1].pageY), o = Math.max(e[0].pageX, e[1].pageX), i = Math.max(e[0].pageY, e[1].pageY);
1303
1197
  return { x: n, y: r, left: n, top: r, right: o, bottom: i, width: o - n, height: i - r };
1304
1198
  }
1305
- function yt(t, e) {
1306
- var n = e + "X", r = e + "Y", o = mt(t), i = o[0][n] - o[1][n], a = o[0][r] - o[1][r];
1199
+ function xt(t, e) {
1200
+ var n = e + "X", r = e + "Y", o = yt(t), i = o[0][n] - o[1][n], a = o[0][r] - o[1][r];
1307
1201
  return Fe(i, a);
1308
1202
  }
1309
- function bt(t, e) {
1310
- var n = e + "X", r = e + "Y", o = mt(t), i = o[1][n] - o[0][n], a = o[1][r] - o[0][r];
1203
+ function wt(t, e) {
1204
+ var n = e + "X", r = e + "Y", o = yt(t), i = o[1][n] - o[0][n], a = o[1][r] - o[0][r];
1311
1205
  return 180 * Math.atan2(a, i) / Math.PI;
1312
1206
  }
1313
- function $t(t) {
1314
- return b.string(t.pointerType) ? t.pointerType : b.number(t.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][t.pointerType] : /touch/.test(t.type || "") || t instanceof Y.Touch ? "touch" : "mouse";
1315
- }
1316
1207
  function Vt(t) {
1317
- var e = b.func(t.composedPath) ? t.composedPath() : t.path;
1318
- return [$(e ? e[0] : t.target), $(t.currentTarget)];
1208
+ return x.string(t.pointerType) ? t.pointerType : x.number(t.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][t.pointerType] : /touch/.test(t.type || "") || t instanceof X.Touch ? "touch" : "mouse";
1319
1209
  }
1320
- var ot = (function() {
1210
+ function Ut(t) {
1211
+ var e = x.func(t.composedPath) ? t.composedPath() : t.path;
1212
+ return [G(e ? e[0] : t.target), G(t.currentTarget)];
1213
+ }
1214
+ var at = (function() {
1321
1215
  function t(e) {
1322
1216
  g(this, t), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = e;
1323
1217
  }
1324
- return x(t, [{ key: "preventDefault", value: function() {
1218
+ return y(t, [{ key: "preventDefault", value: function() {
1325
1219
  } }, { key: "stopPropagation", value: function() {
1326
1220
  this.propagationStopped = !0;
1327
1221
  } }, { key: "stopImmediatePropagation", value: function() {
1328
1222
  this.immediatePropagationStopped = this.propagationStopped = !0;
1329
1223
  } }]), t;
1330
1224
  })();
1331
- Object.defineProperty(ot.prototype, "interaction", { get: function() {
1225
+ Object.defineProperty(at.prototype, "interaction", { get: function() {
1332
1226
  return this._interaction._proxy;
1333
1227
  }, set: function() {
1334
1228
  } });
1335
- var Ut = function(t, e) {
1229
+ var Xt = function(t, e) {
1336
1230
  for (var n = 0; n < e.length; n++) {
1337
1231
  var r = e[n];
1338
1232
  t.push(r);
1339
1233
  }
1340
1234
  return t;
1341
- }, Xt = function(t) {
1342
- return Ut([], t);
1235
+ }, Gt = function(t) {
1236
+ return Xt([], t);
1343
1237
  }, He = function(t, e) {
1344
1238
  for (var n = 0; n < t.length; n++) if (e(t[n], n, t)) return n;
1345
1239
  return -1;
1346
1240
  }, Be = function(t, e) {
1347
1241
  return t[He(t, e)];
1348
- }, Oe = (function(t) {
1349
- _(n, t);
1242
+ }, De = (function(t) {
1243
+ M(n, t);
1350
1244
  var e = A(n);
1351
1245
  function n(r, o, i) {
1352
1246
  var a;
@@ -1354,7 +1248,7 @@ function Vo() {
1354
1248
  var s = i === "dragleave" ? r.prev : r.cur, l = s.element, d = s.dropzone;
1355
1249
  return a.type = i, a.target = l, a.currentTarget = l, a.dropzone = d, a.dragEvent = o, a.relatedTarget = o.target, a.draggable = o.interactable, a.timeStamp = o.timeStamp, a;
1356
1250
  }
1357
- return x(n, [{ key: "reject", value: function() {
1251
+ return y(n, [{ key: "reject", value: function() {
1358
1252
  var r = this, o = this._interaction.dropState;
1359
1253
  if (this.type === "dropactivate" || this.dropzone && o.cur.dropzone === this.dropzone && o.cur.element === this.target) if (o.prev.dropzone = this.dropzone, o.prev.element = this.target, o.rejected = !0, o.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
1360
1254
  var i = o.activeDrops, a = He(i, (function(l) {
@@ -1371,21 +1265,21 @@ function Vo() {
1371
1265
  } }, { key: "stopImmediatePropagation", value: function() {
1372
1266
  this.immediatePropagationStopped = this.propagationStopped = !0;
1373
1267
  } }]), n;
1374
- })(ot);
1375
- function Gt(t, e) {
1268
+ })(at);
1269
+ function Kt(t, e) {
1376
1270
  for (var n = 0, r = t.slice(); n < r.length; n++) {
1377
1271
  var o = r[n], i = o.dropzone, a = o.element;
1378
1272
  e.dropzone = i, e.target = a, i.fire(e), e.propagationStopped = e.immediatePropagationStopped = !1;
1379
1273
  }
1380
1274
  }
1381
- function xt(t, e) {
1275
+ function Et(t, e) {
1382
1276
  for (var n = (function(i, a) {
1383
1277
  for (var s = [], l = 0, d = i.interactables.list; l < d.length; l++) {
1384
1278
  var c = d[l];
1385
1279
  if (c.options.drop.enabled) {
1386
1280
  var f = c.options.drop.accept;
1387
- if (!(b.element(f) && f !== a || b.string(f) && !he(a, f) || b.func(f) && !f({ dropzone: c, draggableElement: a }))) for (var y = 0, S = c.getAllElements(); y < S.length; y++) {
1388
- var k = S[y];
1281
+ if (!(x.element(f) && f !== a || x.string(f) && !he(a, f) || x.func(f) && !f({ dropzone: c, draggableElement: a }))) for (var b = 0, S = c.getAllElements(); b < S.length; b++) {
1282
+ var k = S[b];
1389
1283
  k !== a && s.push({ dropzone: c, element: k, rect: c.getRect(k) });
1390
1284
  }
1391
1285
  }
@@ -1397,94 +1291,94 @@ function Vo() {
1397
1291
  }
1398
1292
  return n;
1399
1293
  }
1400
- function Kt(t, e, n) {
1294
+ function Jt(t, e, n) {
1401
1295
  for (var r = t.dropState, o = t.interactable, i = t.element, a = [], s = 0, l = r.activeDrops; s < l.length; s++) {
1402
- var d = l[s], c = d.dropzone, f = d.element, y = d.rect, S = c.dropCheck(e, n, o, i, f, y);
1296
+ var d = l[s], c = d.dropzone, f = d.element, b = d.rect, S = c.dropCheck(e, n, o, i, f, b);
1403
1297
  a.push(S ? f : null);
1404
1298
  }
1405
- var k = (function(T) {
1406
- for (var I, R, O, W = [], K = 0; K < T.length; K++) {
1407
- var L = T[K], V = T[I];
1408
- if (L && K !== I) if (V) {
1409
- var me = w(L), ae = w(V);
1410
- if (me !== L.ownerDocument) if (ae !== L.ownerDocument) if (me !== ae) {
1411
- W = W.length ? W : z(V);
1299
+ var k = (function(R) {
1300
+ for (var O, I, z, U = [], ee = 0; ee < R.length; ee++) {
1301
+ var B = R[ee], K = R[O];
1302
+ if (B && ee !== O) if (K) {
1303
+ var me = E(B), ae = E(K);
1304
+ if (me !== B.ownerDocument) if (ae !== B.ownerDocument) if (me !== ae) {
1305
+ U = U.length ? U : H(K);
1412
1306
  var ge = void 0;
1413
- if (V instanceof Y.HTMLElement && L instanceof Y.SVGElement && !(L instanceof Y.SVGSVGElement)) {
1414
- if (L === ae) continue;
1415
- ge = L.ownerSVGElement;
1416
- } else ge = L;
1417
- for (var be = z(ge, V.ownerDocument), Se = 0; be[Se] && be[Se] === W[Se]; ) Se++;
1418
- var ft = [be[Se - 1], be[Se], W[Se]];
1419
- if (ft[0]) for (var Ue = ft[0].lastChild; Ue; ) {
1420
- if (Ue === ft[1]) {
1421
- I = K, W = be;
1307
+ if (K instanceof X.HTMLElement && B instanceof X.SVGElement && !(B instanceof X.SVGSVGElement)) {
1308
+ if (B === ae) continue;
1309
+ ge = B.ownerSVGElement;
1310
+ } else ge = B;
1311
+ for (var be = H(ge, K.ownerDocument), Se = 0; be[Se] && be[Se] === U[Se]; ) Se++;
1312
+ var vt = [be[Se - 1], be[Se], U[Se]];
1313
+ if (vt[0]) for (var Ue = vt[0].lastChild; Ue; ) {
1314
+ if (Ue === vt[1]) {
1315
+ O = ee, U = be;
1422
1316
  break;
1423
1317
  }
1424
- if (Ue === ft[2]) break;
1318
+ if (Ue === vt[2]) break;
1425
1319
  Ue = Ue.previousSibling;
1426
1320
  }
1427
- } else O = V, (parseInt(te(R = L).getComputedStyle(R).zIndex, 10) || 0) >= (parseInt(te(O).getComputedStyle(O).zIndex, 10) || 0) && (I = K);
1428
- else I = K;
1429
- } else I = K;
1321
+ } else z = K, (parseInt(Z(I = B).getComputedStyle(I).zIndex, 10) || 0) >= (parseInt(Z(z).getComputedStyle(z).zIndex, 10) || 0) && (O = ee);
1322
+ else O = ee;
1323
+ } else O = ee;
1430
1324
  }
1431
- return I;
1325
+ return O;
1432
1326
  })(a);
1433
1327
  return r.activeDrops[k] || null;
1434
1328
  }
1435
- function wt(t, e, n) {
1329
+ function kt(t, e, n) {
1436
1330
  var r = t.dropState, o = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
1437
- return n.type === "dragstart" && (o.activate = new Oe(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new Oe(r, n, "dropdeactivate"), o.deactivate.target = null, o.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (o.leave = new Oe(r, n, "dragleave"), n.dragLeave = o.leave.target = r.prev.element, n.prevDropzone = o.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (o.enter = new Oe(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new Oe(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new Oe(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), o;
1331
+ return n.type === "dragstart" && (o.activate = new De(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new De(r, n, "dropdeactivate"), o.deactivate.target = null, o.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (o.leave = new De(r, n, "dragleave"), n.dragLeave = o.leave.target = r.prev.element, n.prevDropzone = o.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (o.enter = new De(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new De(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new De(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), o;
1438
1332
  }
1439
- function Et(t, e) {
1333
+ function Ct(t, e) {
1440
1334
  var n = t.dropState, r = n.activeDrops, o = n.cur, i = n.prev;
1441
- e.leave && i.dropzone.fire(e.leave), e.enter && o.dropzone.fire(e.enter), e.move && o.dropzone.fire(e.move), e.drop && o.dropzone.fire(e.drop), e.deactivate && Gt(r, e.deactivate), n.prev.dropzone = o.dropzone, n.prev.element = o.element;
1335
+ e.leave && i.dropzone.fire(e.leave), e.enter && o.dropzone.fire(e.enter), e.move && o.dropzone.fire(e.move), e.drop && o.dropzone.fire(e.drop), e.deactivate && Kt(r, e.deactivate), n.prev.dropzone = o.dropzone, n.prev.element = o.element;
1442
1336
  }
1443
- function Jt(t, e) {
1337
+ function Qt(t, e) {
1444
1338
  var n = t.interaction, r = t.iEvent, o = t.event;
1445
1339
  if (r.type === "dragmove" || r.type === "dragend") {
1446
1340
  var i = n.dropState;
1447
- e.dynamicDrop && (i.activeDrops = xt(e, n.element));
1448
- var a = r, s = Kt(n, a, o);
1449
- i.rejected = i.rejected && !!s && s.dropzone === i.cur.dropzone && s.element === i.cur.element, i.cur.dropzone = s && s.dropzone, i.cur.element = s && s.element, i.events = wt(n, 0, a);
1341
+ e.dynamicDrop && (i.activeDrops = Et(e, n.element));
1342
+ var a = r, s = Jt(n, a, o);
1343
+ i.rejected = i.rejected && !!s && s.dropzone === i.cur.dropzone && s.element === i.cur.element, i.cur.dropzone = s && s.dropzone, i.cur.element = s && s.element, i.events = kt(n, 0, a);
1450
1344
  }
1451
1345
  }
1452
- var Qt = { id: "actions/drop", install: function(t) {
1346
+ var Zt = { id: "actions/drop", install: function(t) {
1453
1347
  var e = t.actions, n = t.interactStatic, r = t.Interactable, o = t.defaults;
1454
1348
  t.usePlugin(ce), r.prototype.dropzone = function(i) {
1455
1349
  return (function(a, s) {
1456
- if (b.object(s)) {
1350
+ if (x.object(s)) {
1457
1351
  if (a.options.drop.enabled = s.enabled !== !1, s.listeners) {
1458
- var l = Ae(s.listeners), d = Object.keys(l).reduce((function(f, y) {
1459
- return f[/^(enter|leave)/.test(y) ? "drag".concat(y) : /^(activate|deactivate|move)/.test(y) ? "drop".concat(y) : y] = l[y], f;
1352
+ var l = Ie(s.listeners), d = Object.keys(l).reduce((function(f, b) {
1353
+ return f[/^(enter|leave)/.test(b) ? "drag".concat(b) : /^(activate|deactivate|move)/.test(b) ? "drop".concat(b) : b] = l[b], f;
1460
1354
  }), {}), c = a.options.drop.listeners;
1461
1355
  c && a.off(c), a.on(d), a.options.drop.listeners = d;
1462
1356
  }
1463
- return b.func(s.ondrop) && a.on("drop", s.ondrop), b.func(s.ondropactivate) && a.on("dropactivate", s.ondropactivate), b.func(s.ondropdeactivate) && a.on("dropdeactivate", s.ondropdeactivate), b.func(s.ondragenter) && a.on("dragenter", s.ondragenter), b.func(s.ondragleave) && a.on("dragleave", s.ondragleave), b.func(s.ondropmove) && a.on("dropmove", s.ondropmove), /^(pointer|center)$/.test(s.overlap) ? a.options.drop.overlap = s.overlap : b.number(s.overlap) && (a.options.drop.overlap = Math.max(Math.min(1, s.overlap), 0)), "accept" in s && (a.options.drop.accept = s.accept), "checker" in s && (a.options.drop.checker = s.checker), a;
1357
+ return x.func(s.ondrop) && a.on("drop", s.ondrop), x.func(s.ondropactivate) && a.on("dropactivate", s.ondropactivate), x.func(s.ondropdeactivate) && a.on("dropdeactivate", s.ondropdeactivate), x.func(s.ondragenter) && a.on("dragenter", s.ondragenter), x.func(s.ondragleave) && a.on("dragleave", s.ondragleave), x.func(s.ondropmove) && a.on("dropmove", s.ondropmove), /^(pointer|center)$/.test(s.overlap) ? a.options.drop.overlap = s.overlap : x.number(s.overlap) && (a.options.drop.overlap = Math.max(Math.min(1, s.overlap), 0)), "accept" in s && (a.options.drop.accept = s.accept), "checker" in s && (a.options.drop.checker = s.checker), a;
1464
1358
  }
1465
- return b.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1359
+ return x.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1466
1360
  })(this, i);
1467
1361
  }, r.prototype.dropCheck = function(i, a, s, l, d, c) {
1468
- return (function(f, y, S, k, T, I, R) {
1469
- var O = !1;
1470
- if (!(R = R || f.getRect(I))) return !!f.options.drop.checker && f.options.drop.checker(y, S, O, f, I, k, T);
1471
- var W = f.options.drop.overlap;
1472
- if (W === "pointer") {
1473
- var K = Le(k, T, "drag"), L = Wt(y);
1474
- L.x += K.x, L.y += K.y;
1475
- var V = L.x > R.left && L.x < R.right, me = L.y > R.top && L.y < R.bottom;
1476
- O = V && me;
1362
+ return (function(f, b, S, k, R, O, I) {
1363
+ var z = !1;
1364
+ if (!(I = I || f.getRect(O))) return !!f.options.drop.checker && f.options.drop.checker(b, S, z, f, O, k, R);
1365
+ var U = f.options.drop.overlap;
1366
+ if (U === "pointer") {
1367
+ var ee = Le(k, R, "drag"), B = Yt(b);
1368
+ B.x += ee.x, B.y += ee.y;
1369
+ var K = B.x > I.left && B.x < I.right, me = B.y > I.top && B.y < I.bottom;
1370
+ z = K && me;
1477
1371
  }
1478
- var ae = k.getRect(T);
1479
- if (ae && W === "center") {
1372
+ var ae = k.getRect(R);
1373
+ if (ae && U === "center") {
1480
1374
  var ge = ae.left + ae.width / 2, be = ae.top + ae.height / 2;
1481
- O = ge >= R.left && ge <= R.right && be >= R.top && be <= R.bottom;
1375
+ z = ge >= I.left && ge <= I.right && be >= I.top && be <= I.bottom;
1482
1376
  }
1483
- return ae && b.number(W) && (O = Math.max(0, Math.min(R.right, ae.right) - Math.max(R.left, ae.left)) * Math.max(0, Math.min(R.bottom, ae.bottom) - Math.max(R.top, ae.top)) / (ae.width * ae.height) >= W), f.options.drop.checker && (O = f.options.drop.checker(y, S, O, f, I, k, T)), O;
1377
+ return ae && x.number(U) && (z = Math.max(0, Math.min(I.right, ae.right) - Math.max(I.left, ae.left)) * Math.max(0, Math.min(I.bottom, ae.bottom) - Math.max(I.top, ae.top)) / (ae.width * ae.height) >= U), f.options.drop.checker && (z = f.options.drop.checker(b, S, z, f, O, k, R)), z;
1484
1378
  })(this, i, a, s, l, d, c);
1485
1379
  }, n.dynamicDrop = function(i) {
1486
- return b.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
1487
- }, P(e.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), e.methodDict.drop = "dropzone", t.dynamicDrop = !1, o.actions.drop = Qt.defaults;
1380
+ return x.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
1381
+ }, D(e.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), e.methodDict.drop = "dropzone", t.dynamicDrop = !1, o.actions.drop = Zt.defaults;
1488
1382
  }, listeners: { "interactions:before-action-start": function(t) {
1489
1383
  var e = t.interaction;
1490
1384
  e.prepared.name === "drag" && (e.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
@@ -1492,18 +1386,18 @@ function Vo() {
1492
1386
  var n = t.interaction, r = (t.event, t.iEvent);
1493
1387
  if (n.prepared.name === "drag") {
1494
1388
  var o = n.dropState;
1495
- o.activeDrops = [], o.events = {}, o.activeDrops = xt(e, n.element), o.events = wt(n, 0, r), o.events.activate && (Gt(o.activeDrops, o.events.activate), e.fire("actions/drop:start", { interaction: n, dragEvent: r }));
1389
+ o.activeDrops = [], o.events = {}, o.activeDrops = Et(e, n.element), o.events = kt(n, 0, r), o.events.activate && (Kt(o.activeDrops, o.events.activate), e.fire("actions/drop:start", { interaction: n, dragEvent: r }));
1496
1390
  }
1497
- }, "interactions:action-move": Jt, "interactions:after-action-move": function(t, e) {
1391
+ }, "interactions:action-move": Qt, "interactions:after-action-move": function(t, e) {
1498
1392
  var n = t.interaction, r = t.iEvent;
1499
1393
  if (n.prepared.name === "drag") {
1500
1394
  var o = n.dropState;
1501
- Et(n, o.events), e.fire("actions/drop:move", { interaction: n, dragEvent: r }), o.events = {};
1395
+ Ct(n, o.events), e.fire("actions/drop:move", { interaction: n, dragEvent: r }), o.events = {};
1502
1396
  }
1503
1397
  }, "interactions:action-end": function(t, e) {
1504
1398
  if (t.interaction.prepared.name === "drag") {
1505
1399
  var n = t.interaction, r = t.iEvent;
1506
- Jt(t, e), Et(n, n.dropState.events), e.fire("actions/drop:end", { interaction: n, dragEvent: r });
1400
+ Qt(t, e), Ct(n, n.dropState.events), e.fire("actions/drop:end", { interaction: n, dragEvent: r });
1507
1401
  }
1508
1402
  }, "interactions:stop": function(t) {
1509
1403
  var e = t.interaction;
@@ -1511,29 +1405,29 @@ function Vo() {
1511
1405
  var n = e.dropState;
1512
1406
  n && (n.activeDrops = null, n.events = null, n.cur.dropzone = null, n.cur.element = null, n.prev.dropzone = null, n.prev.element = null, n.rejected = !1);
1513
1407
  }
1514
- } }, getActiveDrops: xt, getDrop: Kt, getDropEvents: wt, fireDropEvents: Et, filterEventType: function(t) {
1408
+ } }, getActiveDrops: Et, getDrop: Jt, getDropEvents: kt, fireDropEvents: Ct, filterEventType: function(t) {
1515
1409
  return t.search("drag") === 0 || t.search("drop") === 0;
1516
- }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Bn = Qt;
1517
- function kt(t) {
1410
+ }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Bn = Zt;
1411
+ function St(t) {
1518
1412
  var e = t.interaction, n = t.iEvent, r = t.phase;
1519
1413
  if (e.prepared.name === "gesture") {
1520
1414
  var o = e.pointers.map((function(d) {
1521
1415
  return d.pointer;
1522
1416
  })), i = r === "start", a = r === "end", s = e.interactable.options.deltaSource;
1523
- if (n.touches = [o[0], o[1]], i) n.distance = yt(o, s), n.box = gt(o), n.scale = 1, n.ds = 0, n.angle = bt(o, s), n.da = 0, e.gesture.startDistance = n.distance, e.gesture.startAngle = n.angle;
1417
+ if (n.touches = [o[0], o[1]], i) n.distance = xt(o, s), n.box = bt(o), n.scale = 1, n.ds = 0, n.angle = wt(o, s), n.da = 0, e.gesture.startDistance = n.distance, e.gesture.startAngle = n.angle;
1524
1418
  else if (a || e.pointers.length < 2) {
1525
1419
  var l = e.prevEvent;
1526
1420
  n.distance = l.distance, n.box = l.box, n.scale = l.scale, n.ds = 0, n.angle = l.angle, n.da = 0;
1527
- } else n.distance = yt(o, s), n.box = gt(o), n.scale = n.distance / e.gesture.startDistance, n.angle = bt(o, s), n.ds = n.scale - e.gesture.scale, n.da = n.angle - e.gesture.angle;
1528
- e.gesture.distance = n.distance, e.gesture.angle = n.angle, b.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);
1421
+ } else n.distance = xt(o, s), n.box = bt(o), n.scale = n.distance / e.gesture.startDistance, n.angle = wt(o, s), n.ds = n.scale - e.gesture.scale, n.da = n.angle - e.gesture.angle;
1422
+ e.gesture.distance = n.distance, e.gesture.angle = n.angle, x.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);
1529
1423
  }
1530
1424
  }
1531
- var Ct = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(t) {
1425
+ var Tt = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(t) {
1532
1426
  var e = t.actions, n = t.Interactable, r = t.defaults;
1533
1427
  n.prototype.gesturable = function(o) {
1534
- return b.object(o) ? (this.options.gesture.enabled = o.enabled !== !1, this.setPerAction("gesture", o), this.setOnEvents("gesture", o), this) : b.bool(o) ? (this.options.gesture.enabled = o, this) : this.options.gesture;
1535
- }, e.map.gesture = Ct, e.methodDict.gesture = "gesturable", r.actions.gesture = Ct.defaults;
1536
- }, listeners: { "interactions:action-start": kt, "interactions:action-move": kt, "interactions:action-end": kt, "interactions:new": function(t) {
1428
+ return x.object(o) ? (this.options.gesture.enabled = o.enabled !== !1, this.setPerAction("gesture", o), this.setOnEvents("gesture", o), this) : x.bool(o) ? (this.options.gesture.enabled = o, this) : this.options.gesture;
1429
+ }, e.map.gesture = Tt, e.methodDict.gesture = "gesturable", r.actions.gesture = Tt.defaults;
1430
+ }, listeners: { "interactions:action-start": St, "interactions:action-move": St, "interactions:action-end": St, "interactions:new": function(t) {
1537
1431
  t.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
1538
1432
  }, "auto-start:check": function(t) {
1539
1433
  if (!(t.interaction.pointers.length < 2)) {
@@ -1544,11 +1438,11 @@ function Vo() {
1544
1438
  return "";
1545
1439
  }, filterEventType: function(t) {
1546
1440
  return t.search("gesture") === 0;
1547
- } }, qn = Ct;
1548
- function Wn(t, e, n, r, o, i, a) {
1441
+ } }, Wn = Tt;
1442
+ function qn(t, e, n, r, o, i, a) {
1549
1443
  if (!e) return !1;
1550
1444
  if (e === !0) {
1551
- var s = b.number(i.width) ? i.width : i.right - i.left, l = b.number(i.height) ? i.height : i.bottom - i.top;
1445
+ var s = x.number(i.width) ? i.width : i.right - i.left, l = x.number(i.height) ? i.height : i.bottom - i.top;
1552
1446
  if (a = Math.min(a, Math.abs((t === "left" || t === "right" ? s : l) / 2)), s < 0 && (t === "left" ? t = "right" : t === "right" && (t = "left")), l < 0 && (t === "top" ? t = "bottom" : t === "bottom" && (t = "top")), t === "left") {
1553
1447
  var d = s >= 0 ? i.left : i.right;
1554
1448
  return n.x < d + a;
@@ -1560,22 +1454,22 @@ function Vo() {
1560
1454
  if (t === "right") return n.x > (s >= 0 ? i.right : i.left) - a;
1561
1455
  if (t === "bottom") return n.y > (l >= 0 ? i.bottom : i.top) - a;
1562
1456
  }
1563
- return !!b.element(r) && (b.element(e) ? e === r : j(r, e, o));
1457
+ return !!x.element(r) && (x.element(e) ? e === r : q(r, e, o));
1564
1458
  }
1565
- function Zt(t) {
1459
+ function en(t) {
1566
1460
  var e = t.iEvent, n = t.interaction;
1567
1461
  if (n.prepared.name === "resize" && n.resizeAxes) {
1568
1462
  var r = e;
1569
1463
  n.interactable.options.resize.square ? (n.resizeAxes === "y" ? r.delta.x = r.delta.y : r.delta.y = r.delta.x, r.axes = "xy") : (r.axes = n.resizeAxes, n.resizeAxes === "x" ? r.delta.y = 0 : n.resizeAxes === "y" && (r.delta.x = 0));
1570
1464
  }
1571
1465
  }
1572
- var ke, Ie, Ce = { id: "actions/resize", before: ["actions/drag"], install: function(t) {
1466
+ var ke, Pe, Ce = { id: "actions/resize", before: ["actions/drag"], install: function(t) {
1573
1467
  var e = t.actions, n = t.browser, r = t.Interactable, o = t.defaults;
1574
1468
  Ce.cursors = (function(i) {
1575
1469
  return i.isIe9 ? { x: "e-resize", y: "s-resize", xy: "se-resize", top: "n-resize", left: "w-resize", bottom: "s-resize", right: "e-resize", topleft: "se-resize", bottomright: "se-resize", topright: "ne-resize", bottomleft: "ne-resize" } : { x: "ew-resize", y: "ns-resize", xy: "nwse-resize", top: "ns-resize", left: "ew-resize", bottom: "ns-resize", right: "ew-resize", topleft: "nwse-resize", bottomright: "nwse-resize", topright: "nesw-resize", bottomleft: "nesw-resize" };
1576
1470
  })(n), Ce.defaultMargin = n.supportsTouch || n.supportsPointerEvent ? 20 : 10, r.prototype.resizable = function(i) {
1577
1471
  return (function(a, s, l) {
1578
- return b.object(s) ? (a.options.resize.enabled = s.enabled !== !1, a.setPerAction("resize", s), a.setOnEvents("resize", s), b.string(s.axis) && /^x$|^y$|^xy$/.test(s.axis) ? a.options.resize.axis = s.axis : s.axis === null && (a.options.resize.axis = l.defaults.actions.resize.axis), b.bool(s.preserveAspectRatio) ? a.options.resize.preserveAspectRatio = s.preserveAspectRatio : b.bool(s.square) && (a.options.resize.square = s.square), a) : b.bool(s) ? (a.options.resize.enabled = s, a) : a.options.resize;
1472
+ return x.object(s) ? (a.options.resize.enabled = s.enabled !== !1, a.setPerAction("resize", s), a.setOnEvents("resize", s), x.string(s.axis) && /^x$|^y$|^xy$/.test(s.axis) ? a.options.resize.axis = s.axis : s.axis === null && (a.options.resize.axis = l.defaults.actions.resize.axis), x.bool(s.preserveAspectRatio) ? a.options.resize.preserveAspectRatio = s.preserveAspectRatio : x.bool(s.square) && (a.options.resize.square = s.square), a) : x.bool(s) ? (a.options.resize.enabled = s, a) : a.options.resize;
1579
1473
  })(this, i, t);
1580
1474
  }, e.map.resize = Ce, e.methodDict.resize = "resizable", o.actions.resize = Ce.defaults;
1581
1475
  }, listeners: { "interactions:new": function(t) {
@@ -1585,16 +1479,16 @@ function Vo() {
1585
1479
  var n = e.iEvent, r = e.interaction;
1586
1480
  if (r.prepared.name === "resize" && r.prepared.edges) {
1587
1481
  var o = n, i = r.rect;
1588
- r._rects = { start: P({}, i), corrected: P({}, i), previous: P({}, i), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, o.edges = r.prepared.edges, o.rect = r._rects.corrected, o.deltaRect = r._rects.delta;
1482
+ r._rects = { start: D({}, i), corrected: D({}, i), previous: D({}, i), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, o.edges = r.prepared.edges, o.rect = r._rects.corrected, o.deltaRect = r._rects.delta;
1589
1483
  }
1590
- })(t), Zt(t);
1484
+ })(t), en(t);
1591
1485
  }, "interactions:action-move": function(t) {
1592
1486
  (function(e) {
1593
1487
  var n = e.iEvent, r = e.interaction;
1594
1488
  if (r.prepared.name === "resize" && r.prepared.edges) {
1595
- var o = n, i = r.interactable.options.resize.invert, a = i === "reposition" || i === "negate", s = r.rect, l = r._rects, d = l.start, c = l.corrected, f = l.delta, y = l.previous;
1596
- if (P(y, c), a) {
1597
- if (P(c, s), i === "reposition") {
1489
+ var o = n, i = r.interactable.options.resize.invert, a = i === "reposition" || i === "negate", s = r.rect, l = r._rects, d = l.start, c = l.corrected, f = l.delta, b = l.previous;
1490
+ if (D(b, c), a) {
1491
+ if (D(c, s), i === "reposition") {
1598
1492
  if (c.top > c.bottom) {
1599
1493
  var S = c.top;
1600
1494
  c.top = c.bottom, c.bottom = S;
@@ -1605,10 +1499,10 @@ function Vo() {
1605
1499
  }
1606
1500
  }
1607
1501
  } else c.top = Math.min(s.top, d.bottom), c.bottom = Math.max(s.bottom, d.top), c.left = Math.min(s.left, d.right), c.right = Math.max(s.right, d.left);
1608
- for (var T in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[T] = c[T] - y[T];
1502
+ for (var R in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[R] = c[R] - b[R];
1609
1503
  o.edges = r.prepared.edges, o.rect = c, o.deltaRect = f;
1610
1504
  }
1611
- })(t), Zt(t);
1505
+ })(t), en(t);
1612
1506
  }, "interactions:action-end": function(t) {
1613
1507
  var e = t.iEvent, n = t.interaction;
1614
1508
  if (n.prepared.name === "resize" && n.prepared.edges) {
@@ -1618,11 +1512,11 @@ function Vo() {
1618
1512
  }, "auto-start:check": function(t) {
1619
1513
  var e = t.interaction, n = t.interactable, r = t.element, o = t.rect, i = t.buttons;
1620
1514
  if (o) {
1621
- var a = P({}, e.coords.cur.page), s = n.options.resize;
1515
+ var a = D({}, e.coords.cur.page), s = n.options.resize;
1622
1516
  if (s && s.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (i & s.mouseButtons) != 0)) {
1623
- if (b.object(s.edges)) {
1517
+ if (x.object(s.edges)) {
1624
1518
  var l = { left: !1, right: !1, top: !1, bottom: !1 };
1625
- for (var d in l) l[d] = Wn(d, s.edges[d], a, e._latestPointer.eventTarget, r, o, s.margin || Ce.defaultMargin);
1519
+ for (var d in l) l[d] = qn(d, s.edges[d], a, e._latestPointer.eventTarget, r, o, s.margin || Ce.defaultMargin);
1626
1520
  l.left = l.left && !l.right, l.top = l.top && !l.bottom, (l.left || l.right || l.top || l.bottom) && (t.action = { name: "resize", edges: l });
1627
1521
  } else {
1628
1522
  var c = s.axis !== "y" && a.x > o.right - Ce.defaultMargin, f = s.axis !== "x" && a.y > o.bottom - Ce.defaultMargin;
@@ -1645,123 +1539,123 @@ function Vo() {
1645
1539
  }, filterEventType: function(t) {
1646
1540
  return t.search("resize") === 0;
1647
1541
  }, defaultMargin: null }, Yn = Ce, $n = { id: "actions", install: function(t) {
1648
- t.usePlugin(qn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Bn);
1649
- } }, en = 0, Te = { request: function(t) {
1542
+ t.usePlugin(Wn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Bn);
1543
+ } }, tn = 0, Te = { request: function(t) {
1650
1544
  return ke(t);
1651
1545
  }, cancel: function(t) {
1652
- return Ie(t);
1546
+ return Pe(t);
1653
1547
  }, init: function(t) {
1654
- if (ke = t.requestAnimationFrame, Ie = t.cancelAnimationFrame, !ke) for (var e = ["ms", "moz", "webkit", "o"], n = 0; n < e.length; n++) {
1548
+ if (ke = t.requestAnimationFrame, Pe = t.cancelAnimationFrame, !ke) for (var e = ["ms", "moz", "webkit", "o"], n = 0; n < e.length; n++) {
1655
1549
  var r = e[n];
1656
- ke = t["".concat(r, "RequestAnimationFrame")], Ie = t["".concat(r, "CancelAnimationFrame")] || t["".concat(r, "CancelRequestAnimationFrame")];
1550
+ ke = t["".concat(r, "RequestAnimationFrame")], Pe = t["".concat(r, "CancelAnimationFrame")] || t["".concat(r, "CancelRequestAnimationFrame")];
1657
1551
  }
1658
- ke = ke && ke.bind(t), Ie = Ie && Ie.bind(t), ke || (ke = function(o) {
1659
- var i = Date.now(), a = Math.max(0, 16 - (i - en)), s = t.setTimeout((function() {
1552
+ ke = ke && ke.bind(t), Pe = Pe && Pe.bind(t), ke || (ke = function(o) {
1553
+ var i = Date.now(), a = Math.max(0, 16 - (i - tn)), s = t.setTimeout((function() {
1660
1554
  o(i + a);
1661
1555
  }), a);
1662
- return en = i + a, s;
1663
- }, Ie = function(o) {
1556
+ return tn = i + a, s;
1557
+ }, Pe = function(o) {
1664
1558
  return clearTimeout(o);
1665
1559
  });
1666
- } }, H = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(t) {
1667
- H.isScrolling = !0, Te.cancel(H.i), t.autoScroll = H, H.interaction = t, H.prevTime = H.now(), H.i = Te.request(H.scroll);
1560
+ } }, Y = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(t) {
1561
+ Y.isScrolling = !0, Te.cancel(Y.i), t.autoScroll = Y, Y.interaction = t, Y.prevTime = Y.now(), Y.i = Te.request(Y.scroll);
1668
1562
  }, stop: function() {
1669
- H.isScrolling = !1, H.interaction && (H.interaction.autoScroll = null), Te.cancel(H.i);
1563
+ Y.isScrolling = !1, Y.interaction && (Y.interaction.autoScroll = null), Te.cancel(Y.i);
1670
1564
  }, scroll: function() {
1671
- var t = H.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = tn(o.container, e, n), a = H.now(), s = (a - H.prevTime) / 1e3, l = o.speed * s;
1565
+ var t = Y.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = nn(o.container, e, n), a = Y.now(), s = (a - Y.prevTime) / 1e3, l = o.speed * s;
1672
1566
  if (l >= 1) {
1673
- var d = { x: H.x * l, y: H.y * l };
1567
+ var d = { x: Y.x * l, y: Y.y * l };
1674
1568
  if (d.x || d.y) {
1675
- var c = nn(i);
1676
- b.window(i) ? i.scrollBy(d.x, d.y) : i && (i.scrollLeft += d.x, i.scrollTop += d.y);
1677
- var f = nn(i), y = { x: f.x - c.x, y: f.y - c.y };
1678
- (y.x || y.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: y, interaction: t, container: i });
1569
+ var c = rn(i);
1570
+ x.window(i) ? i.scrollBy(d.x, d.y) : i && (i.scrollLeft += d.x, i.scrollTop += d.y);
1571
+ var f = rn(i), b = { x: f.x - c.x, y: f.y - c.y };
1572
+ (b.x || b.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: b, interaction: t, container: i });
1679
1573
  }
1680
- H.prevTime = a;
1574
+ Y.prevTime = a;
1681
1575
  }
1682
- H.isScrolling && (Te.cancel(H.i), H.i = Te.request(H.scroll));
1576
+ Y.isScrolling && (Te.cancel(Y.i), Y.i = Te.request(Y.scroll));
1683
1577
  }, check: function(t, e) {
1684
1578
  var n;
1685
1579
  return (n = t.options[e].autoScroll) == null ? void 0 : n.enabled;
1686
1580
  }, onInteractionMove: function(t) {
1687
1581
  var e = t.interaction, n = t.pointer;
1688
- if (e.interacting() && H.check(e.interactable, e.prepared.name)) if (e.simulation) H.x = H.y = 0;
1582
+ if (e.interacting() && Y.check(e.interactable, e.prepared.name)) if (e.simulation) Y.x = Y.y = 0;
1689
1583
  else {
1690
- var r, o, i, a, s = e.interactable, l = e.element, d = e.prepared.name, c = s.options[d].autoScroll, f = tn(c.container, s, l);
1691
- if (b.window(f)) a = n.clientX < H.margin, r = n.clientY < H.margin, o = n.clientX > f.innerWidth - H.margin, i = n.clientY > f.innerHeight - H.margin;
1584
+ var r, o, i, a, s = e.interactable, l = e.element, d = e.prepared.name, c = s.options[d].autoScroll, f = nn(c.container, s, l);
1585
+ if (x.window(f)) a = n.clientX < Y.margin, r = n.clientY < Y.margin, o = n.clientX > f.innerWidth - Y.margin, i = n.clientY > f.innerHeight - Y.margin;
1692
1586
  else {
1693
- var y = xe(f);
1694
- a = n.clientX < y.left + H.margin, r = n.clientY < y.top + H.margin, o = n.clientX > y.right - H.margin, i = n.clientY > y.bottom - H.margin;
1587
+ var b = xe(f);
1588
+ a = n.clientX < b.left + Y.margin, r = n.clientY < b.top + Y.margin, o = n.clientX > b.right - Y.margin, i = n.clientY > b.bottom - Y.margin;
1695
1589
  }
1696
- H.x = o ? 1 : a ? -1 : 0, H.y = i ? 1 : r ? -1 : 0, H.isScrolling || (H.margin = c.margin, H.speed = c.speed, H.start(e));
1590
+ Y.x = o ? 1 : a ? -1 : 0, Y.y = i ? 1 : r ? -1 : 0, Y.isScrolling || (Y.margin = c.margin, Y.speed = c.speed, Y.start(e));
1697
1591
  }
1698
1592
  } };
1699
- function tn(t, e, n) {
1700
- return (b.string(t) ? Qe(t, e, n) : t) || te(n);
1593
+ function nn(t, e, n) {
1594
+ return (x.string(t) ? et(t, e, n) : t) || Z(n);
1701
1595
  }
1702
- function nn(t) {
1703
- return b.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
1596
+ function rn(t) {
1597
+ return x.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
1704
1598
  }
1705
1599
  var Vn = { id: "auto-scroll", install: function(t) {
1706
1600
  var e = t.defaults, n = t.actions;
1707
- t.autoScroll = H, H.now = function() {
1601
+ t.autoScroll = Y, Y.now = function() {
1708
1602
  return t.now();
1709
- }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = H.defaults;
1603
+ }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = Y.defaults;
1710
1604
  }, listeners: { "interactions:new": function(t) {
1711
1605
  t.interaction.autoScroll = null;
1712
1606
  }, "interactions:destroy": function(t) {
1713
- t.interaction.autoScroll = null, H.stop(), H.interaction && (H.interaction = null);
1714
- }, "interactions:stop": H.stop, "interactions:action-move": function(t) {
1715
- return H.onInteractionMove(t);
1607
+ t.interaction.autoScroll = null, Y.stop(), Y.interaction && (Y.interaction = null);
1608
+ }, "interactions:stop": Y.stop, "interactions:action-move": function(t) {
1609
+ return Y.onInteractionMove(t);
1716
1610
  } } }, Un = Vn;
1717
- function qe(t, e) {
1611
+ function We(t, e) {
1718
1612
  var n = !1;
1719
1613
  return function() {
1720
- return n || (J.console.warn(e), n = !0), t.apply(this, arguments);
1614
+ return n || (L.console.warn(e), n = !0), t.apply(this, arguments);
1721
1615
  };
1722
1616
  }
1723
- function St(t, e) {
1617
+ function _t(t, e) {
1724
1618
  return t.name = e.name, t.axis = e.axis, t.edges = e.edges, t;
1725
1619
  }
1726
1620
  function Xn(t) {
1727
- return b.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1621
+ return x.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1728
1622
  }
1729
1623
  function Gn(t) {
1730
- return b.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1624
+ return x.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1731
1625
  }
1732
1626
  var Kn = { id: "auto-start/interactableMethods", install: function(t) {
1733
1627
  var e = t.Interactable;
1734
1628
  e.prototype.getAction = function(n, r, o, i) {
1735
1629
  var a = (function(s, l, d, c, f) {
1736
- var y = s.getRect(c), S = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], k = { action: null, interactable: s, interaction: d, element: c, rect: y, buttons: S };
1630
+ var b = s.getRect(c), S = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], k = { action: null, interactable: s, interaction: d, element: c, rect: b, buttons: S };
1737
1631
  return f.fire("auto-start:check", k), k.action;
1738
1632
  })(this, r, o, i, t);
1739
1633
  return this.options.actionChecker ? this.options.actionChecker(n, r, a, this, i, o) : a;
1740
- }, e.prototype.ignoreFrom = qe((function(n) {
1634
+ }, e.prototype.ignoreFrom = We((function(n) {
1741
1635
  return this._backCompatOption("ignoreFrom", n);
1742
- }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = qe((function(n) {
1636
+ }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = We((function(n) {
1743
1637
  return this._backCompatOption("allowFrom", n);
1744
1638
  }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), e.prototype.actionChecker = Gn, e.prototype.styleCursor = Xn;
1745
1639
  } };
1746
- function rn(t, e, n, r, o) {
1747
- return e.testIgnoreAllow(e.options[t.name], n, r) && e.options[t.name].enabled && it(e, n, t, o) ? t : null;
1640
+ function on(t, e, n, r, o) {
1641
+ return e.testIgnoreAllow(e.options[t.name], n, r) && e.options[t.name].enabled && st(e, n, t, o) ? t : null;
1748
1642
  }
1749
1643
  function Jn(t, e, n, r, o, i, a) {
1750
1644
  for (var s = 0, l = r.length; s < l; s++) {
1751
1645
  var d = r[s], c = o[s], f = d.getAction(e, n, t, c);
1752
1646
  if (f) {
1753
- var y = rn(f, d, c, i, a);
1754
- if (y) return { action: y, interactable: d, element: c };
1647
+ var b = on(f, d, c, i, a);
1648
+ if (b) return { action: b, interactable: d, element: c };
1755
1649
  }
1756
1650
  }
1757
1651
  return { action: null, interactable: null, element: null };
1758
1652
  }
1759
- function on(t, e, n, r, o) {
1653
+ function an(t, e, n, r, o) {
1760
1654
  var i = [], a = [], s = r;
1761
1655
  function l(c) {
1762
1656
  i.push(c), a.push(s);
1763
1657
  }
1764
- for (; b.element(s); ) {
1658
+ for (; x.element(s); ) {
1765
1659
  i = [], a = [], o.interactables.forEachMatch(s, l);
1766
1660
  var d = Jn(t, e, n, i, a, r, o);
1767
1661
  if (d.action && !d.interactable.options[d.action.name].manualStart) return d;
@@ -1769,81 +1663,81 @@ function Vo() {
1769
1663
  }
1770
1664
  return { action: null, interactable: null, element: null };
1771
1665
  }
1772
- function an(t, e, n) {
1666
+ function sn(t, e, n) {
1773
1667
  var r = e.action, o = e.interactable, i = e.element;
1774
- r = r || { name: null }, t.interactable = o, t.element = i, St(t.prepared, r), t.rect = o && r.name ? o.getRect(i) : null, ln(t, n), n.fire("autoStart:prepared", { interaction: t });
1668
+ r = r || { name: null }, t.interactable = o, t.element = i, _t(t.prepared, r), t.rect = o && r.name ? o.getRect(i) : null, cn(t, n), n.fire("autoStart:prepared", { interaction: t });
1775
1669
  }
1776
- function it(t, e, n, r) {
1670
+ function st(t, e, n, r) {
1777
1671
  var o = t.options, i = o[n.name].max, a = o[n.name].maxPerElement, s = r.autoStart.maxInteractions, l = 0, d = 0, c = 0;
1778
1672
  if (!(i && a && s)) return !1;
1779
- for (var f = 0, y = r.interactions.list; f < y.length; f++) {
1780
- var S = y[f], k = S.prepared.name;
1673
+ for (var f = 0, b = r.interactions.list; f < b.length; f++) {
1674
+ var S = b[f], k = S.prepared.name;
1781
1675
  if (S.interacting() && (++l >= s || S.interactable === t && ((d += k === n.name ? 1 : 0) >= i || S.element === e && (c++, k === n.name && c >= a))))
1782
1676
  return !1;
1783
1677
  }
1784
1678
  return s > 0;
1785
1679
  }
1786
- function sn(t, e) {
1787
- return b.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1680
+ function ln(t, e) {
1681
+ return x.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1788
1682
  }
1789
- function Tt(t, e, n) {
1683
+ function Mt(t, e, n) {
1790
1684
  var r = n.autoStart.cursorElement;
1791
1685
  r && r !== t && (r.style.cursor = ""), t.ownerDocument.documentElement.style.cursor = e, t.style.cursor = e, n.autoStart.cursorElement = e ? t : null;
1792
1686
  }
1793
- function ln(t, e) {
1687
+ function cn(t, e) {
1794
1688
  var n = t.interactable, r = t.element, o = t.prepared;
1795
1689
  if (t.pointerType === "mouse" && n && n.options.styleCursor) {
1796
1690
  var i = "";
1797
1691
  if (o.name) {
1798
1692
  var a = n.options[o.name].cursorChecker;
1799
- i = b.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
1693
+ i = x.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
1800
1694
  }
1801
- Tt(t.element, i || "", e);
1802
- } else e.autoStart.cursorElement && Tt(e.autoStart.cursorElement, "", e);
1695
+ Mt(t.element, i || "", e);
1696
+ } else e.autoStart.cursorElement && Mt(e.autoStart.cursorElement, "", e);
1803
1697
  }
1804
1698
  var Qn = { id: "auto-start/base", before: ["actions"], install: function(t) {
1805
1699
  var e = t.interactStatic, n = t.defaults;
1806
- t.usePlugin(Kn), n.base.actionChecker = null, n.base.styleCursor = !0, P(n.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), e.maxInteractions = function(r) {
1807
- return sn(r, t);
1808
- }, t.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: it, cursorElement: null };
1700
+ t.usePlugin(Kn), n.base.actionChecker = null, n.base.styleCursor = !0, D(n.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), e.maxInteractions = function(r) {
1701
+ return ln(r, t);
1702
+ }, t.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: st, cursorElement: null };
1809
1703
  }, listeners: { "interactions:down": function(t, e) {
1810
1704
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget;
1811
- n.interacting() || an(n, on(n, r, o, i, e), e);
1705
+ n.interacting() || sn(n, an(n, r, o, i, e), e);
1812
1706
  }, "interactions:move": function(t, e) {
1813
1707
  (function(n, r) {
1814
1708
  var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget;
1815
- o.pointerType !== "mouse" || o.pointerIsDown || o.interacting() || an(o, on(o, i, a, s, r), r);
1709
+ o.pointerType !== "mouse" || o.pointerIsDown || o.interacting() || sn(o, an(o, i, a, s, r), r);
1816
1710
  })(t, e), (function(n, r) {
1817
1711
  var o = n.interaction;
1818
1712
  if (o.pointerIsDown && !o.interacting() && o.pointerWasMoved && o.prepared.name) {
1819
1713
  r.fire("autoStart:before-start", n);
1820
1714
  var i = o.interactable, a = o.prepared.name;
1821
- a && i && (i.options[a].manualStart || !it(i, o.element, o.prepared, r) ? o.stop() : (o.start(o.prepared, i, o.element), ln(o, r)));
1715
+ a && i && (i.options[a].manualStart || !st(i, o.element, o.prepared, r) ? o.stop() : (o.start(o.prepared, i, o.element), cn(o, r)));
1822
1716
  }
1823
1717
  })(t, e);
1824
1718
  }, "interactions:stop": function(t, e) {
1825
1719
  var n = t.interaction, r = n.interactable;
1826
- r && r.options.styleCursor && Tt(n.element, "", e);
1827
- } }, maxInteractions: sn, withinInteractionLimit: it, validateAction: rn }, _t = Qn, Zn = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(t, e) {
1720
+ r && r.options.styleCursor && Mt(n.element, "", e);
1721
+ } }, maxInteractions: ln, withinInteractionLimit: st, validateAction: on }, Rt = Qn, Zn = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(t, e) {
1828
1722
  var n = t.interaction, r = t.eventTarget, o = t.dx, i = t.dy;
1829
1723
  if (n.prepared.name === "drag") {
1830
1724
  var a = Math.abs(o), s = Math.abs(i), l = n.interactable.options.drag, d = l.startAxis, c = a > s ? "x" : a < s ? "y" : "xy";
1831
1725
  if (n.prepared.axis = l.lockAxis === "start" ? c[0] : l.lockAxis, c !== "xy" && d !== "xy" && d !== c) {
1832
1726
  n.prepared.name = null;
1833
- for (var f = r, y = function(k) {
1727
+ for (var f = r, b = function(k) {
1834
1728
  if (k !== n.interactable) {
1835
- var T = n.interactable.options.drag;
1836
- if (!T.manualStart && k.testIgnoreAllow(T, f, r)) {
1837
- var I = k.getAction(n.downPointer, n.downEvent, n, f);
1838
- if (I && I.name === "drag" && (function(R, O) {
1839
- if (!O) return !1;
1840
- var W = O.options.drag.startAxis;
1841
- return R === "xy" || W === "xy" || W === R;
1842
- })(c, k) && _t.validateAction(I, k, f, r, e)) return k;
1729
+ var R = n.interactable.options.drag;
1730
+ if (!R.manualStart && k.testIgnoreAllow(R, f, r)) {
1731
+ var O = k.getAction(n.downPointer, n.downEvent, n, f);
1732
+ if (O && O.name === "drag" && (function(I, z) {
1733
+ if (!z) return !1;
1734
+ var U = z.options.drag.startAxis;
1735
+ return I === "xy" || U === "xy" || U === I;
1736
+ })(c, k) && Rt.validateAction(O, k, f, r, e)) return k;
1843
1737
  }
1844
1738
  }
1845
- }; b.element(f); ) {
1846
- var S = e.interactables.forEachMatch(f, y);
1739
+ }; x.element(f); ) {
1740
+ var S = e.interactables.forEachMatch(f, b);
1847
1741
  if (S) {
1848
1742
  n.prepared.name = "drag", n.interactable = S, n.element = f;
1849
1743
  break;
@@ -1853,7 +1747,7 @@ function Vo() {
1853
1747
  }
1854
1748
  }
1855
1749
  } } };
1856
- function Mt(t) {
1750
+ function At(t) {
1857
1751
  var e = t.prepared && t.prepared.name;
1858
1752
  if (!e) return null;
1859
1753
  var n = t.interactable.options;
@@ -1861,11 +1755,11 @@ function Vo() {
1861
1755
  }
1862
1756
  var er = { id: "auto-start/hold", install: function(t) {
1863
1757
  var e = t.defaults;
1864
- t.usePlugin(_t), e.perAction.hold = 0, e.perAction.delay = 0;
1758
+ t.usePlugin(Rt), e.perAction.hold = 0, e.perAction.delay = 0;
1865
1759
  }, listeners: { "interactions:new": function(t) {
1866
1760
  t.interaction.autoStartHoldTimer = null;
1867
1761
  }, "autoStart:prepared": function(t) {
1868
- var e = t.interaction, n = Mt(e);
1762
+ var e = t.interaction, n = At(e);
1869
1763
  n > 0 && (e.autoStartHoldTimer = setTimeout((function() {
1870
1764
  e.start(e.prepared, e.interactable, e.element);
1871
1765
  }), n));
@@ -1874,27 +1768,27 @@ function Vo() {
1874
1768
  e.autoStartHoldTimer && e.pointerWasMoved && !n && (clearTimeout(e.autoStartHoldTimer), e.autoStartHoldTimer = null);
1875
1769
  }, "autoStart:before-start": function(t) {
1876
1770
  var e = t.interaction;
1877
- Mt(e) > 0 && (e.prepared.name = null);
1878
- } }, getHoldDuration: Mt }, tr = er, nr = { id: "auto-start", install: function(t) {
1879
- t.usePlugin(_t), t.usePlugin(tr), t.usePlugin(Zn);
1771
+ At(e) > 0 && (e.prepared.name = null);
1772
+ } }, getHoldDuration: At }, tr = er, nr = { id: "auto-start", install: function(t) {
1773
+ t.usePlugin(Rt), t.usePlugin(tr), t.usePlugin(Zn);
1880
1774
  } }, rr = function(t) {
1881
- return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : b.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
1775
+ return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : x.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
1882
1776
  };
1883
1777
  function or(t) {
1884
1778
  var e = t.interaction, n = t.event;
1885
1779
  e.interactable && e.interactable.checkAndPreventDefault(n);
1886
1780
  }
1887
- var cn = { id: "core/interactablePreventDefault", install: function(t) {
1781
+ var un = { id: "core/interactablePreventDefault", install: function(t) {
1888
1782
  var e = t.Interactable;
1889
1783
  e.prototype.preventDefault = rr, e.prototype.checkAndPreventDefault = function(n) {
1890
1784
  return (function(r, o, i) {
1891
1785
  var a = r.options.preventDefault;
1892
1786
  if (a !== "never") if (a !== "always") {
1893
1787
  if (o.events.supportsPassive && /^touch(start|move)$/.test(i.type)) {
1894
- var s = te(i.target).document, l = o.getDocOptions(s);
1788
+ var s = Z(i.target).document, l = o.getDocOptions(s);
1895
1789
  if (!l || !l.events || l.events.passive !== !1) return;
1896
1790
  }
1897
- /^(mouse|pointer|touch)*(down|start)/i.test(i.type) || b.element(i.target) && he(i.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || i.preventDefault();
1791
+ /^(mouse|pointer|touch)*(down|start)/i.test(i.type) || x.element(i.target) && he(i.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || i.preventDefault();
1898
1792
  } else i.preventDefault();
1899
1793
  })(this, t, n);
1900
1794
  }, t.interactions.docEvents.push({ type: "dragstart", listener: function(n) {
@@ -1906,36 +1800,36 @@ function Vo() {
1906
1800
  }, listeners: ["down", "move", "up", "cancel"].reduce((function(t, e) {
1907
1801
  return t["interactions:".concat(e)] = or, t;
1908
1802
  }), {}) };
1909
- function at(t, e) {
1803
+ function lt(t, e) {
1910
1804
  if (e.phaselessTypes[t]) return !0;
1911
1805
  for (var n in e.map) if (t.indexOf(n) === 0 && t.substr(n.length) in e.phases) return !0;
1912
1806
  return !1;
1913
1807
  }
1914
- function De(t) {
1808
+ function Ne(t) {
1915
1809
  var e = {};
1916
1810
  for (var n in t) {
1917
1811
  var r = t[n];
1918
- b.plainObject(r) ? e[n] = De(r) : b.array(r) ? e[n] = Xt(r) : e[n] = r;
1812
+ x.plainObject(r) ? e[n] = Ne(r) : x.array(r) ? e[n] = Gt(r) : e[n] = r;
1919
1813
  }
1920
1814
  return e;
1921
1815
  }
1922
- var Rt = (function() {
1816
+ var It = (function() {
1923
1817
  function t(e) {
1924
- g(this, t), this.states = [], this.startOffset = { left: 0, right: 0, top: 0, bottom: 0 }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = e, this.result = st(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
1818
+ g(this, t), this.states = [], this.startOffset = { left: 0, right: 0, top: 0, bottom: 0 }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = e, this.result = ct(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
1925
1819
  }
1926
- return x(t, [{ key: "start", value: function(e, n) {
1820
+ return y(t, [{ key: "start", value: function(e, n) {
1927
1821
  var r, o, i = e.phase, a = this.interaction, s = (function(d) {
1928
1822
  var c = d.interactable.options[d.prepared.name], f = c.modifiers;
1929
- return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(y) {
1930
- var S = c[y];
1823
+ return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(b) {
1824
+ var S = c[b];
1931
1825
  return S && S.enabled && { options: S, methods: S._methods };
1932
- })).filter((function(y) {
1933
- return !!y;
1826
+ })).filter((function(b) {
1827
+ return !!b;
1934
1828
  }));
1935
1829
  })(a);
1936
- this.prepareStates(s), this.startEdges = P({}, a.edges), this.edges = P({}, this.startEdges), this.startOffset = (r = a.rect, o = n, r ? { left: o.x - r.left, top: o.y - r.top, right: r.right - o.x, bottom: r.bottom - o.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
1830
+ this.prepareStates(s), this.startEdges = D({}, a.edges), this.edges = D({}, this.startEdges), this.startOffset = (r = a.rect, o = n, r ? { left: o.x - r.left, top: o.y - r.top, right: r.right - o.x, bottom: r.bottom - o.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
1937
1831
  var l = this.fillArg({ phase: i, pageCoords: n, preEnd: !1 });
1938
- return this.result = st(), this.startAll(l), this.result = this.setAll(l);
1832
+ return this.result = ct(), this.startAll(l), this.result = this.setAll(l);
1939
1833
  } }, { key: "fillArg", value: function(e) {
1940
1834
  var n = this.interaction;
1941
1835
  return e.interaction = n, e.interactable = n.interactable, e.element = n.element, e.rect || (e.rect = n.rect), e.edges || (e.edges = this.startEdges), e.startOffset = this.startOffset, e;
@@ -1946,27 +1840,27 @@ function Vo() {
1946
1840
  }
1947
1841
  } }, { key: "setAll", value: function(e) {
1948
1842
  var n = e.phase, r = e.preEnd, o = e.skipModifiers, i = e.rect, a = e.edges;
1949
- e.coords = P({}, e.pageCoords), e.rect = P({}, i), e.edges = P({}, a);
1950
- for (var s = o ? this.states.slice(o) : this.states, l = st(e.coords, e.rect), d = 0; d < s.length; d++) {
1951
- var c, f = s[d], y = f.options, S = P({}, e.coords), k = null;
1952
- (c = f.methods) != null && c.set && this.shouldDo(y, r, n) && (e.state = f, k = f.methods.set(e), et(e.edges, e.rect, { x: e.coords.x - S.x, y: e.coords.y - S.y })), l.eventProps.push(k);
1843
+ e.coords = D({}, e.pageCoords), e.rect = D({}, i), e.edges = D({}, a);
1844
+ for (var s = o ? this.states.slice(o) : this.states, l = ct(e.coords, e.rect), d = 0; d < s.length; d++) {
1845
+ var c, f = s[d], b = f.options, S = D({}, e.coords), k = null;
1846
+ (c = f.methods) != null && c.set && this.shouldDo(b, r, n) && (e.state = f, k = f.methods.set(e), nt(e.edges, e.rect, { x: e.coords.x - S.x, y: e.coords.y - S.y })), l.eventProps.push(k);
1953
1847
  }
1954
- P(this.edges, e.edges), l.delta.x = e.coords.x - e.pageCoords.x, l.delta.y = e.coords.y - e.pageCoords.y, l.rectDelta.left = e.rect.left - i.left, l.rectDelta.right = e.rect.right - i.right, l.rectDelta.top = e.rect.top - i.top, l.rectDelta.bottom = e.rect.bottom - i.bottom;
1955
- var T = this.result.coords, I = this.result.rect;
1956
- if (T && I) {
1957
- var R = l.rect.left !== I.left || l.rect.right !== I.right || l.rect.top !== I.top || l.rect.bottom !== I.bottom;
1958
- l.changed = R || T.x !== l.coords.x || T.y !== l.coords.y;
1848
+ D(this.edges, e.edges), l.delta.x = e.coords.x - e.pageCoords.x, l.delta.y = e.coords.y - e.pageCoords.y, l.rectDelta.left = e.rect.left - i.left, l.rectDelta.right = e.rect.right - i.right, l.rectDelta.top = e.rect.top - i.top, l.rectDelta.bottom = e.rect.bottom - i.bottom;
1849
+ var R = this.result.coords, O = this.result.rect;
1850
+ if (R && O) {
1851
+ var I = l.rect.left !== O.left || l.rect.right !== O.right || l.rect.top !== O.top || l.rect.bottom !== O.bottom;
1852
+ l.changed = I || R.x !== l.coords.x || R.y !== l.coords.y;
1959
1853
  }
1960
1854
  return l;
1961
1855
  } }, { key: "applyToInteraction", value: function(e) {
1962
1856
  var n = this.interaction, r = e.phase, o = n.coords.cur, i = n.coords.start, a = this.result, s = this.startDelta, l = a.delta;
1963
- r === "start" && P(this.startDelta, a.delta);
1857
+ r === "start" && D(this.startDelta, a.delta);
1964
1858
  for (var d = 0, c = [[i, s], [o, l]]; d < c.length; d++) {
1965
- var f = c[d], y = f[0], S = f[1];
1966
- y.page.x += S.x, y.page.y += S.y, y.client.x += S.x, y.client.y += S.y;
1859
+ var f = c[d], b = f[0], S = f[1];
1860
+ b.page.x += S.x, b.page.y += S.y, b.client.x += S.x, b.client.y += S.y;
1967
1861
  }
1968
- var k = this.result.rectDelta, T = e.rect || n.rect;
1969
- T.left += k.left, T.right += k.right, T.top += k.top, T.bottom += k.bottom, T.width = T.right - T.left, T.height = T.bottom - T.top;
1862
+ var k = this.result.rectDelta, R = e.rect || n.rect;
1863
+ R.left += k.left, R.right += k.right, R.top += k.top, R.bottom += k.bottom, R.width = R.right - R.left, R.height = R.bottom - R.top;
1970
1864
  } }, { key: "setAndApply", value: function(e) {
1971
1865
  var n = this.interaction, r = e.phase, o = e.preEnd, i = e.skipModifiers, a = this.setAll(this.fillArg({ preEnd: o, phase: r, pageCoords: e.modifiedCoords || n.coords.cur.page }));
1972
1866
  if (this.result = a, !a.changed && (!i || i < this.states.length) && n.interacting()) return !1;
@@ -1990,7 +1884,7 @@ function Vo() {
1990
1884
  } }, { key: "stop", value: function(e) {
1991
1885
  var n = e.interaction;
1992
1886
  if (this.states && this.states.length) {
1993
- var r = P({ states: this.states, interactable: n.interactable, element: n.element, rect: null }, e);
1887
+ var r = D({ states: this.states, interactable: n.interactable, element: n.element, rect: null }, e);
1994
1888
  this.fillArg(r);
1995
1889
  for (var o = 0, i = this.states; o < i.length; o++) {
1996
1890
  var a = i[o];
@@ -2009,7 +1903,7 @@ function Vo() {
2009
1903
  var n = e.interaction, r = n.coords, o = n.rect, i = n.modification;
2010
1904
  if (i.result) {
2011
1905
  for (var a = i.startDelta, s = i.result, l = s.delta, d = s.rectDelta, c = 0, f = [[r.start, a], [r.cur, l]]; c < f.length; c++) {
2012
- var y = f[c], S = y[0], k = y[1];
1906
+ var b = f[c], S = b[0], k = b[1];
2013
1907
  S.page.x -= k.x, S.page.y -= k.y, S.client.x -= k.x, S.client.y -= k.y;
2014
1908
  }
2015
1909
  o.left -= d.left, o.right -= d.right, o.top -= d.top, o.bottom -= d.bottom;
@@ -2018,13 +1912,13 @@ function Vo() {
2018
1912
  return !(!e || e.enabled === !1 || o && !e.endOnly || e.endOnly && !n || r === "start" && !e.setStart);
2019
1913
  } }, { key: "copyFrom", value: function(e) {
2020
1914
  this.startOffset = e.startOffset, this.startDelta = e.startDelta, this.startEdges = e.startEdges, this.edges = e.edges, this.states = e.states.map((function(n) {
2021
- return De(n);
2022
- })), this.result = st(P({}, e.result.coords), P({}, e.result.rect));
1915
+ return Ne(n);
1916
+ })), this.result = ct(D({}, e.result.coords), D({}, e.result.rect));
2023
1917
  } }, { key: "destroy", value: function() {
2024
1918
  for (var e in this) this[e] = null;
2025
1919
  } }]), t;
2026
1920
  })();
2027
- function st(t, e) {
1921
+ function ct(t, e) {
2028
1922
  return { rect: e, coords: t, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
2029
1923
  }
2030
1924
  function _e(t, e) {
@@ -2040,7 +1934,7 @@ function Vo() {
2040
1934
  };
2041
1935
  return e && typeof e == "string" && (o._defaults = n, o._methods = r), o;
2042
1936
  }
2043
- function We(t) {
1937
+ function qe(t) {
2044
1938
  var e = t.iEvent, n = t.interaction.modification.result;
2045
1939
  n && (e.modifiers = n.eventProps);
2046
1940
  }
@@ -2048,7 +1942,7 @@ function Vo() {
2048
1942
  t.defaults.perAction.modifiers = [];
2049
1943
  }, listeners: { "interactions:new": function(t) {
2050
1944
  var e = t.interaction;
2051
- e.modification = new Rt(e);
1945
+ e.modification = new It(e);
2052
1946
  }, "interactions:before-action-start": function(t) {
2053
1947
  var e = t.interaction, n = t.interaction.modification;
2054
1948
  n.start(t, e.coords.start.page), e.edges = n.edges, n.applyToInteraction(t);
@@ -2058,22 +1952,22 @@ function Vo() {
2058
1952
  }, "interactions:before-action-end": function(t) {
2059
1953
  var e = t.interaction, n = e.modification, r = n.beforeEnd(t);
2060
1954
  return e.edges = n.startEdges, r;
2061
- }, "interactions:action-start": We, "interactions:action-move": We, "interactions:action-end": We, "interactions:after-action-start": function(t) {
1955
+ }, "interactions:action-start": qe, "interactions:action-move": qe, "interactions:action-end": qe, "interactions:after-action-start": function(t) {
2062
1956
  return t.interaction.modification.restoreInteractionCoords(t);
2063
1957
  }, "interactions:after-action-move": function(t) {
2064
1958
  return t.interaction.modification.restoreInteractionCoords(t);
2065
1959
  }, "interactions:stop": function(t) {
2066
1960
  return t.interaction.modification.stop(t);
2067
- } } }, un = ir, dn = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, At = (function(t) {
2068
- _(n, t);
1961
+ } } }, dn = ir, pn = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Pt = (function(t) {
1962
+ M(n, t);
2069
1963
  var e = A(n);
2070
1964
  function n(r, o, i, a, s, l, d) {
2071
1965
  var c;
2072
1966
  g(this, n), (c = e.call(this, r)).relatedTarget = null, c.screenX = void 0, c.screenY = void 0, c.button = void 0, c.buttons = void 0, c.ctrlKey = void 0, c.shiftKey = void 0, c.altKey = void 0, c.metaKey = void 0, c.page = void 0, c.client = void 0, c.delta = void 0, c.rect = void 0, c.x0 = void 0, c.y0 = void 0, c.t0 = void 0, c.dt = void 0, c.duration = void 0, c.clientX0 = void 0, c.clientY0 = void 0, c.velocity = void 0, c.speed = void 0, c.swipe = void 0, c.axes = void 0, c.preEnd = void 0, s = s || r.element;
2073
- var f = r.interactable, y = (f && f.options || dn).deltaSource, S = Le(f, s, i), k = a === "start", T = a === "end", I = k ? U(c) : r.prevEvent, R = k ? r.coords.start : T ? { page: I.page, client: I.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
2074
- return c.page = P({}, R.page), c.client = P({}, R.client), c.rect = P({}, r.rect), c.timeStamp = R.timeStamp, T || (c.page.x -= S.x, c.page.y -= S.y, c.client.x -= S.x, c.client.y -= S.y), c.ctrlKey = o.ctrlKey, c.altKey = o.altKey, c.shiftKey = o.shiftKey, c.metaKey = o.metaKey, c.button = o.button, c.buttons = o.buttons, c.target = s, c.currentTarget = s, c.preEnd = l, c.type = d || i + (a || ""), c.interactable = f, c.t0 = k ? r.pointers[r.pointers.length - 1].downTime : I.t0, c.x0 = r.coords.start.page.x - S.x, c.y0 = r.coords.start.page.y - S.y, c.clientX0 = r.coords.start.client.x - S.x, c.clientY0 = r.coords.start.client.y - S.y, c.delta = k || T ? { x: 0, y: 0 } : { x: c[y].x - I[y].x, y: c[y].y - I[y].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = P({}, r.coords.velocity[y]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = T || a === "inertiastart" ? c.getSwipe() : null, c;
1967
+ var f = r.interactable, b = (f && f.options || pn).deltaSource, S = Le(f, s, i), k = a === "start", R = a === "end", O = k ? P(c) : r.prevEvent, I = k ? r.coords.start : R ? { page: O.page, client: O.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
1968
+ return c.page = D({}, I.page), c.client = D({}, I.client), c.rect = D({}, r.rect), c.timeStamp = I.timeStamp, R || (c.page.x -= S.x, c.page.y -= S.y, c.client.x -= S.x, c.client.y -= S.y), c.ctrlKey = o.ctrlKey, c.altKey = o.altKey, c.shiftKey = o.shiftKey, c.metaKey = o.metaKey, c.button = o.button, c.buttons = o.buttons, c.target = s, c.currentTarget = s, c.preEnd = l, c.type = d || i + (a || ""), c.interactable = f, c.t0 = k ? r.pointers[r.pointers.length - 1].downTime : O.t0, c.x0 = r.coords.start.page.x - S.x, c.y0 = r.coords.start.page.y - S.y, c.clientX0 = r.coords.start.client.x - S.x, c.clientY0 = r.coords.start.client.y - S.y, c.delta = k || R ? { x: 0, y: 0 } : { x: c[b].x - O[b].x, y: c[b].y - O[b].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = D({}, r.coords.velocity[b]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = R || a === "inertiastart" ? c.getSwipe() : null, c;
2075
1969
  }
2076
- return x(n, [{ key: "getSwipe", value: function() {
1970
+ return y(n, [{ key: "getSwipe", value: function() {
2077
1971
  var r = this._interaction;
2078
1972
  if (r.prevEvent.speed < 600 || this.timeStamp - r.prevEvent.timeStamp > 150) return null;
2079
1973
  var o = 180 * Math.atan2(r.prevEvent.velocityY, r.prevEvent.velocityX) / Math.PI;
@@ -2086,8 +1980,8 @@ function Vo() {
2086
1980
  } }, { key: "stopPropagation", value: function() {
2087
1981
  this.propagationStopped = !0;
2088
1982
  } }]), n;
2089
- })(ot);
2090
- Object.defineProperties(At.prototype, { pageX: { get: function() {
1983
+ })(at);
1984
+ Object.defineProperties(Pt.prototype, { pageX: { get: function() {
2091
1985
  return this.page.x;
2092
1986
  }, set: function(t) {
2093
1987
  this.page.x = t;
@@ -2120,16 +2014,16 @@ function Vo() {
2120
2014
  }, set: function(t) {
2121
2015
  this.velocity.y = t;
2122
2016
  } } });
2123
- var ar = x((function t(e, n, r, o, i) {
2017
+ var ar = y((function t(e, n, r, o, i) {
2124
2018
  g(this, t), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = e, this.pointer = n, this.event = r, this.downTime = o, this.downTarget = i;
2125
2019
  })), sr = (function(t) {
2126
2020
  return t.interactable = "", t.element = "", t.prepared = "", t.pointerIsDown = "", t.pointerWasMoved = "", t._proxy = "", t;
2127
- })({}), pn = (function(t) {
2021
+ })({}), fn = (function(t) {
2128
2022
  return t.start = "", t.move = "", t.end = "", t.stop = "", t.interacting = "", t;
2129
2023
  })({}), lr = 0, cr = (function() {
2130
2024
  function t(e) {
2131
2025
  var n = this, r = e.pointerType, o = e.scopeFire;
2132
- g(this, t), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = qe((function(c) {
2026
+ g(this, t), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = We((function(c) {
2133
2027
  this.move(c);
2134
2028
  }), "The interaction.doMove() method has been renamed to interaction.move()"), this.coords = { start: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, prev: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, cur: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, delta: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, velocity: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 } }, this._id = lr++, this._scopeFire = o, this.pointerType = r;
2135
2029
  var i = this;
@@ -2145,24 +2039,24 @@ function Vo() {
2145
2039
  return i[c].apply(i, arguments);
2146
2040
  } });
2147
2041
  };
2148
- for (var d in pn) l(d);
2042
+ for (var d in fn) l(d);
2149
2043
  this._scopeFire("interactions:new", { interaction: this });
2150
2044
  }
2151
- return x(t, [{ key: "pointerMoveTolerance", get: function() {
2045
+ return y(t, [{ key: "pointerMoveTolerance", get: function() {
2152
2046
  return 1;
2153
2047
  } }, { key: "pointerDown", value: function(e, n, r) {
2154
2048
  var o = this.updatePointer(e, n, r, !0), i = this.pointers[o];
2155
2049
  this._scopeFire("interactions:down", { pointer: e, event: n, eventTarget: r, pointerIndex: o, pointerInfo: i, type: "down", interaction: this });
2156
2050
  } }, { key: "start", value: function(e, n, r) {
2157
- return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (St(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? P({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
2051
+ return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (_t(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? D({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
2158
2052
  } }, { key: "pointerMove", value: function(e, n, r) {
2159
2053
  this.simulation || this.modification && this.modification.endResult || this.updatePointer(e, n, r, !1);
2160
2054
  var o, i, a = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
2161
2055
  this.pointerIsDown && !this.pointerWasMoved && (o = this.coords.cur.client.x - this.coords.start.client.x, i = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = Fe(o, i) > this.pointerMoveTolerance);
2162
2056
  var s, l, d, c = this.getPointerIndex(e), f = { pointer: e, pointerIndex: c, pointerInfo: this.pointers[c], event: n, type: "move", eventTarget: r, dx: o, dy: i, duplicate: a, interaction: this };
2163
- a || (s = this.coords.velocity, l = this.coords.delta, d = Math.max(l.timeStamp / 1e3, 1e-3), s.page.x = l.page.x / d, s.page.y = l.page.y / d, s.client.x = l.client.x / d, s.client.y = l.client.y / d, s.timeStamp = d), this._scopeFire("interactions:move", f), a || this.simulation || (this.interacting() && (f.type = null, this.move(f)), this.pointerWasMoved && nt(this.coords.prev, this.coords.cur));
2057
+ a || (s = this.coords.velocity, l = this.coords.delta, d = Math.max(l.timeStamp / 1e3, 1e-3), s.page.x = l.page.x / d, s.page.y = l.page.y / d, s.client.x = l.client.x / d, s.client.y = l.client.y / d, s.timeStamp = d), this._scopeFire("interactions:move", f), a || this.simulation || (this.interacting() && (f.type = null, this.move(f)), this.pointerWasMoved && ot(this.coords.prev, this.coords.cur));
2164
2058
  } }, { key: "move", value: function(e) {
2165
- e && e.event || Bt(this.coords.delta), (e = P({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, e || {})).phase = "move", this._doPhase(e);
2059
+ e && e.event || Wt(this.coords.delta), (e = D({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, e || {})).phase = "move", this._doPhase(e);
2166
2060
  } }, { key: "pointerUp", value: function(e, n, r, o) {
2167
2061
  var i = this.getPointerIndex(e);
2168
2062
  i === -1 && (i = this.updatePointer(e, n, r, !1));
@@ -2190,7 +2084,7 @@ function Vo() {
2190
2084
  var i, a, s, l = je(e), d = this.getPointerIndex(e), c = this.pointers[d];
2191
2085
  return o = o !== !1 && (o || /(down|start)$/i.test(n.type)), c ? c.pointer = e : (c = new ar(l, e, n, null, null), d = this.pointers.length, this.pointers.push(c)), Hn(this.coords.cur, this.pointers.map((function(f) {
2192
2086
  return f.pointer;
2193
- })), this._now()), i = this.coords.delta, a = this.coords.prev, s = this.coords.cur, i.page.x = s.page.x - a.page.x, i.page.y = s.page.y - a.page.y, i.client.x = s.client.x - a.client.x, i.client.y = s.client.y - a.client.y, i.timeStamp = s.timeStamp - a.timeStamp, o && (this.pointerIsDown = !0, c.downTime = this.coords.cur.timeStamp, c.downTarget = r, tt(this.downPointer, e), this.interacting() || (nt(this.coords.start, this.coords.cur), nt(this.coords.prev, this.coords.cur), this.downEvent = n, this.pointerWasMoved = !1)), this._updateLatestPointer(e, n, r), this._scopeFire("interactions:update-pointer", { pointer: e, event: n, eventTarget: r, down: o, pointerInfo: c, pointerIndex: d, interaction: this }), d;
2087
+ })), this._now()), i = this.coords.delta, a = this.coords.prev, s = this.coords.cur, i.page.x = s.page.x - a.page.x, i.page.y = s.page.y - a.page.y, i.client.x = s.client.x - a.client.x, i.client.y = s.client.y - a.client.y, i.timeStamp = s.timeStamp - a.timeStamp, o && (this.pointerIsDown = !0, c.downTime = this.coords.cur.timeStamp, c.downTarget = r, rt(this.downPointer, e), this.interacting() || (ot(this.coords.start, this.coords.cur), ot(this.coords.prev, this.coords.cur), this.downEvent = n, this.pointerWasMoved = !1)), this._updateLatestPointer(e, n, r), this._scopeFire("interactions:update-pointer", { pointer: e, event: n, eventTarget: r, down: o, pointerInfo: c, pointerIndex: d, interaction: this }), d;
2194
2088
  } }, { key: "removePointer", value: function(e, n) {
2195
2089
  var r = this.getPointerIndex(e);
2196
2090
  if (r !== -1) {
@@ -2202,60 +2096,60 @@ function Vo() {
2202
2096
  } }, { key: "destroy", value: function() {
2203
2097
  this._latestPointer.pointer = null, this._latestPointer.event = null, this._latestPointer.eventTarget = null;
2204
2098
  } }, { key: "_createPreparedEvent", value: function(e, n, r, o) {
2205
- return new At(this, e, this.prepared.name, n, this.element, r, o);
2099
+ return new Pt(this, e, this.prepared.name, n, this.element, r, o);
2206
2100
  } }, { key: "_fireEvent", value: function(e) {
2207
2101
  var n;
2208
2102
  (n = this.interactable) == null || n.fire(e), (!this.prevEvent || e.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = e);
2209
2103
  } }, { key: "_doPhase", value: function(e) {
2210
2104
  var n = e.event, r = e.phase, o = e.preEnd, i = e.type, a = this.rect;
2211
- if (a && r === "move" && (et(this.edges, a, this.coords.delta[this.interactable.options.deltaSource]), a.width = a.right - a.left, a.height = a.bottom - a.top), this._scopeFire("interactions:before-action-".concat(r), e) === !1) return !1;
2105
+ if (a && r === "move" && (nt(this.edges, a, this.coords.delta[this.interactable.options.deltaSource]), a.width = a.right - a.left, a.height = a.bottom - a.top), this._scopeFire("interactions:before-action-".concat(r), e) === !1) return !1;
2212
2106
  var s = e.iEvent = this._createPreparedEvent(n, r, o, i);
2213
2107
  return this._scopeFire("interactions:action-".concat(r), e), r === "start" && (this.prevEvent = s), this._fireEvent(s), this._scopeFire("interactions:after-action-".concat(r), e), !0;
2214
2108
  } }, { key: "_now", value: function() {
2215
2109
  return Date.now();
2216
2110
  } }]), t;
2217
2111
  })();
2218
- function fn(t) {
2219
- hn(t.interaction);
2220
- }
2221
2112
  function hn(t) {
2113
+ vn(t.interaction);
2114
+ }
2115
+ function vn(t) {
2222
2116
  if (!(function(n) {
2223
2117
  return !(!n.offset.pending.x && !n.offset.pending.y);
2224
2118
  })(t)) return !1;
2225
2119
  var e = t.offset.pending;
2226
- return It(t.coords.cur, e), It(t.coords.delta, e), et(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
2120
+ return Ot(t.coords.cur, e), Ot(t.coords.delta, e), nt(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
2227
2121
  }
2228
2122
  function ur(t) {
2229
2123
  var e = t.x, n = t.y;
2230
2124
  this.offset.pending.x += e, this.offset.pending.y += n, this.offset.total.x += e, this.offset.total.y += n;
2231
2125
  }
2232
- function It(t, e) {
2126
+ function Ot(t, e) {
2233
2127
  var n = t.page, r = t.client, o = e.x, i = e.y;
2234
2128
  n.x += o, n.y += i, r.x += o, r.y += i;
2235
2129
  }
2236
- pn.offsetBy = "";
2130
+ fn.offsetBy = "";
2237
2131
  var dr = { id: "offset", before: ["modifiers", "pointer-events", "actions", "inertia"], install: function(t) {
2238
2132
  t.Interaction.prototype.offsetBy = ur;
2239
2133
  }, listeners: { "interactions:new": function(t) {
2240
2134
  t.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
2241
2135
  }, "interactions:update-pointer": function(t) {
2242
2136
  return (function(e) {
2243
- e.pointerIsDown && (It(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2137
+ e.pointerIsDown && (Ot(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2244
2138
  })(t.interaction);
2245
- }, "interactions:before-action-start": fn, "interactions:before-action-move": fn, "interactions:before-action-end": function(t) {
2139
+ }, "interactions:before-action-start": hn, "interactions:before-action-move": hn, "interactions:before-action-end": function(t) {
2246
2140
  var e = t.interaction;
2247
- if (hn(e)) return e.move({ offset: !0 }), e.end(), !1;
2141
+ if (vn(e)) return e.move({ offset: !0 }), e.end(), !1;
2248
2142
  }, "interactions:stop": function(t) {
2249
2143
  var e = t.interaction;
2250
2144
  e.offset.total.x = 0, e.offset.total.y = 0, e.offset.pending.x = 0, e.offset.pending.y = 0;
2251
- } } }, vn = dr, pr = (function() {
2145
+ } } }, mn = dr, pr = (function() {
2252
2146
  function t(e) {
2253
2147
  g(this, t), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = e;
2254
2148
  }
2255
- return x(t, [{ key: "start", value: function(e) {
2256
- var n = this.interaction, r = lt(n);
2149
+ return y(t, [{ key: "start", value: function(e) {
2150
+ var n = this.interaction, r = ut(n);
2257
2151
  if (!r || !r.enabled) return !1;
2258
- var o = n.coords.velocity.client, i = Fe(o.x, o.y), a = this.modification || (this.modification = new Rt(n));
2152
+ var o = n.coords.velocity.client, i = Fe(o.x, o.y), a = this.modification || (this.modification = new It(n));
2259
2153
  if (a.copyFrom(n.modification), this.t0 = n._now(), this.allowResume = r.allowResume, this.v0 = i, this.currentOffset = { x: 0, y: 0 }, this.startCoords = n.coords.cur.page, this.modifierArg = a.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - n.coords.cur.timeStamp < 50 && i > r.minSpeed && i > r.endSpeed) this.startInertia();
2260
2154
  else {
2261
2155
  if (a.result = a.setAll(this.modifierArg), !a.result.changed) return !1;
@@ -2263,7 +2157,7 @@ function Vo() {
2263
2157
  }
2264
2158
  return n.modification.result.rect = null, n.offsetBy(this.targetOffset), n._doPhase({ interaction: n, event: e, phase: "inertiastart" }), n.offsetBy({ x: -this.targetOffset.x, y: -this.targetOffset.y }), n.modification.result.rect = null, this.active = !0, n.simulation = this, !0;
2265
2159
  } }, { key: "startInertia", value: function() {
2266
- var e = this, n = this.interaction.coords.velocity.client, r = lt(this.interaction), o = r.resistance, i = -Math.log(r.endSpeed / this.v0) / o;
2160
+ var e = this, n = this.interaction.coords.velocity.client, r = ut(this.interaction), o = r.resistance, i = -Math.log(r.endSpeed / this.v0) / o;
2267
2161
  this.targetOffset = { x: (n.x - i) / o, y: (n.y - i) / o }, this.te = i, this.lambda_v0 = o / this.v0, this.one_ve_v0 = 1 - r.endSpeed / this.v0;
2268
2162
  var a = this.modification, s = this.modifierArg;
2269
2163
  s.pageCoords = { x: this.startCoords.x + this.targetOffset.x, y: this.startCoords.y + this.targetOffset.y }, a.result = a.setAll(s), a.result.changed && (this.isModified = !0, this.modifiedOffset = { x: this.targetOffset.x + a.result.delta.x, y: this.targetOffset.y + a.result.delta.y }), this.onNextFrame((function() {
@@ -2280,39 +2174,39 @@ function Vo() {
2280
2174
  n.active && e();
2281
2175
  }));
2282
2176
  } }, { key: "inertiaTick", value: function() {
2283
- var e, n, r, o, i, a, s, l = this, d = this.interaction, c = lt(d).resistance, f = (d._now() - this.t0) / 1e3;
2177
+ var e, n, r, o, i, a, s, l = this, d = this.interaction, c = ut(d).resistance, f = (d._now() - this.t0) / 1e3;
2284
2178
  if (f < this.te) {
2285
- var y, S = 1 - (Math.exp(-c * f) - this.lambda_v0) / this.one_ve_v0;
2286
- this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, y = { x: mn(s = S, e, r, i), y: mn(s, n, o, a) }) : y = { x: this.targetOffset.x * S, y: this.targetOffset.y * S };
2287
- var k = { x: y.x - this.currentOffset.x, y: y.y - this.currentOffset.y };
2179
+ var b, S = 1 - (Math.exp(-c * f) - this.lambda_v0) / this.one_ve_v0;
2180
+ this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, b = { x: gn(s = S, e, r, i), y: gn(s, n, o, a) }) : b = { x: this.targetOffset.x * S, y: this.targetOffset.y * S };
2181
+ var k = { x: b.x - this.currentOffset.x, y: b.y - this.currentOffset.y };
2288
2182
  this.currentOffset.x += k.x, this.currentOffset.y += k.y, d.offsetBy(k), d.move(), this.onNextFrame((function() {
2289
2183
  return l.inertiaTick();
2290
2184
  }));
2291
2185
  } else d.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
2292
2186
  } }, { key: "smoothEndTick", value: function() {
2293
- var e = this, n = this.interaction, r = n._now() - this.t0, o = lt(n).smoothEndDuration;
2187
+ var e = this, n = this.interaction, r = n._now() - this.t0, o = ut(n).smoothEndDuration;
2294
2188
  if (r < o) {
2295
- var i = { x: gn(r, 0, this.targetOffset.x, o), y: gn(r, 0, this.targetOffset.y, o) }, a = { x: i.x - this.currentOffset.x, y: i.y - this.currentOffset.y };
2189
+ var i = { x: yn(r, 0, this.targetOffset.x, o), y: yn(r, 0, this.targetOffset.y, o) }, a = { x: i.x - this.currentOffset.x, y: i.y - this.currentOffset.y };
2296
2190
  this.currentOffset.x += a.x, this.currentOffset.y += a.y, n.offsetBy(a), n.move({ skipModifiers: this.modifierCount }), this.onNextFrame((function() {
2297
2191
  return e.smoothEndTick();
2298
2192
  }));
2299
2193
  } else n.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
2300
2194
  } }, { key: "resume", value: function(e) {
2301
2195
  var n = e.pointer, r = e.event, o = e.eventTarget, i = this.interaction;
2302
- i.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), i.updatePointer(n, r, o, !0), i._doPhase({ interaction: i, event: r, phase: "resume" }), nt(i.coords.prev, i.coords.cur), this.stop();
2196
+ i.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), i.updatePointer(n, r, o, !0), i._doPhase({ interaction: i, event: r, phase: "resume" }), ot(i.coords.prev, i.coords.cur), this.stop();
2303
2197
  } }, { key: "end", value: function() {
2304
2198
  this.interaction.move(), this.interaction.end(), this.stop();
2305
2199
  } }, { key: "stop", value: function() {
2306
2200
  this.active = this.smoothEnd = !1, this.interaction.simulation = null, Te.cancel(this.timeout);
2307
2201
  } }]), t;
2308
2202
  })();
2309
- function lt(t) {
2203
+ function ut(t) {
2310
2204
  var e = t.interactable, n = t.prepared;
2311
2205
  return e && e.options && n.name && e.options[n.name].inertia;
2312
2206
  }
2313
2207
  var fr = { id: "inertia", before: ["modifiers", "actions"], install: function(t) {
2314
2208
  var e = t.defaults;
2315
- t.usePlugin(vn), t.usePlugin(un), t.actions.phases.inertiastart = !0, t.actions.phases.resume = !0, e.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
2209
+ t.usePlugin(mn), t.usePlugin(dn), t.actions.phases.inertiastart = !0, t.actions.phases.resume = !0, e.perAction.inertia = { enabled: !1, resistance: 10, minSpeed: 100, endSpeed: 10, allowResume: !0, smoothEndDuration: 300 };
2316
2210
  }, listeners: { "interactions:new": function(t) {
2317
2211
  var e = t.interaction;
2318
2212
  e.inertia = new pr(e);
@@ -2321,7 +2215,7 @@ function Vo() {
2321
2215
  return (!e._interacting || e.simulation || !e.inertia.start(n)) && null;
2322
2216
  }, "interactions:down": function(t) {
2323
2217
  var e = t.interaction, n = t.eventTarget, r = e.inertia;
2324
- if (r.active) for (var o = n; b.element(o); ) {
2218
+ if (r.active) for (var o = n; x.element(o); ) {
2325
2219
  if (o === e.element) {
2326
2220
  r.resume(t);
2327
2221
  break;
@@ -2336,38 +2230,38 @@ function Vo() {
2336
2230
  e.stop(t), e.start(t, t.interaction.coords.cur.page), e.applyToInteraction(t);
2337
2231
  }, "interactions:before-action-inertiastart": function(t) {
2338
2232
  return t.interaction.modification.setAndApply(t);
2339
- }, "interactions:action-resume": We, "interactions:action-inertiastart": We, "interactions:after-action-inertiastart": function(t) {
2233
+ }, "interactions:action-resume": qe, "interactions:action-inertiastart": qe, "interactions:after-action-inertiastart": function(t) {
2340
2234
  return t.interaction.modification.restoreInteractionCoords(t);
2341
2235
  }, "interactions:after-action-resume": function(t) {
2342
2236
  return t.interaction.modification.restoreInteractionCoords(t);
2343
2237
  } } };
2344
- function mn(t, e, n, r) {
2238
+ function gn(t, e, n, r) {
2345
2239
  var o = 1 - t;
2346
2240
  return o * o * e + 2 * o * t * n + t * t * r;
2347
2241
  }
2348
- function gn(t, e, n, r) {
2242
+ function yn(t, e, n, r) {
2349
2243
  return -n * (t /= r) * (t - 2) + e;
2350
2244
  }
2351
2245
  var hr = fr;
2352
- function yn(t, e) {
2246
+ function bn(t, e) {
2353
2247
  for (var n = 0; n < e.length; n++) {
2354
2248
  var r = e[n];
2355
2249
  if (t.immediatePropagationStopped) break;
2356
2250
  r(t);
2357
2251
  }
2358
2252
  }
2359
- var bn = (function() {
2253
+ var xn = (function() {
2360
2254
  function t(e) {
2361
- g(this, t), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = P({}, e || {});
2255
+ g(this, t), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = D({}, e || {});
2362
2256
  }
2363
- return x(t, [{ key: "fire", value: function(e) {
2257
+ return y(t, [{ key: "fire", value: function(e) {
2364
2258
  var n, r = this.global;
2365
- (n = this.types[e.type]) && yn(e, n), !e.propagationStopped && r && (n = r[e.type]) && yn(e, n);
2259
+ (n = this.types[e.type]) && bn(e, n), !e.propagationStopped && r && (n = r[e.type]) && bn(e, n);
2366
2260
  } }, { key: "on", value: function(e, n) {
2367
- var r = Ae(e, n);
2368
- for (e in r) this.types[e] = Ut(this.types[e] || [], r[e]);
2261
+ var r = Ie(e, n);
2262
+ for (e in r) this.types[e] = Xt(this.types[e] || [], r[e]);
2369
2263
  } }, { key: "off", value: function(e, n) {
2370
- var r = Ae(e, n);
2264
+ var r = Ie(e, n);
2371
2265
  for (e in r) {
2372
2266
  var o = this.types[e];
2373
2267
  if (o && o.length) for (var i = 0, a = r[e]; i < a.length; i++) {
@@ -2380,9 +2274,9 @@ function Vo() {
2380
2274
  } }]), t;
2381
2275
  })(), vr = (function() {
2382
2276
  function t(e) {
2383
- g(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, tt(this, e);
2277
+ g(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, rt(this, e);
2384
2278
  }
2385
- return x(t, [{ key: "preventOriginalDefault", value: function() {
2279
+ return y(t, [{ key: "preventOriginalDefault", value: function() {
2386
2280
  this.originalEvent.preventDefault();
2387
2281
  } }, { key: "stopPropagation", value: function() {
2388
2282
  this.originalEvent.stopPropagation();
@@ -2391,93 +2285,93 @@ function Vo() {
2391
2285
  } }]), t;
2392
2286
  })();
2393
2287
  function Ye(t) {
2394
- return b.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
2288
+ return x.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
2395
2289
  }
2396
- function ct(t, e) {
2290
+ function dt(t, e) {
2397
2291
  return t === e || (typeof t == "boolean" ? !!e.capture === t && !e.passive : !!t.capture == !!e.capture && !!t.passive == !!e.passive);
2398
2292
  }
2399
2293
  var mr = { id: "events", install: function(t) {
2400
- var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, y, S, k) {
2401
- var T = Ye(k);
2402
- if (!r[y]) {
2403
- r[y] = [];
2404
- for (var I = 0; I < o.length; I++) {
2405
- var R = o[I];
2406
- a(R, y, l), a(R, y, d, !0);
2294
+ var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, b, S, k) {
2295
+ var R = Ye(k);
2296
+ if (!r[b]) {
2297
+ r[b] = [];
2298
+ for (var O = 0; O < o.length; O++) {
2299
+ var I = o[O];
2300
+ a(I, b, l), a(I, b, d, !0);
2407
2301
  }
2408
2302
  }
2409
- var O = r[y], W = Be(O, (function(K) {
2410
- return K.selector === c && K.context === f;
2303
+ var z = r[b], U = Be(z, (function(ee) {
2304
+ return ee.selector === c && ee.context === f;
2411
2305
  }));
2412
- W || (W = { selector: c, context: f, listeners: [] }, O.push(W)), W.listeners.push({ func: S, options: T });
2413
- }, removeDelegate: function(c, f, y, S, k) {
2414
- var T, I = Ye(k), R = r[y], O = !1;
2415
- if (R)
2416
- for (T = R.length - 1; T >= 0; T--) {
2417
- var W = R[T];
2418
- if (W.selector === c && W.context === f) {
2419
- for (var K = W.listeners, L = K.length - 1; L >= 0; L--) {
2420
- var V = K[L];
2421
- if (V.func === S && ct(V.options, I)) {
2422
- K.splice(L, 1), K.length || (R.splice(T, 1), s(f, y, l), s(f, y, d, !0)), O = !0;
2306
+ U || (U = { selector: c, context: f, listeners: [] }, z.push(U)), U.listeners.push({ func: S, options: R });
2307
+ }, removeDelegate: function(c, f, b, S, k) {
2308
+ var R, O = Ye(k), I = r[b], z = !1;
2309
+ if (I)
2310
+ for (R = I.length - 1; R >= 0; R--) {
2311
+ var U = I[R];
2312
+ if (U.selector === c && U.context === f) {
2313
+ for (var ee = U.listeners, B = ee.length - 1; B >= 0; B--) {
2314
+ var K = ee[B];
2315
+ if (K.func === S && dt(K.options, O)) {
2316
+ ee.splice(B, 1), ee.length || (I.splice(R, 1), s(f, b, l), s(f, b, d, !0)), z = !0;
2423
2317
  break;
2424
2318
  }
2425
2319
  }
2426
- if (O) break;
2320
+ if (z) break;
2427
2321
  }
2428
2322
  }
2429
2323
  }, delegateListener: l, delegateUseCapture: d, delegatedEvents: r, documents: o, targets: n, supportsOptions: !1, supportsPassive: !1 };
2430
- function a(c, f, y, S) {
2324
+ function a(c, f, b, S) {
2431
2325
  if (c.addEventListener) {
2432
- var k = Ye(S), T = Be(n, (function(I) {
2433
- return I.eventTarget === c;
2326
+ var k = Ye(S), R = Be(n, (function(O) {
2327
+ return O.eventTarget === c;
2434
2328
  }));
2435
- T || (T = { eventTarget: c, events: {} }, n.push(T)), T.events[f] || (T.events[f] = []), Be(T.events[f], (function(I) {
2436
- return I.func === y && ct(I.options, k);
2437
- })) || (c.addEventListener(f, y, i.supportsOptions ? k : k.capture), T.events[f].push({ func: y, options: k }));
2329
+ R || (R = { eventTarget: c, events: {} }, n.push(R)), R.events[f] || (R.events[f] = []), Be(R.events[f], (function(O) {
2330
+ return O.func === b && dt(O.options, k);
2331
+ })) || (c.addEventListener(f, b, i.supportsOptions ? k : k.capture), R.events[f].push({ func: b, options: k }));
2438
2332
  }
2439
2333
  }
2440
- function s(c, f, y, S) {
2334
+ function s(c, f, b, S) {
2441
2335
  if (c.addEventListener && c.removeEventListener) {
2442
2336
  var k = He(n, (function(me) {
2443
2337
  return me.eventTarget === c;
2444
- })), T = n[k];
2445
- if (T && T.events) if (f !== "all") {
2446
- var I = !1, R = T.events[f];
2447
- if (R) {
2448
- if (y === "all") {
2449
- for (var O = R.length - 1; O >= 0; O--) {
2450
- var W = R[O];
2451
- s(c, f, W.func, W.options);
2338
+ })), R = n[k];
2339
+ if (R && R.events) if (f !== "all") {
2340
+ var O = !1, I = R.events[f];
2341
+ if (I) {
2342
+ if (b === "all") {
2343
+ for (var z = I.length - 1; z >= 0; z--) {
2344
+ var U = I[z];
2345
+ s(c, f, U.func, U.options);
2452
2346
  }
2453
2347
  return;
2454
2348
  }
2455
- for (var K = Ye(S), L = 0; L < R.length; L++) {
2456
- var V = R[L];
2457
- if (V.func === y && ct(V.options, K)) {
2458
- c.removeEventListener(f, y, i.supportsOptions ? K : K.capture), R.splice(L, 1), R.length === 0 && (delete T.events[f], I = !0);
2349
+ for (var ee = Ye(S), B = 0; B < I.length; B++) {
2350
+ var K = I[B];
2351
+ if (K.func === b && dt(K.options, ee)) {
2352
+ c.removeEventListener(f, b, i.supportsOptions ? ee : ee.capture), I.splice(B, 1), I.length === 0 && (delete R.events[f], O = !0);
2459
2353
  break;
2460
2354
  }
2461
2355
  }
2462
2356
  }
2463
- I && !Object.keys(T.events).length && n.splice(k, 1);
2464
- } else for (f in T.events) T.events.hasOwnProperty(f) && s(c, f, "all");
2357
+ O && !Object.keys(R.events).length && n.splice(k, 1);
2358
+ } else for (f in R.events) R.events.hasOwnProperty(f) && s(c, f, "all");
2465
2359
  }
2466
2360
  }
2467
2361
  function l(c, f) {
2468
- for (var y = Ye(f), S = new vr(c), k = r[c.type], T = Vt(c)[0], I = T; b.element(I); ) {
2469
- for (var R = 0; R < k.length; R++) {
2470
- var O = k[R], W = O.selector, K = O.context;
2471
- if (he(I, W) && se(K, T) && se(K, I)) {
2472
- var L = O.listeners;
2473
- S.currentTarget = I;
2474
- for (var V = 0; V < L.length; V++) {
2475
- var me = L[V];
2476
- ct(me.options, y) && me.func(S);
2362
+ for (var b = Ye(f), S = new vr(c), k = r[c.type], R = Ut(c)[0], O = R; x.element(O); ) {
2363
+ for (var I = 0; I < k.length; I++) {
2364
+ var z = k[I], U = z.selector, ee = z.context;
2365
+ if (he(O, U) && se(ee, R) && se(ee, O)) {
2366
+ var B = z.listeners;
2367
+ S.currentTarget = O;
2368
+ for (var K = 0; K < B.length; K++) {
2369
+ var me = B[K];
2370
+ dt(me.options, b) && me.func(S);
2477
2371
  }
2478
2372
  }
2479
2373
  }
2480
- I = fe(I);
2374
+ O = fe(O);
2481
2375
  }
2482
2376
  }
2483
2377
  function d(c) {
@@ -2488,9 +2382,9 @@ function Vo() {
2488
2382
  }, get passive() {
2489
2383
  return i.supportsPassive = !0;
2490
2384
  } }), t.events = i, i;
2491
- } }, Pt = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2492
- for (var e = 0, n = Pt.methodOrder; e < n.length; e++) {
2493
- var r = n[e], o = Pt[r](t);
2385
+ } }, Dt = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2386
+ for (var e = 0, n = Dt.methodOrder; e < n.length; e++) {
2387
+ var r = n[e], o = Dt[r](t);
2494
2388
  if (o) return o;
2495
2389
  }
2496
2390
  return null;
@@ -2511,7 +2405,7 @@ function Vo() {
2511
2405
  for (var a = 0, s = i.interactions.list; a < s.length; a++) {
2512
2406
  var l = s[a];
2513
2407
  if (l.pointerType === r) {
2514
- if (l.simulation && !xn(l, n)) continue;
2408
+ if (l.simulation && !wn(l, n)) continue;
2515
2409
  if (l.interacting()) return l;
2516
2410
  e || (e = l);
2517
2411
  }
@@ -2525,7 +2419,7 @@ function Vo() {
2525
2419
  }, hasPointer: function(t) {
2526
2420
  for (var e = t.pointerId, n = 0, r = t.scope.interactions.list; n < r.length; n++) {
2527
2421
  var o = r[n];
2528
- if (xn(o, e)) return o;
2422
+ if (wn(o, e)) return o;
2529
2423
  }
2530
2424
  return null;
2531
2425
  }, idle: function(t) {
@@ -2539,43 +2433,43 @@ function Vo() {
2539
2433
  }
2540
2434
  return null;
2541
2435
  } };
2542
- function xn(t, e) {
2436
+ function wn(t, e) {
2543
2437
  return t.pointers.some((function(n) {
2544
2438
  return n.id === e;
2545
2439
  }));
2546
2440
  }
2547
- var gr = Pt, Ot = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2548
- function wn(t, e) {
2441
+ var gr = Dt, Nt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2442
+ function En(t, e) {
2549
2443
  return function(n) {
2550
- var r = e.interactions.list, o = $t(n), i = Vt(n), a = i[0], s = i[1], l = [];
2444
+ var r = e.interactions.list, o = Vt(n), i = Ut(n), a = i[0], s = i[1], l = [];
2551
2445
  if (/^touch/.test(n.type)) {
2552
2446
  e.prevTouchTime = e.now();
2553
2447
  for (var d = 0, c = n.changedTouches; d < c.length; d++) {
2554
- var f = c[d], y = { pointer: f, pointerId: je(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, S = En(y);
2555
- l.push([y.pointer, y.eventTarget, y.curEventTarget, S]);
2448
+ var f = c[d], b = { pointer: f, pointerId: je(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, S = kn(b);
2449
+ l.push([b.pointer, b.eventTarget, b.curEventTarget, S]);
2556
2450
  }
2557
2451
  } else {
2558
2452
  var k = !1;
2559
- if (!ee.supportsPointerEvent && /mouse/.test(n.type)) {
2560
- for (var T = 0; T < r.length && !k; T++) k = r[T].pointerType !== "mouse" && r[T].pointerIsDown;
2453
+ if (!re.supportsPointerEvent && /mouse/.test(n.type)) {
2454
+ for (var R = 0; R < r.length && !k; R++) k = r[R].pointerType !== "mouse" && r[R].pointerIsDown;
2561
2455
  k = k || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
2562
2456
  }
2563
2457
  if (!k) {
2564
- var I = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, R = En(I);
2565
- l.push([I.pointer, I.eventTarget, I.curEventTarget, R]);
2458
+ var O = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, I = kn(O);
2459
+ l.push([O.pointer, O.eventTarget, O.curEventTarget, I]);
2566
2460
  }
2567
2461
  }
2568
- for (var O = 0; O < l.length; O++) {
2569
- var W = l[O], K = W[0], L = W[1], V = W[2];
2570
- W[3][t](K, n, L, V);
2462
+ for (var z = 0; z < l.length; z++) {
2463
+ var U = l[z], ee = U[0], B = U[1], K = U[2];
2464
+ U[3][t](ee, n, B, K);
2571
2465
  }
2572
2466
  };
2573
2467
  }
2574
- function En(t) {
2468
+ function kn(t) {
2575
2469
  var e = t.pointerType, n = t.scope, r = { interaction: gr.search(t), searchDetails: t };
2576
2470
  return n.fire("interactions:find", r), r.interaction || n.interactions.new({ pointerType: e });
2577
2471
  }
2578
- function Dt(t, e) {
2472
+ function zt(t, e) {
2579
2473
  var n = t.doc, r = t.scope, o = t.options, i = r.interactions.docEvents, a = r.events, s = a[e];
2580
2474
  for (var l in r.browser.isIOS && !o.events && (o.events = { passive: !1 }), a.delegatedEvents) s(n, l, a.delegateListener), s(n, l, a.delegateUseCapture, !0);
2581
2475
  for (var d = o && o.events, c = 0; c < i.length; c++) {
@@ -2584,32 +2478,32 @@ function Vo() {
2584
2478
  }
2585
2479
  }
2586
2480
  var yr = { id: "core/interactions", install: function(t) {
2587
- for (var e = {}, n = 0; n < Ot.length; n++) {
2588
- var r = Ot[n];
2589
- e[r] = wn(r, t);
2481
+ for (var e = {}, n = 0; n < Nt.length; n++) {
2482
+ var r = Nt[n];
2483
+ e[r] = En(r, t);
2590
2484
  }
2591
- var o, i = ee.pEventTypes;
2485
+ var o, i = re.pEventTypes;
2592
2486
  function a() {
2593
2487
  for (var s = 0, l = t.interactions.list; s < l.length; s++) {
2594
2488
  var d = l[s];
2595
2489
  if (d.pointerIsDown && d.pointerType === "touch" && !d._interacting) for (var c = function() {
2596
- var S = y[f];
2490
+ var S = b[f];
2597
2491
  t.documents.some((function(k) {
2598
2492
  return se(k.doc, S.downTarget);
2599
2493
  })) || d.removePointer(S.pointer, S.event);
2600
- }, f = 0, y = d.pointers; f < y.length; f++) c();
2494
+ }, f = 0, b = d.pointers; f < b.length; f++) c();
2601
2495
  }
2602
2496
  }
2603
- (o = Y.PointerEvent ? [{ type: i.down, listener: a }, { type: i.down, listener: e.pointerDown }, { type: i.move, listener: e.pointerMove }, { type: i.up, listener: e.pointerUp }, { type: i.cancel, listener: e.pointerUp }] : [{ type: "mousedown", listener: e.pointerDown }, { type: "mousemove", listener: e.pointerMove }, { type: "mouseup", listener: e.pointerUp }, { type: "touchstart", listener: a }, { type: "touchstart", listener: e.pointerDown }, { type: "touchmove", listener: e.pointerMove }, { type: "touchend", listener: e.pointerUp }, { type: "touchcancel", listener: e.pointerUp }]).push({ type: "blur", listener: function(s) {
2497
+ (o = X.PointerEvent ? [{ type: i.down, listener: a }, { type: i.down, listener: e.pointerDown }, { type: i.move, listener: e.pointerMove }, { type: i.up, listener: e.pointerUp }, { type: i.cancel, listener: e.pointerUp }] : [{ type: "mousedown", listener: e.pointerDown }, { type: "mousemove", listener: e.pointerMove }, { type: "mouseup", listener: e.pointerUp }, { type: "touchstart", listener: a }, { type: "touchstart", listener: e.pointerDown }, { type: "touchmove", listener: e.pointerMove }, { type: "touchend", listener: e.pointerUp }, { type: "touchcancel", listener: e.pointerUp }]).push({ type: "blur", listener: function(s) {
2604
2498
  for (var l = 0, d = t.interactions.list; l < d.length; l++)
2605
2499
  d[l].documentBlur(s);
2606
2500
  } }), t.prevTouchTime = 0, t.Interaction = (function(s) {
2607
- _(d, s);
2501
+ M(d, s);
2608
2502
  var l = A(d);
2609
2503
  function d() {
2610
2504
  return g(this, d), l.apply(this, arguments);
2611
2505
  }
2612
- return x(d, [{ key: "pointerMoveTolerance", get: function() {
2506
+ return y(d, [{ key: "pointerMoveTolerance", get: function() {
2613
2507
  return t.interactions.pointerMoveTolerance;
2614
2508
  }, set: function(c) {
2615
2509
  t.interactions.pointerMoveTolerance = c;
@@ -2622,47 +2516,47 @@ function Vo() {
2622
2516
  };
2623
2517
  var l = new t.Interaction(s);
2624
2518
  return t.interactions.list.push(l), l;
2625
- }, listeners: e, docEvents: o, pointerMoveTolerance: 1 }, t.usePlugin(cn);
2519
+ }, listeners: e, docEvents: o, pointerMoveTolerance: 1 }, t.usePlugin(un);
2626
2520
  }, listeners: { "scope:add-document": function(t) {
2627
- return Dt(t, "add");
2521
+ return zt(t, "add");
2628
2522
  }, "scope:remove-document": function(t) {
2629
- return Dt(t, "remove");
2523
+ return zt(t, "remove");
2630
2524
  }, "interactable:unset": function(t, e) {
2631
2525
  for (var n = t.interactable, r = e.interactions.list.length - 1; r >= 0; r--) {
2632
2526
  var o = e.interactions.list[r];
2633
2527
  o.interactable === n && (o.stop(), e.fire("interactions:destroy", { interaction: o }), o.destroy(), e.interactions.list.length > 2 && e.interactions.list.splice(r, 1));
2634
2528
  }
2635
- } }, onDocSignal: Dt, doOnInteractions: wn, methodNames: Ot }, br = yr, Me = (function(t) {
2529
+ } }, onDocSignal: zt, doOnInteractions: En, methodNames: Nt }, br = yr, Me = (function(t) {
2636
2530
  return t[t.On = 0] = "On", t[t.Off = 1] = "Off", t;
2637
2531
  })(Me || {}), xr = (function() {
2638
2532
  function t(e, n, r, o) {
2639
- g(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new bn(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = e, this._context = n.context || r, this._win = te(Ee(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
2533
+ g(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new xn(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = e, this._context = n.context || r, this._win = Z(Ee(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
2640
2534
  }
2641
- return x(t, [{ key: "_defaults", get: function() {
2535
+ return y(t, [{ key: "_defaults", get: function() {
2642
2536
  return { base: {}, perAction: {}, actions: {} };
2643
2537
  } }, { key: "setOnEvents", value: function(e, n) {
2644
- return b.func(n.onstart) && this.on("".concat(e, "start"), n.onstart), b.func(n.onmove) && this.on("".concat(e, "move"), n.onmove), b.func(n.onend) && this.on("".concat(e, "end"), n.onend), b.func(n.oninertiastart) && this.on("".concat(e, "inertiastart"), n.oninertiastart), this;
2538
+ return x.func(n.onstart) && this.on("".concat(e, "start"), n.onstart), x.func(n.onmove) && this.on("".concat(e, "move"), n.onmove), x.func(n.onend) && this.on("".concat(e, "end"), n.onend), x.func(n.oninertiastart) && this.on("".concat(e, "inertiastart"), n.oninertiastart), this;
2645
2539
  } }, { key: "updatePerActionListeners", value: function(e, n, r) {
2646
2540
  var o, i = this, a = (o = this._actions.map[e]) == null ? void 0 : o.filterEventType, s = function(l) {
2647
- return (a == null || a(l)) && at(l, i._actions);
2541
+ return (a == null || a(l)) && lt(l, i._actions);
2648
2542
  };
2649
- (b.array(n) || b.object(n)) && this._onOff(Me.Off, e, n, void 0, s), (b.array(r) || b.object(r)) && this._onOff(Me.On, e, r, void 0, s);
2543
+ (x.array(n) || x.object(n)) && this._onOff(Me.Off, e, n, void 0, s), (x.array(r) || x.object(r)) && this._onOff(Me.On, e, r, void 0, s);
2650
2544
  } }, { key: "setPerAction", value: function(e, n) {
2651
2545
  var r = this._defaults;
2652
2546
  for (var o in n) {
2653
2547
  var i = o, a = this.options[e], s = n[i];
2654
- i === "listeners" && this.updatePerActionListeners(e, a.listeners, s), b.array(s) ? a[i] = Xt(s) : b.plainObject(s) ? (a[i] = P(a[i] || {}, De(s)), b.object(r.perAction[i]) && "enabled" in r.perAction[i] && (a[i].enabled = s.enabled !== !1)) : b.bool(s) && b.object(r.perAction[i]) ? a[i].enabled = s : a[i] = s;
2548
+ i === "listeners" && this.updatePerActionListeners(e, a.listeners, s), x.array(s) ? a[i] = Gt(s) : x.plainObject(s) ? (a[i] = D(a[i] || {}, Ne(s)), x.object(r.perAction[i]) && "enabled" in r.perAction[i] && (a[i].enabled = s.enabled !== !1)) : x.bool(s) && x.object(r.perAction[i]) ? a[i].enabled = s : a[i] = s;
2655
2549
  }
2656
2550
  } }, { key: "getRect", value: function(e) {
2657
- return e = e || (b.element(this.target) ? this.target : null), b.string(this.target) && (e = e || this._context.querySelector(this.target)), we(e);
2551
+ return e = e || (x.element(this.target) ? this.target : null), x.string(this.target) && (e = e || this._context.querySelector(this.target)), we(e);
2658
2552
  } }, { key: "rectChecker", value: function(e) {
2659
2553
  var n = this;
2660
- return b.func(e) ? (this.getRect = function(r) {
2661
- var o = P({}, e.apply(n, r));
2554
+ return x.func(e) ? (this.getRect = function(r) {
2555
+ var o = D({}, e.apply(n, r));
2662
2556
  return "width" in o || (o.width = o.right - o.left, o.height = o.bottom - o.top), o;
2663
2557
  }, this) : e === null ? (delete this.getRect, this) : this.getRect;
2664
2558
  } }, { key: "_backCompatOption", value: function(e, n) {
2665
- if (Ee(n) || b.object(n)) {
2559
+ if (Ee(n) || x.object(n)) {
2666
2560
  for (var r in this.options[e] = n, this._actions.map) this.options[r][e] = n;
2667
2561
  return this;
2668
2562
  }
@@ -2673,7 +2567,7 @@ function Vo() {
2673
2567
  return e === "page" || e === "client" ? (this.options.deltaSource = e, this) : this.options.deltaSource;
2674
2568
  } }, { key: "getAllElements", value: function() {
2675
2569
  var e = this.target;
2676
- return b.string(e) ? Array.from(this._context.querySelectorAll(e)) : b.func(e) && e.getAllElements ? e.getAllElements() : b.element(e) ? [e] : [];
2570
+ return x.string(e) ? Array.from(this._context.querySelectorAll(e)) : x.func(e) && e.getAllElements ? e.getAllElements() : x.element(e) ? [e] : [];
2677
2571
  } }, { key: "context", value: function() {
2678
2572
  return this._context;
2679
2573
  } }, { key: "inContext", value: function(e) {
@@ -2681,19 +2575,19 @@ function Vo() {
2681
2575
  } }, { key: "testIgnoreAllow", value: function(e, n, r) {
2682
2576
  return !this.testIgnore(e.ignoreFrom, n, r) && this.testAllow(e.allowFrom, n, r);
2683
2577
  } }, { key: "testAllow", value: function(e, n, r) {
2684
- return !e || !!b.element(r) && (b.string(e) ? j(r, e, n) : !!b.element(e) && se(e, r));
2578
+ return !e || !!x.element(r) && (x.string(e) ? q(r, e, n) : !!x.element(e) && se(e, r));
2685
2579
  } }, { key: "testIgnore", value: function(e, n, r) {
2686
- return !(!e || !b.element(r)) && (b.string(e) ? j(r, e, n) : !!b.element(e) && se(e, r));
2580
+ return !(!e || !x.element(r)) && (x.string(e) ? q(r, e, n) : !!x.element(e) && se(e, r));
2687
2581
  } }, { key: "fire", value: function(e) {
2688
2582
  return this.events.fire(e), this;
2689
2583
  } }, { key: "_onOff", value: function(e, n, r, o, i) {
2690
- b.object(n) && !b.array(n) && (o = r, r = null);
2691
- var a = Ae(n, r, i);
2584
+ x.object(n) && !x.array(n) && (o = r, r = null);
2585
+ var a = Ie(n, r, i);
2692
2586
  for (var s in a) {
2693
- s === "wheel" && (s = ee.wheelEvent);
2587
+ s === "wheel" && (s = re.wheelEvent);
2694
2588
  for (var l = 0, d = a[s]; l < d.length; l++) {
2695
2589
  var c = d[l];
2696
- at(s, this._actions) ? this.events[e === Me.On ? "on" : "off"](s, c) : b.string(this.target) ? this._scopeEvents[e === Me.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, o) : this._scopeEvents[e === Me.On ? "add" : "remove"](this.target, s, c, o);
2590
+ lt(s, this._actions) ? this.events[e === Me.On ? "on" : "off"](s, c) : x.string(this.target) ? this._scopeEvents[e === Me.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, o) : this._scopeEvents[e === Me.On ? "add" : "remove"](this.target, s, c, o);
2697
2591
  }
2698
2592
  }
2699
2593
  return this;
@@ -2703,14 +2597,14 @@ function Vo() {
2703
2597
  return this._onOff(Me.Off, e, n, r);
2704
2598
  } }, { key: "set", value: function(e) {
2705
2599
  var n = this._defaults;
2706
- for (var r in b.object(e) || (e = {}), this.options = De(n.base), this._actions.methodDict) {
2600
+ for (var r in x.object(e) || (e = {}), this.options = Ne(n.base), this._actions.methodDict) {
2707
2601
  var o = r, i = this._actions.methodDict[o];
2708
- this.options[o] = {}, this.setPerAction(o, P(P({}, n.perAction), n.actions[o])), this[i](e[o]);
2602
+ this.options[o] = {}, this.setPerAction(o, D(D({}, n.perAction), n.actions[o])), this[i](e[o]);
2709
2603
  }
2710
- for (var a in e) a !== "getRect" ? b.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2604
+ for (var a in e) a !== "getRect" ? x.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2711
2605
  return this;
2712
2606
  } }, { key: "unset", value: function() {
2713
- if (b.string(this.target)) for (var e in this._scopeEvents.delegatedEvents) for (var n = this._scopeEvents.delegatedEvents[e], r = n.length - 1; r >= 0; r--) {
2607
+ if (x.string(this.target)) for (var e in this._scopeEvents.delegatedEvents) for (var n = this._scopeEvents.delegatedEvents[e], r = n.length - 1; r >= 0; r--) {
2714
2608
  var o = n[r], i = o.selector, a = o.context, s = o.listeners;
2715
2609
  i === this.target && a === this._context && n.splice(r, 1);
2716
2610
  for (var l = s.length - 1; l >= 0; l--) this._scopeEvents.removeDelegate(this.target, this._context, e, s[l][0], s[l][1]);
@@ -2721,104 +2615,104 @@ function Vo() {
2721
2615
  function t(e) {
2722
2616
  var n = this;
2723
2617
  g(this, t), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({ "interactable:unset": function(r) {
2724
- var o = r.interactable, i = o.target, a = b.string(i) ? n.selectorMap[i] : i[n.scope.id], s = He(a, (function(l) {
2618
+ var o = r.interactable, i = o.target, a = x.string(i) ? n.selectorMap[i] : i[n.scope.id], s = He(a, (function(l) {
2725
2619
  return l === o;
2726
2620
  }));
2727
2621
  a.splice(s, 1);
2728
2622
  } });
2729
2623
  }
2730
- return x(t, [{ key: "new", value: function(e, n) {
2731
- n = P(n || {}, { actions: this.scope.actions });
2624
+ return y(t, [{ key: "new", value: function(e, n) {
2625
+ n = D(n || {}, { actions: this.scope.actions });
2732
2626
  var r = new this.scope.Interactable(e, n, this.scope.document, this.scope.events);
2733
- return this.scope.addDocument(r._doc), this.list.push(r), b.string(e) ? (this.selectorMap[e] || (this.selectorMap[e] = []), this.selectorMap[e].push(r)) : (r.target[this.scope.id] || Object.defineProperty(e, this.scope.id, { value: [], configurable: !0 }), e[this.scope.id].push(r)), this.scope.fire("interactable:new", { target: e, options: n, interactable: r, win: this.scope._win }), r;
2627
+ return this.scope.addDocument(r._doc), this.list.push(r), x.string(e) ? (this.selectorMap[e] || (this.selectorMap[e] = []), this.selectorMap[e].push(r)) : (r.target[this.scope.id] || Object.defineProperty(e, this.scope.id, { value: [], configurable: !0 }), e[this.scope.id].push(r)), this.scope.fire("interactable:new", { target: e, options: n, interactable: r, win: this.scope._win }), r;
2734
2628
  } }, { key: "getExisting", value: function(e, n) {
2735
- var r = n && n.context || this.scope.document, o = b.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
2629
+ var r = n && n.context || this.scope.document, o = x.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
2736
2630
  if (i) return Be(i, (function(a) {
2737
2631
  return a._context === r && (o || a.inContext(e));
2738
2632
  }));
2739
2633
  } }, { key: "forEachMatch", value: function(e, n) {
2740
2634
  for (var r = 0, o = this.list; r < o.length; r++) {
2741
2635
  var i = o[r], a = void 0;
2742
- if ((b.string(i.target) ? b.element(e) && he(e, i.target) : e === i.target) && i.inContext(e) && (a = n(i)), a !== void 0) return a;
2636
+ if ((x.string(i.target) ? x.element(e) && he(e, i.target) : e === i.target) && i.inContext(e) && (a = n(i)), a !== void 0) return a;
2743
2637
  }
2744
2638
  } }]), t;
2745
2639
  })(), Er = (function() {
2746
2640
  function t() {
2747
2641
  var e = this;
2748
- g(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = ee, this.defaults = De(dn), this.Eventable = bn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(r) {
2642
+ g(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = re, this.defaults = Ne(pn), this.Eventable = xn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(r) {
2749
2643
  var o = function i(a, s) {
2750
2644
  var l = r.interactables.getExisting(a, s);
2751
2645
  return l || ((l = r.interactables.new(a, s)).events.global = i.globalEvents), l;
2752
2646
  };
2753
- return o.getPointerAverage = Yt, o.getTouchBBox = gt, o.getTouchDistance = yt, o.getTouchAngle = bt, o.getElementRect = we, o.getElementClientRect = xe, o.matchesSelector = he, o.closest = de, o.globalEvents = {}, o.version = "1.10.27", o.scope = r, o.use = function(i, a) {
2647
+ return o.getPointerAverage = $t, o.getTouchBBox = bt, o.getTouchDistance = xt, o.getTouchAngle = wt, o.getElementRect = we, o.getElementClientRect = xe, o.matchesSelector = he, o.closest = pe, o.globalEvents = {}, o.version = "1.10.27", o.scope = r, o.use = function(i, a) {
2754
2648
  return this.scope.usePlugin(i, a), this;
2755
2649
  }, o.isSet = function(i, a) {
2756
2650
  return !!this.scope.interactables.get(i, a && a.context);
2757
- }, o.on = qe((function(i, a, s) {
2758
- if (b.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), b.array(i)) {
2651
+ }, o.on = We((function(i, a, s) {
2652
+ if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2759
2653
  for (var l = 0, d = i; l < d.length; l++) {
2760
2654
  var c = d[l];
2761
2655
  this.on(c, a, s);
2762
2656
  }
2763
2657
  return this;
2764
2658
  }
2765
- if (b.object(i)) {
2659
+ if (x.object(i)) {
2766
2660
  for (var f in i) this.on(f, i[f], a);
2767
2661
  return this;
2768
2662
  }
2769
- return at(i, this.scope.actions) ? this.globalEvents[i] ? this.globalEvents[i].push(a) : this.globalEvents[i] = [a] : this.scope.events.add(this.scope.document, i, a, { options: s }), this;
2770
- }), "The interact.on() method is being deprecated"), o.off = qe((function(i, a, s) {
2771
- if (b.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), b.array(i)) {
2663
+ return lt(i, this.scope.actions) ? this.globalEvents[i] ? this.globalEvents[i].push(a) : this.globalEvents[i] = [a] : this.scope.events.add(this.scope.document, i, a, { options: s }), this;
2664
+ }), "The interact.on() method is being deprecated"), o.off = We((function(i, a, s) {
2665
+ if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2772
2666
  for (var l = 0, d = i; l < d.length; l++) {
2773
2667
  var c = d[l];
2774
2668
  this.off(c, a, s);
2775
2669
  }
2776
2670
  return this;
2777
2671
  }
2778
- if (b.object(i)) {
2672
+ if (x.object(i)) {
2779
2673
  for (var f in i) this.off(f, i[f], a);
2780
2674
  return this;
2781
2675
  }
2782
- var y;
2783
- return at(i, this.scope.actions) ? i in this.globalEvents && (y = this.globalEvents[i].indexOf(a)) !== -1 && this.globalEvents[i].splice(y, 1) : this.scope.events.remove(this.scope.document, i, a, s), this;
2676
+ var b;
2677
+ return lt(i, this.scope.actions) ? i in this.globalEvents && (b = this.globalEvents[i].indexOf(a)) !== -1 && this.globalEvents[i].splice(b, 1) : this.scope.events.remove(this.scope.document, i, a, s), this;
2784
2678
  }), "The interact.off() method is being deprecated"), o.debug = function() {
2785
2679
  return this.scope;
2786
2680
  }, o.supportsTouch = function() {
2787
- return ee.supportsTouch;
2681
+ return re.supportsTouch;
2788
2682
  }, o.supportsPointerEvent = function() {
2789
- return ee.supportsPointerEvent;
2683
+ return re.supportsPointerEvent;
2790
2684
  }, o.stop = function() {
2791
2685
  for (var i = 0, a = this.scope.interactions.list; i < a.length; i++) a[i].stop();
2792
2686
  return this;
2793
2687
  }, o.pointerMoveTolerance = function(i) {
2794
- return b.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
2688
+ return x.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
2795
2689
  }, o.addDocument = function(i, a) {
2796
2690
  this.scope.addDocument(i, a);
2797
2691
  }, o.removeDocument = function(i) {
2798
2692
  this.scope.removeDocument(i);
2799
2693
  }, o;
2800
- })(this), this.InteractEvent = At, this.Interactable = void 0, this.interactables = new wr(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(r) {
2694
+ })(this), this.InteractEvent = Pt, this.Interactable = void 0, this.interactables = new wr(this), this._win = void 0, this.document = void 0, this.window = void 0, this.documents = [], this._plugins = { list: [], map: {} }, this.onWindowUnload = function(r) {
2801
2695
  return e.removeDocument(r.target);
2802
2696
  };
2803
2697
  var n = this;
2804
2698
  this.Interactable = (function(r) {
2805
- _(i, r);
2699
+ M(i, r);
2806
2700
  var o = A(i);
2807
2701
  function i() {
2808
2702
  return g(this, i), o.apply(this, arguments);
2809
2703
  }
2810
- return x(i, [{ key: "_defaults", get: function() {
2704
+ return y(i, [{ key: "_defaults", get: function() {
2811
2705
  return n.defaults;
2812
2706
  } }, { key: "set", value: function(a) {
2813
- return N(M(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2707
+ return j(C(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2814
2708
  } }, { key: "unset", value: function() {
2815
- N(M(i.prototype), "unset", this).call(this);
2709
+ j(C(i.prototype), "unset", this).call(this);
2816
2710
  var a = n.interactables.list.indexOf(this);
2817
2711
  a < 0 || (n.interactables.list.splice(a, 1), n.fire("interactable:unset", { interactable: this }));
2818
2712
  } }]), i;
2819
2713
  })(xr);
2820
2714
  }
2821
- return x(t, [{ key: "addListeners", value: function(e, n) {
2715
+ return y(t, [{ key: "addListeners", value: function(e, n) {
2822
2716
  this.listenerMaps.push({ id: n, map: e });
2823
2717
  } }, { key: "fire", value: function(e, n) {
2824
2718
  for (var r = 0, o = this.listenerMaps; r < o.length; r++) {
@@ -2827,7 +2721,7 @@ function Vo() {
2827
2721
  }
2828
2722
  } }, { key: "init", value: function(e) {
2829
2723
  return this.isInitialized ? this : (function(n, r) {
2830
- return n.isInitialized = !0, b.window(r) && re(r), Y.init(r), ee.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(br), n.usePlugin(mr), n;
2724
+ return n.isInitialized = !0, x.window(r) && V(r), X.init(r), re.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(br), n.usePlugin(mr), n;
2831
2725
  })(this, e);
2832
2726
  } }, { key: "pluginIsInstalled", value: function(e) {
2833
2727
  var n = e.id;
@@ -2837,20 +2731,20 @@ function Vo() {
2837
2731
  if (this.pluginIsInstalled(e)) return this;
2838
2732
  if (e.id && (this._plugins.map[e.id] = e), this._plugins.list.push(e), e.install && e.install(this, n), e.listeners && e.before) {
2839
2733
  for (var r = 0, o = this.listenerMaps.length, i = e.before.reduce((function(s, l) {
2840
- return s[l] = !0, s[kn(l)] = !0, s;
2734
+ return s[l] = !0, s[Cn(l)] = !0, s;
2841
2735
  }), {}); r < o; r++) {
2842
2736
  var a = this.listenerMaps[r].id;
2843
- if (a && (i[a] || i[kn(a)])) break;
2737
+ if (a && (i[a] || i[Cn(a)])) break;
2844
2738
  }
2845
2739
  this.listenerMaps.splice(r, 0, { id: e.id, map: e.listeners });
2846
2740
  } else e.listeners && this.listenerMaps.push({ id: e.id, map: e.listeners });
2847
2741
  return this;
2848
2742
  } }, { key: "addDocument", value: function(e, n) {
2849
2743
  if (this.getDocIndex(e) !== -1) return !1;
2850
- var r = te(e);
2851
- n = n ? P({}, n) : {}, this.documents.push({ doc: e, options: n }), this.events.documents.push(e), e !== this.document && this.events.add(r, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: e, window: r, scope: this, options: n });
2744
+ var r = Z(e);
2745
+ n = n ? D({}, n) : {}, this.documents.push({ doc: e, options: n }), this.events.documents.push(e), e !== this.document && this.events.add(r, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: e, window: r, scope: this, options: n });
2852
2746
  } }, { key: "removeDocument", value: function(e) {
2853
- var n = this.getDocIndex(e), r = te(e), o = this.documents[n].options;
2747
+ var n = this.getDocIndex(e), r = Z(e), o = this.documents[n].options;
2854
2748
  this.events.remove(r, "unload", this.onWindowUnload), this.documents.splice(n, 1), this.events.documents.splice(n, 1), this.fire("scope:remove-document", { doc: e, window: r, scope: this, options: o });
2855
2749
  } }, { key: "getDocIndex", value: function(e) {
2856
2750
  for (var n = 0; n < this.documents.length; n++) if (this.documents[n].doc === e) return n;
@@ -2862,11 +2756,11 @@ function Vo() {
2862
2756
  return (this.window.Date || Date).now();
2863
2757
  } }]), t;
2864
2758
  })();
2865
- function kn(t) {
2759
+ function Cn(t) {
2866
2760
  return t && t.replace(/\/.*$/, "");
2867
2761
  }
2868
- var Cn = new Er(), ve = Cn.interactStatic, kr = typeof globalThis < "u" ? globalThis : window;
2869
- Cn.init(kr);
2762
+ var Sn = new Er(), ve = Sn.interactStatic, kr = typeof globalThis < "u" ? globalThis : window;
2763
+ Sn.init(kr);
2870
2764
  var Cr = Object.freeze({ __proto__: null, edgeTarget: function() {
2871
2765
  }, elements: function() {
2872
2766
  }, grid: function(t) {
@@ -2875,34 +2769,34 @@ function Vo() {
2875
2769
  return o in t || i in t;
2876
2770
  })), n = function(r, o) {
2877
2771
  for (var i = t.range, a = t.limits, s = a === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : a, l = t.offset, d = l === void 0 ? { x: 0, y: 0 } : l, c = { range: i, grid: t, x: null, y: null }, f = 0; f < e.length; f++) {
2878
- var y = e[f], S = y[0], k = y[1], T = Math.round((r - d.x) / t[S]), I = Math.round((o - d.y) / t[k]);
2879
- c[S] = Math.max(s.left, Math.min(s.right, T * t[S] + d.x)), c[k] = Math.max(s.top, Math.min(s.bottom, I * t[k] + d.y));
2772
+ var b = e[f], S = b[0], k = b[1], R = Math.round((r - d.x) / t[S]), O = Math.round((o - d.y) / t[k]);
2773
+ c[S] = Math.max(s.left, Math.min(s.right, R * t[S] + d.x)), c[k] = Math.max(s.top, Math.min(s.bottom, O * t[k] + d.y));
2880
2774
  }
2881
2775
  return c;
2882
2776
  };
2883
2777
  return n.grid = t, n.coordFields = e, n;
2884
2778
  } }), Sr = { id: "snappers", install: function(t) {
2885
2779
  var e = t.interactStatic;
2886
- e.snappers = P(e.snappers || {}, Cr), e.createSnapGrid = e.snappers.grid;
2780
+ e.snappers = D(e.snappers || {}, Cr), e.createSnapGrid = e.snappers.grid;
2887
2781
  } }, Tr = Sr, _r = { start: function(t) {
2888
2782
  var e = t.state, n = t.rect, r = t.edges, o = t.pageCoords, i = e.options, a = i.ratio, s = i.enabled, l = e.options, d = l.equalDelta, c = l.modifiers;
2889
- a === "preserve" && (a = n.width / n.height), e.startCoords = P({}, o), e.startRect = P({}, n), e.ratio = a, e.equalDelta = d;
2783
+ a === "preserve" && (a = n.width / n.height), e.startCoords = D({}, o), e.startRect = D({}, n), e.ratio = a, e.equalDelta = d;
2890
2784
  var f = e.linkedEdges = { top: r.top || r.left && !r.bottom, left: r.left || r.top && !r.right, bottom: r.bottom || r.right && !r.top, right: r.right || r.bottom && !r.left };
2891
2785
  if (e.xIsPrimaryAxis = !(!r.left && !r.right), e.equalDelta) {
2892
- var y = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2893
- e.edgeSign = { x: y, y };
2786
+ var b = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2787
+ e.edgeSign = { x: b, y: b };
2894
2788
  } else e.edgeSign = { x: f.left ? -1 : 1, y: f.top ? -1 : 1 };
2895
- if (s !== !1 && P(r, f), c != null && c.length) {
2896
- var S = new Rt(t.interaction);
2789
+ if (s !== !1 && D(r, f), c != null && c.length) {
2790
+ var S = new It(t.interaction);
2897
2791
  S.copyFrom(t.interaction.modification), S.prepareStates(c), e.subModification = S, S.startAll(u({}, t));
2898
2792
  }
2899
2793
  }, set: function(t) {
2900
- var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = P({}, r), a = e.equalDelta ? Mr : Rr;
2901
- if (P(t.edges, o), a(e, e.xIsPrimaryAxis, r, n), !e.subModification) return null;
2902
- var s = P({}, n);
2903
- et(o, s, { x: r.x - i.x, y: r.y - i.y });
2794
+ var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = D({}, r), a = e.equalDelta ? Mr : Rr;
2795
+ if (D(t.edges, o), a(e, e.xIsPrimaryAxis, r, n), !e.subModification) return null;
2796
+ var s = D({}, n);
2797
+ nt(o, s, { x: r.x - i.x, y: r.y - i.y });
2904
2798
  var l = e.subModification.setAll(u(u({}, t), {}, { rect: s, edges: o, pageCoords: r, prevCoords: r, prevRect: s })), d = l.delta;
2905
- return l.changed && (a(e, Math.abs(d.x) > Math.abs(d.y), l.coords, l.rect), P(r, l.coords)), l.eventProps;
2799
+ return l.changed && (a(e, Math.abs(d.x) > Math.abs(d.y), l.coords, l.rect), D(r, l.coords)), l.eventProps;
2906
2800
  }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
2907
2801
  function Mr(t, e, n) {
2908
2802
  var r = t.startCoords, o = t.edgeSign;
@@ -2918,17 +2812,17 @@ function Vo() {
2918
2812
  n.x = i.x + (d - o.width) * s.x;
2919
2813
  }
2920
2814
  }
2921
- var Ar = _e(_r, "aspectRatio"), Sn = function() {
2815
+ var Ar = _e(_r, "aspectRatio"), Tn = function() {
2922
2816
  };
2923
- Sn._defaults = {};
2924
- var ut = Sn;
2925
- function Pe(t, e, n) {
2926
- return b.func(t) ? ze(t, e.interactable, e.element, [n.x, n.y, e]) : ze(t, e.interactable, e.element);
2817
+ Tn._defaults = {};
2818
+ var pt = Tn;
2819
+ function Oe(t, e, n) {
2820
+ return x.func(t) ? ze(t, e.interactable, e.element, [n.x, n.y, e]) : ze(t, e.interactable, e.element);
2927
2821
  }
2928
- var dt = { start: function(t) {
2929
- var e = t.rect, n = t.startOffset, r = t.state, o = t.interaction, i = t.pageCoords, a = r.options, s = a.elementRect, l = P({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
2822
+ var ft = { start: function(t) {
2823
+ var e = t.rect, n = t.startOffset, r = t.state, o = t.interaction, i = t.pageCoords, a = r.options, s = a.elementRect, l = D({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
2930
2824
  if (e && s) {
2931
- var d = Pe(a.restriction, o, i);
2825
+ var d = Oe(a.restriction, o, i);
2932
2826
  if (d) {
2933
2827
  var c = d.right - d.left - e.width, f = d.bottom - d.top - e.height;
2934
2828
  c < 0 && (l.left += c, l.right += c), f < 0 && (l.top += f, l.bottom += f);
@@ -2937,104 +2831,104 @@ function Vo() {
2937
2831
  }
2938
2832
  r.offset = l;
2939
2833
  }, set: function(t) {
2940
- var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = Pe(o.restriction, n, e);
2834
+ var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = Oe(o.restriction, n, e);
2941
2835
  if (a) {
2942
2836
  var s = (function(l) {
2943
- return !l || "left" in l && "top" in l || ((l = P({}, l)).left = l.x || 0, l.top = l.y || 0, l.right = l.right || l.left + l.width, l.bottom = l.bottom || l.top + l.height), l;
2837
+ return !l || "left" in l && "top" in l || ((l = D({}, l)).left = l.x || 0, l.top = l.y || 0, l.right = l.right || l.left + l.width, l.bottom = l.bottom || l.top + l.height), l;
2944
2838
  })(a);
2945
2839
  e.x = Math.max(Math.min(s.right - i.right, e.x), s.left + i.left), e.y = Math.max(Math.min(s.bottom - i.bottom, e.y), s.top + i.top);
2946
2840
  }
2947
- }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Ir = _e(dt, "restrict"), Tn = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, _n = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
2948
- function Mn(t, e) {
2841
+ }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Ir = _e(ft, "restrict"), _n = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, Mn = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
2842
+ function Rn(t, e) {
2949
2843
  for (var n = 0, r = ["top", "left", "bottom", "right"]; n < r.length; n++) {
2950
2844
  var o = r[n];
2951
2845
  o in t || (t[o] = e[o]);
2952
2846
  }
2953
2847
  return t;
2954
2848
  }
2955
- var $e = { noInner: Tn, noOuter: _n, start: function(t) {
2849
+ var $e = { noInner: _n, noOuter: Mn, start: function(t) {
2956
2850
  var e, n = t.interaction, r = t.startOffset, o = t.state, i = o.options;
2957
- i && (e = Ze(Pe(i.offset, n, n.coords.start.page))), e = e || { x: 0, y: 0 }, o.offset = { top: e.y + r.top, left: e.x + r.left, bottom: e.y - r.bottom, right: e.x - r.right };
2851
+ i && (e = tt(Oe(i.offset, n, n.coords.start.page))), e = e || { x: 0, y: 0 }, o.offset = { top: e.y + r.top, left: e.x + r.left, bottom: e.y - r.bottom, right: e.x - r.right };
2958
2852
  }, set: function(t) {
2959
2853
  var e = t.coords, n = t.edges, r = t.interaction, o = t.state, i = o.offset, a = o.options;
2960
2854
  if (n) {
2961
- var s = P({}, e), l = Pe(a.inner, r, s) || {}, d = Pe(a.outer, r, s) || {};
2962
- Mn(l, Tn), Mn(d, _n), n.top ? e.y = Math.min(Math.max(d.top + i.top, s.y), l.top + i.top) : n.bottom && (e.y = Math.max(Math.min(d.bottom + i.bottom, s.y), l.bottom + i.bottom)), n.left ? e.x = Math.min(Math.max(d.left + i.left, s.x), l.left + i.left) : n.right && (e.x = Math.max(Math.min(d.right + i.right, s.x), l.right + i.right));
2855
+ var s = D({}, e), l = Oe(a.inner, r, s) || {}, d = Oe(a.outer, r, s) || {};
2856
+ Rn(l, _n), Rn(d, Mn), n.top ? e.y = Math.min(Math.max(d.top + i.top, s.y), l.top + i.top) : n.bottom && (e.y = Math.max(Math.min(d.bottom + i.bottom, s.y), l.bottom + i.bottom)), n.left ? e.x = Math.min(Math.max(d.left + i.left, s.x), l.left + i.left) : n.right && (e.x = Math.max(Math.min(d.right + i.right, s.x), l.right + i.right));
2963
2857
  }
2964
- }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = _e($e, "restrictEdges"), Or = P({ get elementRect() {
2858
+ }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = _e($e, "restrictEdges"), Or = D({ get elementRect() {
2965
2859
  return { top: 0, left: 0, bottom: 1, right: 1 };
2966
2860
  }, set elementRect(t) {
2967
- } }, dt.defaults), Dr = _e({ start: dt.start, set: dt.set, defaults: Or }, "restrictRect"), Nr = { width: -1 / 0, height: -1 / 0 }, zr = { width: 1 / 0, height: 1 / 0 }, Lr = _e({ start: function(t) {
2861
+ } }, ft.defaults), Dr = _e({ start: ft.start, set: ft.set, defaults: Or }, "restrictRect"), Nr = { width: -1 / 0, height: -1 / 0 }, zr = { width: 1 / 0, height: 1 / 0 }, Lr = _e({ start: function(t) {
2968
2862
  return $e.start(t);
2969
2863
  }, set: function(t) {
2970
2864
  var e = t.interaction, n = t.state, r = t.rect, o = t.edges, i = n.options;
2971
2865
  if (o) {
2972
- var a = vt(Pe(i.min, e, t.coords)) || Nr, s = vt(Pe(i.max, e, t.coords)) || zr;
2973
- n.options = { endOnly: i.endOnly, inner: P({}, $e.noInner), outer: P({}, $e.noOuter) }, o.top ? (n.options.inner.top = r.bottom - a.height, n.options.outer.top = r.bottom - s.height) : o.bottom && (n.options.inner.bottom = r.top + a.height, n.options.outer.bottom = r.top + s.height), o.left ? (n.options.inner.left = r.right - a.width, n.options.outer.left = r.right - s.width) : o.right && (n.options.inner.right = r.left + a.width, n.options.outer.right = r.left + s.width), $e.set(t), n.options = i;
2866
+ var a = gt(Oe(i.min, e, t.coords)) || Nr, s = gt(Oe(i.max, e, t.coords)) || zr;
2867
+ n.options = { endOnly: i.endOnly, inner: D({}, $e.noInner), outer: D({}, $e.noOuter) }, o.top ? (n.options.inner.top = r.bottom - a.height, n.options.outer.top = r.bottom - s.height) : o.bottom && (n.options.inner.bottom = r.top + a.height, n.options.outer.bottom = r.top + s.height), o.left ? (n.options.inner.left = r.right - a.width, n.options.outer.left = r.right - s.width) : o.right && (n.options.inner.right = r.left + a.width, n.options.outer.right = r.left + s.width), $e.set(t), n.options = i;
2974
2868
  }
2975
- }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Nt = { start: function(t) {
2976
- var e, n = t.interaction, r = t.interactable, o = t.element, i = t.rect, a = t.state, s = t.startOffset, l = a.options, d = l.offsetWithOrigin ? (function(y) {
2977
- var S = y.interaction.element, k = Ze(ze(y.state.options.origin, null, null, [S])), T = k || Le(y.interactable, S, y.interaction.prepared.name);
2978
- return T;
2869
+ }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Lt = { start: function(t) {
2870
+ var e, n = t.interaction, r = t.interactable, o = t.element, i = t.rect, a = t.state, s = t.startOffset, l = a.options, d = l.offsetWithOrigin ? (function(b) {
2871
+ var S = b.interaction.element, k = tt(ze(b.state.options.origin, null, null, [S])), R = k || Le(b.interactable, S, b.interaction.prepared.name);
2872
+ return R;
2979
2873
  })(t) : { x: 0, y: 0 };
2980
2874
  if (l.offset === "startCoords") e = { x: n.coords.start.page.x, y: n.coords.start.page.y };
2981
2875
  else {
2982
2876
  var c = ze(l.offset, r, o, [n]);
2983
- (e = Ze(c) || { x: 0, y: 0 }).x += d.x, e.y += d.y;
2877
+ (e = tt(c) || { x: 0, y: 0 }).x += d.x, e.y += d.y;
2984
2878
  }
2985
2879
  var f = l.relativePoints;
2986
- a.offsets = i && f && f.length ? f.map((function(y, S) {
2987
- return { index: S, relativePoint: y, x: s.left - i.width * y.x + e.x, y: s.top - i.height * y.y + e.y };
2880
+ a.offsets = i && f && f.length ? f.map((function(b, S) {
2881
+ return { index: S, relativePoint: b, x: s.left - i.width * b.x + e.x, y: s.top - i.height * b.y + e.y };
2988
2882
  })) : [{ index: 0, relativePoint: null, x: e.x, y: e.y }];
2989
2883
  }, set: function(t) {
2990
- var e = t.interaction, n = t.coords, r = t.state, o = r.options, i = r.offsets, a = Le(e.interactable, e.element, e.prepared.name), s = P({}, n), l = [];
2884
+ var e = t.interaction, n = t.coords, r = t.state, o = r.options, i = r.offsets, a = Le(e.interactable, e.element, e.prepared.name), s = D({}, n), l = [];
2991
2885
  o.offsetWithOrigin || (s.x -= a.x, s.y -= a.y);
2992
- for (var d = 0, c = i; d < c.length; d++) for (var f = c[d], y = s.x - f.x, S = s.y - f.y, k = 0, T = o.targets.length; k < T; k++) {
2993
- var I = o.targets[k], R = void 0;
2994
- (R = b.func(I) ? I(y, S, e._proxy, f, k) : I) && l.push({ x: (b.number(R.x) ? R.x : y) + f.x, y: (b.number(R.y) ? R.y : S) + f.y, range: b.number(R.range) ? R.range : o.range, source: I, index: k, offset: f });
2886
+ for (var d = 0, c = i; d < c.length; d++) for (var f = c[d], b = s.x - f.x, S = s.y - f.y, k = 0, R = o.targets.length; k < R; k++) {
2887
+ var O = o.targets[k], I = void 0;
2888
+ (I = x.func(O) ? O(b, S, e._proxy, f, k) : O) && l.push({ x: (x.number(I.x) ? I.x : b) + f.x, y: (x.number(I.y) ? I.y : S) + f.y, range: x.number(I.range) ? I.range : o.range, source: O, index: k, offset: f });
2995
2889
  }
2996
- for (var O = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, W = 0; W < l.length; W++) {
2997
- var K = l[W], L = K.range, V = K.x - s.x, me = K.y - s.y, ae = Fe(V, me), ge = ae <= L;
2998
- L === 1 / 0 && O.inRange && O.range !== 1 / 0 && (ge = !1), O.target && !(ge ? O.inRange && L !== 1 / 0 ? ae / L < O.distance / O.range : L === 1 / 0 && O.range !== 1 / 0 || ae < O.distance : !O.inRange && ae < O.distance) || (O.target = K, O.distance = ae, O.range = L, O.inRange = ge, O.delta.x = V, O.delta.y = me);
2890
+ for (var z = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, U = 0; U < l.length; U++) {
2891
+ var ee = l[U], B = ee.range, K = ee.x - s.x, me = ee.y - s.y, ae = Fe(K, me), ge = ae <= B;
2892
+ B === 1 / 0 && z.inRange && z.range !== 1 / 0 && (ge = !1), z.target && !(ge ? z.inRange && B !== 1 / 0 ? ae / B < z.distance / z.range : B === 1 / 0 && z.range !== 1 / 0 || ae < z.distance : !z.inRange && ae < z.distance) || (z.target = ee, z.distance = ae, z.range = B, z.inRange = ge, z.delta.x = K, z.delta.y = me);
2999
2893
  }
3000
- return O.inRange && (n.x = O.target.x, n.y = O.target.y), r.closest = O, O;
3001
- }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = _e(Nt, "snap"), pt = { start: function(t) {
2894
+ return z.inRange && (n.x = z.target.x, n.y = z.target.y), r.closest = z, z;
2895
+ }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = _e(Lt, "snap"), ht = { start: function(t) {
3002
2896
  var e = t.state, n = t.edges, r = e.options;
3003
2897
  if (!n) return null;
3004
- t.state = { options: { targets: null, relativePoints: [{ x: n.left ? 0 : 1, y: n.top ? 0 : 1 }], offset: r.offset || "self", origin: { x: 0, y: 0 }, range: r.range } }, e.targetFields = e.targetFields || [["width", "height"], ["x", "y"]], Nt.start(t), e.offsets = t.state.offsets, t.state = e;
2898
+ t.state = { options: { targets: null, relativePoints: [{ x: n.left ? 0 : 1, y: n.top ? 0 : 1 }], offset: r.offset || "self", origin: { x: 0, y: 0 }, range: r.range } }, e.targetFields = e.targetFields || [["width", "height"], ["x", "y"]], Lt.start(t), e.offsets = t.state.offsets, t.state = e;
3005
2899
  }, set: function(t) {
3006
2900
  var e = t.interaction, n = t.state, r = t.coords, o = n.options, i = n.offsets, a = { x: r.x - i[0].x, y: r.y - i[0].y };
3007
- n.options = P({}, o), n.options.targets = [];
2901
+ n.options = D({}, o), n.options.targets = [];
3008
2902
  for (var s = 0, l = o.targets || []; s < l.length; s++) {
3009
2903
  var d = l[s], c = void 0;
3010
- if (c = b.func(d) ? d(a.x, a.y, e) : d) {
3011
- for (var f = 0, y = n.targetFields; f < y.length; f++) {
3012
- var S = y[f], k = S[0], T = S[1];
3013
- if (k in c || T in c) {
3014
- c.x = c[k], c.y = c[T];
2904
+ if (c = x.func(d) ? d(a.x, a.y, e) : d) {
2905
+ for (var f = 0, b = n.targetFields; f < b.length; f++) {
2906
+ var S = b[f], k = S[0], R = S[1];
2907
+ if (k in c || R in c) {
2908
+ c.x = c[k], c.y = c[R];
3015
2909
  break;
3016
2910
  }
3017
2911
  }
3018
2912
  n.options.targets.push(c);
3019
2913
  }
3020
2914
  }
3021
- var I = Nt.set(t);
3022
- return n.options = o, I;
3023
- }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = _e(pt, "snapSize"), zt = { aspectRatio: Ar, restrictEdges: Pr, restrict: Ir, restrictRect: Dr, restrictSize: Lr, snapEdges: _e({ start: function(t) {
2915
+ var O = Lt.set(t);
2916
+ return n.options = o, O;
2917
+ }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = _e(ht, "snapSize"), Ft = { aspectRatio: Ar, restrictEdges: Pr, restrict: Ir, restrictRect: Dr, restrictSize: Lr, snapEdges: _e({ start: function(t) {
3024
2918
  var e = t.edges;
3025
- return e ? (t.state.targetFields = t.state.targetFields || [[e.left ? "left" : "right", e.top ? "top" : "bottom"]], pt.start(t)) : null;
3026
- }, set: pt.set, defaults: P(De(pt.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Fr, snapSize: jr, spring: ut, avoid: ut, transform: ut, rubberband: ut }, Hr = { id: "modifiers", install: function(t) {
2919
+ return e ? (t.state.targetFields = t.state.targetFields || [[e.left ? "left" : "right", e.top ? "top" : "bottom"]], ht.start(t)) : null;
2920
+ }, set: ht.set, defaults: D(Ne(ht.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Fr, snapSize: jr, spring: pt, avoid: pt, transform: pt, rubberband: pt }, Hr = { id: "modifiers", install: function(t) {
3027
2921
  var e = t.interactStatic;
3028
- for (var n in t.usePlugin(un), t.usePlugin(Tr), e.modifiers = zt, zt) {
3029
- var r = zt[n], o = r._defaults, i = r._methods;
2922
+ for (var n in t.usePlugin(dn), t.usePlugin(Tr), e.modifiers = Ft, Ft) {
2923
+ var r = Ft[n], o = r._defaults, i = r._methods;
3030
2924
  o._methods = i, t.defaults.perAction[n] = o;
3031
2925
  }
3032
- } }, Br = Hr, Rn = (function(t) {
3033
- _(n, t);
2926
+ } }, Br = Hr, An = (function(t) {
2927
+ M(n, t);
3034
2928
  var e = A(n);
3035
2929
  function n(r, o, i, a, s, l) {
3036
2930
  var d;
3037
- if (g(this, n), tt(U(d = e.call(this, s)), i), i !== o && tt(U(d), o), d.timeStamp = l, d.originalEvent = i, d.type = r, d.pointerId = je(o), d.pointerType = $t(o), d.target = a, d.currentTarget = null, r === "tap") {
2931
+ if (g(this, n), rt(P(d = e.call(this, s)), i), i !== o && rt(P(d), o), d.timeStamp = l, d.originalEvent = i, d.type = r, d.pointerId = je(o), d.pointerType = Vt(o), d.target = a, d.currentTarget = null, r === "tap") {
3038
2932
  var c = s.getPointerIndex(o);
3039
2933
  d.dt = d.timeStamp - s.pointers[c].downTime;
3040
2934
  var f = d.timeStamp - s.tapTime;
@@ -3042,7 +2936,7 @@ function Vo() {
3042
2936
  } else r === "doubletap" && (d.dt = o.timeStamp - s.tapTime, d.double = !0);
3043
2937
  return d;
3044
2938
  }
3045
- return x(n, [{ key: "_subtractOrigin", value: function(r) {
2939
+ return y(n, [{ key: "_subtractOrigin", value: function(r) {
3046
2940
  var o = r.x, i = r.y;
3047
2941
  return this.pageX -= o, this.pageY -= i, this.clientX -= o, this.clientY -= i, this;
3048
2942
  } }, { key: "_addOrigin", value: function(r) {
@@ -3051,8 +2945,8 @@ function Vo() {
3051
2945
  } }, { key: "preventDefault", value: function() {
3052
2946
  this.originalEvent.preventDefault();
3053
2947
  } }]), n;
3054
- })(ot), Ve = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(t) {
3055
- t.pointerEvents = Ve, t.defaults.actions.pointerEvents = Ve.defaults, P(t.actions.phaselessTypes, Ve.types);
2948
+ })(at), Ve = { id: "pointer-events/base", before: ["inertia", "modifiers", "auto-start", "actions"], install: function(t) {
2949
+ t.pointerEvents = Ve, t.defaults.actions.pointerEvents = Ve.defaults, D(t.actions.phaselessTypes, Ve.types);
3056
2950
  }, listeners: { "interactions:new": function(t) {
3057
2951
  var e = t.interaction;
3058
2952
  e.prevTap = null, e.tapTime = 0;
@@ -3061,17 +2955,17 @@ function Vo() {
3061
2955
  !e && n.hold || (n.hold = { duration: 1 / 0, timeout: null });
3062
2956
  }, "interactions:move": function(t, e) {
3063
2957
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget;
3064
- t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && Lt(t), Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "move" }, e));
2958
+ t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && jt(t), Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "move" }, e));
3065
2959
  }, "interactions:down": function(t, e) {
3066
2960
  (function(n, r) {
3067
- for (var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget, l = n.pointerIndex, d = o.pointers[l].hold, c = ue(s), f = { interaction: o, pointer: i, event: a, eventTarget: s, type: "hold", targets: [], path: c, node: null }, y = 0; y < c.length; y++) {
3068
- var S = c[y];
2961
+ for (var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget, l = n.pointerIndex, d = o.pointers[l].hold, c = ue(s), f = { interaction: o, pointer: i, event: a, eventTarget: s, type: "hold", targets: [], path: c, node: null }, b = 0; b < c.length; b++) {
2962
+ var S = c[b];
3069
2963
  f.node = S, r.fire("pointerEvents:collect-targets", f);
3070
2964
  }
3071
2965
  if (f.targets.length) {
3072
- for (var k = 1 / 0, T = 0, I = f.targets; T < I.length; T++) {
3073
- var R = I[T].eventable.options.holdDuration;
3074
- R < k && (k = R);
2966
+ for (var k = 1 / 0, R = 0, O = f.targets; R < O.length; R++) {
2967
+ var I = O[R].eventable.options.holdDuration;
2968
+ I < k && (k = I);
3075
2969
  }
3076
2970
  d.duration = k, d.timeout = setTimeout((function() {
3077
2971
  Re({ interaction: o, eventTarget: s, pointer: i, event: a, type: "hold" }, r);
@@ -3079,46 +2973,46 @@ function Vo() {
3079
2973
  }
3080
2974
  })(t, e), Re(t, e);
3081
2975
  }, "interactions:up": function(t, e) {
3082
- Lt(t), Re(t, e), (function(n, r) {
2976
+ jt(t), Re(t, e), (function(n, r) {
3083
2977
  var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget;
3084
2978
  o.pointerWasMoved || Re({ interaction: o, eventTarget: s, pointer: i, event: a, type: "tap" }, r);
3085
2979
  })(t, e);
3086
2980
  }, "interactions:cancel": function(t, e) {
3087
- Lt(t), Re(t, e);
3088
- } }, PointerEvent: Rn, fire: Re, collectEventTargets: An, defaults: { holdDuration: 600, ignoreFrom: null, allowFrom: null, origin: { x: 0, y: 0 } }, types: { down: !0, move: !0, up: !0, cancel: !0, tap: !0, doubletap: !0, hold: !0 } };
2981
+ jt(t), Re(t, e);
2982
+ } }, PointerEvent: An, fire: Re, collectEventTargets: In, defaults: { holdDuration: 600, ignoreFrom: null, allowFrom: null, origin: { x: 0, y: 0 } }, types: { down: !0, move: !0, up: !0, cancel: !0, tap: !0, doubletap: !0, hold: !0 } };
3089
2983
  function Re(t, e) {
3090
- var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = t.targets, l = s === void 0 ? An(t, e) : s, d = new Rn(a, r, o, i, n, e.now());
2984
+ var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = t.targets, l = s === void 0 ? In(t, e) : s, d = new An(a, r, o, i, n, e.now());
3091
2985
  e.fire("pointerEvents:new", { pointerEvent: d });
3092
2986
  for (var c = { interaction: n, pointer: r, event: o, eventTarget: i, targets: l, type: a, pointerEvent: d }, f = 0; f < l.length; f++) {
3093
- var y = l[f];
3094
- for (var S in y.props || {}) d[S] = y.props[S];
3095
- var k = Le(y.eventable, y.node);
3096
- if (d._subtractOrigin(k), d.eventable = y.eventable, d.currentTarget = y.node, y.eventable.fire(d), d._addOrigin(k), d.immediatePropagationStopped || d.propagationStopped && f + 1 < l.length && l[f + 1].node !== d.currentTarget) break;
2987
+ var b = l[f];
2988
+ for (var S in b.props || {}) d[S] = b.props[S];
2989
+ var k = Le(b.eventable, b.node);
2990
+ if (d._subtractOrigin(k), d.eventable = b.eventable, d.currentTarget = b.node, b.eventable.fire(d), d._addOrigin(k), d.immediatePropagationStopped || d.propagationStopped && f + 1 < l.length && l[f + 1].node !== d.currentTarget) break;
3097
2991
  }
3098
2992
  if (e.fire("pointerEvents:fired", c), a === "tap") {
3099
- var T = d.double ? Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
3100
- n.prevTap = T, n.tapTime = T.timeStamp;
2993
+ var R = d.double ? Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
2994
+ n.prevTap = R, n.tapTime = R.timeStamp;
3101
2995
  }
3102
2996
  return d;
3103
2997
  }
3104
- function An(t, e) {
2998
+ function In(t, e) {
3105
2999
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = n.getPointerIndex(r), l = n.pointers[s];
3106
3000
  if (a === "tap" && (n.pointerWasMoved || !l || l.downTarget !== i)) return [];
3107
3001
  for (var d = ue(i), c = { interaction: n, pointer: r, event: o, eventTarget: i, type: a, path: d, targets: [], node: null }, f = 0; f < d.length; f++) {
3108
- var y = d[f];
3109
- c.node = y, e.fire("pointerEvents:collect-targets", c);
3002
+ var b = d[f];
3003
+ c.node = b, e.fire("pointerEvents:collect-targets", c);
3110
3004
  }
3111
3005
  return a === "hold" && (c.targets = c.targets.filter((function(S) {
3112
- var k, T;
3113
- return S.eventable.options.holdDuration === ((k = n.pointers[s]) == null || (T = k.hold) == null ? void 0 : T.duration);
3006
+ var k, R;
3007
+ return S.eventable.options.holdDuration === ((k = n.pointers[s]) == null || (R = k.hold) == null ? void 0 : R.duration);
3114
3008
  }))), c.targets;
3115
3009
  }
3116
- function Lt(t) {
3010
+ function jt(t) {
3117
3011
  var e = t.interaction, n = t.pointerIndex, r = e.pointers[n].hold;
3118
3012
  r && r.timeout && (clearTimeout(r.timeout), r.timeout = null);
3119
3013
  }
3120
- var qr = Object.freeze({ __proto__: null, default: Ve });
3121
- function Wr(t) {
3014
+ var Wr = Object.freeze({ __proto__: null, default: Ve });
3015
+ function qr(t) {
3122
3016
  var e = t.interaction;
3123
3017
  e.holdIntervalHandle && (clearInterval(e.holdIntervalHandle), e.holdIntervalHandle = null);
3124
3018
  }
@@ -3127,7 +3021,7 @@ function Vo() {
3127
3021
  var e = t.pointerEvents;
3128
3022
  e.defaults.holdRepeatInterval = 0, e.types.holdrepeat = t.actions.phaselessTypes.holdrepeat = !0;
3129
3023
  }, listeners: ["move", "up", "cancel", "endall"].reduce((function(t, e) {
3130
- return t["pointerEvents:".concat(e)] = Wr, t;
3024
+ return t["pointerEvents:".concat(e)] = qr, t;
3131
3025
  }), { "pointerEvents:new": function(t) {
3132
3026
  var e = t.pointerEvent;
3133
3027
  e.type === "hold" && (e.count = (e.count || 0) + 1);
@@ -3142,7 +3036,7 @@ function Vo() {
3142
3036
  } }) }, $r = Yr, Vr = { id: "pointer-events/interactableTargets", install: function(t) {
3143
3037
  var e = t.Interactable;
3144
3038
  e.prototype.pointerEvents = function(r) {
3145
- return P(this.events.options, r), this;
3039
+ return D(this.events.options, r), this;
3146
3040
  };
3147
3041
  var n = e.prototype._backCompatOption;
3148
3042
  e.prototype._backCompatOption = function(r, o) {
@@ -3162,25 +3056,25 @@ function Vo() {
3162
3056
  };
3163
3057
  }, "interactable:set": function(t, e) {
3164
3058
  var n = t.interactable, r = t.options;
3165
- P(n.events.options, e.pointerEvents.defaults), P(n.events.options, r.pointerEvents || {});
3059
+ D(n.events.options, e.pointerEvents.defaults), D(n.events.options, r.pointerEvents || {});
3166
3060
  } } }, Ur = Vr, Xr = { id: "pointer-events", install: function(t) {
3167
- t.usePlugin(qr), t.usePlugin($r), t.usePlugin(Ur);
3061
+ t.usePlugin(Wr), t.usePlugin($r), t.usePlugin(Ur);
3168
3062
  } }, Gr = Xr, Kr = { id: "reflow", install: function(t) {
3169
3063
  var e = t.Interactable;
3170
3064
  t.actions.phases.reflow = !0, e.prototype.reflow = function(n) {
3171
3065
  return (function(r, o, i) {
3172
3066
  for (var a = r.getAllElements(), s = i.window.Promise, l = s ? [] : null, d = function() {
3173
- var f = a[c], y = r.getRect(f);
3174
- if (!y) return 1;
3175
- var S, k = Be(i.interactions.list, (function(R) {
3176
- return R.interacting() && R.interactable === r && R.element === f && R.prepared.name === o.name;
3067
+ var f = a[c], b = r.getRect(f);
3068
+ if (!b) return 1;
3069
+ var S, k = Be(i.interactions.list, (function(I) {
3070
+ return I.interacting() && I.interactable === r && I.element === f && I.prepared.name === o.name;
3177
3071
  }));
3178
- if (k) k.move(), l && (S = k._reflowPromise || new s((function(R) {
3179
- k._reflowResolve = R;
3072
+ if (k) k.move(), l && (S = k._reflowPromise || new s((function(I) {
3073
+ k._reflowResolve = I;
3180
3074
  })));
3181
3075
  else {
3182
- var T = vt(y), I = /* @__PURE__ */ (function(R) {
3183
- return { coords: R, get page() {
3076
+ var R = gt(b), O = /* @__PURE__ */ (function(I) {
3077
+ return { coords: I, get page() {
3184
3078
  return this.coords.page;
3185
3079
  }, get client() {
3186
3080
  return this.coords.client;
@@ -3206,15 +3100,15 @@ function Vo() {
3206
3100
  return this.coords.buttons;
3207
3101
  }, preventDefault: function() {
3208
3102
  } };
3209
- })({ page: { x: T.x, y: T.y }, client: { x: T.x, y: T.y }, timeStamp: i.now() });
3210
- S = (function(R, O, W, K, L) {
3211
- var V = R.interactions.new({ pointerType: "reflow" }), me = { interaction: V, event: L, pointer: L, eventTarget: W, phase: "reflow" };
3212
- V.interactable = O, V.element = W, V.prevEvent = L, V.updatePointer(L, L, W, !0), Bt(V.coords.delta), St(V.prepared, K), V._doPhase(me);
3213
- var ae = R.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3214
- V._reflowResolve = Se;
3103
+ })({ page: { x: R.x, y: R.y }, client: { x: R.x, y: R.y }, timeStamp: i.now() });
3104
+ S = (function(I, z, U, ee, B) {
3105
+ var K = I.interactions.new({ pointerType: "reflow" }), me = { interaction: K, event: B, pointer: B, eventTarget: U, phase: "reflow" };
3106
+ K.interactable = z, K.element = U, K.prevEvent = B, K.updatePointer(B, B, U, !0), Wt(K.coords.delta), _t(K.prepared, ee), K._doPhase(me);
3107
+ var ae = I.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3108
+ K._reflowResolve = Se;
3215
3109
  })) : void 0;
3216
- return V._reflowPromise = be, V.start(K, O, W), V._interacting ? (V.move(me), V.end(L)) : (V.stop(), V._reflowResolve()), V.removePointer(L, L), be;
3217
- })(i, r, f, o, I);
3110
+ return K._reflowPromise = be, K.start(ee, z, U), K._interacting ? (K.move(me), K.end(B)) : (K.stop(), K._reflowResolve()), K.removePointer(B, B), be;
3111
+ })(i, r, f, o, O);
3218
3112
  }
3219
3113
  l && l.push(S);
3220
3114
  }, c = 0; c < a.length && !d(); c++) ;
@@ -3229,16 +3123,211 @@ function Vo() {
3229
3123
  r.splice(r.indexOf(o), 1);
3230
3124
  })(e.interactions.list, n));
3231
3125
  } } }, Jr = Kr;
3232
- if (ve.use(cn), ve.use(vn), ve.use(Gr), ve.use(hr), ve.use(Br), ve.use(nr), ve.use($n), ve.use(Un), ve.use(Jr), ve.default = ve, m(v) === "object" && v) try {
3126
+ if (ve.use(un), ve.use(mn), ve.use(Gr), ve.use(hr), ve.use(Br), ve.use(nr), ve.use($n), ve.use(Un), ve.use(Jr), ve.default = ve, m(v) === "object" && v) try {
3233
3127
  v.exports = ve;
3234
3128
  } catch {
3235
3129
  }
3236
3130
  return ve.default = ve, ve;
3237
3131
  }));
3238
- })(Ke, Ke.exports)), Ke.exports;
3132
+ })(Je, Je.exports)), Je.exports;
3133
+ }
3134
+ var Vo = /* @__PURE__ */ $o();
3135
+ const Ze = /* @__PURE__ */ qo(Vo);
3136
+ function Uo(v) {
3137
+ const p = new DOMParser().parseFromString(v, "text/html");
3138
+ return Array.from(p.querySelectorAll("img")).forEach((m) => {
3139
+ if (!p.body.contains(m) || m.closest(".editor-image-wrapper")) return;
3140
+ const w = m.getAttribute("src") || m.src;
3141
+ if (!w) return;
3142
+ const y = document.createElement("img");
3143
+ y.src = w, m.alt && (y.alt = m.alt), m.title && (y.title = m.title), y.style.maxWidth = "100%", y.style.width = "100%", y.style.height = "auto", y.style.cursor = "pointer", y.draggable = !1;
3144
+ const _ = m.getAttribute("width") || m.style.width || (m.naturalWidth > 0 ? `${m.naturalWidth}px` : null), M = document.createElement("div");
3145
+ M.className = "editor-image-wrapper", M.style.display = "inline-block", M.style.position = "relative", M.style.maxWidth = "100%", M.style.width = _ && _ !== "0px" ? _.includes("px") ? _ : `${_}px` : "300px", M.style.height = "auto", M.contentEditable = "false", M.style.boxSizing = "border-box", M.style.touchAction = "none", M.style.userSelect = "none", M.appendChild(y);
3146
+ const C = document.createElement("div");
3147
+ C.className = "editor-image-container", C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block", C.appendChild(M);
3148
+ let T = m;
3149
+ const P = m.closest("figure"), A = m.closest("picture");
3150
+ if (P && p.body.contains(P))
3151
+ T = P;
3152
+ else if (A && p.body.contains(A))
3153
+ T = A;
3154
+ else {
3155
+ let j = m.parentNode;
3156
+ for (; j && j !== p.body && j.parentNode !== p.body && Array.from(j.childNodes).filter(
3157
+ (N) => N.nodeType === Node.ELEMENT_NODE || N.nodeType === Node.TEXT_NODE && N.textContent?.trim()
3158
+ ).length === 1; )
3159
+ T = j, j = j.parentNode;
3160
+ }
3161
+ T && T.parentNode && p.body.contains(T) ? T.parentNode.replaceChild(C, T) : m.parentNode && p.body.contains(m) && m.parentNode.replaceChild(C, m);
3162
+ }), p.body.innerHTML;
3163
+ }
3164
+ function Xo(v, h) {
3165
+ const p = document.createElement("div");
3166
+ p.classList.add("editor"), p.contentEditable = "true", p.style.color = "#000000", p.style.border = "1px solid #e1e1e1", p.style.height = "400px", p.style.overflowY = "auto", p.style.padding = "15px", p.style.fontFamily = "Arial, sans-serif", p.style.fontSize = "14px", p.style.lineHeight = "1.5", p.style.outline = "none", p.style.backgroundColor = "#ffffff", p.style.borderRadius = "4px", p.style.boxShadow = "inset 0 1px 3px rgba(0,0,0,0.1)", p.style.direction = "ltr", p.style.textAlign = "left", p.style.scrollbarWidth = "none", p.style.msOverflowStyle = "none";
3167
+ const u = document.createElement("style");
3168
+ u.textContent = `
3169
+ .editor::-webkit-scrollbar { display: none; }
3170
+ .editor ul, .editor ol {
3171
+ margin: 0.5em 0;
3172
+ padding-left: 2em;
3173
+ list-style-position: outside;
3174
+ }
3175
+ .editor ul { list-style-type: disc; }
3176
+ .editor ol { list-style-type: decimal; }
3177
+ .editor li {
3178
+ margin: 0.25em 0;
3179
+ display: list-item;
3180
+ }
3181
+ `, document.querySelector("style[data-editor-scrollbar]") || (u.setAttribute("data-editor-scrollbar", "true"), document.head.appendChild(u)), p.innerHTML = "", p.addEventListener("dragover", (w) => {
3182
+ w.preventDefault(), w.stopPropagation();
3183
+ }), p.addEventListener("drop", (w) => {
3184
+ w.preventDefault(), w.stopPropagation();
3185
+ const y = w.clientX, _ = w.clientY;
3186
+ let M = null;
3187
+ if (document.caretRangeFromPoint)
3188
+ M = document.caretRangeFromPoint(y, _);
3189
+ else if (document.caretPositionFromPoint) {
3190
+ const T = document.caretPositionFromPoint(y, _);
3191
+ T && (M = document.createRange(), M.setStart(T.offsetNode, T.offset));
3192
+ }
3193
+ const C = w.dataTransfer?.files;
3194
+ if (C && C.length > 0)
3195
+ for (let T = 0; T < C.length; T++) {
3196
+ const P = C[T];
3197
+ if (P.type.startsWith("image/")) {
3198
+ const A = new FileReader();
3199
+ A.onload = (j) => {
3200
+ const F = document.createElement("img");
3201
+ F.src = j.target?.result, F.style.maxWidth = "100%", F.style.width = "100%", F.style.height = "auto", F.style.cursor = "pointer", F.draggable = !1;
3202
+ const N = document.createElement("div");
3203
+ N.className = "editor-image-wrapper", N.style.display = "inline-block", N.style.position = "relative", N.style.maxWidth = "100%", N.style.width = "auto", N.style.height = "auto", N.contentEditable = "false", N.style.userSelect = "none", N.style.boxSizing = "border-box", N.style.touchAction = "none", N.appendChild(F);
3204
+ const $ = document.createElement("div");
3205
+ if ($.className = "editor-image-container", $.style.margin = "10px 0", $.style.textAlign = "left", $.style.display = "block", $.appendChild(N), M)
3206
+ try {
3207
+ M.insertNode($);
3208
+ const L = window.getSelection();
3209
+ if (L) {
3210
+ L.removeAllRanges();
3211
+ const V = document.createRange();
3212
+ V.setStartAfter($), V.collapse(!0), L.addRange(V), de(V);
3213
+ }
3214
+ } catch {
3215
+ p.appendChild($);
3216
+ }
3217
+ else
3218
+ p.appendChild($);
3219
+ p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
3220
+ }, A.readAsDataURL(P);
3221
+ }
3222
+ }
3223
+ }), p.addEventListener("paste", async (w) => {
3224
+ w.preventDefault();
3225
+ const y = w.clipboardData;
3226
+ if (!y) return;
3227
+ const M = Array.from(y.items).filter((P) => P.type.startsWith("image/"));
3228
+ if (M.length > 0) {
3229
+ for (const P of M) {
3230
+ const A = P.getAsFile();
3231
+ if (A) {
3232
+ const j = new FileReader();
3233
+ j.onload = (F) => {
3234
+ const N = F.target?.result;
3235
+ if (N) {
3236
+ const $ = document.createElement("img");
3237
+ $.src = N, $.style.maxWidth = "100%", $.style.width = "100%", $.style.height = "auto", $.style.cursor = "pointer", $.draggable = !1;
3238
+ const L = document.createElement("div");
3239
+ L.className = "editor-image-wrapper", L.style.display = "inline-block", L.style.position = "relative", L.style.maxWidth = "100%", L.style.width = "auto", L.style.height = "auto", L.contentEditable = "false", L.style.boxSizing = "border-box", L.style.touchAction = "none", L.style.userSelect = "none", L.appendChild($);
3240
+ const V = document.createElement("div");
3241
+ V.className = "editor-image-container", V.style.margin = "10px 0", V.style.textAlign = "left", V.style.display = "block", V.appendChild(L);
3242
+ const Z = window.getSelection();
3243
+ if (Z && Z.rangeCount > 0) {
3244
+ Z.getRangeAt(0).insertNode(V), Z.removeAllRanges();
3245
+ const te = document.createRange();
3246
+ te.setStartAfter(V), te.collapse(!0), Z.addRange(te);
3247
+ } else
3248
+ p.appendChild(V);
3249
+ p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3250
+ }
3251
+ }, j.readAsDataURL(A);
3252
+ }
3253
+ }
3254
+ return;
3255
+ }
3256
+ let C = y.getData("text/html");
3257
+ C ? C = Uo(C) : C = y.getData("text/plain");
3258
+ const T = window.getSelection();
3259
+ if (T && T.rangeCount > 0) {
3260
+ const P = T.getRangeAt(0), A = document.createElement("div");
3261
+ A.innerHTML = C;
3262
+ const j = document.createDocumentFragment();
3263
+ for (; A.firstChild; )
3264
+ j.appendChild(A.firstChild);
3265
+ P.deleteContents(), P.insertNode(j), P.collapse(!1), T.removeAllRanges(), T.addRange(P);
3266
+ } else {
3267
+ const P = document.createElement("div");
3268
+ for (P.innerHTML = C; P.firstChild; )
3269
+ p.appendChild(P.firstChild);
3270
+ }
3271
+ p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3272
+ }), p.addEventListener("click", (w) => {
3273
+ const y = w.target;
3274
+ let _ = null;
3275
+ if (y.tagName === "IMG" ? _ = y.parentElement : y.classList.contains("editor-image-wrapper") && (_ = y), _ && _.classList.contains("editor-image-wrapper")) {
3276
+ w.preventDefault(), w.stopPropagation(), p.querySelectorAll(".editor-image-wrapper").forEach((T) => {
3277
+ if (T !== _ && T.classList.contains("resizable")) {
3278
+ const P = T, A = P.getBoundingClientRect(), j = Math.round(A.width) + "px", F = Math.round(A.height) + "px";
3279
+ Ze(P).unset(), P.classList.remove("resizable"), P.style.border = "none", P.style.transform = "", P.dataset.x = "", P.dataset.y = "", P.style.width = j, P.style.height = F, P.contentEditable = "false";
3280
+ const N = P.querySelector("img");
3281
+ N && (N.style.width = "100%", N.style.height = "100%");
3282
+ }
3283
+ }), h(_);
3284
+ const C = _.parentElement;
3285
+ C && (C.classList.contains("editor-image-container") || C.tagName === "DIV" || C.tagName === "P") && (window.__selectedImageContainer = C, console.log("Selected image container:", C));
3286
+ } else
3287
+ window.__selectedImageContainer = null, p.querySelectorAll(
3288
+ ".editor-image-wrapper.resizable"
3289
+ ).forEach((C) => {
3290
+ const T = C, P = T.getBoundingClientRect(), A = Math.round(P.width) + "px", j = Math.round(P.height) + "px";
3291
+ Ze(T).unset(), T.classList.remove("resizable"), T.style.border = "none", T.style.transform = "", T.dataset.x = "", T.dataset.y = "", T.style.width = A, T.style.height = j, T.contentEditable = "false";
3292
+ const F = T.querySelector("img");
3293
+ F && (F.style.width = "100%", F.style.height = "100%");
3294
+ }), de();
3295
+ }), p.addEventListener("keyup", () => de()), p.addEventListener("mouseup", () => de()), p.addEventListener("focus", () => de()), window.addEventListener("selectionchange", () => {
3296
+ try {
3297
+ const w = window.getSelection();
3298
+ if (!w || !w.anchorNode) return;
3299
+ let y = w.anchorNode;
3300
+ for (; y && y.nodeType !== Node.ELEMENT_NODE; )
3301
+ y = y.parentNode;
3302
+ if (!y) return;
3303
+ p.contains(y) && de();
3304
+ } catch {
3305
+ }
3306
+ });
3307
+ const m = () => {
3308
+ if (!p.firstChild) {
3309
+ p.innerHTML = "<p><br></p>";
3310
+ return;
3311
+ }
3312
+ const w = Array.from(p.childNodes);
3313
+ for (const y of w)
3314
+ if (y.nodeType === Node.TEXT_NODE && y.textContent?.trim()) {
3315
+ const _ = window.getSelection();
3316
+ let M = null;
3317
+ _ && _.rangeCount > 0 && (M = _.getRangeAt(0).cloneRange());
3318
+ const C = document.createElement("p");
3319
+ if (y.parentNode?.insertBefore(C, y), C.appendChild(y), M && _)
3320
+ try {
3321
+ _.removeAllRanges(), _.addRange(M);
3322
+ } catch {
3323
+ }
3324
+ }
3325
+ };
3326
+ let g = null;
3327
+ return p.addEventListener("input", () => {
3328
+ g && clearTimeout(g), g = setTimeout(() => m(), 100);
3329
+ }), !p.innerHTML || p.innerHTML.trim() === "" ? p.innerHTML = "<p><br></p>" : m(), p;
3239
3330
  }
3240
- var Uo = /* @__PURE__ */ Vo();
3241
- const jt = /* @__PURE__ */ Yo(Uo);
3242
3331
  function On(v) {
3243
3332
  const h = document.createElement("input");
3244
3333
  h.type = "file", h.accept = "image/*", h.onchange = (p) => {
@@ -3246,43 +3335,43 @@ function On(v) {
3246
3335
  if (u) {
3247
3336
  const m = new FileReader();
3248
3337
  m.onload = (g) => {
3249
- const E = document.createElement("img");
3250
- E.src = g.target?.result, E.style.maxWidth = "100%", E.style.width = "100%", E.style.height = "auto", E.style.cursor = "pointer", E.draggable = !1;
3251
- const x = document.createElement("div");
3252
- x.className = "editor-image-wrapper", x.style.display = "inline-block", x.style.position = "relative", x.style.maxWidth = "100%", x.style.width = "auto", x.style.height = "auto", x.contentEditable = "false", x.style.boxSizing = "border-box", x.style.touchAction = "none", x.style.userSelect = "none", x.appendChild(E);
3253
- const C = document.createElement("div");
3254
- C.contentEditable = "true", C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block", C.appendChild(x);
3338
+ const w = document.createElement("img");
3339
+ w.src = g.target?.result, w.style.maxWidth = "100%", w.style.width = "100%", w.style.height = "auto", w.style.cursor = "pointer", w.draggable = !1;
3340
+ const y = document.createElement("div");
3341
+ y.className = "editor-image-wrapper", y.style.display = "inline-block", y.style.position = "relative", y.style.maxWidth = "100%", y.style.width = "auto", y.style.height = "auto", y.contentEditable = "false", y.style.boxSizing = "border-box", y.style.touchAction = "none", y.style.userSelect = "none", y.appendChild(w);
3342
+ const _ = document.createElement("div");
3343
+ _.className = "editor-image-container", _.style.margin = "10px 0", _.style.textAlign = "left", _.style.display = "block", _.appendChild(y);
3255
3344
  try {
3256
- Ne();
3257
- const _ = window.getSelection();
3258
- if (_ && _.rangeCount > 0) {
3259
- _.getRangeAt(0).insertNode(C), _.removeAllRanges();
3260
- const D = document.createRange();
3261
- D.setStartAfter(C), D.collapse(!0), _.addRange(D), pe(D);
3345
+ Ae();
3346
+ const M = window.getSelection();
3347
+ if (M && M.rangeCount > 0) {
3348
+ M.getRangeAt(0).insertNode(_), M.removeAllRanges();
3349
+ const T = document.createRange();
3350
+ T.setStartAfter(_), T.collapse(!0), M.addRange(T), de(T);
3262
3351
  } else
3263
- v.appendChild(C), v.focus(), pe();
3352
+ v.appendChild(_), v.focus(), de();
3264
3353
  } catch {
3265
- v.appendChild(C), v.focus(), pe();
3354
+ v.appendChild(_), v.focus(), de();
3266
3355
  }
3267
3356
  v.dispatchEvent(new Event("input", { bubbles: !0 })), v.focus();
3268
3357
  }, m.readAsDataURL(u);
3269
3358
  }
3270
3359
  }, h.click();
3271
3360
  }
3272
- function Xo(v) {
3361
+ function Go(v) {
3273
3362
  let h = null;
3274
3363
  if (v.tagName === "IMG" ? h = v.parentElement : h = v, !h) return;
3275
3364
  const p = h.querySelector("img");
3276
3365
  if (p)
3277
3366
  if (h.classList.contains("resizable")) {
3278
3367
  const u = h.getBoundingClientRect(), m = Math.round(u.width) + "px", g = Math.round(u.height) + "px";
3279
- jt(h).unset(), h.classList.remove("resizable"), h.style.border = "none", h.style.transform = "", h.dataset.x = "", h.dataset.y = "", h.style.width = m, h.style.height = g, h.contentEditable = "false", p && (p.style.width = "100%", p.style.height = "100%");
3280
- const E = h.closest(".editor");
3281
- E && E.dispatchEvent(new Event("input", { bubbles: !0 }));
3368
+ Ze(h).unset(), h.classList.remove("resizable"), h.style.border = "none", h.style.transform = "", h.dataset.x = "", h.dataset.y = "", h.style.width = m, h.style.height = g, h.contentEditable = "false", p && (p.style.width = "100%", p.style.height = "100%");
3369
+ const w = h.closest(".editor");
3370
+ w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3282
3371
  } else {
3283
3372
  h.classList.add("resizable"), h.style.border = "2px dashed #007bff", h.style.position = "relative", h.style.userSelect = "none";
3284
3373
  const u = h.getBoundingClientRect();
3285
- h.style.width = u.width + "px", h.style.height = u.height + "px", p && (p.style.width = "100%", p.style.height = "100%"), jt(h).resizable({
3374
+ h.style.width = u.width + "px", h.style.height = u.height + "px", p && (p.style.width = "100%", p.style.height = "100%"), Ze(h).resizable({
3286
3375
  edges: { left: !0, right: !0, bottom: !0, top: !0 },
3287
3376
  listeners: {
3288
3377
  move: (m) => {
@@ -3291,34 +3380,34 @@ function Xo(v) {
3291
3380
  width: `${m.rect.width}px`,
3292
3381
  height: `${m.rect.height}px`
3293
3382
  });
3294
- const E = g.closest(".editor");
3295
- E && E.dispatchEvent(new Event("input", { bubbles: !0 }));
3383
+ const w = g.closest(".editor");
3384
+ w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3296
3385
  },
3297
3386
  end: (m) => {
3298
- const E = m.target.closest(".editor");
3299
- E && E.dispatchEvent(new Event("input", { bubbles: !0 }));
3387
+ const w = m.target.closest(".editor");
3388
+ w && w.dispatchEvent(new Event("input", { bubbles: !0 }));
3300
3389
  }
3301
3390
  },
3302
3391
  modifiers: [
3303
- jt.modifiers.restrictSize({ min: { width: 50, height: 50 } })
3392
+ Ze.modifiers.restrictSize({ min: { width: 50, height: 50 } })
3304
3393
  ],
3305
3394
  inertia: !0
3306
3395
  });
3307
3396
  }
3308
3397
  }
3309
- class Go {
3398
+ class Ko {
3310
3399
  container;
3311
3400
  toolbar;
3312
3401
  editor;
3313
3402
  constructor() {
3314
- this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Wo(
3403
+ this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Xo(
3315
3404
  () => On(this.editor),
3316
- (p) => Xo(p)
3317
- ), this.toolbar = Bo(this.container);
3405
+ (p) => Go(p)
3406
+ ), this.toolbar = Wo(this.container);
3318
3407
  const h = this.toolbar.querySelector(
3319
3408
  '[role="button"][title="Insert Image"]'
3320
3409
  );
3321
- h && (h.addEventListener("mousedown", () => pe()), h.onclick = () => On(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3410
+ h && (h.addEventListener("mousedown", () => de()), h.onclick = () => On(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3322
3411
  }
3323
3412
  getElement() {
3324
3413
  return this.container;
@@ -3335,318 +3424,323 @@ class Go {
3335
3424
  return;
3336
3425
  const u = p.parentElement;
3337
3426
  if (u && u.classList.contains("editor-image-wrapper")) {
3338
- const D = p;
3339
- D.style.maxWidth = "100%", D.style.width = "100%", D.style.height = "auto", D.style.cursor = "pointer", D.draggable = !1, u.contentEditable = "false", u.style.display || (u.style.display = "inline-block"), u.style.position || (u.style.position = "relative"), u.style.maxWidth = "100%", u.style.boxSizing = "border-box", u.style.touchAction = "none", u.style.userSelect = "none", (!u.style.width || u.style.width === "0px") && (u.style.width = "300px");
3427
+ const T = p;
3428
+ T.style.maxWidth = "100%", T.style.width = "100%", T.style.height = "auto", T.style.cursor = "pointer", T.draggable = !1, u.contentEditable = "false", u.style.display || (u.style.display = "inline-block"), u.style.position || (u.style.position = "relative"), u.style.maxWidth = "100%", u.style.boxSizing = "border-box", u.style.touchAction = "none", u.style.userSelect = "none", (!u.style.width || u.style.width === "0px") && (u.style.width = "300px");
3340
3429
  return;
3341
3430
  }
3342
3431
  const m = document.createElement("div");
3343
3432
  m.className = "editor-image-wrapper", m.style.display = "inline-block", m.style.position = "relative", m.style.maxWidth = "100%", m.style.width = "300px", m.contentEditable = "false", m.style.userSelect = "none", m.style.boxSizing = "border-box", m.style.touchAction = "none";
3344
3433
  const g = p;
3345
3434
  g.style.maxWidth = "100%", g.style.width = "100%", g.style.height = "auto", g.style.cursor = "pointer", g.draggable = !1;
3346
- const E = (D) => {
3347
- if (!D) return null;
3348
- const U = String(D).match(/(\d+(?:\.\d+)?)/);
3349
- if (!U) return null;
3350
- const A = Math.round(Number(U[1]));
3435
+ const w = (T) => {
3436
+ if (!T) return null;
3437
+ const P = String(T).match(/(\d+(?:\.\d+)?)/);
3438
+ if (!P) return null;
3439
+ const A = Math.round(Number(P[1]));
3351
3440
  return Number.isFinite(A) && A > 0 ? A : null;
3352
- }, x = E(g.getAttribute("width")) ?? E(g.style.width) ?? E(g.getAttribute("style"));
3353
- x ? m.style.width = `${x}px` : g.onload = () => {
3354
- const D = this.editor.clientWidth || 0, U = g.naturalWidth || 0;
3355
- if (U > 0) {
3356
- const A = D > 0 ? Math.min(U, D) : U;
3441
+ }, y = w(g.getAttribute("width")) ?? w(g.style.width) ?? w(g.getAttribute("style"));
3442
+ y ? m.style.width = `${y}px` : g.onload = () => {
3443
+ const T = this.editor.clientWidth || 0, P = g.naturalWidth || 0;
3444
+ if (P > 0) {
3445
+ const A = T > 0 ? Math.min(P, T) : P;
3357
3446
  m.style.width = `${A}px`;
3358
3447
  }
3359
3448
  };
3360
- const C = document.createElement("p");
3361
- C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block";
3362
- const _ = g.closest("figure") ?? g.closest(".se-image-container") ?? g, M = _.parentNode;
3363
- M && this.editor.contains(_) && M.contains(_) && (m.appendChild(g), C.appendChild(m), M.replaceChild(C, _));
3449
+ const _ = document.createElement("div");
3450
+ _.className = "editor-image-container", _.style.margin = "10px 0", _.style.textAlign = "left", _.style.display = "block";
3451
+ const M = g.closest("figure") ?? g.closest(".se-image-container") ?? g, C = M.parentNode;
3452
+ C && this.editor.contains(M) && C.contains(M) && (m.appendChild(g), _.appendChild(m), C.replaceChild(_, M));
3364
3453
  }), this.editor.dispatchEvent(new Event("input", { bubbles: !0 }));
3365
3454
  }
3366
3455
  }
3367
- var ht = { exports: {} }, Xe = {};
3456
+ var mt = { exports: {} }, Ge = {};
3368
3457
  var Dn;
3369
- function Ko() {
3370
- if (Dn) return Xe;
3458
+ function Jo() {
3459
+ if (Dn) return Ge;
3371
3460
  Dn = 1;
3372
3461
  var v = Symbol.for("react.transitional.element"), h = Symbol.for("react.fragment");
3373
3462
  function p(u, m, g) {
3374
- var E = null;
3375
- if (g !== void 0 && (E = "" + g), m.key !== void 0 && (E = "" + m.key), "key" in m) {
3463
+ var w = null;
3464
+ if (g !== void 0 && (w = "" + g), m.key !== void 0 && (w = "" + m.key), "key" in m) {
3376
3465
  g = {};
3377
- for (var x in m)
3378
- x !== "key" && (g[x] = m[x]);
3466
+ for (var y in m)
3467
+ y !== "key" && (g[y] = m[y]);
3379
3468
  } else g = m;
3380
3469
  return m = g.ref, {
3381
3470
  $$typeof: v,
3382
3471
  type: u,
3383
- key: E,
3472
+ key: w,
3384
3473
  ref: m !== void 0 ? m : null,
3385
3474
  props: g
3386
3475
  };
3387
3476
  }
3388
- return Xe.Fragment = h, Xe.jsx = p, Xe.jsxs = p, Xe;
3477
+ return Ge.Fragment = h, Ge.jsx = p, Ge.jsxs = p, Ge;
3389
3478
  }
3390
- var Ge = {};
3479
+ var Ke = {};
3391
3480
  var Nn;
3392
- function Jo() {
3481
+ function Qo() {
3393
3482
  return Nn || (Nn = 1, process.env.NODE_ENV !== "production" && (function() {
3394
- function v(w) {
3395
- if (w == null) return null;
3396
- if (typeof w == "function")
3397
- return w.$$typeof === ce ? null : w.displayName || w.name || null;
3398
- if (typeof w == "string") return w;
3399
- switch (w) {
3400
- case q:
3483
+ function v(E) {
3484
+ if (E == null) return null;
3485
+ if (typeof E == "function")
3486
+ return E.$$typeof === ce ? null : E.displayName || E.name || null;
3487
+ if (typeof E == "string") return E;
3488
+ switch (E) {
3489
+ case N:
3401
3490
  return "Fragment";
3402
- case J:
3491
+ case L:
3403
3492
  return "Profiler";
3404
- case Q:
3493
+ case $:
3405
3494
  return "StrictMode";
3406
- case ne:
3495
+ case te:
3407
3496
  return "Suspense";
3408
- case b:
3497
+ case x:
3409
3498
  return "SuspenseList";
3410
3499
  case le:
3411
3500
  return "Activity";
3412
3501
  }
3413
- if (typeof w == "object")
3414
- switch (typeof w.tag == "number" && console.error(
3502
+ if (typeof E == "object")
3503
+ switch (typeof E.tag == "number" && console.error(
3415
3504
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
3416
- ), w.$$typeof) {
3417
- case B:
3505
+ ), E.$$typeof) {
3506
+ case F:
3418
3507
  return "Portal";
3419
- case te:
3420
- return w.displayName || "Context";
3421
- case re:
3422
- return (w._context.displayName || "Context") + ".Consumer";
3423
- case ie:
3424
- var z = w.render;
3425
- return w = w.displayName, w || (w = z.displayName || z.name || "", w = w !== "" ? "ForwardRef(" + w + ")" : "ForwardRef"), w;
3426
3508
  case Z:
3427
- return z = w.displayName || null, z !== null ? z : v(w.type) || "Memo";
3428
- case F:
3429
- z = w._payload, w = w._init;
3509
+ return E.displayName || "Context";
3510
+ case V:
3511
+ return (E._context.displayName || "Context") + ".Consumer";
3512
+ case ie:
3513
+ var H = E.render;
3514
+ return E = E.displayName, E || (E = H.displayName || H.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3515
+ case ne:
3516
+ return H = E.displayName || null, H !== null ? H : v(E.type) || "Memo";
3517
+ case W:
3518
+ H = E._payload, E = E._init;
3430
3519
  try {
3431
- return v(w(z));
3520
+ return v(E(H));
3432
3521
  } catch {
3433
3522
  }
3434
3523
  }
3435
3524
  return null;
3436
3525
  }
3437
- function h(w) {
3438
- return "" + w;
3526
+ function h(E) {
3527
+ return "" + E;
3439
3528
  }
3440
- function p(w) {
3529
+ function p(E) {
3441
3530
  try {
3442
- h(w);
3443
- var z = !1;
3531
+ h(E);
3532
+ var H = !1;
3444
3533
  } catch {
3445
- z = !0;
3534
+ H = !0;
3446
3535
  }
3447
- if (z) {
3448
- z = console;
3449
- var j = z.error, $ = typeof Symbol == "function" && Symbol.toStringTag && w[Symbol.toStringTag] || w.constructor.name || "Object";
3450
- return j.call(
3451
- z,
3536
+ if (H) {
3537
+ H = console;
3538
+ var q = H.error, G = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
3539
+ return q.call(
3540
+ H,
3452
3541
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
3453
- $
3454
- ), h(w);
3542
+ G
3543
+ ), h(E);
3455
3544
  }
3456
3545
  }
3457
- function u(w) {
3458
- if (w === q) return "<>";
3459
- if (typeof w == "object" && w !== null && w.$$typeof === F)
3546
+ function u(E) {
3547
+ if (E === N) return "<>";
3548
+ if (typeof E == "object" && E !== null && E.$$typeof === W)
3460
3549
  return "<...>";
3461
3550
  try {
3462
- var z = v(w);
3463
- return z ? "<" + z + ">" : "<...>";
3551
+ var H = v(E);
3552
+ return H ? "<" + H + ">" : "<...>";
3464
3553
  } catch {
3465
3554
  return "<...>";
3466
3555
  }
3467
3556
  }
3468
3557
  function m() {
3469
- var w = X.A;
3470
- return w === null ? null : w.getOwner();
3558
+ var E = J.A;
3559
+ return E === null ? null : E.getOwner();
3471
3560
  }
3472
3561
  function g() {
3473
3562
  return Error("react-stack-top-frame");
3474
3563
  }
3475
- function E(w) {
3476
- if (G.call(w, "key")) {
3477
- var z = Object.getOwnPropertyDescriptor(w, "key").get;
3478
- if (z && z.isReactWarning) return !1;
3564
+ function w(E) {
3565
+ if (Q.call(E, "key")) {
3566
+ var H = Object.getOwnPropertyDescriptor(E, "key").get;
3567
+ if (H && H.isReactWarning) return !1;
3479
3568
  }
3480
- return w.key !== void 0;
3569
+ return E.key !== void 0;
3481
3570
  }
3482
- function x(w, z) {
3483
- function j() {
3484
- ee || (ee = !0, console.error(
3571
+ function y(E, H) {
3572
+ function q() {
3573
+ re || (re = !0, console.error(
3485
3574
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
3486
- z
3575
+ H
3487
3576
  ));
3488
3577
  }
3489
- j.isReactWarning = !0, Object.defineProperty(w, "key", {
3490
- get: j,
3578
+ q.isReactWarning = !0, Object.defineProperty(E, "key", {
3579
+ get: q,
3491
3580
  configurable: !0
3492
3581
  });
3493
3582
  }
3494
- function C() {
3495
- var w = v(this.type);
3496
- return se[w] || (se[w] = !0, console.error(
3583
+ function _() {
3584
+ var E = v(this.type);
3585
+ return se[E] || (se[E] = !0, console.error(
3497
3586
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
3498
- )), w = this.props.ref, w !== void 0 ? w : null;
3587
+ )), E = this.props.ref, E !== void 0 ? E : null;
3499
3588
  }
3500
- function _(w, z, j, $, xe, we) {
3501
- var ue = j.ref;
3502
- return w = {
3503
- $$typeof: N,
3504
- type: w,
3505
- key: z,
3506
- props: j,
3507
- _owner: $
3508
- }, (ue !== void 0 ? ue : null) !== null ? Object.defineProperty(w, "ref", {
3589
+ function M(E, H, q, G, xe, we) {
3590
+ var ue = q.ref;
3591
+ return E = {
3592
+ $$typeof: j,
3593
+ type: E,
3594
+ key: H,
3595
+ props: q,
3596
+ _owner: G
3597
+ }, (ue !== void 0 ? ue : null) !== null ? Object.defineProperty(E, "ref", {
3509
3598
  enumerable: !1,
3510
- get: C
3511
- }) : Object.defineProperty(w, "ref", { enumerable: !1, value: null }), w._store = {}, Object.defineProperty(w._store, "validated", {
3599
+ get: _
3600
+ }) : Object.defineProperty(E, "ref", { enumerable: !1, value: null }), E._store = {}, Object.defineProperty(E._store, "validated", {
3512
3601
  configurable: !1,
3513
3602
  enumerable: !1,
3514
3603
  writable: !0,
3515
3604
  value: 0
3516
- }), Object.defineProperty(w, "_debugInfo", {
3605
+ }), Object.defineProperty(E, "_debugInfo", {
3517
3606
  configurable: !1,
3518
3607
  enumerable: !1,
3519
3608
  writable: !0,
3520
3609
  value: null
3521
- }), Object.defineProperty(w, "_debugStack", {
3610
+ }), Object.defineProperty(E, "_debugStack", {
3522
3611
  configurable: !1,
3523
3612
  enumerable: !1,
3524
3613
  writable: !0,
3525
3614
  value: xe
3526
- }), Object.defineProperty(w, "_debugTask", {
3615
+ }), Object.defineProperty(E, "_debugTask", {
3527
3616
  configurable: !1,
3528
3617
  enumerable: !1,
3529
3618
  writable: !0,
3530
3619
  value: we
3531
- }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
3620
+ }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
3532
3621
  }
3533
- function M(w, z, j, $, xe, we) {
3534
- var ue = z.children;
3622
+ function C(E, H, q, G, xe, we) {
3623
+ var ue = H.children;
3535
3624
  if (ue !== void 0)
3536
- if ($)
3537
- if (Y(ue)) {
3538
- for ($ = 0; $ < ue.length; $++)
3539
- D(ue[$]);
3625
+ if (G)
3626
+ if (X(ue)) {
3627
+ for (G = 0; G < ue.length; G++)
3628
+ T(ue[G]);
3540
3629
  Object.freeze && Object.freeze(ue);
3541
3630
  } else
3542
3631
  console.error(
3543
3632
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
3544
3633
  );
3545
- else D(ue);
3546
- if (G.call(z, "key")) {
3547
- ue = v(w);
3548
- var Ee = Object.keys(z).filter(function(Qe) {
3549
- return Qe !== "key";
3634
+ else T(ue);
3635
+ if (Q.call(H, "key")) {
3636
+ ue = v(E);
3637
+ var Ee = Object.keys(H).filter(function(et) {
3638
+ return et !== "key";
3550
3639
  });
3551
- $ = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + $] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
3640
+ G = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + G] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
3552
3641
  `A props object containing a "key" prop is being spread into JSX:
3553
3642
  let props = %s;
3554
3643
  <%s {...props} />
3555
3644
  React keys must be passed directly to JSX without using spread:
3556
3645
  let props = %s;
3557
3646
  <%s key={someKey} {...props} />`,
3558
- $,
3647
+ G,
3559
3648
  ue,
3560
3649
  Ee,
3561
3650
  ue
3562
- ), he[ue + $] = !0);
3563
- }
3564
- if (ue = null, j !== void 0 && (p(j), ue = "" + j), E(z) && (p(z.key), ue = "" + z.key), "key" in z) {
3565
- j = {};
3566
- for (var P in z)
3567
- P !== "key" && (j[P] = z[P]);
3568
- } else j = z;
3569
- return ue && x(
3570
- j,
3571
- typeof w == "function" ? w.displayName || w.name || "Unknown" : w
3572
- ), _(
3573
- w,
3651
+ ), he[ue + G] = !0);
3652
+ }
3653
+ if (ue = null, q !== void 0 && (p(q), ue = "" + q), w(H) && (p(H.key), ue = "" + H.key), "key" in H) {
3654
+ q = {};
3655
+ for (var D in H)
3656
+ D !== "key" && (q[D] = H[D]);
3657
+ } else q = H;
3658
+ return ue && y(
3659
+ q,
3660
+ typeof E == "function" ? E.displayName || E.name || "Unknown" : E
3661
+ ), M(
3662
+ E,
3574
3663
  ue,
3575
- j,
3664
+ q,
3576
3665
  m(),
3577
3666
  xe,
3578
3667
  we
3579
3668
  );
3580
3669
  }
3581
- function D(w) {
3582
- U(w) ? w._store && (w._store.validated = 1) : typeof w == "object" && w !== null && w.$$typeof === F && (w._payload.status === "fulfilled" ? U(w._payload.value) && w._payload.value._store && (w._payload.value._store.validated = 1) : w._store && (w._store.validated = 1));
3670
+ function T(E) {
3671
+ P(E) ? E._store && (E._store.validated = 1) : typeof E == "object" && E !== null && E.$$typeof === W && (E._payload.status === "fulfilled" ? P(E._payload.value) && E._payload.value._store && (E._payload.value._store.validated = 1) : E._store && (E._store.validated = 1));
3583
3672
  }
3584
- function U(w) {
3585
- return typeof w == "object" && w !== null && w.$$typeof === N;
3673
+ function P(E) {
3674
+ return typeof E == "object" && E !== null && E.$$typeof === j;
3586
3675
  }
3587
- var A = Qr, N = Symbol.for("react.transitional.element"), B = Symbol.for("react.portal"), q = Symbol.for("react.fragment"), Q = Symbol.for("react.strict_mode"), J = Symbol.for("react.profiler"), re = Symbol.for("react.consumer"), te = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), ne = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), X = A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, Y = Array.isArray, oe = console.createTask ? console.createTask : function() {
3676
+ var A = Qr, j = Symbol.for("react.transitional.element"), F = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), te = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), J = A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, X = Array.isArray, oe = console.createTask ? console.createTask : function() {
3588
3677
  return null;
3589
3678
  };
3590
3679
  A = {
3591
- react_stack_bottom_frame: function(w) {
3592
- return w();
3680
+ react_stack_bottom_frame: function(E) {
3681
+ return E();
3593
3682
  }
3594
3683
  };
3595
- var ee, se = {}, de = A.react_stack_bottom_frame.bind(
3684
+ var re, se = {}, pe = A.react_stack_bottom_frame.bind(
3596
3685
  A,
3597
3686
  g
3598
3687
  )(), fe = oe(u(g)), he = {};
3599
- Ge.Fragment = q, Ge.jsx = function(w, z, j) {
3600
- var $ = 1e4 > X.recentlyCreatedOwnerStacks++;
3601
- return M(
3602
- w,
3603
- z,
3604
- j,
3688
+ Ke.Fragment = N, Ke.jsx = function(E, H, q) {
3689
+ var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3690
+ return C(
3691
+ E,
3692
+ H,
3693
+ q,
3605
3694
  !1,
3606
- $ ? Error("react-stack-top-frame") : de,
3607
- $ ? oe(u(w)) : fe
3695
+ G ? Error("react-stack-top-frame") : pe,
3696
+ G ? oe(u(E)) : fe
3608
3697
  );
3609
- }, Ge.jsxs = function(w, z, j) {
3610
- var $ = 1e4 > X.recentlyCreatedOwnerStacks++;
3611
- return M(
3612
- w,
3613
- z,
3614
- j,
3698
+ }, Ke.jsxs = function(E, H, q) {
3699
+ var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3700
+ return C(
3701
+ E,
3702
+ H,
3703
+ q,
3615
3704
  !0,
3616
- $ ? Error("react-stack-top-frame") : de,
3617
- $ ? oe(u(w)) : fe
3705
+ G ? Error("react-stack-top-frame") : pe,
3706
+ G ? oe(u(E)) : fe
3618
3707
  );
3619
3708
  };
3620
- })()), Ge;
3709
+ })()), Ke;
3621
3710
  }
3622
3711
  var zn;
3623
- function Qo() {
3624
- return zn || (zn = 1, process.env.NODE_ENV === "production" ? ht.exports = Ko() : ht.exports = Jo()), ht.exports;
3712
+ function Zo() {
3713
+ return zn || (zn = 1, process.env.NODE_ENV === "production" ? mt.exports = Jo() : mt.exports = Qo()), mt.exports;
3625
3714
  }
3626
- var Zo = Qo();
3627
- const ti = Zr(({ onChange: v, initialValue: h }, p) => {
3628
- const u = Ft(null), m = Ft(null), g = Ft(h);
3629
- return eo(p, () => ({
3630
- setHTML: (E) => {
3631
- u.current && u.current.setHTML(E);
3715
+ var ei = Zo();
3716
+ const ni = Zr(({ onChange: v, initialValue: h }, p) => {
3717
+ const u = Xe(null), m = Xe(null), g = Xe(h), w = Xe(v), y = Xe(!1);
3718
+ return Ht(() => {
3719
+ w.current = v;
3720
+ }, [v]), eo(p, () => ({
3721
+ setHTML: (_) => {
3722
+ u.current && u.current.setHTML(_);
3632
3723
  },
3633
3724
  getHTML: () => u.current?.getHTML() || ""
3634
- })), In(() => {
3725
+ })), Ht(() => {
3635
3726
  if (m.current && !u.current) {
3636
- u.current = new Go(), m.current.appendChild(u.current.getElement()), h && u.current.setHTML(h);
3637
- const E = u.current.getElement(), x = E.querySelector(
3727
+ u.current = new Ko(), m.current.appendChild(u.current.getElement()), h && (u.current.setHTML(h), g.current = h), y.current = !0;
3728
+ const _ = u.current.getElement(), M = _.querySelector(
3638
3729
  ".editor"
3639
3730
  ), C = () => {
3640
- const _ = u.current?.getHTML() || "";
3641
- v?.(_);
3731
+ const T = u.current?.getHTML() || "";
3732
+ w.current?.(T);
3642
3733
  };
3643
- x ? (x.addEventListener("input", C), x.addEventListener("keyup", C), x.addEventListener("paste", C)) : (E.addEventListener("input", C), E.addEventListener("keyup", C), E.addEventListener("paste", C));
3734
+ M ? (M.addEventListener("input", C), M.addEventListener("paste", C)) : (_.addEventListener("input", C), _.addEventListener("paste", C));
3735
+ }
3736
+ }, []), Ht(() => {
3737
+ if (y.current && u.current && h !== void 0 && h !== g.current) {
3738
+ const _ = u.current.getHTML();
3739
+ h !== _ && (u.current.setHTML(h), g.current = h);
3644
3740
  }
3645
- }, [v]), In(() => {
3646
- u.current && h !== void 0 && h !== g.current && (u.current.setHTML(h), g.current = h);
3647
- }, [h]), /* @__PURE__ */ Zo.jsx("div", { ref: m });
3741
+ }, [h]), /* @__PURE__ */ ei.jsx("div", { ref: m });
3648
3742
  });
3649
3743
  export {
3650
- Go as RichTextEditor,
3651
- ti as RichTextEditorComponent
3744
+ Ko as RichTextEditor,
3745
+ ni as RichTextEditorComponent
3652
3746
  };