mind-elixir 5.12.2-beta.1 → 5.12.2-beta.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.
@@ -67,10 +67,10 @@ const oe = function(e, t) {
67
67
  return null;
68
68
  } else
69
69
  return null;
70
- }, B = (e, t) => {
70
+ }, R = (e, t) => {
71
71
  if (e.parent = t, e.children)
72
72
  for (let n = 0; n < e.children.length; n++)
73
- B(e.children[n], e);
73
+ R(e.children[n], e);
74
74
  }, F = (e, t, n) => {
75
75
  if (e.expanded = t, e.children)
76
76
  if (n === void 0 || n > 0) {
@@ -84,7 +84,7 @@ const oe = function(e, t) {
84
84
  });
85
85
  };
86
86
  function pe(e) {
87
- if (e.id = R(), e.children)
87
+ if (e.id = B(), e.children)
88
88
  for (let t = 0; t < e.children.length; t++)
89
89
  pe(e.children[t]);
90
90
  }
@@ -97,11 +97,11 @@ function se(e, t, n, o) {
97
97
  y2: o + Math.sin(h) * r
98
98
  };
99
99
  }
100
- function R() {
100
+ function B() {
101
101
  return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substring(2)).substring(2, 18);
102
102
  }
103
- const pt = function() {
104
- const e = R();
103
+ const mt = function() {
104
+ const e = B();
105
105
  return {
106
106
  topic: this.newTopicName,
107
107
  id: e
@@ -148,7 +148,7 @@ const M = (e, t) => {
148
148
  }, De = (e, t) => {
149
149
  const n = e.x - t.x, o = e.y - t.y;
150
150
  return Math.sqrt(n * n + o * o);
151
- }, gt = function(e, t) {
151
+ }, yt = function(e, t) {
152
152
  if (!t)
153
153
  return re(e), e;
154
154
  let n = e.querySelector(".insert-preview");
@@ -165,11 +165,11 @@ const M = (e, t) => {
165
165
  if (!(e && e.tagName === "ME-TPC" && e !== n && !o && e.nodeObj.parent)) return !1;
166
166
  }
167
167
  return !0;
168
- }, mt = function(e) {
168
+ }, bt = function(e) {
169
169
  const t = document.createElement("div");
170
170
  return t.className = "mind-elixir-ghost", e.container.appendChild(t), t;
171
171
  };
172
- class yt {
172
+ class vt {
173
173
  mind;
174
174
  isMoving = !1;
175
175
  interval = null;
@@ -186,19 +186,19 @@ class yt {
186
186
  this.isMoving = !1, this.interval && (clearInterval(this.interval), this.interval = null);
187
187
  }
188
188
  }
189
- function bt(e) {
189
+ function wt(e) {
190
190
  return {
191
191
  isDragging: !1,
192
192
  insertType: null,
193
193
  meet: null,
194
- ghost: mt(e),
195
- edgeMoveController: new yt(e),
194
+ ghost: bt(e),
195
+ edgeMoveController: new vt(e),
196
196
  startX: 0,
197
197
  startY: 0,
198
198
  pointerId: null
199
199
  };
200
200
  }
201
- const vt = 5;
201
+ const xt = 5;
202
202
  function Me(e, t, n, o = !1) {
203
203
  if (e.spacePressed) return !1;
204
204
  const s = n.target;
@@ -222,11 +222,11 @@ function Je(e, t) {
222
222
  s.parentElement.parentElement.style.opacity = "0.5";
223
223
  e.panHelper.clear();
224
224
  }
225
- function wt(e, t, n) {
225
+ function Et(e, t, n) {
226
226
  const { dragged: o } = e;
227
227
  if (!o || t.pointerId !== n.pointerId) return;
228
228
  const s = n.clientX - t.startX, i = n.clientY - t.startY, l = Math.sqrt(s * s + i * i);
229
- if (!t.isDragging && l > vt && Je(e, t), !t.isDragging) return;
229
+ if (!t.isDragging && l > xt && Je(e, t), !t.isDragging) return;
230
230
  const c = e.container.getBoundingClientRect();
231
231
  Ue(t.ghost, n.clientX - c.x, n.clientY - c.y), n.clientX < c.x + 50 ? t.edgeMoveController.move(1, 0) : n.clientX > c.x + c.width - 50 ? t.edgeMoveController.move(-1, 0) : n.clientY < c.y + 50 ? t.edgeMoveController.move(0, 1) : n.clientY > c.y + c.height - 50 ? t.edgeMoveController.move(0, -1) : t.edgeMoveController.stop(), re(t.meet);
232
232
  const r = 12 * e.scaleVal, a = document.elementFromPoint(n.clientX, n.clientY - r);
@@ -243,9 +243,9 @@ function wt(e, t, n) {
243
243
  } else
244
244
  t.insertType = null, t.meet = null;
245
245
  }
246
- t.meet && gt(t.meet, t.insertType);
246
+ t.meet && yt(t.meet, t.insertType);
247
247
  }
248
- function xt(e, t, n) {
248
+ function Ct(e, t, n) {
249
249
  const { dragged: o } = e;
250
250
  if (!(!o || t.pointerId !== n.pointerId)) {
251
251
  t.edgeMoveController.stop();
@@ -263,14 +263,14 @@ function Ae(e, t) {
263
263
  t.meet && re(t.meet), t.ghost.style.display = "none", t.ghost.innerHTML = "", e.dragged = null, t.isDragging = !1, t.insertType = null, t.meet = null, t.pointerId = null;
264
264
  }
265
265
  }
266
- function Et(e) {
266
+ function St(e) {
267
267
  return () => {
268
268
  };
269
269
  }
270
270
  const H = {
271
271
  LHS: "lhs",
272
272
  RHS: "rhs"
273
- }, Ct = function() {
273
+ }, Nt = function() {
274
274
  this.nodes.innerHTML = "";
275
275
  const e = this.createTopic(this.nodeData);
276
276
  be.call(this, e, this.nodeData), e.draggable = !1;
@@ -283,8 +283,8 @@ const H = {
283
283
  i.direction === 0 ? o += 1 : i.direction === 1 ? s += 1 : o <= s ? (i.direction = 0, o += 1) : (i.direction = 1, s += 1);
284
284
  });
285
285
  }
286
- St(this, n, t);
287
- }, St = function(e, t, n) {
286
+ Tt(this, n, t);
287
+ }, Tt = function(e, t, n) {
288
288
  const o = document.createElement("me-main");
289
289
  o.className = H.LHS;
290
290
  const s = document.createElement("me-main");
@@ -294,7 +294,7 @@ const H = {
294
294
  e.direction === 2 ? l.direction === 0 ? o.appendChild(c) : s.appendChild(c) : e.direction === 0 ? o.appendChild(c) : s.appendChild(c);
295
295
  }
296
296
  e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines), e.nodes.appendChild(e.labelContainer);
297
- }, Nt = function(e, t) {
297
+ }, kt = function(e, t) {
298
298
  const n = document.createElement("me-children");
299
299
  for (let o = 0; o < t.length; o++) {
300
300
  const s = t[o], { grp: i } = e.createWrapper(s);
@@ -341,23 +341,23 @@ const H = {
341
341
  typeof o == "string" ? s.textContent = o : (s.textContent = o.text, o.className && (s.className = o.className), o.style && Object.assign(s.style, o.style)), n.appendChild(s);
342
342
  }), e.appendChild(n), e.tags = n;
343
343
  } else e.tags && (e.tags = void 0);
344
- }, Tt = function(e, t) {
344
+ }, _t = function(e, t) {
345
345
  const n = document.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
346
346
  if (n.appendChild(o), !t && e.children && e.children.length > 0) {
347
347
  const i = ve(e.expanded);
348
348
  if (o.appendChild(i), e.expanded !== !1) {
349
- const l = Nt(this, e.children);
349
+ const l = kt(this, e.children);
350
350
  n.appendChild(l);
351
351
  }
352
352
  }
353
353
  return { grp: n, top: o, tpc: s };
354
- }, kt = function(e) {
354
+ }, Dt = function(e) {
355
355
  const t = document.createElement("me-parent"), n = this.createTopic(e);
356
356
  return be.call(this, n, e), t.appendChild(n), { p: t, tpc: n };
357
- }, _t = function(e) {
357
+ }, Lt = function(e) {
358
358
  const t = document.createElement("me-children");
359
359
  return t.append(...e), t;
360
- }, Dt = function(e) {
360
+ }, Mt = function(e) {
361
361
  const t = document.createElement("me-tpc");
362
362
  return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t;
363
363
  };
@@ -367,7 +367,7 @@ function Qe(e) {
367
367
  const n = window.getSelection();
368
368
  n && (n.removeAllRanges(), n.addRange(t));
369
369
  }
370
- const Lt = function(e) {
370
+ const At = function(e) {
371
371
  if (!e) return;
372
372
  const t = document.createElement("div"), n = e.nodeObj, o = n.topic, { offsetLeft: s, offsetTop: i } = M(this.nodes, e);
373
373
  this.nodes.appendChild(t), t.id = "input-box", t.textContent = o, t.contentEditable = "plaintext-only", t.spellcheck = !1;
@@ -409,13 +409,13 @@ const Lt = function(e) {
409
409
  const t = e.parent?.children, n = t?.indexOf(e) ?? 0;
410
410
  return { siblings: t, index: n };
411
411
  };
412
- function Mt(e) {
412
+ function Pt(e) {
413
413
  const { siblings: t, index: n } = V(e);
414
414
  if (t === void 0) return;
415
415
  const o = t[n];
416
416
  n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
417
417
  }
418
- function At(e) {
418
+ function Ot(e) {
419
419
  const { siblings: t, index: n } = V(e);
420
420
  if (t === void 0) return;
421
421
  const o = t[n];
@@ -425,15 +425,15 @@ function et(e) {
425
425
  const { siblings: t, index: n } = V(e);
426
426
  return t === void 0 ? 0 : (t.splice(n, 1), t.length);
427
427
  }
428
- function Pt(e, t, n) {
428
+ function Ht(e, t, n) {
429
429
  const { siblings: o, index: s } = V(n);
430
430
  o !== void 0 && (t === "before" ? o.splice(s, 0, e) : o.splice(s + 1, 0, e));
431
431
  }
432
- function Ot(e, t) {
432
+ function $t(e, t) {
433
433
  const { siblings: n, index: o } = V(e);
434
434
  n !== void 0 && (n[o] = t, t.children = [e]);
435
435
  }
436
- function Ht(e, t, n) {
436
+ function jt(e, t, n) {
437
437
  if (et(t), n.parent?.parent || (t.direction = n.direction), e === "in")
438
438
  n.children ? n.children.push(t) : n.children = [t];
439
439
  else {
@@ -443,7 +443,7 @@ function Ht(e, t, n) {
443
443
  e === "before" ? o.splice(s, 0, t) : o.splice(s + 1, 0, t);
444
444
  }
445
445
  }
446
- const $t = function({ map: e, direction: t }, n) {
446
+ const It = function({ map: e, direction: t }, n) {
447
447
  if (t === 0)
448
448
  return 0;
449
449
  if (t === 1)
@@ -462,8 +462,8 @@ const $t = function({ map: e, direction: t }, n) {
462
462
  s.appendChild(ve(!0)), s.insertAdjacentElement("afterend", i);
463
463
  }
464
464
  e.linkDiv(n.offsetParent);
465
- } else s.tagName === "ME-ROOT" && ($t(e, o.nodeObj) === 0 ? e.container.querySelector(".lhs")?.appendChild(n) : e.container.querySelector(".rhs")?.appendChild(n), e.linkDiv());
466
- }, jt = function(e, t) {
465
+ } else s.tagName === "ME-ROOT" && (It(e, o.nodeObj) === 0 ? e.container.querySelector(".lhs")?.appendChild(n) : e.container.querySelector(".rhs")?.appendChild(n), e.linkDiv());
466
+ }, Rt = function(e, t) {
467
467
  const n = e.parentNode;
468
468
  if (t === 0) {
469
469
  const o = n.parentNode.parentNode;
@@ -476,7 +476,7 @@ const $t = function({ map: e, direction: t }, n) {
476
476
  }, q = function(e) {
477
477
  const n = e.parentElement.parentElement.lastElementChild;
478
478
  n?.tagName === "svg" && n?.remove();
479
- }, It = function(e, t) {
479
+ }, Bt = function(e, t) {
480
480
  const n = e.nodeObj, o = ge(n);
481
481
  o.style && t.style && (t.style = Object.assign(o.style, t.style));
482
482
  const s = Object.assign(n, t);
@@ -490,10 +490,10 @@ const $t = function({ map: e, direction: t }, n) {
490
490
  const o = t.nodeObj;
491
491
  o.expanded === !1 && (e.expandNode(t, !0), t = e.findEle(o.id));
492
492
  const s = n || e.generateNewObj();
493
- o.children ? o.children.push(s) : o.children = [s], B(e.nodeData);
493
+ o.children ? o.children.push(s) : o.children = [s], R(e.nodeData);
494
494
  const { grp: i, top: l } = e.createWrapper(s);
495
495
  return tt(e, t, i), { newTop: l, newNodeObj: s };
496
- }, Bt = function(e, t, n) {
496
+ }, Wt = function(e, t, n) {
497
497
  const o = t || this.currentNode;
498
498
  if (!o) return;
499
499
  const s = o.nodeObj;
@@ -514,14 +514,14 @@ const $t = function({ map: e, direction: t }, n) {
514
514
  const a = o.closest("me-main").className === H.LHS ? 0 : 1;
515
515
  i.direction = a;
516
516
  }
517
- Pt(i, e, s), B(this.nodeData);
517
+ Ht(i, e, s), R(this.nodeData);
518
518
  const l = o.parentElement, { grp: c, top: r } = this.createWrapper(i);
519
519
  l.parentElement.insertAdjacentElement(nt[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(r.firstChild), this.bus.fire("operation", {
520
520
  name: "insertSibling",
521
521
  type: e,
522
522
  obj: i
523
523
  }), this.selectNode(r.firstChild, !0);
524
- }, Rt = function(e, t) {
524
+ }, Yt = function(e, t) {
525
525
  const n = e || this.currentNode;
526
526
  if (!n) return;
527
527
  q(n);
@@ -529,7 +529,7 @@ const $t = function({ map: e, direction: t }, n) {
529
529
  if (!o.parent)
530
530
  return;
531
531
  const s = t || this.generateNewObj();
532
- Ot(o, s), B(this.nodeData);
532
+ $t(o, s), R(this.nodeData);
533
533
  const i = n.parentElement.parentElement, { grp: l, top: c } = this.createWrapper(s, !0);
534
534
  c.appendChild(ve(!0)), i.insertAdjacentElement("afterend", l);
535
535
  const r = this.createChildren([i]);
@@ -537,7 +537,7 @@ const $t = function({ map: e, direction: t }, n) {
537
537
  name: "insertParent",
538
538
  obj: s
539
539
  });
540
- }, Wt = function(e, t) {
540
+ }, Xt = function(e, t) {
541
541
  const n = e || this.currentNode;
542
542
  if (!n) return;
543
543
  const o = we(this, n, t);
@@ -547,7 +547,7 @@ const $t = function({ map: e, direction: t }, n) {
547
547
  name: "addChild",
548
548
  obj: i
549
549
  }), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
550
- }, Yt = function(e, t) {
550
+ }, Ft = function(e, t) {
551
551
  const n = ge(e.nodeObj);
552
552
  pe(n);
553
553
  const o = we(this, t, n);
@@ -557,7 +557,7 @@ const $t = function({ map: e, direction: t }, n) {
557
557
  name: "copyNode",
558
558
  obj: s
559
559
  });
560
- }, Xt = function(e, t) {
560
+ }, Vt = function(e, t) {
561
561
  const n = [];
562
562
  for (let o = 0; o < e.length; o++) {
563
563
  const s = e[o], i = ge(s.nodeObj);
@@ -571,31 +571,31 @@ const $t = function({ map: e, direction: t }, n) {
571
571
  name: "copyNodes",
572
572
  objs: n
573
573
  });
574
- }, Ft = function(e) {
574
+ }, Kt = function(e) {
575
575
  const t = e || this.currentNode;
576
576
  if (!t) return;
577
577
  const n = t.nodeObj;
578
- Mt(n);
578
+ Pt(n);
579
579
  const o = t.parentNode.parentNode;
580
580
  o.parentNode.insertBefore(o, o.previousSibling), this.linkDiv(), this.bus.fire("operation", {
581
581
  name: "moveUpNode",
582
582
  obj: n
583
583
  });
584
- }, Vt = function(e) {
584
+ }, zt = function(e) {
585
585
  const t = e || this.currentNode;
586
586
  if (!t) return;
587
587
  const n = t.nodeObj;
588
- At(n);
588
+ Ot(n);
589
589
  const o = t.parentNode.parentNode;
590
590
  o.nextSibling ? o.nextSibling.insertAdjacentElement("afterend", o) : o.parentNode.prepend(o), this.linkDiv(), this.bus.fire("operation", {
591
591
  name: "moveDownNode",
592
592
  obj: n
593
593
  });
594
- }, Kt = function(e) {
594
+ }, Gt = function(e) {
595
595
  if (e = me(e), e.length === 0) return;
596
596
  for (const n of e) {
597
597
  const o = n.nodeObj, s = et(o);
598
- jt(n, s);
598
+ Rt(n, s);
599
599
  }
600
600
  const t = e[e.length - 1];
601
601
  this.selectNode(this.findEle(t.nodeObj.parent.id)), this.linkDiv(), this.bus.fire("operation", {
@@ -609,7 +609,7 @@ const $t = function({ map: e, direction: t }, n) {
609
609
  const i = [];
610
610
  for (const c of e) {
611
611
  const r = c.nodeObj;
612
- if (Ht(t, r, s), B(o.nodeData), t === "in") {
612
+ if (jt(t, r, s), R(o.nodeData), t === "in") {
613
613
  const a = c.parentElement;
614
614
  tt(o, n, a.parentElement);
615
615
  } else {
@@ -627,36 +627,36 @@ const $t = function({ map: e, direction: t }, n) {
627
627
  objs: e.map((c) => c.nodeObj),
628
628
  toObj: s
629
629
  });
630
- }, zt = function(e, t) {
630
+ }, qt = function(e, t) {
631
631
  xe(e, "in", t, this);
632
- }, Gt = function(e, t) {
632
+ }, Ut = function(e, t) {
633
633
  xe(e, "before", t, this);
634
- }, qt = function(e, t) {
634
+ }, Jt = function(e, t) {
635
635
  xe(e, "after", t, this);
636
- }, Ut = function(e) {
636
+ }, Zt = function(e) {
637
637
  const t = e || this.currentNode;
638
638
  t && (t.nodeObj.dangerouslySetInnerHTML || this.editTopic(t));
639
- }, Jt = function(e, t) {
639
+ }, Qt = function(e, t) {
640
640
  e.text.textContent = t, e.nodeObj.topic = t, this.linkDiv();
641
641
  }, ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
642
642
  __proto__: null,
643
- addChild: Wt,
644
- beginEdit: Ut,
645
- copyNode: Yt,
646
- copyNodes: Xt,
647
- insertParent: Rt,
648
- insertSibling: Bt,
649
- moveDownNode: Vt,
650
- moveNodeAfter: qt,
651
- moveNodeBefore: Gt,
652
- moveNodeIn: zt,
653
- moveUpNode: Ft,
654
- removeNodes: Kt,
655
- reshapeNode: It,
643
+ addChild: Xt,
644
+ beginEdit: Zt,
645
+ copyNode: Ft,
646
+ copyNodes: Vt,
647
+ insertParent: Yt,
648
+ insertSibling: Wt,
649
+ moveDownNode: zt,
650
+ moveNodeAfter: Jt,
651
+ moveNodeBefore: Ut,
652
+ moveNodeIn: qt,
653
+ moveUpNode: Kt,
654
+ removeNodes: Gt,
655
+ reshapeNode: Bt,
656
656
  rmSubline: q,
657
- setNodeTopic: Jt
657
+ setNodeTopic: Qt
658
658
  }, Symbol.toStringTag, { value: "Module" }));
659
- function Zt(e) {
659
+ function en(e) {
660
660
  return {
661
661
  nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
662
662
  arrows: e.arrows,
@@ -667,44 +667,44 @@ function Zt(e) {
667
667
  meta: e.meta
668
668
  };
669
669
  }
670
- const Qt = function(e, t = !1) {
670
+ const tn = function(e, t = !1) {
671
671
  const n = this.container, o = e.getBoundingClientRect(), s = n.getBoundingClientRect();
672
672
  if (t || o.top > s.bottom - 50 || o.bottom < s.top + 50 || o.left > s.right - 50 || o.right < s.left + 50) {
673
673
  const l = o.left + o.width / 2, c = o.top + o.height / 2, r = s.left + s.width / 2, a = s.top + s.height / 2, d = l - r, h = c - a;
674
674
  this.move(-d, -h, !0);
675
675
  }
676
- }, en = function(e, t, n) {
676
+ }, nn = function(e, t, n) {
677
677
  this.clearSelection(), this.scrollIntoView(e), this.selection?.select(e), t && this.bus.fire("selectNewNode", e.nodeObj);
678
- }, tn = function(e) {
678
+ }, on = function(e) {
679
679
  this.selection?.select(e);
680
- }, nn = function(e) {
680
+ }, sn = function(e) {
681
681
  this.selection?.deselect(e);
682
- }, on = function() {
682
+ }, rn = function() {
683
683
  this.unselectNodes(this.currentNodes), this.unselectSummary(), this.unselectArrow();
684
684
  }, Ee = function(e) {
685
685
  return JSON.stringify(e, (t, n) => {
686
686
  if (!(t === "parent" && typeof n != "string"))
687
687
  return n;
688
688
  });
689
- }, sn = function() {
690
- const e = Zt(this);
689
+ }, ln = function() {
690
+ const e = en(this);
691
691
  return Ee(e);
692
- }, rn = function() {
692
+ }, cn = function() {
693
693
  return JSON.parse(this.getDataString());
694
- }, ln = function() {
694
+ }, an = function() {
695
695
  this.editable = !0;
696
- }, cn = function() {
696
+ }, dn = function() {
697
697
  this.editable = !1;
698
- }, an = function(e, t = { x: 0, y: 0 }) {
698
+ }, hn = function(e, t = { x: 0, y: 0 }) {
699
699
  if (e < this.scaleMin && e < this.scaleVal || e > this.scaleMax && e > this.scaleVal) return;
700
700
  const n = this.container.getBoundingClientRect(), o = t.x ? t.x - n.left - n.width / 2 : 0, s = t.y ? t.y - n.top - n.height / 2 : 0, { dx: i, dy: l } = Ce(this), c = this.map.style.transform, { x: r, y: a } = ye(c), d = r - i, h = a - l, u = this.scaleVal, b = (-o + d) * (1 - e / u), v = (-s + h) * (1 - e / u);
701
701
  this.map.style.transform = `translate3d(${r - b}px, ${a - v}px, 0) scale(${e})`, this.scaleVal = e, this.bus.fire("scale", e);
702
- }, dn = function() {
702
+ }, fn = function() {
703
703
  const e = this.nodes.offsetHeight / this.container.offsetHeight, t = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(e, t));
704
704
  this.scaleVal = n;
705
705
  const { dx: o, dy: s } = Ce(this, !0);
706
706
  this.map.style.transform = `translate3d(${o}px, ${s}px, 0) scale(${n})`, this.bus.fire("scale", n);
707
- }, hn = function(e, t, n = !1) {
707
+ }, un = function(e, t, n = !1) {
708
708
  const { map: o, scaleVal: s, bus: i, container: l, nodes: c } = this;
709
709
  if (n && o.style.transition === "transform 0.3s")
710
710
  return;
@@ -732,22 +732,22 @@ const Qt = function(e, t = !1) {
732
732
  i = n.offsetWidth / 2 - a - d / 2, l = n.offsetHeight / 2 - r - h / 2, o.style.transformOrigin = `${a + d / 2}px 50%`;
733
733
  }
734
734
  return { dx: i, dy: l };
735
- }, fn = function() {
735
+ }, pn = function() {
736
736
  const { map: e, container: t } = this, { dx: n, dy: o } = Ce(this);
737
737
  t.scrollTop = 0, t.scrollLeft = 0, e.style.transform = `translate3d(${n}px, ${o}px, 0) scale(${this.scaleVal})`;
738
- }, un = function(e) {
738
+ }, gn = function(e) {
739
739
  e(this);
740
- }, pn = function(e) {
740
+ }, mn = function(e) {
741
741
  e.nodeObj.parent && (this.clearSelection(), this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.initRight(), this.toCenter());
742
- }, gn = function() {
742
+ }, yn = function() {
743
743
  this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
744
- }, mn = function() {
744
+ }, bn = function() {
745
745
  this.direction = 0, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
746
- }, yn = function() {
746
+ }, vn = function() {
747
747
  this.direction = 1, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
748
- }, bn = function() {
748
+ }, wn = function() {
749
749
  this.direction = 2, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
750
- }, vn = function(e, t) {
750
+ }, xn = function(e, t) {
751
751
  const n = e.nodeObj;
752
752
  typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
753
753
  const o = e.getBoundingClientRect(), s = {
@@ -767,7 +767,7 @@ const Qt = function(e, t = !1) {
767
767
  y: c.top
768
768
  }, a = s.x - r.x, d = s.y - r.y;
769
769
  this.move(a, d), this.bus.fire("expandNode", n);
770
- }, wn = function(e, t) {
770
+ }, En = function(e, t) {
771
771
  const n = e.nodeObj, o = e.getBoundingClientRect(), s = {
772
772
  x: o.left,
773
773
  y: o.top
@@ -778,50 +778,50 @@ const Qt = function(e, t = !1) {
778
778
  y: i.top
779
779
  }, c = s.x - l.x, r = s.y - l.y;
780
780
  this.move(c, r);
781
- }, xn = function(e) {
782
- this.clearSelection(), e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || [], e.meta && (this.meta = e.meta), e.theme && this.changeTheme(e.theme)), B(this.nodeData), this.layout(), this.linkDiv();
783
- }, En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
781
+ }, Cn = function(e) {
782
+ this.clearSelection(), e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || [], e.meta && (this.meta = e.meta), e.theme && this.changeTheme(e.theme)), R(this.nodeData), this.layout(), this.linkDiv();
783
+ }, Sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
784
784
  __proto__: null,
785
- cancelFocus: gn,
786
- clearSelection: on,
787
- disableEdit: cn,
788
- enableEdit: ln,
789
- expandNode: vn,
790
- expandNodeAll: wn,
791
- focusNode: pn,
792
- getData: rn,
793
- getDataString: sn,
794
- initLeft: mn,
795
- initRight: yn,
796
- initSide: bn,
797
- install: un,
798
- move: hn,
799
- refresh: xn,
800
- scale: an,
801
- scaleFit: dn,
802
- scrollIntoView: Qt,
803
- selectNode: en,
804
- selectNodes: tn,
785
+ cancelFocus: yn,
786
+ clearSelection: rn,
787
+ disableEdit: dn,
788
+ enableEdit: an,
789
+ expandNode: xn,
790
+ expandNodeAll: En,
791
+ focusNode: mn,
792
+ getData: cn,
793
+ getDataString: ln,
794
+ initLeft: bn,
795
+ initRight: vn,
796
+ initSide: wn,
797
+ install: gn,
798
+ move: un,
799
+ refresh: Cn,
800
+ scale: hn,
801
+ scaleFit: fn,
802
+ scrollIntoView: tn,
803
+ selectNode: nn,
804
+ selectNodes: on,
805
805
  stringifyData: Ee,
806
- toCenter: fn,
807
- unselectNodes: nn
808
- }, Symbol.toStringTag, { value: "Module" })), Pe = "MIND-ELIXIR-WAIT-COPY", Cn = 40, Sn = 10, Nn = ({ deltaMode: e, deltaY: t, viewportHeight: n }) => e === WheelEvent.DOM_DELTA_LINE ? t * Cn : e === WheelEvent.DOM_DELTA_PAGE ? t * n : t, Tn = ({ deltaMode: e, deltaY: t, scaleSensitivity: n, viewportHeight: o }) => {
809
- const i = -Nn({ deltaMode: e, deltaY: t, viewportHeight: o }) / Sn * n;
806
+ toCenter: pn,
807
+ unselectNodes: sn
808
+ }, Symbol.toStringTag, { value: "Module" })), Pe = "MIND-ELIXIR-WAIT-COPY", Nn = 40, Tn = 10, kn = ({ deltaMode: e, deltaY: t, viewportHeight: n }) => e === WheelEvent.DOM_DELTA_LINE ? t * Nn : e === WheelEvent.DOM_DELTA_PAGE ? t * n : t, _n = ({ deltaMode: e, deltaY: t, scaleSensitivity: n, viewportHeight: o }) => {
809
+ const i = -kn({ deltaMode: e, deltaY: t, viewportHeight: o }) / Tn * n;
810
810
  return Math.max(-n, Math.min(n, i));
811
811
  }, st = (e, t, n) => {
812
812
  t !== 0 && e.scale(e.scaleVal + t, n);
813
- }, kn = (e, t) => {
813
+ }, Dn = (e, t) => {
814
814
  const n = e.map.querySelectorAll(`.${t}>me-wrapper>me-parent>me-tpc`);
815
815
  n.length !== 0 && e.selectNode(n[Math.ceil(n.length / 2) - 1]);
816
- }, _n = (e) => {
816
+ }, Ln = (e) => {
817
817
  e.selectNode(e.map.querySelector("me-root>me-tpc"));
818
- }, Dn = function(e, t) {
818
+ }, Mn = function(e, t) {
819
819
  const n = t.parentElement.parentElement.parentElement.previousSibling;
820
820
  if (n) {
821
821
  const o = n.firstChild;
822
822
  e.selectNode(o);
823
823
  }
824
- }, Ln = function(e, t) {
824
+ }, An = function(e, t) {
825
825
  const n = t.parentElement.nextSibling;
826
826
  if (n && n.firstChild) {
827
827
  const o = n.firstChild.firstChild.firstChild;
@@ -831,7 +831,7 @@ const Qt = function(e, t = !1) {
831
831
  const n = e.currentNode || e.currentNodes?.[0];
832
832
  if (!n) return;
833
833
  const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
834
- o.parent ? s.className === t ? Ln(e, n) : o.parent?.parent ? Dn(e, n) : _n(e) : kn(e, t);
834
+ o.parent ? s.className === t ? An(e, n) : o.parent?.parent ? Mn(e, n) : Ln(e) : Dn(e, t);
835
835
  }, He = function(e, t) {
836
836
  const n = e.currentNode;
837
837
  if (!n || !n.nodeObj.parent) return;
@@ -840,8 +840,8 @@ const Qt = function(e, t = !1) {
840
840
  }, $e = function(e, t, n) {
841
841
  const o = t === "in" ? e.scaleSensitivity : -e.scaleSensitivity;
842
842
  st(e, o, n);
843
- }, Mn = (e, t) => {
844
- const n = Tn({
843
+ }, Pn = (e, t) => {
844
+ const n = _n({
845
845
  deltaMode: t.deltaMode,
846
846
  deltaY: t.deltaY,
847
847
  scaleSensitivity: e.scaleSensitivity,
@@ -849,7 +849,7 @@ const Qt = function(e, t = !1) {
849
849
  });
850
850
  st(e, n, { x: t.clientX, y: t.clientY });
851
851
  };
852
- function An(e, t) {
852
+ function On(e, t) {
853
853
  t = t === !0 ? {} : t;
854
854
  const n = () => {
855
855
  e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNodes && e.removeNodes(e.currentNodes);
@@ -961,7 +961,7 @@ function An(e, t) {
961
961
  e.pasteHandler && e.pasteHandler(r);
962
962
  });
963
963
  }
964
- function Pn(e) {
964
+ function Hn(e) {
965
965
  const { panHelper: t, container: n } = e;
966
966
  let o = null;
967
967
  e.spacePressed = !1;
@@ -1021,7 +1021,7 @@ function Pn(e) {
1021
1021
  clear() {
1022
1022
  this.activePointers.clear(), this.lastDistance = null;
1023
1023
  }
1024
- }, c = bt(e), r = {
1024
+ }, c = wt(e), r = {
1025
1025
  timer: null,
1026
1026
  startPos: null,
1027
1027
  pointerId: null,
@@ -1103,7 +1103,7 @@ function Pn(e) {
1103
1103
  r.handleMove(f), r.timer === null && (e.ptState = i.Idle);
1104
1104
  break;
1105
1105
  case i.Drag:
1106
- wt(e, c, f);
1106
+ Et(e, c, f);
1107
1107
  break;
1108
1108
  case i.Pan:
1109
1109
  t.handlePointerMove(f);
@@ -1117,7 +1117,7 @@ function Pn(e) {
1117
1117
  r.clear();
1118
1118
  break;
1119
1119
  case i.Drag:
1120
- xt(e, c, f);
1120
+ Ct(e, c, f);
1121
1121
  break;
1122
1122
  case i.Pan:
1123
1123
  t.handlePointerUp(f);
@@ -1133,7 +1133,7 @@ function Pn(e) {
1133
1133
  ne(y) && !y.classList.contains("selected") && e.selectNode(y), e.bus.fire("showContextMenu", f);
1134
1134
  }, 200);
1135
1135
  }, m = (f) => {
1136
- if (f.stopPropagation(), f.preventDefault(), f.ctrlKey || f.metaKey) return Mn(e, f);
1136
+ if (f.stopPropagation(), f.preventDefault(), f.ctrlKey || f.metaKey) return Pn(e, f);
1137
1137
  if (f.shiftKey) return e.move(-f.deltaY, 0);
1138
1138
  e.move(-f.deltaX, -f.deltaY);
1139
1139
  }, w = (f) => {
@@ -1154,7 +1154,7 @@ function Pn(e) {
1154
1154
  { dom: n, evt: "keyup", func: E }
1155
1155
  ]);
1156
1156
  }
1157
- function On() {
1157
+ function $n() {
1158
1158
  return {
1159
1159
  handlers: {},
1160
1160
  addListener: function(e, t) {
@@ -1201,7 +1201,7 @@ const A = "http://www.w3.org/2000/svg", le = function(e) {
1201
1201
  }, je = function() {
1202
1202
  const e = document.createElementNS(A, "line");
1203
1203
  return e.setAttribute("stroke", "#4dc4ff"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e.setAttribute("opacity", "0.45"), e;
1204
- }, Hn = function(e, t, n, o) {
1204
+ }, jn = function(e, t, n, o) {
1205
1205
  const s = document.createElementNS(A, "g");
1206
1206
  return [
1207
1207
  {
@@ -1260,7 +1260,7 @@ const A = "http://www.w3.org/2000/svg", le = function(e) {
1260
1260
  obj: n
1261
1261
  }));
1262
1262
  });
1263
- }, $n = function(e) {
1263
+ }, In = function(e) {
1264
1264
  const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, s = t.offsetWidth, i = t.offsetHeight, l = this.map.querySelectorAll("me-main > me-wrapper");
1265
1265
  this.lines.innerHTML = "";
1266
1266
  for (let c = 0; c < l.length; c++) {
@@ -1285,7 +1285,7 @@ const A = "http://www.w3.org/2000/svg", le = function(e) {
1285
1285
  continue;
1286
1286
  lt(e, t, E, b, s);
1287
1287
  }
1288
- }, jn = {
1288
+ }, Rn = {
1289
1289
  addChild: "Add child",
1290
1290
  addParent: "Add parent",
1291
1291
  addSibling: "Add sibling",
@@ -1299,11 +1299,11 @@ const A = "http://www.w3.org/2000/svg", le = function(e) {
1299
1299
  clickTips: "Please click the target node",
1300
1300
  summary: "Summary"
1301
1301
  };
1302
- function In(e, t) {
1302
+ function Bn(e, t) {
1303
1303
  const n = {
1304
1304
  focus: !0,
1305
1305
  link: !0,
1306
- locale: jn
1306
+ locale: Rn
1307
1307
  };
1308
1308
  t = t === !0 ? n : Object.assign(n, t);
1309
1309
  const o = (y) => {
@@ -1371,7 +1371,7 @@ function In(e, t) {
1371
1371
  l.onclick = null, c.onclick = null, r.onclick = null, a.onclick = null, d.onclick = null, h.onclick = null, u.onclick = null, b.onclick = null, v.onclick = null, g.onclick = null, w.onclick = null, e.container.oncontextmenu = null;
1372
1372
  };
1373
1373
  }
1374
- const Bn = function(e) {
1374
+ const Wn = function(e) {
1375
1375
  return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
1376
1376
  type: "summary",
1377
1377
  value: e.obj.id
@@ -1386,7 +1386,7 @@ const Bn = function(e) {
1386
1386
  value: [e.obj.id]
1387
1387
  };
1388
1388
  };
1389
- function Rn(e) {
1389
+ function Yn(e) {
1390
1390
  let t = [], n = -1, o = e.getData(), s = [];
1391
1391
  e.undo = function() {
1392
1392
  if (n > -1) {
@@ -1419,7 +1419,7 @@ function Rn(e) {
1419
1419
  prev: o,
1420
1420
  operation: r.name,
1421
1421
  currentSelected: s.map((h) => h.id),
1422
- currentTarget: Bn(r),
1422
+ currentTarget: Wn(r),
1423
1423
  next: a
1424
1424
  };
1425
1425
  t.push(d), o = a, n = t.length - 1;
@@ -1432,19 +1432,19 @@ function Rn(e) {
1432
1432
  e.bus.removeListener("operation", i), e.bus.removeListener("selectNodes", c), e.container.removeEventListener("keydown", l);
1433
1433
  };
1434
1434
  }
1435
- const Wn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>', Yn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>', Xn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>', Fn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>', Vn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>', Kn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>', zn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>', Gn = {
1436
- side: Wn,
1437
- left: Yn,
1438
- right: Xn,
1439
- full: Fn,
1440
- living: Vn,
1441
- zoomin: Kn,
1442
- zoomout: zn
1435
+ const Xn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>', Fn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>', Vn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>', Kn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>', zn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>', Gn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>', qn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>', Un = {
1436
+ side: Xn,
1437
+ left: Fn,
1438
+ right: Vn,
1439
+ full: Kn,
1440
+ living: zn,
1441
+ zoomin: Gn,
1442
+ zoomout: qn
1443
1443
  }, I = (e, t) => {
1444
1444
  const n = document.createElement("span");
1445
- return n.id = e, n.innerHTML = Gn[t], n;
1445
+ return n.id = e, n.innerHTML = Un[t], n;
1446
1446
  };
1447
- function qn(e) {
1447
+ function Jn(e) {
1448
1448
  const t = document.createElement("div"), n = I("fullscreen", "full"), o = I("toCenter", "living"), s = I("zoomout", "zoomout"), i = I("zoomin", "zoomin");
1449
1449
  t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb";
1450
1450
  let l = null;
@@ -1472,7 +1472,7 @@ function qn(e) {
1472
1472
  e.scale(e.scaleVal + e.scaleSensitivity);
1473
1473
  }, t;
1474
1474
  }
1475
- function Un(e) {
1475
+ function Zn(e) {
1476
1476
  const t = document.createElement("div"), n = I("tbltl", "left"), o = I("tbltr", "right"), s = I("tblts", "side");
1477
1477
  return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
1478
1478
  e.initLeft();
@@ -1482,10 +1482,10 @@ function Un(e) {
1482
1482
  e.initSide();
1483
1483
  }, t;
1484
1484
  }
1485
- function Jn(e) {
1486
- e.container.append(qn(e)), e.container.append(Un(e));
1485
+ function Qn(e) {
1486
+ e.container.append(Jn(e)), e.container.append(Zn(e));
1487
1487
  }
1488
- class Zn {
1488
+ class eo {
1489
1489
  _listeners = /* @__PURE__ */ new Map();
1490
1490
  addEventListener(t, n) {
1491
1491
  const o = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
@@ -1513,10 +1513,10 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1513
1513
  for (const [o, s] of Object.entries(t))
1514
1514
  s !== void 0 && (e[o] = Ie(s));
1515
1515
  else n !== void 0 && (e[t] = Ie(n));
1516
- }, Be = (e = 0, t = 0, n = 0, o = 0) => {
1516
+ }, Re = (e = 0, t = 0, n = 0, o = 0) => {
1517
1517
  const s = { x: e, y: t, width: n, height: o, top: t, left: e, right: e + n, bottom: t + o };
1518
1518
  return { ...s, toJSON: () => JSON.stringify(s) };
1519
- }, Qn = (e) => {
1519
+ }, to = (e) => {
1520
1520
  let t, n = -1, o = !1;
1521
1521
  return {
1522
1522
  next: (...s) => {
@@ -1528,7 +1528,7 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1528
1528
  cancelAnimationFrame(n), o = !1;
1529
1529
  }
1530
1530
  };
1531
- }, Re = (e, t, n = "touch") => {
1531
+ }, Be = (e, t, n = "touch") => {
1532
1532
  switch (n) {
1533
1533
  case "center": {
1534
1534
  const o = t.left + t.width / 2, s = t.top + t.height / 2;
@@ -1539,7 +1539,7 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1539
1539
  case "touch":
1540
1540
  return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
1541
1541
  }
1542
- }, eo = () => matchMedia("(hover: none), (pointer: coarse)").matches, to = () => "safari" in window, fe = (e) => Array.isArray(e) ? e : [e], ct = (e) => (t, n, o, s = {}) => {
1542
+ }, no = () => matchMedia("(hover: none), (pointer: coarse)").matches, oo = () => "safari" in window, fe = (e) => Array.isArray(e) ? e : [e], ct = (e) => (t, n, o, s = {}) => {
1543
1543
  (t instanceof HTMLCollection || t instanceof NodeList) && (t = Array.from(t)), n = fe(n), t = fe(t);
1544
1544
  for (const i of t)
1545
1545
  if (i)
@@ -1548,7 +1548,7 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1548
1548
  }, W = ct("addEventListener"), O = ct("removeEventListener"), Z = (e) => {
1549
1549
  const { clientX: t, clientY: n, target: o } = e.touches?.[0] ?? e;
1550
1550
  return { x: t, y: n, target: o };
1551
- }, Y = (e, t = document) => fe(e).map((n) => typeof n == "string" ? Array.from(t.querySelectorAll(n)) : n instanceof Element ? n : null).flat().filter(Boolean), no = (e, t) => t.some((n) => typeof n == "number" ? e.button === n : typeof n == "object" ? n.button !== e.button ? !1 : n.modifiers.every((o) => {
1551
+ }, Y = (e, t = document) => fe(e).map((n) => typeof n == "string" ? Array.from(t.querySelectorAll(n)) : n instanceof Element ? n : null).flat().filter(Boolean), so = (e, t) => t.some((n) => typeof n == "number" ? e.button === n : typeof n == "object" ? n.button !== e.button ? !1 : n.modifiers.every((o) => {
1552
1552
  switch (o) {
1553
1553
  case "alt":
1554
1554
  return e.altKey;
@@ -1563,7 +1563,7 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1563
1563
  touched: [],
1564
1564
  changed: { added: [], removed: [] }
1565
1565
  });
1566
- class oo extends Zn {
1566
+ class io extends eo {
1567
1567
  static version = "mind-elixir-fork";
1568
1568
  // Options
1569
1569
  _options;
@@ -1581,7 +1581,7 @@ class oo extends Zn {
1581
1581
  _latestElement;
1582
1582
  // Dynamically constructed area rect
1583
1583
  _areaLocation = { y1: 0, x2: 0, y2: 0, x1: 0 };
1584
- _areaRect = Be();
1584
+ _areaRect = Re();
1585
1585
  // If a single click is being performed, it's a single-click until the user dragged the mouse
1586
1586
  _singleClick = !0;
1587
1587
  _frame;
@@ -1645,7 +1645,7 @@ class oo extends Zn {
1645
1645
  // https://stackoverflow.com/a/38268846
1646
1646
  pointerEvents: "none",
1647
1647
  zIndex: "1"
1648
- }), this._frame = Qn((i) => {
1648
+ }), this._frame = to((i) => {
1649
1649
  this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", i), this._redrawSelectionArea();
1650
1650
  }), this.enable();
1651
1651
  }
@@ -1655,10 +1655,10 @@ class oo extends Zn {
1655
1655
  }
1656
1656
  _onTapStart(t, n = !1) {
1657
1657
  const { x: o, y: s, target: i } = Z(t), { document: l, startAreas: c, boundaries: r, behaviour: a, features: d } = this._options, h = i.getBoundingClientRect();
1658
- if (!no(t, a.triggers))
1658
+ if (!so(t, a.triggers))
1659
1659
  return;
1660
1660
  const u = Y(c, l), b = Y(r, l);
1661
- this._targetElement = b.find((m) => Re(m.getBoundingClientRect(), h));
1661
+ this._targetElement = b.find((m) => Be(m.getBoundingClientRect(), h));
1662
1662
  const v = t.composedPath(), p = u.find((m) => v.includes(m));
1663
1663
  if (this._targetBoundary = b.find((m) => v.includes(m)), !this._targetElement || !p || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
1664
1664
  return;
@@ -1763,7 +1763,7 @@ class oo extends Zn {
1763
1763
  }
1764
1764
  _handleMoveEvent(t) {
1765
1765
  const { features: n } = this._options;
1766
- (n.touch && eo() || this._scrollAvailable && to()) && t.preventDefault();
1766
+ (n.touch && no() || this._scrollAvailable && oo()) && t.preventDefault();
1767
1767
  }
1768
1768
  _onScroll() {
1769
1769
  const {
@@ -1785,7 +1785,7 @@ class oo extends Zn {
1785
1785
  } = s;
1786
1786
  r < i.left + d.x ? (t.x = -j(i.left - r + d.x), r = r < i.left ? i.left : r) : r > i.right - d.x ? (t.x = j(i.left + i.width - r - d.x), r = r > i.right ? i.right : r) : t.x = 0, a < i.top + d.y ? (t.y = -j(i.top - a + d.y), a = a < i.top ? i.top : a) : a > i.bottom - d.y ? (t.y = j(i.top + i.height - a - d.y), a = a > i.bottom ? i.bottom : a) : t.y = 0;
1787
1787
  const h = Ye(l, r), u = Ye(c, a), b = We(l, r), v = We(c, a);
1788
- this._areaRect = Be(h, u, b - h, v - u);
1788
+ this._areaRect = Re(h, u, b - h, v - u);
1789
1789
  }
1790
1790
  _redrawSelectionArea() {
1791
1791
  const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
@@ -1799,7 +1799,7 @@ class oo extends Zn {
1799
1799
  const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: l, touched: c } = o, { intersect: r, overlap: a } = n.behaviour, d = a === "invert", h = [], u = [], b = [];
1800
1800
  for (let p = 0; p < t.length; p++) {
1801
1801
  const g = t[p];
1802
- if (Re(s, g.getBoundingClientRect(), r)) {
1802
+ if (Be(s, g.getBoundingClientRect(), r)) {
1803
1803
  if (l.includes(g))
1804
1804
  i.includes(g) && !c.includes(g) && c.push(g);
1805
1805
  else if (d && i.includes(g)) {
@@ -1951,8 +1951,8 @@ class oo extends Zn {
1951
1951
  this._selection.stored = s.filter((c) => !l.includes(c)), this._selection.selected = o.filter((c) => !l.includes(c)), this._selection.changed.added = [], this._selection.changed.removed.push(...l.filter((c) => !i.removed.includes(c))), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null));
1952
1952
  }
1953
1953
  }
1954
- function so(e) {
1955
- const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new oo({
1954
+ function ro(e) {
1955
+ const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new io({
1956
1956
  selectables: [".map-container me-tpc"],
1957
1957
  boundaries: [e.container],
1958
1958
  container: e.selectionContainer,
@@ -2015,7 +2015,24 @@ function so(e) {
2015
2015
  );
2016
2016
  e.selection = n;
2017
2017
  }
2018
- const io = function(e, t = !0) {
2018
+ function at({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: c, direction: r, containerHeight: a }) {
2019
+ let d = t + n / 2;
2020
+ const h = e + o / 2;
2021
+ let u;
2022
+ r === H.LHS ? u = i + l : u = i;
2023
+ const b = s + c / 2, p = (1 - Math.abs(b - h) / a) * 0.25 * (n / 2);
2024
+ return r === H.LHS ? d = d - n / 10 - p : d = d + n / 10 + p, `M ${d} ${h} Q ${d} ${b} ${u} ${b}`;
2025
+ }
2026
+ function dt({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: c, direction: r, isFirst: a }) {
2027
+ const d = parseInt(this.container.style.getPropertyValue("--node-gap-x"));
2028
+ let h = 0, u = 0;
2029
+ a ? h = e + o / 2 : h = e + o;
2030
+ const b = s + c;
2031
+ let v = 0, p = 0, g = 0;
2032
+ const m = Math.abs(h - b) / 300 * d;
2033
+ return r === H.LHS ? (g = t, v = g + d, p = g - d, u = i + d, `M ${v} ${h} C ${g} ${h} ${g + m} ${b} ${p} ${b} H ${u}`) : (g = t + n, v = g - d, p = g + d, u = i + l - d, `M ${v} ${h} C ${g} ${h} ${g - m} ${b} ${p} ${b} H ${u}`);
2034
+ }
2035
+ const lo = function(e, t = !0) {
2019
2036
  this.theme = {
2020
2037
  ...this.theme || G,
2021
2038
  ...e,
@@ -2023,7 +2040,7 @@ const io = function(e, t = !0) {
2023
2040
  ...this.theme?.cssVar || G.cssVar,
2024
2041
  ...e.cssVar || {}
2025
2042
  }
2026
- }, this.theme.generateMainBranch !== void 0 && (this.generateMainBranch = this.theme.generateMainBranch), this.theme.generateSubBranch !== void 0 && (this.generateSubBranch = this.theme.generateSubBranch);
2043
+ }, this.generateMainBranch = this.theme.generateMainBranch || at, this.generateSubBranch = this.theme.generateSubBranch || dt;
2027
2044
  const o = {
2028
2045
  ...(this.theme.type === "dark" ? ue : G).cssVar,
2029
2046
  ...this.theme.cssVar
@@ -2035,9 +2052,9 @@ const io = function(e, t = !0) {
2035
2052
  this.container.style.setProperty(l, o[l]);
2036
2053
  }
2037
2054
  t && this.refresh();
2038
- }, ro = function(e) {
2055
+ }, co = function(e) {
2039
2056
  this.compact = e, this.theme && this.changeTheme(this.theme);
2040
- }, lo = function(e) {
2057
+ }, ao = function(e) {
2041
2058
  return {
2042
2059
  dom: e,
2043
2060
  moved: !1,
@@ -2073,15 +2090,15 @@ const io = function(e, t = !0) {
2073
2090
  }
2074
2091
  };
2075
2092
  }, Ve = {
2076
- create: lo
2077
- }, at = "#4dc4ff";
2078
- function dt(e, t, n, o, s, i, l, c) {
2093
+ create: ao
2094
+ }, ht = "#4dc4ff";
2095
+ function ft(e, t, n, o, s, i, l, c) {
2079
2096
  return {
2080
2097
  x: e / 8 + n * 3 / 8 + s * 3 / 8 + l / 8,
2081
2098
  y: t / 8 + o * 3 / 8 + i * 3 / 8 + c / 8
2082
2099
  };
2083
2100
  }
2084
- function co(e, t, n) {
2101
+ function ho(e, t, n) {
2085
2102
  e && (e.dataset.x = t.toString(), e.dataset.y = n.toString(), le(e));
2086
2103
  }
2087
2104
  function Q(e, t, n, o, s) {
@@ -2118,12 +2135,12 @@ function Ke(e, t, n, o, s, i, l, c, r, a) {
2118
2135
  }
2119
2136
  }
2120
2137
  }
2121
- const { x: b, y: v } = dt(t, n, o, s, i, l, c, r);
2122
- if (e.labelEl && co(e.labelEl, b, v), a.style?.labelColor) {
2138
+ const { x: b, y: v } = ft(t, n, o, s, i, l, c, r);
2139
+ if (e.labelEl && ho(e.labelEl, b, v), a.style?.labelColor) {
2123
2140
  const p = e.labelEl;
2124
2141
  p && (p.style.color = a.style.labelColor);
2125
2142
  }
2126
- yo(e);
2143
+ vo(e);
2127
2144
  }
2128
2145
  function ie(e, t, n) {
2129
2146
  const { offsetLeft: o, offsetTop: s } = M(e.nodes, t), i = t.offsetWidth, l = t.offsetHeight, c = o + i / 2, r = s + l / 2, a = c + n.x, d = r + n.y;
@@ -2144,7 +2161,7 @@ function X(e) {
2144
2161
  y: n
2145
2162
  };
2146
2163
  }
2147
- const ao = function(e, t, n) {
2164
+ const fo = function(e, t, n) {
2148
2165
  const o = M(e.nodes, t), s = M(e.nodes, n), i = o.offsetLeft + t.offsetWidth / 2, l = o.offsetTop + t.offsetHeight / 2, c = s.offsetLeft + n.offsetWidth / 2, r = s.offsetTop + n.offsetHeight / 2, a = c - i, d = r - l, h = Math.sqrt(a * a + d * d), u = Math.max(50, Math.min(200, h * 0.3)), b = Math.abs(a), v = Math.abs(d);
2149
2166
  let p, g;
2150
2167
  if (h < 150) {
@@ -2168,7 +2185,7 @@ const ao = function(e, t, n) {
2168
2185
  if (!t || !n)
2169
2186
  return;
2170
2187
  if (!o.delta1 || !o.delta2) {
2171
- const C = ao(e, t, n);
2188
+ const C = fo(e, t, n);
2172
2189
  o.delta1 = C.delta1, o.delta2 = C.delta2;
2173
2190
  }
2174
2191
  const i = ie(e, t, o.delta1), l = ie(e, n, o.delta2), { x: c, y: r } = X(i), { ctrlX: a, ctrlY: d } = i, { ctrlX: h, ctrlY: u } = l, { x: b, y: v } = X(l), p = se(h, u, b, v);
@@ -2180,7 +2197,7 @@ const ao = function(e, t, n) {
2180
2197
  if (!C) return;
2181
2198
  m = `M ${C.x1} ${C.y1} L ${c} ${r} L ${C.x2} ${C.y2}`;
2182
2199
  }
2183
- const w = Hn(`M ${c} ${r} C ${a} ${d} ${h} ${u} ${b} ${v}`, g, m, o.style), { x: E, y: N } = dt(c, r, a, d, h, u, b, v), f = o.style?.labelColor || "rgb(235, 95, 82)", y = "a-" + o.id;
2200
+ const w = jn(`M ${c} ${r} C ${a} ${d} ${h} ${u} ${b} ${v}`, g, m, o.style), { x: E, y: N } = ft(c, r, a, d, h, u, b, v), f = o.style?.labelColor || "rgb(235, 95, 82)", y = "a-" + o.id;
2184
2201
  w.id = y;
2185
2202
  const x = e.markdown ? e.markdown(o.label, o) : o.label, S = he(x, E, N, {
2186
2203
  anchor: "middle",
@@ -2188,10 +2205,10 @@ const ao = function(e, t, n) {
2188
2205
  dataType: "arrow",
2189
2206
  svgId: y
2190
2207
  });
2191
- w.labelEl = S, w.arrowObj = o, w.dataset.linkid = o.id, e.labelContainer.appendChild(S), e.arrowSvg.appendChild(w), le(S), s || (e.arrows.push(o), e.currentArrow = w, ft(e, o, i, l));
2192
- }, ho = function(e, t, n = {}) {
2208
+ w.labelEl = S, w.arrowObj = o, w.dataset.linkid = o.id, e.labelContainer.appendChild(S), e.arrowSvg.appendChild(w), le(S), s || (e.arrows.push(o), e.currentArrow = w, pt(e, o, i, l));
2209
+ }, uo = function(e, t, n = {}) {
2193
2210
  const o = {
2194
- id: R(),
2211
+ id: B(),
2195
2212
  label: "Custom Link",
2196
2213
  from: e.nodeObj.id,
2197
2214
  to: t.nodeObj.id,
@@ -2201,14 +2218,14 @@ const ao = function(e, t, n) {
2201
2218
  name: "createArrow",
2202
2219
  obj: o
2203
2220
  });
2204
- }, fo = function(e) {
2221
+ }, po = function(e) {
2205
2222
  ce(this);
2206
- const t = { ...e, id: R() };
2223
+ const t = { ...e, id: B() };
2207
2224
  Se(this, this.findEle(t.from), this.findEle(t.to), t), this.bus.fire("operation", {
2208
2225
  name: "createArrow",
2209
2226
  obj: t
2210
2227
  });
2211
- }, uo = function(e) {
2228
+ }, go = function(e) {
2212
2229
  let t;
2213
2230
  if (e ? t = e : t = this.currentArrow, !t) return;
2214
2231
  ce(this);
@@ -2219,11 +2236,11 @@ const ao = function(e, t, n) {
2219
2236
  id: n
2220
2237
  }
2221
2238
  });
2222
- }, po = function(e) {
2239
+ }, mo = function(e) {
2223
2240
  this.currentArrow = e;
2224
2241
  const t = e.arrowObj, n = this.findEle(t.from), o = this.findEle(t.to), s = ie(this, n, t.delta1), i = ie(this, o, t.delta2);
2225
- this.editable ? ft(this, t, s, i) : ht(e, at), this.bus.fire("selectArrow", t);
2226
- }, go = function() {
2242
+ this.editable ? pt(this, t, s, i) : ut(e, ht), this.bus.fire("selectArrow", t);
2243
+ }, yo = function() {
2227
2244
  ce(this), this.currentArrow = null, this.bus.fire("unselectArrow");
2228
2245
  }, ae = function(e, t) {
2229
2246
  const n = document.createElementNS(A, "path");
@@ -2235,7 +2252,7 @@ const ao = function(e, t, n) {
2235
2252
  "stroke-linecap": "round",
2236
2253
  "stroke-linejoin": "round"
2237
2254
  }), n;
2238
- }, ht = function(e, t) {
2255
+ }, ut = function(e, t) {
2239
2256
  const n = document.createElementNS(A, "g");
2240
2257
  n.setAttribute("class", "arrow-highlight"), n.setAttribute("opacity", "0.45");
2241
2258
  const o = ae(e.line.getAttribute("d"), t);
@@ -2246,20 +2263,20 @@ const ao = function(e, t, n) {
2246
2263
  n.appendChild(i);
2247
2264
  }
2248
2265
  e.insertBefore(n, e.firstChild);
2249
- }, mo = function(e) {
2266
+ }, bo = function(e) {
2250
2267
  const t = e.querySelector(".arrow-highlight");
2251
2268
  t && t.remove();
2252
- }, yo = function(e) {
2269
+ }, vo = function(e) {
2253
2270
  const t = e.querySelector(".arrow-highlight");
2254
2271
  if (!t) return;
2255
2272
  const n = t.querySelectorAll("path");
2256
2273
  n.length >= 1 && n[0].setAttribute("d", e.line.getAttribute("d")), n.length >= 2 && n[1].setAttribute("d", e.arrow1.getAttribute("d")), n.length >= 3 && e.arrow2.getAttribute("d") && n[2].setAttribute("d", e.arrow2.getAttribute("d"));
2257
2274
  }, ce = function(e) {
2258
- e.helper1?.destroy(), e.helper2?.destroy(), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none", e.currentArrow && mo(e.currentArrow);
2259
- }, ft = function(e, t, n, o) {
2275
+ e.helper1?.destroy(), e.helper2?.destroy(), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none", e.currentArrow && bo(e.currentArrow);
2276
+ }, pt = function(e, t, n, o) {
2260
2277
  const { linkController: s, P2: i, P3: l, line1: c, line2: r, nodes: a, map: d, currentArrow: h, bus: u } = e;
2261
2278
  if (!h) return;
2262
- s.style.display = "initial", i.style.display = "initial", l.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(l), ht(h, at);
2279
+ s.style.display = "initial", i.style.display = "initial", l.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(l), ut(h, ht);
2263
2280
  let { x: b, y: v } = X(n), { ctrlX: p, ctrlY: g } = n, { ctrlX: m, ctrlY: w } = o, { x: E, y: N } = X(o);
2264
2281
  i.style.cssText = `top:${g}px;left:${p}px;`, l.style.cssText = `top:${w}px;left:${m}px;`, Q(c, b, v, p, g), Q(r, m, w, E, N), e.helper1 = Ve.create(i), e.helper2 = Ve.create(l), e.helper1.init(d, (f, y) => {
2265
2282
  p = p + f / e.scaleVal, g = g + y / e.scaleVal;
@@ -2271,7 +2288,7 @@ const ao = function(e, t, n) {
2271
2288
  E = x.x, N = x.y, l.style.top = w + "px", l.style.left = m + "px", Ke(h, b, v, p, g, m, w, E, N, t), Q(r, m, w, E, N), t.delta2.x = Math.round(m - o.cx), t.delta2.y = Math.round(w - o.cy), u.fire("updateArrowDelta", t);
2272
2289
  });
2273
2290
  };
2274
- function bo() {
2291
+ function wo() {
2275
2292
  this.arrowSvg.innerHTML = "", this.labelContainer.querySelectorAll('.svg-label[data-type="arrow"]').forEach((t) => t.remove());
2276
2293
  for (let t = 0; t < this.arrows.length; t++) {
2277
2294
  const n = this.arrows[t];
@@ -2282,23 +2299,23 @@ function bo() {
2282
2299
  }
2283
2300
  this.nodes.appendChild(this.arrowSvg);
2284
2301
  }
2285
- function vo(e) {
2302
+ function xo(e) {
2286
2303
  ce(this), e && e.labelEl && rt(this, e.labelEl, e.arrowObj);
2287
2304
  }
2288
- function wo() {
2305
+ function Eo() {
2289
2306
  this.arrows = this.arrows.filter((e) => oe(e.from, this.nodeData) && oe(e.to, this.nodeData));
2290
2307
  }
2291
- const xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2308
+ const Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2292
2309
  __proto__: null,
2293
- createArrow: ho,
2294
- createArrowFrom: fo,
2295
- editArrowLabel: vo,
2296
- removeArrow: uo,
2297
- renderArrow: bo,
2298
- selectArrow: po,
2299
- tidyArrow: wo,
2300
- unselectArrow: go
2301
- }, Symbol.toStringTag, { value: "Module" })), Eo = function(e) {
2310
+ createArrow: uo,
2311
+ createArrowFrom: po,
2312
+ editArrowLabel: xo,
2313
+ removeArrow: go,
2314
+ renderArrow: wo,
2315
+ selectArrow: mo,
2316
+ tidyArrow: Eo,
2317
+ unselectArrow: yo
2318
+ }, Symbol.toStringTag, { value: "Module" })), So = function(e) {
2302
2319
  if (e.length === 0) throw new Error("No selected node.");
2303
2320
  if (e.length === 1) {
2304
2321
  const r = e[0].nodeObj, a = e[0].nodeObj.parent;
@@ -2335,7 +2352,7 @@ const xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2335
2352
  start: i,
2336
2353
  end: l
2337
2354
  };
2338
- }, Co = function(e) {
2355
+ }, No = function(e) {
2339
2356
  const t = document.createElementNS(A, "g");
2340
2357
  return t.setAttribute("id", e), t;
2341
2358
  }, ze = function(e, t) {
@@ -2347,69 +2364,69 @@ const xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2347
2364
  "stroke-linecap": "round",
2348
2365
  "stroke-width": "2"
2349
2366
  }), n;
2350
- }, So = (e) => e.parentElement.parentElement, No = function(e, { parent: t, start: n }) {
2367
+ }, To = (e) => e.parentElement.parentElement, ko = function(e, { parent: t, start: n }) {
2351
2368
  const o = e.findEle(t), s = o.nodeObj;
2352
2369
  let i;
2353
2370
  return s.parent ? i = o.closest("me-main").className : i = e.findEle(s.children[n].id).closest("me-main").className, i;
2354
2371
  }, Ne = function(e, t) {
2355
- const { id: n, label: o, parent: s, start: i, end: l, style: c } = t, { nodes: r, theme: a, summarySvg: d } = e, u = e.findEle(s).nodeObj, b = No(e, t);
2372
+ const { id: n, label: o, parent: s, start: i, end: l, style: c } = t, { nodes: r, theme: a, summarySvg: d } = e, u = e.findEle(s).nodeObj, b = ko(e, t);
2356
2373
  let v = 1 / 0, p = 0, g = 0, m = 0;
2357
2374
  for (let K = i; K <= l; K++) {
2358
2375
  const Te = u.children?.[K];
2359
2376
  if (!Te)
2360
2377
  return e.removeSummary(n), null;
2361
- const U = So(e.findEle(Te.id)), { offsetLeft: J, offsetTop: ke } = M(r, U), _e = i === l ? 10 : 20;
2378
+ const U = To(e.findEle(Te.id)), { offsetLeft: J, offsetTop: ke } = M(r, U), _e = i === l ? 10 : 20;
2362
2379
  K === i && (g = ke + _e), K === l && (m = ke + U.offsetHeight - _e), J < v && (v = J), U.offsetWidth + J > p && (p = U.offsetWidth + J);
2363
2380
  }
2364
2381
  let w, E;
2365
2382
  const N = u.parent ? 10 : 0, f = g + N, y = m + N, x = (f + y) / 2, S = c?.stroke || a.cssVar["--color"], C = c?.labelColor || a.cssVar["--color"], T = "s-" + n, D = e.markdown ? e.markdown(o, t) : o;
2366
2383
  b === H.LHS ? (w = ze(`M ${v + 10} ${f} c -5 0 -10 5 -10 10 L ${v} ${y - 10} c 0 5 5 10 10 10 M ${v} ${x} h -10`, S), E = he(D, v - 20, x, { anchor: "end", color: C, dataType: "summary", svgId: T })) : (w = ze(`M ${p - 10} ${f} c 5 0 10 5 10 10 L ${p} ${y - 10} c 0 5 -5 10 -10 10 M ${p} ${x} h 10`, S), E = he(D, p + 20, x, { anchor: "start", color: C, dataType: "summary", svgId: T }));
2367
- const L = Co(T);
2384
+ const L = No(T);
2368
2385
  return L.appendChild(w), e.labelContainer.appendChild(E), le(E), L.summaryObj = t, L.labelEl = E, d.appendChild(L), L;
2369
- }, To = function(e = {}) {
2386
+ }, _o = function(e = {}) {
2370
2387
  if (!this.currentNodes) return;
2371
- const { currentNodes: t, summaries: n, bus: o } = this, { parent: s, start: i, end: l } = Eo(t), c = { id: R(), parent: s, start: i, end: l, label: "summary", style: e.style }, r = Ne(this, c);
2388
+ const { currentNodes: t, summaries: n, bus: o } = this, { parent: s, start: i, end: l } = So(t), c = { id: B(), parent: s, start: i, end: l, label: "summary", style: e.style }, r = Ne(this, c);
2372
2389
  n.push(c), this.editSummary(r), o.fire("operation", {
2373
2390
  name: "createSummary",
2374
2391
  obj: c
2375
2392
  });
2376
- }, ko = function(e) {
2377
- const t = R(), n = { ...e, id: t };
2393
+ }, Do = function(e) {
2394
+ const t = B(), n = { ...e, id: t };
2378
2395
  Ne(this, n), this.summaries.push(n), this.bus.fire("operation", {
2379
2396
  name: "createSummary",
2380
2397
  obj: n
2381
2398
  });
2382
- }, _o = function(e) {
2399
+ }, Lo = function(e) {
2383
2400
  const t = this.summaries.findIndex((n) => n.id === e);
2384
2401
  t > -1 && (this.summaries.splice(t, 1), this.nodes.querySelector("#s-" + e)?.remove(), this.nodes.querySelector("#label-s-" + e)?.remove()), this.bus.fire("operation", {
2385
2402
  name: "removeSummary",
2386
2403
  obj: { id: e }
2387
2404
  });
2388
- }, Do = function(e) {
2405
+ }, Mo = function(e) {
2389
2406
  const t = e.labelEl;
2390
2407
  t && t.classList.add("selected"), this.currentSummary = e, this.bus.fire("selectSummary", e.summaryObj);
2391
- }, Lo = function() {
2408
+ }, Ao = function() {
2392
2409
  this.currentSummary?.labelEl?.classList.remove("selected"), this.currentSummary = null, this.bus.fire("unselectSummary");
2393
- }, Mo = function() {
2410
+ }, Po = function() {
2394
2411
  this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
2395
2412
  try {
2396
2413
  Ne(this, e);
2397
2414
  } catch {
2398
2415
  }
2399
2416
  }), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
2400
- }, Ao = function(e) {
2417
+ }, Oo = function(e) {
2401
2418
  e && e.labelEl && rt(this, e.labelEl, e.summaryObj);
2402
- }, Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2419
+ }, Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2403
2420
  __proto__: null,
2404
- createSummary: To,
2405
- createSummaryFrom: ko,
2406
- editSummary: Ao,
2407
- removeSummary: _o,
2408
- renderSummary: Mo,
2409
- selectSummary: Do,
2410
- unselectSummary: Lo
2421
+ createSummary: _o,
2422
+ createSummaryFrom: Do,
2423
+ editSummary: Oo,
2424
+ removeSummary: Lo,
2425
+ renderSummary: Po,
2426
+ selectSummary: Mo,
2427
+ unselectSummary: Ao
2411
2428
  }, Symbol.toStringTag, { value: "Module" })), _ = "http://www.w3.org/2000/svg";
2412
- function Oo(e, t) {
2429
+ function $o(e, t) {
2413
2430
  const n = document.createElementNS(_, "svg");
2414
2431
  return k(n, {
2415
2432
  version: "1.1",
@@ -2418,10 +2435,10 @@ function Oo(e, t) {
2418
2435
  width: t
2419
2436
  }), n;
2420
2437
  }
2421
- function Ho(e, t) {
2438
+ function jo(e, t) {
2422
2439
  return (parseInt(e) - parseInt(t)) / 2;
2423
2440
  }
2424
- function $o(e, t, n, o) {
2441
+ function Io(e, t, n, o) {
2425
2442
  const s = document.createElementNS(_, "g");
2426
2443
  let i = "";
2427
2444
  return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
@@ -2429,7 +2446,7 @@ function $o(e, t, n, o) {
2429
2446
  const a = document.createElementNS(_, "text");
2430
2447
  k(a, {
2431
2448
  x: n + parseInt(t.paddingLeft) + "",
2432
- y: o + parseInt(t.paddingTop) + Ho(t.lineHeight, t.fontSize) * (r + 1) + parseFloat(t.fontSize) * (r + 1) + "",
2449
+ y: o + parseInt(t.paddingTop) + jo(t.lineHeight, t.fontSize) * (r + 1) + parseFloat(t.fontSize) * (r + 1) + "",
2433
2450
  "text-anchor": "start",
2434
2451
  "font-family": t.fontFamily,
2435
2452
  "font-size": `${t.fontSize}`,
@@ -2438,7 +2455,7 @@ function $o(e, t, n, o) {
2438
2455
  }), a.innerHTML = c, s.appendChild(a);
2439
2456
  }), s;
2440
2457
  }
2441
- function jo(e, t, n, o) {
2458
+ function Ro(e, t, n, o) {
2442
2459
  let s = "";
2443
2460
  e.nodeObj?.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
2444
2461
  const i = document.createElementNS(_, "foreignObject");
@@ -2454,7 +2471,7 @@ function jo(e, t, n, o) {
2454
2471
  style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
2455
2472
  }), l.innerHTML = s, i.appendChild(l), i;
2456
2473
  }
2457
- function Io(e, t) {
2474
+ function Bo(e, t) {
2458
2475
  const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = M(e.nodes, t), i = document.createElementNS(_, "rect");
2459
2476
  return k(i, {
2460
2477
  x: o + "",
@@ -2484,9 +2501,9 @@ function ee(e, t, n = !1) {
2484
2501
  const c = document.createElementNS(_, "g");
2485
2502
  c.appendChild(l);
2486
2503
  let r;
2487
- return n ? r = jo(t, o, s, i) : r = $o(t, o, s, i), c.appendChild(r), c;
2504
+ return n ? r = Ro(t, o, s, i) : r = Io(t, o, s, i), c.appendChild(r), c;
2488
2505
  }
2489
- function Bo(e, t) {
2506
+ function Wo(e, t) {
2490
2507
  const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = M(e.nodes, t), i = document.createElementNS(_, "a"), l = document.createElementNS(_, "text");
2491
2508
  return k(l, {
2492
2509
  x: o + "",
@@ -2498,7 +2515,7 @@ function Bo(e, t) {
2498
2515
  fill: `${n.color}`
2499
2516
  }), l.innerHTML = t.textContent, i.appendChild(l), i.setAttribute("href", t.href), i;
2500
2517
  }
2501
- function Ro(e, t) {
2518
+ function Yo(e, t) {
2502
2519
  const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = M(e.nodes, t), i = document.createElementNS(_, "image");
2503
2520
  return k(i, {
2504
2521
  x: o + "",
@@ -2508,8 +2525,8 @@ function Ro(e, t) {
2508
2525
  href: t.src
2509
2526
  }), i;
2510
2527
  }
2511
- const te = 100, Wo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Yo = (e, t = !1) => {
2512
- const n = e.nodes, o = n.offsetHeight + te * 2, s = n.offsetWidth + te * 2, i = Oo(o + "px", s + "px"), l = document.createElementNS(_, "svg"), c = document.createElementNS(_, "rect");
2528
+ const te = 100, Xo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Fo = (e, t = !1) => {
2529
+ const n = e.nodes, o = n.offsetHeight + te * 2, s = n.offsetWidth + te * 2, i = $o(o + "px", s + "px"), l = document.createElementNS(_, "svg"), c = document.createElementNS(_, "rect");
2513
2530
  k(c, {
2514
2531
  x: "0",
2515
2532
  y: "0",
@@ -2526,22 +2543,22 @@ const te = 100, Wo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC
2526
2543
  a && l.appendChild(a);
2527
2544
  const d = n.querySelector(".summary")?.cloneNode(!0);
2528
2545
  return d && l.appendChild(d), n.querySelectorAll("me-tpc").forEach((h) => {
2529
- h.nodeObj.dangerouslySetInnerHTML ? l.appendChild(ee(e, h, !t)) : (l.appendChild(Io(e, h)), l.appendChild(ee(e, h.text, !t)));
2546
+ h.nodeObj.dangerouslySetInnerHTML ? l.appendChild(ee(e, h, !t)) : (l.appendChild(Bo(e, h)), l.appendChild(ee(e, h.text, !t)));
2530
2547
  }), n.querySelectorAll(".tags > span").forEach((h) => {
2531
2548
  l.appendChild(ee(e, h));
2532
2549
  }), n.querySelectorAll(".icons > span").forEach((h) => {
2533
2550
  l.appendChild(ee(e, h));
2534
2551
  }), n.querySelectorAll(".hyper-link").forEach((h) => {
2535
- l.appendChild(Bo(e, h));
2552
+ l.appendChild(Wo(e, h));
2536
2553
  }), n.querySelectorAll("img").forEach((h) => {
2537
- l.appendChild(Ro(e, h));
2554
+ l.appendChild(Yo(e, h));
2538
2555
  }), k(l, {
2539
2556
  x: te + "",
2540
2557
  y: te + "",
2541
2558
  overflow: "visible"
2542
2559
  }), i.appendChild(l), i;
2543
- }, Xo = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), Wo + e.outerHTML);
2544
- function Fo(e) {
2560
+ }, Vo = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), Xo + e.outerHTML);
2561
+ function Ko(e) {
2545
2562
  return new Promise((t, n) => {
2546
2563
  const o = new FileReader();
2547
2564
  o.onload = (s) => {
@@ -2551,11 +2568,11 @@ function Fo(e) {
2551
2568
  }, o.readAsDataURL(e);
2552
2569
  });
2553
2570
  }
2554
- const Vo = function(e = !1, t) {
2555
- const n = Yo(this, e), o = Xo(n, t);
2571
+ const zo = function(e = !1, t) {
2572
+ const n = Fo(this, e), o = Vo(n, t);
2556
2573
  return new Blob([o], { type: "image/svg+xml" });
2557
- }, Ko = async function(e = !1, t) {
2558
- const n = this.exportSvg(e, t), o = await Fo(n);
2574
+ }, Go = async function(e = !1, t) {
2575
+ const n = this.exportSvg(e, t), o = await Ko(n);
2559
2576
  return new Promise((s, i) => {
2560
2577
  const l = new Image();
2561
2578
  l.setAttribute("crossOrigin", "anonymous"), l.onload = () => {
@@ -2563,43 +2580,43 @@ const Vo = function(e = !1, t) {
2563
2580
  c.width = l.width, c.height = l.height, c.getContext("2d").drawImage(l, 0, 0), c.toBlob(s, "image/png", 1);
2564
2581
  }, l.src = o, l.onerror = i;
2565
2582
  });
2566
- }, zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2583
+ }, qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2567
2584
  __proto__: null,
2568
- exportPng: Ko,
2569
- exportSvg: Vo
2585
+ exportPng: Go,
2586
+ exportSvg: zo
2570
2587
  }, Symbol.toStringTag, { value: "Module" }));
2571
- function Go(e, t) {
2588
+ function Uo(e, t) {
2572
2589
  return async function(...n) {
2573
2590
  const o = this.before[t];
2574
2591
  o && !await o.apply(this, n) || e.apply(this, n);
2575
2592
  };
2576
2593
  }
2577
- const Ge = Object.keys(ot), ut = {};
2594
+ const Ge = Object.keys(ot), gt = {};
2578
2595
  for (let e = 0; e < Ge.length; e++) {
2579
2596
  const t = Ge[e];
2580
- ut[t] = Go(ot[t], t);
2597
+ gt[t] = Uo(ot[t], t);
2581
2598
  }
2582
- const qo = {
2599
+ const Jo = {
2583
2600
  getObjById: oe,
2584
- generateNewObj: pt,
2585
- layout: Ct,
2586
- linkDiv: $n,
2587
- editTopic: Lt,
2588
- createWrapper: Tt,
2589
- createParent: kt,
2590
- createChildren: _t,
2591
- createTopic: Dt,
2601
+ generateNewObj: mt,
2602
+ layout: Nt,
2603
+ linkDiv: In,
2604
+ editTopic: At,
2605
+ createWrapper: _t,
2606
+ createParent: Dt,
2607
+ createChildren: Lt,
2608
+ createTopic: Mt,
2592
2609
  findEle: Ze,
2593
- changeTheme: io,
2594
- changeCompact: ro,
2595
- ...En,
2596
- ...ut,
2597
- ...xo,
2598
- ...Po,
2599
- ...zo,
2610
+ changeTheme: lo,
2611
+ changeCompact: co,
2612
+ ...Sn,
2613
+ ...gt,
2614
+ ...Co,
2615
+ ...Ho,
2616
+ ...qo,
2600
2617
  init(e) {
2601
2618
  if (e = JSON.parse(JSON.stringify(e)), !e || !e.nodeData) return new Error("MindElixir: `data` is required");
2602
- e.direction !== void 0 && (this.direction = e.direction), e.compact !== void 0 && (this.compact = e.compact), this.changeTheme(e.theme || this.theme, !1), e.meta && (this.meta = e.meta), this.nodeData = e.nodeData, B(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Jn(this), this.keypress && An(this, this.keypress), so(this), this.disposable.push(Et()), this.contextMenu && this.disposable.push(In(this, this.contextMenu)), this.allowUndo && this.disposable.push(Rn(this)), this.layout(), this.linkDiv(), this.toCenter();
2619
+ e.direction !== void 0 && (this.direction = e.direction), e.compact !== void 0 && (this.compact = e.compact), this.changeTheme(e.theme || this.theme, !1), e.meta && (this.meta = e.meta), this.nodeData = e.nodeData, R(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Qn(this), this.keypress && On(this, this.keypress), ro(this), this.disposable.push(St()), this.contextMenu && this.disposable.push(Bn(this, this.contextMenu)), this.allowUndo && this.disposable.push(Yn(this)), this.layout(), this.linkDiv(), this.toCenter();
2603
2620
  },
2604
2621
  destroy() {
2605
2622
  this.disposable.forEach((e) => e()), this.el && (this.el.innerHTML = ""), this.el = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.arrowSvg = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, this.selection?.destroy(), this.selection = void 0;
@@ -2611,25 +2628,7 @@ const qo = {
2611
2628
  enableMobileMultiSelect(e) {
2612
2629
  this.mobileMultiSelect = e;
2613
2630
  }
2614
- };
2615
- function Uo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: c, direction: r, containerHeight: a }) {
2616
- let d = t + n / 2;
2617
- const h = e + o / 2;
2618
- let u;
2619
- r === H.LHS ? u = i + l : u = i;
2620
- const b = s + c / 2, p = (1 - Math.abs(b - h) / a) * 0.25 * (n / 2);
2621
- return r === H.LHS ? d = d - n / 10 - p : d = d + n / 10 + p, `M ${d} ${h} Q ${d} ${b} ${u} ${b}`;
2622
- }
2623
- function Jo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: c, direction: r, isFirst: a }) {
2624
- const d = parseInt(this.container.style.getPropertyValue("--node-gap-x"));
2625
- let h = 0, u = 0;
2626
- a ? h = e + o / 2 : h = e + o;
2627
- const b = s + c;
2628
- let v = 0, p = 0, g = 0;
2629
- const m = Math.abs(h - b) / 300 * d;
2630
- return r === H.LHS ? (g = t, v = g + d, p = g - d, u = i + d, `M ${v} ${h} C ${g} ${h} ${g + m} ${b} ${p} ${b} H ${u}`) : (g = t + n, v = g - d, p = g + d, u = i + l - d, `M ${v} ${h} C ${g} ${h} ${g - m} ${b} ${p} ${b} H ${u}`);
2631
- }
2632
- const Zo = "5.12.2-beta.1";
2631
+ }, Zo = "5.12.2-beta.2";
2633
2632
  function Qo(e) {
2634
2633
  return {
2635
2634
  x: 0,
@@ -2687,13 +2686,13 @@ function P({
2687
2686
  let C = null;
2688
2687
  const T = Object.prototype.toString.call(e);
2689
2688
  if (T === "[object HTMLDivElement]" ? C = e : T === "[object String]" && (C = document.querySelector(e)), !C) throw new Error("MindElixir: el is not a valid element");
2690
- C.style.position = "relative", C.innerHTML = "", this.el = C, this.disposable = [], this.before = r || {}, this.newTopicName = a || "New Node", this.contextMenu = o ?? !0, this.toolBar = s ?? !0, this.keypress = i ?? !0, this.mouseSelectionButton = l ?? 0, this.direction = t ?? 1, this.editable = n ?? !0, this.allowUndo = d ?? !0, this.scaleSensitivity = m ?? 0.1, this.scaleMax = w ?? 1.4, this.scaleMin = E ?? 0.2, this.generateMainBranch = h || Uo, this.generateSubBranch = u || Jo, this.overflowHidden = b ?? !1, this.compact = v ?? !1, this.alignment = g ?? "root", this.handleWheel = N ?? !0, this.markdown = f || void 0, this.imageProxy = y || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = S ?? !1, this.panHelper = Qo(this), this.bus = On(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
2689
+ C.style.position = "relative", C.innerHTML = "", this.el = C, this.disposable = [], this.before = r || {}, this.newTopicName = a || "New Node", this.contextMenu = o ?? !0, this.toolBar = s ?? !0, this.keypress = i ?? !0, this.mouseSelectionButton = l ?? 0, this.direction = t ?? 1, this.editable = n ?? !0, this.allowUndo = d ?? !0, this.scaleSensitivity = m ?? 0.1, this.scaleMax = w ?? 1.4, this.scaleMin = E ?? 0.2, this.generateMainBranch = h || at, this.generateSubBranch = u || dt, this.overflowHidden = b ?? !1, this.compact = v ?? !1, this.alignment = g ?? "root", this.handleWheel = N ?? !0, this.markdown = f || void 0, this.imageProxy = y || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = S ?? !1, this.panHelper = Qo(this), this.bus = $n(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
2691
2690
  const D = window.matchMedia("(prefers-color-scheme: dark)");
2692
2691
  this.theme = p || (D.matches ? ue : G);
2693
2692
  const L = document.createElement("div");
2694
- L.className = "map-canvas", this.map = L, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = document.createElement("me-nodes"), this.lines = z("lines"), this.summarySvg = z("summary"), this.linkController = z("linkcontroller"), this.P2 = document.createElement("div"), this.P3 = document.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = je(), this.line2 = je(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.arrowSvg = z("topiclinks"), this.labelContainer = document.createElement("div"), this.labelContainer.className = "label-container", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(Pn(this)), x && (this.pasteHandler = x);
2693
+ L.className = "map-canvas", this.map = L, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = document.createElement("me-nodes"), this.lines = z("lines"), this.summarySvg = z("summary"), this.linkController = z("linkcontroller"), this.P2 = document.createElement("div"), this.P3 = document.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = je(), this.line2 = je(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.arrowSvg = z("topiclinks"), this.labelContainer = document.createElement("div"), this.labelContainer.className = "label-container", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(Hn(this)), x && (this.pasteHandler = x);
2695
2694
  }
2696
- P.prototype = qo;
2695
+ P.prototype = Jo;
2697
2696
  Object.defineProperty(P.prototype, "currentNode", {
2698
2697
  get() {
2699
2698
  return this.currentNodes[this.currentNodes.length - 1];
@@ -2709,7 +2708,7 @@ P.version = Zo;
2709
2708
  P.E = Ze;
2710
2709
  P.new = (e) => ({
2711
2710
  nodeData: {
2712
- id: R(),
2711
+ id: B(),
2713
2712
  topic: e || "new topic",
2714
2713
  children: []
2715
2714
  }