mind-elixir 5.0.0-beta.39 → 5.0.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LayoutSsr.iife.js +1 -1
- package/dist/LayoutSsr.js +31 -31
- package/dist/MindElixir.iife.js +3 -3
- package/dist/MindElixir.js +7 -6
- package/dist/MindElixirLite.iife.js +3 -3
- package/dist/MindElixirLite.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/LayoutSsr.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var LayoutSsr=function(p){"use strict";var d=(n=>(n.LHS="lhs",n.RHS="rhs",n))(d||{});const T=n=>`<div class="map-container"><div>${n}</div></div>`,L=function(n,c={}){const{direction:a=2}=c,o=e=>{const r={id:e.id,topic:e.topic,direction:e.direction,style:e.style,tags:e.tags,icons:e.icons,hyperLink:e.hyperLink,expanded:e.expanded,image:e.image,branchColor:e.branchColor,dangerouslySetInnerHTML:e.dangerouslySetInnerHTML,note:e.note};return e.children&&e.children.length>0&&(r.children=e.children.map(o)),r},g=o(n),u=n.children||[],m=[],h=[];if(a===2){let e=0,r=0;u.forEach(t=>{const s=o(t);t.direction===0?(s.direction=0,m.push(s),e+=1):t.direction===1?(s.direction=1,h.push(s),r+=1):e<=r?(s.direction=0,m.push(s),e+=1):(s.direction=1,h.push(s),r+=1)})}else a===0?u.forEach(e=>{const r=o(e);r.direction=0,m.push(r)}):u.forEach(e=>{const r=o(e);r.direction=1,h.push(r)});return{root:g,leftNodes:m,rightNodes:h,direction:a}},v=function(n,c={}){const{className:a=""}=c,o=(t,s=!1)=>{const N=`me${t.id}`,R="me-tpc";let $="";if(t.style){const i=[];t.style.color&&i.push(`color: ${t.style.color}`),t.style.background&&i.push(`background: ${t.style.background}`),t.style.fontSize&&i.push(`font-size: ${t.style.fontSize}px`),t.style.fontWeight&&i.push(`font-weight: ${t.style.fontWeight}`),i.length>0&&($=` style="${i.join("; ")}"`)}let f="";if(t.dangerouslySetInnerHTML)f=t.dangerouslySetInnerHTML;else{if(f=S(t.topic),t.tags&&t.tags.length>0){const i=t.tags.map(l=>`<span class="me-tag">${S(l)}</span>`).join("");f+=i}if(t.icons&&t.icons.length>0){const i=t.icons.map(l=>`<span class="me-icon">${l}</span>`).join("");f+=i}if(t.image){const{url:i,width:l,height:b,fit:j="cover"}=t.image;f+=`<img src="${S(i)}" width="${l}" height="${b}" style="object-fit: ${j}" alt="" />`}}const H=`<me-tpc class="${R}" data-nodeid="${N}"${$}>${f}</me-tpc>`;if(s)return`<me-root>${H}</me-root>`;let y="";return t.children&&t.children.length>0&&t.expanded!==!1&&(y=`<me-children>${t.children.map(l=>g(l)).join("")}</me-children>`),`<me-wrapper>${`<me-parent>${H}</me-parent>`}${y}</me-wrapper>`},g=t=>o(t,!1),u=o(n.root,!0),m=n.leftNodes.map(t=>g(t)).join(""),h=n.rightNodes.map(t=>g(t)).join(""),e=`<me-main class="${d.LHS}">${m}</me-main>`,r=`<me-main class="${d.RHS}">${h}</me-main>`;return T(`<div class="
|
|
1
|
+
var LayoutSsr=function(p){"use strict";var d=(n=>(n.LHS="lhs",n.RHS="rhs",n))(d||{});const T=n=>`<div class="map-container"><div>${n}</div></div>`,L=function(n,c={}){const{direction:a=2}=c,o=e=>{const r={id:e.id,topic:e.topic,direction:e.direction,style:e.style,tags:e.tags,icons:e.icons,hyperLink:e.hyperLink,expanded:e.expanded,image:e.image,branchColor:e.branchColor,dangerouslySetInnerHTML:e.dangerouslySetInnerHTML,note:e.note};return e.children&&e.children.length>0&&(r.children=e.children.map(o)),r},g=o(n),u=n.children||[],m=[],h=[];if(a===2){let e=0,r=0;u.forEach(t=>{const s=o(t);t.direction===0?(s.direction=0,m.push(s),e+=1):t.direction===1?(s.direction=1,h.push(s),r+=1):e<=r?(s.direction=0,m.push(s),e+=1):(s.direction=1,h.push(s),r+=1)})}else a===0?u.forEach(e=>{const r=o(e);r.direction=0,m.push(r)}):u.forEach(e=>{const r=o(e);r.direction=1,h.push(r)});return{root:g,leftNodes:m,rightNodes:h,direction:a}},v=function(n,c={}){const{className:a=""}=c,o=(t,s=!1)=>{const N=`me${t.id}`,R="me-tpc";let $="";if(t.style){const i=[];t.style.color&&i.push(`color: ${t.style.color}`),t.style.background&&i.push(`background: ${t.style.background}`),t.style.fontSize&&i.push(`font-size: ${t.style.fontSize}px`),t.style.fontWeight&&i.push(`font-weight: ${t.style.fontWeight}`),i.length>0&&($=` style="${i.join("; ")}"`)}let f="";if(t.dangerouslySetInnerHTML)f=t.dangerouslySetInnerHTML;else{if(f=S(t.topic),t.tags&&t.tags.length>0){const i=t.tags.map(l=>`<span class="me-tag">${S(l)}</span>`).join("");f+=i}if(t.icons&&t.icons.length>0){const i=t.icons.map(l=>`<span class="me-icon">${l}</span>`).join("");f+=i}if(t.image){const{url:i,width:l,height:b,fit:j="cover"}=t.image;f+=`<img src="${S(i)}" width="${l}" height="${b}" style="object-fit: ${j}" alt="" />`}}const H=`<me-tpc class="${R}" data-nodeid="${N}"${$}>${f}</me-tpc>`;if(s)return`<me-root>${H}</me-root>`;let y="";return t.children&&t.children.length>0&&t.expanded!==!1&&(y=`<me-children>${t.children.map(l=>g(l)).join("")}</me-children>`),`<me-wrapper>${`<me-parent>${H}</me-parent>`}${y}</me-wrapper>`},g=t=>o(t,!1),u=o(n.root,!0),m=n.leftNodes.map(t=>g(t)).join(""),h=n.rightNodes.map(t=>g(t)).join(""),e=`<me-main class="${d.LHS}">${m}</me-main>`,r=`<me-main class="${d.RHS}">${h}</me-main>`;return T(`<div class="${a}">${e}${u}${r}</div>`)};function S(n){const c=typeof document<"u"?document.createElement("div"):null;return c?(c.textContent=n,c.innerHTML):n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const E=function(n){return JSON.stringify(n,null,2)},I=function(n,c,a={}){return{nodeData:n,layoutResult:c,options:{direction:c.direction,...a},timestamp:Date.now()}};return p.getHydrationData=I,p.getSSRData=E,p.layoutSSR=L,p.renderSSRHTML=v,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),p}({});
|
package/dist/LayoutSsr.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var d = /* @__PURE__ */ ((
|
|
2
|
-
const I = (
|
|
1
|
+
var d = /* @__PURE__ */ ((r) => (r.LHS = "lhs", r.RHS = "rhs", r))(d || {});
|
|
2
|
+
const I = (r) => `<div class="map-container"><div>${r}</div></div>`, v = function(r, c = {}) {
|
|
3
3
|
const { direction: l = 2 } = c, o = (e) => {
|
|
4
|
-
const
|
|
4
|
+
const n = {
|
|
5
5
|
id: e.id,
|
|
6
6
|
topic: e.topic,
|
|
7
7
|
direction: e.direction,
|
|
@@ -15,21 +15,21 @@ const I = (n) => `<div class="map-container"><div>${n}</div></div>`, v = functio
|
|
|
15
15
|
dangerouslySetInnerHTML: e.dangerouslySetInnerHTML,
|
|
16
16
|
note: e.note
|
|
17
17
|
};
|
|
18
|
-
return e.children && e.children.length > 0 && (
|
|
19
|
-
}, f = o(
|
|
18
|
+
return e.children && e.children.length > 0 && (n.children = e.children.map(o)), n;
|
|
19
|
+
}, f = o(r), g = r.children || [], p = [], m = [];
|
|
20
20
|
if (l === 2) {
|
|
21
|
-
let e = 0,
|
|
21
|
+
let e = 0, n = 0;
|
|
22
22
|
g.forEach((t) => {
|
|
23
|
-
const
|
|
24
|
-
t.direction === 0 ? (
|
|
23
|
+
const i = o(t);
|
|
24
|
+
t.direction === 0 ? (i.direction = 0, p.push(i), e += 1) : t.direction === 1 ? (i.direction = 1, m.push(i), n += 1) : e <= n ? (i.direction = 0, p.push(i), e += 1) : (i.direction = 1, m.push(i), n += 1);
|
|
25
25
|
});
|
|
26
26
|
} else
|
|
27
27
|
l === 0 ? g.forEach((e) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const n = o(e);
|
|
29
|
+
n.direction = 0, p.push(n);
|
|
30
30
|
}) : g.forEach((e) => {
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const n = o(e);
|
|
32
|
+
n.direction = 1, m.push(n);
|
|
33
33
|
});
|
|
34
34
|
return {
|
|
35
35
|
root: f,
|
|
@@ -37,48 +37,48 @@ const I = (n) => `<div class="map-container"><div>${n}</div></div>`, v = functio
|
|
|
37
37
|
rightNodes: m,
|
|
38
38
|
direction: l
|
|
39
39
|
};
|
|
40
|
-
}, W = function(
|
|
41
|
-
const { className: l = "" } = c, o = (t,
|
|
40
|
+
}, W = function(r, c = {}) {
|
|
41
|
+
const { className: l = "" } = c, o = (t, i = !1) => {
|
|
42
42
|
const S = `me${t.id}`, T = "me-tpc";
|
|
43
43
|
let $ = "";
|
|
44
44
|
if (t.style) {
|
|
45
|
-
const
|
|
46
|
-
t.style.color &&
|
|
45
|
+
const s = [];
|
|
46
|
+
t.style.color && s.push(`color: ${t.style.color}`), t.style.background && s.push(`background: ${t.style.background}`), t.style.fontSize && s.push(`font-size: ${t.style.fontSize}px`), t.style.fontWeight && s.push(`font-weight: ${t.style.fontWeight}`), s.length > 0 && ($ = ` style="${s.join("; ")}"`);
|
|
47
47
|
}
|
|
48
48
|
let h = "";
|
|
49
49
|
if (t.dangerouslySetInnerHTML)
|
|
50
50
|
h = t.dangerouslySetInnerHTML;
|
|
51
51
|
else {
|
|
52
52
|
if (h = u(t.topic), t.tags && t.tags.length > 0) {
|
|
53
|
-
const
|
|
54
|
-
h +=
|
|
53
|
+
const s = t.tags.map((a) => `<span class="me-tag">${u(a)}</span>`).join("");
|
|
54
|
+
h += s;
|
|
55
55
|
}
|
|
56
56
|
if (t.icons && t.icons.length > 0) {
|
|
57
|
-
const
|
|
58
|
-
h +=
|
|
57
|
+
const s = t.icons.map((a) => `<span class="me-icon">${a}</span>`).join("");
|
|
58
|
+
h += s;
|
|
59
59
|
}
|
|
60
60
|
if (t.image) {
|
|
61
|
-
const { url:
|
|
62
|
-
h += `<img src="${u(
|
|
61
|
+
const { url: s, width: a, height: L, fit: E = "cover" } = t.image;
|
|
62
|
+
h += `<img src="${u(s)}" width="${a}" height="${L}" style="object-fit: ${E}" alt="" />`;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
const H = `<me-tpc class="${T}" data-nodeid="${S}"${$}>${h}</me-tpc>`;
|
|
66
|
-
if (
|
|
66
|
+
if (i)
|
|
67
67
|
return `<me-root>${H}</me-root>`;
|
|
68
68
|
let y = "";
|
|
69
69
|
return t.children && t.children.length > 0 && t.expanded !== !1 && (y = `<me-children>${t.children.map((a) => f(a)).join("")}</me-children>`), `<me-wrapper>${`<me-parent>${H}</me-parent>`}${y}</me-wrapper>`;
|
|
70
|
-
}, f = (t) => o(t, !1), g = o(
|
|
71
|
-
return I(`<div class="
|
|
70
|
+
}, f = (t) => o(t, !1), g = o(r.root, !0), p = r.leftNodes.map((t) => f(t)).join(""), m = r.rightNodes.map((t) => f(t)).join(""), e = `<me-main class="${d.LHS}">${p}</me-main>`, n = `<me-main class="${d.RHS}">${m}</me-main>`;
|
|
71
|
+
return I(`<div class="${l}">${e}${g}${n}</div>`);
|
|
72
72
|
};
|
|
73
|
-
function u(
|
|
73
|
+
function u(r) {
|
|
74
74
|
const c = typeof document < "u" ? document.createElement("div") : null;
|
|
75
|
-
return c ? (c.textContent =
|
|
75
|
+
return c ? (c.textContent = r, c.innerHTML) : r.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
76
76
|
}
|
|
77
|
-
const j = function(
|
|
78
|
-
return JSON.stringify(
|
|
79
|
-
}, R = function(
|
|
77
|
+
const j = function(r) {
|
|
78
|
+
return JSON.stringify(r, null, 2);
|
|
79
|
+
}, R = function(r, c, l = {}) {
|
|
80
80
|
return {
|
|
81
|
-
nodeData:
|
|
81
|
+
nodeData: r,
|
|
82
82
|
layoutResult: c,
|
|
83
83
|
options: {
|
|
84
84
|
direction: c.direction,
|
package/dist/MindElixir.iife.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var MindElixir=function(){"use strict";var bo=Object.defineProperty;var yo=(G,O,K)=>O in G?bo(G,O,{enumerable:!0,configurable:!0,writable:!0,value:K}):G[O]=K;var Q=(G,O,K)=>(yo(G,typeof O!="symbol"?O+"":O,K),K);const G="",Ne={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--gap":"30px","--main-color":"#444446","--main-bgcolor":"#ffffff","--color":"#777777","--bgcolor":"#f6f6f6","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea"}},_e={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--color":"#cccccc","--bgcolor":"#252526","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969"}};function ee(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""")}const te=function(e,t){if(t.id===e)return t;if(t.children&&t.children.length){for(let n=0;n<t.children.length;n++){const o=te(e,t.children[n]);if(o)return o}return null}else return null},j=(e,t)=>{if(e.parent=t,e.children)for(let n=0;n<e.children.length;n++)j(e.children[n],e)};function he(e){if(e.id=R(),e.children)for(let t=0;t<e.children.length;t++)he(e.children[t])}function ne(e,t,n,o){const s=o-t,i=e-n;let r=Math.atan(Math.abs(s)/Math.abs(i))/3.14*180;if(isNaN(r))return;i<0&&s>0&&(r=180-r),i<0&&s<0&&(r=180+r),i>0&&s<0&&(r=360-r);const c=12,l=30,u=r+l,d=r-l;return{x1:n+Math.cos(Math.PI*u/180)*c,y1:o-Math.sin(Math.PI*u/180)*c,x2:n+Math.cos(Math.PI*d/180)*c,y2:o-Math.sin(Math.PI*d/180)*c}}function R(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const ut=function(){const e=R();return{topic:this.newTopicName,id:e}};function ue(e){return JSON.parse(JSON.stringify(e,(n,o)=>{if(n!=="parent")return o}))}const $=(e,t)=>{let n=0,o=0;for(;t&&t!==e;)n+=t.offsetLeft,o+=t.offsetTop,t=t.offsetParent;return{offsetLeft:n,offsetTop:o}},N=(e,t)=>{for(const n in t)e.setAttribute(n,t[n])},fe=e=>e?e.tagName==="ME-TPC":!1,oe=e=>e.filter(t=>t.nodeObj.parent).filter((t,n,o)=>{for(let s=0;s<o.length;s++){if(t===o[s])continue;const{parent:i}=t.nodeObj;if(i===o[s].nodeObj)return!1}return!0}),Te=e=>{const t=/translate\(([^,]+),\s*([^)]+)\)/,n=e.match(t);return n?{x:parseFloat(n[1]),y:parseFloat(n[2])}:{x:0,y:0}},pe=function(e){for(let t=0;t<e.length;t++){const{dom:n,evt:o,func:s}=e[t];n.addEventListener(o,s)}return function(){for(let n=0;n<e.length;n++){const{dom:o,evt:s,func:i}=e[n];o.removeEventListener(s,i)}}};var T=(e=>(e.LHS="lhs",e.RHS="rhs",e))(T||{});const ft=e=>{const t=e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");e.selectNode(t[Math.ceil(t.length/2)-1])},pt=e=>{const t=e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");e.selectNode(t[Math.ceil(t.length/2)-1])},mt=e=>{e.selectNode(e.map.querySelector("me-root>me-tpc"))},gt=function(e,t){const n=t.parentElement.parentElement.parentElement.previousSibling;if(n){const o=n.firstChild;e.selectNode(o)}},vt=function(e,t){const n=t.parentElement.nextSibling;if(n&&n.firstChild){const o=n.firstChild.firstChild.firstChild;e.selectNode(o)}},ke=function(e,t){var i,r;const n=e.currentNode||((i=e.currentNodes)==null?void 0:i[0]);if(!n)return;const o=n.nodeObj,s=n.offsetParent.offsetParent.parentElement;o.parent?s.className===t?vt(e,n):(r=o.parent)!=null&&r.parent?gt(e,n):mt(e):t===T.LHS?ft(e):pt(e)},Me=function(e,t){const n=e.currentNode;if(!n||!n.nodeObj.parent)return;const s=t+"Sibling",i=n.parentElement.parentElement[s];i?e.selectNode(i.firstChild.firstChild):e.selectNode(n)},se=function(e,t,n){const{scaleVal:o,scaleSensitivity:s}=e;switch(t){case"in":if(o>1.6)return;e.scale(o+s,n);break;case"out":if(o<.6)return;e.scale(o-s,n)}};function bt(e,t){t=t===!0?{}:t;const n=()=>{e.currentArrow?e.removeArrow():e.currentSummary?e.removeSummary(e.currentSummary.summaryObj.id):e.currentNodes&&e.removeNodes(e.currentNodes)},o={Enter:s=>{s.shiftKey?e.insertSibling("before"):s.ctrlKey?e.insertParent():e.insertSibling("after")},Tab:()=>{e.addChild()},F1:()=>{e.toCenter()},F2:()=>{e.beginEdit()},ArrowUp:s=>{if(s.altKey)e.moveUpNode();else{if(s.metaKey||s.ctrlKey)return e.initSide();Me(e,"previous")}},ArrowDown:s=>{s.altKey?e.moveDownNode():Me(e,"next")},ArrowLeft:s=>{if(s.metaKey||s.ctrlKey)return e.initLeft();ke(e,T.LHS)},ArrowRight:s=>{if(s.metaKey||s.ctrlKey)return e.initRight();ke(e,T.RHS)},PageUp:()=>e.moveUpNode(),PageDown:()=>{e.moveDownNode()},c:s=>{(s.metaKey||s.ctrlKey)&&(e.waitCopy=e.currentNodes)},x:s=>{(s.metaKey||s.ctrlKey)&&(e.waitCopy=e.currentNodes,n())},v:s=>{!e.waitCopy||!e.currentNode||(s.metaKey||s.ctrlKey)&&(e.waitCopy.length===1?e.copyNode(e.waitCopy[0],e.currentNode):e.copyNodes(e.waitCopy,e.currentNode))},"=":s=>{(s.metaKey||s.ctrlKey)&&se(e,"in")},"-":s=>{(s.metaKey||s.ctrlKey)&&se(e,"out")},0:s=>{(s.metaKey||s.ctrlKey)&&e.scale(1)},Delete:n,Backspace:n,...t};e.container.onkeydown=s=>{if(s.preventDefault(),!e.editable||s.target!==s.currentTarget)return;const i=o[s.key];i&&i(s)}}const Le=e=>typeof TouchEvent<"u"&&e instanceof TouchEvent;function yt(e){const{dragMoveHelper:t}=e;let n=0,o=0;const s=a=>{var b,y,x;if(Le(a)||a.button!==0)return;if((b=e.helper1)!=null&&b.moved){e.helper1.clear();return}if((y=e.helper2)!=null&&y.moved){e.helper2.clear();return}if(t.moved){t.clear();return}const f=a.target;if(f.tagName==="ME-EPD")a.ctrlKey||a.metaKey?e.expandNodeAll(f.previousSibling):e.expandNode(f.previousSibling);else if(f.tagName==="ME-TPC"&&e.currentNodes.length>1)e.selectNode(f);else if(!e.editable)return;const m=(x=f.parentElement)==null?void 0:x.parentElement;m.getAttribute("class")==="topiclinks"?e.selectArrow(f.parentElement):m.getAttribute("class")==="summary"&&e.selectSummary(f.parentElement)},i=a=>{var b;if(!e.editable)return;const f=a.target;fe(f)&&e.beginEdit(f);const m=(b=f.parentElement)==null?void 0:b.parentElement;m.getAttribute("class")==="topiclinks"?e.editArrowLabel(f.parentElement):m.getAttribute("class")==="summary"&&e.editSummary(f.parentElement)};let r=0;const c=a=>{const f=new Date().getTime(),m=f-r;m<300&&m>0&&i(a),r=f},l=a=>{var f,m;if(t.moved=!1,a instanceof MouseEvent){const b=e.mouseSelectionButton===0?2:0;if(a.button!==b)return}else n=((f=a.touches[0])==null?void 0:f.clientX)||0,o=((m=a.touches[0])==null?void 0:m.clientY)||0;a.target.contentEditable==="inherit"&&(t.mousedown=!0,e.map.style.transition="none")},u=a=>{var f,m,b,y;if(a.target.contentEditable==="inherit")if(a instanceof MouseEvent)t.onMove(a),t.x=a.clientX,t.y=a.clientY;else{const x=((f=a.touches[0])==null?void 0:f.clientX)||0,E=((m=a.touches[0])==null?void 0:m.clientY)||0,w=x-n,S=E-o,C={clientX:x,clientY:E,movementX:w,movementY:S,target:a.target};t.onMove(C),t.x=x,t.y=E,n=x,o=E}else if(a instanceof MouseEvent)t.x=a.clientX,t.y=a.clientY;else{const x=((b=a.touches[0])==null?void 0:b.clientX)||0,E=((y=a.touches[0])==null?void 0:y.clientY)||0;t.x=x,t.y=E,n=x,o=E}},d=a=>{if(a instanceof MouseEvent){const f=e.mouseSelectionButton===0?2:0;if(a.button!==f)return}t.clear()},h=a=>{if(a.preventDefault(),Le(a)||!e.editable)return;const f=a.target;fe(f)&&!f.classList.contains("selected")&&e.selectNode(f),setTimeout(()=>{e.dragMoveHelper.moved||e.bus.fire("showContextMenu",a)},200)},g=a=>{a.stopPropagation(),a.preventDefault(),a.ctrlKey||a.metaKey?a.deltaY<0?se(e,"in",e.dragMoveHelper):e.scaleVal-e.scaleSensitivity>0&&se(e,"out",e.dragMoveHelper):a.shiftKey?e.move(-a.deltaY,0):(e.map.style.transition="none",e.move(-a.deltaX,-a.deltaY),e.map.style.transition="transform 0.3s")},{container:v}=e;return pe([{dom:v,evt:"click",func:s},{dom:v,evt:"dblclick",func:i},{dom:v,evt:"mousedown",func:l},{dom:document,evt:"mousemove",func:u},{dom:document,evt:"mouseup",func:d},{dom:v,evt:"contextmenu",func:h},{dom:v,evt:"touchstart",func:l},{dom:document,evt:"touchmove",func:u},{dom:document,evt:"touchend",func:d},{dom:v,evt:"touchend",func:c},{dom:v,evt:"wheel",func:g}])}function wt(){return{handlers:{},addListener:function(e,t){this.handlers[e]===void 0&&(this.handlers[e]=[]),this.handlers[e].push(t)},fire:function(e,...t){if(this.handlers[e]instanceof Array){const n=this.handlers[e];for(let o=0;o<n.length;o++)n[o](...t)}},removeListener:function(e,t){if(!this.handlers[e])return;const n=this.handlers[e];if(!t)n.length=0;else if(n.length)for(let o=0;o<n.length;o++)n[o]===t&&this.handlers[e].splice(o,1)}}}const ie=document,xt=function(){this.nodes.innerHTML="";const e=this.createTopic(this.nodeData);me(e,this.nodeData),e.draggable=!1;const t=ie.createElement("me-root");t.appendChild(e);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)})}Et(this,n,t)},Et=function(e,t,n){const o=ie.createElement("me-main");o.className=T.LHS;const s=ie.createElement("me-main");s.className=T.RHS;for(let i=0;i<t.length;i++){const r=t[i],{grp:c}=e.createWrapper(r);e.direction===2?r.direction===0?o.appendChild(c):s.appendChild(c):e.direction===0?o.appendChild(c):s.appendChild(c)}e.nodes.appendChild(o),e.nodes.appendChild(n),e.nodes.appendChild(s),e.nodes.appendChild(e.lines)},St=function(e,t){const n=ie.createElement("me-children");for(let o=0;o<t.length;o++){const s=t[o],{grp:i}=e.createWrapper(s);n.appendChild(i)}return n},L=document,Ae=function(e,t){const o=(this.el?this.el:t||document).querySelector(`[data-nodeid=me${e}]`);if(!o)throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);return o},me=function(e,t){if(e.innerHTML="",t.style){const n=t.style;for(const o in n)e.style[o]=n[o]}if(t.dangerouslySetInnerHTML){e.innerHTML=t.dangerouslySetInnerHTML;return}if(t.image){const n=t.image;if(n.url&&n.width&&n.height){const o=L.createElement("img");o.src=n.url,o.style.width=n.width+"px",o.style.height=n.height+"px",n.fit&&(o.style.objectFit=n.fit),e.appendChild(o),e.image=o}}else e.image&&(e.image=void 0);{const n=L.createElement("span");n.className="text",n.textContent=t.topic,e.appendChild(n),e.text=n}if(t.hyperLink){const n=L.createElement("a");n.className="hyper-link",n.target="_blank",n.innerText="🔗",n.href=t.hyperLink,e.appendChild(n),e.link=n}else e.link&&(e.link=void 0);if(t.icons&&t.icons.length){const n=L.createElement("span");n.className="icons",n.innerHTML=t.icons.map(o=>`<span>${ee(o)}</span>`).join(""),e.appendChild(n),e.icons=n}else e.icons&&(e.icons=void 0);if(t.tags&&t.tags.length){const n=L.createElement("div");n.className="tags",n.innerHTML=t.tags.map(o=>`<span>${ee(o)}</span>`).join(""),e.appendChild(n),e.tags=n}else e.tags&&(e.tags=void 0)},Ct=function(e,t){const n=L.createElement("me-wrapper"),{p:o,tpc:s}=this.createParent(e);if(n.appendChild(o),!t&&e.children&&e.children.length>0){const i=ge(e.expanded);if(o.appendChild(i),e.expanded!==!1){const r=St(this,e.children);n.appendChild(r)}}return{grp:n,top:o,tpc:s}},Nt=function(e){const t=L.createElement("me-parent"),n=this.createTopic(e);return me(n,e),t.appendChild(n),{p:t,tpc:n}},_t=function(e){const t=L.createElement("me-children");return t.append(...e),t},Tt=function(e){const t=L.createElement("me-tpc");return t.nodeObj=e,t.dataset.nodeid="me"+e.id,t.draggable=this.draggable,t};function De(e){const t=L.createRange();t.selectNodeContents(e);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(t))}const kt=function(e){if(!e)return;const t=L.createElement("div"),n=e.text.textContent;e.appendChild(t),t.id="input-box",t.textContent=n,t.contentEditable="plaintext-only",t.spellcheck=!1;const o=getComputedStyle(e);t.style.cssText=`min-width:${e.offsetWidth-8}px;
|
|
1
|
+
var MindElixir=function(){"use strict";var yo=Object.defineProperty;var bo=(G,O,K)=>O in G?yo(G,O,{enumerable:!0,configurable:!0,writable:!0,value:K}):G[O]=K;var Q=(G,O,K)=>(bo(G,typeof O!="symbol"?O+"":O,K),K);const G="",Ne={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--gap":"30px","--main-color":"#444446","--main-bgcolor":"#ffffff","--color":"#777777","--bgcolor":"#f6f6f6","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea"}},_e={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--color":"#cccccc","--bgcolor":"#252526","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969"}};function ee(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""")}const te=function(e,t){if(t.id===e)return t;if(t.children&&t.children.length){for(let n=0;n<t.children.length;n++){const o=te(e,t.children[n]);if(o)return o}return null}else return null},j=(e,t)=>{if(e.parent=t,e.children)for(let n=0;n<e.children.length;n++)j(e.children[n],e)};function he(e){if(e.id=R(),e.children)for(let t=0;t<e.children.length;t++)he(e.children[t])}function ne(e,t,n,o){const s=o-t,i=e-n;let r=Math.atan(Math.abs(s)/Math.abs(i))/3.14*180;if(isNaN(r))return;i<0&&s>0&&(r=180-r),i<0&&s<0&&(r=180+r),i>0&&s<0&&(r=360-r);const c=12,l=30,u=r+l,d=r-l;return{x1:n+Math.cos(Math.PI*u/180)*c,y1:o-Math.sin(Math.PI*u/180)*c,x2:n+Math.cos(Math.PI*d/180)*c,y2:o-Math.sin(Math.PI*d/180)*c}}function R(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const ut=function(){const e=R();return{topic:this.newTopicName,id:e}};function ue(e){return JSON.parse(JSON.stringify(e,(n,o)=>{if(n!=="parent")return o}))}const $=(e,t)=>{let n=0,o=0;for(;t&&t!==e;)n+=t.offsetLeft,o+=t.offsetTop,t=t.offsetParent;return{offsetLeft:n,offsetTop:o}},N=(e,t)=>{for(const n in t)e.setAttribute(n,t[n])},fe=e=>e?e.tagName==="ME-TPC":!1,oe=e=>e.filter(t=>t.nodeObj.parent).filter((t,n,o)=>{for(let s=0;s<o.length;s++){if(t===o[s])continue;const{parent:i}=t.nodeObj;if(i===o[s].nodeObj)return!1}return!0}),Te=e=>{const t=/translate\(([^,]+),\s*([^)]+)\)/,n=e.match(t);return n?{x:parseFloat(n[1]),y:parseFloat(n[2])}:{x:0,y:0}},pe=function(e){for(let t=0;t<e.length;t++){const{dom:n,evt:o,func:s}=e[t];n.addEventListener(o,s)}return function(){for(let n=0;n<e.length;n++){const{dom:o,evt:s,func:i}=e[n];o.removeEventListener(s,i)}}};var T=(e=>(e.LHS="lhs",e.RHS="rhs",e))(T||{});const ft=e=>{const t=e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");e.selectNode(t[Math.ceil(t.length/2)-1])},pt=e=>{const t=e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");e.selectNode(t[Math.ceil(t.length/2)-1])},mt=e=>{e.selectNode(e.map.querySelector("me-root>me-tpc"))},gt=function(e,t){const n=t.parentElement.parentElement.parentElement.previousSibling;if(n){const o=n.firstChild;e.selectNode(o)}},vt=function(e,t){const n=t.parentElement.nextSibling;if(n&&n.firstChild){const o=n.firstChild.firstChild.firstChild;e.selectNode(o)}},ke=function(e,t){var i,r;const n=e.currentNode||((i=e.currentNodes)==null?void 0:i[0]);if(!n)return;const o=n.nodeObj,s=n.offsetParent.offsetParent.parentElement;o.parent?s.className===t?vt(e,n):(r=o.parent)!=null&&r.parent?gt(e,n):mt(e):t===T.LHS?ft(e):pt(e)},Me=function(e,t){const n=e.currentNode;if(!n||!n.nodeObj.parent)return;const s=t+"Sibling",i=n.parentElement.parentElement[s];i?e.selectNode(i.firstChild.firstChild):e.selectNode(n)},se=function(e,t,n){const{scaleVal:o,scaleSensitivity:s}=e;switch(t){case"in":if(o>1.6)return;e.scale(o+s,n);break;case"out":if(o<.6)return;e.scale(o-s,n)}};function yt(e,t){t=t===!0?{}:t;const n=()=>{e.currentArrow?e.removeArrow():e.currentSummary?e.removeSummary(e.currentSummary.summaryObj.id):e.currentNodes&&e.removeNodes(e.currentNodes)},o={Enter:s=>{s.shiftKey?e.insertSibling("before"):s.ctrlKey?e.insertParent():e.insertSibling("after")},Tab:()=>{e.addChild()},F1:()=>{e.toCenter()},F2:()=>{e.beginEdit()},ArrowUp:s=>{if(s.altKey)e.moveUpNode();else{if(s.metaKey||s.ctrlKey)return e.initSide();Me(e,"previous")}},ArrowDown:s=>{s.altKey?e.moveDownNode():Me(e,"next")},ArrowLeft:s=>{if(s.metaKey||s.ctrlKey)return e.initLeft();ke(e,T.LHS)},ArrowRight:s=>{if(s.metaKey||s.ctrlKey)return e.initRight();ke(e,T.RHS)},PageUp:()=>e.moveUpNode(),PageDown:()=>{e.moveDownNode()},c:s=>{(s.metaKey||s.ctrlKey)&&(e.waitCopy=e.currentNodes)},x:s=>{(s.metaKey||s.ctrlKey)&&(e.waitCopy=e.currentNodes,n())},v:s=>{!e.waitCopy||!e.currentNode||(s.metaKey||s.ctrlKey)&&(e.waitCopy.length===1?e.copyNode(e.waitCopy[0],e.currentNode):e.copyNodes(e.waitCopy,e.currentNode))},"=":s=>{(s.metaKey||s.ctrlKey)&&se(e,"in")},"-":s=>{(s.metaKey||s.ctrlKey)&&se(e,"out")},0:s=>{(s.metaKey||s.ctrlKey)&&e.scale(1)},Delete:n,Backspace:n,...t};e.container.onkeydown=s=>{if(s.preventDefault(),!e.editable||s.target!==s.currentTarget)return;const i=o[s.key];i&&i(s)}}const Le=e=>typeof TouchEvent<"u"&&e instanceof TouchEvent;function bt(e){const{dragMoveHelper:t}=e;let n=0,o=0;const s=a=>{var y,b,x;if(Le(a)||a.button!==0)return;if((y=e.helper1)!=null&&y.moved){e.helper1.clear();return}if((b=e.helper2)!=null&&b.moved){e.helper2.clear();return}if(t.moved){t.clear();return}const f=a.target;if(f.tagName==="ME-EPD")a.ctrlKey||a.metaKey?e.expandNodeAll(f.previousSibling):e.expandNode(f.previousSibling);else if(f.tagName==="ME-TPC"&&e.currentNodes.length>1)e.selectNode(f);else if(!e.editable)return;const m=(x=f.parentElement)==null?void 0:x.parentElement;m.getAttribute("class")==="topiclinks"?e.selectArrow(f.parentElement):m.getAttribute("class")==="summary"&&e.selectSummary(f.parentElement)},i=a=>{var y;if(!e.editable)return;const f=a.target;fe(f)&&e.beginEdit(f);const m=(y=f.parentElement)==null?void 0:y.parentElement;m.getAttribute("class")==="topiclinks"?e.editArrowLabel(f.parentElement):m.getAttribute("class")==="summary"&&e.editSummary(f.parentElement)};let r=0;const c=a=>{const f=new Date().getTime(),m=f-r;m<300&&m>0&&i(a),r=f},l=a=>{var f,m;if(t.moved=!1,a instanceof MouseEvent){const y=e.mouseSelectionButton===0?2:0;if(a.button!==y)return}else n=((f=a.touches[0])==null?void 0:f.clientX)||0,o=((m=a.touches[0])==null?void 0:m.clientY)||0;a.target.contentEditable==="inherit"&&(t.mousedown=!0,e.map.style.transition="none")},u=a=>{var f,m,y,b;if(a.target.contentEditable==="inherit")if(a instanceof MouseEvent)t.onMove(a),t.x=a.clientX,t.y=a.clientY;else{const x=((f=a.touches[0])==null?void 0:f.clientX)||0,E=((m=a.touches[0])==null?void 0:m.clientY)||0,w=x-n,S=E-o,C={clientX:x,clientY:E,movementX:w,movementY:S,target:a.target};t.onMove(C),t.x=x,t.y=E,n=x,o=E}else if(a instanceof MouseEvent)t.x=a.clientX,t.y=a.clientY;else{const x=((y=a.touches[0])==null?void 0:y.clientX)||0,E=((b=a.touches[0])==null?void 0:b.clientY)||0;t.x=x,t.y=E,n=x,o=E}},d=a=>{if(a instanceof MouseEvent){const f=e.mouseSelectionButton===0?2:0;if(a.button!==f)return}t.clear()},h=a=>{if(a.preventDefault(),Le(a)||!e.editable)return;const f=a.target;fe(f)&&!f.classList.contains("selected")&&e.selectNode(f),setTimeout(()=>{e.dragMoveHelper.moved||e.bus.fire("showContextMenu",a)},200)},g=a=>{a.stopPropagation(),a.preventDefault(),a.ctrlKey||a.metaKey?a.deltaY<0?se(e,"in",e.dragMoveHelper):e.scaleVal-e.scaleSensitivity>0&&se(e,"out",e.dragMoveHelper):a.shiftKey?e.move(-a.deltaY,0):(e.map.style.transition="none",e.move(-a.deltaX,-a.deltaY),e.map.style.transition="transform 0.3s")},{container:v}=e;return pe([{dom:v,evt:"click",func:s},{dom:v,evt:"dblclick",func:i},{dom:v,evt:"mousedown",func:l},{dom:document,evt:"mousemove",func:u},{dom:document,evt:"mouseup",func:d},{dom:v,evt:"contextmenu",func:h},{dom:v,evt:"touchstart",func:l},{dom:document,evt:"touchmove",func:u},{dom:document,evt:"touchend",func:d},{dom:v,evt:"touchend",func:c},{dom:v,evt:"wheel",func:g}])}function wt(){return{handlers:{},addListener:function(e,t){this.handlers[e]===void 0&&(this.handlers[e]=[]),this.handlers[e].push(t)},fire:function(e,...t){if(this.handlers[e]instanceof Array){const n=this.handlers[e];for(let o=0;o<n.length;o++)n[o](...t)}},removeListener:function(e,t){if(!this.handlers[e])return;const n=this.handlers[e];if(!t)n.length=0;else if(n.length)for(let o=0;o<n.length;o++)n[o]===t&&this.handlers[e].splice(o,1)}}}const ie=document,xt=function(){this.nodes.innerHTML="";const e=this.createTopic(this.nodeData);me(e,this.nodeData),e.draggable=!1;const t=ie.createElement("me-root");t.appendChild(e);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)})}Et(this,n,t)},Et=function(e,t,n){const o=ie.createElement("me-main");o.className=T.LHS;const s=ie.createElement("me-main");s.className=T.RHS;for(let i=0;i<t.length;i++){const r=t[i],{grp:c}=e.createWrapper(r);e.direction===2?r.direction===0?o.appendChild(c):s.appendChild(c):e.direction===0?o.appendChild(c):s.appendChild(c)}e.nodes.appendChild(o),e.nodes.appendChild(n),e.nodes.appendChild(s),e.nodes.appendChild(e.lines)},St=function(e,t){const n=ie.createElement("me-children");for(let o=0;o<t.length;o++){const s=t[o],{grp:i}=e.createWrapper(s);n.appendChild(i)}return n},L=document,Ae=function(e,t){const o=(this.el?this.el:t||document).querySelector(`[data-nodeid=me${e}]`);if(!o)throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);return o},me=function(e,t){if(e.innerHTML="",t.style){const n=t.style;for(const o in n)e.style[o]=n[o]}if(t.dangerouslySetInnerHTML){e.innerHTML=t.dangerouslySetInnerHTML;return}if(t.image){const n=t.image;if(n.url&&n.width&&n.height){const o=L.createElement("img");o.src=n.url,o.style.width=n.width+"px",o.style.height=n.height+"px",n.fit&&(o.style.objectFit=n.fit),e.appendChild(o),e.image=o}}else e.image&&(e.image=void 0);{const n=L.createElement("span");n.className="text",n.textContent=t.topic,e.appendChild(n),e.text=n}if(t.hyperLink){const n=L.createElement("a");n.className="hyper-link",n.target="_blank",n.innerText="🔗",n.href=t.hyperLink,e.appendChild(n),e.link=n}else e.link&&(e.link=void 0);if(t.icons&&t.icons.length){const n=L.createElement("span");n.className="icons",n.innerHTML=t.icons.map(o=>`<span>${ee(o)}</span>`).join(""),e.appendChild(n),e.icons=n}else e.icons&&(e.icons=void 0);if(t.tags&&t.tags.length){const n=L.createElement("div");n.className="tags",n.innerHTML=t.tags.map(o=>`<span>${ee(o)}</span>`).join(""),e.appendChild(n),e.tags=n}else e.tags&&(e.tags=void 0)},Ct=function(e,t){const n=L.createElement("me-wrapper"),{p:o,tpc:s}=this.createParent(e);if(n.appendChild(o),!t&&e.children&&e.children.length>0){const i=ge(e.expanded);if(o.appendChild(i),e.expanded!==!1){const r=St(this,e.children);n.appendChild(r)}}return{grp:n,top:o,tpc:s}},Nt=function(e){const t=L.createElement("me-parent"),n=this.createTopic(e);return me(n,e),t.appendChild(n),{p:t,tpc:n}},_t=function(e){const t=L.createElement("me-children");return t.append(...e),t},Tt=function(e){const t=L.createElement("me-tpc");return t.nodeObj=e,t.dataset.nodeid="me"+e.id,t.draggable=this.draggable,t};function De(e){const t=L.createRange();t.selectNodeContents(e);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(t))}const kt=function(e){if(!e)return;const t=L.createElement("div"),n=e.text.textContent;e.appendChild(t),t.id="input-box",t.textContent=n,t.contentEditable="plaintext-only",t.spellcheck=!1;const o=getComputedStyle(e);t.style.cssText=`min-width:${e.offsetWidth-8}px;
|
|
2
2
|
color:${o.color};
|
|
3
3
|
padding:${o.padding};
|
|
4
4
|
margin:${o.margin};
|
|
@@ -11,5 +11,5 @@ var MindElixir=function(){"use strict";var bo=Object.defineProperty;var yo=(G,O,
|
|
|
11
11
|
top:${i.y}px;
|
|
12
12
|
padding: 2px 4px;
|
|
13
13
|
margin: -2px -4px;
|
|
14
|
-
`,De(o),e.scrollIntoView(o),o.addEventListener("keydown",r=>{r.stopPropagation();const c=r.key;if(c==="Enter"||c==="Tab"){if(r.shiftKey)return;r.preventDefault(),o.blur(),e.container.focus()}}),o.addEventListener("blur",()=>{var c;if(!o)return;const r=((c=o.textContent)==null?void 0:c.trim())||"";r===""?n.label=s:n.label=r,o.remove(),r!==s&&(t.innerHTML=n.label,e.linkDiv(),"parent"in n?e.bus.fire("operation",{name:"finishEditSummary",obj:n}):e.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Lt=function(e){const t=this.map.querySelector("me-root"),n=t.offsetTop,o=t.offsetLeft,s=t.offsetWidth,i=t.offsetHeight,r=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<r.length;c++){const l=r[c],u=l.querySelector("me-tpc"),{offsetLeft:d,offsetTop:h}=$(this.nodes,u),g=u.offsetWidth,v=u.offsetHeight,p=l.parentNode.className,a=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:h,cL:d,cW:g,cH:v,direction:p,containerHeight:this.nodes.offsetHeight}),f=this.theme.palette,m=u.nodeObj.branchColor||f[c%f.length];u.style.borderColor=m,this.lines.appendChild(Oe(a,m,"3"));const b=l.children[0].children[1];if(b&&(b.style.top=(b.parentNode.offsetHeight-b.offsetHeight)/2+"px",p===T.LHS?b.style.left="-10px":b.style.right="-10px"),e&&e!==l)continue;const y=X("subLines"),x=l.lastChild;x.tagName==="svg"&&x.remove(),l.appendChild(y),Pe(this,y,m,l,p,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},Pe=function(e,t,n,o,s,i){const r=o.firstChild,c=o.children[1].children;if(c.length===0)return;const l=r.offsetTop,u=r.offsetLeft,d=r.offsetWidth,h=r.offsetHeight;for(let g=0;g<c.length;g++){const v=c[g],p=v.firstChild,a=p.offsetTop,f=p.offsetLeft,m=p.offsetWidth,b=p.offsetHeight,y=p.firstChild.nodeObj.branchColor||n,x=e.generateSubBranch({pT:l,pL:u,pW:d,pH:h,cT:a,cL:f,cW:m,cH:b,direction:s,isFirst:i});t.appendChild(Oe(x,y,"2"));const E=p.children[1];if(E){if(E.style.bottom=-(E.offsetHeight/2)+"px",s===T.LHS?E.style.left="10px":s===T.RHS&&(E.style.right="10px"),!E.expanded)continue}else continue;Pe(e,t,y,v,s)}},He={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",clickTips:"请点击目标节点",summary:"摘要"},Be={cn:He,zh_CN:He,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",clickTips:"Favor clicar no item alvo",summary:"Resumo"},it:{addChild:"Aggiungi figlio",addParent:"Aggiungi genitore",addSibling:"Aggiungi fratello",removeNode:"Rimuovi nodo",focus:"Modalità Focus",cancelFocus:"Annulla Modalità Focus",moveUp:"Sposta su",moveDown:"Sposta giù",link:"Collega",clickTips:"Si prega di fare clic sul nodo di destinazione",summary:"Unisci nodi"},es:{addChild:"Agregar hijo",addParent:"Agregar padre",addSibling:"Agregar hermano",removeNode:"Eliminar nodo",focus:"Modo Enfoque",cancelFocus:"Cancelar Modo Enfoque",moveUp:"Mover hacia arriba",moveDown:"Mover hacia abajo",link:"Enlace",clickTips:"Por favor haga clic en el nodo de destino",summary:"Resumen"},fr:{addChild:"Ajout enfant",addParent:"Ajout parent",addSibling:"Ajout voisin",removeNode:"Supprimer",focus:"Cibler",cancelFocus:"Retour",moveUp:"Monter",moveDown:"Descendre",link:"Lier",clickTips:"Cliquer sur le noeud cible",summary:"Annoter"},ko:{addChild:"자식 추가",addParent:"부모 추가",addSibling:"형제 추가",removeNode:"노드 삭제",focus:"포커스 모드",cancelFocus:"포커스 모드 취소",moveUp:"위로 이동",moveDown:"아래로 이동",link:"연결",clickTips:"대상 노드를 클릭하십시오",summary:"요약"}},xo="";function At(e,t){t=t===!0?{focus:!0,link:!0}:t;const n=w=>{const S=document.createElement("div");return S.innerText=w,S.className="tips",S},o=(w,S,C)=>{const _=document.createElement("li");return _.id=w,_.innerHTML=`<span>${ee(S)}</span><span ${C?'class="key"':""}>${ee(C)}</span>`,_},s=Be[e.locale]?e.locale:"en",i=Be[s],r=o("cm-add_child",i.addChild,"Tab"),c=o("cm-add_parent",i.addParent,"Ctrl + Enter"),l=o("cm-add_sibling",i.addSibling,"Enter"),u=o("cm-remove_child",i.removeNode,"Delete"),d=o("cm-fucus",i.focus,""),h=o("cm-unfucus",i.cancelFocus,""),g=o("cm-up",i.moveUp,"PgUp"),v=o("cm-down",i.moveDown,"Pgdn"),p=o("cm-link",i.link,""),a=o("cm-link-bidirectional","Bidirectional Link",""),f=o("cm-summary",i.summary,""),m=document.createElement("ul");if(m.className="menu-list",m.appendChild(r),m.appendChild(c),m.appendChild(l),m.appendChild(u),t.focus&&(m.appendChild(d),m.appendChild(h)),m.appendChild(g),m.appendChild(v),m.appendChild(f),t.link&&(m.appendChild(p),m.appendChild(a)),t&&t.extend)for(let w=0;w<t.extend.length;w++){const S=t.extend[w],C=o(S.name,S.name,S.key||"");m.appendChild(C),C.onclick=_=>{S.onclick(_)}}const b=document.createElement("div");b.className="context-menu",b.appendChild(m),b.hidden=!0,e.container.append(b);let y=!0;const x=w=>{const S=w.target;if(fe(S)){S.parentElement.tagName==="ME-ROOT"?y=!0:y=!1,y?(d.className="disabled",g.className="disabled",v.className="disabled",c.className="disabled",l.className="disabled",u.className="disabled"):(d.className="",g.className="",v.className="",c.className="",l.className="",u.className=""),b.hidden=!1,m.style.top="",m.style.bottom="",m.style.left="",m.style.right="";const C=m.getBoundingClientRect(),_=m.offsetHeight,B=m.offsetWidth,V=w.clientY-C.top,Y=w.clientX-C.left;_+V>window.innerHeight?(m.style.top="",m.style.bottom="0px"):(m.style.bottom="",m.style.top=V+15+"px"),B+Y>window.innerWidth?(m.style.left="",m.style.right="0px"):(m.style.right="",m.style.left=Y+10+"px")}};e.bus.addListener("showContextMenu",x),b.onclick=w=>{w.target===b&&(b.hidden=!0)},r.onclick=()=>{e.addChild(),b.hidden=!0},c.onclick=()=>{e.insertParent(),b.hidden=!0},l.onclick=()=>{y||(e.insertSibling("after"),b.hidden=!0)},u.onclick=()=>{y||(e.removeNodes(e.currentNodes||[]),b.hidden=!0)},d.onclick=()=>{y||(e.focusNode(e.currentNode),b.hidden=!0)},h.onclick=()=>{e.cancelFocus(),b.hidden=!0},g.onclick=()=>{y||(e.moveUpNode(),b.hidden=!0)},v.onclick=()=>{y||(e.moveDownNode(),b.hidden=!0)};const E=w=>{b.hidden=!0;const S=e.currentNode,C=n(i.clickTips);e.container.appendChild(C),e.map.addEventListener("click",_=>{_.preventDefault(),C.remove();const B=_.target;(B.parentElement.tagName==="ME-PARENT"||B.parentElement.tagName==="ME-ROOT")&&e.createArrow(S,B,w)},{once:!0})};return p.onclick=()=>E(),a.onclick=()=>E({bidirectional:!0}),f.onclick=()=>{b.hidden=!0,e.createSummary(),e.unselectNodes(e.currentNodes)},()=>{r.onclick=null,c.onclick=null,l.onclick=null,u.onclick=null,d.onclick=null,h.onclick=null,g.onclick=null,v.onclick=null,p.onclick=null,f.onclick=null,b.onclick=null,e.container.oncontextmenu=null}}const ve=document,Dt=function(e,t){if(!t)return be(e),e;let n=e.querySelector(".insert-preview");const o=`insert-preview ${t} show`;return n||(n=ve.createElement("div"),e.appendChild(n)),n.className=o,e},be=function(e){if(!e)return;const t=e.querySelectorAll(".insert-preview");for(const n of t||[])n.remove()},Re=function(e,t){for(const n of t){const o=n.parentElement.parentElement.contains(e);if(!(e&&e.tagName==="ME-TPC"&&e!==n&&!o&&e.nodeObj.parent))return!1}return!0},Ot=function(e){const t=document.createElement("div");return t.className="mind-elixir-ghost",e.container.appendChild(t),t};class jt{constructor(t){Q(this,"mind");Q(this,"isMoving",!1);Q(this,"interval",null);Q(this,"speed",20);this.mind=t}move(t,n){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(t*this.speed*this.mind.scaleVal,n*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function $t(e){let t=null,n=null;const o=Ot(e),s=new jt(e),i=u=>{e.selection.cancel();const d=u.target;if((d==null?void 0:d.tagName)!=="ME-TPC"){u.preventDefault();return}let h=e.currentNodes;h!=null&&h.includes(d)||(e.selectNode(d),h=e.currentNodes),e.dragged=h,h.length>1?o.innerHTML=h.length+"":o.innerHTML=d.innerHTML;for(const g of h)g.parentElement.parentElement.style.opacity="0.5";u.dataTransfer.setDragImage(o,0,0),u.dataTransfer.dropEffect="move",e.dragMoveHelper.clear()},r=u=>{const{dragged:d}=e;if(!d)return;s.stop();for(const g of d)g.parentElement.parentElement.style.opacity="1";const h=u.target;h.style.opacity="",n&&(be(n),t==="before"?e.moveNodeBefore(d,n):t==="after"?e.moveNodeAfter(d,n):t==="in"&&e.moveNodeIn(d,n),e.dragged=null)},c=u=>{u.preventDefault();const d=12*e.scaleVal,{dragged:h}=e;if(!h)return;const g=e.container.getBoundingClientRect();u.clientX<g.x+50?s.move(1,0):u.clientX>g.x+g.width-50?s.move(-1,0):u.clientY<g.y+50?s.move(0,1):u.clientY>g.y+g.height-50?s.move(0,-1):s.stop(),be(n);const v=ve.elementFromPoint(u.clientX,u.clientY-d);if(Re(v,h)){n=v;const p=v.getBoundingClientRect(),a=p.y;u.clientY>a+p.height?t="after":t="in"}else{const p=ve.elementFromPoint(u.clientX,u.clientY+d),a=p.getBoundingClientRect();if(Re(p,h)){n=p;const f=a.y;u.clientY<f?t="before":t="in"}else t=n=null}n&&Dt(n,t)};return pe([{dom:e.map,evt:"dragstart",func:i},{dom:e.map,evt:"dragend",func:r},{dom:e.map,evt:"dragover",func:c}])}const Pt=function(e){return["createSummary","removeSummary","finishEditSummary"].includes(e.name)?{type:"summary",value:e.obj.id}:["createArrow","removeArrow","finishEditArrowLabel"].includes(e.name)?{type:"arrow",value:e.obj.id}:["removeNodes","copyNodes","moveNodeBefore","moveNodeAfter","moveNodeIn"].includes(e.name)?{type:"nodes",value:e.objs.map(t=>t.id)}:{type:"node",value:e.obj.id}};function Ht(e){let t=[],n=-1,o=e.getData();e.undo=function(){if(n>-1){const r=t[n];o=r.prev,e.refresh(r.prev);try{r.currentObject.type==="node"?e.selectNode(this.findEle(r.currentObject.value)):r.currentObject.type==="nodes"&&e.selectNodes(r.currentObject.value.map(c=>this.findEle(c)))}catch{}finally{n--}}},e.redo=function(){if(n<t.length-1){n++;const r=t[n];o=r.next,e.refresh(r.next),r.currentObject.type==="node"?e.selectNode(this.findEle(r.currentObject.value)):r.currentObject.type==="nodes"&&(e.unselectNodes(this.currentNodes),e.selectNodes(r.currentObject.value.map(c=>this.findEle(c))))}};const s=function(r){if(r.name==="beginEdit")return;t=t.slice(0,n+1);const c=e.getData();t.push({prev:o,currentObject:Pt(r),next:c}),o=c,n=t.length-1},i=function(r){(r.metaKey||r.ctrlKey)&&(r.shiftKey&&r.key==="Z"||r.key==="y")?e.redo():(r.metaKey||r.ctrlKey)&&r.key==="z"&&e.undo()};return e.bus.addListener("operation",s),e.map.addEventListener("keydown",i),()=>{e.bus.removeListener("operation",s),e.map.removeEventListener("keydown",i)}}const Bt='<?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>',Rt='<?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>',Ft='<?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>',It='<?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>',Wt='<?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>',Vt='<?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>',Yt='<?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>',Eo="",Gt={side:Bt,left:Rt,right:Ft,full:It,living:Wt,zoomin:Vt,zoomout:Yt},I=(e,t)=>{const n=document.createElement("span");return n.id=e,n.innerHTML=Gt[t],n};function Kt(e){const t=document.createElement("div"),n=I("fullscreen","full"),o=I("toCenter","living"),s=I("zoomout","zoomout"),i=I("zoomin","zoomin"),r=document.createElement("span");return r.innerText="100%",t.appendChild(n),t.appendChild(o),t.appendChild(s),t.appendChild(i),t.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===e.el?document.exitFullscreen():e.el.requestFullscreen()},o.onclick=()=>{e.toCenter()},s.onclick=()=>{e.scaleVal<.6||e.scale(e.scaleVal-e.scaleSensitivity)},i.onclick=()=>{e.scaleVal>1.6||e.scale(e.scaleVal+e.scaleSensitivity)},t}function qt(e){const t=document.createElement("div"),n=I("tbltl","left"),o=I("tbltr","right"),s=I("tblts","side");return t.appendChild(n),t.appendChild(o),t.appendChild(s),t.className="mind-elixir-toolbar lt",n.onclick=()=>{e.initLeft()},o.onclick=()=>{e.initRight()},s.onclick=()=>{e.initSide()},t}function zt(e){e.container.append(Kt(e)),e.container.append(qt(e))}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */class Ut{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,n){const o=this._listeners.get(t)??new Set;return this._listeners.set(t,o),o.add(n),this}removeEventListener(t,n){var o;return(o=this._listeners.get(t))==null||o.delete(n),this}dispatchEvent(t,...n){let o=!0;for(const s of this._listeners.get(t)??[])o=s(...n)!==!1&&o;return o}unbindAllListeners(){this._listeners.clear()}}const Fe=(e,t="px")=>typeof e=="number"?e+t:e,P=({style:e},t,n)=>{if(typeof t=="object")for(const[o,s]of Object.entries(t))s!==void 0&&(e[o]=Fe(s));else n!==void 0&&(e[t]=Fe(n))},Ie=(e=0,t=0,n=0,o=0)=>{const s={x:e,y:t,width:n,height:o,top:t,left:e,right:e+n,bottom:t+o};return{...s,toJSON:()=>JSON.stringify(s)}},Xt=e=>{let t,n=-1,o=!1;return{next:(...s)=>{t=s,o||(o=!0,n=requestAnimationFrame(()=>{e(...t),o=!1}))},cancel:()=>{cancelAnimationFrame(n),o=!1}}},We=(e,t,n="touch")=>{switch(n){case"center":{const o=t.left+t.width/2,s=t.top+t.height/2;return o>=e.left&&o<=e.right&&s>=e.top&&s<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}},Jt=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Zt=()=>"safari"in window,ye=e=>Array.isArray(e)?e:[e],Ve=e=>(t,n,o,s={})=>{(t instanceof HTMLCollection||t instanceof NodeList)&&(t=Array.from(t)),n=ye(n),t=ye(t);for(const i of t)if(i)for(const r of n)i[e](r,o,{capture:!1,...s})},H=Ve("addEventListener"),A=Ve("removeEventListener"),re=e=>{var t;const{clientX:n,clientY:o,target:s}=((t=e.touches)==null?void 0:t[0])??e;return{x:n,y:o,target:s}},q=(e,t=document)=>ye(e).map(n=>typeof n=="string"?Array.from(t.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),Qt=(e,t)=>t.some(n=>typeof n=="number"?e.button===n:typeof n=="object"?n.button!==e.button?!1:n.modifiers.every(o=>{switch(o){case"alt":return e.altKey;case"ctrl":return e.ctrlKey||e.metaKey;case"shift":return e.shiftKey}}):!1),{abs:W,max:Ye,min:Ge,ceil:Ke}=Math,qe=(e=[])=>({stored:e,selected:[],touched:[],changed:{added:[],removed:[]}}),ze=class extends Ut{constructor(t){var n,o,s,i,r;super(),this._selection=qe(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=Ie(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(n=t.behaviour)!=null&&n.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(o=t.behaviour)==null?void 0:o.scrolling,startScrollMargins:{x:0,y:0,...(i=(s=t.behaviour)==null?void 0:s.scrolling)==null?void 0:i.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(r=t.features)==null?void 0:r.singleTap}}};for(const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[d]=="function"&&(this[d]=this[d].bind(this));const{document:c,selectionAreaClass:l,selectionContainerClass:u}=this._options;this._area=c.createElement("div"),this._clippingElement=c.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(l),u&&this._clippingElement.classList.add(u),P(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),P(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Xt(d=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",d),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:n,features:o}=this._options,s=t?H:A;s(n,"mousedown",this._onTapStart),o.touch&&s(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:o,y:s,target:i}=re(t),{document:r,startAreas:c,boundaries:l,features:u,behaviour:d}=this._options,h=i.getBoundingClientRect();if(t instanceof MouseEvent&&!Qt(t,d.triggers))return;const g=q(c,r),v=q(l,r);this._targetElement=v.find(m=>We(m.getBoundingClientRect(),h));const p=t.composedPath(),a=g.find(m=>p.includes(m));if(this._targetBoundary=v.find(m=>p.includes(m)),!this._targetElement||!a||!this._targetBoundary||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:o,y1:s,x2:0,y2:0};const f=r.scrollingElement??r.body;this._scrollDelta={x:f.scrollLeft,y:f.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),H(r,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),H(r,["mouseup","touchcancel","touchend"],this._onTapStop),H(r,"scroll",this._onScroll),u.deselectOnBlur&&(this._targetBoundaryScrolled=!1,H(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:n},range:o}=this._options.features,s=re(t);let i;if(n==="native")i=s.target;else if(n==="touch"){this.resolveSelectables();const{x:c,y:l}=s;i=this._selectables.find(u=>{const{right:d,left:h,top:g,bottom:v}=u.getBoundingClientRect();return c<d&&c>h&&l<v&&l>g})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);)if(i.parentElement)i=i.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:r}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&o&&this._latestElement){const c=this._latestElement,[l,u]=c.compareDocumentPosition(i)&4?[i,c]:[c,i],d=[...this._selectables.filter(h=>h.compareDocumentPosition(l)&4&&h.compareDocumentPosition(u)&2),l,u];this.select(d),this._latestElement=c}else r.includes(i)&&(r.length===1||t.ctrlKey||r.every(c=>this._selection.stored.includes(c)))?this.deselect(i):(this.select(i),this._latestElement=i)}_delayedTapMove(t){const{container:n,document:o,behaviour:{startThreshold:s}}=this._options,{x1:i,y1:r}=this._areaLocation,{x:c,y:l}=re(t);if(typeof s=="number"&&W(c+l-(i+r))>=s||typeof s=="object"&&W(c-i)>=s.x||W(l-r)>=s.y){if(A(o,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){A(o,["mouseup","touchcancel","touchend"],this._onTapStop);return}H(o,["mousemove","touchmove"],this._onTapMove,{passive:!1}),P(this._area,"display","block"),q(n,o)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(H(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),H(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(u=>this._targetElement.contains(u))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:o}=this,s=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(P(t,{top:s.top,left:s.left,width:s.width,height:s.height}),P(o,{marginTop:-s.top,marginLeft:-s.left})):(P(t,{top:0,left:0,width:"100%",height:"100%"}),P(o,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:n,_areaLocation:o,_options:s,_frame:i}=this,{speedDivider:r}=s.behaviour.scrolling,c=this._targetElement,{x:l,y:u}=re(t);if(o.x2=l,o.y2=u,this._lastMousePosition.x=l,this._lastMousePosition.y=u,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const d=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:h,scrollLeft:g}=c;n.y&&(c.scrollTop+=Ke(n.y/r),o.y1-=c.scrollTop-h),n.x&&(c.scrollLeft+=Ke(n.x/r),o.x1-=c.scrollLeft-g),i.next(t),requestAnimationFrame(d)};requestAnimationFrame(d)}else i.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&Jt()||this._scrollAvailable&&Zt())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:o,scrollLeft:s}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-s,this._areaLocation.y1+=t.y-o,t.x=s,t.y=o,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,A(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.deltaY?t.deltaY>0?1:-1:0,s=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=o*n,this._scrollSpeed.x+=s*n,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,s=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(o)*n,this._scrollSpeed.y+=Math.sign(s)*n,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_targetElement:o,_options:s}=this,{scrollTop:i,scrollHeight:r,clientHeight:c,scrollLeft:l,scrollWidth:u,clientWidth:d}=o,h=this._targetRect,{x1:g,y1:v}=n;let{x2:p,y2:a}=n;const{behaviour:{scrolling:{startScrollMargins:f}}}=s;p<h.left+f.x?(t.x=l?-W(h.left-p+f.x):0,p=p<h.left?h.left:p):p>h.right-f.x?(t.x=u-l-d?W(h.left+h.width-p-f.x):0,p=p>h.right?h.right:p):t.x=0,a<h.top+f.y?(t.y=i?-W(h.top-a+f.y):0,a=a<h.top?h.top:a):a>h.bottom-f.y?(t.y=r-i-c?W(h.top+h.height-a-f.y):0,a=a>h.bottom?h.bottom:a):t.y=0;const m=Ge(g,p),b=Ge(v,a),y=Ye(g,p),x=Ye(v,a);this._areaRect=Ie(m,b,y-m,x-b)}_redrawSelectionArea(){const{x:t,y:n,width:o,height:s}=this._areaRect,{style:i}=this._area;i.left=`${t}px`,i.top=`${n}px`,i.width=`${o}px`,i.height=`${s}px`}_onTapStop(t,n){var o;const{document:s,features:i}=this._options,{_singleClick:r}=this;A(this._targetElement,"scroll",this._onStartAreaScroll),A(s,["mousemove","touchmove"],this._delayedTapMove),A(s,["touchmove","mousemove"],this._onTapMove),A(s,["mouseup","touchcancel","touchend"],this._onTapStop),A(s,"scroll",this._onScroll),this._keepSelection(),t&&r&&i.singleTap.allow?this._onSingleTap(t):!r&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,A(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),A(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(o=this._frame)==null||o.cancel(),P(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:o,_areaRect:s}=this,{stored:i,selected:r,touched:c}=o,{intersect:l,overlap:u}=n.behaviour,d=u==="invert",h=[],g=[],v=[];for(let a=0;a<t.length;a++){const f=t[a];if(We(s,f.getBoundingClientRect(),l)){if(r.includes(f))i.includes(f)&&!c.includes(f)&&c.push(f);else if(d&&i.includes(f)){v.push(f);continue}else g.push(f);h.push(f)}}d&&g.push(...i.filter(a=>!r.includes(a)));const p=u==="keep";for(let a=0;a<r.length;a++){const f=r[a];!h.includes(f)&&!(p&&i.includes(f))&&v.push(f)}o.selected=h,o.changed={added:g,removed:v},this._latestElement=void 0}_emitEvent(t,n){return this.emit(t,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:n}=this,{selected:o,changed:s,touched:i,stored:r}=n,c=o.filter(l=>!r.includes(l));switch(t.behaviour.overlap){case"drop":{n.stored=[...c,...r.filter(l=>!i.includes(l))];break}case"invert":{n.stored=[...c,...r.filter(l=>!s.removed.includes(l))];break}case"keep":{n.stored=[...r,...o.filter(l=>!r.includes(l))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=q(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:o,stored:s,changed:i}=this._selection;i.added=[],i.removed.push(...o,...t?s:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=qe(t?[]:s)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,n=!1){const{changed:o,selected:s,stored:i}=this._selection,r=q(t,this._options.document).filter(c=>!s.includes(c)&&!i.includes(c));return i.push(...r),s.push(...r),o.added.push(...r),o.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),r}deselect(t,n=!1){const{selected:o,stored:s,changed:i}=this._selection,r=q(t,this._options.document).filter(c=>o.includes(c)||s.includes(c));this._selection.stored=s.filter(c=>!r.includes(c)),this._selection.selected=o.filter(c=>!r.includes(c)),this._selection.changed.added=[],this._selection.changed.removed.push(...r.filter(c=>!i.removed.includes(c))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};ze.version="3.9.0";let en=ze;function tn(e){const t=e.mouseSelectionButton===2?[2]:[0],n=new en({selectables:[".map-container me-tpc"],boundaries:[e.container],container:e.selectionContainer,features:{touch:!1},behaviour:{triggers:t,scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).on("beforestart",({event:o})=>{const s=o.target;if(s.id==="input-box"||s.className==="circle"||!e.map.contains(s))return!1;if(!o.ctrlKey&&!o.metaKey){if(s.tagName==="ME-TPC"&&s.classList.contains("selected"))return!1;e.clearSelection()}const i=n.getSelectionArea();return i.style.background="#4f90f22d",i.style.border="1px solid #4f90f2",i.parentElement&&(i.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:o,removed:s}}})=>{if(o.length>0||s.length>0,o.length>0){for(const i of o)i.className="selected";e.currentNodes=[...e.currentNodes,...o],e.bus.fire("selectNodes",o.map(i=>i.nodeObj))}if(s.length>0){for(const i of s)i.classList.remove("selected");e.currentNodes=e.currentNodes.filter(i=>!(s!=null&&s.includes(i))),e.bus.fire("unselectNodes",s.map(i=>i.nodeObj))}});e.selection=n}const nn=function(e,t=!0){this.theme=e;const n=this.theme.cssVar,o=Object.keys(n);this.container.style.cssText="";for(let s=0;s<o.length;s++){const i=o[s];this.container.style.setProperty(i,n[i])}e.cssVar["--gap"]||this.container.style.setProperty("--gap","30px"),t&&this.refresh()},z=e=>{var o;const t=(o=e.parent)==null?void 0:o.children,n=(t==null?void 0:t.indexOf(e))??0;return{siblings:t,index:n}};function on(e){const{siblings:t,index:n}=z(e);if(t===void 0)return;const o=t[n];n===0?(t[n]=t[t.length-1],t[t.length-1]=o):(t[n]=t[n-1],t[n-1]=o)}function sn(e){const{siblings:t,index:n}=z(e);if(t===void 0)return;const o=t[n];n===t.length-1?(t[n]=t[0],t[0]=o):(t[n]=t[n+1],t[n+1]=o)}function Ue(e){const{siblings:t,index:n}=z(e);return t===void 0?0:(t.splice(n,1),t.length)}function rn(e,t,n){const{siblings:o,index:s}=z(n);o!==void 0&&(t==="before"?o.splice(s,0,e):o.splice(s+1,0,e))}function cn(e,t){const{siblings:n,index:o}=z(e);n!==void 0&&(n[o]=t,t.children=[e])}function Xe(e,t,n){var o;if(Ue(t),(o=n.parent)!=null&&o.parent||(t.direction=n.direction),e==="in")n.children?n.children.push(t):n.children=[t];else{t.direction!==void 0&&(t.direction=n.direction);const{siblings:s,index:i}=z(n);if(s===void 0)return;e==="before"?s.splice(i,0,t):s.splice(i+1,0,t)}}const ln=function({map:e,direction:t},n){var o,s;if(t===0)return 0;if(t===1)return 1;if(t===2){const i=((o=e.querySelector(".lhs"))==null?void 0:o.childElementCount)||0,r=((s=e.querySelector(".rhs"))==null?void 0:s.childElementCount)||0;return i<=r?(n.direction=0,0):(n.direction=1,1)}},Je=function(e,t,n){var i,r;const o=n.children[0].children[0],s=t.parentElement;if(s.tagName==="ME-PARENT"){if(J(o),s.children[1])s.nextSibling.appendChild(n);else{const c=e.createChildren([n]);s.appendChild(ge(!0)),s.insertAdjacentElement("afterend",c)}e.linkDiv(n.offsetParent)}else s.tagName==="ME-ROOT"&&(ln(e,o.nodeObj)===0?(i=e.container.querySelector(".lhs"))==null||i.appendChild(n):(r=e.container.querySelector(".rhs"))==null||r.appendChild(n),e.linkDiv())},an=function(e,t){const n=e.parentNode;if(t===0){const o=n.parentNode.parentNode;o.tagName!=="ME-MAIN"&&(o.previousSibling.children[1].remove(),o.remove())}n.parentNode.remove()},Ze={before:"beforebegin",after:"afterend"},J=function(e){const n=e.parentElement.parentElement.lastElementChild;(n==null?void 0:n.tagName)==="svg"&&(n==null||n.remove())},dn=function(e,t){const n=e.nodeObj,o=ue(n);o.style&&t.style&&(t.style=Object.assign(o.style,t.style));const s=Object.assign(n,t);me(e,s),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:s,origin:o})},we=function(e,t,n){if(!t)return null;const o=t.nodeObj;o.expanded===!1&&(e.expandNode(t,!0),t=e.findEle(o.id));const s=n||e.generateNewObj();o.children?o.children.push(s):o.children=[s],j(e.nodeData);const{grp:i,top:r}=e.createWrapper(s);return Je(e,t,i),{newTop:r,newNodeObj:s}},hn=function(e,t,n){var u,d,h,g;const o=t||this.currentNode;if(!o)return;const s=o.nodeObj;if(s.parent){if(!((u=s.parent)!=null&&u.parent)&&((h=(d=s.parent)==null?void 0:d.children)==null?void 0:h.length)===1){this.addChild(this.findEle(s.parent.id),n);return}}else{this.addChild();return}const i=n||this.generateNewObj();if(!((g=s.parent)!=null&&g.parent)){const v=o.closest("me-main").className===T.LHS?0:1;i.direction=v}rn(i,e,s),j(this.nodeData);const r=o.parentElement,{grp:c,top:l}=this.createWrapper(i);r.parentElement.insertAdjacentElement(Ze[e],c),this.linkDiv(c.offsetParent),n||this.editTopic(l.firstChild),this.selectNode(l.firstChild,!0),this.bus.fire("operation",{name:"insertSibling",type:e,obj:i})},un=function(e,t){const n=e||this.currentNode;if(!n)return;J(n);const o=n.nodeObj;if(!o.parent)return;const s=t||this.generateNewObj();cn(o,s),j(this.nodeData);const i=n.parentElement.parentElement,{grp:r,top:c}=this.createWrapper(s,!0);c.appendChild(ge(!0)),i.insertAdjacentElement("afterend",r);const l=this.createChildren([i]);c.insertAdjacentElement("afterend",l),this.linkDiv(),t||this.editTopic(c.firstChild),this.selectNode(c.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:s})},fn=function(e,t){const n=e||this.currentNode;if(!n)return;const o=we(this,n,t);if(!o)return;const{newTop:s,newNodeObj:i}=o;this.bus.fire("operation",{name:"addChild",obj:i}),t||this.editTopic(s.firstChild),this.selectNode(s.firstChild,!0)},pn=function(e,t){const n=ue(e.nodeObj);he(n);const o=we(this,t,n);if(!o)return;const{newNodeObj:s}=o;this.selectNode(this.findEle(s.id)),this.bus.fire("operation",{name:"copyNode",obj:s})},mn=function(e,t){e=oe(e);const n=[];for(let o=0;o<e.length;o++){const s=e[o],i=ue(s.nodeObj);he(i);const r=we(this,t,i);if(!r)return;const{newNodeObj:c}=r;n.push(c)}this.unselectNodes(this.currentNodes),this.selectNodes(n.map(o=>this.findEle(o.id))),this.bus.fire("operation",{name:"copyNodes",objs:n})},gn=function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;on(n);const o=t.parentNode.parentNode;o.parentNode.insertBefore(o,o.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:n})},vn=function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;sn(n);const o=t.parentNode.parentNode;o.nextSibling?o.nextSibling.insertAdjacentElement("afterend",o):o.parentNode.prepend(o),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:n})},bn=function(e){if(e.length===0)return;e=oe(e);for(const n of e){const o=n.nodeObj,s=Ue(o);an(n,s)}const t=e[e.length-1];this.selectNode(this.findEle(t.nodeObj.parent.id)),this.linkDiv(),this.bus.fire("operation",{name:"removeNodes",objs:e.map(n=>n.nodeObj)})},yn=function(e,t){e=oe(e);const n=t.nodeObj;n.expanded===!1&&(this.expandNode(t,!0),t=this.findEle(n.id));for(const o of e){const s=o.nodeObj;Xe("in",s,n),j(this.nodeData);const i=o.parentElement;Je(this,t,i.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:e.map(o=>o.nodeObj),toObj:n})},Qe=(e,t,n,o)=>{e=oe(e),t==="after"&&(e=e.reverse());const s=n.nodeObj,i=[];for(const r of e){const c=r.nodeObj;Xe(t,c,s),j(o.nodeData),J(r);const l=r.parentElement.parentNode;i.includes(l.parentElement)||i.push(l.parentElement),n.parentElement.parentNode.insertAdjacentElement(Ze[t],l)}for(const r of i)r.childElementCount===0&&r.tagName!=="ME-MAIN"&&(r.previousSibling.children[1].remove(),r.remove());o.linkDiv(),o.bus.fire("operation",{name:t==="before"?"moveNodeBefore":"moveNodeAfter",objs:e.map(r=>r.nodeObj),toObj:s})},et=Object.freeze(Object.defineProperty({__proto__:null,addChild:fn,beginEdit:function(e){const t=e||this.currentNode;t&&(t.nodeObj.dangerouslySetInnerHTML||this.editTopic(t))},copyNode:pn,copyNodes:mn,insertParent:un,insertSibling:hn,moveDownNode:vn,moveNodeAfter:function(e,t){Qe(e,"after",t,this)},moveNodeBefore:function(e,t){Qe(e,"before",t,this)},moveNodeIn:yn,moveUpNode:gn,removeNodes:bn,reshapeNode:dn,rmSubline:J,setNodeTopic:function(e,t){e.text.textContent=t,e.nodeObj.topic=t,this.linkDiv()}},Symbol.toStringTag,{value:"Module"}));function wn(e){return{nodeData:e.isFocusMode?e.nodeDataBackup:e.nodeData,arrows:e.arrows,summaries:e.summaries,direction:e.direction,theme:e.theme}}const xn=function(e){const t=this.container,n=e.getBoundingClientRect(),o=t.getBoundingClientRect();if(n.top>o.bottom||n.bottom<o.top||n.left>o.right||n.right<o.left){const i=n.left+n.width/2,r=n.top+n.height/2,c=o.left+o.width/2,l=o.top+o.height/2,u=i-c,d=r-l;this.move(-u,-d)}},En=function(e,t,n){this.clearSelection(),this.scrollIntoView(e),this.selection.select(e),t&&this.bus.fire("selectNewNode",e.nodeObj)},Sn=function(e){this.selection.select(e)},Cn=function(e){this.selection.deselect(e)},Nn=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},_n=function(){const e=wn(this);return JSON.stringify(e,(t,n)=>{if(!(t==="parent"&&typeof n!="string"))return n})},Tn=function(){return JSON.parse(this.getDataString())},kn=function(){this.editable=!0},Mn=function(){this.editable=!1},Ln=function(e,t={x:0,y:0}){const n=this.container.getBoundingClientRect(),o=t.x?t.x-n.left-n.width/2:0,s=t.y?t.y-n.top-n.height/2:0,{dx:i,dy:r}=tt(this),c=this.map.style.transform,{x:l,y:u}=Te(c),d=l-i,h=u-r,g=this.scaleVal,v=(-o+d)*(1-e/g),p=(-s+h)*(1-e/g);this.map.style.transform=`translate(${l-v}px, ${u-p}px) scale(${e})`,this.scaleVal=e,this.bus.fire("scale",e)},An=function(){const e=this.nodes.offsetHeight/this.container.offsetHeight,t=this.nodes.offsetWidth/this.container.offsetWidth,n=1/Math.max(1,Math.max(e,t));this.scaleVal=n,this.map.style.transform="scale("+n+")",this.bus.fire("scale",n)},Dn=function(e,t){const{map:n,scaleVal:o,bus:s}=this,i=n.style.transform;let{x:r,y:c}=Te(i);r+=e,c+=t,n.style.transform=`translate(${r}px, ${c}px) scale(${o})`,s.fire("move",{dx:e,dy:t})},tt=e=>{const{container:t,map:n,nodes:o}=e,s=n.querySelector("me-root"),i=s.offsetTop,r=s.offsetLeft,c=s.offsetWidth,l=s.offsetHeight;let u,d;return e.alignment==="root"?(u=t.offsetWidth/2-r-c/2,d=t.offsetHeight/2-i-l/2,n.style.transformOrigin=`${r+c/2}px 50%`):(u=(t.offsetWidth-o.offsetWidth)/2,d=(t.offsetHeight-o.offsetHeight)/2,n.style.transformOrigin="50% 50%"),{dx:u,dy:d}},On=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},clearSelection:Nn,disableEdit:Mn,enableEdit:kn,expandNode:function(e,t){const n=e.nodeObj;typeof t=="boolean"?n.expanded=t:n.expanded!==!1?n.expanded=!1:n.expanded=!0;const o=e.parentNode,s=o.children[1];if(s.expanded=n.expanded,s.className=n.expanded?"minus":"",J(e),n.expanded){const l=this.createChildren(n.children.map(u=>this.createWrapper(u).grp));o.parentNode.appendChild(l)}else o.parentNode.children[1].remove();this.linkDiv(e.closest("me-main > me-wrapper"));const i=e.getBoundingClientRect(),r=this.container.getBoundingClientRect();(i.bottom>r.bottom||i.top<r.top||i.right>r.right||i.left<r.left)&&this.scrollIntoView(e),this.bus.fire("expandNode",n)},expandNodeAll:function(e,t){const n=e.nodeObj,o=(s,i)=>{s.expanded=i,s.children&&s.children.forEach(r=>{o(r,i)})};typeof t=="boolean"?o(n,t):n.expanded!==!1?o(n,!1):o(n,!0),this.refresh()},focusNode:function(e){e.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=e.nodeObj,this.initRight(),this.toCenter())},getData:Tn,getDataString:_n,initLeft:function(){this.direction=0,this.refresh()},initRight:function(){this.direction=1,this.refresh()},initSide:function(){this.direction=2,this.refresh()},install:function(e){e(this)},move:Dn,refresh:function(e){e&&(e=JSON.parse(JSON.stringify(e)),this.nodeData=e.nodeData,this.arrows=e.arrows||[],this.summaries=e.summaries||[]),j(this.nodeData),this.layout(),this.linkDiv()},scale:Ln,scaleFit:An,scrollIntoView:xn,selectNode:En,selectNodes:Sn,setLocale:function(e){this.locale=e,this.refresh()},toCenter:function(){const{map:e}=this,{dx:t,dy:n}=tt(this);e.style.transform=`translate(${t}px, ${n}px) scale(${this.scaleVal})`},unselectNodes:Cn},Symbol.toStringTag,{value:"Module"})),nt={create:function(e){return{dom:e,moved:!1,mousedown:!1,handleMouseMove(t){this.mousedown&&(this.moved=!0,this.cb&&this.cb(t.movementX,t.movementY))},handleMouseDown(t){t.button===0&&(this.mousedown=!0)},handleClear(t){this.mousedown=!1},cb:null,init(t,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.destroy=pe([{dom:t,evt:"mousemove",func:this.handleMouseMove},{dom:t,evt:"mouseleave",func:this.handleClear},{dom:t,evt:"mouseup",func:this.handleClear},{dom:this.dom,evt:"mousedown",func:this.handleMouseDown}])},destroy:null,clear(){this.moved=!1,this.mousedown=!1}}}};function ot(e,t,n,o,s,i,r,c){return{x:e/8+n*3/8+s*3/8+r/8,y:t/8+o*3/8+i*3/8+c/8}}function jn(e,t,n){N(e,{x:t+"",y:n+""})}function ce(e,t,n,o,s){N(e,{x1:t+"",y1:n+"",x2:o+"",y2:s+""})}function st(e,t,n,o,s,i,r,c,l,u){e.line.setAttribute("d",`M ${t} ${n} C ${o} ${s} ${i} ${r} ${c} ${l}`);const d=ne(i,r,c,l);if(d&&e.arrow1.setAttribute("d",`M ${d.x1} ${d.y1} L ${c} ${l} L ${d.x2} ${d.y2}`),u.bidirectional){const v=ne(o,s,t,n);v&&e.arrow2.setAttribute("d",`M ${v.x1} ${v.y1} L ${t} ${n} L ${v.x2} ${v.y2}`)}const{x:h,y:g}=ot(t,n,o,s,i,r,c,l);jn(e.label,h,g),Vn(e)}function le(e,t,n){const{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=t.offsetWidth,r=t.offsetHeight,c=o+i/2,l=s+r/2,u=c+n.x,d=l+n.y;return{w:i,h:r,cx:c,cy:l,ctrlX:u,ctrlY:d}}function U(e){let t,n;const o=(e.cy-e.ctrlY)/(e.ctrlX-e.cx);return o>e.h/e.w||o<-e.h/e.w?e.cy-e.ctrlY<0?(t=e.cx-e.h/2/o,n=e.cy+e.h/2):(t=e.cx+e.h/2/o,n=e.cy-e.h/2):e.cx-e.ctrlX<0?(t=e.cx+e.w/2,n=e.cy-e.w*o/2):(t=e.cx-e.w/2,n=e.cy+e.w*o/2),{x:t,y:n}}const $n=function(e,t,n,o){const s=document.createElementNS(k,"text");return N(s,{"text-anchor":"middle",x:t+"",y:n+"",fill:o||"#666"}),s.dataset.type="custom-link",s.innerHTML=e,s},xe=function(e,t,n,o,s){if(!t||!n)return;const i=le(e,t,o.delta1),r=le(e,n,o.delta2),{x:c,y:l}=U(i),{ctrlX:u,ctrlY:d}=i,{ctrlX:h,ctrlY:g}=r,{x:v,y:p}=U(r),a=ne(h,g,v,p);if(!a)return;const f=`M ${a.x1} ${a.y1} L ${v} ${p} L ${a.x2} ${a.y2}`;let m="";if(o.bidirectional){const w=ne(u,d,c,l);if(!w)return;m=`M ${w.x1} ${w.y1} L ${c} ${l} L ${w.x2} ${w.y2}`}const b=Mt(`M ${c} ${l} C ${u} ${d} ${h} ${g} ${v} ${p}`,f,m),{x:y,y:x}=ot(c,l,u,d,h,g,v,p),E=$n(o.label,y,x,e.theme.cssVar["--color"]);b.appendChild(E),b.label=E,b.arrowObj=o,b.dataset.linkid=o.id,e.linkSvgGroup.appendChild(b),s||(e.arrows.push(o),e.currentArrow=b,it(e,o,i,r))},Pn=function(e,t,n={}){const o={id:R(),label:"Custom Link",from:e.nodeObj.id,to:t.nodeObj.id,delta1:{x:e.offsetWidth/2+100,y:0},delta2:{x:t.offsetWidth/2+100,y:0},...n};xe(this,e,t,o),this.bus.fire("operation",{name:"createArrow",obj:o})},Hn=function(e){const t={...e,id:R()};xe(this,this.findEle(t.from),this.findEle(t.to),t),this.bus.fire("operation",{name:"createArrow",obj:t})},Bn=function(e){let t;if(e?t=e:t=this.currentArrow,!t)return;Se(this);const n=t.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),t.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},Rn=function(e){this.currentArrow=e;const t=e.arrowObj,n=this.findEle(t.from),o=this.findEle(t.to),s=le(this,n,t.delta1),i=le(this,o,t.delta2);it(this,t,s,i)},Fn=function(){Se(this),this.currentArrow=null},Ee=function(e,t){const n=document.createElementNS(k,"path");return N(n,{d:e,stroke:t,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},In=function(e,t){const n=document.createElementNS(k,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=Ee(e.line.getAttribute("d"),t);n.appendChild(o);const s=Ee(e.arrow1.getAttribute("d"),t);if(n.appendChild(s),e.arrow2.getAttribute("d")){const i=Ee(e.arrow2.getAttribute("d"),t);n.appendChild(i)}e.insertBefore(n,e.firstChild)},Wn=function(e){const t=e.querySelector(".arrow-highlight");t&&t.remove()},Vn=function(e){const t=e.querySelector(".arrow-highlight");if(!t)return;const n=t.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",e.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",e.arrow1.getAttribute("d")),n.length>=3&&e.arrow2.getAttribute("d")&&n[2].setAttribute("d",e.arrow2.getAttribute("d"))},Se=function(e){var t,n;(t=e.helper1)==null||t.destroy(),(n=e.helper2)==null||n.destroy(),e.linkController.style.display="none",e.P2.style.display="none",e.P3.style.display="none",e.currentArrow&&Wn(e.currentArrow)},it=function(e,t,n,o){const{linkController:s,P2:i,P3:r,line1:c,line2:l,nodes:u,map:d,currentArrow:h,bus:g}=e;if(!h)return;s.style.display="initial",i.style.display="initial",r.style.display="initial",u.appendChild(s),u.appendChild(i),u.appendChild(r),In(h,"#4dc4ff");let{x:p,y:a}=U(n),{ctrlX:f,ctrlY:m}=n,{ctrlX:b,ctrlY:y}=o,{x,y:E}=U(o);i.style.cssText=`top:${m}px;left:${f}px;`,r.style.cssText=`top:${y}px;left:${b}px;`,ce(c,p,a,f,m),ce(l,b,y,x,E),e.helper1=nt.create(i),e.helper2=nt.create(r),e.helper1.init(d,(w,S)=>{f=f+w/e.scaleVal,m=m+S/e.scaleVal;const C=U({...n,ctrlX:f,ctrlY:m});p=C.x,a=C.y,i.style.top=m+"px",i.style.left=f+"px",st(h,p,a,f,m,b,y,x,E,t),ce(c,p,a,f,m),t.delta1.x=f-n.cx,t.delta1.y=m-n.cy,g.fire("updateArrowDelta",t)}),e.helper2.init(d,(w,S)=>{b=b+w/e.scaleVal,y=y+S/e.scaleVal;const C=U({...o,ctrlX:b,ctrlY:y});x=C.x,E=C.y,r.style.top=y+"px",r.style.left=b+"px",st(h,p,a,f,m,b,y,x,E,t),ce(l,b,y,x,E),t.delta2.x=b-o.cx,t.delta2.y=y-o.cy,g.fire("updateArrowDelta",t)})};function Yn(){this.linkSvgGroup.innerHTML="";for(let e=0;e<this.arrows.length;e++){const t=this.arrows[e];try{xe(this,this.findEle(t.from),this.findEle(t.to),t,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function Gn(e){if(Se(this),!e)return;const t=e.label;$e(this,t,e.arrowObj)}function Kn(){this.arrows=this.arrows.filter(e=>te(e.from,this.nodeData)&&te(e.to,this.nodeData))}const qn=Object.freeze(Object.defineProperty({__proto__:null,createArrow:Pn,createArrowFrom:Hn,editArrowLabel:Gn,removeArrow:Bn,renderArrow:Yn,selectArrow:Rn,tidyArrow:Kn,unselectArrow:Fn},Symbol.toStringTag,{value:"Module"})),zn=function(e){var l,u;if(e.length===0)throw new Error("No selected node.");if(e.length===1){const d=e[0].nodeObj,h=e[0].nodeObj.parent;if(!h)throw new Error("Can not select root node.");const g=h.children.findIndex(v=>d===v);return{parent:h.id,start:g,end:g}}let t=0;const n=e.map(d=>{let h=d.nodeObj;const g=[];for(;h.parent;){const v=h.parent,p=v.children,a=p==null?void 0:p.indexOf(h);h=v,g.unshift({node:h,index:a})}return g.length>t&&(t=g.length),g});let o=0;e:for(;o<t;o++){const d=(l=n[0][o])==null?void 0:l.node;for(let h=1;h<n.length;h++)if(((u=n[h][o])==null?void 0:u.node)!==d)break e}if(!o)throw new Error("Can not select root node.");const s=n.map(d=>d[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}},Un=function(e){const t=document.createElementNS(k,"g");return t.setAttribute("id",e),t},rt=function(e,t){const n=document.createElementNS(k,"path");return N(n,{d:e,stroke:t||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},ct=function(e,t,n,o,s){const i=document.createElementNS(k,"text");return N(i,{"text-anchor":o,x:t+"",y:n+"",fill:s||"#666"}),i.innerHTML=e,i},Xn=e=>e.parentElement.parentElement,Jn=function(e,{parent:t,start:n}){const o=e.findEle(t),s=o.nodeObj;let i;return s.parent?i=o.closest("me-main").className:i=e.findEle(s.children[n].id).closest("me-main").className,i},Ce=function(e,t){var C;const{id:n,label:o,parent:s,start:i,end:r}=t,{nodes:c,theme:l,summarySvg:u}=e,h=e.findEle(s).nodeObj,g=Jn(e,t);let v=1/0,p=0,a=0,f=0;for(let _=i;_<=r;_++){const B=(C=h.children)==null?void 0:C[_];if(!B)return e.removeSummary(n),null;const V=Xn(e.findEle(B.id)),{offsetLeft:Y,offsetTop:dt}=$(c,V),ht=i===r?10:20;_===i&&(a=dt+ht),_===r&&(f=dt+V.offsetHeight-ht),Y<v&&(v=Y),V.offsetWidth+Y>p&&(p=V.offsetWidth+Y)}let m,b;const y=a+10,x=f+10,E=(y+x)/2,w=l.cssVar["--color"];g===T.LHS?(m=rt(`M ${v+10} ${y} c -5 0 -10 5 -10 10 L ${v} ${x-10} c 0 5 5 10 10 10 M ${v} ${E} h -10`,w),b=ct(o,v-20,E+6,"end",w)):(m=rt(`M ${p-10} ${y} c 5 0 10 5 10 10 L ${p} ${x-10} c 0 5 -5 10 -10 10 M ${p} ${E} h 10`,w),b=ct(o,p+20,E+6,"start",w));const S=Un("s-"+n);return S.appendChild(m),S.appendChild(b),S.summaryObj=t,u.appendChild(S),S},Zn=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(){if(!this.currentNodes)return;const{currentNodes:e,summaries:t,bus:n}=this,{parent:o,start:s,end:i}=zn(e),r={id:R(),parent:o,start:s,end:i,label:"summary"},c=Ce(this,r);t.push(r),this.editSummary(c),n.fire("operation",{name:"createSummary",obj:r})},createSummaryFrom:function(e){const t=R(),n={...e,id:t};Ce(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(e){if(!e)return;const t=e.childNodes[1];$e(this,t,e.summaryObj)},removeSummary:function(e){var n;const t=this.summaries.findIndex(o=>o.id===e);t>-1&&(this.summaries.splice(t,1),(n=document.querySelector("#s-"+e))==null||n.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:e}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(e=>{try{Ce(this,e)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(e){const t=e.children[1].getBBox(),n=6,o=3,s=document.createElementNS(k,"rect");N(s,{x:t.x-n+"",y:t.y-n+"",width:t.width+n*2+"",height:t.height+n*2+"",rx:o+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),e.appendChild(s),this.currentSummary=e},unselectSummary:function(){var e,t;(t=(e=this.currentSummary)==null?void 0:e.querySelector("rect"))==null||t.remove(),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),M="http://www.w3.org/2000/svg";function Qn(e,t){const n=document.createElementNS(M,"svg");return N(n,{version:"1.1",xmlns:M,height:e,width:t}),n}function eo(e,t){return(parseInt(e)-parseInt(t))/2}function to(e,t,n,o){const s=document.createElementNS(M,"g");let i="";return e.text?i=e.text.textContent:i=e.childNodes[0].textContent,i.split(`
|
|
15
|
-
`).forEach((c,l)=>{const u=document.createElementNS(M,"text");N(u,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+eo(t.lineHeight,t.fontSize)*(l+1)+parseFloat(t.fontSize)*(l+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),u.innerHTML=c,s.appendChild(u)}),s}function no(e,t,n,o){var c;let s="";(c=e.nodeObj)!=null&&c.dangerouslySetInnerHTML?s=e.nodeObj.dangerouslySetInnerHTML:e.text?s=e.text.textContent:s=e.childNodes[0].textContent;const i=document.createElementNS(M,"foreignObject");N(i,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const r=document.createElement("div");return N(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`}),r.innerHTML=s,i.appendChild(r),i}function oo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(M,"rect");return N(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 ae(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:s,offsetTop:i}=$(e.nodes,t),r=document.createElementNS(M,"rect");N(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(M,"g");c.appendChild(r);let l;return n?l=no(t,o,s,i):l=to(t,o,s,i),c.appendChild(l),c}function so(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(M,"a"),r=document.createElementNS(M,"text");return N(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=t.textContent,i.appendChild(r),i.setAttribute("href",t.href),i}function io(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(M,"image");return N(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:t.src}),i}const de=100,ro='<?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">',co=(e,t=!1)=>{var h,g,v;const n=e.nodes,o=n.offsetHeight+de*2,s=n.offsetWidth+de*2,i=Qn(o+"px",s+"px"),r=document.createElementNS(M,"svg"),c=document.createElementNS(M,"rect");N(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:e.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(p=>{const a=p.cloneNode(!0),{offsetLeft:f,offsetTop:m}=$(n,p.parentElement);a.setAttribute("x",`${f}`),a.setAttribute("y",`${m}`),r.appendChild(a)});const l=(h=n.querySelector(".lines"))==null?void 0:h.cloneNode(!0);l&&r.appendChild(l);const u=(g=n.querySelector(".topiclinks"))==null?void 0:g.cloneNode(!0);u&&r.appendChild(u);const d=(v=n.querySelector(".summary"))==null?void 0:v.cloneNode(!0);return d&&r.appendChild(d),n.querySelectorAll("me-tpc").forEach(p=>{p.nodeObj.dangerouslySetInnerHTML?r.appendChild(ae(e,p,!t)):(r.appendChild(oo(e,p)),r.appendChild(ae(e,p.text,!t)))}),n.querySelectorAll(".tags > span").forEach(p=>{r.appendChild(ae(e,p))}),n.querySelectorAll(".icons > span").forEach(p=>{r.appendChild(ae(e,p))}),n.querySelectorAll(".hyper-link").forEach(p=>{r.appendChild(so(e,p))}),n.querySelectorAll("img").forEach(p=>{r.appendChild(io(e,p))}),N(r,{x:de+"",y:de+"",overflow:"visible"}),i.appendChild(r),i},lo=(e,t)=>(t&&e.insertAdjacentHTML("afterbegin","<style>"+t+"</style>"),ro+e.outerHTML);function ao(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=s=>{t(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(e)})}const ho=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(e=!1,t){const n=this.exportSvg(e,t),o=await ao(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(e=!1,t){const n=co(this,e),o=lo(n,t);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function uo(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const lt=Object.keys(et),at={};for(let e=0;e<lt.length;e++){const t=lt[e];at[t]=uo(et[t],t)}const fo={getObjById:te,generateNewObj:ut,layout:xt,linkDiv:Lt,editTopic:kt,createWrapper:Ct,createParent:Nt,createChildren:_t,createTopic:Tt,findEle:Ae,changeTheme:nn,...On,...at,...qn,...Zn,...ho,init(e){if(e=JSON.parse(JSON.stringify(e)),!e||!e.nodeData)return new Error("MindElixir: `data` is required");e.direction!==void 0&&(this.direction=e.direction),this.changeTheme(e.theme||this.theme,!1),this.nodeData=e.nodeData,j(this.nodeData),this.arrows=e.arrows||[],this.summaries=e.summaries||[],this.tidyArrow(),this.toolBar&&zt(this),this.keypress&&
|
|
14
|
+
`,De(o),e.scrollIntoView(o),o.addEventListener("keydown",r=>{r.stopPropagation();const c=r.key;if(c==="Enter"||c==="Tab"){if(r.shiftKey)return;r.preventDefault(),o.blur(),e.container.focus()}}),o.addEventListener("blur",()=>{var c;if(!o)return;const r=((c=o.textContent)==null?void 0:c.trim())||"";r===""?n.label=s:n.label=r,o.remove(),r!==s&&(t.innerHTML=n.label,e.linkDiv(),"parent"in n?e.bus.fire("operation",{name:"finishEditSummary",obj:n}):e.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Lt=function(e){const t=this.map.querySelector("me-root"),n=t.offsetTop,o=t.offsetLeft,s=t.offsetWidth,i=t.offsetHeight,r=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<r.length;c++){const l=r[c],u=l.querySelector("me-tpc"),{offsetLeft:d,offsetTop:h}=$(this.nodes,u),g=u.offsetWidth,v=u.offsetHeight,p=l.parentNode.className,a=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:h,cL:d,cW:g,cH:v,direction:p,containerHeight:this.nodes.offsetHeight}),f=this.theme.palette,m=u.nodeObj.branchColor||f[c%f.length];u.style.borderColor=m,this.lines.appendChild(Oe(a,m,"3"));const y=l.children[0].children[1];if(y&&(y.style.top=(y.parentNode.offsetHeight-y.offsetHeight)/2+"px",p===T.LHS?y.style.left="-10px":y.style.right="-10px"),e&&e!==l)continue;const b=X("subLines"),x=l.lastChild;x.tagName==="svg"&&x.remove(),l.appendChild(b),Pe(this,b,m,l,p,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},Pe=function(e,t,n,o,s,i){const r=o.firstChild,c=o.children[1].children;if(c.length===0)return;const l=r.offsetTop,u=r.offsetLeft,d=r.offsetWidth,h=r.offsetHeight;for(let g=0;g<c.length;g++){const v=c[g],p=v.firstChild,a=p.offsetTop,f=p.offsetLeft,m=p.offsetWidth,y=p.offsetHeight,b=p.firstChild.nodeObj.branchColor||n,x=e.generateSubBranch({pT:l,pL:u,pW:d,pH:h,cT:a,cL:f,cW:m,cH:y,direction:s,isFirst:i});t.appendChild(Oe(x,b,"2"));const E=p.children[1];if(E){if(E.style.bottom=-(E.offsetHeight/2)+"px",s===T.LHS?E.style.left="10px":s===T.RHS&&(E.style.right="10px"),!E.expanded)continue}else continue;Pe(e,t,b,v,s)}},He={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",clickTips:"请点击目标节点",summary:"摘要"},Be={cn:He,zh_CN:He,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",clickTips:"Favor clicar no item alvo",summary:"Resumo"},it:{addChild:"Aggiungi figlio",addParent:"Aggiungi genitore",addSibling:"Aggiungi fratello",removeNode:"Rimuovi nodo",focus:"Modalità Focus",cancelFocus:"Annulla Modalità Focus",moveUp:"Sposta su",moveDown:"Sposta giù",link:"Collega",clickTips:"Si prega di fare clic sul nodo di destinazione",summary:"Unisci nodi"},es:{addChild:"Agregar hijo",addParent:"Agregar padre",addSibling:"Agregar hermano",removeNode:"Eliminar nodo",focus:"Modo Enfoque",cancelFocus:"Cancelar Modo Enfoque",moveUp:"Mover hacia arriba",moveDown:"Mover hacia abajo",link:"Enlace",clickTips:"Por favor haga clic en el nodo de destino",summary:"Resumen"},fr:{addChild:"Ajout enfant",addParent:"Ajout parent",addSibling:"Ajout voisin",removeNode:"Supprimer",focus:"Cibler",cancelFocus:"Retour",moveUp:"Monter",moveDown:"Descendre",link:"Lier",clickTips:"Cliquer sur le noeud cible",summary:"Annoter"},ko:{addChild:"자식 추가",addParent:"부모 추가",addSibling:"형제 추가",removeNode:"노드 삭제",focus:"포커스 모드",cancelFocus:"포커스 모드 취소",moveUp:"위로 이동",moveDown:"아래로 이동",link:"연결",clickTips:"대상 노드를 클릭하십시오",summary:"요약"}},xo="";function At(e,t){t=t===!0?{focus:!0,link:!0}:t;const n=w=>{const S=document.createElement("div");return S.innerText=w,S.className="tips",S},o=(w,S,C)=>{const _=document.createElement("li");return _.id=w,_.innerHTML=`<span>${ee(S)}</span><span ${C?'class="key"':""}>${ee(C)}</span>`,_},s=Be[e.locale]?e.locale:"en",i=Be[s],r=o("cm-add_child",i.addChild,"Tab"),c=o("cm-add_parent",i.addParent,"Ctrl + Enter"),l=o("cm-add_sibling",i.addSibling,"Enter"),u=o("cm-remove_child",i.removeNode,"Delete"),d=o("cm-fucus",i.focus,""),h=o("cm-unfucus",i.cancelFocus,""),g=o("cm-up",i.moveUp,"PgUp"),v=o("cm-down",i.moveDown,"Pgdn"),p=o("cm-link",i.link,""),a=o("cm-link-bidirectional","Bidirectional Link",""),f=o("cm-summary",i.summary,""),m=document.createElement("ul");if(m.className="menu-list",m.appendChild(r),m.appendChild(c),m.appendChild(l),m.appendChild(u),t.focus&&(m.appendChild(d),m.appendChild(h)),m.appendChild(g),m.appendChild(v),m.appendChild(f),t.link&&(m.appendChild(p),m.appendChild(a)),t&&t.extend)for(let w=0;w<t.extend.length;w++){const S=t.extend[w],C=o(S.name,S.name,S.key||"");m.appendChild(C),C.onclick=_=>{S.onclick(_)}}const y=document.createElement("div");y.className="context-menu",y.appendChild(m),y.hidden=!0,e.container.append(y);let b=!0;const x=w=>{const S=w.target;if(fe(S)){S.parentElement.tagName==="ME-ROOT"?b=!0:b=!1,b?(d.className="disabled",g.className="disabled",v.className="disabled",c.className="disabled",l.className="disabled",u.className="disabled"):(d.className="",g.className="",v.className="",c.className="",l.className="",u.className=""),y.hidden=!1,m.style.top="",m.style.bottom="",m.style.left="",m.style.right="";const C=m.getBoundingClientRect(),_=m.offsetHeight,B=m.offsetWidth,V=w.clientY-C.top,Y=w.clientX-C.left;_+V>window.innerHeight?(m.style.top="",m.style.bottom="0px"):(m.style.bottom="",m.style.top=V+15+"px"),B+Y>window.innerWidth?(m.style.left="",m.style.right="0px"):(m.style.right="",m.style.left=Y+10+"px")}};e.bus.addListener("showContextMenu",x),y.onclick=w=>{w.target===y&&(y.hidden=!0)},r.onclick=()=>{e.addChild(),y.hidden=!0},c.onclick=()=>{e.insertParent(),y.hidden=!0},l.onclick=()=>{b||(e.insertSibling("after"),y.hidden=!0)},u.onclick=()=>{b||(e.removeNodes(e.currentNodes||[]),y.hidden=!0)},d.onclick=()=>{b||(e.focusNode(e.currentNode),y.hidden=!0)},h.onclick=()=>{e.cancelFocus(),y.hidden=!0},g.onclick=()=>{b||(e.moveUpNode(),y.hidden=!0)},v.onclick=()=>{b||(e.moveDownNode(),y.hidden=!0)};const E=w=>{y.hidden=!0;const S=e.currentNode,C=n(i.clickTips);e.container.appendChild(C),e.map.addEventListener("click",_=>{_.preventDefault(),C.remove();const B=_.target;(B.parentElement.tagName==="ME-PARENT"||B.parentElement.tagName==="ME-ROOT")&&e.createArrow(S,B,w)},{once:!0})};return p.onclick=()=>E(),a.onclick=()=>E({bidirectional:!0}),f.onclick=()=>{y.hidden=!0,e.createSummary(),e.unselectNodes(e.currentNodes)},()=>{r.onclick=null,c.onclick=null,l.onclick=null,u.onclick=null,d.onclick=null,h.onclick=null,g.onclick=null,v.onclick=null,p.onclick=null,f.onclick=null,y.onclick=null,e.container.oncontextmenu=null}}const ve=document,Dt=function(e,t){if(!t)return ye(e),e;let n=e.querySelector(".insert-preview");const o=`insert-preview ${t} show`;return n||(n=ve.createElement("div"),e.appendChild(n)),n.className=o,e},ye=function(e){if(!e)return;const t=e.querySelectorAll(".insert-preview");for(const n of t||[])n.remove()},Re=function(e,t){for(const n of t){const o=n.parentElement.parentElement.contains(e);if(!(e&&e.tagName==="ME-TPC"&&e!==n&&!o&&e.nodeObj.parent))return!1}return!0},Ot=function(e){const t=document.createElement("div");return t.className="mind-elixir-ghost",e.container.appendChild(t),t};class jt{constructor(t){Q(this,"mind");Q(this,"isMoving",!1);Q(this,"interval",null);Q(this,"speed",20);this.mind=t}move(t,n){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(t*this.speed*this.mind.scaleVal,n*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function $t(e){let t=null,n=null;const o=Ot(e),s=new jt(e),i=u=>{e.selection.cancel();const d=u.target;if((d==null?void 0:d.tagName)!=="ME-TPC"){u.preventDefault();return}let h=e.currentNodes;h!=null&&h.includes(d)||(e.selectNode(d),h=e.currentNodes),e.dragged=h,h.length>1?o.innerHTML=h.length+"":o.innerHTML=d.innerHTML;for(const g of h)g.parentElement.parentElement.style.opacity="0.5";u.dataTransfer.setDragImage(o,0,0),u.dataTransfer.dropEffect="move",e.dragMoveHelper.clear()},r=u=>{const{dragged:d}=e;if(!d)return;s.stop();for(const g of d)g.parentElement.parentElement.style.opacity="1";const h=u.target;h.style.opacity="",n&&(ye(n),t==="before"?e.moveNodeBefore(d,n):t==="after"?e.moveNodeAfter(d,n):t==="in"&&e.moveNodeIn(d,n),e.dragged=null)},c=u=>{u.preventDefault();const d=12*e.scaleVal,{dragged:h}=e;if(!h)return;const g=e.container.getBoundingClientRect();u.clientX<g.x+50?s.move(1,0):u.clientX>g.x+g.width-50?s.move(-1,0):u.clientY<g.y+50?s.move(0,1):u.clientY>g.y+g.height-50?s.move(0,-1):s.stop(),ye(n);const v=ve.elementFromPoint(u.clientX,u.clientY-d);if(Re(v,h)){n=v;const p=v.getBoundingClientRect(),a=p.y;u.clientY>a+p.height?t="after":t="in"}else{const p=ve.elementFromPoint(u.clientX,u.clientY+d),a=p.getBoundingClientRect();if(Re(p,h)){n=p;const f=a.y;u.clientY<f?t="before":t="in"}else t=n=null}n&&Dt(n,t)};return pe([{dom:e.map,evt:"dragstart",func:i},{dom:e.map,evt:"dragend",func:r},{dom:e.map,evt:"dragover",func:c}])}const Pt=function(e){return["createSummary","removeSummary","finishEditSummary"].includes(e.name)?{type:"summary",value:e.obj.id}:["createArrow","removeArrow","finishEditArrowLabel"].includes(e.name)?{type:"arrow",value:e.obj.id}:["removeNodes","copyNodes","moveNodeBefore","moveNodeAfter","moveNodeIn"].includes(e.name)?{type:"nodes",value:e.objs.map(t=>t.id)}:{type:"node",value:e.obj.id}};function Ht(e){let t=[],n=-1,o=e.getData();e.undo=function(){if(n>-1){const r=t[n];o=r.prev,e.refresh(r.prev);try{r.currentObject.type==="node"?e.selectNode(this.findEle(r.currentObject.value)):r.currentObject.type==="nodes"&&e.selectNodes(r.currentObject.value.map(c=>this.findEle(c)))}catch{}finally{n--}}},e.redo=function(){if(n<t.length-1){n++;const r=t[n];o=r.next,e.refresh(r.next),r.currentObject.type==="node"?e.selectNode(this.findEle(r.currentObject.value)):r.currentObject.type==="nodes"&&(e.unselectNodes(this.currentNodes),e.selectNodes(r.currentObject.value.map(c=>this.findEle(c))))}};const s=function(r){if(r.name==="beginEdit")return;t=t.slice(0,n+1);const c=e.getData();t.push({prev:o,currentObject:Pt(r),next:c}),o=c,n=t.length-1},i=function(r){(r.metaKey||r.ctrlKey)&&(r.shiftKey&&r.key==="Z"||r.key==="y")?e.redo():(r.metaKey||r.ctrlKey)&&r.key==="z"&&e.undo()};return e.bus.addListener("operation",s),e.map.addEventListener("keydown",i),()=>{e.bus.removeListener("operation",s),e.map.removeEventListener("keydown",i)}}const Bt='<?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>',Rt='<?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>',Ft='<?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>',It='<?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>',Wt='<?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>',Vt='<?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>',Yt='<?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>',Eo="",Gt={side:Bt,left:Rt,right:Ft,full:It,living:Wt,zoomin:Vt,zoomout:Yt},I=(e,t)=>{const n=document.createElement("span");return n.id=e,n.innerHTML=Gt[t],n};function Kt(e){const t=document.createElement("div"),n=I("fullscreen","full"),o=I("toCenter","living"),s=I("zoomout","zoomout"),i=I("zoomin","zoomin"),r=document.createElement("span");return r.innerText="100%",t.appendChild(n),t.appendChild(o),t.appendChild(s),t.appendChild(i),t.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===e.el?document.exitFullscreen():e.el.requestFullscreen()},o.onclick=()=>{e.toCenter()},s.onclick=()=>{e.scaleVal<.6||e.scale(e.scaleVal-e.scaleSensitivity)},i.onclick=()=>{e.scaleVal>1.6||e.scale(e.scaleVal+e.scaleSensitivity)},t}function qt(e){const t=document.createElement("div"),n=I("tbltl","left"),o=I("tbltr","right"),s=I("tblts","side");return t.appendChild(n),t.appendChild(o),t.appendChild(s),t.className="mind-elixir-toolbar lt",n.onclick=()=>{e.initLeft()},o.onclick=()=>{e.initRight()},s.onclick=()=>{e.initSide()},t}function zt(e){e.container.append(Kt(e)),e.container.append(qt(e))}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */class Ut{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,n){const o=this._listeners.get(t)??new Set;return this._listeners.set(t,o),o.add(n),this}removeEventListener(t,n){var o;return(o=this._listeners.get(t))==null||o.delete(n),this}dispatchEvent(t,...n){let o=!0;for(const s of this._listeners.get(t)??[])o=s(...n)!==!1&&o;return o}unbindAllListeners(){this._listeners.clear()}}const Fe=(e,t="px")=>typeof e=="number"?e+t:e,P=({style:e},t,n)=>{if(typeof t=="object")for(const[o,s]of Object.entries(t))s!==void 0&&(e[o]=Fe(s));else n!==void 0&&(e[t]=Fe(n))},Ie=(e=0,t=0,n=0,o=0)=>{const s={x:e,y:t,width:n,height:o,top:t,left:e,right:e+n,bottom:t+o};return{...s,toJSON:()=>JSON.stringify(s)}},Xt=e=>{let t,n=-1,o=!1;return{next:(...s)=>{t=s,o||(o=!0,n=requestAnimationFrame(()=>{e(...t),o=!1}))},cancel:()=>{cancelAnimationFrame(n),o=!1}}},We=(e,t,n="touch")=>{switch(n){case"center":{const o=t.left+t.width/2,s=t.top+t.height/2;return o>=e.left&&o<=e.right&&s>=e.top&&s<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}},Jt=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Zt=()=>"safari"in window,be=e=>Array.isArray(e)?e:[e],Ve=e=>(t,n,o,s={})=>{(t instanceof HTMLCollection||t instanceof NodeList)&&(t=Array.from(t)),n=be(n),t=be(t);for(const i of t)if(i)for(const r of n)i[e](r,o,{capture:!1,...s})},H=Ve("addEventListener"),A=Ve("removeEventListener"),re=e=>{var t;const{clientX:n,clientY:o,target:s}=((t=e.touches)==null?void 0:t[0])??e;return{x:n,y:o,target:s}},q=(e,t=document)=>be(e).map(n=>typeof n=="string"?Array.from(t.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),Qt=(e,t)=>t.some(n=>typeof n=="number"?e.button===n:typeof n=="object"?n.button!==e.button?!1:n.modifiers.every(o=>{switch(o){case"alt":return e.altKey;case"ctrl":return e.ctrlKey||e.metaKey;case"shift":return e.shiftKey}}):!1),{abs:W,max:Ye,min:Ge,ceil:Ke}=Math,qe=(e=[])=>({stored:e,selected:[],touched:[],changed:{added:[],removed:[]}}),ze=class extends Ut{constructor(t){var n,o,s,i,r;super(),this._selection=qe(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=Ie(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(n=t.behaviour)!=null&&n.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(o=t.behaviour)==null?void 0:o.scrolling,startScrollMargins:{x:0,y:0,...(i=(s=t.behaviour)==null?void 0:s.scrolling)==null?void 0:i.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(r=t.features)==null?void 0:r.singleTap}}};for(const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[d]=="function"&&(this[d]=this[d].bind(this));const{document:c,selectionAreaClass:l,selectionContainerClass:u}=this._options;this._area=c.createElement("div"),this._clippingElement=c.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(l),u&&this._clippingElement.classList.add(u),P(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),P(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Xt(d=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",d),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:n,features:o}=this._options,s=t?H:A;s(n,"mousedown",this._onTapStart),o.touch&&s(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:o,y:s,target:i}=re(t),{document:r,startAreas:c,boundaries:l,features:u,behaviour:d}=this._options,h=i.getBoundingClientRect();if(t instanceof MouseEvent&&!Qt(t,d.triggers))return;const g=q(c,r),v=q(l,r);this._targetElement=v.find(m=>We(m.getBoundingClientRect(),h));const p=t.composedPath(),a=g.find(m=>p.includes(m));if(this._targetBoundary=v.find(m=>p.includes(m)),!this._targetElement||!a||!this._targetBoundary||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:o,y1:s,x2:0,y2:0};const f=r.scrollingElement??r.body;this._scrollDelta={x:f.scrollLeft,y:f.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),H(r,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),H(r,["mouseup","touchcancel","touchend"],this._onTapStop),H(r,"scroll",this._onScroll),u.deselectOnBlur&&(this._targetBoundaryScrolled=!1,H(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:n},range:o}=this._options.features,s=re(t);let i;if(n==="native")i=s.target;else if(n==="touch"){this.resolveSelectables();const{x:c,y:l}=s;i=this._selectables.find(u=>{const{right:d,left:h,top:g,bottom:v}=u.getBoundingClientRect();return c<d&&c>h&&l<v&&l>g})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);)if(i.parentElement)i=i.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:r}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&o&&this._latestElement){const c=this._latestElement,[l,u]=c.compareDocumentPosition(i)&4?[i,c]:[c,i],d=[...this._selectables.filter(h=>h.compareDocumentPosition(l)&4&&h.compareDocumentPosition(u)&2),l,u];this.select(d),this._latestElement=c}else r.includes(i)&&(r.length===1||t.ctrlKey||r.every(c=>this._selection.stored.includes(c)))?this.deselect(i):(this.select(i),this._latestElement=i)}_delayedTapMove(t){const{container:n,document:o,behaviour:{startThreshold:s}}=this._options,{x1:i,y1:r}=this._areaLocation,{x:c,y:l}=re(t);if(typeof s=="number"&&W(c+l-(i+r))>=s||typeof s=="object"&&W(c-i)>=s.x||W(l-r)>=s.y){if(A(o,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){A(o,["mouseup","touchcancel","touchend"],this._onTapStop);return}H(o,["mousemove","touchmove"],this._onTapMove,{passive:!1}),P(this._area,"display","block"),q(n,o)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(H(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),H(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(u=>this._targetElement.contains(u))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:o}=this,s=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(P(t,{top:s.top,left:s.left,width:s.width,height:s.height}),P(o,{marginTop:-s.top,marginLeft:-s.left})):(P(t,{top:0,left:0,width:"100%",height:"100%"}),P(o,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:n,_areaLocation:o,_options:s,_frame:i}=this,{speedDivider:r}=s.behaviour.scrolling,c=this._targetElement,{x:l,y:u}=re(t);if(o.x2=l,o.y2=u,this._lastMousePosition.x=l,this._lastMousePosition.y=u,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const d=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:h,scrollLeft:g}=c;n.y&&(c.scrollTop+=Ke(n.y/r),o.y1-=c.scrollTop-h),n.x&&(c.scrollLeft+=Ke(n.x/r),o.x1-=c.scrollLeft-g),i.next(t),requestAnimationFrame(d)};requestAnimationFrame(d)}else i.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&Jt()||this._scrollAvailable&&Zt())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:o,scrollLeft:s}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-s,this._areaLocation.y1+=t.y-o,t.x=s,t.y=o,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,A(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.deltaY?t.deltaY>0?1:-1:0,s=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=o*n,this._scrollSpeed.x+=s*n,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,s=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(o)*n,this._scrollSpeed.y+=Math.sign(s)*n,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_targetElement:o,_options:s}=this,{scrollTop:i,scrollHeight:r,clientHeight:c,scrollLeft:l,scrollWidth:u,clientWidth:d}=o,h=this._targetRect,{x1:g,y1:v}=n;let{x2:p,y2:a}=n;const{behaviour:{scrolling:{startScrollMargins:f}}}=s;p<h.left+f.x?(t.x=l?-W(h.left-p+f.x):0,p=p<h.left?h.left:p):p>h.right-f.x?(t.x=u-l-d?W(h.left+h.width-p-f.x):0,p=p>h.right?h.right:p):t.x=0,a<h.top+f.y?(t.y=i?-W(h.top-a+f.y):0,a=a<h.top?h.top:a):a>h.bottom-f.y?(t.y=r-i-c?W(h.top+h.height-a-f.y):0,a=a>h.bottom?h.bottom:a):t.y=0;const m=Ge(g,p),y=Ge(v,a),b=Ye(g,p),x=Ye(v,a);this._areaRect=Ie(m,y,b-m,x-y)}_redrawSelectionArea(){const{x:t,y:n,width:o,height:s}=this._areaRect,{style:i}=this._area;i.left=`${t}px`,i.top=`${n}px`,i.width=`${o}px`,i.height=`${s}px`}_onTapStop(t,n){var o;const{document:s,features:i}=this._options,{_singleClick:r}=this;A(this._targetElement,"scroll",this._onStartAreaScroll),A(s,["mousemove","touchmove"],this._delayedTapMove),A(s,["touchmove","mousemove"],this._onTapMove),A(s,["mouseup","touchcancel","touchend"],this._onTapStop),A(s,"scroll",this._onScroll),this._keepSelection(),t&&r&&i.singleTap.allow?this._onSingleTap(t):!r&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,A(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),A(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(o=this._frame)==null||o.cancel(),P(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:o,_areaRect:s}=this,{stored:i,selected:r,touched:c}=o,{intersect:l,overlap:u}=n.behaviour,d=u==="invert",h=[],g=[],v=[];for(let a=0;a<t.length;a++){const f=t[a];if(We(s,f.getBoundingClientRect(),l)){if(r.includes(f))i.includes(f)&&!c.includes(f)&&c.push(f);else if(d&&i.includes(f)){v.push(f);continue}else g.push(f);h.push(f)}}d&&g.push(...i.filter(a=>!r.includes(a)));const p=u==="keep";for(let a=0;a<r.length;a++){const f=r[a];!h.includes(f)&&!(p&&i.includes(f))&&v.push(f)}o.selected=h,o.changed={added:g,removed:v},this._latestElement=void 0}_emitEvent(t,n){return this.emit(t,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:n}=this,{selected:o,changed:s,touched:i,stored:r}=n,c=o.filter(l=>!r.includes(l));switch(t.behaviour.overlap){case"drop":{n.stored=[...c,...r.filter(l=>!i.includes(l))];break}case"invert":{n.stored=[...c,...r.filter(l=>!s.removed.includes(l))];break}case"keep":{n.stored=[...r,...o.filter(l=>!r.includes(l))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=q(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:o,stored:s,changed:i}=this._selection;i.added=[],i.removed.push(...o,...t?s:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=qe(t?[]:s)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,n=!1){const{changed:o,selected:s,stored:i}=this._selection,r=q(t,this._options.document).filter(c=>!s.includes(c)&&!i.includes(c));return i.push(...r),s.push(...r),o.added.push(...r),o.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),r}deselect(t,n=!1){const{selected:o,stored:s,changed:i}=this._selection,r=q(t,this._options.document).filter(c=>o.includes(c)||s.includes(c));this._selection.stored=s.filter(c=>!r.includes(c)),this._selection.selected=o.filter(c=>!r.includes(c)),this._selection.changed.added=[],this._selection.changed.removed.push(...r.filter(c=>!i.removed.includes(c))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};ze.version="3.9.0";let en=ze;function tn(e){const t=e.mouseSelectionButton===2?[2]:[0],n=new en({selectables:[".map-container me-tpc"],boundaries:[e.container],container:e.selectionContainer,features:{touch:!1},behaviour:{triggers:t,scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).on("beforestart",({event:o})=>{var r;const s=o.target;if(s.id==="input-box"||s.className==="circle"||(r=e.container.querySelector(".context-menu"))!=null&&r.contains(s))return!1;if(!o.ctrlKey&&!o.metaKey){if(s.tagName==="ME-TPC"&&s.classList.contains("selected"))return!1;e.clearSelection()}const i=n.getSelectionArea();return i.style.background="#4f90f22d",i.style.border="1px solid #4f90f2",i.parentElement&&(i.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:o,removed:s}}})=>{if(o.length>0||s.length>0,o.length>0){for(const i of o)i.className="selected";e.currentNodes=[...e.currentNodes,...o],e.bus.fire("selectNodes",o.map(i=>i.nodeObj))}if(s.length>0){for(const i of s)i.classList.remove("selected");e.currentNodes=e.currentNodes.filter(i=>!(s!=null&&s.includes(i))),e.bus.fire("unselectNodes",s.map(i=>i.nodeObj))}});e.selection=n}const nn=function(e,t=!0){this.theme=e;const n=this.theme.cssVar,o=Object.keys(n);this.container.style.cssText="";for(let s=0;s<o.length;s++){const i=o[s];this.container.style.setProperty(i,n[i])}e.cssVar["--gap"]||this.container.style.setProperty("--gap","30px"),t&&this.refresh()},z=e=>{var o;const t=(o=e.parent)==null?void 0:o.children,n=(t==null?void 0:t.indexOf(e))??0;return{siblings:t,index:n}};function on(e){const{siblings:t,index:n}=z(e);if(t===void 0)return;const o=t[n];n===0?(t[n]=t[t.length-1],t[t.length-1]=o):(t[n]=t[n-1],t[n-1]=o)}function sn(e){const{siblings:t,index:n}=z(e);if(t===void 0)return;const o=t[n];n===t.length-1?(t[n]=t[0],t[0]=o):(t[n]=t[n+1],t[n+1]=o)}function Ue(e){const{siblings:t,index:n}=z(e);return t===void 0?0:(t.splice(n,1),t.length)}function rn(e,t,n){const{siblings:o,index:s}=z(n);o!==void 0&&(t==="before"?o.splice(s,0,e):o.splice(s+1,0,e))}function cn(e,t){const{siblings:n,index:o}=z(e);n!==void 0&&(n[o]=t,t.children=[e])}function Xe(e,t,n){var o;if(Ue(t),(o=n.parent)!=null&&o.parent||(t.direction=n.direction),e==="in")n.children?n.children.push(t):n.children=[t];else{t.direction!==void 0&&(t.direction=n.direction);const{siblings:s,index:i}=z(n);if(s===void 0)return;e==="before"?s.splice(i,0,t):s.splice(i+1,0,t)}}const ln=function({map:e,direction:t},n){var o,s;if(t===0)return 0;if(t===1)return 1;if(t===2){const i=((o=e.querySelector(".lhs"))==null?void 0:o.childElementCount)||0,r=((s=e.querySelector(".rhs"))==null?void 0:s.childElementCount)||0;return i<=r?(n.direction=0,0):(n.direction=1,1)}},Je=function(e,t,n){var i,r;const o=n.children[0].children[0],s=t.parentElement;if(s.tagName==="ME-PARENT"){if(J(o),s.children[1])s.nextSibling.appendChild(n);else{const c=e.createChildren([n]);s.appendChild(ge(!0)),s.insertAdjacentElement("afterend",c)}e.linkDiv(n.offsetParent)}else s.tagName==="ME-ROOT"&&(ln(e,o.nodeObj)===0?(i=e.container.querySelector(".lhs"))==null||i.appendChild(n):(r=e.container.querySelector(".rhs"))==null||r.appendChild(n),e.linkDiv())},an=function(e,t){const n=e.parentNode;if(t===0){const o=n.parentNode.parentNode;o.tagName!=="ME-MAIN"&&(o.previousSibling.children[1].remove(),o.remove())}n.parentNode.remove()},Ze={before:"beforebegin",after:"afterend"},J=function(e){const n=e.parentElement.parentElement.lastElementChild;(n==null?void 0:n.tagName)==="svg"&&(n==null||n.remove())},dn=function(e,t){const n=e.nodeObj,o=ue(n);o.style&&t.style&&(t.style=Object.assign(o.style,t.style));const s=Object.assign(n,t);me(e,s),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:s,origin:o})},we=function(e,t,n){if(!t)return null;const o=t.nodeObj;o.expanded===!1&&(e.expandNode(t,!0),t=e.findEle(o.id));const s=n||e.generateNewObj();o.children?o.children.push(s):o.children=[s],j(e.nodeData);const{grp:i,top:r}=e.createWrapper(s);return Je(e,t,i),{newTop:r,newNodeObj:s}},hn=function(e,t,n){var u,d,h,g;const o=t||this.currentNode;if(!o)return;const s=o.nodeObj;if(s.parent){if(!((u=s.parent)!=null&&u.parent)&&((h=(d=s.parent)==null?void 0:d.children)==null?void 0:h.length)===1){this.addChild(this.findEle(s.parent.id),n);return}}else{this.addChild();return}const i=n||this.generateNewObj();if(!((g=s.parent)!=null&&g.parent)){const v=o.closest("me-main").className===T.LHS?0:1;i.direction=v}rn(i,e,s),j(this.nodeData);const r=o.parentElement,{grp:c,top:l}=this.createWrapper(i);r.parentElement.insertAdjacentElement(Ze[e],c),this.linkDiv(c.offsetParent),n||this.editTopic(l.firstChild),this.selectNode(l.firstChild,!0),this.bus.fire("operation",{name:"insertSibling",type:e,obj:i})},un=function(e,t){const n=e||this.currentNode;if(!n)return;J(n);const o=n.nodeObj;if(!o.parent)return;const s=t||this.generateNewObj();cn(o,s),j(this.nodeData);const i=n.parentElement.parentElement,{grp:r,top:c}=this.createWrapper(s,!0);c.appendChild(ge(!0)),i.insertAdjacentElement("afterend",r);const l=this.createChildren([i]);c.insertAdjacentElement("afterend",l),this.linkDiv(),t||this.editTopic(c.firstChild),this.selectNode(c.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:s})},fn=function(e,t){const n=e||this.currentNode;if(!n)return;const o=we(this,n,t);if(!o)return;const{newTop:s,newNodeObj:i}=o;this.bus.fire("operation",{name:"addChild",obj:i}),t||this.editTopic(s.firstChild),this.selectNode(s.firstChild,!0)},pn=function(e,t){const n=ue(e.nodeObj);he(n);const o=we(this,t,n);if(!o)return;const{newNodeObj:s}=o;this.selectNode(this.findEle(s.id)),this.bus.fire("operation",{name:"copyNode",obj:s})},mn=function(e,t){e=oe(e);const n=[];for(let o=0;o<e.length;o++){const s=e[o],i=ue(s.nodeObj);he(i);const r=we(this,t,i);if(!r)return;const{newNodeObj:c}=r;n.push(c)}this.unselectNodes(this.currentNodes),this.selectNodes(n.map(o=>this.findEle(o.id))),this.bus.fire("operation",{name:"copyNodes",objs:n})},gn=function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;on(n);const o=t.parentNode.parentNode;o.parentNode.insertBefore(o,o.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:n})},vn=function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;sn(n);const o=t.parentNode.parentNode;o.nextSibling?o.nextSibling.insertAdjacentElement("afterend",o):o.parentNode.prepend(o),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:n})},yn=function(e){if(e.length===0)return;e=oe(e);for(const n of e){const o=n.nodeObj,s=Ue(o);an(n,s)}const t=e[e.length-1];this.selectNode(this.findEle(t.nodeObj.parent.id)),this.linkDiv(),this.bus.fire("operation",{name:"removeNodes",objs:e.map(n=>n.nodeObj)})},bn=function(e,t){e=oe(e);const n=t.nodeObj;n.expanded===!1&&(this.expandNode(t,!0),t=this.findEle(n.id));for(const o of e){const s=o.nodeObj;Xe("in",s,n),j(this.nodeData);const i=o.parentElement;Je(this,t,i.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:e.map(o=>o.nodeObj),toObj:n})},Qe=(e,t,n,o)=>{e=oe(e),t==="after"&&(e=e.reverse());const s=n.nodeObj,i=[];for(const r of e){const c=r.nodeObj;Xe(t,c,s),j(o.nodeData),J(r);const l=r.parentElement.parentNode;i.includes(l.parentElement)||i.push(l.parentElement),n.parentElement.parentNode.insertAdjacentElement(Ze[t],l)}for(const r of i)r.childElementCount===0&&r.tagName!=="ME-MAIN"&&(r.previousSibling.children[1].remove(),r.remove());o.linkDiv(),o.bus.fire("operation",{name:t==="before"?"moveNodeBefore":"moveNodeAfter",objs:e.map(r=>r.nodeObj),toObj:s})},et=Object.freeze(Object.defineProperty({__proto__:null,addChild:fn,beginEdit:function(e){const t=e||this.currentNode;t&&(t.nodeObj.dangerouslySetInnerHTML||this.editTopic(t))},copyNode:pn,copyNodes:mn,insertParent:un,insertSibling:hn,moveDownNode:vn,moveNodeAfter:function(e,t){Qe(e,"after",t,this)},moveNodeBefore:function(e,t){Qe(e,"before",t,this)},moveNodeIn:bn,moveUpNode:gn,removeNodes:yn,reshapeNode:dn,rmSubline:J,setNodeTopic:function(e,t){e.text.textContent=t,e.nodeObj.topic=t,this.linkDiv()}},Symbol.toStringTag,{value:"Module"}));function wn(e){return{nodeData:e.isFocusMode?e.nodeDataBackup:e.nodeData,arrows:e.arrows,summaries:e.summaries,direction:e.direction,theme:e.theme}}const xn=function(e){const t=this.container,n=e.getBoundingClientRect(),o=t.getBoundingClientRect();if(n.top>o.bottom||n.bottom<o.top||n.left>o.right||n.right<o.left){const i=n.left+n.width/2,r=n.top+n.height/2,c=o.left+o.width/2,l=o.top+o.height/2,u=i-c,d=r-l;this.move(-u,-d)}},En=function(e,t,n){this.clearSelection(),this.scrollIntoView(e),this.selection.select(e),t&&this.bus.fire("selectNewNode",e.nodeObj)},Sn=function(e){this.selection.select(e)},Cn=function(e){this.selection.deselect(e)},Nn=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},_n=function(){const e=wn(this);return JSON.stringify(e,(t,n)=>{if(!(t==="parent"&&typeof n!="string"))return n})},Tn=function(){return JSON.parse(this.getDataString())},kn=function(){this.editable=!0},Mn=function(){this.editable=!1},Ln=function(e,t={x:0,y:0}){const n=this.container.getBoundingClientRect(),o=t.x?t.x-n.left-n.width/2:0,s=t.y?t.y-n.top-n.height/2:0,{dx:i,dy:r}=tt(this),c=this.map.style.transform,{x:l,y:u}=Te(c),d=l-i,h=u-r,g=this.scaleVal,v=(-o+d)*(1-e/g),p=(-s+h)*(1-e/g);this.map.style.transform=`translate(${l-v}px, ${u-p}px) scale(${e})`,this.scaleVal=e,this.bus.fire("scale",e)},An=function(){const e=this.nodes.offsetHeight/this.container.offsetHeight,t=this.nodes.offsetWidth/this.container.offsetWidth,n=1/Math.max(1,Math.max(e,t));this.scaleVal=n,this.map.style.transform="scale("+n+")",this.bus.fire("scale",n)},Dn=function(e,t){const{map:n,scaleVal:o,bus:s}=this,i=n.style.transform;let{x:r,y:c}=Te(i);r+=e,c+=t,n.style.transform=`translate(${r}px, ${c}px) scale(${o})`,s.fire("move",{dx:e,dy:t})},tt=e=>{const{container:t,map:n,nodes:o}=e,s=n.querySelector("me-root"),i=s.offsetTop,r=s.offsetLeft,c=s.offsetWidth,l=s.offsetHeight;let u,d;return e.alignment==="root"?(u=t.offsetWidth/2-r-c/2,d=t.offsetHeight/2-i-l/2,n.style.transformOrigin=`${r+c/2}px 50%`):(u=(t.offsetWidth-o.offsetWidth)/2,d=(t.offsetHeight-o.offsetHeight)/2,n.style.transformOrigin="50% 50%"),{dx:u,dy:d}},On=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},clearSelection:Nn,disableEdit:Mn,enableEdit:kn,expandNode:function(e,t){const n=e.nodeObj;typeof t=="boolean"?n.expanded=t:n.expanded!==!1?n.expanded=!1:n.expanded=!0;const o=e.parentNode,s=o.children[1];if(s.expanded=n.expanded,s.className=n.expanded?"minus":"",J(e),n.expanded){const l=this.createChildren(n.children.map(u=>this.createWrapper(u).grp));o.parentNode.appendChild(l)}else o.parentNode.children[1].remove();this.linkDiv(e.closest("me-main > me-wrapper"));const i=e.getBoundingClientRect(),r=this.container.getBoundingClientRect();(i.bottom>r.bottom||i.top<r.top||i.right>r.right||i.left<r.left)&&this.scrollIntoView(e),this.bus.fire("expandNode",n)},expandNodeAll:function(e,t){const n=e.nodeObj,o=(s,i)=>{s.expanded=i,s.children&&s.children.forEach(r=>{o(r,i)})};typeof t=="boolean"?o(n,t):n.expanded!==!1?o(n,!1):o(n,!0),this.refresh()},focusNode:function(e){e.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=e.nodeObj,this.initRight(),this.toCenter())},getData:Tn,getDataString:_n,initLeft:function(){this.direction=0,this.refresh(),this.toCenter()},initRight:function(){this.direction=1,this.refresh(),this.toCenter()},initSide:function(){this.direction=2,this.refresh(),this.toCenter()},install:function(e){e(this)},move:Dn,refresh:function(e){e&&(e=JSON.parse(JSON.stringify(e)),this.nodeData=e.nodeData,this.arrows=e.arrows||[],this.summaries=e.summaries||[]),j(this.nodeData),this.layout(),this.linkDiv()},scale:Ln,scaleFit:An,scrollIntoView:xn,selectNode:En,selectNodes:Sn,setLocale:function(e){this.locale=e,this.refresh()},toCenter:function(){const{map:e}=this,{dx:t,dy:n}=tt(this);e.style.transform=`translate(${t}px, ${n}px) scale(${this.scaleVal})`},unselectNodes:Cn},Symbol.toStringTag,{value:"Module"})),nt={create:function(e){return{dom:e,moved:!1,mousedown:!1,handleMouseMove(t){this.mousedown&&(this.moved=!0,this.cb&&this.cb(t.movementX,t.movementY))},handleMouseDown(t){t.button===0&&(this.mousedown=!0)},handleClear(t){this.mousedown=!1},cb:null,init(t,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.destroy=pe([{dom:t,evt:"mousemove",func:this.handleMouseMove},{dom:t,evt:"mouseleave",func:this.handleClear},{dom:t,evt:"mouseup",func:this.handleClear},{dom:this.dom,evt:"mousedown",func:this.handleMouseDown}])},destroy:null,clear(){this.moved=!1,this.mousedown=!1}}}};function ot(e,t,n,o,s,i,r,c){return{x:e/8+n*3/8+s*3/8+r/8,y:t/8+o*3/8+i*3/8+c/8}}function jn(e,t,n){N(e,{x:t+"",y:n+""})}function ce(e,t,n,o,s){N(e,{x1:t+"",y1:n+"",x2:o+"",y2:s+""})}function st(e,t,n,o,s,i,r,c,l,u){e.line.setAttribute("d",`M ${t} ${n} C ${o} ${s} ${i} ${r} ${c} ${l}`);const d=ne(i,r,c,l);if(d&&e.arrow1.setAttribute("d",`M ${d.x1} ${d.y1} L ${c} ${l} L ${d.x2} ${d.y2}`),u.bidirectional){const v=ne(o,s,t,n);v&&e.arrow2.setAttribute("d",`M ${v.x1} ${v.y1} L ${t} ${n} L ${v.x2} ${v.y2}`)}const{x:h,y:g}=ot(t,n,o,s,i,r,c,l);jn(e.label,h,g),Vn(e)}function le(e,t,n){const{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=t.offsetWidth,r=t.offsetHeight,c=o+i/2,l=s+r/2,u=c+n.x,d=l+n.y;return{w:i,h:r,cx:c,cy:l,ctrlX:u,ctrlY:d}}function U(e){let t,n;const o=(e.cy-e.ctrlY)/(e.ctrlX-e.cx);return o>e.h/e.w||o<-e.h/e.w?e.cy-e.ctrlY<0?(t=e.cx-e.h/2/o,n=e.cy+e.h/2):(t=e.cx+e.h/2/o,n=e.cy-e.h/2):e.cx-e.ctrlX<0?(t=e.cx+e.w/2,n=e.cy-e.w*o/2):(t=e.cx-e.w/2,n=e.cy+e.w*o/2),{x:t,y:n}}const $n=function(e,t,n,o){const s=document.createElementNS(k,"text");return N(s,{"text-anchor":"middle",x:t+"",y:n+"",fill:o||"#666"}),s.dataset.type="custom-link",s.innerHTML=e,s},xe=function(e,t,n,o,s){if(!t||!n)return;const i=le(e,t,o.delta1),r=le(e,n,o.delta2),{x:c,y:l}=U(i),{ctrlX:u,ctrlY:d}=i,{ctrlX:h,ctrlY:g}=r,{x:v,y:p}=U(r),a=ne(h,g,v,p);if(!a)return;const f=`M ${a.x1} ${a.y1} L ${v} ${p} L ${a.x2} ${a.y2}`;let m="";if(o.bidirectional){const w=ne(u,d,c,l);if(!w)return;m=`M ${w.x1} ${w.y1} L ${c} ${l} L ${w.x2} ${w.y2}`}const y=Mt(`M ${c} ${l} C ${u} ${d} ${h} ${g} ${v} ${p}`,f,m),{x:b,y:x}=ot(c,l,u,d,h,g,v,p),E=$n(o.label,b,x,e.theme.cssVar["--color"]);y.appendChild(E),y.label=E,y.arrowObj=o,y.dataset.linkid=o.id,e.linkSvgGroup.appendChild(y),s||(e.arrows.push(o),e.currentArrow=y,it(e,o,i,r))},Pn=function(e,t,n={}){const o={id:R(),label:"Custom Link",from:e.nodeObj.id,to:t.nodeObj.id,delta1:{x:e.offsetWidth/2+100,y:0},delta2:{x:t.offsetWidth/2+100,y:0},...n};xe(this,e,t,o),this.bus.fire("operation",{name:"createArrow",obj:o})},Hn=function(e){const t={...e,id:R()};xe(this,this.findEle(t.from),this.findEle(t.to),t),this.bus.fire("operation",{name:"createArrow",obj:t})},Bn=function(e){let t;if(e?t=e:t=this.currentArrow,!t)return;Se(this);const n=t.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),t.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},Rn=function(e){this.currentArrow=e;const t=e.arrowObj,n=this.findEle(t.from),o=this.findEle(t.to),s=le(this,n,t.delta1),i=le(this,o,t.delta2);it(this,t,s,i)},Fn=function(){Se(this),this.currentArrow=null},Ee=function(e,t){const n=document.createElementNS(k,"path");return N(n,{d:e,stroke:t,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},In=function(e,t){const n=document.createElementNS(k,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=Ee(e.line.getAttribute("d"),t);n.appendChild(o);const s=Ee(e.arrow1.getAttribute("d"),t);if(n.appendChild(s),e.arrow2.getAttribute("d")){const i=Ee(e.arrow2.getAttribute("d"),t);n.appendChild(i)}e.insertBefore(n,e.firstChild)},Wn=function(e){const t=e.querySelector(".arrow-highlight");t&&t.remove()},Vn=function(e){const t=e.querySelector(".arrow-highlight");if(!t)return;const n=t.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",e.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",e.arrow1.getAttribute("d")),n.length>=3&&e.arrow2.getAttribute("d")&&n[2].setAttribute("d",e.arrow2.getAttribute("d"))},Se=function(e){var t,n;(t=e.helper1)==null||t.destroy(),(n=e.helper2)==null||n.destroy(),e.linkController.style.display="none",e.P2.style.display="none",e.P3.style.display="none",e.currentArrow&&Wn(e.currentArrow)},it=function(e,t,n,o){const{linkController:s,P2:i,P3:r,line1:c,line2:l,nodes:u,map:d,currentArrow:h,bus:g}=e;if(!h)return;s.style.display="initial",i.style.display="initial",r.style.display="initial",u.appendChild(s),u.appendChild(i),u.appendChild(r),In(h,"#4dc4ff");let{x:p,y:a}=U(n),{ctrlX:f,ctrlY:m}=n,{ctrlX:y,ctrlY:b}=o,{x,y:E}=U(o);i.style.cssText=`top:${m}px;left:${f}px;`,r.style.cssText=`top:${b}px;left:${y}px;`,ce(c,p,a,f,m),ce(l,y,b,x,E),e.helper1=nt.create(i),e.helper2=nt.create(r),e.helper1.init(d,(w,S)=>{f=f+w/e.scaleVal,m=m+S/e.scaleVal;const C=U({...n,ctrlX:f,ctrlY:m});p=C.x,a=C.y,i.style.top=m+"px",i.style.left=f+"px",st(h,p,a,f,m,y,b,x,E,t),ce(c,p,a,f,m),t.delta1.x=f-n.cx,t.delta1.y=m-n.cy,g.fire("updateArrowDelta",t)}),e.helper2.init(d,(w,S)=>{y=y+w/e.scaleVal,b=b+S/e.scaleVal;const C=U({...o,ctrlX:y,ctrlY:b});x=C.x,E=C.y,r.style.top=b+"px",r.style.left=y+"px",st(h,p,a,f,m,y,b,x,E,t),ce(l,y,b,x,E),t.delta2.x=y-o.cx,t.delta2.y=b-o.cy,g.fire("updateArrowDelta",t)})};function Yn(){this.linkSvgGroup.innerHTML="";for(let e=0;e<this.arrows.length;e++){const t=this.arrows[e];try{xe(this,this.findEle(t.from),this.findEle(t.to),t,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function Gn(e){if(Se(this),!e)return;const t=e.label;$e(this,t,e.arrowObj)}function Kn(){this.arrows=this.arrows.filter(e=>te(e.from,this.nodeData)&&te(e.to,this.nodeData))}const qn=Object.freeze(Object.defineProperty({__proto__:null,createArrow:Pn,createArrowFrom:Hn,editArrowLabel:Gn,removeArrow:Bn,renderArrow:Yn,selectArrow:Rn,tidyArrow:Kn,unselectArrow:Fn},Symbol.toStringTag,{value:"Module"})),zn=function(e){var l,u;if(e.length===0)throw new Error("No selected node.");if(e.length===1){const d=e[0].nodeObj,h=e[0].nodeObj.parent;if(!h)throw new Error("Can not select root node.");const g=h.children.findIndex(v=>d===v);return{parent:h.id,start:g,end:g}}let t=0;const n=e.map(d=>{let h=d.nodeObj;const g=[];for(;h.parent;){const v=h.parent,p=v.children,a=p==null?void 0:p.indexOf(h);h=v,g.unshift({node:h,index:a})}return g.length>t&&(t=g.length),g});let o=0;e:for(;o<t;o++){const d=(l=n[0][o])==null?void 0:l.node;for(let h=1;h<n.length;h++)if(((u=n[h][o])==null?void 0:u.node)!==d)break e}if(!o)throw new Error("Can not select root node.");const s=n.map(d=>d[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}},Un=function(e){const t=document.createElementNS(k,"g");return t.setAttribute("id",e),t},rt=function(e,t){const n=document.createElementNS(k,"path");return N(n,{d:e,stroke:t||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},ct=function(e,t,n,o,s){const i=document.createElementNS(k,"text");return N(i,{"text-anchor":o,x:t+"",y:n+"",fill:s||"#666"}),i.innerHTML=e,i},Xn=e=>e.parentElement.parentElement,Jn=function(e,{parent:t,start:n}){const o=e.findEle(t),s=o.nodeObj;let i;return s.parent?i=o.closest("me-main").className:i=e.findEle(s.children[n].id).closest("me-main").className,i},Ce=function(e,t){var C;const{id:n,label:o,parent:s,start:i,end:r}=t,{nodes:c,theme:l,summarySvg:u}=e,h=e.findEle(s).nodeObj,g=Jn(e,t);let v=1/0,p=0,a=0,f=0;for(let _=i;_<=r;_++){const B=(C=h.children)==null?void 0:C[_];if(!B)return e.removeSummary(n),null;const V=Xn(e.findEle(B.id)),{offsetLeft:Y,offsetTop:dt}=$(c,V),ht=i===r?10:20;_===i&&(a=dt+ht),_===r&&(f=dt+V.offsetHeight-ht),Y<v&&(v=Y),V.offsetWidth+Y>p&&(p=V.offsetWidth+Y)}let m,y;const b=a+10,x=f+10,E=(b+x)/2,w=l.cssVar["--color"];g===T.LHS?(m=rt(`M ${v+10} ${b} c -5 0 -10 5 -10 10 L ${v} ${x-10} c 0 5 5 10 10 10 M ${v} ${E} h -10`,w),y=ct(o,v-20,E+6,"end",w)):(m=rt(`M ${p-10} ${b} c 5 0 10 5 10 10 L ${p} ${x-10} c 0 5 -5 10 -10 10 M ${p} ${E} h 10`,w),y=ct(o,p+20,E+6,"start",w));const S=Un("s-"+n);return S.appendChild(m),S.appendChild(y),S.summaryObj=t,u.appendChild(S),S},Zn=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(){if(!this.currentNodes)return;const{currentNodes:e,summaries:t,bus:n}=this,{parent:o,start:s,end:i}=zn(e),r={id:R(),parent:o,start:s,end:i,label:"summary"},c=Ce(this,r);t.push(r),this.editSummary(c),n.fire("operation",{name:"createSummary",obj:r})},createSummaryFrom:function(e){const t=R(),n={...e,id:t};Ce(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(e){if(!e)return;const t=e.childNodes[1];$e(this,t,e.summaryObj)},removeSummary:function(e){var n;const t=this.summaries.findIndex(o=>o.id===e);t>-1&&(this.summaries.splice(t,1),(n=document.querySelector("#s-"+e))==null||n.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:e}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(e=>{try{Ce(this,e)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(e){const t=e.children[1].getBBox(),n=6,o=3,s=document.createElementNS(k,"rect");N(s,{x:t.x-n+"",y:t.y-n+"",width:t.width+n*2+"",height:t.height+n*2+"",rx:o+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),e.appendChild(s),this.currentSummary=e},unselectSummary:function(){var e,t;(t=(e=this.currentSummary)==null?void 0:e.querySelector("rect"))==null||t.remove(),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),M="http://www.w3.org/2000/svg";function Qn(e,t){const n=document.createElementNS(M,"svg");return N(n,{version:"1.1",xmlns:M,height:e,width:t}),n}function eo(e,t){return(parseInt(e)-parseInt(t))/2}function to(e,t,n,o){const s=document.createElementNS(M,"g");let i="";return e.text?i=e.text.textContent:i=e.childNodes[0].textContent,i.split(`
|
|
15
|
+
`).forEach((c,l)=>{const u=document.createElementNS(M,"text");N(u,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+eo(t.lineHeight,t.fontSize)*(l+1)+parseFloat(t.fontSize)*(l+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),u.innerHTML=c,s.appendChild(u)}),s}function no(e,t,n,o){var c;let s="";(c=e.nodeObj)!=null&&c.dangerouslySetInnerHTML?s=e.nodeObj.dangerouslySetInnerHTML:e.text?s=e.text.textContent:s=e.childNodes[0].textContent;const i=document.createElementNS(M,"foreignObject");N(i,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const r=document.createElement("div");return N(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`}),r.innerHTML=s,i.appendChild(r),i}function oo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(M,"rect");return N(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 ae(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:s,offsetTop:i}=$(e.nodes,t),r=document.createElementNS(M,"rect");N(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(M,"g");c.appendChild(r);let l;return n?l=no(t,o,s,i):l=to(t,o,s,i),c.appendChild(l),c}function so(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(M,"a"),r=document.createElementNS(M,"text");return N(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=t.textContent,i.appendChild(r),i.setAttribute("href",t.href),i}function io(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(M,"image");return N(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:t.src}),i}const de=100,ro='<?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">',co=(e,t=!1)=>{var h,g,v;const n=e.nodes,o=n.offsetHeight+de*2,s=n.offsetWidth+de*2,i=Qn(o+"px",s+"px"),r=document.createElementNS(M,"svg"),c=document.createElementNS(M,"rect");N(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:e.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(p=>{const a=p.cloneNode(!0),{offsetLeft:f,offsetTop:m}=$(n,p.parentElement);a.setAttribute("x",`${f}`),a.setAttribute("y",`${m}`),r.appendChild(a)});const l=(h=n.querySelector(".lines"))==null?void 0:h.cloneNode(!0);l&&r.appendChild(l);const u=(g=n.querySelector(".topiclinks"))==null?void 0:g.cloneNode(!0);u&&r.appendChild(u);const d=(v=n.querySelector(".summary"))==null?void 0:v.cloneNode(!0);return d&&r.appendChild(d),n.querySelectorAll("me-tpc").forEach(p=>{p.nodeObj.dangerouslySetInnerHTML?r.appendChild(ae(e,p,!t)):(r.appendChild(oo(e,p)),r.appendChild(ae(e,p.text,!t)))}),n.querySelectorAll(".tags > span").forEach(p=>{r.appendChild(ae(e,p))}),n.querySelectorAll(".icons > span").forEach(p=>{r.appendChild(ae(e,p))}),n.querySelectorAll(".hyper-link").forEach(p=>{r.appendChild(so(e,p))}),n.querySelectorAll("img").forEach(p=>{r.appendChild(io(e,p))}),N(r,{x:de+"",y:de+"",overflow:"visible"}),i.appendChild(r),i},lo=(e,t)=>(t&&e.insertAdjacentHTML("afterbegin","<style>"+t+"</style>"),ro+e.outerHTML);function ao(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=s=>{t(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(e)})}const ho=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(e=!1,t){const n=this.exportSvg(e,t),o=await ao(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(e=!1,t){const n=co(this,e),o=lo(n,t);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function uo(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const lt=Object.keys(et),at={};for(let e=0;e<lt.length;e++){const t=lt[e];at[t]=uo(et[t],t)}const fo={getObjById:te,generateNewObj:ut,layout:xt,linkDiv:Lt,editTopic:kt,createWrapper:Ct,createParent:Nt,createChildren:_t,createTopic:Tt,findEle:Ae,changeTheme:nn,...On,...at,...qn,...Zn,...ho,init(e){if(e=JSON.parse(JSON.stringify(e)),!e||!e.nodeData)return new Error("MindElixir: `data` is required");e.direction!==void 0&&(this.direction=e.direction),this.changeTheme(e.theme||this.theme,!1),this.nodeData=e.nodeData,j(this.nodeData),this.arrows=e.arrows||[],this.summaries=e.summaries||[],this.tidyArrow(),this.toolBar&&zt(this),this.keypress&&yt(this,this.keypress),this.editable&&tn(this),this.contextMenu&&this.disposable.push(At(this,this.contextMenu)),this.draggable&&this.disposable.push($t(this)),this.allowUndo&&this.disposable.push(Ht(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){var e;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.waitCopy=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.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,(e=this.selection)==null||e.destroy(),this.selection=void 0}};function po({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:l,containerHeight:u}){let d=t+n/2;const h=e+o/2;let g;l===T.LHS?g=i+r:g=i;const v=s+c/2,a=(1-Math.abs(v-h)/u)*.25*(n/2);return l===T.LHS?d=d-n/10-a:d=d+n/10+a,`M ${d} ${h} Q ${d} ${v} ${g} ${v}`}function mo({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:l,isFirst:u}){const d=parseInt(this.container.style.getPropertyValue("--gap"));let h=0,g=0;u?h=e+o/2:h=e+o;const v=s+c;let p=0,a=0,f=0;const m=Math.abs(h-v)/300*d;return l===T.LHS?(f=t,p=f+d,a=f-d,g=i+d,`M ${p} ${h} C ${f} ${h} ${f+m} ${v} ${a} ${v} H ${g}`):(f=t+n,p=f-d,a=f+d,g=i+r-d,`M ${p} ${h} C ${f} ${h} ${f-m} ${v} ${a} ${v} H ${g}`)}const go="5.0.0-beta.40";function vo(e){return{x:0,y:0,moved:!1,mousedown:!1,onMove(t){if(this.mousedown){this.moved=!0;const n=t.movementX,o=t.movementY;e.move(n,o)}},clear(){this.mousedown=!1,e.map.style.transition="transform 0.3s"}}}const Z=document;function D({el:e,direction:t,locale:n,draggable:o,editable:s,contextMenu:i,toolBar:r,keypress:c,mouseSelectionButton:l,selectionContainer:u,before:d,newTopicName:h,allowUndo:g,generateMainBranch:v,generateSubBranch:p,overflowHidden:a,theme:f,alignment:m,scaleSensitivity:y}){let b=null;const x=Object.prototype.toString.call(e);if(x==="[object HTMLDivElement]"?b=e:x==="[object String]"&&(b=document.querySelector(e)),!b)throw new Error("MindElixir: el is not a valid element");b.style.position="relative",b.innerHTML="",this.el=b,this.disposable=[],this.before=d||{},this.locale=n||"en",this.contextMenu=i===void 0?!0:i,this.toolBar=r===void 0?!0:r,this.keypress=c===void 0?!0:c,this.mouseSelectionButton=l||0,this.direction=typeof t=="number"?t:1,this.draggable=o===void 0?!0:o,this.newTopicName=h||"new node",this.editable=s===void 0?!0:s,this.allowUndo=g===void 0?!1:g,this.scaleSensitivity=typeof y=="number"?y:.2,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.generateMainBranch=v||po,this.generateSubBranch=p||mo,this.overflowHidden=a||!1,this.dragMoveHelper=vo(this),this.bus=wt(),this.container=Z.createElement("div"),this.selectionContainer=u||this.container,this.container.className="map-container";const E=window.matchMedia("(prefers-color-scheme: dark)");this.theme=f||(E.matches?_e:Ne);const w=Z.createElement("div");w.className="map-canvas",setTimeout(()=>{w.style.transition="all 0.3s"},300),this.map=w,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=Z.createElement("me-nodes"),this.lines=X("lines"),this.summarySvg=X("summary"),this.linkController=X("linkcontroller"),this.P2=Z.createElement("div"),this.P3=Z.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.linkSvgGroup=X("topiclinks"),this.alignment=m??"root",this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(bt(this))}return D.prototype=fo,Object.defineProperty(D.prototype,"currentNode",{get(){return this.currentNodes.at(-1)},enumerable:!0}),D.LEFT=0,D.RIGHT=1,D.SIDE=2,D.THEME=Ne,D.DARK_THEME=_e,D.version=go,D.E=Ae,D.new=e=>({nodeData:{id:R(),topic:e||"new topic",children:[]}}),D}();
|
package/dist/MindElixir.js
CHANGED
|
@@ -1466,8 +1466,9 @@ function en(e) {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
}).on("beforestart", ({ event: o }) => {
|
|
1469
|
+
var r;
|
|
1469
1470
|
const s = o.target;
|
|
1470
|
-
if (s.id === "input-box" || s.className === "circle" ||
|
|
1471
|
+
if (s.id === "input-box" || s.className === "circle" || (r = e.container.querySelector(".context-menu")) != null && r.contains(s))
|
|
1471
1472
|
return !1;
|
|
1472
1473
|
if (!o.ctrlKey && !o.metaKey) {
|
|
1473
1474
|
if (s.tagName === "ME-TPC" && s.classList.contains("selected"))
|
|
@@ -1844,11 +1845,11 @@ const Sn = function(e) {
|
|
|
1844
1845
|
}, Rn = function() {
|
|
1845
1846
|
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1846
1847
|
}, Fn = function() {
|
|
1847
|
-
this.direction = 0, this.refresh();
|
|
1848
|
+
this.direction = 0, this.refresh(), this.toCenter();
|
|
1848
1849
|
}, In = function() {
|
|
1849
|
-
this.direction = 1, this.refresh();
|
|
1850
|
+
this.direction = 1, this.refresh(), this.toCenter();
|
|
1850
1851
|
}, Wn = function() {
|
|
1851
|
-
this.direction = 2, this.refresh();
|
|
1852
|
+
this.direction = 2, this.refresh(), this.toCenter();
|
|
1852
1853
|
}, Vn = function(e) {
|
|
1853
1854
|
this.locale = e, this.refresh();
|
|
1854
1855
|
}, Yn = function(e, t) {
|
|
@@ -2484,7 +2485,7 @@ function Ro({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction:
|
|
|
2484
2485
|
const m = Math.abs(h - v) / 300 * d;
|
|
2485
2486
|
return l === T.LHS ? (f = t, p = f + d, a = f - d, g = i + d, `M ${p} ${h} C ${f} ${h} ${f + m} ${v} ${a} ${v} H ${g}`) : (f = t + n, p = f - d, a = f + d, g = i + r - d, `M ${p} ${h} C ${f} ${h} ${f - m} ${v} ${a} ${v} H ${g}`);
|
|
2486
2487
|
}
|
|
2487
|
-
const Fo = "5.0.0-beta.
|
|
2488
|
+
const Fo = "5.0.0-beta.40";
|
|
2488
2489
|
function Io(e) {
|
|
2489
2490
|
return {
|
|
2490
2491
|
x: 0,
|
|
@@ -2536,7 +2537,7 @@ function D({
|
|
|
2536
2537
|
const w = z.createElement("div");
|
|
2537
2538
|
w.className = "map-canvas", setTimeout(() => {
|
|
2538
2539
|
w.style.transition = "all 0.3s";
|
|
2539
|
-
}, 300), this.map = w, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = z.createElement("me-nodes"), this.
|
|
2540
|
+
}, 300), this.map = w, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = z.createElement("me-nodes"), this.lines = U("lines"), this.summarySvg = U("summary"), this.linkController = U("linkcontroller"), this.P2 = z.createElement("div"), this.P3 = z.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Te(), this.line2 = Te(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = U("topiclinks"), this.alignment = m ?? "root", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(bt(this));
|
|
2540
2541
|
}
|
|
2541
2542
|
D.prototype = Ho;
|
|
2542
2543
|
Object.defineProperty(D.prototype, "currentNode", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var MindElixirLite=function(){"use strict";const Xe="",Z={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--gap":"30px","--main-color":"#444446","--main-bgcolor":"#ffffff","--color":"#777777","--bgcolor":"#f6f6f6","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea"}},tt={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--color":"#cccccc","--bgcolor":"#252526","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969"}};function et(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""")}const G=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=G(t,e.children[n]);if(o)return o}return null}else return null},_=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)_(t.children[n],t)};function F(t,e,n,o){const s=o-e,i=t-n;let r=Math.atan(Math.abs(s)/Math.abs(i))/3.14*180;if(isNaN(r))return;i<0&&s>0&&(r=180-r),i<0&&s<0&&(r=180+r),i>0&&s<0&&(r=360-r);const c=12,a=30,u=r+a,h=r-a;return{x1:n+Math.cos(Math.PI*u/180)*c,y1:o-Math.sin(Math.PI*u/180)*c,x2:n+Math.cos(Math.PI*h/180)*c,y2:o-Math.sin(Math.PI*h/180)*c}}function B(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const St=function(){const t=B();return{topic:this.newTopicName,id:t}},
|
|
1
|
+
var MindElixirLite=function(){"use strict";const Xe="",Z={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--gap":"30px","--main-color":"#444446","--main-bgcolor":"#ffffff","--color":"#777777","--bgcolor":"#f6f6f6","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea"}},tt={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--color":"#cccccc","--bgcolor":"#252526","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969"}};function et(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""")}const G=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=G(t,e.children[n]);if(o)return o}return null}else return null},_=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)_(t.children[n],t)};function F(t,e,n,o){const s=o-e,i=t-n;let r=Math.atan(Math.abs(s)/Math.abs(i))/3.14*180;if(isNaN(r))return;i<0&&s>0&&(r=180-r),i<0&&s<0&&(r=180+r),i>0&&s<0&&(r=360-r);const c=12,a=30,u=r+a,h=r-a;return{x1:n+Math.cos(Math.PI*u/180)*c,y1:o-Math.sin(Math.PI*u/180)*c,x2:n+Math.cos(Math.PI*h/180)*c,y2:o-Math.sin(Math.PI*h/180)*c}}function B(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const St=function(){const t=B();return{topic:this.newTopicName,id:t}},N=(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}},C=(t,e)=>{for(const n in e)t.setAttribute(n,e[n])},nt=t=>t?t.tagName==="ME-TPC":!1,ot=t=>{const e=/translate\(([^,]+),\s*([^)]+)\)/,n=t.match(e);return n?{x:parseFloat(n[1]),y:parseFloat(n[2])}:{x:0,y:0}},st=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)}}};var M=(t=>(t.LHS="lhs",t.RHS="rhs",t))(M||{});const it=function(t,e,n){const{scaleVal:o,scaleSensitivity:s}=t;switch(e){case"in":if(o>1.6)return;t.scale(o+s,n);break;case"out":if(o<.6)return;t.scale(o-s,n)}},rt=t=>typeof TouchEvent<"u"&&t instanceof TouchEvent;function Tt(t){const{dragMoveHelper:e}=t;let n=0,o=0;const s=l=>{var v,y,x;if(rt(l)||l.button!==0)return;if((v=t.helper1)!=null&&v.moved){t.helper1.clear();return}if((y=t.helper2)!=null&&y.moved){t.helper2.clear();return}if(e.moved){e.clear();return}const d=l.target;if(d.tagName==="ME-EPD")l.ctrlKey||l.metaKey?t.expandNodeAll(d.previousSibling):t.expandNode(d.previousSibling);else if(d.tagName==="ME-TPC"&&t.currentNodes.length>1)t.selectNode(d);else if(!t.editable)return;const w=(x=d.parentElement)==null?void 0:x.parentElement;w.getAttribute("class")==="topiclinks"?t.selectArrow(d.parentElement):w.getAttribute("class")==="summary"&&t.selectSummary(d.parentElement)},i=l=>{var v;if(!t.editable)return;const d=l.target;nt(d)&&t.beginEdit(d);const w=(v=d.parentElement)==null?void 0:v.parentElement;w.getAttribute("class")==="topiclinks"?t.editArrowLabel(d.parentElement):w.getAttribute("class")==="summary"&&t.editSummary(d.parentElement)};let r=0;const c=l=>{const d=new Date().getTime(),w=d-r;w<300&&w>0&&i(l),r=d},a=l=>{var d,w;if(e.moved=!1,l instanceof MouseEvent){const v=t.mouseSelectionButton===0?2:0;if(l.button!==v)return}else n=((d=l.touches[0])==null?void 0:d.clientX)||0,o=((w=l.touches[0])==null?void 0:w.clientY)||0;l.target.contentEditable==="inherit"&&(e.mousedown=!0,t.map.style.transition="none")},u=l=>{var d,w,v,y;if(l.target.contentEditable==="inherit")if(l instanceof MouseEvent)e.onMove(l),e.x=l.clientX,e.y=l.clientY;else{const x=((d=l.touches[0])==null?void 0:d.clientX)||0,b=((w=l.touches[0])==null?void 0:w.clientY)||0,E=x-n,$=b-o,D={clientX:x,clientY:b,movementX:E,movementY:$,target:l.target};e.onMove(D),e.x=x,e.y=b,n=x,o=b}else if(l instanceof MouseEvent)e.x=l.clientX,e.y=l.clientY;else{const x=((v=l.touches[0])==null?void 0:v.clientX)||0,b=((y=l.touches[0])==null?void 0:y.clientY)||0;e.x=x,e.y=b,n=x,o=b}},h=l=>{if(l instanceof MouseEvent){const d=t.mouseSelectionButton===0?2:0;if(l.button!==d)return}e.clear()},m=l=>{if(l.preventDefault(),rt(l)||!t.editable)return;const d=l.target;nt(d)&&!d.classList.contains("selected")&&t.selectNode(d),setTimeout(()=>{t.dragMoveHelper.moved||t.bus.fire("showContextMenu",l)},200)},g=l=>{l.stopPropagation(),l.preventDefault(),l.ctrlKey||l.metaKey?l.deltaY<0?it(t,"in",t.dragMoveHelper):t.scaleVal-t.scaleSensitivity>0&&it(t,"out",t.dragMoveHelper):l.shiftKey?t.move(-l.deltaY,0):(t.map.style.transition="none",t.move(-l.deltaX,-l.deltaY),t.map.style.transition="transform 0.3s")},{container:p}=t;return st([{dom:p,evt:"click",func:s},{dom:p,evt:"dblclick",func:i},{dom:p,evt:"mousedown",func:a},{dom:document,evt:"mousemove",func:u},{dom:document,evt:"mouseup",func:h},{dom:p,evt:"contextmenu",func:m},{dom:p,evt:"touchstart",func:a},{dom:document,evt:"touchmove",func:u},{dom:document,evt:"touchend",func:h},{dom:p,evt:"touchend",func:c},{dom:p,evt:"wheel",func:g}])}function Lt(){return{handlers:{},addListener:function(t,e){this.handlers[t]===void 0&&(this.handlers[t]=[]),this.handlers[t].push(e)},fire:function(t,...e){if(this.handlers[t]instanceof Array){const n=this.handlers[t];for(let o=0;o<n.length;o++)n[o](...e)}},removeListener:function(t,e){if(!this.handlers[t])return;const n=this.handlers[t];if(!e)n.length=0;else if(n.length)for(let o=0;o<n.length;o++)n[o]===e&&this.handlers[t].splice(o,1)}}}const j=document,$t=function(){this.nodes.innerHTML="";const t=this.createTopic(this.nodeData);lt(t,this.nodeData),t.draggable=!1;const e=j.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)})}Mt(this,n,e)},Mt=function(t,e,n){const o=j.createElement("me-main");o.className=M.LHS;const s=j.createElement("me-main");s.className=M.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)},kt=function(t,e){const n=j.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},L=document,ct=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},lt=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=L.createElement("img");o.src=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=L.createElement("span");n.className="text",n.textContent=e.topic,t.appendChild(n),t.text=n}if(e.hyperLink){const n=L.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=L.createElement("span");n.className="icons",n.innerHTML=e.icons.map(o=>`<span>${et(o)}</span>`).join(""),t.appendChild(n),t.icons=n}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const n=L.createElement("div");n.className="tags",n.innerHTML=e.tags.map(o=>`<span>${et(o)}</span>`).join(""),t.appendChild(n),t.tags=n}else t.tags&&(t.tags=void 0)},Dt=function(t,e){const n=L.createElement("me-wrapper"),{p:o,tpc:s}=this.createParent(t);if(n.appendChild(o),!e&&t.children&&t.children.length>0){const i=Bt(t.expanded);if(o.appendChild(i),t.expanded!==!1){const r=kt(this,t.children);n.appendChild(r)}}return{grp:n,top:o,tpc:s}},Nt=function(t){const e=L.createElement("me-parent"),n=this.createTopic(t);return lt(n,t),e.appendChild(n),{p:e,tpc:n}},At=function(t){const e=L.createElement("me-children");return e.append(...t),e},Ht=function(t){const e=L.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function at(t){const e=L.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}const Pt=function(t){if(!t)return;const e=L.createElement("div"),n=t.text.textContent;t.appendChild(e),e.id="input-box",e.textContent=n,e.contentEditable="plaintext-only",e.spellcheck=!1;const o=getComputedStyle(t);e.style.cssText=`min-width:${t.offsetWidth-8}px;
|
|
2
2
|
color:${o.color};
|
|
3
3
|
padding:${o.padding};
|
|
4
4
|
margin:${o.margin};
|
|
@@ -11,5 +11,5 @@ var MindElixirLite=function(){"use strict";const Xe="",Z={name:"Latte",type:"lig
|
|
|
11
11
|
top:${i.y}px;
|
|
12
12
|
padding: 2px 4px;
|
|
13
13
|
margin: -2px -4px;
|
|
14
|
-
`,at(o),t.scrollIntoView(o),o.addEventListener("keydown",r=>{r.stopPropagation();const c=r.key;if(c==="Enter"||c==="Tab"){if(r.shiftKey)return;r.preventDefault(),o.blur(),t.container.focus()}}),o.addEventListener("blur",()=>{var c;if(!o)return;const r=((c=o.textContent)==null?void 0:c.trim())||"";r===""?n.label=s:n.label=r,o.remove(),r!==s&&(e.innerHTML=n.label,t.linkDiv(),"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Vt=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 a=r[c],u=a.querySelector("me-tpc"),{offsetLeft:h,offsetTop:m}=D(this.nodes,u),g=u.offsetWidth,p=u.offsetHeight,f=a.parentNode.className,l=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:m,cL:h,cW:g,cH:p,direction:f,containerHeight:this.nodes.offsetHeight}),d=this.theme.palette,w=u.nodeObj.branchColor||d[c%d.length];u.style.borderColor=w,this.lines.appendChild(ht(l,w,"3"));const v=a.children[0].children[1];if(v&&(v.style.top=(v.parentNode.offsetHeight-v.offsetHeight)/2+"px",f===M.LHS?v.style.left="-10px":v.style.right="-10px"),t&&t!==a)continue;const y=O("subLines"),x=a.lastChild;x.tagName==="svg"&&x.remove(),a.appendChild(y),ut(this,y,w,a,f,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},ut=function(t,e,n,o,s,i){const r=o.firstChild,c=o.children[1].children;if(c.length===0)return;const a=r.offsetTop,u=r.offsetLeft,h=r.offsetWidth,m=r.offsetHeight;for(let g=0;g<c.length;g++){const p=c[g],f=p.firstChild,l=f.offsetTop,d=f.offsetLeft,w=f.offsetWidth,v=f.offsetHeight,y=f.firstChild.nodeObj.branchColor||n,x=t.generateSubBranch({pT:a,pL:u,pW:h,pH:m,cT:l,cL:d,cW:w,cH:v,direction:s,isFirst:i});e.appendChild(ht(x,y,"2"));const b=f.children[1];if(b){if(b.style.bottom=-(b.offsetHeight/2)+"px",s===M.LHS?b.style.left="10px":s===M.RHS&&(b.style.right="10px"),!b.expanded)continue}else continue;ut(t,e,y,p,s)}},Ke="",It='<?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>',Gt='<?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>',Ft='<?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>',jt='<?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>',Wt='<?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>',Yt='<?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>',zt='<?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>',Je="",Rt={side:It,left:Gt,right:Ft,full:jt,living:Wt,zoomin:Yt,zoomout:zt},H=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=Rt[e],n};function Xt(t){const e=document.createElement("div"),n=H("fullscreen","full"),o=H("toCenter","living"),s=H("zoomout","zoomout"),i=H("zoomin","zoomin"),r=document.createElement("span");return r.innerText="100%",e.appendChild(n),e.appendChild(o),e.appendChild(s),e.appendChild(i),e.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===t.el?document.exitFullscreen():t.el.requestFullscreen()},o.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scaleVal<.6||t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scaleVal>1.6||t.scale(t.scaleVal+t.scaleSensitivity)},e}function qt(t){const e=document.createElement("div"),n=H("tbltl","left"),o=H("tbltr","right"),s=H("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 _t(t){t.container.append(Xt(t)),t.container.append(qt(t))}const Ut=function(t,e=!0){this.theme=t;const n=this.theme.cssVar,o=Object.keys(n);this.container.style.cssText="";for(let s=0;s<o.length;s++){const i=o[s];this.container.style.setProperty(i,n[i])}t.cssVar["--gap"]||this.container.style.setProperty("--gap","30px"),e&&this.refresh()},Kt=function(t){const n=t.parentElement.parentElement.lastElementChild;(n==null?void 0:n.tagName)==="svg"&&(n==null||n.remove())};function Jt(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const Qt=function(t){const e=this.container,n=t.getBoundingClientRect(),o=e.getBoundingClientRect();if(n.top>o.bottom||n.bottom<o.top||n.left>o.right||n.right<o.left){const i=n.left+n.width/2,r=n.top+n.height/2,c=o.left+o.width/2,a=o.top+o.height/2,u=i-c,h=r-a;this.move(-u,-h)}},Zt=function(t,e,n){this.clearSelection(),this.scrollIntoView(t),this.selection.select(t),e&&this.bus.fire("selectNewNode",t.nodeObj)},te=function(t){this.selection.select(t)},ee=function(t){this.selection.deselect(t)},ne=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},oe=function(){const t=Jt(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},se=function(){return JSON.parse(this.getDataString())},ie=function(){this.editable=!0},re=function(){this.editable=!1},ce=function(t,e={x:0,y:0}){const n=this.container.getBoundingClientRect(),o=e.x?e.x-n.left-n.width/2:0,s=e.y?e.y-n.top-n.height/2:0,{dx:i,dy:r}=pt(this),c=this.map.style.transform,{x:a,y:u}=ot(c),h=a-i,m=u-r,g=this.scaleVal,p=(-o+h)*(1-t/g),f=(-s+m)*(1-t/g);this.map.style.transform=`translate(${a-p}px, ${u-f}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},le=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,n=1/Math.max(1,Math.max(t,e));this.scaleVal=n,this.map.style.transform="scale("+n+")",this.bus.fire("scale",n)},ae=function(t,e){const{map:n,scaleVal:o,bus:s}=this,i=n.style.transform;let{x:r,y:c}=ot(i);r+=t,c+=e,n.style.transform=`translate(${r}px, ${c}px) scale(${o})`,s.fire("move",{dx:t,dy:e})},pt=t=>{const{container:e,map:n,nodes:o}=t,s=n.querySelector("me-root"),i=s.offsetTop,r=s.offsetLeft,c=s.offsetWidth,a=s.offsetHeight;let u,h;return t.alignment==="root"?(u=e.offsetWidth/2-r-c/2,h=e.offsetHeight/2-i-a/2,n.style.transformOrigin=`${r+c/2}px 50%`):(u=(e.offsetWidth-o.offsetWidth)/2,h=(e.offsetHeight-o.offsetHeight)/2,n.style.transformOrigin="50% 50%"),{dx:u,dy:h}},he=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},clearSelection:ne,disableEdit:re,enableEdit:ie,expandNode:function(t,e){const n=t.nodeObj;typeof e=="boolean"?n.expanded=e:n.expanded!==!1?n.expanded=!1:n.expanded=!0;const o=t.parentNode,s=o.children[1];if(s.expanded=n.expanded,s.className=n.expanded?"minus":"",Kt(t),n.expanded){const a=this.createChildren(n.children.map(u=>this.createWrapper(u).grp));o.parentNode.appendChild(a)}else o.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const i=t.getBoundingClientRect(),r=this.container.getBoundingClientRect();(i.bottom>r.bottom||i.top<r.top||i.right>r.right||i.left<r.left)&&this.scrollIntoView(t),this.bus.fire("expandNode",n)},expandNodeAll:function(t,e){const n=t.nodeObj,o=(s,i)=>{s.expanded=i,s.children&&s.children.forEach(r=>{o(r,i)})};typeof e=="boolean"?o(n,e):n.expanded!==!1?o(n,!1):o(n,!0),this.refresh()},focusNode:function(t){t.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=t.nodeObj,this.initRight(),this.toCenter())},getData:se,getDataString:oe,initLeft:function(){this.direction=0,this.refresh()},initRight:function(){this.direction=1,this.refresh()},initSide:function(){this.direction=2,this.refresh()},install:function(t){t(this)},move:ae,refresh:function(t){t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.arrows=t.arrows||[],this.summaries=t.summaries||[]),_(this.nodeData),this.layout(),this.linkDiv()},scale:ce,scaleFit:le,scrollIntoView:Qt,selectNode:Zt,selectNodes:te,setLocale:function(t){this.locale=t,this.refresh()},toCenter:function(){const{map:t}=this,{dx:e,dy:n}=pt(this);t.style.transform=`translate(${e}px, ${n}px) scale(${this.scaleVal})`},unselectNodes:ee},Symbol.toStringTag,{value:"Module"})),mt={create:function(t){return{dom:t,moved:!1,mousedown:!1,handleMouseMove(e){this.mousedown&&(this.moved=!0,this.cb&&this.cb(e.movementX,e.movementY))},handleMouseDown(e){e.button===0&&(this.mousedown=!0)},handleClear(e){this.mousedown=!1},cb:null,init(e,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.destroy=st([{dom:e,evt:"mousemove",func:this.handleMouseMove},{dom:e,evt:"mouseleave",func:this.handleClear},{dom:e,evt:"mouseup",func:this.handleClear},{dom:this.dom,evt:"mousedown",func:this.handleMouseDown}])},destroy:null,clear(){this.moved=!1,this.mousedown=!1}}}};function gt(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 de(t,e,n){C(t,{x:e+"",y:n+""})}function W(t,e,n,o,s){C(t,{x1:e+"",y1:n+"",x2:o+"",y2:s+""})}function wt(t,e,n,o,s,i,r,c,a,u){t.line.setAttribute("d",`M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${a}`);const h=F(i,r,c,a);if(h&&t.arrow1.setAttribute("d",`M ${h.x1} ${h.y1} L ${c} ${a} L ${h.x2} ${h.y2}`),u.bidirectional){const p=F(o,s,e,n);p&&t.arrow2.setAttribute("d",`M ${p.x1} ${p.y1} L ${e} ${n} L ${p.x2} ${p.y2}`)}const{x:m,y:g}=gt(e,n,o,s,i,r,c,a);de(t.label,m,g),xe(t)}function Y(t,e,n){const{offsetLeft:o,offsetTop:s}=D(t.nodes,e),i=e.offsetWidth,r=e.offsetHeight,c=o+i/2,a=s+r/2,u=c+n.x,h=a+n.y;return{w:i,h:r,cx:c,cy:a,ctrlX:u,ctrlY:h}}function P(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 fe=function(t,e,n,o){const s=document.createElementNS(S,"text");return C(s,{"text-anchor":"middle",x:e+"",y:n+"",fill:o||"#666"}),s.dataset.type="custom-link",s.innerHTML=t,s},U=function(t,e,n,o,s){if(!e||!n)return;const i=Y(t,e,o.delta1),r=Y(t,n,o.delta2),{x:c,y:a}=P(i),{ctrlX:u,ctrlY:h}=i,{ctrlX:m,ctrlY:g}=r,{x:p,y:f}=P(r),l=F(m,g,p,f);if(!l)return;const d=`M ${l.x1} ${l.y1} L ${p} ${f} L ${l.x2} ${l.y2}`;let w="";if(o.bidirectional){const E=F(u,h,c,a);if(!E)return;w=`M ${E.x1} ${E.y1} L ${c} ${a} L ${E.x2} ${E.y2}`}const v=Ot(`M ${c} ${a} C ${u} ${h} ${m} ${g} ${p} ${f}`,d,w),{x:y,y:x}=gt(c,a,u,h,m,g,p,f),b=fe(o.label,y,x,t.theme.cssVar["--color"]);v.appendChild(b),v.label=b,v.arrowObj=o,v.dataset.linkid=o.id,t.linkSvgGroup.appendChild(v),s||(t.arrows.push(o),t.currentArrow=v,vt(t,o,i,r))},ue=function(t,e,n={}){const o={id:B(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:t.offsetWidth/2+100,y:0},delta2:{x:e.offsetWidth/2+100,y:0},...n};U(this,t,e,o),this.bus.fire("operation",{name:"createArrow",obj:o})},pe=function(t){const e={...t,id:B()};U(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},me=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;J(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},ge=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),o=this.findEle(e.to),s=Y(this,n,e.delta1),i=Y(this,o,e.delta2);vt(this,e,s,i)},we=function(){J(this),this.currentArrow=null},K=function(t,e){const n=document.createElementNS(S,"path");return C(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},ve=function(t,e){const n=document.createElementNS(S,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=K(t.line.getAttribute("d"),e);n.appendChild(o);const s=K(t.arrow1.getAttribute("d"),e);if(n.appendChild(s),t.arrow2.getAttribute("d")){const i=K(t.arrow2.getAttribute("d"),e);n.appendChild(i)}t.insertBefore(n,t.firstChild)},ye=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},xe=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"))},J=function(t){var e,n;(e=t.helper1)==null||e.destroy(),(n=t.helper2)==null||n.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&ye(t.currentArrow)},vt=function(t,e,n,o){const{linkController:s,P2:i,P3:r,line1:c,line2:a,nodes:u,map:h,currentArrow:m,bus:g}=t;if(!m)return;s.style.display="initial",i.style.display="initial",r.style.display="initial",u.appendChild(s),u.appendChild(i),u.appendChild(r),ve(m,"#4dc4ff");let{x:f,y:l}=P(n),{ctrlX:d,ctrlY:w}=n,{ctrlX:v,ctrlY:y}=o,{x,y:b}=P(o);i.style.cssText=`top:${w}px;left:${d}px;`,r.style.cssText=`top:${y}px;left:${v}px;`,W(c,f,l,d,w),W(a,v,y,x,b),t.helper1=mt.create(i),t.helper2=mt.create(r),t.helper1.init(h,(E,$)=>{d=d+E/t.scaleVal,w=w+$/t.scaleVal;const k=P({...n,ctrlX:d,ctrlY:w});f=k.x,l=k.y,i.style.top=w+"px",i.style.left=d+"px",wt(m,f,l,d,w,v,y,x,b,e),W(c,f,l,d,w),e.delta1.x=d-n.cx,e.delta1.y=w-n.cy,g.fire("updateArrowDelta",e)}),t.helper2.init(h,(E,$)=>{v=v+E/t.scaleVal,y=y+$/t.scaleVal;const k=P({...o,ctrlX:v,ctrlY:y});x=k.x,b=k.y,r.style.top=y+"px",r.style.left=v+"px",wt(m,f,l,d,w,v,y,x,b,e),W(a,v,y,x,b),e.delta2.x=v-o.cx,e.delta2.y=y-o.cy,g.fire("updateArrowDelta",e)})};function be(){this.linkSvgGroup.innerHTML="";for(let t=0;t<this.arrows.length;t++){const e=this.arrows[t];try{U(this,this.findEle(e.from),this.findEle(e.to),e,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function Ce(t){if(J(this),!t)return;const e=t.label;ft(this,e,t.arrowObj)}function Ee(){this.arrows=this.arrows.filter(t=>G(t.from,this.nodeData)&&G(t.to,this.nodeData))}const Se=Object.freeze(Object.defineProperty({__proto__:null,createArrow:ue,createArrowFrom:pe,editArrowLabel:Ce,removeArrow:me,renderArrow:be,selectArrow:ge,tidyArrow:Ee,unselectArrow:we},Symbol.toStringTag,{value:"Module"})),Te=function(t){var a,u;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const h=t[0].nodeObj,m=t[0].nodeObj.parent;if(!m)throw new Error("Can not select root node.");const g=m.children.findIndex(p=>h===p);return{parent:m.id,start:g,end:g}}let e=0;const n=t.map(h=>{let m=h.nodeObj;const g=[];for(;m.parent;){const p=m.parent,f=p.children,l=f==null?void 0:f.indexOf(m);m=p,g.unshift({node:m,index:l})}return g.length>e&&(e=g.length),g});let o=0;t:for(;o<e;o++){const h=(a=n[0][o])==null?void 0:a.node;for(let m=1;m<n.length;m++)if(((u=n[m][o])==null?void 0:u.node)!==h)break t}if(!o)throw new Error("Can not select root node.");const s=n.map(h=>h[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}},Le=function(t){const e=document.createElementNS(S,"g");return e.setAttribute("id",t),e},yt=function(t,e){const n=document.createElementNS(S,"path");return C(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},xt=function(t,e,n,o,s){const i=document.createElementNS(S,"text");return C(i,{"text-anchor":o,x:e+"",y:n+"",fill:s||"#666"}),i.innerHTML=t,i},$e=t=>t.parentElement.parentElement,Me=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},Q=function(t,e){var k;const{id:n,label:o,parent:s,start:i,end:r}=e,{nodes:c,theme:a,summarySvg:u}=t,m=t.findEle(s).nodeObj,g=Me(t,e);let p=1/0,f=0,l=0,d=0;for(let I=i;I<=r;I++){const bt=(k=m.children)==null?void 0:k[I];if(!bt)return t.removeSummary(n),null;const X=$e(t.findEle(bt.id)),{offsetLeft:q,offsetTop:Ct}=D(c,X),Et=i===r?10:20;I===i&&(l=Ct+Et),I===r&&(d=Ct+X.offsetHeight-Et),q<p&&(p=q),X.offsetWidth+q>f&&(f=X.offsetWidth+q)}let w,v;const y=l+10,x=d+10,b=(y+x)/2,E=a.cssVar["--color"];g===M.LHS?(w=yt(`M ${p+10} ${y} c -5 0 -10 5 -10 10 L ${p} ${x-10} c 0 5 5 10 10 10 M ${p} ${b} h -10`,E),v=xt(o,p-20,b+6,"end",E)):(w=yt(`M ${f-10} ${y} c 5 0 10 5 10 10 L ${f} ${x-10} c 0 5 -5 10 -10 10 M ${f} ${b} h 10`,E),v=xt(o,f+20,b+6,"start",E));const $=Le("s-"+n);return $.appendChild(w),$.appendChild(v),$.summaryObj=e,u.appendChild($),$},Ne=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:n}=this,{parent:o,start:s,end:i}=Te(t),r={id:B(),parent:o,start:s,end:i,label:"summary"},c=Q(this,r);e.push(r),this.editSummary(c),n.fire("operation",{name:"createSummary",obj:r})},createSummaryFrom:function(t){const e=B(),n={...t,id:e};Q(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(t){if(!t)return;const e=t.childNodes[1];ft(this,e,t.summaryObj)},removeSummary:function(t){var n;const e=this.summaries.findIndex(o=>o.id===t);e>-1&&(this.summaries.splice(e,1),(n=document.querySelector("#s-"+t))==null||n.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{Q(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.children[1].getBBox(),n=6,o=3,s=document.createElementNS(S,"rect");C(s,{x:e.x-n+"",y:e.y-n+"",width:e.width+n*2+"",height:e.height+n*2+"",rx:o+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(s),this.currentSummary=t},unselectSummary:function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),T="http://www.w3.org/2000/svg";function ke(t,e){const n=document.createElementNS(T,"svg");return C(n,{version:"1.1",xmlns:T,height:t,width:e}),n}function De(t,e){return(parseInt(t)-parseInt(e))/2}function Ae(t,e,n,o){const s=document.createElementNS(T,"g");let i="";return t.text?i=t.text.textContent:i=t.childNodes[0].textContent,i.split(`
|
|
15
|
-
`).forEach((c,a)=>{const u=document.createElementNS(T,"text");C(u,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+
|
|
14
|
+
`,at(o),t.scrollIntoView(o),o.addEventListener("keydown",r=>{r.stopPropagation();const c=r.key;if(c==="Enter"||c==="Tab"){if(r.shiftKey)return;r.preventDefault(),o.blur(),t.container.focus()}}),o.addEventListener("blur",()=>{var c;if(!o)return;const r=((c=o.textContent)==null?void 0:c.trim())||"";r===""?n.label=s:n.label=r,o.remove(),r!==s&&(e.innerHTML=n.label,t.linkDiv(),"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},Vt=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 a=r[c],u=a.querySelector("me-tpc"),{offsetLeft:h,offsetTop:m}=N(this.nodes,u),g=u.offsetWidth,p=u.offsetHeight,f=a.parentNode.className,l=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:m,cL:h,cW:g,cH:p,direction:f,containerHeight:this.nodes.offsetHeight}),d=this.theme.palette,w=u.nodeObj.branchColor||d[c%d.length];u.style.borderColor=w,this.lines.appendChild(ht(l,w,"3"));const v=a.children[0].children[1];if(v&&(v.style.top=(v.parentNode.offsetHeight-v.offsetHeight)/2+"px",f===M.LHS?v.style.left="-10px":v.style.right="-10px"),t&&t!==a)continue;const y=O("subLines"),x=a.lastChild;x.tagName==="svg"&&x.remove(),a.appendChild(y),ut(this,y,w,a,f,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},ut=function(t,e,n,o,s,i){const r=o.firstChild,c=o.children[1].children;if(c.length===0)return;const a=r.offsetTop,u=r.offsetLeft,h=r.offsetWidth,m=r.offsetHeight;for(let g=0;g<c.length;g++){const p=c[g],f=p.firstChild,l=f.offsetTop,d=f.offsetLeft,w=f.offsetWidth,v=f.offsetHeight,y=f.firstChild.nodeObj.branchColor||n,x=t.generateSubBranch({pT:a,pL:u,pW:h,pH:m,cT:l,cL:d,cW:w,cH:v,direction:s,isFirst:i});e.appendChild(ht(x,y,"2"));const b=f.children[1];if(b){if(b.style.bottom=-(b.offsetHeight/2)+"px",s===M.LHS?b.style.left="10px":s===M.RHS&&(b.style.right="10px"),!b.expanded)continue}else continue;ut(t,e,y,p,s)}},Ke="",It='<?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>',Gt='<?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>',Ft='<?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>',jt='<?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>',Wt='<?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>',Yt='<?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>',zt='<?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>',Je="",Rt={side:It,left:Gt,right:Ft,full:jt,living:Wt,zoomin:Yt,zoomout:zt},H=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=Rt[e],n};function Xt(t){const e=document.createElement("div"),n=H("fullscreen","full"),o=H("toCenter","living"),s=H("zoomout","zoomout"),i=H("zoomin","zoomin"),r=document.createElement("span");return r.innerText="100%",e.appendChild(n),e.appendChild(o),e.appendChild(s),e.appendChild(i),e.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===t.el?document.exitFullscreen():t.el.requestFullscreen()},o.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scaleVal<.6||t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scaleVal>1.6||t.scale(t.scaleVal+t.scaleSensitivity)},e}function qt(t){const e=document.createElement("div"),n=H("tbltl","left"),o=H("tbltr","right"),s=H("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 _t(t){t.container.append(Xt(t)),t.container.append(qt(t))}const Ut=function(t,e=!0){this.theme=t;const n=this.theme.cssVar,o=Object.keys(n);this.container.style.cssText="";for(let s=0;s<o.length;s++){const i=o[s];this.container.style.setProperty(i,n[i])}t.cssVar["--gap"]||this.container.style.setProperty("--gap","30px"),e&&this.refresh()},Kt=function(t){const n=t.parentElement.parentElement.lastElementChild;(n==null?void 0:n.tagName)==="svg"&&(n==null||n.remove())};function Jt(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const Qt=function(t){const e=this.container,n=t.getBoundingClientRect(),o=e.getBoundingClientRect();if(n.top>o.bottom||n.bottom<o.top||n.left>o.right||n.right<o.left){const i=n.left+n.width/2,r=n.top+n.height/2,c=o.left+o.width/2,a=o.top+o.height/2,u=i-c,h=r-a;this.move(-u,-h)}},Zt=function(t,e,n){this.clearSelection(),this.scrollIntoView(t),this.selection.select(t),e&&this.bus.fire("selectNewNode",t.nodeObj)},te=function(t){this.selection.select(t)},ee=function(t){this.selection.deselect(t)},ne=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},oe=function(){const t=Jt(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},se=function(){return JSON.parse(this.getDataString())},ie=function(){this.editable=!0},re=function(){this.editable=!1},ce=function(t,e={x:0,y:0}){const n=this.container.getBoundingClientRect(),o=e.x?e.x-n.left-n.width/2:0,s=e.y?e.y-n.top-n.height/2:0,{dx:i,dy:r}=pt(this),c=this.map.style.transform,{x:a,y:u}=ot(c),h=a-i,m=u-r,g=this.scaleVal,p=(-o+h)*(1-t/g),f=(-s+m)*(1-t/g);this.map.style.transform=`translate(${a-p}px, ${u-f}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},le=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,n=1/Math.max(1,Math.max(t,e));this.scaleVal=n,this.map.style.transform="scale("+n+")",this.bus.fire("scale",n)},ae=function(t,e){const{map:n,scaleVal:o,bus:s}=this,i=n.style.transform;let{x:r,y:c}=ot(i);r+=t,c+=e,n.style.transform=`translate(${r}px, ${c}px) scale(${o})`,s.fire("move",{dx:t,dy:e})},pt=t=>{const{container:e,map:n,nodes:o}=t,s=n.querySelector("me-root"),i=s.offsetTop,r=s.offsetLeft,c=s.offsetWidth,a=s.offsetHeight;let u,h;return t.alignment==="root"?(u=e.offsetWidth/2-r-c/2,h=e.offsetHeight/2-i-a/2,n.style.transformOrigin=`${r+c/2}px 50%`):(u=(e.offsetWidth-o.offsetWidth)/2,h=(e.offsetHeight-o.offsetHeight)/2,n.style.transformOrigin="50% 50%"),{dx:u,dy:h}},he=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},clearSelection:ne,disableEdit:re,enableEdit:ie,expandNode:function(t,e){const n=t.nodeObj;typeof e=="boolean"?n.expanded=e:n.expanded!==!1?n.expanded=!1:n.expanded=!0;const o=t.parentNode,s=o.children[1];if(s.expanded=n.expanded,s.className=n.expanded?"minus":"",Kt(t),n.expanded){const a=this.createChildren(n.children.map(u=>this.createWrapper(u).grp));o.parentNode.appendChild(a)}else o.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const i=t.getBoundingClientRect(),r=this.container.getBoundingClientRect();(i.bottom>r.bottom||i.top<r.top||i.right>r.right||i.left<r.left)&&this.scrollIntoView(t),this.bus.fire("expandNode",n)},expandNodeAll:function(t,e){const n=t.nodeObj,o=(s,i)=>{s.expanded=i,s.children&&s.children.forEach(r=>{o(r,i)})};typeof e=="boolean"?o(n,e):n.expanded!==!1?o(n,!1):o(n,!0),this.refresh()},focusNode:function(t){t.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=t.nodeObj,this.initRight(),this.toCenter())},getData:se,getDataString:oe,initLeft:function(){this.direction=0,this.refresh(),this.toCenter()},initRight:function(){this.direction=1,this.refresh(),this.toCenter()},initSide:function(){this.direction=2,this.refresh(),this.toCenter()},install:function(t){t(this)},move:ae,refresh:function(t){t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.arrows=t.arrows||[],this.summaries=t.summaries||[]),_(this.nodeData),this.layout(),this.linkDiv()},scale:ce,scaleFit:le,scrollIntoView:Qt,selectNode:Zt,selectNodes:te,setLocale:function(t){this.locale=t,this.refresh()},toCenter:function(){const{map:t}=this,{dx:e,dy:n}=pt(this);t.style.transform=`translate(${e}px, ${n}px) scale(${this.scaleVal})`},unselectNodes:ee},Symbol.toStringTag,{value:"Module"})),mt={create:function(t){return{dom:t,moved:!1,mousedown:!1,handleMouseMove(e){this.mousedown&&(this.moved=!0,this.cb&&this.cb(e.movementX,e.movementY))},handleMouseDown(e){e.button===0&&(this.mousedown=!0)},handleClear(e){this.mousedown=!1},cb:null,init(e,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.destroy=st([{dom:e,evt:"mousemove",func:this.handleMouseMove},{dom:e,evt:"mouseleave",func:this.handleClear},{dom:e,evt:"mouseup",func:this.handleClear},{dom:this.dom,evt:"mousedown",func:this.handleMouseDown}])},destroy:null,clear(){this.moved=!1,this.mousedown=!1}}}};function gt(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 de(t,e,n){C(t,{x:e+"",y:n+""})}function W(t,e,n,o,s){C(t,{x1:e+"",y1:n+"",x2:o+"",y2:s+""})}function wt(t,e,n,o,s,i,r,c,a,u){t.line.setAttribute("d",`M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${a}`);const h=F(i,r,c,a);if(h&&t.arrow1.setAttribute("d",`M ${h.x1} ${h.y1} L ${c} ${a} L ${h.x2} ${h.y2}`),u.bidirectional){const p=F(o,s,e,n);p&&t.arrow2.setAttribute("d",`M ${p.x1} ${p.y1} L ${e} ${n} L ${p.x2} ${p.y2}`)}const{x:m,y:g}=gt(e,n,o,s,i,r,c,a);de(t.label,m,g),xe(t)}function Y(t,e,n){const{offsetLeft:o,offsetTop:s}=N(t.nodes,e),i=e.offsetWidth,r=e.offsetHeight,c=o+i/2,a=s+r/2,u=c+n.x,h=a+n.y;return{w:i,h:r,cx:c,cy:a,ctrlX:u,ctrlY:h}}function P(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 fe=function(t,e,n,o){const s=document.createElementNS(S,"text");return C(s,{"text-anchor":"middle",x:e+"",y:n+"",fill:o||"#666"}),s.dataset.type="custom-link",s.innerHTML=t,s},U=function(t,e,n,o,s){if(!e||!n)return;const i=Y(t,e,o.delta1),r=Y(t,n,o.delta2),{x:c,y:a}=P(i),{ctrlX:u,ctrlY:h}=i,{ctrlX:m,ctrlY:g}=r,{x:p,y:f}=P(r),l=F(m,g,p,f);if(!l)return;const d=`M ${l.x1} ${l.y1} L ${p} ${f} L ${l.x2} ${l.y2}`;let w="";if(o.bidirectional){const E=F(u,h,c,a);if(!E)return;w=`M ${E.x1} ${E.y1} L ${c} ${a} L ${E.x2} ${E.y2}`}const v=Ot(`M ${c} ${a} C ${u} ${h} ${m} ${g} ${p} ${f}`,d,w),{x:y,y:x}=gt(c,a,u,h,m,g,p,f),b=fe(o.label,y,x,t.theme.cssVar["--color"]);v.appendChild(b),v.label=b,v.arrowObj=o,v.dataset.linkid=o.id,t.linkSvgGroup.appendChild(v),s||(t.arrows.push(o),t.currentArrow=v,vt(t,o,i,r))},ue=function(t,e,n={}){const o={id:B(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:t.offsetWidth/2+100,y:0},delta2:{x:e.offsetWidth/2+100,y:0},...n};U(this,t,e,o),this.bus.fire("operation",{name:"createArrow",obj:o})},pe=function(t){const e={...t,id:B()};U(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},me=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;J(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},ge=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),o=this.findEle(e.to),s=Y(this,n,e.delta1),i=Y(this,o,e.delta2);vt(this,e,s,i)},we=function(){J(this),this.currentArrow=null},K=function(t,e){const n=document.createElementNS(S,"path");return C(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},ve=function(t,e){const n=document.createElementNS(S,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=K(t.line.getAttribute("d"),e);n.appendChild(o);const s=K(t.arrow1.getAttribute("d"),e);if(n.appendChild(s),t.arrow2.getAttribute("d")){const i=K(t.arrow2.getAttribute("d"),e);n.appendChild(i)}t.insertBefore(n,t.firstChild)},ye=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},xe=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"))},J=function(t){var e,n;(e=t.helper1)==null||e.destroy(),(n=t.helper2)==null||n.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&ye(t.currentArrow)},vt=function(t,e,n,o){const{linkController:s,P2:i,P3:r,line1:c,line2:a,nodes:u,map:h,currentArrow:m,bus:g}=t;if(!m)return;s.style.display="initial",i.style.display="initial",r.style.display="initial",u.appendChild(s),u.appendChild(i),u.appendChild(r),ve(m,"#4dc4ff");let{x:f,y:l}=P(n),{ctrlX:d,ctrlY:w}=n,{ctrlX:v,ctrlY:y}=o,{x,y:b}=P(o);i.style.cssText=`top:${w}px;left:${d}px;`,r.style.cssText=`top:${y}px;left:${v}px;`,W(c,f,l,d,w),W(a,v,y,x,b),t.helper1=mt.create(i),t.helper2=mt.create(r),t.helper1.init(h,(E,$)=>{d=d+E/t.scaleVal,w=w+$/t.scaleVal;const D=P({...n,ctrlX:d,ctrlY:w});f=D.x,l=D.y,i.style.top=w+"px",i.style.left=d+"px",wt(m,f,l,d,w,v,y,x,b,e),W(c,f,l,d,w),e.delta1.x=d-n.cx,e.delta1.y=w-n.cy,g.fire("updateArrowDelta",e)}),t.helper2.init(h,(E,$)=>{v=v+E/t.scaleVal,y=y+$/t.scaleVal;const D=P({...o,ctrlX:v,ctrlY:y});x=D.x,b=D.y,r.style.top=y+"px",r.style.left=v+"px",wt(m,f,l,d,w,v,y,x,b,e),W(a,v,y,x,b),e.delta2.x=v-o.cx,e.delta2.y=y-o.cy,g.fire("updateArrowDelta",e)})};function be(){this.linkSvgGroup.innerHTML="";for(let t=0;t<this.arrows.length;t++){const e=this.arrows[t];try{U(this,this.findEle(e.from),this.findEle(e.to),e,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function Ce(t){if(J(this),!t)return;const e=t.label;ft(this,e,t.arrowObj)}function Ee(){this.arrows=this.arrows.filter(t=>G(t.from,this.nodeData)&&G(t.to,this.nodeData))}const Se=Object.freeze(Object.defineProperty({__proto__:null,createArrow:ue,createArrowFrom:pe,editArrowLabel:Ce,removeArrow:me,renderArrow:be,selectArrow:ge,tidyArrow:Ee,unselectArrow:we},Symbol.toStringTag,{value:"Module"})),Te=function(t){var a,u;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const h=t[0].nodeObj,m=t[0].nodeObj.parent;if(!m)throw new Error("Can not select root node.");const g=m.children.findIndex(p=>h===p);return{parent:m.id,start:g,end:g}}let e=0;const n=t.map(h=>{let m=h.nodeObj;const g=[];for(;m.parent;){const p=m.parent,f=p.children,l=f==null?void 0:f.indexOf(m);m=p,g.unshift({node:m,index:l})}return g.length>e&&(e=g.length),g});let o=0;t:for(;o<e;o++){const h=(a=n[0][o])==null?void 0:a.node;for(let m=1;m<n.length;m++)if(((u=n[m][o])==null?void 0:u.node)!==h)break t}if(!o)throw new Error("Can not select root node.");const s=n.map(h=>h[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}},Le=function(t){const e=document.createElementNS(S,"g");return e.setAttribute("id",t),e},yt=function(t,e){const n=document.createElementNS(S,"path");return C(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},xt=function(t,e,n,o,s){const i=document.createElementNS(S,"text");return C(i,{"text-anchor":o,x:e+"",y:n+"",fill:s||"#666"}),i.innerHTML=t,i},$e=t=>t.parentElement.parentElement,Me=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},Q=function(t,e){var D;const{id:n,label:o,parent:s,start:i,end:r}=e,{nodes:c,theme:a,summarySvg:u}=t,m=t.findEle(s).nodeObj,g=Me(t,e);let p=1/0,f=0,l=0,d=0;for(let I=i;I<=r;I++){const bt=(D=m.children)==null?void 0:D[I];if(!bt)return t.removeSummary(n),null;const X=$e(t.findEle(bt.id)),{offsetLeft:q,offsetTop:Ct}=N(c,X),Et=i===r?10:20;I===i&&(l=Ct+Et),I===r&&(d=Ct+X.offsetHeight-Et),q<p&&(p=q),X.offsetWidth+q>f&&(f=X.offsetWidth+q)}let w,v;const y=l+10,x=d+10,b=(y+x)/2,E=a.cssVar["--color"];g===M.LHS?(w=yt(`M ${p+10} ${y} c -5 0 -10 5 -10 10 L ${p} ${x-10} c 0 5 5 10 10 10 M ${p} ${b} h -10`,E),v=xt(o,p-20,b+6,"end",E)):(w=yt(`M ${f-10} ${y} c 5 0 10 5 10 10 L ${f} ${x-10} c 0 5 -5 10 -10 10 M ${f} ${b} h 10`,E),v=xt(o,f+20,b+6,"start",E));const $=Le("s-"+n);return $.appendChild(w),$.appendChild(v),$.summaryObj=e,u.appendChild($),$},ke=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:n}=this,{parent:o,start:s,end:i}=Te(t),r={id:B(),parent:o,start:s,end:i,label:"summary"},c=Q(this,r);e.push(r),this.editSummary(c),n.fire("operation",{name:"createSummary",obj:r})},createSummaryFrom:function(t){const e=B(),n={...t,id:e};Q(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(t){if(!t)return;const e=t.childNodes[1];ft(this,e,t.summaryObj)},removeSummary:function(t){var n;const e=this.summaries.findIndex(o=>o.id===t);e>-1&&(this.summaries.splice(e,1),(n=document.querySelector("#s-"+t))==null||n.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{Q(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.children[1].getBBox(),n=6,o=3,s=document.createElementNS(S,"rect");C(s,{x:e.x-n+"",y:e.y-n+"",width:e.width+n*2+"",height:e.height+n*2+"",rx:o+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(s),this.currentSummary=t},unselectSummary:function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),T="http://www.w3.org/2000/svg";function De(t,e){const n=document.createElementNS(T,"svg");return C(n,{version:"1.1",xmlns:T,height:t,width:e}),n}function Ne(t,e){return(parseInt(t)-parseInt(e))/2}function Ae(t,e,n,o){const s=document.createElementNS(T,"g");let i="";return t.text?i=t.text.textContent:i=t.childNodes[0].textContent,i.split(`
|
|
15
|
+
`).forEach((c,a)=>{const u=document.createElementNS(T,"text");C(u,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+Ne(e.lineHeight,e.fontSize)*(a+1)+parseFloat(e.fontSize)*(a+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),u.innerHTML=c,s.appendChild(u)}),s}function He(t,e,n,o){var c;let s="";(c=t.nodeObj)!=null&&c.dangerouslySetInnerHTML?s=t.nodeObj.dangerouslySetInnerHTML:t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const i=document.createElementNS(T,"foreignObject");C(i,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return C(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 Pe(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=N(t.nodes,e),i=document.createElementNS(T,"rect");return C(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 z(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=N(t.nodes,e),r=document.createElementNS(T,"rect");C(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(T,"g");c.appendChild(r);let a;return n?a=He(e,o,s,i):a=Ae(e,o,s,i),c.appendChild(a),c}function Be(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=N(t.nodes,e),i=document.createElementNS(T,"a"),r=document.createElementNS(T,"text");return C(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 Oe(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=N(t.nodes,e),i=document.createElementNS(T,"image");return C(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:e.src}),i}const R=100,Ve='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',Ie=(t,e=!1)=>{var m,g,p;const n=t.nodes,o=n.offsetHeight+R*2,s=n.offsetWidth+R*2,i=De(o+"px",s+"px"),r=document.createElementNS(T,"svg"),c=document.createElementNS(T,"rect");C(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(f=>{const l=f.cloneNode(!0),{offsetLeft:d,offsetTop:w}=N(n,f.parentElement);l.setAttribute("x",`${d}`),l.setAttribute("y",`${w}`),r.appendChild(l)});const a=(m=n.querySelector(".lines"))==null?void 0:m.cloneNode(!0);a&&r.appendChild(a);const u=(g=n.querySelector(".topiclinks"))==null?void 0:g.cloneNode(!0);u&&r.appendChild(u);const h=(p=n.querySelector(".summary"))==null?void 0:p.cloneNode(!0);return h&&r.appendChild(h),n.querySelectorAll("me-tpc").forEach(f=>{f.nodeObj.dangerouslySetInnerHTML?r.appendChild(z(t,f,!e)):(r.appendChild(Pe(t,f)),r.appendChild(z(t,f.text,!e)))}),n.querySelectorAll(".tags > span").forEach(f=>{r.appendChild(z(t,f))}),n.querySelectorAll(".icons > span").forEach(f=>{r.appendChild(z(t,f))}),n.querySelectorAll(".hyper-link").forEach(f=>{r.appendChild(Be(t,f))}),n.querySelectorAll("img").forEach(f=>{r.appendChild(Oe(t,f))}),C(r,{x:R+"",y:R+"",overflow:"visible"}),i.appendChild(r),i},Ge=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),Ve+t.outerHTML);function Fe(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 je={getObjById:G,generateNewObj:St,layout:$t,linkDiv:Vt,editTopic:Pt,createWrapper:Dt,createParent:Nt,createChildren:At,createTopic:Ht,findEle:ct,changeTheme:Ut,...he,...{},...Se,...ke,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await Fe(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=Ie(this,t),o=Ge(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),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,_(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&_t(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){var t;this.disposable.forEach(e=>e()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.waitCopy=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.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,(t=this.selection)==null||t.destroy(),this.selection=void 0}};function We({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:a,containerHeight:u}){let h=e+n/2;const m=t+o/2;let g;a===M.LHS?g=i+r:g=i;const p=s+c/2,l=(1-Math.abs(p-m)/u)*.25*(n/2);return a===M.LHS?h=h-n/10-l:h=h+n/10+l,`M ${h} ${m} Q ${h} ${p} ${g} ${p}`}function Ye({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:a,isFirst:u}){const h=parseInt(this.container.style.getPropertyValue("--gap"));let m=0,g=0;u?m=t+o/2:m=t+o;const p=s+c;let f=0,l=0,d=0;const w=Math.abs(m-p)/300*h;return a===M.LHS?(d=e,f=d+h,l=d-h,g=i+h,`M ${f} ${m} C ${d} ${m} ${d+w} ${p} ${l} ${p} H ${g}`):(d=e+n,f=d-h,l=d+h,g=i+r-h,`M ${f} ${m} C ${d} ${m} ${d-w} ${p} ${l} ${p} H ${g}`)}const ze="5.0.0-beta.40";function Re(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e){if(this.mousedown){this.moved=!0;const n=e.movementX,o=e.movementY;t.move(n,o)}},clear(){this.mousedown=!1,t.map.style.transition="transform 0.3s"}}}const V=document;function k({el:t,direction:e,locale:n,draggable:o,editable:s,contextMenu:i,toolBar:r,keypress:c,mouseSelectionButton:a,selectionContainer:u,before:h,newTopicName:m,allowUndo:g,generateMainBranch:p,generateSubBranch:f,overflowHidden:l,theme:d,alignment:w,scaleSensitivity:v}){let y=null;const x=Object.prototype.toString.call(t);if(x==="[object HTMLDivElement]"?y=t:x==="[object String]"&&(y=document.querySelector(t)),!y)throw new Error("MindElixir: el is not a valid element");y.style.position="relative",y.innerHTML="",this.el=y,this.disposable=[],this.before=h||{},this.locale=n||"en",this.contextMenu=i===void 0?!0:i,this.toolBar=r===void 0?!0:r,this.keypress=c===void 0?!0:c,this.mouseSelectionButton=a||0,this.direction=typeof e=="number"?e:1,this.draggable=o===void 0?!0:o,this.newTopicName=m||"new node",this.editable=s===void 0?!0:s,this.allowUndo=g===void 0?!1:g,this.scaleSensitivity=typeof v=="number"?v:.2,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.generateMainBranch=p||We,this.generateSubBranch=f||Ye,this.overflowHidden=l||!1,this.dragMoveHelper=Re(this),this.bus=Lt(),this.container=V.createElement("div"),this.selectionContainer=u||this.container,this.container.className="map-container";const b=window.matchMedia("(prefers-color-scheme: dark)");this.theme=d||(b.matches?tt:Z);const E=V.createElement("div");E.className="map-canvas",setTimeout(()=>{E.style.transition="all 0.3s"},300),this.map=E,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=V.createElement("me-nodes"),this.lines=O("lines"),this.summarySvg=O("summary"),this.linkController=O("linkcontroller"),this.P2=V.createElement("div"),this.P3=V.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=dt(),this.line2=dt(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=O("topiclinks"),this.alignment=w??"root",this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(Tt(this))}return k.prototype=je,Object.defineProperty(k.prototype,"currentNode",{get(){return this.currentNodes.at(-1)},enumerable:!0}),k.LEFT=0,k.RIGHT=1,k.SIDE=2,k.THEME=Z,k.DARK_THEME=tt,k.version=ze,k.E=ct,k}();
|
package/dist/MindElixirLite.js
CHANGED
|
@@ -595,11 +595,11 @@ const Qt = function(t) {
|
|
|
595
595
|
}, ue = function() {
|
|
596
596
|
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
597
597
|
}, pe = function() {
|
|
598
|
-
this.direction = 0, this.refresh();
|
|
598
|
+
this.direction = 0, this.refresh(), this.toCenter();
|
|
599
599
|
}, ge = function() {
|
|
600
|
-
this.direction = 1, this.refresh();
|
|
600
|
+
this.direction = 1, this.refresh(), this.toCenter();
|
|
601
601
|
}, me = function() {
|
|
602
|
-
this.direction = 2, this.refresh();
|
|
602
|
+
this.direction = 2, this.refresh(), this.toCenter();
|
|
603
603
|
}, we = function(t) {
|
|
604
604
|
this.locale = t, this.refresh();
|
|
605
605
|
}, ve = function(t, e) {
|
|
@@ -1223,7 +1223,7 @@ function un({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction:
|
|
|
1223
1223
|
const w = Math.abs(g - p) / 300 * h;
|
|
1224
1224
|
return a === D.LHS ? (d = e, f = d + h, l = d - h, m = i + h, `M ${f} ${g} C ${d} ${g} ${d + w} ${p} ${l} ${p} H ${m}`) : (d = e + n, f = d - h, l = d + h, m = i + r - h, `M ${f} ${g} C ${d} ${g} ${d - w} ${p} ${l} ${p} H ${m}`);
|
|
1225
1225
|
}
|
|
1226
|
-
const pn = "5.0.0-beta.
|
|
1226
|
+
const pn = "5.0.0-beta.40";
|
|
1227
1227
|
function gn(t) {
|
|
1228
1228
|
return {
|
|
1229
1229
|
x: 0,
|
|
@@ -1275,7 +1275,7 @@ function k({
|
|
|
1275
1275
|
const C = O.createElement("div");
|
|
1276
1276
|
C.className = "map-canvas", setTimeout(() => {
|
|
1277
1277
|
C.style.transition = "all 0.3s";
|
|
1278
|
-
}, 300), this.map = C, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = O.createElement("me-nodes"), this.
|
|
1278
|
+
}, 300), this.map = C, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = O.createElement("me-nodes"), this.lines = V("lines"), this.summarySvg = V("summary"), this.linkController = V("linkcontroller"), this.P2 = O.createElement("div"), this.P3 = O.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = rt(), this.line2 = rt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = V("topiclinks"), this.alignment = w ?? "root", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(Tt(this));
|
|
1279
1279
|
}
|
|
1280
1280
|
k.prototype = dn;
|
|
1281
1281
|
Object.defineProperty(k.prototype, "currentNode", {
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.map-container{--gap: 30px;--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;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:hidden;font-size:15px;background-color:var(--bgcolor)}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:50px}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7;border-radius:3px}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHQ9IjE2NTY2NTQ3MTcyNDIiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA0ODBoLTEzOC42NjY2NjdWMzQxLjMzMzMzM2MwLTE3LjA2NjY2Ny0xNC45MzMzMzMtMzItMzItMzJzLTMyIDE0LjkzMzMzMy0zMiAzMnYxMzguNjY2NjY3SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyIDE0LjkzMzMzMy0zMiAzMnMxNC45MzMzMzMgMzIgMzIgMzJoMTM4LjY2NjY2N1Y2ODIuNjY2NjY3YzAgMTcuMDY2NjY3IDE0LjkzMzMzMyAzMiAzMiAzMnMzMi0xNC45MzMzMzMgMzItMzJ2LTEzOC42NjY2NjdINjgyLjY2NjY2N2MxNy4wNjY2NjcgMCAzMi0xNC45MzMzMzMgMzItMzJzLTE0LjkzMzMzMy0zMi0zMi0zMnoiPjwvcGF0aD4NCjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHQ9IjE2NTY2NTU1NjQ5ODUiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA1NDRIMzQxLjMzMzMzM2MtMTcuMDY2NjY3IDAtMzItMTQuOTMzMzMzLTMyLTMyczE0LjkzMzMzMy0zMiAzMi0zMmgzNDEuMzMzMzM0YzE3LjA2NjY2NyAwIDMyIDE0LjkzMzMzMyAzMiAzMnMtMTQuOTMzMzMzIDMyLTMyIDMyeiI+PC9wYXRoPg0KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary,.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor)}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:10;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}
|
|
1
|
+
.map-container{--gap: 30px;--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;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:hidden;font-size:15px;outline:none;background-color:var(--bgcolor)}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:50px}.map-container .map-canvas me-root{position:relative;margin:45px 0}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7;border-radius:3px}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHQ9IjE2NTY2NTQ3MTcyNDIiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA0ODBoLTEzOC42NjY2NjdWMzQxLjMzMzMzM2MwLTE3LjA2NjY2Ny0xNC45MzMzMzMtMzItMzItMzJzLTMyIDE0LjkzMzMzMy0zMiAzMnYxMzguNjY2NjY3SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyIDE0LjkzMzMzMy0zMiAzMnMxNC45MzMzMzMgMzIgMzIgMzJoMTM4LjY2NjY2N1Y2ODIuNjY2NjY3YzAgMTcuMDY2NjY3IDE0LjkzMzMzMyAzMiAzMiAzMnMzMi0xNC45MzMzMzMgMzItMzJ2LTEzOC42NjY2NjdINjgyLjY2NjY2N2MxNy4wNjY2NjcgMCAzMi0xNC45MzMzMzMgMzItMzJzLTE0LjkzMzMzMy0zMi0zMi0zMnoiPjwvcGF0aD4NCjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHQ9IjE2NTY2NTU1NjQ5ODUiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA1NDRIMzQxLjMzMzMzM2MtMTcuMDY2NjY3IDAtMzItMTQuOTMzMzMzLTMyLTMyczE0LjkzMzMzMy0zMiAzMi0zMmgzNDEuMzMzMzM0YzE3LjA2NjY2NyAwIDMyIDE0LjkzMzMzMyAzMiAzMnMtMTQuOTMzMzMzIDMyLTMyIDMyeiI+PC9wYXRoPg0KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary,.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor)}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:10;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}
|