Files
server-configs/siyuan/data/plugins/kmind-plugin/app/js/chunk-034978b9.js
2026-02-13 22:24:27 +08:00

1 line
426 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-034978b9"],{"053c":function(t,e,i){"use strict";var n=i("1e42");const o=["backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize"];class r{static setBackgroundStyle(t,e){if(!t)return;if(!r.cacheStyle){r.cacheStyle={};let e=window.getComputedStyle(t);o.forEach(t=>{r.cacheStyle[t]=e[t]})}let{backgroundColor:i,backgroundImage:n,backgroundRepeat:s,backgroundPosition:a,backgroundSize:h}=e;t.style.backgroundColor=i,n&&"none"!==n?(t.style.backgroundImage=`url(${n})`,t.style.backgroundRepeat=s,t.style.backgroundPosition=a,t.style.backgroundSize=h):t.style.backgroundImage="none"}static removeBackgroundStyle(t){r.cacheStyle&&(o.forEach(e=>{t.style[e]=r.cacheStyle[e]}),r.cacheStyle=null)}constructor(t){this.ctx=t,this._markerPath=null,this._marker=null,this._gradient=null}merge(t,e){let i=this.ctx.mindMap.getNodeThemeConfig?this.ctx.mindMap.getNodeThemeConfig(this.ctx):this.ctx.mindMap.themeConfig,n=null,o=!1;e?(o=!0,n=i):n=this.ctx.isGeneralization?i.generalization:0===this.ctx.layerIndex?i.root:1===this.ctx.layerIndex?i.second:i.node;let r="";return r=void 0!==this.getSelfStyle(t)?this.getSelfStyle(t):void 0!==n[t]?n[t]:i[t],o||this.addToEffectiveStyles({[t]:r}),r}getStyle(t,e){return this.merge(t,e)}getSelfStyle(t){return this.ctx.getData(t)}addToEffectiveStyles(t){this.ctx.effectiveStyles={...this.ctx.effectiveStyles,...t}}rect(t){this.shape(t),t.radius(this.merge("borderRadius"))}shape(t){const e={gradientStyle:this.merge("gradientStyle"),startColor:this.merge("startColor"),endColor:this.merge("endColor"),startDir:this.merge("startDir"),endDir:this.merge("endDir"),fillColor:this.merge("fillColor"),borderColor:this.merge("borderColor"),borderWidth:this.merge("borderWidth"),borderDasharray:this.merge("borderDasharray")};e.gradientStyle?(this._gradient||(this._gradient=this.ctx.nodeDraw.gradient("linear")),this._gradient.update(t=>{t.stop(0,e.startColor),t.stop(1,e.endColor)}),this._gradient.from(...e.startDir).to(...e.endDir),t.fill(this._gradient)):t.fill({color:e.fillColor}),t.stroke({color:e.borderColor,width:e.borderWidth,dasharray:e.borderDasharray})}text(t){const e={color:this.merge("color"),fontFamily:this.merge("fontFamily"),fontSize:this.merge("fontSize"),fontWeight:this.merge("fontWeight"),fontStyle:this.merge("fontStyle"),textDecoration:this.merge("textDecoration")};t.fill({color:e.color}).css({"font-family":e.fontFamily,"font-size":e.fontSize+"px","font-weight":e.fontWeight,"font-style":e.fontStyle,"text-decoration":e.textDecoration})}domText(t,e=1){const i={color:this.merge("color"),fontFamily:this.merge("fontFamily"),fontSize:this.merge("fontSize"),fontWeight:this.merge("fontWeight"),fontStyle:this.merge("fontStyle"),textDecoration:this.merge("textDecoration"),textAlign:this.merge("textAlign")};t.style.color=i.color,t.style.textDecoration=i.textDecoration,t.style.fontFamily=i.fontFamily,t.style.fontSize=i.fontSize*e+"px",t.style.fontWeight=i.fontWeight||"normal",t.style.fontStyle=i.fontStyle,t.style.textAlign=i.textAlign}tagText(t,e){t.fill({color:"#fff"}).css({"font-size":e.fontSize+"px"})}tagRect(t,e){t.fill({color:e.fill}),e.radius&&t.radius(e.radius)}iconNode(t,e){const i=e||this.merge("color");t.attr({fill:i,style:"fill: "+i})}line(t,{width:e,color:i,dasharray:n}={},o,r){const{customHandleLine:s}=this.ctx.mindMap.opt;"function"===typeof s&&s(this.ctx,t,{width:e,color:i,dasharray:n}),t.stroke({color:i,dasharray:n,width:e}).fill({color:"none"});const a=r&&r.style;if(o&&a){const e=this.merge("showLineMarker",!0);if(e){a._marker=a._marker||a.createMarker(),a._markerPath.stroke({color:i}).fill({color:i}),t.attr("marker-start",""),t.attr("marker-end","");const e=a.merge("lineMarkerDir");t.marker(e,a._marker)}else a._marker&&(t.attr("marker-start",""),t.attr("marker-end",""),a._marker.remove(),a._marker=null)}else t.attr("marker-start",""),t.attr("marker-end",""),a&&a._marker&&(a._marker.remove(),a._marker=null)}createMarker(){return this.ctx.lineDraw.marker(20,20,t=>{t.ref(8,5),t.size(20,20),t.attr("markerUnits","userSpaceOnUse"),t.attr("orient","auto-start-reverse"),this._markerPath=t.path("M0,0 L2,5 L0,10 L10,5 Z")})}generalizationLine(t){t.stroke({width:this.merge("generalizationLineWidth",!0),color:this.merge("generalizationLineColor",!0)}).fill({color:"none"})}iconBtn(t,e,i){let{color:n,fill:o,fontSize:r,fontColor:s}=this.ctx.mindMap.opt.expandBtnStyle||{color:"#808080",fill:"#fff",fontSize:12,strokeColor:"#333333",fontColor:"#333333"};t.fill({color:n}),e.fill({color:n}),i.fill({color:o}),this.ctx.mindMap.opt.isShowExpandNum&&t.attr({"font-size":r+"px","font-color":s})}hasCustomStyle(){let t=!1;return Object.keys(this.ctx.getData()).forEach(e=>{Object(n["g"])(e)&&(t=!0)}),t}getCustomStyle(){const t={};return Object.keys(this.ctx.getData()).forEach(e=>{Object(n["g"])(e)&&(t[e]=this.ctx.getData(e))}),t}hoverNode(t){const e=this.merge("hoverRectColor")||this.ctx.mindMap.opt.hoverRectColor,i=this.merge("hoverRectRadius");t.radius(i).fill("none").stroke({color:e})}onRemove(){this._marker&&(this._marker.remove(),this._marker=null),this._markerPath&&(this._markerPath.remove(),this._markerPath=null),this._gradient&&(this._gradient.remove(),this._gradient=null)}}r.cacheStyle=null,e["a"]=r},"08af":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("1e42");const o=t=>{if(!t)return"";const e=t.text||"";return t.richText?Object(n["lb"])(e):e},r=t=>new Array(t).fill("#").join(""),s=t=>new Array(t-6).fill(" ").join("")+"*",a=t=>{const e=Object(n["mb"])(t).filter(t=>t&&t.data);let i="";return e.forEach((t,a)=>{Object(n["Db"])(t,null,(t,e,n,a)=>{if(!t||!t.data)return;const h=a+1;i+=h<=6?r(h):s(h),i+=" "+o(t.data);const d=t.data.generalization;if(Array.isArray(d))i+=d.map(t=>` [${o(t)}]`);else if(d&&d.text){const t=o(d);i+=` [${t}]`}i+="\n\n",t.data.note&&(i+=t.data.note+"\n\n")},()=>{},!0),a<e.length-1&&(i+="\n")}),i}},"0f9c":function(t,e,i){"use strict";const n="undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var o={randomUUID:n};let r;const s=new Uint8Array(16);function a(){if(!r&&(r="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(s)}const h=[];for(let c=0;c<256;++c)h.push((c+256).toString(16).slice(1));function d(t,e=0){return h[t[e+0]]+h[t[e+1]]+h[t[e+2]]+h[t[e+3]]+"-"+h[t[e+4]]+h[t[e+5]]+"-"+h[t[e+6]]+h[t[e+7]]+"-"+h[t[e+8]]+h[t[e+9]]+"-"+h[t[e+10]]+h[t[e+11]]+h[t[e+12]]+h[t[e+13]]+h[t[e+14]]+h[t[e+15]]}function l(t,e,i){if(o.randomUUID&&!e&&!t)return o.randomUUID();t=t||{};const n=t.random||(t.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){i=i||0;for(let t=0;t<16;++t)e[i+t]=n[t];return e}return d(n)}e["a"]=l},"108f":function(t,e,i){"use strict";i("14d9");var n=i("053c"),o=i("5c06"),r=i("8a19"),s=i("1e42");function a(){const t=this.getData("generalization");return Array.isArray(t)?t:t?[t]:[]}function h(){return this.formatGetGeneralization().length>0}function d(){const t=this.formatGetGeneralization();return!!t.find(t=>!t.range||t.range.length<=0)}function l(t){return this._generalizationList.findIndex(e=>e.generalizationNode.uid===t.uid)}function c(){if(this.isGeneralization||!this.checkHasGeneralization())return;let t=0,e=0;const i=this.formatGetGeneralization();i.forEach((i,n)=>{let o=this._generalizationList[n];o||(o=this._generalizationList[n]={}),o.node=this,o.range=i.range,o.generalizationLine||(o.generalizationLine=this.lineDraw.path()),o.generalizationNode||(o.generalizationNode=new Gt({data:{inserting:i.inserting,data:i},uid:Object(s["u"])(),renderer:this.renderer,mindMap:this.mindMap,isGeneralization:!0})),delete i.inserting,o.generalizationNode.generalizationBelongNode=this,o.generalizationNode.width>t&&(t=o.generalizationNode.width),o.generalizationNode.height>e&&(e=o.generalizationNode.height),i.isActive&&this.renderer.addNodeToActiveList(o.generalizationNode)}),this._generalizationNodeWidth=t,this._generalizationNodeHeight=e}function u(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function f(t){if(this.isGeneralization)return;this.updateGeneralizationData();const e=this.formatGetGeneralization();if(e.length<=0||!1===this.getData("expand"))return void this.removeGeneralization();e.length!==this._generalizationList.length&&this.removeGeneralization(),this.createGeneralizationNode();const i=this.getLayoutInstance();i.renderGeneralization(this._generalizationList),this._generalizationList.forEach(e=>{this.style.generalizationLine(e.generalizationLine),e.generalizationNode.render(()=>{},t)})}function p(){const t=this.getChildrenLength(),e=this.formatGetGeneralization(),i=[];e.forEach(e=>{e.range?e.range.length>0&&e.range[0]<=t-1&&e.range[1]<=t-1&&i.push(e):i.push(e)}),i.length!==e.length&&this.setData({generalization:i})}function g(){this.isGeneralization||(this._generalizationList.forEach(t=>{t.generalizationNode.style.onRemove(),t.generalizationLine&&(t.generalizationLine.remove(),t.generalizationLine=null),t.generalizationNode&&(this.renderer.removeNodeFromActiveList(t.generalizationNode),t.generalizationNode.remove(),t.generalizationNode=null)}),this._generalizationList=[],this.generalizationBelongNode&&this.nodeDraw.find(".generalization_"+this.generalizationBelongNode.uid).remove())}function m(){this.isGeneralization||this._generalizationList.forEach(t=>{t.generalizationLine&&t.generalizationLine.hide(),t.generalizationNode&&t.generalizationNode.hide()})}function b(){this.isGeneralization||this._generalizationList.forEach(t=>{t.generalizationLine&&t.generalizationLine.show(),t.generalizationNode&&t.generalizationNode.show()})}function x(t){this._generalizationList.forEach(e=>{e.generalizationLine.opacity(t),e.generalizationNode.group.opacity(t)})}function y(){const t=this.generalizationBelongNode,e=t.formatGetGeneralization(),i=t.getGeneralizationNodeIndex(this),n=e[i],o=this.getStyle("hoverRectColor"),r=o||this.mindMap.opt.hoverRectColor,s=r?{stroke:r}:null;Array.isArray(n.range)&&n.range.length>0?this.mindMap.renderer.highlightNode(t,n.range,s):this.mindMap.renderer.highlightNode(t,null,s)}function w(){this.mindMap.renderer.closeHighlightNode()}var C={formatGetGeneralization:a,checkHasGeneralization:h,checkHasSelfGeneralization:d,getGeneralizationNodeIndex:l,createGeneralizationNode:c,updateGeneralization:u,updateGeneralizationData:p,renderGeneralization:f,removeGeneralization:g,hideGeneralization:m,showGeneralization:b,setGeneralizationOpacity:x,handleGeneralizationMouseenter:y,handleGeneralizationMouseleave:w},v=(i("13d5"),i("3887"));function _(){if(this._openExpandNode)return;const{expandBtnSize:t,expandBtnIcon:e,isShowExpandNum:i}=this.mindMap.opt;let{close:n,open:o}=e||{};i?(this._openExpandNode=new r["j"],this._openExpandNode.addClass("smm-expand-btn-text"),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:t/2,y:2})):(this._openExpandNode=Object(r["i"])(o||v["a"].open).size(t,t),this._openExpandNode.x(0).y(-t/2)),this._closeExpandNode=Object(r["i"])(n||v["a"].close).size(t,t),this._closeExpandNode.x(0).y(-t/2),this._fillExpandNode=(new r["b"]).size(t),this._fillExpandNode.x(0).y(-t/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function M(t=[]){return t.reduce((t,e)=>t+this.sumNode(e.children||[]),t.length)}function E(){let t,{expand:e}=this.getData();if(e!==this._lastExpandBtnType&&(this._expandBtn&&this._expandBtn.clear(),this.createExpandNodeContent(),!1===e?(t=this._openExpandNode,this._lastExpandBtnType=!1):(t=this._closeExpandNode,this._lastExpandBtnType=!0),this._expandBtn)){let{isShowExpandNum:i,expandBtnStyle:n,expandBtnNumHandler:o}=this.mindMap.opt;if(i)if(e)this._fillExpandNode.stroke("none");else{this._fillExpandNode.stroke({color:n.strokeColor});let e=this.sumNode(this.nodeData.children||[]);if("function"===typeof o){const t=o(e,this);Object(s["fb"])(t)||(e=t)}t.text(String(e))}this._expandBtn.add(this._fillExpandNode).add(t)}}function N(){if(!this._expandBtn)return;const t=this.getLayoutInstance();t.renderExpandBtn(this,this._expandBtn)}function T(){this.nodeData.data.isFlowChart||this.getChildrenLength()<=0||this.isRoot&&!this.mindMap.opt.allowRootNodeCollapse||(this._expandBtn||(this._expandBtn=new r["d"],this._expandBtn.on("mouseover",t=>{t.stopPropagation(),this._expandBtn.css({cursor:"pointer"})}),this._expandBtn.on("mouseout",t=>{t.stopPropagation(),this._expandBtn.css({cursor:"auto"})}),this._expandBtn.on("click",t=>{t.stopPropagation(),this.mindMap.execCommand("SET_NODE_EXPAND",this,!this.getData("expand")),this.mindMap.emit("expand_btn_click",this)}),this._expandBtn.on("dblclick",t=>{t.stopPropagation()}),this._expandBtn.addClass("smm-expand-btn")),this.group.add(this._expandBtn),this._showExpandBtn=!0,this.updateExpandBtnNode(),this.updateExpandBtnPos())}function L(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function S(){const{alwaysShowExpandBtn:t,notShowExpandBtn:e}=this.mindMap.opt;t||e||setTimeout(()=>{this.renderExpandBtn()},0)}function D(){const{alwaysShowExpandBtn:t,notShowExpandBtn:e}=this.mindMap.opt;if(t||this._isMouseenter||e)return;let{isActive:i,expand:n}=this.getData();!i&&n&&setTimeout(()=>{this.removeExpandBtn()},0)}var R={createExpandNodeContent:_,updateExpandBtnNode:E,updateExpandBtnPos:N,renderExpandBtn:T,removeExpandBtn:L,showExpandBtn:S,hideExpandBtn:D,sumNode:M};function z(t={}){this.mindMap.execCommand("SET_NODE_DATA",this,t)}function A(t,e,i){this.mindMap.execCommand("SET_NODE_TEXT",this,t,e,i)}function O(t){this.mindMap.execCommand("SET_NODE_IMAGE",this,t)}function k(t){this.mindMap.execCommand("SET_NODE_ICON",this,t)}function I(t,e){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,t,e)}function B(t){this.mindMap.execCommand("SET_NODE_NOTE",this,t)}function F(t,e){this.mindMap.execCommand("SET_NODE_ATTACHMENT",this,t,e)}function P(t,e){this.mindMap.execCommand("SET_NODE_SIYUAN_HYPERLINK",this,t,e)}function W(t,e){this.mindMap.execCommand("SET_NODE_SIYUAN_PDF_HYPERLINK",this,t,e)}function H(t){this.mindMap.execCommand("SET_NODE_TAG",this,t)}function j(t){this.mindMap.execCommand("SET_NODE_SHAPE",this,t)}function G(t,e){this.mindMap.execCommand("SET_NODE_STYLE",this,t,e)}function $(t){this.mindMap.execCommand("SET_NODE_STYLES",this,t)}var U={setData:z,setText:A,setImage:O,setIcon:k,setHyperlink:I,setNote:B,setAttachment:F,setSiyuanHyperlink:P,setSiyuanPDFHyperlink:W,setTag:H,setShape:j,setStyle:G,setStyles:$},Y=i("723f"),X=i("4013");const V=(t,e)=>{const i=new r["d"],n=(new r["j"]).text(t);return e.text(n),i.add(n),i.bbox()},K={radius:3,fontSize:12,fill:"",height:20,paddingX:8};function q(){const t=this.getData("image");if(!t)return;const e=this.getImgShowSize(),i=(new r["e"]).load(t).size(...e),{defaultNodeImage:n}=this.mindMap.opt;if(n){const e=new Image;e.onerror=()=>{i.load(n)},e.src=t}return this.getData("imageTitle")&&i.attr("title",this.getData("imageTitle")),i.on("click",t=>{this.mindMap.emit("node_img_click",this,i,t)}),i.on("dblclick",t=>{this.mindMap.emit("node_img_dblclick",this,t,i)}),i.on("mouseenter",t=>{this.mindMap.emit("node_img_mouseenter",this,i,t)}),i.on("mouseleave",t=>{this.mindMap.emit("node_img_mouseleave",this,i,t)}),i.on("mousemove",t=>{this.mindMap.emit("node_img_mousemove",this,i,t)}),{node:i,width:e[0],height:e[1]}}function Z(){const{custom:t,width:e,height:i}=this.getData("imageSize");return t?[e,i]:Object(s["ub"])(e,i,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function Q(){let t=this.getData();if(!t.icon||t.icon.length<=0)return[];let e=this.mindMap.themeConfig.iconSize;return t.icon.map(t=>{let i=Y["a"].getNodeIconListIcon(t,this.mindMap.opt.iconList||[]),n=null;return n=/^<svg/.test(i)?Object(r["i"])(i).attr("cursor","pointer"):(new r["e"]).load(i),n.size(e,e),n.on("click",e=>{this.mindMap.emit("node_icon_click",this,t,e,n)}),n.on("mouseenter",e=>{this.mindMap.emit("node_icon_mouseenter",this,t,e,n)}),n.on("mouseleave",e=>{this.mindMap.emit("node_icon_mouseleave",this,t,e,n)}),{node:n,width:e,height:e}})}function J(t){const e=this.hasCustomWidth();let i="string"===typeof t?t:this.getData("text"),{textAutoWrapWidth:n,emptyTextMeasureHeightText:o}=this.mindMap.opt;n=e?this.customTextWidth:n;const a=new r["d"];let h=!1;this.getData("resetRichText")&&(delete this.nodeData.data.resetRichText,h=!0),h&&!Object(s["fb"])(i)&&(i=Object(s["h"])(i)?Object(s["sb"])(i):`<p>${i}</p>`,this.setData({text:i}));const d=[],l=Object(s["M"])(this);Object.keys(l).forEach(t=>{d.push([t,l[t]])}),this.mindMap.commonCaches.measureRichtextNodeTextSizeEl||(this.mindMap.commonCaches.measureRichtextNodeTextSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureRichtextNodeTextSizeEl.style.position="fixed",this.mindMap.commonCaches.measureRichtextNodeTextSizeEl.style.left="-999999px",this.mindMap.el.appendChild(this.mindMap.commonCaches.measureRichtextNodeTextSizeEl));const c=this.mindMap.commonCaches.measureRichtextNodeTextSizeEl;d.forEach(([t,e])=>{c.style[t]=e}),c.style.lineHeight=1.2;const u=`<div>${i}</div>`;c.innerHTML=u;const f=c.children[0];f.classList.add("smm-richtext-node-wrap"),Object(s["b"])(f),f.style.maxWidth=n+"px",f.style.width=e?this.customTextWidth+"px":"";let{width:p,height:g}=f.getBoundingClientRect();if(g<=0){c.innerHTML=`<p>${o}</p>`;let t=c.children[0];t.classList.add("smm-richtext-node-wrap"),g=t.getBoundingClientRect().height,c.innerHTML=u}p=Math.min(Math.ceil(p)+1,n),g=Math.ceil(g),a.attr("data-width",p),a.attr("data-height",g);const m=Object(s["s"])({el:c.children[0],width:p,height:g}),b={"line-height":1.2};return d.forEach(([t,e])=>{b[Object(s["e"])(t)]=e}),m.css(b),a.add(m),{node:a,nodeContent:m,width:p,height:g}}function tt(t){if(this.getData("needUpdate")&&delete this.nodeData.data.needUpdate,this.getData("richText"))return this.createRichTextNode(t);const e="string"===typeof t?t:this.getData("text");this.getData("resetRichText")&&delete this.nodeData.data.resetRichText;const i=new r["d"],n=this.getStyle("fontSize",!1),o=this.getStyle("textAlign",!1);let a=[];Object(s["fb"])(e)||(a=String(e).split(/\n/gim));const{textAutoWrapWidth:h,emptyTextMeasureHeightText:d}=this.mindMap.opt;let l=a.length>1;a.forEach((t,e)=>{let i=t.split(""),n=[],o=[];while(i.length){let t=i.shift(),e=[...o,t].join("");V(e,this.style).width<=h?o.push(t):(n.push(o.join("")),o=[t])}o.length>0&&n.push(o.join("")),n.length>1&&(l=!0),a[e]=n.join("\n")}),a=a.join("\n").replace(/\n$/g,"").split(/\n/gim),a.forEach((t,e)=>{""===t&&(t="\ufeff");const s=(new r["j"]).text(t);s.addClass("smm-text-node-wrap"),s.attr("text-anchor",{left:"start",center:"middle",right:"end"}[o]||"start"),this.style.text(s),s.y(n*X["h"]*e+(X["h"]-1)*n/2),i.add(s)});let{width:c,height:u}=i.bbox();if(u<=0){const t=(new r["j"]).text(d);this.style.text(t);const e=t.bbox();u=e.height}return c=Math.min(Math.ceil(c),h),u=Math.ceil(u),i.attr("data-width",c),i.attr("data-height",u),i.attr("data-ismultiLine",l||a.length>1),{node:i,width:c,height:u}}function et(){const{hyperlink:t,hyperlinkTitle:e}=this.getData();if(!t)return;const{customHyperlinkJump:i,hyperlinkIcon:n}=this.mindMap.opt,{icon:o,style:s}=n,a=this.getNodeIconSize("hyperlinkIcon"),h=(new r["i"]).size(a,a),d=(new r["a"]).to(t).target("_blank");d.node.addEventListener("click",e=>{"function"===typeof i&&(e.preventDefault(),i(t,this)),this.mindMap.emit("node_kmind_hyperlinkClick",this,e,h)}),d.on("contextmenu",t=>{this.mindMap.emit("node_kmind_hyperlinkContextmenu",this,t,h)}),d.on("mouseenter",t=>{this.mindMap.emit("node_kmind_hyperlinkMouseenter",this,t,h)}),d.on("mouseleave",t=>{this.mindMap.emit("node_kmind_hyperlinkMouseleave",this,t,h)}),e&&h.add(Object(r["i"])(`<title>${e}</title>`)),d.rect(a,a).fill({color:"transparent"});const l=Object(r["i"])(o||Y["a"].hyperlink).size(a,a);return this.style.iconNode(l,s.color),d.add(l),h.add(d),{node:h,width:a,height:a}}function it(){const t=this.getData("tag");if(!t||t.length<=0)return[];let{maxTag:e,tagsColorMap:i}=this.mindMap.opt;i=i||{};const n=[];return t.slice(0,e).forEach((t,e)=>{let o="",a={...K};"string"===typeof t?o=t:(o=t.text,a={...K,...t.style});const h="undefined"!==typeof a.width,d=new r["d"];d.on("click",()=>{this.mindMap.emit("node_tag_click",this,t,e,d)});const l=(new r["j"]).text(o).attr("cursor","pointer");this.style.tagText(l,a);const{width:c,height:u}=l.bbox(),f=h?a.width:c+2*a.paddingX,p=h?Math.max(f,c):f,g=Math.max(a.height,u);h?l.x((p-c)/2):l.x(h?0:a.paddingX),l.cy(-g/2);const m=(new r["h"]).size(f,a.height).cy(-g/2).attr("cursor","pointer");h&&m.x((p-f)/2),this.style.tagRect(m,{...a,fill:a.fill||i[l.node.textContent]||Object(s["F"])(l.node.textContent)}),d.add(m).add(l),n.push({node:d,width:p,height:g})}),n}function nt(){if(!this.getData("note"))return null;const{icon:t,style:e}=this.mindMap.opt.noteIcon,i=this.getNodeIconSize("noteIcon"),n=(new r["i"]).attr("cursor","pointer").addClass("smm-node-note").size(i,i);n.add((new r["h"]).size(i,i).fill({color:"transparent"}));const o=Object(r["i"])(t||Y["a"].note).size(i,i);if(this.style.iconNode(o,e.color),n.add(o),!this.mindMap.opt.customNoteContentShow){if(!this.noteEl){this.noteEl=document.createElement("div"),this.noteEl.style.cssText=`\n position: fixed;\n padding: 10px;\n border-radius: 5px;\n box-shadow: 0 2px 5px rgb(0 0 0 / 10%);\n display: none;\n background-color: #fff;\n z-index: ${this.mindMap.opt.nodeNoteTooltipZIndex}\n `;const t=this.mindMap.opt.customInnerElsAppendTo||document.body;t.appendChild(this.noteEl)}this.noteEl.innerText=this.getData("note")}return n.on("mouseover",()=>{const{left:t,top:e}=this.getNoteContentPosition();this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.show(this.getData("note"),t,e,this):(this.noteEl.style.left=t+"px",this.noteEl.style.top=e+"px",this.noteEl.style.display="block")}),n.on("mouseout",()=>{this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.hide():this.noteEl.style.display="none"}),n.on("click",t=>{this.mindMap.emit("node_note_click",this,t,n)}),n.on("dblclick",t=>{this.mindMap.emit("node_note_dblclick",this,t,n)}),{node:n,width:i,height:i}}function ot(){const{attachmentUrl:t,attachmentName:e}=this.getData();if(!t)return;const i=this.getNodeIconSize("attachmentIcon"),{icon:n,style:o}=this.mindMap.opt.attachmentIcon,s=(new r["i"]).attr("cursor","pointer").size(i,i);e&&s.add(Object(r["i"])(`<title>${e}</title>`)),s.add((new r["h"]).size(i,i).fill({color:"transparent"}));const a=Object(r["i"])(n||Y["a"].attachment).size(i,i);return this.style.iconNode(a,o.color),s.add(a),s.on("click",t=>{this.mindMap.emit("node_attachmentClick",this,t,s)}),s.on("contextmenu",t=>{this.mindMap.emit("node_attachmentContextmenu",this,t,s)}),{node:s,width:i,height:i}}function rt(){const{siyuanHyperlink:t,siyuanHyperlinkTitle:e}=this.getData();if(!t)return;const{customSiyuanHyperlinkJump:i}=this.mindMap.opt,n=this.mindMap.themeConfig.iconSize,o=(new r["i"]).size(n,n),s=(new r["a"]).to(t).target("_blank");s.node.addEventListener("click",e=>{"function"===typeof i&&(e.preventDefault(),i(t,this)),this.mindMap.emit("node_siyuanHyperlinkClick",this,e,o)}),e&&o.add(Object(r["i"])(`<title>${e}</title>`)),s.rect(n,n).fill({color:"transparent"});const a=Object(r["i"])(Y["a"].siyuan).size(n,n);return this.style.iconNode(a),s.add(a),s.on("contextmenu",t=>{this.mindMap.emit("node_siyuanHyperlinkContextmenu",this,t,o)}),s.on("mouseenter",t=>{this.mindMap.emit("node_siyuanHyperlinkMouseenter",this,t,o)}),s.on("mouseleave",t=>{this.mindMap.emit("node_siyuanHyperlinkMouseleave",this,t,o)}),o.add(s),{node:o,width:n,height:n}}function st(){const{siyuanPDFLinkData:t}=this.getData();if(!t||!t.siyuanPDFHyperlink)return;const{siyuanPDFHyperlink:e,siyuanPDFHyperlinkTitle:i}=t,{customSiyuanPDFHyperlinkJump:n}=this.mindMap.opt,o=this.mindMap.themeConfig.iconSize,s=(new r["i"]).size(o,o),a=(new r["a"]).to(e).target("_blank");a.node.addEventListener("click",t=>{"function"===typeof n?(t.preventDefault(),n(e,this)):(t.preventDefault(),window.open(e,"_blank")),this.mindMap.emit("node_siyuanPDFHyperlinkClick",this,t,s)}),i&&s.add(Object(r["i"])(`<title>${i}</title>`)),a.rect(o,o).fill({color:"transparent"});const h=Object(r["i"])(Y["a"].siyuanPDFLink).size(o,o);return this.style.iconNode(h),a.add(h),a.on("contextmenu",t=>{this.mindMap.emit("node_siyuanPDFHyperlinkContextmenu",this,t,s)}),a.on("mouseenter",t=>{this.mindMap.emit("node_siyuanPDFHyperlinkMouseenter",this,t,s)}),a.on("mouseleave",t=>{this.mindMap.emit("node_siyuanPDFHyperlinkMouseleave",this,t,s)}),s.add(a),{node:s,width:o,height:o}}function at(t){const{style:e}=this.mindMap.opt[t];return Object(s["fb"])(e.size)?this.mindMap.themeConfig.iconSize:e.size}function ht(){const t=this.getNodeIconSize("noteIcon"),{scaleY:e}=this.mindMap.view.getTransformData().transform,i=t*e;let{left:n,top:o}=this._noteData.node.node.getBoundingClientRect();return o+=i,{left:n,top:o}}function dt(t){const e=this.nodeData&&this.nodeData.data,i=e&&"number"===typeof e.customHeight&&e.customHeight>0,n="number"===typeof this._customNodeHeight&&this._customNodeHeight>0,o=t&&"function"===typeof t.getAttribute?t.getAttribute("data-smm-measure"):null;if("fixed"===o){const t=160,o=this.customTextWidth||this.mindMap.opt.textAutoWrapWidth,r=n?this._customNodeHeight:i?e.customHeight:t;return{width:o,height:r}}this.mindMap.commonCaches.measureCustomNodeContentSizeEl||(this.mindMap.commonCaches.measureCustomNodeContentSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.style.cssText="\n position: fixed;\n left: -99999px;\n top: -99999px;\n ",this.mindMap.el.appendChild(this.mindMap.commonCaches.measureCustomNodeContentSizeEl)),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.innerHTML="",this.mindMap.commonCaches.measureCustomNodeContentSizeEl.appendChild(t);let r=this.mindMap.commonCaches.measureCustomNodeContentSizeEl.getBoundingClientRect();return{width:r.width,height:r.height}}function lt(){return!!this._customNodeContent}var ct={createImgNode:q,getImgShowSize:Z,createIconNode:Q,createRichTextNode:J,createTextNode:tt,createHyperlinkNode:et,createTagNode:it,createNoteNode:nt,createAttachmentNode:ot,createSiyuanHyperlinkNode:rt,createSiyuanPDFLinkNode:st,getNoteContentPosition:ht,getNodeIconSize:at,measureCustomNodeContentSize:dt,isUseCustomNodeContent:lt};function ut(){if(this.getChildrenLength()<=0||this.isRoot)return;const{alwaysShowExpandBtn:t,notShowExpandBtn:e,expandBtnSize:i}=this.mindMap.opt;if(!t&&!e){let{width:t,height:e}=this;this._unVisibleRectRegionNode||(this._unVisibleRectRegionNode=new r["h"],this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode);const n=this.getLayoutInstance();n.renderExpandBtnRect(this._unVisibleRectRegionNode,i,t,e,this)}}function ft(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)}function pt(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.getChildrenLength()>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}var gt={renderExpandBtnPlaceholderRect:ut,clearExpandBtnPlaceholderRect:ft,updateExpandBtnPlaceholderRect:pt};function mt(){const{isUseCustomNodeContent:t,customCreateNodeContent:e}=this.mindMap.opt,i=this.checkEnableDragModifyNodeWidth(),n=t&&e;(i||n)&&(this._dragHandleNodes=null,this.dragHandleWidth=4,this.dragHandleMousedownX=0,this.isDragHandleMousedown=!1,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.dragHandleMousedownBodyCursor="",this.dragHandleMousedownLeft=0,this._customSizeHandle=null,this.isCustomSizeMousedown=!1,this.customSizeMousedownX=0,this.customSizeMousedownY=0,this.customSizeStartWidth=0,this.customSizeStartHeight=0,this.onDragMousemoveHandle=this.onDragMousemoveHandle.bind(this),window.addEventListener("mousemove",this.onDragMousemoveHandle),this.onDragMouseupHandle=this.onDragMouseupHandle.bind(this),window.addEventListener("mouseup",this.onDragMouseupHandle),this.mindMap.on("node_mouseup",this.onDragMouseupHandle))}function bt(t){const{minNodeTextModifyWidth:e,maxNodeTextModifyWidth:i,isUseCustomNodeContent:n,customCreateNodeContent:o}=this.mindMap.opt,r=n&&o&&this._customNodeContent;if(this.isCustomSizeMousedown&&r){t.stopPropagation(),t.preventDefault();const{scaleX:n,scaleY:o}=this.mindMap.draw.transform(),r=(t.clientX-this.customSizeMousedownX)/n,s=(t.clientY-this.customSizeMousedownY)/o;let a=this.customSizeStartWidth+r,h=this.customSizeStartHeight+s;return a=Math.max(a,e),-1!==i&&(a=Math.min(a,i)),h=Math.max(h,60),document.body.style.cursor="se-resize",this.group.css({cursor:"se-resize"}),this.customTextWidth=a,this._customNodeHeight=h,this._customNodeContent&&this._customNodeContent.style&&(this._customNodeContent.style.width=a+"px",this._customNodeContent.style.height=h+"px"),void this.reRender([],{ignoreUpdateCustomTextWidth:!0})}if(!this.isDragHandleMousedown)return;t.stopPropagation(),t.preventDefault(),document.body.style.cursor="ew-resize",this.group.css({cursor:"ew-resize"});const{scaleX:s}=this.mindMap.draw.transform(),a=t.clientX-this.dragHandleMousedownX;let h=this.dragHandleMousedownCustomTextWidth+(0===this.dragHandleIndex?-a:a)/s;if(h=Math.max(h,e),-1!==i&&(h=Math.min(h,i)),!r&&this.getData("image")){const t=this.getImgShowSize();this._rectInfo.textContentWidth-this.customTextWidth+h<=t[0]&&(h=t[0]+this.customTextWidth-this._rectInfo.textContentWidth)}this.customTextWidth=h,0===this.dragHandleIndex&&(this.left=this.dragHandleMousedownLeft+a/s),this.reRender(r?[]:["text"],{ignoreUpdateCustomTextWidth:!0})}function xt(){if(this.isCustomSizeMousedown)return document.body.style.cursor=this.dragHandleMousedownBodyCursor,this.group.css({cursor:"default"}),this.isCustomSizeMousedown=!1,this.setData({customTextWidth:this.customTextWidth,customHeight:this._customNodeHeight}),this.mindMap.render(),void this.mindMap.emit("dragModifyNodeSizeEnd",this);this.isDragHandleMousedown&&(document.body.style.cursor=this.dragHandleMousedownBodyCursor,this.group.css({cursor:"default"}),this.isDragHandleMousedown=!1,this.dragHandleMousedownX=0,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.setData({customTextWidth:this.customTextWidth}),this.mindMap.render(),this.mindMap.emit("dragModifyNodeWidthEnd",this))}function yt(){const t=[new r["h"],new r["h"]];return t.forEach((t,e)=>{t.size(this.dragHandleWidth,this.height).fill({color:"transparent"}).css({cursor:"ew-resize"}),t.on("mousedown",t=>{t.stopPropagation(),t.preventDefault(),this.dragHandleMousedownX=t.clientX,this.dragHandleIndex=e,this.dragHandleMousedownCustomTextWidth=void 0===this.customTextWidth?this._textData?this._textData.width:this.width:this.customTextWidth,this.dragHandleMousedownBodyCursor=document.body.style.cursor,this.dragHandleMousedownLeft=this.left,this.isDragHandleMousedown=!0})}),t}function wt(){const{isUseCustomNodeContent:t,customCreateNodeContent:e}=this.mindMap.opt,i=t&&e&&this._customNodeContent;if(this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes||(this._dragHandleNodes=this.createDragHandleNode()),this.getData("isActive")?(this._dragHandleNodes.forEach(t=>{t.height(this.height),this.group.add(t)}),this._dragHandleNodes[1].x(this.width-this.dragHandleWidth)):this._dragHandleNodes&&this._dragHandleNodes.forEach(t=>{t.remove()})),i){if(!this._customSizeHandle){const t=10,e=new r["h"];e.size(t,t).fill({color:"transparent"}).css({cursor:"se-resize"}),e.on("mousedown",t=>{t.stopPropagation(),t.preventDefault(),this.customSizeMousedownX=t.clientX,this.customSizeMousedownY=t.clientY,this.customSizeStartWidth=this.customTextWidth||this.width,this.customSizeStartHeight=this._customNodeHeight||this.height,this.dragHandleMousedownBodyCursor=document.body.style.cursor,this.isCustomSizeMousedown=!0}),this._customSizeHandle=e}if(this.getData("isActive")){const t=this._customSizeHandle,e=t.height();t.x(this.width-e).y(this.height-e),this.group.add(t)}else this._customSizeHandle&&this._customSizeHandle.remove()}}var Ct={initDragHandle:mt,onDragMousemoveHandle:bt,onDragMouseupHandle:xt,createDragHandleNode:yt,updateDragHandle:wt};function vt(){this.mindMap.cooperate&&(this._userListGroup=new r["d"],this.group.add(this._userListGroup))}function _t(t){const{avatarSize:e,fontSize:i}=this.mindMap.opt.cooperateStyle,n=new r["d"],o=t.isMore?t.name:String(t.name)[0],a=(new r["b"]).size(e,e);a.fill({color:t.color||Object(s["F"])(o)});const h=(new r["j"]).text(o).fill({color:"#fff"}).css({"font-size":i+"px"}).dx(-i/2).dy((e-i)/2);return n.add(a).add(h),n}function Mt(t){const{avatarSize:e}=this.mindMap.opt.cooperateStyle;return(new r["e"]).load(t.avatar).size(e,e)}function Et(){if(!this._userListGroup)return;const{avatarSize:t}=this.mindMap.opt.cooperateStyle;this._userListGroup.clear();const e=this.userList.length,i=Math.floor(this.width/t),n=[];e>i?n.push(...this.userList.slice(0,i-1),{isMore:!0,name:"+"+(e-i+1)}):n.push(...this.userList),n.forEach((e,i)=>{let n=null;n=e.avatar?this.createImageAvatar(e):this.createTextAvatar(e),n.on("click",t=>{this.mindMap.emit("node_cooperate_avatar_click",e,this,n,t)}),n.on("mouseenter",t=>{this.mindMap.emit("node_cooperate_avatar_mouseenter",e,this,n,t)}),n.on("mouseleave",t=>{this.mindMap.emit("node_cooperate_avatar_mouseleave",e,this,n,t)}),n.x(i*t).cy(-t/2),this._userListGroup.add(n)})}function Nt(t){this.userList.find(e=>e.id==t.id)||(this.userList.push(t),this.updateUserListNode())}function Tt(t){const e=this.userList.findIndex(e=>e.id==t.id);-1!==e&&(this.userList.splice(e,1),this.updateUserListNode())}function Lt(){this.userList=[],this.updateUserListNode()}var St={createUserListNode:vt,updateUserListNode:Et,createTextAvatar:_t,createImageAvatar:Mt,addUser:Nt,removeUser:Tt,emptyUser:Lt};function Dt(){this.isGeneralization||(this._quickCreateChildBtn=null,this._showQuickCreateChildBtn=!1)}function Rt(){if(this.nodeData.data.isFlowChart)return;if(this.isGeneralization||this.getChildrenLength()>0)return;if(this._quickCreateChildBtn)this.group.add(this._quickCreateChildBtn);else{const{quickCreateChildBtnIcon:t,expandBtnStyle:e,expandBtnSize:i}=this.mindMap.opt,{icon:n,style:o}=t;let{color:s,fill:a}=e||{color:"#808080",fill:"#fff"};s=o.color||s;const h=Object(r["i"])(n||v["a"].quickCreateChild).size(i,i);h.css({cursor:"pointer"}),h.x(0).y(-i/2),this.style.iconNode(h,s);const d=(new r["b"]).size(i);d.x(0).y(-i/2),d.fill({color:a}).css({cursor:"pointer"}),this._quickCreateChildBtn=new r["d"],this._quickCreateChildBtn.add(d).add(h),this._quickCreateChildBtn.on("click",t=>{t.stopPropagation(),this.mindMap.emit("quick_create_btn_click",this);const{customQuickCreateChildBtnClick:e}=this.mindMap.opt;"function"!==typeof e?this.mindMap.execCommand("INSERT_CHILD_NODE",!0,[this]):e(this)}),this._quickCreateChildBtn.on("dblclick",t=>{t.stopPropagation()}),this._quickCreateChildBtn.addClass("smm-quick-create-child-btn"),this.group.add(this._quickCreateChildBtn)}this._showQuickCreateChildBtn=!0;const t=this.getLayoutInstance();t.renderExpandBtn(this,this._quickCreateChildBtn)}function zt(){this.isGeneralization||this._quickCreateChildBtn&&this._showQuickCreateChildBtn&&(this._quickCreateChildBtn.remove(),this._showQuickCreateChildBtn=!1)}function At(){if(this.isGeneralization)return;const{isActive:t}=this.getData();t||this.removeQuickCreateChildBtn()}var Ot={initQuickCreateChildBtn:Dt,showQuickCreateChildBtn:Rt,removeQuickCreateChildBtn:zt,hideQuickCreateChildBtn:At};function kt(t,e,i,n,o){const{imgTextMargin:r}=this.mindMap.opt;return"v"===t?n>0&&o>0?r:0:e>0&&i>0?r:0}function It(t){let e=0,i=this._tagData.reduce((t,i)=>(e=Math.max(e,i.height),t+i.width),0);return i+=(this._tagData.length-1)*t,{width:i,height:e}}function Bt(){if(this.isUseCustomNodeContent()){const t=this.measureCustomNodeContentSize(this._customNodeContent);return{width:this.hasCustomWidth()?this.customTextWidth:t.width,height:t.height}}const{TAG_PLACEMENT:t,IMG_PLACEMENT:e}=X["a"],{textContentMargin:i}=this.mindMap.opt,n=this.getStyle("tagPlacement")||t.RIGHT,o=n===t.BOTTOM,r=this.getStyle("imgPlacement")||e.TOP;let s=0,a=0,h=0,d=0,l=0,c=0,u=0;if(this._imgData&&(s=this._imgData.width,a=this._imgData.height),this.mindMap.nodeInnerPrefixList.forEach(t=>{const e=this[`_${t.name}Data`];e&&(h+=e.width,d=Math.max(d,e.height),u++)}),this._prefixData&&(h+=this._prefixData.width,d=Math.max(d,this._prefixData.height),u++),this._iconData.length>0&&(h+=this._iconData.reduce((t,e)=>(d=Math.max(d,e.height),t+e.width),0)+(this._iconData.length-1)*i,u++),this._textData&&(h+=this._textData.width,d=Math.max(d,this._textData.height),u++),this._hyperlinkData&&(h+=this._hyperlinkData.width,d=Math.max(d,this._hyperlinkData.height),u++),this._tagData.length>0){const{width:t,height:e}=this.getTagContentSize(i);o?(l=t,c=e):(h+=t,d=Math.max(d,e),u++)}this._noteData&&(h+=this._noteData.width,d=Math.max(d,this._noteData.height),u++),this._attachmentData&&(h+=this._attachmentData.width,d=Math.max(d,this._attachmentData.height),u++),this._siyuanHyperlinkData&&(h+=this._siyuanHyperlinkData.width,d=Math.max(d,this._siyuanHyperlinkData.height)),this._siyuanPDFLinkData&&(h+=this._siyuanPDFLinkData.width,d=Math.max(d,this._siyuanPDFLinkData.height)),this._postfixData&&(h+=this._postfixData.width,d=Math.max(d,this._postfixData.height),u++),h+=(u-1)*i,o&&h>0&&c>0&&(this._rectInfo.textContentWidthWithoutTag=h,h=Math.max(h,l),d=d+i+c),this._rectInfo.textContentWidth=h,this._rectInfo.textContentHeight=d;let f=0,p=0;[e.TOP,e.BOTTOM].includes(r)?(f=Math.max(s,h),p=a+d+this.getImgTextMarin("v",0,0,a,d)):(f=s+h+this.getImgTextMarin("h",s,h),p=Math.max(a,d));const{paddingX:g,paddingY:m}=this.getPaddingVale(),{paddingX:b,paddingY:x}=this.shapeInstance.getShapePadding(f,p,g,m);this.shapePadding.paddingX=b,this.shapePadding.paddingY=x;const y=this.getBorderWidth();return{width:f+2*g+2*b+y,height:p+2*m+2*x+y}}function Ft(){if(!this.group)return;this.group.clear();const{hoverRectPadding:t,openRealtimeRenderOnNodeTextEdit:e,textContentMargin:i,addCustomContentToNode:n}=this.mindMap.opt,{width:o,height:a}=this;let{paddingX:h,paddingY:d}=this.getPaddingVale();const l=this.getBorderWidth()/2;h+=this.shapePadding.paddingX+l,d+=this.shapePadding.paddingY+l,this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(l,l),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.createUserListNode&&this.createUserListNode(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass("generalization_"+this.generalizationBelongNode.uid);const c=()=>{this.hoverNode=(new r["h"]).size(o+2*t,a+2*t).x(-t).y(-t),this.hoverNode.addClass("smm-hover-node"),this.nodeData.data.isFlowChart&&this.hoverNode.css("pointer-events","none"),this.style.hoverNode(this.hoverNode,o,a),this.group.add(this.hoverNode)};if(this.isUseCustomNodeContent()){const t=Object(s["s"])({el:this._customNodeContent,width:o,height:a});return this.group.add(t),void c()}const{IMG_PLACEMENT:u,TAG_PLACEMENT:f}=X["a"],p=this.getStyle("imgPlacement")||u.TOP,g=this.getStyle("tagPlacement")||f.RIGHT,m=g===f.BOTTOM;let{textContentWidth:b,textContentHeight:x,textContentWidthWithoutTag:y}=this._rectInfo;const w=x;let C=0,v=0;const _=this._tagData&&this._tagData.length>0;if(_){const t=this.getTagContentSize(i);C=t.width,v=t.height,m&&(x-=v+i)}let M=0,E=0;if(this._imgData)switch(M=this._imgData.width,E=this._imgData.height,this.group.add(this._imgData.node),p){case u.TOP:this._imgData.node.cx(o/2).y(d);break;case u.BOTTOM:this._imgData.node.cx(o/2).y(a-d-E);break;case u.LEFT:this._imgData.node.x(h).cy(a/2);break;case u.RIGHT:this._imgData.node.x(o-h-M).cy(a/2);break;default:break}let N=new r["d"],T=0;if(_&&m&&(T=y<b?(b-y)/2:0),this.mindMap.nodeInnerPrefixList.forEach(t=>{const e=this[`_${t.name}Data`];e&&(e.node.x(T).y((x-e.height)/2),N.add(e.node),T+=e.width+i)}),this._prefixData){const t=Object(s["s"])({el:this._prefixData.el,width:this._prefixData.width,height:this._prefixData.height});t.x(T).y((x-this._prefixData.height)/2),N.add(t),T+=this._prefixData.width+i}let L=new r["d"];if(this._iconData&&this._iconData.length>0){let t=0;this._iconData.forEach(e=>{e.node.x(T+t).y((x-e.height)/2),L.add(e.node),t+=e.width+i}),N.add(L),T+=t}if(this._textData){const t=this._textData.node.attr("data-offsetx")||0;this._textData.node.attr("data-offsetx",T),(this._textData.nodeContent||this._textData.node).x(-t).x(T).y((x-this._textData.height)/2),e&&this._textData.node.opacity(this.mindMap.renderer.textEdit.getCurrentEditNode()===this?0:1),N.add(this._textData.node),T+=this._textData.width+i}this._hyperlinkData&&(this._hyperlinkData.node.x(T).y((x-this._hyperlinkData.height)/2),N.add(this._hyperlinkData.node),T+=this._hyperlinkData.width+i);let S=new r["d"];if(_)if(m){let t=0;this._tagData.forEach(e=>{e.node.x(t).y((v-e.height)/2),S.add(e.node),t+=e.width+i}),S.x((b-C)/2).y(w-v),N.add(S)}else{let t=0;this._tagData.forEach(e=>{e.node.x(T+t).y((x-e.height)/2),S.add(e.node),t+=e.width+i}),N.add(S),T+=t}if(this._noteData&&(this._noteData.node.x(T).y((x-this._noteData.height)/2),N.add(this._noteData.node),T+=this._noteData.width+i),this._attachmentData&&(this._attachmentData.node.x(T).y((x-this._attachmentData.height)/2),N.add(this._attachmentData.node),T+=this._attachmentData.width+i),this._siyuanHyperlinkData&&(this._siyuanHyperlinkData.node.x(T).y((x-this._siyuanHyperlinkData.height)/2),N.add(this._siyuanHyperlinkData.node),T+=this._siyuanHyperlinkData.width),this._siyuanPDFLinkData&&(this._siyuanPDFLinkData.node.x(T).y((x-this._siyuanPDFLinkData.height)/2),N.add(this._siyuanPDFLinkData.node),T+=this._siyuanPDFLinkData.width),this._postfixData){const t=Object(s["s"])({el:this._postfixData.el,width:this._postfixData.width,height:this._postfixData.height});t.x(T).y((x-this._postfixData.height)/2),N.add(t),T+=this._postfixData.width}this.group.add(N);let{width:D,height:R}=N.bbox();(!Number.isFinite(D)||D<=0)&&(D=b||y||0),(!Number.isFinite(R)||R<=0)&&(R=w||x||0);let z=0,A=0;switch(p){case u.TOP:z=o/2-D/2,A=d+E+this.getImgTextMarin("v",0,0,E,w);break;case u.BOTTOM:z=o/2-D/2,A=d;break;case u.LEFT:z=M+h+this.getImgTextMarin("h",M,b),A=a/2-R/2;break;case u.RIGHT:z=h,A=a/2-R/2;break}if(N.translate(z,A),c(),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el){const t=Object(s["s"])(this._customContentAddToNodeAdd);this.group.add(t),n&&"function"===typeof n.handle&&n.handle({content:this._customContentAddToNodeAdd,element:t,node:this})}this.nodeData.data.isFlowChart&&this._flowChartConnector&&setTimeout(()=>{this._flowChartConnector&&this._flowChartConnector.renderConnectors()},0),this.mindMap.emit("node_layout_end",this)}var Pt={getImgTextMarin:kt,getTagContentSize:It,getNodeRect:Bt,layout:Ft},Wt=i("8d8b"),Ht=i("14d0");class jt{constructor(t={}){this.opt=t,this.nodeData=this.handleData(t.data||{}),this.nodeDataSnapshot="",this.uid=t.uid,this.mindMap=t.mindMap,this.renderer=t.renderer,this.draw=this.mindMap.draw,this.nodeDraw=this.mindMap.nodeDraw,this.lineDraw=this.mindMap.lineDraw,this.style=new n["a"](this),this.effectiveStyles={},this.shapeInstance=new o["a"](this),this.shapePadding={paddingX:0,paddingY:0},this.isRoot=void 0!==t.isRoot&&t.isRoot,this.isGeneralization=void 0!==t.isGeneralization&&t.isGeneralization,this.generalizationBelongNode=null,this.layerIndex=void 0===t.layerIndex?0:t.layerIndex,this.width=t.width||0,this.height=t.height||0,this.customTextWidth=t.data.data.customTextWidth||void 0,this._left=t.left||0,this._top=t.top||0,this.customLeft=t.data.data.customLeft||void 0,this.customTop=t.data.data.customTop||void 0,this.isDrag=!1,this.parent=t.parent||null,this.children=t.children||[],this.userList=[],this.group=null,this.shapeNode=null,this.hoverNode=null,this._customNodeContent=null,this._imgData=null,this._iconData=null,this._textData=null,this._hyperlinkData=null,this._tagData=null,this._noteData=null,this.noteEl=null,this.noteContentIsShow=!1,this._attachmentData=null,this._siyuanHyperlinkData=null,this._siyuanPDFLinkData=null,this._prefixData=null,this._postfixData=null,this._expandBtn=null,this._lastExpandBtnType=null,this._showExpandBtn=!1,this._openExpandNode=null,this._closeExpandNode=null,this._fillExpandNode=null,this._userListGroup=null,this._lines=[],this._generalizationList=[],this._unVisibleRectRegionNode=null,this._isMouseenter=!1,this._customContentAddToNodeAdd=null,this._rectInfo={textContentWidth:0,textContentHeight:0,textContentWidthWithoutTag:0},this._generalizationNodeWidth=0,this._generalizationNodeHeight=0,this.expandBtnSize=this.mindMap.opt.expandBtnSize,this.isMultipleChoice=!1,this.needLayout=!1,this.isHide=!1;const e=Object.getPrototypeOf(this);e.bindEvent||(Object.keys(Pt).forEach(t=>{e[t]=Pt[t]}),Object.keys(C).forEach(t=>{e[t]=C[t]}),Object.keys(R).forEach(t=>{e[t]=R[t]}),Object.keys(gt).forEach(t=>{e[t]=gt[t]}),Object.keys(U).forEach(t=>{e[t]=U[t]}),Object.keys(ct).forEach(t=>{e[t]=ct[t]}),this.mindMap.cooperate&&Object.keys(St).forEach(t=>{e[t]=St[t]}),Object.keys(Ct).forEach(t=>{e[t]=Ct[t]}),this.mindMap.opt.isShowCreateChildBtnIcon&&(Object.keys(Ot).forEach(t=>{e[t]=Ot[t]}),this.initQuickCreateChildBtn()),e.bindEvent=!0),this.getSize(),this.updateGeneralization(),this.initDragHandle(),this.nodeData.data.isFlowChart&&(Wt["default"].applyBehavior(this),this._flowChartConnector=new Ht["default"](this))}get left(){return this.customLeft||this._left}set left(t){this._left=t}get top(){return this.customTop||this._top}set top(t){this._top=t}reset(){this.children=[],this.parent=null,this.isRoot=!1,this.layerIndex=0,this.left=0,this.top=0}resetWhenDelete(){this._isMouseenter=!1}handleData(t){return t.data.expand=!1!==t.data.expand,t.data.isActive=!0===t.data.isActive,t.children=t.children||[],t}createNodeData(t){const{isUseCustomNodeContent:e,customCreateNodeContent:i,createNodePrefixContent:n,createNodePostfixContent:o,addCustomContentToNode:r}=this.mindMap.opt,a=["custom","image","icon","text","hyperlink","tag","note","attachment","prefix","postfix",...this.mindMap.nodeInnerPrefixList.map(t=>t.name)],h={};Array.isArray(t)?a.forEach(e=>{t.includes(e)&&(h[e]=!0)}):a.forEach(t=>{h[t]=!0}),e&&i&&h.custom&&(this._customNodeContent=i(this)),this._customNodeContent?Object(s["b"])(this._customNodeContent):(h.image&&(this._imgData=this.createImgNode()),h.icon&&(this._iconData=this.createIconNode()),h.text&&(this._textData=this.createTextNode()),h.hyperlink&&(this._hyperlinkData=this.createHyperlinkNode()),h.tag&&(this._tagData=this.createTagNode()),h.note&&(this._noteData=this.createNoteNode()),h.attachment&&(this._attachmentData=this.createAttachmentNode()),this.mindMap.nodeInnerPrefixList.forEach(t=>{h[t.name]&&(this[`_${t.name}Data`]=t.createContent(this))}),this._siyuanHyperlinkData=this.createSiyuanHyperlinkNode(),this._siyuanPDFLinkData=this.createSiyuanPDFLinkNode(),h.prefix&&(this._prefixData=n?n(this):null,this._prefixData&&this._prefixData.el&&Object(s["b"])(this._prefixData.el)),h.postfix&&(this._postfixData=o?o(this):null,this._postfixData&&this._postfixData.el&&Object(s["b"])(this._postfixData.el)),r&&"function"===typeof r.create&&(this._customContentAddToNodeAdd=r.create(this),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el&&Object(s["b"])(this._customContentAddToNodeAdd.el)))}getSize(t,e={}){const i=e.ignoreUpdateCustomTextWidth||!1;i||(this.customTextWidth=this.getData("customTextWidth")||void 0),this.customLeft=this.getData("customLeft")||void 0,this.customTop=this.getData("customTop")||void 0,this.createNodeData(t);const{width:n,height:o}=this.getNodeRect(),r=this.width!==n||this.height!==o;return this.width=n,this.height=o,r}bindGroupEvent(){const t=t=>Object(s["ab"])(this.mindMap,t);this.group.on("click",e=>{if(!t(e)){if(this.mindMap.emit("node_click",this,e),this.isMultipleChoice)return e.stopPropagation(),void(this.isMultipleChoice=!1);this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&this.userList.length>0||this.active(e)}}),this.group.on("mousedown",e=>{if(t(e))return;const{readonly:i,enableCtrlKeyNodeSelection:n,useLeftKeySelectionRightKeyDrag:o,mousedownEventPreventDefault:r}=this.mindMap.opt;if(r&&e.preventDefault(),i||(this.isRoot?3!==e.which||o||e.stopPropagation():2!==e.which&&e.stopPropagation()),!i&&(e.ctrlKey||e.metaKey)&&n){this.isMultipleChoice=!0;const t=this.getData("isActive");t||this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.mindMap.renderer[t?"removeNodeFromActiveList":"addNodeToActiveList"](this,!0),this.renderer.emitNodeActiveEvent(t?null:this)}this.mindMap.emit("node_mousedown",this,e)}),this.group.on("mouseup",e=>{t(e)||(this.isRoot||2===e.which||this.mindMap.opt.readonly||e.stopPropagation(),this.mindMap.emit("node_mouseup",this,e))}),this.group.on("mouseenter",e=>{t(e)||this.isDrag||(this._isMouseenter=!0,this.nodeData.data.isFlowChart?this._flowChartConnector&&setTimeout(()=>{this._isMouseenter&&this._flowChartConnector&&this._flowChartConnector.showConnectors()},10):this.showExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseenter(),this.mindMap.emit("node_mouseenter",this,e))}),this.group.on("mouseleave",e=>{t(e)||this._isMouseenter&&(this._isMouseenter=!1,this.nodeData.data.isFlowChart?this._flowChartConnector&&this._flowChartConnector.hideConnectors():this.hideExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseleave(),this.mindMap.emit("node_mouseleave",this,e))}),this.group.on("dblclick",e=>{if(t(e))return;const{readonly:i,onlyOneEnableActiveNodeOnCooperate:n}=this.mindMap.opt;i||e.ctrlKey||e.metaKey||(e.stopPropagation(),n&&this.userList.length>0||this.mindMap.emit("node_dblclick",this,e))}),this.group.on("contextmenu",e=>{if(t(e))return;const{readonly:i,useLeftKeySelectionRightKeyDrag:n}=this.mindMap.opt;i||e.ctrlKey||(e.stopPropagation(),e.preventDefault(),this.mindMap.select&&!n&&this.mindMap.select.hasSelectRange()||(this.getData("isActive")&&1===this.renderer.activeNodeList.length||(this.renderer.clearActiveNodeList(),this.active(e)),this.mindMap.emit("node_contextmenu",e,this)))})}active(t){this.mindMap.opt.readonly||(t&&t.stopPropagation(),this.getData("isActive")||(this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.renderer.clearActiveNodeList(),this.renderer.addNodeToActiveList(this,!0),this.renderer.emitNodeActiveEvent(this)))}deactivate(){this.mindMap.renderer.removeNodeFromActiveList(this),this.mindMap.renderer.emitNodeActiveEvent()}update(t){if(!this.group)return;this.updateNodeActiveClass();const{alwaysShowExpandBtn:e,notShowExpandBtn:i,isShowCreateChildBtnIcon:n}=this.mindMap.opt,o=this.getChildrenLength();if(!i)if(e)this._expandBtn&&o<=0?this.removeExpandBtn():this.renderExpandBtn();else{const{isActive:t,expand:e}=this.getData();o<=0?this.removeExpandBtn():!e||t||this._isMouseenter?this.nodeData.data.isFlowChart||this.showExpandBtn():this.hideExpandBtn()}if(n)if(o>0||this.nodeData.data.isFlowChart)this.removeQuickCreateChildBtn();else{const{isActive:t}=this.getData();t?this.showQuickCreateChildBtn():this.hideQuickCreateChildBtn()}this.updateDragHandle(),this.renderGeneralization(t),this.updateUserListNode&&this.updateUserListNode();const r=this.group.transform();this.nodeDataSnapshot=JSON.stringify(this.getData()),this.left===r.translateX&&this.top===r.translateY||this.group.translate(this.left-r.translateX,this.top-r.translateY)}getNodePosInClient(t,e){const i=this.mindMap.draw.transform(),{scaleX:n,scaleY:o,translateX:r,translateY:s}=i,a=t*n+r,h=e*o+s;return{left:a,top:h}}checkIsInClient(t=0){const{left:e,top:i}=this.getNodePosInClient(this.left,this.top);return e+this.width>0-t&&i+this.height>0-t&&e<this.mindMap.width+t&&i<this.mindMap.height+t}reRender(t,e){const i=this.getSize(t,e);return this.layout(),this.update(),i}updateNodeActiveClass(){if(!this.group)return;const t=this.getData("isActive");this.group[t?"addClass":"removeClass"]("active")}updateNodeByActive(t){if(this.group){const{isShowCreateChildBtnIcon:e}=this.mindMap.opt;this.nodeData.data.isFlowChart||(t?(this.showExpandBtn(),e&&this.showQuickCreateChildBtn()):(this.hideExpandBtn(),e&&this.hideQuickCreateChildBtn())),this.updateNodeActiveClass(),this.updateDragHandle()}}render(t=(()=>{}),e=!1,i=!1){this.renderLine();const{openPerformance:n,performanceConfig:o}=this.mindMap.opt;if(e||!n||this.checkIsInClient(o.padding)||this.isRoot?this.group?(this.nodeDraw.has(this.group)||this.nodeDraw.add(this.group),this.needLayout&&(this.needLayout=!1,this.layout()),this.updateExpandBtnPlaceholderRect(),this.update(e)):(this.group=new r["d"],this.group.addClass("smm-node"),this.group.attr("data-id",this.uid),this.group.css({cursor:"default"}),this.bindGroupEvent(),this.nodeDraw.add(this.group),this.layout(),this.update(e)):n&&o.removeNodeWhenOutCanvas&&this.removeSelf(),this.children&&this.children.length&&!1!==this.getData("expand")&&!this.nodeData.data.isFlowChart){let n=0;this.children.forEach(o=>{const r=()=>{o.render(()=>{n++,n>=this.children.length&&t()},e,i)};i?setTimeout(r,0):r()})}else t();this.nodeData.inserting&&(delete this.nodeData.inserting,this.active(),this.mindMap.emit("node_dblclick",this,null,!0))}removeSelf(){this.group&&(this.group.remove(),this.removeGeneralization())}remove(){this.group&&(this.group.remove(),this.removeGeneralization(),this.removeLine(),this.children&&this.children.length&&this.children.forEach(t=>{t.remove()}))}destroy(){this.removeLine(),this.parent&&this.parent.removeLine(),this.group&&(this.emptyUser&&this.emptyUser(),this.resetWhenDelete(),this.group.remove(),this.removeGeneralization(),this.group=null,this.style.onRemove())}hide(){if(this.group&&this.group.hide(),this.hideGeneralization(),this.parent){const t=this.parent.children.indexOf(this);this.parent._lines[t]&&this.parent._lines[t].hide(),this._lines.forEach(t=>{t.hide()})}this.children&&this.children.length&&this.children.forEach(t=>{t.hide()})}show(){if(this.group){if(this.group.show(),this.showGeneralization(),this.parent){const t=this.parent.children.indexOf(this);this.parent._lines[t]&&this.parent._lines[t].show(),this._lines.forEach(t=>{t.show()})}this.children&&this.children.length&&this.children.forEach(t=>{t.show()})}}setOpacity(t){this.group&&this.group.opacity(t),this._lines.forEach(e=>{e.opacity(t)}),this.children.forEach(e=>{e.setOpacity(t)}),this.setGeneralizationOpacity(t)}hideChildren(){this._lines.forEach(t=>{t.hide()}),this.children&&this.children.length&&this.children.forEach(t=>{t.hide()})}showChildren(){this._lines.forEach(t=>{t.show()}),this.children&&this.children.length&&this.children.forEach(t=>{t.show()})}startDrag(){this.isDrag=!0,this.group&&this.group.addClass("smm-node-dragging")}endDrag(){this.isDrag=!1,this.group&&this.group.removeClass("smm-node-dragging")}renderLine(t=!1){if(!1===this.getData("expand"))return;let e=this.getChildrenLength();const i=this.getLayoutInstance();let n=this.mindMap.opt.layout;i&&i.getLayoutType&&(n=i.getLayoutType()),n!==X["a"].LAYOUT.FISHBONE||!this.isRoot&&1!==this.layerIndex||(e=0,this._lines.length>0&&(this._lines.forEach(t=>{t.remove()}),this._lines=[])),e>this._lines.length?new Array(e-this._lines.length).fill(0).forEach(()=>{this._lines.push(this.lineDraw.path())}):e<this._lines.length&&(this._lines.slice(e).forEach(t=>{t.remove()}),this._lines=this._lines.slice(0,e)),i.renderLine(this,this._lines,(...t)=>{this.styleLine(...t)},this.style.getStyle("lineStyle",!0)),t&&this.children&&this.children.length>0&&this.children.forEach(e=>{e.renderLine(t)})}getShape(){return this.mindMap.themeConfig.nodeUseLineStyle?X["a"].SHAPE.RECTANGLE:this.style.getStyle("shape",!1,!1)}hasCustomPosition(){return void 0!==this.customLeft&&void 0!==this.customTop}ancestorHasCustomPosition(){let t=this;while(t){if(t.hasCustomPosition())return!0;t=t.parent}return!1}ancestorHasGeneralization(){let t=this.parent;while(t){if(t.checkHasGeneralization())return!0;t=t.parent}return!1}addChildren(t){this.children.push(t)}styleLine(t,e,i){const{enableInheritAncestorLineStyle:n}=this.mindMap.opt,o=n?"getSelfInhertStyle":"getSelfStyle",r=e[o]("lineWidth")||e.getStyle("lineWidth",!0),s=e[o]("lineColor")||this.getRainbowLineColor(e)||e.getStyle("lineColor",!0),a=e[o]("lineDasharray")||e.getStyle("lineDasharray",!0);this.style.line(t,{width:r,color:s,dasharray:a},i,e)}getRainbowLineColor(t){return this.mindMap.rainbowLines?this.mindMap.rainbowLines.getNodeColor(t):""}removeLine(){this._lines.forEach(t=>{t.remove()}),this._lines=[]}isAncestor(t){if(this.uid===t.uid)return!1;let e=t.parent;while(e){if(this.uid===e.uid)return!0;e=e.parent}return!1}isParent(t){if(this.uid===t.uid)return!1;const e=t.parent;return!(!e||this.uid!==e.uid)}isBrother(t){return!(!this.parent||this.uid===t.uid)&&this.parent.children.find(e=>e.uid===t.uid)}getIndexInBrothers(){return this.parent&&this.parent.children?this.parent.children.findIndex(t=>t.uid===this.uid):-1}getPaddingVale(){return{paddingX:this.getStyle("paddingX"),paddingY:this.getStyle("paddingY")}}getStyle(t,e){const i=this.style.merge(t,e);return void 0===i?"":i}getSelfStyle(t){return this.style.getSelfStyle(t)}getParentSelfStyle(t){return this.parent?this.parent.getSelfStyle(t)||this.parent.getParentSelfStyle(t):null}getSelfInhertStyle(t){return this.getSelfStyle(t)||this.getParentSelfStyle(t)}getBorderWidth(){return this.style.merge("borderWidth",!1)||0}getData(t){return t?this.nodeData.data[t]:this.nodeData.data}getPureData(t=!0,e=!1){return Object(s["q"])({},this,t,e)}getAncestorNodes(){const t=[];let e=this.parent;while(e)t.unshift(e),e=e.parent;return t}hasCustomStyle(){return this.style.hasCustomStyle()}getRect(){return this.group?this.group.rbox():null}getRectInSvg(){const{scaleX:t,scaleY:e,translateX:i,translateY:n}=this.mindMap.draw.transform();let{left:o,top:r,width:s,height:a}=this;const h=(o+s)*t+i,d=(r+a)*e+n;return o=o*t+i,r=r*e+n,{left:o,right:h,top:r,bottom:d,width:s*t,height:a*e}}highlight(){this.group&&this.group.addClass("smm-node-highlight")}closeHighlight(){this.group&&this.group.removeClass("smm-node-highlight")}fakeClone(){const t=new jt({...this.opt,uid:Object(s["u"])()});return Object.keys(this).forEach(e=>{t[e]=this[e]}),t}createSvgTextNode(t=""){return(new r["j"]).text(t)}getSvgObjects(){return{SVG:r["i"],G:r["d"],Rect:r["h"]}}checkEnableDragModifyNodeWidth(){const{enableDragModifyNodeWidth:t}=this.mindMap.opt;return t&&this.mindMap.richText}hasCustomWidth(){return void 0!==this.customTextWidth}getChildrenLength(){return this.nodeData.children?this.nodeData.children.length:0}getLayoutInstance(){if(this.renderer.isMultiRoot){let t=this;while(t.parent)t=t.parent;if(t._layoutInstance)return t._layoutInstance}return this.renderer.layout}}var Gt=e["a"]=jt},"13cc":function(t,e,i){"use strict";var n={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)"}},o={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)"}},r={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)"}},s={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"}},a={lineColor:"rgb(75, 81, 78)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",backgroundColor:"rgb(27, 31, 34)",root:{fillColor:"rgb(36, 179, 96)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"rgb(254, 199, 13)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"rgb(204, 204, 204)"},generalization:{fillColor:"transparent",borderColor:"rgb(255, 119, 34)",borderWidth:2,color:"rgb(204, 204, 204)"}},h={lineColor:"rgb(17, 68, 23)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#fff",backgroundColor:"rgb(15, 16, 17)",root:{fillColor:"rgb(28, 178, 43)",color:"#fff",fontSize:24,borderRadius:10},second:{fillColor:"rgb(55, 56, 58)",color:"rgb(147,148,149)",fontSize:18,borderRadius:10,borderWidth:0},node:{fontSize:14,color:"rgb(147, 148, 149)"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#333"}},d={lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(58, 65, 68)",backgroundImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=",backgroundRepeat:"repeat",backgroundSize:"auto",root:{fillColor:"rgb(233, 223, 152)",color:"#333",fontSize:24,borderRadius:21},second:{fillColor:"rgb(164, 197, 192)",borderColor:"transparent",color:"#333",fontSize:16,borderRadius:10},node:{fontSize:12,color:"#fff",fontWeight:"bold"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#333"}},l={backgroundColor:"rgb(27, 31, 34)",lineColor:"rgb(75, 81, 78)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",root:{fillColor:"rgb(36, 179, 96)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(254, 199, 13)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(204, 204, 204)"},generalization:{fontSize:14,fillColor:"rgb(27, 31, 34)",borderColor:"rgb(255, 119, 34)",borderWidth:2,color:"rgb(204, 204, 204)"}},c={backgroundColor:"rgb(32, 37, 49)",lineColor:"rgb(137, 167, 196)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",root:{fillColor:"rgb(23, 153, 243)",color:"rgb(255, 255, 255)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(70, 78, 94)",color:"rgb(209, 210, 210)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(204, 204, 204)"},generalization:{fontSize:14,fillColor:"rgb(255, 119, 34)",borderColor:"",borderWidth:2,color:"#fff"}},u={backgroundColor:"rgb(18, 20, 20)",lineColor:"rgb(205, 186, 156)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(245, 224, 191)",root:{fillColor:"rgb(255, 208, 124)",color:"rgb(111, 61, 6)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(66, 57, 46)",color:"rgb(225, 201, 158)",borderColor:"rgb(245, 224, 191)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(231, 203, 155)"},generalization:{fontSize:14,fillColor:"rgb(56, 45, 34)",borderColor:"rgb(104, 84, 61)",borderWidth:2,color:"rgb(242, 216, 176)"}},f={backgroundColor:"#070616",lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",root:{fillColor:"#ff6811",color:"#110501",borderColor:"#ff6811",borderWidth:0,fontSize:24},second:{fillColor:"#070616",color:"#a9a4a9",borderColor:"#ff6811",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#a9a4a9"},generalization:{fontSize:14,fillColor:"",borderColor:"#ff6811",borderWidth:2,color:"#a9a4a9"}},p={backgroundColor:"#16181d",lineColor:"#7da578",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#7da578",associativeLineColor:"#7da578",associativeLineTextColor:"#9ce81d",associativeLineActiveColor:"#9ce81d",root:{fillColor:"#9ce81d",color:"#15521b",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"#24272f",color:"#97b65e",borderColor:"#80a97a",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#789e73"},generalization:{fontSize:14,fillColor:"#9ce81d",borderColor:"",borderWidth:0,color:"#13501b"}},g={backgroundColor:"#051422",lineColor:"#55dff3",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#55dff3",associativeLineColor:"#55dff3",associativeLineTextColor:"#78b3ff",associativeLineActiveColor:"#78b3ff",root:{fillColor:"#55dff3",color:"#0f4956",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"#0b1632",color:"#fff",borderColor:"#78b3ff",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#78b3ff"},generalization:{fontSize:14,fillColor:"#55dff3",borderColor:"",borderWidth:0,color:"#0f4956"}},m={backgroundColor:"#192b3b",lineColor:"#4986bc",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#4986bc",associativeLineColor:"#4986bc",associativeLineTextColor:"#679fba",associativeLineActiveColor:"#679fba",root:{fillColor:"#3462b0",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"#679fba",color:"#fff",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"#679fba"},generalization:{fontSize:14,fillColor:"#3462b0",borderColor:"",borderWidth:0,color:"#fff"}},b=[{name:"脑图经典",value:"classic",theme:d},{name:"黑色幽默",value:"blackHumour",theme:l},{name:"深夜办公室",value:"lateNightOffice",theme:c},{name:"黑金",value:"blackGold",theme:u},{name:"橙汁",value:"orangeJuice",theme:f},{name:"霓虹灯",value:"neonLamp",theme:n},{name:"暗夜冰刃",value:"darkNightLceBlade",theme:o},{name:"暗色",value:"dark",theme:h},{name:"暗色2",value:"dark2",theme:a},{name:"暗色3",value:"dark3",theme:r},{name:"暗色4",value:"dark4",theme:s},{name:"暗色5",value:"dark5",theme:p},{name:"暗色6",value:"dark6",theme:g},{name:"暗色7",value:"dark7",theme:m}].map(t=>({...t,dark:!0})),x={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)"}},y={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"}},w={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)"}},C={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)"}},v={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)"}},_={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)"}},M={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"}},E={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)"}},N={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)"}},T={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"}},L={lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(80, 156, 170)",root:{fillColor:"#fff",borderColor:"",borderWidth:0,color:"rgb(65, 89, 158)"},second:{fillColor:"rgb(251, 227, 188)",color:"rgb(65, 89, 158)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"rgb(65, 89, 158)"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"rgb(65, 89, 158)"}},S={lineColor:"rgb(51, 51, 51)",lineWidth:2,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",backgroundColor:"#fff",root:{fillColor:"rgb(18, 187, 55)",color:"#fff",fontSize:24,borderRadius:10},second:{fillColor:"rgb(241, 242, 241)",borderColor:"transparent",color:"#1a1a1a",fontSize:18,borderRadius:10},node:{fontSize:14,color:"#1a1a1a"},generalization:{fillColor:"#fff",borderColor:"rgb(51, 51, 51)",borderWidth:2,color:"#1a1a1a"}},D={lineColor:"rgb(94, 202, 110)",lineWidth:2,generalizationLineWidth:3,generalizationLineColor:"#1a1a1a",backgroundColor:"rgb(241, 241, 241)",root:{fillColor:"rgb(255, 245, 214)",color:"#1a1a1a",fontSize:24,borderRadius:10,borderColor:"rgb(249, 199, 84)",borderWidth:1},second:{fillColor:"rgb(255, 245, 214)",borderColor:"rgb(249, 199, 84)",borderWidth:1,color:"#1a1a1a",fontSize:18,borderRadius:10},node:{fontSize:14,color:"#1a1a1a"},generalization:{fillColor:"#fff",borderColor:"#1a1a1a",color:"#1a1a1a",borderWidth:2}},R={lineColor:"rgb(123, 199, 120)",backgroundColor:"rgb(236, 245, 231)",generalizationLineWidth:2,generalizationLineColor:"rgb(123, 199, 120)",root:{fillColor:"rgb(253, 244, 217)",color:"#222"},second:{fillColor:"rgb(253, 244, 217)",color:"#222",borderColor:"rgb(242, 200, 104)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"rgb(123, 199, 120)",borderColor:"transparent",borderWidth:2,color:"#fff"}},z={lineColor:"rgb(51, 51, 51)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(51, 51, 51)",backgroundColor:"rgb(239, 248, 250)",root:{fillColor:"rgb(255, 255, 255)",color:"#222"},second:{fillColor:"rgb(255, 255, 255)",color:"#222",borderColor:"rgb(255, 255, 255)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"rgb(51, 51, 51)",color:"#333"}},A={lineColor:"rgb(115, 161, 191)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(115, 161, 191)"},second:{fillColor:"rgb(238, 243, 246)",color:"#333",borderColor:"rgb(115, 161, 191)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}},O={lineColor:"rgb(191, 115, 148)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 115, 148)"},second:{fillColor:"rgb(246, 238, 242)",color:"#333",borderColor:"rgb(191, 115, 148)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}},k={lineColor:"rgb(191, 147, 115)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 147, 115)"},second:{fillColor:"rgb(246, 242, 238)",color:"#333",borderColor:"rgb(191, 147, 115)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}},I={lineColor:"#333",backgroundColor:"#d1f6ec",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"#1fb27d"},second:{fillColor:"#fff",color:"#565656",borderColor:"transparent",borderWidth:0},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}},B={lineColor:"rgb(191, 115, 115)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 115, 115)"},second:{fillColor:"rgb(246, 238, 238)",color:"#333",borderColor:"rgb(191, 115, 115)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}},F={lineColor:"rgb(123, 115, 191)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(123, 115, 191)"},second:{fillColor:"rgb(239, 238, 246)",color:"#333",borderColor:"rgb(123, 115, 191)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}},P={lineColor:"rgb(166, 101, 106)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(255, 208, 211)",root:{fillColor:"rgb(139, 109, 225)",borderColor:"",borderWidth:0},second:{fillColor:"rgb(243, 104, 138)",color:"#fff",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#222"}},W={lineColor:"rgb(104, 204, 202)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(90, 206, 241)",backgroundColor:"rgb(239, 255, 255)",root:{fillColor:"rgb(0, 192, 184)",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"#222",borderColor:"rgb(184, 235, 233)",borderWidth:2,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(90, 206, 241)",borderColor:"transparent",color:"#fff"}},H={lineColor:"rgb(51, 56, 62)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(127, 93, 64)",backgroundColor:"#fff",root:{fillColor:"rgb(51, 56, 62)",color:"rgb(247, 208, 160)",borderColor:"",borderWidth:0},second:{fillColor:"rgb(239, 209, 176)",color:"rgb(81, 58, 42)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(127, 93, 64)",borderColor:"transparent",color:"rgb(255, 214, 175)"}},j={lineColor:"rgb(254, 146, 0)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 222, 69)",backgroundColor:"rgb(255, 246, 243)",root:{fillColor:"rgb(255, 112, 52)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"rgb(51, 51, 51)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(255, 222, 69)",borderColor:"transparent",color:"rgb(51, 51, 51)"}},G={lineColor:"rgb(40, 193, 84)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(251, 158, 0)",backgroundColor:"rgb(238, 255, 243)",root:{fillColor:"rgb(25, 193, 73)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"rgb(69, 149, 96)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"#fff",borderColor:"rgb(251, 158, 0)",borderWidth:2,color:"rgb(51, 51, 51)"}},$={lineColor:"rgb(30, 53, 86)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(56, 123, 233)",backgroundColor:"rgb(241, 241, 241)",root:{fillColor:"rgb(30, 53, 86)",color:"#fff",fontSize:24,borderRadius:10,borderColor:"rgb(189, 197, 201)",borderWidth:2},second:{fillColor:"rgb(169, 218, 218)",borderColor:"rgb(30, 53, 86)",borderWidth:2,color:"#fff",fontSize:18,borderRadius:10},node:{fontSize:14,color:"rgb(30, 53, 86)",borderColor:"rgb(30, 53, 86)",borderWidth:1,marginY:20},generalization:{fillColor:"rgb(56, 123, 233)",borderColor:"rgb(56, 123, 233)",color:"#fff",borderWidth:0}},U={lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#222",backgroundColor:"rgb(248, 215, 49)",root:{fillColor:"rgb(55, 165, 255)",borderColor:"rgb(51, 51, 51)",borderWidth:3},second:{fillColor:"rgb(255, 160, 36)",color:"#222",borderColor:"rgb(51, 51, 51)",borderWidth:3,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{borderColor:"#222",borderWidth:3,color:"#222"}},Y={lineColor:"rgb(34, 34, 34)",lineWidth:4,generalizationLineWidth:4,generalizationLineColor:"rgb(34, 34, 34)",root:{fillColor:"#fff",color:"rgb(34, 34, 34)",borderColor:"rgb(34, 34, 34)",borderWidth:3,fontSize:24},second:{fillColor:"rgb(241, 246, 248)",color:"rgb(34, 34, 34)",borderColor:"rgb(34, 34, 34)",borderWidth:3,fontSize:18},node:{fontSize:14,color:"rgb(34, 34, 34)"},generalization:{fontSize:14,fillColor:"transparent",borderColor:"rgb(34, 34, 34)",borderWidth:2,color:"rgb(34, 34, 34)"}},X={lineColor:"rgb(113, 195, 169)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(113, 195, 169)",root:{fillColor:"rgb(16, 160, 121)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(240, 252, 249)",color:"rgb(50, 113, 96)",borderColor:"rgb(113, 195, 169)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(10, 59, 43)"},generalization:{fontSize:14,fillColor:"rgb(246, 238, 211)",borderColor:"",borderWidth:0,color:"rgb(173, 91, 12)"}},V={lineColor:"rgb(173, 123, 91)",lineWidth:4,generalizationLineWidth:4,generalizationLineColor:"rgb(173, 123, 91)",root:{fillColor:"rgb(202, 117, 79)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(245, 231, 216)",color:"rgb(125, 86, 42)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(96, 71, 47)"},generalization:{fontSize:14,fillColor:"rgb(255, 249, 239)",borderColor:"rgb(173, 123, 91)",borderWidth:2,color:"rgb(122, 83, 44)"}},K={backgroundColor:"rgb(255, 238, 228)",lineColor:"rgb(230, 138, 131)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(222, 101, 85)",root:{fillColor:"rgb(207, 44, 44)",color:"rgb(255, 233, 157)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(255, 255, 255)",color:"rgb(211, 58, 21)",borderColor:"rgb(222, 101, 85)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(144, 71, 43)"},generalization:{fontSize:14,fillColor:"rgb(255, 247, 211)",borderColor:"rgb(255, 202, 162)",borderWidth:2,color:"rgb(187, 101, 69)"}},q={backgroundColor:"#e6f1de",lineColor:"#f5ffad",lineWidth:4,generalizationLineWidth:3,generalizationLineColor:"#749336",root:{fillColor:"#94c143",color:"#fff",borderColor:"#94c143",borderWidth:0,fontSize:24},second:{fillColor:"#cee498",color:"#749336",borderColor:"#aec668",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#749336"},generalization:{fontSize:14,fillColor:"#cee498",borderColor:"#aec668",borderWidth:2,color:"#749336"}},Z={backgroundColor:"#fff2df",lineColor:"#b0bc47",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#b0bc47",root:{fillColor:"#e68112",color:"#fff",borderColor:"#e68112",borderWidth:0,fontSize:24},second:{fillColor:"#ffd683",color:"#8c5416",borderColor:"#b0bc47",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#8c5416"},generalization:{fontSize:14,fillColor:"#ffd683",borderColor:"#b0bc47",borderWidth:2,color:"#8c5416"}},Q={backgroundColor:"#fff",lineColor:"#36aaa9",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#36aaa9",associativeLineColor:"#3e58ea",associativeLineTextColor:"#679fba",associativeLineActiveColor:"#50a4b4",root:{fillColor:"#3e58ea",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"#e3fbff",color:"#58aabc",borderColor:"#50a4b4",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#50a4b4"},generalization:{fontSize:14,fillColor:"#3e58ea",borderColor:"",borderWidth:0,color:"#fff"}},J={backgroundColor:"#fffcf2",lineColor:"#333333",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#ffda60",associativeLineColor:"#ffda60",associativeLineTextColor:"#333333",associativeLineActiveColor:"#333333",root:{fillColor:"#ffda60",color:"#3b3a37",borderColor:"#343334",borderWidth:2,fontSize:24},second:{fillColor:"#fff",color:"#131312",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"#131312"},generalization:{fontSize:14,fillColor:"#ffda60",borderColor:"",borderWidth:0,color:"#464339"}},tt={backgroundColor:"#fffef6",lineColor:"#273d62",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#273d62",associativeLineColor:"#9edeee",associativeLineTextColor:"#395c85",associativeLineActiveColor:"#273d62",root:{fillColor:"#273d62",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"#9edeee",color:"#406080",borderColor:"#395c85",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#395c85"},generalization:{fontSize:14,fillColor:"#273d62",borderColor:"",borderWidth:0,color:"#fff"}},et={backgroundColor:"#ffffff",lineColor:"#333333",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#2176ef",associativeLineColor:"#2176ef",associativeLineTextColor:"#343433",associativeLineActiveColor:"#343433",root:{fillColor:"#2176ef",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"#fff9e4",color:"#4c4b46",borderColor:"#343433",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#343433"},generalization:{fontSize:14,fillColor:"#2176ef",borderColor:"",borderWidth:0,color:"#fff"}},it={backgroundColor:"#ffffff",lineColor:"#35b398",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#21c384",associativeLineColor:"#21c384",associativeLineTextColor:"#4d754b",associativeLineActiveColor:"#f5ffe6",root:{fillColor:"#21c384",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"#f5ffe6",color:"#386437",borderColor:"#35b398",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#326032"},generalization:{fontSize:14,fillColor:"#21c384",borderColor:"",borderWidth:0,color:"#fff"}},nt={backgroundColor:"#ffffff",lineColor:"#333333",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#ffd613",associativeLineColor:"#ffd613",associativeLineTextColor:"#2d2b23",associativeLineActiveColor:"#d1ebf8",root:{fillColor:"#ffd613",color:"#2d2b23",borderColor:"#1f2021",borderWidth:2,fontSize:24},second:{fillColor:"#d1ebf8",color:"#717b80",borderColor:"#333333",borderWidth:2,fontSize:18,borderRadius:5},node:{fontSize:14,color:"#333333"},generalization:{fontSize:14,fillColor:"#ffd613",borderColor:"",borderWidth:0,color:"#2d2b23"}},ot={backgroundColor:"#ffeed2",lineColor:"#976a43",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#19807e",associativeLineColor:"#19807e",associativeLineTextColor:"#764014",associativeLineActiveColor:"#976a43",root:{fillColor:"#19807e",color:"#f3f0b8",borderColor:"",borderWidth:0,fontSize:24,shape:"circle"},second:{fillColor:"#eacdb3",color:"#7f4d1f",borderColor:"#764014",borderWidth:2,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"#764014"},generalization:{fontSize:14,fillColor:"#19807e",borderColor:"",borderWidth:0,color:"#f3f0b8"}},rt={backgroundColor:"#c8e4ea",lineColor:"#3e416c",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#3e416c",associativeLineColor:"#ffdb9c",associativeLineTextColor:"#383b70",associativeLineActiveColor:"#3e416c",root:{fillColor:"#383b70",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"#ffdb9c",color:"#5e5c76",borderColor:"#3e416c",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#3e416c"},generalization:{fontSize:14,fillColor:"#383b70",borderColor:"",borderWidth:0,color:"#fff"}},st=[{name:"天清绿",value:"skyGreen",theme:L},{name:"经典绿",value:"classicGreen",theme:R},{name:"经典蓝",value:"classicBlue",theme:z},{name:"天空蓝",value:"blueSky",theme:A},{name:"脑残粉",value:"brainImpairedPink",theme:O},{name:"泥土黄",value:"earthYellow",theme:k},{name:"清新绿",value:"freshGreen",theme:I},{name:"清新红",value:"freshRed",theme:B},{name:"浪漫紫",value:"romanticPurple",theme:F},{name:"粉红葡萄",value:"pinkGrape",theme:P},{name:"薄荷",value:"mint",theme:W},{name:"金色vip",value:"gold",theme:H},{name:"活力橙",value:"vitalityOrange",theme:j},{name:"绿叶",value:"greenLeaf",theme:G},{name:"小黄人",value:"minions",theme:U},{name:"简约黑",value:"simpleBlack",theme:Y},{name:"课程绿",value:"courseGreen",theme:X},{name:"咖啡",value:"coffee",theme:V},{name:"红色精神",value:"redSpirit",theme:K},{name:"牛油果",value:"avocado",theme:q},{name:"秋天",value:"autumn",theme:Z},{name:"奥利奥",value:"oreo",theme:x},{name:"浅海",value:"shallowSea",theme:y},{name:"柠檬气泡",value:"lemonBubbles",theme:w},{name:"玫瑰",value:"rose",theme:C},{name:"海蓝线",value:"seaBlueLine",theme:v},{name:"莫兰迪",value:"morandi",theme:_},{name:"仙人掌",value:"cactus",theme:T},{name:"脑图经典2",value:"classic2",theme:S},{name:"脑图经典3",value:"classic3",theme:D},{name:"脑图经典4",value:"classic4",theme:$},{name:"脑图经典5",value:"classic5",theme:M},{name:"脑图经典6",value:"classic6",theme:E},{name:"脑图经典7",value:"classic7",theme:N},{name:"脑图经典8",value:"classic8",theme:Q},{name:"脑图经典9",value:"classic9",theme:J},{name:"脑图经典10",value:"classic10",theme:tt},{name:"脑图经典11",value:"classic11",theme:et},{name:"脑图经典12",value:"classic12",theme:it},{name:"脑图经典13",value:"classic13",theme:nt},{name:"脑图经典14",value:"classic14",theme:ot},{name:"脑图经典15",value:"classic15",theme:rt}].map(t=>({...t,dark:!1}));const at=[...b,...st],ht={darkList:b,lightList:st,init(t){at.forEach(e=>{t.defineTheme(e.value,e.theme)})},remove(t){at.forEach(e=>{t.removeTheme(e.value)})}};e["a"]=ht},"13d5":function(t,e,i){"use strict";var n=i("23e7"),o=i("d58f").left,r=i("a640"),s=i("2d00"),a=i("605d"),h=!a&&s>79&&s<83,d=h||!r("reduce");n({target:"Array",proto:!0,forced:d},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},"14d0":function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return r}));i("14d9");var n=i("8a19"),o=i("6f5e");class r{constructor(t){this.node=t,this.mindMap=t.mindMap,this.connectors=[],this.config={...o["FLOWCHART_DEFAULT_CONFIG"],...t.nodeData.data.flowchart||{}}}renderConnectors(){if(!this.config.showConnectors)return;this.clearConnectors();const{width:t,height:e}=this.node,i=this.config.connectorPositions||["top","right","bottom","left"];i.forEach(i=>{const n=this.createConnector(i,t,e);n&&this.connectors.push(n)})}createConnector(t,e,i){const o=this.config.connectorSize,r=this.config.connectorColor,{x:s,y:a}=this.getConnectorPosition(t,e,i),h=(new n["b"]).size(o).fill(r).stroke({color:"#fff",width:2}).center(s,a).css({cursor:"crosshair",opacity:.3,transition:"opacity 0.2s","pointer-events":"all","z-index":1e3}).addClass("smm-flowchart-connector").addClass("smm-flowchart-connector-"+t);return h.data("position",t),h.data("nodeUid",this.node.uid),this.bindConnectorEvents(h),this.node.group.add(h),h.front(),h}getConnectorPosition(t,e,i){const n=this.config.connectorSize/2,o={top:{x:e/2,y:-n},right:{x:e+n,y:i/2},bottom:{x:e/2,y:i+n},left:{x:-n,y:i/2}};return o[t]||{x:0,y:0}}bindConnectorEvents(t){t.on("mouseenter",()=>{t.animate(100).attr({opacity:1}),t.fill(this.config.connectorActiveColor)}),t.on("mouseleave",()=>{this.isDragging||(t.animate(100).attr({opacity:.3}),t.fill(this.config.connectorColor))}),t.on("click",e=>{e.stopPropagation(),this.mindMap.emit("flowchart_connector_click",{connector:t,node:this.node,position:t.data("position")})}),t.on("mousedown",e=>{e.stopPropagation(),this.mindMap.emit("flowchart_connector_drag_start",{connector:t,node:this.node,position:t.data("position"),event:e})})}showConnectors(){this.connectors.forEach(t=>{t.animate(200).attr({opacity:1}),t.stroke({color:this.config.connectorActiveColor,width:2})})}hideConnectors(){this.connectors.forEach(t=>{t.animate(200).attr({opacity:.3}),t.stroke({color:"#fff",width:2})})}clearConnectors(){this.connectors.forEach(t=>{t.remove()}),this.connectors=[]}updateConnectorPositions(){const{width:t,height:e}=this.node;this.connectors.forEach(i=>{const n=i.data("position"),{x:o,y:r}=this.getConnectorPosition(n,t,e);i.center(o,r)})}getConnectorByPosition(t){return this.connectors.find(e=>e.data("position")===t)}getConnectorAbsolutePosition(t){const e=this.getConnectorByPosition(t);if(!e)return null;const{x:i,y:n}=this.getConnectorPosition(t,this.node.width,this.node.height);return{x:this.node.left+i,y:this.node.top+n}}}},"1e42":function(t,e,i){"use strict";i.d(e,"Db",(function(){return l})),i.d(e,"d",(function(){return c})),i.d(e,"vb",(function(){return u})),i.d(e,"ub",(function(){return f})),i.d(e,"Q",(function(){return p})),i.d(e,"yb",(function(){return g})),i.d(e,"r",(function(){return m})),i.d(e,"q",(function(){return b})),i.d(e,"Z",(function(){return x})),i.d(e,"ob",(function(){return y})),i.d(e,"y",(function(){return w})),i.d(e,"Bb",(function(){return C})),i.d(e,"w",(function(){return v})),i.d(e,"c",(function(){return _})),i.d(e,"x",(function(){return M})),i.d(e,"e",(function(){return E})),i.d(e,"kb",(function(){return N})),i.d(e,"j",(function(){return T})),i.d(e,"R",(function(){return S})),i.d(e,"pb",(function(){return D})),i.d(e,"I",(function(){return R})),i.d(e,"u",(function(){return z})),i.d(e,"hb",(function(){return A})),i.d(e,"rb",(function(){return O})),i.d(e,"fb",(function(){return I})),i.d(e,"h",(function(){return F})),i.d(e,"tb",(function(){return W})),i.d(e,"gb",(function(){return H})),i.d(e,"eb",(function(){return j})),i.d(e,"U",(function(){return G})),i.d(e,"lb",(function(){return Y})),i.d(e,"Ab",(function(){return V})),i.d(e,"sb",(function(){return q})),i.d(e,"bb",(function(){return Z})),i.d(e,"O",(function(){return Q})),i.d(e,"g",(function(){return J})),i.d(e,"cb",(function(){return tt})),i.d(e,"jb",(function(){return et})),i.d(e,"S",(function(){return it})),i.d(e,"nb",(function(){return nt})),i.d(e,"o",(function(){return ot})),i.d(e,"A",(function(){return rt})),i.d(e,"wb",(function(){return st})),i.d(e,"a",(function(){return at})),i.d(e,"v",(function(){return ht})),i.d(e,"B",(function(){return dt})),i.d(e,"J",(function(){return lt})),i.d(e,"K",(function(){return ct})),i.d(e,"F",(function(){return ut})),i.d(e,"Y",(function(){return ft})),i.d(e,"db",(function(){return pt})),i.d(e,"f",(function(){return gt})),i.d(e,"xb",(function(){return mt})),i.d(e,"H",(function(){return bt})),i.d(e,"qb",(function(){return xt})),i.d(e,"X",(function(){return yt})),i.d(e,"i",(function(){return wt})),i.d(e,"G",(function(){return Ct})),i.d(e,"t",(function(){return vt})),i.d(e,"n",(function(){return _t})),i.d(e,"k",(function(){return Mt})),i.d(e,"l",(function(){return Et})),i.d(e,"m",(function(){return Nt})),i.d(e,"W",(function(){return Tt})),i.d(e,"mb",(function(){return Lt})),i.d(e,"Cb",(function(){return St})),i.d(e,"T",(function(){return Dt})),i.d(e,"P",(function(){return Rt})),i.d(e,"V",(function(){return zt})),i.d(e,"N",(function(){return At})),i.d(e,"L",(function(){return Ot})),i.d(e,"E",(function(){return It})),i.d(e,"D",(function(){return Bt})),i.d(e,"z",(function(){return Ft})),i.d(e,"s",(function(){return Pt})),i.d(e,"C",(function(){return Wt})),i.d(e,"b",(function(){return Ht})),i.d(e,"zb",(function(){return jt})),i.d(e,"ib",(function(){return Gt})),i.d(e,"M",(function(){return $t})),i.d(e,"p",(function(){return Ut})),i.d(e,"ab",(function(){return Yt}));i("14d9"),i("13d5");var n=i("0f9c"),o=i("4013");function r(t){this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(t)}r.prototype.init_genrand=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++)t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0},r.prototype.genrand_int32=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i<this.N-this.M;i++)t=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^t>>>1^e[1&t];for(;i<this.N-1;i++)t=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^t>>>1^e[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};var s=i("8a19"),a=i("682c"),h=i.n(a),d=i("4699");const l=(t,e,i,n,o,r=0,s=0,a=[])=>{let h=!1;if(i&&(h=i(t,e,o,r,s,a)),!h&&t.children&&t.children.length>0){let e=r+1;t.children.forEach((o,r)=>{l(o,t,i,n,!1,e,r,[...a,t])})}n&&n(t,e,o,r,s,a)},c=(t,e)=>{let i=[t],n=!1;"stop"===e(t,null)&&(n=!0);while(i.length){if(n)break;let t=i.shift();t.children&&t.children.length&&t.children.forEach(o=>{n||(i.push(o),"stop"===e(o,t)&&(n=!0))})}},u=(t,e,i,n)=>{let o=[],r=t/e,s=i/n;return o=r>s?[i,i/r]:[r*n,n],o},f=(t,e,i,n)=>{let o=t/e,r=[];if(i&&n)if(t<=i&&e<=n)r=[t,e];else{let t=i/n;r=o>t?[i,i/o]:[o*n,n]}else i?r=t<=i?[t,e]:[i,i/o]:n&&(r=e<=n?[t,e]:[o*n,n]);return r},p=t=>{t=t.replace(/<br>/gim,"\n");let e=document.createElement("div");return e.innerHTML=t,t=e.textContent,t},g=t=>{try{return JSON.parse(JSON.stringify(t))}catch(e){return null}},m=(t,e,i=!1)=>{if(!e||!e.data)return null;if(t.data=g(e.data),i&&t.data){t.data.isActive=!1;const e=Wt(t.data);e.forEach(t=>{t.isActive=!1})}return t.children=[],e.children&&e.children.length>0&&e.children.forEach((e,n)=>{const o=m({},e,i);o&&(t.children[n]=o)}),Object.keys(e).forEach(i=>{["data","children"].includes(i)||/^_/.test(i)||(t[i]=e[i])}),t},b=(t,e,i=!1,n=!0)=>{const o=e.nodeData?e.nodeData:e;return t.data=g(o.data),n?delete t.data.uid:t.data.uid||(t.data.uid=z()),i&&(t.data.isActive=!1),t.children=[],e.children&&e.children.length>0?e.children.forEach((e,o)=>{t.children[o]=b({},e,i,n)}):e.nodeData&&e.nodeData.children&&e.nodeData.children.length>0&&e.nodeData.children.forEach((e,o)=>{t.children[o]=b({},e,i,n)}),Object.keys(o).forEach(e=>{["data","children"].includes(e)||/^_/.test(e)||(t[e]=o[e])}),t},x=(t,e=!1)=>new Promise((i,n)=>{const o=new Image;o.setAttribute("crossOrigin","anonymous"),o.onload=()=>{try{let t=document.createElement("canvas");t.width=o.width,t.height=o.height;let n=t.getContext("2d");n.drawImage(o,0,0,o.width,o.height),e?t.toBlob(t=>{i(t)}):i(t.toDataURL())}catch(t){n(t)}},o.onerror=t=>{n(t)},o.src=t}),y=t=>{if(!/^data:/.test(t))return t;let[e,i]=t.split(","),n=/^data:[^/]+\/([^;]+);/.exec(e),o=n[1];return{type:o,base64:i}},w=(t,e)=>{let i=document.createElement("a");i.href=t,i.download=e,i.click()},C=(t,e=300,i)=>{let n=null;return(...o)=>{n||(n=setTimeout(()=>{t.call(i,...o),n=null},e))}},v=(t,e=300,i)=>{let n=null;return(...o)=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,t.apply(i,o)},e)}},_=(t,e=(()=>{}))=>{let i=0,n=t.length;if(n<=0)return e();let o=()=>{i>=n?e():(t[i](),setTimeout(()=>{i++,o()},0))};o()},M=t=>t*(Math.PI/180),E=t=>t.replace(/([a-z])([A-Z])/g,(...t)=>t[1]+"-"+t[2].toLowerCase());const N=function(t,e){let i=!1,n=null,o=()=>{i=!1,e?t.call(e):t()};if("undefined"!==typeof MutationObserver){let t=1,e=new MutationObserver(o),i=document.createTextNode(t);e.observe(i,{characterData:!0}),n=function(){t=(t+1)%2,i.data=t}}else n=setTimeout;return function(){i||(i=!0,n(o,0))}},T=(t,e,i=0,n=0)=>{let o=t.elRect,{scaleX:r,scaleY:s,translateX:a,translateY:h}=t.draw.transform(),{left:d,top:l,width:c,height:u}=e,f=(d+c)*r+a,p=(l+u)*s+h;d=d*r+a,l=l*s+h;let g=0,m=0;return d<0+i&&(g=-d+i),f>o.width-i&&(g=-(f-o.width)-i),l<0+n&&(m=-l+n),p>o.height-n&&(m=-(p-o.height)-n),{isOuter:0!==g||0!==m,offsetLeft:g,offsetTop:m}};let L=null;const S=t=>(L||(L=document.createElement("div")),L.innerHTML=t,L.textContent),D=t=>new Promise((e,i)=>{let n=new FileReader;n.onload=t=>{e(t.target.result)},n.onerror=t=>{i(t)},n.readAsDataURL(t)});const R=t=>new Promise(e=>{let i=new Image;i.src=t,i.onload=()=>{e({width:i.width,height:i.height})},i.onerror=()=>{e({width:0,height:0})}}),z=()=>{const t=(new Date).toISOString().replace(/[-:TZ]/g,"").replace(".",""),e=Object(n["a"])().split("-")[0];return`kmind-node-${t}-${e}`},A=t=>new Promise((e,i)=>{let n=new FileReader;n.readAsDataURL(t),n.onload=async t=>{let i=t.target.result,n=await R(i);e({url:i,size:n})},n.onerror=t=>{i(t)}}),O=t=>([["&nbsp;","&#160;"]].forEach(e=>{t=t.replace(new RegExp(e[0],"g"),e[1])}),t),k=t=>Object.prototype.toString.call(t).slice(8,-1),I=t=>null===t||void 0===t||""===t;let B=null;const F=t=>{B||(B=document.createElement("div")),B.innerHTML=t;for(let e=B.childNodes,i=e.length;i--;)if(1==e[i].nodeType)return!0;return!1};let P=null;const W=(t,e,i)=>{P||(P=document.createElement("div")),P.innerHTML=t;let n=t=>{let o=t.childNodes;o.forEach(o=>{1===o.nodeType?n(o):3===o.nodeType&&t.replaceChild(document.createTextNode(o.nodeValue.replace(new RegExp(e,"g"),i)),o)})};return n(P),P.innerHTML};const H=t=>(t=String(t).replace(/\s+/g,""),["#fff","#ffffff","#FFF","#FFFFFF","rgb(255,255,255)"].includes(t)||/rgba\(255,255,255,[^)]+\)/.test(t)),j=t=>(t=String(t).replace(/\s+/g,""),["","transparent"].includes(t)||/rgba\(\d+,\d+,\d+,0\)/.test(t)),G=t=>{let{lineColor:e,root:i,second:n,node:o}=t,r=[e,i.fillColor,i.color,n.fillColor,n.color,o.fillColor,o.color,i.borderColor,n.borderColor,o.borderColor];for(let s=0;s<r.length;s++){let t=r[s];if(!j(t)&&!H(t))return t}},$=t=>{const e=t=>{const i=t.childNodes;i.forEach(t=>{1===t.nodeType&&(t.classList.contains("ql-formula")?t.parentNode.removeChild(t):e(t))})};e(t)};let U=null;const Y=t=>{U||(U=document.createElement("div")),U.innerHTML=t;const e=U.childNodes;let i="";for(let n=0;n<e.length;n++){const t=e[n];1===t.nodeType?($(t),"p"===t.tagName.toLowerCase()?i+=t.textContent+"\n":i+=t.textContent):3===t.nodeType&&(i+=t.nodeValue)}return i.replace(/\n$/,"")};let X=null;const V=t=>{X||(X=document.createElement("div")),X.innerHTML=t;const e=X.childNodes;let i=[],n="";for(let o=0;o<e.length;o++){const t=e[o];1===t.nodeType?"br"===t.tagName.toLowerCase()?(i.push(n),n=""):n+=t.textContent:3===t.nodeType&&(n+=t.nodeValue)}return n&&i.push(n),i.map(t=>`<p><span>${ft(t)}</span></p>`).join("")};let K=null;const q=t=>{K||(K=document.createElement("div")),K.innerHTML=t;const e=K.querySelectorAll(".ql-formula");Array.from(e).forEach(t=>{const e=document.createTextNode("$smmformula$");t.parentNode.replaceChild(e,t)});const i=K.childNodes;let n=[];for(let o=0;o<i.length;o++){const t=i[o];1===t.nodeType?n.push(t.textContent):3===t.nodeType&&n.push(t.nodeValue)}if(t=n.map(t=>`<p><span>${ft(t)}</span></p>`).join(""),e.length>0){t=t.replace(/\$smmformula\$/g,'<span class="smmformula"></span>'),K.innerHTML=t;const i=K.querySelectorAll(".smmformula");Array.from(i).forEach((t,i)=>{t.parentNode.replaceChild(e[i],t)}),t=K.innerHTML}return t},Z=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Q=(t,e)=>{const i={};return Object.keys(e).forEach(n=>{const o=t[n],r=e[n];if(k(o)===k(r)){if("Object"===k(o)){if(JSON.stringify(o)!==JSON.stringify(r))return void(i[n]=r)}else if(o!==r)return void(i[n]=r)}else i[n]=r}),i},J=t=>!/^_/.test(t)&&!o["g"].includes(t),tt=t=>{const e=[...d["c"]],i=Object.keys(t);for(let n=0;n<i.length;n++)if(!e.includes(i[n]))return!1;return!0},et=t=>t.reduce((t,e)=>{const i=t.find(t=>t.type===e.type);return i?e.list.forEach(t=>{const e=i.list.find(e=>e.name===t.name);e?e.icon=t.icon:i.list.push(t)}):t.push({...e}),t},[]),it=t=>{let e=[];return t.forEach(i=>{t.find(t=>t.uid!==i.uid&&t.isAncestor(i))||e.push(i)}),e},nt=t=>{const e={},i={};t.forEach(t=>{const n=t.parent;if(n){const o=n.uid;i[o]=n;const r=t.getIndexInBrothers(),s={node:t,index:r};e[o]?e[o].find(t=>t.index===s.index)||e[o].push(s):e[o]=[s]}});const n=[];return Object.keys(e).forEach(t=>{if(e[t].length>1){const o=e[t].map(t=>t.index).sort((t,e)=>t-e);n.push({node:i[t],range:[o[0],o[o.length-1]]})}else n.push({node:e[t][0].node})}),n},ot=(t,e,i,n,o,r,s,a)=>e>o&&r>t&&n>s&&a>i,rt=t=>{let e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),i.collapse(),e.removeAllRanges(),e.addRange(i)},st=t=>{let e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),e.removeAllRanges(),e.addRange(i)},at=(t,e={})=>{e={...e};const i=e&&e.richText;i&&e.resetRichText&&delete e.resetRichText;const n=t=>{t.forEach(t=>{t.data={...t.data,...e},t.children&&t.children.length>0&&n(t.children)})};return n(t),t},ht=(t,e=!1,i=null,n=!1)=>{const o=t=>{t.forEach(t=>{if(t.data||(t.data={}),(e||I(t.data.uid))&&(t.data.uid=z()),n){const i=Wt(t.data);i.forEach(t=>{(e||I(t.uid))&&(t.uid=z())})}i&&i(t),t.children&&t.children.length>0&&o(t.children)})};return o(t),t},dt=t=>t?Array.isArray(t)?t:[t]:[],lt=t=>t.parent?t.parent.nodeData.children.findIndex(e=>e.data.uid===t.uid):0,ct=(t,e)=>e.findIndex(e=>e.uid===t.uid),ut=t=>{let e=0;for(let o=0;o<t.length;o++)e=t.charCodeAt(o)+((e<<5)-e);const i=new r(e),n=i.genrand_int32()%360;return"hsla("+n+", 50%, 50%, 1)"},ft=t=>([["&","&amp;"],["<","&lt;"],[">","&gt;"]].forEach(e=>{t=t.replace(new RegExp(e[0],"g"),e[1])}),t),pt=(t,e)=>{const i=k(t);if(i!==k(e))return!1;if("Object"===i){const i=Object.keys(t),n=Object.keys(e);if(i.length!==n.length)return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!n.includes(r))return!1;const s=pt(t[r],e[r]);if(!s)return!1}return!0}if("Array"===i){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++){const n=t[i],o=e[i],r=k(n),s=k(o);if(r!==s)return!1;const a=pt(n,o);if(!a)return!1}return!0}return t===e},gt=()=>navigator.clipboard&&"function"===typeof navigator.clipboard.read,mt=t=>{navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(JSON.stringify(t))},bt=async()=>{let t=null,e=null;if(gt()){const i=await navigator.clipboard.read();if(i&&i.length>0)for(const n of i)for(const i of n.types)if(/^image\//.test(i))e=await n.getType(i);else if("text/plain"===i){const e=await n.getType(i);t=await e.text()}}return{text:t,img:e}},xt=t=>{if(!t||!t.parent)return;const e=lt(t);if(-1===e)return;t.parent.nodeData.children.splice(e,1);const i=t.parent.nodeData.data;if(i&&i.generalization){const t=Array.isArray(i.generalization)?i.generalization:[i.generalization];t.forEach(t=>{if(t&&t.range&&Array.isArray(t.range)&&2===t.range.length){const[i,n]=t.range;e<i?t.range=[i-1,n-1]:e===i?i===n?t._shouldRemove=!0:t.range=[i,n-1]:e>i&&e<=n&&(t.range=[i,n-1])}}),Array.isArray(i.generalization)&&(i.generalization=i.generalization.filter(t=>!t._shouldRemove),i.generalization.forEach(t=>{void 0!==t._shouldRemove&&delete t._shouldRemove}))}},yt=t=>(o["j"].forEach(e=>{t=t.replace(new RegExp(`<${e}([^>]*)>`,"g"),`<${e} $1 />`)}),t),wt=(t,e)=>{if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!e.find(e=>e.uid===t[i].uid))return!1;return!0},Ct=()=>{const t=navigator.userAgent.match(/\s+Chrome\/(.*)\s+/);return t&&t[1]?Number.parseFloat(t[1]):""},vt=t=>({simpleMindMap:!0,data:t}),_t=t=>{let e=null;if("string"===typeof t)try{const i=JSON.parse(t);"object"===typeof i&&i.simpleMindMap&&(e=i.data)}catch(n){}else"object"===typeof t&&t.simpleMindMap&&(e=t.data);const i=!!e;return{isSmm:i,data:i?e:String(t)}},Mt=t=>{var e,i;const n=t.split("-");return 2===n.length&&(14===(null===n||void 0===n||null===(e=n[0])||void 0===e?void 0:e.length)&&7===(null===n||void 0===n||null===(i=n[1])||void 0===i?void 0:i.length))},Et=t=>{let e=!1,i="",n="";return t.startsWith("siyuan://blocks/")&&(e=!0,i=t),{isSiyuanLink:e,siyuanLink:i,siyuanLinkTitle:n}},Nt=t=>{let e=!1,i="",n="",o="";if("string"===typeof t){const r=/<<(assets[/][^/]+\.pdf)[/]([^ ]+) "([^"]+)">>\s*\n*!\[\]\((assets\/[^)]+)\)/,s=t.match(r),a=/<<(assets[/][^/]+\.pdf)[/]([^ ]+) "([^"]+)">>$/,h=t.match(a),d=/<<(assets[/][^/]+\.pdf)[/]([^ ]+) "([^"]*)">>$/,l=t.match(d);if(s||h||l){const t=s||h||l,r=t[1],a=t[2],d=t[3];e=!0,n=d,s&&s[4]&&(o="/"+s[4]);const c={type:"pdf",path:r,id:a};o&&(c.imageUrl=o),i="siyuan://plugins/kmind-plugin?data="+JSON.stringify(c)}}return{isSiyuanPdfUrl:e,siyuanPdfUrl:i,siyuanPdfUrlTitle:n,siyuanPdfImageUrl:o}},Tt=(t,e)=>{t.preventDefault();const i=window.getSelection();if(!i.rangeCount)return;i.deleteFromDocument(),e=e||t.clipboardData.getData("text"),e=ft(e),e=S(e);const n=e.split(/\n/g),o=document.createDocumentFragment();n.forEach((t,e)=>{const i=document.createTextNode(t);if(o.appendChild(i),e<n.length-1){const t=document.createElement("br");o.appendChild(t)}}),i.getRangeAt(0).insertNode(o),i.collapseToEnd()},Lt=t=>t?Array.isArray(t)?t.filter(t=>!!t):t.multiRoot&&Array.isArray(t.roots)?t.roots.filter(t=>!!t):[t]:[],St=t=>{const e={};if(!t)return e;const i=Lt(t),n=(t,i)=>{if(!t||!t.data||!t.data.uid)return;const o=t.data.uid;i&&i.children.push(o),e[o]={isRoot:!i,data:{...t.data},children:[]},t.children&&t.children.length>0&&t.children.forEach(t=>{n(t,e[o])})};return i.forEach(t=>n(t,null)),e},Dt=(t,e,i,n)=>Math.sqrt(Math.pow(t-i,2)+Math.pow(e-n,2)),Rt=(t,e)=>{const i=t.x+t.width/2,n=t.y+t.height/2,o=e.x+e.width/2,r=e.y+e.height/2;return i<o&&n<r?"left-top":i>o&&n<r?"right-top":i>o&&n>r?"right-bottom":i<o&&n>r?"left-bottom":i<o&&n===r?"left":i>o&&n===r?"right":i===o&&n<r?"top":i===o&&n>r?"bottom":"overlap"},zt=({addContentToHeader:t,addContentToFooter:e})=>{const i=[];let n=null,o=0,r=null,s=0;const a=(t,e)=>{if("function"===typeof t){const n=t();if(!n)return;const{el:o,cssText:r,height:s}=n;if(o instanceof HTMLElement){Ht(o);const t=Pt({el:o,height:s});e(t,s)}r&&i.push(r)}};return a(t,(t,e)=>{n=t,o=e}),a(e,(t,e)=>{r=t,s=e}),{cssTextList:i,header:n,headerHeight:o,footer:r,footerHeight:s}},At=(t,e=0,i=0,n=0,o=0,r=!1,s=!1)=>{let a=1/0,h=-1/0,d=1/0,l=-1/0;const c=(t,e)=>{if((!e||!r)&&t.group)try{const{x:e,y:i,width:n,height:o}=t.group.findOne(".smm-node-shape").rbox();e<a&&(a=e),e+n>h&&(h=e+n),i<d&&(d=i),i+o>l&&(l=i+o)}catch(i){}!s&&t._generalizationList.length>0&&t._generalizationList.forEach(t=>{c(t.generalizationNode)}),t.children&&t.children.forEach(t=>{c(t)})};return c(t,!0),a=a-e+n,d=d-i+o,h=h-e+n,l=l-i+o,{left:a,top:d,width:h-a,height:l-d}},Ot=(t,e=0,i=0,n=0,o=0)=>{let r=1/0,s=-1/0,a=1/0,h=-1/0;return t.forEach(t=>{const{left:d,top:l,width:c,height:u}=At(t,e,i,n,o,!1,!0);d<r&&(r=d),d+c>s&&(s=d+c),l<a&&(a=l),l+u>h&&(h=l+u)}),{left:r,top:a,width:s-r,height:h-a}},kt=()=>document.documentElement.requestFullScreen?"fullscreenchange":document.documentElement.webkitRequestFullScreen?"webkitfullscreenchange":document.documentElement.mozRequestFullScreen?"mozfullscreenchange":document.documentElement.msRequestFullscreen?"msfullscreenchange":void 0,It=kt(),Bt=t=>{t.requestFullScreen?t.requestFullScreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen&&t.mozRequestFullScreen()},Ft=()=>{document.fullscreenElement&&(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen&&document.mozCancelFullScreen())},Pt=({el:t,width:e,height:i})=>{const n=new s["c"];return void 0!==e&&n.width(e),void 0!==i&&n.height(i),n.add(t),n},Wt=t=>{const e=t.generalization;return e?Array.isArray(e)?e:[e]:[]},Ht=t=>{t.setAttribute("xmlns","http://www.w3.org/1999/xhtml")},jt=t=>(t=[...t],t.sort((t,e)=>t.sortIndex-e.sortIndex),t),Gt=(t,e)=>h()(t,e,{arrayMerge:(t,e)=>e}),$t=t=>{const e={};return o["i"].forEach(i=>{let n=t.style.merge(i);"fontSize"===i&&(n+="px"),e[i]=n}),e},Ut=(t,e)=>{const i=String(t).split("."),n=String(e).split("."),o=Math.max(i.length,n.length);for(let r=0;r<o;r++){const t=i[r]||0,e=n[r]||0;if(t>e)return">";if(t<e)return"<"}return"="},Yt=(t,e)=>{if(!t||!t.opt||!e)return!1;const{customCheckIsFromCustomNodeContent:i}=t.opt;if("function"===typeof i)try{if(i(e,t))return!0}catch(s){}const n="[data-smm-stop-event]",o=e.target;if(o&&"function"===typeof o.closest&&o.closest(n))return!0;const r="function"===typeof e.composedPath?e.composedPath():e.path||[];if(Array.isArray(r)&&r.length)for(let a=0;a<r.length;a++){const t=r[a];if(t&&"function"===typeof t.getAttribute&&null!==t.getAttribute("data-smm-stop-event"))return!0}return!1}},"1e5a":function(t,e,i){"use strict";var n=i("23e7"),o=i("9961"),r=i("dad2");n({target:"Set",proto:!0,real:!0,forced:!r("symmetricDifference")},{symmetricDifference:o})},"1e70":function(t,e,i){"use strict";var n=i("23e7"),o=i("a5f7"),r=i("dad2");n({target:"Set",proto:!0,real:!0,forced:!r("difference")},{difference:o})},"22e5":function(t,e,i){"use strict";i("8b00")},"271a":function(t,e,i){"use strict";var n=i("cb2d"),o=i("e330"),r=i("577e"),s=i("d6d6"),a=URLSearchParams,h=a.prototype,d=o(h.getAll),l=o(h.has),c=new a("a=1");!c.has("a",2)&&c.has("a",void 0)||n(h,"has",(function(t){var e=arguments.length,i=e<2?void 0:arguments[1];if(e&&void 0===i)return l(this,t);var n=d(this,t);s(e,1);var o=r(i),a=0;while(a<n.length)if(n[a++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},"2a62":function(t,e,i){"use strict";var n=i("c65b"),o=i("825a"),r=i("dc4a");t.exports=function(t,e,i){var s,a;o(t);try{if(s=r(t,"return"),!s){if("throw"===e)throw i;return i}s=n(s,t)}catch(h){a=!0,s=h}if("throw"===e)throw i;if(a)throw s;return o(s),i}},"384f":function(t,e,i){"use strict";var n=i("e330"),o=i("5388"),r=i("cb27"),s=r.Set,a=r.proto,h=n(a.forEach),d=n(a.keys),l=d(new s).next;t.exports=function(t,e,i){return i?o({iterator:d(t),next:l},e):h(t,e)}},3887:function(t,e,i){"use strict";const n='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M475.136 327.168v147.968h-147.968v74.24h147.968v147.968h74.24v-147.968h147.968v-74.24h-147.968v-147.968h-74.24z m36.864-222.208c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path></svg>',o='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 105.472c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path><path d="M252.928 474.624h518.144v74.24h-518.144z"></path></svg>',r='<svg width="14px" height="14px" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path fill="#ffffff" d="M512 105.472c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path><path fill="#ffffff" d="M252.928 474.624h518.144v74.24h-518.144z"></path></svg>',s='<svg width="12px" height="12px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M1008.128 614.4a25.6 25.6 0 0 0-27.648 5.632l-142.848 142.848L259.072 186.88 401.92 43.52A25.6 25.6 0 0 0 384 0h-358.4a25.6 25.6 0 0 0-25.6 25.6v358.4a25.6 25.6 0 0 0 43.52 17.92l143.36-142.848 578.048 578.048-142.848 142.848a25.6 25.6 0 0 0 17.92 43.52h358.4a25.6 25.6 0 0 0 25.6-25.6v-358.4a25.6 25.6 0 0 0-15.872-25.088z" /></svg>',a='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="48" height="48"><path d="M514.048 62.464q93.184 0 175.616 35.328t143.872 96.768 96.768 143.872 35.328 175.616q0 94.208-35.328 176.128t-96.768 143.36-143.872 96.768-175.616 35.328q-94.208 0-176.64-35.328t-143.872-96.768-96.768-143.36-35.328-176.128q0-93.184 35.328-175.616t96.768-143.872 143.872-96.768 176.64-35.328zM772.096 576.512q26.624 0 45.056-18.944t18.432-45.568-18.432-45.056-45.056-18.432l-192.512 0 0-192.512q0-26.624-18.944-45.568t-45.568-18.944-45.056 18.944-18.432 45.568l0 192.512-192.512 0q-26.624 0-45.056 18.432t-18.432 45.056 18.432 45.568 45.056 18.944l192.512 0 0 191.488q0 26.624 18.432 45.568t45.056 18.944 45.568-18.944 18.944-45.568l0-191.488 192.512 0z"></path></svg>';e["a"]={open:n,close:o,remove:r,imgAdjust:s,quickCreateChild:a}},"395e":function(t,e,i){"use strict";var n=i("dc19"),o=i("cb27").has,r=i("8e16"),s=i("7f65"),a=i("5388"),h=i("2a62");t.exports=function(t){var e=n(this),i=s(t);if(r(e)<i.size)return!1;var d=i.getIterator();return!1!==a(d,(function(t){if(!o(e,t))return h(d,"normal",!1)}))}},4013:function(t,e,i){"use strict";i.d(e,"a",(function(){return n})),i.d(e,"d",(function(){return o})),i.d(e,"e",(function(){return r})),i.d(e,"f",(function(){return s})),i.d(e,"g",(function(){return a})),i.d(e,"b",(function(){return h})),i.d(e,"c",(function(){return d})),i.d(e,"j",(function(){return l})),i.d(e,"h",(function(){return c})),i.d(e,"i",(function(){return u}));const n={CHANGE_THEME:"changeTheme",CHANGE_LAYOUT:"changeLayout",SET_DATA:"setData",MODE:{READONLY:"readonly",EDIT:"edit"},LAYOUT:{LOGICAL_STRUCTURE:"logicalStructure",LOGICAL_STRUCTURE_LEFT:"logicalStructureLeft",MIND_MAP:"mindMap",ORGANIZATION_STRUCTURE:"organizationStructure",CATALOG_ORGANIZATION:"catalogOrganization",TIMELINE:"timeline",TIMELINE2:"timeline2",FISHBONE:"fishbone",VERTICAL_TIMELINE:"verticalTimeline",RADIAL:"radial"},DIR:{UP:"up",LEFT:"left",DOWN:"down",RIGHT:"right"},KEY_DIR:{LEFT:"Left",UP:"Up",RIGHT:"Right",DOWN:"Down"},SHAPE:{RECTANGLE:"rectangle",DIAMOND:"diamond",PARALLELOGRAM:"parallelogram",ROUNDED_RECTANGLE:"roundedRectangle",OCTAGONAL_RECTANGLE:"octagonalRectangle",OUTER_TRIANGULAR_RECTANGLE:"outerTriangularRectangle",INNER_TRIANGULAR_RECTANGLE:"innerTriangularRectangle",ELLIPSE:"ellipse",CIRCLE:"circle"},MOUSE_WHEEL_ACTION:{ZOOM:"zoom",MOVE:"move"},INIT_ROOT_NODE_POSITION:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom",CENTER:"center"},LAYOUT_GROW_DIR:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"},PASTE_TYPE:{CLIP_BOARD:"clipBoard",CANVAS:"canvas"},SCROLL_BAR_DIR:{VERTICAL:"vertical",HORIZONTAL:"horizontal"},CREATE_NEW_NODE_BEHAVIOR:{DEFAULT:"default",NOT_ACTIVE:"notActive",ACTIVE_ONLY:"activeOnly"},TAG_PLACEMENT:{RIGHT:"right",BOTTOM:"bottom"},IMG_PLACEMENT:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"},EDIT_NODE_CLASS:{SMM_NODE_EDIT_WRAP:"smm-node-edit-wrap",RICH_TEXT_EDIT_WRAP:"ql-editor",ASSOCIATIVE_LINE_TEXT_EDIT_WRAP:"associative-line-text-edit-warp"}},o={[n.INIT_ROOT_NODE_POSITION.LEFT]:0,[n.INIT_ROOT_NODE_POSITION.TOP]:0,[n.INIT_ROOT_NODE_POSITION.RIGHT]:1,[n.INIT_ROOT_NODE_POSITION.BOTTOM]:1,[n.INIT_ROOT_NODE_POSITION.CENTER]:.5},r=[{name:"逻辑结构图",value:n.LAYOUT.LOGICAL_STRUCTURE},{name:"向左逻辑结构图",value:n.LAYOUT.LOGICAL_STRUCTURE_LEFT},{name:"思维导图",value:n.LAYOUT.MIND_MAP},{name:"组织结构图",value:n.LAYOUT.ORGANIZATION_STRUCTURE},{name:"目录组织图",value:n.LAYOUT.CATALOG_ORGANIZATION},{name:"时间轴",value:n.LAYOUT.TIMELINE},{name:"时间轴2",value:n.LAYOUT.TIMELINE2},{name:"竖向时间轴",value:n.LAYOUT.VERTICAL_TIMELINE},{name:"鱼骨图",value:n.LAYOUT.FISHBONE},{name:"径向布局",value:n.LAYOUT.RADIAL}],s=[n.LAYOUT.LOGICAL_STRUCTURE,n.LAYOUT.LOGICAL_STRUCTURE_LEFT,n.LAYOUT.MIND_MAP,n.LAYOUT.CATALOG_ORGANIZATION,n.LAYOUT.ORGANIZATION_STRUCTURE,n.LAYOUT.TIMELINE,n.LAYOUT.TIMELINE2,n.LAYOUT.VERTICAL_TIMELINE,n.LAYOUT.FISHBONE,n.LAYOUT.RADIAL],a=["siyuanPDFLinkData","siyuanHyperlink","siyuanHyperlinkTitle","text","image","imageTitle","imageSize","icon","tag","hyperlink","hyperlinkTitle","note","expand","isActive","generalization","richText","resetRichText","uid","activeStyle","associativeLineTargets","associativeLineTargetControlOffsets","associativeLinePoint","associativeLineText","attachmentUrl","attachmentName","notation","outerFrame","number","range","customLeft","customTop","customTextWidth","checkbox","dir","needUpdate","isFlowChart","flowchart"],h={READ_CLIPBOARD_ERROR:"read_clipboard_error",PARSE_PASTE_DATA_ERROR:"parse_paste_data_error",CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR:"custom_handle_clipboard_text_error",LOAD_CLIPBOARD_IMAGE_ERROR:"load_clipboard_image_error",BEFORE_TEXT_EDIT_ERROR:"before_text_edit_error",EXPORT_ERROR:"export_error",EXPORT_LOAD_IMAGE_ERROR:"export_load_image_error",DATA_CHANGE_DETAIL_EVENT_ERROR:"data_change_detail_event_error"},d="\n /* 鼠标hover和激活时渲染的矩形 */\n .smm-hover-node{\n display: none;\n opacity: 0.6;\n stroke-width: 1;\n }\n\n .smm-node:not(.smm-node-dragging):hover .smm-hover-node{\n display: block;\n }\n\n .smm-node.active .smm-hover-node, .smm-node-highlight .smm-hover-node{\n display: block;\n opacity: 1;\n stroke-width: 2;\n }\n\n .smm-text-node-wrap, .smm-expand-btn-text {\n user-select: none;\n }\n",l=["img","br","hr","input","link","meta","area"],c=1.2,u=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color","textAlign"]},4699:function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"c",(function(){return r})),e["b"]={paddingX:16,paddingY:8,imgMaxWidth:200,imgMaxHeight:100,iconSize:20,lineWidth:1.5,lineColor:"#2D3748",lineDasharray:"none",lineFlow:!1,lineFlowDuration:1,lineFlowForward:!0,lineStyle:"straight",braceCurveSize:14,rootLineKeepSameInCurve:!0,rootLineStartPositionKeepSameInCurve:!1,lineRadius:8,showLineMarker:!1,generalizationLineWidth:1,generalizationLineColor:"#2D3748",generalizationLineMargin:0,generalizationNodeMargin:20,associativeLineWidth:2,associativeLineColor:"rgb(51, 51, 51)",associativeLineActiveWidth:8,associativeLineActiveColor:"rgba(2, 167, 240, 1)",associativeLineDasharray:[6,4],associativeLineTextColor:"rgb(51, 51, 51)",associativeLineTextFontSize:14,associativeLineTextLineHeight:1.2,associativeLineTextFontFamily:"微软雅黑, Microsoft YaHei",backgroundColor:"#F7FAFC",backgroundImage:"none",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",nodeUseLineStyle:!1,root:{shape:"rectangle",fillColor:"#2D3748",fontFamily:"微软雅黑, Microsoft YaHei",color:"#FFFFFF",fontSize:20,fontWeight:"bold",fontStyle:"normal",borderColor:"transparent",borderWidth:2,borderDasharray:"none",borderRadius:8,textDecoration:"none",gradientStyle:!1,startColor:"#2D3748",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:8,textAlign:"center",imgPlacement:"top",tagPlacement:"right",paddingX:24,paddingY:14},second:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#718096",fontFamily:"微软雅黑, Microsoft YaHei",color:"#FFFFFF",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"transparent",borderWidth:1.5,borderDasharray:"none",borderRadius:6,textDecoration:"none",gradientStyle:!1,startColor:"#718096",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:6,textAlign:"left",imgPlacement:"top",tagPlacement:"right",paddingX:20,paddingY:10},node:{shape:"rectangle",marginX:50,marginY:0,fillColor:"transparent",fontFamily:"微软雅黑, Microsoft YaHei",color:"#2D3748",fontSize:14,fontWeight:"normal",fontStyle:"normal",borderColor:"transparent",borderWidth:1,borderRadius:4,borderDasharray:"none",textDecoration:"none",gradientStyle:!1,startColor:"#EDF2F7",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:4,textAlign:"left",imgPlacement:"top",tagPlacement:"right",paddingX:16,paddingY:8},generalization:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#FFF5F5",fontFamily:"微软雅黑, Microsoft YaHei",color:"#742A2A",fontSize:14,fontWeight:"normal",fontStyle:"normal",borderColor:"#FC8181",borderWidth:1,borderDasharray:"2,2",borderRadius:6,textDecoration:"none",gradientStyle:!1,startColor:"#FFF5F5",endColor:"#fff",startDir:[0,0],endDir:[1,0],hoverRectColor:"",hoverRectRadius:6,textAlign:"center",imgPlacement:"top",tagPlacement:"right",paddingX:16,paddingY:8}};const n=["lineWidth","lineColor","lineDasharray","lineStyle","generalizationLineWidth","generalizationLineColor","associativeLineWidth","associativeLineColor","associativeLineActiveWidth","associativeLineActiveColor","associativeLineTextColor","associativeLineTextFontSize","associativeLineTextLineHeight","associativeLineTextFontFamily","backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","rootLineKeepSameInCurve","rootLineStartPositionKeepSameInCurve","showLineMarker","lineRadius","hoverRectColor","hoverRectRadius","lineFlow","lineFlowDuration","lineFlowForward","textAlign"],o=t=>{let e=Object.keys(t);for(let i=0;i<e.length;i++)if(!n.find(t=>t===e[i]))return!1;return!0},r=["lineColor","lineDasharray","lineWidth","lineMarkerDir","lineFlow","lineFlowDuration","lineFlowForward"]},"46c4":function(t,e,i){"use strict";t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},5388:function(t,e,i){"use strict";var n=i("c65b");t.exports=function(t,e,i){var o,r,s=i?t:t.iterator,a=t.next;while(!(o=n(a,s)).done)if(r=e(o.value),void 0!==r)return r}},5494:function(t,e,i){"use strict";var n=i("83ab"),o=i("e330"),r=i("edd0"),s=URLSearchParams.prototype,a=o(s.forEach);n&&!("size"in s)&&r(s,"size",{get:function(){var t=0;return a(this,(function(){t++})),t},configurable:!0,enumerable:!0})},"5c06":function(t,e,i){"use strict";i.d(e,"a",(function(){return r})),i.d(e,"b",(function(){return s}));var n=i("8a19"),o=i("4013");class r{constructor(t){this.node=t,this.mindMap=t.mindMap}getShapePadding(t,e,i,n){const r=this.node.getShape(),s=15,a=5,h=t+2*i,d=e+2*n,l=Math.abs(h-d);switch(r){case o["a"].SHAPE.ROUNDED_RECTANGLE:return{paddingX:e>t?(e-t)/2:0,paddingY:0};case o["a"].SHAPE.DIAMOND:return{paddingX:t/2,paddingY:e/2};case o["a"].SHAPE.PARALLELOGRAM:return{paddingX:i<=0?s:0,paddingY:0};case o["a"].SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:i<=0?s:0,paddingY:0};case o["a"].SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:i<=0?s:0,paddingY:0};case o["a"].SHAPE.ELLIPSE:return{paddingX:i<=0?s:0,paddingY:n<=0?a:0};case o["a"].SHAPE.CIRCLE:return{paddingX:d>h?l/2:0,paddingY:d<h?l/2:0};default:return{paddingX:0,paddingY:0}}}createShape(){const t=this.node.getShape();let e=null;return t===o["a"].SHAPE.RECTANGLE?e=this.createRect():t===o["a"].SHAPE.DIAMOND?e=this.createDiamond():t===o["a"].SHAPE.PARALLELOGRAM?e=this.createParallelogram():t===o["a"].SHAPE.ROUNDED_RECTANGLE?e=this.createRoundedRectangle():t===o["a"].SHAPE.OCTAGONAL_RECTANGLE?e=this.createOctagonalRectangle():t===o["a"].SHAPE.OUTER_TRIANGULAR_RECTANGLE?e=this.createOuterTriangularRectangle():t===o["a"].SHAPE.INNER_TRIANGULAR_RECTANGLE?e=this.createInnerTriangularRectangle():t===o["a"].SHAPE.ELLIPSE?e=this.createEllipse():t===o["a"].SHAPE.CIRCLE&&(e=this.createCircle()),e}getNodeSize(){const t=this.node.getBorderWidth();let{width:e,height:i}=this.node;return e-=t,i-=t,{width:e,height:i}}createPath(t){const{customCreateNodePath:e}=this.mindMap.opt;return e?Object(n["i"])(e(t)):(new n["f"]).plot(t)}createPolygon(t){const{customCreateNodePolygon:e}=this.mindMap.opt;return e?Object(n["i"])(e(t)):(new n["g"]).plot(t)}createRect(){let{width:t,height:e}=this.getNodeSize(),i=this.node.style.merge("borderRadius");const n=`\n M${i},0\n L${t-i},0\n C${t-i},0 ${t},0 ${t},${i}\n L${t},${e-i}\n C${t},${e-i} ${t},${e} ${t-i},${e}\n L${i},${e}\n C${i},${e} 0,${e} 0,${e-i}\n L0,${i}\n C0,${i} 0,0 ${i},0\n Z\n `;return this.createPath(n)}createDiamond(){let{width:t,height:e}=this.getNodeSize(),i=t/2,n=e/2,o=i,r=0,s=t,a=n,h=i,d=e,l=0,c=n;const u=[[o,r],[s,a],[h,d],[l,c]];return this.createPolygon(u)}createParallelogram(){let{paddingX:t}=this.node.getPaddingVale();t=t||this.node.shapePadding.paddingX;let{width:e,height:i}=this.getNodeSize();const n=[[t,0],[e,0],[e-t,i],[0,i]];return this.createPolygon(n)}createRoundedRectangle(){let{width:t,height:e}=this.getNodeSize(),i=e/2;const n=`\n M${i},0\n L${t-i},0\n A${e/2},${e/2} 0 0,1 ${t-i},${e} \n L${i},${e}\n A${e/2},${e/2} 0 0,1 ${i},0\n `;return this.createPath(n)}createOctagonalRectangle(){let t=5,{width:e,height:i}=this.getNodeSize();const n=[[0,t],[t,0],[e-t,0],[e,t],[e,i-t],[e-t,i],[t,i],[0,i-t]];return this.createPolygon(n)}createOuterTriangularRectangle(){let{paddingX:t}=this.node.getPaddingVale();t=t||this.node.shapePadding.paddingX;let{width:e,height:i}=this.getNodeSize();const n=[[t,0],[e-t,0],[e,i/2],[e-t,i],[t,i],[0,i/2]];return this.createPolygon(n)}createInnerTriangularRectangle(){let{paddingX:t}=this.node.getPaddingVale();t=t||this.node.shapePadding.paddingX;let{width:e,height:i}=this.getNodeSize();const n=[[0,0],[e,0],[e-t/2,i/2],[e,i],[0,i],[t/2,i/2]];return this.createPolygon(n)}createEllipse(){let{width:t,height:e}=this.getNodeSize(),i=t/2,n=e/2;const o=`\n M${i},0\n A${i},${n} 0 0,1 ${i},${e} \n M${i},${e} \n A${i},${n} 0 0,1 ${i},0 \n `;return this.createPath(o)}createCircle(){let{width:t,height:e}=this.getNodeSize(),i=t/2,n=e/2;const o=`\n M${i},0\n A${i},${n} 0 0,1 ${i},${e} \n M${i},${e} \n A${i},${n} 0 0,1 ${i},0 \n `;return this.createPath(o)}}const s=[o["a"].SHAPE.RECTANGLE,o["a"].SHAPE.DIAMOND,o["a"].SHAPE.PARALLELOGRAM,o["a"].SHAPE.ROUNDED_RECTANGLE,o["a"].SHAPE.OCTAGONAL_RECTANGLE,o["a"].SHAPE.OUTER_TRIANGULAR_RECTANGLE,o["a"].SHAPE.INNER_TRIANGULAR_RECTANGLE,o["a"].SHAPE.ELLIPSE,o["a"].SHAPE.CIRCLE]},"67c2":function(t,e,i){"use strict";i("d9e2");var n=i("1e42"),o=i("8a19");i("14d9");const r=t=>{let e=String(t).split(/\s+/);return e.map(t=>{if(/^[\d.]+/.test(t)){let e=/^([\d.]+)(.*)$/.exec(t);return[Number(e[1]),e[2]]}return t})},s=(t,e)=>t*e,a=(t,e)=>e/t,h={left:0,top:0,center:50,bottom:100,right:100},d=({backgroundSize:t,drawOpt:e,imageRatio:i,canvasWidth:n,canvasHeight:o,canvasRatio:h})=>{if(t){let d=r(t);if("auto"===d[0]&&"auto"===d[1])return;if("cover"===d[0])return void(i>h?(e.height=o,e.width=s(i,o)):(e.width=n,e.height=a(i,n)));if("contain"===d[0])return void(i>h?(e.width=n,e.height=a(i,n)):(e.height=o,e.width=s(i,o)));let l=-1;d[0]&&(Array.isArray(d[0])?"%"===d[0][1]?(e.width=d[0][0]/100*n,l=e.width):(e.width=d[0][0],l=d[0][0]):"auto"===d[0]&&d[1]&&("%"===d[1][1]?e.width=s(i,d[1][0]/100*o):e.width=s(i,d[1][0]))),d[1]&&Array.isArray(d[1])?"%"===d[1][1]?e.height=d[1][0]/100*o:e.height=d[1][0]:-1!==l&&(e.height=a(i,l))}},l=({backgroundPosition:t,drawOpt:e,imgWidth:i,imgHeight:n,canvasWidth:o,canvasHeight:s})=>{if(t){let a=r(t);if(a=a.map(t=>"string"===typeof t&&void 0!==h[t]?[h[t],"%"]:t),Array.isArray(a[0])){if(1===a.length&&a.push([50,"%"]),"%"===a[0][1]){let t=a[0][0]/100*o,n=a[0][0]/100*i;e.x=t-n}else e.x=a[0][0];if("%"===a[1][1]){let t=a[1][0]/100*s,i=a[1][0]/100*n;e.y=t-i}else e.y=a[1][0]}}},c=({ctx:t,image:e,backgroundRepeat:i,drawOpt:n,imgWidth:o,imgHeight:s,canvasWidth:a,canvasHeight:h})=>{if(i){let d=n.x,l=n.y,c=Math.ceil(d/o),f=Math.ceil(l/s),p=d-c*o,g=l-f*s,m=r(i);if("no-repeat"===m[0]||o>=a&&s>=h)return;if("repeat-x"===m[0]&&a>o){let i=p;while(i<a)u(t,e,{...n,x:i}),i+=o;return!0}if("repeat-y"===m[0]&&h>s){let i=g;while(i<h)u(t,e,{...n,y:i}),i+=s;return!0}if("repeat"===m[0]){let i=p;while(i<a){if(h>s){let o=g;while(o<h)u(t,e,{...n,x:i,y:o}),o+=s}i+=o}return!0}}},u=(t,e,i)=>{t.drawImage(e,i.sx,i.sy,i.swidth,i.sheight,i.x,i.y,i.width,i.height)},f=(t,e,i,n,{backgroundSize:o,backgroundPosition:r,backgroundRepeat:s},a=(()=>{}))=>{let h=e/i,f=new Image;f.src=n,f.onload=()=>{let n=f.width,p=f.height,g=n/p,m={sx:0,sy:0,swidth:n,sheight:p,x:0,y:0,width:n,height:p};d({backgroundSize:o,drawOpt:m,imageRatio:g,canvasWidth:e,canvasHeight:i,canvasRatio:h}),l({backgroundPosition:r,drawOpt:m,imgWidth:m.width,imgHeight:m.height,imageRatio:g,canvasWidth:e,canvasHeight:i,canvasRatio:h});let b=c({ctx:t,image:f,backgroundRepeat:s,drawOpt:m,imgWidth:m.width,imgHeight:m.height,imageRatio:g,canvasWidth:e,canvasHeight:i,canvasRatio:h});b||u(t,f,m),a()},f.onerror=t=>{a(t)}};var p=f,g=i("08af"),m=i("4013"),b=i("de81");class x{constructor(t){this.mindMap=t.mindMap}async export(t,e=!0,i="思维导图",...o){if(this[t]){const r=await this[t](i,...o);return e&&Object(n["y"])(r,i+"."+t),r}return null}createTransformImgTaskList(t,e,i,o){const r=t.find(e);return r.map(async t=>{const e=o(t);if(/^data:/.test(e)||"none"===e)return;const r=await Object(n["Z"])(e);t.attr(i,r)})}async getSvgData(t){let{exportPaddingX:e,exportPaddingY:i,errorHandler:r,resetCss:s,addContentToHeader:a,addContentToFooter:h,handleBeingExportSvg:d}=this.mindMap.opt,{svg:l,svgHTML:c,clipData:u}=this.mindMap.getSvgData({paddingX:e,paddingY:i,addContentToHeader:a,addContentToFooter:h,node:t});u&&(u.paddingX=e,u.paddingY=i);let f=!1;const p=this.createTransformImgTaskList(l,"image","href",t=>t.attr("href")||t.attr("xlink:href")),g=this.createTransformImgTaskList(l,"img","src",t=>t.attr("src")),b=[...p,...g];try{await Promise.all(b)}catch(x){r(m["b"].EXPORT_LOAD_IMAGE_ERROR,x)}if(this.mindMap.richText){const t=l.find("foreignObject");if(t.length>0&&(t[0].add(Object(o["i"])(`<style>${s}</style>`)),f=!0),this.mindMap.formula){const e=l.find(".ql-formula");if(e.length>0){const e=this.mindMap.formula.getStyleText();if(e){const i=document.createElement("style");i.innerHTML=e,Object(n["b"])(i),t[0].add(i),f=!0}}}}return"function"===typeof d&&(f=!0,l=d(l)),(b.length>0||f)&&(c=l.svg()),{node:l,str:c,clipData:u}}svgToPng(t,e,i=null){const{maxCanvasSize:o,minExportImgCanvasScale:r}=this.mindMap.opt;return new Promise((s,a)=>{const h=new Image;h.setAttribute("crossOrigin","anonymous"),h.onload=async()=>{try{const t=document.createElement("canvas"),a=Math.max(window.devicePixelRatio,r);let d=h.width,l=h.height,c=0,u=0;i&&(c=i.paddingX,u=i.paddingY,d=i.width+2*c,l=i.height+2*u);let f=d*a,p=l*a;if(f>o||p>o){let t=null,e=null;f>o?t=o:p>o&&(e=o);const i=Object(n["ub"])(f,p,t,e);f=i[0],p=i[1]}t.width=f,t.height=p;const g=f/a,m=p/a;t.style.width=g+"px",t.style.height=m+"px";const b=t.getContext("2d");b.scale(a,a),e||await this.drawBackgroundToCanvas(b,g,m),i?b.drawImage(h,i.left,i.top,i.width,i.height,c,u,i.width,i.height):b.drawImage(h,0,0,g,m),s(t.toDataURL())}catch(t){a(t)}},h.onerror=t=>{a(t)},h.src=t})}drawBackgroundToCanvas(t,e,i){return new Promise((n,o)=>{const{backgroundColor:r="#fff",backgroundImage:s,backgroundRepeat:a="no-repeat",backgroundPosition:h="center center",backgroundSize:d="cover"}=this.mindMap.themeConfig;t.save(),t.rect(0,0,e,i),t.fillStyle=r,t.fill(),t.restore(),s&&"none"!==s?(t.save(),p(t,e,i,s,{backgroundRepeat:a,backgroundPosition:h,backgroundSize:d},e=>{e?o(e):n(),t.restore()})):n()})}drawBackgroundToSvg(t){return new Promise(async e=>{const{backgroundColor:i="#fff",backgroundImage:o,backgroundRepeat:r="repeat"}=this.mindMap.themeConfig;if(t.css("background-color",i),o&&"none"!==o){const i=await Object(n["Z"])(o);t.css("background-image",`url(${i})`),t.css("background-repeat",r),e()}else e()})}async png(t,e=!1,i=null){this.handleNodeExport(i);const{str:n,clipData:o}=await this.getSvgData(i),r=await this.fixSvgStrAndToBlob(n),s=await this.svgToPng(r,e,o);return s}handleNodeExport(t){if(t&&t.getData("isActive")){t.deactivate();const{alwaysShowExpandBtn:e,notShowExpandBtn:i}=this.mindMap.opt;e||i||!t.getData("expand")||t.removeExpandBtn()}}async pdf(t,e=!1){if(!this.mindMap.doExportPDF)throw new Error("请注册ExportPDF插件");const i=await this.png(t,e),n=await this.mindMap.doExportPDF.pdf(i);return n}async xmind(t){if(!this.mindMap.doExportXMind)throw new Error("请注册ExportXMind插件");const e=this.mindMap.getData(),i=await this.mindMap.doExportXMind.xmind(e,t),o=await Object(n["pb"])(i);return o}async svg(t){const{node:e}=await this.getSvgData();e.first().before(Object(o["i"])(`<title>${t}</title>`)),await this.drawBackgroundToSvg(e);const i=e.svg(),n=await this.fixSvgStrAndToBlob(i);return n}async fixSvgStrAndToBlob(t){t=Object(n["rb"])(t),t=Object(n["X"])(t);const e=new Blob([t],{type:"image/svg+xml"}),i=await Object(n["pb"])(e);return i}async json(t,e=!0){const i=this.mindMap.getData(e),o=JSON.stringify(i),r=new Blob([o]),s=await Object(n["pb"])(r);return s}async smm(t,e){const i=await this.json(t,e);return i}async md(){const t=this.mindMap.getData(),e=Object(g["a"])(t),i=new Blob([e]),o=await Object(n["pb"])(i);return o}async txt(){const t=this.mindMap.getData(),e=Object(b["a"])(t),i=new Blob([e]),o=await Object(n["pb"])(i);return o}}x.instanceName="doExport";e["a"]=x},"682c":function(t,e,i){"use strict";var n=function(t){return o(t)&&!r(t)};function o(t){return!!t&&"object"===typeof t}function r(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||h(t)}var s="function"===typeof Symbol&&Symbol.for,a=s?Symbol.for("react.element"):60103;function h(t){return t.$$typeof===a}function d(t){return Array.isArray(t)?[]:{}}function l(t,e){var i=e&&!0===e.clone;return i&&n(t)?f(d(t),t,e):t}function c(t,e,i){var o=t.slice();return e.forEach((function(e,r){"undefined"===typeof o[r]?o[r]=l(e,i):n(e)?o[r]=f(t[r],e,i):-1===t.indexOf(e)&&o.push(l(e,i))})),o}function u(t,e,i){var o={};return n(t)&&Object.keys(t).forEach((function(e){o[e]=l(t[e],i)})),Object.keys(e).forEach((function(r){n(e[r])&&t[r]?o[r]=f(t[r],e[r],i):o[r]=l(e[r],i)})),o}function f(t,e,i){var n=Array.isArray(e),o=Array.isArray(t),r=i||{arrayMerge:c},s=n===o;if(s){if(n){var a=r.arrayMerge||c;return a(t,e,i)}return u(t,e,i)}return l(e,i)}f.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce((function(t,i){return f(t,i,e)}))};var p=f;t.exports=p},"68df":function(t,e,i){"use strict";var n=i("dc19"),o=i("8e16"),r=i("384f"),s=i("7f65");t.exports=function(t){var e=n(this),i=s(t);return!(o(e)>i.size)&&!1!==r(e,(function(t){if(!i.includes(t))return!1}),!0)}},"6f5e":function(t,e,i){"use strict";i.r(e),i.d(e,"FLOWCHART_NODE_TYPES",(function(){return n})),i.d(e,"FLOWCHART_LINE_TYPES",(function(){return o})),i.d(e,"FLOWCHART_NODE_STYLES",(function(){return r})),i.d(e,"CONNECTOR_POSITIONS",(function(){return s})),i.d(e,"FLOWCHART_DEFAULT_CONFIG",(function(){return a}));const n={PROCESS:"process",DECISION:"decision",START:"start",END:"end",SUBPROCESS:"subprocess",DATA:"data",DOCUMENT:"document",DATABASE:"database",PREPARATION:"preparation"},o={STRAIGHT:"straight",ORTHOGONAL:"orthogonal",CURVE:"curve"},r={[n.PROCESS]:{shape:"rectangle",backgroundColor:"#e1f5fe",borderColor:"#01579b",borderWidth:2},[n.DECISION]:{shape:"diamond",backgroundColor:"#fff3e0",borderColor:"#e65100",borderWidth:2},[n.START]:{shape:"circle",backgroundColor:"#e8f5e9",borderColor:"#1b5e20",borderWidth:2},[n.END]:{shape:"circle",backgroundColor:"#ffebee",borderColor:"#b71c1c",borderWidth:2},[n.SUBPROCESS]:{shape:"roundedRectangle",backgroundColor:"#f3e5f5",borderColor:"#4a148c",borderWidth:2},[n.DATA]:{shape:"parallelogram",backgroundColor:"#fce4ec",borderColor:"#880e4f",borderWidth:2},[n.DOCUMENT]:{shape:"rectangle",backgroundColor:"#efebe9",borderColor:"#3e2723",borderWidth:2},[n.DATABASE]:{shape:"rectangle",backgroundColor:"#e0f2f1",borderColor:"#004d40",borderWidth:2},[n.PREPARATION]:{shape:"rectangle",backgroundColor:"#fff8e1",borderColor:"#f57f17",borderWidth:2}},s=["top","right","bottom","left"],a={gridSize:20,snapToGrid:!0,showConnectors:!0,connectorSize:8,connectorColor:"#666",connectorActiveColor:"#2196f3",defaultNodeType:n.PROCESS,defaultLineType:o.ORTHOGONAL}},"70cc":function(t,e,i){"use strict";i("79a4")},7145:function(t,e,i){"use strict";i("d9e2"),i("14d9");var n=i("4013");class o{constructor(t={}){this.opt=t,this.mindMap=this.opt.mindMap,this.scale=1,this.sx=0,this.sy=0,this.x=0,this.y=0,this.firstDrag=!0,this.setTransformData(this.mindMap.opt.viewData),this.bind()}bind(){this.mindMap.keyCommand.addShortcut("Control+=",()=>{this.enlarge()}),this.mindMap.keyCommand.addShortcut("Control+-",()=>{this.narrow()}),this.mindMap.keyCommand.addShortcut("Control+i",()=>{this.fit()}),this.mindMap.event.on("mousedown",t=>{const{isDisableDrag:e,mousedownEventPreventDefault:i}=this.mindMap.opt;e||(i&&t.preventDefault(),this.sx=this.x,this.sy=this.y)}),this.mindMap.event.on("drag",(t,e)=>{t.ctrlKey||t.metaKey||this.mindMap.opt.isDisableDrag||(this.firstDrag&&(this.firstDrag=!1,this.mindMap.renderer.activeNodeList.length>0&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")),this.x=this.sx+e.mousemoveOffset.x,this.y=this.sy+e.mousemoveOffset.y,this.transform())}),this.mindMap.event.on("mouseup",()=>{this.firstDrag=!0}),this.mindMap.event.on("mousewheel",(t,e,i,o)=>{const{customHandleMousewheel:r,mousewheelAction:s,mouseScaleCenterUseMousePosition:a,mousewheelMoveStep:h,mousewheelZoomActionReverse:d,disableMouseWheelZoom:l,translateRatio:c}=this.mindMap.opt;if(r&&"function"===typeof r)return r(t);if(s===n["a"].MOUSE_WHEEL_ACTION.ZOOM||t.ctrlKey||t.metaKey){if(l)return;const{x:i,y:r}=this.mindMap.toPos(t.clientX,t.clientY),s=a?i:void 0,h=a?r:void 0;switch(o&&(e.includes(n["a"].DIR.LEFT)||e.includes(n["a"].DIR.RIGHT))&&(e=e.filter(t=>![n["a"].DIR.LEFT,n["a"].DIR.RIGHT].includes(t))),!0){case e.includes(n["a"].DIR.UP||n["a"].DIR.LEFT):d?this.enlarge(s,h,o):this.narrow(s,h,o);break;case e.includes(n["a"].DIR.DOWN||n["a"].DIR.RIGHT):d?this.narrow(s,h,o):this.enlarge(s,h,o);break}}else{let i=0,r=0;o?(i=Math.abs(t.wheelDeltaX),r=Math.abs(t.wheelDeltaY)):i=r=h;let s=0,a=0;e.includes(n["a"].DIR.DOWN)&&(a=-r),e.includes(n["a"].DIR.UP)&&(a=r),e.includes(n["a"].DIR.LEFT)&&(s=i),e.includes(n["a"].DIR.RIGHT)&&(s=-i),this.translateXY(s*c,a*c)}}),this.mindMap.on("resize",()=>{this.checkNeedMindMapInCanvas()&&this.transform()})}getTransformData(){return{transform:this.mindMap.draw.transform(),state:{scale:this.scale,x:this.x,y:this.y,sx:this.sx,sy:this.sy}}}setTransformData(t){t&&(Object.keys(t.state).forEach(e=>{this[e]=t.state[e]}),this.mindMap.draw.transform({...t.transform}),this.mindMap.emit("view_data_change",this.getTransformData()),this.emitEvent("scale"),this.emitEvent("translate"))}translateXY(t,e){0===t&&0===e||(this.x+=t,this.y+=e,this.transform(),this.emitEvent("translate"))}translateX(t){0!==t&&(this.x+=t,this.transform(),this.emitEvent("translate"))}translateXTo(t){this.x=t,this.transform(),this.emitEvent("translate")}translateY(t){0!==t&&(this.y+=t,this.transform(),this.emitEvent("translate"))}translateYTo(t){this.y=t,this.transform(),this.emitEvent("translate")}transform(){try{this.limitMindMapInCanvas()}catch(t){}this.mindMap.draw.transform({origin:[0,0],scale:this.scale,translate:[this.x,this.y]}),this.mindMap.emit("view_data_change",this.getTransformData())}reset(){const t=1!==this.scale,e=0!==this.x||0!==this.y;this.scale=1,this.x=0,this.y=0,this.transform(),t&&this.emitEvent("scale"),e&&this.emitEvent("translate")}narrow(t,e,i){let{scaleRatio:n,minZoomRatio:o}=this.mindMap.opt;n/=i?5:1;const r=Math.max(this.scale-n,o/100);this.scaleInCenter(r,t,e),this.transform(),this.emitEvent("scale")}enlarge(t,e,i){let{scaleRatio:n,maxZoomRatio:o}=this.mindMap.opt;n/=i?5:1;let r=0;r=-1===o?this.scale+n:Math.min(this.scale+n,o/100),this.scaleInCenter(r,t,e),this.transform(),this.emitEvent("scale")}scaleInCenter(t,e,i){void 0!==e&&void 0!==i||(e=this.mindMap.width/2,i=this.mindMap.height/2);const n=this.scale,o=1-t/n,r=(e-this.x)*o,s=(i-this.y)*o;this.x+=r,this.y+=s,this.scale=t}setScale(t,e,i){void 0!==e&&void 0!==i?this.scaleInCenter(t,e,i):this.scale=t,this.transform(),this.emitEvent("scale")}fit(t=(()=>{}),e=!1,i){i=void 0===i?this.mindMap.opt.fitPadding:i;const n=this.mindMap.draw,o=n.transform(),r=t()||n.rbox(),s=r.width/o.scaleX,a=r.height/o.scaleY,h=s/a;let{width:d,height:l}=this.mindMap.elRect;d-=2*i,l-=2*i;const c=d/l;let u=0,f="";if(s<=d&&a<=l&&!e)u=1,f=1;else{let t=0,e=0;h>c?(t=d,e=d/h,f=2):(e=l,t=l*h,f=3),u=t/s}this.setScale(u);const p=t()||n.rbox();p.x-=this.mindMap.elRect.left,p.y-=this.mindMap.elRect.top;let g=0,m=0;1===f?(g=-p.x+i+(d-p.width)/2,m=-p.y+i+(l-p.height)/2):2===f?(g=-p.x+i,m=-p.y+i+(l-p.height)/2):3===f&&(g=-p.x+i+(d-p.width)/2,m=-p.y+i),this.translateXY(g,m)}checkNeedMindMapInCanvas(){if(this.mindMap.demonstrate&&this.mindMap.demonstrate.isInDemonstrate)return!1;const{isLimitMindMapInCanvasWhenHasScrollbar:t,isLimitMindMapInCanvas:e}=this.mindMap.opt;return this.mindMap.scrollbar?t:e}limitMindMapInCanvas(){if(!this.checkNeedMindMapInCanvas())return;let{scale:t,left:e,top:i,right:n,bottom:o}=this.getPositionLimit();const r=(this.mindMap.width-this.mindMap.initWidth)/2*t,s=(this.mindMap.height-this.mindMap.initHeight)/2*t,a=this.scale/t;e*=a,n*=a,i*=a,o*=a;const h=this.mindMap.width/2,d=this.mindMap.height/2,l=this.scale-1;e-=l*h-r,n-=l*h-r,i-=l*d-s,o-=l*d-s,this.x>e&&(this.x=e),this.x<n&&(this.x=n),this.y>i&&(this.y=i),this.y<o&&(this.y=o)}getPositionLimit(){const{scaleX:t,scaleY:e}=this.mindMap.draw.transform(),i=this.mindMap.draw.rbox(),n=this.mindMap.getRootNodes&&this.mindMap.getRootNodes().length?this.mindMap.getRootNodes():this.mindMap.renderer.root?[this.mindMap.renderer.root]:[];let o=null;if(n.length){const t=n[0].group.rbox();let e=t.x,i=t.y,r=t.x2,s=t.y2;n.slice(1).forEach(t=>{const n=t.group.rbox();e=Math.min(e,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x2),s=Math.max(s,n.y2)}),o={x:e,y:i,x2:r,y2:s,width:r-e,height:s-i}}else o={x:0,y:0,x2:0,y2:0,width:0,height:0};const r=this.mindMap.renderer.layout.getRootCenterOffset(o.width,o.height),s=o.x-i.x-r.x*t,a=o.x-i.x2-r.x*t,h=o.y-i.y-r.y*e,d=o.y-i.y2-r.y*e;return{scale:t,left:s,right:a,top:h,bottom:d}}emitEvent(t){switch(t){case"scale":this.mindMap.emit("scale",this.scale);case"translate":this.mindMap.emit("translate",this.x,this.y)}}}var r=o,s=i("91d2"),a=i.n(s),h=i("1e42");class d extends a.a{constructor(t={}){super(),this.opt=t,this.mindMap=t.mindMap,this.isLeftMousedown=!1,this.isRightMousedown=!1,this.isMiddleMousedown=!1,this.mousedownPos={x:0,y:0},this.mousemovePos={x:0,y:0},this.mousemoveOffset={x:0,y:0},this.bindFn(),this.bind()}bindFn(){this.onBodyMousedown=this.onBodyMousedown.bind(this),this.onBodyClick=this.onBodyClick.bind(this),this.onDrawClick=this.onDrawClick.bind(this),this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.onNodeMouseup=this.onNodeMouseup.bind(this),this.onMousewheel=this.onMousewheel.bind(this),this.onContextmenu=this.onContextmenu.bind(this),this.onSvgMousedown=this.onSvgMousedown.bind(this),this.onKeyup=this.onKeyup.bind(this),this.onMouseenter=this.onMouseenter.bind(this),this.onMouseleave=this.onMouseleave.bind(this)}bind(){document.body.addEventListener("mousedown",this.onBodyMousedown),document.body.addEventListener("click",this.onBodyClick),this.mindMap.svg.on("click",this.onDrawClick),this.mindMap.el.addEventListener("mousedown",this.onMousedown),this.mindMap.svg.on("mousedown",this.onSvgMousedown),window.addEventListener("mousemove",this.onMousemove),window.addEventListener("mouseup",this.onMouseup),this.on("node_mouseup",this.onNodeMouseup),this.mindMap.el.addEventListener("wheel",this.onMousewheel),this.mindMap.svg.on("contextmenu",this.onContextmenu),this.mindMap.svg.on("mouseenter",this.onMouseenter),this.mindMap.svg.on("mouseleave",this.onMouseleave),window.addEventListener("keyup",this.onKeyup)}unbind(){document.body.removeEventListener("mousedown",this.onBodyMousedown),document.body.removeEventListener("click",this.onBodyClick),this.mindMap.svg.off("click",this.onDrawClick),this.mindMap.el.removeEventListener("mousedown",this.onMousedown),window.removeEventListener("mousemove",this.onMousemove),window.removeEventListener("mouseup",this.onMouseup),this.off("node_mouseup",this.onNodeMouseup),this.mindMap.el.removeEventListener("wheel",this.onMousewheel),this.mindMap.svg.off("contextmenu",this.onContextmenu),this.mindMap.svg.off("mouseenter",this.onMouseenter),this.mindMap.svg.off("mouseleave",this.onMouseleave),window.removeEventListener("keyup",this.onKeyup)}onDrawClick(t){Object(h["ab"])(this.mindMap,t)||this.emit("draw_click",t)}onBodyMousedown(t){this.emit("body_mousedown",t)}onBodyClick(t){this.emit("body_click",t)}onSvgMousedown(t){this.emit("svg_mousedown",t)}onMousedown(t){Object(h["ab"])(this.mindMap,t)||(1===t.which?this.isLeftMousedown=!0:3===t.which?this.isRightMousedown=!0:2===t.which&&(this.isMiddleMousedown=!0),this.mousedownPos.x=t.clientX,this.mousedownPos.y=t.clientY,this.emit("mousedown",t,this))}onMousemove(t){let{useLeftKeySelectionRightKeyDrag:e}=this.mindMap.opt;this.mousemovePos.x=t.clientX,this.mousemovePos.y=t.clientY,this.mousemoveOffset.x=t.clientX-this.mousedownPos.x,this.mousemoveOffset.y=t.clientY-this.mousedownPos.y,this.emit("mousemove",t,this),(this.isMiddleMousedown||(e?this.isRightMousedown:this.isLeftMousedown))&&(t.preventDefault(),this.emit("drag",t,this))}onMouseup(t){this.onNodeMouseup(),this.emit("mouseup",t,this)}onNodeMouseup(){this.isLeftMousedown=!1,this.isRightMousedown=!1,this.isMiddleMousedown=!1}onMousewheel(t){t.stopPropagation(),t.preventDefault();const e=[];t.deltaY<0&&e.push(n["a"].DIR.UP),t.deltaY>0&&e.push(n["a"].DIR.DOWN),t.deltaX<0&&e.push(n["a"].DIR.LEFT),t.deltaX>0&&e.push(n["a"].DIR.RIGHT);let i=!1;const{customCheckIsTouchPad:o}=this.mindMap.opt;i="function"===typeof o?o(t):Math.abs(t.deltaY)<=10,this.emit("mousewheel",t,e,this,i)}onContextmenu(t){Object(h["ab"])(this.mindMap,t)||(t.preventDefault(),t.ctrlKey||this.emit("contextmenu",t))}onKeyup(t){this.emit("keyup",t)}onMouseenter(t){this.emit("svg_mouseenter",t)}onMouseleave(t){this.emit("svg_mouseleave",t)}}var l=d,c=i("682c"),u=i.n(c),f=(i("13d5"),i("7c25"));class p extends f["a"]{constructor(t={},e){super(t),this.isUseLeft=e===n["a"].LAYOUT.LOGICAL_STRUCTURE_LEFT}doLayout(t,e,i){const n=e||this.renderer.renderTree;let o=[()=>{this.computedBaseValue(n,i)},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{t(this.root)}];Object(h["c"])(o)}computedBaseValue(t,e){let i=0;Object(h["Db"])(t,null,(t,n,o,r,s,a)=>{let h=this.createNode(t,n,o,r,s,a);if(h.sortIndex=i,i++,o){const i=void 0!==t.data.customLeft&&void 0!==t.data.customTop;if(i)h.left=t.data.customLeft,h.top=t.data.customTop;else if(this.setNodeCenter(h),void 0!==e&&null!==e){const t=150;h.top+=e*t}void 0!==e&&null!==e||(this.root=h)}else this.isUseLeft?h.left=n._node.left-h.width-this.getMarginX(r):h.left=n._node.left+n._node.width+this.getMarginX(r);if(!t.data.expand)return!0},(t,e,i,n)=>{let o=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaHeight=o?t._node.children.reduce((t,e)=>t+e.height,0)+(o+1)*this.getMarginY(n+1):0;let r=t._node.checkHasGeneralization()?t._node._generalizationNodeHeight+this.getMarginY(n+1):0;t._node.childrenAreaHeight2=Math.max(t._node.childrenAreaHeight,r)},!0,0)}computedTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(n+1),i=t.top+t.height/2-t.childrenAreaHeight/2,o=i+e;t.children.forEach(t=>{t.top=o,o+=t.height+e})}},null,!0)}adjustTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let o=t.childrenAreaHeight2-2*this.getMarginY(n+1)-t.height;o>0&&this.updateBrothers(t,o/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Object(h["K"])(t,i);i.forEach((i,o)=>{if(i.uid===t.uid||i.hasCustomPosition())return;let r=0;o<n?r=-e:o>n&&(r=e),i.top+=r,i.children&&i.children.length&&this.updateChildren(i.children,"top",r)}),this.updateBrothers(t.parent,e)}}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):"direct"===n?this.renderLineDirect(t,e,i):"brace"===n?this.renderLineBrace(t,e,i):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:n,top:o,width:r,height:s,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:d}=this.mindMap.opt;h&&!d||(a=0);let l=this.getMarginX(t.layerIndex+1),c=.6*(l-a);this.isUseLeft&&(c*=-1);let u=this.mindMap.themeConfig.nodeUseLineStyle;t.children.forEach((h,d)=>{let l;l=this.isUseLeft?0===t.layerIndex?n:n-a:0===t.layerIndex?n+r:n+r+a;let f=o+s/2,p=this.isUseLeft?h.left+h.width:h.left,g=h.top+h.height/2,m=u?h.width*(this.isUseLeft?-1:1):0;f=u&&!t.isRoot?f+s/2:f,g=u?g+h.height/2:g;let b=this.createFoldLine([[l,f],[l+c,f],[l+c,g],[p+m,g]]);this.setLineStyle(i,e[d],b,h)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:n,top:o,width:r,height:s,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:d}=this.mindMap.opt;h&&!d||(a=0);const{nodeUseLineStyle:l}=this.mindMap.themeConfig;t.children.forEach((h,d)=>{0===t.layerIndex&&(a=0);let c=this.isUseLeft?n-a:n+r+a,u=o+s/2,f=this.isUseLeft?h.left+h.width:h.left,p=h.top+h.height/2;u=l&&!t.isRoot?u+s/2:u,p=l?p+h.height/2:p;let g=l?` L ${this.isUseLeft?h.left:h.left+h.width},${p}`:"",m=`M ${c},${u} L ${f},${p}`+g;this.setLineStyle(i,e[d],m,h)})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:n,top:o,width:r,height:s,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:d}=this.mindMap.opt;h&&!d||(a=0);const{nodeUseLineStyle:l,rootLineStartPositionKeepSameInCurve:c,rootLineKeepSameInCurve:u}=this.mindMap.themeConfig;t.children.forEach((h,d)=>{let f;0===t.layerIndex&&(a=0),f=this.isUseLeft?0!==t.layerIndex||c?n-a:n+r/2:0!==t.layerIndex||c?n+r+a:n+r/2;let p,g=o+s/2,m=this.isUseLeft?h.left+h.width:h.left,b=h.top+h.height/2,x="";g=l&&!t.isRoot?g+s/2:g,b=l?b+h.height/2:b,p=this.isUseLeft?l?` L ${h.left},${b}`:"":l?` L ${h.left+h.width},${b}`:"",x=t.isRoot&&!u?this.quadraticCurvePath(f,g,m,b)+p:this.cubicBezierPath(f,g,m,b)+p,this.setLineStyle(i,e[d],x,h)})}renderLineBrace(t,e,i){if(t.children.length<=0)return[];const{left:n,top:o,width:r,height:s,expandBtnSize:a}=t,{alwaysShowExpandBtn:h,notShowExpandBtn:d}=this.mindMap.opt;let l=a;h&&!d||(l=0),0===t.layerIndex&&(l=0);const{braceCurveSize:c=12}=this.mindMap.themeConfig,u=this.getMarginX(t.layerIndex+1),f=t.children,p=o+s/2;if(1===f.length){const t=f[0],o=t.top+t.height/2;let s,a;this.isUseLeft?(s=n-l,a=t.left+t.width):(s=n+r+l,a=t.left);const h=(s+a)/2,d=(p+o)/2,c=Math.abs(a-s),u=c/3,g=`M ${h-u/2},${d} L ${h+u/2},${d}`;this.setLineStyle(i,e[0],g,t,!0)}else{const t=f[0],o=f[f.length-1],s=t.top+t.height/2,a=o.top+o.height/2;let h;h=this.isUseLeft?n-l-.4*u:n+r+l+.4*u;const d=this.createBracePath(h,s,a,p,this.isUseLeft,c);this.setLineStyle(i,e[0],d,t,!1);for(let i=1;i<f.length;i++)e[i]&&e[i].plot("")}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:o,layerIndex:r}=t;0===r&&(o=0);let{translateX:s,translateY:a}=e.transform(),h=this.mindMap.themeConfig.nodeUseLineStyle?n/2:0,d=this.isUseLeft?0-o:i,l=n/2+h;d===s&&l===a||e.translate(d-s,l-a)}renderGeneralization(t){t.forEach(t=>{let{left:e,top:i,bottom:n,right:o,generalizationLineMargin:r,generalizationNodeMargin:s}=this.getNodeGeneralizationRenderBoundaries(t,"h"),a=this.isUseLeft?e-r:o+r,h=a,d=i,l=a,c=n,u=h+(this.isUseLeft?-20:20),f=d+(c-d)/2,p=`M ${h},${d} Q ${u},${f} ${l},${c}`;t.generalizationLine.plot(p),t.generalizationNode.left=a+(this.isUseLeft?-s:s)-(this.isUseLeft?t.generalizationNode.width:0),t.generalizationNode.top=i+(n-i-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,n){this.isUseLeft?t.size(e,n).x(-e).y(0):t.size(e,n).x(i).y(0)}}var g=p;class m extends f["a"]{constructor(t={}){super(t)}doLayout(t,e,i){const n=e||this.renderer.renderTree;let o=[()=>{this.computedBaseValue(n,i)},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{t(this.root)}];Object(h["c"])(o)}computedBaseValue(t,e){Object(h["Db"])(t,null,(t,i,o,r,s,a)=>{let h=this.createNode(t,i,o,r,s,a);if(o){const i=void 0!==t.data.customLeft&&void 0!==t.data.customTop;if(i)h.left=t.data.customLeft,h.top=t.data.customTop;else if(this.setNodeCenter(h),void 0!==e&&null!==e){const t=150;h.top+=e*t}}else i._node.dir?h.dir=i._node.dir:h.dir=h.getData("dir")||(s%2===0?n["a"].LAYOUT_GROW_DIR.RIGHT:n["a"].LAYOUT_GROW_DIR.LEFT),h.left=h.dir===n["a"].LAYOUT_GROW_DIR.RIGHT?i._node.left+i._node.width+this.getMarginX(r):i._node.left-this.getMarginX(r)-h.width;if(!t.data.expand)return!0},(t,e,i,o)=>{if(!t.data.expand)return t._node.leftChildrenAreaHeight=0,void(t._node.rightChildrenAreaHeight=0);let r=0,s=0,a=0,h=0;t._node.children.forEach(t=>{t.dir===n["a"].LAYOUT_GROW_DIR.LEFT?(r++,a+=t.height):(s++,h+=t.height)}),t._node.leftChildrenAreaHeight=a+(r+1)*this.getMarginY(o+1),t._node.rightChildrenAreaHeight=h+(s+1)*this.getMarginY(o+1);let d=t._node.checkHasGeneralization()?t._node._generalizationNodeHeight+this.getMarginY(o+1):0;t._node.leftChildrenAreaHeight2=Math.max(t._node.leftChildrenAreaHeight,d),t._node.rightChildrenAreaHeight2=Math.max(t._node.rightChildrenAreaHeight,d)},!0,0)}computedTopValue(){Object(h["Db"])(this.root,null,(t,e,i,o)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(o+1),i=t.top+t.height/2+e,r=i-t.leftChildrenAreaHeight/2,s=i-t.rightChildrenAreaHeight/2;t.children.forEach(t=>{t.dir===n["a"].LAYOUT_GROW_DIR.LEFT?(t.top=r,r+=t.height+e):(t.top=s,s+=t.height+e)})}},null,!0)}adjustTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let o=2*this.getMarginY(n+1)+t.height,r=t.leftChildrenAreaHeight2-o,s=t.rightChildrenAreaHeight2-o;(r>0||s>0)&&this.updateBrothers(t,r/2,s/2)},null,!0)}updateBrothers(t,e,i){if(t.parent){let o=t.parent.children.filter(e=>e.dir===t.dir),r=Object(h["K"])(t,o);o.forEach((t,o)=>{if(t.hasCustomPosition())return;let s=0,a=t.dir===n["a"].LAYOUT_GROW_DIR.LEFT?e:i;o<r?s=-a:o>r&&(s=a),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),this.updateBrothers(t.parent,e,i)}}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):"direct"===n?this.renderLineDirect(t,e,i):"brace"===n?this.renderLineBrace(t,e,i):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:o,top:r,width:s,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(h=0);let c=this.getMarginX(t.layerIndex+1),u=.6*(c-h),f=this.mindMap.themeConfig.nodeUseLineStyle;t.children.forEach((d,l)=>{let c=0,p=0,g=f?d.width:0;d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?(p=-u,c=0===t.layerIndex?o:o-h,g=-g):(p=u,c=0===t.layerIndex?o+s:o+s+h);let m=r+a/2,b=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2;m=f&&!t.isRoot?m+a/2:m,x=f?x+d.height/2:x;let y=this.createFoldLine([[c,m],[c+p,m],[c+p,x],[b+g,x]]);this.setLineStyle(i,e[l],y,d)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:o,top:r,width:s,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(h=0);const{nodeUseLineStyle:c}=this.mindMap.themeConfig;t.children.forEach((d,l)=>{0===t.layerIndex&&(h=0);let u=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?o-h:o+s+h,f=r+a/2,p=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,g=d.top+d.height/2;f=c&&!t.isRoot?f+a/2:f,g=c?g+d.height/2:g;let m="";c&&(m=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?` L ${d.left},${g}`:` L ${d.left+d.width},${g}`);let b=`M ${u},${f} L ${p},${g}`+m;this.setLineStyle(i,e[l],b,d)})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:o,top:r,width:s,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(h=0);const{nodeUseLineStyle:c,rootLineKeepSameInCurve:u,rootLineStartPositionKeepSameInCurve:f}=this.mindMap.themeConfig;t.children.forEach((d,l)=>{0===t.layerIndex&&(h=0);let p=0!==t.layerIndex||f?d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?o-h:o+s+h:o+s/2,g=r+a/2,m=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,b=d.top+d.height/2,x="";g=c&&!t.isRoot?g+a/2:g,b=c?b+d.height/2:b;let y="";c&&(y=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?` L ${d.left},${b}`:` L ${d.left+d.width},${b}`),x=t.isRoot&&!u?this.quadraticCurvePath(p,g,m,b)+y:this.cubicBezierPath(p,g,m,b)+y,this.setLineStyle(i,e[l],x,d)})}renderLineBrace(t,e,i){if(t.children.length<=0)return[];const{left:o,top:r,width:s,height:a,expandBtnSize:h}=t,{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;let c=h;d&&!l||(c=0),0===t.layerIndex&&(c=0);const{braceCurveSize:u=15}=this.mindMap.themeConfig,f=this.getMarginX(t.layerIndex+1),p=t.children.filter(t=>t.dir===n["a"].LAYOUT_GROW_DIR.LEFT),g=t.children.filter(t=>t.dir===n["a"].LAYOUT_GROW_DIR.RIGHT);if(g.length>0){const n=r+a/2;if(1===g.length){const r=g[0],a=r.top+r.height/2,h=o+s+c,d=r.left,l=(h+d)/2,u=(n+a)/2,f=d-h,p=f/3,m=`M ${l-p/2},${u} L ${l+p/2},${u}`;this.setLineStyle(i,e[t.children.indexOf(r)],m,r,!0)}else{const r=g[0],a=g[g.length-1],h=r.top+r.height/2,d=a.top+a.height/2,l=o+s+c+.4*f,p=this.createBracePath(l,h,d,n,!1,u);this.setLineStyle(i,e[t.children.indexOf(g[0])],p,g[0],!1);for(let i=1;i<g.length;i++){const n=t.children.indexOf(g[i]);e[n]&&e[n].plot("")}}}if(p.length>0){const n=r+a/2;if(1===p.length){const r=p[0],s=r.top+r.height/2,a=o-c,h=r.left+r.width,d=(h+a)/2,l=(n+s)/2,u=a-h,f=u/3,g=`M ${d-f/2},${l} L ${d+f/2},${l}`;this.setLineStyle(i,e[t.children.indexOf(r)],g,r,!0)}else{const r=p[0],s=p[p.length-1],a=r.top+r.height/2,h=s.top+s.height/2,d=o-c-.4*f,l=this.createBracePath(d,a,h,n,!0,u);this.setLineStyle(i,e[t.children.indexOf(p[0])],l,p[0],!1);for(let i=1;i<p.length;i++){const n=t.children.indexOf(p[i]);e[n]&&e[n].plot("")}}}}renderExpandBtn(t,e){let{width:i,height:o,expandBtnSize:r}=t,{translateX:s,translateY:a}=e.transform(),h=this.mindMap.themeConfig.nodeUseLineStyle?o/2:0,d=t.dir===n["a"].LAYOUT_GROW_DIR.LEFT?0-r:i,l=o/2+h;if(d===s&&l===a)return;let c=d-s,u=l-a;e.translate(c,u)}renderGeneralization(t){t.forEach(t=>{let e=t.node.dir===n["a"].LAYOUT_GROW_DIR.LEFT,{top:i,bottom:o,left:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),d=e?r-a:s+a,l=d,c=i,u=d,f=o,p=l+(e?-20:20),g=c+(f-c)/2,m=`M ${l},${c} Q ${p},${g} ${u},${f}`;t.generalizationLine.plot(m),t.generalizationNode.left=d+(e?-h:h)-(e?t.generalizationNode.width:0),t.generalizationNode.top=i+(o-i-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,o,r){r.dir===n["a"].LAYOUT_GROW_DIR.LEFT?t.size(e,o).x(-e).y(0):t.size(e,o).x(i).y(0)}}var b=m;class x extends f["a"]{constructor(t={}){super(t)}doLayout(t,e,i){const n=e||this.renderer.renderTree;let o=[()=>{this.computedBaseValue(n,i)},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}];Object(h["c"])(o)}computedBaseValue(t,e){Object(h["Db"])(t,null,(t,i,n,o,r,s)=>{let a=this.createNode(t,i,n,o,r,s);if(n){const i=void 0!==t.data.customLeft&&void 0!==t.data.customTop;if(i)a.left=t.data.customLeft,a.top=t.data.customTop;else if(this.setNodeCenter(a),void 0!==e&&null!==e){const t=200;a.top+=e*t}}else i._node.isRoot&&(a.top=i._node.top+i._node.height+this.getMarginX(o));if(!t.data.expand)return!0},(t,e,i,n)=>{if(i){let e=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaWidth=e?t._node.children.reduce((t,e)=>t+e.width,0)+(e+1)*this.getMarginX(n+1):0}},!0,0)}computedLeftTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginX(n+1),o=this.getMarginY(n+1);if(i){let i=t.left+t.width/2-t.childrenAreaWidth/2,n=i+e;t.children.forEach(t=>{t.left=n,n+=t.width+e})}else{let e=t.top+this.getNodeHeightWithGeneralization(t)+o+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0);t.children.forEach(i=>{i.left=t.left+.5*t.width,i.top=e,e+=this.getNodeHeightWithGeneralization(i)+o+(this.getNodeActChildrenLength(i)>0?i.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;if(e&&e.isRoot){let e=this.getNodeAreaWidth(t,!0),i=e-t.width;i>0&&this.updateBrothersLeft(t,i)}let o=t.children.length;if(e&&!e.isRoot&&o>0){let e=this.getMarginY(n+1),i=t.children.reduce((t,e)=>t+this.getNodeHeightWithGeneralization(e)+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0),0)+o*e;this.updateBrothersTop(t,i)}},(t,e,i)=>{if(i){let{right:e,left:i}=this.getNodeBoundaries(t,"h"),n=e-i,o=t.left-i-(n-t.width)/2;this.updateChildren(t.children,"left",o)}},!0)}updateBrothersLeft(t,e){if(t.parent){let i=t.parent.children,n=Object(h["K"])(t,i);i.forEach((t,i)=>{t.hasCustomPosition()||i<=n||(t.left+=e,t.children&&t.children.length&&this.updateChildren(t.children,"left",e))}),this.updateBrothersLeft(t.parent,e)}}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Object(h["K"])(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let o=0;i>n&&(o=e),t.top+=o,t.children&&t.children.length&&this.updateChildren(t.children,"top",o)}),this.updateBrothersTop(t.parent,e)}}renderLine(t,e,i){if(t.children.length<=0)return[];let{left:n,top:o,width:r,height:s,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:d}=this.mindMap.opt;h&&!d||(a=0);let l=t.children.length,c=this.getMarginX(t.layerIndex+1);if(t.isRoot){let a=n+r/2,h=o+s,d=.7*c,u=1/0,f=-1/0;t.children.forEach((t,n)=>{let o=t.left+t.width/2,r=t.top;o<u&&(u=o),o>f&&(f=o);let s=this.mindMap.themeConfig.nodeUseLineStyle?` L ${t.left},${r} L ${t.left+t.width},${r}`:"",a=`M ${o},${h+d} L ${o},${h+d>r?r+t.height:r}`+s;this.setLineStyle(i,e[n],a,t)}),u=Math.min(u,a),f=Math.max(f,a);let p=this.lineDraw.path();if(t.style.line(p),p.plot(this.transformPath(`M ${a},${h} L ${a},${h+d}`)),t._lines.push(p),i&&i(p,t),l>0){let e=this.lineDraw.path();t.style.line(e),e.plot(this.transformPath(`M ${u},${h+d} L ${f},${h+d}`)),t._lines.push(e),i&&i(e,t)}}else{let n=o+s,r=-1/0,h=t.left+.3*t.width;if(t.children.forEach((s,a)=>{let d=s.top+s.height/2;d>r&&(r=d);let l="",c=s.left,u=s.left+s.width<h,f=!1;u?c=s.left+s.width:s.left<h&&s.left+s.width>h&&(f=!0,d=s.top,r=d),d>o&&d<n?l=`M ${u?t.left:t.left+t.width},${d} L ${c},${d}`:d<n?(f&&(d=s.top+s.height,c=h),l=`M ${h},${o} L ${h},${d} L ${c},${d}`):(f&&(c=h),l=`M ${h},${d} L ${c},${d}`);let p=this.mindMap.themeConfig.nodeUseLineStyle?` L ${c},${d-s.height/2} L ${c},${d+s.height/2}`:"";l+=p,this.setLineStyle(i,e[a],l,s)}),l>0){let e=this.lineDraw.path();a=l>0?a:0,t.style.line(e),r<n+a?e.hide():(e.plot(this.transformPath(`M ${h},${n+a} L ${h},${r}`)),e.show()),t._lines.push(e),i&&i(e,t)}}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:o,isRoot:r}=t;if(!r){let{translateX:t,translateY:r}=e.transform();e.translate(.3*i-o/2-t,n+o/2-r)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:o,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"h"),s=n+o,a=e,h=n+o,d=i,l=s+20,c=a+(d-a)/2,u=`M ${s},${a} Q ${l},${c} ${h},${d}`;t.generalizationLine.plot(this.transformPath(u)),t.generalizationNode.left=n+r,t.generalizationNode.top=e+(i-e-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,n,o){t.size(i,e).x(0).y(n)}}var y=x;class w extends f["a"]{constructor(t={}){super(t)}doLayout(t,e,i){const n=e||this.renderer.renderTree;let o=[()=>{this.computedBaseValue(n,i)},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{t(this.root)}];Object(h["c"])(o)}computedBaseValue(t,e){Object(h["Db"])(t,null,(t,i,n,o,r,s)=>{let a=this.createNode(t,i,n,o,r,s);if(n){const i=void 0!==t.data.customLeft&&void 0!==t.data.customTop;if(i)a.left=t.data.customLeft,a.top=t.data.customTop;else if(this.setNodeCenter(a),void 0!==e&&null!==e){const t=200;a.top+=e*t}}else a.top=i._node.top+i._node.height+this.getMarginX(o);if(!t.data.expand)return!0},(t,e,i,n)=>{let o=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaWidth=o?t._node.children.reduce((t,e)=>t+e.width,0)+(o+1)*this.getMarginY(n+1):0;let r=t._node.checkHasGeneralization()?t._node._generalizationNodeWidth+this.getMarginY(n+1):0;t._node.childrenAreaWidth2=Math.max(t._node.childrenAreaWidth,r)},!0,0)}computedLeftValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(n+1),i=t.left+t.width/2-t.childrenAreaWidth/2,o=i+e;t.children.forEach(t=>{t.left=o,o+=t.width+e})}},null,!0)}adjustLeftValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let o=t.childrenAreaWidth2-2*this.getMarginY(n+1)-t.width;o>0&&this.updateBrothers(t,o/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Object(h["K"])(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let o=0;i<n?o=-e:i>n&&(o=e),t.left+=o,t.children&&t.children.length&&this.updateChildren(t.children,"left",o)}),this.updateBrothers(t.parent,e)}}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):"direct"===n?this.renderLineDirect(t,e,i):this.renderLineStraight(t,e,i)}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:n,top:o,width:r,height:s,expandBtnSize:a}=t;const{alwaysShowExpandBtn:h,notShowExpandBtn:d}=this.mindMap.opt;h&&!d||(a=0);const{nodeUseLineStyle:l,rootLineStartPositionKeepSameInCurve:c,rootLineKeepSameInCurve:u}=this.mindMap.themeConfig;t.children.forEach((h,d)=>{0===t.layerIndex&&(a=0);let f=n+r/2,p=0!==t.layerIndex||c?o+s+a:o+s/2,g=h.left+h.width/2,m=h.top,b="",x=l?` L ${h.left},${m} L ${h.left+h.width},${m}`:"";b=t.isRoot&&!u?this.quadraticCurvePath(f,p,g,m,!0)+x:this.cubicBezierPath(f,p,g,m,!0)+x,this.setLineStyle(i,e[d],b,h)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:n,top:o,width:r,height:s}=t;const{nodeUseLineStyle:a}=this.mindMap.themeConfig;let h=n+r/2,d=o+s;t.children.forEach((t,n)=>{let o=t.left+t.width/2,r=t.top,s=a?` L ${t.left},${r} L ${t.left+t.width},${r}`:"",l=`M ${h},${d} L ${o},${r}`+s;this.setLineStyle(i,e[n],l,t)})}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:n,top:o,width:r,height:s,expandBtnSize:a,isRoot:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(a=0);let c=n+r/2,u=o+s,f=this.getMarginX(t.layerIndex+1),p=.7*f,g=1/0,m=-1/0,b=t.children.length;t.children.forEach((t,n)=>{let o=t.left+t.width/2,r=u+p>t.top?t.top+t.height:t.top;o<g&&(g=o),o>m&&(m=o);let s=this.mindMap.themeConfig.nodeUseLineStyle?` L ${t.left},${r} L ${t.left+t.width},${r}`:"",a=`M ${o},${u+p} L ${o},${r}`+s;this.setLineStyle(i,e[n],a,t)}),g=Math.min(c,g),m=Math.max(c,m);let x=this.lineDraw.path();if(t.style.line(x),a=b>0&&!h?a:0,x.plot(this.transformPath(`M ${c},${u+a} L ${c},${u+p}`)),t._lines.push(x),i&&i(x,t),b>0){let e=this.lineDraw.path();t.style.line(e),e.plot(this.transformPath(`M ${g},${u+p} L ${m},${u+p}`)),t._lines.push(e),i&&i(e,t)}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:o}=t,{translateX:r,translateY:s}=e.transform();e.translate(i/2-o/2-r,n+o/2-s)}renderGeneralization(t){t.forEach(t=>{let{bottom:e,left:i,right:n,generalizationLineMargin:o,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"v"),s=i,a=e+o,h=n,d=e+o,l=s+(h-s)/2,c=a+20,u=`M ${s},${a} Q ${l},${c} ${h},${d}`;t.generalizationLine.plot(this.transformPath(u)),t.generalizationNode.top=e+r,t.generalizationNode.left=i+(n-i-t.generalizationNode.width)/2})}renderExpandBtnRect(t,e,i,n,o){t.size(i,e).x(0).y(n)}}var C=w;class v extends f["a"]{constructor(t={},e){super(t),this.layout=e}doLayout(t,e,i){const n=e||this.renderer.renderTree;let o=[()=>{this.computedBaseValue(n,i)},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}];Object(h["c"])(o)}computedBaseValue(t,e){Object(h["Db"])(t,null,(t,i,o,r,s,a)=>{let h=this.createNode(t,i,o,r,s,a);if(o){const i=void 0!==t.data.customLeft&&void 0!==t.data.customTop;if(i)h.left=t.data.customLeft,h.top=t.data.customTop;else if(this.setNodeCenter(h),void 0!==e&&null!==e){const t=200;h.top+=e*t}}else this.layout===n["a"].LAYOUT.TIMELINE2?i._node.dir?h.dir=i._node.dir:h.dir=s%2===0?n["a"].LAYOUT_GROW_DIR.BOTTOM:n["a"].LAYOUT_GROW_DIR.TOP:h.dir="",i._node.isRoot&&(h.top=i._node.top+(t._node.height>i._node.height?-(t._node.height-i._node.height)/2:(i._node.height-t._node.height)/2));if(!t.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n,o)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginX(n+1),o=this.getMarginY(n+1);if(i){let i=t.left+t.width,n=i+e;t.children.forEach(t=>{t.left=n,n+=t.width+e})}else{let e=t.top+t.height+o+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0);t.children.forEach(i=>{i.left=t.left+.5*t.width,i.top=e,e+=i.height+o+(this.getNodeActChildrenLength(i)>0?i.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;t.isRoot&&this.updateBrothersLeft(t);let o=t.children.length;if(e&&!e.isRoot&&o>0){let e=this.getMarginY(n+1),i=t.children.reduce((t,e)=>t+e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0),0)+o*e;this.updateBrothersTop(t,i)}},(t,e,i,o)=>{e&&e.isRoot&&t.dir===n["a"].LAYOUT_GROW_DIR.TOP&&t.children.forEach(e=>{let i=this.getNodeAreaHeight(e),n=e.top;e.top=t.top-(e.top-t.top)-i+t.height,this.updateChildren(e.children,"top",e.top-n)})},!0)}getNodeAreaHeight(t){let e=0,i=t=>{e+=t.height+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+this.getMarginY(t.layerIndex),t.children.length&&t.children.forEach(t=>{i(t)})};return i(t),e}updateBrothersLeft(t){let e=t.children,i=0;e.forEach(t=>{t.left+=i,t.children&&t.children.length&&this.updateChildren(t.children,"left",i);let{left:e,right:n}=this.getNodeBoundaries(t,"h"),o=n-e,r=o-t.width;r>0&&(i+=r)})}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Object(h["K"])(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let o=0;i>n&&(o=e),t.top+=o,t.children&&t.children.length&&this.updateChildren(t.children,"top",o)}),this.updateBrothersTop(t.parent,e)}}renderLine(t,e,i){if(t.children.length<=0)return[];let{left:o,top:r,width:s,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(h=0);let c=t.children.length;if(t.isRoot){let n=t;t.children.forEach((o,r)=>{let s=n.left+n.width,a=o.left,h=t.top+t.height/2,d=`M ${s},${h} L ${a},${h}`;this.setLineStyle(i,e[r],d,o),n=o})}else{let o=-1/0,s=1/0,d=t.left+.3*t.width;if(t.children.forEach((t,n)=>{let r=t.top+t.height/2;r>o&&(o=r),r<s&&(s=r);let a=`M ${d},${r} L ${t.left},${r}`;this.setLineStyle(i,e[n],a,t)}),c>0){let e=this.lineDraw.path();h=c>0?h:0,t.parent&&t.parent.isRoot&&t.dir===n["a"].LAYOUT_GROW_DIR.TOP?e.plot(this.transformPath(`M ${d},${r} L ${d},${s}`)):e.plot(this.transformPath(`M ${d},${r+a+h} L ${d},${o}`)),t.style.line(e),t._lines.push(e),i&&i(e,t)}}}renderExpandBtn(t,e){let{width:i,height:o,expandBtnSize:r,isRoot:s}=t;if(!s){let{translateX:s,translateY:a}=e.transform();t.parent&&t.parent.isRoot&&t.dir===n["a"].LAYOUT_GROW_DIR.TOP?e.translate(.3*i-r/2-s,-r/2-a):e.translate(.3*i-r/2-s,o+r/2-a)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:o,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"h"),s=n+o,a=e,h=n+o,d=i,l=s+20,c=a+(d-a)/2,u=`M ${s},${a} Q ${l},${c} ${h},${d}`;t.generalizationLine.plot(this.transformPath(u)),t.generalizationNode.left=n+r,t.generalizationNode.top=e+(i-e-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,o,r){if(this.layout===n["a"].LAYOUT.TIMELINE)t.size(i,e).x(0).y(o);else{let s="";s=r.dir===n["a"].LAYOUT_GROW_DIR.TOP&&1===r.layerIndex?n["a"].LAYOUT_GROW_DIR.TOP:n["a"].LAYOUT_GROW_DIR.BOTTOM,s===n["a"].LAYOUT_GROW_DIR.TOP?t.size(i,e).x(0).y(-e):t.size(i,e).x(0).y(o)}}}var _=v;class M extends f["a"]{constructor(t={},e){super(t),this.layout=e}doLayout(t,e,i){const n=e||this.renderer.renderTree;let o=[()=>{this.computedBaseValue(n,i)},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}];Object(h["c"])(o)}computedBaseValue(t,e){Object(h["Db"])(t,null,(t,i,o,r,s,a)=>{let h=this.createNode(t,i,o,r,s,a);if(o){const i=void 0!==t.data.customLeft&&void 0!==t.data.customTop;if(i)h.left=t.data.customLeft,h.top=t.data.customTop;else if(this.setNodeCenter(h),void 0!==e&&null!==e){const t=300;h.left+=e*t}}else i._node.dir?h.dir=i._node.dir:h.dir=s%2===0?n["a"].LAYOUT_GROW_DIR.RIGHT:n["a"].LAYOUT_GROW_DIR.LEFT,i._node.isRoot?h.left=i._node.left+(t._node.width>i._node.width?-(t._node.width-i._node.width)/2:(i._node.width-t._node.width)/2):h.left=h.dir===n["a"].LAYOUT_GROW_DIR.RIGHT?i._node.left+i._node.width+this.getMarginX(r):i._node.left-this.getMarginX(r)-h.width;if(!t.data.expand)return!0},(t,e,i,n)=>{if(i)return;let o=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaHeight=o?t._node.children.reduce((t,e)=>t+e.height,0)+(o+1)*this.getMarginY(n+1):0},!0,0)}computedTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n,o)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(n+1);if(i){let i=t.top+t.height,n=i+e;t.children.forEach(t=>{t.top=n,n+=t.height+e})}else{let e=this.getMarginY(n+1),i=t.top+t.height/2+e,o=i-t.childrenAreaHeight/2;t.children.forEach(t=>{t.top=o,o+=t.height+e})}}},null,!0)}adjustLeftTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;if(i)return;let o=2*this.getMarginY(n+1)+t.height,r=t.childrenAreaHeight-o;r>0&&this.updateBrothers(t,r/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Object(h["K"])(t,i);i.forEach((i,o)=>{if(i.hasCustomPosition())return;if(!t.parent.isRoot&&i.uid===t.uid)return;let r=0;t.parent.isRoot?r=o<n?0:o>n?2*e:e:o<n?r=-e:o>n&&(r=e),i.top+=r,i.children&&i.children.length&&this.updateChildren(i.children,"top",r)}),this.updateBrothers(t.parent,e)}}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Object(h["K"])(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let o=0;i>n&&(o=e),t.top+=o,t.children&&t.children.length&&this.updateChildren(t.children,"top",o)}),this.updateBrothersTop(t.parent,e)}}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):"direct"===n?this.renderLineDirect(t,e,i):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{expandBtnSize:o}=t;const{alwaysShowExpandBtn:r,notShowExpandBtn:s}=this.mindMap.opt;if(r&&!s||(o=0),t.isRoot){let n=t;t.children.forEach((o,r)=>{let s=n.top+n.height,a=o.top,h=t.left+t.width/2,d=`M ${h},${s} L ${h},${a}`;this.setLineStyle(i,e[r],d,o),n=o})}else if(t.dir===n["a"].LAYOUT_GROW_DIR.RIGHT){let n=t.left+t.width,r=t.top+t.height/2,s=this.getMarginX(t.layerIndex+1),a=.6*(s-o);t.children.forEach((t,o)=>{let s=t.left,h=t.top+t.height/2,d=this.createFoldLine([[n,r],[n+a,r],[n+a,h],[s,h]]);this.setLineStyle(i,e[o],d,t)})}else{let n=t.left,r=t.top+t.height/2,s=this.getMarginX(t.layerIndex+1),a=.6*(s-o);t.children.forEach((t,o)=>{let s=t.left+t.width,h=t.top+t.height/2,d=this.createFoldLine([[n,r],[n-a,r],[n-a,h],[s,h]]);this.setLineStyle(i,e[o],d,t)})}}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:o,top:r,width:s,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(h=0),t.children.forEach((d,l)=>{if(t.isRoot){let n=t;t.children.forEach((o,r)=>{let s=n.top+n.height,a=o.top,h=t.left+t.width/2,d=`M ${h},${s} L ${h},${a}`;this.setLineStyle(i,e[r],d,o),n=o})}else{let t=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?o-h:o+s+h,c=r+a/2,u=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,f=d.top+d.height/2,p=`M ${t},${c} L ${u},${f}`;this.setLineStyle(i,e[l],p,d)}})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:o,top:r,width:s,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(h=0),t.children.forEach((d,l)=>{if(t.isRoot){let n=t;t.children.forEach((o,r)=>{let s=n.top+n.height,a=o.top,h=t.left+t.width/2,d=`M ${h},${s} L ${h},${a}`;this.setLineStyle(i,e[r],d,o),n=o})}else{let t=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?o-h:o+s+h,c=r+a/2,u=d.dir===n["a"].LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,f=d.top+d.height/2,p=this.cubicBezierPath(t,c,u,f);this.setLineStyle(i,e[l],p,d)}})}renderExpandBtn(t,e){let{width:i,height:o,expandBtnSize:r,isRoot:s}=t;if(!s){let{translateX:s,translateY:a}=e.transform();t.dir===n["a"].LAYOUT_GROW_DIR.RIGHT?e.translate(i-s,o/2-a):e.translate(-r-s,o/2-a)}}renderGeneralization(t){t.forEach(t=>{let e=t.node.dir===n["a"].LAYOUT_GROW_DIR.LEFT,{top:i,bottom:o,left:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),d=e?r-a:s+a,l=d,c=i,u=d,f=o,p=l+(e?-20:20),g=c+(f-c)/2,m=`M ${l},${c} Q ${p},${g} ${u},${f}`;t.generalizationLine.plot(this.transformPath(m)),t.generalizationNode.left=d+(e?-h:h)-(e?t.generalizationNode.width:0),t.generalizationNode.top=i+(o-i-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,o,r){r.dir===n["a"].LAYOUT_GROW_DIR.LEFT?t.size(e,o).x(-e).y(0):t.size(e,o).x(i).y(0)}}var E=M,N={top:{renderExpandBtn({node:t,btn:e,expandBtnSize:i,translateX:n,translateY:o,width:r,height:s}){t.parent&&t.parent.isRoot?e.translate(.3*r-i/2-n,-i/2-o):e.translate(.3*r-i/2-n,s+i/2-o)},renderLine({node:t,line:e,top:i,x:n,lineLength:o,height:r,expandBtnSize:s,maxy:a,ctx:d}){t.parent&&t.parent.isRoot?e.plot(d.transformPath(`M ${n},${i} L ${n+o},${i-Math.tan(Object(h["x"])(d.mindMap.opt.fishboneDeg))*o}`)):e.plot(d.transformPath(`M ${n},${i+r+s} L ${n},${a}`))},computedLeftTopValue({layerIndex:t,node:e,ctx:i}){if(t>=1&&e.children){let n=i.getMarginY(t+1),o=e.left+e.width*i.childIndent,r=e.top+e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(t=>{t.left=o,t.top+=r,r+=t.height+(i.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:t,parent:e,ctx:i,layerIndex:n}){let o=t.children.length,r=i.getMarginY(n+1);if(e&&!e.isRoot&&o>0){let e=t.children.reduce((t,e)=>t+e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+r,0);i.updateBrothersTop(t,e)}},adjustLeftTopValueAfter({parent:t,node:e,ctx:i}){if(t&&t.isRoot){let t=i.getMarginY(e.layerIndex+1),n=e.expandBtnSize+t;e.children.forEach(t=>{let o=i.getNodeAreaHeight(t),r=t.top,s=t.left;t.top=e.top-(t.top-e.top)-o+e.height,t.left=e.left+e.width*i.indent+(o+n)/Math.tan(Object(h["x"])(i.mindMap.opt.fishboneDeg)),n+=o,i.updateChildrenPro(t.children,{top:t.top-r,left:t.left-s})})}}},bottom:{renderExpandBtn({node:t,btn:e,expandBtnSize:i,translateX:n,translateY:o,width:r,height:s}){t.parent&&t.parent.isRoot?e.translate(.3*r-i/2-n,s+i/2-o):e.translate(.3*r-i/2-n,-i/2-o)},renderLine({node:t,line:e,top:i,x:n,lineLength:o,height:r,miny:s,ctx:a}){t.parent&&t.parent.isRoot?e.plot(a.transformPath(`M ${n},${i+r} L ${n+o},${i+r+Math.tan(Object(h["x"])(a.mindMap.opt.fishboneDeg))*o}`)):e.plot(a.transformPath(`M ${n},${i} L ${n},${s}`))},computedLeftTopValue({layerIndex:t,node:e,ctx:i}){let n=i.getMarginY(t+1);if(1===t&&e.children){let t=e.left+e.width*i.childIndent,o=e.top+e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(e=>{e.left=t,e.top=o+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0),o+=e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n})}if(t>1&&e.children){let t=e.left+e.width*i.childIndent,o=e.top-(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)-n;e.children.forEach(e=>{e.left=t,e.top=o-e.height,o-=e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:t,ctx:e,layerIndex:i}){let n=e.getMarginY(i+1),o=t.children.length;if(i>2&&o>0){let i=t.children.reduce((t,i)=>t+i.height+(e.getNodeActChildrenLength(i)>0?i.expandBtnSize:0)+n,0);e.updateBrothersTop(t,-i)}},adjustLeftTopValueAfter({parent:t,node:e,ctx:i}){if(t&&t.isRoot){let t=i.getMarginY(e.layerIndex+1),n=0,o=e.expandBtnSize;e.children.forEach(r=>{let s=i.getNodeActChildrenLength(r)>0,a=i.getNodeAreaHeight(r),d=s?a-r.height-(s?r.expandBtnSize:0):0;d-=s?t:0;let l=n+d,c=r.left;r.top+=l,r.left=e.left+e.width*i.indent+(a+o)/Math.tan(Object(h["x"])(i.mindMap.opt.fishboneDeg)),n+=d,o+=a,i.updateChildrenPro(r.children,{top:l,left:r.left-c})})}}}};class T extends f["a"]{constructor(t={}){super(t),this.indent=.3,this.childIndent=.5}doLayout(t,e,i){const n=e||this.renderer.renderTree;let o=[()=>{this.computedBaseValue(n,i)},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}];Object(h["c"])(o)}computedBaseValue(t,e){Object(h["Db"])(t,null,(t,i,o,r,s,a)=>{let h=this.createNode(t,i,o,r,s,a);if(o){const i=void 0!==t.data.customLeft&&void 0!==t.data.customTop;if(i)h.left=t.data.customLeft,h.top=t.data.customTop;else if(this.setNodeCenter(h),void 0!==e&&null!==e){const t=250;h.top+=e*t}}else if(i._node.dir?h.dir=i._node.dir:h.dir=s%2===0?n["a"].LAYOUT_GROW_DIR.TOP:n["a"].LAYOUT_GROW_DIR.BOTTOM,i._node.isRoot){let t=this.getMarginY(r);this.checkIsTop(h)?h.top=i._node.top-h.height-t:h.top=i._node.top+i._node.height+t}if(!t.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(t.isRoot){let e=this.getMarginX(n+1),i=t.left+t.width+t.height+e,o=t.left+t.width+t.height+e;t.children.forEach(t=>{this.checkIsTop(t)?(t.left=i,i+=t.width+e):(t.left=o+20,o+=t.width+e)})}let o={layerIndex:n,node:t,ctx:this};this.checkIsTop(t)?N.top.computedLeftTopValue(o):N.bottom.computedLeftTopValue(o)},null,!0)}adjustLeftTopValue(){Object(h["Db"])(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let o={node:t,parent:e,layerIndex:n,ctx:this};this.checkIsTop(t)?N.top.adjustLeftTopValueBefore(o):N.bottom.adjustLeftTopValueBefore(o)},(t,e)=>{let i={parent:e,node:t,ctx:this};if(this.checkIsTop(t)?N.top.adjustLeftTopValueAfter(i):N.bottom.adjustLeftTopValueAfter(i),t.isRoot){let e=0,i=0;t.children.forEach(t=>{if(this.checkIsTop(t)){t.left+=e,this.updateChildren(t.children,"left",e);let{left:i,right:n}=this.getNodeBoundaries(t,"h");e+=n-i}else{t.left+=i,this.updateChildren(t.children,"left",i);let{left:e,right:n}=this.getNodeBoundaries(t,"h");i+=n-e}})}},!0)}getNodeAreaHeight(t){let e=0,i=t=>{let n=this.getMarginY(t.layerIndex);e+=t.height+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+n,t.children.length&&t.children.forEach(t=>{i(t)})};return i(t),e}updateBrothersLeft(t){let e=t.children,i=0;e.forEach(t=>{t.left+=i,t.children&&t.children.length&&this.updateChildren(t.children,"left",i);let{left:e,right:n}=this.getNodeBoundaries(t,"h"),o=n-e,r=o-t.width;r>0&&(i+=r)})}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Object(h["K"])(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let o=0;i>n&&(o=e),t.top+=o,t.children&&t.children.length&&this.updateChildren(t.children,"top",o)}),this.checkIsTop(t)?this.updateBrothersTop(t.parent,e):this.updateBrothersTop(t.parent,3===t.layerIndex?0:e)}}checkIsTop(t){return t.dir===n["a"].LAYOUT_GROW_DIR.TOP}renderLine(t,e,i){if(1!==t.layerIndex&&t.children.length<=0)return[];let{top:n,height:o,expandBtnSize:r}=t;const{alwaysShowExpandBtn:s,notShowExpandBtn:a}=this.mindMap.opt;s&&!a||(r=0);let d=t.children.length;if(t.isRoot){let e=-1/0;t.children.forEach(n=>{n.left>e&&(e=n.left);let o=this.getMarginY(n.layerIndex),r=n.left,s=t.height/2+o,a=s/Math.tan(Object(h["x"])(this.mindMap.opt.fishboneDeg)),d=this.lineDraw.path();this.checkIsTop(n)?d.plot(this.transformPath(`M ${r-a},${n.top+n.height+s} L ${n.left},${n.top+n.height}`)):d.plot(this.transformPath(`M ${r-a},${n.top-s} L ${r},${n.top}`)),t.style.line(d),t._lines.push(d),i&&i(d,t)});let n=t.top+t.height/2,o=t.height/2+this.getMarginY(t.layerIndex+1),r=this.lineDraw.path();r.plot(this.transformPath(`M ${t.left+t.width},${n} L ${e-o/Math.tan(Object(h["x"])(this.mindMap.opt.fishboneDeg))},${n}`)),t.style.line(r),t._lines.push(r),i&&i(r,t)}else{let s=-1/0,a=1/0,h=-1/0,l=t.left+t.width*this.indent;if(t.children.forEach((n,o)=>{n.left>h&&(h=n.left);let r=n.top+n.height/2;if(r>s&&(s=r),r<a&&(a=r),t.layerIndex>1){let t=`M ${l},${r} L ${n.left},${r}`;this.setLineStyle(i,e[o],t,n)}}),d>=0){let e=this.lineDraw.path();r=d>0?r:0;let c=h-t.left-t.width*this.indent;c=Math.max(c,0);let u={node:t,line:e,top:n,x:l,lineLength:c,height:o,expandBtnSize:r,maxy:s,miny:a,ctx:this};this.checkIsTop(t)?N.top.renderLine(u):N.bottom.renderLine(u),t.style.line(e),t._lines.push(e),i&&i(e,t)}}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:o,isRoot:r}=t;if(!r){let{translateX:r,translateY:s}=e.transform(),a={node:t,btn:e,expandBtnSize:o,translateX:r,translateY:s,width:i,height:n};this.checkIsTop(t)?N.top.renderExpandBtn(a):N.bottom.renderExpandBtn(a)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:o,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"h"),s=n+o,a=e,h=n+o,d=i,l=s+20,c=a+(d-a)/2,u=`M ${s},${a} Q ${l},${c} ${h},${d}`;t.generalizationLine.plot(this.transformPath(u)),t.generalizationNode.left=n+r,t.generalizationNode.top=e+(i-e-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,o,r){let s="";s=r.dir===n["a"].LAYOUT_GROW_DIR.TOP?1===r.layerIndex?n["a"].LAYOUT_GROW_DIR.TOP:n["a"].LAYOUT_GROW_DIR.BOTTOM:1===r.layerIndex?n["a"].LAYOUT_GROW_DIR.BOTTOM:n["a"].LAYOUT_GROW_DIR.TOP,s===n["a"].LAYOUT_GROW_DIR.TOP?t.size(i,e).x(0).y(-e):t.size(i,e).x(0).y(o)}getLayoutType(){return n["a"].LAYOUT.FISHBONE}}var L=T;class S extends f["a"]{constructor(t={}){super(t);const e=this.mindMap.opt.radialLayoutConfig||{};this.startRadius=e.startRadius||120,this.radiusIncrement=e.radiusIncrement||150,this.startAngle=e.startAngle||0,this.endAngle=e.endAngle||360,this.minNodeSpacing=e.minNodeSpacing||20,this.radiusGrowthStrategy=e.radiusGrowthStrategy||"auto",this.exponentialGrowthFactor=e.exponentialGrowthFactor||1.5,this.autoAdjustRadius=!1!==e.autoAdjustRadius,this.angleDistribution=e.angleDistribution||"uniform",this.customRadiusCalculator=e.customRadiusCalculator||null}doLayout(t,e,i){const n=e||this.renderer.renderTree;let o=[()=>{this.computedBaseValue(n,i)},()=>{this.computedRadialPosition()},()=>{t(this.root)}];Object(h["c"])(o)}computedBaseValue(t,e){let i=0;Object(h["Db"])(t,null,(t,n,o,r,s,a)=>{let h=this.createNode(t,n,o,r,s,a);if(h.sortIndex=i,i++,o){const i=void 0!==t.data.customLeft&&void 0!==t.data.customTop;if(i)h.left=t.data.customLeft,h.top=t.data.customTop;else if(this.setNodeCenter(h),void 0!==e&&null!==e){const t=300;h.left+=e*t}void 0!==e&&null!==e||(this.root=h)}if(!t.data.expand)return!0},null,!0,0)}computedRadialPosition(){if(!this.root)return;const t=this.root.left+this.root.width/2,e=this.root.top+this.root.height/2;this.layoutSubtree(this.root,t,e,this.startAngle,this.endAngle,0)}layoutSubtree(t,e,i,n,o,r){if(!t.getData("expand")||!t.children||0===t.children.length)return;const s=t.children,a=s.length;let h=0,d=0;const l=[];s.forEach(t=>{const e=Math.max(t.width,t.height);h+=e+this.minNodeSpacing,d=Math.max(d,e),l.push(e)});let c=this.calculateRadius(r,a,h,n,o);const u=this.calculateNodePositions(s,c,n,o,e,i,l);s.forEach((t,n)=>{const{x:o,y:s,childStartAngle:a,childEndAngle:h}=u[n];t.left=o-t.width/2,t.top=s-t.height/2,this.layoutSubtree(t,e,i,a,h,r+1)})}calculateRadius(t,e,i,n,o){if(this.customRadiusCalculator)return this.customRadiusCalculator(t,e,i);let r;switch(this.radiusGrowthStrategy){case"fixed":if("function"===typeof this.radiusIncrement){r=this.startRadius;for(let e=0;e<t;e++)r+=this.radiusIncrement(e)}else r=this.startRadius+t*this.radiusIncrement;break;case"exponential":r=this.startRadius*Math.pow(this.exponentialGrowthFactor,t);break;case"auto":default:if("function"===typeof this.radiusIncrement){r=this.startRadius;for(let e=0;e<t;e++)r+=this.radiusIncrement(e)}else r=this.startRadius+t*this.radiusIncrement;if(this.autoAdjustRadius){const t=o-n,e=t*Math.PI/180,s=r*e;i>s&&(r=i/e)}break}return r}calculateNodePositions(t,e,i,n,o,r,s){const a=[],h=n-i;if(1===t.length){const t=i+h/2,s=t*Math.PI/180;a.push({x:o+e*Math.cos(s),y:r+e*Math.sin(s),childStartAngle:i,childEndAngle:n})}else if("weighted"===this.angleDistribution){const n=this.calculateSubtreeWeights(t),s=n.reduce((t,e)=>t+e,0);let d=i;t.forEach((t,i)=>{const l=n[i]/s*h,c=d+l/2,u=c*Math.PI/180;a.push({x:o+e*Math.cos(u),y:r+e*Math.sin(u),childStartAngle:d,childEndAngle:d+l}),d+=l})}else{const n=t.length,s=h/n;t.forEach((t,n)=>{const h=i+s*(n+.5),d=h*Math.PI/180;a.push({x:o+e*Math.cos(d),y:r+e*Math.sin(d),childStartAngle:i+s*n,childEndAngle:i+s*(n+1)})})}return a}calculateSubtreeWeights(t){return t.map(t=>t.getData("expand")&&t.children&&0!==t.children.length?this.countSubtreeNodes(t):1)}countSubtreeNodes(t){let e=1;return t.getData("expand")&&t.children&&t.children.length>0&&t.children.forEach(t=>{e+=this.countSubtreeNodes(t)}),e}renderLine(t,e,i,n){"curve"===n?this.renderLineCurve(t,e,i):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];const{left:n,top:o,width:r,height:s}=t,a=n+r/2,h=o+s/2;t.children.forEach((t,n)=>{const o=t.left+t.width/2,r=t.top+t.height/2,s=this.createFoldLine([[a,h],[o,r]]);this.setLineStyle(i,e[n],s,t)})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];const{left:n,top:o,width:r,height:s}=t,a=n+r/2,h=o+s/2;t.children.forEach((t,n)=>{const o=t.left+t.width/2,r=t.top+t.height/2,s=o-a,d=r-h,l=(Math.sqrt(s*s+d*d),a+.3*s),c=h,u=a+.7*s,f=r,p=`M ${a},${h} C ${l},${c} ${u},${f} ${o},${r}`;this.setLineStyle(i,e[n],p,t)})}renderExpandBtn(t,e,i){if(!t.children||0===t.children.length)return;const{left:n,top:o,width:r,height:s}=t,a=n+r/2,h=o+s/2;let d=0,l=0;if(t.children.forEach(t=>{const e=t.left+t.width/2,i=t.top+t.height/2,n=e-a,o=i-h,r=Math.atan2(o,n);d+=r,l++}),l>0){const i=d/l,n=30,o=a+(r/2+n)*Math.cos(i),c=h+(s/2+n)*Math.sin(i);t._unExpandBtnSize=e,t._expandBtn.translate(o-e/2,c-e/2)}}renderGeneralization(t){}getMarginX(t){return 0}getMarginY(t){return 0}renderExpandBtnRect(t,e,i,n){t.size(e,e).x(i/2-e/2).y(n)}}var D=S;class R{constructor(t){this.renderer=t,this.mindMap=t.mindMap,this.currentNode=null,this.textEditNode=null,this.showTextEdit=!1,this.cacheEditingText="",this.hasBodyMousedown=!1,this.textNodePaddingX=5,this.textNodePaddingY=3,this.isNeedUpdateTextEditNode=!1,this.bindEvent()}bindEvent(){this.show=this.show.bind(this),this.onScale=this.onScale.bind(this),this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("node_dblclick",(t,e,i)=>{this.show({node:t,e:e,isInserting:i})}),this.mindMap.on("draw_click",()=>{this.hideEditTextBox()}),this.mindMap.on("body_mousedown",()=>{this.hasBodyMousedown=!0}),this.mindMap.on("body_click",()=>{this.hasBodyMousedown&&(this.hasBodyMousedown=!1,this.mindMap.opt.isEndNodeTextEditOnClickOuter&&this.hideEditTextBox())}),this.mindMap.on("svg_mousedown",()=>{this.hideEditTextBox()}),this.mindMap.on("expand_btn_click",()=>{this.hideEditTextBox()}),this.mindMap.on("before_node_active",()=>{this.hideEditTextBox()}),this.mindMap.on("mousewheel",()=>{this.mindMap.opt.mousewheelAction===n["a"].MOUSE_WHEEL_ACTION.MOVE&&this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("F2",()=>{this.renderer.activeNodeList.length<=0||this.show({node:this.renderer.activeNodeList[0]})}),this.mindMap.on("scale",this.onScale),this.mindMap.opt.enableAutoEnterTextEditWhenKeydown&&window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()}),this.mindMap.on("after_update_config",(t,e)=>{t.openRealtimeRenderOnNodeTextEdit!==e.openRealtimeRenderOnNodeTextEdit&&(this.mindMap.richText?this.mindMap.richText.onOpenRealtimeRenderOnNodeTextEditConfigUpdate(t.openRealtimeRenderOnNodeTextEdit):this.onOpenRealtimeRenderOnNodeTextEditConfigUpdate(t.openRealtimeRenderOnNodeTextEdit)),t.enableAutoEnterTextEditWhenKeydown!==e.enableAutoEnterTextEditWhenKeydown&&window[t.enableAutoEnterTextEditWhenKeydown?"addEventListener":"removeEventListener"]("keydown",this.onKeydown)}),this.mindMap.on("afterExecCommand",()=>{this.isShowTextEdit()&&(this.isNeedUpdateTextEditNode=!0)}),this.mindMap.on("node_tree_render_end",()=>{this.isShowTextEdit()&&this.isNeedUpdateTextEditNode&&(this.isNeedUpdateTextEditNode=!1,this.updateTextEditNode())})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}onKeydown(t){if(t.target!==document.body)return;const e=this.mindMap.renderer.activeNodeList;if(e.length<=0||e.length>1)return;const i=e[0];i&&this.checkIsAutoEnterTextEditKey(t)&&(t.preventDefault(),this.show({node:i,e:t,isInserting:!1,isFromKeyDown:!0}))}checkIsAutoEnterTextEditKey(t){const e=t.keyCode;return(229===e||e>=65&&e<=90||e>=48&&e<=57)&&!this.mindMap.keyCommand.hasCombinationKey(t)}registerTmpShortcut(){this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("Tab",()=>{this.hideEditTextBox()})}isShowTextEdit(){return this.mindMap.richText?this.mindMap.richText.showTextEdit:this.showTextEdit}async show({node:t,isInserting:e=!1,isFromKeyDown:i=!1,isFromScale:o=!1}){if(t.isUseCustomNodeContent())return;const r=this.getCurrentEditNode();r&&this.hideEditTextBox();const{beforeTextEdit:s,openRealtimeRenderOnNodeTextEdit:a}=this.mindMap.opt;if("function"===typeof s){let i=!1;try{i=await s(t,e)}catch(p){i=!1,this.mindMap.opt.errorHandler(n["b"].BEFORE_TEXT_EDIT_ERROR,p)}if(!i)return}const{offsetLeft:d,offsetTop:l}=Object(h["j"])(this.mindMap,t);this.mindMap.view.translateXY(d,l);const c=t._textData.node;a&&c.show();const u=c.node.getBoundingClientRect();a&&c.hide();const f={node:t,rect:u,isInserting:e,isFromKeyDown:i,isFromScale:o};this.mindMap.richText?this.mindMap.richText.showEditText(f):(this.currentNode=t,this.showEditTextBox(f))}onOpenRealtimeRenderOnNodeTextEditConfigUpdate(t){this.textEditNode&&(this.textEditNode.style.background=t?"transparent":this.currentNode?this.getBackground(this.currentNode):"",this.textEditNode.style.boxShadow=t?"none":"0 0 20px rgba(0,0,0,.5)")}onScale(){const t=this.getCurrentEditNode();t&&(this.mindMap.richText?(this.mindMap.richText.cacheEditingText=this.mindMap.richText.getEditText(),this.mindMap.richText.showTextEdit=!1):(this.cacheEditingText=this.getEditText(),this.showTextEdit=!1),this.show({node:t,isFromScale:!0}))}showEditTextBox({node:t,rect:e,isInserting:i,isFromKeyDown:o,isFromScale:r}){if(this.showTextEdit)return;const{nodeTextEditZIndex:s,textAutoWrapWidth:a,selectTextOnEnterEditText:d,openRealtimeRenderOnNodeTextEdit:l,autoEmptyTextWhenKeydownEnterEdit:c}=this.mindMap.opt;if(r||this.mindMap.emit("before_show_text_edit"),this.registerTmpShortcut(),!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.classList.add(n["a"].EDIT_NODE_CLASS.SMM_NODE_EDIT_WRAP),this.textEditNode.style.cssText=`\n position: fixed;\n box-sizing: border-box;\n ${l?"":"box-shadow: 0 0 20px rgba(0,0,0,.5);"}\n padding: ${this.textNodePaddingY}px ${this.textNodePaddingX}px;\n margin-left: -${this.textNodePaddingX}px;\n margin-top: -${this.textNodePaddingY}px;\n outline: none; \n word-break: break-all;\n line-break: anywhere;\n `,this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",t=>{t.stopPropagation()}),this.textEditNode.addEventListener("click",t=>{t.stopPropagation()}),this.textEditNode.addEventListener("mousedown",t=>{t.stopPropagation()}),this.textEditNode.addEventListener("keydown",t=>{this.checkIsAutoEnterTextEditKey(t)&&t.stopPropagation();const e=t.ctrlKey||t.metaKey,i=t.key.toLowerCase(),n=["a","c","v","x","z","y"];if(e&&n.includes(i)&&(t.stopPropagation(),"a"===i)){t.preventDefault();const e=window.getSelection(),i=document.createRange();i.selectNodeContents(this.textEditNode),e.removeAllRanges(),e.addRange(i)}}),this.textEditNode.addEventListener("paste",t=>{const e=t.clipboardData.getData("text"),{isSmm:i,data:n}=Object(h["n"])(e);i&&n[0]&&n[0].data?Object(h["W"])(t,Object(h["R"])(n[0].data.text)):Object(h["W"])(t),this.emitTextChangeEvent()}),this.textEditNode.addEventListener("input",()=>{this.emitTextChangeEvent()});const t=this.mindMap.opt.customInnerElsAppendTo||document.body;t.appendChild(this.textEditNode)}const u=this.mindMap.view.scale,f=t.style.merge("fontSize"),p=(this.cacheEditingText||t.getData("text")).split(/\n/gim).map(t=>Object(h["Y"])(t)),g="true"===t._textData.node.attr("data-ismultiLine");t.style.domText(this.textEditNode,u),l||(this.textEditNode.style.background=this.getBackground(t)),this.textEditNode.style.zIndex=s,this.textEditNode.innerHTML=o&&c?"":p.join("<br>"),this.textEditNode.style.minWidth=e.width+2*this.textNodePaddingX+"px",this.textEditNode.style.minHeight=e.height+"px",this.textEditNode.style.left=Math.floor(e.left)+"px",this.textEditNode.style.top=Math.floor(e.top)+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=a*u+"px",g?(this.textEditNode.style.lineHeight=n["h"],this.textEditNode.style.transform=`translateY(${(n["h"]-1)*f/2*u}px)`):this.textEditNode.style.lineHeight="normal",this.showTextEdit=!0,i||d&&!o?Object(h["wb"])(this.textEditNode):Object(h["A"])(this.textEditNode),this.cacheEditingText=""}emitTextChangeEvent(){this.mindMap.emit("node_text_edit_change",{node:this.currentNode,text:this.getEditText(),richText:!1})}updateTextEditNode(){if(this.mindMap.richText)return void this.mindMap.richText.updateTextEditNode();if(!this.showTextEdit||!this.currentNode)return;const t=this.currentNode._textData.node.node.getBoundingClientRect();this.textEditNode.style.minWidth=t.width+2*this.textNodePaddingX+"px",this.textEditNode.style.minHeight=t.height+2*this.textNodePaddingY+"px",this.textEditNode.style.left=Math.floor(t.left)+"px",this.textEditNode.style.top=Math.floor(t.top)+"px"}getBackground(t){const e=t.style.merge("gradientStyle");if(e){const e=t.style.merge("startColor"),i=t.style.merge("endColor");return`linear-gradient(to right, ${e}, ${i})`}{const e=t.style.merge("fillColor"),i=t.style.merge("color");return"transparent"===e?Object(h["gb"])(i)?Object(h["U"])(this.mindMap.themeConfig):"#fff":e}}removeTextEditEl(){if(this.mindMap.richText)return void this.mindMap.richText.removeTextEditEl();if(!this.textEditNode)return;const t=this.mindMap.opt.customInnerElsAppendTo||document.body;t.removeChild(this.textEditNode)}getEditText(){return Object(h["Q"])(this.textEditNode.innerHTML)}hideEditTextBox(){if(this.mindMap.richText)return this.mindMap.richText.hideEditText();if(!this.showTextEdit)return;const t=this.currentNode,e=this.getEditText();this.currentNode=null,this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.textEditNode.style.fontFamily="inherit",this.textEditNode.style.fontSize="inherit",this.textEditNode.style.fontWeight="normal",this.textEditNode.style.transform="translateY(0)",this.showTextEdit=!1,this.mindMap.execCommand("SET_NODE_TEXT",t,e),this.mindMap.render(),this.mindMap.emit("hide_text_edit",this.textEditNode,this.renderer.activeNodeList,t)}getCurrentEditNode(){return this.mindMap.richText?this.mindMap.richText.node:this.currentNode}}var z=i("5c06"),A=i("4699"),O=i("8a19");const k={[n["a"].LAYOUT.LOGICAL_STRUCTURE]:g,[n["a"].LAYOUT.LOGICAL_STRUCTURE_LEFT]:g,[n["a"].LAYOUT.MIND_MAP]:b,[n["a"].LAYOUT.CATALOG_ORGANIZATION]:y,[n["a"].LAYOUT.ORGANIZATION_STRUCTURE]:C,[n["a"].LAYOUT.TIMELINE]:_,[n["a"].LAYOUT.TIMELINE2]:_,[n["a"].LAYOUT.VERTICAL_TIMELINE]:E,[n["a"].LAYOUT.FISHBONE]:L,[n["a"].LAYOUT.RADIAL]:D};class I{constructor(t={}){this.opt=t,this.mindMap=t.mindMap,this.themeConfig=this.mindMap.themeConfig,this.mindMap.opt.data?Array.isArray(this.mindMap.opt.data)?this.renderTree=this.mindMap.opt.data.map(t=>u()({},t)):this.renderTree=u()({},this.mindMap.opt.data):this.renderTree=null,this.isMultiRoot=this.mindMap.isMultiRoot||!1,this.reRender=!1,this.isRendering=!1,this.hasWaitRendering=!1,this.waitRenderingParams=[],this.nodeCache={},this.lastNodeCache={},this.renderSource="",this.activeNodeList=[],this.root=null,this.textEdit=new R(this),this.beingCopyData=null,this.highlightBoxNode=null,this.highlightBoxNodeStyle=null,this.lastActiveNodeList=[],this.setLayout(),this.bindEvent(),this.registerCommands(),this.registerShortcutKeys()}setLayout(){const{layout:t}=this.mindMap.opt;this.layout=new(k[t]?k[t]:k[n["a"].LAYOUT.LOGICAL_STRUCTURE])(this,t)}setData(t){this.isMultiRoot=this.mindMap.isMultiRoot,this.isMultiRoot?Array.isArray(t)?this.renderTree=t:this.renderTree=t?[t]:[]:Array.isArray(t)&&t.length>0?this.renderTree=t[0]:this.renderTree=t||null}bindEvent(){const{openPerformance:t,performanceConfig:e,openRealtimeRenderOnNodeTextEdit:i}=this.mindMap.opt;this.mindMap.on("draw_click",t=>{this.clearActiveNodeListOnDrawClick(t,"click")}),this.mindMap.on("contextmenu",t=>{this.clearActiveNodeListOnDrawClick(t,"contextmenu")}),this.mindMap.svg.on("dblclick",t=>{this.mindMap.isMultiRoot&&!1!==this.mindMap.opt.enableDblclickCreateRootNode?this.handleCanvasDoubleClick(t):this.mindMap.opt.enableDblclickBackToRootNode&&this.setRootNodeCenter()});const n=Object(h["Bb"])(()=>{this.root&&(this.mindMap.emit("node_tree_render_start"),this.root.render(()=>{this.mindMap.emit("node_tree_render_end")},!1,!0))},e.time);t&&this.mindMap.on("view_data_change",n),this.onNodeTextEditChange=Object(h["w"])(this.onNodeTextEditChange,100,this),i&&this.mindMap.on("node_text_edit_change",this.onNodeTextEditChange),this.mindMap.on("after_update_config",(t,e)=>{t.openPerformance!==e.openPerformance&&(this.mindMap[t.openPerformance?"on":"off"]("view_data_change",n),this.forceLoadNode()),t.openRealtimeRenderOnNodeTextEdit!==e.openRealtimeRenderOnNodeTextEdit&&this.mindMap[t.openRealtimeRenderOnNodeTextEdit?"on":"off"]("node_text_edit_change",this.onNodeTextEditChange)})}handleCanvasDoubleClick(t){const e=t.target;if(e&&(e.classList.contains("smm-node")||e.closest(".smm-node")))return;const{x:i,y:n}=this.mindMap.toPos(t.clientX,t.clientY),{scaleX:o,scaleY:r,translateX:s,translateY:a}=this.mindMap.draw.transform(),h=(i-s)/o,d=(n-a)/r;this.mindMap.addRootNode({data:{text:this.mindMap.opt.defaultCreateRootText||"新根节点",expand:!0},children:[]},-1,t=>{t&&(t.left=h,t.top=d,t.customLeft=h,t.customTop=d,t.nodeData.data.customLeft=h,t.nodeData.data.customTop=d,this.mindMap.execCommand("SET_NODE_ACTIVE",t,!0),this.mindMap.emit("node_created",t),this.mindMap.render())})}onNodeTextEditChange({node:t,text:e}){t._textData=t.createTextNode(e);const{width:i,height:n}=t.getNodeRect();t.width=i,t.height=n,t.layout(),this.mindMap.render(()=>{this.textEdit.updateTextEditNode()})}forceLoadNode(t){t=t||this.root,t&&(this.mindMap.emit("node_tree_render_start"),t.render(()=>{this.mindMap.emit("node_tree_render_end")},!0))}registerCommands(){this.selectAll=this.selectAll.bind(this),this.mindMap.command.add("SELECT_ALL",this.selectAll),this.back=this.back.bind(this),this.mindMap.command.add("BACK",this.back),this.forward=this.forward.bind(this),this.mindMap.command.add("FORWARD",this.forward),this.insertNode=this.insertNode.bind(this),this.mindMap.command.add("INSERT_NODE",this.insertNode),this.insertMultiNode=this.insertMultiNode.bind(this),this.mindMap.command.add("INSERT_MULTI_NODE",this.insertMultiNode),this.insertChildNode=this.insertChildNode.bind(this),this.mindMap.command.add("INSERT_CHILD_NODE",this.insertChildNode),this.insertMultiChildNode=this.insertMultiChildNode.bind(this),this.mindMap.command.add("INSERT_MULTI_CHILD_NODE",this.insertMultiChildNode),this.insertParentNode=this.insertParentNode.bind(this),this.mindMap.command.add("INSERT_PARENT_NODE",this.insertParentNode),this.upNode=this.upNode.bind(this),this.mindMap.command.add("UP_NODE",this.upNode),this.downNode=this.downNode.bind(this),this.mindMap.command.add("DOWN_NODE",this.downNode),this.moveUpOneLevel=this.moveUpOneLevel.bind(this),this.mindMap.command.add("MOVE_UP_ONE_LEVEL",this.moveUpOneLevel),this.insertAfter=this.insertAfter.bind(this),this.mindMap.command.add("INSERT_AFTER",this.insertAfter),this.insertBefore=this.insertBefore.bind(this),this.mindMap.command.add("INSERT_BEFORE",this.insertBefore),this.moveNodeTo=this.moveNodeTo.bind(this),this.mindMap.command.add("MOVE_NODE_TO",this.moveNodeTo),this.removeNode=this.removeNode.bind(this),this.mindMap.command.add("REMOVE_NODE",this.removeNode),this.removeCurrentNode=this.removeCurrentNode.bind(this),this.mindMap.command.add("REMOVE_CURRENT_NODE",this.removeCurrentNode),this.pasteNode=this.pasteNode.bind(this),this.mindMap.command.add("PASTE_NODE",this.pasteNode),this.cutNode=this.cutNode.bind(this),this.mindMap.command.add("CUT_NODE",this.cutNode),this.setNodeStyle=this.setNodeStyle.bind(this),this.mindMap.command.add("SET_NODE_STYLE",this.setNodeStyle),this.setNodeStyles=this.setNodeStyles.bind(this),this.mindMap.command.add("SET_NODE_STYLES",this.setNodeStyles),this.setNodeActive=this.setNodeActive.bind(this),this.mindMap.command.add("SET_NODE_ACTIVE",this.setNodeActive),this.clearActiveNode=this.clearActiveNode.bind(this),this.mindMap.command.add("CLEAR_ACTIVE_NODE",this.clearActiveNode),this.setNodeExpand=this.setNodeExpand.bind(this),this.mindMap.command.add("SET_NODE_EXPAND",this.setNodeExpand),this.expandAllNode=this.expandAllNode.bind(this),this.mindMap.command.add("EXPAND_ALL",this.expandAllNode),this.unexpandAllNode=this.unexpandAllNode.bind(this),this.mindMap.command.add("UNEXPAND_ALL",this.unexpandAllNode),this.expandToLevel=this.expandToLevel.bind(this),this.mindMap.command.add("UNEXPAND_TO_LEVEL",this.expandToLevel),this.setNodeData=this.setNodeData.bind(this),this.mindMap.command.add("SET_NODE_DATA",this.setNodeData),this.setNodeText=this.setNodeText.bind(this),this.mindMap.command.add("SET_NODE_TEXT",this.setNodeText),this.setNodeImage=this.setNodeImage.bind(this),this.mindMap.command.add("SET_NODE_IMAGE",this.setNodeImage),this.setNodeIcon=this.setNodeIcon.bind(this),this.mindMap.command.add("SET_NODE_ICON",this.setNodeIcon),this.setNodeHyperlink=this.setNodeHyperlink.bind(this),this.mindMap.command.add("SET_NODE_HYPERLINK",this.setNodeHyperlink),this.setNodeNote=this.setNodeNote.bind(this),this.mindMap.command.add("SET_NODE_NOTE",this.setNodeNote),this.setNodeAttachment=this.setNodeAttachment.bind(this),this.mindMap.command.add("SET_NODE_ATTACHMENT",this.setNodeAttachment),this.setNodeSiyuanHyperlink=this.setNodeSiyuanHyperlink.bind(this),this.mindMap.command.add("SET_NODE_SIYUAN_HYPERLINK",this.setNodeSiyuanHyperlink),this.setNodeSiyuanPDFHyperlink=this.setNodeSiyuanPDFHyperlink.bind(this),this.mindMap.command.add("SET_NODE_SIYUAN_PDF_HYPERLINK",this.setNodeSiyuanPDFHyperlink),this.setNodeTag=this.setNodeTag.bind(this),this.mindMap.command.add("SET_NODE_TAG",this.setNodeTag),this.insertFormula=this.insertFormula.bind(this),this.mindMap.command.add("INSERT_FORMULA",this.insertFormula),this.addGeneralization=this.addGeneralization.bind(this),this.mindMap.command.add("ADD_GENERALIZATION",this.addGeneralization),this.removeGeneralization=this.removeGeneralization.bind(this),this.mindMap.command.add("REMOVE_GENERALIZATION",this.removeGeneralization),this.setNodeCustomPosition=this.setNodeCustomPosition.bind(this),this.mindMap.command.add("SET_NODE_CUSTOM_POSITION",this.setNodeCustomPosition),this.resetLayout=this.resetLayout.bind(this),this.mindMap.command.add("RESET_LAYOUT",this.resetLayout),this.setNodeShape=this.setNodeShape.bind(this),this.mindMap.command.add("SET_NODE_SHAPE",this.setNodeShape),this.goTargetNode=this.goTargetNode.bind(this),this.mindMap.command.add("GO_TARGET_NODE",this.goTargetNode),this.removeCustomStyles=this.removeCustomStyles.bind(this),this.mindMap.command.add("REMOVE_CUSTOM_STYLES",this.removeCustomStyles),this.removeAllNodeCustomStyles=this.removeAllNodeCustomStyles.bind(this),this.mindMap.command.add("REMOVE_ALL_NODE_CUSTOM_STYLES",this.removeAllNodeCustomStyles)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Tab",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Insert",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.mindMap.execCommand("INSERT_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Tab",()=>{this.mindMap.execCommand("INSERT_PARENT_NODE")}),this.mindMap.keyCommand.addShortcut("Control+g",()=>{this.mindMap.execCommand("ADD_GENERALIZATION")}),this.toggleActiveExpand=this.toggleActiveExpand.bind(this),this.mindMap.keyCommand.addShortcut("/",this.toggleActiveExpand),this.mindMap.keyCommand.addShortcut("Del|Backspace",()=>{this.mindMap.execCommand("REMOVE_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Backspace",()=>{this.mindMap.execCommand("REMOVE_CURRENT_NODE")}),this.mindMap.on("before_show_text_edit",()=>{this.startTextEdit()}),this.mindMap.on("hide_text_edit",()=>{this.endTextEdit()}),this.mindMap.keyCommand.addShortcut("Control+a",()=>{this.mindMap.execCommand("SELECT_ALL")}),this.mindMap.keyCommand.addShortcut("Control+l",()=>{this.mindMap.execCommand("RESET_LAYOUT")}),this.mindMap.keyCommand.addShortcut("Control+Up",()=>{this.mindMap.execCommand("UP_NODE")}),this.mindMap.keyCommand.addShortcut("Control+Down",()=>{this.mindMap.execCommand("DOWN_NODE")}),this.mindMap.keyCommand.addShortcut("Control+c",()=>{this.copy()}),this.mindMap.keyCommand.addShortcut("Control+x",()=>{this.cut()}),this.mindMap.keyCommand.addShortcut("Control+v",()=>{this.paste()}),this.mindMap.keyCommand.addShortcut("Control+Enter",()=>{this.setRootNodeCenter()})}emitNodeActiveEvent(t=null,e=[...this.activeNodeList]){const i=!Object(h["i"])(this.lastActiveNodeList,e);if(!i)return;this.lastActiveNodeList=[...e];const n=t||e[0]||null,o=this.mindMap.getRootIndexByNode?this.mindMap.getRootIndexByNode(n):null;this.mindMap.batchExecution.push("emitNodeActiveEvent",()=>{this.mindMap.emit("node_active",t,e),this.mindMap.emit("active_root_change",o,n,e)})}clearActiveNodeListOnDrawClick(t,e){if(this.activeNodeList.length<=0)return;let i=!0;const{useLeftKeySelectionRightKeyDrag:n}=this.mindMap.opt;if("contextmenu"===e?!n:n){const e=this.mindMap.event.mousedownPos;i=Math.abs(t.clientX-e.x)<=5&&Math.abs(t.clientY-e.y)<=5}i&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")}startTextEdit(){if(!this.textEditShortcutsBackup){this.textEditShortcutsBackup={};const t=["Enter","Tab","Del","Backspace","Delete","Left","Up","Right","Down","/","Control+a"];t.forEach(t=>{const e=this.mindMap.keyCommand.getShortcutFn(t);e&&e.length>0&&(this.textEditShortcutsBackup[t]=[...e],this.mindMap.keyCommand.removeShortcut(t))})}}endTextEdit(){this.textEditShortcutsBackup&&(Object.entries(this.textEditShortcutsBackup).forEach(([t,e])=>{e.forEach(e=>{this.mindMap.keyCommand.addShortcut(t,e)})}),this.textEditShortcutsBackup=null)}clearCache(){this.layout.lru.clear(),this.nodeCache={},this.lastNodeCache={}}render(t=(()=>{}),e){if(e===n["a"].CHANGE_THEME&&this.resetUnExpandNodeStyle(),this.isRendering)return this.hasWaitRendering=!0,void(this.waitRenderingParams=[t,e]);if(this.isRendering=!0,this.renderSource=e,this.lastNodeCache=this.nodeCache,this.nodeCache={},this.reRender&&this.clearActiveNodeList(),!this.renderTree)return this.isRendering=!1,void this.mindMap.emit("node_tree_render_end");if(this.mindMap.emit("node_tree_render_start"),this.isMultiRoot&&Array.isArray(this.renderTree)){this.roots=[];let e=0;const i=this.renderTree.length;if(0===i)return this.isRendering=!1,void this.mindMap.emit("node_tree_render_end");this.renderTree.forEach((o,r)=>{let s=o.data&&o.data.layout||this.mindMap.opt.layout,a=new(k[s]||k[n["a"].LAYOUT.LOGICAL_STRUCTURE])(this,s);a.doLayout(n=>{this.roots[r]=n,n.rootIndex=r,n._layoutInstance=a,n.render(()=>{if(e++,e===i){if(this.mindMap.emit("root_nodes_change",this.roots),this.isRendering=!1,t&&t(),this.hasWaitRendering){const t=this.waitRenderingParams;this.hasWaitRendering=!1,this.waitRenderingParams=[],this.render(...t)}else this.renderSource="",this.reRender&&(this.reRender=!1);this.mindMap.emit("node_tree_render_end")}})},o,r)}),Object.keys(this.lastNodeCache).forEach(t=>{this.nodeCache[t]||(this.removeNodeFromActiveList(this.lastNodeCache[t]),this.emitNodeActiveEvent(),this.lastNodeCache[t].destroy())})}else this.root=null,this.layout.doLayout(e=>{Object.keys(this.lastNodeCache).forEach(t=>{this.nodeCache[t]||(this.removeNodeFromActiveList(this.lastNodeCache[t]),this.emitNodeActiveEvent(),this.lastNodeCache[t].destroy())}),this.root=e,this.mindMap.emit("root_nodes_change",[this.root]),this.root.render(()=>{if(this.isRendering=!1,t&&t(),this.hasWaitRendering){const t=this.waitRenderingParams;this.hasWaitRendering=!1,this.waitRenderingParams=[],this.render(...t)}else this.renderSource="",this.reRender&&(this.reRender=!1);this.mindMap.emit("node_tree_render_end")})});this.emitNodeActiveEvent()}resetUnExpandNodeStyle(){this.renderTree&&(this.isMultiRoot&&Array.isArray(this.renderTree)?this.renderTree.forEach(t=>{Object(h["Db"])(t,null,t=>{if(!t.data.expand)return Object(h["Db"])(t,null,t=>{t.data["needUpdate"]=!0}),!0})}):Object(h["Db"])(this.renderTree,null,t=>{if(!t.data.expand)return Object(h["Db"])(t,null,t=>{t.data["needUpdate"]=!0}),!0}))}clearActiveNode(){this.activeNodeList.length<=0||(this.clearActiveNodeList(),this.emitNodeActiveEvent(null,[]))}clearActiveNodeList(){this.activeNodeList.forEach(t=>{this.mindMap.execCommand("SET_NODE_ACTIVE",t,!1)}),this.activeNodeList=[]}addNodeToActiveList(t,e=!1){if(this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&t.userList.length>0)return;const i=this.findActiveNodeIndex(t);-1===i&&(e||this.mindMap.emit("before_node_active",t,this.activeNodeList),this.mindMap.execCommand("SET_NODE_ACTIVE",t,!0),this.activeNodeList.push(t))}removeNodeFromActiveList(t){let e=this.findActiveNodeIndex(t);-1!==e&&(this.mindMap.execCommand("SET_NODE_ACTIVE",t,!1),this.activeNodeList.splice(e,1))}activeMultiNode(t=[]){t.forEach(t=>{this.mindMap.emit("before_node_active",t,this.activeNodeList),this.addNodeToActiveList(t,!0),this.emitNodeActiveEvent(t)})}cancelActiveMultiNode(t=[]){t.forEach(t=>{this.removeNodeFromActiveList(t),this.emitNodeActiveEvent(null)})}findActiveNodeIndex(t){return Object(h["K"])(t,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(this.isMultiRoot&&this.roots?this.roots.forEach(t=>{t&&Object(h["Db"])(t,null,t=>{t.getData("isActive")||this.addNodeToActiveList(t),t._generalizationList&&t._generalizationList.length>0&&t._generalizationList.forEach(t=>{const e=t.generalizationNode;e.getData("isActive")||this.addNodeToActiveList(e)})},null,!0,0,0)}):this.root&&Object(h["Db"])(this.root,null,t=>{t.getData("isActive")||this.addNodeToActiveList(t),t._generalizationList&&t._generalizationList.length>0&&t._generalizationList.forEach(t=>{const e=t.generalizationNode;e.getData("isActive")||this.addNodeToActiveList(e)})},null,!0,0,0),this.emitNodeActiveEvent())}back(t){this.backForward("back",t)}forward(t){this.backForward("forward",t)}backForward(t,e){this.mindMap.execCommand("CLEAR_ACTIVE_NODE");const i=this.mindMap.command[t](e);i&&(this.renderTree=i,this.mindMap.render()),this.mindMap.emit("data_change",i)}getNewNodeBehavior(t=!1,e=!1){const{createNewNodeBehavior:i}=this.mindMap.opt;let o=!1,r=!1;switch(i){case n["a"].CREATE_NEW_NODE_BEHAVIOR.DEFAULT:o=e||!t,r=!e&&t;break;case n["a"].CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:o=!1,r=!1;break;case n["a"].CREATE_NEW_NODE_BEHAVIOR.ACTIVE_ONLY:o=!0,r=!1;break;default:break}return{focusNewNode:o,inserting:r}}insertNode(t=!0,e=[],i=null,n=[]){if(e=Object(h["B"])(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:o,defaultInsertBelowSecondLevelNodeText:r}=this.mindMap.opt,s=e.length>0?e:this.activeNodeList,a=s.length>1,d=this.hasRichTextPlugin(),{focusNewNode:l,inserting:c}=this.getNewNodeBehavior(t,a),u={expand:!0,richText:d,isActive:l};d&&(u.resetRichText=!0),n=Object(h["a"])(n,u);const f=i&&i.richText;let p=!1;s.forEach(t=>{if(t.isGeneralization||t.isRoot)return;n=Object(h["yb"])(n);const e=t.parent,s=1===t.layerIndex,a=s?o:r,d=Object(h["J"])(t);f&&u.resetRichText&&delete u.resetRichText;const l={inserting:c,data:{text:a,...u,uid:Object(h["u"])(),...i||{}},children:[...Object(h["v"])(n,p)]};p=!0,e.nodeData.children.splice(d+1,0,l)}),l&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(t,e){if(!e||e.length<=0)return;if(t=Object(h["B"])(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const i=t.length>0?t:this.activeNodeList,n=this.hasRichTextPlugin(),{focusNewNode:o}=this.getNewNodeBehavior(!1,!0),r={expand:!0,richText:n,isActive:o};n&&(r.resetRichText=!0),e=Object(h["a"])(e,r);let s=!1;i.forEach(t=>{if(t.isGeneralization||t.isRoot)return;e=Object(h["yb"])(e);const i=t.parent,n=Object(h["J"])(t),o=Object(h["v"])(e,s);s=!0,i.nodeData.children.splice(n+1,0,...o)}),o&&this.clearActiveNodeList(),this.mindMap.render()}insertChildNode(t=!0,e=[],i=null,n=[]){if(e=Object(h["B"])(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:o,defaultInsertBelowSecondLevelNodeText:r}=this.mindMap.opt,s=e.length>0?e:this.activeNodeList,a=s.length>1,d=this.hasRichTextPlugin(),{focusNewNode:l,inserting:c}=this.getNewNodeBehavior(t,a),u={expand:!0,richText:d,isActive:l};d&&(u.resetRichText=!0),n=Object(h["a"])(n,u);const f=i&&i.richText;let p=!1;s.forEach(t=>{if(t.isGeneralization)return;n=Object(h["yb"])(n),t.nodeData.children||(t.nodeData.children=[]);const e=t.isRoot?o:r;f&&u.resetRichText&&delete u.resetRichText;const s={inserting:c,data:{text:e,uid:Object(h["u"])(),...u,...i||{}},children:[...Object(h["v"])(n,p)]};p=!0,t.nodeData.children.push(s),t.setData({expand:!0})}),l&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(t,e){if(!e||e.length<=0)return;if(t=Object(h["B"])(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const i=t.length>0?t:this.activeNodeList,n=this.hasRichTextPlugin(),{focusNewNode:o}=this.getNewNodeBehavior(!1,!0),r={expand:!0,richText:n,isActive:o};n&&(r.resetRichText=!0),e=Object(h["a"])(e,r);let s=!1;i.forEach(t=>{t.isGeneralization||(e=Object(h["yb"])(e),t.nodeData.children||(t.nodeData.children=[]),e=Object(h["v"])(e,s),s=!0,t.nodeData.children.push(...e),t.setData({expand:!0}))}),o&&this.clearActiveNodeList(),this.mindMap.render()}insertParentNode(t=!0,e,i){if(e=Object(h["B"])(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:n,defaultInsertBelowSecondLevelNodeText:o}=this.mindMap.opt,r=e.length>0?e:this.activeNodeList,s=r.length>1,a=this.hasRichTextPlugin(),{focusNewNode:d,inserting:l}=this.getNewNodeBehavior(t,s),c={expand:!0,richText:a,isActive:d};a&&(c.resetRichText=!0);const u=i&&i.richText;r.forEach(t=>{if(t.isGeneralization||t.isRoot)return;const e=1===t.layerIndex?n:o;u&&c.resetRichText&&delete c.resetRichText;const r={inserting:l,data:{text:e,uid:Object(h["u"])(),...c,...i||{}},children:[t.nodeData]},s=t.parent,a=Object(h["J"])(t);s.nodeData.children.splice(a,1,r)}),d&&this.clearActiveNodeList(),this.mindMap.render()}upNode(t){if(this.activeNodeList.length<=0&&!t)return;const e=t?[t]:this.activeNodeList,i=e[0];if(i.isRoot)return;let n=i.parent,o=n.children,r=Object(h["K"])(i,o);if(-1===r||0===r)return;let s=r-1;o.splice(r,1),o.splice(s,0,i),n.nodeData.children.splice(r,1),n.nodeData.children.splice(s,0,i.nodeData),this.mindMap.render()}downNode(t){if(this.activeNodeList.length<=0&&!t)return;const e=t?[t]:this.activeNodeList,i=e[0];if(i.isRoot)return;let n=i.parent,o=n.children,r=Object(h["K"])(i,o);if(-1===r||r===o.length-1)return;let s=r+1;o.splice(r,1),o.splice(s,0,i),n.nodeData.children.splice(r,1),n.nodeData.children.splice(s,0,i.nodeData),this.mindMap.render()}moveUpOneLevel(t){if(t=t||this.activeNodeList[0],!t||t.isRoot||t.layerIndex<=1)return;const e=t.parent,i=e.parent,n=Object(h["K"])(t,e.children),o=Object(h["K"])(e,i.children);e.nodeData.children.splice(n,1),i.nodeData.children.splice(o+1,0,t.nodeData),this.mindMap.render()}_handleRemoveCustomStyles(t){let e=!1;return Object.keys(t).forEach(i=>{Object(h["g"])(i)&&(e=!0,delete t[i])}),this.hasRichTextPlugin()&&(e=!0,t.resetRichText=!0),e}removeCustomStyles(t){if(t=t||this.activeNodeList[0],!t)return;const e=this._handleRemoveCustomStyles(t.getData());e&&this.reRenderNodeCheckChange(t)}removeAllNodeCustomStyles(t){t=Object(h["B"])(t);let e=!1;if(t.length>0)t.forEach(t=>{const i=this._handleRemoveCustomStyles(t.getData());i&&(e=!0)});else{if(!this.renderTree)return;Object(h["Db"])(this.renderTree,null,t=>{const i=this._handleRemoveCustomStyles(t.data);i&&(e=!0);const n=Object(h["C"])(t.data);n.length>0&&n.forEach(t=>{const i=this._handleRemoveCustomStyles(t);i&&(e=!0)})})}e&&this.mindMap.reRender()}copy(){this.beingCopyData=this.copyNode(),this.beingCopyData&&(this.mindMap.opt.disabledClipboard||Object(h["xb"])(Object(h["t"])(this.beingCopyData)))}cut(){this.mindMap.execCommand("CUT_NODE",t=>{this.beingCopyData=t,this.mindMap.opt.disabledClipboard||Object(h["xb"])(Object(h["t"])(t))})}handlePaste(t){const{disabledClipboard:e}=this.mindMap.opt;if(e)return;const i=t.clipboardData||t.originalEvent.clipboardData,n=i.items;let o=null,r="";Array.from(n).forEach(t=>{t.type.indexOf("image")>-1&&(o=t.getAsFile()),t.type.indexOf("text")>-1&&(r=i.getData("text"))}),this.paste()}async paste(){const{errorHandler:t,handleIsSplitByWrapOnPasteCreateNewNode:e,handleNodePasteImg:i,disabledClipboard:o,onlyPasteTextWhenHasImgAndText:r}=this.mindMap.opt;if(!o&&Object(h["f"])())try{const o=await Object(h["H"])();let a=o.text||"",d=o.img||null;if(a){let i=null,o=!0,r=null,d=null,l=null,c=null,u=null;if(this.mindMap.opt.customHandleClipboardText)try{const t=await this.mindMap.opt.customHandleClipboardText(a);if(!Object(h["fb"])(t)){o=!1;const e=Object(h["n"])(t);e.isSmm?i=e.data:a=e.data;const n=Object(h["l"])(a);n.isSiyuanLink&&(r=n.siyuanLink,d=n.siyuanLinkTitle);const s=Object(h["m"])(a);s.isSiyuanPdfUrl&&(l=s.siyuanPdfUrl,c=s.siyuanPdfUrlTitle,u=s.siyuanPdfImageUrl)}}catch(s){t(n["b"].CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,s)}if(o){const t=Object(h["n"])(a);t.isSmm?i=t.data:a=t.data;const e=Object(h["l"])(a);e.isSiyuanLink&&(r=e.siyuanLink,d=e.siyuanLinkTitle);const n=Object(h["m"])(a);n.isSiyuanPdfUrl&&(l=n.siyuanPdfUrl,c=n.siyuanPdfUrlTitle)}if(i)this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],Array.isArray(i)?i:[i]);else if(r)this.activeNodeList.length>0&&this.activeNodeList.forEach(t=>{this.mindMap.execCommand("SET_NODE_HYPERLINK",t,r,d)});else if(l)this.activeNodeList.length>0&&this.activeNodeList.forEach(t=>{this.mindMap.execCommand("SET_NODE_SIYUAN_PDF_HYPERLINK",t,l,c)});else{this.hasRichTextPlugin()&&(a=Object(h["Y"])(a));const t=a.split(new RegExp("\r?\n|(?<!\n)\r","g")).filter(t=>!!t);t.length>1&&e?e().then(()=>{this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],t.map(t=>({data:{text:t},children:[]})))}).catch(()=>{this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:a})}):this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:a})}}if(d&&(!a||!r))try{let t=null;t=i&&"function"===typeof i?await i(d):await Object(h["hb"])(d),this.activeNodeList.length>0&&this.activeNodeList.forEach(e=>{this.mindMap.execCommand("SET_NODE_IMAGE",e,{url:t.url,title:"",width:t.size.width,height:t.size.height})})}catch(s){t(n["b"].LOAD_CLIPBOARD_IMAGE_ERROR,s)}}catch(s){t(n["b"].READ_CLIPBOARD_ERROR,s)}else this.beingCopyData&&this.mindMap.execCommand("PASTE_NODE",this.beingCopyData)}insertBefore(t,e){this.insertTo(t,e,"before")}insertAfter(t,e){this.insertTo(t,e,"after")}insertTo(t,e,i="before"){let n=Object(h["B"])(t);this.isMultiRoot||(n=n.filter(t=>!t.isRoot)),"after"===i&&n.reverse(),n.forEach(t=>{if(this.isMultiRoot&&t.isRoot)this.removeRootNode(t),delete t.nodeData.data.customLeft,delete t.nodeData.data.customTop;else{let e=t.parent,i=e.children,n=Object(h["K"])(t,i);if(-1===n)return;i.splice(n,1),e.nodeData.children.splice(n,1)}let n=e.parent,o=n.children,r=Object(h["K"])(e,o);-1!==r&&("after"===i&&r++,o.splice(r,0,t),n.nodeData.children.splice(r,0,t.nodeData),this.clearNodeStyleCache(t),this.markNodeAndChildrenNeedUpdate(t))}),this.mindMap.render()}removeNode(t=[]){if(t=Object(h["B"])(t),this.activeNodeList.length<=0&&t.length<=0)return;let e=null,i=t.length>0,n=i?t:this.activeNodeList,o=n.find(t=>t.isRoot);if(o)if(this.isMultiRoot){const t=o.nodeData.children&&o.nodeData.children.length>0;if(t)this.clearActiveNodeList(),o.children=[],o.nodeData.children=[];else{const t=this.roots?this.roots.length:1;if(t<=1)return void this.mindMap.emit("delete_last_root_node_prevented",o);const i=this.roots?this.roots.indexOf(o):-1;-1!==i&&this.roots&&(i<this.roots.length-1?e=this.roots[i+1]:i>0&&(e=this.roots[i-1])),this.clearActiveNodeList(),this.removeRootNode(o)}}else this.clearActiveNodeList(),o.children=[],o.nodeData.children=[];else{e=this.getNextActiveNode(n);for(let t=0;t<n.length;t++){const e=n[t],o=this.textEdit.getCurrentEditNode();o&&o.getData("uid")===e.getData("uid")&&this.textEdit.hideEditTextBox(),i&&n.splice(t,1),e.isGeneralization?(this.deleteNodeGeneralization(e),this.removeNodeFromActiveList(e),t--):(this.removeNodeFromActiveList(e),Object(h["qb"])(e),t--)}}this.activeNodeList=[],e&&this.addNodeToActiveList(e),this.emitNodeActiveEvent(),this.mindMap.render()}deleteNodeGeneralization(t){const e=t.generalizationBelongNode,i=e.getGeneralizationNodeIndex(t);let n=e.getData("generalization");Array.isArray(n)?n.splice(i,1):n=null,this.mindMap.execCommand("SET_NODE_DATA",e,{generalization:n}),this.closeHighlightNode()}removeCurrentNode(t=[]){if(t=Object(h["B"])(t),this.activeNodeList.length<=0&&t.length<=0)return;let e=t.length>0,i=e?t:this.activeNodeList;i=i.filter(t=>!t.isRoot);let n=this.getNextActiveNode(i);for(let o=0;o<i.length;o++){let t=i[o];if(t.isGeneralization)this.deleteNodeGeneralization(t);else{const e=t.parent,i=Object(h["J"])(t),n=t.nodeData.children?t.nodeData.children.length:0;e.nodeData.children.splice(i,1,...t.nodeData.children||[]);const o=e.nodeData.data;if(o&&o.generalization){const t=Array.isArray(o.generalization)?o.generalization:[o.generalization];t.forEach(t=>{if(t&&t.range&&Array.isArray(t.range)&&2===t.range.length){const[e,o]=t.range;if(i<e){const i=n-1;t.range=[e+i,o+i]}else if(i>=e&&i<=o){const i=n-1;t.range=[e,o+i]}}})}}}this.activeNodeList=[],n&&this.addNodeToActiveList(n),this.emitNodeActiveEvent(),this.mindMap.render()}getNextActiveNode(t){if(1!==t.length)return null;if(-1===this.findActiveNodeIndex(t[0]))return null;let e=null;if(1===this.activeNodeList.length&&!this.activeNodeList[0].isGeneralization&&this.mindMap.opt.deleteNodeActive){const t=this.activeNodeList[0],i=t.parent.children,n=Object(h["K"])(t,i);e=n<i.length-1?i[n+1]:n>0?i[n-1]:t.parent}return e}copyNode(){if(this.activeNodeList.length<=0)return null;let t=Object(h["S"])(this.activeNodeList);return t=Object(h["zb"])(t),t.map(t=>Object(h["q"])({},t,!0))}cutNode(t){if(this.activeNodeList.length<=0)return;let e=Object(h["S"])(this.activeNodeList).filter(t=>!t.isRoot);e=Object(h["zb"])(e);const i=e.map(t=>Object(h["q"])({},t,!0));e.forEach(t=>{Object(h["qb"])(t)}),this.clearActiveNodeList(),this.mindMap.render(),t&&"function"===typeof t&&t(i)}moveNodeTo(t,e){let i=Object(h["B"])(t);this.isMultiRoot||(i=i.filter(t=>!t.isRoot)),i.forEach(t=>{this.removeNodeFromActiveList(t),this.isMultiRoot&&t.isRoot?(this.removeRootNode(t),delete t.nodeData.data.customLeft,delete t.nodeData.data.customTop):Object(h["qb"])(t),e.setData({expand:!0}),e.nodeData.children.push(t.nodeData),this.clearNodeStyleCache(t),this.markNodeAndChildrenNeedUpdate(t)}),this.emitNodeActiveEvent(),this.mindMap.render()}clearNodeStyleCache(t){t&&(t.effectiveStyles&&(t.effectiveStyles={}),t.style&&(t.style._gradient=null,t.style._marker=null,t.style.effectiveStyles&&(t.style.effectiveStyles={})),t.children&&t.children.length>0&&t.children.forEach(t=>{this.clearNodeStyleCache(t)}))}markNodeAndChildrenNeedUpdate(t){t&&(t.nodeData.data.needUpdate=!0,t.children&&t.children.length>0&&t.children.forEach(t=>{this.markNodeAndChildrenNeedUpdate(t)}))}removeRootNode(t){if(!this.isMultiRoot||!this.roots||!Array.isArray(this.renderTree))return;const e=this.roots.indexOf(t);-1!==e&&this.roots.splice(e,1);const i=this.renderTree.findIndex(e=>e===t.nodeData);-1!==i&&this.renderTree.splice(i,1)}pasteNode(t){t=Object(h["B"])(t),this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],t)}setNodeStyle(t,e,i){const n={[e]:i};this.setNodeDataRender(t,n),A["c"].includes(e)&&(t.parent||t).renderLine(!0)}setNodeStyles(t,e){const i={...e};this.setNodeDataRender(t,i);let n=Object.keys(e),o=!1;n.forEach(t=>{A["c"].includes(t)&&(o=!0)}),o&&(t.parent||t).renderLine(!0)}setNodeActive(t,e){this.mindMap.execCommand("SET_NODE_DATA",t,{isActive:e}),t.updateNodeByActive(e)}setNodeExpand(t,e){this.mindMap.execCommand("SET_NODE_DATA",t,{expand:e}),this.mindMap.render()}expandAllNode(t=""){if(!this.renderTree)return;const e=(i,n)=>{n||i.data.uid!==t||(n=!0),n&&!i.data.expand&&(i.data.expand=!0),i.children&&i.children.length>0&&i.children.forEach(t=>{e(t,n)})};e(this.renderTree,!t),this.mindMap.render()}unexpandAllNode(t=!0,e=""){if(!this.renderTree)return;const i=(t,n,o)=>{o||t.data.uid!==e||(o=!0),o&&(!n||this.mindMap.opt.allowRootNodeCollapse)&&t.children&&t.children.length>0&&(t.data.expand=!1),t.children&&t.children.length>0&&t.children.forEach(t=>{i(t,!1,o)})};i(this.renderTree,!0,!e),this.mindMap.render(()=>{t&&this.setRootNodeCenter()})}expandToLevel(t){this.renderTree&&(Object(h["Db"])(this.renderTree,null,(e,i,n,o)=>{const r=o<t;r?e.data.expand=!0:(!n||this.mindMap.opt.allowRootNodeCollapse)&&e.children&&e.children.length>0&&(e.data.expand=!1)},null,!0,0,0),this.mindMap.render())}toggleActiveExpand(){this.activeNodeList.forEach(t=>{t.nodeData.children.length<=0||t.isRoot&&!this.mindMap.opt.allowRootNodeCollapse||this.toggleNodeExpand(t)})}toggleNodeExpand(t){this.mindMap.execCommand("SET_NODE_EXPAND",t,!t.getData("expand"))}setNodeText(t,e,i,n){i=void 0===i?t.getData("richText"):i,this.setNodeDataRender(t,{text:e,richText:i,resetRichText:n})}setNodeImage(t,e){const{url:i,title:n,width:o,height:r,custom:s=!1}=e||{url:"",title:"",width:0,height:0,custom:!1};this.setNodeDataRender(t,{image:i,imageTitle:n||"",imageSize:{width:o,height:r,custom:s}})}setNodeIcon(t,e){this.setNodeDataRender(t,{icon:e})}setNodeHyperlink(t,e,i=""){this.setNodeDataRender(t,{hyperlink:e,hyperlinkTitle:i})}setNodeNote(t,e){this.setNodeDataRender(t,{note:e})}setNodeAttachment(t,e,i=""){this.setNodeDataRender(t,{attachmentUrl:e,attachmentName:i})}setNodeSiyuanHyperlink(t,e,i=""){this.setNodeDataRender(t,{siyuanHyperlink:e,siyuanHyperlinkTitle:i})}setNodeSiyuanPDFHyperlink(t,e,i=""){this.setNodeDataRender(t,{siyuanPDFLinkData:e?{siyuanPDFHyperlink:e,siyuanPDFHyperlinkTitle:i}:null})}setNodeTag(t,e){this.setNodeDataRender(t,{tag:e})}insertFormula(t,e=[]){if(!this.hasRichTextPlugin()||!this.mindMap.formula)return;e=Object(h["B"])(e);const i=e.length>0?e:this.activeNodeList;i.forEach(e=>{this.mindMap.formula.insertFormulaToNode(e,t)})}addGeneralization(t,e=!0){if(this.activeNodeList.length<=0)return;const i=this.activeNodeList.filter(t=>!t.isRoot&&!t.isGeneralization&&!t.checkHasSelfGeneralization()),n=Object(h["nb"])(i);if(n.length<=0)return;const o=this.hasRichTextPlugin(),{focusNewNode:r,inserting:s}=this.getNewNodeBehavior(e,n.length>1);let a=!1;const d=t&&t.richText;n.forEach(e=>{const i={inserting:s,...t||{text:this.mindMap.opt.defaultGeneralizationText},range:e.range||null,uid:Object(h["u"])(),richText:o,isActive:r};o&&!d&&(i.resetRichText=o);let n=e.node.getData("generalization");if(n=n?Array.isArray(n)?n:[n]:[],e.range){const t=!!n.find(t=>t.range&&t.range[0]===e.range[0]&&t.range[1]===e.range[1]);if(t)return;n.push(i)}else n.push(i);a=!0,this.mindMap.execCommand("SET_NODE_DATA",e.node,{generalization:n}),e.node.setData({expand:!0})}),a&&(r&&this.clearActiveNodeList(),this.mindMap.render(()=>{this.mindMap.render()}))}removeGeneralization(){this.activeNodeList.length<=0||(this.activeNodeList.forEach(t=>{t.checkHasGeneralization()&&this.mindMap.execCommand("SET_NODE_DATA",t,{generalization:null})}),this.mindMap.render(),this.closeHighlightNode())}setNodeCustomPosition(t,e,i){let n=[t]||!1;n.forEach(t=>{this.mindMap.execCommand("SET_NODE_DATA",t,{customLeft:e,customTop:i})})}resetLayout(){Object(h["Db"])(this.root,null,t=>{t.customLeft=void 0,t.customTop=void 0,this.mindMap.execCommand("SET_NODE_DATA",t,{customLeft:void 0,customTop:void 0}),this.mindMap.render()},null,!0,0,0)}setNodeShape(t,e){if(!e||!z["b"].includes(e))return;let i=[t]||!1;i.forEach(t=>{this.setNodeStyle(t,"shape",e)})}goTargetNode(t,e=(()=>{})){let i="string"===typeof t?t:t.getData("uid");i&&this.expandToNodeUid(i,()=>{let t=this.findNodeByUid(i);t&&(t.active(),this.moveNodeToCenter(t),e(t))})}setNodeData(t,e){Object.keys(e).forEach(i=>{t.nodeData.data[i]=e[i]})}setNodeDataRender(t,e,i=!1){if(this.mindMap.execCommand("SET_NODE_DATA",t,e),Object(h["cb"])(e))return console.log("不需要重新渲染"),void this.mindMap.emit("node_tree_render_end");this.reRenderNodeCheckChange(t,i)}reRenderNodeCheckChange(t,e){let i=t.reRender();i?e||this.mindMap.render():this.mindMap.emit("node_tree_render_end")}moveNodeToCenter(t,e){let{resetScaleOnMoveNodeToCenter:i}=this.mindMap.opt;void 0!==e&&(i=e);let{transform:n,state:o}=this.mindMap.view.getTransformData(),{left:r,top:s,width:a,height:h}=t;i||(r*=n.scaleX,s*=n.scaleY,a*=n.scaleX,h*=n.scaleY);let d=this.mindMap.width/2,l=this.mindMap.height/2,c=r+a/2,u=s+h/2,f=d-o.x,p=l-o.y,g=f-c,m=p-u;this.mindMap.view.translateX(g),this.mindMap.view.translateY(m),i&&this.mindMap.view.setScale(1)}setRootNodeCenter(){this.isMultiRoot&&this.roots&&this.roots.length>0?this.moveNodeToCenter(this.roots[0]):this.root&&this.moveNodeToCenter(this.root)}expandToNodeUid(t,e=(()=>{})){if(!this.renderTree)return void e();let i=[],n=!1;const o={},r=this.isMultiRoot?Array.isArray(this.renderTree)?this.renderTree:[]:this.renderTree?[this.renderTree]:[];r.some(e=>{if(!e)return!1;let r=!1;return Object(h["d"])(e,(e,s)=>{if(!e||!e.data)return;if(o[e.data.uid]=s?[...o[s.data.uid]||[],s]:[],e.data.uid===t)return i=o[e.data.uid]||[],r=!0,"stop";const a=Object(h["C"])(e.data);return a.forEach(a=>{a.uid===t&&(i=s?[...o[s.data.uid]||[],s,e]:[e],n=!0,r=!0)}),r?"stop":void 0}),r});let s=!1;if(i.forEach(t=>{t.data.expand||(s=!0,t.data.expand=!0)}),n){const t=i[i.length-1];t&&Object(h["Db"])(t,null,t=>{t&&t.data&&(t.data.expand||(s=!0,t.data.expand=!0))})}s?this.mindMap.render(e):e()}findNodeByUid(t){const e=this.isMultiRoot?this.roots||[]:this.root?[this.root]:[];if(!e.length)return;let i=null;return e.some(e=>!!e&&Object(h["Db"])(e,null,e=>{if(e.getData("uid")===t)return i=e,!0;let n=!1;return(e._generalizationList||[]).forEach(e=>{e.generalizationNode.getData("uid")===t&&(i=e.generalizationNode,n=!0)}),!!n||void 0})),i}highlightNode(t,e,i){if(this.isRendering)return;i={stroke:"rgb(94, 200, 248)",fill:"transparent",...i||{}},this.highlightBoxNode?this.highlightBoxNodeStyle&&(this.highlightBoxNodeStyle.stroke===i.stroke&&this.highlightBoxNodeStyle.fill===i.fill||this.highlightBoxNode.stroke({color:i.stroke||"transparent"}).fill({color:i.fill||"transparent"})):this.highlightBoxNode=(new O["g"]).stroke({color:i.stroke||"transparent"}).fill({color:i.fill||"transparent"}),this.highlightBoxNodeStyle={...i};let n=1/0,o=1/0,r=-1/0,s=-1/0;if(e){const i=t.children.slice(e[0],e[1]+1);i.forEach(t=>{t.left<n&&(n=t.left),t.top<o&&(o=t.top);const e=t.left+t.width,i=t.top+t.height;e>r&&(r=e),i>s&&(s=i)})}else n=t.left,o=t.top,r=t.left+t.width,s=t.top+t.height;this.highlightBoxNode.plot([[n,o],[r,o],[r,s],[n,s]]),this.mindMap.otherDraw.add(this.highlightBoxNode)}closeHighlightNode(){this.highlightBoxNode&&this.highlightBoxNode.remove()}hasRichTextPlugin(){return!!this.mindMap.richText}}var B=I,F={default:A["b"]},P=i("053c"),W=(i("88e6"),i("70cc"),i("eb03"),i("22e5"),i("c01e"),i("fa76"),i("8306"),i("eb04"));class H{constructor(t){this.opt=t,this.mindMap=t.mindMap,this.shortcutMap={},this.shortcutMapCache={},this.isPause=!1,this.isInSvg=!1,this.instanceId=this.mindMap.uid||Date.now(),this.shouldRespond=!1,this.editModeShortcuts=new Set(["Control+a","Control+c","Control+v","Control+x","Control+z","Control+y"]),this.bindEvent()}markAsActive(){H.ACTIVE_INSTANCE_ID=this.instanceId}isContainerVisible(){try{const t=this.mindMap.el;if(!t)return!1;if(t.getClientRects&&0===t.getClientRects().length)return!1;const e=t.getBoundingClientRect();if(!e||e.width<=0||e.height<=0)return!1;const i=window.getComputedStyle?window.getComputedStyle(t):null;return!i||"hidden"!==i.visibility&&"none"!==i.display}catch(t){return!0}}extendKeyMap(t,e){W["a"][t]=e}removeKeyMap(t){"undefined"!==typeof W["a"][t]&&delete W["a"][t]}pause(){this.isPause=!0}recovery(){this.isPause=!1}save(){Object.keys(this.shortcutMapCache).length>0||(this.shortcutMapCache=this.shortcutMap,this.shortcutMap={})}restore(){Object.keys(this.shortcutMapCache).length<=0||(this.shortcutMap=this.shortcutMapCache,this.shortcutMapCache={})}bindEvent(){this.onKeydown=this.onKeydown.bind(this),this.onKeydownCaptureGlobal=this.onKeydownCaptureGlobal.bind(this),this.mindMap.on("svg_mouseenter",()=>{this.isInSvg=!0,this.shouldRespond=!0,this.markAsActive()}),this.mindMap.on("svg_mouseleave",()=>{this.mindMap.renderer.textEdit.isShowTextEdit()||this.mindMap.associativeLine&&this.mindMap.associativeLine.showTextEdit||(this.isInSvg=!1,this.shouldRespond=!1)}),this.mindMap.el.addEventListener("click",()=>{this.shouldRespond=!0,this.markAsActive()}),this.mindMap.el.addEventListener("blur",t=>{this.mindMap.el.contains(t.relatedTarget)||(this.shouldRespond=!1)},!0),document.addEventListener("keydown",this.onKeydownCaptureGlobal,!0),window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent(),H.ACTIVE_INSTANCE_ID===this.instanceId&&(H.ACTIVE_INSTANCE_ID=null)})}unBindEvent(){document.removeEventListener("keydown",this.onKeydownCaptureGlobal,!0),window.removeEventListener("keydown",this.onKeydown)}defaultEnableCheck(t){const e=t.target;return e===document.body||e.classList.contains(n["a"].EDIT_NODE_CLASS.SMM_NODE_EDIT_WRAP)||e.classList.contains(n["a"].EDIT_NODE_CLASS.RICH_TEXT_EDIT_WRAP)||e.classList.contains(n["a"].EDIT_NODE_CLASS.ASSOCIATIVE_LINE_TEXT_EDIT_WRAP)}onKeydownCaptureGlobal(t){if(!this.isContainerVisible())return void(this.shouldRespond=!1);if(H.ACTIVE_INSTANCE_ID&&H.ACTIVE_INSTANCE_ID!==this.instanceId)return;const e=t.target,i=document.activeElement,n=this.mindMap.el.contains(e),o=this.mindMap.el.contains(i),r=e===document.body,s=n||o||r&&this.shouldRespond;if(!s)return;const{enableShortcutOnlyWhenMouseInSvg:a,customCheckEnableShortcut:h}=this.mindMap.opt,d="function"===typeof h?h:this.defaultEnableCheck;if(!d(t))return;if(!this.shouldRespond&&a)return;if(this.isPause||a&&!this.isInSvg)return;let l=!1,c="";if(Object.keys(this.shortcutMap).forEach(e=>{this.checkKey(t,e)&&(l=!0,c=e)}),l){this.checkKey(t,"Control+v")||t.preventDefault(),t.stopImmediatePropagation();const{beforeShortcutRun:e}=this.mindMap.opt;if("function"===typeof e){const t=e(c,[...this.mindMap.renderer.activeNodeList]);if(t)return}this.shortcutMap[c].forEach(t=>{t()})}}onKeydown(t){const{enableShortcutOnlyWhenMouseInSvg:e,beforeShortcutRun:i,customCheckEnableShortcut:n}=this.mindMap.opt;if(!this.isContainerVisible())return void(this.shouldRespond=!1);if(H.ACTIVE_INSTANCE_ID&&H.ACTIVE_INSTANCE_ID!==this.instanceId)return;const o="function"===typeof n?n:this.defaultEnableCheck;o(t)&&(!this.shouldRespond&&e||this.isPause||e&&!this.isInSvg||Object.keys(this.shortcutMap).forEach(e=>{if(this.checkKey(t,e)){if(this.checkKey(t,"Control+v")||(t.stopPropagation(),t.preventDefault()),"function"===typeof i){const t=i(e,[...this.mindMap.renderer.activeNodeList]);if(t)return}this.shortcutMap[e].forEach(t=>{t()})}}))}checkKey(t,e){let i=this.getOriginEventCodeArr(t),n=this.getKeyCodeArr(e);if(i.length!==n.length)return!1;for(let o=0;o<i.length;o++){let t=n.findIndex(t=>t===i[o]);if(-1===t)return!1;n.splice(t,1)}return!0}getOriginEventCodeArr(t){let e=[];return(t.ctrlKey||t.metaKey)&&e.push(W["a"]["Control"]),t.altKey&&e.push(W["a"]["Alt"]),t.shiftKey&&e.push(W["a"]["Shift"]),e.includes(t.keyCode)||e.push(t.keyCode),e}hasCombinationKey(t){return t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}getKeyCodeArr(t){let e=t.split(/\s*\+\s*/),i=[];return e.forEach(t=>{i.push(W["a"][t])}),i}addShortcut(t,e){t.split(/\s*\|\s*/).forEach(t=>{this.shortcutMap[t]?this.shortcutMap[t].push(e):this.shortcutMap[t]=[e]})}removeShortcut(t,e){t.split(/\s*\|\s*/).forEach(t=>{if(this.shortcutMap[t])if(e){let i=this.shortcutMap[t].findIndex(t=>t===e);-1!==i&&this.shortcutMap[t].splice(i,1)}else this.shortcutMap[t]=[],delete this.shortcutMap[t]})}getShortcutFn(t){let e=[];return t.split(/\s*\|\s*/).forEach(t=>{e=this.shortcutMap[t]||[]}),e}configureEditModeShortcuts(t){this.editModeShortcuts=new Set(t)}isEditModeShortcut(t){return this.editModeShortcuts.has(t)}}H.ACTIVE_INSTANCE_ID=null;var j=i("a06c");class G{constructor(t={}){this.opt=t,this.mindMap=t.mindMap,this.commands={},this.history=[],this.activeHistoryIndex=0,this.registerShortcutKeys(),this.originAddHistory=this.addHistory.bind(this),this.addHistory=Object(h["Bb"])(this.addHistory,this.mindMap.opt.addHistoryTime,this),this.isPause=!1}pause(){this.isPause=!0}recovery(){this.isPause=!1}clearHistory(){this.history=[],this.activeHistoryIndex=0,this.mindMap.emit("back_forward",0,0)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Control+z",()=>{this.mindMap.execCommand("BACK")}),this.mindMap.keyCommand.addShortcut("Control+y",()=>{this.mindMap.execCommand("FORWARD")})}exec(t,...e){if(this.commands[t]){if(this.commands[t].forEach(t=>{t(...e)}),this.mindMap.emit("afterExecCommand",t,...e),["BACK","FORWARD","SET_NODE_ACTIVE","CLEAR_ACTIVE_NODE"].includes(t))return;this.addHistory()}}add(t,e){this.commands[t]?this.commands[t].push(e):this.commands[t]=[e]}remove(t,e){if(this.commands[t])if(e){let i=this.commands[t].find(t=>t===e);-1!==i&&this.commands[t].splice(i,1)}else this.commands[t]=[],delete this.commands[t]}addHistory(){if(this.mindMap.opt.readonly||this.isPause)return;const t=this.history.length>0?this.history[this.activeHistoryIndex]:null,e=this.getCopyData();t!==e&&(t&&JSON.stringify(t)===JSON.stringify(e)||(this.emitDataUpdatesEvent(t,e),this.history=this.history.slice(0,this.activeHistoryIndex+1),this.history.push(Object(h["yb"])(e)),this.history.length>this.mindMap.opt.maxHistoryCount&&this.history.shift(),this.activeHistoryIndex=this.history.length-1,this.mindMap.emit("data_change",e),this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length)))}back(t=1){if(!this.mindMap.opt.readonly&&this.activeHistoryIndex-t>=0){const e=this.history[this.activeHistoryIndex];this.activeHistoryIndex-=t,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);const i=Object(h["yb"])(this.history[this.activeHistoryIndex]);return this.emitDataUpdatesEvent(e,i),i}}forward(t=1){if(this.mindMap.opt.readonly)return;let e=this.history.length;if(this.activeHistoryIndex+t<=e-1){const e=this.history[this.activeHistoryIndex];this.activeHistoryIndex+=t,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);const i=Object(h["yb"])(this.history[this.activeHistoryIndex]);return this.emitDataUpdatesEvent(e,i),i}}getCopyData(){if(!this.mindMap.renderer.renderTree)return null;if(this.mindMap.isMultiRoot&&Array.isArray(this.mindMap.renderer.renderTree)){const t=this.mindMap.renderer.renderTree.map(t=>Object(h["r"])({},t,!0));return t}{const t=Object(h["r"])({},this.mindMap.renderer.renderTree,!0);return t.smmVersion=j.version,t}}removeDataUid(t){t=Object(h["yb"])(t);let e=t=>{delete t.data.uid,t.children&&t.children.length>0&&t.children.forEach(t=>{e(t)})};return e(t),t}emitDataUpdatesEvent(t,e){try{const i="data_change_detail",n=this.mindMap.event.listenerCount(i);if(n>0&&t&&e){const n=Object(h["yb"])(Object(h["Cb"])(t)),o=Object(h["yb"])(Object(h["Cb"])(e)),r=[],s=(t,e)=>(t.children&&t.children.length>0&&t.children.forEach((i,n)=>{t.children[n]="string"===typeof i?e[i]:e[i.data.uid],s(t.children[n],e)}),t);Object.keys(o).forEach(t=>{n[t]?Object(h["db"])(n[t],o[t])||r.push({action:"update",oldData:s(n[t],n),data:s(o[t],o)}):r.push({action:"create",data:s(o[t],o)})}),Object.keys(n).forEach(t=>{o[t]||r.push({action:"delete",data:s(n[t],n)})}),r.length>0&&this.mindMap.emit(i,r)}}catch(i){this.mindMap.opt.errorHandler(n["b"].DATA_CHANGE_DETAIL_EVENT_ERROR,i)}}}var $=G;class U{constructor(){this.has={},this.queue=[],this.nextTick=Object(h["kb"])(this.flush,this)}push(t,e){this.has[t]?this.replaceTask(t,e):(this.has[t]=!0,this.queue.push({name:t,fn:e}),this.nextTick())}replaceTask(t,e){const i=this.queue.findIndex(e=>e.name===t);-1!==i&&(this.queue[i]={name:t,fn:e})}flush(){let t=this.queue.slice(0);this.queue=[],t.forEach(({name:t,fn:e})=>{this.has[t]=!1,e()})}}var Y=U;const X={el:null,data:null,viewData:null,readonly:!1,layout:n["a"].LAYOUT.LOGICAL_STRUCTURE,fishboneDeg:45,theme:"default",themeConfig:{},scaleRatio:.2,translateRatio:1,minZoomRatio:20,maxZoomRatio:400,customCheckIsTouchPad:null,mouseScaleCenterUseMousePosition:!0,maxTag:5,expandBtnSize:20,imgTextMargin:5,textContentMargin:2,customNoteContentShow:null,textAutoWrapWidth:500,customHandleMousewheel:null,mousewheelAction:n["a"].MOUSE_WHEEL_ACTION.MOVE,mousewheelMoveStep:100,mousewheelZoomActionReverse:!0,defaultInsertSecondLevelNodeText:"二级节点",defaultInsertBelowSecondLevelNodeText:"分支主题",defaultCreateRootText:"新根节点",dragCreateRootHintText:"松手即可创建新根节点",expandBtnStyle:{color:"#808080",fill:"#fff",fontSize:13,strokeColor:"#333333"},expandBtnIcon:{open:"",close:""},expandBtnNumHandler:null,isShowExpandNum:!0,enableShortcutOnlyWhenMouseInSvg:!0,customCheckEnableShortcut:null,initRootNodePosition:null,nodeTextEditZIndex:3e3,nodeNoteTooltipZIndex:3e3,isEndNodeTextEditOnClickOuter:!0,maxHistoryCount:500,containerSizeRetryConfig:{enable:!0,maxRetries:10,retryDelay:100,exponentialBackoff:!0,onRetry:null,fallbackToAsync:!0},alwaysShowExpandBtn:!1,notShowExpandBtn:!1,iconList:[],maxNodeCacheCount:1e3,fitPadding:50,enableCtrlKeyNodeSelection:!0,useLeftKeySelectionRightKeyDrag:!1,beforeTextEdit:null,isUseCustomNodeContent:!1,customCreateNodeContent:null,customCheckIsFromCustomNodeContent:null,customInnerElsAppendTo:null,enableAutoEnterTextEditWhenKeydown:!1,autoEmptyTextWhenKeydownEnterEdit:!1,customHandleClipboardText:null,disableMouseWheelZoom:!1,errorHandler:(t,e)=>{console.error(t,e)},enableDblclickBackToRootNode:!1,enableDblclickCreateRootNode:!0,dragToEmptySpaceCreateRootTime:2e3,hoverRectColor:"rgb(94, 200, 248)",hoverRectPadding:2,selectTextOnEnterEditText:!1,deleteNodeActive:!0,fit:!1,allowRootNodeCollapse:!0,tagsColorMap:{},cooperateStyle:{avatarSize:22,fontSize:12},onlyOneEnableActiveNodeOnCooperate:!1,defaultGeneralizationText:"概要",handleIsSplitByWrapOnPasteCreateNewNode:null,addHistoryTime:100,isDisableDrag:!1,createNewNodeBehavior:n["a"].CREATE_NEW_NODE_BEHAVIOR.DEFAULT,defaultNodeImage:"",isLimitMindMapInCanvas:!1,handleNodePasteImg:null,customCreateNodePath:null,customCreateNodePolygon:null,customTransformNodeLinePath:null,beforeShortcutRun:null,resetScaleOnMoveNodeToCenter:!1,createNodePrefixContent:null,createNodePostfixContent:null,disabledClipboard:!1,customHyperlinkJump:null,customSiyuanHyperlinkJump:null,customSiyuanPDFHyperlinkJump:null,openPerformance:!1,performanceConfig:{time:250,padding:100,removeNodeWhenOutCanvas:!0},emptyTextMeasureHeightText:"abc123我和你",openRealtimeRenderOnNodeTextEdit:!1,mousedownEventPreventDefault:!1,onlyPasteTextWhenHasImgAndText:!0,enableDragModifyNodeWidth:!0,minNodeTextModifyWidth:20,maxNodeTextModifyWidth:-1,customHandleLine:null,addHistoryOnInit:!0,noteIcon:{icon:"",style:{}},hyperlinkIcon:{icon:"",style:{}},attachmentIcon:{icon:"",style:{}},isShowCreateChildBtnIcon:!0,quickCreateChildBtnIcon:{icon:"",style:{}},customQuickCreateChildBtnClick:null,addCustomContentToNode:null,enableInheritAncestorLineStyle:!0,selectTranslateStep:3,selectTranslateLimit:20,enableFreeDrag:!1,dragPreviewMode:"node",dragPreviewSubtreeMaxNodeCount:120,autoMoveWhenMouseInEdgeOnDrag:!0,dragMultiNodeRectConfig:{width:40,height:20,fill:"rgb(94, 200, 248)"},dragPlaceholderRectFill:"rgb(94, 200, 248)",dragPlaceholderLineConfig:{color:"rgb(94, 200, 248)",width:2},dragOpacityConfig:{cloneNodeOpacity:.5,beingDragNodeOpacity:.3},handleDragCloneNode:null,beforeDragEnd:null,beforeDragStart:null,dragCreateRootTipConfig:{borderColor:"#667eea",borderWidth:2,borderDasharray:"8 4",borderAnimationDuration:.6,textColor:"#667eea",textSize:12,padding:8,borderRadius:8},watermarkConfig:{onlyExport:!1,text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"#999",opacity:.5,fontSize:14},belowNode:!1},exportPaddingX:10,exportPaddingY:10,resetCss:"\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n ",minExportImgCanvasScale:2,addContentToHeader:null,addContentToFooter:null,handleBeingExportSvg:null,maxCanvasSize:16384,defaultAssociativeLineText:"关联",associativeLineIsAlwaysAboveNode:!0,associativeLineDragMode:"hideAll",associativeLineInitPointsPosition:{from:"",to:""},enableAdjustAssociativeLinePoints:!0,beforeAssociativeLineConnection:null,disableTouchZoom:!1,minTouchZoomScale:20,maxTouchZoomScale:-1,isLimitMindMapInCanvasWhenHasScrollbar:!0,isOnlySearchCurrentRenderNodes:!1,beforeCooperateUpdate:null,rainbowLinesConfig:{open:!1,colorsList:[]},demonstrateConfig:null,enableEditFormulaInRichTextEdit:!0,katexFontPath:"https://unpkg.com/katex@0.16.11/dist/",getKatexOutputType:null,transformRichTextOnEnterEdit:null,beforeHideRichTextEdit:null,outerFramePaddingX:10,outerFramePaddingY:10,outerFrameDragPreviewMode:"frame",outerFrameDragPreviewSubtreeMaxNodeCount:120,onlyPainterNodeCustomStyles:!1,beforeDeleteNodeImg:null,imgResizeBtnSize:25,minImgResizeWidth:50,minImgResizeHeight:50,maxImgResizeWidthInheritTheme:!1,maxImgResizeWidth:1/0,maxImgResizeHeight:1/0,customDeleteBtnInnerHTML:"",customResizeBtnInnerHTML:"",radialLayoutConfig:{startRadius:120,radiusIncrement:150,minNodeSpacing:20,radiusGrowthStrategy:"auto",exponentialGrowthFactor:1.5,autoAdjustRadius:!0,angleDistribution:"uniform",startAngle:0,endAngle:360,customRadiusCalculator:null},editModeShortcuts:["Control+a","Control+c","Control+v","Control+x","Control+z","Control+y"]};class V{constructor(t={}){if(V.instanceCount++,this.opt=this.handleOpt(u()(X,t)),this.opt.data=this.handleData(this.opt.data),this.el=this.opt.el,!this.el)throw new Error("缺少容器元素el");this._initialized=!1,this._destroyed=!1,this._initializeContainer(),this.cssEl=null,this.cssTextMap={},this.nodeInnerPrefixList=[],this.initContainer(),this.initTheme(),this.initCache(),this.event=new l({mindMap:this}),this.keyCommand=new H({mindMap:this}),this.opt.editModeShortcuts&&this.keyCommand.configureEditModeShortcuts(this.opt.editModeShortcuts),this.command=new $({mindMap:this}),this.renderer=new B({mindMap:this}),this.view=new r({mindMap:this}),this.batchExecution=new Y,V.pluginList.forEach(t=>{this.initPlugin(t)}),this.addCss(),this.render(this.opt.fit?()=>this.view.fit():()=>{}),this.opt.addHistoryOnInit&&this.opt.data&&this.command.addHistory()}handleOpt(t){return n["f"].includes(t.layout)||(t.layout=n["a"].LAYOUT.LOGICAL_STRUCTURE),t.theme=t.theme&&F[t.theme]?t.theme:"default",t}handleData(t){if(Object(h["fb"])(t))return null;if(Array.isArray(t)||!t||"object"!==typeof t||t.data||t.root&&(t=t.root),Array.isArray(t)){if(t=Object(h["yb"])(t),!t)return null;this.isMultiRoot=!0;const e=t.map(t=>(t&&"object"===typeof t||(t={data:{text:"Root"},children:[]}),t.data||(t.data={text:"Root"}),this.opt.allowRootNodeCollapse||!1!==t.data.expand||(t.data.expand=!0),Object(h["v"])([t],!1,null,!0),t));return e}if(Object.keys(t).length<=0)return null;if(t=Object(h["yb"])(t||{}),!t)return null;if(t.multiRoot&&Array.isArray(t.roots)){this.isMultiRoot=!0;const e=t.roots.map(t=>(t&&"object"===typeof t||(t={data:{text:"Root"},children:[]}),t.data||(t.data={text:"Root"}),this.opt.allowRootNodeCollapse||!1!==t.data.expand||(t.data.expand=!0),Object(h["v"])([t],!1,null,!0),t));return e}return this.isMultiRoot=!1,t.data||(t.data={text:"Root"}),this.opt.allowRootNodeCollapse||!1!==t.data.expand||(t.data.expand=!0),Object(h["v"])([t],!1,null,!0),t}initContainer(){const{associativeLineIsAlwaysAboveNode:t}=this.opt;this.el.classList.add("smm-mind-map-container");const e=()=>{this.associativeLineDraw=this.draw.group(),this.associativeLineDraw.addClass("smm-associative-line-container")};this.svg=Object(O["i"])().addTo(this.el).size(this.width,this.height),this.draw=this.svg.group(),this.draw.addClass("smm-container"),this.lineDraw=this.draw.group(),this.lineDraw.addClass("smm-line-container"),t||e(),this.nodeDraw=this.draw.group(),this.nodeDraw.addClass("smm-node-container"),t&&e(),this.otherDraw=this.draw.group(),this.otherDraw.addClass("smm-other-container")}clearDraw(){this.lineDraw.clear(),this.associativeLineDraw.clear(),this.nodeDraw.clear(),this.otherDraw.clear()}appendCss(t,e){this.cssTextMap[t]=e,this.removeCss(),this.addCss()}removeAppendCss(t){this.cssTextMap[t]&&(delete this.cssTextMap[t],this.removeCss(),this.addCss())}joinCss(){return n["c"]+Object.keys(this.cssTextMap).map(t=>this.cssTextMap[t]).join("\n")}addCss(){this.cssEl=document.createElement("style"),this.cssEl.type="text/css",this.cssEl.innerHTML=this.joinCss(),document.head.appendChild(this.cssEl)}removeCss(){this.cssEl&&document.head.removeChild(this.cssEl)}render(t,e=""){this.batchExecution.push("render",()=>{this.initTheme(),this.renderer.render(t,e)})}reRender(t,e=""){this.renderer.reRender=!0,this.renderer.clearCache(),this.clearDraw(),this.render(t,e)}getElRectInfo(){if(!this._destroyed&&(this.elRect=this.el.getBoundingClientRect(),this.width=this.elRect.width,this.height=this.elRect.height,this.width<=0||this.height<=0))throw new Error("容器元素el的宽高不能为0")}_initializeContainer(){if(this.opt.containerSizeRetryConfig.enable)try{this.getElRectInfo(),this._initialized=!0,this.initWidth=this.width,this.initHeight=this.height}catch(t){if(!this.opt.containerSizeRetryConfig.fallbackToAsync)throw t;this.width=100,this.height=100,this._initPromise=this.delayedInit()}else this.getElRectInfo(),this._initialized=!0,this.initWidth=this.width,this.initHeight=this.height}async delayedInit(){try{await this.getElRectInfoWithRetry(this.opt.containerSizeRetryConfig),this._initialized=!0,this.initWidth=this.width,this.initHeight=this.height,this.svg&&this.svg.size(this.width,this.height),this.renderer&&this.render(),this.emit("delayedInitComplete")}catch(t){throw this.opt.errorHandler&&this.opt.errorHandler("DELAYED_INIT_ERROR",t),t}}async waitForInit(){return this._initialized?Promise.resolve():this._initPromise?this._initPromise:this.delayedInit()}async getElRectInfoWithRetry(t={}){const{maxRetries:e=10,retryDelay:i=100,exponentialBackoff:n=!0,onRetry:o=null}=t;let r=0,s=null;const a=()=>{try{return this.elRect=this.el.getBoundingClientRect(),this.width=this.elRect.width,this.height=this.elRect.height,this.width>0&&this.height>0}catch(t){return s=t,!1}};return a()?Promise.resolve():new Promise((t,s)=>{const h=()=>{if(r++,r>e)return void s(new Error(`容器元素el的宽高不能为0已重试${e}`));o&&o(r,e);const d=n?i*Math.pow(2,r-1):i;setTimeout(()=>{a()?t():h()},Math.min(d,5e3))};h()})}resize(){if(this._destroyed)return;const t=this.width,e=this.height;try{this.getElRectInfo(),this.svg.size(this.width,this.height),t===this.width&&e===this.height||this.demonstrate&&this.demonstrate.isInDemonstrate||this.render(),this.emit("resize")}catch(i){if(this._destroyed)return;if(!this.opt.containerSizeRetryConfig.enable)throw i;this.getElRectInfoWithRetry(this.opt.containerSizeRetryConfig).then(()=>{this._destroyed||(this.svg.size(this.width,this.height),t===this.width&&e===this.height||this.demonstrate&&this.demonstrate.isInDemonstrate||this.render(),this.emit("resize"))}).catch(t=>{this._destroyed||this.opt.errorHandler&&this.opt.errorHandler("CONTAINER_SIZE_ERROR",t)})}}on(t,e){this.event.on(t,e)}emit(t,...e){this.event.emit(t,...e)}off(t,e){this.event.off(t,e)}initCache(){this.commonCaches={measureCustomNodeContentSizeEl:null,measureRichtextNodeTextSizeEl:null}}initTheme(){this.themeConfig=Object(h["ib"])(F[this.opt.theme]||F.default,this.opt.themeConfig),P["a"].setBackgroundStyle(this.el,this.themeConfig)}getNodeThemeConfig(t){if(this.isMultiRoot&&t){let e=t;while(e&&e.parent)e=e.parent;if(e&&e.nodeData&&e.nodeData.data){const t=e.nodeData.data;if(t.theme)return Object(h["ib"])(F[t.theme]||F.default,t.themeConfig||{})}}return this.themeConfig}setTheme(t,e=!1){this.execCommand("CLEAR_ACTIVE_NODE"),this.opt.theme=t,e||this.render(null,n["a"].CHANGE_THEME),this.emit("view_theme_change",t)}refreshTheme(){this.render(null,n["a"].CHANGE_THEME)}getTheme(){return this.opt.theme}setThemeConfig(t,e=!1){const i=Object(h["O"])(this.themeConfig,t);if(this.opt.themeConfig=t,!e){const t=Object(A["a"])(i);this.render(null,t?"":n["a"].CHANGE_THEME)}}getCustomThemeConfig(){return this.opt.themeConfig}getThemeConfig(t){return void 0===t?this.themeConfig:this.themeConfig[t]}getConfig(t){return void 0===t?this.opt:this.opt[t]}updateConfig(t={}){this.emit("before_update_config",this.opt);const e={...this.opt};this.opt=this.handleOpt(u.a.all([X,this.opt,t])),this.emit("after_update_config",this.opt,e)}getLayout(){return this.opt.layout}setLayout(t,e=!1){n["f"].includes(t)||(t=n["a"].LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=t,this.view.reset(),this.renderer.setLayout(),e||this.render(null,n["a"].CHANGE_LAYOUT),this.emit("layout_change",t)}execCommand(...t){this.command.exec(...t)}updateData(t){t=this.handleData(t),this.emit("before_update_data",t),this.renderer.setData(t),this.render(),this.command.addHistory(),this.emit("update_data",t)}setData(t){t=this.handleData(t),this.emit("before_set_data",t),this.opt.data=t,this.execCommand("CLEAR_ACTIVE_NODE"),this.command.clearHistory(),this.command.addHistory(),this.renderer.setData(t),this.reRender(()=>{},n["a"].SET_DATA),this.emit("set_data",t)}setFullData(t){t.multiRoot&&t.roots?this.setData({multiRoot:!0,roots:t.roots}):t.root&&this.setData(t.root),t.layout&&this.setLayout(t.layout),t.theme&&(t.theme.template&&this.setTheme(t.theme.template),t.theme.config&&this.setThemeConfig(t.theme.config)),t.view&&this.view.setTransformData(t.view)}getData(t){let e=this.command.getCopyData(),i={};return i=t?{layout:this.getLayout(),root:e,theme:{template:this.getTheme(),config:this.getCustomThemeConfig()},view:this.view.getTransformData()}:e,this.isMultiRoot&&(t?(i.multiRoot=!0,i.roots=i.root,delete i.root):i={multiRoot:!0,roots:i}),Object(h["yb"])(i)}async export(...t){try{if(!this.doExport)throw new Error("请注册Export插件");let e=await this.doExport.export(...t);return e}catch(e){this.opt.errorHandler(n["b"].EXPORT_ERROR,e)}}toPos(t,e){return{x:t-this.elRect.left,y:e-this.elRect.top}}setMode(t){if(![n["a"].MODE.READONLY,n["a"].MODE.EDIT].includes(t))return;const e=t===n["a"].MODE.READONLY;e!==this.opt.readonly&&(e&&(this.renderer.textEdit.isShowTextEdit()&&(this.renderer.textEdit.hideEditTextBox(),this.command.originAddHistory()),this.execCommand("CLEAR_ACTIVE_NODE")),this.opt.readonly=e,!e&&this.command.history.length<=0&&this.command.originAddHistory(),this.emit("mode_change",t))}getSvgData({paddingX:t=0,paddingY:e=0,ignoreWatermark:i=!1,addContentToHeader:n,addContentToFooter:o,node:r}={}){const{watermarkConfig:s,openPerformance:a}=this.opt;a&&this.renderer.forceLoadNode(r);const{cssTextList:d,header:l,headerHeight:c,footer:u,footerHeight:f}=Object(h["V"])({addContentToHeader:n,addContentToFooter:o}),p=this.svg,g=this.draw,m=p.width(),b=p.height(),x=g.transform(),y=this.elRect;g.scale(1/x.scaleX,1/x.scaleY);const w=g.rbox();let C=null;r&&(C=Object(h["N"])(r,w.x,w.y,t,e));const v=0;w.width+=2*t,w.height+=2*e+v+c+f,g.translate(t,e),p.size(w.width,w.height),g.translate(-w.x+y.left,-w.y+y.top);let _=p.clone();const M=this.watermark&&this.watermark.hasWatermark();if(!i&&M){this.watermark.isInExport=!0;const{onlyExport:t}=s,e=w.width>m||w.height>b;e?(this.width=w.width,this.height=w.height,this.watermark.onResize(),_=p.clone(),this.width=m,this.height=b,this.watermark.onResize()):t&&(this.watermark.onResize(),_=p.clone()),t&&this.watermark.clear(),this.watermark.isInExport=!1}[this.joinCss(),...d].forEach(t=>{_.add(Object(O["i"])(`<style>${t}</style>`))}),l&&c>0&&(_.findOne(".smm-container").translate(0,c),l.width(w.width),l.y(e),_.add(l,0)),u&&f>0&&(u.width(w.width),u.y(w.height-e-f),_.add(u));const E=p.find("defs"),N=_.find("defs");return E.forEach((t,e)=>{const i=N[e];if(!i)return;const n=t.children(),o=i.children();for(let r=0;r<n.length;r++){const t=n[r],e=o[r];t&&e&&e.attr("id",t.attr("id"))}}),p.size(m,b),g.transform(x),{svg:_,svgHTML:_.svg(),clipData:C,rect:{...w,ratio:w.width/w.height},origWidth:m,origHeight:b,scaleX:x.scaleX,scaleY:x.scaleY}}addPlugin(t,e){let i=V.hasPlugin(t);-1===i&&V.usePlugin(t,e),this.initPlugin(t)}removePlugin(t){let e=V.hasPlugin(t);-1!==e&&(V.pluginList.splice(e,1),this[t.instanceName]&&(this[t.instanceName].beforePluginRemove&&this[t.instanceName].beforePluginRemove(),delete this[t.instanceName]))}initPlugin(t){this[t.instanceName]||(this[t.instanceName]=new t({mindMap:this,pluginOpt:t.pluginOpt}))}setMultiRootMode(t=!0){if(this.isMultiRoot===t)return;this.isMultiRoot=t;const e=this.renderer.renderTree;t&&e&&!Array.isArray(e)?this.renderer.renderTree=[e]:!t&&Array.isArray(e)&&e.length>0&&(this.renderer.renderTree=e[0]),this.render()}addRootNode(t={},e=-1,i=null){this.isMultiRoot||this.setMultiRootMode(!0);let n=this.renderer.renderTree;Array.isArray(n)||(n=n?[n]:[],this.renderer.renderTree=n);const o=n.length,r={data:{text:this.opt.defaultCreateRootText||"新根节点",expand:!0,uid:Object(h["u"])(),...t.data},children:t.children||[]};return Object(h["v"])([r],!1,null,!0),e>=0&&e<n.length?n.splice(e,0,r):n.push(r),this.render(()=>{if(this.renderer.roots&&this.renderer.roots.length>o){const t=this.renderer.roots[this.renderer.roots.length-1];i&&"function"===typeof i&&i(t)}}),this.command.addHistory(),r}removeRootNode(t){if(!this.isMultiRoot||!Array.isArray(this.renderer.renderTree))return;const e=this.renderer.renderTree;t>=0&&t<e.length&&(e.splice(t,1),this.render(),this.command.addHistory())}getRootNodes(){return this.isMultiRoot?this.renderer.roots||[]:this.renderer.root?[this.renderer.root]:[]}convertToMultiRoot(t){return t&&!t.multiRoot?{multiRoot:!0,roots:[t]}:t}convertToSingleRoot(t){return t&&t.multiRoot&&Array.isArray(t.roots)&&t.roots.length>0?t.roots[0]:t}setRootLayout(t,e){if(!this.isMultiRoot||!Array.isArray(this.renderer.renderTree))return;const i=this.renderer.renderTree;t>=0&&t<i.length&&(i[t].data||(i[t].data={}),i[t].data.layout=e,this.render())}getRootCount(){return this.renderer&&this.renderer.roots&&Array.isArray(this.renderer.roots)?this.renderer.roots.length:this.renderer&&this.renderer.root?1:0}getRootList(){return this.renderer&&this.renderer.roots&&Array.isArray(this.renderer.roots)?this.renderer.roots:this.renderer&&this.renderer.root?[this.renderer.root]:[]}getRootIndexByNode(t){if(!t)return null;let e=t;while(e&&e.parent)e=e.parent;if(e&&"number"===typeof e.rootIndex)return e.rootIndex;const i=this.getRootList(),n=i.findIndex(t=>{var i;return t===e||(null===t||void 0===t?void 0:t.uid)===(null===(i=e)||void 0===i?void 0:i.uid)});return n>=0?n:null}setRootTheme(t,e,i={}){if(!this.isMultiRoot||!Array.isArray(this.renderer.renderTree))return;const o=this.renderer.renderTree;t>=0&&t<o.length&&(o[t].data||(o[t].data={}),o[t].data.theme=e,o[t].data.themeConfig=i,this.render(null,n["a"].CHANGE_THEME))}copyNodeData(t){if(!t||!t.nodeData)return null;const e={data:{},children:[]},i=["text","image","imageTitle","imageSize","icon","tag","hyperlink","hyperlinkTitle","note","expand","fontSize","color","backgroundColor","borderColor","borderWidth","borderRadius","shape","uid"];return i.forEach(i=>{const n=t.getData(i);void 0!==n&&null!==n&&(e.data[i]=n)}),e.data.text||(e.data.text="节点"),e.data.uid||(e.data.uid=t.uid||Object(h["u"])()),t.children&&t.children.length>0&&(e.children=t.children.map(t=>this.copyNodeData(t))),e}getRootTheme(t){if(!this.isMultiRoot||!Array.isArray(this.renderer.renderTree))return{theme:this.opt.theme,themeConfig:this.opt.themeConfig};if(null===t||void 0===t||t<0||t>=this.renderer.renderTree.length)return{theme:this.opt.theme,themeConfig:this.opt.themeConfig};const e=this.renderer.renderTree;return t>=0&&t<e.length&&e[t].data?{theme:e[t].data.theme||this.opt.theme,themeConfig:e[t].data.themeConfig||this.opt.themeConfig}:{theme:this.opt.theme,themeConfig:this.opt.themeConfig}}convertNodeToFlowChart(t,e="process"){if(t)if(t.nodeData)if(!t.isRoot&&t.parent){const i=this.copyNodeData(t);i.data.isFlowChart=!0,i.data.flowchart={nodeType:e,showConnectors:!0,connectorPositions:["top","right","bottom","left"],preventOverlap:!0,hideExpandBtn:!0,hideAddBtn:!0};const n=t.getRect(),o=this.elRect,r=this.view.transform,s=r.scaleX||1,a=r.scaleY||1,h=r.translateX||0,d=r.translateY||0;i.data.customLeft=(n.x-o.left-h)/s,i.data.customTop=(n.y-o.top-d)/a,i.children&&i.children.length>0&&(i.data.expand=!1),this.execCommand("REMOVE_NODE",[t]),this.addRootNode(i)}else t.nodeData.data||(t.nodeData.data={}),t.nodeData.data.isFlowChart=!0,t.nodeData.data.flowchart={nodeType:e,showConnectors:!0,connectorPositions:["top","right","bottom","left"],preventOverlap:!0,hideExpandBtn:!0,hideAddBtn:!0},t._isFlowChartNode=!0,t.freePosition=!0,t._flowChartConnector||Promise.resolve().then(i.bind(null,"14d0")).then(e=>{const i=e.default;t._flowChartConnector=new i(t),t.group&&t._flowChartConnector.renderConnectors()}),t.children&&t.children.length>0&&(t.nodeData.data.expand=!1,t.hideChildren()),t.setData({isFlowChart:!0,flowchart:t.nodeData.data.flowchart,expand:!1}),t.reRender();else console.error("节点数据为空",t)}convertNodeToNormal(t){t&&t.nodeData&&t.nodeData.data.isFlowChart&&(delete t.nodeData.data.isFlowChart,delete t.nodeData.data.flowchart,t._isFlowChartNode=!1,t.freePosition=!1,t.children&&t.children.length>0&&(t.nodeData.data.expand=!0,t.showChildren()),t.setData({expand:!0}),t.reRender())}destroy(){this._destroyed=!0,this.emit("beforeDestroy"),this.renderer.textEdit.hideEditTextBox(),this.renderer.textEdit.removeTextEditEl(),[...V.pluginList].forEach(t=>{this[t.instanceName]&&this[t.instanceName].beforePluginDestroy&&this[t.instanceName].beforePluginDestroy(),this[t.instanceName]=null}),this.event.unbind(),this.svg.remove(),P["a"].removeBackgroundStyle(this.el),this.el.classList.remove("smm-mind-map-container"),this.el.innerHTML="",this.el=null,this.removeCss(),V.instanceCount--}}V.pluginList=[],V.usePlugin=(t,e={})=>(-1!==V.hasPlugin(t)||(t.pluginOpt=e,V.pluginList.push(t)),V),V.hasPlugin=t=>V.pluginList.findIndex(e=>e===t),V.instanceCount=0,V.defineTheme=(t,e={})=>{if(F[t])return new Error("该主题名称已存在");F[t]=Object(h["ib"])(A["b"],e)},V.updateTheme=(t,e={})=>{F[t]=Object(h["ib"])(A["b"],e)},V.removeTheme=t=>{F[t]&&(F[t]=null)};e["a"]=V},"723f":function(t,e,i){"use strict";i.d(e,"b",(function(){return l}));var n=i("1e42");const o='<svg xmlns="http://www.w3.org/2000/svg" width=16 height=16 viewBox="0 0 16 16"><path fill="none" stroke="#DD2025" strokeLinecap="round" strokeLinejoin="round" d="M2.8 14.34c1.81-1.25 3.02-3.16 3.91-5.5c.9-2.33 1.86-4.33 1.44-6.63c-.06-.36-.57-.73-.83-.7c-1.02.06-.95 1.21-.85 1.9c.24 1.71 1.56 3.7 2.84 5.56c1.27 1.87 2.32 2.16 3.78 2.26c.5.03 1.25-.14 1.37-.58c.77-2.8-9.02-.54-12.28 2.08c-.4.33-.86 1-.6 1.46c.2.36.87.4 1.23.15h0Z" strokeWidth={1}></path></svg>',r='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M435.484444 251.733333v68.892445L295.822222 320.682667a168.504889 168.504889 0 0 0-2.844444 336.952889h142.506666v68.892444H295.822222a237.397333 237.397333 0 0 1 0-474.794667h139.662222z m248.945778 0a237.397333 237.397333 0 0 1 0 474.851556H544.654222v-69.006222l139.776 0.056889a168.504889 168.504889 0 0 0 2.844445-336.952889H544.597333V251.676444h139.776z m-25.827555 203.946667a34.474667 34.474667 0 0 1 0 68.892444H321.649778a34.474667 34.474667 0 0 1 0-68.892444h336.952889z" ></path></svg>',s='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M152.768 985.984 152.768 49.856l434.56 0 66.816 0 234.048 267.392 0 66.816 0 601.92L152.768 985.984 152.768 985.984zM654.144 193.088l0 124.16 108.736 0L654.144 193.088 654.144 193.088zM821.312 384.064l-167.168 0L587.328 384.064 587.328 317.312 587.328 116.736 219.584 116.736 219.584 919.04l601.728 0L821.312 384.064 821.312 384.064zM386.688 517.888 319.808 517.888 319.808 450.944l66.816 0L386.624 517.888 386.688 517.888zM386.688 651.584 319.808 651.584 319.808 584.704l66.816 0L386.624 651.584 386.688 651.584zM386.688 785.344 319.808 785.344l0-66.88 66.816 0L386.624 785.344 386.688 785.344zM721.024 517.888 453.632 517.888 453.632 450.944l267.392 0L721.024 517.888 721.024 517.888zM654.144 651.584 453.632 651.584 453.632 584.704l200.512 0L654.144 651.584 654.144 651.584zM620.672 785.344l-167.04 0 0-66.88 167.04 0L620.672 785.344 620.672 785.344z" ></path></svg>',a='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" width="128" height="128"><path d="M516.373333 375.978667l136.576-136.576a147.797333 147.797333 0 0 1 208.853334-0.021334 147.690667 147.690667 0 0 1-0.042667 208.832l-204.8 204.778667v0.021333l-153.621333 153.6c-85.973333 85.973333-225.28 85.973333-311.253334 0.021334-85.994667-85.973333-85.973333-225.216 0.149334-311.36L431.146667 256.362667a21.333333 21.333333 0 0 0-30.165334-30.165334L162.069333 465.066667c-102.805333 102.826667-102.826667 269.056-0.149333 371.733333 102.613333 102.613333 268.970667 102.613333 371.584 0l153.6-153.642667h0.021333l0.021334-0.021333 204.778666-204.778667c74.325333-74.325333 74.346667-194.858667 0.021334-269.184-74.24-74.24-194.88-74.24-269.162667 0.042667l-136.576 136.554667-187.626667 187.626666a117.845333 117.845333 0 0 0-0.106666 166.826667 118.037333 118.037333 0 0 0 166.826666-0.106667l255.850667-255.829333a21.333333 21.333333 0 0 0-30.165333-30.165333L435.136 669.973333a75.370667 75.370667 0 0 1-106.496 0.106667 75.178667 75.178667 0 0 1 0.128-106.496l187.605333-187.605333z" ></path></svg>',h='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">\n<title></title>\n<g id="icomoon-ignore">\n</g>\n<path fill="#d23f31" d="M37.052 371.676l269.857-269.857v550.507l-269.857 269.857z"></path>\n<path fill="#3b3e43" d="M306.909 101.818l205.091 205.091v550.507l-205.091-205.091z"></path>\n<path fill="#d23f31" d="M512 306.909l205.091-205.091v550.507l-205.091 205.091z"></path>\n<path fill="#3b3e43" d="M717.091 101.818l269.857 269.857v550.507l-269.857-269.857z"></path>\n</svg>',d='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1080" height="1080" viewBox="0 0 1080 1080" xml:space="preserve">\n<desc>Created with Fabric.js 5.2.4</desc>\n<defs>\n</defs>\n<rect x="0" y="0" width="100%" height="100%" fill="transparent"></rect>\n<g transform="matrix(1 0 0 1 540 540)" id="64cc9395-2655-43d4-b6a5-bad14f267554" >\n<rect style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1; visibility: hidden;" vector-effect="non-scaling-stroke" x="-540" y="-540" rx="0" ry="0" width="1080" height="1080" />\n</g>\n<g transform="matrix(1 0 0 1 540 540)" id="1dba744c-c666-4fa9-a983-7068d1086ed3" >\n</g>\n<g transform="matrix(1.13 0 0 1.21 539.47 506.91)" >\n<g style="" vector-effect="non-scaling-stroke" >\n\t\t<g transform="matrix(1 0 0 1 -340.02 0)" >\n<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(210,63,49); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-171.98, -512)" d="M 37.052 371.676 L 306.90900000000005 101.81899999999996 L 306.90900000000005 652.3259999999999 L 37.05200000000002 922.183 z" stroke-linecap="round" />\n</g>\n\t\t<g transform="matrix(1 0 0 1 -102.54 -32.38)" >\n<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(59,62,67); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-409.45, -479.62)" d="M 306.909 101.818 L 512 306.909 L 512 857.4159999999999 L 306.909 652.3249999999999 z" stroke-linecap="round" />\n</g>\n\t\t<g transform="matrix(1 0 0 1 102.55 -32.38)" >\n<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(210,63,49); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-614.55, -479.62)" d="M 512 306.909 L 717.091 101.81799999999998 L 717.091 652.3249999999999 L 512 857.4159999999999 z" stroke-linecap="round" />\n</g>\n\t\t<g transform="matrix(1 0 0 1 340.02 0)" >\n<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(59,62,67); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-852.02, -512)" d="M 717.091 101.818 L 986.9480000000001 371.675 L 986.9480000000001 922.182 L 717.0910000000001 652.325 z" stroke-linecap="round" />\n</g>\n</g>\n</g>\n<g transform="matrix(0.87 0 0 0.87 705.88 779.46)" >\n<path style="stroke: rgb(0,0,0); stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(198,196,196); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-490.14, -489.13)" d="M 435.484444 251.733333 L 435.484444 320.62577799999997 L 295.822222 320.682667 C 203.8345839852788 321.40748145128106 129.42755121117955 395.77269787158764 128.65102578808043 487.75991389524745 C 127.87450036498132 579.7471299189071 201.01548586103274 655.3578975393414 292.977778 657.635556 L 435.484444 657.635556 L 435.484444 726.5279999999999 L 295.822222 726.5279999999999 C 164.7112950574551 726.5279999999999 58.42488850000004 620.2415934425449 58.42488850000004 489.1306664999999 C 58.42488850000004 358.01973955745495 164.7112950574551 251.7333329999999 295.822222 251.7333329999999 L 435.48444400000005 251.7333329999999 z M 684.430222 251.733333 C 815.5568584061115 251.733333 921.8559999999999 358.0324745938884 921.8559999999999 489.15911099999994 C 921.856 620.2857474061115 815.5568584061116 726.5848889999999 684.4302220000001 726.584889 L 544.654222 726.584889 L 544.654222 657.578667 L 684.430222 657.635556 C 776.4178601186404 656.9107419620873 850.824893269418 582.5455257208165 851.6014189663446 490.55830959880575 C 852.3779446632713 398.57109347679494 779.2369592363319 322.960325594911 687.2746669999999 320.6826669999999 L 544.597333 320.6826669999999 L 544.597333 251.676444 L 684.373333 251.676444 z M 658.602667 455.67999999999995 C 677.0825643178487 456.43116676053745 691.6771716209859 471.63106435318963 691.6771716209859 490.1262219999999 C 691.677171620986 508.6213796468102 677.0825643178487 523.8212772394625 658.602667 524.5724439999999 L 321.649778 524.5724439999999 C 303.16988068215113 523.8212772394628 288.5752733790134 508.62137964681045 288.5752733790134 490.12622199999987 C 288.5752733790134 471.63106435318934 303.16988068215113 456.431166760537 321.649778 455.6799999999999 L 658.6026670000001 455.6799999999999 z" stroke-linecap="round" />\n</g>\n</svg>',l=[{name:"优先级图标",type:"priority",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 511.957333 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 511.957333 1024 794.794667 794.752 1024 512.042667 1024z" fill="#E93B30"></path><path d="M580.309333 256h-75.52c-10.666667 29.824-30.165333 55.765333-58.709333 78.165333-28.416 22.314667-54.869333 37.418667-79.146667 45.397334v84.608a320 320 0 0 0 120.234667-70.698667v352.085333H580.266667V256z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M511.957333 1024C229.248 1024 0 794.752 0 512S229.248 0 511.957333 0C794.752 0 1024 229.248 1024 512s-229.248 512-512.042667 512z" fill="#FA8D2E"></path><path d="M667.946667 658.602667h-185.301334c4.864-8.533333 11.178667-17.066667 19.072-25.984 7.808-8.874667 26.453333-26.837333 55.936-53.888 29.525333-27.008 49.877333-47.786667 61.226667-62.165334 16.981333-21.717333 29.44-42.453333 37.290667-62.293333 7.808-19.84 11.776-40.746667 11.776-62.677333 0-38.570667-13.738667-70.741333-41.088-96.725334C599.466667 268.928 561.706667 256 513.834667 256c-43.690667 0-80.128 11.136-109.354667 33.578667-29.098667 22.4-46.506667 59.306667-52.010667 110.805333l93.184 9.301333c1.792-27.349333 8.405333-46.890667 19.754667-58.624 11.434667-11.776 26.837333-17.664 46.165333-17.664 19.541333 0 34.858667 5.589333 45.909334 16.768 11.136 11.264 16.682667 27.221333 16.682666 48.042667 0 18.858667-6.4 37.930667-19.242666 57.258667-9.472 14.037333-35.157333 40.533333-77.098667 79.872-52.096 48.554667-87.04 87.509333-104.704 116.821333A226.688 226.688 0 0 0 341.333333 745.429333h326.613334v-86.826666z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#2E66FA"></path><path d="M627.754667 731.733333c-29.354667 25.088-66.901333 37.632-112.725334 37.632-44.928 0-81.792-11.52-110.592-34.773333-33.066667-26.538667-49.877333-64.469333-50.304-114.133333h92.16c0.426667 21.76 7.552 38.314667 21.333334 49.664 12.288 10.88 28.117333 16.341333 47.402666 16.341333 20.309333 0 36.778667-6.101333 49.322667-18.432 12.544-12.330667 18.773333-29.568 18.773333-51.797333 0-21.290667-6.229333-38.186667-18.773333-50.773334-12.544-12.501333-29.866667-18.773333-52.138667-18.773333h-13.525333v-80.042667H512c42.112 0 63.274667-21.034667 63.274667-63.146666 0-20.309333-5.888-36.096-17.706667-47.445334a60.757333 60.757333 0 0 0-43.818667-17.066666c-17.493333 0-32 5.504-43.434666 16.298666-11.562667 10.88-17.792 25.728-18.773334 44.714667H359.68c0.981333-43.946667 16.042667-78.976 45.397333-104.96 29.354667-25.941333 65.706667-39.04 109.226667-39.04 44.928 0 81.792 13.525333 110.592 40.490667 28.8 26.922667 43.306667 61.610667 43.306667 104.149333 0 48.213333-19.413333 82.688-58.154667 103.552 43.52 23.125333 65.28 61.44 65.28 114.858667 0 48.128-15.957333 85.76-47.573333 112.682666z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 512.042667 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M600.96 256v309.802667h60.117333v81.536h-60.16v98.218666h-90.154666v-98.218666H311.466667v-81.237334L522.666667 256h78.293333zM510.72 399.104l-112.042667 166.698667h112.042667V399.104z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 512.042667 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M470.912 343.552h175.786667V256H400.256l-47.786667 253.952 75.434667 10.837333c21.205333-23.552 45.269333-35.413333 72.021333-35.413333 21.546667 0 38.997333 7.509333 52.437334 22.4 13.312 15.018667 20.053333 37.418667 20.053333 67.328 0 31.872-6.741333 55.765333-20.181333 71.552-13.397333 15.872-29.866667 23.765333-49.237334 23.765333-17.066667 0-32.085333-6.186667-45.013333-18.432-13.013333-12.373333-20.821333-29.013333-23.466667-50.133333L341.333333 611.498667c5.546667 40.874667 22.485333 73.429333 50.730667 97.621333 28.330667 24.32 64.938667 36.437333 109.866667 36.437333 56.149333 0 100.053333-21.546667 131.754666-64.554666a176.64 176.64 0 0 0 34.816-107.52c0-48.042667-14.378667-87.210667-43.221333-117.333334-28.8-30.208-63.957333-45.312-105.514667-45.312-21.674667 0-42.922667 5.248-63.829333 15.616l14.976-82.901333z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512 0c282.88 0 512 229.205333 512 512.042667C1024 794.794667 794.88 1024 512 1024z" fill="#6D768D"></path><path d="M519.210667 256c36.992 0 67.626667 10.368 91.776 31.189333 24.192 20.821333 39.68 51.029333 46.293333 90.709334l-90.197333 9.984c-2.176-18.56-7.978667-32.298667-17.28-41.173334-9.258667-8.874667-21.418667-13.226667-36.224-13.226666-19.754667 0-36.437333 8.789333-50.048 26.453333-13.696 17.664-22.314667 54.613333-25.856 110.549333 23.296-27.52 52.138667-41.258667 86.656-41.258666 38.997333 0 72.362667 14.805333 100.181333 44.544 27.733333 29.696 41.685333 68.010667 41.685333 114.858666 0 49.877333-14.634667 89.856-43.818666 119.936-29.226667 30.208-66.730667 45.226667-112.554667 45.226667-49.066667 0-89.429333-19.072-121.130667-57.344C357.12 658.218667 341.333333 595.541333 341.333333 508.416c0-89.344 16.469333-153.813333 49.493334-193.194667C423.722667 275.754667 466.56 256 519.168 256z m-9.472 241.834667c-17.962667 0-33.066667 6.997333-45.525334 21.12-12.330667 14.037333-18.56 34.858667-18.56 62.293333 0 30.421333 6.912 53.76 20.906667 70.4 13.952 16.469333 29.866667 24.746667 47.786667 24.746667 17.28 0 31.701333-6.826667 43.178666-20.309334 11.52-13.525333 17.237333-35.669333 17.237334-66.56 0-31.658667-6.186667-54.869333-18.517334-69.546666a58.197333 58.197333 0 0 0-46.506666-22.144z" fill="#FFFFFF"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.752 0 512S229.248 0 512.042667 0C794.752 0 1024 229.248 1024 512s-229.248 512-511.957333 512z" fill="#6D768D"></path><path d="M673.024 273.066667H354.133333v86.869333h212.224a691.2 691.2 0 0 0-104.746666 187.989333c-26.026667 70.101333-39.978667 138.88-41.429334 206.293334h89.6c-0.298667-42.922667 6.698667-91.776 21.034667-146.474667a654.72 654.72 0 0 1 62.08-154.965333c27.136-48.554667 53.888-85.76 80.128-111.701334V273.066667z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z" fill="#6D768D"></path><path d="M512.426667 256c46.208 0 82.048 11.861333 107.605333 35.541333 25.6 23.68 38.314667 53.674667 38.314667 89.898667 0 22.613333-5.802667 42.666667-17.578667 60.330667a111.445333 111.445333 0 0 1-49.450667 40.277333c26.965333 10.837333 47.36 26.752 61.312 47.658667 13.994667 20.906667 21.034667 45.013333 21.034667 72.362666 0 45.098667-14.336 81.834667-42.965333 109.952-28.586667 28.245333-66.602667 42.368-114.090667 42.368-44.245333 0-81.066667-11.648-110.464-34.986666-34.645333-27.52-52.010667-65.28-52.010667-113.365334 0-26.368 6.528-50.645333 19.626667-72.746666 13.056-22.144 33.578667-39.210667 61.696-51.242667-24.064-10.154667-41.557333-24.192-52.48-41.941333a109.824 109.824 0 0 1-16.512-58.666667c0-36.224 12.757333-66.218667 37.973333-89.898667 25.386667-23.68 61.354667-35.541333 108.032-35.541333z m1.28 265.429333c-22.784 0-39.722667 7.978667-50.901334 23.893334-11.136 15.786667-16.64 33.066667-16.64 51.498666 0 25.984 6.485333 46.208 19.712 60.714667 13.098667 14.506667 29.525333 21.802667 49.152 21.802667 19.242667 0 35.157333-6.997333 47.786667-20.992 12.629333-13.909333 18.858667-34.048 18.858667-60.416 0-23.082667-6.314667-41.557333-19.2-55.466667a63.274667 63.274667 0 0 0-48.725334-21.034667z m-0.341334-191.488c-17.792 0-32 5.333333-42.581333 16-10.538667 10.666667-15.872 24.746667-15.872 42.325334 0 18.645333 5.248 33.152 15.701333 43.648 10.453333 10.453333 24.362667 15.658667 41.770667 15.658666 17.664 0 31.658667-5.290667 42.24-15.872 10.538667-10.581333 15.872-25.173333 15.872-43.818666 0-17.493333-5.248-31.573333-15.701333-42.154667s-24.277333-15.786667-41.429334-15.786667z" fill="#FFFFFF"></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.794667 0 512.042667 0 229.333333 229.248 0 512 0c282.88 0 512 229.333333 512 512.042667C1024 794.794667 794.88 1024 512 1024z" fill="#6D768D"></path><path d="M497.28 256c49.365333 0 89.856 19.157333 121.429333 57.429333 31.701333 38.229333 47.488 101.205333 47.488 188.842667 0 89.173333-16.384 153.386667-49.365333 192.853333-32.853333 39.594667-75.605333 59.264-128.426667 59.264-37.888 0-68.608-10.154667-91.989333-30.506666s-38.4-50.816-45.013333-91.306667l90.112-9.984c2.261333 18.474667 8.021333 32.085333 17.28 41.088 9.173333 8.874667 21.418667 13.312 36.608 13.312 19.2 0 35.541333-8.874667 48.981333-26.752 13.44-17.749333 22.016-54.613333 25.770667-110.549333-23.466667 27.264-52.821333 40.874667-88.064 40.874666-38.314667 0-71.253333-14.72-99.114667-44.330666C355.242667 506.709333 341.333333 468.224 341.333333 420.864c0-49.493333 14.592-89.258667 43.946667-119.466667C414.549333 271.104 451.925333 256 497.237333 256z m-4.352 77.482667c-17.237333 0-31.658667 6.826667-43.008 20.437333-11.477333 13.653333-17.194667 35.84-17.194667 66.816 0 31.402667 6.229333 54.485333 18.645334 69.205333 12.458667 14.72 27.946667 22.101333 46.592 22.101334 18.005333 0 33.066667-7.082667 45.44-21.205334 12.330667-14.208 18.432-35.029333 18.432-62.506666 0-29.994667-6.912-53.376-20.821334-69.973334-13.824-16.597333-29.866667-24.874667-48.085333-24.874666z" fill="#FFFFFF"></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 511.957333 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 511.957333 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M619.946667 273.066667c46.976 0 83.754667 16.042667 110.250666 48.042666 31.573333 37.973333 47.36 100.864 47.36 188.672 0 87.722667-15.829333 150.698667-47.658666 189.056-26.325333 31.616-62.976 47.36-109.952 47.36-47.274667 0-85.418667-17.237333-114.346667-51.968-28.885333-34.602667-43.392-96.426667-43.392-185.386666 0-87.168 15.872-150.016 47.701333-188.416 26.282667-31.488 62.933333-47.36 110.037334-47.36z m-207.488 12.8v452.266666H325.504V411.690667A299.904 299.904 0 0 1 213.333333 476.373333V398.933333c22.656-7.296 47.36-21.12 73.856-41.514666 26.624-20.522667 44.842667-44.288 54.784-71.552h70.485334z m207.488 60.842666c-11.306667 0-21.461333 3.413333-30.336 10.24-8.874667 6.826667-15.786667 19.157333-20.693334 36.864-6.4 22.997333-9.642667 61.653333-9.642666 115.968 0 54.442667 2.944 91.733333 8.661333 112.128 5.802667 20.352 13.098667 33.877333 21.845333 40.618667 8.789333 6.741333 18.858667 10.154667 30.165334 10.154667 11.349333 0 21.376-3.498667 30.250666-10.325334 8.874667-6.826667 15.786667-19.157333 20.693334-36.778666 6.4-22.826667 9.642667-61.354667 9.642666-115.797334 0-54.314667-2.858667-91.648-8.661333-112.042666-5.802667-20.352-13.013333-33.962667-21.76-40.789334a47.616 47.616 0 0 0-30.165333-10.24z" fill="#FFFFFF"></path></svg>'}]},{name:"进度图标",type:"progress",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512l294.144-294.144A414.72 414.72 0 0 1 928 512c0 229.76-186.24 416-416 416z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512h416c0 229.76-186.24 416-416 416z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512l294.144 294.144A414.72 414.72 0 0 1 512 928z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96v832z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512l-294.144 294.144A414.72 414.72 0 0 1 96 512c0-229.76 186.24-416 416-416V512z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512H96c0-229.76 186.24-416 416-416V512z" fill="#FFFFFF"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512L217.856 217.856A414.72 414.72 0 0 1 512 96V512z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 512c0 282.752 229.248 512 512 512s512-229.248 512-512S794.752 0 512 0 0 229.248 0 512z" fill="#12BB37"></path><path d="M716.629333 341.333333h-51.328a35.072 35.072 0 0 0-28.330666 14.293334l-171.989334 233.984-77.909333-106.026667a35.2 35.2 0 0 0-28.330667-14.293333H307.413333c-7.082667 0-11.264 7.936-7.082666 13.653333l136.32 185.472a35.2 35.2 0 0 0 56.533333 0l230.4-313.429333a8.533333 8.533333 0 0 0-6.954667-13.653334z" fill="#FFFFFF"></path></svg>'}]},{name:"表情图标",type:"expression",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><path fill="#ffcc4d" d="M36 18c0 9.941-8.059 18-18 18c-9.94 0-18-8.059-18-18C0 8.06 8.06 0 18 0c9.941 0 18 8.06 18 18"/><circle cx="29" cy="23" r="5" fill="#ff7892"/><circle cx="7" cy="23" r="5" fill="#ff7892"/><circle cx="24.5" cy="16.5" r="5.5" fill="#f5f8fa"/><circle cx="11.5" cy="16.5" r="5.5" fill="#f5f8fa"/><circle cx="11.5" cy="16.5" r="2.5" fill="#292f33"/><circle cx="24.5" cy="16.5" r="2.5" fill="#292f33"/><path fill="#664500" d="M22 30h-8a1 1 0 1 1 0-2h8a1 1 0 1 1 0 2m8.001-19a1 1 0 0 1-.801-.4c-2.64-3.521-6.061-3.598-6.206-3.6a1 1 0 0 1-.991-1.005A.997.997 0 0 1 23 5c.184 0 4.537.05 7.8 4.4a1 1 0 0 1-.799 1.6M5.999 11A1 1 0 0 1 5.2 9.4C8.462 5.05 12.816 5 13 5a1 1 0 0 1 .004 2c-.155.002-3.568.086-6.204 3.6a1 1 0 0 1-.801.4"/></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#ffcc4d"/><path fill="#664500" d="M22.886 27.485c-1.575 0-2.393-.797-3.049-1.437c-.56-.545-.965-.939-1.827-.939c-.863 0-1.268.395-1.827.939c-.656.64-1.474 1.437-3.048 1.437s-2.39-.797-3.046-1.437c-.557-.544-.96-.937-1.815-.939c-.611.002-.97.193-1.32.48a.875.875 0 0 1-1.109-1.353a3.66 3.66 0 0 1 2.405-.877h.049c1.552.012 2.361.801 3.012 1.437c.559.546.963.939 1.824.939c.863 0 1.268-.395 1.828-.939c.656-.64 1.474-1.437 3.048-1.437s2.392.796 3.048 1.437c.561.545.965.939 1.828.939s1.268-.395 1.828-.939c.656-.641 1.474-1.437 3.049-1.437c.913 0 1.67.263 2.383.828a.875.875 0 1 1-1.087 1.371c-.294-.233-.654-.449-1.295-.449c-.863 0-1.268.395-1.828.939c-.659.641-1.476 1.437-3.051 1.437m-11.491-8.61a3.766 3.766 0 0 1-3.762-3.762a3.767 3.767 0 0 1 3.762-3.763c1.279 0 2.319 1.04 2.319 2.319s-1.04 2.319-2.319 2.319a.875.875 0 0 1 0-1.75a.57.57 0 0 0 0-1.138a2.015 2.015 0 0 0-2.012 2.013c0 1.109.903 2.012 2.012 2.012c1.906 0 3.456-1.55 3.456-3.456s-1.55-3.456-3.456-3.456a4.905 4.905 0 0 0-4.899 4.9a.875.875 0 0 1-1.75 0a6.657 6.657 0 0 1 6.649-6.65c2.871 0 5.206 2.335 5.206 5.206s-2.334 5.206-5.206 5.206m13.209 0c-2.871 0-5.206-2.335-5.206-5.206s2.335-5.206 5.206-5.206c2.075 0 3.763 1.688 3.763 3.762s-1.688 3.763-3.763 3.763c-1.278 0-2.318-1.04-2.318-2.319s1.04-2.319 2.318-2.319a.875.875 0 0 1 0 1.75a.57.57 0 0 0 0 1.138a2.016 2.016 0 0 0 2.013-2.013a2.015 2.015 0 0 0-2.013-2.012a3.46 3.46 0 0 0-3.456 3.456a3.46 3.46 0 0 0 3.456 3.456a4.905 4.905 0 0 0 4.899-4.899a.875.875 0 0 1 1.75 0c.001 3.666-2.983 6.649-6.649 6.649"/></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><path fill="#ffcc4d" d="M36 18c0 9.941-8.059 18-18 18c-9.94 0-18-8.059-18-18C0 8.06 8.06 0 18 0c9.941 0 18 8.06 18 18"/><ellipse cx="18" cy="27" fill="#664500" rx="5" ry="6"/><path fill="#664500" d="M5.999 11A1 1 0 0 1 5.2 9.4C8.462 5.05 12.816 5 13 5a1 1 0 0 1 .004 2c-.155.002-3.568.086-6.204 3.6a1 1 0 0 1-.801.4m24.002 0a1 1 0 0 1-.801-.4c-2.64-3.521-6.061-3.598-6.206-3.6a1 1 0 0 1-.991-1.005A.997.997 0 0 1 23 5c.184 0 4.537.05 7.8 4.4a1 1 0 0 1-.799 1.6"/><path fill="#f5f8fa" d="M18 23c-1.657 0-3 1.79-3 4h6c0-2.21-1.343-4-3-4"/><ellipse cx="12" cy="14.5" fill="#664500" rx="2.5" ry="3.5"/><ellipse cx="24" cy="14.5" fill="#664500" rx="2.5" ry="3.5"/></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><path fill="#ffcc4d" d="M36 18c0 9.941-8.059 18-18 18S0 27.941 0 18S8.059 0 18 0s18 8.059 18 18"/><ellipse cx="11.5" cy="15.5" fill="#65471b" rx="2.5" ry="3.5"/><ellipse cx="24.5" cy="15.5" fill="#65471b" rx="2.5" ry="3.5"/><path fill="#65471b" d="m11.209 27.978l14-3a1.001 1.001 0 0 0-.419-1.957l-14 3a1.001 1.001 0 0 0 .419 1.957"/></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#ffcc4d"/><circle cx="24.5" cy="13.5" r="5.5" fill="#f4f7f9"/><circle cx="11.5" cy="13.5" r="5.5" fill="#f4f7f9"/><path fill="#65471b" d="M23.109 23.424c-2.763-.667-8.873-.06-11.162 4.405a.373.373 0 0 0 .334.546a.38.38 0 0 0 .241-.087c3.084-2.58 7.436-2.58 10.036-2.58c1.635 0 2.536 0 2.536-.708s-.705-1.268-1.985-1.576M10.5 13a2.5 2.5 0 0 0 2.5-2.5c0-1.252-.923-2.28-2.124-2.462a5.4 5.4 0 0 0-2.178.736A2.5 2.5 0 0 0 8 10.5a2.5 2.5 0 0 0 2.5 2.5m13 0a2.5 2.5 0 0 0 2.5-2.5c0-1.252-.923-2.28-2.124-2.462a5.4 5.4 0 0 0-2.177.736A2.48 2.48 0 0 0 21 10.5a2.5 2.5 0 0 0 2.5 2.5"/></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#ffcc4d"/><path fill="#664500" d="M25.485 27.379C25.44 27.2 24.317 23 18 23s-7.44 4.2-7.485 4.379a.5.5 0 0 0 .237.554a.505.505 0 0 0 .6-.077C11.371 27.837 13.306 26 18 26s6.63 1.837 6.648 1.855a.5.5 0 0 0 .598.081a.5.5 0 0 0 .239-.557"/><ellipse cx="12" cy="13.5" fill="#664500" rx="2.5" ry="3.5"/><ellipse cx="24" cy="13.5" fill="#664500" rx="2.5" ry="3.5"/></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><path fill="#ffcc4d" d="M36 18c0 9.941-8.059 18-18 18S0 27.941 0 18S8.059 0 18 0s18 8.059 18 18"/><ellipse cx="18" cy="25" fill="#664500" rx="4" ry="5"/><ellipse cx="12" cy="13.5" fill="#664500" rx="2.5" ry="3.5"/><ellipse cx="24" cy="13.5" fill="#664500" rx="2.5" ry="3.5"/></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><ellipse cx="33.5" cy="14.5" fill="#f4900c" rx="2.5" ry="3.5"/><ellipse cx="2.5" cy="14.5" fill="#f4900c" rx="2.5" ry="3.5"/><path fill="#ffac33" d="M34 19a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1zM7 19a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1z"/><path fill="#ffcc4d" d="M28 5c0 2.761-4.478 4-10 4S8 7.761 8 5s4.477-5 10-5s10 2.239 10 5"/><path fill="#f4900c" d="M25 4.083C25 5.694 21.865 7 18 7s-7-1.306-7-2.917s3.134-2.917 7-2.917s7 1.306 7 2.917"/><path fill="#269" d="M30 5.5C30 6.881 28.881 7 27.5 7h-19C7.119 7 6 6.881 6 5.5S7.119 3 8.5 3h19A2.5 2.5 0 0 1 30 5.5"/><path fill="#55acee" d="M30 6H6a2 2 0 0 0-2 2v26h28V8a2 2 0 0 0-2-2"/><path fill="#3b88c3" d="M35 33v-1a2 2 0 0 0-2-2H22.071l-3.364 3.364a1 1 0 0 1-1.414 0L13.929 30H3a2 2 0 0 0-2 2v1c0 1.104-.104 2 1 2h32c1.104 0 1-.896 1-2"/><circle cx="24.5" cy="14.5" r="4.5" fill="#fff"/><circle cx="24.5" cy="14.5" r="2.721" fill="#dd2e44"/><circle cx="11.5" cy="14.5" r="4.5" fill="#fff"/><path fill="#f5f8fa" d="M29 25.5a2.5 2.5 0 0 1-2.5 2.5h-17a2.5 2.5 0 1 1 0-5h17a2.5 2.5 0 0 1 2.5 2.5"/><path fill="#ccd6dd" d="M17 23h2v5h-2zm-5 0h2v5h-2zm10 0h2v5h-2zM7 25.5a2.5 2.5 0 0 0 2 2.45v-4.9a2.5 2.5 0 0 0-2 2.45m20-2.45v4.899a2.5 2.5 0 0 0 0-4.899"/><circle cx="11.5" cy="14.5" r="2.721" fill="#dd2e44"/></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="17" cy="19" r="17" fill="#ffcc4d"/><ellipse cx="17.999" cy="26" fill="#664500" rx="2" ry="2.5"/><path fill="#664500" d="M8.111 21.383a1 1 0 0 1-.845-1.533c.916-1.453 3.701-3.938 7.69-2.962a1 1 0 0 1-.476 1.942c-3.604-.882-5.502 2.056-5.521 2.086a1 1 0 0 1-.848.467m11.973-3.742a1 1 0 0 1-.634-1.774c3.176-2.604 6.762-1.562 8.215-.646a1 1 0 0 1-1.064 1.694c-.138-.084-3.052-1.823-5.884.499a1 1 0 0 1-.633.227"/><path fill="#e2a62d" d="M13.346 31.273a.75.75 0 0 1-.722-.954c.437-1.54.258-3.029-.49-4.086c-.497-.702-1.205-1.131-1.943-1.178c-.414-.025-.728-.382-.702-.795s.381-.751.795-.701c1.193.074 2.313.733 3.073 1.807c1.011 1.429 1.27 3.383.709 5.361a.75.75 0 0 1-.72.546m11.037-3.061a.74.74 0 0 1-.412-.124c-1.167-.77-1.82-2.117-1.792-3.695c.029-1.635.809-3.153 1.984-3.869a.75.75 0 0 1 1.03.251a.75.75 0 0 1-.251 1.03c-.735.448-1.244 1.499-1.264 2.614c-.02 1.055.389 1.936 1.118 2.417a.75.75 0 0 1-.413 1.376"/><path fill="#dd2e44" d="M17.179 2.72a.33.33 0 0 0-.189-.091S1.066-.394.377.214C-.311.823.74 16.998.74 16.998c.005.081.023.15.067.199c.604.684 4.758-2.004 9.279-6.001c4.522-3.998 7.697-7.792 7.093-8.476"/><path fill="#ea596e" d="M.349.271a.5.5 0 0 0-.038.123C.47 1.765 2.006 13.046 2.963 16.572c1.436-.803 2.895-1.894 4.609-3.253C6.116 10.654 1.158.146.349.271"/><path fill="#3b88c3" d="m29.902 29.229l-10.573-1.303c-1.13-.102-3.117-.112-3.015-1.902c.093-1.623 2.04-1.373 3.479-1.16l10.638 1.774z"/><path fill="#88c9f9" d="m30.43 26.639l-4.222-.724c-.494-.089-.934.647-.956 1.426c-.025.866.227 1.304.726 1.406l4.144.512z"/><path fill="#3b88c3" d="m34.918 26.341l-2.622 2.411l-4.687-5.097l2.622-2.411a3.37 3.37 0 0 1 4.751.199l.135.147a3.373 3.373 0 0 1-.199 4.751"/><ellipse cx="29.952" cy="26.203" fill="#88c9f9" rx="2.77" ry="3.462" transform="rotate(-42.597 29.954 26.205)"/><ellipse cx="29.952" cy="26.203" fill="#269" rx="1.385" ry="2.077" transform="rotate(-42.597 29.954 26.205)"/><circle cx="2.5" cy="33.5" r="1.5" fill="#55acee"/><circle cx="29" cy="2" r="2" fill="#55acee"/><path fill="#ea596e" d="M4.864 29.246L2.526 23.63L.412 29.675zM26 5l-4 1l1-4z"/><path fill="#77b255" d="M31.999 13L36 7.999L33 6z"/></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#ffcc4d"/><path fill="#664500" d="M18 21c-3.623 0-6.027-.422-9-1c-.679-.131-2 0-2 2c0 4 4.595 9 11 9c6.404 0 11-5 11-9c0-2-1.321-2.132-2-2c-2.973.578-5.377 1-9 1"/><path fill="#fff" d="M9 22s3 1 9 1s9-1 9-1s-2 4-9 4s-9-4-9-4"/><ellipse cx="12" cy="13.5" fill="#664500" rx="2.5" ry="3.5"/><ellipse cx="24" cy="13.5" fill="#664500" rx="2.5" ry="3.5"/></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#ffcc4d"/><path fill="#65471b" d="M20.996 27q-.155 0-.309-.049a8.65 8.65 0 0 0-5.375 0a1 1 0 1 1-.617-1.902a10.63 10.63 0 0 1 6.609 0c.525.171.813.735.643 1.26a1 1 0 0 1-.951.691"/><path fill="#fff" d="M30.335 12.068c-.903 2.745-3.485 4.715-6.494 4.715q-.216 0-.435-.014a6.8 6.8 0 0 1-3.95-1.584c.036.495.076.997.136 1.54c.152 1.388.884 2.482 2.116 3.163c.82.454 1.8.688 2.813.752c1.734.109 3.57-.28 4.873-.909c1.377-.665 2.272-1.862 2.456-3.285c.183-1.415-.354-2.924-1.515-4.378"/><path fill="#65471b" d="M21.351 7.583c-1.297.55-1.947 2.301-1.977 5.289l.039.068a5.34 5.34 0 0 0 4.429 2.343c2.634 0 4.849-1.937 5.253-4.524c-.115-.105-.221-.212-.343-.316c-3.715-3.17-6.467-3.257-7.401-2.86"/><path fill="#f4900c" d="M23.841 16.783c3.009 0 5.591-1.97 6.494-4.715c-.354-.443-.771-.88-1.241-1.309c-.404 2.587-2.619 4.524-5.253 4.524q-.17 0-.341-.011a5.34 5.34 0 0 1-4.088-2.332l-.039-.068q-.01 1.052.083 2.313a6.78 6.78 0 0 0 4.385 1.598"/><circle cx="21.413" cy="10.705" r="1.107" fill="#fff"/><path fill="#fff" d="M12.159 16.783c-3.009 0-5.591-1.97-6.494-4.715c-1.161 1.454-1.697 2.963-1.515 4.377c.185 1.423 1.079 2.621 2.456 3.285c1.303.629 3.138 1.018 4.873.909c1.013-.064 1.993-.297 2.813-.752c1.231-.681 1.963-1.775 2.116-3.163c.06-.542.1-1.042.136-1.536a6.8 6.8 0 0 1-4.385 1.595"/><path fill="#65471b" d="M12.159 15.283q.17 0 .341-.011a5.34 5.34 0 0 0 4.088-2.332l.039-.068c-.031-2.988-.68-4.739-1.977-5.289c-.934-.397-3.687-.31-7.401 2.859c-.122.104-.227.211-.343.316c.404 2.588 2.619 4.525 5.253 4.525"/><path fill="#f4900c" d="m16.626 12.872l-.039.068a5.34 5.34 0 0 1-4.429 2.343c-2.634 0-4.849-1.937-5.253-4.524c-.47.429-.887.866-1.241 1.309c.903 2.745 3.485 4.715 6.494 4.715q.216 0 .435-.014a6.8 6.8 0 0 0 3.95-1.58q.094-1.262.083-2.317"/><path fill="#fff" d="M9.781 11.81a1.106 1.106 0 1 0-.139-2.21a1.108 1.108 0 1 0 .139 2.21"/></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#ffcc4d"/><path fill="#664500" d="M14.034 14.499c0 1.934-1.119 3.5-2.5 3.5s-2.5-1.566-2.5-3.5s1.119-3.5 2.5-3.5s2.5 1.567 2.5 3.5m13 0c0 1.934-1.119 3.5-2.5 3.5s-2.5-1.566-2.5-3.5s1.119-3.5 2.5-3.5s2.5 1.567 2.5 3.5m-2.033 12.505H10c-1 0-1-1-1-1v-1s0-1.003 1-1.003l15.001.003z"/><path fill="#99aab5" d="m35.255 26.084l-7.713-2.121c-.72-.197-1.049.287-1.171.547l-1.64-.784L24 25.255v-2.254h-2v2h-2v-2h-2.001v2H16v-2h-2v2h-2v-2h-2v3h2v2h2v-2h1.999v2h2v-2H20v2h2v-2h1.643l-.58 1.212l1.648.788l-.099.207s-.248.737.373 1.275s5.285 4.735 5.285 4.735s.899.866 1.769.079c.738-.67 3.649-6.02 3.914-6.983s-.698-1.23-.698-1.23m-3.772 6.071l-2.644-2.248l1.614-3.069l3.338 1.132z"/></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#ffcc4d"/><path fill="#65471b" d="M6.001 11a1 1 0 0 1-.004-2c.156-.002 3.569-.086 6.205-3.6a1 1 0 0 1 1.6 1.2C10.539 10.95 6.185 11 6.001 11m24.986 2.393a1 1 0 0 1-1.945.468c-.038-.151-.911-3.452-4.941-5.201a1 1 0 0 1 .796-1.834c4.989 2.165 6.047 6.388 6.09 6.567"/><path fill="#664500" d="M23.186 29.526c-.993 0-1.952-.455-2.788-1.339c-2.816-2.985-3.569-2.333-4.817-1.251c-.781.679-1.754 1.523-3.205 1.523c-2.351 0-3.969-2.302-4.036-2.4a1 1 0 0 1 1.644-1.14c.301.429 1.317 1.54 2.393 1.54c.704 0 1.256-.479 1.895-1.033c1.816-1.578 3.764-2.655 7.583 1.388c.823.873 1.452.774 1.908.592c1.659-.665 3.205-3.698 3.197-5.15a1 1 0 0 1 .994-1.005h.006a1 1 0 0 1 1 .995c.012 2.103-1.854 5.976-4.454 7.017a3.6 3.6 0 0 1-1.32.263"/><path fill="#65471b" d="M14.815 15.375c-.584 2.114-1.642 3.083-3.152 2.666c-1.509-.417-2.343-1.909-1.76-4.023c.583-2.112 2.175-3.363 3.684-2.946c1.511.417 1.812 2.19 1.228 4.303m11.416-.755c.473 2.141-.675 4.838-2.204 5.176s-3.28-1.719-3.753-3.86s.419-3.971 1.948-4.309s3.536.853 4.009 2.993"/></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><path fill="#66757f" d="M36 18c0 9.94-8.06 18-18 18c-9.941 0-18-8.06-18-18C0 8.059 8.059 0 18 0c9.94 0 18 8.059 18 18"/><g fill="#5b6876"><circle cx="9.5" cy="7.5" r="3.5"/><circle cx="24.5" cy="28.5" r="3.5"/><circle cx="22" cy="5" r="2"/><circle cx="3" cy="18" r="1"/><circle cx="30" cy="9" r="1"/><circle cx="16" cy="31" r="1"/><circle cx="32" cy="19" r="2"/><circle cx="6" cy="26" r="2"/></g><path fill="#292f33" d="M18 24.904c-7 0-9-2.618-9-1.381C9 24.762 13 28 18 28s9-3.238 9-4.477c0-1.237-2 1.381-9 1.381M27 15a3 3 0 1 1-6 0a3 3 0 0 1 6 0m-12 0a3 3 0 1 1-6 0a3 3 0 0 1 6 0"/></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><path fill="#c6e5b3" d="M36 22c0 7.456-8.059 12-18 12S0 29.456 0 22S8.059 7 18 7s18 7.544 18 15"/><path fill="#77b255" d="M31.755 12.676A5.99 5.99 0 0 0 34 8a6 6 0 0 0-11.851-1.315A11.8 11.8 0 0 0 18 5.927c-1.465 0-2.861.275-4.149.758A6 6 0 0 0 2 8c0 1.891.877 3.576 2.245 4.676C1.6 15.356 0 18.685 0 22c0 7.456 8.059 1 18 1s18 6.456 18-1c0-3.315-1.6-6.644-4.245-9.324"/><circle cx="7.5" cy="7.5" r="3.5" fill="#fff"/><circle cx="7.5" cy="7.5" r="1.5" fill="#292f33"/><circle cx="28.5" cy="7.5" r="3.5" fill="#fff"/><circle cx="28.5" cy="7.5" r="1.5" fill="#292f33"/><circle cx="14" cy="20" r="1" fill="#5c913b"/><circle cx="22" cy="20" r="1" fill="#5c913b"/></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#aa8dd8"/><path fill="#aa8dd8" d="M10 4C7.42 4 4.369 1.534 3.414.586A2 2 0 0 0 1.235.153A2 2 0 0 0 0 2c0 3.459 1.672 10 8 10a2 2 0 0 0 1.789-1.106l2-4A2 2 0 0 0 10 4M34.766.153a2 2 0 0 0-2.18.434C31.7 1.472 28.589 4 26 4a2 2 0 0 0-1.789 2.895l2 4A2 2 0 0 0 28 12c6.328 0 8-6.541 8-10c0-.809-.487-1.538-1.234-1.847"/><path fill="#553986" d="M27.335 25.629a.5.5 0 0 0-.635-.029c-.039.029-3.922 2.9-8.7 2.9c-4.766 0-8.662-2.871-8.7-2.9a.5.5 0 0 0-.729.657C8.7 26.472 11.788 31.5 18 31.5s9.301-5.028 9.429-5.243a.5.5 0 0 0-.094-.628m-11.628-7.336C12.452 15.038 7.221 15 7 15a1 1 0 0 0-.001 2c.029 0 1.925.022 3.983.737c-.593.64-.982 1.634-.982 2.763c0 1.934 1.119 3.5 2.5 3.5s2.5-1.566 2.5-3.5c0-.174-.019-.34-.037-.507c.013 0 .025.007.037.007a.999.999 0 0 0 .707-1.707M29 15c-.221 0-5.451.038-8.707 3.293A.999.999 0 0 0 21 20c.013 0 .024-.007.036-.007c-.016.167-.036.333-.036.507c0 1.934 1.119 3.5 2.5 3.5s2.5-1.566 2.5-3.5c0-1.129-.389-2.123-.982-2.763A14 14 0 0 1 29.002 17A1 1 0 0 0 29 15"/></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><path fill="#ffcc4d" d="M36 18c0 9.941-8.059 18-18 18c-9.94 0-18-8.059-18-18C0 8.06 8.06 0 18 0c9.941 0 18 8.06 18 18"/><ellipse cx="11.5" cy="12.5" fill="#664500" rx="2.5" ry="5.5"/><ellipse cx="24.5" cy="12.5" fill="#664500" rx="2.5" ry="5.5"/><path fill="#664500" d="M18 22c-3.623 0-6.027-.422-9-1c-.679-.131-2 0-2 2c0 4 4.595 9 11 9c6.404 0 11-5 11-9c0-2-1.321-2.132-2-2c-2.973.578-5.377 1-9 1"/><path fill="#fff" d="M9 23s3 1 9 1s9-1 9-1s-2 4-9 4s-9-4-9-4"/></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="7" cy="6" r="6" fill="#c1694f"/><circle cx="29" cy="6" r="6" fill="#c1694f"/><circle cx="7" cy="6" r="4" fill="#e6aaaa"/><circle cx="29" cy="6" r="4" fill="#e6aaaa"/><path fill="#c1694f" d="M35 22S33.692 0 18 0S1 22 1 22c0 5.872 4.499 10.323 12.216 11.61a5.982 5.982 0 0 0 9.568 0C30.501 32.323 35 27.872 35 22"/><circle cx="18" cy="30" r="4" fill="#dd2e44"/><path fill="#d99e82" d="M18 20S7 23.687 7 27a6 6 0 0 0 11 3.315A6 6 0 0 0 29 27c0-3.313-11-7-11-7"/><path fill="#272b2b" d="M11 17s0-2 2-2s2 2 2 2v2s0 2-2 2s-2-2-2-2zm10 0s0-2 2-2s2 2 2 2v2s0 2-2 2s-2-2-2-2zm-7.875 8c-1.624 1 3.25 4 4.875 4s6.499-3 4.874-4s-8.124-1-9.749 0"/></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><path fill="#ffcc4d" d="M36 18c0 9.941-8.059 18-18 18S0 27.941 0 18S8.059 0 18 0s18 8.059 18 18"/><path fill="#65471b" d="M18 31c-5.629 0-6.896-3.527-6.947-3.678a1 1 0 0 1 1.889-.658C12.987 26.782 13.895 29 18 29c4.128 0 5.022-2.242 5.059-2.337c.193-.51.763-.78 1.276-.596s.788.739.612 1.255C24.896 27.473 23.629 31 18 31M28.994 8.011A1.005 1.005 0 0 0 28.011 7c-.067-.001-1.653-.056-3.304-1.707a.999.999 0 1 0-1.414 1.414C25.56 8.974 27.901 9 28 9a.995.995 0 0 0 .994-.989M12.707 6.707a.999.999 0 1 0-1.414-1.414C9.652 6.934 8.075 6.998 7.99 7A1 1 0 0 0 8 9c.099 0 2.44-.026 4.707-2.293"/><path fill="#fff" d="M29.895 15.058c-2.186-3.426-6.094-4.536-8.157-3.659c-1.14.483-1.711 2.022-1.737 4.647q-.009.924.072 2.032c.032.435.067.876.119 1.353c.134 1.219.777 2.181 1.859 2.779c.72.399 1.581.604 2.471.661c1.523.096 3.137-.246 4.281-.799c1.21-.584 1.996-1.636 2.158-2.886c.162-1.243-.187-2.749-1.066-4.128"/><path fill="#f4900c" d="M30.962 19.186c.161-1.243-.188-2.75-1.067-4.128a9 9 0 0 0-1.631-1.878a5.96 5.96 0 0 0-2.764-.68a6 6 0 0 0-5.498 3.606q-.007.9.071 1.973c.032.435.067.876.12 1.353c.134 1.219.777 2.181 1.859 2.779c.72.399 1.581.604 2.471.661c1.523.096 3.137-.246 4.281-.799c1.21-.585 1.996-1.636 2.158-2.887"/><circle cx="25.5" cy="18" r="4" fill="#65471b"/><ellipse cx="24.5" cy="15" fill="#fff" rx="1.674" ry="1.303" transform="rotate(-45.028 24.498 14.999)"/><path fill="#5dadec" d="M21.81 22.648c.747.414 1.649.657 2.682.722q.273.017.549.017c1.392 0 2.843-.315 3.981-.864c.973-.47 1.698-1.214 2.102-2.117a.585.585 0 0 0-.254-.753c-1.421-.771-2.921 1.362-4.872 1.362s-4.074-.936-5.256 0a.506.506 0 0 0-.065.728c.309.353.686.658 1.133.905"/><path fill="#fff" d="M6.105 15.058c2.186-3.426 6.094-4.536 8.157-3.659c1.14.483 1.711 2.022 1.737 4.647q.009.924-.072 2.032c-.032.435-.067.876-.119 1.353c-.134 1.219-.777 2.181-1.859 2.779c-.72.399-1.581.604-2.471.661c-1.523.096-3.137-.246-4.281-.799c-1.21-.584-1.996-1.636-2.158-2.886c-.162-1.243.187-2.749 1.066-4.128"/><path fill="#f4900c" d="M15.808 19.432c-.134 1.219-.777 2.181-1.859 2.779c-.72.399-1.581.604-2.471.661c-1.523.096-3.137-.246-4.281-.799c-1.21-.584-1.996-1.636-2.158-2.886c-.161-1.243.188-2.75 1.067-4.128a9 9 0 0 1 1.631-1.878a5.96 5.96 0 0 1 2.764-.68a6 6 0 0 1 5.498 3.606q.007.9-.071 1.973a41 41 0 0 1-.12 1.352"/><circle cx="10.5" cy="18" r="4" fill="#65471b"/><path fill="#fff" d="M10.954 15c-.203.828-1.019 1.5-1.822 1.5s-1.289-.672-1.086-1.5s1.019-1.5 1.822-1.5s1.289.672 1.086 1.5"/><path fill="#5dadec" d="M14.19 22.648c-.747.414-1.649.657-2.682.722a9 9 0 0 1-.549.017c-1.392 0-2.843-.315-3.981-.864c-.973-.47-1.698-1.214-2.102-2.117a.585.585 0 0 1 .254-.753c1.421-.771 2.921 1.362 4.872 1.362s4.074-.936 5.256 0a.506.506 0 0 1 .065.728a4.2 4.2 0 0 1-1.133.905"/></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 36 36"><circle cx="18" cy="18" r="18" fill="#ffcc4d"/><path fill="#664500" d="M6.999 17a1 1 0 0 1-.893-1.447C6.158 15.448 7.424 13 11 13s4.842 2.449 4.894 2.553a1.001 1.001 0 0 1-1.783.906C14.067 16.378 13.28 15 11 15c-2.317 0-3.099 1.433-3.106 1.447a1 1 0 0 1-.895.553M29 17a1 1 0 0 0 .893-1.447C29.841 15.448 28.575 13 24.999 13s-4.842 2.449-4.894 2.553a1.001 1.001 0 0 0 1.783.906c.044-.081.831-1.459 3.111-1.459c2.317 0 3.099 1.433 3.106 1.447A1 1 0 0 0 29 17m.503 6.52c.323-.749.461-1.257.466-1.277a1 1 0 0 0-1.94-.487C27.955 22.051 26.081 29 18 29s-9.955-6.949-10.03-7.245a1 1 0 0 0-1.94.487C6.052 22.33 8.331 31 18 31c1.65 0 3.07-.266 4.315-.685c4.33-1.458 6.374-4.91 7.188-6.795"/><path fill="#e75b70" d="m32.407 26.681l-2.956-3.051s-.68-.438-1.273.568c-.78 1.322-2.075 2.935-3.934 4.171c-.781.519-2.139 1.189-2.697 1.318c-.735.169-.388.964-.388.964c.585-.127 1.051-.301 1.051-.301l.296.296l2.726 2.726c1.728 1.728 5 2 7 0s1.904-4.962.175-6.691"/><path fill="#de3146" d="M29.915 31.074a.545.545 0 0 0 0-.771l-3.629-3.629l-.796.748l3.653 3.653a.547.547 0 0 0 .772-.001"/></svg>'}]},{name:"标记图标",type:"sign",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M809.728 429.696a18.901333 18.901333 0 0 0-15.274667-12.885333l-183.466666-26.624-81.92-166.272a18.901333 18.901333 0 0 0-34.005334 0l-81.92 166.272-183.594666 26.624a19.029333 19.029333 0 0 0-10.496 32.298666l132.693333 129.536-31.274667 182.741334a18.816 18.816 0 0 0 27.477334 19.84l164.138666-86.186667 164.096 86.058667a18.773333 18.773333 0 1 0 27.434667-19.84l-31.36-182.741334 132.693333-129.408a18.901333 18.901333 0 0 0 4.778667-19.413333z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M644.565333 306.901333c32.128 0 65.834667-5.76 101.077334-17.237333a17.066667 17.066667 0 0 1 22.357333 16.213333v328.32c-1.109333 0.768 10.325333 27.093333-99.370667 19.84-109.653333-7.210667-181.76-45.098667-246.869333-45.098666-65.152 0-49.322667 2.688-74.154667 8.405333v168.064a24.746667 24.746667 0 0 1-24.490666 25.258667 22.528 22.528 0 0 1-17.28-7.253334 24.149333 24.149333 0 0 1-7.168-18.005333V281.258667C299.776 280.490667 328.106667 256 421.76 256s164.437333 50.901333 222.805333 50.901333z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M524.074667 225.408l274.517333 274.517333a17.066667 17.066667 0 0 1 0 24.149334l-274.517333 274.517333a17.066667 17.066667 0 0 1-24.149334 0l-274.517333-274.517333a17.066667 17.066667 0 0 1 0-24.149334l274.517333-274.517333a17.066667 17.066667 0 0 1 24.149334 0z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M317.866667 300.8h388.266666c9.386667 0 17.066667 7.68 17.066667 17.066667v388.266666a17.066667 17.066667 0 0 1-17.066667 17.066667h-388.266666a17.066667 17.066667 0 0 1-17.066667-17.066667v-388.266666c0-9.386667 7.68-17.066667 17.066667-17.066667z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M498.346667 279.082667L248.789333 701.44a15.829333 15.829333 0 0 0 13.653334 23.893333h499.114666a15.829333 15.829333 0 0 0 13.653334-23.893333l-249.6-422.357333a15.829333 15.829333 0 0 0-27.264 0z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M497.749333 798.549333l-31.445333-28.501333C313.941333 631.722667 213.333333 540.501333 213.333333 428.8a160.981333 160.981333 0 0 1 162.730667-162.730667c51.498667 0 100.906667 23.978667 133.12 61.696a177.536 177.536 0 0 1 133.162667-61.696 160.981333 160.981333 0 0 1 162.730666 162.730667c0 111.701333-100.608 202.965333-252.970666 341.333333l-31.445334 28.458667a17.066667 17.066667 0 0 1-22.912 0z" fill="#FFFFFF"></path><path d="M634.538667 487.808L555.050667 426.24 507.306667 256a201.002667 201.002667 0 0 0-23.594667 20.394667l-0.256-0.256L525.653333 426.666667l-133.290666 59.946666a14.08 14.08 0 0 0-8.021334 15.957334l28.757334 126.378666a14.208 14.208 0 0 0 27.733333-6.229333l-26.24-115.114667 126.037333-56.704 76.416 59.136a14.250667 14.250667 0 0 0 19.968-2.474666 14.08 14.08 0 0 0-2.474666-19.797334z" fill="#6D768D"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M497.749333 798.549333l-31.445333-28.501333C313.941333 631.722667 213.333333 540.501333 213.333333 428.8a160.981333 160.981333 0 0 1 162.730667-162.730667c51.498667 0 100.906667 23.978667 133.12 61.696a177.536 177.536 0 0 1 133.162667-61.696 160.981333 160.981333 0 0 1 162.730666 162.730667c0 111.701333-100.608 202.965333-252.970666 341.333333l-31.445334 28.458667a17.066667 17.066667 0 0 1-22.912 0z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M374.656 273.194667c5.973333 4.48 12.117333 9.6 18.346667 15.36 6.272 5.717333 11.904 12.373333 16.896 19.84 2.517333 4.010667 5.504 8.490667 9.002666 13.482666a529.493333 529.493333 0 0 1 20.266667 32.213334h155.221333a169.813333 169.813333 0 0 0 9.770667-15.744c2.474667-4.48 5.248-8.96 8.234667-13.482667a460.842667 460.842667 0 0 1 23.253333-31.829333c4.992-6.229333 12.245333-12.373333 21.76-18.346667a34.261333 34.261333 0 0 0 10.112-9.728 31.274667 31.274667 0 0 0 5.248-11.989333 18.56 18.56 0 0 0-1.536-11.605334 17.664 17.664 0 0 0-10.112-8.618666c-4.48-1.493333-8.362667-2.005333-11.605333-1.493334a46.933333 46.933333 0 0 0-9.770667 2.602667c-3.242667 1.28-6.613333 2.645333-10.112 4.138667a32.426667 32.426667 0 0 1-12.757333 2.261333 26.026667 26.026667 0 0 1-12.373334-2.645333 45.653333 45.653333 0 0 1-8.96-6.357334l-8.661333-7.850666a30.336 30.336 0 0 0-11.989333-6.4c-9.984-3.968-18.005333-4.693333-24.021334-2.218667-5.973333 2.474667-11.946667 6.485333-17.962666 11.946667a88.618667 88.618667 0 0 1-11.989334 10.496 7.338667 7.338667 0 0 1-3.754666 1.493333 46.165333 46.165333 0 0 1-8.277334-5.205333 71.808 71.808 0 0 1-7.125333-4.906667 37.973333 37.973333 0 0 1-6.4-6.357333c-3.968-3.968-9.941333-6.613333-17.92-7.850667a31.061333 31.061333 0 0 0-21.76 4.138667c-8.533333 5.461333-14.506667 10.069333-18.048 13.824a29.354667 29.354667 0 0 1-15.744 7.893333 23.978667 23.978667 0 0 1-13.098667-0.768 987.733333 987.733333 0 0 0-14.634666-4.48 80.725333 80.725333 0 0 0-14.250667-2.986667 16.768 16.768 0 0 0-11.989333 2.986667c-6.997333 5.461333-9.258667 12.074667-6.741334 19.84a34.56 34.56 0 0 0 13.482667 18.346667z" fill="#FFFFFF"></path><path d="M780.757333 545.152a219.306667 219.306667 0 0 0-19.882666-65.536 224.981333 224.981333 0 0 0-33.365334-49.792 430.336 430.336 0 0 0-37.12-37.12c-14.506667-11.946667-27.264-23.296-38.272-34.048a544.512 544.512 0 0 1-27.733333-28.842667 305.28 305.28 0 0 1-22.485333-26.197333h-168.746667c-6.485333 8.490667-13.994667 17.493333-22.485333 26.965333a360.96 360.96 0 0 1-26.24 28.074667c-10.538667 10.24-22.272 21.12-35.285334 32.597333a305.493333 305.493333 0 0 0-41.6 44.16 250.026667 250.026667 0 0 0-49.493333 117.589334 216.106667 216.106667 0 0 0 1.877333 70.4 220.586667 220.586667 0 0 0 75.349334 126.549333c21.248 18.005333 47.146667 32.597333 77.653333 43.818667 30.464 11.264 65.493333 16.853333 104.96 16.853333 38.528 0 72.874667-4.864 103.125333-14.592a265.045333 265.045333 0 0 0 78.378667-39.338667c21.973333-16.469333 39.594667-35.797333 52.864-58.026666 13.226667-22.186667 22.101333-45.824 26.624-70.784 4.992-30.421333 5.632-58.026667 1.877333-82.773334z" fill="#FFFFFF"></path><path d="M593.322667 647.509333a20.48 20.48 0 0 1-11.861334 3.2h-50.133333v14.165334c0 4.266667-1.792 8.362667-5.376 12.373333a15.914667 15.914667 0 0 1-13.952 5.333333 24.917333 24.917333 0 0 1-14.336-3.882666c-3.84-2.602667-5.973333-7.210667-6.4-13.824v-14.165334h-48.725333a17.792 17.792 0 0 1-11.818667-3.882666 10.24 10.24 0 0 1-3.968-9.6c0-4.266667 1.578667-7.68 4.693333-10.24a16.768 16.768 0 0 1 11.093334-3.925334h48.682666v-24.789333h-48.682666a15.573333 15.573333 0 0 1-11.52-4.266667 13.525333 13.525333 0 0 1-4.266667-9.941333 15.36 15.36 0 0 1 4.693333-10.624 14.72 14.72 0 0 1 11.093334-4.949333h48.682666l0.725334-14.890667a1053.568 1053.568 0 0 1-40.832-42.538667l-10.752-9.898666a41.216 41.216 0 0 1-6.442667-11.690667c-1.92-4.992-0.938667-10.069333 2.858667-15.274667a13.653333 13.653333 0 0 1 15.786666-3.84c6.186667 2.090667 11.221333 4.821333 15.018667 8.106667 1.92 2.389333 5.248 5.888 10.026667 10.666667l15.061333 14.848 19.328 19.157333 22.186667-20.565333a987.605333 987.605333 0 0 1 29.397333-25.514667 21.162667 21.162667 0 0 1 14.293333-5.674667c5.290667 0 9.557333 2.133333 12.928 6.4 6.186667 7.082667 3.84 15.36-7.168 24.789334a179.072 179.072 0 0 0-12.885333 12.373333c-5.76 5.973333-11.52 11.733333-17.194667 17.408-6.698667 7.082667-14.08 14.378667-22.186666 21.973333v13.44h46.506666c6.698667 0 11.605333 1.536 14.72 4.608a14.165333 14.165333 0 0 1 4.650667 10.282667c0 4.266667-1.450667 7.936-4.309333 11.008-2.858667 3.029333-7.637333 4.352-14.336 3.84l-46.506667 0.768-0.768 24.064h45.866667c13.354667 0 20.053333 4.992 20.053333 14.933333 0.469333 4.693333-0.853333 8.106667-3.925333 10.24z" fill="#6D768D"></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M512 213.333333l234.666667 341.333334h-128v213.333333h-213.333334v-213.333333h-128L512 213.333333z" fill="#FFFFFF"></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M533.333333 810.666667L298.666667 469.333333h128V256h213.333333v213.333333h128l-234.666667 341.333334z" fill="#FFFFFF"></path></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M213.333333 533.333333L554.666667 298.666667v128h213.333333v213.333333h-213.333333v128l-341.333334-234.666667z" fill="#FFFFFF"></path></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M810.666667 533.333333L469.333333 768v-128H256v-213.333333h213.333333V298.666667l341.333334 234.666666z" fill="#FFFFFF"></path></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 512c0 282.752 229.248 512 512 512s512-229.248 512-512S794.752 0 512 0 0 229.248 0 512z" fill="#6D768D"></path><path d="M571.349333 508.586667l162.389334-162.346667a44.330667 44.330667 0 1 0-62.72-62.72l-162.389334 162.389333-162.517333-162.389333a44.330667 44.330667 0 1 0-62.72 62.72l162.389333 162.389333-162.389333 162.474667a44.330667 44.330667 0 1 0 62.72 62.72l162.389333-162.346667 162.389334 162.389334a44.330667 44.330667 0 1 0 62.72-62.72l-162.261334-162.56z" fill="#FFFFFF"></path></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C233.386667 0 0 225.877333 0 512s225.877333 512 512 512 512-225.877333 512-512S790.613333 0 512 0z" fill="#6D768D"></path><path d="M726.144 311.210667l-277.333333 305.066666-124.8-124.8c-13.866667-13.866667-41.6-13.866667-55.466667 0-13.866667 13.866667-13.866667 41.6 0 55.466667l159.445333 152.533333c13.866667 13.866667 41.6 13.866667 55.466667 0l305.066667-332.8c13.866667-13.866667 13.866667-41.6 0-55.466666-20.778667-13.866667-48.512-13.866667-62.378667 0z" fill="#FFFFFF"></path></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M541.952 755.626667a40.618667 40.618667 0 0 1-29.824 12.373333 41.344 41.344 0 0 1-30.122667-12.373333 40.106667 40.106667 0 0 1-12.672-30.122667c0-11.605333 4.096-21.845333 12.672-30.122667a40.405333 40.405333 0 0 1 30.122667-12.714666c11.605333 0 21.546667 4.138667 29.824 12.714666a40.32 40.32 0 0 1 12.714667 30.122667c0 11.861333-4.096 21.76-12.714667 30.122667zM450.986667 241.28A77.866667 77.866667 0 0 1 512.256 213.333333c24.874667 0 45.354667 8.917333 61.354667 27.946667 15.488 18.432 23.722667 41.685333 23.722666 69.674667 0 23.765333-33.152 200.533333-44.672 329.045333h-80.128C463.146667 511.402667 426.666667 334.677333 426.666667 310.954667c0-27.392 8.277333-50.645333 24.32-69.674667z" fill="#FFFFFF"></path></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.794667 0 512 0z" fill="#6D768D"></path><path d="M490.666667 682.666667a64 64 0 1 1 0 128 64 64 0 0 1 0-128z m13.994666-490.752c61.397333 0 112.341333 14.634667 153.002667 43.946666 40.533333 29.269333 60.885333 72.618667 60.885333 130.133334 0 35.242667-12.373333 64.938667-29.952 89.045333-10.282667 14.677333-33.664 33.408-62.890666 56.192l-32.426667 22.357333c-15.701333 12.202667-29.696 26.453333-34.858667 42.666667-1.706667 5.546667-3.072 14.677333-3.968 24.533333-0.426667 4.949333-4.864 15.018667-15.232 15.018667h-83.328c-13.568 0-15.957333-10.581333-15.744-15.786667 1.493333-34.005333 4.608-64.213333 18.474667-80.469333 28.074667-32.896 91.904-73.813333 91.904-73.813333a104.106667 104.106667 0 0 0 23.552-24.021334c10.837333-14.933333 19.797333-31.317333 19.797333-49.237333 0-20.565333-6.016-39.338667-18.090666-56.32-12.032-16.938667-34.090667-25.386667-66.005334-25.386667-31.445333 0-53.76 10.410667-66.901333 31.274667-9.685333 15.445333-15.786667 29.610667-18.346667 45.013333-0.853333 5.461333-4.394667 16.981333-16.042666 16.981334H327.210667c-17.322667 0-21.12-11.221333-20.650667-16.64 6.272-68.138667 32.896-114.688 80-144.597334 32-20.565333 71.381333-30.890667 118.101333-30.890666z" fill="#FFFFFF"></path></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M336.256 410.026667H253.312a40.021333 40.021333 0 0 0-39.850667 43.264l23.296 278.101333c1.706667 20.693333 19.072 36.608 39.850667 36.608h59.648c11.050667 0 20.010667-8.96 20.010667-19.968v-318.037333a19.968 19.968 0 0 0-20.010667-19.968z m434.432 0h-178.944C653.312 182.314667 548.949333 170.666667 548.949333 170.666667c-44.288 0-35.114667 34.986667-38.442666 40.832 0 84.48-68.010667 155.093333-101.034667 184.362666a39.552 39.552 0 0 0-13.226667 29.653334v322.56c0 11.008 8.96 19.925333 20.010667 19.925333h233.728c30.378667 0 58.154667-17.152 71.68-44.373333 18.176-36.736 40.448-90.112 54.656-133.973334 13.781333-42.410667 26.24-94.976 33.578667-131.968a39.850667 39.850667 0 0 0-39.253334-47.658666z" fill="#FFFFFF"></path></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M796.16 413.909333c-31.146667-0.298667-115.626667-0.085333-146.858667-0.085333h-158.464c8.533333-7.68 15.914667-14.506667 23.594667-20.906667 29.781333-24.874667 25.813333-71.082667-14.208-88.874666-22.954667-10.24-44.970667-5.632-64 11.52-34.944 31.274667-69.632 62.677333-104.277333 93.994666a15.488 15.488 0 0 1-11.178667 4.437334c-11.221333-0.085333-26.88-0.128-46.933333-0.170667a17.066667 17.066667 0 0 0-17.109334 17.066667L256 719.701333a17.066667 17.066667 0 0 0 17.066667 17.152l49.578666-0.085333c3.968 0 7.466667 0.768 10.88 2.602667 15.829333 8.832 31.701333 17.493333 47.616 26.24a18.133333 18.133333 0 0 0 9.301334 2.346666h168.405333c6.186667 0 11.946667-0.981333 17.834667-2.56 29.44-7.253333 40.021333-30.293333 38.528-52.565333-0.768-9.728-4.266667-18.346667-9.984-26.24 19.626667-5.76 35.114667-16.213333 42.112-36.096 7.125333-20.394667 1.621333-38.4-12.672-53.333333 28.16-19.754667 34.858667-44.672 18.645333-75.648h140.458667c6.570667 0 13.013333-0.597333 19.370666-2.645334 31.957333-9.813333 48.810667-42.88 35.626667-71.552-10.154667-22.186667-28.629333-33.152-52.608-33.450666z" fill="#FFFFFF"></path></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M270.506667 413.909333c31.146667-0.298667 115.626667-0.085333 146.858666-0.085333h158.464c-8.533333-7.68-15.914667-14.506667-23.594666-20.906667-29.781333-24.874667-25.813333-71.082667 14.208-88.874666 22.954667-10.24 44.970667-5.632 64 11.52 34.944 31.274667 69.632 62.677333 104.277333 93.994666 3.413333 2.986667 6.528 4.437333 11.178667 4.437334 11.221333-0.085333 26.88-0.128 46.933333-0.170667a17.066667 17.066667 0 0 1 17.109333 17.066667l0.682667 288.853333a17.066667 17.066667 0 0 1-17.066667 17.152l-49.578666-0.085333a22.101333 22.101333 0 0 0-10.88 2.602666c-15.829333 8.832-31.701333 17.493333-47.616 26.24a18.133333 18.133333 0 0 1-9.301334 2.346667h-168.405333a68.693333 68.693333 0 0 1-17.834667-2.56c-29.44-7.253333-40.021333-30.293333-38.528-52.565333 0.768-9.728 4.266667-18.346667 9.984-26.24-19.626667-5.76-35.114667-16.213333-42.112-36.096-7.125333-20.394667-1.621333-38.4 12.672-53.333334-28.16-19.754667-34.858667-44.672-18.645333-75.648H272.853333c-6.570667 0-13.013333-0.597333-19.370666-2.645333-31.957333-9.813333-48.810667-42.88-35.626667-71.552 10.154667-22.186667 28.629333-33.152 52.608-33.450667z" fill="#FFFFFF"></path></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M667.733333 480.128H400v-111.36a97.706667 97.706667 0 0 1 97.621333-97.621333 97.706667 97.706667 0 0 1 97.578667 97.621333 28.885333 28.885333 0 0 0 57.813333 0A155.605333 155.605333 0 0 0 497.621333 213.333333a155.605333 155.605333 0 0 0-155.392 155.434667v111.36h-14.677333A28.885333 28.885333 0 0 0 298.666667 509.013333v292.010667a28.885333 28.885333 0 0 0 28.885333 28.885333h340.138667a28.885333 28.885333 0 0 0 28.928-28.885333V509.013333a28.885333 28.885333 0 0 0-28.928-28.885333z" fill="#FFFFFF"></path></svg>'},{name:"21",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M400.042667 437.461333v-111.36a97.706667 97.706667 0 0 1 97.621333-97.621333 97.706667 97.706667 0 0 1 97.578667 97.621333 28.885333 28.885333 0 0 0 57.813333 0A155.605333 155.605333 0 0 0 497.621333 170.666667a155.605333 155.605333 0 0 0-155.392 155.434666v111.36h-14.677333A28.885333 28.885333 0 0 0 298.666667 466.346667v292.010666a28.885333 28.885333 0 0 0 28.885333 28.885334h340.138667a28.885333 28.885333 0 0 0 28.928-28.885334V466.346667a28.885333 28.885333 0 0 0-28.928-28.885334H400.042667z" fill="#FFFFFF"></path><path d="M595.242667 437.461333v-111.36a97.706667 97.706667 0 0 0-97.621334-97.621333 97.706667 97.706667 0 0 0-97.578666 97.621333 28.885333 28.885333 0 0 1-57.813334 0A155.605333 155.605333 0 0 1 497.621333 170.666667a155.605333 155.605333 0 0 1 155.434667 155.434666v111.36h14.634667c16 0 28.928 12.928 28.928 28.885334v292.010666a28.885333 28.885333 0 0 1-28.928 28.885334H327.552A28.885333 28.885333 0 0 1 298.666667 758.357333V466.346667c0-15.957333 12.928-28.885333 28.885333-28.885334h267.690667z" fill="#FFFFFF"></path></svg>'},{name:"22",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M511.999787 512.000213m-511.999787 0a511.999787 511.999787 0 1 0 1023.999573 0 511.999787 511.999787 0 1 0-1023.999573 0Z" fill="#6D768D"></path><path d="M381.354508 364.586941c0 54.015977 29.013321 103.935957 75.946635 130.986613a152.53327 152.53327 0 0 0 151.935936 0 151.12527 151.12527 0 0 0 75.946636-130.986613A151.594604 151.594604 0 0 0 533.333111 213.333671a151.594604 151.594604 0 0 0-151.89327 151.25327zM660.479725 498.901552a185.258589 185.258589 0 0 1-127.146614 50.346646c-49.066646 0-93.866628-19.199992-127.06128-50.346646C317.141201 544.853533 255.999893 637.440161 255.999893 744.106783c0 13.183995 10.709329 23.850657 23.978657 23.850657h506.709122a23.893323 23.893323 0 0 0 23.978657-23.893323c0-106.538622-61.098641-199.25325-150.186604-245.205232z" fill="#FFFFFF"></path></svg>'},{name:"23",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M445.610667 401.578667a129.322667 129.322667 0 1 0 258.645333 0 129.322667 129.322667 0 0 0-258.645333 0z m237.568 114.901333a157.354667 157.354667 0 0 1-216.362667 0 236.373333 236.373333 0 0 0-127.957333 209.706667c0 11.264 9.130667 20.394667 20.394666 20.394666h431.402667a20.394667 20.394667 0 0 0 20.394667-20.394666 236.373333 236.373333 0 0 0-127.872-209.706667zM409.813333 401.578667c0-40.362667 14.592-77.397333 38.698667-106.112a112.725333 112.725333 0 0 0-29.013333-3.925334 112.64 112.64 0 0 0-112.426667 112.469334 112.64 112.64 0 0 0 144.853333 107.648 164.693333 164.693333 0 0 1-42.112-110.08z m-18.602666 136.704a136.533333 136.533333 0 0 1-65.706667-34.474667 205.44 205.44 0 0 0-111.232 182.4c0 9.813333 7.936 17.706667 17.706667 17.706667H303.36a273.621333 273.621333 0 0 1 87.893333-165.632z" fill="#FFFFFF"></path></svg>'}]}],c=(t,e=[])=>{let i=t.split("_");const o=Object(n["jb"])([...l,...e]);let r=o.find(t=>t.type===i[0]);if(r){let t=r.list.find(t=>t.name===i[1]);return t?t.icon:""}return""};e["a"]={siyuanPDFLink:o,hyperlink:r,note:s,attachment:a,siyuan:h,siyuanLink:d,nodeIconList:l,getNodeIconListIcon:c}},"72c3":function(t,e,i){"use strict";var n=i("23e7"),o=i("e9bc"),r=i("dad2");n({target:"Set",proto:!0,real:!0,forced:!r("union")},{union:o})},"79a4":function(t,e,i){"use strict";var n=i("23e7"),o=i("d039"),r=i("953b"),s=i("dad2"),a=!s("intersection")||o((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}));n({target:"Set",proto:!0,real:!0,forced:a},{intersection:r})},"7c25":function(t,e,i){"use strict";i("d9e2"),i("14d9");var n=i("108f"),o=i("4013");class r{constructor(t){this.max=t||1e3,this.size=0,this.pool=new Map}add(t,e){const i=this.has(t);return!(!i&&this.size>=this.max)&&(this.delete(t),this.pool.set(t,e),this.size++,!0)}delete(t){this.pool.has(t)&&(this.pool.delete(t),this.size--)}has(t){return this.pool.has(t)}get(t){if(this.pool.has(t))return this.pool.get(t)}clear(){this.size=0,this.pool=new Map}}var s=i("1e42");class a{constructor(t){this.renderer=t,this.mindMap=t.mindMap,this.draw=this.mindMap.draw,this.lineDraw=this.mindMap.lineDraw,this.root=null,this.lru=new r(this.mindMap.opt.maxNodeCacheCount),this.rootNodeCenterOffset=null,this.rootNodeCenterOffsetKey=""}doLayout(t,e,i){throw new Error("【computed】方法为必要方法需要子类进行重写")}renderLine(){throw new Error("【renderLine】方法为必要方法需要子类进行重写")}renderExpandBtn(){throw new Error("【renderExpandBtn】方法为必要方法需要子类进行重写")}renderGeneralization(){}cacheNode(t,e){this.renderer.nodeCache[t]=e,this.lru.add(t,e)}checkIsNeedResizeSources(){return[o["a"].CHANGE_THEME].includes(this.renderer.renderSource)}checkIsLayerTypeChange(t,e){return!(t>=2&&e>=2)&&(t>=2&&e<2||(t<2&&e>=2||void 0))}checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(t){this.renderer.renderSource===o["a"].CHANGE_LAYOUT&&(t.needRerenderExpandBtnPlaceholderRect=!0)}checkIsNodeDataChange(t,e){return t&&(t="string"===typeof t?JSON.parse(t):t,t.isActive=e.isActive,t.expand=e.expand,t=JSON.stringify(t)),t!==JSON.stringify(e)}createNode(t,e,i,o,r,a){t||(t={data:{}}),t.data||(t.data={});const h={};this.mindMap.nodeInnerPrefixList.forEach(i=>{if(i.createNodeData){const[n,s]=i.createNodeData({data:t,parent:e,ancestors:a,layerIndex:o,index:r});h[n]=s}});const d=t.data.uid;let l=null;if(t&&t._node&&!this.renderer.reRender){l=t._node;const n=this.checkIsLayerTypeChange(l.layerIndex,o);l.reset(),l.layerIndex=o,i?l.isRoot=!0:l.parent=e._node,this.cacheNode(t._node.uid,l),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(l);let r=!1;this.mindMap.nodeInnerPrefixList.forEach(t=>{if(t.updateNodeData){const e=t.updateNodeData(l,h);e&&(r=e)}});const s=this.checkIsNeedResizeSources(),a=this.checkIsNodeDataChange(t._node.nodeDataSnapshot,t.data);(s||a||n||l.getData("resetRichText")||l.getData("needUpdate")||r)&&(l.getSize(),l.needLayout=!0),this.checkGetGeneralizationChange(l,s)}else if(!this.lru.has(d)&&!this.renderer.lastNodeCache[d]||this.renderer.reRender){const r=d||Object(s["u"])();l=new n["a"]({data:t,uid:r,renderer:this.renderer,mindMap:this.mindMap,draw:this.draw,layerIndex:o,isRoot:i,parent:i?null:e._node,...h}),t.data.uid=r,this.cacheNode(r,l),t._node=l}else{l=this.lru.get(d)||this.renderer.lastNodeCache[d];const n=JSON.stringify(l.getData()),r=this.checkIsLayerTypeChange(l.layerIndex,o);l.reset(),l.nodeData=l.handleData(t||{}),l.layerIndex=o,i?l.isRoot=!0:l.parent=e._node,this.cacheNode(d,l),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(l),t._node=l;const s=this.checkIsNeedResizeSources(),a=this.checkIsNodeDataChange(n,t.data);let c=!1;this.mindMap.nodeInnerPrefixList.forEach(t=>{if(t.updateNodeData){const e=t.updateNodeData(l,h);e&&(c=e)}}),(s||a||r||l.getData("resetRichText")||l.getData("needUpdate")||c)&&(l.getSize(),l.needLayout=!0),this.checkGetGeneralizationChange(l,s)}return t.data.isActive&&this.renderer.addNodeToActiveList(l),-1!==this.mindMap.renderer.findActiveNodeIndex(l)&&l.setData({isActive:!0}),i?this.root=l:e._node.addChildren(l),l}checkGetGeneralizationChange(t,e){const i=t.getData("generalization");i&&t._generalizationList&&t._generalizationList.length>0&&t._generalizationList.forEach((t,n)=>{const o=t.generalizationNode,r=o.getData(),s=i[n];(e||s&&JSON.stringify(r)!==JSON.stringify(s))&&(s&&(o.nodeData.data=s),o.getSize(),o.needLayout=!0)})}formatPosition(t,e,i){return"number"===typeof t?t:void 0!==o["d"][t]?e*o["d"][t]:/^\d\d*%$/.test(t)?Number.parseFloat(t)/100*e:(e-i)/2}formatInitRootNodePosition(t){const{CENTER:e}=o["a"].INIT_ROOT_NODE_POSITION;return(!t||!Array.isArray(t)||t.length<2)&&(t=[e,e]),t}setNodeCenter(t,e){let{initRootNodePosition:i}=this.mindMap.opt;i=this.formatInitRootNodePosition(e||i),t.left=this.formatPosition(i[0],this.mindMap.width,t.width),t.top=this.formatPosition(i[1],this.mindMap.height,t.height)}getRootCenterOffset(t,e){let{initRootNodePosition:i}=this.mindMap.opt;const{CENTER:n}=o["a"].INIT_ROOT_NODE_POSITION;i=this.formatInitRootNodePosition(i);const r=`${this.mindMap.width}x${this.mindMap.height}|${i[0]},${i[1]}`;if(this.rootNodeCenterOffset&&this.rootNodeCenterOffsetKey===r)return this.rootNodeCenterOffset;if(this.rootNodeCenterOffsetKey=r,i[0]===n&&i[1]===n)this.rootNodeCenterOffset={x:0,y:0};else{const i={width:t,height:e},o={width:t,height:e};this.setNodeCenter(i,[n,n]),this.setNodeCenter(o),this.rootNodeCenterOffset={x:o.left-i.left,y:o.top-i.top}}return this.rootNodeCenterOffset}updateChildren(t,e,i){t.forEach(t=>{t[e]+=i,t.children&&t.children.length&&!t.hasCustomPosition()&&this.updateChildren(t.children,e,i)})}updateChildrenPro(t,e){t.forEach(t=>{Object.keys(e).forEach(i=>{t[i]+=e[i]}),t.children&&t.children.length&&!t.hasCustomPosition()&&this.updateChildrenPro(t.children,e)})}getNodeAreaWidth(t,e=!1){let i=[],n=0,o=(t,r)=>{e&&t.checkHasGeneralization()&&(n+=t._generalizationNodeWidth),t.children.length?(r+=t.width/2,t.children.forEach(t=>{o(t,r)})):(r+=t.width,i.push(r))};return o(t,0),Math.max(...i)+n}quadraticCurvePath(t,e,i,n,o=!1){let r,s;return o?(r=t+.8*(i-t),s=e+.2*(n-e)):(r=t+.2*(i-t),s=e+.8*(n-e)),`M ${t},${e} Q ${r},${s} ${i},${n}`}cubicBezierPath(t,e,i,n,o=!1){let r,s,a,h;return o?(r=t,s=e+(n-e)/2,a=i,h=s):(r=t+(i-t)/2,s=e,a=r,h=n),`M ${t},${e} C ${r},${s} ${a},${h} ${i},${n}`}computeNewPoint(t,e,i=0){return t[0]===e[0]?e[1]>t[1]?[e[0],e[1]-i]:[e[0],e[1]+i]:t[1]===e[1]?e[0]>t[0]?[e[0]-i,e[1]]:[e[0]+i,e[1]]:void 0}createBracePath(t,e,i,n,o,r=15){const s=o?-1:1,a=n-e,h=i-n,d=Math.min(r,a/2),l=Math.min(r,h/2),c=Math.min(d,l),u=[`M ${t+d*s},${e}`,`Q ${t},${e} ${t},${e+d}`,`L ${t},${n-d}`,`Q ${t},${n} ${t-c*s},${n}`,`Q ${t},${n} ${t},${n+l}`,`L ${t},${i-l}`,`Q ${t},${i} ${t+l*s},${i}`].join(" ");return u}createBracePathWithAllChildren(t,e,i,n,o,r=15){return this.createBracePath(t,e,i,n,o,r)}createFoldLine(t){const{lineRadius:e}=this.mindMap.themeConfig,i=t.length;let n="",o="";if(i>=3&&e>0){const n=t[i-3],r=t[i-2],s=t[i-1],a=n[0].toFixed(0)===r[0].toFixed(0)&&r[0].toFixed(0)===s[0].toFixed(0)||n[1].toFixed(0)===r[1].toFixed(0)&&r[1].toFixed(0)===s[1].toFixed(0);if(!a){const a=this.computeNewPoint(n,r,e),h=this.computeNewPoint(s,r,e);o=`Q ${r[0]},${r[1]} ${h[0]},${h[1]}`,t.splice(i-2,1,a,o)}}return t.forEach((t,e)=>{if("string"===typeof t)n+=t;else{const[i,o]=t;n+=0===e?`M ${i},${o}`:`L ${i},${o}`}}),n}getMarginX(t){const{themeConfig:e,opt:i}=this.mindMap,{second:n,node:o}=e,r=2*i.hoverRectPadding;return 1===t?n.marginX+r:o.marginX+r}getMarginY(t){const{themeConfig:e,opt:i}=this.mindMap,{second:n,node:o}=e,r=2*i.hoverRectPadding;return 1===t?n.marginY+r:o.marginY+r}getNodeWidthWithGeneralization(t){return Math.max(t.width,t.checkHasGeneralization()?t._generalizationNodeWidth:0)}getNodeHeightWithGeneralization(t){return Math.max(t.height,t.checkHasGeneralization()?t._generalizationNodeHeight:0)}getNodeBoundaries(t,e){let{generalizationLineMargin:i,generalizationNodeMargin:n}=this.mindMap.themeConfig,o=t=>{let i=1/0,r=-1/0,s=1/0,a=-1/0;t.children&&t.children.length>0&&t.children.forEach(t=>{let{left:h,right:d,top:l,bottom:c}=o(t),u=t.checkHasGeneralization()&&t.getData("expand")?t._generalizationNodeWidth+n:0,f=t.checkHasGeneralization()&&t.getData("expand")?t._generalizationNodeHeight+n:0;h-("h"===e?u:0)<i&&(i=h-("h"===e?u:0)),d+("h"===e?u:0)>r&&(r=d+("h"===e?u:0)),l<s&&(s=l),c+("v"===e?f:0)>a&&(a=c+("v"===e?f:0))});let h={left:t.left,right:t.left+t.width,top:t.top,bottom:t.top+t.height};return{left:h.left<i?h.left:i,right:h.right>r?h.right:r,top:h.top<s?h.top:s,bottom:h.bottom>a?h.bottom:a}},{left:r,right:s,top:a,bottom:h}=o(t);return{left:r,right:s,top:a,bottom:h,generalizationLineMargin:i,generalizationNodeMargin:n}}getChildrenBoundaries(t,e,i=0,n){let{generalizationLineMargin:o,generalizationNodeMargin:r}=this.mindMap.themeConfig;const s=t.children.slice(i,n+1);let a=1/0,h=-1/0,d=1/0,l=-1/0;return s.forEach(t=>{const i=this.getNodeBoundaries(t,e);a=i.left<a?i.left:a,h=i.right>h?i.right:h,d=i.top<d?i.top:d,l=i.bottom>l?i.bottom:l}),{left:a,right:h,top:d,bottom:l,generalizationLineMargin:o,generalizationNodeMargin:r}}getNodeGeneralizationRenderBoundaries(t,e){let i=null;return i=t.range?this.getChildrenBoundaries(t.node,e,t.range[0],t.range[1]):this.getNodeBoundaries(t.node,e),i}getNodeActChildrenLength(t){return t.nodeData.children&&t.nodeData.children.length}setLineStyle(t,e,i,n,o=!0){e&&e.plot?(e.plot(this.transformPath(i)),t&&t(e,n,o)):console.warn("setLineStyle: line object is undefined or invalid",{line:e,childNode:n})}transformPath(t){const{customTransformNodeLinePath:e}=this.mindMap.opt;return e?e(t):t}getLayoutType(){return this.mindMap.opt.layout}}e["a"]=a},"7f65":function(t,e,i){"use strict";var n=i("59ed"),o=i("825a"),r=i("c65b"),s=i("5926"),a=i("46c4"),h="Invalid size",d=RangeError,l=TypeError,c=Math.max,u=function(t,e){this.set=t,this.size=c(e,0),this.has=n(t.has),this.keys=n(t.keys)};u.prototype={getIterator:function(){return a(o(r(this.keys,this.set)))},includes:function(t){return r(this.has,this.set,t)}},t.exports=function(t){o(t);var e=+t.size;if(e!==e)throw new l(h);var i=s(e);if(i<0)throw new d(h);return new u(t,i)}},8306:function(t,e,i){"use strict";i("72c3")},"83b9":function(t,e,i){"use strict";var n=i("cb27"),o=i("384f"),r=n.Set,s=n.add;t.exports=function(t){var e=new r;return o(t,(function(t){s(e,t)})),e}},"88a7":function(t,e,i){"use strict";var n=i("cb2d"),o=i("e330"),r=i("577e"),s=i("d6d6"),a=URLSearchParams,h=a.prototype,d=o(h.append),l=o(h["delete"]),c=o(h.forEach),u=o([].push),f=new a("a=1&a=2&b=3");f["delete"]("a",1),f["delete"]("b",void 0),f+""!=="a=2"&&n(h,"delete",(function(t){var e=arguments.length,i=e<2?void 0:arguments[1];if(e&&void 0===i)return l(this,t);var n=[];c(this,(function(t,e){u(n,{key:e,value:t})})),s(e,1);var o,a=r(t),h=r(i),f=0,p=0,g=!1,m=n.length;while(f<m)o=n[f++],g||o.key===a?(g=!0,l(this,o.key)):p++;while(p<m)o=n[p++],o.key===a&&o.value===h||d(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},"88e6":function(t,e,i){"use strict";i("1e70")},"8a19":function(t,e,i){"use strict";i.d(e,"a",(function(){return En})),i.d(e,"b",(function(){return cn})),i.d(e,"c",(function(){return fn})),i.d(e,"d",(function(){return Mn})),i.d(e,"e",(function(){return Pe})),i.d(e,"f",(function(){return Ei})),i.d(e,"g",(function(){return zi})),i.d(e,"h",(function(){return Oi})),i.d(e,"i",(function(){return zn})),i.d(e,"j",(function(){return dn}));const n={},o=[];function r(t,e){if(Array.isArray(t))for(const i of t)r(i,e);else if("object"!==typeof t)h(Object.getOwnPropertyNames(e)),n[t]=Object.assign(n[t]||{},e);else for(const i in t)r(i,t[i])}function s(t){return n[t]||{}}function a(){return[...new Set(o)]}function h(t){o.push(...t)}function d(t,e){let i;const n=t.length,o=[];for(i=0;i<n;i++)o.push(e(t[i]));return o}function l(t,e){let i;const n=t.length,o=[];for(i=0;i<n;i++)e(t[i])&&o.push(t[i]);return o}function c(t){return t%360*Math.PI/180}function u(t){return t.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}function f(t){return t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))}function p(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,i,n){return null!=e&&null!=i||(n=n||t.bbox(),null==e?e=n.width/n.height*i:null==i&&(i=n.height/n.width*e)),{width:e,height:i}}function m(t,e){const i=t.origin;let n=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",o=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=i&&([n,o]=Array.isArray(i)?i:"object"===typeof i?[i.x,i.y]:[i,i]);const r="string"===typeof n,s="string"===typeof o;if(r||s){const{height:t,width:i,x:a,y:h}=e.bbox();r&&(n=n.includes("left")?a:n.includes("right")?a+i:a+i/2),s&&(o=o.includes("top")?h:o.includes("bottom")?h+t:h+t/2)}return[n,o]}const b="http://www.w3.org/2000/svg",x="http://www.w3.org/1999/xhtml",y="http://www.w3.org/2000/xmlns/",w="http://www.w3.org/1999/xlink",C="http://svgjs.dev/svgjs";const v={window:"undefined"===typeof window?null:window,document:"undefined"===typeof document?null:document};class _{}const M={},E="___SYMBOL___ROOT___";function N(t,e=b){return v.document.createElementNS(e,t)}function T(t,e=!1){if(t instanceof _)return t;if("object"===typeof t)return D(t);if(null==t)return new M[E];if("string"===typeof t&&"<"!==t.charAt(0))return D(v.document.querySelector(t));const i=e?v.document.createElement("div"):N("svg");return i.innerHTML=t,t=D(i.firstChild),i.removeChild(i.firstChild),t}function L(t,e){return e&&e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node?e:N(t)}function S(t){if(!t)return null;if(t.instance instanceof _)return t.instance;if("#document-fragment"===t.nodeName)return new M.Fragment(t);let e=p(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":M[e]||(e="Dom"),new M[e](t)}let D=S;function R(t,e=t.name,i=!1){return M[e]=t,i&&(M[E]=t),h(Object.getOwnPropertyNames(t.prototype)),t}function z(t){return M[t]}let A=1e3;function O(t){return"Svgjs"+p(t)+A++}function k(t){for(let e=t.children.length-1;e>=0;e--)k(t.children[e]);return t.id?(t.id=O(t.nodeName),t):t}function I(t,e){let i,n;for(t=Array.isArray(t)?t:[t],n=t.length-1;n>=0;n--)for(i in e)t[n].prototype[i]=e[i]}function B(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}function F(){return this.parent().children()}function P(){return this.parent().index(this)}function W(){return this.siblings()[this.position()+1]}function H(){return this.siblings()[this.position()-1]}function j(){const t=this.position(),e=this.parent();return e.add(this.remove(),t+1),this}function G(){const t=this.position(),e=this.parent();return e.add(this.remove(),t?t-1:0),this}function $(){const t=this.parent();return t.add(this.remove()),this}function U(){const t=this.parent();return t.add(this.remove(),0),this}function Y(t){t=T(t),t.remove();const e=this.position();return this.parent().add(t,e),this}function X(t){t=T(t),t.remove();const e=this.position();return this.parent().add(t,e+1),this}function V(t){return t=T(t),t.before(this),this}function K(t){return t=T(t),t.after(this),this}r("Dom",{siblings:F,position:P,next:W,prev:H,forward:j,backward:G,front:$,back:U,before:Y,after:X,insertBefore:V,insertAfter:K});const q=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Z=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Q=/rgb\((\d+),(\d+),(\d+)\)/,J=/(#[a-z_][a-z0-9\-_]*)/i,tt=/\)\s*,?\s*/,et=/\s/g,it=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,nt=/^rgb\(/,ot=/^(\s+)?$/,rt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,st=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,at=/[\s,]+/,ht=/[MLHVCSQTAZ]/i;function dt(){const t=this.attr("class");return null==t?[]:t.trim().split(at)}function lt(t){return-1!==this.classes().indexOf(t)}function ct(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this}function ut(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this}function ft(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}function pt(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=u(e);i[e]=this.node.style[t]}return i}if("string"===typeof t)return this.node.style[u(t)];if("object"===typeof t)for(const e in t)this.node.style[u(e)]=null==t[e]||ot.test(t[e])?"":t[e]}return 2===arguments.length&&(this.node.style[u(t)]=null==e||ot.test(e)?"":e),this}function gt(){return this.css("display","")}function mt(){return this.css("display","none")}function bt(){return"none"!==this.css("display")}function xt(t,e,i){if(null==t)return this.data(d(l(this.node.attributes,t=>0===t.nodeName.indexOf("data-")),t=>t.nodeName.slice(5)));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"===typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(n){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"===typeof e||"number"===typeof e?e:JSON.stringify(e));return this}function yt(t,e){if("object"===typeof arguments[0])for(const i in t)this.remember(i,t[i]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this}function wt(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this}function Ct(){return this._memory=this._memory||{}}function vt(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}function _t(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)),n=i.toString(16);return 1===n.length?"0"+n:n}function Mt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function Et(t,e){const i=Mt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Mt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Mt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Mt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Mt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Mt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}function Nt(t){return"lab"===t||"xyz"===t||"lch"===t}function Tt(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}r("Dom",{classes:dt,hasClass:lt,addClass:ct,removeClass:ut,toggleClass:ft}),r("Dom",{css:pt,show:gt,hide:mt,visible:bt}),r("Dom",{data:xt}),r("Dom",{remember:yt,forget:wt,memory:Ct});class Lt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof Lt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"===typeof t.r&&"number"===typeof t.g&&"number"===typeof t.b}static random(t="vibrant",e,i){const{random:n,round:o,sin:r,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,i=360*n(),o=new Lt(t,e,i,"lch");return o}if("sine"===t){e=null==e?n():e;const t=o(80*r(2*s*e/.5+.01)+150),i=o(50*r(2*s*e/.5+4.6)+200),a=o(100*r(2*s*e/.5+2.3)+150),h=new Lt(t,i,a);return h}if("pastel"===t){const t=8*n()+86,e=17*n()+9,i=360*n(),o=new Lt(t,e,i,"lch");return o}if("dark"===t){const t=10+10*n(),e=50*n()+86,i=360*n(),o=new Lt(t,e,i,"lch");return o}if("rgb"===t){const t=255*n(),e=255*n(),i=255*n(),o=new Lt(t,e,i);return o}if("lab"===t){const t=100*n(),e=256*n()-128,i=256*n()-128,o=new Lt(t,e,i,"lab");return o}if("grey"===t){const t=255*n(),e=new Lt(t,t,t);return e}throw new Error("Unsupported random color mode")}static test(t){return"string"===typeof t&&(it.test(t)||nt.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,o,r]=[t,e,i].map(t=>t/255),s=Math.min(1-n,1-o,1-r);if(1===s)return new Lt(0,0,0,1,"cmyk");const a=(1-n-s)/(1-s),h=(1-o-s)/(1-s),d=(1-r-s)/(1-s),l=new Lt(a,h,d,s,"cmyk");return l}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,o,r]=[t,e,i].map(t=>t/255),s=Math.max(n,o,r),a=Math.min(n,o,r),h=(s+a)/2,d=s===a,l=s-a,c=d?0:h>.5?l/(2-s-a):l/(s+a),u=d?0:s===n?((o-r)/l+(o<r?6:0))/6:s===o?((r-n)/l+2)/6:s===r?((n-o)/l+4)/6:0,f=new Lt(360*u,100*c,100*h,"hsl");return f}init(t=0,e=0,i=0,n=0,o="rgb"){if(t=t||0,this.space)for(const l in this.space)delete this[this.space[l]];if("number"===typeof t)o="string"===typeof n?n:o,n="string"===typeof n?0:n,Object.assign(this,{_a:t,_b:e,_c:i,_d:n,space:o});else if(t instanceof Array)this.space=e||("string"===typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=Et(t,e);Object.assign(this,i)}else if("string"===typeof t)if(nt.test(t)){const e=t.replace(et,""),[i,n,o]=Q.exec(e).slice(1,4).map(t=>parseInt(t));Object.assign(this,{_a:i,_b:n,_c:o,_d:0,space:"rgb"})}else{if(!it.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,n,o]=Z.exec(vt(t)).map(e);Object.assign(this,{_a:i,_b:n,_c:o,_d:0,space:"rgb"})}}const{_a:r,_b:s,_c:a,_d:h}=this,d="rgb"===this.space?{r:r,g:s,b:a}:"xyz"===this.space?{x:r,y:s,z:a}:"hsl"===this.space?{h:r,s:s,l:a}:"lab"===this.space?{l:r,a:s,b:a}:"lch"===this.space?{l:r,c:s,h:a}:"cmyk"===this.space?{c:r,m:s,y:a,k:h}:{};Object.assign(this,d)}lab(){const{x:t,y:e,z:i}=this.xyz(),n=116*e-16,o=500*(t-e),r=200*(e-i),s=new Lt(n,o,r,"lab");return s}lch(){const{l:t,a:e,b:i}=this.lab(),n=Math.sqrt(e**2+i**2);let o=180*Math.atan2(i,e)/Math.PI;o<0&&(o*=-1,o=360-o);const r=new Lt(t,n,o,"lch");return r}rgb(){if("rgb"===this.space)return this;if(Nt(this.space)){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:n,a:o,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;o=t*Math.cos(i*e),r=t*Math.sin(i*e)}const s=(n+16)/116,a=o/500+s,h=s-r/200,d=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-d)/c),e=1*(s**3>l?s**3:(s-d)/c),i=1.08883*(h**3>l?h**3:(h-d)/c)}const n=3.2406*t+-1.5372*e+-.4986*i,o=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,s=Math.pow,a=.0031308,h=n>a?1.055*s(n,1/2.4)-.055:12.92*n,d=o>a?1.055*s(o,1/2.4)-.055:12.92*o,l=r>a?1.055*s(r,1/2.4)-.055:12.92*r,c=new Lt(255*h,255*d,255*l);return c}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;const t=new Lt(i,i,i);return t}const n=i<.5?i*(1+e):i+e-i*e,o=2*i-n,r=255*Tt(o,n,t+1/3),s=255*Tt(o,n,t),a=255*Tt(o,n,t-1/3),h=new Lt(r,s,a);return h}if("cmyk"===this.space){const{c:t,m:e,y:i,k:n}=this,o=255*(1-Math.min(1,t*(1-n)+n)),r=255*(1-Math.min(1,e*(1-n)+n)),s=255*(1-Math.min(1,i*(1-n)+n)),a=new Lt(o,r,s);return a}return this}toArray(){const{_a:t,_b:e,_c:i,_d:n,space:o}=this;return[t,e,i,n,o]}toHex(){const[t,e,i]=this._clamped().map(_t);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped(),n=`rgb(${t},${e},${i})`;return n}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,o,r]=[t,e,i].map(t=>t/255),s=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,a=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,h=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,d=(.4124*s+.3576*a+.1805*h)/.95047,l=(.2126*s+.7152*a+.0722*h)/1,c=(.0193*s+.1192*a+.9505*h)/1.08883,u=d>.008856?Math.pow(d,1/3):7.787*d+16/116,f=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116,g=new Lt(u,f,p,"xyz");return g}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:n,min:o,round:r}=Math,s=t=>n(0,o(r(t),255));return[t,e,i].map(s)}}class St{constructor(...t){this.init(...t)}clone(){return new St(this)}init(t,e){const i={x:0,y:0},n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?i.x:n.x,this.y=null==n.y?i.y:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){zt.isMatrixLike(t)||(t=new zt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function Dt(t,e){return new St(t,e).transformO(this.screenCTM().inverseO())}function Rt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class zt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,n=t.flip&&(e||"y"===t.flip)?-1:1,o=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,s=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,a=t.scale&&t.scale.length?t.scale[1]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleY)?t.scaleY*n:n,h=t.shear||0,d=t.rotate||t.theta||0,l=new St(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,u=l.y,f=new St(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,g=f.y,m=new St(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=m.x,x=m.y,y=new St(t.relative||t.rx||t.relativeX,t.ry||t.relativeY),w=y.x,C=y.y;return{scaleX:s,scaleY:a,skewX:o,skewY:r,shear:h,theta:d,rx:w,ry:C,tx:b,ty:x,ox:c,oy:u,px:p,py:g}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const n=t.a*e.a+t.c*e.b,o=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,s=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,h=t.f+t.b*e.e+t.d*e.f;return i.a=n,i.b=o,i.c=r,i.d=s,i.e=a,i.f=h,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const n=t||0,o=e||0;return this.translateO(-n,-o).lmultiplyO(i).translateO(n,o)}clone(){return new zt(this)}decompose(t=0,e=0){const i=this.a,n=this.b,o=this.c,r=this.d,s=this.e,a=this.f,h=i*r-n*o,d=h>0?1:-1,l=d*Math.sqrt(i*i+n*n),c=Math.atan2(d*n,d*i),u=180/Math.PI*c,f=Math.cos(c),p=Math.sin(c),g=(i*o+n*r)/h,m=o*l/(g*i-n)||r*l/(g*n+i),b=s-t+t*f*l+e*(g*f*l-p*m),x=a-e+t*p*l+e*(g*p*l+f*m);return{scaleX:l,scaleY:m,shear:g,rotate:u,translateX:b,translateY:x,originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new zt(t);return Rt(this.a,e.a)&&Rt(this.b,e.b)&&Rt(this.c,e.c)&&Rt(this.d,e.d)&&Rt(this.e,e.e)&&Rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=zt.fromArray([1,0,0,1,0,0]);return t=t instanceof ue?t.matrixify():"string"===typeof t?zt.fromArray(t.split(at).map(parseFloat)):Array.isArray(t)?zt.fromArray(t):"object"===typeof t&&zt.isMatrixLike(t)?t:"object"===typeof t?(new zt).transform(t):6===arguments.length?zt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,n=this.d,o=this.e,r=this.f,s=t*n-e*i;if(!s)throw new Error("Cannot invert "+this);const a=n/s,h=-e/s,d=-i/s,l=t/s,c=-(a*o+d*r),u=-(h*o+l*r);return this.a=a,this.b=h,this.c=d,this.d=l,this.e=c,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=this,i=t instanceof zt?t:new zt(t);return zt.matrixMultiply(i,e,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=this,i=t instanceof zt?t:new zt(t);return zt.matrixMultiply(e,i,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=c(t);const n=Math.cos(t),o=Math.sin(t),{a:r,b:s,c:a,d:h,e:d,f:l}=this;return this.a=r*n-s*o,this.b=s*n+r*o,this.c=a*n-h*o,this.d=h*n+a*o,this.e=d*n-l*o+i*o-e*n+e,this.f=l*n+d*o-e*o-i*n+i,this}scale(t,e,i,n){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,n=0){3===arguments.length&&(n=i,i=e,e=t);const{a:o,b:r,c:s,d:a,e:h,f:d}=this;return this.a=o*t,this.b=r*e,this.c=s*t,this.d=a*e,this.e=h*t-i*t+i,this.f=d*e-n*e+n,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:n,b:o,c:r,d:s,e:a,f:h}=this;return this.a=n+o*t,this.c=r+s*t,this.e=a+h*t-i*t,this}skew(t,e,i,n){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,n=0){3===arguments.length&&(n=i,i=e,e=t),t=c(t),e=c(e);const o=Math.tan(t),r=Math.tan(e),{a:s,b:a,c:h,d:d,e:l,f:u}=this;return this.a=s+a*o,this.b=a+s*r,this.c=h+d*o,this.d=d+h*r,this.e=l+u*o-n*o,this.f=u+l*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(zt.isMatrixLike(t)){const e=new zt(t);return e.multiplyO(this)}const e=zt.formatTransforms(t),i=this,{x:n,y:o}=new St(e.ox,e.oy).transform(i),r=(new zt).translateO(e.rx,e.ry).lmultiplyO(i).translateO(-n,-o).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,o);if(isFinite(e.px)||isFinite(e.py)){const t=new St(n,o).transform(r),i=isFinite(e.px)?e.px-t.x:0,s=isFinite(e.py)?e.py-t.y:0;r.translateO(i,s)}return r.translateO(e.tx,e.ty),r}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function At(){return new zt(this.node.getCTM())}function Ot(){if("function"===typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new zt(e)}return new zt(this.node.getScreenCTM())}function kt(){if(!kt.nodes){const t=T().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;kt.nodes={svg:t,path:e}}if(!kt.nodes.svg.node.parentNode){const t=v.document.body||v.document.documentElement;kt.nodes.svg.addTo(t)}return kt.nodes}function It(t){return!t.width&&!t.height&&!t.x&&!t.y}function Bt(t){return t===v.document||(v.document.documentElement.contains||function(t){while(t.parentNode)t=t.parentNode;return t===v.document}).call(v.document.documentElement,t)}R(zt,"Matrix");class Ft{constructor(...t){this.init(...t)}addOffset(){return this.x+=v.window.pageXOffset,this.y+=v.window.pageYOffset,new Ft(this)}init(t){const e=[0,0,0,0];return t="string"===typeof t?t.split(at).map(parseFloat):Array.isArray(t)?t:"object"===typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):e,this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return It(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),n=Math.max(this.x+this.width,t.x+t.width)-e,o=Math.max(this.y+this.height,t.y+t.height)-i;return new Ft(e,i,n,o)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof zt||(t=new zt(t));let e=1/0,i=-1/0,n=1/0,o=-1/0;const r=[new St(this.x,this.y),new St(this.x2,this.y),new St(this.x,this.y2),new St(this.x2,this.y2)];return r.forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),n=Math.min(n,r.y),o=Math.max(o,r.y)})),new Ft(e,n,i-e,o-n)}}function Pt(t,e,i){let n;try{if(n=e(t.node),It(n)&&!Bt(t.node))throw new Error("Element not in the dom")}catch(o){n=i(t)}return n}function Wt(){const t=t=>t.getBBox(),e=t=>{try{const e=t.clone().addTo(kt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}},i=Pt(this,t,e),n=new Ft(i);return n}function Ht(t){const e=t=>t.getBoundingClientRect(),i=t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)},n=Pt(this,e,i),o=new Ft(n);return t?o.transform(t.screenCTM().inverseO()):o.addOffset()}function jt(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t<i.x+i.width&&e<i.y+i.height}r({viewbox:{viewbox(t,e,i,n){return null==t?new Ft(this.attr("viewBox")):this.attr("viewBox",new Ft(t,e,i,n))},zoom(t,e){let{width:i,height:n}=this.attr(["width","height"]);if((i||n)&&"string"!==typeof i&&"string"!==typeof n||(i=this.node.clientWidth,n=this.node.clientHeight),!i||!n)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const o=this.viewbox(),r=i/o.width,s=n/o.height,a=Math.min(r,s);if(null==t)return a;let h=a/t;h===1/0&&(h=Number.MAX_SAFE_INTEGER/100),e=e||new St(i/2/r+o.x,n/2/s+o.y);const d=new Ft(o).transform(new zt({scale:h,origin:e}));return this.viewbox(d)}}}),R(Ft,"Box");class Gt extends Array{constructor(t=[],...e){if(super(t,...e),"number"===typeof t)return this;this.length=0,this.push(...t)}}I([Gt],{each(t,...e){return"function"===typeof t?this.map((e,i,n)=>t.call(e,e,i,n)):this.map(i=>i[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const $t=["toArray","constructor","each"];function Ut(t,e){return new Gt(d((e||v.document).querySelectorAll(t),(function(t){return S(t)})))}function Yt(t){return Ut(t,this.node)}function Xt(t){return S(this.node.querySelector(t))}Gt.extend=function(t){t=t.reduce((t,e)=>($t.includes(e)||"_"===e[0]||(t[e]=function(...t){return this.each(e,...t)}),t),{}),I([Gt],t)};let Vt=0;const Kt={};function qt(t){let e=t.getEventHolder();return e===v.window&&(e=Kt),e.events||(e.events={}),e.events}function Zt(t){return t.getEventTarget()}function Qt(t){let e=t.getEventHolder();e===v.window&&(e=Kt),e.events&&(e.events={})}function Jt(t,e,i,n,o){const r=i.bind(n||t),s=T(t),a=qt(s),h=Zt(s);e=Array.isArray(e)?e:e.split(at),i._svgjsListenerId||(i._svgjsListenerId=++Vt),e.forEach((function(t){const e=t.split(".")[0],n=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][n]=a[e][n]||{},a[e][n][i._svgjsListenerId]=r,h.addEventListener(e,r,o||!1)}))}function te(t,e,i,n){const o=T(t),r=qt(o),s=Zt(o);("function"!==typeof i||(i=i._svgjsListenerId,i))&&(e=Array.isArray(e)?e:(e||"").split(at),e.forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let h,d;if(i)r[e]&&r[e][a||"*"]&&(s.removeEventListener(e,r[e][a||"*"][i],n||!1),delete r[e][a||"*"][i]);else if(e&&a){if(r[e]&&r[e][a]){for(d in r[e][a])te(s,[e,a].join("."),d);delete r[e][a]}}else if(a)for(t in r)for(h in r[t])a===h&&te(s,[t,a].join("."));else if(e){if(r[e]){for(h in r[e])te(s,[e,h].join("."));delete r[e]}}else{for(t in r)te(s,t);Qt(o)}})))}function ee(t,e,i,n){const o=Zt(t);return e instanceof v.window.Event||(e=new v.window.CustomEvent(e,{detail:i,cancelable:!0,...n})),o.dispatchEvent(e),e}class ie extends _{addEventListener(){}dispatch(t,e,i){return ee(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const n in i)for(const e in i[n])i[n][e](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return te(this,t,e,i),this}on(t,e,i,n){return Jt(this,t,e,i,n),this}removeEventListener(){}}function ne(){}R(ie,"EventTarget");const oe={duration:400,ease:">",delay:0},re={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class se extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"===typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(at).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class ae{constructor(...t){this.init(...t)}convert(t){return new ae(this.value,t)}divide(t){return t=new ae(t),new ae(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"===typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"===typeof t?(e=t.match(q),e&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5])):t instanceof ae&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new ae(t),new ae(this-t,this.unit||t.unit)}plus(t){return t=new ae(t),new ae(this+t,this.unit||t.unit)}times(t){return t=new ae(t),new ae(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const he=[];function de(t){he.push(t)}function le(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=rt.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce((t,e)=>(t[e]=this.attr(e),t),{});if("object"===typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return e=this.node.getAttribute(t),null==e?re[t]:rt.test(e)?parseFloat(e):e;e=he.reduce((e,i)=>i(t,e,this),e),"number"===typeof e?e=new ae(e):Lt.isColor(e)?e=new Lt(e):e.constructor===Array&&(e=new se(e)),"leading"===t?this.leading&&this.leading(e):"string"===typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this}class ce extends ie{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return t=T(t),t.removeNamespace&&this.node instanceof v.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return T(t).put(this,e)}children(){return new Gt(d(this.node.children,(function(t){return S(t)})))}clear(){while(this.node.hasChildNodes())this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=k(i)),new this.constructor(i)}each(t,e){const i=this.children();let n,o;for(n=0,o=i.length;n<o;n++)t.apply(i[n],[n,i]),e&&i[n].each(t,e);return this}element(t,e){return this.put(new ce(N(t),e))}first(){return S(this.node.firstChild)}get(t){return S(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,x)}id(t){return"undefined"!==typeof t||this.node.id||(this.node.id=O(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return S(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=S(e.node.parentNode),!t)return e;do{if("string"===typeof t?e.matches(t):e instanceof t)return e}while(e=S(e.node.parentNode));return e}put(t,e){return t=T(t),this.add(t,e),t}putIn(t,e){return T(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=T(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,n=this.attr(e);for(const o in n)"number"===typeof n[o]&&(n[o]=Math.round(n[o]*i)/i);return this.attr(n),this}svg(t,e){return this.xml(t,e,b)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"===typeof t&&(i=e,e=t,t=null),null==t||"function"===typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=S(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const n=N("wrapper",i),o=v.document.createDocumentFragment();n.innerHTML=t;for(let s=n.children.length;s--;)o.appendChild(n.firstElementChild);const r=this.parent();return e?this.replace(o)&&r:this.add(o)}}I(ce,{attr:le,find:Yt,findOne:Xt}),R(ce,"Dom");class ue extends ce{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,t.hasAttribute("svgjs:data")&&this.setData(JSON.parse(t.getAttribute("svgjs:data"))||{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new ae(t).plus(this.x()))}dy(t=0){return this.y(new ae(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"===typeof t;e||(t=T(t));const i=new Gt;let n=this;while((n=n.parent())&&n.node!==v.document&&"#document-fragment"!==n.nodeName){if(i.push(n),!e&&n.node===t.node)break;if(e&&n.matches(t))break;if(n.node===this.root().node)return null}return i}reference(t){if(t=this.attr(t),!t)return null;const e=(t+"").match(J);return e?T(e[1]):null}root(){const t=this.parent(z(E));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=g(this,t,e);return this.width(new ae(i.width)).height(new ae(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(ue,{bbox:Wt,rbox:Ht,inside:jt,point:Dt,ctm:At,screenCTM:Ot}),R(ue,"Element");const fe={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let i;e[t]=function(e){if("undefined"===typeof e)return this.attr(t);if("string"===typeof e||e instanceof Lt||Lt.isRgb(e)||e instanceof ue)this.attr(t,e);else for(i=fe[t].length-1;i>=0;i--)null!=e[fe[t][i]]&&this.attr(fe.prefix(t,fe[t][i]),e[fe[t][i]]);return this},r(["Element","Runner"],e)})),r(["Element","Runner"],{matrix:function(t,e,i,n,o,r){return null==t?new zt(this):this.attr("transform",new zt(t,e,i,n,o,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,n){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:n},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,n){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:n},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),r("radius",{radius:function(t,e=t){const i=(this._element||this).type;return"radialGradient"===i?this.attr("r",new ae(t)):this.rx(t).ry(e)}}),r("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new St(this.node.getPointAtLength(t))}}),r(["Element","Runner"],{font:function(t,e){if("object"===typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});const pe=["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce((function(t,e){const i=function(t){return null===t?this.off(e):this.on(e,t),this};return t[e]=i,t}),{});function ge(){return this.attr("transform",null)}function me(){const t=(this.attr("transform")||"").split(tt).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(at).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(zt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new zt);return t}function be(t,e){if(this===t)return this;const i=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(n.multiply(i)),this}function xe(t){return this.toParent(this.root(),t)}function ye(t,e){if(null==t||"string"===typeof t){const e=new zt(this).decompose();return null==t?e:e[t]}zt.isMatrixLike(t)||(t={...t,origin:m(t,this)});const i=!0===e?this:e||!1,n=new zt(i).transform(t);return this.attr("transform",n)}r("Element",pe),r("Element",{untransform:ge,matrixify:me,toParent:be,toRoot:xe,transform:ye});class we extends ue{flatten(t=this,e){return this.each((function(){if(this instanceof we)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,n){return n[n.length-i-1].toParent(t,e)})),this.remove()}}R(we,"Container");class Ce extends we{constructor(t,e=t){super(L("defs",t),e)}flatten(){return this}ungroup(){return this}}R(Ce,"Defs");class ve extends ue{}function _e(t){return this.attr("rx",t)}function Me(t){return this.attr("ry",t)}function Ee(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Ne(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Te(t){return this.attr("cx",t)}function Le(t){return this.attr("cy",t)}function Se(t){return null==t?2*this.rx():this.rx(new ae(t).divide(2))}function De(t){return null==t?2*this.ry():this.ry(new ae(t).divide(2))}R(ve,"Shape");var Re={__proto__:null,rx:_e,ry:Me,x:Ee,y:Ne,cx:Te,cy:Le,width:Se,height:De};class ze extends ve{constructor(t,e=t){super(L("ellipse",t),e)}size(t,e){const i=g(this,t,e);return this.rx(new ae(i.width).divide(2)).ry(new ae(i.height).divide(2))}}I(ze,Re),r("Container",{ellipse:B((function(t=0,e=t){return this.put(new ze).size(t,e).move(0,0)}))}),R(ze,"Ellipse");class Ae extends ce{constructor(t=v.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"===typeof t&&(i=e,e=t,t=null),null==t||"function"===typeof t){const t=new ce(N("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function Oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new ae(t),fy:new ae(e)}):this.attr({x1:new ae(t),y1:new ae(e)})}function ke(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new ae(t),cy:new ae(e)}):this.attr({x2:new ae(t),y2:new ae(e)})}R(Ae,"Fragment");var Ie={__proto__:null,from:Oe,to:ke};class Be extends we{constructor(t,e){super(L(t+"Gradient","string"===typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new Ft}targets(){return Ut("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"===typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Be,Ie),r({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:B((function(t,e){return this.put(new Be(t)).update(e)}))}}),R(Be,"Gradient");class Fe extends we{constructor(t,e=t){super(L("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new Ft}targets(){return Ut("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"===typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}r({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:B((function(t,e,i){return this.put(new Fe).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),R(Fe,"Pattern");class Pe extends ve{constructor(t,e=t){super(L("image",t),e)}load(t,e){if(!t)return this;const i=new v.window.Image;return Jt(i,"load",(function(t){const n=this.parent(Fe);0===this.width()&&0===this.height()&&this.size(i.width,i.height),n instanceof Fe&&0===n.width()&&0===n.height()&&n.size(this.width(),this.height()),"function"===typeof e&&e.call(this,t)}),this),Jt(i,"load error",(function(){te(i)})),this.attr("href",i.src=t,w)}}de((function(t,e,i){return"fill"!==t&&"stroke"!==t||st.test(e)&&(e=i.root().defs().image(e)),e instanceof Pe&&(e=i.root().defs().pattern(0,0,t=>{t.add(e)})),e})),r({Container:{image:B((function(t,e){return this.put(new Pe).size(0,0).load(t,e)}))}}),R(Pe,"Image");class We extends se{bbox(){let t=-1/0,e=-1/0,i=1/0,n=1/0;return this.forEach((function(o){t=Math.max(o[0],t),e=Math.max(o[1],e),i=Math.min(o[0],i),n=Math.min(o[1],n)})),new Ft(i,n,t-i,e-n)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(at).map(parseFloat),t.length%2!==0&&t.pop();for(let i=0,n=t.length;i<n;i+=2)e.push([t[i],t[i+1]]);return e}size(t,e){let i;const n=this.bbox();for(i=this.length-1;i>=0;i--)n.width&&(this[i][0]=(this[i][0]-n.x)*t/n.width+n.x),n.height&&(this[i][1]=(this[i][1]-n.y)*e/n.height+n.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e<i;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){zt.isMatrixLike(t)||(t=new zt(t));for(let e=this.length;e--;){const[i,n]=this[e];this[e][0]=t.a*i+t.c*n+t.e,this[e][1]=t.b*i+t.d*n+t.f}return this}}const He=We;function je(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Ge(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function $e(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function Ue(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}var Ye={__proto__:null,MorphArray:He,x:je,y:Ge,width:$e,height:Ue};class Xe extends ve{constructor(t,e=t){super(L("line",t),e)}array(){return new We([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,i,n){return null==t?this.array():(t="undefined"!==typeof e?{x1:t,y1:e,x2:i,y2:n}:new We(t).toLine(),this.attr(t))}size(t,e){const i=g(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}}I(Xe,Ye),r({Container:{line:B((function(...t){return Xe.prototype.plot.apply(this.put(new Xe),null!=t[0]?t:[0,0,0,0])}))}}),R(Xe,"Line");class Ve extends we{constructor(t,e=t){super(L("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"===typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Ke(t,e){return function(i){return null==i?this[t]:(this[t]=i,e&&e.call(this),this)}}r({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:B((function(t,e,i){return this.put(new Ve).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(i)}))},marker:{marker(t,e,i,n){let o=["marker"];return"all"!==t&&o.push(t),o=o.join("-"),t=arguments[1]instanceof Ve?arguments[1]:this.defs().marker(e,i,n),this.attr(o,t)}}}),R(Ve,"Marker");const qe={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,n){return function(o){return o<0?t>0?e/t*o:i>0?n/i*o:0:o>1?i<1?(1-n)/(1-i)*o+(n-i)/(1-i):t<1?(1-e)/(1-t)*o+(e-t)/(1-t):1:3*o*(1-o)**2*e+3*o**2*(1-o)*n+o**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(n,o=!1)=>{let r=Math.floor(n*t);const s=n*r%1===0;return"start"!==e&&"both"!==e||++r,o&&s&&--r,n>=0&&r<0&&(r=0),n<=1&&r>i&&(r=i),r/i}}};class Ze{done(){return!1}}class Qe extends Ze{constructor(t=oe.ease){super(),this.ease=qe[t]||t}step(t,e,i){return"number"!==typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class Je extends Ze{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,n){return this.stepper(t,e,i,n)}}function ti(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=1e-10,n=Math.PI,o=Math.log(e/100+i),r=-o/Math.sqrt(n*n+o*o),s=3.9/(r*t);this.d=2*r*s,this.k=s*s}class ei extends Je{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,n){if("string"===typeof t)return t;if(n.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const o=n.velocity||0,r=-this.d*o-this.k*(t-e),s=t+o*i+r*i*i/2;return n.velocity=o+r*i,n.done=Math.abs(e-s)+Math.abs(o)<.002,n.done?e:s}}I(ei,{duration:Ke("_duration",ti),overshoot:Ke("_overshoot",ti)});class ii extends Je{constructor(t=.1,e=.01,i=0,n=1e3){super(),this.p(t).i(e).d(i).windup(n)}step(t,e,i,n){if("string"===typeof t)return t;if(n.done=i===1/0,i===1/0)return e;if(0===i)return t;const o=e-t;let r=(n.integral||0)+o*i;const s=(o-(n.error||0))/i,a=this._windup;return!1!==a&&(r=Math.max(-a,Math.min(r,a))),n.error=o,n.integral=r,n.done=Math.abs(o)<.001,n.done?e:t+(this.P*o+this.I*r+this.D*s)}}I(ii,{windup:Ke("_windup"),p:Ke("P"),i:Ke("I"),d:Ke("D")});const ni={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},oi={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ri="mlhvqtcsaz".split("");for(let An=0,On=ri.length;An<On;++An)oi[ri[An]]=function(t){return function(e,i,n){if("H"===t)e[0]=e[0]+i.x;else if("V"===t)e[0]=e[0]+i.y;else if("A"===t)e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(let t=0,o=e.length;t<o;++t)e[t]=e[t]+(t%2?i.y:i.x);return oi[t](e,i,n)}}(ri[An].toUpperCase());function si(t){const e=t.segment[0];return oi[e](t.segment.slice(1),t.p,t.p0)}function ai(t){return t.segment.length&&t.segment.length-1===ni[t.segment[0].toUpperCase()]}function hi(t,e){t.inNumber&&di(t,!1);const i=ht.test(e);if(i)t.segment=[e];else{const e=t.lastCommand,i=e.toLowerCase(),n=e===i;t.segment=["m"===i?n?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],i}function di(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,ai(t)&&li(t)}function li(t){t.inSegment=!1,t.absolute&&(t.segment=si(t)),t.segments.push(t.segment)}function ci(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),i=t.segment.length;return e&&(4===i||5===i)}function ui(t){return"E"===t.lastToken.toUpperCase()}function fi(t,e=!0){let i=0,n="";const o={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new St,p:new St};while(o.lastToken=n,n=t.charAt(i++))if(o.inSegment||!hi(o,n))if("."!==n)if(isNaN(parseInt(n)))if(" "!==n&&","!==n)if("-"!==n)if("E"!==n.toUpperCase()){if(ht.test(n)){if(o.inNumber)di(o,!1);else{if(!ai(o))throw new Error("parser Error");li(o)}--i}}else o.number+=n,o.hasExponent=!0;else{if(o.inNumber&&!ui(o)){di(o,!1),--i;continue}o.number+=n,o.inNumber=!0}else o.inNumber&&di(o,!1);else{if("0"===o.number||ci(o)){o.inNumber=!0,o.number=n,di(o,!0);continue}o.inNumber=!0,o.number+=n}else{if(o.pointSeen||o.hasExponent){di(o,!1),--i;continue}o.inNumber=!0,o.pointSeen=!0,o.number+=n}return o.inNumber&&di(o,!1),o.inSegment&&ai(o)&&li(o),o.segments}function pi(t){let e="";for(let i=0,n=t.length;i<n;i++)e+=t[i][0],null!=t[i][1]&&(e+=t[i][1],null!=t[i][2]&&(e+=" ",e+=t[i][2],null!=t[i][3]&&(e+=" ",e+=t[i][3],e+=" ",e+=t[i][4],null!=t[i][5]&&(e+=" ",e+=t[i][5],e+=" ",e+=t[i][6],null!=t[i][7]&&(e+=" ",e+=t[i][7])))));return e+" "}class gi extends se{bbox(){return kt().path.setAttribute("d",this.toString()),new Ft(kt.nodes.path.getBBox())}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let n,o=this.length-1;o>=0;o--)n=this[o][0],"M"===n||"L"===n||"T"===n?(this[o][1]+=t,this[o][2]+=e):"H"===n?this[o][1]+=t:"V"===n?this[o][1]+=e:"C"===n||"S"===n||"Q"===n?(this[o][1]+=t,this[o][2]+=e,this[o][3]+=t,this[o][4]+=e,"C"===n&&(this[o][5]+=t,this[o][6]+=e)):"A"===n&&(this[o][6]+=t,this[o][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),fi(t)}size(t,e){const i=this.bbox();let n,o;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,n=this.length-1;n>=0;n--)o=this[n][0],"M"===o||"L"===o||"T"===o?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y):"H"===o?this[n][1]=(this[n][1]-i.x)*t/i.width+i.x:"V"===o?this[n][1]=(this[n][1]-i.y)*e/i.height+i.y:"C"===o||"S"===o||"Q"===o?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y,this[n][3]=(this[n][3]-i.x)*t/i.width+i.x,this[n][4]=(this[n][4]-i.y)*e/i.height+i.y,"C"===o&&(this[n][5]=(this[n][5]-i.x)*t/i.width+i.x,this[n][6]=(this[n][6]-i.y)*e/i.height+i.y)):"A"===o&&(this[n][1]=this[n][1]*t/i.width,this[n][2]=this[n][2]*e/i.height,this[n][6]=(this[n][6]-i.x)*t/i.width+i.x,this[n][7]=(this[n][7]-i.y)*e/i.height+i.y);return this}toString(){return pi(this)}}const mi=t=>{const e=typeof t;return"number"===e?ae:"string"===e?Lt.isColor(t)?Lt:at.test(t)?ht.test(t)?gi:se:q.test(t)?ae:xi:vi.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?se:"object"===e?Ci:xi};class bi{constructor(t){this._stepper=t||new Qe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){const t=this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0);return t}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(mi(t));let e=new this._type(t);return this._type===Lt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Ci&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class xi{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class yi{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,yi.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}yi.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const wi=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Ci{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,n=e.length;i<n;++i){if(e[i+1]===t[i+1]){if(e[i+1]===Lt&&t[i+7]!==e[i+7]){const e=t[i+7],n=new Lt(this.values.splice(i+3,5))[e]().toArray();this.values.splice(i+3,0,...n)}i+=e[i+2]+2;continue}if(!t[i+1])return this;const n=(new t[i+1]).toArray(),o=e[i+2]+3;e.splice(i,o,t[i],t[i+1],t[i+2],...n),i+=e[i+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const i in t){const n=mi(t[i]),o=new n(t[i]).toArray();e.push([i,n,o.length,...o])}return e.sort(wi),this.values=e.reduce((t,e)=>t.concat(e),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;while(e.length){const i=e.shift(),n=e.shift(),o=e.shift(),r=e.splice(0,o);t[i]=new n(r)}return t}}const vi=[xi,yi,Ci];function _i(t=[]){vi.push(...[].concat(t))}function Mi(){I(vi,{to(t){return(new bi).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,n,o){const r=function(t,r){return n.step(t,e[r],i,o[r],o)};return this.fromArray(t.map(r))}})}class Ei extends ve{constructor(t,e=t){super(L("path",t),e)}array(){return this._array||(this._array=new gi(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"===typeof t?t:this._array=new gi(t))}size(t,e){const i=g(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ni(){return this._array||(this._array=new We(this.attr("points")))}function Ti(){return delete this._array,this}function Li(t,e){return this.attr("points",this.array().move(t,e))}function Si(t){return null==t?this.array():this.clear().attr("points","string"===typeof t?t:this._array=new We(t))}function Di(t,e){const i=g(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}Ei.prototype.MorphArray=gi,r({Container:{path:B((function(t){return this.put(new Ei).plot(t||new gi)}))}}),R(Ei,"Path");var Ri={__proto__:null,array:Ni,clear:Ti,move:Li,plot:Si,size:Di};class zi extends ve{constructor(t,e=t){super(L("polygon",t),e)}}r({Container:{polygon:B((function(t){return this.put(new zi).plot(t||new We)}))}}),I(zi,Ye),I(zi,Ri),R(zi,"Polygon");class Ai extends ve{constructor(t,e=t){super(L("polyline",t),e)}}r({Container:{polyline:B((function(t){return this.put(new Ai).plot(t||new We)}))}}),I(Ai,Ye),I(Ai,Ri),R(Ai,"Polyline");class Oi extends ve{constructor(t,e=t){super(L("rect",t),e)}}I(Oi,{rx:_e,ry:Me}),r({Container:{rect:B((function(t,e){return this.put(new Oi).size(t,e)}))}}),R(Oi,"Rect");class ki{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e="undefined"!==typeof t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ii={nextDraw:null,frames:new ki,timeouts:new ki,immediates:new ki,timer:()=>v.window.performance||v.window.Date,transforms:[],frame(t){const e=Ii.frames.push({run:t});return null===Ii.nextDraw&&(Ii.nextDraw=v.window.requestAnimationFrame(Ii._draw)),e},timeout(t,e){e=e||0;const i=Ii.timer().now()+e,n=Ii.timeouts.push({run:t,time:i});return null===Ii.nextDraw&&(Ii.nextDraw=v.window.requestAnimationFrame(Ii._draw)),n},immediate(t){const e=Ii.immediates.push(t);return null===Ii.nextDraw&&(Ii.nextDraw=v.window.requestAnimationFrame(Ii._draw)),e},cancelFrame(t){null!=t&&Ii.frames.remove(t)},clearTimeout(t){null!=t&&Ii.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ii.immediates.remove(t)},_draw(t){let e=null;const i=Ii.timeouts.last();while(e=Ii.timeouts.shift())if(t>=e.time?e.run():Ii.timeouts.push(e),e===i)break;let n=null;const o=Ii.frames.last();while(n!==o&&(n=Ii.frames.shift()))n.run(t);let r=null;while(r=Ii.immediates.shift())r();Ii.nextDraw=Ii.timeouts.first()||Ii.frames.first()?v.window.requestAnimationFrame(Ii._draw):null}},Bi=function(t){const e=t.start,i=t.runner.duration(),n=e+i;return{start:e,duration:i,end:n,runner:t.runner}},Fi=function(){const t=v.window;return(t.performance||t.Date).now()};class Pi extends ie{constructor(t=Fi){super(),this._timeSource=t,this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0,i=t?t.start:this._time;return i+e}getEndTimeOfTimeline(){const t=this._runners.map(t=>t.start+t.runner.duration());return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Bi);let n=0;const o=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)n=o;else if("absolute"===i||"start"===i)n=e,e=0;else if("now"===i)n=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(n=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo(),e=t?t.start:this._time;n=e}}t.unschedule(),t.timeline(this);const r=t.persist(),s={persist:null===r?this._persist:r,start:n+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(s),this._runners.sort((t,e)=>t.start-e.start),this._runnerIds=this._runners.map(t=>t.runner.id),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Ii.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Ii.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const n=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=n,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let r=this._runners.length;r--;){const t=this._runners[r],e=t.runner,i=this._time-t.start;i<=0&&e.reset()}let o=!1;for(let r=0,s=this._runners.length;r<s;r++){const t=this._runners[r],e=t.runner;let i=n;const a=this._time-t.start;if(a<=0){o=!0;continue}if(a<i&&(i=a),!e.active())continue;const h=e.step(i).done;if(h){if(!0!==t.persist){const i=e.duration()-e.time()+this._time;i+t.persist<this._time&&(e.unschedule(),--r,--s)}}else o=!0}return o&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}}r({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Pi,this._timeline):(this._timeline=t,this)}}});class Wi extends ie{constructor(t){super(),this.id=Wi.id++,t=null==t?oe.duration:t,t="function"===typeof t?new Je(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"===typeof t&&t,this._isDeclarative=t instanceof Je,this._stepper=this._isDeclarative?t:new Qe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new zt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let n=1,o=!1,r=0;return t=t||oe.duration,e=e||oe.delay,i=i||"last","object"!==typeof t||t instanceof Ze||(e=t.delay||e,i=t.when||i,o=t.swing||o,n=t.times||n,r=t.wait||r,t=t.duration||oe.duration),{duration:t,delay:e,swing:o,times:n,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t,e){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const n=Wi.sanitise(t,e,i),o=new Wi(n.duration);return this._timeline&&o.timeline(this._timeline),this._element&&o.element(this._element),o.loop(n).schedule(n.delay,n.when)}clearTransform(){return this.transforms=new zt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(t=>!t.isTransform))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Qe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"===typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=this._time-t*e,n=i/this._duration;return Math.min(t+n,this._times)}const i=Math.floor(t),n=t%1,o=e*i+this._duration*n;return this.time(o)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,n=this._wait,o=this._times,r=this._swing,s=this._reverse;let a;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(n+i))/(n+i)),o=e&&!s||!e&&s,a=Math.pow(-1,o)*(t%(n+i))/i+o,h=Math.max(Math.min(a,1),0);return h},h=o*(n+i)-n;return a=e<=0?Math.round(t(1e-5)):e<h?t(e):Math.round(t(h-1e-5)),a}const h=Math.floor(this.loops()),d=r&&h%2===0,l=d&&!s||s&&d;return a=h+(l?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,i,n){this._queue.push({initialiser:t||ne,runner:e||ne,retarget:i,isTransform:n,initialised:!1,finished:!1});const o=this.timeline();return o&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,i){if(t instanceof Pi||(i=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,i),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),i=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const n=this.duration(),o=this._lastTime<=0&&this._time>0,r=this._lastTime<n&&this._time>=n;this._lastTime=this._time,o&&this.fire("start",this);const s=this._isDeclarative;this.done=!s&&!r&&this._time>=n,this._reseted=!1;let a=!1;return(i||s)&&(this._initialise(i),this.transforms=new zt,a=this._run(s?t:e),this.fire("step",this)),this.done=this.done||a&&s,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return"undefined"===typeof t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;e<i;++e){const i=this._queue[e],n=this._isDeclarative||!i.initialised&&t;t=!i.finished,n&&t&&(i.initialiser.call(this),i.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let i=0,n=this._queue.length;i<n;++i){const n=this._queue[i],o=n.runner.call(this,t);n.finished=n.finished||!0===o,e=e&&n.finished}return e}_tryRetarget(t,e,i){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,i):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const n=this.timeline();return n&&n.play(),!0}return!1}}Wi.id=0;class Hi{constructor(t=new zt,e=-1,i=!0){this.transforms=t,this.id=e,this.done=i}clearTransformsFromQueue(){}}I([Wi,Hi],{mergeWith(t){return new Hi(t.transforms.lmultiply(this.transforms),t.id)}});const ji=(t,e)=>t.lmultiplyO(e),Gi=t=>t.transforms;function $i(){const t=this._transformationRunners.runners,e=t.map(Gi).reduce(ji,new zt);this.transform(e),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ui{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Hi).forEach(t=>t.clearTransformsFromQueue()),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const i=this.runners[e],n=t&&i.done&&t.done&&(!i._timeline||!i._timeline._runnerIds.includes(i.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id));if(n){this.remove(i.id);const n=i.mergeWith(t);this.edit(t.id,n),t=n,--e}else t=i}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}r({Element:{animate(t,e,i){const n=Wi.sanitise(t,e,i),o=this.timeline();return new Wi(n.duration).loop(n).element(this).timeline(o.play()).schedule(n.delay,n.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter(e=>e.id<=t.id).map(Gi).reduce(ji,new zt)},_addRunner(t){this._transformationRunners.add(t),Ii.cancelImmediate(this._frameId),this._frameId=Ii.immediate($i.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ui).add(new Hi(new zt(this))))}}});const Yi=(t,e)=>t.filter(t=>!e.includes(t));I(Wi,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"===typeof e)return this.styleAttr(t,{[e]:i});let n=e;if(this._tryRetarget(t,n))return this;let o=new bi(this._stepper).to(n),r=Object.keys(n);return this.queue((function(){o=o.from(this.element()[t](r))}),(function(e){return this.element()[t](o.at(e).valueOf()),o.done()}),(function(e){const i=Object.keys(e),s=Yi(i,r);if(s.length){const e=this.element()[t](s),i=new Ci(o.from()).valueOf();Object.assign(i,e),o.from(i)}const a=new Ci(o.to()).valueOf();Object.assign(a,e),o.to(a),r=i,n=e})),this._rememberMorpher(t,o),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new bi(this._stepper).to(new ae(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,n){e=n,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const n=zt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!n;const o=new bi(this._stepper).type(i?yi:zt);let r,s,a,h,d;function l(){s=s||this.element(),r=r||m(t,s),d=new zt(e?void 0:s),s._addRunner(this),e||s._clearTransformRunnersBefore(this)}function c(l){e||this.clearTransform();const{x:c,y:u}=new St(r).transform(s._currentTransform(this));let f=new zt({...t,origin:[c,u]}),p=this._isDeclarative&&a?a:d;if(i){f=f.decompose(c,u),p=p.decompose(c,u);const t=f.rotate,e=p.rotate,i=[t-360,t,t+360],n=i.map(t=>Math.abs(t-e)),o=Math.min(...n),r=n.indexOf(o);f.rotate=i[r]}e&&(n||(f.rotate=t.rotate||0),this._isDeclarative&&h&&(p.rotate=h)),o.from(p),o.to(f);const g=o.at(l);return h=g.rotate,a=new zt(g),this.addTransform(a),s._addRunner(this),o.done()}function u(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=m(e,s)),t={...e,origin:r}}return this.queue(l,c,u,!0),this._isDeclarative&&this._rememberMorpher("transform",o),this},x(t,e){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new ae(e),this._tryRetarget(t,e))return this;const i=new bi(this._stepper).to(e);let n=null;return this.queue((function(){n=this.element()[t](),i.from(n),i.to(n+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(n+new ae(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new bi(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new ae(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,n){if(4===arguments.length)return this.plot([t,e,i,n]);if(this._tryRetarget("plot",t))return this;const o=new bi(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){o.from(this._element.array())}),(function(t){return this._element.plot(o.at(t)),o.done()})),this._rememberMorpher("plot",o),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,n){return this._queueObject("viewbox",new Ft(t,e,i,n))},update(t){return"object"!==typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(Wi,{rx:_e,ry:Me,from:Oe,to:ke}),R(Wi,"Runner");class Xi extends we{constructor(t,e=t){super(L("svg",t),e),this.namespace()}defs(){return this.isRoot()?S(this.node.querySelector("defs"))||this.put(new Ce):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof v.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:b,version:"1.1"}).attr("xmlns:xlink",w,y).attr("xmlns:svgjs",C,y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,y).attr("xmlns:svgjs",null,y)}root(){return this.isRoot()?this:super.root()}}r({Container:{nested:B((function(){return this.put(new Xi)}))}}),R(Xi,"Svg",!0);class Vi extends we{constructor(t,e=t){super(L("symbol",t),e)}}function Ki(t){return!1===this._build&&this.clear(),this.node.appendChild(v.document.createTextNode(t)),this}function qi(){return this.node.getComputedTextLength()}function Zi(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Qi(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Ji(t,e,i=this.bbox()){return this.x(t,i).y(e,i)}function tn(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function en(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function nn(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)}function on(t){return this.attr("x",t)}function rn(t){return this.attr("y",t)}function sn(t,e){return this.ax(t).ay(e)}function an(t){return this._build=!!t,this}r({Container:{symbol:B((function(){return this.put(new Vi)}))}}),R(Vi,"Symbol");var hn={__proto__:null,plain:Ki,length:qi,x:Zi,y:Qi,move:Ji,cx:tn,cy:en,center:nn,ax:on,ay:rn,amove:sn,build:an};class dn extends ve{constructor(t,e=t){super(L("text",t),e),this.dom.leading=new ae(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new ae(t),this.rebuild())}rebuild(t){if("boolean"===typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(n){const o=v.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new ae(o);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",n?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new ae(t.leading||1.3),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let n=0,o=e.length;n<o;++n)"textPath"!==e[n].nodeName?(n!==i&&3!==e[n].nodeType&&!0===S(e[n]).dom.newLined&&(t+="\n"),t+=e[n].textContent):0===n&&(i=1);return t}if(this.clear().build(!0),"function"===typeof t)t.call(this,this);else{t=(t+"").split("\n");for(let e=0,i=t.length;e<i;e++)this.newLine(t[e])}return this.build(!1).rebuild()}}I(dn,hn),r({Container:{text:B((function(t=""){return this.put(new dn).text(t)})),plain:B((function(t=""){return this.put(new dn).plain(t)}))}}),R(dn,"Text");class ln extends ve{constructor(t,e=t){super(L("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof dn))return this;const e=t.index(this),i=v.window.getComputedStyle(this.node).getPropertyValue("font-size"),n=t.dom.leading*new ae(i);return this.dy(e?n:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"===typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(ln,hn),r({Tspan:{tspan:B((function(t=""){const e=new ln;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),R(ln,"Tspan");class cn extends ve{constructor(t,e=t){super(L("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new ae(t).divide(2))}}I(cn,{x:Ee,y:Ne,cx:Te,cy:Le,width:Se,height:De}),r({Container:{circle:B((function(t=0){return this.put(new cn).size(t).move(0,0)}))}}),R(cn,"Circle");class un extends we{constructor(t,e=t){super(L("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return Ut("svg [clip-path*="+this.id()+"]")}}r({Container:{clip:B((function(){return this.defs().put(new un)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof un?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),R(un,"ClipPath");class fn extends ue{constructor(t,e=t){super(L("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((i,n)=>{let o;try{o=i.bbox()}catch(h){return}const r=new zt(i),s=r.translate(t,e).transform(r.inverse()),a=new St(o.x,o.y).transform(s);i.move(a.x,a.y)}),this}function gn(t){return this.dmove(t,0)}function mn(t){return this.dmove(0,t)}function bn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function xn(t=0,e=0,i=this.bbox()){const n=t-i.x,o=e-i.y;return this.dmove(n,o)}function yn(t,e,i=this.bbox()){const n=g(this,t,e,i),o=n.width/i.width,r=n.height/i.height;return this.children().forEach((t,e)=>{const n=new St(i).transform(new zt(t).inverse());t.scale(o,r,n.x,n.y)}),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function Cn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function vn(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}r({Container:{foreignObject:B((function(t,e){return this.put(new fn).size(t,e)}))}}),R(fn,"ForeignObject");var _n={__proto__:null,dmove:pn,dx:gn,dy:mn,height:bn,move:xn,size:yn,width:wn,x:Cn,y:vn};class Mn extends we{constructor(t,e=t){super(L("g",t),e)}}I(Mn,_n),r({Container:{group:B((function(){return this.put(new Mn)}))}}),R(Mn,"G");class En extends we{constructor(t,e=t){super(L("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,w)}}I(En,_n),r({Container:{link:B((function(t){return this.put(new En).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new En,this.wrap(e)),"function"===typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),R(En,"A");class Nn extends we{constructor(t,e=t){super(L("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Ut("svg [mask*="+this.id()+"]")}}r({Container:{mask:B((function(){return this.defs().put(new Nn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Nn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),R(Nn,"Mask");class Tn extends ue{constructor(t,e=t){super(L("stop",t),e)}update(t){return("number"===typeof t||t instanceof ae)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new ae(t.offset)),this}}function Ln(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const n in e)i+=f(n)+":"+e[n]+";";return i+="}",i}r({Gradient:{stop:function(t,e,i){return this.put(new Tn).update(t,e,i)}}}),R(Tn,"Stop");class Sn extends ue{constructor(t,e=t){super(L("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(Ln(t,e))}}r("Dom",{style(t,e){return this.put(new Sn).rule(t,e)},fontface(t,e,i){return this.put(new Sn).font(t,e,i)}}),R(Sn,"Style");class Dn extends dn{constructor(t,e=t){super(L("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}r({Container:{textPath:B((function(t,e){return t instanceof dn||(t=this.text(t)),t.path(e)}))},Text:{path:B((function(t,e=!0){const i=new Dn;let n;if(t instanceof Ei||(t=this.defs().path(t)),i.attr("href","#"+t,w),e)while(n=this.node.firstChild)i.node.appendChild(n);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:B((function(t){return t instanceof dn||(t=(new dn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Ut("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),Dn.prototype.MorphArray=gi,R(Dn,"TextPath");class Rn extends ve{constructor(t,e=t){super(L("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,w)}}r({Container:{use:B((function(t,e){return this.put(new Rn).use(t,e)}))}}),R(Rn,"Use");const zn=T;I([Xi,Vi,Pe,Fe,Ve],s("viewbox")),I([Xe,Ai,zi,Ei],s("marker")),I(dn,s("Text")),I(Ei,s("Path")),I(Ce,s("Defs")),I([dn,ln],s("Tspan")),I([Oi,ze,Be,Wi],s("radius")),I(ie,s("EventTarget")),I(ce,s("Dom")),I(ue,s("Element")),I(ve,s("Shape")),I([we,Ae],s("Container")),I(Be,s("Gradient")),I(Wi,s("Runner")),Gt.extend(a()),_i([ae,Lt,Ft,zt,se,We,gi,St]),Mi()},"8b00":function(t,e,i){"use strict";var n=i("23e7"),o=i("68df"),r=i("dad2");n({target:"Set",proto:!0,real:!0,forced:!r("isSubsetOf")},{isSubsetOf:o})},"8d8b":function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return n}));class n{static applyBehavior(t){t.nodeData.data.isFlowChart&&(t._isFlowChartNode=!0,t.freePosition=!0)}static isFlowChartNode(t){return t&&t.data&&!0===t.data.isFlowChart}static getFlowChartConfig(t){return this.isFlowChartNode(t)?t.data.flowchart||{}:null}static setFlowChartConfig(t,e){t.data||(t.data={}),t.data.isFlowChart=!0,t.data.flowchart={...t.data.flowchart,...e}}static convertToFlowChart(t,e={}){const i={nodeType:"process",showConnectors:!0,connectorPositions:["top","right","bottom","left"],preventOverlap:!0,hideExpandBtn:!0,hideAddBtn:!0};this.setFlowChartConfig(t,{...i,...e})}static convertToNormal(t){t.data&&(delete t.data.isFlowChart,delete t.data.flowchart)}}},"8e16":function(t,e,i){"use strict";var n=i("7282"),o=i("cb27");t.exports=n(o.proto,"size","get")||function(t){return t.size}},"91d2":function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,o="~";function r(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function a(t,e,i,n,r){if("function"!==typeof i)throw new TypeError("The listener must be a function");var a=new s(i,n||t,r),h=o?o+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function h(t,e){0===--t._eventsCount?t._events=new r:delete t._events[e]}function d(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(o=!1)),d.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},d.prototype.listeners=function(t){var e=o?o+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,s=new Array(r);n<r;n++)s[n]=i[n].fn;return s},d.prototype.listenerCount=function(t){var e=o?o+t:t,i=this._events[e];return i?i.fn?1:i.length:0},d.prototype.emit=function(t,e,i,n,r,s){var a=o?o+t:t;if(!this._events[a])return!1;var h,d,l=this._events[a],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,i),!0;case 4:return l.fn.call(l.context,e,i,n),!0;case 5:return l.fn.call(l.context,e,i,n,r),!0;case 6:return l.fn.call(l.context,e,i,n,r,s),!0}for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];l.fn.apply(l.context,h)}else{var u,f=l.length;for(d=0;d<f;d++)switch(l[d].once&&this.removeListener(t,l[d].fn,void 0,!0),c){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,e);break;case 3:l[d].fn.call(l[d].context,e,i);break;case 4:l[d].fn.call(l[d].context,e,i,n);break;default:if(!h)for(u=1,h=new Array(c-1);u<c;u++)h[u-1]=arguments[u];l[d].fn.apply(l[d].context,h)}}return!0},d.prototype.on=function(t,e,i){return a(this,t,e,i,!1)},d.prototype.once=function(t,e,i){return a(this,t,e,i,!0)},d.prototype.removeListener=function(t,e,i,n){var r=o?o+t:t;if(!this._events[r])return this;if(!e)return h(this,r),this;var s=this._events[r];if(s.fn)s.fn!==e||n&&!s.once||i&&s.context!==i||h(this,r);else{for(var a=0,d=[],l=s.length;a<l;a++)(s[a].fn!==e||n&&!s[a].once||i&&s[a].context!==i)&&d.push(s[a]);d.length?this._events[r]=1===d.length?d[0]:d:h(this,r)}return this},d.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&h(this,e)):(this._events=new r,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=o,d.EventEmitter=d,t.exports=d},"953b":function(t,e,i){"use strict";var n=i("dc19"),o=i("cb27"),r=i("8e16"),s=i("7f65"),a=i("384f"),h=i("5388"),d=o.Set,l=o.add,c=o.has;t.exports=function(t){var e=n(this),i=s(t),o=new d;return r(e)>i.size?h(i.getIterator(),(function(t){c(e,t)&&l(o,t)})):a(e,(function(t){i.includes(t)&&l(o,t)})),o}},9961:function(t,e,i){"use strict";var n=i("dc19"),o=i("cb27"),r=i("83b9"),s=i("7f65"),a=i("5388"),h=o.add,d=o.has,l=o.remove;t.exports=function(t){var e=n(this),i=s(t).getIterator(),o=r(e);return a(i,(function(t){d(e,t)?l(o,t):h(o,t)})),o}},a06c:function(t){t.exports=JSON.parse('{"name":"simple-mind-map","version":"0.13.1","description":"一个简单的web在线思维导图","authors":[{"name":"街角小林","email":"1013335014@qq.com"},{"name":"理想青年实验室","url":"http://lxqnsys.com/"}],"types":"./types/index.d.ts","typings":"./types/index.d.ts","license":"MIT","repository":{"type":"git","url":"https://github.com/wanglin2/mind-map"},"scripts":{"lint":"eslint src/","format":"prettier --write .","types":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types --target es2017 --skipLibCheck & node ./bin/createPluginsTypeFiles.js","wsServe":"node ./bin/wsServer.mjs"},"module":"index.js","main":"./dist/simpleMindMap.umd.min.js","dependencies":{"@svgdotjs/svg.js":"3.2.0","deepmerge":"^1.5.2","eventemitter3":"^4.0.7","jszip":"^3.10.1","katex":"^0.16.8","mdast-util-from-markdown":"^1.3.0","pdf-lib":"^1.17.1","quill":"^2.0.3","tern":"^0.24.3","uuid":"^9.0.0","ws":"^7.5.9","xml-js":"^1.6.11","y-webrtc":"^10.2.5","yjs":"^13.6.8"},"keywords":["javascript","svg","mind-map","mindMap","MindMap"],"devDependencies":{"eslint":"^8.25.0","prettier":"^2.7.1"},"volta":{"node":"18.20.4"}}')},a4e7:function(t,e,i){"use strict";var n=i("23e7"),o=i("395e"),r=i("dad2");n({target:"Set",proto:!0,real:!0,forced:!r("isSupersetOf")},{isSupersetOf:o})},a5f7:function(t,e,i){"use strict";var n=i("dc19"),o=i("cb27"),r=i("83b9"),s=i("8e16"),a=i("7f65"),h=i("384f"),d=i("5388"),l=o.has,c=o.remove;t.exports=function(t){var e=n(this),i=a(t),o=r(e);return s(e)<=i.size?h(e,(function(t){i.includes(t)&&c(o,t)})):d(i.getIterator(),(function(t){l(e,t)&&c(o,t)})),o}},a640:function(t,e,i){"use strict";var n=i("d039");t.exports=function(t,e){var i=[][t];return!!i&&n((function(){i.call(null,e||function(){return 1},1)}))}},b4bc:function(t,e,i){"use strict";var n=i("dc19"),o=i("cb27").has,r=i("8e16"),s=i("7f65"),a=i("384f"),h=i("5388"),d=i("2a62");t.exports=function(t){var e=n(this),i=s(t);if(r(e)<=i.size)return!1!==a(e,(function(t){if(i.includes(t))return!1}),!0);var l=i.getIterator();return!1!==h(l,(function(t){if(o(e,t))return d(l,"normal",!1)}))}},c01e:function(t,e,i){"use strict";i("a4e7")},c1a1:function(t,e,i){"use strict";var n=i("23e7"),o=i("b4bc"),r=i("dad2");n({target:"Set",proto:!0,real:!0,forced:!r("isDisjointFrom")},{isDisjointFrom:o})},cb27:function(t,e,i){"use strict";var n=i("e330"),o=Set.prototype;t.exports={Set:Set,add:n(o.add),has:n(o.has),remove:n(o["delete"]),proto:o}},d58f:function(t,e,i){"use strict";var n=i("59ed"),o=i("7b0b"),r=i("44ad"),s=i("07fa"),a=TypeError,h="Reduce of empty array with no initial value",d=function(t){return function(e,i,d,l){var c=o(e),u=r(c),f=s(c);if(n(i),0===f&&d<2)throw new a(h);var p=t?f-1:0,g=t?-1:1;if(d<2)while(1){if(p in u){l=u[p],p+=g;break}if(p+=g,t?p<0:f<=p)throw new a(h)}for(;t?p>=0:f>p;p+=g)p in u&&(l=i(l,u[p],p,c));return l}};t.exports={left:d(!1),right:d(!0)}},d6d6:function(t,e,i){"use strict";var n=TypeError;t.exports=function(t,e){if(t<e)throw new n("Not enough arguments");return t}},dad2:function(t,e,i){"use strict";var n=i("d066"),o=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var e=n("Set");try{(new e)[t](o(0));try{return(new e)[t](o(-1)),!1}catch(i){return!0}}catch(r){return!1}}},dc19:function(t,e,i){"use strict";var n=i("cb27").has;t.exports=function(t){return n(t),t}},de81:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("1e42");const o=t=>{if(!t)return"";const e=t.text||"";return t.richText?Object(n["lb"])(e):e},r=t=>new Array(t).fill(" ").join(""),s=t=>{const e=Object(n["mb"])(t).filter(t=>t&&t.data);let i="";return e.forEach((t,s)=>{Object(n["Db"])(t,null,(t,e,n,s)=>{if(!t||!t.data)return;i+=r(s),i+=" "+o(t.data);const a=t.data.generalization;Array.isArray(a)?i+=a.map(t=>` [${o(t)}]`):a&&a.text&&(i+=` [${o(a)}]`),i+="\n\n"},()=>{},!0),s<e.length-1&&(i+="\n")}),i}},e9bc:function(t,e,i){"use strict";var n=i("dc19"),o=i("cb27").add,r=i("83b9"),s=i("7f65"),a=i("5388");t.exports=function(t){var e=n(this),i=s(t).getIterator(),h=r(e);return a(i,(function(t){o(h,t)})),h}},eb03:function(t,e,i){"use strict";i("c1a1")},eb04:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));const n={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Esc:27,Spacebar:32,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Left:37,Up:38,Right:39,Down:40,Del:46,NumLock:144,Cmd:91,CmdFF:224,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"`":192,"=":187,"-":189,"/":191,".":190};for(let r=0;r<=9;r++)n[r]=r+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((t,e)=>{n[t]=e+65});const o=n},fa76:function(t,e,i){"use strict";i("1e5a")}}]);