11 lines
72 KiB
JavaScript
11 lines
72 KiB
JavaScript
|
|
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--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;position:relative;-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}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;line-height:1.2em;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);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 var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.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);line-height:1.2em}.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}.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+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzM
|
||
|
|
var MindElixirLite=function(){"use strict";const Nt="";(function(t){var e,n,i,s,o,r,l='<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h8
|
||
|
|
<use xlink:href="#icon-${e}"></use>
|
||
|
|
</svg>`,n};function Ge(t){const e=document.createElement("div"),n=H("fullscreen","full"),i=H("toCenter","living"),s=H("zoomout","move"),o=H("zoomin","add"),r=document.createElement("span");return r.innerText="100%",e.appendChild(n),e.appendChild(i),e.appendChild(s),e.appendChild(o),e.className="mind-elixir-toolbar rb",n.onclick=()=>{t.container.requestFullscreen()},i.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scaleVal<.6||t.scale(t.scaleVal-=.2)},o.onclick=()=>{t.scaleVal>1.6||t.scale(t.scaleVal+=.2)},e}function Ue(t){const e=document.createElement("div"),n=H("tbltl","left"),i=H("tbltr","right"),s=H("tblts","side");return e.appendChild(n),e.appendChild(i),e.appendChild(s),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},i.onclick=()=>{t.initRight()},s.onclick=()=>{t.initSide()},e}function Ke(t){t.container.append(Ge(t)),t.container.append(Ue(t))}/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */var Je=Object.defineProperty,Qe=(t,e,n)=>e in t?Je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,y=(t,e,n)=>(Qe(t,typeof e!="symbol"?e+"":e,n),n);class Ze{constructor(){y(this,"_listeners",new Map),y(this,"on",this.addEventListener),y(this,"off",this.removeEventListener),y(this,"emit",this.dispatchEvent)}addEventListener(e,n){const i=this._listeners.get(e)??new Set;return this._listeners.set(e,i),i.add(n),this}removeEventListener(e,n){var i;return(i=this._listeners.get(e))==null||i.delete(n),this}dispatchEvent(e,...n){let i=!0;for(const s of this._listeners.get(e)??[])i=s(...n)!==!1&&i;return i}unbindAllListeners(){this._listeners.clear()}}const me=(t,e="px")=>typeof t=="number"?t+e:t;function $({style:t},e,n){if(typeof e=="object")for(const[i,s]of Object.entries(e))s!==void 0&&(t[i]=me(s));else n!==void 0&&(t[e]=me(n))}function ge(t){return(e,n,i,s={})=>{e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(n)||(n=[n]);for(const o of e)for(const r of n)o[t](r,i,{capture:!1,...s});return[e,n,i,s]}}const O=ge("addEventListener"),T=ge("removeEventListener"),X=t=>{var e;const{clientX:n,clientY:i,target:s}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:i,target:s}};function ve(t,e,n="touch"){switch(n){case"center":{const i=e.left+e.width/2,s=e.top+e.height/2;return i>=t.left&&i<=t.right&&s>=t.top&&s<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}}function j(t,e=document){const n=Array.isArray(t)?t:[t];let i=[];for(let s=0,o=n.length;s<o;s++){const r=n[s];typeof r=="string"?i=i.concat(Array.from(e.querySelectorAll(r))):r instanceof Element&&i.push(r)}return i}const et=()=>matchMedia("(hover: none), (pointer: coarse)").matches,tt=()=>"safari"in window,nt=t=>{let e,n=-1,i=!1;return{next(...s){e=s,i||(i=!0,n=requestAnimationFrame(()=>{t(...e),i=!1}))},cancel(){cancelAnimationFrame(n),i=!1}}},{abs:P,max:ye,min:be,ceil:xe}=Math;class it extends Ze{constructor(e){var n,i,s,o,r;super(),y(this,"_options"),y(this,"_selection",{stored:[],selected:[],touched:[],changed:{added:[],removed:[]}}),y(this,"_area"),y(this,"_clippingElement"),y(this,"_targetElement"),y(this,"_targetRect"),y(this,"_selectables",[]),y(this,"_latestElement"),y(this,"_areaRect",new DOMRect),y(this,"_areaLocation",{y1:0,x2:0,y2:0,x1:0}),y(this,"_singleClick",!0),y(this,"_frame"),y(this,"_scrollAvailable",!0),y(this,"_scrollingActive",!1),y(this,"_scrollSpeed",{x:0,y:0}),y(this,"_scrollDelta",{x:0,y:0}),y(this,"disable",this._bindStartEvents.bind(this,!1)),y(this,"enable",this._bindStartEvents),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...e,behaviour:{overlap:"invert",intersect:"touch",...e.behaviour,startThreshold:(n=e.behaviour)!=null&&n.startThreshold?typeof e.behaviour.startThreshold=="number"?e.behaviour.startThreshold:{x:10,y:10,...e.behaviour.startThreshold
|
||
|
|
|
||
|
|
`;function n(i,s){for(let o=0;o<i.length;o++)s<=6?e+="".padStart(s,"#")+" "+i[o].topic+`
|
||
|
|
|
||
|
|
`:e+="".padStart(s-7," ")+"- "+i[o].topic+`
|
||
|
|
`,i[o].children&&n(i[o].children||[],s+1)}return n(t.children||[],2),e},getDataString:function(){const t=we(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},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)},refresh:function(t){t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.linkData=t.linkData||{},this.summaries=t.summaries||[]),ee(this.nodeData),this.layout(),this.linkDiv()},scale:function(t){this.scaleVal=t,this.map.style.transform="scale("+t+")"},selectFirstChild:function(){if(!this.currentNode)return;const t=this.currentNode.parentElement.nextSibling;if(t&&t.firstChild){const e=t.firstChild.firstChild.firstChild;this.selectNode(e)}},selectNextSibling:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return!1;const t=this.currentNode.parentElement.parentElement.nextSibling;let e;if(t)e=t.firstChild.firstChild;else return!1;return this.selectNode(e),!0},selectNode:function(t,e,n){if(t){if(console.time("selectNode"),typeof t=="string"){const i=L(t);return i?this.selectNode(i):void 0}this.currentNode&&(this.currentNode.className=""),t.className="selected",t.scrollIntoView({block:"nearest",inline:"nearest"}),this.currentNode=t,e?this.bus.fire("selectNewNode",t.nodeObj):this.bus.fire("selectNode",t.nodeObj,n),console.timeEnd("selectNode")}},selectNodes:function(t){if(t){console.time("selectNodes");for(const e of t)e.className="selected";this.currentNodes=t,this.bus.fire("selectNodes",t.map(e=>e.nodeObj)),console.timeEnd("selectNodes")}},selectParent:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return;const t=this.currentNode.parentElement.parentElement.parentElement.previousSibling;if(t){const e=t.firstChild;this.selectNode(e)}},selectPrevSibling:function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return!1;const t=this.currentNode.parentElement.parentElement.previousSibling;let e;if(t)e=t.firstChild.firstChild;else return!1;return this.selectNode(e),!0},setLocale:function(t){this.locale=t,this.refresh()},toCenter:function(){this.container.scrollTo(1e4-this.container.offsetWidth/2,1e4-this.container.offsetHeight/2)},unselectNode:function(){this.currentNode&&(this.currentNode.className=""),this.currentNode=null,this.bus.fire("unselectNode")},unselectNodes:function(){if(this.currentNodes)for(const t of this.currentNodes)t.classList.remove("selected");this.currentNodes=null,this.bus.fire("unselectNodes")}},Symbol.toStringTag,{value:"Module"})),_e={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),e.addEventListener("mousemove",this.handleMouseMove),e.addEventListener("mouseleave",this.handleClear),e.addEventListener("mouseup",this.handleClear),this.dom.addEventListener("mousedown",this.handleMouseDown)},destory(e){e.removeEventListener("mousemove",this.handleMouseMove),e.removeEventListener("mouseleave",this.handleClear),e.removeEventListener("mouseup",this.handleClear),this.dom.removeEventListener("mousedown",this.handleMouseDown)},clear(){this.moved=!1,this.mousedown=!1}}}};function G(t,e,n){const{offsetLeft:i,offsetTop:s}=z(t.nodes,e),o=e.offsetWidth,r=e.offsetHeight,l=i+o/2,c=s+r/2,u=l+n.x,h=c+n.y;return{w:o,h:r,cx:l,cy:c,ctrlX:u,ctrlY:h}}function q(t){let e,n;const i=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return i>t.h/t.w||i<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/i,n=t.cy+t.h/2):(e=t.cx+t.h/2/i,n=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,n=t.cy-t.w*i/2):(e=t.cx-t.w/2,n=t.cy+t.w*i/2),{x:e,y:n}}const rt=function(t,e,n,i){const s=document.createElementNS("http://www.w3.org/2000/svg","text");return w(s,{"
|
||
|
|
`).forEach((l,c)=>{const u=document.createElementNS("http://www.w3.org/2000/svg","text");w(u,{x:n+parseInt(e.paddingLeft)+"",y:i+parseInt(e.paddingTop)+Ct(e.lineHeight,e.fontSize)*(c+1)+parseFloat(e.fontSize)*(c+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),u.innerHTML=l,s.appendChild(u)}),s}function St(t,e,n,i){let s="";t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const o=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");w(o,{x:n+parseInt(e.paddingLeft)+"",y:i+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return w(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,o.appendChild(r),o}function ne(t,e,n=!1){const i=getComputedStyle(e),{offsetLeft:s,offsetTop:o}=z(t.nodes,e),r=document.createElementNS("http://www.w3.org/2000/svg","rect");w(r,{x:s+"",y:o+"",rx:i.borderRadius,ry:i.borderRadius,width:i.width,height:i.height,fill:i.backgroundColor,stroke:i.borderColor,"stroke-width":i.borderWidth});const l=document.createElementNS("http://www.w3.org/2000/svg","g");l.appendChild(r);let c;return n?c=St(e,i,s,o):c=Lt(e,i,s,o),l.appendChild(c),l}function kt(t,e){const n=getComputedStyle(e),{offsetLeft:i,offsetTop:s}=z(t.nodes,e),o=document.createElementNS("http://www.w3.org/2000/svg","a"),r=document.createElementNS("http://www.w3.org/2000/svg","text");return w(r,{x:i+"",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,o.appendChild(r),o.setAttribute("href",e.href),o}const U=100,Mt='<?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">',Se=(t,e=!1)=>{var d,a,f;const n=t.nodes,i=n.offsetHeight+U*2,s=n.offsetWidth+U*2,o=Et(i+"px",s+"px"),r=document.createElementNS("http://www.w3.org/2000/svg","svg"),l=document.createElementNS("http://www.w3.org/2000/svg","rect");w(l,{x:"0",y:"0",width:`${s}`,height:`${i}`,fill:t.theme.cssVar["--bgcolor"]}),o.appendChild(l),n.querySelectorAll(".subLines").forEach(g=>{const p=g.cloneNode(!0),{offsetLeft:m,offsetTop:v}=z(n,g.parentElement);p.setAttribute("x",`${m}`),p.setAttribute("y",`${v}`),r.appendChild(p)});const c=(d=n.querySelector(".lines"))==null?void 0:d.cloneNode(!0);c&&r.appendChild(c);const u=(a=n.querySelector(".topiclinks"))==null?void 0:a.cloneNode(!0);u&&r.appendChild(u);const h=(f=n.querySelector(".summary"))==null?void 0:f.cloneNode(!0);return h&&r.appendChild(h),n.querySelectorAll("me-tpc").forEach(g=>{r.appendChild(ne(t,g,!e))}),n.querySelectorAll(".tags > span").forEach(g=>{r.appendChild(ne(t,g))}),n.querySelectorAll(".icons > span").forEach(g=>{r.appendChild(ne(t,g))}),n.querySelectorAll(".hyper-link").forEach(g=>{r.appendChild(kt(t,g))}),w(r,{x:U+"",y:U+"",overflow:"visible"}),o.appendChild(r),Mt+o.outerHTML};function $t(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=s=>{e(s.target.result)},i.onerror=s=>{n(s)},i.readAsDataURL(t)})}const Tt={getObjById:I,generateNewObj:$e,layout:De,linkDiv:We,editTopic:je,createWrapper:Pe,createParent:Be,createChildren:ze,createTopic:Oe,findEle:L,changeTheme:st,...ot,...{},...vt,..._t,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1){const e=Se(this,t),n=new Blob([e],{type:"image/svg+xml"}),i=await $t(n);return new Promise((s,o)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const l=document.createElement("canvas");l.width=r.width,l.height=r.height,l.getContext("2d").drawImage(r,0,0),l.toBlob(s,"image/png",1)},r.src=i,r.onerror=o})},exportSvg:function(t=!1){const e=Se(this,t);return new Blob([e],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"})),init(t){if(!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==v
|