mind-elixir 5.14.0-beta.0 → 5.14.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,12 +80,12 @@ const j = function(t, e) {
80
80
  });
81
81
  };
82
82
  function _(t, e, n, o) {
83
- const s = n - t, i = o - e, c = Math.atan2(i, s) * 180 / Math.PI, l = 12, a = 30, f = (c + 180 - a) * Math.PI / 180, d = (c + 180 + a) * Math.PI / 180;
83
+ const s = n - t, i = o - e, c = Math.atan2(i, s) * 180 / Math.PI, a = 12, d = 30, f = (c + 180 - d) * Math.PI / 180, l = (c + 180 + d) * Math.PI / 180;
84
84
  return {
85
- x1: n + Math.cos(f) * l,
86
- y1: o + Math.sin(f) * l,
87
- x2: n + Math.cos(d) * l,
88
- y2: o + Math.sin(d) * l
85
+ x1: n + Math.cos(f) * a,
86
+ y1: o + Math.sin(f) * a,
87
+ x2: n + Math.cos(l) * a,
88
+ y2: o + Math.sin(l) * a
89
89
  };
90
90
  }
91
91
  function X() {
@@ -212,17 +212,17 @@ function Ft(t, e, n) {
212
212
  if (!e.isDragging && r > zt && wt(t, e), !e.isDragging) return;
213
213
  const c = t.container.getBoundingClientRect();
214
214
  xt(e.ghost, n.clientX - c.x, n.clientY - c.y), n.clientX < c.x + 50 ? e.edgeMoveController.move(1, 0) : n.clientX > c.x + c.width - 50 ? e.edgeMoveController.move(-1, 0) : n.clientY < c.y + 50 ? e.edgeMoveController.move(0, 1) : n.clientY > c.y + c.height - 50 ? e.edgeMoveController.move(0, -1) : e.edgeMoveController.stop(), q(e.meet);
215
- const l = 12 * t.scaleVal, a = document.elementFromPoint(n.clientX, n.clientY - l);
216
- if (ft(a, o)) {
217
- e.meet = a;
218
- const f = a.getBoundingClientRect(), d = f.y;
219
- n.clientY > d + f.height ? e.insertType = "after" : e.insertType = "in";
215
+ const a = 12 * t.scaleVal, d = document.elementFromPoint(n.clientX, n.clientY - a);
216
+ if (ft(d, o)) {
217
+ e.meet = d;
218
+ const f = d.getBoundingClientRect(), l = f.y;
219
+ n.clientY > l + f.height ? e.insertType = "after" : e.insertType = "in";
220
220
  } else {
221
- const f = document.elementFromPoint(n.clientX, n.clientY + l);
221
+ const f = document.elementFromPoint(n.clientX, n.clientY + a);
222
222
  if (ft(f, o)) {
223
223
  e.meet = f;
224
- const p = f.getBoundingClientRect().y;
225
- n.clientY < p ? e.insertType = "before" : e.insertType = "in";
224
+ const u = f.getBoundingClientRect().y;
225
+ n.clientY < u ? e.insertType = "before" : e.insertType = "in";
226
226
  } else
227
227
  e.insertType = null, e.meet = null;
228
228
  }
@@ -366,11 +366,11 @@ const Qt = function(t) {
366
366
  obj: t.nodeObj
367
367
  }), e.addEventListener("keydown", (c) => {
368
368
  if (c.stopPropagation(), c.isComposing) return;
369
- const l = c.key;
370
- if (l === "Enter" || l === "Tab") {
369
+ const a = c.key;
370
+ if (a === "Enter" || a === "Tab") {
371
371
  if (c.shiftKey) return;
372
372
  c.preventDefault(), e.blur(), this.container.focus();
373
- } else l === "Escape" && (c.preventDefault(), e.textContent = o, e.blur(), this.container.focus());
373
+ } else a === "Escape" && (c.preventDefault(), e.textContent = o, e.blur(), this.container.focus());
374
374
  }), e.addEventListener("blur", () => {
375
375
  if (!e) return;
376
376
  t.style.opacity = "1", e.remove();
@@ -402,8 +402,8 @@ function ne(t) {
402
402
  const oe = function(t, e = !1) {
403
403
  const n = this.container, o = t.getBoundingClientRect(), s = n.getBoundingClientRect();
404
404
  if (e || o.top > s.bottom - 50 || o.bottom < s.top + 50 || o.left > s.right - 50 || o.right < s.left + 50) {
405
- const r = o.left + o.width / 2, c = o.top + o.height / 2, l = s.left + s.width / 2, a = s.top + s.height / 2, f = r - l, d = c - a;
406
- this.move(-f, -d, !0);
405
+ const r = o.left + o.width / 2, c = o.top + o.height / 2, a = s.left + s.width / 2, d = s.top + s.height / 2, f = r - a, l = c - d;
406
+ this.move(-f, -l, !0);
407
407
  }
408
408
  }, se = function(t, e, n) {
409
409
  this.clearSelection(), this.scrollIntoView(t), this.selection?.select(t), e && this.bus.fire("selectNewNode", t.nodeObj);
@@ -429,8 +429,8 @@ const oe = function(t, e = !1) {
429
429
  this.editable = !1;
430
430
  }, fe = function(t, e = { x: 0, y: 0 }) {
431
431
  if (t < this.scaleMin && t < this.scaleVal || t > this.scaleMax && t > this.scaleVal) return;
432
- const n = this.container.getBoundingClientRect(), o = e.x ? e.x - n.left - n.width / 2 : 0, s = e.y ? e.y - n.top - n.height / 2 : 0, { dx: i, dy: r } = it(this), c = this.map.style.transform, { x: l, y: a } = st(c), f = l - i, d = a - r, p = this.scaleVal, b = (-o + f) * (1 - t / p), y = (-s + d) * (1 - t / p);
433
- this.map.style.transform = `translate3d(${l - b}px, ${a - y}px, 0) scale(${t})`, this.scaleVal = t, this.bus.fire("scale", t);
432
+ const n = this.container.getBoundingClientRect(), o = e.x ? e.x - n.left - n.width / 2 : 0, s = e.y ? e.y - n.top - n.height / 2 : 0, { dx: i, dy: r } = it(this), c = this.map.style.transform, { x: a, y: d } = st(c), f = a - i, l = d - r, u = this.scaleVal, g = (-o + f) * (1 - t / u), y = (-s + l) * (1 - t / u);
433
+ this.map.style.transform = `translate3d(${a - g}px, ${d - y}px, 0) scale(${t})`, this.scaleVal = t, this.bus.fire("scale", t);
434
434
  }, ue = function() {
435
435
  const t = this.nodes.offsetHeight / this.container.offsetHeight, e = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(t, e));
436
436
  this.scaleVal = n;
@@ -440,28 +440,28 @@ const oe = function(t, e = !1) {
440
440
  const { map: o, scaleVal: s, bus: i, container: r, nodes: c } = this;
441
441
  if (n && o.style.transition === "transform 0.3s")
442
442
  return;
443
- const l = o.style.transform;
444
- let { x: a, y: f } = st(l);
445
- const d = r.getBoundingClientRect(), p = c.getBoundingClientRect(), b = p.left < d.right && p.right > d.left, y = p.top < d.bottom && p.bottom > d.top;
446
- if (b) {
447
- const u = p.left + t, g = p.right + t;
448
- (u >= d.right || g <= d.left) && (t = 0);
443
+ const a = o.style.transform;
444
+ let { x: d, y: f } = st(a);
445
+ const l = r.getBoundingClientRect(), u = c.getBoundingClientRect(), g = u.left < l.right && u.right > l.left, y = u.top < l.bottom && u.bottom > l.top;
446
+ if (g) {
447
+ const p = u.left + t, b = u.right + t;
448
+ (p >= l.right || b <= l.left) && (t = 0);
449
449
  }
450
450
  if (y) {
451
- const u = p.top + e, g = p.bottom + e;
452
- (u >= d.bottom || g <= d.top) && (e = 0);
451
+ const p = u.top + e, b = u.bottom + e;
452
+ (p >= l.bottom || b <= l.top) && (e = 0);
453
453
  }
454
- a += t, f += e, n && (o.style.transition = "transform 0.3s", setTimeout(() => {
454
+ d += t, f += e, n && (o.style.transition = "transform 0.3s", setTimeout(() => {
455
455
  o.style.transition = "none";
456
- }, 300)), o.style.transform = `translate3d(${a}px, ${f}px, 0) scale(${s})`, i.fire("move", { dx: t, dy: e });
456
+ }, 300)), o.style.transform = `translate3d(${d}px, ${f}px, 0) scale(${s})`, i.fire("move", { dx: t, dy: e });
457
457
  }, it = (t, e = !1) => {
458
458
  const { container: n, map: o, nodes: s } = t;
459
459
  let i, r;
460
460
  if (t.alignment === "nodes" || e)
461
461
  i = (n.offsetWidth - s.offsetWidth) / 2, r = (n.offsetHeight - s.offsetHeight) / 2, o.style.transformOrigin = "50% 50%";
462
462
  else {
463
- const c = o.querySelector("me-root"), l = c.offsetTop, a = c.offsetLeft, f = c.offsetWidth, d = c.offsetHeight;
464
- i = n.offsetWidth / 2 - a - f / 2, r = n.offsetHeight / 2 - l - d / 2, o.style.transformOrigin = `${a + f / 2}px 50%`;
463
+ const c = o.querySelector("me-root"), a = c.offsetTop, d = c.offsetLeft, f = c.offsetWidth, l = c.offsetHeight;
464
+ i = n.offsetWidth / 2 - d - f / 2, r = n.offsetHeight / 2 - a - l / 2, o.style.transformOrigin = `${d + f / 2}px 50%`;
465
465
  }
466
466
  return { dx: i, dy: r };
467
467
  }, ge = function() {
@@ -487,18 +487,18 @@ const oe = function(t, e = !1) {
487
487
  y: o.top
488
488
  }, i = t.parentNode, r = i.children[1];
489
489
  if (r.expanded = n.expanded, r.className = n.expanded ? "minus" : "", ee(t), n.expanded) {
490
- const d = this.createChildren(
491
- n.children.map((p) => this.createWrapper(p).grp)
490
+ const l = this.createChildren(
491
+ n.children.map((u) => this.createWrapper(u).grp)
492
492
  );
493
- i.parentNode.appendChild(d);
493
+ i.parentNode.appendChild(l);
494
494
  } else
495
495
  i.parentNode.children[1].remove();
496
496
  this.linkDiv(t.closest("me-main > me-wrapper"));
497
- const c = t.getBoundingClientRect(), l = {
497
+ const c = t.getBoundingClientRect(), a = {
498
498
  x: c.left,
499
499
  y: c.top
500
- }, a = s.x - l.x, f = s.y - l.y;
501
- this.move(a, f), this.bus.fire("expandNode", n);
500
+ }, d = s.x - a.x, f = s.y - a.y;
501
+ this.move(d, f), this.bus.fire("expandNode", n);
502
502
  }, Se = function(t, e) {
503
503
  const n = t.nodeObj, o = t.getBoundingClientRect(), s = {
504
504
  x: o.left,
@@ -508,8 +508,8 @@ const oe = function(t, e = !1) {
508
508
  const i = this.findEle(n.id).getBoundingClientRect(), r = {
509
509
  x: i.left,
510
510
  y: i.top
511
- }, c = s.x - r.x, l = s.y - r.y;
512
- this.move(c, l);
511
+ }, c = s.x - r.x, a = s.y - r.y;
512
+ this.move(c, a);
513
513
  }, Ee = function(t) {
514
514
  this.clearSelection(), t && (t = JSON.parse(JSON.stringify(t)), this.nodeData = t.nodeData, this.arrows = t.arrows || [], this.summaries = t.summaries || [], t.meta && (this.meta = t.meta), t.theme && this.changeTheme(t.theme)), ot(this.nodeData), this.layout(), this.linkDiv();
515
515
  }, Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -611,7 +611,7 @@ function Ne(t) {
611
611
  clear() {
612
612
  this.activePointers.clear(), this.lastDistance = null;
613
613
  }
614
- }, c = Vt(t), l = {
614
+ }, c = Vt(t), a = {
615
615
  timer: null,
616
616
  startPos: null,
617
617
  pointerId: null,
@@ -631,7 +631,7 @@ function Ne(t) {
631
631
  Math.sqrt(m * m + w * w) > this.MOVE_THRESHOLD && this.clear();
632
632
  }
633
633
  }
634
- }, a = (h, m) => {
634
+ }, d = (h, m) => {
635
635
  if (h.closest("#input-box")) return !1;
636
636
  const w = h.closest(".svg-label"), E = h.closest(".topiclinks, .summary"), S = w ? { type: w.dataset.type, element: document.getElementById(w.dataset.svgId) } : E ? { type: E.classList.contains("topiclinks") ? "arrow" : "summary", element: h.closest("g") } : null;
637
637
  if (!S?.type || !S?.element) return !1;
@@ -655,17 +655,17 @@ function Ne(t) {
655
655
  return;
656
656
  const m = h.target;
657
657
  m.tagName === "ME-EPD" && (h.ctrlKey || h.metaKey ? t.expandNodeAll(m.previousSibling) : t.expandNode(m.previousSibling));
658
- }, d = (h) => {
658
+ }, l = (h) => {
659
659
  if (!t.editable) return;
660
660
  const m = h.target;
661
661
  if (J(m)) {
662
662
  t.selectNode(m), t.beginEdit(m);
663
663
  return;
664
664
  }
665
- a(m, !0);
666
- }, p = (h) => {
665
+ d(m, !0);
666
+ }, u = (h) => {
667
667
  if (h.pointerType === "touch" && r.handlePointerDown(h)) {
668
- t.ptState = i.Pinch, l.clear(), e.clear(), (c.isDragging || c.pointerId !== null) && pt(t, c);
668
+ t.ptState = i.Pinch, a.clear(), e.clear(), (c.isDragging || c.pointerId !== null) && pt(t, c);
669
669
  return;
670
670
  }
671
671
  if (t.ptState === i.Pinch) return;
@@ -679,18 +679,18 @@ function Ne(t) {
679
679
  t.selection?.cancel();
680
680
  const E = t.currentNodes || [];
681
681
  if (h.ctrlKey || h.metaKey || t.mobileMultiSelect ? E.includes(m) ? o = m : ((t.currentArrow || t.currentSummary) && t.clearSelection(), t.selection?.select(m)) : E.includes(m) || t.selectNode(m), !t.editable) return;
682
- h.pointerType === "touch" ? (t.ptState = i.DragWait, l.start(h, (M) => {
682
+ h.pointerType === "touch" ? (t.ptState = i.DragWait, a.start(h, (M) => {
683
683
  ut(t, c, M, !0) && (t.ptState = i.Drag, m.setPointerCapture(M.pointerId));
684
684
  })) : ut(t, c, h, !1) && (t.ptState = i.Drag, m.setPointerCapture(h.pointerId));
685
685
  } else
686
- a(m, !1);
687
- }, b = (h) => {
686
+ d(m, !1);
687
+ }, g = (h) => {
688
688
  switch (t.ptState) {
689
689
  case i.Pinch:
690
690
  r.handlePointerMove(h);
691
691
  break;
692
692
  case i.DragWait:
693
- l.handleMove(h), l.timer === null && (t.ptState = i.Idle);
693
+ a.handleMove(h), a.timer === null && (t.ptState = i.Idle);
694
694
  break;
695
695
  case i.Drag:
696
696
  Ft(t, c, h);
@@ -704,7 +704,7 @@ function Ne(t) {
704
704
  const m = c.isDragging, w = e.moved;
705
705
  switch (t.ptState) {
706
706
  case i.DragWait:
707
- l.clear();
707
+ a.clear();
708
708
  break;
709
709
  case i.Drag:
710
710
  Gt(t, c, h);
@@ -713,10 +713,10 @@ function Ne(t) {
713
713
  e.handlePointerUp(h);
714
714
  break;
715
715
  }
716
- s.detect(h, d), (t.ptState !== i.Pinch || r.activePointers.size < 2) && (t.ptState = i.Idle), o && (!m && !w && t.selection?.deselect(o), o = null);
717
- }, u = () => {
718
- r.clear(), l.clear(), e.clear(), s.clear(), (c.isDragging || c.pointerId !== null) && pt(t, c), t.ptState = i.Idle, o = null;
719
- }, g = (h) => {
716
+ s.detect(h, l), (t.ptState !== i.Pinch || r.activePointers.size < 2) && (t.ptState = i.Idle), o && (!m && !w && t.selection?.deselect(o), o = null);
717
+ }, p = () => {
718
+ r.clear(), a.clear(), e.clear(), s.clear(), (c.isDragging || c.pointerId !== null) && pt(t, c), t.ptState = i.Idle, o = null;
719
+ }, b = (h) => {
720
720
  h.preventDefault(), h.button === 2 && t.editable && setTimeout(() => {
721
721
  if (t.panHelper.moved || t.ptState !== i.Idle && t.ptState !== i.Pan) return;
722
722
  const m = h.target;
@@ -732,14 +732,14 @@ function Ne(t) {
732
732
  h.code === "Space" && (t.spacePressed = !1, t.container.classList.remove("space-pressed"));
733
733
  };
734
734
  return vt([
735
- { dom: n, evt: "pointerdown", func: p },
736
- { dom: n, evt: "pointermove", func: b },
735
+ { dom: n, evt: "pointerdown", func: u },
736
+ { dom: n, evt: "pointermove", func: g },
737
737
  { dom: n, evt: "pointerup", func: y },
738
- { dom: n, evt: "pointercancel", func: u },
738
+ { dom: n, evt: "pointercancel", func: p },
739
739
  { dom: n, evt: "click", func: f },
740
- { dom: n, evt: "contextmenu", func: g },
740
+ { dom: n, evt: "contextmenu", func: b },
741
741
  { dom: n, evt: "wheel", func: typeof t.handleWheel == "function" ? t.handleWheel : x },
742
- { dom: n, evt: "blur", func: u },
742
+ { dom: n, evt: "blur", func: p },
743
743
  { dom: n, evt: "keydown", func: v },
744
744
  { dom: n, evt: "keyup", func: C }
745
745
  ]);
@@ -773,10 +773,10 @@ const k = "http://www.w3.org/2000/svg", U = function(t) {
773
773
  let c = s;
774
774
  r === "middle" ? c = s - e / 2 : r === "end" && (c = s - e), t.style.left = `${c}px`, t.style.top = `${i - n / 2}px`, t.style.visibility = "visible";
775
775
  }, Q = function(t, e, n, o) {
776
- const { anchor: s = "middle", color: i, dataType: r, svgId: c } = o, l = document.createElement("div");
777
- l.className = "svg-label", l.style.color = i || "#666";
778
- const a = "label-" + c;
779
- return l.id = a, l.innerHTML = t, l.dataset.type = r, l.dataset.svgId = c, l.dataset.x = e.toString(), l.dataset.y = n.toString(), l.dataset.anchor = s, l;
776
+ const { anchor: s = "middle", color: i, dataType: r, svgId: c } = o, a = document.createElement("div");
777
+ a.className = "svg-label", a.style.color = i || "#666";
778
+ const d = "label-" + c;
779
+ return a.id = d, a.innerHTML = t, a.dataset.type = r, a.dataset.svgId = c, a.dataset.x = e.toString(), a.dataset.y = n.toString(), a.dataset.anchor = s, a;
780
780
  }, Dt = function(t, e, n) {
781
781
  const o = document.createElementNS(k, "path");
782
782
  return D(o, {
@@ -807,21 +807,21 @@ const k = "http://www.w3.org/2000/svg", U = function(t) {
807
807
  d: n
808
808
  }
809
809
  ].forEach((r, c) => {
810
- const l = r.d, a = document.createElementNS(k, "path"), f = {
811
- d: l,
810
+ const a = r.d, d = document.createElementNS(k, "path"), f = {
811
+ d: a,
812
812
  stroke: o?.stroke || "rgb(227, 125, 116)",
813
813
  fill: "none",
814
814
  "stroke-linecap": o?.strokeLinecap || "cap",
815
815
  "stroke-width": String(o?.strokeWidth || "2")
816
816
  };
817
- o?.opacity !== void 0 && (f.opacity = String(o.opacity)), D(a, f), c === 0 && a.setAttribute("stroke-dasharray", o?.strokeDasharray || "8,2");
818
- const d = document.createElementNS(k, "path");
819
- D(d, {
820
- d: l,
817
+ o?.opacity !== void 0 && (f.opacity = String(o.opacity)), D(d, f), c === 0 && d.setAttribute("stroke-dasharray", o?.strokeDasharray || "8,2");
818
+ const l = document.createElementNS(k, "path");
819
+ D(l, {
820
+ d: a,
821
821
  stroke: "transparent",
822
822
  fill: "none",
823
823
  "stroke-width": "15"
824
- }), s.appendChild(d), s.appendChild(a), s[r.name] = a;
824
+ }), s.appendChild(l), s.appendChild(d), s[r.name] = d;
825
825
  }), s;
826
826
  }, Lt = function(t, e, n) {
827
827
  if (!e) return;
@@ -854,26 +854,26 @@ const k = "http://www.w3.org/2000/svg", U = function(t) {
854
854
  const e = this.map.querySelector("me-root"), n = e.offsetTop, o = e.offsetLeft, s = e.offsetWidth, i = e.offsetHeight, r = this.map.querySelectorAll("me-main > me-wrapper");
855
855
  this.lines.innerHTML = "";
856
856
  for (let c = 0; c < r.length; c++) {
857
- const l = r[c], a = l.querySelector("me-tpc"), { offsetLeft: f, offsetTop: d } = P(this.nodes, a), p = a.offsetWidth, b = a.offsetHeight, y = l.parentNode.className, u = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: d, cL: f, cW: p, cH: b, direction: y, containerHeight: this.nodes.offsetHeight }), g = this.theme.palette, x = a.nodeObj.branchColor || g[c % g.length];
858
- if (a.style.borderColor = x, this.lines.appendChild(Dt(u, x, "3")), t && t !== l)
857
+ const a = r[c], d = a.querySelector("me-tpc"), { offsetLeft: f, offsetTop: l } = P(this.nodes, d), u = d.offsetWidth, g = d.offsetHeight, y = a.parentNode.className, p = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: l, cL: f, cW: u, cH: g, direction: y, containerHeight: this.nodes.offsetHeight }), b = this.theme.palette, x = d.nodeObj.branchColor || b[c % b.length];
858
+ if (d.style.borderColor = x, this.lines.appendChild(Dt(p, x, "3")), t && t !== a)
859
859
  continue;
860
- const v = R("subLines"), C = l.lastChild;
861
- C.tagName === "svg" && C.remove(), l.appendChild(v), Mt(this, v, x, l, y, !0);
860
+ const v = R("subLines"), C = a.lastChild;
861
+ C.tagName === "svg" && C.remove(), a.appendChild(v), Mt(this, v, x, a, y, !0);
862
862
  }
863
863
  this.labelContainer.innerHTML = "", this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
864
864
  }, Mt = function(t, e, n, o, s, i) {
865
865
  const r = o.firstChild, c = o.children[1].children;
866
866
  if (c.length === 0) return;
867
- const l = r.offsetTop, a = r.offsetLeft, f = r.offsetWidth, d = r.offsetHeight;
868
- for (let p = 0; p < c.length; p++) {
869
- const b = c[p], y = b.firstChild, u = y.offsetTop, g = y.offsetLeft, x = y.offsetWidth, v = y.offsetHeight, C = y.firstChild.nodeObj.branchColor || n, T = t.generateSubBranch({ pT: l, pL: a, pW: f, pH: d, cT: u, cL: g, cW: x, cH: v, direction: s, isFirst: i });
867
+ const a = r.offsetTop, d = r.offsetLeft, f = r.offsetWidth, l = r.offsetHeight;
868
+ for (let u = 0; u < c.length; u++) {
869
+ const g = c[u], y = g.firstChild, p = y.offsetTop, b = y.offsetLeft, x = y.offsetWidth, v = y.offsetHeight, C = y.firstChild.nodeObj.branchColor || n, T = t.generateSubBranch({ pT: a, pL: d, pW: f, pH: l, cT: p, cL: b, cW: x, cH: v, direction: s, isFirst: i });
870
870
  e.appendChild(Dt(T, C, "2"));
871
871
  const h = y.children[1];
872
872
  if (h) {
873
873
  if (!h.expanded) continue;
874
874
  } else
875
875
  continue;
876
- Mt(t, e, C, b, s);
876
+ Mt(t, e, C, g, s);
877
877
  }
878
878
  }, Oe = '<?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>', Be = '<?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>', Ye = '<?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>', We = '<?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>', Re = '<?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>', Xe = '<?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>', Ve = '<?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>', ze = {
879
879
  side: Oe,
@@ -892,20 +892,20 @@ function Fe(t) {
892
892
  e.appendChild(n), e.appendChild(o), e.appendChild(s), e.appendChild(i), e.className = "mind-elixir-toolbar rb";
893
893
  let r = null;
894
894
  const c = () => {
895
- const a = t.container.getBoundingClientRect(), f = st(t.map.style.transform), d = a.width / 2, p = a.height / 2, b = (d - f.x) / t.scaleVal, y = (p - f.y) / t.scaleVal;
895
+ const d = t.container.getBoundingClientRect(), f = st(t.map.style.transform), l = d.width / 2, u = d.height / 2, g = (l - f.x) / t.scaleVal, y = (u - f.y) / t.scaleVal;
896
896
  r = {
897
- containerRect: a,
897
+ containerRect: d,
898
898
  currentTransform: f,
899
- mapCenterX: b,
899
+ mapCenterX: g,
900
900
  mapCenterY: y
901
901
  };
902
- }, l = () => {
902
+ }, a = () => {
903
903
  if (r) {
904
- const a = t.container.getBoundingClientRect(), f = a.width / 2, d = a.height / 2, p = f - r.mapCenterX * t.scaleVal, b = d - r.mapCenterY * t.scaleVal, y = p - r.currentTransform.x, u = b - r.currentTransform.y;
905
- t.move(y, u);
904
+ const d = t.container.getBoundingClientRect(), f = d.width / 2, l = d.height / 2, u = f - r.mapCenterX * t.scaleVal, g = l - r.mapCenterY * t.scaleVal, y = u - r.currentTransform.x, p = g - r.currentTransform.y;
905
+ t.move(y, p);
906
906
  }
907
907
  };
908
- return t.el.addEventListener("fullscreenchange", l), n.onclick = () => {
908
+ return t.el.addEventListener("fullscreenchange", a), n.onclick = () => {
909
909
  c(), document.fullscreenElement !== t.el ? t.el.requestFullscreen() : document.exitFullscreen();
910
910
  }, o.onclick = () => {
911
911
  t.toCenter();
@@ -928,22 +928,22 @@ function Ge(t) {
928
928
  function je(t) {
929
929
  t.container.append(Fe(t)), t.container.append(Ge(t));
930
930
  }
931
- function Pt({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: a }) {
931
+ function Pt({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: a, containerHeight: d }) {
932
932
  let f = e + n / 2;
933
- const d = t + o / 2;
934
- let p;
935
- l === B.LHS ? p = i + r : p = i;
936
- const b = s + c / 2, u = (1 - Math.abs(b - d) / a) * 0.25 * (n / 2);
937
- return l === B.LHS ? f = f - n / 10 - u : f = f + n / 10 + u, `M ${f} ${d} Q ${f} ${b} ${p} ${b}`;
933
+ const l = t + o / 2;
934
+ let u;
935
+ a === B.LHS ? u = i + r : u = i;
936
+ const g = s + c / 2, p = (1 - Math.abs(g - l) / d) * 0.25 * (n / 2);
937
+ return a === B.LHS ? f = f - n / 10 - p : f = f + n / 10 + p, `M ${f} ${l} Q ${f} ${g} ${u} ${g}`;
938
938
  }
939
- function kt({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: a }) {
939
+ function kt({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: a, isFirst: d }) {
940
940
  const f = parseInt(this.container.style.getPropertyValue("--node-gap-x"));
941
- let d = 0, p = 0;
942
- a ? d = t + o / 2 : d = t + o;
943
- const b = s + c;
944
- let y = 0, u = 0, g = 0;
945
- const x = Math.abs(d - b) / 300 * f;
946
- return l === B.LHS ? (g = e, y = g + f, u = g - f, p = i + f, `M ${y} ${d} C ${g} ${d} ${g + x} ${b} ${u} ${b} H ${p}`) : (g = e + n, y = g - f, u = g + f, p = i + r - f, `M ${y} ${d} C ${g} ${d} ${g - x} ${b} ${u} ${b} H ${p}`);
941
+ let l = 0, u = 0;
942
+ d ? l = t + o / 2 : l = t + o;
943
+ const g = s + c;
944
+ let y = 0, p = 0, b = 0;
945
+ const x = Math.abs(l - g) / 300 * f;
946
+ return a === B.LHS ? (b = e, y = b + f, p = b - f, u = i + f, `M ${y} ${l} C ${b} ${l} ${b + x} ${g} ${p} ${g} H ${u}`) : (b = e + n, y = b - f, p = b + f, u = i + r - f, `M ${y} ${l} C ${b} ${l} ${b - x} ${g} ${p} ${g} H ${u}`);
947
947
  }
948
948
  const _e = function(t, e = !0) {
949
949
  this.theme = t, this.generateMainBranch = this.theme.generateMainBranch || Pt, this.generateSubBranch = this.theme.generateSubBranch || kt;
@@ -1015,48 +1015,40 @@ function O(t, e, n, o, s) {
1015
1015
  y2: s + ""
1016
1016
  });
1017
1017
  }
1018
- function tt(t, e, n, o, s, i, r, c, l, a) {
1019
- const f = `M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${l}`;
1020
- if (t.line.setAttribute("d", f), a.style) {
1021
- const u = a.style;
1022
- u.stroke && t.line.setAttribute("stroke", u.stroke), u.strokeWidth && t.line.setAttribute("stroke-width", String(u.strokeWidth)), u.strokeDasharray && t.line.setAttribute("stroke-dasharray", u.strokeDasharray), u.strokeLinecap && t.line.setAttribute("stroke-linecap", u.strokeLinecap), u.opacity !== void 0 && t.line.setAttribute("opacity", String(u.opacity));
1018
+ function tt(t, e, n, o, s, i, r, c, a, d) {
1019
+ const f = `M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${a}`;
1020
+ t.line.setAttribute("d", f);
1021
+ const l = d.style || {};
1022
+ t.line.setAttribute("stroke", l.stroke || "rgb(227, 125, 116)"), t.line.setAttribute("stroke-width", String(l.strokeWidth || "2")), t.line.setAttribute("stroke-dasharray", l.strokeDasharray || "8,2"), t.line.setAttribute("stroke-linecap", l.strokeLinecap || "cap"), l.opacity !== void 0 && l.opacity !== null && l.opacity !== "" ? t.line.setAttribute("opacity", String(l.opacity)) : t.line.removeAttribute("opacity");
1023
+ const u = t.querySelectorAll('path[stroke="transparent"]');
1024
+ u.length > 0 && u[0].setAttribute("d", f);
1025
+ const g = _(i, r, c, a);
1026
+ if (g) {
1027
+ const x = `M ${g.x1} ${g.y1} L ${c} ${a} L ${g.x2} ${g.y2}`;
1028
+ t.arrow1.setAttribute("d", x), u.length > 1 && u[1].setAttribute("d", x), t.arrow1.setAttribute("stroke", l.stroke || "rgb(227, 125, 116)"), t.arrow1.setAttribute("stroke-width", String(l.strokeWidth || "2")), t.arrow1.setAttribute("stroke-linecap", l.strokeLinecap || "cap"), l.opacity !== void 0 && l.opacity !== null && l.opacity !== "" ? t.arrow1.setAttribute("opacity", String(l.opacity)) : t.arrow1.removeAttribute("opacity");
1023
1029
  }
1024
- const d = t.querySelectorAll('path[stroke="transparent"]');
1025
- d.length > 0 && d[0].setAttribute("d", f);
1026
- const p = _(i, r, c, l);
1027
- if (p) {
1028
- const u = `M ${p.x1} ${p.y1} L ${c} ${l} L ${p.x2} ${p.y2}`;
1029
- if (t.arrow1.setAttribute("d", u), d.length > 1 && d[1].setAttribute("d", u), a.style) {
1030
- const g = a.style;
1031
- g.stroke && t.arrow1.setAttribute("stroke", g.stroke), g.strokeWidth && t.arrow1.setAttribute("stroke-width", String(g.strokeWidth)), g.strokeLinecap && t.arrow1.setAttribute("stroke-linecap", g.strokeLinecap), g.opacity !== void 0 && t.arrow1.setAttribute("opacity", String(g.opacity));
1032
- }
1033
- }
1034
- if (a.bidirectional) {
1035
- const u = _(o, s, e, n);
1036
- if (u) {
1037
- const g = `M ${u.x1} ${u.y1} L ${e} ${n} L ${u.x2} ${u.y2}`;
1038
- if (t.arrow2.setAttribute("d", g), d.length > 2 && d[2].setAttribute("d", g), a.style) {
1039
- const x = a.style;
1040
- x.stroke && t.arrow2.setAttribute("stroke", x.stroke), x.strokeWidth && t.arrow2.setAttribute("stroke-width", String(x.strokeWidth)), x.strokeLinecap && t.arrow2.setAttribute("stroke-linecap", x.strokeLinecap), x.opacity !== void 0 && t.arrow2.setAttribute("opacity", String(x.opacity));
1041
- }
1030
+ if (d.bidirectional) {
1031
+ const x = _(o, s, e, n);
1032
+ if (x) {
1033
+ const v = `M ${x.x1} ${x.y1} L ${e} ${n} L ${x.x2} ${x.y2}`;
1034
+ t.arrow2.setAttribute("d", v), u.length > 2 && u[2].setAttribute("d", v);
1042
1035
  }
1043
1036
  } else
1044
- t.arrow2.setAttribute("d", ""), d.length > 2 && d[2].setAttribute("d", "");
1045
- const { x: b, y } = Nt(e, n, o, s, i, r, c, l);
1046
- if (t.labelEl && Ke(t.labelEl, b, y), a.style?.labelColor) {
1047
- const u = t.labelEl;
1048
- u && (u.style.color = a.style.labelColor);
1049
- }
1050
- on(t);
1037
+ t.arrow2.setAttribute("d", ""), u.length > 2 && u[2].setAttribute("d", "");
1038
+ t.arrow2.setAttribute("stroke", l.stroke || "rgb(227, 125, 116)"), t.arrow2.setAttribute("stroke-width", String(l.strokeWidth || "2")), t.arrow2.setAttribute("stroke-linecap", l.strokeLinecap || "cap"), l.opacity !== void 0 && l.opacity !== null && l.opacity !== "" ? t.arrow2.setAttribute("opacity", String(l.opacity)) : t.arrow2.removeAttribute("opacity");
1039
+ const { x: y, y: p } = Nt(e, n, o, s, i, r, c, a);
1040
+ t.labelEl && Ke(t.labelEl, y, p);
1041
+ const b = t.labelEl;
1042
+ b && (b.style.color = l.labelColor || "rgb(235, 95, 82)"), on(t);
1051
1043
  }
1052
1044
  function Y(t, e, n) {
1053
- const { offsetLeft: o, offsetTop: s } = P(t.nodes, e), i = e.offsetWidth, r = e.offsetHeight, c = o + i / 2, l = s + r / 2, a = c + n.x, f = l + n.y;
1045
+ const { offsetLeft: o, offsetTop: s } = P(t.nodes, e), i = e.offsetWidth, r = e.offsetHeight, c = o + i / 2, a = s + r / 2, d = c + n.x, f = a + n.y;
1054
1046
  return {
1055
1047
  w: i,
1056
1048
  h: r,
1057
1049
  cx: c,
1058
- cy: l,
1059
- ctrlX: a,
1050
+ cy: a,
1051
+ ctrlX: d,
1060
1052
  ctrlY: f
1061
1053
  };
1062
1054
  }
@@ -1069,24 +1061,24 @@ function H(t) {
1069
1061
  };
1070
1062
  }
1071
1063
  const $t = function(t, e, n) {
1072
- const o = P(t.nodes, e), s = P(t.nodes, n), i = o.offsetLeft + e.offsetWidth / 2, r = o.offsetTop + e.offsetHeight / 2, c = s.offsetLeft + n.offsetWidth / 2, l = s.offsetTop + n.offsetHeight / 2, a = c - i, f = l - r, d = Math.sqrt(a * a + f * f), p = Math.max(50, Math.min(200, d * 0.3)), b = Math.abs(a), y = Math.abs(f);
1073
- let u, g;
1074
- if (d < 150) {
1064
+ const o = P(t.nodes, e), s = P(t.nodes, n), i = o.offsetLeft + e.offsetWidth / 2, r = o.offsetTop + e.offsetHeight / 2, c = s.offsetLeft + n.offsetWidth / 2, a = s.offsetTop + n.offsetHeight / 2, d = c - i, f = a - r, l = Math.sqrt(d * d + f * f), u = Math.max(50, Math.min(200, l * 0.3)), g = Math.abs(d), y = Math.abs(f);
1065
+ let p, b;
1066
+ if (l < 150) {
1075
1067
  const v = e.closest("me-main").className === "lhs" ? -1 : 1;
1076
- u = { x: 200 * v, y: 0 }, g = { x: 200 * v, y: 0 };
1077
- } else if (b > y * 1.5) {
1078
- const v = a > 0 ? e.offsetWidth / 2 : -e.offsetWidth / 2, C = a > 0 ? -n.offsetWidth / 2 : n.offsetWidth / 2;
1079
- u = { x: v + (a > 0 ? p : -p), y: 0 }, g = { x: C + (a > 0 ? -p : p), y: 0 };
1080
- } else if (y > b * 1.5) {
1068
+ p = { x: 200 * v, y: 0 }, b = { x: 200 * v, y: 0 };
1069
+ } else if (g > y * 1.5) {
1070
+ const v = d > 0 ? e.offsetWidth / 2 : -e.offsetWidth / 2, C = d > 0 ? -n.offsetWidth / 2 : n.offsetWidth / 2;
1071
+ p = { x: v + (d > 0 ? u : -u), y: 0 }, b = { x: C + (d > 0 ? -u : u), y: 0 };
1072
+ } else if (y > g * 1.5) {
1081
1073
  const v = f > 0 ? e.offsetHeight / 2 : -e.offsetHeight / 2, C = f > 0 ? -n.offsetHeight / 2 : n.offsetHeight / 2;
1082
- u = { x: 0, y: v + (f > 0 ? p : -p) }, g = { x: 0, y: C + (f > 0 ? -p : p) };
1074
+ p = { x: 0, y: v + (f > 0 ? u : -u) }, b = { x: 0, y: C + (f > 0 ? -u : u) };
1083
1075
  } else {
1084
- const v = Math.atan2(f, a), C = e.offsetWidth / 2 * Math.cos(v), T = e.offsetHeight / 2 * Math.sin(v), h = -(n.offsetWidth / 2) * Math.cos(v), m = -(n.offsetHeight / 2) * Math.sin(v), w = p * 0.7 * (a > 0 ? 1 : -1), E = p * 0.7 * (f > 0 ? 1 : -1);
1085
- u = { x: C + w, y: T + E }, g = { x: h - w, y: m - E };
1076
+ const v = Math.atan2(f, d), C = e.offsetWidth / 2 * Math.cos(v), T = e.offsetHeight / 2 * Math.sin(v), h = -(n.offsetWidth / 2) * Math.cos(v), m = -(n.offsetHeight / 2) * Math.sin(v), w = u * 0.7 * (d > 0 ? 1 : -1), E = u * 0.7 * (f > 0 ? 1 : -1);
1077
+ p = { x: C + w, y: T + E }, b = { x: h - w, y: m - E };
1086
1078
  }
1087
1079
  return {
1088
- delta1: { x: Math.round(u.x), y: Math.round(u.y) },
1089
- delta2: { x: Math.round(g.x), y: Math.round(g.y) }
1080
+ delta1: { x: Math.round(p.x), y: Math.round(p.y) },
1081
+ delta2: { x: Math.round(b.x), y: Math.round(b.y) }
1090
1082
  };
1091
1083
  }, rt = function(t, e, n, o, s) {
1092
1084
  if (!e || !n)
@@ -1095,16 +1087,16 @@ const $t = function(t, e, n) {
1095
1087
  const S = $t(t, e, n);
1096
1088
  o.delta1 = S.delta1, o.delta2 = S.delta2;
1097
1089
  }
1098
- const i = Y(t, e, o.delta1), r = Y(t, n, o.delta2), { x: c, y: l } = H(i), { ctrlX: a, ctrlY: f } = i, { ctrlX: d, ctrlY: p } = r, { x: b, y } = H(r), u = _(d, p, b, y);
1099
- if (!u) return;
1100
- const g = `M ${u.x1} ${u.y1} L ${b} ${y} L ${u.x2} ${u.y2}`;
1090
+ const i = Y(t, e, o.delta1), r = Y(t, n, o.delta2), { x: c, y: a } = H(i), { ctrlX: d, ctrlY: f } = i, { ctrlX: l, ctrlY: u } = r, { x: g, y } = H(r), p = _(l, u, g, y);
1091
+ if (!p) return;
1092
+ const b = `M ${p.x1} ${p.y1} L ${g} ${y} L ${p.x2} ${p.y2}`;
1101
1093
  let x = "";
1102
1094
  if (o.bidirectional) {
1103
- const S = _(a, f, c, l);
1095
+ const S = _(d, f, c, a);
1104
1096
  if (!S) return;
1105
- x = `M ${S.x1} ${S.y1} L ${c} ${l} L ${S.x2} ${S.y2}`;
1097
+ x = `M ${S.x1} ${S.y1} L ${c} ${a} L ${S.x2} ${S.y2}`;
1106
1098
  }
1107
- const v = He(`M ${c} ${l} C ${a} ${f} ${d} ${p} ${b} ${y}`, g, x, o.style), { x: C, y: T } = Nt(c, l, a, f, d, p, b, y), h = o.style?.labelColor || "rgb(235, 95, 82)", m = "a-" + o.id;
1099
+ const v = He(`M ${c} ${a} C ${d} ${f} ${l} ${u} ${g} ${y}`, b, x, o.style), { x: C, y: T } = Nt(c, a, d, f, l, u, g, y), h = o.style?.labelColor || "rgb(235, 95, 82)", m = "a-" + o.id;
1108
1100
  v.id = m;
1109
1101
  const w = t.markdown ? t.markdown(o.label, o) : o.label, E = Q(w, C, T, {
1110
1102
  anchor: "middle",
@@ -1181,18 +1173,18 @@ const $t = function(t, e, n) {
1181
1173
  }, K = function(t) {
1182
1174
  t.helper1?.destroy(), t.helper2?.destroy(), t.linkController.style.display = "none", t.P2.style.display = "none", t.P3.style.display = "none", t.currentArrow && nn(t.currentArrow);
1183
1175
  }, It = function(t, e, n, o) {
1184
- const { linkController: s, P2: i, P3: r, line1: c, line2: l, nodes: a, map: f, currentArrow: d, bus: p } = t;
1185
- if (!d) return;
1186
- s.style.display = "initial", i.style.display = "initial", r.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(r), Ht(d, At);
1187
- let { x: b, y } = H(n), { ctrlX: u, ctrlY: g } = n, { ctrlX: x, ctrlY: v } = o, { x: C, y: T } = H(o);
1188
- i.style.cssText = `top:${g}px;left:${u}px;`, r.style.cssText = `top:${v}px;left:${x}px;`, O(c, b, y, u, g), O(l, x, v, C, T), t.helper1 = mt.create(i), t.helper2 = mt.create(r), t.helper1.init(f, (h, m) => {
1189
- u = u + h / t.scaleVal, g = g + m / t.scaleVal;
1190
- const w = H({ ...n, ctrlX: u, ctrlY: g });
1191
- b = w.x, y = w.y, i.style.top = g + "px", i.style.left = u + "px", tt(d, b, y, u, g, x, v, C, T, e), O(c, b, y, u, g), e.delta1.x = Math.round(u - n.cx), e.delta1.y = Math.round(g - n.cy), p.fire("updateArrowDelta", e);
1176
+ const { linkController: s, P2: i, P3: r, line1: c, line2: a, nodes: d, map: f, currentArrow: l, bus: u } = t;
1177
+ if (!l) return;
1178
+ s.style.display = "initial", i.style.display = "initial", r.style.display = "initial", d.appendChild(s), d.appendChild(i), d.appendChild(r), Ht(l, At);
1179
+ let { x: g, y } = H(n), { ctrlX: p, ctrlY: b } = n, { ctrlX: x, ctrlY: v } = o, { x: C, y: T } = H(o);
1180
+ i.style.cssText = `top:${b}px;left:${p}px;`, r.style.cssText = `top:${v}px;left:${x}px;`, O(c, g, y, p, b), O(a, x, v, C, T), t.helper1 = mt.create(i), t.helper2 = mt.create(r), t.helper1.init(f, (h, m) => {
1181
+ p = p + h / t.scaleVal, b = b + m / t.scaleVal;
1182
+ const w = H({ ...n, ctrlX: p, ctrlY: b });
1183
+ g = w.x, y = w.y, i.style.top = b + "px", i.style.left = p + "px", tt(l, g, y, p, b, x, v, C, T, e), O(c, g, y, p, b), e.delta1.x = Math.round(p - n.cx), e.delta1.y = Math.round(b - n.cy), u.fire("updateArrowDelta", e);
1192
1184
  }), t.helper2.init(f, (h, m) => {
1193
1185
  x = x + h / t.scaleVal, v = v + m / t.scaleVal;
1194
1186
  const w = H({ ...o, ctrlX: x, ctrlY: v });
1195
- C = w.x, T = w.y, r.style.top = v + "px", r.style.left = x + "px", tt(d, b, y, u, g, x, v, C, T, e), O(l, x, v, C, T), e.delta2.x = Math.round(x - o.cx), e.delta2.y = Math.round(v - o.cy), p.fire("updateArrowDelta", e);
1187
+ C = w.x, T = w.y, r.style.top = v + "px", r.style.left = x + "px", tt(l, g, y, p, b, x, v, C, T, e), O(a, x, v, C, T), e.delta2.x = Math.round(x - o.cx), e.delta2.y = Math.round(v - o.cy), u.fire("updateArrowDelta", e);
1196
1188
  });
1197
1189
  };
1198
1190
  function sn() {
@@ -1224,11 +1216,11 @@ const ln = function(t, e) {
1224
1216
  const s = this.findEle(t.from), i = this.findEle(t.to);
1225
1217
  if (s && i) {
1226
1218
  if (!t.delta1 || !t.delta2) {
1227
- const g = $t(this, s, i);
1228
- t.delta1 = t.delta1 || g.delta1, t.delta2 = t.delta2 || g.delta2;
1219
+ const b = $t(this, s, i);
1220
+ t.delta1 = t.delta1 || b.delta1, t.delta2 = t.delta2 || b.delta2;
1229
1221
  }
1230
- const r = Y(this, s, t.delta1), c = Y(this, i, t.delta2), { x: l, y: a } = H(r), { ctrlX: f, ctrlY: d } = r, { ctrlX: p, ctrlY: b } = c, { x: y, y: u } = H(c);
1231
- tt(o, l, a, f, d, p, b, y, u, t), this.currentArrow?.arrowObj?.id === t.id && (this.P2.style.cssText = `top:${d}px;left:${f}px;`, this.P3.style.cssText = `top:${b}px;left:${p}px;`, O(this.line1, l, a, f, d), O(this.line2, p, b, y, u));
1222
+ const r = Y(this, s, t.delta1), c = Y(this, i, t.delta2), { x: a, y: d } = H(r), { ctrlX: f, ctrlY: l } = r, { ctrlX: u, ctrlY: g } = c, { x: y, y: p } = H(c);
1223
+ tt(o, a, d, f, l, u, g, y, p, t), this.currentArrow?.arrowObj?.id === t.id && (this.P2.style.cssText = `top:${l}px;left:${f}px;`, this.P3.style.cssText = `top:${g}px;left:${u}px;`, O(this.line1, a, d, f, l), O(this.line2, u, g, y, p));
1232
1224
  }
1233
1225
  }
1234
1226
  this.bus.fire("operation", {
@@ -1250,34 +1242,34 @@ const ln = function(t, e) {
1250
1242
  }, Symbol.toStringTag, { value: "Module" })), hn = function(t) {
1251
1243
  if (t.length === 0) throw new Error("No selected node.");
1252
1244
  if (t.length === 1) {
1253
- const l = t[0].nodeObj, a = t[0].nodeObj.parent;
1254
- if (!a) throw new Error("Can not select root node.");
1255
- const f = a.children.findIndex((d) => l === d);
1245
+ const a = t[0].nodeObj, d = t[0].nodeObj.parent;
1246
+ if (!d) throw new Error("Can not select root node.");
1247
+ const f = d.children.findIndex((l) => a === l);
1256
1248
  return {
1257
- parent: a.id,
1249
+ parent: d.id,
1258
1250
  start: f,
1259
1251
  end: f
1260
1252
  };
1261
1253
  }
1262
1254
  let e = 0;
1263
- const n = t.map((l) => {
1264
- let a = l.nodeObj;
1255
+ const n = t.map((a) => {
1256
+ let d = a.nodeObj;
1265
1257
  const f = [];
1266
- for (; a.parent; ) {
1267
- const d = a.parent, b = d.children?.indexOf(a);
1268
- a = d, f.unshift({ node: a, index: b });
1258
+ for (; d.parent; ) {
1259
+ const l = d.parent, g = l.children?.indexOf(d);
1260
+ d = l, f.unshift({ node: d, index: g });
1269
1261
  }
1270
1262
  return f.length > e && (e = f.length), f;
1271
1263
  });
1272
1264
  let o = 0;
1273
1265
  t: for (; o < e; o++) {
1274
- const l = n[0][o]?.node;
1275
- for (let a = 1; a < n.length; a++)
1276
- if (n[a][o]?.node !== l)
1266
+ const a = n[0][o]?.node;
1267
+ for (let d = 1; d < n.length; d++)
1268
+ if (n[d][o]?.node !== a)
1277
1269
  break t;
1278
1270
  }
1279
1271
  if (!o) throw new Error("Can not select root node.");
1280
- const s = n.map((l) => l[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0, c = n[0][o - 1].node;
1272
+ const s = n.map((a) => a[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0, c = n[0][o - 1].node;
1281
1273
  if (!c.parent) throw new Error("Please select nodes in the same main topic.");
1282
1274
  return {
1283
1275
  parent: c.id,
@@ -1301,24 +1293,24 @@ const ln = function(t, e) {
1301
1293
  let i;
1302
1294
  return s.parent ? i = o.closest("me-main").className : i = t.findEle(s.children[n].id).closest("me-main").className, i;
1303
1295
  }, ct = function(t, e) {
1304
- const { id: n, label: o, parent: s, start: i, end: r, style: c } = e, { nodes: l, theme: a, summarySvg: f } = t, p = t.findEle(s).nodeObj, b = un(t, e);
1305
- let y = 1 / 0, u = 0, g = 0, x = 0;
1296
+ const { id: n, label: o, parent: s, start: i, end: r, style: c } = e, { nodes: a, theme: d, summarySvg: f } = t, u = t.findEle(s).nodeObj, g = un(t, e);
1297
+ let y = 1 / 0, p = 0, b = 0, x = 0;
1306
1298
  for (let W = i; W <= r; W++) {
1307
- const lt = p.children?.[W];
1299
+ const lt = u.children?.[W];
1308
1300
  if (!lt)
1309
1301
  return t.removeSummary(n), null;
1310
- const V = fn(t.findEle(lt.id)), { offsetLeft: z, offsetTop: at } = P(l, V), ht = i === r ? 10 : 20;
1311
- W === i && (g = at + ht), W === r && (x = at + V.offsetHeight - ht), z < y && (y = z), V.offsetWidth + z > u && (u = V.offsetWidth + z);
1302
+ const V = fn(t.findEle(lt.id)), { offsetLeft: z, offsetTop: at } = P(a, V), ht = i === r ? 10 : 20;
1303
+ W === i && (b = at + ht), W === r && (x = at + V.offsetHeight - ht), z < y && (y = z), V.offsetWidth + z > p && (p = V.offsetWidth + z);
1312
1304
  }
1313
1305
  let v, C;
1314
- const T = p.parent ? 10 : 0, h = g + T, m = x + T, w = (h + m) / 2, E = c?.stroke || a.cssVar["--color"], S = c?.labelColor || a.cssVar["--color"], M = "s-" + n, A = t.markdown ? t.markdown(o, e) : o;
1315
- b === B.LHS ? (v = yt(`M ${y + 10} ${h} c -5 0 -10 5 -10 10 L ${y} ${m - 10} c 0 5 5 10 10 10 M ${y} ${w} h -10`, E), C = Q(A, y - 20, w, { anchor: "end", color: S, dataType: "summary", svgId: M })) : (v = yt(`M ${u - 10} ${h} c 5 0 10 5 10 10 L ${u} ${m - 10} c 0 5 -5 10 -10 10 M ${u} ${w} h 10`, E), C = Q(A, u + 20, w, { anchor: "start", color: S, dataType: "summary", svgId: M }));
1306
+ const T = u.parent ? 10 : 0, h = b + T, m = x + T, w = (h + m) / 2, E = c?.stroke || d.cssVar["--color"], S = c?.labelColor || d.cssVar["--color"], M = "s-" + n, A = t.markdown ? t.markdown(o, e) : o;
1307
+ g === B.LHS ? (v = yt(`M ${y + 10} ${h} c -5 0 -10 5 -10 10 L ${y} ${m - 10} c 0 5 5 10 10 10 M ${y} ${w} h -10`, E), C = Q(A, y - 20, w, { anchor: "end", color: S, dataType: "summary", svgId: M })) : (v = yt(`M ${p - 10} ${h} c 5 0 10 5 10 10 L ${p} ${m - 10} c 0 5 -5 10 -10 10 M ${p} ${w} h 10`, E), C = Q(A, p + 20, w, { anchor: "start", color: S, dataType: "summary", svgId: M }));
1316
1308
  const $ = dn(M);
1317
1309
  return $.appendChild(v), t.labelContainer.appendChild(C), U(C), $.summaryObj = e, $.labelEl = C, f.appendChild($), $;
1318
1310
  }, pn = function(t = {}) {
1319
1311
  if (!this.currentNodes) return;
1320
- const { currentNodes: e, summaries: n, bus: o } = this, { parent: s, start: i, end: r } = hn(e), c = { id: X(), parent: s, start: i, end: r, label: "summary", style: t.style }, l = ct(this, c);
1321
- n.push(c), this.editSummary(l), o.fire("operation", {
1312
+ const { currentNodes: e, summaries: n, bus: o } = this, { parent: s, start: i, end: r } = hn(e), c = { id: X(), parent: s, start: i, end: r, label: "summary", style: t.style }, a = ct(this, c);
1313
+ n.push(c), this.editSummary(a), o.fire("operation", {
1322
1314
  name: "createSummary",
1323
1315
  obj: c
1324
1316
  });
@@ -1374,17 +1366,17 @@ function En(t, e, n, o) {
1374
1366
  const s = document.createElementNS(L, "g");
1375
1367
  let i = "";
1376
1368
  return t.text ? i = t.text.textContent : i = t.childNodes[0].textContent, i.split(`
1377
- `).forEach((c, l) => {
1378
- const a = document.createElementNS(L, "text");
1379
- D(a, {
1369
+ `).forEach((c, a) => {
1370
+ const d = document.createElementNS(L, "text");
1371
+ D(d, {
1380
1372
  x: n + parseInt(e.paddingLeft) + "",
1381
- y: o + parseInt(e.paddingTop) + Sn(e.lineHeight, e.fontSize) * (l + 1) + parseFloat(e.fontSize) * (l + 1) + "",
1373
+ y: o + parseInt(e.paddingTop) + Sn(e.lineHeight, e.fontSize) * (a + 1) + parseFloat(e.fontSize) * (a + 1) + "",
1382
1374
  "text-anchor": "start",
1383
1375
  "font-family": e.fontFamily,
1384
1376
  "font-size": `${e.fontSize}`,
1385
1377
  "font-weight": `${e.fontWeight}`,
1386
1378
  fill: `${e.color}`
1387
- }), a.innerHTML = c, s.appendChild(a);
1379
+ }), d.innerHTML = c, s.appendChild(d);
1388
1380
  }), s;
1389
1381
  }
1390
1382
  function Tn(t, e, n, o) {
@@ -1432,8 +1424,8 @@ function F(t, e, n = !1) {
1432
1424
  });
1433
1425
  const c = document.createElementNS(L, "g");
1434
1426
  c.appendChild(r);
1435
- let l;
1436
- return n ? l = Tn(e, o, s, i) : l = En(e, o, s, i), c.appendChild(l), c;
1427
+ let a;
1428
+ return n ? a = Tn(e, o, s, i) : a = En(e, o, s, i), c.appendChild(a), c;
1437
1429
  }
1438
1430
  function Ln(t, e) {
1439
1431
  const n = getComputedStyle(e), { offsetLeft: o, offsetTop: s } = P(t.nodes, e), i = document.createElementNS(L, "a"), r = document.createElementNS(L, "text");
@@ -1465,25 +1457,25 @@ const G = 100, Pn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "
1465
1457
  width: `${s}`,
1466
1458
  height: `${o}`,
1467
1459
  fill: t.theme.cssVar["--bgcolor"]
1468
- }), i.appendChild(c), n.querySelectorAll(".subLines").forEach((d) => {
1469
- const p = d.cloneNode(!0), { offsetLeft: b, offsetTop: y } = P(n, d.parentElement);
1470
- p.setAttribute("x", `${b}`), p.setAttribute("y", `${y}`), r.appendChild(p);
1460
+ }), i.appendChild(c), n.querySelectorAll(".subLines").forEach((l) => {
1461
+ const u = l.cloneNode(!0), { offsetLeft: g, offsetTop: y } = P(n, l.parentElement);
1462
+ u.setAttribute("x", `${g}`), u.setAttribute("y", `${y}`), r.appendChild(u);
1471
1463
  });
1472
- const l = n.querySelector(".lines")?.cloneNode(!0);
1473
- l && r.appendChild(l);
1474
- const a = n.querySelector(".topiclinks")?.cloneNode(!0);
1464
+ const a = n.querySelector(".lines")?.cloneNode(!0);
1475
1465
  a && r.appendChild(a);
1466
+ const d = n.querySelector(".topiclinks")?.cloneNode(!0);
1467
+ d && r.appendChild(d);
1476
1468
  const f = n.querySelector(".summary")?.cloneNode(!0);
1477
- return f && r.appendChild(f), n.querySelectorAll("me-tpc").forEach((d) => {
1478
- d.nodeObj.dangerouslySetInnerHTML ? r.appendChild(F(t, d, !e)) : (r.appendChild(Dn(t, d)), r.appendChild(F(t, d.text, !e)));
1479
- }), n.querySelectorAll(".tags > span").forEach((d) => {
1480
- r.appendChild(F(t, d));
1481
- }), n.querySelectorAll(".icons > span").forEach((d) => {
1482
- r.appendChild(F(t, d));
1483
- }), n.querySelectorAll(".hyper-link").forEach((d) => {
1484
- r.appendChild(Ln(t, d));
1485
- }), n.querySelectorAll("img").forEach((d) => {
1486
- r.appendChild(Mn(t, d));
1469
+ return f && r.appendChild(f), n.querySelectorAll("me-tpc").forEach((l) => {
1470
+ l.nodeObj.dangerouslySetInnerHTML ? r.appendChild(F(t, l, !e)) : (r.appendChild(Dn(t, l)), r.appendChild(F(t, l.text, !e)));
1471
+ }), n.querySelectorAll(".tags > span").forEach((l) => {
1472
+ r.appendChild(F(t, l));
1473
+ }), n.querySelectorAll(".icons > span").forEach((l) => {
1474
+ r.appendChild(F(t, l));
1475
+ }), n.querySelectorAll(".hyper-link").forEach((l) => {
1476
+ r.appendChild(Ln(t, l));
1477
+ }), n.querySelectorAll("img").forEach((l) => {
1478
+ r.appendChild(Mn(t, l));
1487
1479
  }), D(r, {
1488
1480
  x: G + "",
1489
1481
  y: G + "",
@@ -1548,7 +1540,7 @@ const $n = function(t = !1, e) {
1548
1540
  enableMobileMultiSelect(t) {
1549
1541
  this.mobileMultiSelect = t;
1550
1542
  }
1551
- }, Yn = "5.14.0-beta.0";
1543
+ }, Yn = "5.14.0-beta.1";
1552
1544
  function Wn(t) {
1553
1545
  return {
1554
1546
  x: 0,
@@ -1585,15 +1577,15 @@ function N({
1585
1577
  keypress: i,
1586
1578
  mouseSelectionButton: r,
1587
1579
  selectionContainer: c,
1588
- before: l,
1589
- newTopicName: a,
1580
+ before: a,
1581
+ newTopicName: d,
1590
1582
  allowUndo: f,
1591
- generateMainBranch: d,
1592
- generateSubBranch: p,
1593
- overflowHidden: b,
1583
+ generateMainBranch: l,
1584
+ generateSubBranch: u,
1585
+ overflowHidden: g,
1594
1586
  compact: y,
1595
- theme: u,
1596
- alignment: g,
1587
+ theme: p,
1588
+ alignment: b,
1597
1589
  scaleSensitivity: x,
1598
1590
  scaleMax: v,
1599
1591
  scaleMin: C,
@@ -1606,9 +1598,9 @@ function N({
1606
1598
  let S = null;
1607
1599
  const M = Object.prototype.toString.call(t);
1608
1600
  if (M === "[object HTMLDivElement]" ? S = t : M === "[object String]" && (S = document.querySelector(t)), !S) throw new Error("MindElixir: el is not a valid element");
1609
- S.style.position = "relative", S.innerHTML = "", this.el = S, this.disposable = [], this.before = l || {}, this.newTopicName = a || "New Node", this.contextMenu = o ?? !0, this.toolBar = s ?? !0, this.keypress = i ?? !0, this.mouseSelectionButton = r ?? 0, this.direction = e ?? 1, this.editable = n ?? !0, this.allowUndo = f ?? !0, this.scaleSensitivity = x ?? 0.1, this.scaleMax = v ?? 1.4, this.scaleMin = C ?? 0.2, this.generateMainBranch = d || Pt, this.generateSubBranch = p || kt, this.overflowHidden = b ?? !1, this.compact = y ?? !1, this.alignment = g ?? "root", this.handleWheel = T ?? !0, this.markdown = h || void 0, this.imageProxy = m || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = E ?? !1, this.panHelper = Wn(this), this.bus = $e(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
1601
+ S.style.position = "relative", S.innerHTML = "", this.el = S, this.disposable = [], this.before = a || {}, this.newTopicName = d || "New Node", this.contextMenu = o ?? !0, this.toolBar = s ?? !0, this.keypress = i ?? !0, this.mouseSelectionButton = r ?? 0, this.direction = e ?? 1, this.editable = n ?? !0, this.allowUndo = f ?? !0, this.scaleSensitivity = x ?? 0.1, this.scaleMax = v ?? 1.4, this.scaleMin = C ?? 0.2, this.generateMainBranch = l || Pt, this.generateSubBranch = u || kt, this.overflowHidden = g ?? !1, this.compact = y ?? !1, this.alignment = b ?? "root", this.handleWheel = T ?? !0, this.markdown = h || void 0, this.imageProxy = m || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = E ?? !1, this.panHelper = Wn(this), this.bus = $e(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
1610
1602
  const A = window.matchMedia("(prefers-color-scheme: dark)");
1611
- this.theme = u || (A.matches ? nt : et);
1603
+ this.theme = p || (A.matches ? nt : et);
1612
1604
  const $ = document.createElement("div");
1613
1605
  $.className = "map-canvas", this.map = $, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = document.createElement("me-nodes"), this.lines = R("lines"), this.summarySvg = R("summary"), this.linkController = R("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 = gt(), this.line2 = gt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.arrowSvg = R("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(Ne(this)), w && (this.pasteHandler = w);
1614
1606
  }