r.bottom){const t=i.bottom-i.top,r=e.bottom-e.top+t;this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}var HC=jC;const UC=[!1,"center","right","justify"],qC=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],WC=[!1,"serif","monospace"],GC=["1","2","3",!1],VC=["small",!1,"large","huge"];class _C extends Ky{constructor(e,t){super(e,t);const n=t=>{document.body.contains(e.root)?(null==this.tooltip||this.tooltip.root.contains(t.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach(e=>{e.container.contains(t.target)||e.close()})):document.body.removeEventListener("click",n)};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return"toolbar"===e&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(e=>{const n=e.getAttribute("class")||"";n.split(/\s+/).forEach(n=>{if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"===typeof t[n])e.innerHTML=t[n];else{const r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(e=>{if(e.classList.contains("ql-align")&&(null==e.querySelector("option")&&XC(e,UC),"object"===typeof t.align))return new PC(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){const n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&XC(e,qC,"background"===n?"#ffffff":"#000000"),new FC(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?XC(e,WC):e.classList.contains("ql-header")?XC(e,GC):e.classList.contains("ql-size")&&XC(e,VC)),new zC(e)});const n=()=>{this.pickers.forEach(e=>{e.update()})};this.quill.on(ky.events.EDITOR_CHANGE,n)}}_C.DEFAULTS=Mp({},Ky.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");null==e&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class KC extends HC{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{"Enter"===e.key?(this.save(),e.preventDefault()):"Escape"===e.key&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);null!=n&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,ky.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,ky.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=YC(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(null!=t){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,ky.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(n+1," ",ky.sources.USER),this.quill.setSelection(n+2,ky.sources.USER)}break}default:}this.textbox.value="",this.hide()}}function YC(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function XC(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(t=>{const r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",String(t)),e.appendChild(r)})}const ZC=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class JC extends KC{constructor(e,t){super(e,t),this.quill.on(ky.events.EDITOR_CHANGE,(e,t,n,r)=>{if(e===ky.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&r===ky.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=this.root.offsetWidth+"px";const e=this.quill.getLines(t.index,t.length);if(1===e.length){const e=this.quill.getBounds(t);null!=e&&this.position(e)}else{const n=e[e.length-1],r=this.quill.getIndex(n),i=Math.min(n.length()-1,t.index+t.length-r),o=this.quill.getBounds(new Ty(r,i));null!=o&&this.position(o)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(ky.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(null!=e){const t=this.quill.getBounds(e);null!=t&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",0!==t&&(n.style.marginLeft=-1*t-n.offsetWidth/2+"px"),t}}Oc(JC,"TEMPLATE",[' ','"].join(""));class QC extends _C{constructor(e,t){null!=t.modules.toolbar&&null==t.modules.toolbar.container&&(t.modules.toolbar.container=ZC),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new JC(this.quill,this.options.bounds),null!=e.container&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),MC),this.buildPickers(e.container.querySelectorAll("select"),MC))}}QC.DEFAULTS=Mp({},_C.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,aw.sources.USER)}}}}});const $C=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class eT extends KC{constructor(...e){super(...e),Oc(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",e=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",e=>{if(null!=this.linkRange){const e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,"link",!1,ky.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()}),this.quill.on(ky.events.SELECTION_CHANGE,(e,t,n)=>{if(null!=e){if(0===e.length&&n===ky.sources.USER){const[t,n]=this.quill.scroll.descendant(mk,e.index);if(null!=t){this.linkRange=new Ty(e.index-n,t.length());const r=mk.formats(t.domNode);this.preview.textContent=r,this.preview.setAttribute("href",r),this.show();const i=this.quill.getBounds(this.linkRange);return void(null!=i&&this.position(i))}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Oc(eT,"TEMPLATE",[' ',' ',' ',' '].join(""));class tT extends _C{constructor(e,t){null!=t.modules.toolbar&&null==t.modules.toolbar.container&&(t.modules.toolbar.container=$C),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){null!=e.container&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),MC),this.buildPickers(e.container.querySelectorAll("select"),MC),this.tooltip=new eT(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}tT.DEFAULTS=Mp({},_C.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const e=this.quill.getSelection();if(null==e||0===e.length)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&0!==t.indexOf("mailto:")&&(t="mailto:"+t);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,aw.sources.USER)}}}}});var nT=tT;tk.register({"attributors/attribute/direction":Iw,"attributors/class/align":Cw,"attributors/class/background":Mw,"attributors/class/color":Aw,"attributors/class/direction":Fw,"attributors/class/font":Bw,"attributors/class/size":Uw,"attributors/style/align":Tw,"attributors/style/background":Nw,"attributors/style/color":Ew,"attributors/style/direction":Rw,"attributors/style/font":Hw,"attributors/style/size":qw},!0),tk.register({"formats/align":Cw,"formats/direction":Fw,"formats/indent":ik,"formats/background":Nw,"formats/color":Ew,"formats/font":Bw,"formats/size":Uw,"formats/blockquote":ak,"formats/code-block":Dw,"formats/header":lk,"formats/list":hk,"formats/bold":dk,"formats/code":Lw,"formats/italic":pk,"formats/link":mk,"formats/script":bk,"formats/strike":wk,"formats/underline":kk,"formats/formula":Tk,"formats/image":Ek,"formats/video":Ok,"modules/syntax":Rk,"modules/table":Wk,"modules/toolbar":Vk,"themes/bubble":QC,"themes/snow":nT,"ui/icons":MC,"ui/picker":zC,"ui/icon-picker":PC,"ui/color-picker":FC,"ui/tooltip":HC},!0);var rT=tk;n("5ba9");let iT=!1,oT=["宋体, SimSun, Songti SC","微软雅黑, Microsoft YaHei","楷体, 楷体_GB2312, SimKai, STKaiti","黑体, SimHei, Heiti SC","隶书, SimLi","andale mono","arial, helvetica, sans-serif","arial black, avant garde","comic sans ms","impact, chicago","times new roman","sans-serif","serif"],aT=new Array(100).fill(0).map((e,t)=>t+"px");class sT{constructor({mindMap:e,pluginOpt:t}){this.mindMap=e,this.pluginOpt=t,this.textEditNode=null,this.showTextEdit=!1,this.quill=null,this.range=null,this.lastRange=null,this.pasteUseRange=null,this.node=null,this.isInserting=!1,this.styleEl=null,this.cacheEditingText="",this.lostStyle=!1,this.isCompositing=!1,this.textNodePaddingX=6,this.textNodePaddingY=4,this.initOpt(),this.extendQuill(),this.appendCss(),this.bindEvent(),this.mindMap.opt.data&&(this.mindMap.opt.data=this.handleSetData(this.mindMap.opt.data))}bindEvent(){this.onCompositionStart=this.onCompositionStart.bind(this),this.onCompositionUpdate=this.onCompositionUpdate.bind(this),this.onCompositionEnd=this.onCompositionEnd.bind(this),window.addEventListener("compositionstart",this.onCompositionStart),window.addEventListener("compositionupdate",this.onCompositionUpdate),window.addEventListener("compositionend",this.onCompositionEnd)}unbindEvent(){window.removeEventListener("compositionstart",this.onCompositionStart),window.removeEventListener("compositionupdate",this.onCompositionUpdate),window.removeEventListener("compositionend",this.onCompositionEnd)}appendCss(){let e="\n .ql-editor {\n overflow: hidden;\n padding: 0;\n height: auto;\n line-height: normal;\n -webkit-user-select: text;\n }\n \n .ql-container {\n height: auto;\n font-size: inherit;\n }\n\n .ql-container.ql-snow {\n border: none;\n }\n\n .smm-richtext-node-wrap {\n word-break: break-all;\n }\n\n .smm-richtext-node-wrap p {\n font-family: auto;\n \n }\n\n .smm-richtext-node-edit-wrap p {\n font-family: auto;\n }\n ";this.styleEl=document.createElement("style"),this.styleEl.type="text/css",this.styleEl.innerHTML=e,document.head.appendChild(this.styleEl)}initOpt(){this.pluginOpt.fontFamilyList&&Array.isArray(this.pluginOpt.fontFamilyList)&&(oT=this.pluginOpt.fontFamilyList),this.pluginOpt.fontSizeList&&Array.isArray(this.pluginOpt.fontSizeList)&&(aT=this.pluginOpt.fontSizeList)}extendQuill(){if(iT)return;iT=!0,this.extendFont([]);const e=rT.import("attributors/class/size");e.whitelist=aT,rT.register(e,!0);const t=rT.import("attributors/style/size");t.whitelist=aT,rT.register(t,!0)}extendFont(e=[],t=!1){oT=t?[...e]:[...oT,...e];const n=rT.import("attributors/class/font");n.whitelist=oT,rT.register(n,!0);const r=rT.import("attributors/style/font");r.whitelist=oT,rT.register(r,!0)}showEditText({node:e,rect:t,isInserting:n,isFromKeyDown:r,isFromScale:i}){if(this.showTextEdit)return;const{richTextEditFakeInPlace:o,customInnerElsAppendTo:a,nodeTextEditZIndex:s,textAutoWrapWidth:l,selectTextOnEnterEditText:c,transformRichTextOnEnterEdit:h}=this.mindMap.opt;this.node=e,this.isInserting=n,t||(t=e._textData.node.node.getBoundingClientRect()),i||this.mindMap.emit("before_show_text_edit"),this.mindMap.renderer.textEdit.registerTmpShortcut();let u=e._textData.node,d=u.attr("data-width"),f=u.attr("data-height"),p=t.width/d,m=t.height/f,g=this.textNodePaddingX,v=this.textNodePaddingY;if(o){let t=e.getPaddingVale();g=t.paddingX,v=t.paddingY}if(!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.classList.add("smm-richtext-node-edit-wrap"),this.textEditNode.style.cssText=`\n position:fixed; \n box-sizing: border-box; \n box-shadow: 0 0 20px rgba(0,0,0,.5);\n outline: none; \n word-break: \n break-all;\n padding: ${v}px ${g}px;\n `,this.textEditNode.addEventListener("click",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("mousedown",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("keydown",e=>{this.mindMap.renderer.textEdit.checkIsAutoEnterTextEditKey(e)&&e.stopPropagation()});const e=a||document.body;e.appendChild(this.textEditNode)}this.textEditNode.style.marginLeft=`-${g*p}px`,this.textEditNode.style.marginTop=`-${v*m}px`,this.textEditNode.style.zIndex=s,this.textEditNode.style.background=this.getBackground(e),this.textEditNode.style.minWidth=d+2*g+"px",this.textEditNode.style.minHeight=f+"px",this.textEditNode.style.left=t.left+"px",this.textEditNode.style.top=t.top+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=l+2*g+"px",this.textEditNode.style.transform=`scale(${p}, ${m})`,this.textEditNode.style.transformOrigin="left top",o&&(this.textEditNode.style.borderRadius=(e.style.merge("borderRadius")||5)+"px","roundedRectangle"==e.style.merge("shape")&&(this.textEditNode.style.borderRadius=(e.height||50)+"px"));let y=e.getData("text");"function"===typeof h&&(y=h(y));const w=Object(b["X"])(y),x=!e.getData("richText")&&!w;if(w&&(this.lostStyle=!0),x){let e=String(y).split(/\n/gim).join(" "),t=`${e}
`;this.textEditNode.innerHTML=this.cacheEditingText||t}else this.textEditNode.innerHTML=this.cacheEditingText||y;this.initQuillEditor(),document.querySelector(".ql-editor").style.minHeight=f+"px",this.showTextEdit=!0,this.focus(n||c&&!r?0:null),x&&this.setTextStyleIfNotRichText(e),this.cacheEditingText=""}updateTextEditNode(){if(!this.node)return;const e=this.node._textData.node.node.getBoundingClientRect(),t=this.node._textData.node,n=t.attr("data-width"),r=t.attr("data-height");this.textEditNode.style.minWidth=n+2*this.textNodePaddingX+"px",this.textEditNode.style.minHeight=r+"px",this.textEditNode.style.left=e.left+"px",this.textEditNode.style.top=e.top+"px"}removeTextEditEl(){if(!this.textEditNode)return;const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.removeChild(this.textEditNode)}getBackground(e){const t=e.style.merge("gradientStyle");if(t){const t=e.style.merge("startColor"),n=e.style.merge("endColor");return`linear-gradient(to right, ${t}, ${n})`}{const t=e.style.merge("fillColor"),n=e.style.merge("color");return"transparent"===t?Object(b["Y"])(n)?Object(b["O"])(this.mindMap.themeConfig):"#fff":t}}setTextStyleIfNotRichText(e){let t={font:e.style.merge("fontFamily"),color:e.style.merge("color"),italic:"italic"===e.style.merge("fontStyle"),bold:"bold"===e.style.merge("fontWeight"),size:e.style.merge("fontSize")+"px",underline:"underline"===e.style.merge("textDecoration"),strike:"line-through"===e.style.merge("textDecoration")};this.pureFormatAllText(t)}getEditText(){let e=this.quill.container.firstChild.innerHTML;return e.replace(/ <\/p>$/,"")}sortHtmlNodeStyles(e){return e.replace(/(<[^<>]+\s+style=")([^"]+)("\s*>)/g,(e,t,n,r)=>{let i=n.match(/[^:]+:[^:]+;/g)||[];return i=i.map(e=>e.trim()),i.sort(),t+i.join("")+r})}hideEditText(e){if(!this.showTextEdit)return;const{beforeHideRichTextEdit:t}=this.mindMap.opt;"function"===typeof t&&t(this);let n=this.getEditText();n=this.sortHtmlNodeStyles(n);let r=e&&e.length>0?e:this.mindMap.renderer.activeNodeList;r.forEach(e=>{this.mindMap.execCommand("SET_NODE_TEXT",e,n,!0),this.mindMap.render()});const i=this.node;this.textEditNode.style.display="none",this.showTextEdit=!1,this.mindMap.emit("rich_text_selection_change",!1),this.node=null,this.isInserting=!1,this.mindMap.emit("hide_text_edit",this.textEditNode,r,i)}initQuillEditor(){this.quill=new rT(this.textEditNode,{modules:{toolbar:!1,keyboard:{bindings:{enter:{key:"Enter",handler:function(){}},shiftEnter:{key:"Enter",shiftKey:!0,handler:function(e,t){const n=Object.keys(t.format).reduce((e,n)=>(this.quill.scroll.query(n,Np.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e),{}),r=(new ym.a).retain(e.index).delete(e.length).insert("\n",n);this.quill.updateContents(r,rT.sources.USER),this.quill.setSelection(e.index+1,rT.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(e=>{null==n[e]&&(Array.isArray(t.format[e])||"code"!==e&&"link"!==e&&this.quill.format(e,t.format[e],rT.sources.USER))})}},tab:{key:9,handler:function(){}}}}},theme:"snow"}),this.quill.root.addEventListener("copy",e=>{e.preventDefault();const t=window.getSelection(),n=t.toString();try{const n=t.getRangeAt(0),r=document.createElement("div");r.appendChild(n.cloneContents());const i=Object(b["eb"])(r.innerHTML);e.clipboardData.setData("text/plain",i)}catch(r){e.clipboardData.setData("text/plain",n)}}),this.quill.on("selection-change",e=>{if(!this.isInserting)if(this.lastRange=this.range,this.range=null,e){this.pasteUseRange=e;let t=this.quill.getBounds(e.index,e.length),n=this.textEditNode.getBoundingClientRect(),r={left:t.left+n.left,top:t.top+n.top,right:t.right+n.left,bottom:t.bottom+n.top,width:t.width},i=this.quill.getFormat(e.index,e.length),o=!1;0==e.length?o=!1:(this.range=e,o=!0),this.mindMap.emit("rich_text_selection_change",o,r,i)}else this.mindMap.emit("rich_text_selection_change",!1,null,null)}),this.quill.on("text-change",()=>{let e=this.quill.getContents(),t=e.ops.length;t<=0||1===t&&"\n"===e.ops[0].insert?(this.lostStyle=!0,this.syncFormatToNodeConfig(null,!0)):this.lostStyle&&!this.isCompositing&&(this.setTextStyleIfNotRichText(this.node),this.lostStyle=!1),this.mindMap.emit("node_text_edit_change",{node:this.node,text:this.getEditText(),richText:!0})}),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(e,t)=>{let n=[],r=this.getPasteTextStyle();return t.ops.forEach(e=>{e.insert&&"string"===typeof e.insert&&n.push({attributes:{...r},insert:this.formatPasteText(e.insert)})}),t.ops=n,t}),this.quill.root.addEventListener("paste",e=>{e.clipboardData&&e.clipboardData.files&&e.clipboardData.files.length&&e.preventDefault()},!0)}getPasteTextStyle(){return this.pasteUseRange?this.quill.getFormat(this.pasteUseRange.index,this.pasteUseRange.length):{}}formatPasteText(e){const{isSmm:t,data:n}=Object(b["k"])(e);return t&&n[0]&&n[0].data?Object(b["L"])(n[0].data.text):e}onCompositionStart(){this.showTextEdit&&(this.isCompositing=!0)}onCompositionUpdate(){this.showTextEdit&&this.node&&this.mindMap.emit("node_text_edit_change",{node:this.node,text:this.getEditText(),richText:!0})}onCompositionEnd(){this.showTextEdit&&(this.isCompositing=!1,this.lostStyle&&this.setTextStyleIfNotRichText(this.node))}selectAll(){this.quill.setSelection(0,this.quill.getLength())}focus(e){let t=this.quill.getLength();this.quill.setSelection("number"===typeof e?e:t,t)}formatText(e={},t=!1,n=!1){if(!this.range&&!this.lastRange)return;n||this.syncFormatToNodeConfig(e,t);let r=!this.range,i=r?this.lastRange:this.range;t?this.quill.removeFormat(i.index,i.length):this.quill.formatText(i.index,i.length,e),r&&this.quill.setSelection(this.lastRange.index,this.lastRange.length)}removeFormat(){this.formatText({},!0);const e={};this.node&&["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color"].forEach(t=>{e[t]=this.node.style.merge(t)});const t=this.normalStyleToRichTextStyle(e);this.formatText(t,!1,!0)}formatRangeText(e,t={}){e&&(this.syncFormatToNodeConfig(t),this.quill.formatText(e.index,e.length,t))}formatAllText(e={}){this.syncFormatToNodeConfig(e),this.pureFormatAllText(e)}pureFormatAllText(e={}){this.quill.formatText(0,this.quill.getLength(),e)}syncFormatToNodeConfig(e,t){if(this.node)if(t)["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color"].forEach(e=>{delete this.node.nodeData.data[e]});else{let t=this.richTextStyleToNormalStyle(e);this.mindMap.execCommand("SET_NODE_DATA",this.node,t)}}normalStyleToRichTextStyle(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];switch(n){case"fontFamily":t.font=r;break;case"fontSize":t.size=r+"px";break;case"fontWeight":t.bold="bold"===r;break;case"fontStyle":t.italic="italic"===r;break;case"textDecoration":t.underline="underline"===r,t.strike="line-through"===r;break;case"color":t.color=r;break;default:break}}),t}richTextStyleToNormalStyle(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];switch(n){case"font":t.fontFamily=r;break;case"size":t.fontSize=parseFloat(r);break;case"bold":t.fontWeight=r?"bold":"normal";break;case"italic":t.fontStyle=r?"italic":"normal";break;case"underline":t.textDecoration=r?"underline":"none";break;case"strike":t.textDecoration=r?"line-through":"none";break;case"color":t.color=r;break;default:break}}),t}setNotActiveNodeStyle(e,t){const n=this.normalStyleToRichTextStyle(t);Object.keys(n).length>0&&(this.showEditText({node:e}),this.formatAllText(n),this.hideEditText([e]))}checkNodeHasCustomRichTextStyle(e){const t=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color"],n=e instanceof Is?e.getData():e;for(let r=0;r{if(e.data.richText&&(e.data.richText=!1,e.data.text=Object(b["L"])(e.data.text)),e.data){const t=Object(b["x"])(e.data);t.forEach(e=>{e.richText=!1,e.text=Object(b["L"])(e.text)})}},null,!0,0,0),this.mindMap.command.clearHistory(),this.mindMap.command.addHistory(),this.mindMap.render(null,oa["a"].TRANSFORM_TO_NORMAL_NODE))}handleSetData(e){let t=e=>{if(e.data&&!e.data.richText&&(e.data.richText=!0,e.data.resetRichText=!0),e.data){const t=Object(b["x"])(e.data);t.forEach(e=>{e.richText=!0,e.resetRichText=!0})}e.children&&e.children.length>0&&Array.from(e.children).forEach(e=>{t(e)})};return t(e),e}beforePluginRemove(){this.transformAllNodesToNormalNode(),document.head.removeChild(this.styleEl),this.unbindEvent()}beforePluginDestroy(){document.head.removeChild(this.styleEl),this.unbindEvent()}}sT.instanceName="richText";var lT=sT,cT=n("0f9c");const hT=(e,t)=>e.getData("associativeLineTargets").findIndex(e=>e===t.getData("uid")),uT=(e,t,n,r)=>{const i=5;let o=e+(n-e)/2,a=t,s=o,l=r;return Math.abs(e-n)<=i&&(o=e+(r-t)/2,s=o),Math.abs(t-r)<=i&&(o=e,a=t-(n-e)/2,s=n,l=a),[{x:o,y:a},{x:s,y:l}]},dT=(e,t,n,r)=>`M ${e.x},${e.y} C ${n.x},${n.y} ${r.x},${r.y} ${t.x},${t.y}`,fT=e=>{let{left:t,top:n,width:r,height:i}=e;return{right:t+r,bottom:n+i,left:t,top:n,width:r,height:i}},pT=(e,t,n,r)=>{let i=uT(e,t,n,r);return dT({x:e,y:t},{x:n,y:r},i[0],i[1])},mT=(e,t)=>{const{left:n,top:r,translateLeft:i,translateTop:o,width:a,height:s}=e,l=t.clientX,c=t.clientY,h=i+a/2,u=o+s/2,d=n+a/2,f=r+s/2,p=Math.atan(s/a),m=l-h,g=u-c,v=Math.atan2(g,m);let b=n+a,y=r+s;if(v=-p){const e=v*(a/2);return(v
=0||v>=-p&&v<0)&&(y=f-e),{x:b,y:y,dir:"right",range:e}}if(v>=p&&v=p){const t=s/2/v;e=-t,b=d+t}else if(v>=Math.PI/2-p&&v=p-Math.PI){let e=0;if(v>=p-Math.PI/2&&v<-p){const t=s/2/v;e=t,b=d-t}else if(v=p-Math.PI){const t=(h-l)/(u-c),n=s/2*t;e=-n,b=d+n}return{x:b,y:y,dir:"bottom",range:e}}b=n;const w=(u-c)/(h-l),x=w*(a/2);return(v>=-Math.PI&&v=Math.PI-p)&&(y=f-x),{x:b,y:y,dir:"left",range:x}},gT=(e,t="right",n=0,r=null)=>{let{left:i,top:o,width:a,height:s}=e;if(r)return mT(e,r);switch(t){case"left":return{x:i,y:o+s/2-n,dir:t};case"right":return{x:i+a,y:o+s/2-n,dir:t};case"top":return{x:i+a/2-n,y:o,dir:t};case"bottom":return{x:i+a/2-n,y:o+s,dir:t};default:break}},vT=(e,t)=>{const n=fT(e),r=fT(t);let i="",o="";const a=Object(b["J"])({x:n.left,y:n.top,width:n.width,height:n.height},{x:r.left,y:r.top,width:r.width,height:r.height});switch(a){case"left-top":i="right",o="top";break;case"right-top":i="left",o="top";break;case"right-bottom":i="left",o="bottom";break;case"left-bottom":i="right",o="bottom";break;case"left":i="right",o="left";break;case"right":i="left",o="right";break;case"top":i="right",o="right";break;case"bottom":i="left",o="left";break;case"overlap":i="right",o="right";break;default:break}return[gT(e,i),gT(t,o)]},bT=(e,t,n,r)=>{let i=hT(n,r),o=[],a=n.getData("associativeLineTargetControlOffsets");if(a&&a[i]){let n=a[i];o=[{x:e.x+n[0].x,y:e.y+n[0].y},{x:t.x+n[1].x,y:t.y+n[1].y}]}else o=uT(e.x,e.y,t.x,t.y);return{path:dT(e,t,o[0],o[1]),controlPoints:o}},yT=(e,t)=>{let n=uT(e.x,e.y,t.x,t.y);return[{x:n[0].x-e.x,y:n[0].y-e.y},{x:n[1].x-t.x,y:n[1].y-t.y}]};function wT(){let{associativeLineActiveColor:e}=this.mindMap.themeConfig;this.controlLine1=this.associativeLineDraw.line().stroke({color:e,width:2}),this.controlLine2=this.associativeLineDraw.line().stroke({color:e,width:2}),this.controlPoint1=this.createOneControlNode("controlPoint1"),this.controlPoint2=this.createOneControlNode("controlPoint2")}function xT(e){let{associativeLineActiveColor:t}=this.mindMap.themeConfig;return this.associativeLineDraw.circle(this.controlPointDiameter).stroke({color:t}).fill({color:"#fff"}).click(e=>{e.stopPropagation()}).mousedown(t=>{this.onControlPointMousedown(t,e)})}function kT(e,t){e.stopPropagation(),e.preventDefault(),this.isControlPointMousedown=!0,this.mousedownControlPointKey=t}function CT(e){if(!this.isControlPointMousedown||!this.mousedownControlPointKey||!this[this.mousedownControlPointKey])return;e.stopPropagation(),e.preventDefault();let t=this.controlPointDiameter/2,{x:n,y:r}=this.getTransformedEventPos(e);this.controlPointMousemoveState.pos={x:n,y:r},this[this.mousedownControlPointKey].x(n-t).y(r-t);let[,,,i,o]=this.activeLine,a=hT(i,o),{associativeLinePoint:s,associativeLineTargetControlOffsets:l}=i.getData();s=s||[];const c=this.getNodePos(i),h=this.getNodePos(o);let[u,d]=this.updateAllLinesPos(i,o,s[a]);this.controlPointMousemoveState.startPoint=u,this.controlPointMousemoveState.endPoint=d,this.controlPointMousemoveState.targetIndex=a;let f=[];f=l?l[a]:yT(u,d);let p=null,m=null;const{x:g,y:v}=this.mindMap.toPos(e.clientX,e.clientY),b={clientX:g,clientY:v};"controlPoint1"===this.mousedownControlPointKey?(u=gT(c,"",0,b),p={x:n,y:r},m={x:d.x+f[1].x,y:d.y+f[1].y},u&&(this.controlPointMousemoveState.startPoint=u,this.controlLine1.plot(u.x,u.y,p.x,p.y))):(d=gT(h,"",0,b),p={x:u.x+f[0].x,y:u.y+f[0].y},m={x:n,y:r},d&&(this.controlPointMousemoveState.endPoint=d,this.controlLine2.plot(d.x,d.y,m.x,m.y))),this.updataAassociativeLine(u,d,p,m,this.activeLine)}function TT(e,t,n,r,i){const[o,a,s]=i,l=dT(e,t,n,r);o.plot(l),a.plot(l),this.updateTextPos(o,s),this.updateTextEditBoxPos(s)}function ST(e){if(!this.isControlPointMousedown)return;e.stopPropagation(),e.preventDefault();let{pos:t,startPoint:n,endPoint:r,targetIndex:i}=this.controlPointMousemoveState,[,,,o]=this.activeLine,a=[],{associativeLinePoint:s,associativeLineTargetControlOffsets:l}=o.getData();s||(s=[]),s[i]=s[i]||{startPoint:n,endPoint:r},l?a=l:a[i]=yT(n,r);let c=null,h=null;"controlPoint1"===this.mousedownControlPointKey?(c={x:t.x-n.x,y:t.y-n.y},h=a[i][1],s[i].startPoint=n):(c=a[i][0],h={x:t.x-r.x,y:t.y-r.y},s[i].endPoint=r),a[i]=[c,h],this.mindMap.execCommand("SET_NODE_DATA",o,{associativeLineTargetControlOffsets:a,associativeLinePoint:s}),setTimeout(()=>{this.resetControlPoint()},0)}function AT(){this.isControlPointMousedown=!1,this.mousedownControlPointKey="",this.controlPointMousemoveState={pos:null,startPoint:null,endPoint:null,targetIndex:""}}function ET(e,t,n,r){if(!this.mindMap.opt.enableAdjustAssociativeLinePoints)return;this.controlLine1||this.createControlNodes();let i=this.controlPointDiameter/2;this.controlLine1.plot(e.x,e.y,n.x,n.y),this.controlLine2.plot(t.x,t.y,r.x,r.y),this.controlPoint1.x(n.x-i).y(n.y-i),this.controlPoint2.x(r.x-i).y(r.y-i)}function MT(){this.controlLine1&&([this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.remove()}),this.controlLine1=null,this.controlLine2=null,this.controlPoint1=null,this.controlPoint2=null)}function NT(){this.controlLine1&&[this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.hide()})}function OT(){this.controlLine1&&[this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.show()})}var DT={createControlNodes:wT,createOneControlNode:xT,onControlPointMousedown:kT,onControlPointMousemove:CT,onControlPointMouseup:ST,resetControlPoint:AT,renderControls:ET,removeControls:MT,hideControls:NT,showControls:OT,updataAassociativeLine:TT};function LT(e){let t=this.associativeLineDraw.group();const n=()=>{this.activeLine&&this.activeLine[3]===e.node&&this.activeLine[4]===e.toNode||this.setActiveLine({...e,text:t})};return t.click(e=>{e.stopPropagation(),n()}),t.on("dblclick",e=>{e.stopPropagation(),n(),this.activeLine&&this.showEditTextBox(t)}),t}function zT(e){if(this.mindMap.emit("before_show_text_edit"),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.style.cssText="position:fixed;box-sizing: border-box;background-color:#fff;box-shadow: 0 0 20px rgba(0,0,0,.5);padding: 3px 5px;margin-left: -5px;margin-top: -3px;outline: none; word-break: break-all;",this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("click",e=>{e.stopPropagation()});const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.appendChild(this.textEditNode)}let{associativeLineTextFontSize:t,associativeLineTextFontFamily:n,associativeLineTextLineHeight:r}=this.mindMap.themeConfig,{defaultAssociativeLineText:i,nodeTextEditZIndex:o}=this.mindMap.opt,a=this.mindMap.view.scale,[,,,s,l]=this.activeLine,c=this.getText(s,l),h=(c||i).split(/\n/gim);this.textEditNode.style.fontFamily=n,this.textEditNode.style.fontSize=t*a+"px",this.textEditNode.style.lineHeight=h.length>1?r:"normal",this.textEditNode.style.zIndex=o,this.textEditNode.innerHTML=h.join(" "),this.textEditNode.style.display="block",this.updateTextEditBoxPos(e),this.showTextEdit=!0,""===c||c===i?Object(b["pb"])(this.textEditNode):Object(b["v"])(this.textEditNode)}function IT(){if(!this.textEditNode)return;const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.removeChild(this.textEditNode)}function FT(){this.hideEditTextBox()}function RT(e){let t=e.node.getBoundingClientRect();this.textEditNode&&(this.textEditNode.style.minWidth=t.width+10+"px",this.textEditNode.style.minHeight=t.height+6+"px",this.textEditNode.style.left=t.left+"px",this.textEditNode.style.top=t.top+"px")}function PT(){if(!this.showTextEdit)return;let[e,,t,n,r]=this.activeLine,i=Object(b["K"])(this.textEditNode.innerHTML),o=i===this.mindMap.opt.defaultAssociativeLineText;i=o?"":i,this.mindMap.execCommand("SET_NODE_DATA",n,{associativeLineText:{...n.getData("associativeLineText")||{},[r.getData("uid")]:i}}),this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.showTextEdit=!1,this.renderText(i,e,t),this.mindMap.emit("hide_text_edit")}function BT(e,t){let n=e.getData("associativeLineText");return n&&n[t.getData("uid")]||""}function jT(e,t,n){if(!e)return;let{associativeLineTextFontSize:r,associativeLineTextLineHeight:i}=this.mindMap.themeConfig;n.clear();let o=e.split(/\n/gim);o.forEach((e,t)=>{let o=(new va["j"]).text(e);o.y(r*i*t),this.styleText(o),n.add(o)}),UT(t,n)}function HT(e){let{associativeLineTextColor:t,associativeLineTextFontSize:n,associativeLineTextFontFamily:r}=this.mindMap.themeConfig;e.fill({color:t}).css({"font-family":r,"font-size":n})}function UT(e,t){let n=e.length(),r=e.pointAt(n/2),{width:i,height:o}=t.bbox();t.x(r.x-i/2),t.y(r.y-o/2)}var qT={getText:BT,createText:LT,styleText:HT,onScale:FT,showEditTextBox:zT,removeTextEditEl:IT,hideEditTextBox:PT,updateTextEditBoxPos:RT,renderText:jT,updateTextPos:UT};class WT{constructor(e={}){this.mindMap=e.mindMap,this.associativeLineDraw=this.mindMap.associativeLineDraw,this.lineList=[],this.activeLine=null,this.isCreatingLine=!1,this.creatingStartNode=null,this.creatingLine=null,this.overlapNode=null,this.isNodeDragging=!1,this.markerPath=null,this.marker=this.createMarker(),this.controlLine1=null,this.controlLine2=null,this.controlPoint1=null,this.controlPoint2=null,this.controlPointDiameter=10,this.isControlPointMousedown=!1,this.mousedownControlPointKey="",this.controlPointMousemoveState={pos:null,startPoint:null,endPoint:null,targetIndex:""},this.checkOverlapNode=Object(b["ub"])(this.checkOverlapNode,100,this),Object.keys(DT).forEach(e=>{this[e]=DT[e].bind(this)}),Object.keys(qT).forEach(e=>{this[e]=qT[e].bind(this)}),this.bindEvent()}bindEvent(){this.renderAllLines=this.renderAllLines.bind(this),this.onDrawClick=this.onDrawClick.bind(this),this.onNodeClick=this.onNodeClick.bind(this),this.removeLine=this.removeLine.bind(this),this.addLine=this.addLine.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onNodeDragging=this.onNodeDragging.bind(this),this.onNodeDragend=this.onNodeDragend.bind(this),this.onControlPointMouseup=this.onControlPointMouseup.bind(this),this.onBeforeDestroy=this.onBeforeDestroy.bind(this),this.mindMap.on("node_tree_render_end",this.renderAllLines),this.mindMap.on("data_change",this.renderAllLines),this.mindMap.on("draw_click",this.onDrawClick),this.mindMap.on("node_click",this.onNodeClick),this.mindMap.on("contextmenu",this.onDrawClick),this.mindMap.keyCommand.addShortcut("Del|Backspace",this.removeLine),this.mindMap.command.add("ADD_ASSOCIATIVE_LINE",this.addLine),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("node_dragging",this.onNodeDragging),this.mindMap.on("node_dragend",this.onNodeDragend),this.mindMap.on("mouseup",this.onControlPointMouseup),this.mindMap.on("scale",this.onScale),this.mindMap.on("beforeDestroy",this.onBeforeDestroy)}unBindEvent(){this.mindMap.off("node_tree_render_end",this.renderAllLines),this.mindMap.off("data_change",this.renderAllLines),this.mindMap.off("draw_click",this.onDrawClick),this.mindMap.off("node_click",this.onNodeClick),this.mindMap.off("contextmenu",this.onDrawClick),this.mindMap.keyCommand.removeShortcut("Del|Backspace",this.removeLine),this.mindMap.command.remove("ADD_ASSOCIATIVE_LINE",this.addLine),this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("node_dragging",this.onNodeDragging),this.mindMap.off("node_dragend",this.onNodeDragend),this.mindMap.off("mouseup",this.onControlPointMouseup),this.mindMap.off("scale",this.onScale),this.mindMap.off("beforeDestroy",this.onBeforeDestroy)}onBeforeDestroy(){this.hideEditTextBox(),this.removeTextEditEl()}onDrawClick(){this.isCreatingLine&&this.cancelCreateLine(),this.isControlPointMousedown||this.clearActiveLine()}onNodeClick(e){this.isCreatingLine?this.completeCreateLine(e):this.clearActiveLine()}createMarker(){return this.associativeLineDraw.marker(20,20,e=>{e.ref(12,5),e.size(10,10),e.attr("orient","auto-start-reverse"),this.markerPath=e.path("M0,0 L2,5 L0,10 L10,5 Z")})}updateAllLinesPos(e,t,n){n=n||{};let[r,i]=vT(e,t),o=0,a="",s=0,l="";return n.startPoint&&(o=n.startPoint.range||0,a=n.startPoint.dir||"right",r=gT(e,a,o)),n.endPoint&&(s=n.endPoint.range||0,l=n.endPoint.dir||"right",i=gT(t,l,s)),[r,i]}renderAllLines(){this.removeAllLines(),this.removeControls(),this.clearActiveLine();let e=this.mindMap.renderer.root;if(!e)return;let t=new Map,n=new Map;Object(b["wb"])(e,null,e=>{if(!e)return;let r=e.getData();r.associativeLineTargets&&r.associativeLineTargets.length>0&&n.set(e,r.associativeLineTargets),r.uid&&t.set(r.uid,e)},()=>{},!0,0),n.forEach((e,n)=>{e.forEach((e,r)=>{let i=t.get(e);if(!n||!i)return;const o=(n.getData("associativeLinePoint")||[])[r],[a,s]=this.updateAllLinesPos(n,i,o);this.drawLine(a,s,n,i)})})}drawLine(e,t,n,r){let{associativeLineWidth:i,associativeLineColor:o,associativeLineActiveWidth:a,associativeLineActiveColor:s,associativeLineDasharray:l}=this.mindMap.themeConfig;this.markerPath.stroke({color:o}).fill({color:o});let{path:c,controlPoints:h}=bT(e,t,n,r),u=this.associativeLineDraw.path();u.stroke({width:i,color:o,dasharray:l||[6,4]}).fill({color:"none"}),u.plot(c),u.marker("end",this.marker);let d=this.associativeLineDraw.path();d.stroke({width:a,color:"transparent"}).fill({color:"none"}),d.plot(c);let f=this.createText({path:u,clickPath:d,node:n,toNode:r,startPoint:e,endPoint:t,controlPoints:h});d.click(i=>{i.stopPropagation(),this.setActiveLine({path:u,clickPath:d,text:f,node:n,toNode:r,startPoint:e,endPoint:t,controlPoints:h})}),d.dblclick(()=>{this.activeLine&&this.showEditTextBox(f)}),this.renderText(this.getText(n,r),u,f),this.lineList.push([u,d,f,n,r])}setActiveLine({path:e,clickPath:t,text:n,node:r,toNode:i,startPoint:o,endPoint:a,controlPoints:s}){let{associativeLineActiveColor:l}=this.mindMap.themeConfig;this.mindMap.execCommand("CLEAR_ACTIVE_NODE"),this.clearActiveLine(),this.activeLine=[e,t,n,r,i],t.stroke({color:l}),this.getText(r,i)||this.renderText(this.mindMap.opt.defaultAssociativeLineText,e,n),this.renderControls(o,a,s[0],s[1]),this.mindMap.emit("associative_line_click",e,t,r,i),this.front()}removeAllLines(){this.lineList.forEach(e=>{e[0].remove(),e[1].remove(),e[2].remove()}),this.lineList=[]}createLineFromActiveNode(){if(this.mindMap.renderer.activeNodeList.length<=0)return;let e=this.mindMap.renderer.activeNodeList[0];this.createLine(e)}createLine(e){let{associativeLineWidth:t,associativeLineColor:n,associativeLineDasharray:r}=this.mindMap.themeConfig;!this.isCreatingLine&&e&&(this.front(),this.isCreatingLine=!0,this.creatingStartNode=e,this.creatingLine=this.associativeLineDraw.path(),this.creatingLine.stroke({width:t,color:n,dasharray:r||[6,4]}).fill({color:"none"}),this.markerPath.stroke({color:n}).fill({color:n}),this.creatingLine.marker("end",this.marker))}cancelCreateLine(){this.isCreatingLine=!1,this.creatingStartNode=null,this.creatingLine.remove(),this.creatingLine=null,this.overlapNode=null,this.back()}onMousemove(e){this.onControlPointMousemove(e),this.updateCreatingLine(e)}updateCreatingLine(e){if(!this.isCreatingLine)return;let{x:t,y:n}=this.getTransformedEventPos(e),r=gT(this.creatingStartNode),i=t>r.x?-10:10,o=pT(r.x,r.y,t+i,n);this.creatingLine.plot(o),this.checkOverlapNode(t,n)}getTransformedEventPos(e){let{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY),{scaleX:r,scaleY:i,translateX:o,translateY:a}=this.mindMap.draw.transform();return{x:(t-o)/r,y:(n-a)/i}}getNodePos(e){const{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.mindMap.draw.transform(),{left:o,top:a,width:s,height:l}=e;let c=o*t+r,h=a*n+i;return{left:o,top:a,translateLeft:c,translateTop:h,width:s,height:l}}checkOverlapNode(e,t){this.overlapNode=null,Object(b["e"])(this.mindMap.renderer.root,n=>{if(n.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",n,!1),n.uid===this.creatingStartNode.uid||this.overlapNode)return;let{left:r,top:i,width:o,height:a}=n,s=r+o,l=i+a;e>=r&&e<=s&&t>=i&&t<=l&&(this.overlapNode=n)}),this.overlapNode&&!this.overlapNode.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)}completeCreateLine(e){this.creatingStartNode.uid!==e.uid&&(this.addLine(this.creatingStartNode,e),this.overlapNode&&this.overlapNode.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!1),this.cancelCreateLine())}addLine(e,t){if(!e||!t)return;let n=t.getData("uid");n||(n=Object(cT["a"])(),this.mindMap.execCommand("SET_NODE_DATA",t,{uid:n}));let r=e.getData("associativeLineTargets")||[];const i=r.some(e=>e===n);if(i)return;r.push(n);let[o,a]=vT(e,t),s=uT(o.x,o.y,a.x,a.y);const{associativeLineInitPointsPosition:l}=this.mindMap.opt;if(l){const{from:e,to:t}=l;e&&(o.dir=e),t&&(a.dir=t)}let c=e.getData("associativeLineTargetControlOffsets")||[];c[r.length-1]=[{x:s[0].x-o.x,y:s[0].y-o.y},{x:s[1].x-a.x,y:s[1].y-a.y}];let h=e.getData("associativeLinePoint")||[];h[r.length-1]={startPoint:o,endPoint:a},this.mindMap.execCommand("SET_NODE_DATA",e,{associativeLineTargets:r,associativeLineTargetControlOffsets:c,associativeLinePoint:h})}removeLine(){if(!this.activeLine)return;let[,,,e,t]=this.activeLine;this.removeControls();let{associativeLineTargets:n,associativeLinePoint:r,associativeLineTargetControlOffsets:i,associativeLineText:o}=e.getData();r=r||[];let a=hT(e,t),s={};o&&Object.keys(o).forEach(e=>{e!==t.getData("uid")&&(s[e]=o[e])}),this.mindMap.execCommand("SET_NODE_DATA",e,{associativeLineTargets:n.filter((e,t)=>t!==a),associativeLinePoint:r.filter((e,t)=>t!==a),associativeLineTargetControlOffsets:i?i.filter((e,t)=>t!==a):[],associativeLineText:s})}clearActiveLine(){if(this.activeLine){let[,e,t,n,r]=this.activeLine;e.stroke({color:"transparent"}),this.hideEditTextBox(),this.getText(n,r)||t.clear(),this.activeLine=null,this.removeControls(),this.back()}}onNodeDragging(){this.isNodeDragging||(this.isNodeDragging=!0,this.lineList.forEach(e=>{e[0].hide(),e[1].hide(),e[2].hide()}),this.hideControls())}onNodeDragend(){this.isNodeDragging&&(this.lineList.forEach(e=>{e[0].show(),e[1].show(),e[2].show()}),this.showControls(),this.isNodeDragging=!1)}front(){this.mindMap.opt.associativeLineIsAlwaysAboveNode||this.associativeLineDraw.front()}back(){this.mindMap.opt.associativeLineIsAlwaysAboveNode||(this.associativeLineDraw.back(),this.associativeLineDraw.forward())}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}WT.instanceName="associativeLine";var GT=WT;class VT{constructor({mindMap:e}){this.mindMap=e,this.touchesNum=0,this.singleTouchstartEvent=null,this.clickNum=0,this.touchStartScaleView=null,this.lastTouchStartPosition=null,this.lastTouchStartDistance=0,this.bindEvent()}bindEvent(){this.onTouchstart=this.onTouchstart.bind(this),this.onTouchmove=this.onTouchmove.bind(this),this.onTouchcancel=this.onTouchcancel.bind(this),this.onTouchend=this.onTouchend.bind(this),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("touchcancel",this.onTouchcancel,{passive:!1}),window.addEventListener("touchend",this.onTouchend,{passive:!1})}unBindEvent(){window.removeEventListener("touchstart",this.onTouchstart),window.removeEventListener("touchmove",this.onTouchmove),window.removeEventListener("touchcancel",this.onTouchcancel),window.removeEventListener("touchend",this.onTouchend)}onTouchstart(e){if(this.touchesNum=e.touches.length,this.touchStartScaleView=null,1===this.touchesNum){let t=e.touches[0];this.lastTouchStartPosition&&(this.lastTouchStartDistance=Object(b["N"])(this.lastTouchStartPosition.x,this.lastTouchStartPosition.y,t.clientX,t.clientY)),this.lastTouchStartPosition={x:t.clientX,y:t.clientY},this.singleTouchstartEvent=t,this.dispatchMouseEvent("mousedown",t.target,t)}}onTouchmove(e){let t=e.touches.length;if(1===t){let t=e.touches[0];this.dispatchMouseEvent("mousemove",t.target,t)}else if(2===t){let{disableTouchZoom:t,minTouchZoomScale:n,maxTouchZoomScale:r}=this.mindMap.opt;if(t)return;n=-1===n?-1/0:n/100,r=-1===r?1/0:r/100;let i=e.touches[0],o=e.touches[1],a=i.clientX-o.clientX,s=i.clientY-o.clientY,l=Math.sqrt(Math.pow(a,2)+Math.pow(s,2)),{x:c,y:h}=this.mindMap.toPos(i.clientX,i.clientY),{x:u,y:d}=this.mindMap.toPos(o.clientX,o.clientY),f=(c+u)/2,p=(h+d)/2;const m=this.mindMap.view;if(!this.touchStartScaleView)return void(this.touchStartScaleView={distance:l,scale:m.scale,x:m.x,y:m.y,cx:f,cy:p});const g=this.touchStartScaleView;let v=g.scale*(l/g.distance);Math.abs(l-g.distance)<=10&&(v=g.scale),v=vr?r:v;const b=1-v/g.scale;m.scale=v,m.x=g.x+(f-g.x)*b+(f-g.cx)*v,m.y=g.y+(p-g.y)*b+(p-g.cy)*v,m.transform(),this.mindMap.emit("scale",v)}}onTouchcancel(e){}onTouchend(e){if(this.dispatchMouseEvent("mouseup",e.target),1===this.touchesNum){this.clickNum++,setTimeout(()=>{this.clickNum=0,this.lastTouchStartPosition=null,this.lastTouchStartDistance=0},300);let e=this.singleTouchstartEvent;this.clickNum>1&&this.lastTouchStartDistance<=5&&(this.clickNum=0,this.dispatchMouseEvent("dblclick",e.target,e))}this.touchesNum=0,this.singleTouchstartEvent=null,this.touchStartScaleView=null}dispatchMouseEvent(e,t,n){let r={};n&&(r={screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,which:1});let i=new MouseEvent(e,{view:document.defaultView,bubbles:!0,cancelable:!0,...r});t.dispatchEvent(i)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}VT.instanceName="touchEvent";var _T=VT;class KT{constructor({mindMap:e}){this.mindMap=e,this.resizeBtnSize=26,this.handleEl=null,this.isShowHandleEl=!1,this.node=null,this.img=null,this.rect=null,this.isMousedown=!1,this.currentImgWidth=0,this.currentImgHeight=0,this.isAdjusted=!1,this.bindEvent()}bindEvent(){this.onNodeImgMouseleave=this.onNodeImgMouseleave.bind(this),this.onNodeImgMousemove=this.onNodeImgMousemove.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.onRenderEnd=this.onRenderEnd.bind(this),this.mindMap.on("node_img_mouseleave",this.onNodeImgMouseleave),this.mindMap.on("node_img_mousemove",this.onNodeImgMousemove),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_mouseup",this.onMouseup),this.mindMap.on("node_tree_render_end",this.onRenderEnd)}unBindEvent(){this.mindMap.off("node_img_mouseleave",this.onNodeImgMouseleave),this.mindMap.off("node_img_mousemove",this.onNodeImgMousemove),this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("mouseup",this.onMouseup),this.mindMap.off("node_mouseup",this.onMouseup),this.mindMap.off("node_tree_render_end",this.onRenderEnd)}onNodeImgMousemove(e,t){this.isMousedown||this.isAdjusted||this.mindMap.opt.readonly||this.node&&this.node.uid===e.uid&&this.isShowHandleEl||(this.node=e,this.img=t,this.rect=this.img.rbox(),this.showHandleEl())}onNodeImgMouseleave(){this.isMousedown||this.hideHandleEl()}hideNodeImage(){this.img&&this.img.hide()}showNodeImage(){this.img&&this.img.show()}showHandleEl(){this.handleEl||this.createResizeBtnEl(),this.setHandleElRect(),this.handleEl.style.display="block",this.isShowHandleEl=!0}hideHandleEl(){this.isShowHandleEl&&(this.isShowHandleEl=!1,this.handleEl.style.display="none",this.handleEl.style.backgroundImage="",this.handleEl.style.width=0,this.handleEl.style.height=0,this.handleEl.style.left=0,this.handleEl.style.top=0)}setHandleElRect(){let{width:e,height:t,x:n,y:r}=this.rect;this.handleEl.style.left=n+"px",this.handleEl.style.top=r+"px",this.currentImgWidth=e,this.currentImgHeight=t,this.updateHandleElSize()}updateHandleElSize(){this.handleEl.style.width=this.currentImgWidth+"px",this.handleEl.style.height=this.currentImgHeight+"px"}createResizeBtnEl(){this.handleEl=document.createElement("div"),this.handleEl.style.cssText="\n pointer-events: none;\n position: fixed;\n\t display:none;\n background-size: cover;\n ",this.handleEl.className="node-img-handle";const e=document.createElement("div");e.innerHTML=ja.imgAdjust,e.style.cssText=`\n position: absolute;\n right: 0;\n bottom: 0;\n pointer-events: auto;\n background-color: rgba(0, 0, 0, 0.3);\n width: ${this.resizeBtnSize}px;\n height: ${this.resizeBtnSize}px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: nwse-resize;\n `,e.className="node-image-resize",e.addEventListener("mouseenter",()=>{this.showHandleEl()}),e.addEventListener("mouseleave",()=>{this.isMousedown||this.hideHandleEl()}),e.addEventListener("mousedown",e=>{e.stopPropagation(),e.preventDefault(),this.onMousedown(e)}),e.addEventListener("mouseup",e=>{setTimeout(()=>{this.hideHandleEl(),this.isAdjusted=!1},0)}),e.addEventListener("click",e=>{e.stopPropagation()}),this.handleEl.appendChild(e);const t=document.createElement("div");this.handleEl.prepend(t),t.className="node-image-remove",t.innerHTML=ja.remove,t.style.cssText=`\n position: absolute;\n right: 0;top:0;color:#fff;\n pointer-events: auto;\n background-color: rgba(0, 0, 0, 0.3);\n width: ${this.resizeBtnSize}px;\n height: ${this.resizeBtnSize}px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n `,t.addEventListener("mouseenter",e=>{this.showHandleEl()}),t.addEventListener("mouseleave",e=>{this.isMousedown||this.hideHandleEl()}),t.addEventListener("click",async e=>{let t=!1;"function"===typeof this.mindMap.opt.beforeDeleteNodeImg&&(t=await this.mindMap.opt.beforeDeleteNodeImg(this.node)),t||this.mindMap.execCommand("SET_NODE_IMAGE",this.node,{url:null})});const n=this.mindMap.opt.customInnerElsAppendTo||document.body;n.appendChild(this.handleEl)}onMousedown(){this.isMousedown=!0,this.hideNodeImage(),this.handleEl.style.backgroundImage=`url(${this.node.getData("image")})`}onMousemove(e){if(!this.isMousedown)return;e.preventDefault();let{width:t,height:n}=this.node.getData("imageSize"),r=e.clientX-this.rect.x,i=e.clientY-this.rect.y;if(r<=0||i<=0)return;let[o,a]=Object(b["ob"])(t,n,r,i);this.currentImgWidth=o,this.currentImgHeight=a,this.updateHandleElSize()}onMouseup(){if(!this.isMousedown)return;this.showNodeImage(),this.hideHandleEl();let{image:e,imageTitle:t}=this.node.getData(),{scaleX:n,scaleY:r}=this.mindMap.draw.transform();this.mindMap.execCommand("SET_NODE_IMAGE",this.node,{url:e,title:t,width:this.currentImgWidth/n,height:this.currentImgHeight/r,custom:!0}),this.isAdjusted=!0,this.isMousedown=!1}onRenderEnd(){this.isAdjusted?this.isAdjusted=!1:this.hideHandleEl()}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}KT.instanceName="nodeImgAdjust";var YT=KT;n("bed6");class XT{constructor({mindMap:e}){this.mindMap=e,this.isSearching=!1,this.searchText="",this.matchNodeList=[],this.currentIndex=-1,this.notResetSearchText=!1,this.isJumpNext=!1,this.bindEvent()}bindEvent(){this.onDataChange=this.onDataChange.bind(this),this.onModeChange=this.onModeChange.bind(this),this.mindMap.on("data_change",this.onDataChange),this.mindMap.on("mode_change",this.onModeChange)}unBindEvent(){this.mindMap.off("data_change",this.onDataChange),this.mindMap.off("mode_change",this.onModeChange)}onDataChange(){if(this.isJumpNext)return this.isJumpNext=!1,void this.search(this.searchText);this.notResetSearchText?this.notResetSearchText=!1:this.searchText=""}onModeChange(e){const t=e===oa["a"].MODE.READONLY;!t&&this.isSearching&&this.matchNodeList[this.currentIndex]&&this.matchNodeList[this.currentIndex].closeHighlight()}search(e,t=(()=>{})){if(Object(b["X"])(e))return this.endSearch();e=String(e),this.isSearching=!0,this.searchText===e||(this.searchText=e,this.doSearch()),this.searchNext(t),this.emitEvent()}updateMatchNodeList(e){this.matchNodeList=e,this.mindMap.emit("search_match_node_list_change",e)}endSearch(){this.isSearching&&(this.mindMap.opt.readonly&&this.matchNodeList[this.currentIndex]&&this.matchNodeList[this.currentIndex].closeHighlight(),this.searchText="",this.updateMatchNodeList([]),this.currentIndex=-1,this.notResetSearchText=!1,this.isSearching=!1,this.emitEvent())}doSearch(){this.updateMatchNodeList([]),this.currentIndex=-1;const{isOnlySearchCurrentRenderNodes:e}=this.mindMap.opt,t=e?this.mindMap.renderer.root:this.mindMap.renderer.renderTree;if(!t)return;const n=[];Object(b["e"])(t,t=>{let{richText:r,text:i,generalization:o}=e?t.getData():t.data;r&&(i=Object(b["L"])(i)),i.includes(this.searchText)&&n.push(t);const a=Object(b["x"])({generalization:o});a.forEach(t=>{let{richText:r,text:i,uid:o}=t;e&&!this.mindMap.renderer.findNodeByUid(o)||(r&&(i=Object(b["L"])(i)),i.includes(this.searchText)&&n.push({data:t}))})}),this.updateMatchNodeList(n)}isNodeInstance(e){return e instanceof Is}searchNext(e,t){if(!this.isSearching||this.matchNodeList.length<=0)return;void 0!==t&&Number.isInteger(t)&&t>=0&&t{this.isNodeInstance(e)&&e.closeHighlight()});const r=this.matchNodeList[this.currentIndex];this.notResetSearchText=!0;const i=this.isNodeInstance(r)?r.getData("uid"):r.data.uid,o=this.mindMap.renderer.findNodeByUid(i);this.mindMap.execCommand("GO_TARGET_NODE",i,t=>{this.isNodeInstance(r)||(this.matchNodeList[this.currentIndex]=t,this.updateMatchNodeList(this.matchNodeList)),e(),n&&t.highlight(),o&&(this.notResetSearchText=!1)})}jump(e,t=(()=>{})){this.searchNext(t,e)}replace(e,t=!1){if(null===e||void 0===e||!this.isSearching||this.matchNodeList.length<=0)return;this.isJumpNext=t,e=String(e);let n=this.matchNodeList[this.currentIndex];if(!n)return;let r=this.getReplacedText(n,this.searchText,e);this.notResetSearchText=!0,n.setText(r,n.getData("richText"),!0);const i=this.matchNodeList.filter(e=>n!==e);this.updateMatchNodeList(i),this.currentIndex>this.matchNodeList.length-1?this.currentIndex=-1:this.currentIndex--,this.emitEvent()}replaceAll(e){null===e||void 0===e||!this.isSearching||this.matchNodeList.length<=0||(e=String(e),this.matchNodeList.forEach(t=>{const n=this.getReplacedText(t,this.searchText,e);this.isNodeInstance(t)?this.mindMap.renderer.setNodeDataRender(t,{text:n,resetRichText:!!t.getData("richText")},!0):(t.data.text=n,t.data.resetRichText=!!t.data.richText)}),this.mindMap.render(),this.mindMap.command.addHistory(),this.endSearch())}getReplacedText(e,t,n){let{richText:r,text:i}=this.isNodeInstance(e)?e.getData():e.data;return r?Object(b["mb"])(i,t,n):i.replaceAll(t,n)}emitEvent(){this.mindMap.emit("search_info_change",{currentIndex:this.currentIndex,total:this.matchNodeList.length})}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}XT.instanceName="search";var ZT=XT;class JT{constructor({mindMap:e}){this.mindMap=e,this.isInPainter=!1,this.painterNode=null,this.bindEvent()}bindEvent(){this.painterOneNode=this.painterOneNode.bind(this),this.onEndPainter=this.onEndPainter.bind(this),this.mindMap.on("node_click",this.painterOneNode),this.mindMap.on("draw_click",this.onEndPainter)}unBindEvent(){this.mindMap.off("node_click",this.painterOneNode),this.mindMap.off("draw_click",this.onEndPainter)}startPainter(){if(this.mindMap.opt.readonly)return;let e=this.mindMap.renderer.activeNodeList;e.length<=0||(this.painterNode=e[0],this.isInPainter=!0,this.mindMap.emit("painter_start"))}endPainter(){this.painterNode=null,this.isInPainter=!1}onEndPainter(){this.isInPainter&&(this.endPainter(),this.mindMap.emit("painter_end"))}painterOneNode(e){if(!e||!this.isInPainter||!this.painterNode||!e||e.uid===this.painterNode.uid)return;let t={};this.mindMap.opt.onlyPainterNodeCustomStyles||(t={...this.painterNode.effectiveStyles});const n=this.painterNode.getData();Object.keys(n).forEach(e=>{Object(b["g"])(e)&&(t[e]=n[e])}),this.mindMap.renderer._handleRemoveCustomStyles(e.getData()),e.setStyles(t)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}JT.instanceName="painter";var QT=JT;class $T{constructor(e){this.mindMap=e.mindMap,this.scrollbarWrapSize={width:0,height:0},this.chartHeight=0,this.chartWidth=0,this.reset(),this.bindEvent()}reset(){this.currentScrollType="",this.isMousedown=!1,this.mousedownPos={x:0,y:0},this.mousedownScrollbarPos=0}bindEvent(){this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.updateScrollbar=this.updateScrollbar.bind(this),this.updateScrollbar=Object(b["ub"])(this.updateScrollbar,16,this),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_tree_render_end",this.updateScrollbar),this.mindMap.on("view_data_change",this.updateScrollbar),this.mindMap.on("resize",this.updateScrollbar)}unBindEvent(){this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("mouseup",this.onMouseup),this.mindMap.off("node_tree_render_end",this.updateScrollbar),this.mindMap.off("view_data_change",this.updateScrollbar),this.mindMap.off("resize",this.updateScrollbar)}updateScrollbar(){if(this.isMousedown)return;const e=this.calculationScrollbar();this.emitEvent(e)}emitEvent(e){this.mindMap.emit("scrollbar_change",e)}setScrollBarWrapSize(e,t){this.scrollbarWrapSize.width=e,this.scrollbarWrapSize.height=t}calculationScrollbar(){const e=this.mindMap.draw.rbox(),t=this.mindMap.elRect;e.x-=t.left,e.y-=t.top;const n=this.mindMap.height,r=n/2,i=e.height+2*r;this.chartHeight=i;const o=e.y-r,a=Math.min(n/i*100,100);let s=-o/i*100;s<0&&(s=0),s>100-a&&(s=100-a);const l=this.mindMap.width,c=l/2,h=e.width+2*c;this.chartWidth=h;const u=e.x-c,d=Math.min(l/h*100,100);let f=-u/h*100;f<0&&(f=0),f>100-d&&(f=100-d);const p={vertical:{top:s,height:a},horizontal:{left:f,width:d}};return p}onMousedown(e,t){e.preventDefault(),e.stopPropagation(),this.currentScrollType=t,this.isMousedown=!0,this.mousedownPos={x:e.clientX,y:e.clientY};const n=window.getComputedStyle(e.target);t===oa["a"].SCROLL_BAR_DIR.VERTICAL?this.mousedownScrollbarPos=Number.parseFloat(n.top):this.mousedownScrollbarPos=Number.parseFloat(n.left)}onMousemove(e){if(this.isMousedown)if(e.preventDefault(),e.stopPropagation(),this.currentScrollType===oa["a"].SCROLL_BAR_DIR.VERTICAL){const t=e.clientY-this.mousedownPos.y+this.mousedownScrollbarPos;this.updateMindMapView(oa["a"].SCROLL_BAR_DIR.VERTICAL,t)}else{const t=e.clientX-this.mousedownPos.x+this.mousedownScrollbarPos;this.updateMindMapView(oa["a"].SCROLL_BAR_DIR.HORIZONTAL,t)}}onMouseup(){this.isMousedown=!1,this.reset()}updateMindMapView(e,t){const n=this.calculationScrollbar(),r=this.mindMap.draw.transform(),i=this.mindMap.draw.rbox(),o=this.mindMap.renderer.root.group.rbox(),a=this.mindMap.renderer.layout.getRootCenterOffset(o.width,o.height);if(e===oa["a"].SCROLL_BAR_DIR.VERTICAL){let e=t;e<=0&&(e=0);const s=(100-n.vertical.height)/100*this.scrollbarWrapSize.height;e>=s&&(e=s);const l=e/this.scrollbarWrapSize.height*100,c=-l/100*this.chartHeight,h=o.y-i.y,u=this.mindMap.height/2,d=c+h-u*r.scaleY+u-a.y*r.scaleY+(this.mindMap.height-this.mindMap.initHeight)/2*r.scaleY;this.mindMap.view.translateYTo(d),this.emitEvent({horizontal:n.horizontal,vertical:{top:l,height:n.vertical.height}})}else{let e=t;e<=0&&(e=0);const s=(100-n.horizontal.width)/100*this.scrollbarWrapSize.width;e>=s&&(e=s);const l=e/this.scrollbarWrapSize.width*100,c=-l/100*this.chartWidth,h=o.x-i.x,u=this.mindMap.width/2,d=c+h-u*r.scaleX+u-a.x*r.scaleX+(this.mindMap.width-this.mindMap.initWidth)/2*r.scaleX;this.mindMap.view.translateXTo(d),this.emitEvent({vertical:n.vertical,horizontal:{left:l,width:n.horizontal.width}})}}onClick(e,t){let n=0;n=t===oa["a"].SCROLL_BAR_DIR.VERTICAL?e.clientY-e.currentTarget.getBoundingClientRect().top:e.clientX-e.currentTarget.getBoundingClientRect().left,this.updateMindMapView(t,n)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}$T.instanceName="scrollbar";var eS=$T,tS=(n("6c72"),n("5703")),nS=n.n(tS);const rS=e=>`\n@font-face {\n font-family: 'KaTeX_AMS';\n src: url(${e}fonts/KaTeX_AMS-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_AMS-Regular.woff) format('woff'), url(${e}fonts/KaTeX_AMS-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Caligraphic';\n src: url(${e}fonts/KaTeX_Caligraphic-Bold.woff2) format('woff2'), url(${e}fonts/KaTeX_Caligraphic-Bold.woff) format('woff'), url(${e}fonts/KaTeX_Caligraphic-Bold.ttf) format('truetype');\n font-weight: bold;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Caligraphic';\n src: url(${e}fonts/KaTeX_Caligraphic-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Caligraphic-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Caligraphic-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Fraktur';\n src: url(${e}fonts/KaTeX_Fraktur-Bold.woff2) format('woff2'), url(${e}fonts/KaTeX_Fraktur-Bold.woff) format('woff'), url(${e}fonts/KaTeX_Fraktur-Bold.ttf) format('truetype');\n font-weight: bold;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Fraktur';\n src: url(${e}fonts/KaTeX_Fraktur-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Fraktur-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Fraktur-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Main';\n src: url(${e}fonts/KaTeX_Main-Bold.woff2) format('woff2'), url(${e}fonts/KaTeX_Main-Bold.woff) format('woff'), url(${e}fonts/KaTeX_Main-Bold.ttf) format('truetype');\n font-weight: bold;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Main';\n src: url(${e}fonts/KaTeX_Main-BoldItalic.woff2) format('woff2'), url(${e}fonts/KaTeX_Main-BoldItalic.woff) format('woff'), url(${e}fonts/KaTeX_Main-BoldItalic.ttf) format('truetype');\n font-weight: bold;\n font-style: italic;\n}\n@font-face {\n font-family: 'KaTeX_Main';\n src: url(${e}fonts/KaTeX_Main-Italic.woff2) format('woff2'), url(${e}fonts/KaTeX_Main-Italic.woff) format('woff'), url(${e}fonts/KaTeX_Main-Italic.ttf) format('truetype');\n font-weight: normal;\n font-style: italic;\n}\n@font-face {\n font-family: 'KaTeX_Main';\n src: url(${e}fonts/KaTeX_Main-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Main-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Main-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Math';\n src: url(${e}fonts/KaTeX_Math-BoldItalic.woff2) format('woff2'), url(${e}fonts/KaTeX_Math-BoldItalic.woff) format('woff'), url(${e}fonts/KaTeX_Math-BoldItalic.ttf) format('truetype');\n font-weight: bold;\n font-style: italic;\n}\n@font-face {\n font-family: 'KaTeX_Math';\n src: url(${e}fonts/KaTeX_Math-Italic.woff2) format('woff2'), url(${e}fonts/KaTeX_Math-Italic.woff) format('woff'), url(${e}fonts/KaTeX_Math-Italic.ttf) format('truetype');\n font-weight: normal;\n font-style: italic;\n}\n@font-face {\n font-family: 'KaTeX_SansSerif';\n src: url(${e}fonts/KaTeX_SansSerif-Bold.woff2) format('woff2'), url(${e}fonts/KaTeX_SansSerif-Bold.woff) format('woff'), url(${e}fonts/KaTeX_SansSerif-Bold.ttf) format('truetype');\n font-weight: bold;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_SansSerif';\n src: url(${e}fonts/KaTeX_SansSerif-Italic.woff2) format('woff2'), url(${e}fonts/KaTeX_SansSerif-Italic.woff) format('woff'), url(${e}fonts/KaTeX_SansSerif-Italic.ttf) format('truetype');\n font-weight: normal;\n font-style: italic;\n}\n@font-face {\n font-family: 'KaTeX_SansSerif';\n src: url(${e}fonts/KaTeX_SansSerif-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_SansSerif-Regular.woff) format('woff'), url(${e}fonts/KaTeX_SansSerif-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Script';\n src: url(${e}fonts/KaTeX_Script-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Script-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Script-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Size1';\n src: url(${e}fonts/KaTeX_Size1-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Size1-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Size1-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Size2';\n src: url(${e}fonts/KaTeX_Size2-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Size2-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Size2-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Size3';\n src: url(${e}fonts/KaTeX_Size3-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Size3-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Size3-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Size4';\n src: url(${e}fonts/KaTeX_Size4-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Size4-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Size4-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: 'KaTeX_Typewriter';\n src: url(${e}fonts/KaTeX_Typewriter-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Typewriter-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Typewriter-Regular.ttf) format('truetype');\n font-weight: normal;\n font-style: normal;\n}\n `,iS=()=>'\n.katex {\n font: normal 1.21em KaTeX_Main, Times New Roman, serif;\n line-height: 1.2;\n text-indent: 0;\n text-rendering: auto;\n}\n.katex * {\n -ms-high-contrast-adjust: none !important;\n}\n.katex * {\n border-color: currentColor;\n}\n.katex .katex-version::after {\n content: "0.16.9";\n}\n.katex .katex-mathml {\n /* Accessibility hack to only show to screen readers\n Found at: http://a11yproject.com/posts/how-to-hide-content/ */\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n padding: 0;\n border: 0;\n height: 1px;\n width: 1px;\n overflow: hidden;\n}\n.katex .katex-html {\n /* \newline is an empty block at top level, between .base elements */\n}\n.katex .katex-html > .newline {\n display: block;\n}\n.katex .base {\n position: relative;\n display: inline-block;\n white-space: nowrap;\n width: -webkit-min-content;\n width: -moz-min-content;\n width: min-content;\n}\n.katex .strut {\n display: inline-block;\n}\n.katex .textbf {\n font-weight: bold;\n}\n.katex .textit {\n font-style: italic;\n}\n.katex .textrm {\n font-family: KaTeX_Main;\n}\n.katex .textsf {\n font-family: KaTeX_SansSerif;\n}\n.katex .texttt {\n font-family: KaTeX_Typewriter;\n}\n.katex .mathnormal {\n font-family: KaTeX_Math;\n font-style: italic;\n}\n.katex .mathit {\n font-family: KaTeX_Main;\n font-style: italic;\n}\n.katex .mathrm {\n font-style: normal;\n}\n.katex .mathbf {\n font-family: KaTeX_Main;\n font-weight: bold;\n}\n.katex .boldsymbol {\n font-family: KaTeX_Math;\n font-weight: bold;\n font-style: italic;\n}\n.katex .amsrm {\n font-family: KaTeX_AMS;\n}\n.katex .mathbb,\n.katex .textbb {\n font-family: KaTeX_AMS;\n}\n.katex .mathcal {\n font-family: KaTeX_Caligraphic;\n}\n.katex .mathfrak,\n.katex .textfrak {\n font-family: KaTeX_Fraktur;\n}\n.katex .mathboldfrak,\n.katex .textboldfrak {\n font-family: KaTeX_Fraktur;\n font-weight: bold;\n}\n.katex .mathtt {\n font-family: KaTeX_Typewriter;\n}\n.katex .mathscr,\n.katex .textscr {\n font-family: KaTeX_Script;\n}\n.katex .mathsf,\n.katex .textsf {\n font-family: KaTeX_SansSerif;\n}\n.katex .mathboldsf,\n.katex .textboldsf {\n font-family: KaTeX_SansSerif;\n font-weight: bold;\n}\n.katex .mathitsf,\n.katex .textitsf {\n font-family: KaTeX_SansSerif;\n font-style: italic;\n}\n.katex .mainrm {\n font-family: KaTeX_Main;\n font-style: normal;\n}\n.katex .vlist-t {\n display: inline-table;\n table-layout: fixed;\n border-collapse: collapse;\n}\n.katex .vlist-r {\n display: table-row;\n}\n.katex .vlist {\n display: table-cell;\n vertical-align: bottom;\n position: relative;\n}\n.katex .vlist > span {\n display: block;\n height: 0;\n position: relative;\n}\n.katex .vlist > span > span {\n display: inline-block;\n}\n.katex .vlist > span > .pstrut {\n overflow: hidden;\n width: 0;\n}\n.katex .vlist-t2 {\n margin-right: -2px;\n}\n.katex .vlist-s {\n display: table-cell;\n vertical-align: bottom;\n font-size: 1px;\n width: 2px;\n min-width: 2px;\n}\n.katex .vbox {\n display: inline-flex;\n flex-direction: column;\n align-items: baseline;\n}\n.katex .hbox {\n display: inline-flex;\n flex-direction: row;\n width: 100%;\n}\n.katex .thinbox {\n display: inline-flex;\n flex-direction: row;\n width: 0;\n max-width: 0;\n}\n.katex .msupsub {\n text-align: left;\n}\n.katex .mfrac > span > span {\n text-align: center;\n}\n.katex .mfrac .frac-line {\n display: inline-block;\n width: 100%;\n border-bottom-style: solid;\n}\n.katex .mfrac .frac-line,\n.katex .overline .overline-line,\n.katex .underline .underline-line,\n.katex .hline,\n.katex .hdashline,\n.katex .rule {\n min-height: 1px;\n}\n.katex .mspace {\n display: inline-block;\n}\n.katex .llap,\n.katex .rlap,\n.katex .clap {\n width: 0;\n position: relative;\n}\n.katex .llap > .inner,\n.katex .rlap > .inner,\n.katex .clap > .inner {\n position: absolute;\n}\n.katex .llap > .fix,\n.katex .rlap > .fix,\n.katex .clap > .fix {\n display: inline-block;\n}\n.katex .llap > .inner {\n right: 0;\n}\n.katex .rlap > .inner,\n.katex .clap > .inner {\n left: 0;\n}\n.katex .clap > .inner > span {\n margin-left: -50%;\n margin-right: 50%;\n}\n.katex .rule {\n display: inline-block;\n border: solid 0;\n position: relative;\n}\n.katex .overline .overline-line,\n.katex .underline .underline-line,\n.katex .hline {\n display: inline-block;\n width: 100%;\n border-bottom-style: solid;\n}\n.katex .hdashline {\n display: inline-block;\n width: 100%;\n border-bottom-style: dashed;\n}\n.katex .sqrt > .root {\n margin-left: 0.27777778em;\n margin-right: -0.55555556em;\n}\n.katex .sizing.reset-size1.size1,\n.katex .fontsize-ensurer.reset-size1.size1 {\n font-size: 1em;\n}\n.katex .sizing.reset-size1.size2,\n.katex .fontsize-ensurer.reset-size1.size2 {\n font-size: 1.2em;\n}\n.katex .sizing.reset-size1.size3,\n.katex .fontsize-ensurer.reset-size1.size3 {\n font-size: 1.4em;\n}\n.katex .sizing.reset-size1.size4,\n.katex .fontsize-ensurer.reset-size1.size4 {\n font-size: 1.6em;\n}\n.katex .sizing.reset-size1.size5,\n.katex .fontsize-ensurer.reset-size1.size5 {\n font-size: 1.8em;\n}\n.katex .sizing.reset-size1.size6,\n.katex .fontsize-ensurer.reset-size1.size6 {\n font-size: 2em;\n}\n.katex .sizing.reset-size1.size7,\n.katex .fontsize-ensurer.reset-size1.size7 {\n font-size: 2.4em;\n}\n.katex .sizing.reset-size1.size8,\n.katex .fontsize-ensurer.reset-size1.size8 {\n font-size: 2.88em;\n}\n.katex .sizing.reset-size1.size9,\n.katex .fontsize-ensurer.reset-size1.size9 {\n font-size: 3.456em;\n}\n.katex .sizing.reset-size1.size10,\n.katex .fontsize-ensurer.reset-size1.size10 {\n font-size: 4.148em;\n}\n.katex .sizing.reset-size1.size11,\n.katex .fontsize-ensurer.reset-size1.size11 {\n font-size: 4.976em;\n}\n.katex .sizing.reset-size2.size1,\n.katex .fontsize-ensurer.reset-size2.size1 {\n font-size: 0.83333333em;\n}\n.katex .sizing.reset-size2.size2,\n.katex .fontsize-ensurer.reset-size2.size2 {\n font-size: 1em;\n}\n.katex .sizing.reset-size2.size3,\n.katex .fontsize-ensurer.reset-size2.size3 {\n font-size: 1.16666667em;\n}\n.katex .sizing.reset-size2.size4,\n.katex .fontsize-ensurer.reset-size2.size4 {\n font-size: 1.33333333em;\n}\n.katex .sizing.reset-size2.size5,\n.katex .fontsize-ensurer.reset-size2.size5 {\n font-size: 1.5em;\n}\n.katex .sizing.reset-size2.size6,\n.katex .fontsize-ensurer.reset-size2.size6 {\n font-size: 1.66666667em;\n}\n.katex .sizing.reset-size2.size7,\n.katex .fontsize-ensurer.reset-size2.size7 {\n font-size: 2em;\n}\n.katex .sizing.reset-size2.size8,\n.katex .fontsize-ensurer.reset-size2.size8 {\n font-size: 2.4em;\n}\n.katex .sizing.reset-size2.size9,\n.katex .fontsize-ensurer.reset-size2.size9 {\n font-size: 2.88em;\n}\n.katex .sizing.reset-size2.size10,\n.katex .fontsize-ensurer.reset-size2.size10 {\n font-size: 3.45666667em;\n}\n.katex .sizing.reset-size2.size11,\n.katex .fontsize-ensurer.reset-size2.size11 {\n font-size: 4.14666667em;\n}\n.katex .sizing.reset-size3.size1,\n.katex .fontsize-ensurer.reset-size3.size1 {\n font-size: 0.71428571em;\n}\n.katex .sizing.reset-size3.size2,\n.katex .fontsize-ensurer.reset-size3.size2 {\n font-size: 0.85714286em;\n}\n.katex .sizing.reset-size3.size3,\n.katex .fontsize-ensurer.reset-size3.size3 {\n font-size: 1em;\n}\n.katex .sizing.reset-size3.size4,\n.katex .fontsize-ensurer.reset-size3.size4 {\n font-size: 1.14285714em;\n}\n.katex .sizing.reset-size3.size5,\n.katex .fontsize-ensurer.reset-size3.size5 {\n font-size: 1.28571429em;\n}\n.katex .sizing.reset-size3.size6,\n.katex .fontsize-ensurer.reset-size3.size6 {\n font-size: 1.42857143em;\n}\n.katex .sizing.reset-size3.size7,\n.katex .fontsize-ensurer.reset-size3.size7 {\n font-size: 1.71428571em;\n}\n.katex .sizing.reset-size3.size8,\n.katex .fontsize-ensurer.reset-size3.size8 {\n font-size: 2.05714286em;\n}\n.katex .sizing.reset-size3.size9,\n.katex .fontsize-ensurer.reset-size3.size9 {\n font-size: 2.46857143em;\n}\n.katex .sizing.reset-size3.size10,\n.katex .fontsize-ensurer.reset-size3.size10 {\n font-size: 2.96285714em;\n}\n.katex .sizing.reset-size3.size11,\n.katex .fontsize-ensurer.reset-size3.size11 {\n font-size: 3.55428571em;\n}\n.katex .sizing.reset-size4.size1,\n.katex .fontsize-ensurer.reset-size4.size1 {\n font-size: 0.625em;\n}\n.katex .sizing.reset-size4.size2,\n.katex .fontsize-ensurer.reset-size4.size2 {\n font-size: 0.75em;\n}\n.katex .sizing.reset-size4.size3,\n.katex .fontsize-ensurer.reset-size4.size3 {\n font-size: 0.875em;\n}\n.katex .sizing.reset-size4.size4,\n.katex .fontsize-ensurer.reset-size4.size4 {\n font-size: 1em;\n}\n.katex .sizing.reset-size4.size5,\n.katex .fontsize-ensurer.reset-size4.size5 {\n font-size: 1.125em;\n}\n.katex .sizing.reset-size4.size6,\n.katex .fontsize-ensurer.reset-size4.size6 {\n font-size: 1.25em;\n}\n.katex .sizing.reset-size4.size7,\n.katex .fontsize-ensurer.reset-size4.size7 {\n font-size: 1.5em;\n}\n.katex .sizing.reset-size4.size8,\n.katex .fontsize-ensurer.reset-size4.size8 {\n font-size: 1.8em;\n}\n.katex .sizing.reset-size4.size9,\n.katex .fontsize-ensurer.reset-size4.size9 {\n font-size: 2.16em;\n}\n.katex .sizing.reset-size4.size10,\n.katex .fontsize-ensurer.reset-size4.size10 {\n font-size: 2.5925em;\n}\n.katex .sizing.reset-size4.size11,\n.katex .fontsize-ensurer.reset-size4.size11 {\n font-size: 3.11em;\n}\n.katex .sizing.reset-size5.size1,\n.katex .fontsize-ensurer.reset-size5.size1 {\n font-size: 0.55555556em;\n}\n.katex .sizing.reset-size5.size2,\n.katex .fontsize-ensurer.reset-size5.size2 {\n font-size: 0.66666667em;\n}\n.katex .sizing.reset-size5.size3,\n.katex .fontsize-ensurer.reset-size5.size3 {\n font-size: 0.77777778em;\n}\n.katex .sizing.reset-size5.size4,\n.katex .fontsize-ensurer.reset-size5.size4 {\n font-size: 0.88888889em;\n}\n.katex .sizing.reset-size5.size5,\n.katex .fontsize-ensurer.reset-size5.size5 {\n font-size: 1em;\n}\n.katex .sizing.reset-size5.size6,\n.katex .fontsize-ensurer.reset-size5.size6 {\n font-size: 1.11111111em;\n}\n.katex .sizing.reset-size5.size7,\n.katex .fontsize-ensurer.reset-size5.size7 {\n font-size: 1.33333333em;\n}\n.katex .sizing.reset-size5.size8,\n.katex .fontsize-ensurer.reset-size5.size8 {\n font-size: 1.6em;\n}\n.katex .sizing.reset-size5.size9,\n.katex .fontsize-ensurer.reset-size5.size9 {\n font-size: 1.92em;\n}\n.katex .sizing.reset-size5.size10,\n.katex .fontsize-ensurer.reset-size5.size10 {\n font-size: 2.30444444em;\n}\n.katex .sizing.reset-size5.size11,\n.katex .fontsize-ensurer.reset-size5.size11 {\n font-size: 2.76444444em;\n}\n.katex .sizing.reset-size6.size1,\n.katex .fontsize-ensurer.reset-size6.size1 {\n font-size: 0.5em;\n}\n.katex .sizing.reset-size6.size2,\n.katex .fontsize-ensurer.reset-size6.size2 {\n font-size: 0.6em;\n}\n.katex .sizing.reset-size6.size3,\n.katex .fontsize-ensurer.reset-size6.size3 {\n font-size: 0.7em;\n}\n.katex .sizing.reset-size6.size4,\n.katex .fontsize-ensurer.reset-size6.size4 {\n font-size: 0.8em;\n}\n.katex .sizing.reset-size6.size5,\n.katex .fontsize-ensurer.reset-size6.size5 {\n font-size: 0.9em;\n}\n.katex .sizing.reset-size6.size6,\n.katex .fontsize-ensurer.reset-size6.size6 {\n font-size: 1em;\n}\n.katex .sizing.reset-size6.size7,\n.katex .fontsize-ensurer.reset-size6.size7 {\n font-size: 1.2em;\n}\n.katex .sizing.reset-size6.size8,\n.katex .fontsize-ensurer.reset-size6.size8 {\n font-size: 1.44em;\n}\n.katex .sizing.reset-size6.size9,\n.katex .fontsize-ensurer.reset-size6.size9 {\n font-size: 1.728em;\n}\n.katex .sizing.reset-size6.size10,\n.katex .fontsize-ensurer.reset-size6.size10 {\n font-size: 2.074em;\n}\n.katex .sizing.reset-size6.size11,\n.katex .fontsize-ensurer.reset-size6.size11 {\n font-size: 2.488em;\n}\n.katex .sizing.reset-size7.size1,\n.katex .fontsize-ensurer.reset-size7.size1 {\n font-size: 0.41666667em;\n}\n.katex .sizing.reset-size7.size2,\n.katex .fontsize-ensurer.reset-size7.size2 {\n font-size: 0.5em;\n}\n.katex .sizing.reset-size7.size3,\n.katex .fontsize-ensurer.reset-size7.size3 {\n font-size: 0.58333333em;\n}\n.katex .sizing.reset-size7.size4,\n.katex .fontsize-ensurer.reset-size7.size4 {\n font-size: 0.66666667em;\n}\n.katex .sizing.reset-size7.size5,\n.katex .fontsize-ensurer.reset-size7.size5 {\n font-size: 0.75em;\n}\n.katex .sizing.reset-size7.size6,\n.katex .fontsize-ensurer.reset-size7.size6 {\n font-size: 0.83333333em;\n}\n.katex .sizing.reset-size7.size7,\n.katex .fontsize-ensurer.reset-size7.size7 {\n font-size: 1em;\n}\n.katex .sizing.reset-size7.size8,\n.katex .fontsize-ensurer.reset-size7.size8 {\n font-size: 1.2em;\n}\n.katex .sizing.reset-size7.size9,\n.katex .fontsize-ensurer.reset-size7.size9 {\n font-size: 1.44em;\n}\n.katex .sizing.reset-size7.size10,\n.katex .fontsize-ensurer.reset-size7.size10 {\n font-size: 1.72833333em;\n}\n.katex .sizing.reset-size7.size11,\n.katex .fontsize-ensurer.reset-size7.size11 {\n font-size: 2.07333333em;\n}\n.katex .sizing.reset-size8.size1,\n.katex .fontsize-ensurer.reset-size8.size1 {\n font-size: 0.34722222em;\n}\n.katex .sizing.reset-size8.size2,\n.katex .fontsize-ensurer.reset-size8.size2 {\n font-size: 0.41666667em;\n}\n.katex .sizing.reset-size8.size3,\n.katex .fontsize-ensurer.reset-size8.size3 {\n font-size: 0.48611111em;\n}\n.katex .sizing.reset-size8.size4,\n.katex .fontsize-ensurer.reset-size8.size4 {\n font-size: 0.55555556em;\n}\n.katex .sizing.reset-size8.size5,\n.katex .fontsize-ensurer.reset-size8.size5 {\n font-size: 0.625em;\n}\n.katex .sizing.reset-size8.size6,\n.katex .fontsize-ensurer.reset-size8.size6 {\n font-size: 0.69444444em;\n}\n.katex .sizing.reset-size8.size7,\n.katex .fontsize-ensurer.reset-size8.size7 {\n font-size: 0.83333333em;\n}\n.katex .sizing.reset-size8.size8,\n.katex .fontsize-ensurer.reset-size8.size8 {\n font-size: 1em;\n}\n.katex .sizing.reset-size8.size9,\n.katex .fontsize-ensurer.reset-size8.size9 {\n font-size: 1.2em;\n}\n.katex .sizing.reset-size8.size10,\n.katex .fontsize-ensurer.reset-size8.size10 {\n font-size: 1.44027778em;\n}\n.katex .sizing.reset-size8.size11,\n.katex .fontsize-ensurer.reset-size8.size11 {\n font-size: 1.72777778em;\n}\n.katex .sizing.reset-size9.size1,\n.katex .fontsize-ensurer.reset-size9.size1 {\n font-size: 0.28935185em;\n}\n.katex .sizing.reset-size9.size2,\n.katex .fontsize-ensurer.reset-size9.size2 {\n font-size: 0.34722222em;\n}\n.katex .sizing.reset-size9.size3,\n.katex .fontsize-ensurer.reset-size9.size3 {\n font-size: 0.40509259em;\n}\n.katex .sizing.reset-size9.size4,\n.katex .fontsize-ensurer.reset-size9.size4 {\n font-size: 0.46296296em;\n}\n.katex .sizing.reset-size9.size5,\n.katex .fontsize-ensurer.reset-size9.size5 {\n font-size: 0.52083333em;\n}\n.katex .sizing.reset-size9.size6,\n.katex .fontsize-ensurer.reset-size9.size6 {\n font-size: 0.5787037em;\n}\n.katex .sizing.reset-size9.size7,\n.katex .fontsize-ensurer.reset-size9.size7 {\n font-size: 0.69444444em;\n}\n.katex .sizing.reset-size9.size8,\n.katex .fontsize-ensurer.reset-size9.size8 {\n font-size: 0.83333333em;\n}\n.katex .sizing.reset-size9.size9,\n.katex .fontsize-ensurer.reset-size9.size9 {\n font-size: 1em;\n}\n.katex .sizing.reset-size9.size10,\n.katex .fontsize-ensurer.reset-size9.size10 {\n font-size: 1.20023148em;\n}\n.katex .sizing.reset-size9.size11,\n.katex .fontsize-ensurer.reset-size9.size11 {\n font-size: 1.43981481em;\n}\n.katex .sizing.reset-size10.size1,\n.katex .fontsize-ensurer.reset-size10.size1 {\n font-size: 0.24108004em;\n}\n.katex .sizing.reset-size10.size2,\n.katex .fontsize-ensurer.reset-size10.size2 {\n font-size: 0.28929605em;\n}\n.katex .sizing.reset-size10.size3,\n.katex .fontsize-ensurer.reset-size10.size3 {\n font-size: 0.33751205em;\n}\n.katex .sizing.reset-size10.size4,\n.katex .fontsize-ensurer.reset-size10.size4 {\n font-size: 0.38572806em;\n}\n.katex .sizing.reset-size10.size5,\n.katex .fontsize-ensurer.reset-size10.size5 {\n font-size: 0.43394407em;\n}\n.katex .sizing.reset-size10.size6,\n.katex .fontsize-ensurer.reset-size10.size6 {\n font-size: 0.48216008em;\n}\n.katex .sizing.reset-size10.size7,\n.katex .fontsize-ensurer.reset-size10.size7 {\n font-size: 0.57859209em;\n}\n.katex .sizing.reset-size10.size8,\n.katex .fontsize-ensurer.reset-size10.size8 {\n font-size: 0.69431051em;\n}\n.katex .sizing.reset-size10.size9,\n.katex .fontsize-ensurer.reset-size10.size9 {\n font-size: 0.83317261em;\n}\n.katex .sizing.reset-size10.size10,\n.katex .fontsize-ensurer.reset-size10.size10 {\n font-size: 1em;\n}\n.katex .sizing.reset-size10.size11,\n.katex .fontsize-ensurer.reset-size10.size11 {\n font-size: 1.19961427em;\n}\n.katex .sizing.reset-size11.size1,\n.katex .fontsize-ensurer.reset-size11.size1 {\n font-size: 0.20096463em;\n}\n.katex .sizing.reset-size11.size2,\n.katex .fontsize-ensurer.reset-size11.size2 {\n font-size: 0.24115756em;\n}\n.katex .sizing.reset-size11.size3,\n.katex .fontsize-ensurer.reset-size11.size3 {\n font-size: 0.28135048em;\n}\n.katex .sizing.reset-size11.size4,\n.katex .fontsize-ensurer.reset-size11.size4 {\n font-size: 0.32154341em;\n}\n.katex .sizing.reset-size11.size5,\n.katex .fontsize-ensurer.reset-size11.size5 {\n font-size: 0.36173633em;\n}\n.katex .sizing.reset-size11.size6,\n.katex .fontsize-ensurer.reset-size11.size6 {\n font-size: 0.40192926em;\n}\n.katex .sizing.reset-size11.size7,\n.katex .fontsize-ensurer.reset-size11.size7 {\n font-size: 0.48231511em;\n}\n.katex .sizing.reset-size11.size8,\n.katex .fontsize-ensurer.reset-size11.size8 {\n font-size: 0.57877814em;\n}\n.katex .sizing.reset-size11.size9,\n.katex .fontsize-ensurer.reset-size11.size9 {\n font-size: 0.69453376em;\n}\n.katex .sizing.reset-size11.size10,\n.katex .fontsize-ensurer.reset-size11.size10 {\n font-size: 0.83360129em;\n}\n.katex .sizing.reset-size11.size11,\n.katex .fontsize-ensurer.reset-size11.size11 {\n font-size: 1em;\n}\n.katex .delimsizing.size1 {\n font-family: KaTeX_Size1;\n}\n.katex .delimsizing.size2 {\n font-family: KaTeX_Size2;\n}\n.katex .delimsizing.size3 {\n font-family: KaTeX_Size3;\n}\n.katex .delimsizing.size4 {\n font-family: KaTeX_Size4;\n}\n.katex .delimsizing.mult .delim-size1 > span {\n font-family: KaTeX_Size1;\n}\n.katex .delimsizing.mult .delim-size4 > span {\n font-family: KaTeX_Size4;\n}\n.katex .nulldelimiter {\n display: inline-block;\n width: 0.12em;\n}\n.katex .delimcenter {\n position: relative;\n}\n.katex .op-symbol {\n position: relative;\n}\n.katex .op-symbol.small-op {\n font-family: KaTeX_Size1;\n}\n.katex .op-symbol.large-op {\n font-family: KaTeX_Size2;\n}\n.katex .op-limits > .vlist-t {\n text-align: center;\n}\n.katex .accent > .vlist-t {\n text-align: center;\n}\n.katex .accent .accent-body {\n position: relative;\n}\n.katex .accent .accent-body:not(.accent-full) {\n width: 0;\n}\n.katex .overlay {\n display: block;\n}\n.katex .mtable .vertical-separator {\n display: inline-block;\n min-width: 1px;\n}\n.katex .mtable .arraycolsep {\n display: inline-block;\n}\n.katex .mtable .col-align-c > .vlist-t {\n text-align: center;\n}\n.katex .mtable .col-align-l > .vlist-t {\n text-align: left;\n}\n.katex .mtable .col-align-r > .vlist-t {\n text-align: right;\n}\n.katex .svg-align {\n text-align: left;\n}\n.katex svg {\n display: block;\n position: absolute;\n width: 100%;\n height: inherit;\n fill: currentColor;\n stroke: currentColor;\n fill-rule: nonzero;\n fill-opacity: 1;\n stroke-width: 1;\n stroke-linecap: butt;\n stroke-linejoin: miter;\n stroke-miterlimit: 4;\n stroke-dasharray: none;\n stroke-dashoffset: 0;\n stroke-opacity: 1;\n}\n.katex svg path {\n stroke: none;\n}\n.katex img {\n border-style: none;\n min-width: 0;\n min-height: 0;\n max-width: none;\n max-height: none;\n}\n.katex .stretchy {\n width: 100%;\n display: block;\n position: relative;\n overflow: hidden;\n}\n.katex .stretchy::before,\n.katex .stretchy::after {\n content: "";\n}\n.katex .hide-tail {\n width: 100%;\n position: relative;\n overflow: hidden;\n}\n.katex .halfarrow-left {\n position: absolute;\n left: 0;\n width: 50.2%;\n overflow: hidden;\n}\n.katex .halfarrow-right {\n position: absolute;\n right: 0;\n width: 50.2%;\n overflow: hidden;\n}\n.katex .brace-left {\n position: absolute;\n left: 0;\n width: 25.1%;\n overflow: hidden;\n}\n.katex .brace-center {\n position: absolute;\n left: 25%;\n width: 50%;\n overflow: hidden;\n}\n.katex .brace-right {\n position: absolute;\n right: 0;\n width: 25.1%;\n overflow: hidden;\n}\n.katex .x-arrow-pad {\n padding: 0 0.5em;\n}\n.katex .cd-arrow-pad {\n padding: 0 0.55556em 0 0.27778em;\n}\n.katex .x-arrow,\n.katex .mover,\n.katex .munder {\n text-align: center;\n}\n.katex .boxpad {\n padding: 0 0.3em;\n}\n.katex .fbox,\n.katex .fcolorbox {\n box-sizing: border-box;\n border: 0.04em solid;\n}\n.katex .cancel-pad {\n padding: 0 0.2em;\n}\n.katex .cancel-lap {\n margin-left: -0.2em;\n margin-right: -0.2em;\n}\n.katex .sout {\n border-bottom-style: solid;\n border-bottom-width: 0.08em;\n}\n.katex .angl {\n box-sizing: border-box;\n border-top: 0.049em solid;\n border-right: 0.049em solid;\n margin-right: 0.03889em;\n}\n.katex .anglpad {\n padding: 0 0.03889em;\n}\n.katex .eqn-num::before {\n counter-increment: katexEqnNo;\n content: "(" counter(katexEqnNo) ")";\n}\n.katex .mml-eqn-num::before {\n counter-increment: mmlEqnNo;\n content: "(" counter(mmlEqnNo) ")";\n}\n.katex .mtr-glue {\n width: 50%;\n}\n.katex .cd-vert-arrow {\n display: inline-block;\n position: relative;\n}\n.katex .cd-label-left {\n display: inline-block;\n position: absolute;\n right: calc(50% + 0.3em);\n text-align: left;\n}\n.katex .cd-label-right {\n display: inline-block;\n position: absolute;\n left: calc(50% + 0.3em);\n text-align: right;\n}\n.katex-display {\n display: block;\n margin: 1em 0;\n text-align: center;\n}\n.katex-display > .katex {\n display: block;\n text-align: center;\n white-space: nowrap;\n}\n.katex-display > .katex > .katex-html {\n display: block;\n position: relative;\n}\n.katex-display > .katex > .katex-html > .tag {\n position: absolute;\n right: 0;\n}\n.katex-display.leqno > .katex > .katex-html > .tag {\n left: 0;\n right: auto;\n}\n.katex-display.fleqn > .katex {\n text-align: left;\n padding-left: 2em;\n}\nbody {\n counter-reset: katexEqnNo mmlEqnNo;\n}\n';let oS=!1;const aS=rT.import("formats/formula");class sS{constructor(e){this.opt=e,this.mindMap=e.mindMap,window.katex=nS.a,this.init(),this.config=this.getKatexConfig(),this.cssEl=null,this.addStyle(),this.extendQuill(),this.onDestroy=this.onDestroy.bind(this),this.mindMap.on("beforeDestroy",this.onDestroy)}onDestroy(){const e=Object.getPrototypeOf(this.mindMap).constructor.instanceCount;e<=1&&(oS=!1,rT.register("formats/formula",aS,!0))}init(){this.mindMap.opt.enableEditFormulaInRichTextEdit&&(this.mindMap.opt.transformRichTextOnEnterEdit=this.latexRichToText.bind(this),this.mindMap.opt.beforeHideRichTextEdit=this.formatLatex.bind(this))}getKatexConfig(){const e={throwOnError:!1,errorColor:"#f00",output:"mathml"};let{getKatexOutputType:t}=this.mindMap.opt;t=t||function(){const e=Object(b["B"])();if(e&&e<=100)return"html"};const n=t()||"mathml";return e.output=["mathml","html"].includes(n)?n:"mathml",e}extendQuill(){if(oS)return;oS=!0;const e=this;class t extends aS{static create(t){let n=super.create(t);return"string"===typeof t&&(nS.a.render(t,n,e.config),n.setAttribute("data-value",Object(b["S"])(t))),n}}rT.register("formats/formula",t,!0)}getStyleText(){const{katexFontPath:e}=this.mindMap.opt;let t="";return"html"===this.config.output&&(t=rS(e)),t+=iS(),t}addStyle(){this.cssEl=document.createElement("style"),this.cssEl.type="text/css",this.cssEl.innerHTML=this.getStyleText(),document.head.appendChild(this.cssEl)}removeStyle(){document.head.removeChild(this.cssEl)}insertFormulaToNode(e,t){let n=this.mindMap.richText;n.showEditText({node:e}),n.quill.insertEmbed(n.quill.getLength()-1,"formula",t),n.setTextStyleIfNotRichText(n.node),n.hideEditText([e])}latexRichToText(e){if(-1!==e.indexOf('class="ql-formula"')){const t=new DOMParser,n=t.parseFromString(e,"text/html"),r=n.getElementsByClassName("ql-formula");for(const i of r)e=e.replace(i.outerHTML,`$${i.getAttribute("data-value")}$`)}return e}formatLatex(e){const t=e.quill.getContents(),n=t.ops;let r=!1;for(let i=n.length-1;i>=0;i--){const e=n[i],t=e.insert;if(t&&"object"!==typeof t&&"\n"!==t&&/\$.+?\$/g.test(t)){const e=[...t.matchAll(/\$.+?\$/g)],o=t.split(/\$.+?\$/g);for(let t=e.length-1;t>=0;t--){const n=e[t]&&e[t][0]&&e[t][0].slice(1,-1)||null;if(null!==n&&n.trim().length>0){const e=this.checkFormulaIsLegal(n);e?(o.splice(t+1,0,{insert:{formula:n}}),r=!0):o.splice(t+1,0,"")}else o.splice(t+1,0,"")}while(o.length>0){let e=o.pop();if("string"===typeof e){if(e.length<1)continue;e={insert:e}}e["attributes"]=n[i]["attributes"],n.splice(i+1,0,e)}n.splice(i,1)}}r&&e.quill.setContents(t)}checkFormulaIsLegal(e){try{return nS.a.renderToString(e),!0}catch(t){return!1}}beforePluginRemove(){this.removeStyle(),this.mindMap.off("beforeDestroy",this.onDestroy)}beforePluginDestroy(){this.removeStyle(),this.mindMap.off("beforeDestroy",this.onDestroy)}}sS.instanceName="formula";var lS=sS;const cS=["rgb(255, 213, 73)","rgb(255, 136, 126)","rgb(107, 225, 141)","rgb(151, 171, 255)","rgb(129, 220, 242)","rgb(255, 163, 125)","rgb(152, 132, 234)"];class hS{constructor({mindMap:e}){this.mindMap=e}updateRainLinesConfig(e={}){const t=this.mindMap.opt.rainbowLinesConfig||{};t.open=!!e.open,t.colorsList=Array.isArray(e.colorsList)?e.colorsList:[],this.mindMap.opt.rainbowLinesConfig.open&&this.removeNodeLineColor(),this.mindMap.render()}removeNodeLineColor(){const e=this.mindMap.renderer.renderTree;e&&(Object(b["wb"])(e,null,e=>{delete e.data.lineColor},null,!0),this.mindMap.command.addHistory())}getSecondLayerAncestor(e){if(0===e.layerIndex)return null;if(1===e.layerIndex)return e;{let t=null,n=e.parent;while(n){if(1===n.layerIndex)return n;n=n.parent}return t}}getColorsList(){const{rainbowLinesConfig:e}=this.mindMap.opt;return e&&Array.isArray(e.colorsList)&&e.colorsList.length>0?e.colorsList:[...cS]}getNodeColor(e){const{rainbowLinesConfig:t}=this.mindMap.opt;if(!t||!t.open)return"";const n=this.getSecondLayerAncestor(e);if(!n)return;const r=Object(b["E"])(n),i=this.getColorsList();return i[r%i.length]}}hS.instanceName="rainbowLines";var uS=hS;const dS={boxShadowColor:"rgba(0, 0, 0, 0.8)",borderRadius:"5px",transition:"all 0.3s ease-out",zIndex:9999,padding:20,margin:50,openBlankMode:!0};class fS{constructor(e){this.mindMap=e.mindMap,this.isInDemonstrate=!1,this.stepList=[],this.currentStepIndex=0,this.currentStepNode=null,this.currentUnderlineTextData=null,this.tmpStyleEl=null,this.highlightEl=null,this.transformState=null,this.renderTree=null,this.config=Object.assign({...dS},this.mindMap.opt.demonstrateConfig||{}),this.needRestorePerformanceMode=!1}enter(){this.bindFullscreenEvent(),document.fullscreenElement===this.mindMap.el?this._enter():Object(b["y"])(this.mindMap.el)}_enter(){this.isInDemonstrate=!0,this.pausePerformanceMode(),this.addTmpStyles(),this.transformState=this.mindMap.view.getTransformData(),this.renderTree=this.mindMap.getData(),this.mindMap.command.pause(),this.mindMap.keyCommand.pause(),this.createHighlightEl(),this.getStepList();let e=!1;this.mindMap.renderer.isRendering&&(e=!0),this.mindMap.execCommand("UNEXPAND_ALL",!1);const t=()=>{e?e=!1:(this.mindMap.off("node_tree_render_end",t),this.jump(this.currentStepIndex),this.bindEvent())};this.mindMap.on("node_tree_render_end",t)}exit(){Object(b["u"])(this.mindMap.el),this.mindMap.updateData(this.renderTree),this.mindMap.view.setTransformData(this.transformState),this.renderTree=null,this.transformState=null,this.stepList=[],this.currentStepIndex=0,this.currentStepNode=null,this.currentUnderlineTextData=null,this.unBindEvent(),this.removeTmpStyles(),this.removeHighlightEl(),this.mindMap.command.recovery(),this.mindMap.keyCommand.recovery(),this.restorePerformanceMode(),this.mindMap.emit("exit_demonstrate"),this.isInDemonstrate=!1}pausePerformanceMode(){const{openPerformance:e}=this.mindMap.opt;e&&(this.needRestorePerformanceMode=!0,this.mindMap.opt.openPerformance=!1,this.mindMap.renderer.forceLoadNode())}restorePerformanceMode(){this.needRestorePerformanceMode&&(this.mindMap.opt.openPerformance=!0,this.mindMap.renderer.forceLoadNode())}addTmpStyles(){this.tmpStyleEl=document.createElement("style");let e="\n /* 画布所有元素禁止响应鼠标事件 */\n .smm-mind-map-container {\n pointer-events: none;\n }\n /* 超链接图标允许响应鼠标事件 */\n .smm-node a {\n pointer-events: all;\n }\n /* 备注图标允许响应鼠标事件 */\n .smm-node .smm-node-note {\n pointer-events: all;\n }\n ";this.config.openBlankMode&&(e+="\n /* 带下划线的文本内容全部隐藏 */\n .smm-richtext-node-wrap u {\n opacity: 0;\n }\n "),this.tmpStyleEl.innerText=e,document.head.appendChild(this.tmpStyleEl)}removeTmpStyles(){this.tmpStyleEl&&document.head.removeChild(this.tmpStyleEl)}createHighlightEl(){this.highlightEl||(this.highlightEl=document.createElement("div"),this.highlightEl.style.cssText=`\n position: absolute;\n box-shadow: 0 0 0 5000px ${this.config.boxShadowColor};\n border-radius: ${this.config.borderRadius};\n transition: ${this.config.transition};\n z-index: ${this.config.zIndex+1};\n pointer-events: none;\n `,this.mindMap.el.appendChild(this.highlightEl))}removeHighlightEl(){this.highlightEl&&(this.mindMap.el.removeChild(this.highlightEl),this.highlightEl=null)}updateHighlightEl({left:e,top:t,width:n,height:r}){const i=this.config.padding;e&&(this.highlightEl.style.left=e-i+"px"),t&&(this.highlightEl.style.top=t-i+"px"),n&&(this.highlightEl.style.width=n+2*i+"px"),r&&(this.highlightEl.style.height=r+2*i+"px")}bindEvent(){this.onKeydown=this.onKeydown.bind(this),window.addEventListener("keydown",this.onKeydown)}bindFullscreenEvent(){this.onFullscreenChange=this.onFullscreenChange.bind(this),document.addEventListener(b["z"],this.onFullscreenChange)}unBindEvent(){window.removeEventListener("keydown",this.onKeydown),document.removeEventListener(b["z"],this.onFullscreenChange)}onFullscreenChange(){document.fullscreenElement?document.fullscreenElement===this.mindMap.el&&this._enter():this.exit()}onKeydown(e){e.keyCode===Hl.Left?this.prev():e.keyCode===Hl.Right?this.next():e.keyCode===Hl.Esc?this.exit():e.keyCode===Hl.Enter&&this.showNextUnderlineText()}prev(){this.currentStepIndex>0&&this.jump(this.currentStepIndex-1)}next(){const e=this.stepList.length;this.currentStepIndex=n)return;const r=t[e];this.currentUnderlineTextData.index++,r.node.style.opacity=1}jump(e){this.currentUnderlineTextData&&(this.currentUnderlineTextData.list.forEach(e=>{e.node.style.opacity=""}),this.currentUnderlineTextData=null),this.currentStepNode=null,this.currentStepIndex=e,this.mindMap.emit("demonstrate_jump",this.currentStepIndex,this.stepList.length);const t=this.stepList[e],n=t.node,r=n.data.uid,i=this.mindMap.renderer.findNodeByUid(r);if(i)if("node"===t.type){this.currentStepNode=i;const e=this.config.openBlankMode?i.group.find("u"):null;e&&e.length>0&&(this.currentUnderlineTextData={index:0,list:e,length:e.length}),this.mindMap.view.fit(()=>i.group.rbox(),!0,this.config.padding+this.config.margin);const t=i.group.rbox();this.updateHighlightEl({left:t.x,top:t.y,width:t.width,height:t.height})}else{const e=()=>{n.children.forEach(e=>{e.data.expand=!1}),this.mindMap.render(()=>{this.mindMap.view.fit(()=>{const e=Object(b["H"])(i,0,0,0,0,!0);return{...e,x:e.left,y:e.top}},!0,this.config.padding+this.config.margin);const e=Object(b["H"])(i,0,0,0,0,!0);this.updateHighlightEl(e)})};if(n.data.expand)e();else{this.mindMap.execCommand("SET_NODE_EXPAND",i,!0);const t=()=>{this.mindMap.off("node_tree_render_end",t),e()};this.mindMap.on("node_tree_render_end",t)}}else this.mindMap.renderer.expandToNodeUid(r,()=>{const t=this.mindMap.renderer.findNodeByUid(r);t&&this.jump(e)})}getStepList(){Object(b["wb"])(this.mindMap.renderer.renderTree,null,e=>{this.stepList.push({type:"node",node:e});const t=Object(b["x"])(e.data);t.forEach(e=>{e.uid&&this.stepList.push({type:"node",node:{data:e}})}),e.children.length>1&&this.stepList.push({type:"children",node:e})})}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}fS.instanceName="demonstrate";var pS=fS;const mS=e=>{e=Object(b["M"])(e);const t={},n={};e.forEach(e=>{const r=e.parent;if(r){const i=r.uid;n[i]=r;const o=e.getIndexInBrothers(),a={node:e,index:o};t[i]?t[i].find(e=>e.index===a.index)||t[i].push(a):t[i]=[a]}});const r=[];return Object.keys(t).forEach(e=>{const i=t[e],o=n[e];if(i.length>1){const e=i.map(e=>e.index).sort((e,t)=>e-t),t=e[0],n=e[e.length-1];let a=-1,s=-1;for(let i=t;i<=n;i++)e.includes(i)?(-1===a&&(a=i),s=i):(-1!==a&&-1!==s&&r.push({node:o,range:[a,s]}),a=-1,s=-1);-1!==a&&-1!==s&&r.push({node:o,range:[a,s]})}else r.push({node:o,range:[i[0].index,i[0].index]})}),r},gS=e=>{const t=e.children;if(!t||t.length<=0)return;const n=[],r={};return t.forEach((e,t)=>{const i=e.getData("outerFrame");if(!i)return;const o=i.groupId;o?(r[o]||(r[o]=[]),r[o].push({node:e,index:t})):n.push({nodeList:[e],range:[t,t]})}),Object.keys(r).forEach(e=>{const t=r[e];n.push({nodeList:t.map(e=>e.node),range:[t[0].index,t[t.length-1].index]})}),n},vS={radius:5,strokeWidth:2,strokeColor:"#0984e3",strokeDasharray:"5,5",fill:"rgba(9,132,227,0.05)"};class bS{constructor(e={}){this.mindMap=e.mindMap,this.draw=null,this.createDrawContainer(),this.outerFrameElList=[],this.activeOuterFrame=null,this.bindEvent()}createDrawContainer(){this.draw=this.mindMap.draw.group(),this.draw.addClass("smm-outer-frame-container"),this.draw.back(),this.draw.forward()}bindEvent(){this.renderOuterFrames=this.renderOuterFrames.bind(this),this.mindMap.on("node_tree_render_end",this.renderOuterFrames),this.mindMap.on("data_change",this.renderOuterFrames),this.clearActiveOuterFrame=this.clearActiveOuterFrame.bind(this),this.mindMap.on("draw_click",this.clearActiveOuterFrame),this.mindMap.on("node_click",this.clearActiveOuterFrame),this.addOuterFrame=this.addOuterFrame.bind(this),this.mindMap.command.add("ADD_OUTER_FRAME",this.addOuterFrame),this.removeActiveOuterFrame=this.removeActiveOuterFrame.bind(this),this.mindMap.keyCommand.addShortcut("Del|Backspace",this.removeActiveOuterFrame)}unBindEvent(){this.mindMap.off("node_tree_render_end",this.renderOuterFrames),this.mindMap.off("data_change",this.renderOuterFrames),this.mindMap.off("draw_click",this.clearActiveOuterFrame),this.mindMap.off("node_click",this.clearActiveOuterFrame),this.mindMap.command.remove("ADD_OUTER_FRAME",this.addOuterFrame),this.mindMap.keyCommand.removeShortcut("Del|Backspace",this.removeActiveOuterFrame)}addOuterFrame(e,t={}){e=Object(b["w"])(e);const n=this.mindMap.renderer.activeNodeList;if(n.length<=0&&e.length<=0)return;let r=e.length>0?e:n;r=r.filter(e=>!e.isRoot&&!e.isGeneralization);const i=mS(r);i.forEach(({node:e,range:n})=>{const r=e.children.slice(n[0],n[1]+1),i=Object(b["q"])();r.forEach(e=>{let n=e.getData("outerFrame");n=n?{...n,...t,groupId:i}:{...t,groupId:i},this.mindMap.execCommand("SET_NODE_DATA",e,{outerFrame:n})})})}getActiveOuterFrame(){return this.activeOuterFrame?{...this.activeOuterFrame}:null}removeActiveOuterFrame(){if(!this.activeOuterFrame)return;const{node:e,range:t}=this.activeOuterFrame;this.getRangeNodeList(e,t).forEach(e=>{this.mindMap.execCommand("SET_NODE_DATA",e,{outerFrame:null})}),this.mindMap.emit("outer_frame_delete")}updateActiveOuterFrame(e={}){if(!this.activeOuterFrame)return;const{node:t,range:n}=this.activeOuterFrame;this.getRangeNodeList(t,n).forEach(t=>{const n=t.getData("outerFrame");this.mindMap.execCommand("SET_NODE_DATA",t,{outerFrame:{...n,...e}})})}getRangeNodeList(e,t){return e.children.slice(t[0],t[1]+1).filter(e=>e.getData("outerFrame"))}renderOuterFrames(){this.clearOuterFrameElList();let e=this.mindMap.renderer.root;if(!e)return;const t=this.mindMap.draw.transform(),{outerFramePaddingX:n,outerFramePaddingY:r}=this.mindMap.opt;Object(b["wb"])(e,null,e=>{if(!e)return;const i=gS(e);i&&i.length>0&&i.forEach(({nodeList:i,range:o})=>{if(-1===o[0]||-1===o[1])return;const{left:a,top:s,width:l,height:c}=Object(b["G"])(i);if(!Number.isFinite(a)||!Number.isFinite(s)||!Number.isFinite(l)||!Number.isFinite(c))return;const h=this.createOuterFrameEl((a-n-this.mindMap.elRect.left-t.translateX)/t.scaleX,(s-r-this.mindMap.elRect.top-t.translateY)/t.scaleY,(l+2*n)/t.scaleX,(c+2*r)/t.scaleY,i[0].getData("outerFrame"));h.on("click",t=>{t.stopPropagation(),this.setActiveOuterFrame(h,e,o)})})},()=>{},!0,0)}setActiveOuterFrame(e,t,n){this.mindMap.execCommand("CLEAR_ACTIVE_NODE"),this.clearActiveOuterFrame(),this.activeOuterFrame={el:e,node:t,range:n},e.stroke({dasharray:"none"}),this.mindMap.emit("outer_frame_active",e,t,n)}clearActiveOuterFrame(){if(!this.activeOuterFrame)return;const{el:e}=this.activeOuterFrame;e.stroke({dasharray:e.cacheStyle.dasharray||vS.strokeDasharray}),this.activeOuterFrame=null}createOuterFrameEl(e,t,n,r,i={}){i={...vS,...i};const o=this.draw.rect().size(n,r).radius(i.radius).stroke({width:i.strokeWidth,color:i.strokeColor,dasharray:i.strokeDasharray}).fill({color:i.fill}).x(e).y(t);return o.cacheStyle={dasharray:i.strokeDasharray},this.outerFrameElList.push(o),o}clearOuterFrameElList(){this.outerFrameElList.forEach(e=>{e.remove()}),this.outerFrameElList=[],this.activeOuterFrame=null}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}bS.instanceName="outerFrame";var yS=bS;function wS(e,t,n){if(e&&e.length){const[r,i]=t,o=Math.PI/180*n,a=Math.cos(o),s=Math.sin(o);for(const t of e){const[e,n]=t;t[0]=(e-r)*a-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*a+i}}}function xS(e,t){return e[0]===t[0]&&e[1]===t[1]}function kS(e,t,n,r=1){const i=n,o=Math.max(t,.1),a=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,s=[0,0];if(i)for(const c of a)wS(c,s,i);const l=function(e,t,n){const r=[];for(const c of e){const e=[...c];xS(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}const i=[];t=Math.max(t,.1);const o=[];for(const c of r)for(let e=0;ee.ymint.ymin?1:e.xt.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),!o.length)return i;let a=[],s=o[0].ymin,l=0;for(;a.length||o.length;){if(o.length){let e=-1;for(let t=0;ts);t++)e=t;o.splice(0,e+1).forEach(e=>{a.push({s:s,edge:e})})}if(a=a.filter(e=>!(e.edge.ymax<=s)),a.sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(1!==n||l%t==0)&&a.length>1)for(let e=0;e=a.length)break;const n=a[e].edge,r=a[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,a.forEach(e=>{e.edge.x=e.edge.x+n*e.edge.islope}),l++}return i}(a,o,r);if(i){for(const e of a)wS(e,s,-i);!function(e,t,n){const r=[];e.forEach(e=>r.push(...e)),wS(r,t,n)}(l,s,-i)}return l}function CS(e,t){var n;const r=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return t.roughness>=1&&((null===(n=t.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(o=i),kS(e,i,r,o||1)}class TS{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const n=CS(e,t);return{type:"fillSketch",ops:this.renderLines(n,t)}}renderLines(e,t){const n=[];for(const r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}}function SS(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}class AS extends TS{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);const r=CS(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,o=[],a=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(const[l,c]of r)SS([l,c])&&o.push([[l[0]-a,l[1]+s],[...c]],[[l[0]+a,l[1]-s],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,t)}}}class ES extends TS{fillPolygons(e,t){const n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}}class MS{constructor(e){this.helper=e}fillPolygons(e,t){const n=CS(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){const n=[];let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);const o=r/4;for(const a of e){const e=SS(a),s=e/r,l=Math.ceil(s)-1,c=e-l*r,h=(a[0][0]+a[1][0])/2-r/4,u=Math.min(a[0][1],a[1][1]);for(let a=0;a{const o=SS(e),a=Math.floor(o/(n+r)),s=(o+r-a*(n+r))/2;let l=e[0],c=e[1];l[0]>c[0]&&(l=e[1],c=e[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u{const i=SS(e),o=Math.round(i/(2*t));let a=e[0],s=e[1];a[0]>s[0]&&(a=e[1],s=e[0]);const l=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let c=0;cr%2?e+n:e+t);o.push({key:"C",data:e}),t=e[4],n=e[5];break}case"Q":o.push({key:"Q",data:[...s]}),t=s[2],n=s[3];break;case"q":{const e=s.map((e,r)=>r%2?e+n:e+t);o.push({key:"Q",data:e}),t=e[2],n=e[3];break}case"A":o.push({key:"A",data:[...s]}),t=s[5],n=s[6];break;case"a":t+=s[5],n+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case"H":o.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...s]}),t=s[2],n=s[3];break;case"s":{const e=s.map((e,r)=>r%2?e+n:e+t);o.push({key:"S",data:e}),t=e[2],n=e[3];break}case"T":o.push({key:"T",data:[...s]}),t=s[0],n=s[1];break;case"t":t+=s[0],n+=s[1],o.push({key:"T",data:[t,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=r,n=i}return o}function HS(e){const t=[];let n="",r=0,i=0,o=0,a=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[r,i]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),r=h[4],i=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],t.push({key:"L",data:[r,i]});break;case"V":i=h[0],t.push({key:"L",data:[r,i]});break;case"S":{let e=0,o=0;"C"===n||"S"===n?(e=r+(r-s),o=i+(i-l)):(e=r,o=i),t.push({key:"C",data:[e,o,...h]}),s=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[e,o]=h;let a=0,c=0;"Q"===n||"T"===n?(a=r+(r-s),c=i+(i-l)):(a=r,c=i);const u=r+2*(a-r)/3,d=i+2*(c-i)/3,f=e+2*(a-e)/3,p=o+2*(c-o)/3;t.push({key:"C",data:[u,d,f,p,e,o]}),s=a,l=c,r=e,i=o;break}case"Q":{const[e,n,o,a]=h,c=r+2*(e-r)/3,u=i+2*(n-i)/3,d=o+2*(e-o)/3,f=a+2*(n-a)/3;t.push({key:"C",data:[c,u,d,f,o,a]}),s=e,l=n,r=o,i=a;break}case"A":{const e=Math.abs(h[0]),n=Math.abs(h[1]),o=h[2],a=h[3],s=h[4],l=h[5],c=h[6];0===e||0===n?(t.push({key:"C",data:[r,i,l,c,l,c]}),r=l,i=c):r===l&&i===c||(qS(r,i,l,c,e,n,o,a,s).forEach((function(e){t.push({key:"C",data:e})})),r=l,i=c);break}case"Z":t.push({key:"Z",data:[]}),r=o,i=a}n=c}return t}function US(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function qS(e,t,n,r,i,o,a,s,l,c){const h=(u=a,Math.PI*u/180);var u;let d=[],f=0,p=0,m=0,g=0;if(c)[f,p,m,g]=c;else{[e,t]=US(e,t,-h),[n,r]=US(n,r,-h);const a=(e-n)/2,c=(t-r)/2;let u=a*a/(i*i)+c*c/(o*o);u>1&&(u=Math.sqrt(u),i*=u,o*=u);const d=i*i,v=o*o,b=d*v-d*c*c-v*a*a,y=d*c*c+v*a*a,w=(s===l?-1:1)*Math.sqrt(Math.abs(b/y));m=w*i*c/o+(e+n)/2,g=w*-o*a/i+(t+r)/2,f=Math.asin(parseFloat(((t-g)/o).toFixed(9))),p=Math.asin(parseFloat(((r-g)/o).toFixed(9))),ep&&(f-=2*Math.PI),!l&&p>f&&(p-=2*Math.PI)}let v=p-f;if(Math.abs(v)>120*Math.PI/180){const e=p,t=n,s=r;p=l&&p>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=qS(n=m+i*Math.cos(p),r=g+o*Math.sin(p),t,s,i,o,a,0,l,[p,e,m,g])}v=p-f;const b=Math.cos(f),y=Math.sin(f),w=Math.cos(p),x=Math.sin(p),k=Math.tan(v/4),C=4/3*i*k,T=4/3*o*k,S=[e,t],A=[e+C*y,t-T*b],E=[n+C*x,r-T*w],M=[n,r];if(A[0]=2*S[0]-A[0],A[1]=2*S[1]-A[1],c)return[A,E,M].concat(d);{d=[A,E,M].concat(d);const e=[];for(let t=0;t2){const i=[];for(let t=0;t2*Math.PI&&(f=0,p=2*Math.PI);const m=2*Math.PI/l.curveStepCount,g=Math.min(m/2,(p-f)/2),v=cA(g,c,h,u,d,f,p,1,l);if(!l.disableMultiStroke){const e=cA(g,c,h,u,d,f,p,1.5,l);v.push(...e)}return a&&(s?v.push(...iA(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...iA(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l)):v.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:v}}function JS(e,t){const n=HS(jS(BS(e))),r=[];let i=[0,0],o=[0,0];for(const{key:a,data:s}of n)switch(a){case"M":o=[s[0],s[1]],i=[s[0],s[1]];break;case"L":r.push(...iA(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]];break;case"C":{const[e,n,i,a,l,c]=s;r.push(...hA(e,n,i,a,l,c,o,t)),o=[l,c];break}case"Z":r.push(...iA(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]]}return{type:"path",ops:r}}function QS(e,t){const n=[];for(const r of e)if(r.length){const e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:"move",data:[r[0][0]+rA(e,t),r[0][1]+rA(e,t)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*tA(i);let f=i.bowing*i.maxRandomnessOffset*(r-t)/200,p=i.bowing*i.maxRandomnessOffset*(e-n)/200;f=rA(f,i,c),p=rA(p,i,c);const m=[],g=()=>rA(u,i,c),v=()=>rA(h,i,c),b=i.preserveVertices;return o&&(a?m.push({op:"move",data:[e+(b?0:g()),t+(b?0:g())]}):m.push({op:"move",data:[e+(b?0:rA(h,i,c)),t+(b?0:rA(h,i,c))]})),a?m.push({op:"bcurveTo",data:[f+e+(n-e)*d+g(),p+t+(r-t)*d+g(),f+e+2*(n-e)*d+g(),p+t+2*(r-t)*d+g(),n+(b?0:g()),r+(b?0:g())]}):m.push({op:"bcurveTo",data:[f+e+(n-e)*d+v(),p+t+(r-t)*d+v(),f+e+2*(n-e)*d+v(),p+t+2*(r-t)*d+v(),n+(b?0:v()),r+(b?0:v())]}),m}function aA(e,t,n){if(!e.length)return[];const r=[];r.push([e[0][0]+rA(t,n),e[0][1]+rA(t,n)]),r.push([e[0][0]+rA(t,n),e[0][1]+rA(t,n)]);for(let i=1;i3){const o=[],a=1-n.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+21&&i.push(n)):i.push(n),i.push(e[t+3])}else{const r=.5,o=e[t+0],a=e[t+1],s=e[t+2],l=e[t+3],c=mA(o,a,r),h=mA(a,s,r),u=mA(s,l,r),d=mA(c,h,r),f=mA(h,u,r),p=mA(d,f,r);gA([o,c,d,p],0,n,i),gA([p,f,u,l],0,n,i)}var o,a;return i}function vA(e,t){return bA(e,0,e.length,t)}function bA(e,t,n,r,i){const o=i||[],a=e[t],s=e[n-1];let l=0,c=1;for(let h=t+1;hl&&(l=t,c=h)}return Math.sqrt(l)>r?(bA(e,t,c+1,r,o),bA(e,c,n,r,o)):(o.length||o.push(a),o.push(s)),o}function yA(e,t=.15,n){const r=[],i=(e.length-1)/3;for(let o=0;o0?bA(r,0,r.length,n):r}const wA="none";class xA{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){const o=this._o(i);return this._d("line",[GS(e,t,n,r,o)],o)}rectangle(e,t,n,r,i){const o=this._o(i),a=[],s=_S(e,t,n,r,o);if(o.fill){const i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];"solid"===o.fillStyle?a.push(QS([i],o)):a.push($S([i],o))}return o.stroke!==wA&&a.push(s),this._d("rectangle",a,o)}ellipse(e,t,n,r,i){const o=this._o(i),a=[],s=YS(n,r,o),l=XS(e,t,o,s);if(o.fill)if("solid"===o.fillStyle){const n=XS(e,t,o,s).opset;n.type="fillPath",a.push(n)}else a.push($S([l.estimatedPoints],o));return o.stroke!==wA&&a.push(l.opset),this._d("ellipse",a,o)}circle(e,t,n,r){const i=this.ellipse(e,t,n,n,r);return i.shape="circle",i}linearPath(e,t){const n=this._o(t);return this._d("linearPath",[VS(e,!1,n)],n)}arc(e,t,n,r,i,o,a=!1,s){const l=this._o(s),c=[],h=ZS(e,t,n,r,i,o,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=ZS(e,t,n,r,i,o,!0,!1,a);s.type="fillPath",c.push(s)}else c.push(function(e,t,n,r,i,o,a){const s=e,l=t;let c=Math.abs(n/2),h=Math.abs(r/2);c+=rA(.01*c,a),h+=rA(.01*h,a);let u=i,d=o;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const f=(d-u)/a.curveStepCount,p=[];for(let m=u;m<=d;m+=f)p.push([s+c*Math.cos(m),l+h*Math.sin(m)]);return p.push([s+c*Math.cos(d),l+h*Math.sin(d)]),p.push([s,l]),$S([p],a)}(e,t,n,r,i,o,l));return l.stroke!==wA&&c.push(h),this._d("arc",c,l)}curve(e,t){const n=this._o(t),r=[],i=KS(e,n);if(n.fill&&n.fill!==wA)if("solid"===n.fillStyle){const t=KS(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(t.ops)})}else{const t=[],i=e;if(i.length){const e="number"==typeof i[0][0]?[i]:i;for(const r of e)r.length<3?t.push(...r):3===r.length?t.push(...yA(dA([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...yA(dA(r),10,(1+n.roughness)/2))}t.length&&r.push($S([t],n))}return n.stroke!==wA&&r.push(i),this._d("curve",r,n)}polygon(e,t){const n=this._o(t),r=[],i=VS(e,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(QS([e],n)):r.push($S([e],n))),n.stroke!==wA&&r.push(i),this._d("polygon",r,n)}path(e,t){const n=this._o(t),r=[];if(!e)return this._d("path",r,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=n.fill&&"transparent"!==n.fill&&n.fill!==wA,o=n.stroke!==wA,a=!!(n.simplification&&n.simplification<1),s=function(e,t,n){const r=HS(jS(BS(e))),i=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...yA(s,t)),s=[]},c=()=>{l(),o.length&&(i.push(o),o=[])};for(const{key:u,data:d}of r)switch(u){case"M":c(),a=[d[0],d[1]],o.push(a);break;case"L":l(),o.push([d[0],d[1]]);break;case"C":if(!s.length){const e=o.length?o[o.length-1]:a;s.push([e[0],e[1]])}s.push([d[0],d[1]]),s.push([d[2],d[3]]),s.push([d[4],d[5]]);break;case"Z":l(),o.push([a[0],a[1]])}if(c(),!n)return i;const h=[];for(const u of i){const e=vA(u,n);e.length&&h.push(e)}return h}(e,1,a?4-4*(n.simplification||1):(1+n.roughness)/2),l=JS(e,n);if(i)if("solid"===n.fillStyle)if(1===s.length){const t=JS(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(t.ops)})}else r.push(QS(s,n));else r.push($S(s,n));return o&&(a?s.forEach(e=>{r.push(VS(e,!1,n))}):r.push(l)),this._d("path",r,n)}opsToPath(e,t){let n="";for(const r of e.ops){const e="number"==typeof t&&t>=0?r.data.map(e=>+e.toFixed(t)):r.data;switch(r.op){case"move":n+=`M${e[0]} ${e[1]} `;break;case"bcurveTo":n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case"lineTo":n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){const t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(const i of t){let e=null;switch(i.type){case"path":e={d:this.opsToPath(i),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:wA};break;case"fillPath":e={d:this.opsToPath(i),stroke:wA,strokeWidth:0,fill:n.fill||wA};break;case"fillSketch":e=this.fillSketch(i,n)}e&&r.push(e)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||wA,strokeWidth:n,fill:wA}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}}class kA{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new xA(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(const o of t)switch(o.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,o,i),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const t="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(r,o,i,t),r.restore();break}case"fillSketch":this.fillSketch(r,o,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r="nonzero"){e.beginPath();for(const i of t.ops){const t="number"==typeof n&&n>=0?i.data.map(e=>+e.toFixed(n)):i.data;switch(i.op){case"move":e.moveTo(t[0],t[1]);break;case"bcurveTo":e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case"lineTo":e.lineTo(t[0],t[1])}}"fillPath"===t.type?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){const o=this.gen.line(e,t,n,r,i);return this.draw(o),o}rectangle(e,t,n,r,i){const o=this.gen.rectangle(e,t,n,r,i);return this.draw(o),o}ellipse(e,t,n,r,i){const o=this.gen.ellipse(e,t,n,r,i);return this.draw(o),o}circle(e,t,n,r){const i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,o,a=!1,s){const l=this.gen.arc(e,t,n,r,i,o,a,s);return this.draw(l),l}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){const n=this.gen.path(e,t);return this.draw(n),n}}const CA="http://www.w3.org/2000/svg";class TA{constructor(e,t){this.svg=e,this.gen=new xA(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(CA,"g"),o=e.options.fixedDecimalPlaceDigits;for(const a of t){let t=null;switch(a.type){case"path":t=r.createElementNS(CA,"path"),t.setAttribute("d",this.opsToPath(a,o)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":t=r.createElementNS(CA,"path"),t.setAttribute("d",this.opsToPath(a,o)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(r,a,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const i=e.createElementNS(CA,"path");return i.setAttribute("d",this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute("stroke",n.fill||""),i.setAttribute("stroke-width",r+""),i.setAttribute("fill","none"),n.fillLineDash&&i.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",""+n.fillLineDashOffset),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){const o=this.gen.line(e,t,n,r,i);return this.draw(o)}rectangle(e,t,n,r,i){const o=this.gen.rectangle(e,t,n,r,i);return this.draw(o)}ellipse(e,t,n,r,i){const o=this.gen.ellipse(e,t,n,r,i);return this.draw(o)}circle(e,t,n,r){const i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,o,a=!1,s){const l=this.gen.arc(e,t,n,r,i,o,a,s);return this.draw(l)}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n)}path(e,t){const n=this.gen.path(e,t);return this.draw(n)}}var SA={canvas:(e,t)=>new kA(e,t),svg:(e,t)=>new TA(e,t),generator:e=>new xA(e),newSeed:()=>xA.newSeed()};class AA{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.rc=SA.svg(this.mindMap.svg.node),this.style={fill:"inherit",fillStyle:"solid",stroke:"inherit",strokeWidth:"inherit"},this.init()}init(){this.createPath=this.createPath.bind(this),this.createPolygon=this.createPolygon.bind(this),this.transformPath=this.transformPath.bind(this),this.mindMap.updateConfig({customCreateNodePath:this.createPath,customCreateNodePolygon:this.createPolygon,customTransformNodeLinePath:this.transformPath})}createPath(e){return this.rc.path(e,{...this.style})}createPolygon(e){return this.rc.polygon(e,{...this.style})}transformPath(e){const t=this.rc.path(e);return t.getElementsByTagName("path")[0].getAttribute("d")}reset(){this.mindMap.updateConfig({customCreateNodePath:null,customCreateNodePolygon:null,customTransformNodeLinePath:null})}beforePluginRemove(){this.reset()}beforePluginDestroy(){this.reset()}}AA.instanceName="handDrawnLikeStyle";var EA=AA;const MA="http://www.w3.org/2000/svg";class NA{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}function OA(e,t,n,r,i){return{type:"path",ops:PA(e,t,n,r,i)}}function DA(e,t,n){const r=(e||[]).length;if(r>2){const i=[];for(let t=0;t500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*IA(i);let f=i.bowing*i.maxRandomnessOffset*(r-t)/200,p=i.bowing*i.maxRandomnessOffset*(e-n)/200;f=RA(f,i,c),p=RA(p,i,c);const m=[],g=()=>RA(u,i,c),v=()=>RA(h,i,c);return o&&(a?m.push({op:"move",data:[e+g(),t+g()]}):m.push({op:"move",data:[e+RA(h,i,c),t+RA(h,i,c)]})),a?m.push({op:"bcurveTo",data:[f+e+(n-e)*d+g(),p+t+(r-t)*d+g(),f+e+2*(n-e)*d+g(),p+t+2*(r-t)*d+g(),n+g(),r+g()]}):m.push({op:"bcurveTo",data:[f+e+(n-e)*d+v(),p+t+(r-t)*d+v(),f+e+2*(n-e)*d+v(),p+t+2*(r-t)*d+v(),n+v(),r+v()]}),m}function jA(e,t,n){const r=e.length,i=[];if(r>3){const o=[],a=1-n.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2e.setAttribute(t,n);for(const r of t){const t=document.createElementNS(MA,"path");if(u(t,"d",r),u(t,"fill","none"),u(t,"stroke",n.color||"currentColor"),u(t,"stroke-width",""+s),c){const e=t.getTotalLength();o.push(e),h+=e}e.appendChild(t),l.push(t)}if(c){let e=0;for(let t=0;t{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,"showing"===this._state&&this.haveRectsChanged()&&this.show()},400))},this._e=e,this._config=JSON.parse(JSON.stringify(t)),this.attach()}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if("unattached"===this._state&&this._e.parentElement){!function(){if(!window.__rno_kf_s){const e=window.__rno_kf_s=document.createElement("style");e.textContent="@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }",document.head.appendChild(e)}}();const e=this._svg=document.createElementNS(MA,"svg");e.setAttribute("class","rough-annotation");const t=e.style;t.position="absolute",t.top="0",t.left="0",t.overflow="visible",t.pointerEvents="none",t.width="100px",t.height="100px";const n="highlight"===this._config.type;if(this._e.insertAdjacentElement(n?"beforebegin":"afterend",e),this._state="not-showing",n){const e=window.getComputedStyle(this._e).position;(!e||"static"===e)&&(this._e.style.position="relative")}this.attachListeners()}}detachListeners(){window.removeEventListener("resize",this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener("resize",this._resizeListener,{passive:!0}),!this._ro&&"ResizeObserver"in window&&(this._ro=new window.ResizeObserver(e=>{for(const t of e)t.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){const e=this.rects();if(e.length!==this._lastSizes.length)return!0;for(let t=0;tMath.round(e)===Math.round(t);return n(e.x,t.x)&&n(e.y,t.y)&&n(e.w,t.w)&&n(e.h,t.h)}isShowing(){return"not-showing"!==this._state}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}show(){switch(this._state){case"unattached":break;case"showing":this.hide(),this._svg&&this.render(this._svg,!0);break;case"not-showing":this.attach(),this._svg&&this.render(this._svg,!1)}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state="not-showing"}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state="unattached",this.detachListeners()}render(e,t){let n=this._config;t&&(n=JSON.parse(JSON.stringify(this._config)),n.animate=!1);const r=this.rects();let i=0;r.forEach(e=>i+=e.w);const o=n.animationDuration||800;let a=0;for(let s=0;se?Array.isArray(e)?e:[e]:[],_A=e=>null===e||void 0===e||""===e;class KA{constructor({mindMap:e}){this.mindMap=e,this.defaultConfig={type:"circle",color:this.mindMap.opt.hoverRectColor,strokeWidth:1,padding:20,animate:!0},this.cacheHandleBeingExportSvg=null,this.cacheHandleDragCloneNode=null,this.bindEvent()}bindEvent(){this.renderNodeNotation=this.renderNodeNotation.bind(this),this.mindMap.on("node_layout_end",this.renderNodeNotation),this.setNotation=this.setNotation.bind(this),this.mindMap.command.add("SET_NOTATION",this.setNotation),this.handleBeingExportSvg=this.handleBeingExportSvg.bind(this),this.cacheHandleBeingExportSvg=this.mindMap.opt.handleBeingExportSvg,this.mindMap.opt.handleBeingExportSvg=this.handleBeingExportSvg,this.handleDragCloneNode=this.handleDragCloneNode.bind(this),this.cacheHandleDragCloneNode=this.mindMap.opt.handleDragCloneNode,this.mindMap.opt.handleDragCloneNode=this.handleDragCloneNode}unBindEvent(){this.mindMap.off("node_layout_end",this.renderNodeNotation),this.mindMap.command.remove("SET_NOTATION",this.setNotation),this.mindMap.opt.handleBeingExportSvg=this.cacheHandleBeingExportSvg,this.mindMap.opt.handleDragCloneNode=this.cacheHandleDragCloneNode}renderNodeNotation(e){setTimeout(()=>{const t=e.getData("notation");if(t){const{show:n,config:r}=t;if(n){e.notationObj&&e.notationObj.remove();const t={...this.defaultConfig};Object.keys(this.defaultConfig).forEach(e=>{_A(r[e])||(t[e]=r[e])}),e.notationObj=GA(e.group.findOne(".smm-node-shape").node,t),e.notationObj.haveRectsChanged=()=>!1,e.notationObj._resizeListener=()=>{},e.notationObj.show();const{scaleX:n}=this.mindMap.draw.transform();Array.from(e.notationObj._svg.children).forEach(e=>{e.style.transform=`scale(${1/n})`})}else e.notationObj&&e.notationObj.remove()}},0)}setNotation(e,t,n){e=VA(e);const r=this.mindMap.renderer.activeNodeList;if(r.length<=0&&e.length<=0)return;const i=e.length>0,o=i?e:r;o.forEach(e=>{this.mindMap.execCommand("SET_NODE_DATA",e,{notation:{show:t,config:{...n||{}}}}),e.needLayout=!0}),this.mindMap.render(null)}handleBeingExportSvg(e){const t=e.find(".rough-annotation");return t.forEach(e=>{const t=e.children();t&&t.length>0&&t.forEach(e=>{e.css("stroke-dashoffset",""),e.css("stroke-dasharray",""),e.css("animation","")})}),e}handleDragCloneNode(e){const t=e.find(".rough-annotation");t.forEach(e=>{e.remove()})}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}KA.instanceName="notation";var YA=KA;const XA=26,ZA=(e,t)=>{const n=Math.ceil(e/XA),r=e%XA,i=String.fromCharCode(0===r?90:r+64),o=new Array(n).fill(t?i:i.toLowerCase());return o.join("")},JA=(e,t)=>{const n=[{value:1e3,symbol:"M"},{value:900,symbol:"CM"},{value:500,symbol:"D"},{value:400,symbol:"CD"},{value:100,symbol:"C"},{value:90,symbol:"XC"},{value:50,symbol:"L"},{value:40,symbol:"XL"},{value:10,symbol:"X"},{value:9,symbol:"IX"},{value:5,symbol:"V"},{value:4,symbol:"IV"},{value:1,symbol:"I"}];let r="";for(const{value:i,symbol:o}of n)while(e>=i)r+=o,e-=i;return t?r:r.toLowerCase()},QA=e=>{const t=e,n=["","十","百","千","万","十","百","千","亿"],r=["零","一","二","三","四","五","六","七","八","九"];if(0===e)return r[0];let i="",o=0,a=!1;while(e>0){const t=e%10;0!==t?(i=r[t]+n[o]+i,a=!1):a||(i=r[0]+i,a=!0),e=Math.floor(e/10),o++}return i.endsWith(r[0])&&(i=i.slice(0,-1)),t>=10&&t<19&&(i=i.replace(/^一/g,"")),i},$A={1:(e,t)=>(t?t+".":"")+e,2:(e,t)=>(t||"")+e+".",3:(e,t)=>{const n=t?t.replace(/[()]/g,"")+".":"";return`(${n+e})`},4:(e,t)=>(t||"")+ZA(e,!1)+".",5:(e,t)=>(t||"")+ZA(e,!0)+".",6:(e,t)=>(t||"")+JA(e,!1)+".",7:(e,t)=>(t||"")+JA(e,!0)+".",8:(e,t)=>(t||"")+QA(e)+"、"},eE=e=>e?Array.isArray(e)?e:[e]:[];class tE{constructor(e){this.mindMap=e.mindMap,this.bindEvent()}bindEvent(){this.setNumber=this.setNumber.bind(this),this.mindMap.command.add("SET_NUMBER",this.setNumber)}unBindEvent(){this.mindMap.command.remove("SET_NUMBER",this.setNumber)}setNumber(e,t){e=eE(e);const n=this.mindMap.renderer.activeNodeList;if(n.length<=0&&e.length<=0)return;let r=e.length>0?e:n;r=r.filter(e=>!e.isGeneralization),r.forEach(e=>{let n=null;if(t){const r=e.getData("number")||{};n={type:1,level:1,...r,...t}}this.mindMap.execCommand("SET_NODE_DATA",e,{number:n})}),this.mindMap.render()}createNumberContent(e){const t=e.createSvgTextNode(e.number+"");e.style.text(t);let{width:n,height:r}=t.bbox();return n=Math.ceil(n),r=Math.ceil(r),{node:t,width:n,height:r}}updateNumber(e,t){const n=e.number;return e.number=t,n!==t}getNodeNumberStr({ancestors:e,layerIndex:t,num:n,parentNumberStr:r}){const i=this.getFirstHasNumberAncestor(e);return i&&(0===i.number.level||t-i.layerIndex<=i.number.level)?this.formatNumberStr({num:n,type:i.number.type,parentNumberStr:t===i.layerIndex+1?"":r}):""}formatNumberStr({num:e,type:t,parentNumberStr:n}){return $A[t](e,n)}getFirstHasNumberAncestor(e){let t=null,n=0;for(let r=e.length-1;r>=0;r--)if(e[r].data.number){t=e[r].data.number,n=r;break}return t?{number:t,layerIndex:n}:null}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}tE.instanceName="numbers";var nE=tE;let rE=null;const iE=e=>{rE||(rE=document.createElement("div")),rE.innerHTML=e;const t=rE.childNodes;let n="";for(let r=0;r{oE||(oE=document.createElement("div")),oE.innerHTML=e;const t=oE.querySelectorAll(".ql-formula");return Array.from(t).forEach(e=>{e.parentNode.removeChild(e)}),oE.innerHTML},sE=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target.result)},r.onerror=e=>{n(e)},r.readAsDataURL(e)}),lE=e=>new Promise(t=>{let n=new Image;n.src=e,n.onload=()=>{t({width:n.width,height:n.height})},n.onerror=()=>{t({width:0,height:0})}}),cE='\n\x3c!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net --\x3e\n',hE=" ",uE=(e,t)=>{const{transformNote:n,transformImage:r,withStyle:i,withFormula:o}=t||{},a=e=>{let{text:t,richText:s,hyperlink:l,note:c,image:h,color:u,fillColor:d,lineColor:f,lineWidth:p,fontWeight:m,fontFamily:g,fontSize:v,fontStyle:b}=e.data,y="";i&&(u&&(y+=`COLOR="${u}"`),d&&(y+=` BACKGROUND_COLOR="${d}"`));let w=`\n \n \n \n \n ${h&&r&&r(h)?`\n \n
`:""}\n ${t}\n \n \n \n `):(w+=` TEXT="${t}">`,h&&r&&r(h)&&(w+=`\n \n \n \n \n \n \n `)),i&&((f||void 0!==p)&&(w+=` `),("bold"===m||g||v||"italic"===b)&&(w+=` `)),c&&n&&(w+=`\n \n \n \n ${n(c)}\n \n \n `),e.children&&e.children.length>0&&e.children.forEach(e=>{w+=a(e)+"\n"}),w+=" ",w},s=a(e);return cE+s+hE};var dE=n("81f0"),fE=n.n(dE);const pE=async(e,t)=>{const{transformImg:n,withStyle:r}=t||{},i=fE.a.xml2json(e),o=JSON.parse(i),a={children:[]},s=[],l=(e,t)=>{const{elements:i,attributes:o,name:a}=e;let c=null;if("node"===a){const e=gE(i,"richcontent"),{LINK:a,TEXT:l}=o;if(c={data:{text:l||""},children:[]},r&&mE({node:c,attributes:o,elements:i}),a&&(c.data.hyperlink=a),e){const t=gE(e.elements,"html"),r=gE(t.elements,"body"),{html:i,imgUrl:o}=vE(r);if(o&&n){let e=null;const t=new Promise(t=>{e=t});s.push(t),n(o).then(async t=>{if(t&&t.url){let{url:e,width:r,height:i}=t;if(c.data.image=e,void 0===r||void 0===i)try{const t=await lE(e);r=t.width,i=t.height}catch(n){console.log(n)}c.data.imageSize={width:r,height:i}}e()}).catch(t=>{console.log(t),e()})}"NODE"===e.attributes.TYPE?(c.data.richText=!0,c.data.text=i):"NOTE"===e.attributes.TYPE&&(c.data.note=iE(i))}t.children.push(c)}i&&i.length>0&&i.forEach(e=>{l(e,c||t)})};return l(o,a),s.length>0&&await Promise.all(s),a.children[0]},mE=({node:e,attributes:t,elements:n})=>{if(!n)return;const{COLOR:r,BACKGROUND_COLOR:i}=t,o=gE(n,"edge"),a=gE(n,"font");if(r&&(e.data.color=r),i&&(e.data.fillColor=i),o){const{COLOR:t,WIDTH:n}=o.attributes||{};t&&(e.data.lineColor=t),n&&(e.data.lineWidth=Number(n))}if(a){const{BOLD:t,NAME:n,SIZE:r,ITALIC:i}=a.attributes||{};t&&"true"===t&&(e.data.fontWeight="bold"),n&&(e.data.fontFamily=n),r&&(e.data.fontSize=Number(r)),i&&(e.data.fontStyle="italic")}},gE=(e,t)=>(e||[]).find(e=>e.name===t),vE=e=>{let t="";const n=e=>{const{type:r,name:i,elements:o,text:a,attributes:s}=e;let l="",c="";if("element"===r)if("img"===i)t=s.src;else{c="body"===i?"div":i;let e="";s&&Object.keys(s).forEach(t=>{e+=`${t}="${s[t]}"`}),l+=`<${c} ${e}>`}else"text"===r&&(l+=a);return o&&o.length>0&&o.forEach(e=>{l+=n(e)}),c&&(l+=`${c}>`),l},r=n(e);return{html:r,imgUrl:t}};async function bE(e,t){const n=this.mindMap.getData(),r=uE(n,t),i=new Blob([r]),o=await sE(i);return o}class yE{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.mindMap.doExport&&(Object.getPrototypeOf(this.mindMap.doExport).mm=bE.bind(this.mindMap.doExport))}onRemove(){this.mindMap.doExport&&(Object.getPrototypeOf(this.mindMap.doExport).mm=null)}beforePluginRemove(){this.onRemove()}beforePluginDestroy(){this.onRemove()}}yE.smmToFreemind=uE,yE.freemindToSmm=pE,yE.instanceName="freemind";var wE=yE,xE=n("128f");const kE=e=>{try{return JSON.parse(JSON.stringify(e))}catch(t){return null}};let CE=null;const TE=e=>(e=e.replace(/ /gim,"\n"),CE||(CE=document.createElement("div")),CE.innerHTML=e,e=CE.textContent,e),SE=e=>new Promise(t=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.readAsArrayBuffer(e)}),AE=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target.result)},r.onerror=e=>{n(e)},r.readAsDataURL(e)}),EE=(e,t,n={})=>{const r=n.bookType||"xlsx";t=kE(t);const i=zE(t);let o=0;i.forEach(e=>{o=Math.max(o,e.length)});const a=new Array(o).fill(0),s=[],l=[];for(let u=0;u{const i=r.maxColWidth||30;e["!cols"]=n.map((e,n)=>{const r=t.map(e=>e[n]).filter(e=>!!e),o=r.reduce((e,t)=>Math.max(e,2*t.length),0);return{wch:Math.min(i,o)}})},NE=(e,t,n)=>{const r=n.transformNote;t.forEach(t=>{const n=xE["b"].encode_cell({r:t.r,c:t.c});e[n].c||(e[n].c=[],e[n].c.hidden=!0),e[n].c.push({a:"Author",t:"function"===typeof r?r(t.text):t.text})})},OE=(e,t)=>{t.forEach(t=>{const n=xE["b"].encode_cell({r:t.r,c:t.c});e[n].l={Target:t.link,Tooltip:t.text}})},DE=(e,t,n)=>{const r=[];let i=null;n.forEach((e,n)=>{t.forEach((e,o)=>{if(e[n]){i&&(i.s.c===i.e.c&&i.s.r===i.e.r||r.push(i),i=null);const e=LE(t,n,o);e&&(i={s:{c:n,r:o},e:{c:n,r:o}})}else if(i){const e=LE(t,n,o);e&&(i.e.r=o)}})}),e["!merges"]=r},LE=(e,t,n)=>{const r=e[n],i=r.slice(t+1);return i.filter(e=>!!e).length>0},zE=e=>{const t=(e,n,r,i,o)=>{e.pos=i?[0,0]:[n,o.pos[1]+r],o&&(e.parent=o),e.text=e.data.richText?TE(e.data.text):e.data.text,e.layerIndex=n,e.index=r,e.children.forEach((r,i)=>{t(r,n+1,i,!1,e)})};t(e,0,0,!0,null);const n=e=>{IE(e),e.children.forEach(e=>{n(e)})};n(e);let r=[];const i=e=>{const t=e.pos[0],n=e.pos[1];r[n]||(r[n]=[]),r[n][t]=e,e.children.forEach(e=>{i(e)})};return i(e),r=r.filter(e=>e),r},IE=(e,t)=>{if(!e.parent)return;const n=e.parent.children,r=n.slice(e.index+1);if(e.children.length>0){const n=t||e.children.length-1;r.forEach(e=>{e.pos[1]+=n,FE(e.children,n)}),IE(e.parent,n)}},FE=(e,t)=>{e.forEach(e=>{e.pos[1]+=t,e.children&&e.children.length&&FE(e.children,t)})},RE=async e=>{const t=Object(xE["a"])(await SE(e)),n=t.Sheets[t.SheetNames[0]],{noteList:r,hyperlinkList:i}=PE(n),o=xE["b"].sheet_to_json(n,{header:1});if(o.length<=0)return;let a=0;o.forEach(e=>{e.length>a&&(a=e.length)});const s=[],l=e=>{s[e]||(s[e]=[]);for(let t=0;t{for(let n=e.length-1;n>=0;n--)if(t>=e[n]._row)return e[n]};for(let h=1;h{const t=[],n=[];return Object.keys(e).forEach(r=>{if("!"===r[0])return;const i=e[r];if(i.l){const e=xE["b"].decode_cell(r);n.push({c:e.c,r:e.r,hyperlink:i.l.Target})}if(i.c){const e=xE["b"].decode_cell(r);t.push({c:e.c,r:e.r,text:i.c[0].t})}}),{noteList:t,hyperlinkList:n}},BE=(e,t,n,r)=>{const i=r.find(e=>e.c===n&&e.r===t);i&&(e.data.note=i.text)},jE=(e,t,n,r)=>{const i=r.find(e=>e.c===n&&e.r===t);i&&(e.data.hyperlink=i.hyperlink)};async function HE(e,t){const n=this.mindMap.getData(),r=EE(e,n,t),i=new Blob([r]),o=await AE(i);return o}class UE{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.mindMap.doExport&&(Object.getPrototypeOf(this.mindMap.doExport).xlsx=HE.bind(this.mindMap.doExport))}onRemove(){this.mindMap.doExport&&(Object.getPrototypeOf(this.mindMap.doExport).xlsx=null)}beforePluginRemove(){this.onRemove()}beforePluginDestroy(){this.onRemove()}}UE.toExcel=EE,UE.excelTo=RE,UE.instanceName="excel";var qE=UE,WE=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("outline.title")}},[t("div",{staticClass:"changeBtn",class:{isDark:e.isDark},on:{click:e.onChangeToOutlineEdit}},[t("span",{staticClass:"icon iconfont iconquanping1"})]),"outline"===e.activeSidebar?t("Outline",{attrs:{mindMap:e.mindMap},on:{scrollTo:e.onScrollTo}}):e._e()],1)},GE=[],VE=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sidebarContainer",class:{show:e.show,isDark:e.isDark},style:{zIndex:e.zIndex},on:{click:function(e){e.stopPropagation()}}},[t("span",{staticClass:"closeBtn el-icon-close",on:{click:e.close}}),e.title?t("div",{staticClass:"sidebarHeader"},[e._v(" "+e._s(e.title)+" ")]):e._e(),t("div",{ref:"sidebarContent",staticClass:"sidebarContent"},[e._t("default")],2)])},_E=[],KE={name:"Sidebar",props:{title:{type:String,default:""}},data(){return{show:!1,zIndex:0}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark})},watch:{show(e,t){e&&!t&&(this.zIndex=Te.sidebarZIndex++)}},created(){this.$bus.$on("closeSideBar",this.handleCloseSidebar)},beforeDestroy(){this.$bus.$off("closeSideBar",this.handleCloseSidebar)},methods:{...Object(ce["c"])(["setActiveSidebar"]),handleCloseSidebar(){this.close()},close(){this.show=!1,this.setActiveSidebar("")},getEl(){return this.$refs.sidebarContent}}},YE=KE,XE=(n("b605"),Object(m["a"])(YE,VE,_E,!1,null,"1107d8de",null)),ZE=XE.exports,JE=function(){var e=this,t=e._self._c;return t("el-tree",{ref:"tree",staticClass:"outlineTree",class:{isDark:e.isDark},attrs:{"node-key":"uid",draggable:"","default-expand-all":"",data:e.data,props:e.defaultProps,"highlight-current":!0,"expand-on-click-node":!1,"allow-drag":e.checkAllowDrag},on:{"node-drop":e.onNodeDrop,"node-drag-start":e.onNodeDragStart,"node-drag-end":e.onNodeDragEnd,"current-change":e.onCurrentChange},nativeOn:{mouseenter:function(t){e.isInTreArea=!0},mouseleave:function(t){e.isInTreArea=!1}},scopedSlots:e._u([{key:"default",fn:function({node:n,data:r}){return t("span",{staticClass:"customNode",attrs:{"data-id":r.uid},on:{click:function(t){return e.onClick(r)}}},[t("span",{key:e.getKey(),staticClass:"nodeEdit",attrs:{contenteditable:!e.isReadonly},domProps:{innerHTML:e._s(n.label)},on:{keydown:function(t){return t.stopPropagation(),e.onNodeInputKeydown(t,n)},keyup:function(e){e.stopPropagation()},blur:function(t){return e.onBlur(t,n)},paste:function(t){return e.onPaste(t,n)}}})])}}])})},QE=[],$E=(n("5b81"),{name:"Outline",props:{mindMap:{type:Object}},data(){return{data:[],defaultProps:{label:"label"},currentData:null,notHandleDataChange:!1,isHandleNodeTreeRenderEnd:!1,beInsertNodeUid:"",insertType:"",isInTreArea:!1,isAfterCreateNewNode:!1}},computed:{...Object(ce["d"])({isReadonly:e=>e.isReadonly,isDark:e=>e.localConfig.isDark})},created(){window.addEventListener("keydown",this.onKeyDown),this.$bus.$on("data_change",this.handleDataChange),this.$bus.$on("node_tree_render_end",this.handleNodeTreeRenderEnd),this.$bus.$on("hide_text_edit",this.handleHideTextEdit)},mounted(){this.refresh()},beforeDestroy(){window.removeEventListener("keydown",this.onKeyDown),this.$bus.$off("data_change",this.handleDataChange),this.$bus.$off("node_tree_render_end",this.handleNodeTreeRenderEnd),this.$bus.$off("hide_text_edit",this.handleHideTextEdit)},methods:{...Object(ce["c"])(["setIsDragOutlineTreeNode"]),handleHideTextEdit(){this.notHandleDataChange&&(this.notHandleDataChange=!1,this.refresh())},handleDataChange(){if(this.notHandleDataChange)return this.notHandleDataChange=!1,void(this.isAfterCreateNewNode=!1);this.isAfterCreateNewNode?this.isAfterCreateNewNode=!1:this.refresh()},handleNodeTreeRenderEnd(){if(this.insertType)return this[this.insertType](),void(this.insertType="");this.isHandleNodeTreeRenderEnd&&(this.isHandleNodeTreeRenderEnd=!1,this.refresh(),this.$nextTick(()=>{this.afterCreateNewNode()}))},refresh(){let e=this.mindMap.getData();e.root=!0;let t=e=>{let n=e.data.richText?Object(b["eb"])(e.data.text):e.data.text;n=Object(b["S"])(n),n=n.replaceAll(/\n/g," "),e.textCache=n,e.label=n,e.uid=e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};t(e),this.data=[e]},afterCreateNewNode(){let e=this.beInsertNodeUid;if(e&&this.$refs.tree)try{this.isAfterCreateNewNode=!0,this.$refs.tree.setCurrentKey(e);let t=this.$refs.tree.getNode(e);this.onCurrentChange(t.data),this.onClick(t.data);const n=document.querySelector(`.customNode[data-id="${e}"] .nodeEdit`);if(n){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(n),e.removeAllRanges(),e.addRange(t);let r=n.offsetTop;this.$emit("scrollTo",r)}}catch(t){console.log(t)}this.beInsertNodeUid=""},checkAllowDrag(e){return!e.data.root},onBlur(e,t){if(t.data.textCache===e.target.innerHTML)return void(this.insertType&&(this[this.insertType](),this.insertType=""));const n=t.data.data.richText,r=n?e.target.innerHTML:e.target.innerText,i=this.mindMap.renderer.findNodeByUid(t.data.uid);i&&(this.notHandleDataChange=!0,n?i.setText(Object(b["tb"])(r),!0,!0):i.setText(r))},onPaste(e){Object(b["Q"])(e)},getKey(){return Math.random()},onNodeInputKeydown(e){13!==e.keyCode||e.shiftKey||(e.preventDefault(),this.insertType="insertNode",e.target.blur()),9===e.keyCode&&(e.preventDefault(),e.shiftKey?(this.insertType="moveUp",e.target.blur()):(this.insertType="insertChildNode",e.target.blur()))},moveUp(){this.mindMap.execCommand("MOVE_UP_ONE_LEVEL")},insertNode(){this.notHandleDataChange=!0,this.isHandleNodeTreeRenderEnd=!0,this.beInsertNodeUid=Object(b["q"])(),this.mindMap.execCommand("INSERT_NODE",!1,[],{uid:this.beInsertNodeUid})},insertChildNode(){this.notHandleDataChange=!0,this.isHandleNodeTreeRenderEnd=!0,this.beInsertNodeUid=Object(b["q"])(),this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{uid:this.beInsertNodeUid})},onClick(e){this.notHandleDataChange=!0;const t=this.mindMap.renderer.findNodeByUid(e.uid);t&&t.nodeData.data.isActive||this.mindMap.execCommand("GO_TARGET_NODE",e.uid,()=>{this.notHandleDataChange=!1})},onNodeDragStart(){this.setIsDragOutlineTreeNode(!0)},onNodeDragEnd(){this.setIsDragOutlineTreeNode(!1)},onNodeDrop(e,t,n){this.notHandleDataChange=!0;const r=this.mindMap.renderer.findNodeByUid(e.data.uid),i=this.mindMap.renderer.findNodeByUid(t.data.uid);if(r&&i)switch(n){case"before":this.mindMap.execCommand("INSERT_BEFORE",r,i);break;case"after":this.mindMap.execCommand("INSERT_AFTER",r,i);break;case"inner":this.mindMap.execCommand("MOVE_NODE_TO",r,i);break;default:break}},onCurrentChange(e){this.currentData=e},onKeyDown(e){if(this.isInTreArea&&[46,8].includes(e.keyCode)&&this.currentData){e.stopPropagation(),this.mindMap.renderer.textEdit.hideEditTextBox();const t=this.mindMap.renderer.findNodeByUid(this.currentData.uid);t&&!t.isRoot&&(this.notHandleDataChange=!0,this.$refs.tree.remove(this.currentData),this.mindMap.execCommand("REMOVE_NODE",[t]))}}}}),eM=$E,tM=(n("cfff"),Object(m["a"])(eM,JE,QE,!1,null,"bec7987e",null)),nM=tM.exports,rM={name:"OutlineSidebar",components:{Sidebar:ZE,Outline:nM},props:{mindMap:{type:Object}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark,activeSidebar:e=>e.activeSidebar})},watch:{activeSidebar(e){this.$refs.sidebar.show="outline"===e}},methods:{...Object(ce["c"])(["setIsOutlineEdit","setActiveSidebar"]),onChangeToOutlineEdit(){this.setActiveSidebar(""),this.setIsOutlineEdit(!0)},onScrollTo(e){let t=this.$refs.sidebar.getEl(),n=t.offsetHeight,r=t.scrollTop;e>r+n&&t.scrollTo(0,e-n/2)}}},iM=rM,oM=(n("d513"),Object(m["a"])(iM,WE,GE,!1,null,"c20f9926",null)),aM=oM.exports,sM=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("style.title")}},[e.activeNodes.length>0?t("div",{staticClass:"styleBox",class:{isDark:e.isDark}},[t("div",{staticClass:"sidebarContent"},[t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("style.text")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.fontFamily")))]),t("el-select",{attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("fontFamily")}},model:{value:e.style.fontFamily,callback:function(t){e.$set(e.style,"fontFamily",t)},expression:"style.fontFamily"}},e._l(e.fontFamilyList,(function(e){return t("el-option",{key:e.value,style:{fontFamily:e.value},attrs:{label:e.name,value:e.value}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.fontSize")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("fontSize")}},model:{value:e.style.fontSize,callback:function(t){e.$set(e.style,"fontSize",t)},expression:"style.fontSize"}},e._l(e.fontSizeList,(function(e){return t("el-option",{key:e,style:{fontSize:e+"px"},attrs:{label:e,value:e}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.lineHeight")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineHeight")}},model:{value:e.style.lineHeight,callback:function(t){e.$set(e.style,"lineHeight",t)},expression:"style.lineHeight"}},e._l(e.lineHeightList,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"btnGroup"},[t("el-tooltip",{attrs:{content:e.$t("style.color"),placement:"bottom"}},[t("div",{directives:[{name:"popover",rawName:"v-popover:popover",arg:"popover"}],staticClass:"styleBtn"},[e._v(" A "),t("span",{staticClass:"colorShow",style:{backgroundColor:e.style.color||"#eee"}})])]),t("el-tooltip",{attrs:{content:e.$t("style.addFontWeight"),placement:"bottom"}},[t("div",{staticClass:"styleBtn",class:{actived:"bold"===e.style.fontWeight},on:{click:e.toggleFontWeight}},[e._v(" B ")])]),t("el-tooltip",{attrs:{content:e.$t("style.italic"),placement:"bottom"}},[t("div",{staticClass:"styleBtn i",class:{actived:"italic"===e.style.fontStyle},on:{click:e.toggleFontStyle}},[e._v(" I ")])]),t("el-tooltip",{attrs:{content:e.$t("style.textDecoration"),placement:"bottom"}},[t("div",{directives:[{name:"popover",rawName:"v-popover:popover2",arg:"popover2"}],staticClass:"styleBtn u",style:{textDecoration:e.style.textDecoration||"none"}},[e._v(" U ")])])],1),t("el-popover",{ref:"popover",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.color},on:{change:e.changeFontColor}})],1),t("el-popover",{ref:"popover2",attrs:{placement:"bottom",trigger:"hover"}},[t("el-radio-group",{attrs:{size:"mini"},on:{change:function(t){return e.update("textDecoration")}},model:{value:e.style.textDecoration,callback:function(t){e.$set(e.style,"textDecoration",t)},expression:"style.textDecoration"}},[t("el-radio-button",{attrs:{label:"none"}},[e._v(e._s(e.$t("style.none")))]),t("el-radio-button",{attrs:{label:"underline"}},[e._v(e._s(e.$t("style.underline")))]),t("el-radio-button",{attrs:{label:"line-through"}},[e._v(e._s(e.$t("style.lineThrough")))]),t("el-radio-button",{attrs:{label:"overline"}},[e._v(e._s(e.$t("style.overline")))])],1)],1)],1),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.border")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover3",arg:"popover3"}],staticClass:"block",style:{width:"80px",backgroundColor:e.style.borderColor}}),t("el-popover",{ref:"popover3",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.borderColor},on:{change:e.changeBorderColor}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderDasharray")}},model:{value:e.style.borderDasharray,callback:function(t){e.$set(e.style,"borderDasharray",t)},expression:"style.borderDasharray"}},e._l(e.borderDasharrayList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{attrs:{width:"120",height:"34"}},[t("line",{attrs:{x1:"10",y1:"17",x2:"110",y2:"17","stroke-width":"2",stroke:e.style.borderDasharray===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-dasharray":n.value}})])])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderWidth")}},model:{value:e.style.borderWidth,callback:function(t){e.$set(e.style,"borderWidth",t)},expression:"style.borderWidth"}},e._l(e.borderWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"rectangle"===e.style.shape,expression:"style.shape === 'rectangle'"}],staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.borderRadius")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderRadius")}},model:{value:e.style.borderRadius,callback:function(t){e.$set(e.style,"borderRadius",t)},expression:"style.borderRadius"}},e._l(e.borderRadiusList,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)]),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.background")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover4",arg:"popover4"}],staticClass:"block",style:{backgroundColor:e.style.fillColor}}),t("el-popover",{ref:"popover4",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.fillColor},on:{change:e.changeFillColor}})],1),t("span",{staticClass:"name",staticStyle:{"margin-left":"20px"}},[e._v(e._s(e.$t("style.gradientStyle")))]),t("el-checkbox",{on:{change:function(t){return e.update("gradientStyle")}},model:{value:e.style.gradientStyle,callback:function(t){e.$set(e.style,"gradientStyle",t)},expression:"style.gradientStyle"}})],1)]),e.style.gradientStyle?t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.startColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover6",arg:"popover6"}],staticClass:"block",style:{backgroundColor:e.style.startColor}}),t("el-popover",{ref:"popover6",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.startColor},on:{change:e.changeStartColor}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.endColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover7",arg:"popover7"}],staticClass:"block",style:{backgroundColor:e.style.endColor}}),t("el-popover",{ref:"popover7",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.endColor},on:{change:e.changeEndColor}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.direction")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("linearGradientDir")}},model:{value:e.style.linearGradientDir,callback:function(t){e.$set(e.style,"linearGradientDir",t)},expression:"style.linearGradientDir"}},e._l(e.linearGradientDirList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1)]):e._e(),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.shape")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.shape")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("shape")}},model:{value:e.style.shape,callback:function(t){e.$set(e.style,"shape",t)},expression:"style.shape"}},e._l(e.shapeList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{staticStyle:{"margin-top":"5px"},attrs:{width:"60",height:"26"}},[t("path",{attrs:{d:e.shapeListMap[n.value],fill:"none",stroke:e.style.shape===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-width":"2"}})])])})),1)],1)]),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.line")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover5",arg:"popover5"}],staticClass:"block",style:{width:"80px",backgroundColor:e.style.lineColor}}),t("el-popover",{ref:"popover5",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.lineColor},on:{change:e.changeLineColor}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineDasharray")}},model:{value:e.style.lineDasharray,callback:function(t){e.$set(e.style,"lineDasharray",t)},expression:"style.lineDasharray"}},e._l(e.borderDasharrayList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{attrs:{width:"120",height:"34"}},[t("line",{attrs:{x1:"10",y1:"17",x2:"110",y2:"17","stroke-width":"2",stroke:e.style.lineDasharray===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-dasharray":n.value}})])])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineWidth")}},model:{value:e.style.lineWidth,callback:function(t){e.$set(e.style,"lineWidth",t)},expression:"style.lineWidth"}},e._l(e.borderWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.arrowDir")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineMarkerDir")}},model:{value:e.style.lineMarkerDir,callback:function(t){e.$set(e.style,"lineMarkerDir",t)},expression:"style.lineMarkerDir"}},[t("el-option",{key:"start",attrs:{label:e.$t("style.arrowDirStart"),value:"start"}}),t("el-option",{key:"end",attrs:{label:e.$t("style.arrowDirEnd"),value:"end"}})],1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("style.nodePadding")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:function(t){return e.update("paddingX")}},model:{value:e.style.paddingX,callback:function(t){e.$set(e.style,"paddingX",t)},expression:"style.paddingX"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:function(t){return e.update("paddingY")}},model:{value:e.style.paddingY,callback:function(t){e.$set(e.style,"paddingY",t)},expression:"style.paddingY"}})],1)])])]):t("div",{staticClass:"tipBox"},[t("div",{staticClass:"tipIcon iconfont icontianjiazijiedian"}),t("div",{staticClass:"tipText"},[e._v("请选择一个节点")])])])},lM=[],cM={name:"Style",components:{Sidebar:ZE,Color:qo},data(){return{fontSizeList:ue,borderWidthList:pe,borderRadiusList:ge,lineHeightList:de,activeNodes:[],style:{shape:"",paddingX:0,paddingY:0,color:"",fontFamily:"",fontSize:"",lineHeight:"",textDecoration:"",fontWeight:"",fontStyle:"",borderWidth:"",borderColor:"",fillColor:"",borderDasharray:"",borderRadius:"",lineColor:"",lineDasharray:"",lineWidth:"",lineMarkerDir:"",gradientStyle:!1,startColor:"",endColor:"",linearGradientDir:""}}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark,activeSidebar:e=>e.activeSidebar}),fontFamilyList(){return wt[this.$i18n.locale]||wt.zh},borderDasharrayList(){return xt[this.$i18n.locale]||xt.zh},shapeList(){return Nt[this.$i18n.locale]||Nt.zh},shapeListMap(){return Ot[this.$i18n.locale]||Ot.zh},linearGradientDirList(){return Ft[this.$i18n.locale]||Ft.zh}},watch:{activeSidebar(e){this.$refs.sidebar.show="nodeStyle"===e}},created(){this.$bus.$on("node_active",this.onNodeActive)},beforeDestroy(){this.$bus.$off("node_active",this.onNodeActive)},methods:{onNodeActive(...e){this.$nextTick(()=>{this.activeNodes=[...e[1]],this.initNodeStyle()})},initNodeStyle(){this.activeNodes.length<=0||(["shape","paddingX","paddingY","color","fontFamily","fontSize","lineHeight","textDecoration","fontWeight","fontStyle","borderWidth","borderColor","fillColor","borderDasharray","borderRadius","lineColor","lineDasharray","lineWidth","lineMarkerDir","gradientStyle","startColor","endColor"].forEach(e=>{this.style[e]=this.activeNodes[0].getStyle(e,!1)}),this.initLinearGradientDir())},initLinearGradientDir(){const e=this.activeNodes[0].getStyle("startDir",!1),t=this.activeNodes[0].getStyle("endDir",!1),n=this.linearGradientDirList.find(n=>n.start[0]===e[0]&&n.start[1]===e[1]&&n.end[0]===t[0]&&n.end[1]===t[1]);n&&(this.style.linearGradientDir=n.value)},update(e){if("linearGradientDir"===e){const e=this.linearGradientDirList.find(e=>e.value===this.style.linearGradientDir);this.activeNodes.forEach(t=>{t.setStyles({startDir:[...e.start],endDir:[...e.end]})})}else this.activeNodes.forEach(t=>{t.setStyle(e,this.style[e])})},toggleFontWeight(){"bold"===this.style.fontWeight?this.style.fontWeight="normal":this.style.fontWeight="bold",this.update("fontWeight")},toggleFontStyle(){"italic"===this.style.fontStyle?this.style.fontStyle="normal":this.style.fontStyle="italic",this.update("fontStyle")},changeFontColor(e){this.style.color=e,this.update("color")},changeBorderColor(e){this.style.borderColor=e,this.update("borderColor")},changeLineColor(e){this.style.lineColor=e,this.update("lineColor")},changeFillColor(e){this.style.fillColor=e,this.update("fillColor")},changeStartColor(e){this.style.startColor=e,this.update("startColor")},changeEndColor(e){this.style.endColor=e,this.update("endColor")}}},hM=cM,uM=(n("f669"),n("f045"),Object(m["a"])(hM,sM,lM,!1,null,"5bfb419c",null)),dM=uM.exports,fM=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("baseStyle.title")}},[e.data?t("div",{staticClass:"sidebarContent",class:{isDark:e.isDark}},[t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.background")))]),t("div",{staticClass:"row"},[t("el-tabs",{staticClass:"tab",model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("el-tab-pane",{attrs:{label:e.$t("baseStyle.color"),name:"color"}},[t("Color",{attrs:{color:e.style.backgroundColor},on:{change:t=>{e.update("backgroundColor",t)}}})],1),t("el-tab-pane",{attrs:{label:e.$t("baseStyle.image"),name:"image"}},[t("ImgUpload",{staticClass:"imgUpload",on:{change:t=>{e.update("backgroundImage",t)}},model:{value:e.style.backgroundImage,callback:function(t){e.$set(e.style,"backgroundImage",t)},expression:"style.backgroundImage"}}),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imageRepeat")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundRepeat",t)}},model:{value:e.style.backgroundRepeat,callback:function(t){e.$set(e.style,"backgroundRepeat",t)},expression:"style.backgroundRepeat"}},e._l(e.backgroundRepeatList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imagePosition")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundPosition",t)}},model:{value:e.style.backgroundPosition,callback:function(t){e.$set(e.style,"backgroundPosition",t)},expression:"style.backgroundPosition"}},e._l(e.backgroundPositionList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imageSize")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundSize",t)}},model:{value:e.style.backgroundSize,callback:function(t){e.$set(e.style,"backgroundSize",t)},expression:"style.backgroundSize"}},e._l(e.backgroundSizeList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1)],1)],1)],1),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.line")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover",arg:"popover"}],staticClass:"block",style:{backgroundColor:e.style.lineColor}}),t("el-popover",{ref:"popover",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.lineColor},on:{change:t=>{e.update("lineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("lineWidth",t)}},model:{value:e.style.lineWidth,callback:function(t){e.$set(e.style,"lineWidth",t)},expression:"style.lineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"row"},[e.lineStyleListShow.length>1?t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("lineStyle",t)}},model:{value:e.style.lineStyle,callback:function(t){e.$set(e.style,"lineStyle",t)},expression:"style.lineStyle"}},e._l(e.lineStyleListShow,(function(n){return t("el-option",{key:n.value,staticClass:"lineStyleOption",class:{isDark:e.isDark,isSelected:e.style.lineStyle===n.value},attrs:{label:n.name,value:n.value},domProps:{innerHTML:e._s(e.lineStyleMap[n.value])}})})),1)],1):e._e(),"curve"===e.style.lineStyle&&e.showRootLineKeepSameInCurveLayouts?t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.rootStyle")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("rootLineKeepSameInCurve",t)}},model:{value:e.style.rootLineKeepSameInCurve,callback:function(t){e.$set(e.style,"rootLineKeepSameInCurve",t)},expression:"style.rootLineKeepSameInCurve"}},e._l(e.rootLineKeepSameInCurveList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1):e._e(),e.showLineRadius?t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.lineRadius")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("lineRadius",t)}},model:{value:e.style.lineRadius,callback:function(t){e.$set(e.style,"lineRadius",t)},expression:"style.lineRadius"}},e._l([0,2,5,7,10,12,15],(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1):e._e()]),t("div",{staticClass:"row"},["curve"===e.style.lineStyle&&e.showRootLineKeepSameInCurveLayouts?t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.rootLineStartPos")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("rootLineStartPositionKeepSameInCurve",t)}},model:{value:e.style.rootLineStartPositionKeepSameInCurve,callback:function(t){e.$set(e.style,"rootLineStartPositionKeepSameInCurve",t)},expression:"style.rootLineStartPositionKeepSameInCurve"}},[t("el-option",{key:"center",attrs:{label:e.$t("baseStyle.center"),value:!1}}),t("el-option",{key:"right",attrs:{label:e.$t("baseStyle.edge"),value:!0}})],1)],1):e._e()]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:t=>{e.update("showLineMarker",t)}},model:{value:e.style.showLineMarker,callback:function(t){e.$set(e.style,"showLineMarker",t)},expression:"style.showLineMarker"}},[e._v(e._s(e.$t("baseStyle.showArrow")))])],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.rainbowLines")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-popover",{attrs:{placement:"right",trigger:"click"},model:{value:e.rainbowLinesPopoverVisible,callback:function(t){e.rainbowLinesPopoverVisible=t},expression:"rainbowLinesPopoverVisible"}},[t("div",{staticClass:"rainbowLinesOptionsBox",class:{isDark:e.isDark}},e._l(e.rainbowLinesOptions,(function(n){return t("div",{key:n.value,staticClass:"optionItem"},[n.list?t("div",{staticClass:"colorsBar",on:{click:function(t){return e.updateRainbowLinesConfig(n)}}},e._l(n.list,(function(e){return t("span",{staticClass:"colorItem",style:{backgroundColor:e}})})),0):t("span",{on:{click:function(t){return e.updateRainbowLinesConfig(n)}}},[e._v(e._s(e.$t("baseStyle.notUseRainbowLines")))])])})),0),t("div",{staticClass:"curRainbowLine",attrs:{slot:"reference"},slot:"reference"},[e.curRainbowLineColorList?t("div",{staticClass:"colorsBar"},e._l(e.curRainbowLineColorList,(function(e){return t("span",{staticClass:"colorItem",style:{backgroundColor:e}})})),0):t("span",[e._v(e._s(e.$t("baseStyle.notUseRainbowLines")))])])])],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.lineOfOutline")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover2",arg:"popover2"}],staticClass:"block",style:{backgroundColor:e.style.generalizationLineColor}}),t("el-popover",{ref:"popover2",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.generalizationLineColor},on:{change:t=>{e.update("generalizationLineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("generalizationLineWidth",t)}},model:{value:e.style.generalizationLineWidth,callback:function(t){e.$set(e.style,"generalizationLineWidth",t)},expression:"style.generalizationLineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.associativeLine")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover4",arg:"popover4"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineColor}}),t("el-popover",{ref:"popover4",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineColor},on:{change:t=>{e.update("associativeLineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineWidth")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("associativeLineWidth",t)}},model:{value:e.style.associativeLineWidth,callback:function(t){e.$set(e.style,"associativeLineWidth",t)},expression:"style.associativeLineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineActiveColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover5",arg:"popover5"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineActiveColor}}),t("el-popover",{ref:"popover5",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineActiveColor},on:{change:t=>{e.update("associativeLineActiveColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineActiveWidth")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("associativeLineActiveWidth",t)}},model:{value:e.style.associativeLineActiveWidth,callback:function(t){e.$set(e.style,"associativeLineActiveWidth",t)},expression:"style.associativeLineActiveWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("associativeLineDasharray",t)}},model:{value:e.style.associativeLineDasharray,callback:function(t){e.$set(e.style,"associativeLineDasharray",t)},expression:"style.associativeLineDasharray"}},e._l(e.borderDasharrayList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{attrs:{width:"120",height:"34"}},[t("line",{attrs:{x1:"10",y1:"17",x2:"110",y2:"17","stroke-width":"2",stroke:e.style.associativeLineDasharray===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-dasharray":n.value}})])])})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.associativeLineText")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.fontFamily")))]),t("el-select",{attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("associativeLineTextFontFamily",t)}},model:{value:e.style.associativeLineTextFontFamily,callback:function(t){e.$set(e.style,"associativeLineTextFontFamily",t)},expression:"style.associativeLineTextFontFamily"}},e._l(e.fontFamilyList,(function(e){return t("el-option",{key:e.value,style:{fontFamily:e.value},attrs:{label:e.name,value:e.value}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover6",arg:"popover6"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineTextColor}}),t("el-popover",{ref:"popover6",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineTextColor},on:{change:t=>{e.update("associativeLineTextColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.fontSize")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("associativeLineTextFontSize",t)}},model:{value:e.style.associativeLineTextFontSize,callback:function(t){e.$set(e.style,"associativeLineTextFontSize",t)},expression:"style.associativeLineTextFontSize"}},e._l(e.fontSizeList,(function(e){return t("el-option",{key:e,style:{fontSize:e+"px"},attrs:{label:e,value:e}})})),1)],1)]),e.showNodeUseLineStyle?[t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodeBorderType")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:t=>{e.update("nodeUseLineStyle",t)}},model:{value:e.style.nodeUseLineStyle,callback:function(t){e.$set(e.style,"nodeUseLineStyle",t)},expression:"style.nodeUseLineStyle"}},[e._v(e._s(e.$t("baseStyle.nodeUseLineStyle")))])],1)])]:e._e(),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodePadding")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:t=>{e.update("paddingX",t)}},model:{value:e.style.paddingX,callback:function(t){e.$set(e.style,"paddingX",t)},expression:"style.paddingX"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:t=>{e.update("paddingY",t)}},model:{value:e.style.paddingY,callback:function(t){e.$set(e.style,"paddingY",t)},expression:"style.paddingY"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.image")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.maximumWidth")))]),t("el-slider",{staticStyle:{width:"140px"},attrs:{min:10,max:300},on:{change:t=>{e.update("imgMaxWidth",t)}},model:{value:e.style.imgMaxWidth,callback:function(t){e.$set(e.style,"imgMaxWidth",t)},expression:"style.imgMaxWidth"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.maximumHeight")))]),t("el-slider",{staticStyle:{width:"140px"},attrs:{min:10,max:300},on:{change:t=>{e.update("imgMaxHeight",t)}},model:{value:e.style.imgMaxHeight,callback:function(t){e.$set(e.style,"imgMaxHeight",t)},expression:"style.imgMaxHeight"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.icon")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.size")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{min:12,max:50},on:{change:t=>{e.update("iconSize",t)}},model:{value:e.style.iconSize,callback:function(t){e.$set(e.style,"iconSize",t)},expression:"style.iconSize"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodeMargin")))]),t("div",{staticClass:"row column"},[t("el-tabs",{staticClass:"tab",on:{"tab-click":e.initMarginStyle},model:{value:e.marginActiveTab,callback:function(t){e.marginActiveTab=t},expression:"marginActiveTab"}},[t("el-tab-pane",{attrs:{label:e.$t("baseStyle.level2Node"),name:"second"}}),t("el-tab-pane",{attrs:{label:e.$t("baseStyle.belowLevel2Node"),name:"node"}})],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{max:200},on:{change:t=>{e.updateMargin("marginX",t)}},model:{value:e.style.marginX,callback:function(t){e.$set(e.style,"marginX",t)},expression:"style.marginX"}})],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{max:200},on:{change:t=>{e.updateMargin("marginY",t)}},model:{value:e.style.marginY,callback:function(t){e.$set(e.style,"marginY",t)},expression:"style.marginY"}})],1)],1),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.watermark")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:e.watermarkShowChange},model:{value:e.watermarkConfig.show,callback:function(t){e.$set(e.watermarkConfig,"show",t)},expression:"watermarkConfig.show"}},[e._v(e._s(e.$t("baseStyle.showWatermark")))])],1)]),e.watermarkConfig.show?[t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:e.updateWatermarkConfig},model:{value:e.watermarkConfig.onlyExport,callback:function(t){e.$set(e.watermarkConfig,"onlyExport",t)},expression:"watermarkConfig.onlyExport"}},[e._v(e._s(e.$t("baseStyle.onlyExport")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:e.updateWatermarkConfig},model:{value:e.watermarkConfig.belowNode,callback:function(t){e.$set(e.watermarkConfig,"belowNode",t)},expression:"watermarkConfig.belowNode"}},[e._v(e._s(e.$t("baseStyle.belowNode")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkText")))]),t("el-input",{attrs:{size:"small"},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.text,callback:function(t){e.$set(e.watermarkConfig,"text",t)},expression:"watermarkConfig.text"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover3",arg:"popover3"}],staticClass:"block",style:{backgroundColor:e.watermarkConfig.textStyle.color}}),t("el-popover",{ref:"popover3",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.watermarkConfig.textStyle.color},on:{change:t=>{e.watermarkConfig.textStyle.color=t,e.updateWatermarkConfig()}}})],1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextOpacity")))]),t("el-slider",{staticStyle:{width:"170px"},attrs:{min:0,max:1,step:.1},on:{change:e.updateWatermarkConfig},model:{value:e.watermarkConfig.textStyle.opacity,callback:function(t){e.$set(e.watermarkConfig.textStyle,"opacity",t)},expression:"watermarkConfig.textStyle.opacity"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextFontSize")))]),t("el-input-number",{attrs:{size:"small",min:0,max:50,step:1},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.textStyle.fontSize,callback:function(t){e.$set(e.watermarkConfig.textStyle,"fontSize",t)},expression:"watermarkConfig.textStyle.fontSize"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkAngle")))]),t("el-input-number",{attrs:{size:"small",min:0,max:90,step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.angle,callback:function(t){e.$set(e.watermarkConfig,"angle",t)},expression:"watermarkConfig.angle"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkLineSpacing")))]),t("el-input-number",{attrs:{size:"small",step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.lineSpacing,callback:function(t){e.$set(e.watermarkConfig,"lineSpacing",t)},expression:"watermarkConfig.lineSpacing"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextSpacing")))]),t("el-input-number",{attrs:{size:"small",step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.textSpacing,callback:function(t){e.$set(e.watermarkConfig,"textSpacing",t)},expression:"watermarkConfig.textSpacing"}})],1)])]:e._e(),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.outerFramePadding")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:t=>{e.updateOuterFramePadding("outerFramePaddingX",t)}},model:{value:e.outerFramePadding.outerFramePaddingX,callback:function(t){e.$set(e.outerFramePadding,"outerFramePaddingX",t)},expression:"outerFramePadding.outerFramePaddingX"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:t=>{e.updateOuterFramePadding("outerFramePaddingY",t)}},model:{value:e.outerFramePadding.outerFramePaddingY,callback:function(t){e.$set(e.outerFramePadding,"outerFramePaddingY",t)},expression:"outerFramePadding.outerFramePaddingY"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.otherConfig")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:t=>{e.updateOtherConfig("openPerformance",t)}},model:{value:e.config.openPerformance,callback:function(t){e.$set(e.config,"openPerformance",t)},expression:"config.openPerformance"}},[e._v(e._s(e.$t("baseStyle.openPerformance")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:t=>{e.updateOtherConfig("enableFreeDrag",t)}},model:{value:e.config.enableFreeDrag,callback:function(t){e.$set(e.config,"enableFreeDrag",t)},expression:"config.enableFreeDrag"}},[e._v(e._s(e.$t("baseStyle.enableFreeDrag")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:e.enableNodeRichTextChange},model:{value:e.enableNodeRichText,callback:function(t){e.enableNodeRichText=t},expression:"enableNodeRichText"}},[e._v(e._s(e.$t("baseStyle.isEnableNodeRichText")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.mousewheelAction")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("mousewheelAction",t)}},model:{value:e.config.mousewheelAction,callback:function(t){e.$set(e.config,"mousewheelAction",t)},expression:"config.mousewheelAction"}},[t("el-option",{attrs:{label:e.$t("baseStyle.zoomView"),value:"zoom"}}),t("el-option",{attrs:{label:e.$t("baseStyle.moveViewUpDown"),value:"move"}})],1)],1)]),"zoom"===e.config.mousewheelAction?t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.mousewheelZoomActionReverse")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("mousewheelZoomActionReverse",t)}},model:{value:e.config.mousewheelZoomActionReverse,callback:function(t){e.$set(e.config,"mousewheelZoomActionReverse",t)},expression:"config.mousewheelZoomActionReverse"}},[t("el-option",{attrs:{label:e.$t("baseStyle.mousewheelZoomActionReverse1"),value:!1}}),t("el-option",{attrs:{label:e.$t("baseStyle.mousewheelZoomActionReverse2"),value:!0}})],1)],1)]):e._e(),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.createNewNodeBehavior")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("createNewNodeBehavior",t)}},model:{value:e.config.createNewNodeBehavior,callback:function(t){e.$set(e.config,"createNewNodeBehavior",t)},expression:"config.createNewNodeBehavior"}},[t("el-option",{attrs:{label:e.$t("baseStyle.default"),value:"default"}}),t("el-option",{attrs:{label:e.$t("baseStyle.notActive"),value:"notActive"}}),t("el-option",{attrs:{label:e.$t("baseStyle.activeOnly"),value:"activeOnly"}})],1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:function(t){return e.updateLocalConfig("isShowScrollbar",t)}},model:{value:e.localConfigs.isShowScrollbar,callback:function(t){e.$set(e.localConfigs,"isShowScrollbar",t)},expression:"localConfigs.isShowScrollbar"}},[e._v(e._s(e.$t("baseStyle.isShowScrollbar")))])],1)]),e.supportHandDrawnLikeStyle?t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:function(t){return e.updateLocalConfig("isUseHandDrawnLikeStyle",t)}},model:{value:e.localConfigs.isUseHandDrawnLikeStyle,callback:function(t){e.$set(e.localConfigs,"isUseHandDrawnLikeStyle",t)},expression:"localConfigs.isUseHandDrawnLikeStyle"}},[e._v(e._s(e.$t("baseStyle.isUseHandDrawnLikeStyle")))])],1)]):e._e()],2):e._e()])},pM=[];const mM={logicalStructure:n("58cf"),logicalStructureLeft:n("37fa"),mindMap:n("79926"),organizationStructure:n("57cb"),catalogOrganization:n("bea9"),timeline:n("0cfe"),timeline2:n("4ec2"),fishbone:n("3c2a"),verticalTimeline:n("b47d")},gM={default:n("facf"),classic:n("5e3f"),minions:n("a57a"),pinkGrape:n("4f8c"),mint:n("d046"),gold:n("7e82"),vitalityOrange:n("7080"),greenLeaf:n("9ed8"),dark2:n("4514"),skyGreen:n("6276"),classic2:n("9876d"),classic3:n("86d9"),classic4:n("5abe"),classicGreen:n("1474"),classicBlue:n("8b92"),blueSky:n("1560"),brainImpairedPink:n("2f97"),dark:n("0d42"),earthYellow:n("8f14"),freshGreen:n("1f76"),freshRed:n("9543"),romanticPurple:n("5843"),simpleBlack:n("0754"),courseGreen:n("3cc4"),coffee:n("dbc4"),redSpirit:n("bc06"),blackHumour:n("b645"),lateNightOffice:n("6ad8"),blackGold:n("1b88"),autumn:n("7f95"),avocado:n("135f"),orangeJuice:n("be49"),oreo:n("daf1"),shallowSea:n("b0a0"),lemonBubbles:n("cb07"),rose:n("0536"),seaBlueLine:n("6c83"),neonLamp:n("1397"),darkNightLceBlade:n("aa39"),morandi:n("9192"),classic5:n("e9d1"),dark3:n("a7a6"),dark4:n("e497"),cactus:n("5a50"),classic6:n("f997"),classic7:n("b22d")},vM=["a^2","a_2","a^{2+2}","a_{i,j}","x_2^3","\\overbrace{1+2+\\cdots+100}","\\sum_{k=1}^N k^2","\\lim_{n \\to \\infty}x_n","\\int_{-N}^{N} e^x\\, dx","\\sqrt{3}","\\sqrt[n]{3}","\\sin\\theta","\\log X","\\log_{10}","\\log_\\alpha X","\\lim_{t\\to n}T","\\frac{1}{2}=0.5","\\binom{n}{k}","\\begin{matrix}x & y \\\\z & v\\end{matrix}","\\begin{cases}3x + 5y + z \\\\7x - 2y + 4z \\\\-6x + 3y + 2z\\end{cases}"],bM={curve:["logicalStructure","logicalStructureLeft","mindMap","verticalTimeline","organizationStructure"],direct:["logicalStructure","logicalStructureLeft","mindMap","organizationStructure","verticalTimeline"]},yM=["logicalStructure","logicalStructureLeft","mindMap","verticalTimeline"],wM=["logicalStructure","logicalStructureLeft","mindMap","catalogOrganization","organizationStructure"],xM=["logicalStructure","logicalStructureLeft","mindMap","organizationStructure"],kM=[{value:"close"},{value:"colors1",list:["rgb(255, 213, 73)","rgb(255, 136, 126)","rgb(107, 225, 141)","rgb(151, 171, 255)","rgb(129, 220, 242)","rgb(255, 163, 125)","rgb(152, 132, 234)"]},{value:"colors2",list:["rgb(248, 93, 93)","rgb(255, 151, 84)","rgb(255, 214, 69)","rgb(73, 205, 140)","rgb(64, 192, 255)","rgb(84, 110, 214)","rgb(164, 93, 220)"]},{value:"colors3",list:["rgb(140, 240, 231)","rgb(74, 210, 255)","rgb(65, 168, 243)","rgb(49, 128, 205)","rgb(188, 226, 132)","rgb(113, 215, 123)","rgb(120, 191, 109)"]},{value:"colors4",list:["rgb(169, 98, 99)","rgb(245, 125, 123)","rgb(254, 183, 168)","rgb(251, 218, 171)","rgb(138, 163, 181)","rgb(131, 127, 161)","rgb(84, 83, 140)"]},{value:"colors5",list:["rgb(255, 229, 142)","rgb(254, 158, 41)","rgb(248, 119, 44)","rgb(232, 82, 80)","rgb(182, 66, 98)","rgb(99, 54, 99)","rgb(65, 40, 82)"]},{value:"colors6",list:["rgb(171, 227, 209)","rgb(107, 201, 196)","rgb(55, 170, 169)","rgb(18, 135, 131)","rgb(74, 139, 166)","rgb(75, 105, 150)","rgb(57, 75, 133)"]}];var CM={name:"BaseStyle",components:{Sidebar:ZE,Color:qo,ImgUpload:v},props:{data:{type:[Object,null],default:null},mindMap:{type:Object}},data(){return{rainbowLinesOptions:kM,lineWidthList:ve,fontSizeList:ue,activeTab:"color",marginActiveTab:"second",style:{backgroundColor:"",lineColor:"",lineWidth:"",lineStyle:"",showLineMarker:"",rootLineKeepSameInCurve:"",rootLineStartPositionKeepSameInCurve:"",lineRadius:0,generalizationLineWidth:"",generalizationLineColor:"",associativeLineColor:"",associativeLineWidth:0,associativeLineActiveWidth:0,associativeLineDasharray:"",associativeLineActiveColor:"",associativeLineTextFontSize:0,associativeLineTextColor:"",associativeLineTextFontFamily:"",paddingX:0,paddingY:0,imgMaxWidth:0,imgMaxHeight:0,iconSize:0,backgroundImage:"",backgroundRepeat:"no-repeat",backgroundPosition:"",backgroundSize:"",marginX:0,marginY:0,nodeUseLineStyle:!1},config:{openPerformance:!1,enableFreeDrag:!1,mousewheelAction:"zoom",mousewheelZoomActionReverse:!1,createNewNodeBehavior:"default"},watermarkConfig:{show:!1,onlyExport:!1,text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"",opacity:0,fontSize:1}},rainbowLinesPopoverVisible:!1,curRainbowLineColorList:null,updateWatermarkTimer:null,enableNodeRichText:!0,localConfigs:{isShowScrollbar:!1,isUseHandDrawnLikeStyle:!1},currentLayout:"",outerFramePadding:{outerFramePaddingX:0,outerFramePaddingY:0}}},computed:{...Object(ce["d"])({activeSidebar:e=>e.activeSidebar,localConfig:e=>e.localConfig,isDark:e=>e.localConfig.isDark,supportHandDrawnLikeStyle:e=>e.supportHandDrawnLikeStyle}),lineStyleList(){return kt[this.$i18n.locale]||kt.zh},rootLineKeepSameInCurveList(){return Tt[this.$i18n.locale]||Tt.zh},backgroundRepeatList(){return St[this.$i18n.locale]||St.zh},backgroundPositionList(){return At[this.$i18n.locale]||At.zh},backgroundSizeList(){return Et[this.$i18n.locale]||Et.zh},fontFamilyList(){return wt[this.$i18n.locale]||wt.zh},lineStyleMap(){return Ct[this.$i18n.locale]||Ct.zh},showNodeUseLineStyle(){return wM.includes(this.currentLayout)},showLineRadius(){return"straight"===this.style.lineStyle&&yM.includes(this.currentLayout)},lineStyleListShow(){const e=[];return this.lineStyleList.forEach(t=>{const n=bM[t.value];n?n.includes(this.currentLayout)&&e.push(t):e.push(t)}),e},showRootLineKeepSameInCurveLayouts(){return xM.includes(this.currentLayout)},borderDasharrayList(){return xt[this.$i18n.locale]||xt.zh}},watch:{activeSidebar(e){"baseStyle"===e?(this.$refs.sidebar.show=!0,this.initStyle(),this.initConfig(),this.initWatermark(),this.initRainbowLines(),this.initOuterFramePadding(),this.currentLayout=this.mindMap.getLayout()):this.$refs.sidebar.show=!1},lineStyleListShow:{deep:!0,handler(){const e=this.lineStyleListShow.find(e=>e.value===this.style.lineStyle);e||(this.style.lineStyle=this.lineStyleListShow[0].value)}}},created(){this.initLoacalConfig(),this.$bus.$on("setData",this.onSetData)},beforeDestroy(){this.$bus.$off("setData",this.onSetData)},methods:{...Object(ce["c"])(["setLocalConfig"]),onSetData(){"baseStyle"===this.activeSidebar&&setTimeout(()=>{this.initStyle()},0)},initStyle(){["backgroundColor","lineWidth","lineStyle","showLineMarker","rootLineKeepSameInCurve","rootLineStartPositionKeepSameInCurve","lineRadius","lineColor","generalizationLineWidth","generalizationLineColor","associativeLineColor","associativeLineWidth","associativeLineActiveWidth","associativeLineDasharray","associativeLineActiveColor","associativeLineTextFontSize","associativeLineTextColor","associativeLineTextFontFamily","paddingX","paddingY","imgMaxWidth","imgMaxHeight","iconSize","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","nodeUseLineStyle"].forEach(e=>{this.style[e]=this.mindMap.getThemeConfig(e),"backgroundImage"===e&&"none"===this.style[e]&&(this.style[e]="")}),this.initMarginStyle()},initConfig(){["openPerformance","enableFreeDrag","mousewheelAction","mousewheelZoomActionReverse","createNewNodeBehavior"].forEach(e=>{this.config[e]=this.mindMap.getConfig(e)})},initLoacalConfig(){this.enableNodeRichText=this.localConfig.openNodeRichText,this.mousewheelAction=this.localConfig.mousewheelAction,this.mousewheelZoomActionReverse=this.localConfig.mousewheelZoomActionReverse,["isShowScrollbar","isUseHandDrawnLikeStyle"].forEach(e=>{this.localConfigs[e]=this.localConfig[e]})},initWatermark(){let e=this.mindMap.getConfig("watermarkConfig");["text","lineSpacing","textSpacing","angle","onlyExport"].forEach(t=>{this.watermarkConfig[t]=e[t]}),this.watermarkConfig.show=!!e.text,this.watermarkConfig.textStyle={...e.textStyle}},initRainbowLines(){const e=this.mindMap.getConfig("rainbowLinesConfig")||{};this.curRainbowLineColorList=e.open&&this.mindMap.rainbowLines?this.mindMap.rainbowLines.getColorsList():null},initOuterFramePadding(){this.outerFramePadding.outerFramePaddingX=this.mindMap.getConfig("outerFramePaddingX"),this.outerFramePadding.outerFramePaddingY=this.mindMap.getConfig("outerFramePaddingX")},initMarginStyle(){["marginX","marginY"].forEach(e=>{this.style[e]=this.mindMap.getThemeConfig()[this.marginActiveTab][e]})},update(e,t){this.style[e]="backgroundImage"===e&&"none"===t?"":t,this.data.theme.config[e]=t,this.$bus.$emit("showLoading"),this.mindMap.setThemeConfig(this.data.theme.config),Object(Lo["d"])({theme:{template:this.mindMap.getTheme(),config:this.data.theme.config}})},updateOtherConfig(e,t){this.mindMap.updateConfig({[e]:t}),this.data.config=this.data.config||{},this.data.config[e]=t,Object(Lo["d"])({config:this.data.config})},updateWatermarkConfig(){clearTimeout(this.updateWatermarkTimer),this.updateWatermarkTimer=setTimeout(()=>{let{show:e,...t}=this.watermarkConfig;this.mindMap.watermark.updateWatermark({...t}),this.data.config=this.data.config||{},this.data.config.watermarkConfig=this.mindMap.getConfig("watermarkConfig"),Object(Lo["d"])({config:this.data.config})},300)},updateRainbowLinesConfig(e){this.rainbowLinesPopoverVisible=!1,this.curRainbowLineColorList=e.list||null,this.data.config=this.data.config||{};let t=null;t=e.list?{open:!0,colorsList:e.list}:{open:!1},this.data.config.rainbowLinesConfig=t,this.mindMap.rainbowLines.updateRainLinesConfig(t),Object(Lo["d"])({config:this.data.config})},updateOuterFramePadding(e,t){this.outerFramePadding[e]=t,this.data.config=this.data.config||{},this.data.config[e]=t,this.mindMap.updateConfig({[e]:t}),Object(Lo["d"])({config:this.data.config}),this.mindMap.render()},updateMargin(e,t){this.style[e]=t,this.data.theme.config[this.marginActiveTab]||(this.data.theme.config[this.marginActiveTab]={}),this.data.theme.config[this.marginActiveTab][e]=t,this.mindMap.setThemeConfig(this.data.theme.config),Object(Lo["d"])({theme:{template:this.mindMap.getTheme(),config:this.data.theme.config}})},watermarkShowChange(e){if(e){let e=this.watermarkConfig.text||this.$t("baseStyle.watermarkDefaultText");this.watermarkConfig.text=e}else this.watermarkConfig.text="";this.updateWatermarkConfig()},enableNodeRichTextChange(e){this.mindMap.renderer.textEdit.hideEditTextBox(),this.setLocalConfig({openNodeRichText:e})},updateLocalConfig(e,t){this.setLocalConfig({[e]:t})}}},TM=CM,SM=(n("5bb9"),n("aeee"),Object(m["a"])(TM,fM,pM,!1,null,"46e64071",null)),AM=SM.exports,EM=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("theme.title")}},[t("div",{staticClass:"themeList",class:{isDark:e.isDark}},[t("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.groupList,(function(e){return t("el-tab-pane",{key:e.name,attrs:{label:e.name,name:e.name}})})),1),e._l(e.currentList,(function(n){return t("div",{key:n.value,staticClass:"themeItem",class:{active:n.value===e.theme},on:{click:function(t){return e.useTheme(n)}}},[t("div",{staticClass:"imgBox"},[t("img",{attrs:{src:e.themeMap[n.value],alt:""}})]),t("div",{staticClass:"name"},[e._v(e._s(n.name))])])}))],2)])},MM=[],NM={lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",root:{fillColor:"rgb(22, 22, 22)",color:"#fff",borderColor:"rgb(22, 22, 22)",borderWidth:3,fontSize:24},second:{fillColor:"rgb(244, 246, 253)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"transparent",borderColor:"rgb(34, 34, 34)",borderWidth:2,color:"rgb(34, 34, 34)"}},OM={backgroundColor:"rgb(187, 241, 250)",lineColor:"rgb(74, 139, 170)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 168, 101)",root:{fillColor:"rgb(51, 149, 255)",color:"#fff",borderColor:"rgb(51, 149, 255)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(74, 139, 170)",color:"#fff",borderColor:"",borderWidth:3,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(255, 168, 101)",borderWidth:2,color:"#000"}},DM={backgroundColor:"rgb(236, 254, 255)",lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",root:{fillColor:"rgb(39, 222, 232)",color:"rgb(26, 26, 26)",borderColor:"rgb(26, 26, 26)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(235, 255, 187)",color:"rgb(0, 0, 0)",borderColor:"rgb(51, 51, 51)",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(26, 26, 26)",borderWidth:2,color:"rgb(26, 26, 26)"}},LM={backgroundColor:"rgb(255, 251, 231)",lineColor:"rgb(110, 165, 79)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(136, 100, 0)",root:{fillColor:"rgb(254, 92, 92)",color:"#fff",borderColor:"rgb(18, 187, 55)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(209, 237, 176)",color:"rgb(85, 136, 55)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(26, 26, 26)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(136, 100, 0)",borderWidth:2,color:"rgb(136, 100, 0)"}},zM={backgroundColor:"rgb(231, 245, 255)",lineColor:"rgb(96, 189, 255)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(0, 155, 255)",root:{fillColor:"rgb(96, 189, 255)",color:"#fff",borderColor:"#fff",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"#fff",color:"rgb(0, 149, 255)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 66, 157)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(0, 155, 255)",borderWidth:2,color:"rgb(0, 155, 255)"}},IM={backgroundColor:"rgb(17, 17, 84)",lineColor:"rgb(255, 0, 214)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 181, 0)",associativeLineColor:"rgb(255, 255, 255)",associativeLineTextColor:"rgb(255, 255, 255)",root:{fillColor:"rgb(251, 233, 248)",color:"rgb(208, 5, 176)",borderColor:"rgb(255, 0, 214)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"transparent",color:"rgb(248, 177, 237)",borderColor:"",borderWidth:3,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(255, 181, 0)",borderWidth:2,color:"rgb(17, 17, 84)"}},FM={backgroundColor:"rgb(0, 21, 21)",lineColor:"rgb(0, 139, 146)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgba(2, 167, 240, 0.5)",associativeLineColor:"rgb(255, 255, 255)",associativeLineTextColor:"rgb(255, 255, 255)",root:{fillColor:"rgb(0, 243, 255)",color:"rgb(0, 21, 21)",borderColor:"#fff",borderWidth:3,fontSize:24,shape:"parallelogram"},second:{fillColor:"rgb(0, 21, 21)",color:"#fff",borderColor:"#fff",borderWidth:3,fontSize:18,shape:"diamond"},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(0, 117, 255)",borderWidth:2,color:"rgb(0, 21, 21)"}},RM={backgroundColor:"rgb(252, 245, 241)",lineColor:"rgb(144, 114, 110)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(128, 154, 151)",associativeLineColor:"rgb(166, 124, 106)",associativeLineTextColor:"rgb(166, 124, 106)",root:{fillColor:"rgb(207, 121, 105)",color:"#fff",borderColor:"rgb(207, 121, 105)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(239, 210, 207)",color:"rgb(144, 79, 68)",borderColor:"rgb(222, 186, 183)",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(131, 90, 64)"},generalization:{fontSize:14,fillColor:"rgb(172, 202, 199)",borderColor:"rgb(172, 202, 199)",borderWidth:2,color:"rgb(91, 102, 97)"}},PM={backgroundColor:"rgb(233, 245, 241)",lineColor:"rgb(34, 34, 34)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(34, 34, 34)",associativeLineColor:"rgb(56, 44, 116)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"rgb(56, 44, 116)",color:"#fff",borderColor:"rgb(56, 44, 116)",borderWidth:0,fontSize:24},second:{fillColor:"rgb(161, 213, 188)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"rgb(56, 44, 116)",borderColor:"",borderWidth:0,color:"#fff"}},BM={backgroundColor:"rgb(255, 255, 255)",lineColor:"rgb(0, 0, 0)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(0, 0, 0)",associativeLineColor:"rgb(152, 162, 171)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"rgb(237, 182, 72)",color:"rgb(0, 0, 0)",borderColor:"rgb(0, 0, 0)",borderWidth:2,fontSize:24},second:{fillColor:"rgb(114, 158, 28)",color:"#fff",borderColor:"rgb(0, 0, 0)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(10, 2, 2)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"",borderWidth:0,color:"rgb(10, 2, 2)"}},jM={backgroundColor:"rgb(255, 255, 255)",lineColor:"rgb(237, 185, 81)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(226, 90, 64)",associativeLineColor:"rgb(152, 162, 171)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"rgb(226, 90, 64)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(43, 118, 239)",color:"#fff",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(43, 118, 239)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"",borderWidth:0,color:"rgb(43, 118, 239)"}},HM={backgroundColor:"rgb(0, 0, 0)",lineColor:"rgb(172, 172, 172)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(172, 172, 172)",associativeLineColor:"rgb(57, 130, 252)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"#fff",color:"rgb(241, 79, 81)",borderColor:"",borderWidth:0,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(241, 79, 81)",color:"#fff",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"",borderWidth:0,color:"rgb(241, 79, 81)"}},UM={backgroundColor:"rgb(32, 34, 43)",lineColor:"rgb(90, 136, 116)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(90, 136, 116)",associativeLineColor:"rgb(57, 130, 252)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"rgb(1, 192, 116)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(48, 51, 63)",color:"#fff",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"rgb(1, 192, 116)",borderColor:"",borderWidth:0,color:"#fff"}},qM={backgroundColor:"rgb(219, 255, 211)",lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 127, 71)",associativeLineColor:"rgb(160, 220, 63)",associativeLineTextColor:"rgb(160, 220, 63)",root:{fillColor:"rgb(15, 198, 113)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"#fff",color:"rgb(26, 26, 26)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"rgb(255, 127, 71)",borderColor:"",borderWidth:0,color:"#fff"}},WM=[{name:"奥利奥",value:"oreo",theme:NM,dark:!1},{name:"浅海",value:"shallowSea",theme:OM,dark:!1},{name:"柠檬气泡",value:"lemonBubbles",theme:DM,dark:!1},{name:"玫瑰",value:"rose",theme:LM,dark:!1},{name:"海蓝线",value:"seaBlueLine",theme:zM,dark:!1},{name:"霓虹灯",value:"neonLamp",theme:IM,dark:!0},{name:"暗夜冰刃",value:"darkNightLceBlade",theme:FM,dark:!0},{name:"莫兰迪",value:"morandi",theme:RM,dark:!1},{name:"脑图经典5",value:"classic5",theme:PM,dark:!1},{name:"暗色3",value:"dark3",theme:HM,dark:!0},{name:"暗色4",value:"dark4",theme:UM,dark:!0},{name:"仙人掌",value:"cactus",theme:qM,dark:!1},{name:"脑图经典6",value:"classic6",theme:BM,dark:!1},{name:"脑图经典7",value:"classic7",theme:jM,dark:!1}],GM={name:"Theme",components:{Sidebar:ZE},props:{data:{type:[Object,null],default:null},mindMap:{type:Object}},data(){return{themeList:[...oa["i"],...WM].reverse(),themeMap:gM,theme:"",activeName:"",groupList:[]}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark,activeSidebar:e=>e.activeSidebar}),currentList(){return this.groupList.find(e=>e.name===this.activeName).list}},watch:{activeSidebar(e){"theme"===e?(this.theme=this.mindMap.getTheme(),this.$refs.sidebar.show=!0):this.$refs.sidebar.show=!1}},created(){this.initGroup(),this.theme=this.mindMap.getTheme(),this.mindMap.on("view_theme_change",this.handleViewThemeChange)},beforeDestroy(){this.mindMap.off("view_theme_change",this.handleViewThemeChange)},methods:{...Object(ce["c"])(["setLocalConfig"]),handleViewThemeChange(){this.theme=this.mindMap.getTheme(),this.handleDark()},initGroup(){let e=["default","skyGreen","classic2","classic3","classicGreen","classicBlue","blueSky","brainImpairedPink","earthYellow","freshGreen","freshRed","romanticPurple","pinkGrape","mint"],t=[],n=[];this.themeList.forEach(r=>{e.includes(r.value)?t.push(r):r.dark||n.push(r)}),this.groupList=[{name:this.$t("theme.classics"),list:n},{name:this.$t("theme.dark"),list:this.themeList.filter(e=>e.dark)},{name:this.$t("theme.simple"),list:t}],this.activeName=this.groupList[0].name},useTheme(e){if(e.value===this.theme)return;this.theme=e.value,this.handleDark();const t=this.mindMap.getCustomThemeConfig(),n=Object.keys(t).length>0;n?this.$confirm(this.$t("theme.coverTip"),this.$t("theme.tip"),{confirmButtonText:this.$t("theme.cover"),cancelButtonText:this.$t("theme.reserve"),type:"warning",distinguishCancelAndClose:!0,callback:n=>{"confirm"===n?(this.mindMap.setThemeConfig({},!0),this.data.theme.config={},this.changeTheme(e,{})):"cancel"===n&&this.changeTheme(e,t)}}):this.changeTheme(e,t)},changeTheme(e,t){this.$bus.$emit("showLoading"),this.mindMap.setTheme(e.value),Object(Lo["d"])({theme:{template:e.value,config:t}})},handleDark(){let e=this.themeList.find(e=>e.value===this.theme);this.setLocalConfig({isDark:e.dark})}}},VM=GM,_M=(n("d2d4"),Object(m["a"])(VM,EM,MM,!1,null,"5ea342d7",null)),KM=_M.exports,YM=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("strusture.title")}},[t("div",{staticClass:"layoutList",class:{isDark:e.isDark}},e._l(e.layoutList,(function(n){return t("div",{key:n.value,staticClass:"layoutItem",class:{active:n.value===e.layout},on:{click:function(t){return e.useLayout(n)}}},[t("div",{staticClass:"imgBox"},[t("img",{attrs:{src:e.layoutImgMap[n.value],alt:""}})]),t("div",{staticClass:"name"},[e._v(e._s(n.name))])])})),0)])},XM=[],ZM={name:"Structure",components:{Sidebar:ZE},props:{mindMap:{type:Object}},data(){return{layoutList:oa["e"],layoutImgMap:mM,layout:""}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark,activeSidebar:e=>e.activeSidebar})},watch:{activeSidebar(e){"structure"===e?(this.layout=this.mindMap.getLayout(),this.$refs.sidebar.show=!0):this.$refs.sidebar.show=!1}},methods:{useLayout(e){this.layout=e.value,this.mindMap.setLayout(e.value),Object(Lo["d"])({layout:e.value})}}},JM=ZM,QM=(n("2c2d"),Object(m["a"])(JM,YM,XM,!1,null,"3722724b",null)),$M=QM.exports,eN=function(){var e=this,t=e._self._c;return t("div",{staticClass:"countContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("count.words")))]),t("span",{staticClass:"value"},[e._v(e._s(e.words))])]),t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("count.nodes")))]),t("span",{staticClass:"value"},[e._v(e._s(e.num))])])])},tN=[];let nN=document.createElement("div");var rN={name:"Count",props:{mindMap:{type:Object}},data(){return{textStr:"",words:0,num:0}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark})},created(){this.$bus.$on("data_change",this.onDataChange),this.mindMap&&this.onDataChange(this.mindMap.getData())},beforeDestroy(){this.$bus.$off("data_change",this.onDataChange)},methods:{onDataChange(e){this.textStr="",this.words=0,this.num=0,this.walk(e),nN.innerHTML=this.textStr,this.words=nN.textContent.length},walk(e){e&&(this.num++,this.textStr+=String(e.data.text)||"",e.children&&e.children.length>0&&e.children.forEach(e=>{this.walk(e)}))}}},iN=rN,oN=(n("7bec"),Object(m["a"])(iN,eN,tN,!1,null,"69923b2a",null)),aN=oN.exports,sN=function(){var e=this,t=e._self._c;return t("div",{staticClass:"navigatorContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"item"},[t("el-select",{staticStyle:{width:"100px"},attrs:{size:"small"},on:{change:e.onLangChange},model:{value:e.lang,callback:function(t){e.lang=t},expression:"lang"}},e._l(e.langList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"item"},[t("el-tooltip",{attrs:{effect:"dark",content:e.$t("navigatorToolbar.backToRoot"),placement:"top"}},[t("div",{staticClass:"btn iconfont icondingwei",on:{click:e.backToRoot}})])],1),t("div",{staticClass:"item"},[t("div",{staticClass:"btn iconfont iconsousuo",on:{click:e.showSearch}})]),t("div",{staticClass:"item"},[t("MouseAction",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("el-tooltip",{attrs:{effect:"dark",content:e.openMiniMap?e.$t("navigatorToolbar.closeMiniMap"):e.$t("navigatorToolbar.openMiniMap"),placement:"top"}},[t("div",{staticClass:"btn iconfont icondaohang1",on:{click:e.toggleMiniMap}})])],1),t("div",{staticClass:"item"},[t("el-tooltip",{attrs:{effect:"dark",content:e.isReadonly?e.$t("navigatorToolbar.edit"):e.$t("navigatorToolbar.readonly"),placement:"top"}},[t("div",{staticClass:"btn iconfont",class:[e.isReadonly?"iconyanjing":"iconbianji1"],on:{click:e.readonlyChange}})])],1),t("div",{staticClass:"item"},[t("Fullscreen",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("Scale",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"btn iconfont",class:[e.isDark?"iconmoon_line":"iconlieri"],on:{click:e.toggleDark}})]),t("div",{staticClass:"item"},[t("el-tooltip",{attrs:{effect:"dark",content:e.$t("navigatorToolbar.changeSourceCodeEdit"),placement:"top"}},[t("div",{staticClass:"btn iconfont iconyuanma",on:{click:e.openSourceCodeEdit}})])],1),t("div",{staticClass:"item"},[t("Demonstrate",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("el-dropdown",{on:{command:e.handleCommand}},[t("div",{staticClass:"btn iconfont iconbangzhu"}),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{attrs:{command:"github"}},[e._v("Github")]),t("el-dropdown-item",{attrs:{command:"helpDoc"}},[e._v("使用文档")]),t("el-dropdown-item",{attrs:{command:"devDoc"}},[e._v("开发文档")]),t("el-dropdown-item",{attrs:{command:"site"}},[e._v("官方网站")]),t("el-dropdown-item",{attrs:{command:"issue"}},[e._v("意见反馈")]),t("el-dropdown-item",{attrs:{disabled:""}},[e._v("当前:v"+e._s(e.version))])],1)],1)],1)])},lN=[],cN=function(){var e=this,t=e._self._c;return t("div",{staticClass:"scaleContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("scale.zoomOut"),placement:"top"}},[t("div",{staticClass:"btn el-icon-minus",on:{click:e.narrow}})]),t("div",{staticClass:"scaleInfo"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.scaleNum,expression:"scaleNum"}],ref:"inputRef",attrs:{type:"text"},domProps:{value:e.scaleNum},on:{input:[function(t){t.target.composing||(e.scaleNum=t.target.value)},e.onScaleNumInput],change:e.onScaleNumChange,focus:e.onScaleNumInputFocus,keydown:function(e){e.stopPropagation()},keyup:function(e){e.stopPropagation()}}}),e._v("% ")]),t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("scale.zoomIn"),placement:"top"}},[t("div",{staticClass:"btn el-icon-plus",on:{click:e.enlarge}})])],1)},hN=[],uN={name:"Scale",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{scaleNum:100,cacheScaleNum:0}},watch:{mindMap(e,t){e&&!t&&(this.mindMap.on("scale",this.onScale),this.mindMap.on("draw_click",this.onDrawClick),this.scaleNum=this.toPer(this.mindMap.view.scale))}},beforeDestroy(){this.mindMap.off("scale",this.onScale),this.mindMap.off("draw_click",this.onDrawClick)},methods:{toPer(e){return(100*e).toFixed(0)},narrow(){this.mindMap.view.narrow()},enlarge(){this.mindMap.view.enlarge()},onScaleNumInputFocus(){this.cacheScaleNum=this.scaleNum},onScaleNumInput(){this.scaleNum=this.scaleNum.replace(/[^0-9]+/g,"")},onScaleNumChange(){const e=Number(this.scaleNum);if(Number.isNaN(e)||e<=0)this.scaleNum=this.cacheScaleNum;else{const e=this.mindMap.width/2,t=this.mindMap.height/2;this.mindMap.view.setScale(this.scaleNum/100,e,t)}},onScale(e){this.scaleNum=this.toPer(e)},onDrawClick(){this.$refs.inputRef&&this.$refs.inputRef.blur()}}},dN=uN,fN=(n("b283"),Object(m["a"])(dN,cN,hN,!1,null,"3a51eef1",null)),pN=fN.exports,mN=function(){var e=this,t=e._self._c;return t("div",{staticClass:"fullscreenContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("fullscreen.fullscreenShow"),placement:"top"}},[t("div",{staticClass:"btn iconfont iconquanping",on:{click:e.toFullscreenShow}})]),t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("fullscreen.fullscreenEdit"),placement:"top"}},[t("div",{staticClass:"btn iconfont iconquanping1",on:{click:e.toFullscreenEdit}})])],1)},gN=[];const vN=()=>document.documentElement.requestFullScreen?"onfullscreenchange":document.documentElement.webkitRequestFullScreen?"onwebkitfullscreenchange":document.documentElement.mozRequestFullScreen?"onmozfullscreenchange":document.documentElement.msRequestFullscreen?"onmsfullscreenchange":void 0,bN=vN(),yN=e=>{e.requestFullScreen?e.requestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.mozRequestFullScreen&&e.mozRequestFullScreen()},wN=e=>{const t=document.createElement("textarea");t.innerHTML=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},xN=e=>{navigator.clipboard&&navigator.clipboard.writeText(e)},kN=e=>{if(navigator.clipboard){const t=[new ClipboardItem({["image/png"]:e})];navigator.clipboard.write(t)}};var CN={name:"Fullscreen",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{}},created(){document[bN]=()=>{setTimeout(()=>{this.mindMap.resize()},1e3)}},methods:{toFullscreenShow(){yN(this.mindMap.el)},toFullscreenEdit(){yN(document.body)}}},TN=CN,SN=(n("dc93"),Object(m["a"])(TN,mN,gN,!1,null,"1bcbabda",null)),AN=SN.exports,EN=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mouseActionContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.useLeftKeySelectionRightKeyDrag?e.$t("mouseAction.tip2"):e.$t("mouseAction.tip1"),placement:"top"}},[t("div",{staticClass:"btn iconfont",class:[e.useLeftKeySelectionRightKeyDrag?"iconmouseR":"iconmouseL"],on:{click:e.toggleAction}})])],1)},MN=[],NN={name:"MouseAction",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{}},computed:{...Object(ce["d"])({useLeftKeySelectionRightKeyDrag:e=>e.localConfig.useLeftKeySelectionRightKeyDrag})},methods:{...Object(ce["c"])(["setLocalConfig"]),toggleAction(){let e=!this.useLeftKeySelectionRightKeyDrag;this.mindMap.updateConfig({useLeftKeySelectionRightKeyDrag:e}),this.setLocalConfig({useLeftKeySelectionRightKeyDrag:e})}}},ON=NN,DN=(n("08cf"),Object(m["a"])(ON,EN,MN,!1,null,"a1887b1e",null)),LN=DN.exports,zN=n("9225"),IN=n("a06c"),FN=function(){var e=this,t=e._self._c;return t("div",{staticClass:"demonstrateContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("demonstrate.demonstrate"),placement:"top"}},[t("div",{staticClass:"btn iconfont iconyanshibofang",on:{click:e.enterDemoMode}})]),e.isEnterDemonstrate?t("div",{ref:"exitDemonstrateBtnRef",staticClass:"exitDemonstrateBtn",on:{click:e.exit,mousedown:function(e){e.stopPropagation()},mousemove:function(e){e.stopPropagation()},mouseup:function(e){e.stopPropagation()}}},[t("span",{staticClass:"icon iconfont iconguanbi"})]):e._e(),e.isEnterDemonstrate?t("div",{ref:"stepBoxRef",staticClass:"stepBox",on:{mousedown:function(e){e.stopPropagation()},mousemove:function(e){e.stopPropagation()},mouseup:function(e){e.stopPropagation()}}},[t("div",{staticClass:"jump",class:{disabled:e.curStepIndex<=0},on:{click:e.prev}},[t("span",{staticClass:"icon el-icon-back"})]),t("div",{staticClass:"step"},[e._v(e._s(e.curStepIndex+1)+" / "+e._s(e.totalStep))]),t("div",{staticClass:"jump",class:{disabled:e.curStepIndex>=e.totalStep-1},on:{click:e.next}},[t("span",{staticClass:"icon el-icon-right"})]),t("div",{staticClass:"input"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.inputStep,expression:"inputStep"}],attrs:{type:"text"},domProps:{value:e.inputStep},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.stopPropagation(),e.onEnter.apply(null,arguments))},keydown:function(e){e.stopPropagation()},input:function(t){t.target.composing||(e.inputStep=t.target.value)}}})])]):e._e()],1)},RN=[],PN={props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{isEnterDemonstrate:!1,curStepIndex:0,totalStep:0,inputStep:""}},created(){this.$bus.$on("demonstrate_jump",this.onJump),this.$bus.$on("exit_demonstrate",this.onExit)},methods:{enterDemoMode(){this.isEnterDemonstrate=!0,this.$nextTick(()=>{const e=document.querySelector("#mindMapContainer");e.appendChild(this.$refs.exitDemonstrateBtnRef),e.appendChild(this.$refs.stepBoxRef)}),this.mindMap.demonstrate.enter()},exit(){this.mindMap.demonstrate.exit()},onExit(){this.isEnterDemonstrate=!1,this.curStepIndex=0,this.totalStep=0},onJump(e,t){this.curStepIndex=e,this.totalStep=t},prev(){this.mindMap.demonstrate.prev()},next(){this.mindMap.demonstrate.next()},onEnter(){const e=Number(this.inputStep);Number.isNaN(e)?this.inputStep="":e>=1&&e<=this.totalStep&&this.mindMap.demonstrate.jump(e-1)}}},BN=PN,jN=(n("8b93"),Object(m["a"])(BN,FN,RN,!1,null,"10de3df2",null)),HN=jN.exports,UN={name:"NavigatorToolbar",components:{Scale:pN,Fullscreen:AN,MouseAction:LN,Demonstrate:HN},props:{mindMap:{type:Object}},data(){return{version:IN.version,langList:Le,lang:"",openMiniMap:!1}},computed:{...Object(ce["d"])({isReadonly:e=>e.isReadonly,isDark:e=>e.localConfig.isDark})},created(){this.lang=Object(Lo["b"])()},methods:{...Object(ce["c"])(["setLocalConfig","setIsReadonly","setIsSourceCodeEdit"]),readonlyChange(){this.setIsReadonly(!this.isReadonly),this.mindMap.setMode(this.isReadonly?"readonly":"edit")},toggleMiniMap(){this.openMiniMap=!this.openMiniMap,this.$bus.$emit("toggle_mini_map",this.openMiniMap)},onLangChange(e){zN["a"].locale=e,Object(Lo["f"])(e),this.$bus.$emit("lang_change")},showSearch(){this.$bus.$emit("show_search")},toggleDark(){this.setLocalConfig({isDark:!this.isDark})},handleCommand(e){let t="";switch(e){case"github":t="https://github.com/wanglin2/mind-map";break;case"helpDoc":t="https://wanglin2.github.io/mind-map-docs/help/help1.html";break;case"devDoc":t="https://wanglin2.github.io/mind-map-docs/start/introduction.html";break;case"site":t="https://wanglin2.github.io/mind-map-docs/";break;case"issue":t="https://github.com/wanglin2/mind-map/issues/new";break;default:break}const n=document.createElement("a");n.href=t,n.target="_blank",n.click()},backToRoot(){this.mindMap.renderer.setRootNodeCenter()},openSourceCodeEdit(){this.setIsSourceCodeEdit(!0)}}},qN=UN,WN=(n("7d89"),Object(m["a"])(qN,sN,lN,!1,null,"50ed186d",null)),GN=WN.exports,VN=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("shortcutKey.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},e._l(e.shortcutKeyList,(function(n){return t("div",{key:n.type},[t("div",{staticClass:"title"},[e._v(e._s(n.type))]),e._l(n.list,(function(n){return t("div",{key:n.value,staticClass:"list"},[t("div",{staticClass:"item"},[n.icon?t("span",{staticClass:"icon iconfont",class:[n.icon]}):e._e(),t("span",{staticClass:"name",attrs:{title:n.name}},[e._v(e._s(n.name))]),t("div",{staticClass:"value",attrs:{title:n.value}},[e._v(e._s(n.value))])])])}))],2)})),0)])},_N=[],KN={name:"ShortcutKey",components:{Sidebar:ZE},data(){return{}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark,activeSidebar:e=>e.activeSidebar}),shortcutKeyList(){return Mt[this.$i18n.locale]||Mt.zh}},watch:{activeSidebar(e){this.$refs.sidebar.show="shortcutKey"===e}}},YN=KN,XN=(n("62fd"),Object(m["a"])(YN,VN,_N,!1,null,"60ee437a",null)),ZN=XN.exports,JN=function(){var e=this,t=e._self._c;return e.isShow?t("div",{ref:"contextmenuRef",staticClass:"contextmenuContainer listBox",class:{isDark:e.isDark},style:{left:e.left+"px",top:e.top+"px"}},["node"===e.type?[t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("INSERT_NODE",e.insertNodeBtnDisabled)}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertSiblingNode")))]),t("span",{staticClass:"desc"},[e._v("Enter")])]),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("INSERT_CHILD_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertChildNode")))]),t("span",{staticClass:"desc"},[e._v("Tab")])]),t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("INSERT_PARENT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertParentNode")))]),t("span",{staticClass:"desc"},[e._v("Shift + Tab")])]),t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("ADD_GENERALIZATION")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertSummary")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + G")])]),t("div",{staticClass:"splitLine"}),t("div",{staticClass:"item",class:{disabled:e.upNodeBtnDisabled},on:{click:function(t){return e.exec("UP_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.moveUpNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + ↑")])]),t("div",{staticClass:"item",class:{disabled:e.downNodeBtnDisabled},on:{click:function(t){return e.exec("DOWN_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.moveDownNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + ↓")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("EXPAND_ALL")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.expandNodeChild")))])]),e.supportNumbers?t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.number")))]),t("span",{staticClass:"el-icon-arrow-right"}),t("div",{staticClass:"subItems listBox",class:{isDark:e.isDark,showLeft:e.subItemsShowLeft},staticStyle:{top:"-170px"}},[e._l(e.numberTypeList,(function(n){return t("div",{key:"type"+n.value,staticClass:"item",on:{click:function(t){return e.setNodeNumber("type",n.value)}}},[t("span",{staticClass:"name"},[e._v(e._s(n.name))]),e._v(" "+e._s(e.numberType===n.value?"√":"")+" ")])})),t("div",{staticClass:"splitLine"}),e._l(e.numberLevelList,(function(n){return t("div",{key:"level"+n.value,staticClass:"item",class:{disabled:""===e.numberType},on:{click:function(t){return e.setNodeNumber("level",n.value)}}},[t("span",{staticClass:"name"},[e._v(e._s(n.name))]),e._v(" "+e._s(e.numberLevel===n.value?"√":"")+" ")])}))],2)]):e._e(),t("div",{staticClass:"splitLine"}),t("div",{staticClass:"item danger",on:{click:function(t){return e.exec("REMOVE_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.deleteNode")))]),t("span",{staticClass:"desc"},[e._v("Delete")])]),t("div",{staticClass:"item danger",on:{click:function(t){return e.exec("REMOVE_CURRENT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.deleteCurrentNode")))]),t("span",{staticClass:"desc"},[e._v("Shift + Backspace")])]),t("div",{staticClass:"splitLine"}),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("COPY_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.copyNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + C")])]),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("CUT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.cutNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + X")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("PASTE_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.pasteNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + V")])]),t("div",{staticClass:"splitLine"}),e.hasHyperlink?t("div",{staticClass:"item",on:{click:function(t){return e.exec("REMOVE_HYPERLINK")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.removeHyperlink")))])]):e._e(),e.hasNote?t("div",{staticClass:"item",on:{click:function(t){return e.exec("REMOVE_NOTE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.removeNote")))])]):e._e(),t("div",{staticClass:"item",on:{click:function(t){return e.exec("REMOVE_CUSTOM_STYLES")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.removeCustomStyles")))])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("EXPORT_CUR_NODE_TO_PNG")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.exportNodeToPng")))])])]:e._e(),"svg"===e.type?[t("div",{staticClass:"item",on:{click:function(t){return e.exec("RETURN_CENTER")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.backCenter")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + Enter")])]),t("div",{staticClass:"splitLine"}),t("div",{staticClass:"item",on:{click:function(t){return e.exec("EXPAND_ALL")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.expandAll")))])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("UNEXPAND_ALL")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.unExpandAll")))])]),t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.expandTo")))]),t("span",{staticClass:"el-icon-arrow-right"}),t("div",{staticClass:"subItems listBox",class:{isDark:e.isDark,showLeft:e.subItemsShowLeft},staticStyle:{top:"-10px"}},e._l(e.expandList,(function(n,r){return t("div",{key:n,staticClass:"item",on:{click:function(t){return e.exec("UNEXPAND_TO_LEVEL",!1,r+1)}}},[e._v(" "+e._s(n)+" ")])})),0)]),t("div",{staticClass:"splitLine"}),t("div",{staticClass:"item",on:{click:function(t){return e.exec("RESET_LAYOUT")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.arrangeLayout")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + L")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("FIT_CANVAS")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.fitCanvas")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + i")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("TOGGLE_ZEN_MODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.zenMode")))]),e._v(" "+e._s(e.isZenMode?"√":"")+" ")]),t("div",{staticClass:"splitLine"}),t("div",{staticClass:"item",on:{click:function(t){return e.exec("REMOVE_ALL_NODE_CUSTOM_STYLES")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.removeAllNodeCustomStyles")))])]),t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.copyToClipboard")))]),t("span",{staticClass:"el-icon-arrow-right"}),t("div",{staticClass:"subItems listBox",class:{isDark:e.isDark,showLeft:e.subItemsShowLeft},staticStyle:{top:"-130px"}},e._l(e.copyList,(function(n){return t("div",{key:n.value,staticClass:"item",on:{click:function(t){return e.copyToClipboard(n.value)}}},[e._v(" "+e._s(n.name)+" ")])})),0)])]:e._e()],2):e._e()},QN=[],$N={name:"Contextmenu",props:{mindMap:{type:Object}},data(){return{isShow:!1,left:0,top:0,node:null,type:"",isMousedown:!1,mosuedownX:0,mosuedownY:0,enableCopyToClipboardApi:navigator.clipboard,numberType:"",numberLevel:"",subItemsShowLeft:!1}},computed:{...Object(ce["d"])({isZenMode:e=>e.localConfig.isZenMode,isDark:e=>e.localConfig.isDark,supportNumbers:e=>e.supportNumbers}),expandList(){return[this.$t("contextmenu.level1"),this.$t("contextmenu.level2"),this.$t("contextmenu.level3"),this.$t("contextmenu.level4"),this.$t("contextmenu.level5"),this.$t("contextmenu.level6")]},copyList(){const e=[{name:this.$t("contextmenu.copyToSmm"),value:"smm"},{name:this.$t("contextmenu.copyToJson"),value:"json"},{name:this.$t("contextmenu.copyToMarkdown"),value:"md"},{name:this.$t("contextmenu.copyToTxt"),value:"txt"}];return this.enableCopyToClipboardApi&&e.push({name:this.$t("contextmenu.copyToPng"),value:"png"}),e},insertNodeBtnDisabled(){return!this.node||this.node.isRoot||this.node.isGeneralization},upNodeBtnDisabled(){if(!this.node||this.node.isRoot||this.node.isGeneralization)return!0;let e=0===this.node.parent.children.findIndex(e=>e===this.node);return e},downNodeBtnDisabled(){if(!this.node||this.node.isRoot||this.node.isGeneralization)return!0;let e=this.node.parent.children,t=e.findIndex(e=>e===this.node)===e.length-1;return t},isGeneralization(){return this.node.isGeneralization},hasHyperlink(){return!!this.node.getData("hyperlink")},hasNote(){return!!this.node.getData("note")},numberTypeList(){return zt[this.$i18n.locale]||zt.zh},numberLevelList(){return It[this.$i18n.locale]||It.zh}},created(){this.$bus.$on("node_contextmenu",this.show),this.$bus.$on("node_click",this.hide),this.$bus.$on("draw_click",this.hide),this.$bus.$on("expand_btn_click",this.hide),this.$bus.$on("svg_mousedown",this.onMousedown),this.$bus.$on("mouseup",this.onMouseup),this.$bus.$on("translate",this.hide)},beforeDestroy(){this.$bus.$off("node_contextmenu",this.show),this.$bus.$off("node_click",this.hide),this.$bus.$off("draw_click",this.hide),this.$bus.$off("expand_btn_click",this.hide),this.$bus.$off("svg_mousedown",this.onMousedown),this.$bus.$off("mouseup",this.onMouseup),this.$bus.$off("translate",this.hide)},methods:{...Object(ce["c"])(["setLocalConfig"]),getShowPosition(e,t){const n=this.$refs.contextmenuRef.getBoundingClientRect();return e+n.width>window.innerWidth&&(e=e-n.width-20),this.subItemsShowLeft=e+n.width+150>window.innerWidth,t+n.height>window.innerHeight&&(t=window.innerHeight-n.height-10),{x:e,y:t}},show(e,t){this.type="node",this.isShow=!0,this.node=t;const n=this.node.getData("number");n&&(this.numberType=n.type||1,this.numberLevel=""===n.level?1:n.level),this.$nextTick(()=>{const{x:t,y:n}=this.getShowPosition(e.clientX+10,e.clientY+10);this.left=t,this.top=n})},onMousedown(e){3===e.which&&(this.mosuedownX=e.clientX,this.mosuedownY=e.clientY,this.isMousedown=!0)},onMouseup(e){this.isMousedown&&(this.isMousedown=!1,Math.abs(this.mosuedownX-e.clientX)>3||Math.abs(this.mosuedownY-e.clientY)>3?this.hide():this.show2(e))},show2(e){this.type="svg",this.isShow=!0,this.$nextTick(()=>{const{x:t,y:n}=this.getShowPosition(e.clientX+10,e.clientY+10);this.left=t,this.top=n})},hide(){this.isShow=!1,this.left=-9999,this.top=-9999,this.type="",this.node="",this.numberType="",this.numberLevel=""},exec(e,t,...n){if(!t){switch(e){case"COPY_NODE":this.mindMap.renderer.copy();break;case"CUT_NODE":this.mindMap.renderer.cut();break;case"PASTE_NODE":this.mindMap.renderer.paste();break;case"RETURN_CENTER":this.mindMap.renderer.setRootNodeCenter();break;case"TOGGLE_ZEN_MODE":this.setLocalConfig({isZenMode:!this.isZenMode});break;case"FIT_CANVAS":this.mindMap.view.fit();break;case"REMOVE_HYPERLINK":this.node.setHyperlink("","");break;case"REMOVE_NOTE":this.node.setNote("");break;case"EXPORT_CUR_NODE_TO_PNG":this.mindMap.export("png",!0,Object(b["L"])(this.node.getData("text")),!1,this.node);break;case"EXPAND_ALL":this.$bus.$emit("execCommand",e,this.node.uid);break;default:this.$bus.$emit("execCommand",e,...n);break}this.hide()}},setNodeNumber(e,t){if("type"===e){if(this.numberType=t,""===t)return this.numberLevel="",void this.mindMap.execCommand("SET_NUMBER",[],null);""===this.numberLevel&&(this.numberLevel=1)}"level"===e&&(this.numberLevel=t),this.mindMap.execCommand("SET_NUMBER",[],{[e]:t})},async copyToClipboard(e){try{let t,n;switch(this.hide(),e){case"smm":case"json":t=this.mindMap.getData(!0),n=JSON.stringify(t);break;case"md":t=this.mindMap.getData(),n=gn(t);break;case"txt":t=this.mindMap.getData(),n=bc(t);break;case"png":const e=await this.mindMap.export("png",!1),r=await Object(b["T"])(e,!0);kN(r);break;default:break}n&&(this.enableCopyToClipboardApi?xN(n):wN(n)),this.$message.success(this.$t("contextmenu.copySuccess"))}catch(t){console.log(t),this.$message.error(this.$t("contextmenu.copyFail"))}}}},eO=$N,tO=(n("2361"),Object(m["a"])(eO,JN,QN,!1,null,"a4cc2136",null)),nO=tO.exports,rO=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.showRichTextToolbar,expression:"showRichTextToolbar"}],ref:"richTextToolbar",staticClass:"richTextToolbar",class:{isDark:e.isDark},style:e.style,on:{"&click":function(e){e.stopPropagation()}}},[t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.bold"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.bold},on:{click:e.toggleBold}},[t("span",{staticClass:"icon iconfont iconzitijiacu"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.italic"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.italic},on:{click:e.toggleItalic}},[t("span",{staticClass:"icon iconfont iconzitixieti"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.underline"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.underline},on:{click:e.toggleUnderline}},[t("span",{staticClass:"icon iconfont iconzitixiahuaxian"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.strike"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.strike},on:{click:e.toggleStrike}},[t("span",{staticClass:"icon iconfont iconshanchuxian"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.fontFamily"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("div",{staticClass:"fontOptionsList",class:{isDark:e.isDark}},e._l(e.fontFamilyList,(function(n){return t("div",{key:n.value,staticClass:"fontOptionItem",class:{active:e.formatInfo.font===n.value},style:{fontFamily:n.value},on:{click:function(t){return e.changeFontFamily(n.value)}}},[e._v(" "+e._s(n.name)+" ")])})),0),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconxingzhuang-wenzi"})])])],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.fontSize"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("div",{staticClass:"fontOptionsList",class:{isDark:e.isDark}},e._l(e.fontSizeList,(function(n){return t("div",{key:n,staticClass:"fontOptionItem",class:{active:e.formatInfo.size===n+"px"},style:{fontSize:n+"px",height:(n<30?30:n+10)+"px"},on:{click:function(t){return e.changeFontSize(n)}}},[e._v(" "+e._s(n)+"px ")])})),0),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconcase fontColor"})])])],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.color"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.fontColor},on:{change:e.changeFontColor}}),t("div",{staticClass:"btn",style:{color:e.formatInfo.color},attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconzitiyanse"})])],1)],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.backgroundColor"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.fontBackgroundColor},on:{change:e.changeFontBackgroundColor}}),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconbeijingyanse"})])],1)],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.removeFormat"),placement:"top"}},[t("div",{staticClass:"btn",on:{click:e.removeFormat}},[t("span",{staticClass:"icon iconfont iconqingchu"})])])],1)},iO=[],oO={name:"RichTextToolbar",components:{Color:qo},props:{mindMap:{type:Object}},data(){return{fontSizeList:ue,showRichTextToolbar:!1,style:{left:0,top:0},fontColor:"",fontBackgroundColor:"",formatInfo:{}}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark}),fontFamilyList(){return wt[this.$i18n.locale]||wt.zh}},created(){this.$bus.$on("rich_text_selection_change",this.onRichTextSelectionChange)},mounted(){document.body.append(this.$refs.richTextToolbar)},beforeDestroy(){this.$bus.$off("rich_text_selection_change",this.onRichTextSelectionChange)},methods:{onRichTextSelectionChange(e,t,n){e&&(this.style.left=t.left+t.width/2+"px",this.style.top=t.top-60+"px",this.formatInfo={...n||{}}),this.showRichTextToolbar=e},toggleBold(){this.formatInfo.bold=!this.formatInfo.bold,this.mindMap.richText.formatText({bold:this.formatInfo.bold})},toggleItalic(){this.formatInfo.italic=!this.formatInfo.italic,this.mindMap.richText.formatText({italic:this.formatInfo.italic})},toggleUnderline(){this.formatInfo.underline=!this.formatInfo.underline,this.mindMap.richText.formatText({underline:this.formatInfo.underline})},toggleStrike(){this.formatInfo.strike=!this.formatInfo.strike,this.mindMap.richText.formatText({strike:this.formatInfo.strike})},changeFontFamily(e){this.formatInfo.font=e,this.mindMap.richText.formatText({font:e})},changeFontSize(e){this.formatInfo.size=e,this.mindMap.richText.formatText({size:e+"px"})},changeFontColor(e){this.formatInfo.color=e,this.mindMap.richText.formatText({color:e})},changeFontBackgroundColor(e){this.formatInfo.background=e,this.mindMap.richText.formatText({background:e})},removeFormat(){this.mindMap.richText.removeFormat()}}},aO=oO,sO=(n("4fc1"),Object(m["a"])(aO,rO,iO,!1,null,"0041a5be",null)),lO=sO.exports,cO=function(){var e=this,t=e._self._c;return t("div",{ref:"noteContentViewer",staticClass:"noteContentViewer",style:{left:this.left+"px",top:this.top+"px",visibility:e.show?"visible":"hidden"},on:{click:function(e){e.stopPropagation()},mousedown:function(e){e.stopPropagation()},mousemove:function(e){e.stopPropagation()},mouseup:function(e){e.stopPropagation()}}})},hO=[],uO=n("f059"),dO=n.n(uO),fO=(n("fe5f"),{name:"NodeNoteContentShow",props:{mindMap:{type:Object,default(){return null}}},data(){return{editor:null,show:!1,left:0,top:0,node:null}},created(){this.$bus.$on("showNoteContent",this.onShowNoteContent),this.$bus.$on("hideNoteContent",this.hideNoteContent),document.body.addEventListener("click",this.hideNoteContent),this.$bus.$on("node_active",this.hideNoteContent),this.$bus.$on("scale",this.onScale),this.$bus.$on("translate",this.onScale),this.$bus.$on("svg_mousedown",this.hideNoteContent),this.$bus.$on("expand_btn_click",this.hideNoteContent)},mounted(){this.mindMap.el.appendChild(this.$refs.noteContentViewer),this.initEditor()},beforeDestroy(){this.$bus.$off("showNoteContent",this.onShowNoteContent),this.$bus.$off("hideNoteContent",this.hideNoteContent),document.body.removeEventListener("click",this.hideNoteContent),this.$bus.$off("node_active",this.hideNoteContent),this.$bus.$off("scale",this.onScale),this.$bus.$off("translate",this.onScale),this.$bus.$off("svg_mousedown",this.hideNoteContent),this.$bus.$off("expand_btn_click",this.hideNoteContent)},methods:{onShowNoteContent(e,t,n,r){this.node=r,this.editor.setMarkdown(e),this.handleALink(),this.updateNoteContentPosition(t,n),this.show=!0},handleALink(){const e=this.$refs.noteContentViewer.querySelectorAll("a");Array.from(e).forEach(e=>{e.setAttribute("target","_blank")})},updateNoteContentPosition(e,t){this.left=e,this.top=t},onScale(){if(!this.node||!this.show)return;const{left:e,top:t}=this.node.getNoteContentPosition();this.updateNoteContentPosition(e,t)},hideNoteContent(){this.show=!1},initEditor(){this.editor||(this.editor=new dO.a({el:this.$refs.noteContentViewer}))}}}),pO=fO,mO=(n("70e0"),Object(m["a"])(pO,cO,hO,!1,null,"11f00eda",null)),gO=mO.exports,vO=function(){var e=this,t=e._self._c;return e.showMiniMap?t("div",{ref:"navigatorBox",staticClass:"navigatorBox",class:{isDark:e.isDark},style:{width:e.width+"px"},on:{mousedown:e.onMousedown,mousemove:e.onMousemove}},[t("div",{ref:"svgBox",staticClass:"svgBox",style:{transform:`scale(${e.svgBoxScale})`,left:e.svgBoxLeft+"px",top:e.svgBoxTop+"px"}},[t("img",{attrs:{src:e.mindMapImg},on:{mousedown:function(e){e.preventDefault()}}})]),t("div",{staticClass:"windowBox",class:{withTransition:e.withTransition},style:e.viewBoxStyle,on:{mousedown:function(t){return t.stopPropagation(),e.onViewBoxMousedown.apply(null,arguments)},mousemove:e.onViewBoxMousemove}})]):e._e()},bO=[],yO={props:{mindMap:{type:Object}},data(){return{showMiniMap:!1,timer:null,boxWidth:0,boxHeight:0,svgBoxScale:1,svgBoxLeft:0,svgBoxTop:0,viewBoxStyle:{left:0,top:0,bottom:0,right:0},mindMapImg:"",width:0,setSizeTimer:null,withTransition:!0}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark})},mounted(){this.setSize(),window.addEventListener("resize",this.setSize),this.$bus.$on("toggle_mini_map",this.toggle_mini_map),this.$bus.$on("data_change",this.data_change),this.$bus.$on("view_data_change",this.data_change),this.$bus.$on("node_tree_render_end",this.data_change),window.addEventListener("mouseup",this.onMouseup),this.mindMap.on("mini_map_view_box_position_change",this.onViewBoxPositionChange)},destroyed(){window.removeEventListener("resize",this.setSize),this.$bus.$off("toggle_mini_map",this.toggle_mini_map),this.$bus.$off("data_change",this.data_change),this.$bus.$off("view_data_change",this.data_change),this.$bus.$off("node_tree_render_end",this.data_change),window.removeEventListener("mouseup",this.onMouseup),this.mindMap.off("mini_map_view_box_position_change",this.onViewBoxPositionChange)},methods:{toggle_mini_map(e){this.showMiniMap=e,this.$nextTick(()=>{this.$refs.navigatorBox&&this.init(),this.$refs.svgBox&&this.drawMiniMap()})},data_change(){this.showMiniMap&&(clearTimeout(this.timer),this.timer=setTimeout(()=>{this.drawMiniMap()},500))},setSize(){clearTimeout(this.setSizeTimer),this.setSizeTimer=setTimeout(()=>{this.width=Math.min(window.innerWidth-80,370),this.$nextTick(()=>{this.showMiniMap&&(this.init(),this.drawMiniMap())})},300)},init(){let{width:e,height:t}=this.$refs.navigatorBox.getBoundingClientRect();this.boxWidth=e,this.boxHeight=t},drawMiniMap(){let{getImgUrl:e,viewBoxStyle:t,miniMapBoxScale:n,miniMapBoxLeft:r,miniMapBoxTop:i}=this.mindMap.miniMap.calculationMiniMap(this.boxWidth,this.boxHeight);e(e=>{this.mindMapImg=e}),this.viewBoxStyle=t,this.svgBoxScale=n,this.svgBoxLeft=r,this.svgBoxTop=i},onMousedown(e){this.mindMap.miniMap.onMousedown(e)},onMousemove(e){this.mindMap.miniMap.onMousemove(e)},onMouseup(e){this.withTransition||(this.withTransition=!0),this.mindMap.miniMap&&this.mindMap.miniMap.onMouseup(e)},onViewBoxMousedown(e){this.mindMap.miniMap.onViewBoxMousedown(e)},onViewBoxMousemove(e){this.mindMap.miniMap.onViewBoxMousemove(e)},onViewBoxPositionChange({left:e,right:t,top:n,bottom:r}){this.withTransition=!1,this.viewBoxStyle.left=e,this.viewBoxStyle.right=t,this.viewBoxStyle.top=n,this.viewBoxStyle.bottom=r}}},wO=yO,xO=(n("1801"),Object(m["a"])(wO,vO,bO,!1,null,"45acd816",null)),kO=xO.exports,CO=function(){var e=this,t=e._self._c;return t("viewer",{attrs:{images:e.images}},e._l(e.images,(function(e){return t("img",{key:e,attrs:{src:e}})})),0)},TO=[],SO={props:{mindMap:{type:Object,default(){return null}}},data(){return{images:[]}},mounted(){this.mindMap.on("node_img_dblclick",this.onNodeTmgDblclick)},beforeDestroy(){this.mindMap.off("node_img_dblclick",this.onNodeTmgDblclick)},methods:{onNodeTmgDblclick(e,t){t.stopPropagation(),t.preventDefault(),this.images=[e.nodeData.data.image],this.$viewerApi({images:this.images})}}},AO=SO,EO=Object(m["a"])(AO,CO,TO,!1,null,null,null),MO=EO.exports,NO=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sidebarTriggerContainer",class:{hasActive:e.show&&e.activeSidebar,show:e.show,isDark:e.isDark},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"toggleShowBtn",class:{hide:!e.show},on:{click:function(t){e.show=!e.show}}},[t("span",{staticClass:"iconfont iconjiantouyou"})]),t("div",{staticClass:"trigger"},e._l(e.triggerList,(function(n){return t("div",{key:n.value,staticClass:"triggerItem",class:{active:e.activeSidebar===n.value},on:{click:function(t){return e.trigger(n)}}},[t("div",{staticClass:"triggerIcon iconfont",class:[n.icon]}),t("div",{staticClass:"triggerName"},[e._v(e._s(n.name))])])})),0)])},OO=[],DO={name:"SidebarTrigger",data(){return{show:!0}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark,activeSidebar:e=>e.activeSidebar,isReadonly:e=>e.isReadonly}),triggerList(){let e=Dt[this.$i18n.locale]||Dt.zh;return this.isReadonly&&(e=e.filter(e=>["outline","shortcutKey"].includes(e.value))),e}},watch:{isReadonly(e){e&&this.setActiveSidebar(null)}},methods:{...Object(ce["c"])(["setActiveSidebar"]),trigger(e){this.setActiveSidebar(e.value)}}},LO=DO,zO=(n("6854"),Object(m["a"])(LO,NO,OO,!1,null,"5ac1b955",null)),IO=zO.exports,FO=function(){var e=this,t=e._self._c;return t("div",{staticClass:"customNodeContent"},[t("p",[e._v(e._s(e.title))]),t("p",{domProps:{innerHTML:e._s(e.html)}}),t("p",{style:{backgroundColor:e.color},on:{click:e.onClick}},[e._v("点击我会变色")])])},RO=[],PO={props:{html:{type:String,default:""}},data(){return{title:"我是自定义节点",color:""}},methods:{onClick(){this.color="red"}}},BO=PO,jO=(n("f1f2"),Object(m["a"])(BO,FO,RO,!1,null,"6ef61ceb",null)),HO=(jO.exports,n("41cb"),n("c0d6"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"searchContainer",class:{isDark:e.isDark,show:e.show}},[t("div",{staticClass:"closeBtnBox"},[t("span",{staticClass:"closeBtn el-icon-close",on:{click:e.close}})]),t("div",{staticClass:"searchInputBox"},[t("el-input",{ref:"searchInputRef",attrs:{placeholder:e.$t("search.searchPlaceholder"),size:"small"},on:{focus:e.onFocus,blur:e.onBlur},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.stopPropagation(),e.onSearchNext.apply(null,arguments))},keydown:function(e){e.stopPropagation()}},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}},[t("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"}),e.isUndef(e.searchText)?e._e():t("el-button",{attrs:{slot:"append",size:"small"},on:{click:function(t){e.showReplaceInput=!0}},slot:"append"},[e._v(e._s(e.$t("search.replace")))])],1),e.showSearchInfo?t("div",{staticClass:"searchInfo"},[e._v(" "+e._s(e.currentIndex)+" / "+e._s(e.total)+" ")]):e._e()],1),e.showReplaceInput?t("el-input",{ref:"replaceInputRef",staticStyle:{margin:"12px 0"},attrs:{placeholder:e.$t("search.replacePlaceholder"),size:"small"},on:{focus:e.onFocus,blur:e.onBlur},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.replaceText,callback:function(t){e.replaceText=t},expression:"replaceText"}},[t("i",{staticClass:"el-input__icon el-icon-edit",attrs:{slot:"prefix"},slot:"prefix"}),t("el-button",{attrs:{slot:"append",size:"small"},on:{click:e.hideReplaceInput},slot:"append"},[e._v(e._s(e.$t("search.cancel")))])],1):e._e(),e.showReplaceInput?t("div",{staticClass:"btnList"},[t("el-button",{attrs:{size:"small",disabled:e.isReadonly},on:{click:e.replace}},[e._v(e._s(e.$t("search.replace")))]),t("el-button",{attrs:{size:"small",disabled:e.isReadonly},on:{click:e.replaceAll}},[e._v(e._s(e.$t("search.replaceAll")))])],1):e._e(),e.showSearchResultList?t("div",{staticClass:"searchResultList",style:{height:e.searchResultListHeight+"px"}},[e._l(e.searchResultList,(function(n,r){return t("div",{key:n.id,staticClass:"searchResultItem",attrs:{title:n.name},domProps:{innerHTML:e._s(n.text)},on:{click:function(t){return t.stopPropagation(),e.onSearchResultItemClick(r)}}})})),e.searchResultList.length<=0?t("div",{staticClass:"empty"},[t("span",{staticClass:"iconfont iconwushuju"}),t("span",{staticClass:"text"},[e._v(e._s(e.$t("search.noResult")))])]):e._e()],2):e._e()],1)}),UO=[],qO={name:"Search",props:{mindMap:{type:Object}},data(){return{show:!1,searchText:"",replaceText:"",showReplaceInput:!1,currentIndex:0,total:0,showSearchInfo:!1,searchResultListHeight:0,searchResultList:[],showSearchResultList:!1}},computed:{...Object(ce["d"])({isReadonly:e=>e.isReadonly,isDark:e=>e.localConfig.isDark})},watch:{searchText(){Object(b["X"])(this.searchText)&&(this.currentIndex=0,this.total=0,this.showSearchInfo=!1)}},created(){this.$bus.$on("show_search",this.showSearch),this.mindMap.on("search_info_change",this.handleSearchInfoChange),this.mindMap.on("node_click",this.blur),this.mindMap.on("draw_click",this.blur),this.mindMap.on("expand_btn_click",this.blur),this.mindMap.on("search_match_node_list_change",this.onSearchMatchNodeListChange),this.mindMap.keyCommand.addShortcut("Control+f",this.showSearch),window.addEventListener("resize",this.setSearchResultListHeight)},mounted(){this.setSearchResultListHeight()},beforeDestroy(){this.$bus.$off("show_search",this.showSearch),this.mindMap.off("search_info_change",this.handleSearchInfoChange),this.mindMap.off("node_click",this.blur),this.mindMap.off("draw_click",this.blur),this.mindMap.off("expand_btn_click",this.blur),this.mindMap.off("search_match_node_list_change",this.onSearchMatchNodeListChange),this.mindMap.keyCommand.removeShortcut("Control+f",this.showSearch),window.removeEventListener("resize",this.setSearchResultListHeight)},methods:{isUndef:b["X"],handleSearchInfoChange(e){this.currentIndex=e.currentIndex+1,this.total=e.total,this.showSearchInfo=!0},showSearch(){this.$bus.$emit("closeSideBar"),this.show=!0},hideReplaceInput(){this.showReplaceInput=!1,this.replaceText=""},onFocus(){this.mindMap.updateConfig({enableAutoEnterTextEditWhenKeydown:!1})},onBlur(){this.mindMap.updateConfig({enableAutoEnterTextEditWhenKeydown:!0})},blur(){this.$refs.searchInputRef&&this.$refs.searchInputRef.blur(),this.$refs.replaceInputRef&&this.$refs.replaceInputRef.blur()},onSearchNext(){this.showSearchResultList=!0,this.mindMap.search.search(this.searchText)},replace(){this.mindMap.search.replace(this.replaceText,!0)},replaceAll(){this.mindMap.search.replaceAll(this.replaceText)},close(){this.show=!1,this.showSearchResultList=!1,this.showSearchInfo=!1,this.total=0,this.currentIndex=0,this.searchText="",this.hideReplaceInput(),this.mindMap.search.endSearch()},onSearchMatchNodeListChange(e){this.searchResultList=e.map(e=>{const t=e.data||e.nodeData.data;let n=t.text;const r=t.uid;t.richText&&(n=Object(b["L"])(n));const i=new RegExp(""+this.searchText.trim(),"g"),o=n.replace(i,e=>`${e} `);return{data:e,id:r,text:o,name:n}})},setSearchResultListHeight(){this.searchResultListHeight=window.innerHeight-267-24},onSearchResultItemClick(e){this.mindMap.search.jump(e)}}},WO=qO,GO=(n("4a98"),Object(m["a"])(WO,HO,UO,!1,null,"6a80a287",null)),VO=GO.exports,_O=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("nodeIconSidebar.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},[t("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:e.$t("nodeIconSidebar.icon"),name:"icon"}}),t("el-tab-pane",{attrs:{label:e.$t("nodeIconSidebar.sticker"),name:"image"}})],1),t("div",{staticClass:"boxContent"},["icon"===e.activeName?t("div",{staticClass:"iconBox"},e._l(e.nodeIconList,(function(n){return t("div",{key:n.name,staticClass:"item"},[t("div",{staticClass:"title"},[e._v(e._s(n.name))]),t("div",{staticClass:"list"},e._l(n.list,(function(r){return t("div",{key:r.name,staticClass:"icon",class:{selected:e.iconList.includes(n.type+"_"+r.name)},domProps:{innerHTML:e._s(e.getHtml(r.icon))},on:{click:function(t){return e.setIcon(n.type,r.name)}}})})),0)])})),0):e._e(),"image"===e.activeName?t("div",{staticClass:"imageBox"},e._l(e.nodeImageList,(function(n){return t("div",{key:n.name,staticClass:"item"},[t("div",{staticClass:"title"},[e._v(e._s(n.name))]),t("div",{staticClass:"list"},e._l(n.list,(function(n){return t("div",{key:n.url,staticClass:"icon",class:{selected:e.nodeImage===n.url},on:{click:function(t){return e.setImage(n)}}},[t("img",{attrs:{src:n.url,alt:""}})])})),0)])})),0):e._e()])],1)])},KO=[],YO=n("7cc6"),XO=n.n(YO),ZO=n("a493"),JO=n.n(ZO),QO=n("e921"),$O=n.n(QO),eD=n("6490"),tD=n.n(eD),nD=n("41c5"),rD=n.n(nD),iD=n("b684"),oD=n.n(iD),aD=n("4f5a"),sD=n.n(aD),lD=n("9c85"),cD=n.n(lD),hD=n("3247"),uD=n.n(hD),dD=n("26eb"),fD=n.n(dD),pD=n("9f18"),mD=n.n(pD),gD=n("eab8"),vD=n.n(gD),bD=n("ad10"),yD=n.n(bD),wD=n("fe40"),xD=n.n(wD),kD=n("f670"),CD=n.n(kD),TD=n("b8fe"),SD=n.n(TD),AD=n("a641"),ED=n.n(AD),MD=n("4910"),ND=n.n(MD),OD=n("b765"),DD=n.n(OD),LD=n("347b"),zD=n.n(LD),ID=n("577e6"),FD=n.n(ID),RD=n("c99b"),PD=n.n(RD),BD=n("3acd"),jD=n.n(BD),HD=n("e40b"),UD=n.n(HD),qD=n("f6d6"),WD=n.n(qD),GD=n("aecb"),VD=n.n(GD),_D=n("299e"),KD=n.n(_D),YD=n("de62"),XD=n.n(YD),ZD=n("9537"),JD=n.n(ZD),QD=n("ea51"),$D=n.n(QD),eL=n("e114"),tL=n.n(eL),nL=n("e274"),rL=n.n(nL),iL=n("9643"),oL=n.n(iL),aL=n("ac4f"),sL=n.n(aL),lL=n("f54b"),cL=n.n(lL),hL=n("e8ae"),uL=n.n(hL),dL=n("fae8"),fL=n.n(dL),pL=n("8763"),mL=n.n(pL),gL=n("5fd6"),vL=n.n(gL),bL=n("33d7"),yL=n.n(bL),wL=n("9cf4"),xL=n.n(wL),kL=n("e34b"),CL=n.n(kL),TL=n("ca39"),SL=n.n(TL),AL=n("1faf"),EL=n.n(AL),ML=n("ae00"),NL=n.n(ML),OL=n("eadc"),DL=n.n(OL),LL=n("82b0"),zL=n.n(LL),IL=n("da5e"),FL=n.n(IL),RL=n("b75f"),PL=n.n(RL),BL=n("290f"),jL=n.n(BL),HL=n("8113"),UL=n.n(HL),qL=n("4244"),WL=n.n(qL),GL=n("3469"),VL=n.n(GL),_L=n("e531"),KL=n.n(_L),YL=n("8b39"),XL=n.n(YL),ZL=n("1bc3"),JL=n.n(ZL),QL=n("12b7"),$L=n.n(QL),ez=n("25ca"),tz=n.n(ez),nz=n("0e5f"),rz=n.n(nz),iz=n("8cd8"),oz=n.n(iz),az=n("655f"),sz=n.n(az),lz=n("e00a"),cz=n.n(lz),hz=n("594c"),uz=n.n(hz),dz=n("8484"),fz=n.n(dz),pz=n("a872"),mz=n.n(pz),gz=n("b019"),vz=n.n(gz),bz=n("8ce6"),yz=n.n(bz),wz=n("7d59"),xz=n.n(wz),kz=n("265a"),Cz=n.n(kz),Tz=n("9461"),Sz=n.n(Tz),Az=n("da72"),Ez=n.n(Az),Mz=n("b93d"),Nz=n.n(Mz),Oz=n("8f8b"),Dz=n.n(Oz),Lz=n("9897"),zz=n.n(Lz),Iz=n("c442"),Fz=n.n(Iz),Rz=n("7f93"),Pz=n.n(Rz),Bz=n("24c7"),jz=n.n(Bz),Hz=n("cacf"),Uz=n.n(Hz),qz=n("6ade"),Wz=n.n(qz),Gz=n("5a18"),Vz=n.n(Gz),_z=n("5b16"),Kz=n.n(_z),Yz=n("e35d"),Xz=n.n(Yz),Zz=n("3d18"),Jz=n.n(Zz),Qz=n("3bd3"),$z=n.n(Qz),eI=n("0a8f"),tI=n.n(eI),nI=n("318a"),rI=n.n(nI),iI=n("17f2"),oI=n.n(iI),aI=n("1c6b"),sI=n.n(aI),lI=n("482d"),cI=n.n(lI),hI=n("f796"),uI=n.n(hI),dI=n("049e"),fI=n.n(dI),pI=n("1e35"),mI=n.n(pI),gI=n("c97e"),vI=n.n(gI),bI=n("d67c"),yI=n.n(bI),wI=n("369f"),xI=n.n(wI),kI=n("5e32"),CI=n.n(kI),TI=n("e362"),SI=n.n(TI),AI=n("6412"),EI=n.n(AI),MI=n("0914"),NI=n.n(MI),OI=n("22a7"),DI=n.n(OI),LI=n("cace"),zI=n.n(LI),II=n("528d"),FI=n.n(II),RI=n("43cf"),PI=n.n(RI),BI=n("d875"),jI=n.n(BI),HI=n("c87a"),UI=n.n(HI),qI=n("ea46"),WI=n.n(qI),GI=n("60fc"),VI=n.n(GI),_I=n("07f3"),KI=n.n(_I),YI=n("5023"),XI=n.n(YI),ZI=n("e437"),JI=n.n(ZI),QI=n("7f10"),$I=n.n(QI),eF=n("a747"),tF=n.n(eF),nF=n("b46e"),rF=n.n(nF),iF=n("bd3c"),oF=n.n(iF),aF=n("7a10"),sF=n.n(aF),lF=n("0fb5"),cF=n.n(lF),hF=n("5af9"),uF=n.n(hF),dF=n("ba0f"),fF=n.n(dF),pF=n("21cd"),mF=n.n(pF),gF=n("35aa"),vF=n.n(gF),bF=n("aee9"),yF=n.n(bF),wF=n("ded7"),xF=n.n(wF),kF=n("aac9"),CF=n.n(kF),TF=n("0455"),SF=n.n(TF),AF=n("027d"),EF=n.n(AF),MF=n("f781"),NF=n.n(MF),OF=n("7c97"),DF=n.n(OF),LF=n("d271"),zF=n.n(LF),IF=n("cbf7"),FF=n.n(IF),RF=n("a028"),PF=n.n(RF),BF=n("ca50"),jF=n.n(BF),HF=n("ea3b"),UF=n.n(HF),qF=n("93af"),WF=n.n(qF),GF=n("2710"),VF=n.n(GF),_F=n("3752"),KF=n.n(_F),YF=n("8722"),XF=n.n(YF),ZF=n("3b50"),JF=n.n(ZF),QF=n("67dd"),$F=n.n(QF),eR=n("229d"),tR=n.n(eR),nR=n("6d42"),rR=n.n(nR),iR=n("77f4"),oR=n.n(iR),aR=n("c53a"),sR=n.n(aR),lR=n("1485"),cR=n.n(lR),hR=n("b466"),uR=n.n(hR),dR=n("6705"),fR=n.n(dR),pR=n("b467"),mR=n.n(pR),gR=n("ee12"),vR=n.n(gR),bR=n("fee0"),yR=n.n(bR),wR=n("a3e0"),xR=n.n(wR),kR=n("bce0"),CR=n.n(kR),TR=n("9c58"),SR=n.n(TR),AR=n("5e35"),ER=n.n(AR),MR=n("6f5c"),NR=n.n(MR),OR=n("a057"),DR=n.n(OR),LR=n("2c41"),zR=n.n(LR),IR=n("4659"),FR=n.n(IR),RR=n("5082"),PR=n.n(RR),BR=n("9b17"),jR=n.n(BR),HR=n("bd4d"),UR=n.n(HR),qR=n("0e25"),WR=n.n(qR),GR=n("7be0"),VR=n.n(GR),_R=n("29dc"),KR=n.n(_R),YR=n("e4a4"),XR=n.n(YR),ZR=n("5edb"),JR=n.n(ZR),QR=n("02a0"),$R=n.n(QR),eP=n("3ec8"),tP=n.n(eP),nP=n("d5e5"),rP=n.n(nP),iP=n("2a43"),oP=n.n(iP),aP=n("ceaa"),sP=n.n(aP),lP=n("325b"),cP=n.n(lP),hP=n("98ee"),uP=n.n(hP),dP=n("0613"),fP=n.n(dP),pP=n("c5b2"),mP=n.n(pP),gP=n("c0b1"),vP=n.n(gP),bP=n("d4e4"),yP=n.n(bP),wP=n("4869"),xP=n.n(wP),kP=n("12a6"),CP=n.n(kP),TP=n("0bf4"),SP=n.n(TP),AP=n("14bd"),EP=n.n(AP),MP=n("a76c"),NP=n.n(MP),OP=n("8121"),DP=n.n(OP),LP=n("2783"),zP=n.n(LP),IP=n("65ee"),FP=n.n(IP),RP=n("db91"),PP=n.n(RP),BP=n("c80c"),jP=n.n(BP),HP=n("9f38"),UP=n.n(HP),qP=n("6c25"),WP=n.n(qP),GP=n("0e50"),VP=n.n(GP),_P=n("cd5f"),KP=n.n(_P),YP=n("56d3"),XP=n.n(YP),ZP=n("2613"),JP=n.n(ZP),QP=n("7e11"),$P=n.n(QP),eB=n("bf26"),tB=n.n(eB),nB=n("89c8"),rB=n.n(nB),iB=n("6d50"),oB=n.n(iB),aB=n("b0d8"),sB=n.n(aB),lB=n("a7fd"),cB=n.n(lB),hB=n("0082"),uB=n.n(hB),dB=n("c8db"),fB=n.n(dB),pB=n("a3cc"),mB=n.n(pB),gB=n("222a"),vB=n.n(gB),bB=n("7718"),yB=n.n(bB),wB=n("c099"),xB=n.n(wB),kB=n("b259"),CB=n.n(kB),TB=n("c605"),SB=n.n(TB),AB=n("6d75"),EB=n.n(AB),MB=n("35ae"),NB=n.n(MB),OB=n("103a"),DB=n.n(OB),LB=n("813c"),zB=n.n(LB),IB=n("b291"),FB=n.n(IB),RB=n("14d4"),PB=n.n(RB),BB=n("be45"),jB=n.n(BB),HB=n("dbfc"),UB=n.n(HB),qB=n("227b"),WB=n.n(qB),GB=n("5227"),VB=n.n(GB),_B=[{name:"商务",list:[{url:XO.a,width:100,height:100},{url:JO.a,width:100,height:100},{url:$O.a,width:100,height:100},{url:tD.a,width:100,height:100},{url:rD.a,width:100,height:100},{url:oD.a,width:100,height:100},{url:sD.a,width:100,height:100},{url:cD.a,width:100,height:100},{url:uD.a,width:100,height:100},{url:fD.a,width:100,height:100},{url:mD.a,width:100,height:100},{url:vD.a,width:100,height:100},{url:yD.a,width:100,height:100},{url:xD.a,width:100,height:100},{url:CD.a,width:100,height:100},{url:SD.a,width:100,height:100},{url:ED.a,width:100,height:100},{url:ND.a,width:100,height:100},{url:DD.a,width:100,height:100},{url:zD.a,width:100,height:100},{url:FD.a,width:100,height:100},{url:PD.a,width:100,height:100},{url:jD.a,width:100,height:100},{url:UD.a,width:100,height:100},{url:WD.a,width:100,height:100},{url:VD.a,width:100,height:100},{url:KD.a,width:100,height:100},{url:XD.a,width:100,height:100},{url:JD.a,width:100,height:100},{url:$D.a,width:100,height:100},{url:tL.a,width:100,height:100},{url:rL.a,width:100,height:100},{url:oL.a,width:100,height:100},{url:sL.a,width:100,height:100},{url:cL.a,width:100,height:100},{url:uL.a,width:100,height:100},{url:fL.a,width:100,height:100},{url:mL.a,width:100,height:100}]},{name:"教育",list:[{url:vL.a,width:100,height:100},{url:yL.a,width:100,height:100},{url:xL.a,width:100,height:100},{url:CL.a,width:100,height:100},{url:SL.a,width:100,height:100},{url:EL.a,width:100,height:100},{url:NL.a,width:100,height:100},{url:DL.a,width:100,height:100},{url:zL.a,width:100,height:100},{url:FL.a,width:100,height:100},{url:PL.a,width:100,height:100},{url:jL.a,width:100,height:100},{url:UL.a,width:100,height:100},{url:WL.a,width:100,height:100},{url:VL.a,width:100,height:100},{url:KL.a,width:100,height:100},{url:XL.a,width:100,height:100},{url:JL.a,width:100,height:100},{url:$L.a,width:100,height:100},{url:tz.a,width:100,height:100},{url:rz.a,width:100,height:100},{url:oz.a,width:100,height:100},{url:sz.a,width:100,height:100},{url:cz.a,width:100,height:100},{url:uz.a,width:100,height:100},{url:fz.a,width:100,height:100},{url:mz.a,width:100,height:100},{url:vz.a,width:100,height:100},{url:yz.a,width:100,height:100},{url:xz.a,width:100,height:100},{url:Cz.a,width:100,height:100},{url:Sz.a,width:100,height:100},{url:Ez.a,width:100,height:100},{url:Nz.a,width:100,height:100},{url:Dz.a,width:100,height:100},{url:zz.a,width:100,height:100},{url:Fz.a,width:100,height:100},{url:Pz.a,width:100,height:100},{url:jz.a,width:100,height:100},{url:Uz.a,width:100,height:100},{url:Wz.a,width:100,height:100},{url:Vz.a,width:100,height:100},{url:Kz.a,width:100,height:100},{url:Xz.a,width:100,height:100},{url:Jz.a,width:100,height:100},{url:$z.a,width:100,height:100},{url:tI.a,width:100,height:100},{url:rI.a,width:100,height:100},{url:oI.a,width:100,height:100},{url:sI.a,width:100,height:100},{url:cI.a,width:100,height:100},{url:uI.a,width:100,height:100},{url:fI.a,width:100,height:100},{url:mI.a,width:100,height:100},{url:vI.a,width:100,height:100},{url:yI.a,width:100,height:100},{url:xI.a,width:100,height:100},{url:CI.a,width:100,height:100},{url:SI.a,width:100,height:100},{url:EI.a,width:100,height:100},{url:NI.a,width:100,height:100},{url:DI.a,width:100,height:100},{url:zI.a,width:100,height:100},{url:FI.a,width:100,height:100},{url:PI.a,width:100,height:100},{url:jI.a,width:100,height:100},{url:UI.a,width:100,height:100}]},{name:"节日",list:[{url:WI.a,width:100,height:100},{url:VI.a,width:100,height:100},{url:KI.a,width:100,height:100},{url:XI.a,width:100,height:100},{url:JI.a,width:100,height:100},{url:$I.a,width:100,height:100},{url:tF.a,width:100,height:100},{url:rF.a,width:100,height:100},{url:oF.a,width:100,height:100},{url:sF.a,width:100,height:100},{url:cF.a,width:100,height:100},{url:uF.a,width:100,height:100},{url:fF.a,width:100,height:100},{url:mF.a,width:100,height:100},{url:vF.a,width:100,height:100},{url:yF.a,width:100,height:100},{url:xF.a,width:100,height:100},{url:CF.a,width:100,height:100},{url:SF.a,width:100,height:100},{url:EF.a,width:100,height:100}]},{name:"食物",list:[{url:NF.a,width:100,height:100},{url:DF.a,width:100,height:100},{url:zF.a,width:100,height:100},{url:FF.a,width:100,height:100},{url:PF.a,width:100,height:100},{url:jF.a,width:100,height:100},{url:UF.a,width:100,height:100},{url:WF.a,width:100,height:100},{url:VF.a,width:100,height:100},{url:KF.a,width:100,height:100},{url:XF.a,width:100,height:100},{url:JF.a,width:100,height:100},{url:$F.a,width:100,height:100},{url:tR.a,width:100,height:100},{url:rR.a,width:100,height:100},{url:oR.a,width:100,height:100},{url:sR.a,width:100,height:100},{url:cR.a,width:100,height:100},{url:uR.a,width:100,height:100},{url:fR.a,width:100,height:100},{url:mR.a,width:100,height:100},{url:vR.a,width:100,height:100},{url:yR.a,width:100,height:100},{url:xR.a,width:100,height:100},{url:CR.a,width:100,height:100},{url:SR.a,width:100,height:100},{url:ER.a,width:100,height:100},{url:NR.a,width:100,height:100},{url:DR.a,width:100,height:100},{url:zR.a,width:100,height:100}]},{name:"医疗",list:[{url:FR.a,width:100,height:100},{url:PR.a,width:100,height:100},{url:jR.a,width:100,height:100},{url:UR.a,width:100,height:100},{url:WR.a,width:100,height:100},{url:VR.a,width:100,height:100},{url:KR.a,width:100,height:100},{url:XR.a,width:100,height:100},{url:JR.a,width:100,height:100},{url:$R.a,width:100,height:100},{url:tP.a,width:100,height:100},{url:rP.a,width:100,height:100},{url:oP.a,width:100,height:100},{url:sP.a,width:100,height:100},{url:cP.a,width:100,height:100},{url:uP.a,width:100,height:100},{url:fP.a,width:100,height:100},{url:mP.a,width:100,height:100},{url:vP.a,width:100,height:100},{url:yP.a,width:100,height:100}]},{name:"工具",list:[{url:xP.a,width:100,height:100},{url:CP.a,width:100,height:100},{url:SP.a,width:100,height:100},{url:EP.a,width:100,height:100},{url:NP.a,width:100,height:100},{url:DP.a,width:100,height:100},{url:zP.a,width:100,height:100},{url:FP.a,width:100,height:100},{url:PP.a,width:100,height:100},{url:jP.a,width:100,height:100},{url:UP.a,width:100,height:100},{url:WP.a,width:100,height:100},{url:VP.a,width:100,height:100},{url:KP.a,width:100,height:100},{url:XP.a,width:100,height:100},{url:JP.a,width:100,height:100},{url:$P.a,width:100,height:100},{url:tB.a,width:100,height:100},{url:rB.a,width:100,height:100},{url:oB.a,width:100,height:100}]},{name:"旅行",list:[{url:sB.a,width:100,height:100},{url:cB.a,width:100,height:100},{url:uB.a,width:100,height:100},{url:fB.a,width:100,height:100},{url:mB.a,width:100,height:100},{url:vB.a,width:100,height:100},{url:yB.a,width:100,height:100},{url:xB.a,width:100,height:100},{url:CB.a,width:100,height:100},{url:SB.a,width:100,height:100},{url:EB.a,width:100,height:100},{url:NB.a,width:100,height:100},{url:DB.a,width:100,height:100},{url:zB.a,width:100,height:100},{url:FB.a,width:100,height:100},{url:PB.a,width:100,height:100},{url:jB.a,width:100,height:100},{url:UB.a,width:100,height:100},{url:WB.a,width:100,height:100},{url:VB.a,width:100,height:100}]}],KB={name:"NodeIconSidebar",components:{Sidebar:ZE},data(){return{activeName:"icon",nodeIconList:Object(b["cb"])([...I,...W]),nodeImageList:[..._B],iconList:[],nodeImage:"",activeNodes:[]}},computed:{...Object(ce["d"])({activeSidebar:e=>e.activeSidebar,isDark:e=>e.localConfig.isDark})},watch:{activeSidebar(e){this.$refs.sidebar.show="nodeIconSidebar"===e}},created(){this.$bus.$on("node_active",this.handleNodeActive),this.$bus.$on("showNodeIcon",this.handleShowNodeIcon)},beforeDestroy(){this.$bus.$off("node_active",this.handleNodeActive),this.$bus.$off("showNodeIcon",this.handleShowNodeIcon)},methods:{handleNodeActive(...e){if(this.activeNodes=[...e[1]],this.activeNodes.length>0)if(1===this.activeNodes.length){let e=this.activeNodes[0];this.nodeImage=e.getData("image")||"",this.iconList=e.getData("icon")||[]}else this.nodeImage=[],this.iconList=[];else this.iconList=[],this.nodeImage=""},handleShowNodeIcon(){this.dialogVisible=!0},getHtml(e){return/^ `},setIcon(e,t){this.activeNodes.forEach(n=>{const r=[...n.getData("icon")||[]];let i=e+"_"+t,o=r.findIndex(e=>e===i);if(-1!==o)r.splice(o,1);else{let t=r.findIndex(t=>t.split("_")[0]===e);-1!==t?r.splice(t,1,i):r.push(i)}n.setIcon(r),1===this.activeNodes.length&&(this.iconList=r)})},setImage(e){this.activeNodes.forEach(t=>{this.nodeImage=e.url,t.setImage({...e})})}}},YB=KB,XB=(n("ba4c"),Object(m["a"])(YB,_O,KO,!1,null,"9d4ebae2",null)),ZB=XB.exports,JB=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.showNodeIconToolbar,expression:"showNodeIconToolbar"}],ref:"nodeIconToolbar",staticClass:"nodeIconToolbar",style:e.style,on:{"&click":function(e){e.stopPropagation()}}},[t("div",{staticClass:"iconListBox"},e._l(e.iconList,(function(n){return t("div",{key:n.name,staticClass:"icon",class:{selected:e.nodeIconList.includes(e.iconType+"_"+n.name)},domProps:{innerHTML:e._s(e.getHtml(n.icon))},on:{click:function(t){return e.setIcon(n.name)}}})})),0),t("div",{staticClass:"btnBox"},[t("span",{staticClass:"btn iconfont iconshanchu",on:{click:e.deleteIcon}})])])},QB=[];const $B=[...I,...W];var ej={name:"NodeIconToolbar",components:{},props:{mindMap:{type:Object}},data(){return{showNodeIconToolbar:!1,style:{left:0,top:0},node:null,iconType:"",iconName:"",nodeIconList:[],iconList:[]}},computed:{...Object(ce["d"])(["activeSidebar"])},created(){this.mindMap.on("node_icon_click",this.show),this.mindMap.on("draw_click",this.close),this.mindMap.on("svg_mousedown",this.close),this.mindMap.on("node_dblclick",this.close),this.mindMap.on("node_active",this.onNodeActive),this.mindMap.on("scale",this.onScale),this.$bus.$on("close_node_icon_toolbar",this.close)},mounted(){document.body.append(this.$refs.nodeIconToolbar)},beforeDestroy(){this.mindMap.off("node_icon_click",this.show),this.mindMap.off("draw_click",this.close),this.mindMap.off("svg_mousedown",this.close),this.mindMap.off("node_dblclick",this.close),this.mindMap.off("node_active",this.onNodeActive),this.mindMap.off("scale",this.onScale),this.$bus.$off("close_node_icon_toolbar",this.close)},methods:{...Object(ce["c"])(["setActiveSidebar"]),show(e,t){this.node=e,this.iconType=t.split("_")[0],this.iconName=t.split("_")[1],this.nodeIconList=e.getData("icon")||[],this.iconList=[...$B.find(e=>e.type===this.iconType).list],this.updatePos(),this.showNodeIconToolbar=!0,"nodeIconSidebar"===this.activeSidebar&&this.setActiveSidebar("")},close(){this.showNodeIconToolbar=!1,this.node=null,this.iconType="",this.iconName="",this.nodeIconList=[],this.iconList=[],this.style.left=0,this.style.top=0},updatePos(){if(!this.node)return;const e=this.node.getRect();this.style.left=e.x+"px",this.style.top=e.y+e.height+"px"},onScale(){this.updatePos()},onNodeActive(e){e!==this.node&&this.close()},deleteIcon(){this.setIcon(this.iconName),this.close()},getHtml(e){return/^ `},setIcon(e){let t=this.iconType+"_"+e,n=this.nodeIconList.findIndex(e=>e===t);if(-1!==n)this.nodeIconList.splice(n,1);else{let n=this.nodeIconList.findIndex(e=>e.split("_")[0]===this.iconType);-1!==n?(this.nodeIconList.splice(n,1,t),this.iconName=e):this.nodeIconList.push(t)}this.node.setIcon([...this.nodeIconList])}}},tj=ej,nj=(n("75a5"),Object(m["a"])(tj,JB,QB,!1,null,"1321abee",null)),rj=nj.exports,ij=function(){var e=this,t=e._self._c;return e.isOutlineEdit?t("div",{ref:"outlineEditContainer",staticClass:"outlineEditContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"closeBtn",on:{click:e.onClose}},[t("span",{staticClass:"icon iconfont iconguanbi"})]),t("div",{ref:"outlineEditBox",staticClass:"outlineEditBox"},[t("div",{staticClass:"outlineEdit"},[t("el-tree",{ref:"tree",staticClass:"outlineTree",class:{isDark:e.isDark},attrs:{"node-key":"uid",draggable:"","default-expand-all":"",data:e.data,props:e.defaultProps,"highlight-current":!0,"expand-on-click-node":!1,"allow-drag":e.checkAllowDrag},on:{"node-drop":e.onNodeDrop,"current-change":e.onCurrentChange},scopedSlots:e._u([{key:"default",fn:function({node:n,data:r}){return t("span",{staticClass:"customNode",attrs:{"data-id":r.uid}},[t("span",{key:e.getKey(),staticClass:"nodeEdit",attrs:{contenteditable:!e.isReadonly},domProps:{innerHTML:e._s(n.label)},on:{blur:function(t){return e.onBlur(t,n)},keydown:function(t){return t.stopPropagation(),e.onNodeInputKeydown(t,n)},keyup:function(e){e.stopPropagation()},paste:function(t){return e.onPaste(t,n)}}})])}}],null,!1,485109613)})],1)])]):e._e()},oj=[],aj={name:"OutlineEdit",props:{mindMap:{type:Object}},data(){return{data:[],defaultProps:{label:"label"},currentData:null}},computed:{...Object(ce["d"])({isReadonly:e=>e.isReadonly,isDark:e=>e.localConfig.isDark,isOutlineEdit:e=>e.isOutlineEdit})},watch:{isOutlineEdit(e){e&&(this.refresh(),this.$nextTick(()=>{document.body.appendChild(this.$refs.outlineEditContainer)}))}},created(){window.addEventListener("keydown",this.onKeyDown)},beforeDestroy(){window.removeEventListener("keydown",this.onKeyDown)},methods:{...Object(ce["c"])(["setIsOutlineEdit"]),refresh(){let e=this.mindMap.getData();e.root=!0;let t=e=>{let n=e.data.richText?Object(b["eb"])(e.data.text):e.data.text;n=Object(b["S"])(n),n=n.replaceAll(/\n/g," "),e.textCache=n,e.label=n,e.uid=e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};t(e),this.data=[e]},checkAllowDrag(e){return!e.data.root},onNodeDrop(){this.save()},onCurrentChange(e){this.currentData=e},onBlur(e,t){if(t.data.textCache===e.target.innerHTML)return;const n=t.data.data.richText,r=n?e.target.innerHTML:e.target.innerText;t.data.data.text=n?Object(b["tb"])(r):r,n&&(t.data.data.resetRichText=!0),t.data.textCache=e.target.innerHTML,this.save()},onNodeInputKeydown(e,t){const n=!!t.data.data.richText,r=Object(b["q"])(),i=this.$t("outline.nodeDefaultText"),o={textCache:i,uid:r,label:i,data:{text:n?Object(b["tb"])(i):i,uid:r,richText:n},children:[]};if(n&&(o.data.resetRichText=!0),13===e.keyCode&&!e.shiftKey){if(e.preventDefault(),t.data.root)return;this.$refs.tree.insertAfter(o,t)}9===e.keyCode&&(e.preventDefault(),e.shiftKey?(this.$refs.tree.insertAfter(t.data,t.parent),this.$refs.tree.remove(t)):this.$refs.tree.append(o,t)),this.save(),this.$nextTick(()=>{this.$refs.tree.setCurrentKey(r);const e=document.querySelector(`.customNode[data-id="${r}"] .nodeEdit`);if(e){let t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n);let r=e.offsetTop;this.scrollTo(r)}})},onKeyDown(e){this.isOutlineEdit&&[46,8].includes(e.keyCode)&&this.currentData&&(e.stopPropagation(),this.$refs.tree.remove(this.currentData),this.currentData=null,this.save())},onPaste(e){Object(b["Q"])(e)},getKey(){return Math.random()},onClose(){this.setIsOutlineEdit(!1),this.$bus.$emit("setData",this.getData())},scrollTo(e){let t=this.$refs.outlineEditBox,n=t.offsetHeight,r=t.scrollTop;e+=50,e>r+n&&t.scrollTo(0,e-n/2)},getData(){let e={},t=this.data[0],n=(e,t)=>{t.data=e.data,t.children=[],(e.children||[]).forEach(e=>{const r={};t.children.push(r),n(e,r)})};return n(t,e),Object(b["rb"])(e)},save(){Object(Lo["e"])(this.getData())}}},sj=aj,lj=(n("8abd"),Object(m["a"])(sj,ij,oj,!1,null,"157fc5ba",null)),cj=lj.exports;let hj=null;const uj=()=>{hj=Oo["Loading"].service({lock:!0})},dj=()=>{hj&&(hj.close(),hj=null)},fj=async e=>{try{try{Array.isArray(e)||(e=String(e).replace("\ufeff",""),e=JSON.parse(e))}catch(t){console.log(t)}Array.isArray(e)||(e=[]);const n=[],r=[],i=(e,n)=>{e.forEach(async e=>{let o={};if(n.push(o),o.data={text:e.data.text,hyperlink:e.data.hyperlink,hyperlinkTitle:e.data.hyperlinkTitle,note:e.data.note},e.data.image){let n=null,i=new Promise(e=>{n=e});r.push(i);try{o.data.image=await Object(b["T"])(e.data.image),o.data.imageSize=e.data.imageSize,n()}catch(t){n()}}if(o.children=[],e.children&&e.children.length>0){const t=[];e.children.forEach(e=>{"generalize"===e.data.type?o.data.generalization=[{text:e.data.text}]:t.push(e)}),i(t,o.children)}})};return i(e,n),await Promise.all(r),{simpleMindMap:!0,data:n}}catch(t){return""}},pj=async e=>{try{let t=JSON.parse(e);if(void 0!==t.__c_zx_v){const e=await fj(t.children);return e}}catch(t){}if(e.includes("\ufeff")){const t=await fj(e);return t}return""};var mj=pj,gj=function(){var e=this,t=e._self._c;return t("div",{staticClass:"scrollbarContainer",class:{isDark:e.isDark}},[t("div",{ref:"verticalScrollbarRef",staticClass:"scrollbar verticalScrollbar",on:{click:e.onVerticalScrollbarClick}},[t("div",{staticClass:"scrollbarInner",style:e.verticalScrollbarStyle,on:{click:function(e){e.stopPropagation()},mousedown:e.onVerticalScrollbarMousedown}})]),t("div",{ref:"horizontalScrollbarRef",staticClass:"scrollbar horizontalScrollbar",on:{click:e.onHorizontalScrollbarClick}},[t("div",{staticClass:"scrollbarInner",style:e.horizontalScrollbarStyle,on:{click:function(e){e.stopPropagation()},mousedown:e.onHorizontalScrollbarMousedown}})])])},vj=[],bj={props:{mindMap:{type:Object}},data(){return{timer:null,resizeTimer:null,verticalScrollbarStyle:{},horizontalScrollbarStyle:{}}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark})},mounted(){this.setScrollBarWrapSize(),this.$bus.$on("scrollbar_change",this.updateScrollbar),window.addEventListener("resize",this.onResize)},beforeDestroy(){this.$bus.$off("scrollbar_change",this.updateScrollbar),window.removeEventListener("resize",this.onResize)},methods:{setScrollBarWrapSize(){if(!this.mindMap.scrollbar)return;const{width:e}=this.$refs.horizontalScrollbarRef.getBoundingClientRect(),{height:t}=this.$refs.verticalScrollbarRef.getBoundingClientRect();this.mindMap.scrollbar.setScrollBarWrapSize(e,t)},onResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.setScrollBarWrapSize()},300)},updateScrollbar({vertical:e,horizontal:t}){this.verticalScrollbarStyle={top:e.top+"%",height:e.height+"%"},this.horizontalScrollbarStyle={left:t.left+"%",width:t.width+"%"}},onVerticalScrollbarMousedown(e){this.mindMap.scrollbar.onMousedown(e,"vertical")},onVerticalScrollbarClick(e){this.mindMap.scrollbar.onClick(e,"vertical")},onHorizontalScrollbarMousedown(e){this.mindMap.scrollbar.onMousedown(e,"horizontal")},onHorizontalScrollbarClick(e){this.mindMap.scrollbar.onClick(e,"horizontal")}}},yj=bj,wj=(n("ac10"),Object(m["a"])(yj,gj,vj,!1,null,"301c5ef9",null)),xj=wj.exports,kj=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("formulaSidebar.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},[t("div",{staticClass:"formulaInputBox"},[t("el-input",{attrs:{rows:4,resize:"none",type:"textarea",placeholder:e.$t("formulaSidebar.placeholder")},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.formulaText,callback:function(t){e.formulaText=t},expression:"formulaText"}}),t("el-button",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{size:"small"},on:{click:e.confirm}},[e._v(e._s(e.$t("formulaSidebar.confirm")))])],1),t("div",{staticClass:"title"},[e._v(e._s(e.$t("formulaSidebar.common")))]),t("div",{staticClass:"formulaList"},e._l(e.list,(function(n,r){return t("div",{key:r,staticClass:"formulaItem"},[t("div",{staticClass:"overview",domProps:{innerHTML:e._s(n.overview)}}),t("div",{staticClass:"text",on:{click:function(t){e.formulaText=n.text}}},[e._v(" "+e._s(n.text)+" ")])])})),0)])])},Cj=[],Tj={name:"FormulaSidebar",components:{Sidebar:ZE},props:{mindMap:{type:Object}},data(){return{formulaText:"",list:[]}},computed:{...Object(ce["d"])({activeSidebar:e=>e.activeSidebar,isDark:e=>e.localConfig.isDark,localConfig:e=>e.localConfig})},watch:{activeSidebar(e){this.$refs.sidebar.show="formulaSidebar"===e}},created(){this.$bus.$on("node_active",this.handleNodeActive)},beforeDestroy(){this.$bus.$off("node_active",this.handleNodeActive)},mounted(){this.init()},methods:{...Object(ce["c"])(["setActiveSidebar"]),init(){window.katex&&(this.list=vM.map(e=>({overview:window.katex.renderToString(e,this.mindMap.formula.getKatexConfig()),text:e})))},handleNodeActive(...e){this.activeNodes=[...e[1]],this.activeNodes.length<=0&&"formulaSidebar"===this.activeSidebar&&this.setActiveSidebar(null)},confirm(){if(!this.localConfig.openNodeRichText)return this.$message.warning(this.$t("formulaSidebar.tip"));let e=this.formulaText.trim();e&&this.mindMap.execCommand("INSERT_FORMULA",e)}}},Sj=Tj,Aj=(n("4f09"),Object(m["a"])(Sj,kj,Cj,!1,null,"0ccdef9a",null)),Ej=Aj.exports,Mj=function(){var e=this,t=e._self._c;return e.isSourceCodeEdit?t("div",{ref:"sourceCodeEditContainer",staticClass:"sourceCodeEditContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"closeBtn"},[t("el-tooltip",{attrs:{effect:"dark",content:e.$t("sourceCodeEdit.copy"),placement:"top"}},[t("span",{staticClass:"icon iconfont iconfuzhi",staticStyle:{"font-size":"26px"},on:{click:e.copy}})]),t("el-tooltip",{attrs:{effect:"dark",content:e.$t("sourceCodeEdit.format"),placement:"top"}},[t("span",{staticClass:"icon iconfont icongeshihua",staticStyle:{"font-size":"24px"},on:{click:e.format}})]),t("el-tooltip",{attrs:{effect:"dark",content:e.$t("sourceCodeEdit.sourceCodeTip"),placement:"top"}},[t("span",{staticClass:"icon el-icon-info"})]),t("el-tooltip",{attrs:{effect:"dark",content:e.$t("sourceCodeEdit.confirm"),placement:"top"}},[t("span",{staticClass:"icon el-icon-circle-check",on:{click:e.onConfirm}})]),t("el-tooltip",{attrs:{effect:"dark",content:e.$t("sourceCodeEdit.close"),placement:"top"}},[t("span",{staticClass:"icon iconfont iconguanbi",on:{click:e.onClose}})])],1),t("div",{staticClass:"sourceCodeEditBox"},[t("div",{ref:"outlineEditRef",staticClass:"outlineEdit",on:{keydown:function(e){e.stopPropagation()}}})])]):e._e()},Nj=[],Oj=n("56b3"),Dj=n.n(Oj);n("f9d4"),n("a7be");let Lj=null;var zj={name:"SourceCodeEdit",props:{mindMap:{type:Object}},data(){return{}},computed:{...Object(ce["d"])({isReadonly:e=>e.isReadonly,isDark:e=>e.localConfig.isDark,isSourceCodeEdit:e=>e.isSourceCodeEdit})},watch:{isSourceCodeEdit(e){e&&this.$nextTick(()=>{document.body.appendChild(this.$refs.sourceCodeEditContainer),this.initEditor(),this.initData()})}},methods:{...Object(ce["c"])(["setIsSourceCodeEdit"]),initEditor(){Lj=Dj()(this.$refs.outlineEditRef,{mode:{name:"javascript",json:!0},lineWrapping:!0,lineNumbers:!0})},initData(){Lj.setValue(JSON.stringify(this.mindMap.getData(),null,2))},onConfirm(){try{const e=Lj.getValue(),t=JSON.parse(e);this.setIsSourceCodeEdit(!1),this.$bus.$emit("setData",t)}catch(e){console.log(e),this.$message.error(this.$t("sourceCodeEdit.formatErrorTip"))}},onClose(){this.setIsSourceCodeEdit(!1)},copy(){const e=Lj.getValue();wN(e),this.$message.success(this.$t("sourceCodeEdit.copyTip"))},format(){try{const e=Lj.getValue(),t=JSON.parse(e);Lj.setValue(JSON.stringify(t,null,2)),this.$message.success(this.$t("sourceCodeEdit.formatTip"))}catch(e){console.log(e),this.$message.error(this.$t("sourceCodeEdit.formatErrorTip"))}}}},Ij=zj,Fj=(n("518d"),Object(m["a"])(Ij,Mj,Nj,!1,null,"261f5f85",null)),Rj=Fj.exports,Pj=function(){var e=this,t=e._self._c;return t("div",{staticClass:"nodeAttachmentContextMenu",style:{left:this.left+"px",top:this.top+"px",visibility:e.show?"visible":"hidden"},on:{click:function(t){return t.stopPropagation(),e.deleteAttachment.apply(null,arguments)}}},[t("div",{staticClass:"menuItem"},[e._v(e._s(e.$t("attachment.deleteAttachment")))])])},Bj=[],jj={props:{mindMap:{type:Object,default(){return null}}},data(){return{show:!1,left:0,top:0,node:null,icon:null}},created(){this.$bus.$on("node_attachmentClick",this.onNodeAttachmentClick),this.$bus.$on("selectAttachment",this.onSelectAttachment),this.$bus.$on("node_attachmentContextmenu",this.onNodeAttachmentContextmenu),this.$bus.$on("hide",this.hide),document.body.addEventListener("click",this.hide),this.$bus.$on("node_active",this.hide),this.$bus.$on("scale",this.onScale),this.$bus.$on("translate",this.onScale),this.$bus.$on("svg_mousedown",this.hide)},beforeDestroy(){this.$bus.$off("node_attachmentClick",this.onNodeAttachmentClick),this.$bus.$off("selectAttachment",this.onSelectAttachment),this.$bus.$off("node_attachmentContextmenu",this.onNodeAttachmentContextmenu),this.$bus.$off("hide",this.hide),document.body.removeEventListener("click",this.hide),this.$bus.$off("node_active",this.hide),this.$bus.$off("scale",this.onScale),this.$bus.$off("translate",this.onScale),this.$bus.$off("svg_mousedown",this.hide)},methods:{onSelectAttachment(e){},onNodeAttachmentClick(e,t,n){this.$message.info(this.$t("attachment.tip"))},onNodeAttachmentContextmenu(e,t,n){t.stopPropagation(),t.preventDefault(),this.node=e,this.icon=n,this.updatePosition(),this.show=!0},updatePosition(){const e=this.mindMap.themeConfig.iconSize,{x:t,y:n}=this.icon.rbox();this.left=t+e,this.top=n},onScale(){this.node&&this.show&&this.updatePosition()},deleteAttachment(){this.node&&this.show&&(this.node.setAttachment("",""),this.hide())},hide(){this.show=!1}}},Hj=jj,Uj=(n("e387"),Object(m["a"])(Hj,Pj,Bj,!1,null,"49bf43bc",null)),qj=Uj.exports,Wj=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],ref:"elRef",staticClass:"nodeOuterFrameContainer",class:{isDark:e.isDark},style:e.position},[t("div",{staticClass:"btn",on:{click:function(t){e.showPanel=!e.showPanel}}},[t("span",{staticClass:"iconfont iconjingzi"})]),e.showPanel?t("div",{staticClass:"panel"},[t("div",{staticClass:"panelHeader"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("nodeOuterFrame.outerFrameSetting")))]),t("span",{staticClass:"deleteBtn",on:{click:e.deleteOuterFrame}},[e._v(" "+e._s(e.$t("nodeOuterFrame.deleteOuterFrame"))+" "),t("span",{staticClass:"iconfont iconshanchu"})])]),t("div",{staticClass:"panelBody"},[t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("nodeOuterFrame.boxStyle")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOuterFrame("strokeWidth",t)}},model:{value:e.styleConfig.strokeWidth,callback:function(t){e.$set(e.styleConfig,"strokeWidth",t)},expression:"styleConfig.strokeWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1),t("el-select",{staticStyle:{width:"80px","margin-left":"4px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOuterFrame("strokeDasharray",t)}},model:{value:e.styleConfig.strokeDasharray,callback:function(t){e.$set(e.styleConfig,"strokeDasharray",t)},expression:"styleConfig.strokeDasharray"}},e._l(e.borderDasharrayList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{attrs:{width:"120",height:"34"}},[t("line",{attrs:{x1:"10",y1:"17",x2:"110",y2:"17","stroke-width":"2",stroke:e.styleConfig.strokeDasharray===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-dasharray":n.value}})])])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("nodeOuterFrame.boxColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover",arg:"popover"}],staticClass:"block",style:{backgroundColor:e.styleConfig.strokeColor}}),t("el-popover",{ref:"popover",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.styleConfig.strokeColor},on:{change:t=>{e.updateOuterFrame("strokeColor",t)}}})],1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("nodeOuterFrame.fillColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover2",arg:"popover2"}],staticClass:"block",style:{backgroundColor:e.styleConfig.fill}}),t("el-popover",{ref:"popover2",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.styleConfig.fill},on:{change:t=>{e.updateOuterFrame("fill",t)}}})],1)],1)])])]):e._e()])},Gj=[],Vj={components:{Color:qo},props:{mindMap:{type:Object}},data(){return{lineWidthList:ve,show:!1,showPanel:!1,position:{left:0,top:0},styleConfig:{radius:5,strokeWidth:2,strokeColor:"#0984e3",strokeDasharray:"5,5",fill:"rgba(9,132,227,0.05)"}}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark,borderDasharrayList(){return xt[this.$i18n.locale]||xt.zh}})},created(){this.mindMap.on("outer_frame_active",this.onOuterFrameActive),this.mindMap.on("scale",this.hide),this.mindMap.on("translate",this.hide),this.mindMap.on("svg_mousedown",this.hide),this.mindMap.on("expand_btn_click",this.hide),this.mindMap.on("outer_frame_delete",this.hide)},beforeDestroy(){this.mindMap.off("outer_frame_active",this.onOuterFrameActive),this.mindMap.off("scale",this.hide),this.mindMap.off("translate",this.hide),this.mindMap.off("svg_mousedown",this.hide),this.mindMap.off("expand_btn_click",this.hide),this.mindMap.off("outer_frame_delete",this.hide)},mounted(){document.body.appendChild(this.$refs.elRef)},methods:{onOuterFrameActive(e,t,n){const r=t.children[n[0]],i=r.getData("outerFrame");Object.keys(i).forEach(e=>{this.styleConfig[e]=i[e]});const{x:o,y:a,width:s}=e.rbox();this.position.left=o+s+"px",this.position.top=a+"px",this.show=!0},updateOuterFrame(e,t){this.styleConfig[e]=t,this.mindMap.outerFrame.updateActiveOuterFrame({[e]:t}),this.hide()},deleteOuterFrame(){this.mindMap.outerFrame.removeActiveOuterFrame()},hide(){this.show=!1,this.showPanel=!1}}},_j=Vj,Kj=(n("8e5d"),n("d473"),Object(m["a"])(_j,Wj,Gj,!1,null,"3d37fbd4",null)),Yj=Kj.exports,Xj=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],ref:"elRef",staticClass:"nodeTagStyleContainer",class:{isDark:e.isDark},style:e.position},[t("div",{staticClass:"row"},[t("el-input",{attrs:{placeholder:e.$t("nodeTagStyle.placeholder"),size:"mini"},on:{blur:e.updateTagText},nativeOn:{keydown:function(e){e.stopPropagation()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.stopPropagation(),e.updateTagText.apply(null,arguments))}},model:{value:e.text,callback:function(t){e.text=t},expression:"text"}}),t("div",{staticClass:"deleteBtn",on:{click:function(t){return t.stopPropagation(),e.deleteTag.apply(null,arguments)}}},[t("span",{staticClass:"iconfont iconshanchu"}),t("span",{staticClass:"text"},[e._v(e._s(e.$t("nodeTagStyle.delete")))])])],1),t("div",{staticClass:"row"},[t("Color",{attrs:{color:e.fill},on:{change:e.updateTagFill}})],1)])},Zj=[],Jj={components:{Color:qo},props:{mindMap:{type:Object}},data(){return{show:!1,position:{left:0,top:0},node:null,index:0,text:"",fill:""}},computed:{...Object(ce["d"])({isDark:e=>e.localConfig.isDark})},created(){this.mindMap.on("node_tag_click",this.onNodeTagClick),this.mindMap.on("scale",this.hide),this.mindMap.on("translate",this.hide),this.mindMap.on("svg_mousedown",this.hide),this.mindMap.on("expand_btn_click",this.hide)},beforeDestroy(){this.mindMap.off("node_tag_click",this.onNodeTagClick),this.mindMap.off("scale",this.hide),this.mindMap.off("translate",this.hide),this.mindMap.off("svg_mousedown",this.hide),this.mindMap.off("expand_btn_click",this.hide)},mounted(){document.body.appendChild(this.$refs.elRef)},methods:{onNodeTagClick(e,t,n,r){this.node=e,this.index=n,"string"===typeof t?this.text=t:(this.text=t.text,this.fill=t.style&&t.style.fill?t.style.fill:"");const{x:i,y:o,width:a,height:s}=r.rbox(),l=260,c=152;let h=i+a/2-l/2;h<0&&(h=0),h+l>window.innerWidth&&(h=window.innerWidth-l),this.position.left=h+"px";let u=o+s+5;u+c>window.innerHeight&&(u=window.innerHeight-c),this.position.top=u+"px",this.show=!0},updateTagText(){const e=this.text.trim();e&&this.updateTagInfo({text:e})},updateTagFill(e){this.updateTagInfo({style:{fill:e}}),this.fill=e},updateTagInfo({text:e,style:t}){if(!this.node)return;const n=[...this.node.getData("tag")];let r=null;"string"===typeof n[this.index]?r={text:n[this.index],style:{}}:(r=n[this.index],r.style||(r.style={})),e&&(r.text=e),t&&Object.keys(t).forEach(e=>{r.style[e]=t[e]}),n[this.index]=r,this.mindMap.execCommand("SET_NODE_TAG",this.node,n)},deleteTag(){if(!this.node)return;const e=[...this.node.getData("tag")];e.splice(this.index,1),this.mindMap.execCommand("SET_NODE_TAG",this.node,e),this.hide()},hide(){this.show=!1,this.node=null,this.index=0,this.text="",this.fill=""}}},Qj=Jj,$j=(n("52f2"),Object(m["a"])(Qj,Xj,Zj,!1,null,"512d6c78",null)),eH=$j.exports;Yl.usePlugin(Zl).usePlugin(Ql).usePlugin(Tc).usePlugin(ec).usePlugin(rc).usePlugin(oc).usePlugin(wc).usePlugin(Ac).usePlugin(GT).usePlugin(YT).usePlugin(_T).usePlugin(ZT).usePlugin(QT).usePlugin(lS).usePlugin(uS).usePlugin(pS).usePlugin(yS),WM.forEach(e=>{Yl.defineTheme(e.value,e.theme)});var tH={name:"Edit",components:{OutlineSidebar:aM,Style:dM,BaseStyle:AM,Theme:KM,Structure:$M,Count:aN,NavigatorToolbar:GN,ShortcutKey:ZN,Contextmenu:nO,RichTextToolbar:lO,NodeNoteContentShow:gO,Navigator:kO,NodeImgPreview:MO,SidebarTrigger:IO,Search:VO,NodeIconSidebar:ZB,NodeIconToolbar:rj,OutlineEdit:cj,Scrollbar:xj,FormulaSidebar:Ej,SourceCodeEdit:Rj,NodeAttachment:qj,NodeOuterFrame:Yj,NodeTagStyle:eH},data(){return{enableShowLoading:!0,mindMap:null,mindMapData:null,prevImg:"",storeConfigTimer:null,showDragMask:!1}},computed:{...Object(ce["d"])({isZenMode:e=>e.localConfig.isZenMode,openNodeRichText:e=>e.localConfig.openNodeRichText,isShowScrollbar:e=>e.localConfig.isShowScrollbar,useLeftKeySelectionRightKeyDrag:e=>e.localConfig.useLeftKeySelectionRightKeyDrag,isUseHandDrawnLikeStyle:e=>e.localConfig.isUseHandDrawnLikeStyle,extraTextOnExport:e=>e.extraTextOnExport,isDragOutlineTreeNode:e=>e.isDragOutlineTreeNode})},watch:{openNodeRichText(){this.openNodeRichText?this.addRichTextPlugin():this.removeRichTextPlugin()},isShowScrollbar(){this.isShowScrollbar?this.addScrollbarPlugin():this.removeScrollbarPlugin()},isUseHandDrawnLikeStyle(){this.isUseHandDrawnLikeStyle?this.addHandDrawnLikeStylePlugin():this.removeHandDrawnLikeStylePlugin()}},mounted(){uj(),this.getData(),this.init(),this.$bus.$on("execCommand",this.execCommand),this.$bus.$on("paddingChange",this.onPaddingChange),this.$bus.$on("export",this.export),this.$bus.$on("setData",this.setData),this.$bus.$on("startTextEdit",this.handleStartTextEdit),this.$bus.$on("endTextEdit",this.handleEndTextEdit),this.$bus.$on("createAssociativeLine",this.handleCreateLineFromActiveNode),this.$bus.$on("startPainter",this.handleStartPainter),this.$bus.$on("node_tree_render_end",this.handleHideLoading),this.$bus.$on("showLoading",this.handleShowLoading),window.addEventListener("resize",this.handleResize)},beforeDestroy(){this.$bus.$off("execCommand",this.execCommand),this.$bus.$off("paddingChange",this.onPaddingChange),this.$bus.$off("export",this.export),this.$bus.$off("setData",this.setData),this.$bus.$off("startTextEdit",this.handleStartTextEdit),this.$bus.$off("endTextEdit",this.handleEndTextEdit),this.$bus.$off("createAssociativeLine",this.handleCreateLineFromActiveNode),this.$bus.$off("startPainter",this.handleStartPainter),this.$bus.$off("node_tree_render_end",this.handleHideLoading),this.$bus.$off("showLoading",this.handleShowLoading),window.removeEventListener("resize",this.handleResize),this.mindMap.destroy()},methods:{handleStartTextEdit(){this.mindMap.renderer.startTextEdit()},handleEndTextEdit(){this.mindMap.renderer.endTextEdit()},handleCreateLineFromActiveNode(){this.mindMap.associativeLine.createLineFromActiveNode()},handleStartPainter(){this.mindMap.painter.startPainter()},handleResize(){this.mindMap.resize()},handleShowLoading(){this.enableShowLoading=!0,uj()},handleHideLoading(){this.enableShowLoading&&(this.enableShowLoading=!1,dj())},getData(){let e=Object(Lo["a"])();this.mindMapData=e},bindSaveEvent(){this.$bus.$on("data_change",e=>{Object(Lo["e"])(e)}),this.$bus.$on("view_data_change",e=>{clearTimeout(this.storeConfigTimer),this.storeConfigTimer=setTimeout(()=>{Object(Lo["d"])({view:e})},300)})},manualSave(){let e=this.mindMap.getData(!0);Object(Lo["d"])(e)},init(){let e=this.hasFileURL(),{root:t,layout:r,theme:i,view:o,config:a}=this.mindMapData;e&&(t={data:{text:this.$t("edit.root")},children:[]},r=Do["a"].layout,i=Do["a"].theme,o=null),this.mindMap=new Yl({el:this.$refs.mindMapContainer,data:t,fit:!1,layout:r,theme:i.template,themeConfig:i.config,viewData:o,nodeTextEditZIndex:1e3,nodeNoteTooltipZIndex:1e3,customNoteContentShow:{show:(e,t,n,r)=>{this.$bus.$emit("showNoteContent",e,t,n,r)},hide:()=>{}},...a||{},iconList:[...W],useLeftKeySelectionRightKeyDrag:this.useLeftKeySelectionRightKeyDrag,customInnerElsAppendTo:null,enableAutoEnterTextEditWhenKeydown:!0,customHandleClipboardText:mj,defaultNodeImage:n("24d1"),initRootNodePosition:["center","center"],handleIsSplitByWrapOnPasteCreateNewNode:()=>this.$confirm(this.$t("edit.splitByWrap"),this.$t("edit.tip"),{confirmButtonText:this.$t("edit.yes"),cancelButtonText:this.$t("edit.no"),type:"warning"}),errorHandler:(e,t)=>{switch(console.error(t),e){case"export_error":this.$message.error(this.$t("edit.exportError"));break;default:break}},addContentToFooter:()=>{const e=this.extraTextOnExport.trim();if(!e)return null;const t=document.createElement("div");t.className="footer",t.innerHTML=e;const n="\n .footer {\n width: 100%;\n height: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12px;\n color: #979797;\n }\n ";return{el:t,cssText:n,height:30}},expandBtnNumHandler:e=>e>=100?"…":e,beforeDeleteNodeImg:e=>new Promise(e=>{this.$confirm(this.$t("edit.deleteNodeImgTip"),this.$t("edit.tip"),{confirmButtonText:this.$t("edit.yes"),cancelButtonText:this.$t("edit.no"),type:"warning"}).then(()=>{e(!1)}).catch(()=>{e(!0)})})}),this.openNodeRichText&&this.addRichTextPlugin(),this.isShowScrollbar&&this.addScrollbarPlugin(),this.isUseHandDrawnLikeStyle&&this.addHandDrawnLikeStylePlugin(),"undefined"!==typeof EA&&this.$store.commit("setSupportHandDrawnLikeStyle",!0),"undefined"!==typeof YA&&(this.mindMap.addPlugin(YA),this.$store.commit("setSupportMark",!0)),"undefined"!==typeof nE&&(this.mindMap.addPlugin(nE),this.$store.commit("setSupportNumbers",!0)),"undefined"!==typeof wE&&(this.mindMap.addPlugin(wE),this.$store.commit("setSupportFreemind",!0),So["default"].prototype.Freemind=wE),"undefined"!==typeof qE&&(this.mindMap.addPlugin(qE),this.$store.commit("setSupportExcel",!0),So["default"].prototype.Excel=qE),this.mindMap.keyCommand.addShortcut("Control+s",()=>{this.manualSave()}),["node_active","data_change","view_data_change","back_forward","node_contextmenu","node_click","draw_click","expand_btn_click","svg_mousedown","mouseup","mode_change","node_tree_render_end","rich_text_selection_change","transforming-dom-to-images","generalization_node_contextmenu","painter_start","painter_end","scrollbar_change","scale","translate","node_attachmentClick","node_attachmentContextmenu","demonstrate_jump","exit_demonstrate"].forEach(e=>{this.mindMap.on(e,(...t)=>{this.$bus.$emit(e,...t)})}),this.bindSaveEvent(),this.testDynamicCreateNodes(),window.takeOverApp&&this.$bus.$emit("app_inited",this.mindMap),e&&this.$bus.$emit("handle_file_url"),So["default"].prototype.getCurrentData=()=>{const e=this.mindMap.getData(!0);return{...e,config:this.mindMapData.config}},this.cooperateTest()},hasFileURL(){const e=this.$route.query.fileURL;return!!e&&/\.(smm|json|xmind|md|xlsx)$/.test(e)},setData(e){this.handleShowLoading(),e.root?this.mindMap.setFullData(e):this.mindMap.setData(e),this.mindMap.view.reset(),this.manualSave()},reRender(){this.mindMap.reRender()},execCommand(...e){this.mindMap.execCommand(...e)},async export(...e){try{uj(),await this.mindMap.export(...e),dj()}catch(t){console.log(t),dj()}},onPaddingChange(e){this.mindMap.updateConfig(e)},showNewFeatureInfo(){let e=localStorage.getItem("SIMPLE_MIND_MAP_NEW_FEATURE_TIP_1");e||this.$notify.info({title:this.$t("edit.newFeatureNoticeTitle"),message:this.$t("edit.newFeatureNoticeMessage"),duration:0,onClose:()=>{localStorage.setItem("SIMPLE_MIND_MAP_NEW_FEATURE_TIP_1",!0)}})},addRichTextPlugin(){this.mindMap&&this.mindMap.addPlugin(lT)},removeRichTextPlugin(){this.mindMap.removePlugin(lT)},addScrollbarPlugin(){this.mindMap&&this.mindMap.addPlugin(eS)},removeScrollbarPlugin(){this.mindMap.removePlugin(eS)},addHandDrawnLikeStylePlugin(){try{if(!this.mindMap)return;this.mindMap.addPlugin(EA),this.mindMap.reRender()}catch(e){console.log("手绘风格插件不存在")}},removeHandDrawnLikeStylePlugin(){try{this.mindMap.removePlugin(EA),this.mindMap.reRender()}catch(e){console.log("手绘风格插件不存在")}},testDynamicCreateNodes(){setTimeout(()=>{},5e3)},cooperateTest(){this.mindMap.cooperate&&this.$route.query.userName&&(this.mindMap.cooperate.setProvider(null,{roomName:"demo-room",signalingList:["ws://localhost:4444"]}),this.mindMap.cooperate.setUserInfo({id:Math.random(),name:this.$route.query.userName,color:["#409EFF","#67C23A","#E6A23C","#F56C6C","#909399"][Math.floor(5*Math.random())],avatar:Math.random()>.5?"https://img0.baidu.com/it/u=4270674549,2416627993&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1696006800&t=4d32871d14a7224a4591d0c3c7a97311":""}))},onDragenter(){this.isDragOutlineTreeNode||(this.showDragMask=!0)},onDragleave(){this.showDragMask=!1},onDrop(e){this.showDragMask=!1;const t=e.dataTransfer,n=t.files&&t.files[0];n&&this.$bus.$emit("importFile",n)}}},nH=tH,rH=(n("cc9e"),Object(m["a"])(nH,ra,ia,!1,null,"375010ac",null)),iH=rH.exports,oH={name:"Index",components:{Toolbar:na,Edit:iH},data(){return{show:!1}},computed:{...Object(ce["d"])({isZenMode:e=>e.localConfig.isZenMode,isDark:e=>e.localConfig.isDark,activeSidebar:e=>e.activeSidebar})},watch:{isDark(){this.setBodyDark()}},async created(){this.initLocalConfig();const e=this.$loading({lock:!0,text:this.$t("other.loading")});await this.getUserMindMapData(),this.show=!0,e.close(),this.setBodyDark()},methods:{...Object(ce["b"])(["getUserMindMapData"]),...Object(ce["c"])(["setLocalConfig"]),initLocalConfig(){let e=Object(Lo["c"])();e&&this.setLocalConfig({...this.$store.state.localConfig,...e})},setBodyDark(){this.isDark?document.body.classList.add("isDark"):document.body.classList.remove("isDark")}}},aH=oH,sH=(n("0ea4"),Object(m["a"])(aH,o,a,!1,null,null,null));t["default"]=sH.exports},"5fd6":function(e,t,n){e.exports=n.p+"img/DNA.svg"},6003:function(e,t,n){var r=n("ca0f"),i=n("ef4b"),o=n("f50f");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(n,[]),t=n instanceof Array}catch(a){}return function(n,r){return i(n),o(r),t?e(n,r):n.__proto__=r,n}}():void 0)},"60fc":function(e,t,n){e.exports=n.p+"img/chunjie.svg"},"618f":function(e,t,n){var r=n("8e5e"),i=n("b242"),o=n("3a12"),a=n("ef4b"),s=n("904a"),l=n("7e4e");t.f=r&&!i?Object.defineProperties:function(e,t){a(e);var n,r=s(t),i=l(t),c=i.length,h=0;while(c>h)o.f(e,n=i[h++],r[n]);return e}},6276:function(e,t,n){e.exports=n.p+"img/skyGreen.jpg"},"62fd":function(e,t,n){"use strict";n("be0f")},6374:function(e,t,n){"use strict";var r=n("da84"),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},6412:function(e,t,n){e.exports=n.p+"img/tingzhenqi.svg"},"644b":function(e,t,n){"use strict";var r=n("2cf1"),i="object"==typeof self&&self&&self.Object===Object&&self,o=r["a"]||i||Function("return this")();t["a"]=o},6490:function(e,t,n){e.exports=n.p+"img/-_11.svg"},"64b7":function(e,t,n){},"655f":function(e,t,n){e.exports=n.p+"img/a-shu2.svg"},"65ee":function(e,t,n){e.exports=n.p+"img/ziyuan_14.svg"},"66ac":function(e,t,n){"use strict";var r=n("65f8"),i=n("ca0f"),o=n("47a8"),a=n("4f15"),s=n("fbad"),l=n("4261"),c=i("".charAt),h=l((function(){return"\ud842"!=="𠮷".at(-2)}));r({target:"String",proto:!0,forced:h},{at:function(e){var t=s(o(this)),n=t.length,r=a(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:c(t,i)}})},6705:function(e,t,n){e.exports=n.p+"img/quqi.svg"},"67dd":function(e,t,n){e.exports=n.p+"img/kafeibei.svg"},6854:function(e,t,n){"use strict";n("6cff")},"69f3":function(e,t,n){"use strict";var r,i,o,a=n("cdce"),s=n("da84"),l=n("861d"),c=n("9112"),h=n("1a2d"),u=n("c6cd"),d=n("f772"),f=n("d012"),p="Object already initialized",m=s.TypeError,g=s.WeakMap,v=function(e){return o(e)?i(e):r(e,{})},b=function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}};if(a||u.state){var y=u.state||(u.state=new g);y.get=y.get,y.has=y.has,y.set=y.set,r=function(e,t){if(y.has(e))throw new m(p);return t.facade=e,y.set(e,t),t},i=function(e){return y.get(e)||{}},o=function(e){return y.has(e)}}else{var w=d("state");f[w]=!0,r=function(e,t){if(h(e,w))throw new m(p);return t.facade=e,c(e,w,t),t},i=function(e){return h(e,w)?e[w]:{}},o=function(e){return h(e,w)}}e.exports={set:r,get:i,has:o,enforce:v,getterFor:b}},"6a23":function(e,t,n){},"6a87":function(e,t,n){},"6ad8":function(e,t,n){e.exports=n.p+"img/lateNightOffice.jpg"},"6ade":function(e,t,n){e.exports=n.p+"img/fanyi.svg"},"6b7a":function(e,t,n){},"6c25":function(e,t,n){e.exports=n.p+"img/ziyuan_18.svg"},"6c72":function(e,t,n){"use strict";var r=n("65f8"),i=n("a32e"),o=n("ca0f"),a=n("7304"),s=n("47a8"),l=n("286d"),c=n("fbad"),h=n("ef4b"),u=n("5a65"),d=n("de5f"),f=n("eaee"),p=n("17d3"),m=n("8780"),g=n("4261"),v=n("ed26"),b=n("79c9"),y=n("3e59"),w=n("ad1a"),x=n("74f4"),k=n("3e92"),C=v("matchAll"),T="RegExp String",S=T+" Iterator",A=x.set,E=x.getterFor(S),M=RegExp.prototype,N=TypeError,O=o("".indexOf),D=o("".matchAll),L=!!D&&!g((function(){D("a",/./)})),z=a((function(e,t,n,r){A(this,{type:S,regexp:e,string:t,global:n,unicode:r,done:!1})}),T,(function(){var e=E(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=w(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""===c(r[0])&&(t.lastIndex=y(n,l(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),I=function(e){var t,n,r,i=h(this),o=c(e),a=b(i,RegExp),s=c(f(i));return t=new a(a===RegExp?i.source:i,s),n=!!~O(s,"g"),r=!!~O(s,"u"),t.lastIndex=l(i.lastIndex),new z(t,o,n,r)};r({target:"String",proto:!0,forced:L},{matchAll:function(e){var t,n,r,o,a=s(this);if(null!=e){if(d(e)&&(t=c(s(f(e))),!~O(t,"g")))throw N("`.matchAll` does not allow non-global regexes");if(L)return D(a,e);if(r=p(e,C),void 0===r&&k&&"RegExp"==u(e)&&(r=I),r)return i(r,e,a)}else if(L)return D(a,e);return n=c(a),o=new RegExp(e,"g"),k?i(I,o,n):o[C](n)}}),k||C in M||m(M,C,I)},"6c83":function(e,t,n){e.exports=n.p+"img/seaBlueLine.jpg"},"6cff":function(e,t,n){},"6d42":function(e,t,n){e.exports=n.p+"img/naixi.svg"},"6d50":function(e,t,n){e.exports=n.p+"img/ziyuan_9.svg"},"6d75":function(e,t,n){e.exports=n.p+"img/meishi.svg"},"6db8":function(e){e.exports=JSON.parse('"eJztWsuy48iN/Ret74KZfHtX47meqfGjPHaXx4/wgpJ4JbooUU1JVXXb0f9u4JwESF13R7TD29koIpFi8gCJBHDA/Pvm+nraTuPmZ3/f5HHzs7/k8WlzvXS7fvPXp02eqyR/2vRfd2N3gqhUUfm0Od9P236+DoczxLWK66fNpZ93/fkGWaOy5mnTnUR67c57lRaZSItM/tnN/XnsX/DfIqg0JOk8HI4UK4BCAFzG+xWCQgXF02Y3nU4dJJVKKrx5mPgKBVMImOvYXY+QKJRCoHzXzxMErQrap810hqaloioF1e0L5kvFUwqe23Hu+Q+1TinWeZnuMwSKrRRsL8Nn/kOxlYLtOnzFWE1Viqmu/eceVioVaylYe1OwVKilQD0PCYgiLRtVcJz4kEItW13mNLi0UsCVAB77KyxTKeJKEPff3rsREkVcCeLD3He3HqArBV0J6G/v/fU2cK1WH23l0e3c7T71N9uUVv/c5i73bWlVs1Y0u5/3srO7aQb2EPUB+eUTva0TYgG5mGbbzZSUkJTpn75ygF4PThhq1SMGMds4HYZdN54n/rdWc8rv02bfH9I2hbqGsKbPnIYzHSc0qmTIxI6nuwpiAIQmU8F4Gy7jK8RwntAI1v3wedj39FmFECp508s4zUOyGmwpKrwbL8eOIlVU//Yf/S1J9C212Pa/uuSwbVDYlWzxf/aj/UtfWgm258t1GG1X1BVawfdnX0xdoRbjPCdBVGs1svo3R/tPVD1r2YL3k0kUfC04f9ldLkmk0NVwv+pO232SKXa126/vHAO5wPxNGivsRsZ/HDhWzLVg/iBuOSfMUTGrTX+b/qSIG0H8u+NEl1J4jcD7/XBI9kDcUYN/0/FNCDuNAP64skYOeLrykUsjElWC9+cmAEAB9NtrEijCplaE/YHvKuC5Iup8zxBAWtFrayakC2QC8uCbhggSskx9zXYNQSRkeuZWQBFKQowabNIfS/qeqOgSOFTINcC4DKcnE70H2zqElJAJ3k++dwgrIRPA47J5iCwr724RWELINFBTAAWiCL7SOogrIQj6abWBOH8hCPoL/4a4EoJgn9MWIq40lcY52cJAGbCHMgkpA3g9t7e0sRWgB1HnvjJYRez6yrSTlYJvRZmdCQhe80Pa24roNYL75uLo10WyKYHVeFLjYnImilM0qPDOJOKWNGlFCJsIrw/qsNv7OPY3SnNYSQ9DP46DLHylvGCcEFU08Nz6JIVx9Chd+93ENNhEWroSuC8SAi0WNznNpqH9+c5k1RQ0nIbi9/LnTzdmoKZAaAwaib/0g0Ti29wxG8gUgLey/O8eHmmqt4eiKTNYo416LPrLkcIWa2u06eZ5+mLBXCaoTp4m7pckBm41P8Qe0mUG6DUCYWY/fTmnCQbwkCa2043vrhA2gqakncwM3aGfe9GAj1Vw9qiuzPW2o4Or4PcxhmUu4atwAGKMy8wCscJhiDFfJh1lhY2K6mo250DrTJXOC82EUgVIkTMmOd0moqC5Dd24H15e0hRKJS0Cvg7Xm9RKgz9ErdWrTpfb6zV5Wx2ytwlDZLplUQ/8Ye72Qyq5RI5kqY4t6fe0iHOItdCYbo8zKOi0vLjvjrdjZ2IYRAPUZZ72910SI7vEiL9LaHSvrZFkipKOf02y8gc9vEbmKHQjRP95uH6ShZI9c9pao41otTPLICMETXSC5jLNupbP8bxo2Dy/DOfh9prk8BKNk935MPIo1jiKUSNQqiVSVSozBWYan5nmNMGz1+r6AleO8KJJwXdk2H8XwgVVP31AticBhdvqIZPwNPcvqWhqah74iIB6GsYuvbdGeYFS93yY775hPNh6giUlzNNXr/eaJmNYKrnLKznOt4ZsEQ6f5ZCfWVvJFK2Xs5BcP8ND23r5uJqDyaPmM90Oscl9a87aIC3HLCxz+uOzNFgOhA+P4XRq8hPTjP3Xhzn4oiYIm1svybSpOX03zDuJX4kqyAx3rrKZdZ3XNMggGh9lsUt/Fm+7m+1bGCxqOttPN/fOFiExKh+xnb1d0gz8qiiXmS0r5YxLaaULN/TaOsu4WEgTS3Fd1TCvlsvj9F1/PvQpPzHAZqiN9yZEntcyaDfet0mGOKLl5LGX6EMhU5ZGkf3QnVIWqvJA5FoG7KbLK1BcBcyLTfNYZGr7g8ar+WEWm63VgmSefX/q5k+r6Rplrdo/Heb+q00gKzcWUiVy3pY5RkGL7kept7/zSRS8Uc+Kw+nOV5ukqeu1KqtZ2Ds2a6yrWZghX/NS7q3OwQZ5WM0tgGCBPK7muPM6B2fP8wditayKMKG5YzW7rIvzkJcPs8vKOBGaRJxo+boMocrFfe407G0SJlJS7pO+KOrwqKkAcw4lp28Xi28vU7AM2Lfz9gUITKM8fJlcnoRtlJIvkwsSRtD2kXkuC8M2ytbX08vSME4ZHqd9cTQgojL5hXr60uhDxDJfTy7WQ3kXy2I9q+t+L7V+d3nZD+fDtrtdf7iZ8gPUNhVNSLOdFKmrqgg5UGR5ktUWkERW4ETnYSnQpK5PsqU2k3I5yZbCTGhJki0lmbJ2ypxOd8rYKXM23Slnp6yxclZkVZK1li1EVlMWmY0yyJokC5bIRdYm6sDCW/9X54knZEYnurpKJCEzNtHVdYqTmdGJrm6SiJRMsdWJmTS1MYWuSZwAHg3D5dSJO6tnpqPiNXIHapSQHkL9WNCyDwEZymTtQzyGcfx/rQVukWUP4RgGS29oG5RieEMSVKm67GISoHZUs0g6TKImlZMdbde2cDMFUCZBSBWevKlNIlRrBNQkEVpt0CXUSYTWGvzG1q5TldeFIklgFfiMvQ6tNXgMtk5IM+qSAjbJSpOh4wdUtYnQYgOqxkRosgFVayK02SJsYCJ02tRw9HkVodUG00UTodcG4+UmQrdN0dPhVYR2m8KPBhX1t/bkumgaofzWplwXDT2Oo9K2Lhp6dogUvT+HBpGC98fQxlDs/lSVCr/OVGZ7CGY3lXEIKyD3fylyrQS63P4VjTl0uRkGJxB+l5th2CBS5LkZhg0iRZ6bYdgPUqC5aYMEh8CSmzrsCinU3PRBKkNYyQ0qTgSiSmFQcSAQVAqDimSFmFIYVPaKFGphUNktUqiFQUVaUvLVFbaHSEZK47vC0LNfpOgLQ8+OkaIvDD2SjZbOXWHokWBQgJeGHkmlwaEz9EglKHFKQ48og8qmNPQgJEp0u9LQg4mAjJeGnm0rRV8aeratFH1p6EE8tBnQlYYebSutwLrS0KNrhRZYZegRbpV3dpWhR8tKSU9XGXr2rJTsdJXBTz0ruLjhT00rVaAyBVLTSjWoTIPUs1IVKlOBbSulAV1lOrBzpZS2q0wJNq8yhH7TovIOb1cb5tSXUny14Ut9KUYQUyS1phRgbaDZmEIiFrKThCnpIMMYGrZh0JBo7M01e+H65sZeUpPp6ZsbX4+dcH1xa1YgxYsIAWYF9rXBI1p/L9tiiL6ZmYGtrYpZybaz8caUCA1iA4iIPcEN0ZAQIuq70g2ZPCOQ7R+yE5riIjTojfMRESbsge1zHMhgsSlk5PR4u0WnQDraMOdEE7JTj7dbhAqpw4K3W4wKGZv3eHtempBkA+nHQldgrwXHM1jwCgj0pB7BwlcIbI7BnhbAAmsvHNJgISyw+MIxDRbEAqsvHNRgYSyw/GqZSE0j1l84rMFCWWABhuMaLJgFVmA4sMHCWUi8CRpZQAvkSzizwUJaIE/CoQ0W1ALpEU5tsLDGDzqg6yI0jaKzfxGaRuRBOLjBglsgAcpYHZhG5D04usECXCDdQd0WLMQFshwc6GBBLqQOETSyMBdIa3DMgwW6QD6Dcx4s1AXyDpSRYmoTsrpmzWKQyDJw0GWjTci2GCBZIAtkFDj+wSJZIJPA+Q8WygIJRCQkw8meFCJAsGAWCu8BiNAsjzTAXkKwEBfYg2IQqM3y7EFFauT/ZAcUGlk0DAU7nyzETPeSHBIa1aZmSe4IjWpTsyRphEa1qVmSTFMjU7Mki4ZGreEsSZ+hUWO6s7+bc4/8cdJlaNSYQdjTRbEbM3+c5BgaWTgOSA7stkSLiqFiCwbgLUiHinQX4C1Kh4pEl+BN94oEl+DNdBWJLcH74yS0AG8RPeCjRmRZ3JiR0ZWKrItbW7MmZWVlbG+vSVWxHY2tyW+lJTUy0yEVgdTKmmYlNplKagSDCMFlTIaH8GmVMWkpIj6sMsQv+Ae3UmUIX3AP6q0yRC94x/IOBC84B4+VyhC7yHTIELQRhGgM32hchmAM14hMRCpEMIZrNC6DJvAMWkxl0ASOQYOpDJqACrX+EmgCX9EQ8f3T5stwlggXf/otCfss8O19uvX7LfqmP3Z1AiRPP2JPY2pA/vTbFIhHqhFedB2s0/2v3bIAG1z14yH8CVcvwJFFoePr5cgbDv9/G+Pfvo2BUIP6ix0r8EO9ZYARuKFeMMAIvFA/gWMESqifiTACG9QrBTpCBFGK9wuMQKz0UgJGoH+C7L8xAvPTL40Y4au7gPkfjEAB9SYBRmB/eokAIxA/vT6AETifXh7ACHRPrwroqAFX0i/5GIEmCZb/xQj8Tu8LYARqp5cFMAKr03sCGIHQ6SUBjMDlBMsfMLIP//+HERicXlzACORNsPxJR2iW4I4FRj92EQa8TTuGInY3/vHrMSBwuoPX3TDot4c7osKPXJtBm0XLvsPc0XfRZkHNhxE4nLZsMQJ902/jDOQIkriXkAL7JhEyNh1ZemtZ98IxCZvebeCYZE3AHjkmUdMPGRyTpAm6v3FMgqY3EjgmOdPPZhyTmOlFBIwZxHEPgWNeJ9BbBxyz+af9c45J2PRMcEyyph8EOSZP03PMMTmaXjLgmN0+vWLAMfBpFfeZY7838AVjNilxLYJj4NOy7ZVjUju9zcHxv3/FiVcKULCpf9yGcb9qEOPL/6pp7GyO2cU+S7N2AaOzDMHKBXxO4/goyYBiZ3S7+yxxf0fNKud0r31a0gnddp4+9WfTpHJOt/r4yfIlfVDq5z7dgWABg8amf4SBnLxZQ9A0718keFqMZSGDNurhPoxjf5r84LGeQY/77d0vb3QvyYc1DTrd9nWo56movd196uyqy792faz2prfkJHyAHPiBONTe+kZ2ephrlhb4Ll0HSRfRNOLxqk5onB1LWu4kCPAGRmicIDOZ6j67Ro0T5V2/F6t1lDpTlkz6iMTpspj/JI53H83+jZNmt/+ybY2TZ1lRctmcUldonEDLxLEbGV5aZ9AwRnqAJmydSFu6c2dunU6/8yDIL5Og0+8W67VOp98xsL6kr1H8FglO/W45Uq1z6ncPXto6rX432zlpnVW/e6bAGfXPV0aOmXPqZwcbM+fUzw42Zs6pnx/BxsyJ9fMaV8ycW79fre3c+v1qbefW79+u7QT7/ePazrGf+UE7Zk6wf+Mmi8EJ9ocFQnCC/WGBEJxgf3gDgddNNIp/WC3Mb12i24cHXIEfkcs3FzGDM/UPnnJjcKb+cQXOmfrHFThn6h/fgItO1z8+4IjO2P+0LBOdsX9znHgBKUYn7Id+Pkklvh3TCgtpX9DFhbSvll1I+1t0C3NfTBcX5v4IeSHv5sYxX7g7H86dt+/Wbpw7c+8XsLkz934Bmztz79+AzZ2+9w+4cmfww2ptZ/DDam1n8MPbtZ3GDw9rs9ui3KZPblw4tz8vJiuc208LhMK5/bRAKJzbT28gFE7wp9XCTvCnR1zO8ZeLw7Fwjj8tTlw4x78v0Ern+PcFWukc//4GWulE//6AonSu/7paxrn+zZ2YnRclRK/rBXJsCAjxh2cKEAWVJ02ku/wOoFv2+12XkmnODwHgW4uQGVbZ0uM7mAJ1b/68/JlpUMnWdy5MF6/Vd5eL19YYSPd6FqPwBkNQo/h2NQxdQQ3bn/dpCxrGrqCW7U8rKZl/mfi0Xytk3Am66ZhYbg4y+KAVslDwbXdNL2d5qU5hnYBlTZaa6hs2t1qWdaeeTptcLco+hl5R7w4H5uOGcQbtEkpT18GusOI2xT9dYcVJf7zCSjmbD+Iud2s1NPRb9E+0UICmizb8ZK/+5JOLOulSqwaw5VJr2vB8dSFn89fvv/8H0oq1dA=="')},"6e00":function(e,t,n){"use strict";for(var r=n("0068").isSpace,i=[],o=0;o<256;o++)i.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){i[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o,a,s,l,c=e.pos,h=e.posMax;if(92!==e.src.charCodeAt(c))return!1;if(c++,c>=h)return!1;if(n=e.src.charCodeAt(c),10===n){t||e.push("hardbreak","br",0),c++;while(c=55296&&n<=56319&&c+1=56320&&o<=57343&&(s+=e.src[c+1],c++)),a="\\"+s,t||(l=e.push("text_special","",0),n<256&&0!==i[n]?l.content=s:l.content=a,l.markup=a,l.info="escape"),e.pos=c+1,!0}},"6e83":function(e,t,n){"use strict";var r=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;e.exports=function(e,t){var n,i,o,a,s,l,c,h;return!!e.md.options.linkify&&(!(e.linkLevel>0)&&(n=e.pos,i=e.posMax,!(n+3>i)&&(58===e.src.charCodeAt(n)&&(47===e.src.charCodeAt(n+1)&&(47===e.src.charCodeAt(n+2)&&(o=e.pending.match(r),!!o&&(a=o[1],s=e.md.linkify.matchAtStart(e.src.slice(n-a.length)),!!s&&(l=s.url,!(l.length<=a.length)&&(l=l.replace(/\*+$/,""),c=e.md.normalizeLink(l),!!e.md.validateLink(c)&&(t||(e.pending=e.pending.slice(0,-a.length),h=e.push("link_open","a",1),h.attrs=[["href",c]],h.markup="linkify",h.info="auto",h=e.push("text","",0),h.content=e.md.normalizeLinkText(l),h=e.push("link_close","a",-1),h.markup="linkify",h.info="auto"),e.pos+=l.length-a.length,!0))))))))))}},"6f19":function(e,t,n){"use strict";var r=n("9112"),i=n("0d26"),o=n("b980"),a=Error.captureStackTrace;e.exports=function(e,t,n,s){o&&(a?a(e,t):r(e,"stack",i(n,s)))}},"6f27":function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"ContentMatch",(function(){return F})),n.d(t,"DOMParser",(function(){return re})),n.d(t,"DOMSerializer",(function(){return ye})),n.d(t,"Fragment",(function(){return s})),n.d(t,"Mark",(function(){return u})),n.d(t,"MarkType",(function(){return ee})),n.d(t,"Node",(function(){return L})),n.d(t,"NodeRange",(function(){return O})),n.d(t,"NodeType",(function(){return Q})),n.d(t,"ReplaceError",(function(){return d})),n.d(t,"ResolvedPos",(function(){return A})),n.d(t,"Schema",(function(){return te})),n.d(t,"Slice",(function(){return f})),r.prototype={constructor:r,find:function(e){for(var t=0;t>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var i=r;function o(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i!=a){if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=o(i.content,a.content,n+1);if(null!=e)return e}n+=i.nodeSize}else n+=i.nodeSize}}function a(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let s=e.child(--i),l=t.child(--o),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let e=0,t=Math.min(s.text.length,l.text.length);while(ee&&!1!==n(s,r+a,i||null,o)&&s.content.size){let i=a+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}a=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(a,s)=>{let l=a.isText?a.text.slice(Math.max(e,s)-s,t-s):a.isLeaf?r?"function"===typeof r?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&l||a.isTextblock)&&n&&(o?o=!1:i+=n),i+=l},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);ie)for(let i=0,o=0;oe&&((ot)&&(a=a.isText?a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=s}return new s(n,r)}cutByIndex(e,t){return e==t?s.empty:0==e&&t==this.content.length?this:new s(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new s(r,i)}addToStart(e){return new s([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new s(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return s.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new s(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return s.empty;let t,n=0;for(let r=0;rthis.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;te.type.rank-t.type.rank),t}}u.none=[];class d extends Error{}class f{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=m(this.content,e+this.openStart,t);return n&&new f(n,this.openStart,this.openEnd)}removeBetween(e,t){return new f(p(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return f.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(s.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new f(e,n,r)}}function p(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(p(o.content,t-i-1,n-i-1)))}function m(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=m(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function g(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return v(e,t,n,0)}function v(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function x(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(w(e.nodeAfter,r),o++));for(let s=o;si&&y(e,t,i+1),a=r.depth>i&&y(n,r,i+1),l=[];return x(null,e,i,l),o&&a&&t.index(i)==n.index(i)?(b(o,a),w(k(o,C(e,t,n,r,i+1)),l)):(o&&w(k(o,T(e,t,i+1)),l),x(t,n,i,l),a&&w(k(a,T(n,r,i+1)),l)),x(r,null,i,l),new s(l)}function T(e,t,n){let r=[];if(x(null,e,n,r),e.depth>n){let i=y(e,t,n+1);w(k(i,T(e,t,n+1)),r)}return x(t,null,n,r),new s(r)}function S(e,t){let n=t.depth-e.openStart,r=t.node(n),i=r.copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(s.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}f.empty=new f(s.empty,0,0);class A{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return e=this.resolveDepth(e),0==e?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let i=0;i0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new O(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let o=e;;){let{index:e,offset:t}=o.content.findIndex(i),a=i-t;if(n.push(o,e,r+t),!a)break;if(o=o.child(e),o.isText)break;i=a-1,r+=t+1}return new A(t,n,i)}static resolveCached(e,t){for(let r=0;re&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),I(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=s.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let s=r;se.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=s.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}L.prototype.text=void 0;class z extends L{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):I(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new z(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new z(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function I(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class F{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new R(e,t);if(null==n.next)return F.empty;let r=P(n);n.next&&n.err("Unexpected trailing text");let i=K(G(r));return Y(i,n),i}matchType(e){for(let t=0;te.createAndFill()));for(let e=0;e=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r