mind-elixir 5.12.2-beta.2 → 5.12.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const es = 0, ts = 1, ns = 2, G = {
1
+ const es = 0, ts = 1, ns = 2, ne = {
2
2
  name: "Latte",
3
3
  type: "light",
4
4
  palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
@@ -123,7 +123,7 @@ const M = (e, t) => {
123
123
  }, k = (e, t) => {
124
124
  for (const n in t)
125
125
  e.setAttribute(n, t[n]);
126
- }, ne = (e) => e ? e.tagName === "ME-TPC" : !1, me = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
126
+ }, te = (e) => e ? e.tagName === "ME-TPC" : !1, me = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
127
127
  for (let s = 0; s < o.length; s++) {
128
128
  if (t === o[s]) continue;
129
129
  const { parent: i } = t.nodeObj;
@@ -455,7 +455,7 @@ const It = function({ map: e, direction: t }, n) {
455
455
  }, tt = function(e, t, n) {
456
456
  const o = n.children[0].children[0], s = t.parentElement;
457
457
  if (s.tagName === "ME-PARENT") {
458
- if (q(o), s.children[1])
458
+ if (G(o), s.children[1])
459
459
  s.nextSibling.appendChild(n);
460
460
  else {
461
461
  const i = e.createChildren([n]);
@@ -473,7 +473,7 @@ const It = function({ map: e, direction: t }, n) {
473
473
  }, nt = {
474
474
  before: "beforebegin",
475
475
  after: "afterend"
476
- }, q = function(e) {
476
+ }, G = function(e) {
477
477
  const n = e.parentElement.parentElement.lastElementChild;
478
478
  n?.tagName === "svg" && n?.remove();
479
479
  }, Bt = function(e, t) {
@@ -524,7 +524,7 @@ const It = function({ map: e, direction: t }, n) {
524
524
  }, Yt = function(e, t) {
525
525
  const n = e || this.currentNode;
526
526
  if (!n) return;
527
- q(n);
527
+ G(n);
528
528
  const o = n.nodeObj;
529
529
  if (!o.parent)
530
530
  return;
@@ -613,7 +613,7 @@ const It = function({ map: e, direction: t }, n) {
613
613
  const a = c.parentElement;
614
614
  tt(o, n, a.parentElement);
615
615
  } else {
616
- q(c);
616
+ G(c);
617
617
  const a = c.parentElement.parentNode;
618
618
  i.includes(a.parentElement) || i.push(a.parentElement), n.parentElement.parentNode.insertAdjacentElement(nt[t], a);
619
619
  }
@@ -653,7 +653,7 @@ const It = function({ map: e, direction: t }, n) {
653
653
  moveUpNode: Kt,
654
654
  removeNodes: Gt,
655
655
  reshapeNode: Bt,
656
- rmSubline: q,
656
+ rmSubline: G,
657
657
  setNodeTopic: Qt
658
658
  }, Symbol.toStringTag, { value: "Module" }));
659
659
  function en(e) {
@@ -754,7 +754,7 @@ const tn = function(e, t = !1) {
754
754
  x: o.left,
755
755
  y: o.top
756
756
  }, i = e.parentNode, l = i.children[1];
757
- if (l.expanded = n.expanded, l.className = n.expanded ? "minus" : "", q(e), n.expanded) {
757
+ if (l.expanded = n.expanded, l.className = n.expanded ? "minus" : "", G(e), n.expanded) {
758
758
  const h = this.createChildren(
759
759
  n.children.map((u) => this.createWrapper(u).grp)
760
760
  );
@@ -1068,7 +1068,7 @@ function Hn(e) {
1068
1068
  }, h = (f) => {
1069
1069
  if (!e.editable) return;
1070
1070
  const y = f.target;
1071
- if (ne(y)) {
1071
+ if (te(y)) {
1072
1072
  e.selectNode(y), e.beginEdit(y);
1073
1073
  return;
1074
1074
  }
@@ -1085,7 +1085,7 @@ function Hn(e) {
1085
1085
  return;
1086
1086
  }
1087
1087
  if (t.handlePointerDown(f), t.mousedown && (e.ptState = i.Pan), f.button === 0 || f.pointerType === "touch")
1088
- if (ne(y)) {
1088
+ if (te(y)) {
1089
1089
  e.selection?.cancel();
1090
1090
  const S = e.currentNodes || [];
1091
1091
  if (f.ctrlKey || f.metaKey || e.mobileMultiSelect ? S.includes(y) ? o = y : ((e.currentArrow || e.currentSummary) && e.clearSelection(), e.selection?.select(y)) : S.includes(y) || e.selectNode(y), !e.editable) return;
@@ -1130,7 +1130,7 @@ function Hn(e) {
1130
1130
  f.preventDefault(), f.button === 2 && e.editable && setTimeout(() => {
1131
1131
  if (e.panHelper.moved || e.ptState !== i.Idle && e.ptState !== i.Pan) return;
1132
1132
  const y = f.target;
1133
- ne(y) && !y.classList.contains("selected") && e.selectNode(y), e.bus.fire("showContextMenu", f);
1133
+ te(y) && !y.classList.contains("selected") && e.selectNode(y), e.bus.fire("showContextMenu", f);
1134
1134
  }, 200);
1135
1135
  }, m = (f) => {
1136
1136
  if (f.stopPropagation(), f.preventDefault(), f.ctrlKey || f.metaKey) return Pn(e, f);
@@ -1325,7 +1325,7 @@ function Bn(e, t) {
1325
1325
  let E = !0;
1326
1326
  const N = (y) => {
1327
1327
  const x = y.target;
1328
- if (ne(x)) {
1328
+ if (te(x)) {
1329
1329
  x.parentElement.tagName === "ME-ROOT" ? E = !0 : E = !1, E ? (d.className = "disabled", u.className = "disabled", b.className = "disabled", c.className = "disabled", r.className = "disabled", a.className = "disabled") : (d.className = "", u.className = "", b.className = "", c.className = "", r.className = "", a.className = ""), w.hidden = !1, m.style.top = "", m.style.bottom = "", m.style.left = "", m.style.right = "";
1330
1330
  const S = m.offsetHeight, C = m.offsetWidth, T = m.getBoundingClientRect(), D = y.clientY - T.top, L = y.clientX - T.left;
1331
1331
  S + D > window.innerHeight ? (m.style.top = "", m.style.bottom = "0px") : (m.style.bottom = "", m.style.top = D + 15 + "px"), C + L > window.innerWidth ? (m.style.left = "", m.style.right = "0px") : (m.style.right = "", m.style.left = L + 10 + "px");
@@ -1545,7 +1545,7 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1545
1545
  if (i)
1546
1546
  for (const l of n)
1547
1547
  i[e](l, o, { capture: !1, ...s });
1548
- }, W = ct("addEventListener"), O = ct("removeEventListener"), Z = (e) => {
1548
+ }, W = ct("addEventListener"), O = ct("removeEventListener"), J = (e) => {
1549
1549
  const { clientX: t, clientY: n, target: o } = e.touches?.[0] ?? e;
1550
1550
  return { x: t, y: n, target: o };
1551
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) => {
@@ -1654,7 +1654,7 @@ class io extends eo {
1654
1654
  (t ? W : O)(n, "pointerdown", this._onTapStart);
1655
1655
  }
1656
1656
  _onTapStart(t, n = !1) {
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();
1657
+ const { x: o, y: s, target: i } = J(t), { document: l, startAreas: c, boundaries: r, behaviour: a, features: d } = this._options, h = i.getBoundingClientRect();
1658
1658
  if (!so(t, a.triggers))
1659
1659
  return;
1660
1660
  const u = Y(c, l), b = Y(r, l);
@@ -1670,7 +1670,7 @@ class io extends eo {
1670
1670
  const {
1671
1671
  singleTap: { intersect: n },
1672
1672
  range: o
1673
- } = this._options.features, s = Z(t);
1673
+ } = this._options.features, s = J(t);
1674
1674
  let i;
1675
1675
  if (n === "native")
1676
1676
  i = s.target;
@@ -1706,7 +1706,7 @@ class io extends eo {
1706
1706
  container: n,
1707
1707
  document: o,
1708
1708
  behaviour: { startThreshold: s }
1709
- } = this._options, { x1: i, y1: l } = this._areaLocation, { x: c, y: r } = Z(t);
1709
+ } = this._options, { x1: i, y1: l } = this._areaLocation, { x: c, y: r } = J(t);
1710
1710
  if (
1711
1711
  // Single number for both coordinates
1712
1712
  typeof s == "number" && j(c + r - (i + l)) >= s || // Different x and y threshold
@@ -1741,7 +1741,7 @@ class io extends eo {
1741
1741
  }));
1742
1742
  }
1743
1743
  _onTapMove(t) {
1744
- const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: l } = s.behaviour.scrolling, { x: c, y: r } = Z(t);
1744
+ const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: l } = s.behaviour.scrolling, { x: c, y: r } = J(t);
1745
1745
  if (o.x2 = c, o.y2 = r, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
1746
1746
  this._scrollingActive = !0;
1747
1747
  const a = () => {
@@ -2033,23 +2033,18 @@ function dt({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: c, direction:
2033
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
2034
  }
2035
2035
  const lo = function(e, t = !0) {
2036
+ const n = this.theme || ne, s = (e.type || n.type) === "dark" ? ue : ne;
2036
2037
  this.theme = {
2037
- ...this.theme || G,
2038
+ ...n,
2038
2039
  ...e,
2039
- cssVar: {
2040
- ...this.theme?.cssVar || G.cssVar,
2041
- ...e.cssVar || {}
2042
- }
2040
+ cssVar: e.cssVar ? { ...n.cssVar, ...e.cssVar } : { ...s.cssVar }
2043
2041
  }, this.generateMainBranch = this.theme.generateMainBranch || at, this.generateSubBranch = this.theme.generateSubBranch || dt;
2044
- const o = {
2045
- ...(this.theme.type === "dark" ? ue : G).cssVar,
2046
- ...this.theme.cssVar
2047
- };
2048
- this.compact && (o["--node-gap-x"] = "15px", o["--node-gap-y"] = "2px", o["--main-gap-x"] = "30px", o["--main-gap-y"] = "6px");
2049
- const s = Object.keys(o);
2050
- for (let i = 0; i < s.length; i++) {
2051
- const l = s[i];
2052
- this.container.style.setProperty(l, o[l]);
2042
+ const i = { ...this.theme.cssVar };
2043
+ this.compact && (i["--node-gap-x"] = "15px", i["--node-gap-y"] = "2px", i["--main-gap-x"] = "30px", i["--main-gap-y"] = "6px");
2044
+ const l = Object.keys(i);
2045
+ for (let c = 0; c < l.length; c++) {
2046
+ const r = l[c];
2047
+ this.container.style.setProperty(r, i[r]);
2053
2048
  }
2054
2049
  t && this.refresh();
2055
2050
  }, co = function(e) {
@@ -2101,7 +2096,7 @@ function ft(e, t, n, o, s, i, l, c) {
2101
2096
  function ho(e, t, n) {
2102
2097
  e && (e.dataset.x = t.toString(), e.dataset.y = n.toString(), le(e));
2103
2098
  }
2104
- function Q(e, t, n, o, s) {
2099
+ function Z(e, t, n, o, s) {
2105
2100
  k(e, {
2106
2101
  x1: t + "",
2107
2102
  y1: n + "",
@@ -2278,14 +2273,14 @@ const fo = function(e, t, n) {
2278
2273
  if (!h) return;
2279
2274
  s.style.display = "initial", i.style.display = "initial", l.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(l), ut(h, ht);
2280
2275
  let { x: b, y: v } = X(n), { ctrlX: p, ctrlY: g } = n, { ctrlX: m, ctrlY: w } = o, { x: E, y: N } = X(o);
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) => {
2276
+ i.style.cssText = `top:${g}px;left:${p}px;`, l.style.cssText = `top:${w}px;left:${m}px;`, Z(c, b, v, p, g), Z(r, m, w, E, N), e.helper1 = Ve.create(i), e.helper2 = Ve.create(l), e.helper1.init(d, (f, y) => {
2282
2277
  p = p + f / e.scaleVal, g = g + y / e.scaleVal;
2283
2278
  const x = X({ ...n, ctrlX: p, ctrlY: g });
2284
- b = x.x, v = x.y, i.style.top = g + "px", i.style.left = p + "px", Ke(h, b, v, p, g, m, w, E, N, t), Q(c, b, v, p, g), t.delta1.x = Math.round(p - n.cx), t.delta1.y = Math.round(g - n.cy), u.fire("updateArrowDelta", t);
2279
+ b = x.x, v = x.y, i.style.top = g + "px", i.style.left = p + "px", Ke(h, b, v, p, g, m, w, E, N, t), Z(c, b, v, p, g), t.delta1.x = Math.round(p - n.cx), t.delta1.y = Math.round(g - n.cy), u.fire("updateArrowDelta", t);
2285
2280
  }), e.helper2.init(d, (f, y) => {
2286
2281
  m = m + f / e.scaleVal, w = w + y / e.scaleVal;
2287
2282
  const x = X({ ...o, ctrlX: m, ctrlY: w });
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);
2283
+ 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), Z(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);
2289
2284
  });
2290
2285
  };
2291
2286
  function wo() {
@@ -2375,8 +2370,8 @@ const Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2375
2370
  const Te = u.children?.[K];
2376
2371
  if (!Te)
2377
2372
  return e.removeSummary(n), null;
2378
- const U = To(e.findEle(Te.id)), { offsetLeft: J, offsetTop: ke } = M(r, U), _e = i === l ? 10 : 20;
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);
2373
+ const q = To(e.findEle(Te.id)), { offsetLeft: U, offsetTop: ke } = M(r, q), _e = i === l ? 10 : 20;
2374
+ K === i && (g = ke + _e), K === l && (m = ke + q.offsetHeight - _e), U < v && (v = U), q.offsetWidth + U > p && (p = q.offsetWidth + U);
2380
2375
  }
2381
2376
  let w, E;
2382
2377
  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;
@@ -2485,7 +2480,7 @@ function Bo(e, t) {
2485
2480
  "stroke-width": n.borderWidth
2486
2481
  }), i;
2487
2482
  }
2488
- function ee(e, t, n = !1) {
2483
+ function Q(e, t, n = !1) {
2489
2484
  const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = M(e.nodes, t), l = document.createElementNS(_, "rect");
2490
2485
  k(l, {
2491
2486
  x: s + "",
@@ -2525,8 +2520,8 @@ function Yo(e, t) {
2525
2520
  href: t.src
2526
2521
  }), i;
2527
2522
  }
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");
2523
+ const ee = 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) => {
2524
+ const n = e.nodes, o = n.offsetHeight + ee * 2, s = n.offsetWidth + ee * 2, i = $o(o + "px", s + "px"), l = document.createElementNS(_, "svg"), c = document.createElementNS(_, "rect");
2530
2525
  k(c, {
2531
2526
  x: "0",
2532
2527
  y: "0",
@@ -2543,18 +2538,18 @@ const te = 100, Xo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC
2543
2538
  a && l.appendChild(a);
2544
2539
  const d = n.querySelector(".summary")?.cloneNode(!0);
2545
2540
  return d && l.appendChild(d), n.querySelectorAll("me-tpc").forEach((h) => {
2546
- h.nodeObj.dangerouslySetInnerHTML ? l.appendChild(ee(e, h, !t)) : (l.appendChild(Bo(e, h)), l.appendChild(ee(e, h.text, !t)));
2541
+ h.nodeObj.dangerouslySetInnerHTML ? l.appendChild(Q(e, h, !t)) : (l.appendChild(Bo(e, h)), l.appendChild(Q(e, h.text, !t)));
2547
2542
  }), n.querySelectorAll(".tags > span").forEach((h) => {
2548
- l.appendChild(ee(e, h));
2543
+ l.appendChild(Q(e, h));
2549
2544
  }), n.querySelectorAll(".icons > span").forEach((h) => {
2550
- l.appendChild(ee(e, h));
2545
+ l.appendChild(Q(e, h));
2551
2546
  }), n.querySelectorAll(".hyper-link").forEach((h) => {
2552
2547
  l.appendChild(Wo(e, h));
2553
2548
  }), n.querySelectorAll("img").forEach((h) => {
2554
2549
  l.appendChild(Yo(e, h));
2555
2550
  }), k(l, {
2556
- x: te + "",
2557
- y: te + "",
2551
+ x: ee + "",
2552
+ y: ee + "",
2558
2553
  overflow: "visible"
2559
2554
  }), i.appendChild(l), i;
2560
2555
  }, Vo = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), Xo + e.outerHTML);
@@ -2628,7 +2623,7 @@ const Jo = {
2628
2623
  enableMobileMultiSelect(e) {
2629
2624
  this.mobileMultiSelect = e;
2630
2625
  }
2631
- }, Zo = "5.12.2-beta.2";
2626
+ }, Zo = "5.12.2-beta.3";
2632
2627
  function Qo(e) {
2633
2628
  return {
2634
2629
  x: 0,
@@ -2688,7 +2683,7 @@ function P({
2688
2683
  if (T === "[object HTMLDivElement]" ? C = e : T === "[object String]" && (C = document.querySelector(e)), !C) throw new Error("MindElixir: el is not a valid element");
2689
2684
  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";
2690
2685
  const D = window.matchMedia("(prefers-color-scheme: dark)");
2691
- this.theme = p || (D.matches ? ue : G);
2686
+ this.theme = p || (D.matches ? ue : ne);
2692
2687
  const L = document.createElement("div");
2693
2688
  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);
2694
2689
  }
@@ -2702,7 +2697,7 @@ Object.defineProperty(P.prototype, "currentNode", {
2702
2697
  P.LEFT = 0;
2703
2698
  P.RIGHT = 1;
2704
2699
  P.SIDE = 2;
2705
- P.THEME = G;
2700
+ P.THEME = ne;
2706
2701
  P.DARK_THEME = ue;
2707
2702
  P.version = Zo;
2708
2703
  P.E = Ze;
@@ -2718,6 +2713,6 @@ export {
2718
2713
  es as LEFT,
2719
2714
  ts as RIGHT,
2720
2715
  ns as SIDE,
2721
- G as THEME,
2716
+ ne as THEME,
2722
2717
  P as default
2723
2718
  };
@@ -1,4 +1,4 @@
1
- var MindElixirLite=(function($){"use strict";const O={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#4c4f69","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--main-bgcolor-transparent":"rgba(255, 255, 255, 0.8)","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#4dc4ff","--accent-color":"#e64553","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px 80px"}},V={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#2d3748","--root-border-color":"rgba(255, 255, 255, 0.1)","--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--main-bgcolor-transparent":"rgba(76, 79, 105, 0.8)","--topic-padding":"3px","--color":"#cccccc","--bgcolor":"#252526","--selected":"#4dc4ff","--accent-color":"#789AFA","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969","--map-padding":"50px 80px"}};function Ot(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}const z=function(t,e){if(e.id===t)return e;if(e.children&&e.children.length){for(let n=0;n<e.children.length;n++){const o=z(t,e.children[n]);if(o)return o}return null}else return null},tt=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)tt(t.children[n],t)},lt=(t,e,n)=>{t.expanded=e,t.children&&t.children.forEach(o=>{lt(o,e)})};function F(t,e,n,o){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;return{x1:n+Math.cos(f)*l,y1:o+Math.sin(f)*l,x2:n+Math.cos(d)*l,y2:o+Math.sin(d)*l}}function W(){return(new Date().getTime().toString(16)+Math.random().toString(16).substring(2)).substring(2,18)}const Bt=function(){const t=W();return{topic:this.newTopicName,id:t}},M=(t,e)=>{let n=0,o=0;for(;e&&e!==t;)n+=e.offsetLeft,o+=e.offsetTop,e=e.offsetParent;return{offsetLeft:n,offsetTop:o}},D=(t,e)=>{for(const n in e)t.setAttribute(n,e[n])},et=t=>t?t.tagName==="ME-TPC":!1,nt=t=>{const e=/translate3d\(([^,]+),\s*([^,]+)/,n=t.match(e);return n?{x:parseFloat(n[1]),y:parseFloat(n[2])}:{x:0,y:0}},at=function(t){for(let e=0;e<t.length;e++){const{dom:n,evt:o,func:s}=t[e];n.addEventListener(o,s)}return function(){for(let n=0;n<t.length;n++){const{dom:o,evt:s,func:i}=t[n];o.removeEventListener(s,i)}}},ht=(t,e)=>{const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)},Rt=function(t,e){if(!e)return G(t),t;let n=t.querySelector(".insert-preview");const o=`insert-preview ${e} show`;return n||(n=document.createElement("div"),t.appendChild(n)),n.className=o,t},G=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const n of e||[])n.remove()},dt=function(t,e){for(const n of e){const o=n.parentElement.parentElement.contains(t);if(!(t&&t.tagName==="ME-TPC"&&t!==n&&!o&&t.nodeObj.parent))return!1}return!0},Wt=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class Yt{mind;isMoving=!1;interval=null;speed=20;constructor(e){this.mind=e}move(e,n){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(e*this.speed*this.mind.scaleVal,n*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,this.interval&&(clearInterval(this.interval),this.interval=null)}}function Xt(t){return{isDragging:!1,insertType:null,meet:null,ghost:Wt(t),edgeMoveController:new Yt(t),startX:0,startY:0,pointerId:null}}const Vt=5;function ft(t,e,n,o=!1){if(t.spacePressed)return!1;const s=n.target;if(s?.tagName!=="ME-TPC"||!s.nodeObj.parent)return!1;if(e.startX=n.clientX,e.startY=n.clientY,e.pointerId=n.pointerId,t.dragged=t.currentNodes,o){pt(t,e);const i=t.container.getBoundingClientRect();ut(e.ghost,n.clientX-i.x,n.clientY-i.y)}return!0}function ut(t,e,n){t.style.transform=`translate(${e-10}px, ${n-10}px)`,t.style.display="block"}function pt(t,e){const{dragged:n}=t;if(!n)return;const o=document.activeElement;o&&o.isContentEditable&&o.blur(),e.isDragging=!0,n.length>1?e.ghost.innerHTML=n.length+"":e.ghost.innerHTML=n[0].innerHTML;for(const s of n)s.parentElement.parentElement.style.opacity="0.5";t.panHelper.clear()}function zt(t,e,n){const{dragged:o}=t;if(!o||e.pointerId!==n.pointerId)return;const s=n.clientX-e.startX,i=n.clientY-e.startY,r=Math.sqrt(s*s+i*i);if(!e.isDragging&&r>Vt&&pt(t,e),!e.isDragging)return;const c=t.container.getBoundingClientRect();ut(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(),G(e.meet);const l=12*t.scaleVal,a=document.elementFromPoint(n.clientX,n.clientY-l);if(dt(a,o)){e.meet=a;const f=a.getBoundingClientRect(),d=f.y;n.clientY>d+f.height?e.insertType="after":e.insertType="in"}else{const f=document.elementFromPoint(n.clientX,n.clientY+l);if(dt(f,o)){e.meet=f;const p=f.getBoundingClientRect().y;n.clientY<p?e.insertType="before":e.insertType="in"}else e.insertType=null,e.meet=null}e.meet&&Rt(e.meet,e.insertType)}function Ft(t,e,n){const{dragged:o}=t;if(!(!o||e.pointerId!==n.pointerId)){e.edgeMoveController.stop();for(const s of o)s.parentElement.parentElement.style.opacity="1";e.ghost.style.display="none",e.ghost.innerHTML="",e.isDragging&&e.meet&&(G(e.meet),e.insertType==="before"?t.moveNodeBefore(o,e.meet):e.insertType==="after"?t.moveNodeAfter(o,e.meet):e.insertType==="in"&&t.moveNodeIn(o,e.meet)),t.dragged=null,e.isDragging=!1,e.insertType=null,e.meet=null,e.pointerId=null}}function gt(t,e){const{dragged:n}=t;if(n){e.edgeMoveController.stop();for(const o of n)o.parentElement.parentElement.style.opacity="1";e.meet&&G(e.meet),e.ghost.style.display="none",e.ghost.innerHTML="",t.dragged=null,e.isDragging=!1,e.insertType=null,e.meet=null,e.pointerId=null}}const B={LHS:"lhs",RHS:"rhs"},Gt=function(){this.nodes.innerHTML="";const t=this.createTopic(this.nodeData);yt.call(this,t,this.nodeData),t.draggable=!1;const e=document.createElement("me-root");e.appendChild(t);const n=this.nodeData.children||[];if(this.direction===2){let o=0,s=0;n.map(i=>{i.direction===0?o+=1:i.direction===1?s+=1:o<=s?(i.direction=0,o+=1):(i.direction=1,s+=1)})}_t(this,n,e)},_t=function(t,e,n){const o=document.createElement("me-main");o.className=B.LHS;const s=document.createElement("me-main");s.className=B.RHS;for(let i=0;i<e.length;i++){const r=e[i],{grp:c}=t.createWrapper(r);t.direction===2?r.direction===0?o.appendChild(c):s.appendChild(c):t.direction===0?o.appendChild(c):s.appendChild(c)}t.nodes.appendChild(o),t.nodes.appendChild(n),t.nodes.appendChild(s),t.nodes.appendChild(t.lines),t.nodes.appendChild(t.labelContainer)},qt=function(t,e){const n=document.createElement("me-children");for(let o=0;o<e.length;o++){const s=e[o],{grp:i}=t.createWrapper(s);n.appendChild(i)}return n},mt=function(t,e){const o=(this?.el?this.el:e||document).querySelector(`[data-nodeid="me${t}"]`);if(!o)throw new Error(`FindEle: Node ${t} not found, maybe it's collapsed.`);return o},yt=function(t,e){if(t.innerHTML="",e.style){const n=e.style;for(const o in n)t.style[o]=n[o]}if(e.dangerouslySetInnerHTML){t.innerHTML=e.dangerouslySetInnerHTML;return}if(e.image){const n=e.image;if(n.url&&n.width&&n.height){const o=document.createElement("img");o.src=this.imageProxy?this.imageProxy(n.url):n.url,o.style.width=n.width+"px",o.style.height=n.height+"px",n.fit&&(o.style.objectFit=n.fit),t.appendChild(o),t.image=o}}else t.image&&(t.image=void 0);{const n=document.createElement("span");n.className="text",this.markdown?n.innerHTML=this.markdown(e.topic,e):n.textContent=e.topic,t.appendChild(n),t.text=n}if(e.hyperLink){const n=document.createElement("a");n.className="hyper-link",n.target="_blank",n.innerText="🔗",n.href=e.hyperLink,t.appendChild(n),t.link=n}else t.link&&(t.link=void 0);if(e.icons&&e.icons.length){const n=document.createElement("span");n.className="icons",n.innerHTML=e.icons.map(o=>`<span>${Ot(o)}</span>`).join(""),t.appendChild(n),t.icons=n}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const n=document.createElement("div");n.className="tags",e.tags.forEach(o=>{const s=document.createElement("span");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)}),t.appendChild(n),t.tags=n}else t.tags&&(t.tags=void 0)},jt=function(t,e){const n=document.createElement("me-wrapper"),{p:o,tpc:s}=this.createParent(t);if(n.appendChild(o),!e&&t.children&&t.children.length>0){const i=Qt(t.expanded);if(o.appendChild(i),t.expanded!==!1){const r=qt(this,t.children);n.appendChild(r)}}return{grp:n,top:o,tpc:s}},Ut=function(t){const e=document.createElement("me-parent"),n=this.createTopic(t);return yt.call(this,n,t),e.appendChild(n),{p:e,tpc:n}},Kt=function(t){const e=document.createElement("me-children");return e.append(...t),e},Jt=function(t){const e=document.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e};function vt(t){const e=document.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}const Zt=function(t){if(!t)return;const e=document.createElement("div"),n=t.nodeObj,o=n.topic,{offsetLeft:s,offsetTop:i}=M(this.nodes,t);this.nodes.appendChild(e),e.id="input-box",e.textContent=o,e.contentEditable="plaintext-only",e.spellcheck=!1;const r=getComputedStyle(t);e.style.cssText=`
1
+ var MindElixirLite=(function($){"use strict";const R={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#4c4f69","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--main-bgcolor-transparent":"rgba(255, 255, 255, 0.8)","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#4dc4ff","--accent-color":"#e64553","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px 80px"}},V={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#2d3748","--root-border-color":"rgba(255, 255, 255, 0.1)","--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--main-bgcolor-transparent":"rgba(76, 79, 105, 0.8)","--topic-padding":"3px","--color":"#cccccc","--bgcolor":"#252526","--selected":"#4dc4ff","--accent-color":"#789AFA","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969","--map-padding":"50px 80px"}};function Ot(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}const z=function(t,e){if(e.id===t)return e;if(e.children&&e.children.length){for(let n=0;n<e.children.length;n++){const o=z(t,e.children[n]);if(o)return o}return null}else return null},tt=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)tt(t.children[n],t)},lt=(t,e,n)=>{t.expanded=e,t.children&&t.children.forEach(o=>{lt(o,e)})};function F(t,e,n,o){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;return{x1:n+Math.cos(f)*l,y1:o+Math.sin(f)*l,x2:n+Math.cos(d)*l,y2:o+Math.sin(d)*l}}function W(){return(new Date().getTime().toString(16)+Math.random().toString(16).substring(2)).substring(2,18)}const Bt=function(){const t=W();return{topic:this.newTopicName,id:t}},M=(t,e)=>{let n=0,o=0;for(;e&&e!==t;)n+=e.offsetLeft,o+=e.offsetTop,e=e.offsetParent;return{offsetLeft:n,offsetTop:o}},D=(t,e)=>{for(const n in e)t.setAttribute(n,e[n])},et=t=>t?t.tagName==="ME-TPC":!1,nt=t=>{const e=/translate3d\(([^,]+),\s*([^,]+)/,n=t.match(e);return n?{x:parseFloat(n[1]),y:parseFloat(n[2])}:{x:0,y:0}},at=function(t){for(let e=0;e<t.length;e++){const{dom:n,evt:o,func:s}=t[e];n.addEventListener(o,s)}return function(){for(let n=0;n<t.length;n++){const{dom:o,evt:s,func:i}=t[n];o.removeEventListener(s,i)}}},ht=(t,e)=>{const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)},Rt=function(t,e){if(!e)return G(t),t;let n=t.querySelector(".insert-preview");const o=`insert-preview ${e} show`;return n||(n=document.createElement("div"),t.appendChild(n)),n.className=o,t},G=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const n of e||[])n.remove()},dt=function(t,e){for(const n of e){const o=n.parentElement.parentElement.contains(t);if(!(t&&t.tagName==="ME-TPC"&&t!==n&&!o&&t.nodeObj.parent))return!1}return!0},Wt=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class Yt{mind;isMoving=!1;interval=null;speed=20;constructor(e){this.mind=e}move(e,n){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(e*this.speed*this.mind.scaleVal,n*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,this.interval&&(clearInterval(this.interval),this.interval=null)}}function Xt(t){return{isDragging:!1,insertType:null,meet:null,ghost:Wt(t),edgeMoveController:new Yt(t),startX:0,startY:0,pointerId:null}}const Vt=5;function ft(t,e,n,o=!1){if(t.spacePressed)return!1;const s=n.target;if(s?.tagName!=="ME-TPC"||!s.nodeObj.parent)return!1;if(e.startX=n.clientX,e.startY=n.clientY,e.pointerId=n.pointerId,t.dragged=t.currentNodes,o){pt(t,e);const i=t.container.getBoundingClientRect();ut(e.ghost,n.clientX-i.x,n.clientY-i.y)}return!0}function ut(t,e,n){t.style.transform=`translate(${e-10}px, ${n-10}px)`,t.style.display="block"}function pt(t,e){const{dragged:n}=t;if(!n)return;const o=document.activeElement;o&&o.isContentEditable&&o.blur(),e.isDragging=!0,n.length>1?e.ghost.innerHTML=n.length+"":e.ghost.innerHTML=n[0].innerHTML;for(const s of n)s.parentElement.parentElement.style.opacity="0.5";t.panHelper.clear()}function zt(t,e,n){const{dragged:o}=t;if(!o||e.pointerId!==n.pointerId)return;const s=n.clientX-e.startX,i=n.clientY-e.startY,r=Math.sqrt(s*s+i*i);if(!e.isDragging&&r>Vt&&pt(t,e),!e.isDragging)return;const c=t.container.getBoundingClientRect();ut(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(),G(e.meet);const l=12*t.scaleVal,a=document.elementFromPoint(n.clientX,n.clientY-l);if(dt(a,o)){e.meet=a;const f=a.getBoundingClientRect(),d=f.y;n.clientY>d+f.height?e.insertType="after":e.insertType="in"}else{const f=document.elementFromPoint(n.clientX,n.clientY+l);if(dt(f,o)){e.meet=f;const p=f.getBoundingClientRect().y;n.clientY<p?e.insertType="before":e.insertType="in"}else e.insertType=null,e.meet=null}e.meet&&Rt(e.meet,e.insertType)}function Ft(t,e,n){const{dragged:o}=t;if(!(!o||e.pointerId!==n.pointerId)){e.edgeMoveController.stop();for(const s of o)s.parentElement.parentElement.style.opacity="1";e.ghost.style.display="none",e.ghost.innerHTML="",e.isDragging&&e.meet&&(G(e.meet),e.insertType==="before"?t.moveNodeBefore(o,e.meet):e.insertType==="after"?t.moveNodeAfter(o,e.meet):e.insertType==="in"&&t.moveNodeIn(o,e.meet)),t.dragged=null,e.isDragging=!1,e.insertType=null,e.meet=null,e.pointerId=null}}function gt(t,e){const{dragged:n}=t;if(n){e.edgeMoveController.stop();for(const o of n)o.parentElement.parentElement.style.opacity="1";e.meet&&G(e.meet),e.ghost.style.display="none",e.ghost.innerHTML="",t.dragged=null,e.isDragging=!1,e.insertType=null,e.meet=null,e.pointerId=null}}const O={LHS:"lhs",RHS:"rhs"},Gt=function(){this.nodes.innerHTML="";const t=this.createTopic(this.nodeData);yt.call(this,t,this.nodeData),t.draggable=!1;const e=document.createElement("me-root");e.appendChild(t);const n=this.nodeData.children||[];if(this.direction===2){let o=0,s=0;n.map(i=>{i.direction===0?o+=1:i.direction===1?s+=1:o<=s?(i.direction=0,o+=1):(i.direction=1,s+=1)})}_t(this,n,e)},_t=function(t,e,n){const o=document.createElement("me-main");o.className=O.LHS;const s=document.createElement("me-main");s.className=O.RHS;for(let i=0;i<e.length;i++){const r=e[i],{grp:c}=t.createWrapper(r);t.direction===2?r.direction===0?o.appendChild(c):s.appendChild(c):t.direction===0?o.appendChild(c):s.appendChild(c)}t.nodes.appendChild(o),t.nodes.appendChild(n),t.nodes.appendChild(s),t.nodes.appendChild(t.lines),t.nodes.appendChild(t.labelContainer)},qt=function(t,e){const n=document.createElement("me-children");for(let o=0;o<e.length;o++){const s=e[o],{grp:i}=t.createWrapper(s);n.appendChild(i)}return n},mt=function(t,e){const o=(this?.el?this.el:e||document).querySelector(`[data-nodeid="me${t}"]`);if(!o)throw new Error(`FindEle: Node ${t} not found, maybe it's collapsed.`);return o},yt=function(t,e){if(t.innerHTML="",e.style){const n=e.style;for(const o in n)t.style[o]=n[o]}if(e.dangerouslySetInnerHTML){t.innerHTML=e.dangerouslySetInnerHTML;return}if(e.image){const n=e.image;if(n.url&&n.width&&n.height){const o=document.createElement("img");o.src=this.imageProxy?this.imageProxy(n.url):n.url,o.style.width=n.width+"px",o.style.height=n.height+"px",n.fit&&(o.style.objectFit=n.fit),t.appendChild(o),t.image=o}}else t.image&&(t.image=void 0);{const n=document.createElement("span");n.className="text",this.markdown?n.innerHTML=this.markdown(e.topic,e):n.textContent=e.topic,t.appendChild(n),t.text=n}if(e.hyperLink){const n=document.createElement("a");n.className="hyper-link",n.target="_blank",n.innerText="🔗",n.href=e.hyperLink,t.appendChild(n),t.link=n}else t.link&&(t.link=void 0);if(e.icons&&e.icons.length){const n=document.createElement("span");n.className="icons",n.innerHTML=e.icons.map(o=>`<span>${Ot(o)}</span>`).join(""),t.appendChild(n),t.icons=n}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const n=document.createElement("div");n.className="tags",e.tags.forEach(o=>{const s=document.createElement("span");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)}),t.appendChild(n),t.tags=n}else t.tags&&(t.tags=void 0)},jt=function(t,e){const n=document.createElement("me-wrapper"),{p:o,tpc:s}=this.createParent(t);if(n.appendChild(o),!e&&t.children&&t.children.length>0){const i=Qt(t.expanded);if(o.appendChild(i),t.expanded!==!1){const r=qt(this,t.children);n.appendChild(r)}}return{grp:n,top:o,tpc:s}},Ut=function(t){const e=document.createElement("me-parent"),n=this.createTopic(t);return yt.call(this,n,t),e.appendChild(n),{p:e,tpc:n}},Kt=function(t){const e=document.createElement("me-children");return e.append(...t),e},Jt=function(t){const e=document.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e};function vt(t){const e=document.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}const Zt=function(t){if(!t)return;const e=document.createElement("div"),n=t.nodeObj,o=n.topic,{offsetLeft:s,offsetTop:i}=M(this.nodes,t);this.nodes.appendChild(e),e.id="input-box",e.textContent=o,e.contentEditable="plaintext-only",e.spellcheck=!1;const r=getComputedStyle(t);e.style.cssText=`
2
2
  left: ${s}px;
3
3
  top: ${i}px;
4
4
  min-width:${t.offsetWidth-8}px;
@@ -12,5 +12,5 @@ var MindElixirLite=(function($){"use strict";const O={name:"Latte",type:"light",
12
12
  left:${e.style.left};
13
13
  top:${e.style.top};
14
14
  max-width: 200px;
15
- `,vt(s),t.scrollIntoView(s),s.addEventListener("keydown",i=>{i.stopPropagation();const r=i.key;if(r==="Enter"||r==="Tab"){if(i.shiftKey)return;i.preventDefault(),s.blur(),t.container.focus()}}),s.addEventListener("blur",()=>{if(!s)return;const i=s.innerText?.trim()||"";i===""?n.label=o:n.label=i,e.style.opacity="1",s.remove(),i!==o&&(t.markdown?e.innerHTML=t.markdown(n.label,n):e.textContent=n.label,_(e),"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Ee=function(t){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");this.lines.innerHTML="";for(let c=0;c<r.length;c++){const l=r[c],a=l.querySelector("me-tpc"),{offsetLeft:f,offsetTop:d}=M(this.nodes,a),p=a.offsetWidth,v=a.offsetHeight,y=l.parentNode.className,u=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:d,cL:f,cW:p,cH:v,direction:y,containerHeight:this.nodes.offsetHeight}),g=this.theme.palette,b=a.nodeObj.branchColor||g[c%g.length];if(a.style.borderColor=b,this.lines.appendChild(bt(u,b,"3")),t&&t!==l)continue;const w=Y("subLines"),C=l.lastChild;C.tagName==="svg"&&C.remove(),l.appendChild(w),St(this,w,b,l,y,!0)}this.labelContainer.innerHTML="",this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},St=function(t,e,n,o,s,i){const r=o.firstChild,c=o.children[1].children;if(c.length===0)return;const l=r.offsetTop,a=r.offsetLeft,f=r.offsetWidth,d=r.offsetHeight;for(let p=0;p<c.length;p++){const v=c[p],y=v.firstChild,u=y.offsetTop,g=y.offsetLeft,b=y.offsetWidth,w=y.offsetHeight,C=y.firstChild.nodeObj.branchColor||n,T=t.generateSubBranch({pT:l,pL:a,pW:f,pH:d,cT:u,cL:g,cW:b,cH:w,direction:s,isFirst:i});e.appendChild(bt(T,C,"2"));const h=y.children[1];if(h){if(!h.expanded)continue}else continue;St(t,e,C,v,s)}},Te={side:'<?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>',left:'<?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>',right:'<?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>',full:'<?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>',living:'<?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>',zoomin:'<?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>',zoomout:'<?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>'},I=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=Te[e],n};function De(t){const e=document.createElement("div"),n=I("fullscreen","full"),o=I("toCenter","living"),s=I("zoomout","zoomout"),i=I("zoomin","zoomin");e.appendChild(n),e.appendChild(o),e.appendChild(s),e.appendChild(i),e.className="mind-elixir-toolbar rb";let r=null;const c=()=>{const a=t.container.getBoundingClientRect(),f=nt(t.map.style.transform),d=a.width/2,p=a.height/2,v=(d-f.x)/t.scaleVal,y=(p-f.y)/t.scaleVal;r={containerRect:a,currentTransform:f,mapCenterX:v,mapCenterY:y}},l=()=>{if(r){const a=t.container.getBoundingClientRect(),f=a.width/2,d=a.height/2,p=f-r.mapCenterX*t.scaleVal,v=d-r.mapCenterY*t.scaleVal,y=p-r.currentTransform.x,u=v-r.currentTransform.y;t.move(y,u)}};return t.el.addEventListener("fullscreenchange",l),n.onclick=()=>{c(),document.fullscreenElement!==t.el?t.el.requestFullscreen():document.exitFullscreen()},o.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},e}function Le(t){const e=document.createElement("div"),n=I("tbltl","left"),o=I("tbltr","right"),s=I("tblts","side");return e.appendChild(n),e.appendChild(o),e.appendChild(s),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},o.onclick=()=>{t.initRight()},s.onclick=()=>{t.initSide()},e}function Me(t){t.container.append(De(t)),t.container.append(Le(t))}function Et({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:l,containerHeight:a}){let f=e+n/2;const d=t+o/2;let p;l===B.LHS?p=i+r:p=i;const v=s+c/2,u=(1-Math.abs(v-d)/a)*.25*(n/2);return l===B.LHS?f=f-n/10-u:f=f+n/10+u,`M ${f} ${d} Q ${f} ${v} ${p} ${v}`}function Tt({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:l,isFirst:a}){const f=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let d=0,p=0;a?d=t+o/2:d=t+o;const v=s+c;let y=0,u=0,g=0;const b=Math.abs(d-v)/300*f;return l===B.LHS?(g=e,y=g+f,u=g-f,p=i+f,`M ${y} ${d} C ${g} ${d} ${g+b} ${v} ${u} ${v} H ${p}`):(g=e+n,y=g-f,u=g+f,p=i+r-f,`M ${y} ${d} C ${g} ${d} ${g-b} ${v} ${u} ${v} H ${p}`)}const Pe=function(t,e=!0){this.theme={...this.theme||O,...t,cssVar:{...this.theme?.cssVar||O.cssVar,...t.cssVar||{}}},this.generateMainBranch=this.theme.generateMainBranch||Et,this.generateSubBranch=this.theme.generateSubBranch||Tt;const o={...(this.theme.type==="dark"?V:O).cssVar,...this.theme.cssVar};this.compact&&(o["--node-gap-x"]="15px",o["--node-gap-y"]="2px",o["--main-gap-x"]="30px",o["--main-gap-y"]="6px");const s=Object.keys(o);for(let i=0;i<s.length;i++){const r=s[i];this.container.style.setProperty(r,o[r])}e&&this.refresh()},ke=function(t){this.compact=t,this.theme&&this.changeTheme(this.theme)},Dt={create:function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const n=e.clientX-this.lastX,o=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(n,o)}},handlePointerDown(e){e.button===0&&(this.pointerdown=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.dom.setPointerCapture(e.pointerId))},handleClear(e){this.pointerdown=!1,e.pointerId!==void 0&&this.dom.releasePointerCapture(e.pointerId)},cb:null,init(e,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=at([{dom:e,evt:"pointermove",func:this.handlePointerMove},{dom:e,evt:"pointerleave",func:this.handleClear},{dom:e,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}}},Lt="#4dc4ff";function Mt(t,e,n,o,s,i,r,c){return{x:t/8+n*3/8+s*3/8+r/8,y:e/8+o*3/8+i*3/8+c/8}}function Ne(t,e,n){t&&(t.dataset.x=e.toString(),t.dataset.y=n.toString(),_(t))}function q(t,e,n,o,s){D(t,{x1:e+"",y1:n+"",x2:o+"",y2:s+""})}function Pt(t,e,n,o,s,i,r,c,l,a){const f=`M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${l}`;if(t.line.setAttribute("d",f),a.style){const u=a.style;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))}const d=t.querySelectorAll('path[stroke="transparent"]');d.length>0&&d[0].setAttribute("d",f);const p=F(i,r,c,l);if(p){const u=`M ${p.x1} ${p.y1} L ${c} ${l} L ${p.x2} ${p.y2}`;if(t.arrow1.setAttribute("d",u),d.length>1&&d[1].setAttribute("d",u),a.style){const g=a.style;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))}}if(a.bidirectional){const u=F(o,s,e,n);if(u){const g=`M ${u.x1} ${u.y1} L ${e} ${n} L ${u.x2} ${u.y2}`;if(t.arrow2.setAttribute("d",g),d.length>2&&d[2].setAttribute("d",g),a.style){const b=a.style;b.stroke&&t.arrow2.setAttribute("stroke",b.stroke),b.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(b.strokeWidth)),b.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",b.strokeLinecap),b.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(b.opacity))}}}const{x:v,y}=Mt(e,n,o,s,i,r,c,l);if(t.labelEl&&Ne(t.labelEl,v,y),a.style?.labelColor){const u=t.labelEl;u&&(u.style.color=a.style.labelColor)}We(t)}function j(t,e,n){const{offsetLeft:o,offsetTop:s}=M(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;return{w:i,h:r,cx:c,cy:l,ctrlX:a,ctrlY:f}}function R(t){let e,n;const o=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return o>t.h/t.w||o<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/o,n=t.cy+t.h/2):(e=t.cx+t.h/2/o,n=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,n=t.cy-t.w*o/2):(e=t.cx-t.w/2,n=t.cy+t.w*o/2),{x:e,y:n}}const Ae=function(t,e,n){const o=M(t.nodes,e),s=M(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*.3)),v=Math.abs(a),y=Math.abs(f);let u,g;if(d<150){const w=e.closest("me-main").className==="lhs"?-1:1;u={x:200*w,y:0},g={x:200*w,y:0}}else if(v>y*1.5){const w=a>0?e.offsetWidth/2:-e.offsetWidth/2,C=a>0?-n.offsetWidth/2:n.offsetWidth/2;u={x:w+(a>0?p:-p),y:0},g={x:C+(a>0?-p:p),y:0}}else if(y>v*1.5){const w=f>0?e.offsetHeight/2:-e.offsetHeight/2,C=f>0?-n.offsetHeight/2:n.offsetHeight/2;u={x:0,y:w+(f>0?p:-p)},g={x:0,y:C+(f>0?-p:p)}}else{const w=Math.atan2(f,a),C=e.offsetWidth/2*Math.cos(w),T=e.offsetHeight/2*Math.sin(w),h=-(n.offsetWidth/2)*Math.cos(w),m=-(n.offsetHeight/2)*Math.sin(w),x=p*.7*(a>0?1:-1),E=p*.7*(f>0?1:-1);u={x:C+x,y:T+E},g={x:h-x,y:m-E}}return{delta1:{x:Math.round(u.x),y:Math.round(u.y)},delta2:{x:Math.round(g.x),y:Math.round(g.y)}}},it=function(t,e,n,o,s){if(!e||!n)return;if(!o.delta1||!o.delta2){const S=Ae(t,e,n);o.delta1=S.delta1,o.delta2=S.delta2}const i=j(t,e,o.delta1),r=j(t,n,o.delta2),{x:c,y:l}=R(i),{ctrlX:a,ctrlY:f}=i,{ctrlX:d,ctrlY:p}=r,{x:v,y}=R(r),u=F(d,p,v,y);if(!u)return;const g=`M ${u.x1} ${u.y1} L ${v} ${y} L ${u.x2} ${u.y2}`;let b="";if(o.bidirectional){const S=F(a,f,c,l);if(!S)return;b=`M ${S.x1} ${S.y1} L ${c} ${l} L ${S.x2} ${S.y2}`}const w=Se(`M ${c} ${l} C ${a} ${f} ${d} ${p} ${v} ${y}`,g,b,o.style),{x:C,y:T}=Mt(c,l,a,f,d,p,v,y),h=o.style?.labelColor||"rgb(235, 95, 82)",m="a-"+o.id;w.id=m;const x=t.markdown?t.markdown(o.label,o):o.label,E=st(x,C,T,{anchor:"middle",color:h,dataType:"arrow",svgId:m});w.labelEl=E,w.arrowObj=o,w.dataset.linkid=o.id,t.labelContainer.appendChild(E),t.arrowSvg.appendChild(w),_(E),s||(t.arrows.push(o),t.currentArrow=w,Nt(t,o,i,r))},$e=function(t,e,n={}){const o={id:W(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,...n};it(this,t,e,o),this.bus.fire("operation",{name:"createArrow",obj:o})},He=function(t){U(this);const e={...t,id:W()};it(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},Ie=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;U(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),e.labelEl?.remove(),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},Oe=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),o=this.findEle(e.to),s=j(this,n,e.delta1),i=j(this,o,e.delta2);this.editable?Nt(this,e,s,i):kt(t,Lt),this.bus.fire("selectArrow",e)},Be=function(){U(this),this.currentArrow=null,this.bus.fire("unselectArrow")},rt=function(t,e){const n=document.createElementNS(k,"path");return D(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},kt=function(t,e){const n=document.createElementNS(k,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=rt(t.line.getAttribute("d"),e);n.appendChild(o);const s=rt(t.arrow1.getAttribute("d"),e);if(n.appendChild(s),t.arrow2.getAttribute("d")){const i=rt(t.arrow2.getAttribute("d"),e);n.appendChild(i)}t.insertBefore(n,t.firstChild)},Re=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},We=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const n=e.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",t.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",t.arrow1.getAttribute("d")),n.length>=3&&t.arrow2.getAttribute("d")&&n[2].setAttribute("d",t.arrow2.getAttribute("d"))},U=function(t){t.helper1?.destroy(),t.helper2?.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&Re(t.currentArrow)},Nt=function(t,e,n,o){const{linkController:s,P2:i,P3:r,line1:c,line2:l,nodes:a,map:f,currentArrow:d,bus:p}=t;if(!d)return;s.style.display="initial",i.style.display="initial",r.style.display="initial",a.appendChild(s),a.appendChild(i),a.appendChild(r),kt(d,Lt);let{x:v,y}=R(n),{ctrlX:u,ctrlY:g}=n,{ctrlX:b,ctrlY:w}=o,{x:C,y:T}=R(o);i.style.cssText=`top:${g}px;left:${u}px;`,r.style.cssText=`top:${w}px;left:${b}px;`,q(c,v,y,u,g),q(l,b,w,C,T),t.helper1=Dt.create(i),t.helper2=Dt.create(r),t.helper1.init(f,(h,m)=>{u=u+h/t.scaleVal,g=g+m/t.scaleVal;const x=R({...n,ctrlX:u,ctrlY:g});v=x.x,y=x.y,i.style.top=g+"px",i.style.left=u+"px",Pt(d,v,y,u,g,b,w,C,T,e),q(c,v,y,u,g),e.delta1.x=Math.round(u-n.cx),e.delta1.y=Math.round(g-n.cy),p.fire("updateArrowDelta",e)}),t.helper2.init(f,(h,m)=>{b=b+h/t.scaleVal,w=w+m/t.scaleVal;const x=R({...o,ctrlX:b,ctrlY:w});C=x.x,T=x.y,r.style.top=w+"px",r.style.left=b+"px",Pt(d,v,y,u,g,b,w,C,T,e),q(l,b,w,C,T),e.delta2.x=Math.round(b-o.cx),e.delta2.y=Math.round(w-o.cy),p.fire("updateArrowDelta",e)})};function Ye(){this.arrowSvg.innerHTML="",this.labelContainer.querySelectorAll('.svg-label[data-type="arrow"]').forEach(e=>e.remove());for(let e=0;e<this.arrows.length;e++){const n=this.arrows[e];try{it(this,this.findEle(n.from),this.findEle(n.to),n,!0)}catch{}}this.nodes.appendChild(this.arrowSvg)}function Xe(t){U(this),t&&t.labelEl&&Ct(this,t.labelEl,t.arrowObj)}function Ve(){this.arrows=this.arrows.filter(t=>z(t.from,this.nodeData)&&z(t.to,this.nodeData))}const ze=Object.freeze(Object.defineProperty({__proto__:null,createArrow:$e,createArrowFrom:He,editArrowLabel:Xe,removeArrow:Ie,renderArrow:Ye,selectArrow:Oe,tidyArrow:Ve,unselectArrow:Be},Symbol.toStringTag,{value:"Module"})),Fe=function(t){if(t.length===0)throw new Error("No selected node.");if(t.length===1){const l=t[0].nodeObj,a=t[0].nodeObj.parent;if(!a)throw new Error("Can not select root node.");const f=a.children.findIndex(d=>l===d);return{parent:a.id,start:f,end:f}}let e=0;const n=t.map(l=>{let a=l.nodeObj;const f=[];for(;a.parent;){const d=a.parent,v=d.children?.indexOf(a);a=d,f.unshift({node:a,index:v})}return f.length>e&&(e=f.length),f});let o=0;t:for(;o<e;o++){const l=n[0][o]?.node;for(let a=1;a<n.length;a++)if(n[a][o]?.node!==l)break t}if(!o)throw new Error("Can not select root node.");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;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:i,end:r}},Ge=function(t){const e=document.createElementNS(k,"g");return e.setAttribute("id",t),e},At=function(t,e){const n=document.createElementNS(k,"path");return D(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},_e=t=>t.parentElement.parentElement,qe=function(t,{parent:e,start:n}){const o=t.findEle(e),s=o.nodeObj;let i;return s.parent?i=o.closest("me-main").className:i=t.findEle(s.children[n].id).closest("me-main").className,i},ct=function(t,e){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,v=qe(t,e);let y=1/0,u=0,g=0,b=0;for(let X=i;X<=r;X++){const $t=p.children?.[X];if(!$t)return t.removeSummary(n),null;const Z=_e(t.findEle($t.id)),{offsetLeft:Q,offsetTop:Ht}=M(l,Z),It=i===r?10:20;X===i&&(g=Ht+It),X===r&&(b=Ht+Z.offsetHeight-It),Q<y&&(y=Q),Z.offsetWidth+Q>u&&(u=Z.offsetWidth+Q)}let w,C;const T=p.parent?10:0,h=g+T,m=b+T,x=(h+m)/2,E=c?.stroke||a.cssVar["--color"],S=c?.labelColor||a.cssVar["--color"],P="s-"+n,A=t.markdown?t.markdown(o,e):o;v===B.LHS?(w=At(`M ${y+10} ${h} c -5 0 -10 5 -10 10 L ${y} ${m-10} c 0 5 5 10 10 10 M ${y} ${x} h -10`,E),C=st(A,y-20,x,{anchor:"end",color:S,dataType:"summary",svgId:P})):(w=At(`M ${u-10} ${h} c 5 0 10 5 10 10 L ${u} ${m-10} c 0 5 -5 10 -10 10 M ${u} ${x} h 10`,E),C=st(A,u+20,x,{anchor:"start",color:S,dataType:"summary",svgId:P}));const H=Ge(P);return H.appendChild(w),t.labelContainer.appendChild(C),_(C),H.summaryObj=e,H.labelEl=C,f.appendChild(H),H},je=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(t={}){if(!this.currentNodes)return;const{currentNodes:e,summaries:n,bus:o}=this,{parent:s,start:i,end:r}=Fe(e),c={id:W(),parent:s,start:i,end:r,label:"summary",style:t.style},l=ct(this,c);n.push(c),this.editSummary(l),o.fire("operation",{name:"createSummary",obj:c})},createSummaryFrom:function(t){const e=W(),n={...t,id:e};ct(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(t){t&&t.labelEl&&Ct(this,t.labelEl,t.summaryObj)},removeSummary:function(t){const e=this.summaries.findIndex(n=>n.id===t);e>-1&&(this.summaries.splice(e,1),this.nodes.querySelector("#s-"+t)?.remove(),this.nodes.querySelector("#label-s-"+t)?.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{ct(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.labelEl;e&&e.classList.add("selected"),this.currentSummary=t,this.bus.fire("selectSummary",t.summaryObj)},unselectSummary:function(){this.currentSummary?.labelEl?.classList.remove("selected"),this.currentSummary=null,this.bus.fire("unselectSummary")}},Symbol.toStringTag,{value:"Module"})),L="http://www.w3.org/2000/svg";function Ue(t,e){const n=document.createElementNS(L,"svg");return D(n,{version:"1.1",xmlns:L,height:t,width:e}),n}function Ke(t,e){return(parseInt(t)-parseInt(e))/2}function Je(t,e,n,o){const s=document.createElementNS(L,"g");let i="";return t.text?i=t.text.textContent:i=t.childNodes[0].textContent,i.split(`
16
- `).forEach((c,l)=>{const a=document.createElementNS(L,"text");D(a,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+Ke(e.lineHeight,e.fontSize)*(l+1)+parseFloat(e.fontSize)*(l+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),a.innerHTML=c,s.appendChild(a)}),s}function Ze(t,e,n,o){let s="";t.nodeObj?.dangerouslySetInnerHTML?s=t.nodeObj.dangerouslySetInnerHTML:t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const i=document.createElementNS(L,"foreignObject");D(i,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return D(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),r.innerHTML=s,i.appendChild(r),i}function Qe(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=M(t.nodes,e),i=document.createElementNS(L,"rect");return D(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function K(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=M(t.nodes,e),r=document.createElementNS(L,"rect");D(r,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const c=document.createElementNS(L,"g");c.appendChild(r);let l;return n?l=Ze(e,o,s,i):l=Je(e,o,s,i),c.appendChild(l),c}function tn(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=M(t.nodes,e),i=document.createElementNS(L,"a"),r=document.createElementNS(L,"text");return D(r,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=e.textContent,i.appendChild(r),i.setAttribute("href",e.href),i}function en(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=M(t.nodes,e),i=document.createElementNS(L,"image");return D(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:e.src}),i}const J=100,nn='<?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">',on=(t,e=!1)=>{const n=t.nodes,o=n.offsetHeight+J*2,s=n.offsetWidth+J*2,i=Ue(o+"px",s+"px"),r=document.createElementNS(L,"svg"),c=document.createElementNS(L,"rect");D(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(d=>{const p=d.cloneNode(!0),{offsetLeft:v,offsetTop:y}=M(n,d.parentElement);p.setAttribute("x",`${v}`),p.setAttribute("y",`${y}`),r.appendChild(p)});const l=n.querySelector(".lines")?.cloneNode(!0);l&&r.appendChild(l);const a=n.querySelector(".topiclinks")?.cloneNode(!0);a&&r.appendChild(a);const f=n.querySelector(".summary")?.cloneNode(!0);return f&&r.appendChild(f),n.querySelectorAll("me-tpc").forEach(d=>{d.nodeObj.dangerouslySetInnerHTML?r.appendChild(K(t,d,!e)):(r.appendChild(Qe(t,d)),r.appendChild(K(t,d.text,!e)))}),n.querySelectorAll(".tags > span").forEach(d=>{r.appendChild(K(t,d))}),n.querySelectorAll(".icons > span").forEach(d=>{r.appendChild(K(t,d))}),n.querySelectorAll(".hyper-link").forEach(d=>{r.appendChild(tn(t,d))}),n.querySelectorAll("img").forEach(d=>{r.appendChild(en(t,d))}),D(r,{x:J+"",y:J+"",overflow:"visible"}),i.appendChild(r),i},sn=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),nn+t.outerHTML);function rn(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=s=>{e(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(t)})}const cn={getObjById:z,generateNewObj:Bt,layout:Gt,linkDiv:Ee,editTopic:Zt,createWrapper:jt,createParent:Ut,createChildren:Kt,createTopic:Jt,findEle:mt,changeTheme:Pe,changeCompact:ke,...pe,...{},...ze,...je,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await rn(n);return new Promise((s,i)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const c=document.createElement("canvas");c.width=r.width,c.height=r.height,c.getContext("2d").drawImage(r,0,0),c.toBlob(s,"image/png",1)},r.src=o,r.onerror=i})},exportSvg:function(t=!1,e){const n=on(this,t),o=sn(n,e);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"})),init(t){if(t=JSON.parse(JSON.stringify(t)),!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),t.compact!==void 0&&(this.compact=t.compact),this.changeTheme(t.theme||this.theme,!1),t.meta&&(this.meta=t.meta),this.nodeData=t.nodeData,tt(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&Me(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(t=>t()),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},enableMobileMultiSelect(t){this.mobileMultiSelect=t}},ln="5.12.2-beta.2";function an(t){return{x:0,y:0,moved:!1,mousedown:!1,handlePointerDown(e){this.moved=!1;const n=e.target,o=t.mouseSelectionButton===0?2:0,s=t.spacePressed&&e.button===0&&e.pointerType==="mouse",i=!t.editable||e.button===o&&e.pointerType==="mouse"||e.pointerType==="touch";!s&&!i||(this.x=e.clientX,this.y=e.clientY,n.className!=="circle"&&n.contentEditable!=="plaintext-only"&&(this.mousedown=!0,n.setPointerCapture(e.pointerId)))},handlePointerMove(e){if(!this.mousedown||e.target.contentEditable==="plaintext-only"&&!t.spacePressed)return!1;const n=e.clientX-this.x,o=e.clientY-this.y;return this.x=e.clientX,this.y=e.clientY,this.moved=!0,t.move(n,o),!0},handlePointerUp(e){if(!this.mousedown)return;const n=e.target;n.hasPointerCapture&&n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),this.mousedown=!1},clear(){this.mousedown=!1,this.moved=!1}}}function N({el:t,direction:e,editable:n,contextMenu:o,toolBar:s,keypress:i,mouseSelectionButton:r,selectionContainer:c,before:l,newTopicName:a,allowUndo:f,generateMainBranch:d,generateSubBranch:p,overflowHidden:v,compact:y,theme:u,alignment:g,scaleSensitivity:b,scaleMax:w,scaleMin:C,handleWheel:T,markdown:h,imageProxy:m,pasteHandler:x,mobileMultiSelect:E}){let S=null;const P=Object.prototype.toString.call(t);if(P==="[object HTMLDivElement]"?S=t:P==="[object String]"&&(S=document.querySelector(t)),!S)throw new Error("MindElixir: el is not a valid element");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=b??.1,this.scaleMax=w??1.4,this.scaleMin=C??.2,this.generateMainBranch=d||Et,this.generateSubBranch=p||Tt,this.overflowHidden=v??!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=an(this),this.bus=Ce(),this.container=document.createElement("div"),this.selectionContainer=c||this.container,this.container.className="map-container";const A=window.matchMedia("(prefers-color-scheme: dark)");this.theme=u||(A.matches?V:O);const H=document.createElement("div");H.className="map-canvas",this.map=H,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=document.createElement("me-nodes"),this.lines=Y("lines"),this.summarySvg=Y("summary"),this.linkController=Y("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=xt(),this.line2=xt(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.arrowSvg=Y("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(xe(this)),x&&(this.pasteHandler=x)}return N.prototype=cn,Object.defineProperty(N.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),N.LEFT=0,N.RIGHT=1,N.SIDE=2,N.THEME=O,N.DARK_THEME=V,N.version=ln,N.E=mt,$.DARK_THEME=V,$.LEFT=0,$.RIGHT=1,$.SIDE=2,$.THEME=O,$.default=N,Object.defineProperties($,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),$})({});
15
+ `,vt(s),t.scrollIntoView(s),s.addEventListener("keydown",i=>{i.stopPropagation();const r=i.key;if(r==="Enter"||r==="Tab"){if(i.shiftKey)return;i.preventDefault(),s.blur(),t.container.focus()}}),s.addEventListener("blur",()=>{if(!s)return;const i=s.innerText?.trim()||"";i===""?n.label=o:n.label=i,e.style.opacity="1",s.remove(),i!==o&&(t.markdown?e.innerHTML=t.markdown(n.label,n):e.textContent=n.label,_(e),"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Ee=function(t){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");this.lines.innerHTML="";for(let c=0;c<r.length;c++){const l=r[c],a=l.querySelector("me-tpc"),{offsetLeft:f,offsetTop:d}=M(this.nodes,a),p=a.offsetWidth,v=a.offsetHeight,y=l.parentNode.className,u=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:d,cL:f,cW:p,cH:v,direction:y,containerHeight:this.nodes.offsetHeight}),g=this.theme.palette,b=a.nodeObj.branchColor||g[c%g.length];if(a.style.borderColor=b,this.lines.appendChild(bt(u,b,"3")),t&&t!==l)continue;const w=Y("subLines"),C=l.lastChild;C.tagName==="svg"&&C.remove(),l.appendChild(w),St(this,w,b,l,y,!0)}this.labelContainer.innerHTML="",this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},St=function(t,e,n,o,s,i){const r=o.firstChild,c=o.children[1].children;if(c.length===0)return;const l=r.offsetTop,a=r.offsetLeft,f=r.offsetWidth,d=r.offsetHeight;for(let p=0;p<c.length;p++){const v=c[p],y=v.firstChild,u=y.offsetTop,g=y.offsetLeft,b=y.offsetWidth,w=y.offsetHeight,C=y.firstChild.nodeObj.branchColor||n,T=t.generateSubBranch({pT:l,pL:a,pW:f,pH:d,cT:u,cL:g,cW:b,cH:w,direction:s,isFirst:i});e.appendChild(bt(T,C,"2"));const h=y.children[1];if(h){if(!h.expanded)continue}else continue;St(t,e,C,v,s)}},Te={side:'<?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>',left:'<?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>',right:'<?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>',full:'<?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>',living:'<?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>',zoomin:'<?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>',zoomout:'<?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>'},I=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=Te[e],n};function De(t){const e=document.createElement("div"),n=I("fullscreen","full"),o=I("toCenter","living"),s=I("zoomout","zoomout"),i=I("zoomin","zoomin");e.appendChild(n),e.appendChild(o),e.appendChild(s),e.appendChild(i),e.className="mind-elixir-toolbar rb";let r=null;const c=()=>{const a=t.container.getBoundingClientRect(),f=nt(t.map.style.transform),d=a.width/2,p=a.height/2,v=(d-f.x)/t.scaleVal,y=(p-f.y)/t.scaleVal;r={containerRect:a,currentTransform:f,mapCenterX:v,mapCenterY:y}},l=()=>{if(r){const a=t.container.getBoundingClientRect(),f=a.width/2,d=a.height/2,p=f-r.mapCenterX*t.scaleVal,v=d-r.mapCenterY*t.scaleVal,y=p-r.currentTransform.x,u=v-r.currentTransform.y;t.move(y,u)}};return t.el.addEventListener("fullscreenchange",l),n.onclick=()=>{c(),document.fullscreenElement!==t.el?t.el.requestFullscreen():document.exitFullscreen()},o.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},e}function Le(t){const e=document.createElement("div"),n=I("tbltl","left"),o=I("tbltr","right"),s=I("tblts","side");return e.appendChild(n),e.appendChild(o),e.appendChild(s),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},o.onclick=()=>{t.initRight()},s.onclick=()=>{t.initSide()},e}function Me(t){t.container.append(De(t)),t.container.append(Le(t))}function Et({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:l,containerHeight:a}){let f=e+n/2;const d=t+o/2;let p;l===O.LHS?p=i+r:p=i;const v=s+c/2,u=(1-Math.abs(v-d)/a)*.25*(n/2);return l===O.LHS?f=f-n/10-u:f=f+n/10+u,`M ${f} ${d} Q ${f} ${v} ${p} ${v}`}function Tt({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:l,isFirst:a}){const f=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let d=0,p=0;a?d=t+o/2:d=t+o;const v=s+c;let y=0,u=0,g=0;const b=Math.abs(d-v)/300*f;return l===O.LHS?(g=e,y=g+f,u=g-f,p=i+f,`M ${y} ${d} C ${g} ${d} ${g+b} ${v} ${u} ${v} H ${p}`):(g=e+n,y=g-f,u=g+f,p=i+r-f,`M ${y} ${d} C ${g} ${d} ${g-b} ${v} ${u} ${v} H ${p}`)}const Pe=function(t,e=!0){const n=this.theme||R,s=(t.type||n.type)==="dark"?V:R;this.theme={...n,...t,cssVar:t.cssVar?{...n.cssVar,...t.cssVar}:{...s.cssVar}},this.generateMainBranch=this.theme.generateMainBranch||Et,this.generateSubBranch=this.theme.generateSubBranch||Tt;const i={...this.theme.cssVar};this.compact&&(i["--node-gap-x"]="15px",i["--node-gap-y"]="2px",i["--main-gap-x"]="30px",i["--main-gap-y"]="6px");const r=Object.keys(i);for(let c=0;c<r.length;c++){const l=r[c];this.container.style.setProperty(l,i[l])}e&&this.refresh()},ke=function(t){this.compact=t,this.theme&&this.changeTheme(this.theme)},Dt={create:function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const n=e.clientX-this.lastX,o=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(n,o)}},handlePointerDown(e){e.button===0&&(this.pointerdown=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.dom.setPointerCapture(e.pointerId))},handleClear(e){this.pointerdown=!1,e.pointerId!==void 0&&this.dom.releasePointerCapture(e.pointerId)},cb:null,init(e,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=at([{dom:e,evt:"pointermove",func:this.handlePointerMove},{dom:e,evt:"pointerleave",func:this.handleClear},{dom:e,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}}},Lt="#4dc4ff";function Mt(t,e,n,o,s,i,r,c){return{x:t/8+n*3/8+s*3/8+r/8,y:e/8+o*3/8+i*3/8+c/8}}function Ne(t,e,n){t&&(t.dataset.x=e.toString(),t.dataset.y=n.toString(),_(t))}function q(t,e,n,o,s){D(t,{x1:e+"",y1:n+"",x2:o+"",y2:s+""})}function Pt(t,e,n,o,s,i,r,c,l,a){const f=`M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${l}`;if(t.line.setAttribute("d",f),a.style){const u=a.style;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))}const d=t.querySelectorAll('path[stroke="transparent"]');d.length>0&&d[0].setAttribute("d",f);const p=F(i,r,c,l);if(p){const u=`M ${p.x1} ${p.y1} L ${c} ${l} L ${p.x2} ${p.y2}`;if(t.arrow1.setAttribute("d",u),d.length>1&&d[1].setAttribute("d",u),a.style){const g=a.style;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))}}if(a.bidirectional){const u=F(o,s,e,n);if(u){const g=`M ${u.x1} ${u.y1} L ${e} ${n} L ${u.x2} ${u.y2}`;if(t.arrow2.setAttribute("d",g),d.length>2&&d[2].setAttribute("d",g),a.style){const b=a.style;b.stroke&&t.arrow2.setAttribute("stroke",b.stroke),b.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(b.strokeWidth)),b.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",b.strokeLinecap),b.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(b.opacity))}}}const{x:v,y}=Mt(e,n,o,s,i,r,c,l);if(t.labelEl&&Ne(t.labelEl,v,y),a.style?.labelColor){const u=t.labelEl;u&&(u.style.color=a.style.labelColor)}We(t)}function j(t,e,n){const{offsetLeft:o,offsetTop:s}=M(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;return{w:i,h:r,cx:c,cy:l,ctrlX:a,ctrlY:f}}function B(t){let e,n;const o=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return o>t.h/t.w||o<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/o,n=t.cy+t.h/2):(e=t.cx+t.h/2/o,n=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,n=t.cy-t.w*o/2):(e=t.cx-t.w/2,n=t.cy+t.w*o/2),{x:e,y:n}}const Ae=function(t,e,n){const o=M(t.nodes,e),s=M(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*.3)),v=Math.abs(a),y=Math.abs(f);let u,g;if(d<150){const w=e.closest("me-main").className==="lhs"?-1:1;u={x:200*w,y:0},g={x:200*w,y:0}}else if(v>y*1.5){const w=a>0?e.offsetWidth/2:-e.offsetWidth/2,C=a>0?-n.offsetWidth/2:n.offsetWidth/2;u={x:w+(a>0?p:-p),y:0},g={x:C+(a>0?-p:p),y:0}}else if(y>v*1.5){const w=f>0?e.offsetHeight/2:-e.offsetHeight/2,C=f>0?-n.offsetHeight/2:n.offsetHeight/2;u={x:0,y:w+(f>0?p:-p)},g={x:0,y:C+(f>0?-p:p)}}else{const w=Math.atan2(f,a),C=e.offsetWidth/2*Math.cos(w),T=e.offsetHeight/2*Math.sin(w),h=-(n.offsetWidth/2)*Math.cos(w),m=-(n.offsetHeight/2)*Math.sin(w),x=p*.7*(a>0?1:-1),E=p*.7*(f>0?1:-1);u={x:C+x,y:T+E},g={x:h-x,y:m-E}}return{delta1:{x:Math.round(u.x),y:Math.round(u.y)},delta2:{x:Math.round(g.x),y:Math.round(g.y)}}},it=function(t,e,n,o,s){if(!e||!n)return;if(!o.delta1||!o.delta2){const S=Ae(t,e,n);o.delta1=S.delta1,o.delta2=S.delta2}const i=j(t,e,o.delta1),r=j(t,n,o.delta2),{x:c,y:l}=B(i),{ctrlX:a,ctrlY:f}=i,{ctrlX:d,ctrlY:p}=r,{x:v,y}=B(r),u=F(d,p,v,y);if(!u)return;const g=`M ${u.x1} ${u.y1} L ${v} ${y} L ${u.x2} ${u.y2}`;let b="";if(o.bidirectional){const S=F(a,f,c,l);if(!S)return;b=`M ${S.x1} ${S.y1} L ${c} ${l} L ${S.x2} ${S.y2}`}const w=Se(`M ${c} ${l} C ${a} ${f} ${d} ${p} ${v} ${y}`,g,b,o.style),{x:C,y:T}=Mt(c,l,a,f,d,p,v,y),h=o.style?.labelColor||"rgb(235, 95, 82)",m="a-"+o.id;w.id=m;const x=t.markdown?t.markdown(o.label,o):o.label,E=st(x,C,T,{anchor:"middle",color:h,dataType:"arrow",svgId:m});w.labelEl=E,w.arrowObj=o,w.dataset.linkid=o.id,t.labelContainer.appendChild(E),t.arrowSvg.appendChild(w),_(E),s||(t.arrows.push(o),t.currentArrow=w,Nt(t,o,i,r))},$e=function(t,e,n={}){const o={id:W(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,...n};it(this,t,e,o),this.bus.fire("operation",{name:"createArrow",obj:o})},He=function(t){U(this);const e={...t,id:W()};it(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},Ie=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;U(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),e.labelEl?.remove(),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},Oe=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),o=this.findEle(e.to),s=j(this,n,e.delta1),i=j(this,o,e.delta2);this.editable?Nt(this,e,s,i):kt(t,Lt),this.bus.fire("selectArrow",e)},Be=function(){U(this),this.currentArrow=null,this.bus.fire("unselectArrow")},rt=function(t,e){const n=document.createElementNS(k,"path");return D(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},kt=function(t,e){const n=document.createElementNS(k,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=rt(t.line.getAttribute("d"),e);n.appendChild(o);const s=rt(t.arrow1.getAttribute("d"),e);if(n.appendChild(s),t.arrow2.getAttribute("d")){const i=rt(t.arrow2.getAttribute("d"),e);n.appendChild(i)}t.insertBefore(n,t.firstChild)},Re=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},We=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const n=e.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",t.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",t.arrow1.getAttribute("d")),n.length>=3&&t.arrow2.getAttribute("d")&&n[2].setAttribute("d",t.arrow2.getAttribute("d"))},U=function(t){t.helper1?.destroy(),t.helper2?.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&Re(t.currentArrow)},Nt=function(t,e,n,o){const{linkController:s,P2:i,P3:r,line1:c,line2:l,nodes:a,map:f,currentArrow:d,bus:p}=t;if(!d)return;s.style.display="initial",i.style.display="initial",r.style.display="initial",a.appendChild(s),a.appendChild(i),a.appendChild(r),kt(d,Lt);let{x:v,y}=B(n),{ctrlX:u,ctrlY:g}=n,{ctrlX:b,ctrlY:w}=o,{x:C,y:T}=B(o);i.style.cssText=`top:${g}px;left:${u}px;`,r.style.cssText=`top:${w}px;left:${b}px;`,q(c,v,y,u,g),q(l,b,w,C,T),t.helper1=Dt.create(i),t.helper2=Dt.create(r),t.helper1.init(f,(h,m)=>{u=u+h/t.scaleVal,g=g+m/t.scaleVal;const x=B({...n,ctrlX:u,ctrlY:g});v=x.x,y=x.y,i.style.top=g+"px",i.style.left=u+"px",Pt(d,v,y,u,g,b,w,C,T,e),q(c,v,y,u,g),e.delta1.x=Math.round(u-n.cx),e.delta1.y=Math.round(g-n.cy),p.fire("updateArrowDelta",e)}),t.helper2.init(f,(h,m)=>{b=b+h/t.scaleVal,w=w+m/t.scaleVal;const x=B({...o,ctrlX:b,ctrlY:w});C=x.x,T=x.y,r.style.top=w+"px",r.style.left=b+"px",Pt(d,v,y,u,g,b,w,C,T,e),q(l,b,w,C,T),e.delta2.x=Math.round(b-o.cx),e.delta2.y=Math.round(w-o.cy),p.fire("updateArrowDelta",e)})};function Ye(){this.arrowSvg.innerHTML="",this.labelContainer.querySelectorAll('.svg-label[data-type="arrow"]').forEach(e=>e.remove());for(let e=0;e<this.arrows.length;e++){const n=this.arrows[e];try{it(this,this.findEle(n.from),this.findEle(n.to),n,!0)}catch{}}this.nodes.appendChild(this.arrowSvg)}function Xe(t){U(this),t&&t.labelEl&&Ct(this,t.labelEl,t.arrowObj)}function Ve(){this.arrows=this.arrows.filter(t=>z(t.from,this.nodeData)&&z(t.to,this.nodeData))}const ze=Object.freeze(Object.defineProperty({__proto__:null,createArrow:$e,createArrowFrom:He,editArrowLabel:Xe,removeArrow:Ie,renderArrow:Ye,selectArrow:Oe,tidyArrow:Ve,unselectArrow:Be},Symbol.toStringTag,{value:"Module"})),Fe=function(t){if(t.length===0)throw new Error("No selected node.");if(t.length===1){const l=t[0].nodeObj,a=t[0].nodeObj.parent;if(!a)throw new Error("Can not select root node.");const f=a.children.findIndex(d=>l===d);return{parent:a.id,start:f,end:f}}let e=0;const n=t.map(l=>{let a=l.nodeObj;const f=[];for(;a.parent;){const d=a.parent,v=d.children?.indexOf(a);a=d,f.unshift({node:a,index:v})}return f.length>e&&(e=f.length),f});let o=0;t:for(;o<e;o++){const l=n[0][o]?.node;for(let a=1;a<n.length;a++)if(n[a][o]?.node!==l)break t}if(!o)throw new Error("Can not select root node.");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;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:i,end:r}},Ge=function(t){const e=document.createElementNS(k,"g");return e.setAttribute("id",t),e},At=function(t,e){const n=document.createElementNS(k,"path");return D(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},_e=t=>t.parentElement.parentElement,qe=function(t,{parent:e,start:n}){const o=t.findEle(e),s=o.nodeObj;let i;return s.parent?i=o.closest("me-main").className:i=t.findEle(s.children[n].id).closest("me-main").className,i},ct=function(t,e){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,v=qe(t,e);let y=1/0,u=0,g=0,b=0;for(let X=i;X<=r;X++){const $t=p.children?.[X];if(!$t)return t.removeSummary(n),null;const Z=_e(t.findEle($t.id)),{offsetLeft:Q,offsetTop:Ht}=M(l,Z),It=i===r?10:20;X===i&&(g=Ht+It),X===r&&(b=Ht+Z.offsetHeight-It),Q<y&&(y=Q),Z.offsetWidth+Q>u&&(u=Z.offsetWidth+Q)}let w,C;const T=p.parent?10:0,h=g+T,m=b+T,x=(h+m)/2,E=c?.stroke||a.cssVar["--color"],S=c?.labelColor||a.cssVar["--color"],P="s-"+n,A=t.markdown?t.markdown(o,e):o;v===O.LHS?(w=At(`M ${y+10} ${h} c -5 0 -10 5 -10 10 L ${y} ${m-10} c 0 5 5 10 10 10 M ${y} ${x} h -10`,E),C=st(A,y-20,x,{anchor:"end",color:S,dataType:"summary",svgId:P})):(w=At(`M ${u-10} ${h} c 5 0 10 5 10 10 L ${u} ${m-10} c 0 5 -5 10 -10 10 M ${u} ${x} h 10`,E),C=st(A,u+20,x,{anchor:"start",color:S,dataType:"summary",svgId:P}));const H=Ge(P);return H.appendChild(w),t.labelContainer.appendChild(C),_(C),H.summaryObj=e,H.labelEl=C,f.appendChild(H),H},je=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(t={}){if(!this.currentNodes)return;const{currentNodes:e,summaries:n,bus:o}=this,{parent:s,start:i,end:r}=Fe(e),c={id:W(),parent:s,start:i,end:r,label:"summary",style:t.style},l=ct(this,c);n.push(c),this.editSummary(l),o.fire("operation",{name:"createSummary",obj:c})},createSummaryFrom:function(t){const e=W(),n={...t,id:e};ct(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(t){t&&t.labelEl&&Ct(this,t.labelEl,t.summaryObj)},removeSummary:function(t){const e=this.summaries.findIndex(n=>n.id===t);e>-1&&(this.summaries.splice(e,1),this.nodes.querySelector("#s-"+t)?.remove(),this.nodes.querySelector("#label-s-"+t)?.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{ct(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.labelEl;e&&e.classList.add("selected"),this.currentSummary=t,this.bus.fire("selectSummary",t.summaryObj)},unselectSummary:function(){this.currentSummary?.labelEl?.classList.remove("selected"),this.currentSummary=null,this.bus.fire("unselectSummary")}},Symbol.toStringTag,{value:"Module"})),L="http://www.w3.org/2000/svg";function Ue(t,e){const n=document.createElementNS(L,"svg");return D(n,{version:"1.1",xmlns:L,height:t,width:e}),n}function Ke(t,e){return(parseInt(t)-parseInt(e))/2}function Je(t,e,n,o){const s=document.createElementNS(L,"g");let i="";return t.text?i=t.text.textContent:i=t.childNodes[0].textContent,i.split(`
16
+ `).forEach((c,l)=>{const a=document.createElementNS(L,"text");D(a,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+Ke(e.lineHeight,e.fontSize)*(l+1)+parseFloat(e.fontSize)*(l+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),a.innerHTML=c,s.appendChild(a)}),s}function Ze(t,e,n,o){let s="";t.nodeObj?.dangerouslySetInnerHTML?s=t.nodeObj.dangerouslySetInnerHTML:t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const i=document.createElementNS(L,"foreignObject");D(i,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return D(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),r.innerHTML=s,i.appendChild(r),i}function Qe(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=M(t.nodes,e),i=document.createElementNS(L,"rect");return D(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function K(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=M(t.nodes,e),r=document.createElementNS(L,"rect");D(r,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const c=document.createElementNS(L,"g");c.appendChild(r);let l;return n?l=Ze(e,o,s,i):l=Je(e,o,s,i),c.appendChild(l),c}function tn(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=M(t.nodes,e),i=document.createElementNS(L,"a"),r=document.createElementNS(L,"text");return D(r,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=e.textContent,i.appendChild(r),i.setAttribute("href",e.href),i}function en(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=M(t.nodes,e),i=document.createElementNS(L,"image");return D(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:e.src}),i}const J=100,nn='<?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">',on=(t,e=!1)=>{const n=t.nodes,o=n.offsetHeight+J*2,s=n.offsetWidth+J*2,i=Ue(o+"px",s+"px"),r=document.createElementNS(L,"svg"),c=document.createElementNS(L,"rect");D(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(d=>{const p=d.cloneNode(!0),{offsetLeft:v,offsetTop:y}=M(n,d.parentElement);p.setAttribute("x",`${v}`),p.setAttribute("y",`${y}`),r.appendChild(p)});const l=n.querySelector(".lines")?.cloneNode(!0);l&&r.appendChild(l);const a=n.querySelector(".topiclinks")?.cloneNode(!0);a&&r.appendChild(a);const f=n.querySelector(".summary")?.cloneNode(!0);return f&&r.appendChild(f),n.querySelectorAll("me-tpc").forEach(d=>{d.nodeObj.dangerouslySetInnerHTML?r.appendChild(K(t,d,!e)):(r.appendChild(Qe(t,d)),r.appendChild(K(t,d.text,!e)))}),n.querySelectorAll(".tags > span").forEach(d=>{r.appendChild(K(t,d))}),n.querySelectorAll(".icons > span").forEach(d=>{r.appendChild(K(t,d))}),n.querySelectorAll(".hyper-link").forEach(d=>{r.appendChild(tn(t,d))}),n.querySelectorAll("img").forEach(d=>{r.appendChild(en(t,d))}),D(r,{x:J+"",y:J+"",overflow:"visible"}),i.appendChild(r),i},sn=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),nn+t.outerHTML);function rn(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=s=>{e(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(t)})}const cn={getObjById:z,generateNewObj:Bt,layout:Gt,linkDiv:Ee,editTopic:Zt,createWrapper:jt,createParent:Ut,createChildren:Kt,createTopic:Jt,findEle:mt,changeTheme:Pe,changeCompact:ke,...pe,...{},...ze,...je,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await rn(n);return new Promise((s,i)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const c=document.createElement("canvas");c.width=r.width,c.height=r.height,c.getContext("2d").drawImage(r,0,0),c.toBlob(s,"image/png",1)},r.src=o,r.onerror=i})},exportSvg:function(t=!1,e){const n=on(this,t),o=sn(n,e);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"})),init(t){if(t=JSON.parse(JSON.stringify(t)),!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),t.compact!==void 0&&(this.compact=t.compact),this.changeTheme(t.theme||this.theme,!1),t.meta&&(this.meta=t.meta),this.nodeData=t.nodeData,tt(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&Me(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(t=>t()),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},enableMobileMultiSelect(t){this.mobileMultiSelect=t}},ln="5.12.2-beta.3";function an(t){return{x:0,y:0,moved:!1,mousedown:!1,handlePointerDown(e){this.moved=!1;const n=e.target,o=t.mouseSelectionButton===0?2:0,s=t.spacePressed&&e.button===0&&e.pointerType==="mouse",i=!t.editable||e.button===o&&e.pointerType==="mouse"||e.pointerType==="touch";!s&&!i||(this.x=e.clientX,this.y=e.clientY,n.className!=="circle"&&n.contentEditable!=="plaintext-only"&&(this.mousedown=!0,n.setPointerCapture(e.pointerId)))},handlePointerMove(e){if(!this.mousedown||e.target.contentEditable==="plaintext-only"&&!t.spacePressed)return!1;const n=e.clientX-this.x,o=e.clientY-this.y;return this.x=e.clientX,this.y=e.clientY,this.moved=!0,t.move(n,o),!0},handlePointerUp(e){if(!this.mousedown)return;const n=e.target;n.hasPointerCapture&&n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),this.mousedown=!1},clear(){this.mousedown=!1,this.moved=!1}}}function N({el:t,direction:e,editable:n,contextMenu:o,toolBar:s,keypress:i,mouseSelectionButton:r,selectionContainer:c,before:l,newTopicName:a,allowUndo:f,generateMainBranch:d,generateSubBranch:p,overflowHidden:v,compact:y,theme:u,alignment:g,scaleSensitivity:b,scaleMax:w,scaleMin:C,handleWheel:T,markdown:h,imageProxy:m,pasteHandler:x,mobileMultiSelect:E}){let S=null;const P=Object.prototype.toString.call(t);if(P==="[object HTMLDivElement]"?S=t:P==="[object String]"&&(S=document.querySelector(t)),!S)throw new Error("MindElixir: el is not a valid element");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=b??.1,this.scaleMax=w??1.4,this.scaleMin=C??.2,this.generateMainBranch=d||Et,this.generateSubBranch=p||Tt,this.overflowHidden=v??!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=an(this),this.bus=Ce(),this.container=document.createElement("div"),this.selectionContainer=c||this.container,this.container.className="map-container";const A=window.matchMedia("(prefers-color-scheme: dark)");this.theme=u||(A.matches?V:R);const H=document.createElement("div");H.className="map-canvas",this.map=H,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=document.createElement("me-nodes"),this.lines=Y("lines"),this.summarySvg=Y("summary"),this.linkController=Y("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=xt(),this.line2=xt(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.arrowSvg=Y("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(xe(this)),x&&(this.pasteHandler=x)}return N.prototype=cn,Object.defineProperty(N.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),N.LEFT=0,N.RIGHT=1,N.SIDE=2,N.THEME=R,N.DARK_THEME=V,N.version=ln,N.E=mt,$.DARK_THEME=V,$.LEFT=0,$.RIGHT=1,$.SIDE=2,$.THEME=R,$.default=N,Object.defineProperties($,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),$})({});