11 lines
335 KiB
JavaScript
11 lines
335 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7876ac9f"],{"0a76":function(t){t.exports={name:"simple-mind-map",version:"0.14.0-fix.2",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"},__npminstall_done:!0,_from:"simple-mind-map@0.14.0-fix.2",_resolved:"https://registry.npmmirror.com/simple-mind-map/-/simple-mind-map-0.14.0-fix.2.tgz"}},"1af2":function(t,e,i){"use strict";const n={CHANGE_THEME:"changeTheme",CHANGE_LAYOUT:"changeLayout",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",FISHBONE2:"fishbone2",RIGHT_FISHBONE:"rightFishbone",RIGHT_FISHBONE2:"rightFishbone2",VERTICAL_TIMELINE:"verticalTimeline",VERTICAL_TIMELINE2:"verticalTimeline2",VERTICAL_TIMELINE3:"verticalTimeline3"},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"}},s={[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=(n.LAYOUT.LOGICAL_STRUCTURE,n.LAYOUT.LOGICAL_STRUCTURE_LEFT,n.LAYOUT.MIND_MAP,n.LAYOUT.ORGANIZATION_STRUCTURE,n.LAYOUT.CATALOG_ORGANIZATION,n.LAYOUT.TIMELINE,n.LAYOUT.TIMELINE2,n.LAYOUT.VERTICAL_TIMELINE,n.LAYOUT.VERTICAL_TIMELINE2,n.LAYOUT.VERTICAL_TIMELINE3,n.LAYOUT.FISHBONE,n.LAYOUT.FISHBONE2,n.LAYOUT.RIGHT_FISHBONE,n.LAYOUT.RIGHT_FISHBONE2,[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.VERTICAL_TIMELINE2,n.LAYOUT.VERTICAL_TIMELINE3,n.LAYOUT.FISHBONE,n.LAYOUT.FISHBONE2,n.LAYOUT.RIGHT_FISHBONE,n.LAYOUT.RIGHT_FISHBONE2]),o=["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","imgMap","nodeLink"],a={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"},h="\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",d=1.2,l=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color","textAlign"];class c{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,s)=>{const{customHandleMousewheel:r,mousewheelAction:o,mouseScaleCenterUseMousePosition:a,mousewheelMoveStep:h,mousewheelZoomActionReverse:d,disableMouseWheelZoom:l,translateRatio:c}=this.mindMap.opt;if(r&&"function"===typeof r)return r(t);if(o===n.MOUSE_WHEEL_ACTION.ZOOM||t.ctrlKey||t.metaKey){if(l)return;const{x:i,y:r}=this.mindMap.toPos(t.clientX,t.clientY),o=a?i:void 0,h=a?r:void 0;switch(s&&(e.includes(n.DIR.LEFT)||e.includes(n.DIR.RIGHT))&&(e=e.filter(t=>![n.DIR.LEFT,n.DIR.RIGHT].includes(t))),!0){case e.includes(n.DIR.UP||n.DIR.LEFT):d?this.enlarge(o,h,s):this.narrow(o,h,s);break;case e.includes(n.DIR.DOWN||n.DIR.RIGHT):d?this.narrow(o,h,s):this.enlarge(o,h,s);break}}else{let i=0,r=0;s?(i=Math.abs(t.wheelDeltaX),r=Math.abs(t.wheelDeltaY)):i=r=h;let o=0,a=0;e.includes(n.DIR.DOWN)&&(a=-r),e.includes(n.DIR.UP)&&(a=r),e.includes(n.DIR.LEFT)&&(o=i),e.includes(n.DIR.RIGHT)&&(o=-i),this.translateXY(o*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:s}=this.mindMap.opt;n/=i?5:1;const r=Math.max(this.scale-n,s/100);this.scaleInCenter(r,t,e),this.transform(),this.emitEvent("scale")}enlarge(t,e,i){let{scaleRatio:n,maxZoomRatio:s}=this.mindMap.opt;n/=i?5:1;let r=0;r=-1===s?this.scale+n:Math.min(this.scale+n,s/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,s=1-t/n,r=(e-this.x)*s,o=(i-this.y)*s;this.x+=r,this.y+=o,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,s=n.transform(),r=t()||n.rbox(),o=r.width/s.scaleX,a=r.height/s.scaleY,h=o/a;let{width:d,height:l}=this.mindMap.elRect;d-=2*i,l-=2*i;const c=d/l;let u=0,p="";if(o<=d&&a<=l&&!e)u=1,p=1;else{let t=0,e=0;h>c?(t=d,e=d/h,p=2):(e=l,t=l*h,p=3),u=t/o}this.setScale(u);const m=t()||n.rbox();m.x-=this.mindMap.elRect.left,m.y-=this.mindMap.elRect.top;let g=0,f=0;1===p?(g=-m.x+i+(d-m.width)/2,f=-m.y+i+(l-m.height)/2):2===p?(g=-m.x+i,f=-m.y+i+(l-m.height)/2):3===p&&(g=-m.x+i+(d-m.width)/2,f=-m.y+i),this.translateXY(g,f)}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:s}=this.getPositionLimit();const r=(this.mindMap.width-this.mindMap.initWidth)/2*t,o=(this.mindMap.height-this.mindMap.initHeight)/2*t,a=this.scale/t;e*=a,n*=a,i*=a,s*=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-o,s-=l*d-o,this.x>e&&(this.x=e),this.x<n&&(this.x=n),this.y>i&&(this.y=i),this.y<s&&(this.y=s)}getPositionLimit(){const{scaleX:t,scaleY:e}=this.mindMap.draw.transform(),i=this.mindMap.draw.rbox(),n=this.mindMap.renderer.root.group.rbox(),s=this.mindMap.renderer.layout.getRootCenterOffset(n.width,n.height),r=n.x-i.x-s.x*t,o=n.x-i.x2-s.x*t,a=n.y-i.y-s.y*e,h=n.y-i.y2-s.y*e;return{scale:t,left:r,right:o,top:a,bottom:h}}emitEvent(t){switch(t){case"scale":this.mindMap.emit("scale",this.scale);case"translate":this.mindMap.emit("translate",this.x,this.y)}}}var u=c,p=i("da91"),m=i.n(p);class g extends m.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){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){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.DIR.UP),t.deltaY>0&&e.push(n.DIR.DOWN),t.deltaX<0&&e.push(n.DIR.LEFT),t.deltaX>0&&e.push(n.DIR.RIGHT);let i=!1;const{customCheckIsTouchPad:s}=this.mindMap.opt;i="function"===typeof s?s(t):Math.abs(t.deltaY)<=10,this.emit("mousewheel",t,e,this,i)}onContextmenu(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 f=g,x=i("5baf4"),w=i.n(x);const y="undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var v={randomUUID:y};let _;const M=new Uint8Array(16);function E(){if(!_&&(_="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _(M)}const N=[];for(let Xa=0;Xa<256;++Xa)N.push((Xa+256).toString(16).slice(1));function T(t,e=0){return N[t[e+0]]+N[t[e+1]]+N[t[e+2]]+N[t[e+3]]+"-"+N[t[e+4]]+N[t[e+5]]+"-"+N[t[e+6]]+N[t[e+7]]+"-"+N[t[e+8]]+N[t[e+9]]+"-"+N[t[e+10]]+N[t[e+11]]+N[t[e+12]]+N[t[e+13]]+N[t[e+14]]+N[t[e+15]]}function C(t,e,i){if(v.randomUUID&&!e&&!t)return v.randomUUID();t=t||{};const n=t.random||(t.rng||E)();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 T(n)}var L=C;function D(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)}D.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},D.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}
|
||
/*!
|
||
* @svgdotjs/svg.js - A lightweight library for manipulating and animating SVG.
|
||
* @version 3.2.0
|
||
* https://svgjs.dev/
|
||
*
|
||
* @copyright Wout Fierens <wout@mick-wout.com>
|
||
* @license MIT
|
||
*
|
||
* BUILT: Mon Jun 12 2023 10:34:51 GMT+0200 (Central European Summer Time)
|
||
*/;const b={},A=[];function R(t,e){if(Array.isArray(t))for(const i of t)R(i,e);else if("object"!==typeof t)I(Object.getOwnPropertyNames(e)),b[t]=Object.assign(b[t]||{},e);else for(const i in t)R(i,t[i])}function S(t){return b[t]||{}}function O(){return[...new Set(A)]}function I(t){A.push(...t)}function z(t,e){let i;const n=t.length,s=[];for(i=0;i<n;i++)s.push(e(t[i]));return s}function F(t,e){let i;const n=t.length,s=[];for(i=0;i<n;i++)e(t[i])&&s.push(t[i]);return s}function k(t){return t%360*Math.PI/180}function B(t){return t.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}function P(t){return t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))}function H(t){return t.charAt(0).toUpperCase()+t.slice(1)}function U(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 G(t,e){const i=t.origin;let n=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",s=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=i&&([n,s]=Array.isArray(i)?i:"object"===typeof i?[i.x,i.y]:[i,i]);const r="string"===typeof n,o="string"===typeof s;if(r||o){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),o&&(s=s.includes("top")?h:s.includes("bottom")?h+t:h+t/2)}return[n,s]}const $="http://www.w3.org/2000/svg",Y="http://www.w3.org/1999/xhtml",W="http://www.w3.org/2000/xmlns/",V="http://www.w3.org/1999/xlink",j="http://svgjs.dev/svgjs";const X={window:"undefined"===typeof window?null:window,document:"undefined"===typeof document?null:document};class K{}const q={},Z="___SYMBOL___ROOT___";function Q(t,e=$){return X.document.createElementNS(e,t)}function J(t,e=!1){if(t instanceof K)return t;if("object"===typeof t)return it(t);if(null==t)return new q[Z];if("string"===typeof t&&"<"!==t.charAt(0))return it(X.document.querySelector(t));const i=e?X.document.createElement("div"):Q("svg");return i.innerHTML=t,t=it(i.firstChild),i.removeChild(i.firstChild),t}function tt(t,e){return e&&e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node?e:Q(t)}function et(t){if(!t)return null;if(t.instance instanceof K)return t.instance;if("#document-fragment"===t.nodeName)return new q.Fragment(t);let e=H(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":q[e]||(e="Dom"),new q[e](t)}let it=et;function nt(t,e=t.name,i=!1){return q[e]=t,i&&(q[Z]=t),I(Object.getOwnPropertyNames(t.prototype)),t}function st(t){return q[t]}let rt=1e3;function ot(t){return"Svgjs"+H(t)+rt++}function at(t){for(let e=t.children.length-1;e>=0;e--)at(t.children[e]);return t.id?(t.id=ot(t.nodeName),t):t}function ht(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 dt(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 lt(){return this.parent().children()}function ct(){return this.parent().index(this)}function ut(){return this.siblings()[this.position()+1]}function pt(){return this.siblings()[this.position()-1]}function mt(){const t=this.position(),e=this.parent();return e.add(this.remove(),t+1),this}function gt(){const t=this.position(),e=this.parent();return e.add(this.remove(),t?t-1:0),this}function ft(){const t=this.parent();return t.add(this.remove()),this}function xt(){const t=this.parent();return t.add(this.remove(),0),this}function wt(t){t=J(t),t.remove();const e=this.position();return this.parent().add(t,e),this}function yt(t){t=J(t),t.remove();const e=this.position();return this.parent().add(t,e+1),this}function vt(t){return t=J(t),t.before(this),this}function _t(t){return t=J(t),t.after(this),this}R("Dom",{siblings:lt,position:ct,next:ut,prev:pt,forward:mt,backward:gt,front:ft,back:xt,before:wt,after:yt,insertBefore:vt,insertAfter:_t});const Mt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Nt=/rgb\((\d+),(\d+),(\d+)\)/,Tt=/(#[a-z_][a-z0-9\-_]*)/i,Ct=/\)\s*,?\s*/,Lt=/\s/g,Dt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,bt=/^rgb\(/,At=/^(\s+)?$/,Rt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,St=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Ot=/[\s,]+/,It=/[MLHVCSQTAZ]/i;function zt(){const t=this.attr("class");return null==t?[]:t.trim().split(Ot)}function Ft(t){return-1!==this.classes().indexOf(t)}function kt(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this}function Bt(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this}function Pt(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}function Ht(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=B(e);i[e]=this.node.style[t]}return i}if("string"===typeof t)return this.node.style[B(t)];if("object"===typeof t)for(const e in t)this.node.style[B(e)]=null==t[e]||At.test(t[e])?"":t[e]}return 2===arguments.length&&(this.node.style[B(t)]=null==e||At.test(e)?"":e),this}function Ut(){return this.css("display","")}function Gt(){return this.css("display","none")}function $t(){return"none"!==this.css("display")}function Yt(t,e,i){if(null==t)return this.data(z(F(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 Wt(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 Vt(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this}function jt(){return this._memory=this._memory||{}}function Xt(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 Kt(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 qt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function Zt(t,e){const i=qt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:qt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:qt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:qt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:qt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:qt(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 Qt(t){return"lab"===t||"xyz"===t||"lch"===t}function Jt(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:zt,hasClass:Ft,addClass:kt,removeClass:Bt,toggleClass:Pt}),R("Dom",{css:Ht,show:Ut,hide:Gt,visible:$t}),R("Dom",{data:Yt}),R("Dom",{remember:Wt,forget:Vt,memory:jt});class te{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof te||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:s,sin:r,PI:o}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,i=360*n(),s=new te(t,e,i,"lch");return s}if("sine"===t){e=null==e?n():e;const t=s(80*r(2*o*e/.5+.01)+150),i=s(50*r(2*o*e/.5+4.6)+200),a=s(100*r(2*o*e/.5+2.3)+150),h=new te(t,i,a);return h}if("pastel"===t){const t=8*n()+86,e=17*n()+9,i=360*n(),s=new te(t,e,i,"lch");return s}if("dark"===t){const t=10+10*n(),e=50*n()+86,i=360*n(),s=new te(t,e,i,"lch");return s}if("rgb"===t){const t=255*n(),e=255*n(),i=255*n(),s=new te(t,e,i);return s}if("lab"===t){const t=100*n(),e=256*n()-128,i=256*n()-128,s=new te(t,e,i,"lab");return s}if("grey"===t){const t=255*n(),e=new te(t,t,t);return e}throw new Error("Unsupported random color mode")}static test(t){return"string"===typeof t&&(Dt.test(t)||bt.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,s,r]=[t,e,i].map(t=>t/255),o=Math.min(1-n,1-s,1-r);if(1===o)return new te(0,0,0,1,"cmyk");const a=(1-n-o)/(1-o),h=(1-s-o)/(1-o),d=(1-r-o)/(1-o),l=new te(a,h,d,o,"cmyk");return l}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[n,s,r]=[t,e,i].map(t=>t/255),o=Math.max(n,s,r),a=Math.min(n,s,r),h=(o+a)/2,d=o===a,l=o-a,c=d?0:h>.5?l/(2-o-a):l/(o+a),u=d?0:o===n?((s-r)/l+(s<r?6:0))/6:o===s?((r-n)/l+2)/6:o===r?((n-s)/l+4)/6:0,p=new te(360*u,100*c,100*h,"hsl");return p}init(t=0,e=0,i=0,n=0,s="rgb"){if(t=t||0,this.space)for(const l in this.space)delete this[this.space[l]];if("number"===typeof t)s="string"===typeof n?n:s,n="string"===typeof n?0:n,Object.assign(this,{_a:t,_b:e,_c:i,_d:n,space:s});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=Zt(t,e);Object.assign(this,i)}else if("string"===typeof t)if(bt.test(t)){const e=t.replace(Lt,""),[i,n,s]=Nt.exec(e).slice(1,4).map(t=>parseInt(t));Object.assign(this,{_a:i,_b:n,_c:s,_d:0,space:"rgb"})}else{if(!Dt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,n,s]=Et.exec(Xt(t)).map(e);Object.assign(this,{_a:i,_b:n,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:o,_c:a,_d:h}=this,d="rgb"===this.space?{r:r,g:o,b:a}:"xyz"===this.space?{x:r,y:o,z:a}:"hsl"===this.space?{h:r,s:o,l:a}:"lab"===this.space?{l:r,a:o,b:a}:"lch"===this.space?{l:r,c:o,h:a}:"cmyk"===this.space?{c:r,m:o,y:a,k:h}:{};Object.assign(this,d)}lab(){const{x:t,y:e,z:i}=this.xyz(),n=116*e-16,s=500*(t-e),r=200*(e-i),o=new te(n,s,r,"lab");return o}lch(){const{l:t,a:e,b:i}=this.lab(),n=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);const r=new te(t,n,s,"lch");return r}rgb(){if("rgb"===this.space)return this;if(Qt(this.space)){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:n,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const o=(n+16)/116,a=s/500+o,h=o-r/200,d=16/116,l=.008856,c=7.787;t=.95047*(a**3>l?a**3:(a-d)/c),e=1*(o**3>l?o**3:(o-d)/c),i=1.08883*(h**3>l?h**3:(h-d)/c)}const n=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,o=Math.pow,a=.0031308,h=n>a?1.055*o(n,1/2.4)-.055:12.92*n,d=s>a?1.055*o(s,1/2.4)-.055:12.92*s,l=r>a?1.055*o(r,1/2.4)-.055:12.92*r,c=new te(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 te(i,i,i);return t}const n=i<.5?i*(1+e):i+e-i*e,s=2*i-n,r=255*Jt(s,n,t+1/3),o=255*Jt(s,n,t),a=255*Jt(s,n,t-1/3),h=new te(r,o,a);return h}if("cmyk"===this.space){const{c:t,m:e,y:i,k:n}=this,s=255*(1-Math.min(1,t*(1-n)+n)),r=255*(1-Math.min(1,e*(1-n)+n)),o=255*(1-Math.min(1,i*(1-n)+n)),a=new te(s,r,o);return a}return this}toArray(){const{_a:t,_b:e,_c:i,_d:n,space:s}=this;return[t,e,i,n,s]}toHex(){const[t,e,i]=this._clamped().map(Kt);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,s,r]=[t,e,i].map(t=>t/255),o=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,d=(.4124*o+.3576*a+.1805*h)/.95047,l=(.2126*o+.7152*a+.0722*h)/1,c=(.0193*o+.1192*a+.9505*h)/1.08883,u=d>.008856?Math.pow(d,1/3):7.787*d+16/116,p=l>.008856?Math.pow(l,1/3):7.787*l+16/116,m=c>.008856?Math.pow(c,1/3):7.787*c+16/116,g=new te(u,p,m,"xyz");return g}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:n,min:s,round:r}=Math,o=t=>n(0,s(r(t),255));return[t,e,i].map(o)}}class ee{constructor(...t){this.init(...t)}clone(){return new ee(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){se.isMatrixLike(t)||(t=new se(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 ie(t,e){return new ee(t,e).transformO(this.screenCTM().inverseO())}function ne(t,e,i){return Math.abs(e-t)<(i||1e-6)}class se{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,s=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,o=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 ee(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,u=l.y,p=new ee(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),m=p.x,g=p.y,f=new ee(t.translate||t.tx||t.translateX,t.ty||t.translateY),x=f.x,w=f.y,y=new ee(t.relative||t.rx||t.relativeX,t.ry||t.relativeY),v=y.x,_=y.y;return{scaleX:o,scaleY:a,skewX:s,skewY:r,shear:h,theta:d,rx:v,ry:_,tx:x,ty:w,ox:c,oy:u,px:m,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,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,o=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=s,i.c=r,i.d=o,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,s=e||0;return this.translateO(-n,-s).lmultiplyO(i).translateO(n,s)}clone(){return new se(this)}decompose(t=0,e=0){const i=this.a,n=this.b,s=this.c,r=this.d,o=this.e,a=this.f,h=i*r-n*s,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,p=Math.cos(c),m=Math.sin(c),g=(i*s+n*r)/h,f=s*l/(g*i-n)||r*l/(g*n+i),x=o-t+t*p*l+e*(g*p*l-m*f),w=a-e+t*m*l+e*(g*m*l+p*f);return{scaleX:l,scaleY:f,shear:g,rotate:u,translateX:x,translateY:w,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 se(t);return ne(this.a,e.a)&&ne(this.b,e.b)&&ne(this.c,e.c)&&ne(this.d,e.d)&&ne(this.e,e.e)&&ne(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=se.fromArray([1,0,0,1,0,0]);return t=t instanceof Be?t.matrixify():"string"===typeof t?se.fromArray(t.split(Ot).map(parseFloat)):Array.isArray(t)?se.fromArray(t):"object"===typeof t&&se.isMatrixLike(t)?t:"object"===typeof t?(new se).transform(t):6===arguments.length?se.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,s=this.e,r=this.f,o=t*n-e*i;if(!o)throw new Error("Cannot invert "+this);const a=n/o,h=-e/o,d=-i/o,l=t/o,c=-(a*s+d*r),u=-(h*s+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 se?t:new se(t);return se.matrixMultiply(i,e,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=this,i=t instanceof se?t:new se(t);return se.matrixMultiply(e,i,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=k(t);const n=Math.cos(t),s=Math.sin(t),{a:r,b:o,c:a,d:h,e:d,f:l}=this;return this.a=r*n-o*s,this.b=o*n+r*s,this.c=a*n-h*s,this.d=h*n+a*s,this.e=d*n-l*s+i*s-e*n+e,this.f=l*n+d*s-e*s-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:s,b:r,c:o,d:a,e:h,f:d}=this;return this.a=s*t,this.b=r*e,this.c=o*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:s,c:r,d:o,e:a,f:h}=this;return this.a=n+s*t,this.c=r+o*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=k(t),e=k(e);const s=Math.tan(t),r=Math.tan(e),{a:o,b:a,c:h,d:d,e:l,f:c}=this;return this.a=o+a*s,this.b=a+o*r,this.c=h+d*s,this.d=d+h*r,this.e=l+c*s-n*s,this.f=c+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(se.isMatrixLike(t)){const e=new se(t);return e.multiplyO(this)}const e=se.formatTransforms(t),i=this,{x:n,y:s}=new ee(e.ox,e.oy).transform(i),r=(new se).translateO(e.rx,e.ry).lmultiplyO(i).translateO(-n,-s).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,s);if(isFinite(e.px)||isFinite(e.py)){const t=new ee(n,s).transform(r),i=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;r.translateO(i,o)}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 re(){return new se(this.node.getCTM())}function oe(){if("function"===typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new se(e)}return new se(this.node.getScreenCTM())}function ae(){if(!ae.nodes){const t=J().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;ae.nodes={svg:t,path:e}}if(!ae.nodes.svg.node.parentNode){const t=X.document.body||X.document.documentElement;ae.nodes.svg.addTo(t)}return ae.nodes}function he(t){return!t.width&&!t.height&&!t.x&&!t.y}function de(t){return t===X.document||(X.document.documentElement.contains||function(t){while(t.parentNode)t=t.parentNode;return t===X.document}).call(X.document.documentElement,t)}nt(se,"Matrix");class le{constructor(...t){this.init(...t)}addOffset(){return this.x+=X.window.pageXOffset,this.y+=X.window.pageYOffset,new le(this)}init(t){const e=[0,0,0,0];return t="string"===typeof t?t.split(Ot).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 he(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,s=Math.max(this.y+this.height,t.y+t.height)-i;return new le(e,i,n,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof se||(t=new se(t));let e=1/0,i=-1/0,n=1/0,s=-1/0;const r=[new ee(this.x,this.y),new ee(this.x2,this.y),new ee(this.x,this.y2),new ee(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),s=Math.max(s,r.y)})),new le(e,n,i-e,s-n)}}function ce(t,e,i){let n;try{if(n=e(t.node),he(n)&&!de(t.node))throw new Error("Element not in the dom")}catch(s){n=i(t)}return n}function ue(){const t=t=>t.getBBox(),e=t=>{try{const e=t.clone().addTo(ae().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=ce(this,t,e),n=new le(i);return n}function pe(t){const e=t=>t.getBoundingClientRect(),i=t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)},n=ce(this,e,i),s=new le(n);return t?s.transform(t.screenCTM().inverseO()):s.addOffset()}function me(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 le(this.attr("viewBox")):this.attr("viewBox",new le(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 s=this.viewbox(),r=i/s.width,o=n/s.height,a=Math.min(r,o);if(null==t)return a;let h=a/t;h===1/0&&(h=Number.MAX_SAFE_INTEGER/100),e=e||new ee(i/2/r+s.x,n/2/o+s.y);const d=new le(s).transform(new se({scale:h,origin:e}));return this.viewbox(d)}}}),nt(le,"Box");class ge extends Array{constructor(t=[],...e){if(super(t,...e),"number"===typeof t)return this;this.length=0,this.push(...t)}}ht([ge],{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 fe=["toArray","constructor","each"];function xe(t,e){return new ge(z((e||X.document).querySelectorAll(t),(function(t){return et(t)})))}function we(t){return xe(t,this.node)}function ye(t){return et(this.node.querySelector(t))}ge.extend=function(t){t=t.reduce((t,e)=>(fe.includes(e)||"_"===e[0]||(t[e]=function(...t){return this.each(e,...t)}),t),{}),ht([ge],t)};let ve=0;const _e={};function Me(t){let e=t.getEventHolder();return e===X.window&&(e=_e),e.events||(e.events={}),e.events}function Ee(t){return t.getEventTarget()}function Ne(t){let e=t.getEventHolder();e===X.window&&(e=_e),e.events&&(e.events={})}function Te(t,e,i,n,s){const r=i.bind(n||t),o=J(t),a=Me(o),h=Ee(o);e=Array.isArray(e)?e:e.split(Ot),i._svgjsListenerId||(i._svgjsListenerId=++ve),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,s||!1)}))}function Ce(t,e,i,n){const s=J(t),r=Me(s),o=Ee(s);("function"!==typeof i||(i=i._svgjsListenerId,i))&&(e=Array.isArray(e)?e:(e||"").split(Ot),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||"*"]&&(o.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])Ce(o,[e,a].join("."),d);delete r[e][a]}}else if(a)for(t in r)for(h in r[t])a===h&&Ce(o,[t,a].join("."));else if(e){if(r[e]){for(h in r[e])Ce(o,[e,h].join("."));delete r[e]}}else{for(t in r)Ce(o,t);Ne(s)}})))}function Le(t,e,i,n){const s=Ee(t);return e instanceof X.window.Event||(e=new X.window.CustomEvent(e,{detail:i,cancelable:!0,...n})),s.dispatchEvent(e),e}class De extends K{addEventListener(){}dispatch(t,e,i){return Le(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 Ce(this,t,e,i),this}on(t,e,i,n){return Te(this,t,e,i,n),this}removeEventListener(){}}function be(){}nt(De,"EventTarget");const Ae={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(Ot).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 Oe{constructor(...t){this.init(...t)}convert(t){return new Oe(this.value,t)}divide(t){return t=new Oe(t),new Oe(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(Mt),e&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5])):t instanceof Oe&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new Oe(t),new Oe(this-t,this.unit||t.unit)}plus(t){return t=new Oe(t),new Oe(this+t,this.unit||t.unit)}times(t){return t=new Oe(t),new Oe(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 Ie=[];function ze(t){Ie.push(t)}function Fe(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=Ie.reduce((e,i)=>i(t,e,this),e),"number"===typeof e?e=new Oe(e):te.isColor(e)?e=new te(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 ke extends De{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return t=J(t),t.removeNamespace&&this.node instanceof X.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 J(t).put(this,e)}children(){return new ge(z(this.node.children,(function(t){return et(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=at(i)),new this.constructor(i)}each(t,e){const i=this.children();let n,s;for(n=0,s=i.length;n<s;n++)t.apply(i[n],[n,i]),e&&i[n].each(t,e);return this}element(t,e){return this.put(new ke(Q(t),e))}first(){return et(this.node.firstChild)}get(t){return et(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,Y)}id(t){return"undefined"!==typeof t||this.node.id||(this.node.id=ot(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return et(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=et(e.node.parentNode),!t)return e;do{if("string"===typeof t?e.matches(t):e instanceof t)return e}while(e=et(e.node.parentNode));return e}put(t,e){return t=J(t),this.add(t,e),t}putIn(t,e){return J(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=J(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 s in n)"number"===typeof n[s]&&(n[s]=Math.round(n[s]*i)/i);return this.attr(n),this}svg(t,e){return this.xml(t,e,$)}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=et(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=Q("wrapper",i),s=X.document.createDocumentFragment();n.innerHTML=t;for(let o=n.children.length;o--;)s.appendChild(n.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}ht(ke,{attr:Fe,find:we,findOne:ye}),nt(ke,"Dom");class Be extends ke{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 Oe(t).plus(this.x()))}dy(t=0){return this.y(new Oe(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=J(t));const i=new ge;let n=this;while((n=n.parent())&&n.node!==X.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(Tt);return e?J(e[1]):null}root(){const t=this.parent(st(Z));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=U(this,t,e);return this.width(new Oe(i.width)).height(new Oe(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)}}ht(Be,{bbox:ue,rbox:pe,inside:me,point:ie,ctm:re,screenCTM:oe}),nt(Be,"Element");const Pe={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 te||te.isRgb(e)||e instanceof Be)this.attr(t,e);else for(i=Pe[t].length-1;i>=0;i--)null!=e[Pe[t][i]]&&this.attr(Pe.prefix(t,Pe[t][i]),e[Pe[t][i]]);return this},R(["Element","Runner"],e)})),R(["Element","Runner"],{matrix:function(t,e,i,n,s,r){return null==t?new se(this):this.attr("transform",new se(t,e,i,n,s,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 Oe(t)):this.rx(t).ry(e)}}),R("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new ee(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 He=["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 Ue(){return this.attr("transform",null)}function Ge(){const t=(this.attr("transform")||"").split(Ct).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Ot).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(se.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new se);return t}function $e(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 Ye(t){return this.toParent(this.root(),t)}function We(t,e){if(null==t||"string"===typeof t){const e=new se(this).decompose();return null==t?e:e[t]}se.isMatrixLike(t)||(t={...t,origin:G(t,this)});const i=!0===e?this:e||!1,n=new se(i).transform(t);return this.attr("transform",n)}R("Element",He),R("Element",{untransform:Ue,matrixify:Ge,toParent:$e,toRoot:Ye,transform:We});class Ve extends Be{flatten(t=this,e){return this.each((function(){if(this instanceof Ve)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()}}nt(Ve,"Container");class je extends Ve{constructor(t,e=t){super(tt("defs",t),e)}flatten(){return this}ungroup(){return this}}nt(je,"Defs");class Xe extends Be{}function Ke(t){return this.attr("rx",t)}function qe(t){return this.attr("ry",t)}function Ze(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qe(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Je(t){return this.attr("cx",t)}function ti(t){return this.attr("cy",t)}function ei(t){return null==t?2*this.rx():this.rx(new Oe(t).divide(2))}function ii(t){return null==t?2*this.ry():this.ry(new Oe(t).divide(2))}nt(Xe,"Shape");var ni={__proto__:null,rx:Ke,ry:qe,x:Ze,y:Qe,cx:Je,cy:ti,width:ei,height:ii};class si extends Xe{constructor(t,e=t){super(tt("ellipse",t),e)}size(t,e){const i=U(this,t,e);return this.rx(new Oe(i.width).divide(2)).ry(new Oe(i.height).divide(2))}}ht(si,ni),R("Container",{ellipse:dt((function(t=0,e=t){return this.put(new si).size(t,e).move(0,0)}))}),nt(si,"Ellipse");class ri extends ke{constructor(t=X.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 ke(Q("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function oi(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Oe(t),fy:new Oe(e)}):this.attr({x1:new Oe(t),y1:new Oe(e)})}function ai(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Oe(t),cy:new Oe(e)}):this.attr({x2:new Oe(t),y2:new Oe(e)})}nt(ri,"Fragment");var hi={__proto__:null,from:oi,to:ai};class di extends Ve{constructor(t,e){super(tt(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 le}targets(){return xe("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()+")"}}ht(di,hi),R({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:dt((function(t,e){return this.put(new di(t)).update(e)}))}}),nt(di,"Gradient");class li extends Ve{constructor(t,e=t){super(tt("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new le}targets(){return xe("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:dt((function(t,e,i){return this.put(new li).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),nt(li,"Pattern");class ci extends Xe{constructor(t,e=t){super(tt("image",t),e)}load(t,e){if(!t)return this;const i=new X.window.Image;return Te(i,"load",(function(t){const n=this.parent(li);0===this.width()&&0===this.height()&&this.size(i.width,i.height),n instanceof li&&0===n.width()&&0===n.height()&&n.size(this.width(),this.height()),"function"===typeof e&&e.call(this,t)}),this),Te(i,"load error",(function(){Ce(i)})),this.attr("href",i.src=t,V)}}ze((function(t,e,i){return"fill"!==t&&"stroke"!==t||St.test(e)&&(e=i.root().defs().image(e)),e instanceof ci&&(e=i.root().defs().pattern(0,0,t=>{t.add(e)})),e})),R({Container:{image:dt((function(t,e){return this.put(new ci).size(0,0).load(t,e)}))}}),nt(ci,"Image");class ui extends Se{bbox(){let t=-1/0,e=-1/0,i=1/0,n=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),n=Math.min(s[1],n)})),new le(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(Ot).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){se.isMatrixLike(t)||(t=new se(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 pi=ui;function mi(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function gi(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function fi(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function xi(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}var wi={__proto__:null,MorphArray:pi,x:mi,y:gi,width:fi,height:xi};class yi extends Xe{constructor(t,e=t){super(tt("line",t),e)}array(){return new ui([[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 ui(t).toLine(),this.attr(t))}size(t,e){const i=U(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}}ht(yi,wi),R({Container:{line:dt((function(...t){return yi.prototype.plot.apply(this.put(new yi),null!=t[0]?t:[0,0,0,0])}))}}),nt(yi,"Line");class vi extends Ve{constructor(t,e=t){super(tt("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 _i(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:dt((function(t,e,i){return this.put(new vi).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 s=["marker"];return"all"!==t&&s.push(t),s=s.join("-"),t=arguments[1]instanceof vi?arguments[1]:this.defs().marker(e,i,n),this.attr(s,t)}}}),nt(vi,"Marker");const Mi={"-":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(s){return s<0?t>0?e/t*s:i>0?n/i*s:0:s>1?i<1?(1-n)/(1-i)*s+(n-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*n+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(n,s=!1)=>{let r=Math.floor(n*t);const o=n*r%1===0;return"start"!==e&&"both"!==e||++r,s&&o&&--r,n>=0&&r<0&&(r=0),n<=1&&r>i&&(r=i),r/i}}};class Ei{done(){return!1}}class Ni extends Ei{constructor(t=Ae.ease){super(),this.ease=Mi[t]||t}step(t,e,i){return"number"!==typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class Ti extends Ei{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,n){return this.stepper(t,e,i,n)}}function Ci(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=1e-10,n=Math.PI,s=Math.log(e/100+i),r=-s/Math.sqrt(n*n+s*s),o=3.9/(r*t);this.d=2*r*o,this.k=o*o}class Li extends Ti{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 s=n.velocity||0,r=-this.d*s-this.k*(t-e),o=t+s*i+r*i*i/2;return n.velocity=s+r*i,n.done=Math.abs(e-o)+Math.abs(s)<.002,n.done?e:o}}ht(Li,{duration:_i("_duration",Ci),overshoot:_i("_overshoot",Ci)});class Di extends Ti{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 s=e-t;let r=(n.integral||0)+s*i;const o=(s-(n.error||0))/i,a=this._windup;return!1!==a&&(r=Math.max(-a,Math.min(r,a))),n.error=s,n.integral=r,n.done=Math.abs(s)<.001,n.done?e:t+(this.P*s+this.I*r+this.D*o)}}ht(Di,{windup:_i("_windup"),p:_i("P"),i:_i("I"),d:_i("D")});const bi={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ai={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 Xa=0,Ka=Ri.length;Xa<Ka;++Xa)Ai[Ri[Xa]]=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,s=e.length;t<s;++t)e[t]=e[t]+(t%2?i.y:i.x);return Ai[t](e,i,n)}}(Ri[Xa].toUpperCase());function Si(t){const e=t.segment[0];return Ai[e](t.segment.slice(1),t.p,t.p0)}function Oi(t){return t.segment.length&&t.segment.length-1===bi[t.segment[0].toUpperCase()]}function Ii(t,e){t.inNumber&&zi(t,!1);const i=It.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 zi(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,Oi(t)&&Fi(t)}function Fi(t){t.inSegment=!1,t.absolute&&(t.segment=Si(t)),t.segments.push(t.segment)}function ki(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 Bi(t){return"E"===t.lastToken.toUpperCase()}function Pi(t,e=!0){let i=0,n="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new ee,p:new ee};while(s.lastToken=n,n=t.charAt(i++))if(s.inSegment||!Ii(s,n))if("."!==n)if(isNaN(parseInt(n)))if(" "!==n&&","!==n)if("-"!==n)if("E"!==n.toUpperCase()){if(It.test(n)){if(s.inNumber)zi(s,!1);else{if(!Oi(s))throw new Error("parser Error");Fi(s)}--i}}else s.number+=n,s.hasExponent=!0;else{if(s.inNumber&&!Bi(s)){zi(s,!1),--i;continue}s.number+=n,s.inNumber=!0}else s.inNumber&&zi(s,!1);else{if("0"===s.number||ki(s)){s.inNumber=!0,s.number=n,zi(s,!0);continue}s.inNumber=!0,s.number+=n}else{if(s.pointSeen||s.hasExponent){zi(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=n}return s.inNumber&&zi(s,!1),s.inSegment&&Oi(s)&&Fi(s),s.segments}function Hi(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 Ui extends Se{bbox(){return ae().path.setAttribute("d",this.toString()),new le(ae.nodes.path.getBBox())}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let n,s=this.length-1;s>=0;s--)n=this[s][0],"M"===n||"L"===n||"T"===n?(this[s][1]+=t,this[s][2]+=e):"H"===n?this[s][1]+=t:"V"===n?this[s][1]+=e:"C"===n||"S"===n||"Q"===n?(this[s][1]+=t,this[s][2]+=e,this[s][3]+=t,this[s][4]+=e,"C"===n&&(this[s][5]+=t,this[s][6]+=e)):"A"===n&&(this[s][6]+=t,this[s][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),Pi(t)}size(t,e){const i=this.bbox();let n,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,n=this.length-1;n>=0;n--)s=this[n][0],"M"===s||"L"===s||"T"===s?(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"===s?this[n][1]=(this[n][1]-i.x)*t/i.width+i.x:"V"===s?this[n][1]=(this[n][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(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"===s&&(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"===s&&(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 Hi(this)}}const Gi=t=>{const e=typeof t;return"number"===e?Oe:"string"===e?te.isColor(t)?te:Ot.test(t)?It.test(t)?Ui:Se:Mt.test(t)?Oe:Yi:Xi.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Se:"object"===e?ji:Yi};class $i{constructor(t){this._stepper=t||new Ni("-"),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(Gi(t));let e=new this._type(t);return this._type===te&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===ji&&(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 Yi{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 Wi{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,Wi.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Wi.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Vi=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class ji{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]===te&&t[i+7]!==e[i+7]){const e=t[i+7],n=new te(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(),s=e[i+2]+3;e.splice(i,s,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=Gi(t[i]),s=new n(t[i]).toArray();e.push([i,n,s.length,...s])}return e.sort(Vi),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(),s=e.shift(),r=e.splice(0,s);t[i]=new n(r)}return t}}const Xi=[Yi,Wi,ji];function Ki(t=[]){Xi.push(...[].concat(t))}function qi(){ht(Xi,{to(t){return(new $i).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,n,s){const r=function(t,r){return n.step(t,e[r],i,s[r],s)};return this.fromArray(t.map(r))}})}class Zi extends Xe{constructor(t,e=t){super(tt("path",t),e)}array(){return this._array||(this._array=new Ui(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 Ui(t))}size(t,e){const i=U(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 Qi(){return this._array||(this._array=new ui(this.attr("points")))}function Ji(){return delete this._array,this}function tn(t,e){return this.attr("points",this.array().move(t,e))}function en(t){return null==t?this.array():this.clear().attr("points","string"===typeof t?t:this._array=new ui(t))}function nn(t,e){const i=U(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}Zi.prototype.MorphArray=Ui,R({Container:{path:dt((function(t){return this.put(new Zi).plot(t||new Ui)}))}}),nt(Zi,"Path");var sn={__proto__:null,array:Qi,clear:Ji,move:tn,plot:en,size:nn};class rn extends Xe{constructor(t,e=t){super(tt("polygon",t),e)}}R({Container:{polygon:dt((function(t){return this.put(new rn).plot(t||new ui)}))}}),ht(rn,wi),ht(rn,sn),nt(rn,"Polygon");class on extends Xe{constructor(t,e=t){super(tt("polyline",t),e)}}R({Container:{polyline:dt((function(t){return this.put(new on).plot(t||new ui)}))}}),ht(on,wi),ht(on,sn),nt(on,"Polyline");class an extends Xe{constructor(t,e=t){super(tt("rect",t),e)}}ht(an,{rx:Ke,ry:qe}),R({Container:{rect:dt((function(t,e){return this.put(new an).size(t,e)}))}}),nt(an,"Rect");class hn{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 dn={nextDraw:null,frames:new hn,timeouts:new hn,immediates:new hn,timer:()=>X.window.performance||X.window.Date,transforms:[],frame(t){const e=dn.frames.push({run:t});return null===dn.nextDraw&&(dn.nextDraw=X.window.requestAnimationFrame(dn._draw)),e},timeout(t,e){e=e||0;const i=dn.timer().now()+e,n=dn.timeouts.push({run:t,time:i});return null===dn.nextDraw&&(dn.nextDraw=X.window.requestAnimationFrame(dn._draw)),n},immediate(t){const e=dn.immediates.push(t);return null===dn.nextDraw&&(dn.nextDraw=X.window.requestAnimationFrame(dn._draw)),e},cancelFrame(t){null!=t&&dn.frames.remove(t)},clearTimeout(t){null!=t&&dn.timeouts.remove(t)},cancelImmediate(t){null!=t&&dn.immediates.remove(t)},_draw(t){let e=null;const i=dn.timeouts.last();while(e=dn.timeouts.shift())if(t>=e.time?e.run():dn.timeouts.push(e),e===i)break;let n=null;const s=dn.frames.last();while(n!==s&&(n=dn.frames.shift()))n.run(t);let r=null;while(r=dn.immediates.shift())r();dn.nextDraw=dn.timeouts.first()||dn.frames.first()?X.window.requestAnimationFrame(dn._draw):null}},ln=function(t){const e=t.start,i=t.runner.duration(),n=e+i;return{start:e,duration:i,end:n,runner:t.runner}},cn=function(){const t=X.window;return(t.performance||t.Date).now()};class un extends De{constructor(t=cn){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(ln);let n=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)n=s;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(),o={persist:null===r?this._persist:r,start:n+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),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 dn.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=dn.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 s=!1;for(let r=0,o=this._runners.length;r<o;r++){const t=this._runners[r],e=t.runner;let i=n;const a=this._time-t.start;if(a<=0){s=!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,--o)}}else s=!0}return s&&!(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 un,this._timeline):(this._timeline=t,this)}}});class pn extends De{constructor(t){super(),this.id=pn.id++,t=null==t?Ae.duration:t,t="function"===typeof t?new Ti(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"===typeof t&&t,this._isDeclarative=t instanceof Ti,this._stepper=this._isDeclarative?t:new Ni,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new se,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,s=!1,r=0;return t=t||Ae.duration,e=e||Ae.delay,i=i||"last","object"!==typeof t||t instanceof Ei||(e=t.delay||e,i=t.when||i,s=t.swing||s,n=t.times||n,r=t.wait||r,t=t.duration||Ae.duration),{duration:t,delay:e,swing:s,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=pn.sanitise(t,e,i),s=new pn(n.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(n).schedule(n.delay,n.when)}clearTransform(){return this.transforms=new se,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 Ni(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,s=e*i+this._duration*n;return this.time(s)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,n=this._wait,s=this._times,r=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(n+i))/(n+i)),s=e&&!o||!e&&o,a=Math.pow(-1,s)*(t%(n+i))/i+s,h=Math.max(Math.min(a,1),0);return h},h=s*(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&&!o||o&&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||be,runner:e||be,retarget:i,isTransform:n,initialised:!1,finished:!1});const s=this.timeline();return s&&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 un||(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(),s=this._lastTime<=0&&this._time>0,r=this._lastTime<n&&this._time>=n;this._lastTime=this._time,s&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!r&&this._time>=n,this._reseted=!1;let a=!1;return(i||o)&&(this._initialise(i),this.transforms=new se,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,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],s=n.runner.call(this,t);n.finished=n.finished||!0===s,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}}pn.id=0;class mn{constructor(t=new se,e=-1,i=!0){this.transforms=t,this.id=e,this.done=i}clearTransformsFromQueue(){}}ht([pn,mn],{mergeWith(t){return new mn(t.transforms.lmultiply(this.transforms),t.id)}});const gn=(t,e)=>t.lmultiplyO(e),fn=t=>t.transforms;function xn(){const t=this._transformationRunners.runners,e=t.map(fn).reduce(gn,new se);this.transform(e),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class wn{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 mn).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=pn.sanitise(t,e,i),s=this.timeline();return new pn(n.duration).loop(n).element(this).timeline(s.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(fn).reduce(gn,new se)},_addRunner(t){this._transformationRunners.add(t),dn.cancelImmediate(this._frameId),this._frameId=dn.immediate(xn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new wn).add(new mn(new se(this))))}}});const yn=(t,e)=>t.filter(t=>!e.includes(t));ht(pn,{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 s=new $i(this._stepper).to(n),r=Object.keys(n);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),o=yn(i,r);if(o.length){const e=this.element()[t](o),i=new ji(s.from()).valueOf();Object.assign(i,e),s.from(i)}const a=new ji(s.to()).valueOf();Object.assign(a,e),s.to(a),r=i,n=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new $i(this._stepper).to(new Oe(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=se.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!n;const s=new $i(this._stepper).type(i?Wi:se);let r,o,a,h,d;function l(){o=o||this.element(),r=r||G(t,o),d=new se(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}function c(l){e||this.clearTransform();const{x:c,y:u}=new ee(r).transform(o._currentTransform(this));let p=new se({...t,origin:[c,u]}),m=this._isDeclarative&&a?a:d;if(i){p=p.decompose(c,u),m=m.decompose(c,u);const t=p.rotate,e=m.rotate,i=[t-360,t,t+360],n=i.map(t=>Math.abs(t-e)),s=Math.min(...n),r=n.indexOf(s);p.rotate=i[r]}e&&(n||(p.rotate=t.rotate||0),this._isDeclarative&&h&&(m.rotate=h)),s.from(m),s.to(p);const g=s.at(l);return h=g.rotate,a=new se(g),this.addTransform(a),o._addRunner(this),s.done()}function u(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=G(e,o)),t={...e,origin:r}}return this.queue(l,c,u,!0),this._isDeclarative&&this._rememberMorpher("transform",s),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 Oe(e),this._tryRetarget(t,e))return this;const i=new $i(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 Oe(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new $i(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 Oe(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 s=new $i(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,n){return this._queueObject("viewbox",new le(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)}}),ht(pn,{rx:Ke,ry:qe,from:oi,to:ai}),nt(pn,"Runner");class vn extends Ve{constructor(t,e=t){super(tt("svg",t),e),this.namespace()}defs(){return this.isRoot()?et(this.node.querySelector("defs"))||this.put(new je):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof X.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:$,version:"1.1"}).attr("xmlns:xlink",V,W).attr("xmlns:svgjs",j,W):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,W).attr("xmlns:svgjs",null,W)}root(){return this.isRoot()?this:super.root()}}R({Container:{nested:dt((function(){return this.put(new vn)}))}}),nt(vn,"Svg",!0);class _n extends Ve{constructor(t,e=t){super(tt("symbol",t),e)}}function Mn(t){return!1===this._build&&this.clear(),this.node.appendChild(X.document.createTextNode(t)),this}function En(){return this.node.getComputedTextLength()}function Nn(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Tn(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Cn(t,e,i=this.bbox()){return this.x(t,i).y(e,i)}function Ln(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Dn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function bn(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)}function An(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 On(t){return this._build=!!t,this}R({Container:{symbol:dt((function(){return this.put(new _n)}))}}),nt(_n,"Symbol");var In={__proto__:null,plain:Mn,length:En,x:Nn,y:Tn,move:Cn,cx:Ln,cy:Dn,center:bn,ax:An,ay:Rn,amove:Sn,build:On};class zn extends Xe{constructor(t,e=t){super(tt("text",t),e),this.dom.leading=new Oe(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Oe(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 s=X.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new Oe(s);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 Oe(t.leading||1.3),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let n=0,s=e.length;n<s;++n)"textPath"!==e[n].nodeName?(n!==i&&3!==e[n].nodeType&&!0===et(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()}}ht(zn,In),R({Container:{text:dt((function(t=""){return this.put(new zn).text(t)})),plain:dt((function(t=""){return this.put(new zn).plain(t)}))}}),nt(zn,"Text");class Fn extends Xe{constructor(t,e=t){super(tt("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 zn))return this;const e=t.index(this),i=X.window.getComputedStyle(this.node).getPropertyValue("font-size"),n=t.dom.leading*new Oe(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)}}ht(Fn,In),R({Tspan:{tspan:dt((function(t=""){const e=new Fn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),nt(Fn,"Tspan");class kn extends Xe{constructor(t,e=t){super(tt("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 Oe(t).divide(2))}}ht(kn,{x:Ze,y:Qe,cx:Je,cy:ti,width:ei,height:ii}),R({Container:{circle:dt((function(t=0){return this.put(new kn).size(t).move(0,0)}))}}),nt(kn,"Circle");class Bn extends Ve{constructor(t,e=t){super(tt("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return xe("svg [clip-path*="+this.id()+"]")}}R({Container:{clip:dt((function(){return this.defs().put(new Bn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof Bn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),nt(Bn,"ClipPath");class Pn extends Be{constructor(t,e=t){super(tt("foreignObject",t),e)}}function Hn(t,e){return this.children().forEach((i,n)=>{let s;try{s=i.bbox()}catch(h){return}const r=new se(i),o=r.translate(t,e).transform(r.inverse()),a=new ee(s.x,s.y).transform(o);i.move(a.x,a.y)}),this}function Un(t){return this.dmove(t,0)}function Gn(t){return this.dmove(0,t)}function $n(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function Yn(t=0,e=0,i=this.bbox()){const n=t-i.x,s=e-i.y;return this.dmove(n,s)}function Wn(t,e,i=this.bbox()){const n=U(this,t,e,i),s=n.width/i.width,r=n.height/i.height;return this.children().forEach((t,e)=>{const n=new ee(i).transform(new se(t).inverse());t.scale(s,r,n.x,n.y)}),this}function Vn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function jn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function Xn(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}R({Container:{foreignObject:dt((function(t,e){return this.put(new Pn).size(t,e)}))}}),nt(Pn,"ForeignObject");var Kn={__proto__:null,dmove:Hn,dx:Un,dy:Gn,height:$n,move:Yn,size:Wn,width:Vn,x:jn,y:Xn};class qn extends Ve{constructor(t,e=t){super(tt("g",t),e)}}ht(qn,Kn),R({Container:{group:dt((function(){return this.put(new qn)}))}}),nt(qn,"G");class Zn extends Ve{constructor(t,e=t){super(tt("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,V)}}ht(Zn,Kn),R({Container:{link:dt((function(t){return this.put(new Zn).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 Zn,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}}}),nt(Zn,"A");class Qn extends Ve{constructor(t,e=t){super(tt("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return xe("svg [mask*="+this.id()+"]")}}R({Container:{mask:dt((function(){return this.defs().put(new Qn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Qn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),nt(Qn,"Mask");class Jn extends Be{constructor(t,e=t){super(tt("stop",t),e)}update(t){return("number"===typeof t||t instanceof Oe)&&(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 Oe(t.offset)),this}}function ts(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const n in e)i+=P(n)+":"+e[n]+";";return i+="}",i}R({Gradient:{stop:function(t,e,i){return this.put(new Jn).update(t,e,i)}}}),nt(Jn,"Stop");class es extends Be{constructor(t,e=t){super(tt("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(ts(t,e))}}R("Dom",{style(t,e){return this.put(new es).rule(t,e)},fontface(t,e,i){return this.put(new es).font(t,e,i)}}),nt(es,"Style");class is extends zn{constructor(t,e=t){super(tt("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:dt((function(t,e){return t instanceof zn||(t=this.text(t)),t.path(e)}))},Text:{path:dt((function(t,e=!0){const i=new is;let n;if(t instanceof Zi||(t=this.defs().path(t)),i.attr("href","#"+t,V),e)while(n=this.node.firstChild)i.node.appendChild(n);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:dt((function(t){return t instanceof zn||(t=(new zn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return xe("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),is.prototype.MorphArray=Ui,nt(is,"TextPath");class ns extends Xe{constructor(t,e=t){super(tt("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,V)}}R({Container:{use:dt((function(t,e){return this.put(new ns).use(t,e)}))}}),nt(ns,"Use");const ss=J;ht([vn,_n,ci,li,vi],S("viewbox")),ht([yi,on,rn,Zi],S("marker")),ht(zn,S("Text")),ht(Zi,S("Path")),ht(je,S("Defs")),ht([zn,Fn],S("Tspan")),ht([an,si,di,pn],S("radius")),ht(De,S("EventTarget")),ht(ke,S("Dom")),ht(Be,S("Element")),ht(Xe,S("Shape")),ht([Ve,ri],S("Container")),ht(di,S("Gradient")),ht(pn,S("Runner")),ge.extend(O()),Ki([Oe,te,le,se,Se,ui,Ui,ee]),qi();var rs={paddingX:15,paddingY:5,imgMaxWidth:200,imgMaxHeight:100,iconSize:20,lineWidth:1,lineColor:"#549688",lineDasharray:"none",lineFlow:!1,lineFlowDuration:1,lineFlowForward:!0,lineStyle:"straight",rootLineKeepSameInCurve:!0,rootLineStartPositionKeepSameInCurve:!1,lineRadius:5,showLineMarker:!1,generalizationLineWidth:1,generalizationLineColor:"#549688",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:"#fafafa",backgroundImage:"none",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",nodeUseLineStyle:!1,root:{shape:"rectangle",fillColor:"#549688",fontFamily:"微软雅黑, Microsoft YaHei",color:"#fff",fontSize:16,fontWeight:"bold",fontStyle:"normal",borderColor:"transparent",borderWidth:0,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},second:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},node:{shape:"rectangle",marginX:50,marginY:0,fillColor:"transparent",fontFamily:"微软雅黑, Microsoft YaHei",color:"#6a6d6c",fontSize:14,fontWeight:"normal",fontStyle:"normal",borderColor:"transparent",borderWidth:0,borderRadius:5,borderDasharray:"none",textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},generalization:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"}};const os=["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"],as=t=>{let e=Object.keys(t);for(let i=0;i<e.length;i++)if(!os.find(t=>t===e[i]))return!1;return!0},hs=["lineColor","lineDasharray","lineWidth","lineMarkerDir","lineFlow","lineFlowDuration","lineFlowForward"],ds=(t,e,i,n,s,r=0,o=0,a=[])=>{let h=!1;if(i&&(h=i(t,e,s,r,o,a)),!h&&t.children&&t.children.length>0){let e=r+1;t.children.forEach((s,r)=>{ds(s,t,i,n,!1,e,r,[...a,t])})}n&&n(t,e,s,r,o,a)},ls=(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(s=>{n||(i.push(s),"stop"===e(s,t)&&(n=!0))})}},cs=(t,e,i,n)=>{let s=t/e,r=[];if(i&&n)if(t<=i&&e<=n)r=[t,e];else{let t=i/n;r=s>t?[i,i/s]:[s*n,n]}else i?r=t<=i?[t,e]:[i,i/s]:n&&(r=e<=n?[t,e]:[s*n,n]);return r},us=t=>{t=t.replace(/<br>/gim,"\n");let e=document.createElement("div");return e.innerHTML=t,t=e.textContent,t},ps=t=>{try{return JSON.parse(JSON.stringify(t))}catch(e){return null}},ms=(t,e,i=!1)=>{if(t.data=ps(e.data),i){t.data.isActive=!1;const e=ur(t.data);e.forEach(t=>{t.isActive=!1})}return t.children=[],e.children&&e.children.length>0&&e.children.forEach((e,n)=>{t.children[n]=ms({},e,i)}),Object.keys(e).forEach(i=>{["data","children"].includes(i)||/^_/.test(i)||(t[i]=e[i])}),t},gs=(t,e,i=!1,n=!0)=>{const s=e.nodeData?e.nodeData:e;return t.data=ps(s.data),n?delete t.data.uid:t.data.uid||(t.data.uid=Cs()),i&&(t.data.isActive=!1),t.children=[],e.children&&e.children.length>0?e.children.forEach((e,s)=>{t.children[s]=gs({},e,i,n)}):e.nodeData&&e.nodeData.children&&e.nodeData.children.length>0&&e.nodeData.children.forEach((e,s)=>{t.children[s]=gs({},e,i,n)}),Object.keys(s).forEach(e=>{["data","children"].includes(e)||/^_/.test(e)||(t[e]=s[e])}),t},fs=(t,e=300,i)=>{let n=null;return(...s)=>{n||(n=setTimeout(()=>{t.call(i,...s),n=null},e))}},xs=(t,e=300,i)=>{let n=null;return(...s)=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,t.apply(i,s)},e)}},ws=(t,e=(()=>{}))=>{let i=0,n=t.length;if(n<=0)return e();let s=()=>{i>=n?e():(t[i](),setTimeout(()=>{i++,s()},0))};s()},ys=t=>t*(Math.PI/180),vs=t=>t.replace(/([a-z])([A-Z])/g,(...t)=>t[1]+"-"+t[2].toLowerCase());const _s=function(t,e){let i=!1,n=null,s=()=>{i=!1,e?t.call(e):t()};if("undefined"!==typeof MutationObserver){let t=1,e=new MutationObserver(s),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(s,0))}},Ms=(t,e,i=0,n=0)=>{let s=t.elRect,{scaleX:r,scaleY:o,translateX:a,translateY:h}=t.draw.transform(),{left:d,top:l,width:c,height:u}=e,p=(d+c)*r+a,m=(l+u)*o+h;d=d*r+a,l=l*o+h;let g=0,f=0;return d<0+i&&(g=-d+i),p>s.width-i&&(g=-(p-s.width)-i),l<0+n&&(f=-l+n),m>s.height-n&&(f=-(m-s.height)-n),{isOuter:0!==g||0!==f,offsetLeft:g,offsetTop:f}};let Es=null;const Ns=t=>(Es||(Es=document.createElement("div")),Es.innerHTML=t,Es.textContent);const Ts=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})}}),Cs=()=>L(),Ls=t=>new Promise((e,i)=>{let n=new FileReader;n.readAsDataURL(t),n.onload=async t=>{let i=t.target.result,n=await Ts(i);e({url:i,size:n})},n.onerror=t=>{i(t)}}),Ds=t=>Object.prototype.toString.call(t).slice(8,-1),bs=t=>null===t||void 0===t||""===t;let As=null;const Rs=t=>{As||(As=document.createElement("div")),As.innerHTML=t;for(let e=As.childNodes,i=e.length;i--;)if(1==e[i].nodeType)return!0;return!1};const Ss=t=>(t=String(t).replace(/\s+/g,""),["#fff","#ffffff","#FFF","#FFFFFF","rgb(255,255,255)"].includes(t)||/rgba\(255,255,255,[^)]+\)/.test(t)),Os=t=>(t=String(t).replace(/\s+/g,""),["","transparent"].includes(t)||/rgba\(\d+,\d+,\d+,0\)/.test(t)),Is=t=>{let{lineColor:e,root:i,second:n,node:s}=t,r=[e,i.fillColor,i.color,n.fillColor,n.color,s.fillColor,s.color,i.borderColor,n.borderColor,s.borderColor];for(let o=0;o<r.length;o++){let t=r[o];if(!Os(t)&&!Ss(t))return t}};let zs=null;const Fs=t=>{zs||(zs=document.createElement("div")),zs.innerHTML=t;const e=zs.querySelectorAll(".ql-formula");Array.from(e).forEach(t=>{const e=document.createTextNode("$smmformula$");t.parentNode.replaceChild(e,t)});const i=zs.childNodes;let n=[];for(let s=0;s<i.length;s++){const t=i[s];1===t.nodeType?n.push(t.textContent):3===t.nodeType&&n.push(t.nodeValue)}if(t=n.map(t=>`<p><span>${Zs(t)}</span></p>`).join(""),e.length>0){t=t.replace(/\$smmformula\$/g,'<span class="smmformula"></span>'),zs.innerHTML=t;const i=zs.querySelectorAll(".smmformula");Array.from(i).forEach((t,i)=>{t.parentNode.replaceChild(e[i],t)}),t=zs.innerHTML}return t},ks=(t,e)=>{const i={};return Object.keys(e).forEach(n=>{const s=t[n],r=e[n];if(Ds(s)===Ds(r)){if("Object"===Ds(s)){if(JSON.stringify(s)!==JSON.stringify(r))return void(i[n]=r)}else if(s!==r)return void(i[n]=r)}else i[n]=r}),i},Bs=t=>!/^_/.test(t)&&!o.includes(t),Ps=t=>{const e=[...hs],i=Object.keys(t);for(let n=0;n<i.length;n++)if(!e.includes(i[n]))return!1;return!0},Hs=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},[]),Us=t=>{let e=[];return t.forEach(i=>{t.find(t=>t.uid!==i.uid&&t.isAncestor(i))||e.push(i)}),e},Gs=t=>{const e={},i={};t.forEach(t=>{const n=t.parent;if(n){const s=n.uid;i[s]=n;const r=t.getIndexInBrothers(),o={node:t,index:r};e[s]?e[s].find(t=>t.index===o.index)||e[s].push(o):e[s]=[o]}});const n=[];return Object.keys(e).forEach(t=>{if(e[t].length>1){const s=e[t].map(t=>t.index).sort((t,e)=>t-e);n.push({node:i[t],range:[s[0],s[s.length-1]]})}else n.push({node:e[t][0].node})}),n},$s=t=>{let e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),i.collapse(),e.removeAllRanges(),e.addRange(i)},Ys=t=>{let e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),e.removeAllRanges(),e.addRange(i)},Ws=(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},Vs=(t,e=!1,i=null,n=!1)=>{const s=t=>{t.forEach(t=>{if(t.data||(t.data={}),(e||bs(t.data.uid))&&(t.data.uid=Cs()),n){const i=ur(t.data);i.forEach(t=>{(e||bs(t.uid))&&(t.uid=Cs())})}i&&i(t),t.children&&t.children.length>0&&s(t.children)})};return s(t),t},js=t=>t?Array.isArray(t)?t:[t]:[],Xs=t=>t.parent?t.parent.nodeData.children.findIndex(e=>e.data.uid===t.uid):0,Ks=(t,e)=>e.findIndex(e=>e.uid===t.uid),qs=t=>{let e=0;for(let s=0;s<t.length;s++)e=t.charCodeAt(s)+((e<<5)-e);const i=new D(e),n=i.genrand_int32()%360;return"hsla("+n+", 50%, 50%, 1)"},Zs=t=>([["&","&"],["<","<"],[">",">"]].forEach(e=>{t=t.replace(new RegExp(e[0],"g"),e[1])}),t),Qs=(t,e)=>{const i=Ds(t);if(i!==Ds(e))return!1;if("Object"===i){const i=Object.keys(t),n=Object.keys(e);if(i.length!==n.length)return!1;for(let s=0;s<i.length;s++){const r=i[s];if(!n.includes(r))return!1;const o=Qs(t[r],e[r]);if(!o)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],s=e[i],r=Ds(n),o=Ds(s);if(r!==o)return!1;const a=Qs(n,s);if(!a)return!1}return!0}return t===e},Js=()=>navigator.clipboard&&"function"===typeof navigator.clipboard.read,tr=t=>{navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(JSON.stringify(t))},er=async()=>{let t=null,e=null;if(Js()){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}},ir=t=>{if(!t||!t.parent)return;const e=Xs(t);-1!==e&&t.parent.nodeData.children.splice(e,1)},nr=(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},sr=t=>({simpleMindMap:!0,data:t}),rr=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)}},or=(t,e)=>{t.preventDefault();const i=window.getSelection();if(!i.rangeCount)return;i.deleteFromDocument(),e=e||t.clipboardData.getData("text"),e=Zs(e),e=Ns(e);const n=e.split(/\n/g),s=document.createDocumentFragment();n.forEach((t,e)=>{const i=document.createTextNode(t);if(s.appendChild(i),e<n.length-1){const t=document.createElement("br");s.appendChild(t)}}),i.getRangeAt(0).insertNode(s),i.collapseToEnd()},ar=t=>{const e={},i=(t,n)=>{const s=t.data.uid;n&&n.children.push(s),e[s]={isRoot:!n,data:{...t.data},children:[]},t.children&&t.children.length>0&&t.children.forEach(t=>{i(t,e[s])})};return i(t,null),e},hr=({addContentToHeader:t,addContentToFooter:e})=>{const i=[];let n=null,s=0,r=null,o=0;const a=(t,e)=>{if("function"===typeof t){const n=t();if(!n)return;const{el:s,cssText:r,height:o}=n;if(s instanceof HTMLElement){pr(s);const t=cr({el:s,height:o});e(t,o)}r&&i.push(r)}};return a(t,(t,e)=>{n=t,s=e}),a(e,(t,e)=>{r=t,o=e}),{cssTextList:i,header:n,headerHeight:s,footer:r,footerHeight:o}},dr=(t,e=0,i=0,n=0,s=0,r=!1,o=!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:s}=t.group.findOne(".smm-node-shape").rbox();e<a&&(a=e),e+n>h&&(h=e+n),i<d&&(d=i),i+s>l&&(l=i+s)}catch(i){}!o&&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+s,h=h-e+n,l=l-i+s,{left:a,top:d,width:h-a,height:l-d}},lr=()=>document.documentElement.requestFullScreen?"fullscreenchange":document.documentElement.webkitRequestFullScreen?"webkitfullscreenchange":document.documentElement.mozRequestFullScreen?"mozfullscreenchange":document.documentElement.msRequestFullscreen?"msfullscreenchange":void 0,cr=(lr(),({el:t,width:e,height:i})=>{const n=new Pn;return void 0!==e&&n.width(e),void 0!==i&&n.height(i),n.add(t),n}),ur=t=>{const e=t.generalization;return e?Array.isArray(e)?e:[e]:[]},pr=t=>{t.setAttribute("xmlns","http://www.w3.org/1999/xhtml")},mr=t=>(t=[...t],t.sort((t,e)=>t.sortIndex-e.sortIndex),t),gr=(t,e)=>w()(t,e,{arrayMerge:(t,e)=>e}),fr=t=>{const e={};return l.forEach(i=>{let n=t.style.merge(i);"fontSize"===i&&(n+="px"),e[i]=n}),e},xr=["backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize"],wr=["gradientStyle","startColor","endColor","startDir","endDir","fillColor","borderColor","borderWidth","borderDasharray"];class yr{static setBackgroundStyle(t,e){if(!t)return;if(!yr.cacheStyle){yr.cacheStyle={};let e=window.getComputedStyle(t);xr.forEach(t=>{yr.cacheStyle[t]=e[t]})}let{backgroundColor:i,backgroundImage:n,backgroundRepeat:s,backgroundPosition:r,backgroundSize:o}=e;t.style.backgroundColor=i,n&&"none"!==n?(t.style.backgroundImage=`url(${n})`,t.style.backgroundRepeat=s,t.style.backgroundPosition=r,t.style.backgroundSize=o):t.style.backgroundImage="none"}static removeBackgroundStyle(t){yr.cacheStyle&&(xr.forEach(e=>{t.style[e]=yr.cacheStyle[e]}),yr.cacheStyle=null)}constructor(t){this.ctx=t,this._markerPath=null,this._marker=null,this._gradient=null}merge(t,e){let i=this.ctx.mindMap.themeConfig,n=null,s=!1;e?(s=!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],s||this.addToEffectiveStyles({[t]:r}),r}getStyle(t,e){return this.merge(t,e)}getSelfStyle(t){return this.ctx.getData(t)}addToEffectiveStyles(t){this.ctx.mindMap.painter&&(this.ctx.effectiveStyles={...this.ctx.effectiveStyles,...t})}rect(t){this.shape(t),t.radius(this.merge("borderRadius"))}shape(t){const e={};wr.forEach(t=>{e[t]=this.merge(t)}),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){t.attr({fill:e||this.merge("color")})}line(t,{width:e,color:i,dasharray:n}={},s,r){const{customHandleLine:o}=this.ctx.mindMap.opt;if("function"===typeof o&&o(this.ctx,t,{width:e,color:i,dasharray:n}),t.stroke({color:i,dasharray:n,width:e}).fill({color:"none"}),s){const e=this.merge("showLineMarker",!0),n=r.style;if(e){n._marker=n._marker||n.createMarker(),n._markerPath.stroke({color:i}).fill({color:i}),t.attr("marker-start",""),t.attr("marker-end","");const e=n.merge("lineMarkerDir");t.marker(e,n._marker)}else n._marker&&(t.attr("marker-start",""),t.attr("marker-end",""),n._marker.remove(),n._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:s,fontSize:r,fontColor:o}=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:s}),this.ctx.mindMap.opt.isShowExpandNum&&t.attr({"font-size":r+"px","font-color":o})}hasCustomStyle(){let t=!1;return Object.keys(this.ctx.getData()).forEach(e=>{Bs(e)&&(t=!0)}),t}getCustomStyle(){const t={};return Object.keys(this.ctx.getData()).forEach(e=>{Bs(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)}}yr.cacheStyle=null;var vr=yr;class _r{constructor(t){this.node=t,this.mindMap=t.mindMap}getShapePadding(t,e,i,s){const r=this.node.getShape(),o=15,a=5,h=t+2*i,d=e+2*s,l=Math.abs(h-d);switch(r){case n.SHAPE.ROUNDED_RECTANGLE:return{paddingX:e>t?(e-t)/2:0,paddingY:0};case n.SHAPE.DIAMOND:return{paddingX:t/2,paddingY:e/2};case n.SHAPE.PARALLELOGRAM:return{paddingX:i<=0?o:0,paddingY:0};case n.SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:i<=0?o:0,paddingY:0};case n.SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:i<=0?o:0,paddingY:0};case n.SHAPE.ELLIPSE:return{paddingX:i<=0?o:0,paddingY:s<=0?a:0};case n.SHAPE.CIRCLE:return{paddingX:d>h?l/2:0,paddingY:d<h?l/2:0}}const c=this.getShapeFromExtendList(r);return c&&c.getPadding({node:this.node,width:t,height:e,paddingX:i,paddingY:s})||{paddingX:0,paddingY:0}}getShapeFromExtendList(t){return this.mindMap.extendShapeList.find(e=>e.name===t)}createShape(){const t=this.node.getShape();let e=null;if(t===n.SHAPE.RECTANGLE?e=this.createRect():t===n.SHAPE.DIAMOND?e=this.createDiamond():t===n.SHAPE.PARALLELOGRAM?e=this.createParallelogram():t===n.SHAPE.ROUNDED_RECTANGLE?e=this.createRoundedRectangle():t===n.SHAPE.OCTAGONAL_RECTANGLE?e=this.createOctagonalRectangle():t===n.SHAPE.OUTER_TRIANGULAR_RECTANGLE?e=this.createOuterTriangularRectangle():t===n.SHAPE.INNER_TRIANGULAR_RECTANGLE?e=this.createInnerTriangularRectangle():t===n.SHAPE.ELLIPSE?e=this.createEllipse():t===n.SHAPE.CIRCLE&&(e=this.createCircle()),!e){const i=this.getShapeFromExtendList(t);i&&(e=i.createShape(this.node))}return e||this.createRect()}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?ss(e(t)):(new Zi).plot(t)}createPolygon(t){const{customCreateNodePolygon:e}=this.mindMap.opt;return e?ss(e(t)):(new rn).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,s=i,r=0,o=t,a=n,h=i,d=e,l=0,c=n;const u=[[s,r],[o,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 s=`\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(s)}createCircle(){let{width:t,height:e}=this.getNodeSize(),i=t/2,n=e/2;const s=`\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(s)}}const Mr=[n.SHAPE.RECTANGLE,n.SHAPE.DIAMOND,n.SHAPE.PARALLELOGRAM,n.SHAPE.ROUNDED_RECTANGLE,n.SHAPE.OCTAGONAL_RECTANGLE,n.SHAPE.OUTER_TRIANGULAR_RECTANGLE,n.SHAPE.INNER_TRIANGULAR_RECTANGLE,n.SHAPE.ELLIPSE,n.SHAPE.CIRCLE];function Er(){const t=this.getData("generalization");return Array.isArray(t)?t:t?[t]:[]}function Nr(){return this.formatGetGeneralization().length>0}function Tr(){const t=this.formatGetGeneralization();return!!t.find(t=>!t.range||t.range.length<=0)}function Cr(t){return this._generalizationList.findIndex(e=>e.generalizationNode.uid===t.uid)}function Lr(){if(this.isGeneralization||!this.checkHasGeneralization())return;let t=0,e=0;const i=this.formatGetGeneralization();i.forEach((i,n)=>{let s=this._generalizationList[n];s||(s=this._generalizationList[n]={}),s.node=this,s.range=i.range,s.generalizationLine||(s.generalizationLine=this.lineDraw.path()),s.generalizationNode||(s.generalizationNode=new ua({data:{inserting:i.inserting,data:i},uid:Cs(),renderer:this.renderer,mindMap:this.mindMap,isGeneralization:!0})),delete i.inserting,s.generalizationNode.generalizationBelongNode=this,s.generalizationNode.width>t&&(t=s.generalizationNode.width),s.generalizationNode.height>e&&(e=s.generalizationNode.height),i.isActive&&this.renderer.addNodeToActiveList(s.generalizationNode)}),this._generalizationNodeWidth=t,this._generalizationNodeHeight=e}function Dr(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function br(t){if(this.isGeneralization)return;this.updateGeneralizationData();const e=this.formatGetGeneralization();e.length<=0||!1===this.getData("expand")?this.removeGeneralization():(e.length!==this._generalizationList.length&&this.removeGeneralization(),this.createGeneralizationNode(),this.renderer.layout.renderGeneralization(this._generalizationList),this._generalizationList.forEach(e=>{this.style.generalizationLine(e.generalizationLine),e.generalizationNode.render(()=>{},t)}))}function Ar(){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 Rr(){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 Sr(){this.isGeneralization||this._generalizationList.forEach(t=>{t.generalizationLine&&t.generalizationLine.hide(),t.generalizationNode&&t.generalizationNode.hide()})}function Or(){this.isGeneralization||this._generalizationList.forEach(t=>{t.generalizationLine&&t.generalizationLine.show(),t.generalizationNode&&t.generalizationNode.show()})}function Ir(t){this._generalizationList.forEach(e=>{e.generalizationLine.opacity(t),e.generalizationNode.group.opacity(t)})}function zr(){const t=this.generalizationBelongNode,e=t.formatGetGeneralization(),i=t.getGeneralizationNodeIndex(this),n=e[i],s=this.getStyle("hoverRectColor"),r=s||this.mindMap.opt.hoverRectColor,o=r?{stroke:r}:null;Array.isArray(n.range)&&n.range.length>0?this.mindMap.renderer.highlightNode(t,n.range,o):this.mindMap.renderer.highlightNode(t,null,o)}function Fr(){this.mindMap.renderer.closeHighlightNode()}var kr={formatGetGeneralization:Er,checkHasGeneralization:Nr,checkHasSelfGeneralization:Tr,getGeneralizationNodeIndex:Cr,createGeneralizationNode:Lr,updateGeneralization:Dr,updateGeneralizationData:Ar,renderGeneralization:br,removeGeneralization:Rr,hideGeneralization:Sr,showGeneralization:Or,setGeneralizationOpacity:Ir,handleGeneralizationMouseenter:zr,handleGeneralizationMouseleave:Fr};const Br='<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>',Pr='<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>',Hr='<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>',Ur='<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>',Gr='<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>';var $r={open:Br,close:Pr,remove:Hr,imgAdjust:Ur,quickCreateChild:Gr};function Yr(){if(this._openExpandNode)return;const{expandBtnSize:t,expandBtnIcon:e,isShowExpandNum:i}=this.mindMap.opt;let{close:n,open:s}=e||{};i?(this._openExpandNode=new zn,this._openExpandNode.addClass("smm-expand-btn-text"),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:t/2,y:2})):(this._openExpandNode=ss(s||$r.open).size(t,t),this._openExpandNode.x(0).y(-t/2)),this._closeExpandNode=ss(n||$r.close).size(t,t),this._closeExpandNode.x(0).y(-t/2),this._fillExpandNode=(new kn).size(t),this._fillExpandNode.x(0).y(-t/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function Wr(t=[]){return t.reduce((t,e)=>t+this.sumNode(e.children||[]),t.length)}function Vr(){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:s}=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 s){const t=s(e,this);bs(t)||(e=t)}t.text(String(e))}this._expandBtn.add(this._fillExpandNode).add(t)}}function jr(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)}function Xr(){this.getChildrenLength()<=0||this.isRoot||(this._expandBtn||(this._expandBtn=new qn,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 Kr(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function qr(){const{alwaysShowExpandBtn:t,notShowExpandBtn:e}=this.mindMap.opt;t||e||setTimeout(()=>{this.renderExpandBtn()},0)}function Zr(){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 Qr={createExpandNodeContent:Yr,updateExpandBtnNode:Vr,updateExpandBtnPos:jr,renderExpandBtn:Xr,removeExpandBtn:Kr,showExpandBtn:qr,hideExpandBtn:Zr,sumNode:Wr};function Jr(t={}){this.mindMap.execCommand("SET_NODE_DATA",this,t)}function to(t,e,i){this.mindMap.execCommand("SET_NODE_TEXT",this,t,e,i)}function eo(t){this.mindMap.execCommand("SET_NODE_IMAGE",this,t)}function io(t){this.mindMap.execCommand("SET_NODE_ICON",this,t)}function no(t,e){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,t,e)}function so(t){this.mindMap.execCommand("SET_NODE_NOTE",this,t)}function ro(t,e){this.mindMap.execCommand("SET_NODE_ATTACHMENT",this,t,e)}function oo(t){this.mindMap.execCommand("SET_NODE_TAG",this,t)}function ao(t){this.mindMap.execCommand("SET_NODE_SHAPE",this,t)}function ho(t,e){this.mindMap.execCommand("SET_NODE_STYLE",this,t,e)}function lo(t){this.mindMap.execCommand("SET_NODE_STYLES",this,t)}var co={setData:Jr,setText:to,setImage:eo,setIcon:io,setHyperlink:no,setNote:so,setAttachment:ro,setTag:oo,setShape:ao,setStyle:ho,setStyles:lo};const uo='<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>',po='<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>',mo='<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>',go=[{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" version="1.1" viewBox="0 0 1026 1024"><path d="M1.097856 1.097642h1021.804717v1021.804716H1.097856z" fill="#F09495" ></path><path d="M1024.000214 1024H0.000214V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.195498v1019.609432z" fill="#FFFFFF" ></path><path d="M234.695985 335.179887m-27.341259 0a27.341259 27.341259 0 1 0 54.682518 0 27.341259 27.341259 0 1 0-54.682518 0Z" fill="#040000" ></path><path d="M234.695985 363.519002c-15.666342 0-28.339115-12.772559-28.339115-28.339115 0-15.666342 12.772559-28.339115 28.339115-28.339115s28.339115 12.772559 28.339115 28.339115c0.099786 15.666342-12.672773 28.339115-28.339115 28.339115z m0-54.582732c-14.468914 0-26.243617 11.774703-26.243617 26.243617s11.774703 26.243617 26.243617 26.243617 26.243617-11.774703 26.243617-26.243617-11.774703-26.243617-26.243617-26.243617z" fill="#FFFFFF" ></path><path d="M776.232528 335.179887m-27.341259 0a27.341259 27.341259 0 1 0 54.682518 0 27.341259 27.341259 0 1 0-54.682518 0Z" fill="#040000" ></path><path d="M776.232528 363.519002c-15.666342 0-28.339115-12.772559-28.339115-28.339115 0-15.666342 12.772559-28.339115 28.339115-28.339115 15.666342 0 28.339115 12.772559 28.339115 28.339115 0 15.666342-12.772559 28.339115-28.339115 28.339115z m0-54.582732c-14.468914 0-26.243617 11.774703-26.243617 26.243617s11.774703 26.243617 26.243617 26.243617 26.243617-11.774703 26.243617-26.243617c-0.099786-14.468914-11.874488-26.243617-26.243617-26.243617z" fill="#FFFFFF" ></path><path d="M512.000214 671.656987c-52.58702 0-105.872539-17.961411-105.872539-52.387449S459.413194 566.882089 512.000214 566.882089s105.872539 17.961411 105.87254 52.387449S564.587234 671.656987 512.000214 671.656987z m0-74.240499c-21.952836 0-43.207172 3.592282-58.2748 9.77899-13.870201 5.68778-17.06334 11.275775-17.06334 12.07406s3.19314 6.386279 17.06334 12.07406c15.067628 6.186708 36.321965 9.77899 58.2748 9.77899s43.207172-3.592282 58.274801-9.77899c13.870201-5.68778 17.06334-11.275775 17.06334-12.07406s-3.19314-6.386279-17.06334-12.07406c-15.067628-6.286494-36.321965-9.77899-58.274801-9.77899z" fill="#040000" ></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#E6A6C9" ></path><path d="M315.1 368.1c-23.9 0-43.3-19.4-43.3-43.3s19.4-43.3 43.3-43.3 43.3 19.4 43.3 43.3-19.4 43.3-43.3 43.3z m0-74.7c-17.3 0-31.3 14.1-31.3 31.3 0 17.3 14.1 31.3 31.3 31.3 17.3 0 31.3-14.1 31.3-31.3 0-17.2-14-31.3-31.3-31.3zM738.7 368.1c-23.9 0-43.3-19.4-43.3-43.3s19.4-43.3 43.3-43.3 43.3 19.4 43.3 43.3-19.4 43.3-43.3 43.3z m0-74.7c-17.3 0-31.3 14.1-31.3 31.3 0 17.3 14.1 31.3 31.3 31.3 17.3 0 31.3-14.1 31.3-31.3 0-17.2-14-31.3-31.3-31.3zM293.5 698.8l-14.5-1.3c0.1-0.6 1.5-14.6 15.1-27.9 17.2-16.7 45-24.8 82.7-24 4.9-0.1 10.9-10.5 16.1-19.6 8.4-14.7 19-33.1 37.9-34.3 19.4-1.2 42.2 16.4 71.5 55.4 9.9 5.2 16.5 11.2 21.8 16.1 8.4 7.7 13.1 11.9 25.1 10.8 14.9-1.4 38.9-11.1 77.5-31.4 26.8-28.4 56.4-41.4 83.5-36.6 27.9 4.9 50.6 27.6 67.5 67.5l-13.4 5.7c-14.7-34.5-34.3-54.9-56.7-58.8-22.3-3.9-47.6 7.8-71.2 33.1l-0.8 0.9-1.1 0.6c-85.6 45.1-99.4 38-120.2 19.1-5.5-5-11.2-10.2-20.1-14.7l-1.5-0.8-1-1.4c-32.2-43.2-50.4-51.6-60-51-11.1 0.7-18.8 14-26.2 27-7.6 13.2-15.4 26.9-28.8 26.9h-0.2c-78.4-1.6-83 38.3-83 38.7z" fill="#040000" ></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#F7E983" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M329.174412 344.491728a38.118106 10.277919 57.6 1 0 17.355867-11.014369 38.118106 10.277919 57.6 1 0-17.355867 11.014369Z" fill="#040000" ></path><path d="M644.769475 355.956059a11.175989 36.321965 30 1 0 36.321965-62.911488 11.175989 36.321965 30 1 0-36.321965 62.911488Z" fill="#040000" ></path><path d="M569.678445 671.158059c-26.343403 0-51.190021-5.288638-70.049503-14.967843-20.755408-10.577275-32.230754-25.445332-32.230755-41.710388 0-16.265056 11.475346-31.133112 32.230755-41.710387 18.859482-9.579419 43.805886-14.967843 70.049503-14.967843s51.190021 5.288638 70.049503 14.967843c20.755408 10.577275 32.230754 25.445332 32.230754 41.710387 0 16.265056-11.475346 31.133112-32.230754 41.710388-18.859482 9.679205-43.805886 14.967843-70.049503 14.967843z m0-95.095693c-49.693237 0-84.318846 20.356266-84.318846 38.517248s34.625609 38.517248 84.318846 38.517248 84.318846-20.356266 84.318846-38.517248-34.725395-38.517248-84.318846-38.517248z" fill="#040000" ></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#A6D9E2" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M376.194134 348.950302m-23.44962 0a23.44962 23.44962 0 1 0 46.89924 0 23.44962 23.44962 0 1 0-46.89924 0Z" fill="#040000" ></path><path d="M629.150672 348.950302m-24.647047 0a24.647047 24.647047 0 1 0 49.294095 0 24.647047 24.647047 0 1 0-49.294095 0Z" fill="#040000" ></path><path d="M397.847613 603.503411c13.471058 8.282206 28.738258 14.468914 43.7061 19.458195 29.835899 9.978562 62.266225 14.169558 93.299551 7.483921 21.054765-4.490353 40.213604-14.369129 56.778016-28.039758 6.785422-5.587995-2.893783-15.167414-9.579419-9.579419-46.999026 38.916391-112.258819 31.033327-163.847983 6.086922-4.590138-2.195284-9.080491-4.490353-13.371272-7.184564-7.583707-4.590138-14.468914 7.184564-6.984993 11.774703z" fill="#040000" ></path><path d="M627.753674 534.052621c-31.033327 24.048334-58.474371 68.253362-37.419607 106.970182 10.577275 19.35841 29.835899 32.629897 48.795167 42.708244 7.982849 4.190996 15.067628-7.883064 7.084779-12.07406-25.245761-13.271487-53.485091-35.324108-49.094524-66.557006 2.793997-20.156695 15.766127-37.319821 29.736114-51.190022 3.392711-3.392711 6.984993-6.785422 10.776847-9.77899 2.993569-2.295069 2.394855-7.483921 0-9.878776-2.893783-3.19314-6.885208-2.49464-9.878776-0.199572z" fill="#040000" ></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#AD6F59" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M411.829832 330.730879a38.118106 10.277919 57.6 1 0 17.355867-11.014368 38.118106 10.277919 57.6 1 0-17.355867 11.014368Z" fill="#040000" ></path><path d="M480.669675 609.989476c11.774703-25.844475 27.740401-51.788735 44.60417-73.342429 13.770415-17.462483 29.237186-33.92711 47.897096-44.803742 17.262912-10.078347 35.324108-13.67063 54.283376-6.58585 11.974274 4.390567 23.948548 14.468914 33.128825 24.547261 14.369129 15.865913 25.145975 34.625609 34.725394 53.684662 4.290782 8.581563 17.262912 0.997856 12.972131-7.583707-15.167414-30.334828-35.224323-63.763009-66.157864-80.327421-21.054765-11.37556-44.504385-11.475346-66.157864-1.895927-21.054765 9.280062-38.617034 25.644904-53.485091 42.907815-14.468914 16.863769-27.041902 35.324108-38.217891 54.582733-5.887351 10.178133-11.674917 20.555837-16.464627 31.232898-1.696355 3.692068-0.997856 7.982849 2.694212 10.277918 3.19314 1.895927 8.581563 0.898071 10.178133-2.694211z" fill="#040000" ></path><path d="M663.863649 338.091735a14.468914 33.727538 30 1 0 33.727538-58.417811 14.468914 33.727538 30 1 0-33.727538 58.417811Z" fill="#040000" ></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#83CEE3" ></path><path d="M369 375.8m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M369 411.7c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.1 36-36 36z m0-69.1c-18.3 0-33.2 14.9-33.2 33.2S350.7 409 369 409s33.2-14.9 33.2-33.2-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M672.2 333.6c-15.1 7.6-30.2 15.6-44.3 25-5.9 3.9-17 10.4-14.6 19.1 1.8 6.5 12 11.2 17.3 14.3 15.7 9.3 32.1 17.6 48.3 25.9 8.6 4.4 16.2-8.5 7.6-13-14.1-7.3-28.3-14.5-42.1-22.3-3.9-2.2-7.9-4.5-11.7-6.9-1.2-0.8-2.4-1.5-3.5-2.4-0.6-0.4-1.1-0.8-1.6-1.2 2.2 1.7-0.3-0.3-0.3-0.3-0.9 0.1-1.5-3.2-0.2 0.5 0.9 2.4 1.1 3.8 0.3 5.8 0.6-1.5-0.9 0.8-0.1 0 0.5-0.5 1-1.1 1.6-1.6 0.5-0.5 1-0.9 1.6-1.3 0.6-0.5 0 0 1.2-0.9 1.7-1.3 3.5-2.5 5.3-3.6 8.4-5.5 17.2-10.4 26-15.2 5.6-3 11.2-6 16.8-8.9 8.6-4.4 1-17.3-7.6-13zM578.2 720.9c-12.5-96.7-33.3-154.7-55.6-155.6-8.8 3.9-22.3 17.5-37.7 60.1-10.8 29.8-18.4 62.2-23 81.6-1.2 5.1-2.1 9.1-2.9 11.8l-9.3-2.4c0.7-2.6 1.6-6.6 2.8-11.6 14.9-63 36-136.8 67.5-148.8l0.8-0.3h0.8c18.2-0.4 33.2 19.5 45.8 60.8 10.2 33.3 16.7 74.6 20.5 103.3l-9.7 1.1z" fill="#040000" ></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#8CC66D" ></path><path d="M375.778679 404.47473a14.5 33.8 30 1 0 33.8-58.543317 14.5 33.8 30 1 0-33.8 58.543317Z" fill="#040000" ></path><path d="M627.220263 374.211388a43.1 11.6 57.6 1 0 19.588408-12.431182 43.1 11.6 57.6 1 0-19.588408 12.431182Z" fill="#040000" ></path><path d="M451.1 548.5c17.6-9.3 63.9-30 105.3-16.2 17 20.3 32.7 98.8 28.8 138.1-27.5 10.2-82.5 10.2-106.1 5.8-8.3-10.5-32.7-81.8-35.3-114.6-0.4-5.5 2.5-10.6 7.3-13.1z" fill="#040000" ></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#5A74B8" ></path><path d="M357.7 400m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M357.7 436c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.2 36-36 36z m0-69.2c-18.3 0-33.2 14.9-33.2 33.2s14.9 33.2 33.2 33.2 33.2-14.9 33.2-33.2-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M676 400m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M676 436c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.2 36-36 36z m0-69.2c-18.3 0-33.2 14.9-33.2 33.2s14.9 33.2 33.2 33.2c18.3 0 33.2-14.9 33.2-33.2s-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M347.6 684.1c0.3-0.9 0.6-1.7 0.9-2.6 0.2-0.5 1.4-3.2 0.3-0.8 0.6-1.4 1.3-2.9 2-4.3 3.2-6.3 6-10.7 10.9-15.3 4.3-4 10.8-7.5 17.1-6.1 3.9 0.9 7.9 4.9 11.1 7.2 3.1 2.2 6.3 4.5 9.7 6.2 7.5 3.8 15.3 4.4 23.4 1.9 4.7-1.5 9.2-3.6 13.6-5.9 5-2.6 10.7-5 14.2-9.5 4.5-5.7 6.1-8.5 11.4-14.1 1-1 2-2 3.1-3 0.2-0.2 2.2-1.7 0.6-0.5 0.6-0.4 1.2-0.9 1.8-1.3 1-0.6 2.1-1.3 3.2-1.7-2 0.8 0.2 0 0.6-0.1 2.3-0.7-0.3-0.2 1.2-0.3 2.8-0.1 3.6 0 5.5 1 3.8 1.9 6.6 4.7 9.5 7.8 4.5 5 7.5 11.1 11.7 16.2 1.8 2.2 3.7 4.3 5.4 6.5 8.1 10.3 17.7 22.2 32.2 22 8.8-0.1 16.6-5.2 22.6-11.2 4.2-4.1 7.7-8.9 11-13.7 2.9-4.2 4.6-9.9 6.2-13.5 3.2-7.1 7.2-13.1 13-18.1 4.8-4.2 11.1-6.5 16.7-5.3 10.5 2.4 17.2 12.1 23.1 20.2 4.7 6.5 9.8 13 16 18.2 7.8 6.4 17.1 11.4 27.5 11.1 14.1-0.4 25.5-9.5 34.2-19.9 3-3.6 3.6-8.8 0-12.4-3.1-3.1-9.4-3.7-12.4 0-6.3 7.6-14.7 15.9-24.9 14.7-2.2-0.3-5.3-1.5-7.9-3.1-3.5-2.1-6.1-4.4-9.1-7.5-4.9-5.1-6.8-8.1-10.9-13.8-7.3-10.1-16.1-19.6-28.2-23.7-18.5-6.3-35.7 5.6-46 20.1-2.4 3.3-4.4 6.9-6.1 10.6-1.8 3.9-2.7 8.5-5.2 11.9-3.1 4.4-6.2 8.8-10.2 12.5-3 2.8-5.7 4.4-8.6 5.1-0.4 0.1-1.7 0.1 0.1 0h-2.2c2.1 0.1 0 0-0.5-0.1-0.7-0.2-1.4-0.4-2-0.6 1.8 0.7-1.8-1.1-2.4-1.5l-1.2-0.9c1.5 1.2-0.9-0.9-1.2-1.1-4.7-4.3-8.4-9.5-12.3-14.4-10.9-13.6-20.9-34-41-34.9-14.2-0.6-24.5 10.6-32.4 20.8-1.2 1.6-2.5 3.2-3.7 4.8-1.5 1.9 1.1-1.4-0.4 0.5-0.4 0.5-0.8 1.2-1.3 1.6-1.7 1.4-4.6 2.6-6.6 3.6-2.9 1.6-5.9 3.2-9 4.5-1.6 0.7-3.4 1.2-5.1 1.7-2.2 0.6-0.7 0.5-2.8 0.4-2.8 0-3.9-0.4-6.6-1.9-3.9-2.2-7.5-4.9-11.1-7.5-5.6-4-10-6.9-17-7.5-10.5-0.9-20.3 3.2-28.2 9.9-9.4 8.1-16.4 20.2-20.1 32-3.6 11.2 13.3 15.8 16.8 5.1z" fill="#040000" ></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#F0884F" ></path><path d="M287.2 382c6.4 2.3 11.6-3.7 15.4-7.9 5.1-5.5 10.2-11 16-15.9 0.8-0.7 1.7-1.4 2.5-2.1 1.2-0.9-1.7 1.3 0.2-0.2l1.2-0.9c2.1-1.5 4.3-2.9 6.5-4.3 2-1.2 4-2.2 6.1-3.2 0.6-0.3 1.2-0.6 1.9-0.9-0.3 0.2-1.5 0.6 0.2-0.1 1.3-0.5 2.6-1 4-1.5 11.2-3.7 21.8-4 33.4-1.1 19.5 4.9 36.4 17 51.2 30.2 8.6 7.7 21.4-5 12.7-12.7-25.2-22.6-57.1-42.1-92.2-36.2-20.4 3.4-37.7 16.1-51.6 30.9-2.3 2.4-4.5 5-6.8 7.4-0.7 0.7-1.9 1.5-2.4 2.4-0.5 0.8 2.3-1.5 0.8-0.7 1.3-0.7 3.9-1.4 5.8-0.7-11.1-3.7-15.8 13.7-4.9 17.5zM598 382c6.4 2.3 11.6-3.7 15.4-7.9 5.1-5.5 10.2-11 16-15.9 0.8-0.7 1.7-1.4 2.5-2.1 1.2-0.9-1.7 1.3 0.2-0.2l1.2-0.9c2.1-1.5 4.3-2.9 6.5-4.3 2-1.2 4-2.2 6.1-3.2 0.6-0.3 1.2-0.6 1.9-0.9-0.3 0.2-1.5 0.6 0.2-0.1 1.3-0.5 2.6-1 4-1.5 11.2-3.7 21.8-4 33.4-1.1 19.5 4.9 36.4 17 51.2 30.2 8.6 7.7 21.4-5 12.7-12.7-25.2-22.6-57.1-42.1-92.2-36.2-20.4 3.4-37.7 16.1-51.6 30.9-2.3 2.4-4.5 5-6.8 7.4-0.7 0.7-1.9 1.5-2.4 2.4-0.5 0.8 2.3-1.5 0.8-0.7 1.3-0.7 3.9-1.4 5.8-0.7-11.1-3.7-15.8 13.7-4.9 17.5zM505.9 527.1c3.4 0.7 6.8 1.7 10.2 2.8 6.7 2.2 10.4 3.5 16.6 7.7 1.6 1.1-0.5-0.5 0.6 0.5 0.6 0.5 1.1 1.1 1.7 1.6 1.5 1.4-0.1-0.4 0.5 0.6 0.4 0.6 0.7 1.2 1 1.8-1-2 0.1 0 0 0.5 0.1-2-0.1 0-0.1 0-0.1 0.8 0 0.7 0.1-0.5-0.1 0.4-0.1 0.7-0.3 1.1-0.6 1 0.7-0.9-0.4 1-1.6 2.5-4.6 5.4-8.1 7.8-6.8 4.6-14.4 8.2-22 11.4-7 3-7.4 11.9 0 14.8 7.4 2.8 15 5.3 22.4 8.1 3.1 1.1 4.2 1.5 6.9 2.9 1.1 0.6 2.1 1.2 3.2 1.8 1.2 0.8-0.7-0.5 0.1 0 0.4 0.3 0.8 0.7 1.1 1.1 0.6 0.8-1.1-1.2-0.2-0.2 0.8 0.9-0.3-1.4-0.1-0.2 0.1 0.9 0.2-1.9 0-0.9-0.1 0.5-0.8 1.8 0 0.2-0.2 0.5-0.5 1-0.8 1.4-0.3 0.3-0.9 1.3-0.3 0.5-0.5 0.7-1.1 1.3-1.7 1.9-6.9 7.3-15.9 12.8-24.4 18.1-8.3 5.3-0.6 18.5 7.7 13.2 9.9-6.3 20.9-12.8 28.6-21.8 4.8-5.5 8.1-12.9 4.2-19.9-3.4-6-10.5-8.9-16.6-11.4-8.6-3.5-17.5-6.2-26.2-9.5v14.8c14.4-6.1 47.2-18.8 41.2-40.3-3.5-12.9-19.4-18.9-30.8-22.6-3.4-1.1-6.9-2.1-10.5-2.9-9.1-2.2-13.3 12.5-3.6 14.6z" fill="#040000" ></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#F6F180" ></path><path d="M342.9 400.6m-29.5 0a29.5 29.5 0 1 0 59 0 29.5 29.5 0 1 0-59 0Z" fill="#040000" ></path><path d="M342.9 431.3c-16.9 0-30.7-13.8-30.7-30.7s13.8-30.7 30.7-30.7 30.7 13.8 30.7 30.7-13.7 30.7-30.7 30.7z m0-59c-15.6 0-28.3 12.7-28.3 28.3s12.7 28.3 28.3 28.3 28.3-12.7 28.3-28.3-12.6-28.3-28.3-28.3z" fill="#FFFFFF" ></path><path d="M702 400.6m-29.5 0a29.5 29.5 0 1 0 59 0 29.5 29.5 0 1 0-59 0Z" fill="#040000" ></path><path d="M702 431.3c-16.9 0-30.7-13.8-30.7-30.7s13.8-30.7 30.7-30.7 30.7 13.8 30.7 30.7-13.8 30.7-30.7 30.7z m0-59c-15.6 0-28.3 12.7-28.3 28.3s12.7 28.3 28.3 28.3 28.3-12.7 28.3-28.3-12.7-28.3-28.3-28.3z" fill="#FFFFFF" ></path><path d="M358.7 519.9c20 22 45.5 40.4 71.3 54.8 51.2 28.5 111.7 39.9 168 19.5 44.3-16.1 80.7-47.8 110.2-83.9 3-3.7 3.6-8.9 0-12.5-3.1-3.1-9.5-3.7-12.5 0-25.5 31.4-56.2 59.7-93.7 76-27.1 11.7-56.6 15.7-85.8 12.2-24.7-2.9-49.5-11.8-71.5-23.4-18.7-9.8-36.6-22.2-51.1-34.3-7.8-6.5-15.5-13.3-22.4-20.9-7.7-8.5-20.1 4.1-12.5 12.5z" ></path></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M48.2 844.9c-68.5-210.6 186-782.1 409.1-795.4 6.3-0.4 12.5 0.2 18.6 1.6C665.1 94.6 985.4 515 987.1 821.3c0.1 20-12.9 37.9-22.4 43.1-162.7 89.8-605.8 179.7-884.4 30.9-15-7.9-24.2-26.1-32.1-50.4z" fill="#F0884F" ></path><path d="M401 352.1m-52.4 0a52.4 52.4 0 1 0 104.8 0 52.4 52.4 0 1 0-104.8 0Z" fill="#FFFFFF" ></path><path d="M408.7 329m-29.3 0a29.3 29.3 0 1 0 58.6 0 29.3 29.3 0 1 0-58.6 0Z" fill="#040000" ></path><path d="M527.5 352.1m-52.4 0a52.4 52.4 0 1 0 104.8 0 52.4 52.4 0 1 0-104.8 0Z" fill="#FFFFFF" ></path><path d="M527.5 329m-29.3 0a29.3 29.3 0 1 0 58.6 0 29.3 29.3 0 1 0-58.6 0Z" fill="#040000" ></path><path d="M450.7 517c1.1-8.2 3.2-16.4 6.1-24.1 0.1-0.3 1-2.5 0.5-1.4s0.3-0.7 0.5-1c0.7-1.4 1.4-2.8 2.2-4.1 0.4-0.8 2.8-3.9 1.3-2.1 0.8-1 1.7-1.9 2.6-2.8 1-1-1.5 1 0.1 0 0.5-0.3 1-0.6 1.5-0.8-1.3 0.7-1.2 0.3 0 0.1 1.9-0.3-1.8 0.3 0.1 0 1.2-0.2 1.5 0.3 0-0.1 0.6 0.2 1.3 0.3 1.9 0.5 0.3 0.1-1.3-0.7 0.2 0.1 0.8 0.5 1.6 0.9 2.4 1.4 1.4 1 0-0.1 1.4 1.1 0.9 0.8 1.8 1.7 2.6 2.6 1.8 1.9 3.5 3.9 5 6.1 5.1 7.1 9.3 14.8 13.2 22.6 3.5 6.9 13.7 4.7 15.8-2.1 2.6-8.7 4.8-17.4 7.4-26.1 0.9-3.2 1.9-6.4 3.2-9.4-0.7 1.6 0.8-1.6 1.2-2.2l0.9-1.5c0.7-1.2-1.4 0.7 0.1-0.1 1.7-0.9-1.2 0.3-0.3 0.1 0.8-0.2 1-1.2 0.3-0.3-0.6 0.8 0.6 0-0.5 0.2-2 0.3 2.4 0.5-1.1 0 0.5 0.1 1.2 0.2 1.6 0.4-1.1-0.8-0.8-0.4 0.2 0.2 0.7 0.4 3.4 2.3 2.7 1.8 8.9 7.1 15.9 16.9 22.5 26 2.8 3.8 7.5 5.6 11.8 3.1 3.7-2.2 5.9-8 3.1-11.8-8.2-11.1-16.6-23-27.7-31.4-6.3-4.7-14.5-7.6-21.7-3-6.7 4.2-9.6 12.5-11.9 19.6-3.2 9.9-5.5 20-8.6 29.9 5.3-0.7 10.5-1.4 15.8-2.1-7.8-15.5-24.8-50.1-48-41.7-14.1 5.1-19.7 23-22.9 36.2-0.9 3.8-1.8 7.7-2.3 11.6-0.6 4.6 1.1 9.3 6 10.6 4.2 1 10.2-1.5 10.8-6.1z" fill="#040000" ></path></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M485.538528 993.072489a362.00362 481.804818 3.149 1 0 52.933731-962.15464 362.00362 481.804818 3.149 1 0-52.933731 962.15464Z" fill="#AADCF0" ></path><path d="M688.2 334.1c-15.1 7.6-30.2 15.6-44.3 25-5.9 3.9-17 10.4-14.6 19.1 1.8 6.5 12 11.2 17.3 14.3 15.7 9.3 32.1 17.6 48.3 25.9 8.6 4.4 16.2-8.5 7.6-13-14.1-7.3-28.3-14.5-42.1-22.3-3.9-2.2-7.9-4.5-11.7-6.9-1.2-0.8-2.4-1.5-3.5-2.4-0.6-0.4-1.1-0.8-1.6-1.2 2.2 1.7-0.3-0.3-0.3-0.3-0.9 0.1-1.5-3.2-0.2 0.5 0.9 2.4 1.1 3.8 0.3 5.8 0.6-1.5-0.9 0.8-0.1 0 0.5-0.5 1-1.1 1.6-1.6 0.5-0.5 1-0.9 1.6-1.3 0.6-0.5 0 0 1.2-0.9 1.7-1.3 3.5-2.5 5.3-3.6 8.4-5.5 17.2-10.4 26-15.2 5.6-3 11.2-6 16.8-8.9 8.6-4.4 1-17.4-7.6-13zM375.8 347c13.4 6.8 26.7 14 39.5 21.9 1.8 1.2 3.7 2.3 5.5 3.5 0.9 0.6 1.7 1.2 2.6 1.8 0.9 0.6 1.9 1.4 1.6 1.1 1.1 0.9 2.1 1.9 3.1 2.8 1.2 1 0-0.3 0.1 0 0-0.2-0.8-2.4-0.3-4.1 1.5-5.5 2.3-2.7 0.8-2-0.4 0.2-0.9 0.8-1.3 1.1 1.7-1.4-1.6 1.1-2.3 1.6-3.4 2.3-6.9 4.4-10.4 6.4-14.9 8.6-30.3 16.4-45.6 24.3-8.6 4.4-1 17.4 7.6 13 15-7.7 30.1-15.4 44.8-23.8 6.2-3.6 13.8-7.3 18.7-12.7 7.6-8.3-3.8-16.6-9.9-20.9-8.7-6.1-18-11.3-27.3-16.4-6.5-3.6-13-7.1-19.6-10.4-8.6-4.5-16.3 8.5-7.6 12.8zM412.8 570.9c13.5 7.7 28.5 13.3 43.3 17.9 29.8 9.2 61.7 13.1 92.6 7.3 20.6-3.9 40-12.5 56.6-25.2 2.8-2.2 4.3-5.6 2.3-9-1.6-2.8-6.2-4.5-9-2.3-48.3 36.9-113.3 30-165.6 6.7-4.6-2.1-9.2-4.2-13.7-6.7-7.3-4.2-13.9 7.2-6.5 11.3z" fill="#040000" ></path><path d="M644.6 505.2c-30.1 21.5-60.6 62.5-39.1 99.8 10.7 18.6 30.3 30.9 49.1 40.1 7.8 3.8 14.6-7.9 6.8-11.7-23.6-11.5-53.7-31.4-49.4-60.9 2.8-18.9 15.8-34.6 29.5-47.2 2.5-2.3 5.1-4.6 7.8-6.7 0.5-0.4 0.9-0.7 1.4-1.1-0.4 0.3-1.2 0.9-0.1 0.1l0.9-0.6c6.9-5.1 0.2-16.8-6.9-11.8z" fill="#040000" ></path></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M235.1 76.9c75.6-26.5 297.3-90.1 514.2-16.6 16.3 5.5 29.8 17.4 37.1 33 57.5 122.4 127.1 602.1 62.1 785.6a62.58 62.58 0 0 1-32.5 35.8c-109.5 51.8-428.1 136.7-609.3 37.2-14.4-7.9-25-21.3-29.7-37.1-41.9-140.6-37-627.7 19.1-798 6.1-18.7 20.5-33.4 39-39.9z" fill="#F9DABD" ></path><path d="M392.2 360.2m-35.2 0a35.2 35.2 0 1 0 70.4 0 35.2 35.2 0 1 0-70.4 0Z" fill="#040000" ></path><path d="M618.6 360.2m-35.2 0a35.2 35.2 0 1 0 70.4 0 35.2 35.2 0 1 0-70.4 0Z" fill="#040000" ></path><path d="M512 562.6c-36 0-65.3-29.3-65.3-65.3S476 432 512 432s65.3 29.3 65.3 65.3-29.3 65.3-65.3 65.3z m0-122.9c-31.7 0-57.6 25.8-57.6 57.6s25.8 57.6 57.6 57.6c31.7 0 57.6-25.8 57.6-57.6s-25.9-57.6-57.6-57.6z" fill="#040000" ></path></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M178.1 971.5c38.1 15.9 98.7 26.6 171.3-12.3 3.7-2 8.4-1.6 11.6 1.1 43.3 35.9 123.3 80.8 236 10.9 3.8-2.4 8.7-2.4 12.6-0.2 41.8 23.9 191.6 58.2 246.6 14.2 4.4-3.5 9.1-6.6 14.5-8.5C1065 909.5 678.2-652 194.3 351c-37.5 77.8-38.4 94.1-71.9 211.3-27.6 96.3-29.1 231.3 1.4 348.1 7.2 27.3 27.3 49.9 54.3 61.1z" fill="#ABAAAA" ></path><path d="M468.9 349H418c-6.1 0-11.1-5-11.1-11.1V336c0-6.1 5-11.1 11.1-11.1h50.9c6.1 0 11.1 5 11.1 11.1v1.9c0 6.1-5 11.1-11.1 11.1zM643 471.9H390c-6.6 0-12-5.4-12-12s5.4-12 12-12h253c6.6 0 12 5.4 12 12s-5.4 12-12 12zM609 349h-61.2c-6 0-11-4.9-11-11v-2.1c0-6 4.9-11 11-11H609c6 0 11 4.9 11 11v2.1c0 6.1-4.9 11-11 11z" fill="#040000" ></path></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M673.1 318.7c3.7-17.5 5.6-35.7 5.6-54.4 0-137.9-105.5-249.7-235.6-249.7S207.4 126.4 207.4 264.3c0 55.4 17.1 106.7 45.9 148.1-55.2 63.3-88.6 145.9-88.6 236.3 0 199.2 162.1 360.6 362.1 360.6 200 0 362.1-161.5 362.1-360.6 0.1-147.3-88.7-274-215.8-330z" fill="#4F8A54" ></path><path d="M392 246.2m-47.1 0a47.1 47.1 0 1 0 94.2 0 47.1 47.1 0 1 0-94.2 0Z" fill="#FFFFFF" ></path><path d="M386 252.8m-26.4 0a26.4 26.4 0 1 0 52.8 0 26.4 26.4 0 1 0-52.8 0Z" fill="#040000" ></path><path d="M505.6 246.2m-47.1 0a47.1 47.1 0 1 0 94.2 0 47.1 47.1 0 1 0-94.2 0Z" fill="#FFFFFF" ></path><path d="M501.4 252.8m-26.4 0a26.4 26.4 0 1 0 52.8 0 26.4 26.4 0 1 0-52.8 0Z" fill="#040000" ></path><path d="M474.3 364.8h-50.9c-6.1 0-11.1-5-11.1-11.1v-1.9c0-6.1 5-11.1 11.1-11.1h50.9c6.1 0 11.1 5 11.1 11.1v1.9c0 6.2-5 11.1-11.1 11.1z" fill="#040000" ></path></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M246.4 227.6c-166.9 101.1-461.9 344 87 564.1 1.5 0.6 2.9 1.1 4.4 1.6 80.7 27.7 392.8 165.4 641-198.1 40-58.6 38.5-136.2-3.7-193.3C892 289.5 727 201.1 429.1 182.7c-64.1-4-127.8 11.6-182.7 44.9z" fill="#CF92BE" ></path><path d="M617.1 393.4c-17.4 8.8-34.9 18.1-51.2 28.9-6.9 4.6-20.3 12.3-17.4 22.6 1.2 4.3 5.6 7 9 9.5 3.7 2.7 7.6 5 11.5 7.3 18.2 10.8 37.1 20.3 55.9 30 10 5.1 18.9-10 8.8-15.1-16.4-8.4-32.9-16.9-49-26-4.5-2.6-9.1-5.2-13.5-8l-4.5-3c-0.7-0.5-1.3-1-2-1.5 1.6 1.2 0.7 0.4-0.2-0.2-1.3-0.9-0.3-0.9-0.5-0.3 0.2 0.2 0.4 0.5 0.6 0.7 1 1.9 1.3 3.7 0.8 5.7 0.1-0.6 0.7-1.4-0.6 1.3 0.7-1.5-0.1 0-0.2 0.1 0.6-0.6 1.2-1.3 1.9-1.9l1.8-1.5c1.8-1.6-0.6 0.3 1.2-0.9 2-1.5 4.1-2.9 6.2-4.3 10-6.5 20.4-12.4 30.9-18 6.5-3.5 13.1-7 19.7-10.4 9.6-5 0.8-20.1-9.2-15zM323.1 408.5c15.9 8.1 31.7 16.5 46.8 26 2.2 1.4 4.3 2.8 6.5 4.2 1 0.7 1.9 1.3 2.8 2 0.5 0.3 1 0.7 1.4 1.1-1.1-0.9-0.3-0.3 0.3 0.3 1.1 1 2.2 2.2 3.3 3.1 1.4 1.1-1-1.7-0.1-0.1-0.6-1.1-0.9-4.1 0.3-6.7 2.2-4.8 0.7 0.1 0-0.5 0 0-1.1 0.9-1.3 1 2.3-1.9 0 0-0.5 0.4-0.8 0.5-1.5 1.1-2.3 1.6-4 2.7-8.1 5.1-12.3 7.5-17.3 10-35.1 19.1-52.8 28.2-10 5.1-1.2 20.2 8.8 15.1 17.5-9 35-17.9 52-27.7 7.3-4.2 15.9-8.6 21.8-14.7 9.3-9.7-4.3-19.7-11.5-24.7-10.1-7.1-20.9-13.1-31.7-19-7.6-4.2-15.2-8.2-22.9-12.1-9.7-5.2-18.6 9.9-8.6 15zM513 592.1c-12.2 0-24.6-1.4-36.3-4.3-8-2-13.9-8.2-15.4-16.2s1.7-15.8 8.4-20.5c23.2-16.3 60.5-31.9 106.2-13 6.4 2.6 11 8.3 12.3 15.1 1.3 6.7-0.8 13.6-5.7 18.3-13.5 13.1-40.9 20.6-69.5 20.6z m-37.4-32.5c-3.4 2.4-4.9 6.2-4.2 10.2 0.8 4.1 3.6 7.1 7.7 8.1 39.1 9.7 81.2 0.7 96.1-13.7 2.4-2.3 3.4-5.6 2.7-8.9-0.7-3.4-2.9-6.2-6.1-7.5-41.2-17.2-75.1-3.1-96.2 11.8z" fill="#040000" ></path></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M1008.6 465.7c0-124.9-95.5-226.2-213.4-226.2-12 0-23.8 1.1-35.2 3.1v-3.1c0-124.9-95.5-226.2-213.4-226.2S333.4 114.6 333.4 239.5c0 2.4 0 4.8 0.1 7.2-17.1-4.7-35-7.2-53.4-7.2-117.8 0-213.4 101.3-213.4 226.2 0 92.1 51.9 171.3 126.3 206.6-13.7 29.9-21.4 63.4-21.4 98.8 0 124.9 95.5 226.2 213.4 226.2 68.8 0 130-34.5 169-88.1 39 53.6 100.2 88.1 169 88.1 117.8 0 213.4-101.3 213.4-226.2 0-41.2-10.4-79.9-28.6-113.1 60.5-39.9 100.8-111.1 100.8-192.3z" fill="#8CC66D" ></path><path d="M437.8 400.7m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M649.7 400.7m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M527.3 625.9c6.3-14.2 13.1-28.3 17.9-43 6.2-19 8.3-38.6 10.5-58.3l2.1-19.2c0.7-6.2-9-6.1-9.7 0-1.7 16.3-2.8 32.8-5.7 48.9-4.2 23.7-13.8 45-23.5 66.7-2.5 5.6 5.9 10.5 8.4 4.9z" fill="#252525" ></path><path d="M447.7 522.3c20.3-0.1 40.6-0.2 61-0.4l96.6-0.6c7.5 0 14.9-0.1 22.4-0.1 16.6-0.1 16.7-25.9 0-25.8-20.3 0.1-40.6 0.2-61 0.4l-96.6 0.6c-7.5 0-14.9 0.1-22.4 0.1-16.6 0.1-16.7 25.9 0 25.8z" fill="#040000" ></path><path d="M495.4 508.2c-10.3 3.8-9.2 20.9-9.2 29.5 0.1 16 2.1 32.3 6.1 47.8 3.5 13.7 8.7 29.9 20.6 38.7 12.9 9.5 27.6 2.1 37.6-7.9 10.2-10.3 17.8-23 24.7-35.6 11.6-21.3 20.9-43.8 29.7-66.4 3-7.8-9.5-11.1-12.5-3.4-7.4 19.1-15.3 38.1-24.7 56.4-5.9 11.5-12.2 23-20.3 33.1-2.8 3.5-5.8 6.9-9.2 9.8-1.9 1.7-1.4 1.3-3.3 2.5-1.3 0.8-2.6 1.6-3.9 2.2-0.7 0.3 1-0.2-0.8 0.3-0.6 0.2-1.2 0.3-1.8 0.5-1.1 0.3-1.2 0.2-0.5 0.1-0.6 0-1.3 0-1.9 0.1-2.2 0.1 0.6 0.5-1.8-0.2l-1.8-0.6c1.5 0.5 0.2 0.1-0.5-0.3-0.8-0.5-2.9-2.1-1.7-1.1-1-0.9-2-1.7-2.8-2.7-0.4-0.5-0.9-1-1.3-1.5 0.4 0.5 0.1 0.2-0.5-0.7-0.8-1.3-1.7-2.5-2.4-3.9-0.7-1.3-1.4-2.5-2-3.8-0.4-0.8-0.8-1.6-1.1-2.4-0.1-0.2-0.5-1.1 0 0l-0.6-1.5a86.8 86.8 0 0 1-3.3-9.8c-4.4-14.9-6.2-27.9-6.8-42.8-0.3-6.6-0.3-13.1 0.4-19.7 0.2-1.5-0.3 1.5 0.1-0.5l0.3-1.8c0.2-0.9 0.5-1.8 0.7-2.8 0.4-1.9-0.7 1.1 0.3-0.7 0.5-1-1.3 1.2-0.3 0.5-0.3 0.3-1.1 0.8-2 1.1 7.7-2.9 4.3-15.4-3.5-12.5z" fill="#040000" ></path></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M75.4 739.8c-78.7-134.4-194-455.7 401.4-579.6 9.8-2 19.2-6.2 29.2-7.5C656.8 133 947.3 205 1000.1 578.4c42.6 223.8 29.7 392.1-822 233.6-43.1-8-80.6-34.4-102.7-72.2z" fill="#F09495" ></path><path d="M704.6 875.4c-129 0-301.8-20.5-526.6-62.3-43.5-8.1-81.2-34.6-103.5-72.7-19.3-32.9-44.8-84.3-57.1-142.5-13.9-65.1-8.8-125.3 15.1-179.2 54.3-122.3 203.7-209.6 444-259.6 4.1-0.9 8.3-2.1 12.3-3.4 5.5-1.7 11.1-3.4 16.9-4.2 29-3.8 75.7-5.9 133.8 5.7 54.5 10.9 105.3 31 150.8 59.9C843.7 251 888.2 296 922.7 351c39.7 63.1 66.1 139.6 78.5 227.3 8.1 42.4 15.2 87.3 12.5 127.9-2.8 42.6-16.4 75.5-41.5 100.7-42.5 42.7-120.3 65-237.8 68.1-9.6 0.2-19.6 0.4-29.8 0.4zM76.3 739.3c22 37.6 59.2 63.7 102.1 71.7 242.5 45.1 424.4 65.3 556.1 61.9 116.9-3.1 194.1-25.2 236.3-67.5 55.4-55.6 44.4-142.5 28.3-226.7C976 415.8 903.4 291.5 789.2 219c-124-78.7-248.1-69.9-283.2-65.3-5.6 0.7-11.2 2.4-16.6 4.1-4.1 1.2-8.3 2.5-12.5 3.4C237.3 211.1 88.5 298 34.5 419.6c-54.6 122.8 2.8 253 41.8 319.7z" fill="#FFFFFF" ></path><path d="M424.1 442.5m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M635.9 442.5m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M426.2 543.3c17.1 7.9 36.6 26 25.5 46.1-6.9 12.5-19.8 21.2-31.7 28.4-4.5 2.7-0.4 9.8 4.1 7.1 17.4-10.5 41.6-27.6 39-51.1-1.6-14-12.4-24.8-23.5-32.3-3-2-6.1-3.9-9.3-5.4-4.8-2.1-8.9 5-4.1 7.2zM629.5 535.4c-21.8 11.7-40.6 37-25.7 61.3 8.2 13.4 22.2 22.7 35.7 30.3 4.7 2.7 8.9-4.6 4.2-7.2-15.5-8.7-39.9-23.9-36.9-45.2 1.6-11.4 10.7-20.7 19.6-27.2 2.4-1.7 4.8-3.4 7.4-4.8 4.7-2.5 0.4-9.8-4.3-7.2z" fill="#040000" ></path><path d="M457.2 584.6c25.6 25.6 66.7 41 101.8 28.3 18.2-6.6 33.2-19.1 45.5-33.8 4.2-5.1-3-12.4-7.3-7.3-18.5 22-43.3 38.1-73 35-18.6-1.9-36.2-10.8-50.9-22-2.9-2.2-6.1-4.8-8.8-7.5-4.7-4.7-12 2.6-7.3 7.3z" fill="#040000" ></path></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M915.9 510.5c8.4-19 13.1-39.8 13.1-61.7 0-90-78.9-162.9-176.2-162.9-3.2 0-6.3 0.1-9.5 0.2v-0.2c0-94.8-116.2-171.6-259.6-171.6S224 191.2 224 286v2c-96.2 0-174.1 72-174.1 160.9 0 38 14.3 73 38.2 100.5-41.8 29.4-68.8 75.9-68.8 128.2 0 88.9 78 160.9 174.1 160.9 17.1 0 33.6-2.3 49.3-6.5 28.9 46.1 88.7 77.7 157.6 77.7 49.4 0 94-16.2 126-42.3 32 26.1 76.6 42.3 126 42.3 77.3 0 143-39.7 166.7-95 3.1 0.2 6.3 0.2 9.5 0.2 97.3 0 176.2-72.9 176.2-162.9 0-60.6-35.7-113.4-88.8-141.5z" fill="#5A74B8" ></path><path d="M357.6 449.5a46.6 73.2 0 1 0 93.2 0 46.6 73.2 0 1 0-93.2 0Z" fill="#FEFEFD" ></path><path d="M357.5 449.5a25.1 39.4 0 1 0 50.2 0 25.1 39.4 0 1 0-50.2 0Z" fill="#040000" ></path><path d="M531.3 449.5a46.6 73.2 0 1 0 93.2 0 46.6 73.2 0 1 0-93.2 0Z" fill="#FEFEFD" ></path><path d="M531.2 449.5a25.1 39.4 0 1 0 50.2 0 25.1 39.4 0 1 0-50.2 0Z" fill="#040000" ></path><path d="M426.7 574.6c20.9 29.9 59.7 52.2 96.2 38.6 19.2-7.2 34.7-21.2 47.6-36.9 2.8-3.5 3.4-8.3 0-11.7-2.9-2.9-8.9-3.5-11.7 0-16.5 20.2-40.9 40.9-68.1 35.5-17.3-3.4-31-13.2-42.9-25.9-2-2.2-3.9-4.4-5.8-6.7-1.6-1.9 1.1 1.5-0.4-0.6-0.2-0.2-0.3-0.5-0.5-0.7-6.2-8.7-20.6-0.4-14.4 8.4z" fill="#040000" ></path></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M792.8 301.4c-8.2 0-16.2 0.4-24.2 1.3-12.3-81.8-129.2-145.9-271.8-145.9-137.1 0-250.5 59.3-269.9 136.6C105.3 295.5 7.4 391.2 7.4 508.9c0 119.1 100.2 215.6 223.7 215.6 5.3 0 10.6-0.2 15.8-0.5 14.4 80.5 130.4 143.2 271.3 143.2 135.9 0 248.6-58.3 269.4-134.6 1.7 0 3.4 0.1 5.1 0.1 123.6 0 223.7-96.5 223.7-215.6s-100-215.7-223.6-215.7z" fill="#F6CD50" ></path><path d="M435.9 431.5m-52.2 0a52.2 52.2 0 1 0 104.4 0 52.2 52.2 0 1 0-104.4 0Z" fill="#FAFAFA" ></path><path d="M588.1 431.5m-52.2 0a52.2 52.2 0 1 0 104.4 0 52.2 52.2 0 1 0-104.4 0Z" fill="#FAFAFA" ></path><path d="M435.9 431.5m-27.8 0a27.8 27.8 0 1 0 55.6 0 27.8 27.8 0 1 0-55.6 0Z" fill="#040000" ></path><path d="M601.9 407.4c-5.7 2.9-11.3 5.9-16.9 9-6.8 3.8-15.3 7.8-20.5 13.8-5.6 6.5 1.6 11.1 6.7 14.4 11.2 7.1 23.3 13 35.1 19 5.7 2.9 10.8-5.7 5.1-8.6-10.9-5.6-21.9-11.1-32.4-17.4-2.4-1.4-4.6-3.1-7-4.6 1 0.6-0.4-0.4-0.4-0.4-1.9-0.3-0.5 4.2 0.5 4.1-0.1 0-0.6 0.3 0.3-0.3 0.5-0.3 1-0.9 1.5-1.3 9.7-7.9 21.9-13.5 33.1-19.2 5.7-2.7 0.6-11.4-5.1-8.5zM406.6 547.6c11.5 14.4 27 26.7 42.7 36.3 32.2 19.8 71.2 27.2 107.6 15.4 29.5-9.6 54.6-29.1 75.5-51.6 10.8-11.6-6.6-29.1-17.5-17.5-9.4 10.1-19.5 19.7-30.8 27.7-4.6 3.2-9.3 6.2-14.2 8.9-5 2.8-9.9 5.1-14.1 6.7-4.6 1.7-9.3 3.2-14.1 4.4-2.2 0.5-4.4 1-6.6 1.4-1 0.2-2 0.3-2.9 0.5 2.6-0.4-2.1 0.2-2.5 0.3-4.1 0.4-8.3 0.5-12.5 0.4-2.2-0.1-4.4-0.2-6.6-0.4-1.1-0.1-2.2-0.2-3.2-0.3-1.5-0.2-1.4-0.2 0.1 0l-2.1-0.3c-7.8-1.3-15.4-3.4-22.8-6.2-0.9-0.4-1.8-0.7-2.8-1.1-3.1-1.2 2.3 1.1-0.7-0.3-1.5-0.7-2.9-1.3-4.4-2-3.7-1.8-7.2-3.7-10.8-5.8-5.7-3.4-11.1-7.1-16.4-11.1 3 2.3-1.1-0.9-1.8-1.5-1.1-0.9-2.1-1.7-3.1-2.6-2.1-1.8-4.2-3.7-6.3-5.6-4.4-4.1-8.7-8.4-12.4-13.1-4.2-5.2-13.1-4.3-17.5 0-5 5.1-4 12.2 0.2 17.4z" fill="#040000" ></path></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>'}]}],fo=(t,e=[])=>{let i=t.split("_");const n=Hs([...go,...e]);let s=n.find(t=>t.type===i[0]);if(s){let t=s.list.find(t=>t.name===i[1]);return t?t.icon:""}return""};var xo={hyperlink:uo,note:po,attachment:mo,nodeIconList:go,getNodeIconListIcon:fo};const wo=(t,e)=>{const i=new qn,n=(new zn).text(t);return e.text(n),i.add(n),i.bbox()},yo={radius:3,fontSize:12,fill:"",height:20,paddingX:8};function vo(){const t=this.getData("image");return(this.mindMap.renderer.renderTree.data.imgMap||{})[t]||t}function _o(){let t=this.getImageUrl();if(!t)return;t=(this.mindMap.renderer.renderTree.data.imgMap||{})[t]||t;const e=this.getImgShowSize(),i=(new ci).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 Mo(){const{custom:t,width:e,height:i}=this.getData("imageSize");return t?[e,i]:cs(e,i,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function Eo(){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=xo.getNodeIconListIcon(t,this.mindMap.opt.iconList||[]),n=null;return n=/^<svg/.test(i)?ss(i):(new ci).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 No(t){const e=this.hasCustomWidth();let i="string"===typeof t?t:this.getData("text"),{textAutoWrapWidth:n,emptyTextMeasureHeightText:s}=this.mindMap.opt;n=e?this.customTextWidth:n;const r=new qn;let o=!1;this.getData("resetRichText")&&(delete this.nodeData.data.resetRichText,o=!0),o&&!bs(i)&&(i=Rs(i)?Fs(i):`<p>${i}</p>`,this.setData({text:i}));const a=[],h=fr(this);Object.keys(h).forEach(t=>{a.push([t,h[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 d=this.mindMap.commonCaches.measureRichtextNodeTextSizeEl;a.forEach(([t,e])=>{d.style[t]=e}),d.style.lineHeight=1.2;const l=`<div>${i}</div>`;d.innerHTML=l;const c=d.children[0];c.classList.add("smm-richtext-node-wrap"),pr(c),c.style.maxWidth=n+"px",c.style.width=e?this.customTextWidth+"px":"";let{width:u,height:p}=c.getBoundingClientRect();if(p<=0){d.innerHTML=`<p>${s}</p>`;let t=d.children[0];t.classList.add("smm-richtext-node-wrap"),p=t.getBoundingClientRect().height,d.innerHTML=l}u=Math.min(Math.ceil(u)+1,n),p=Math.ceil(p),r.attr("data-width",u),r.attr("data-height",p);const m=cr({el:d.children[0],width:u,height:p}),g={"line-height":1.2};return a.forEach(([t,e])=>{g[vs(t)]=e}),m.css(g),r.add(m),{node:r,nodeContent:m,width:u,height:p}}function To(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 qn,n=this.getStyle("fontSize",!1),s=this.getStyle("textAlign",!1);let r=[];bs(e)||(r=String(e).split(/\n/gim));const{textAutoWrapWidth:o,emptyTextMeasureHeightText:a}=this.mindMap.opt;let h=r.length>1;r.forEach((t,e)=>{let i=t.split(""),n=[],s=[];while(i.length){let t=i.shift(),e=[...s,t].join("");wo(e,this.style).width<=o?s.push(t):(n.push(s.join("")),s=[t])}s.length>0&&n.push(s.join("")),n.length>1&&(h=!0),r[e]=n.join("\n")}),r=r.join("\n").replace(/\n$/g,"").split(/\n/gim),r.forEach((t,e)=>{""===t&&(t="\ufeff");const r=(new zn).text(t);r.addClass("smm-text-node-wrap"),r.attr("text-anchor",{left:"start",center:"middle",right:"end"}[s]||"start"),this.style.text(r),r.y(n*d*e+(d-1)*n/2),i.add(r)});let{width:l,height:c}=i.bbox();if(c<=0){const t=(new zn).text(a);this.style.text(t);const e=t.bbox();c=e.height}return l=Math.min(Math.ceil(l),o),c=Math.ceil(c),i.attr("data-width",l),i.attr("data-height",c),i.attr("data-ismultiLine",h||r.length>1),{node:i,width:l,height:c}}function Co(){const{hyperlink:t,hyperlinkTitle:e}=this.getData();if(!t)return;const{customHyperlinkJump:i,hyperlinkIcon:n}=this.mindMap.opt,{icon:s,style:r}=n,o=this.getNodeIconSize("hyperlinkIcon"),a=(new ss).size(o,o),h=(new Zn).to(t).target("_blank");h.node.addEventListener("click",e=>{"function"===typeof i&&(e.preventDefault(),i(t,this))}),e&&a.add(ss(`<title>${e}</title>`)),h.rect(o,o).fill({color:"transparent"});const d=ss(s||xo.hyperlink).size(o,o);return this.style.iconNode(d,r.color),h.add(d),a.add(h),{node:a,width:o,height:o}}function Lo(){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 s="",r={...yo};"string"===typeof t?s=t:(s=t.text,r={...yo,...t.style});const o="undefined"!==typeof r.width,a=new qn;a.on("click",()=>{this.mindMap.emit("node_tag_click",this,t,e,a)});const h=(new zn).text(s);this.style.tagText(h,r);const{width:d,height:l}=h.bbox(),c=o?r.width:d+2*r.paddingX,u=o?Math.max(c,d):c,p=Math.max(r.height,l);o?h.x((u-d)/2):h.x(o?0:r.paddingX),h.cy(-p/2);const m=(new an).size(c,r.height).cy(-p/2);o&&m.x((u-c)/2),this.style.tagRect(m,{...r,fill:r.fill||i[h.node.textContent]||qs(h.node.textContent)}),a.add(m).add(h),n.push({node:a,width:u,height:p})}),n}function Do(){if(!this.getData("note"))return null;const{icon:t,style:e}=this.mindMap.opt.noteIcon,i=this.getNodeIconSize("noteIcon"),n=(new ss).attr("cursor","pointer").addClass("smm-node-note").size(i,i);n.add((new an).size(i,i).fill({color:"transparent"}));const s=ss(t||xo.note).size(i,i);if(this.style.iconNode(s,e.color),n.add(s),!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 bo(){const{attachmentUrl:t,attachmentName:e}=this.getData();if(!t)return;const i=this.getNodeIconSize("attachmentIcon"),{icon:n,style:s}=this.mindMap.opt.attachmentIcon,r=(new ss).attr("cursor","pointer").size(i,i);e&&r.add(ss(`<title>${e}</title>`)),r.add((new an).size(i,i).fill({color:"transparent"}));const o=ss(n||xo.attachment).size(i,i);return this.style.iconNode(o,s.color),r.add(o),r.on("click",t=>{this.mindMap.emit("node_attachmentClick",this,t,r)}),r.on("contextmenu",t=>{this.mindMap.emit("node_attachmentContextmenu",this,t,r)}),{node:r,width:i,height:i}}function Ao(t){const{style:e}=this.mindMap.opt[t];return bs(e.size)?this.mindMap.themeConfig.iconSize:e.size}function Ro(){const t=this.getNodeIconSize("noteIcon"),{scaleY:e}=this.mindMap.view.getTransformData().transform,i=t*e;let{left:n,top:s}=this._noteData.node.node.getBoundingClientRect();return s+=i,{left:n,top:s}}function So(t){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 e=this.mindMap.commonCaches.measureCustomNodeContentSizeEl.getBoundingClientRect();return{width:e.width,height:e.height}}function Oo(){return!!this._customNodeContent}var Io={getImageUrl:vo,createImgNode:_o,getImgShowSize:Mo,createIconNode:Eo,createRichTextNode:No,createTextNode:To,createHyperlinkNode:Co,createTagNode:Lo,createNoteNode:Do,createAttachmentNode:bo,getNoteContentPosition:Ro,getNodeIconSize:Ao,measureCustomNodeContentSize:So,isUseCustomNodeContent:Oo};function zo(){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 an,this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,i,t,e,this)}}function Fo(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)}function ko(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.getChildrenLength()>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}var Bo={renderExpandBtnPlaceholderRect:zo,clearExpandBtnPlaceholderRect:Fo,updateExpandBtnPlaceholderRect:ko};function Po(){this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes=null,this.dragHandleWidth=4,this.dragHandleMousedownX=0,this.isDragHandleMousedown=!1,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.dragHandleMousedownBodyCursor="",this.dragHandleMousedownLeft=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 Ho(t){if(!this.isDragHandleMousedown)return;t.stopPropagation(),t.preventDefault();let{minNodeTextModifyWidth:e,maxNodeTextModifyWidth:i,isUseCustomNodeContent:n,customCreateNodeContent:s}=this.mindMap.opt;const r=n&&s&&this._customNodeContent;document.body.style.cursor="ew-resize",this.group.css({cursor:"ew-resize"});const{scaleX:o}=this.mindMap.draw.transform(),a=t.clientX-this.dragHandleMousedownX;let h=this.dragHandleMousedownCustomTextWidth+(0===this.dragHandleIndex?-a:a)/o;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/o),this.reRender(r?[]:["text"],{ignoreUpdateCustomTextWidth:!0})}function Uo(){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 Go(){const t=[new an,new an];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 $o(){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.forEach(t=>{t.remove()}))}var Yo={initDragHandle:Po,onDragMousemoveHandle:Ho,onDragMouseupHandle:Uo,createDragHandleNode:Go,updateDragHandle:$o};function Wo(){this.mindMap.cooperate&&(this._userListGroup=new qn,this.group.add(this._userListGroup))}function Vo(t){const{avatarSize:e,fontSize:i}=this.mindMap.opt.cooperateStyle,n=new qn,s=t.isMore?t.name:String(t.name)[0],r=(new kn).size(e,e);r.fill({color:t.color||qs(s)});const o=(new zn).text(s).fill({color:"#fff"}).css({"font-size":i+"px"}).dx(-i/2).dy((e-i)/2);return n.add(r).add(o),n}function jo(t){const{avatarSize:e}=this.mindMap.opt.cooperateStyle;return(new ci).load(t.avatar).size(e,e)}function Xo(){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 Ko(t){this.userList.find(e=>e.id==t.id)||(this.userList.push(t),this.updateUserListNode())}function qo(t){const e=this.userList.findIndex(e=>e.id==t.id);-1!==e&&(this.userList.splice(e,1),this.updateUserListNode())}function Zo(){this.userList=[],this.updateUserListNode()}var Qo={createUserListNode:Wo,updateUserListNode:Xo,createTextAvatar:Vo,createImageAvatar:jo,addUser:Ko,removeUser:qo,emptyUser:Zo};function Jo(){this.isGeneralization||(this._quickCreateChildBtn=null,this._showQuickCreateChildBtn=!1)}function ta(){if(!(this.isGeneralization||this.getChildrenLength()>0)){if(this._quickCreateChildBtn)this.group.add(this._quickCreateChildBtn);else{const{quickCreateChildBtnIcon:t,expandBtnStyle:e,expandBtnSize:i}=this.mindMap.opt,{icon:n,style:s}=t;let{color:r,fill:o}=e||{color:"#808080",fill:"#fff"};r=s.color||r;const a=ss(n||$r.quickCreateChild).size(i,i);a.css({cursor:"pointer"}),a.x(0).y(-i/2),this.style.iconNode(a,r);const h=(new kn).size(i);h.x(0).y(-i/2),h.fill({color:o}).css({cursor:"pointer"}),this._quickCreateChildBtn=new qn,this._quickCreateChildBtn.add(h).add(a),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,this.renderer.layout.renderExpandBtn(this,this._quickCreateChildBtn)}}function ea(){this.isGeneralization||this._quickCreateChildBtn&&this._showQuickCreateChildBtn&&(this._quickCreateChildBtn.remove(),this._showQuickCreateChildBtn=!1)}function ia(){if(this.isGeneralization)return;const{isActive:t}=this.getData();t||this.removeQuickCreateChildBtn()}var na={initQuickCreateChildBtn:Jo,showQuickCreateChildBtn:ta,removeQuickCreateChildBtn:ea,hideQuickCreateChildBtn:ia};function sa(t,e,i,n,s){const{imgTextMargin:r}=this.mindMap.opt;return"v"===t?n>0&&s>0?r:0:e>0&&i>0?r:0}function ra(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 oa(){if(this.isUseCustomNodeContent()){const t=this.measureCustomNodeContentSize(this._customNodeContent.cloneNode(!0));return{width:this.hasCustomWidth()?this.customTextWidth:t.width,height:t.height}}const{TAG_PLACEMENT:t,IMG_PLACEMENT:e}=n,{textContentMargin:i}=this.mindMap.opt,s=this.getStyle("tagPlacement")||t.RIGHT,r=s===t.BOTTOM,o=this.getStyle("imgPlacement")||e.TOP;let a=0,h=0,d=0,l=0,c=0,u=0,p=0;if(this._imgData&&(a=this._imgData.width,h=this._imgData.height),this.mindMap.nodeInnerPrefixList.forEach(t=>{const e=this[`_${t.name}Data`];e&&(d+=e.width,l=Math.max(l,e.height),p++)}),this._prefixData&&(d+=this._prefixData.width,l=Math.max(l,this._prefixData.height),p++),this._iconData.length>0&&(d+=this._iconData.reduce((t,e)=>(l=Math.max(l,e.height),t+e.width),0)+(this._iconData.length-1)*i,p++),this._textData&&(d+=this._textData.width,l=Math.max(l,this._textData.height),p++),this._hyperlinkData&&(d+=this._hyperlinkData.width,l=Math.max(l,this._hyperlinkData.height),p++),this._tagData.length>0){const{width:t,height:e}=this.getTagContentSize(i);r?(c=t,u=e):(d+=t,l=Math.max(l,e),p++)}this._noteData&&(d+=this._noteData.width,l=Math.max(l,this._noteData.height),p++),this._attachmentData&&(d+=this._attachmentData.width,l=Math.max(l,this._attachmentData.height),p++),this._postfixData&&(d+=this._postfixData.width,l=Math.max(l,this._postfixData.height),p++),this.mindMap.nodeInnerPostfixList.forEach(t=>{const e=this[`_${t.name}Data`];e&&(d+=e.width,l=Math.max(l,e.height),p++)}),d+=(p-1)*i,r&&d>0&&u>0&&(this._rectInfo.textContentWidthWithoutTag=d,d=Math.max(d,c),l=l+i+u),this._rectInfo.textContentWidth=d,this._rectInfo.textContentHeight=l;let m=0,g=0;[e.TOP,e.BOTTOM].includes(o)?(m=Math.max(a,d),g=h+l+this.getImgTextMarin("v",0,0,h,l)):(m=a+d+this.getImgTextMarin("h",a,d),g=Math.max(h,l));const{paddingX:f,paddingY:x}=this.getPaddingVale(),{paddingX:w,paddingY:y}=this.shapeInstance.getShapePadding(m,g,f,x);this.shapePadding.paddingX=w,this.shapePadding.paddingY=y;const v=this.getBorderWidth();return{width:m+2*f+2*w+v,height:g+2*x+2*y+v}}function aa(t,e){const{hoverRectPadding:i}=this.mindMap.opt;this.hoverNode=(new an).size(t+2*i,e+2*i).x(-i).y(-i),this.hoverNode.addClass("smm-hover-node"),this.style.hoverNode(this.hoverNode,t,e),this.group.add(this.hoverNode)}function ha(){if(!this.group)return;if(!this.isUseCustomNodeContent())return;this.shapeNode&&this.shapeNode.remove(),this._unVisibleRectRegionNode&&this._unVisibleRectRegionNode.remove(),this.hoverNode&&this.hoverNode.remove();const{width:t,height:e}=this,i=this.getBorderWidth()/2;this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(i,i),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass("generalization_"+this.generalizationBelongNode.uid),this.addHoverNode(t,e),this.shapeNode.back(),this.group.findOne("foreignObject").size(t,e)}function da(){if(!this.group)return;this.group.clear();const{openRealtimeRenderOnNodeTextEdit:t,textContentMargin:e,addCustomContentToNode:i}=this.mindMap.opt,{width:s,height:r}=this;let{paddingX:o,paddingY:a}=this.getPaddingVale();const h=this.getBorderWidth()/2;if(o+=this.shapePadding.paddingX+h,a+=this.shapePadding.paddingY+h,this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(h,h),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),this.isUseCustomNodeContent()){const t=cr({el:this._customNodeContent,width:s,height:r});return this.group.add(t),void this.addHoverNode(s,r)}const{IMG_PLACEMENT:d,TAG_PLACEMENT:l}=n,c=this.getStyle("imgPlacement")||d.TOP,u=this.getStyle("tagPlacement")||l.RIGHT,p=u===l.BOTTOM;let{textContentWidth:m,textContentHeight:g,textContentWidthWithoutTag:f}=this._rectInfo;const x=g;let w=0,y=0;const v=this._tagData&&this._tagData.length>0;if(v){const t=this.getTagContentSize(e);w=t.width,y=t.height,p&&(g-=y+e)}let _=0,M=0;if(this._imgData)switch(_=this._imgData.width,M=this._imgData.height,this.group.add(this._imgData.node),c){case d.TOP:this._imgData.node.cx(s/2).y(a);break;case d.BOTTOM:this._imgData.node.cx(s/2).y(r-a-M);break;case d.LEFT:this._imgData.node.x(o).cy(r/2);break;case d.RIGHT:this._imgData.node.x(s-o-_).cy(r/2);break;default:break}let E=new qn,N=0;if(v&&p&&(N=f<m?(m-f)/2:0),this.mindMap.nodeInnerPrefixList.forEach(t=>{const i=this[`_${t.name}Data`];i&&(i.node.x(N).y((g-i.height)/2),E.add(i.node),N+=i.width+e)}),this._prefixData){const t=cr({el:this._prefixData.el,width:this._prefixData.width,height:this._prefixData.height});t.x(N).y((g-this._prefixData.height)/2),E.add(t),N+=this._prefixData.width+e}let T=new qn;if(this._iconData&&this._iconData.length>0){let t=0;this._iconData.forEach(i=>{i.node.x(N+t).y((g-i.height)/2),T.add(i.node),t+=i.width+e}),E.add(T),N+=t}if(this._textData){const i=this._textData.node.attr("data-offsetx")||0;this._textData.node.attr("data-offsetx",N),(this._textData.nodeContent||this._textData.node).x(-i).x(N).y((g-this._textData.height)/2),t&&this._textData.node.opacity(this.mindMap.renderer.textEdit.getCurrentEditNode()===this?0:1),E.add(this._textData.node),N+=this._textData.width+e}this._hyperlinkData&&(this._hyperlinkData.node.x(N).y((g-this._hyperlinkData.height)/2),E.add(this._hyperlinkData.node),N+=this._hyperlinkData.width+e);let C=new qn;if(v)if(p){let t=0;this._tagData.forEach(i=>{i.node.x(t).y((y-i.height)/2),C.add(i.node),t+=i.width+e}),C.x((m-w)/2).y(x-y),E.add(C)}else{let t=0;this._tagData.forEach(i=>{i.node.x(N+t).y((g-i.height)/2),C.add(i.node),t+=i.width+e}),E.add(C),N+=t}if(this._noteData&&(this._noteData.node.x(N).y((g-this._noteData.height)/2),E.add(this._noteData.node),N+=this._noteData.width+e),this._attachmentData&&(this._attachmentData.node.x(N).y((g-this._attachmentData.height)/2),E.add(this._attachmentData.node),N+=this._attachmentData.width+e),this._postfixData){const t=cr({el:this._postfixData.el,width:this._postfixData.width,height:this._postfixData.height});t.x(N).y((g-this._postfixData.height)/2),E.add(t),N+=this._postfixData.width+e}this.mindMap.nodeInnerPostfixList.forEach(t=>{const i=this[`_${t.name}Data`];i&&(i.node.x(N).y((g-i.height)/2),E.add(i.node),N+=i.width+e)}),this.group.add(E);const{width:L,height:D}=E.bbox();let b=0,A=0;switch(c){case d.TOP:b=s/2-L/2,A=a+M+this.getImgTextMarin("v",0,0,M,x);break;case d.BOTTOM:b=s/2-L/2,A=a;break;case d.LEFT:b=_+o+this.getImgTextMarin("h",_,m),A=r/2-D/2;break;case d.RIGHT:b=o,A=r/2-D/2;break}if(E.translate(b,A),this.addHoverNode(s,r),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el){const t=cr(this._customContentAddToNodeAdd);this.group.add(t),i&&"function"===typeof i.handle&&i.handle({content:this._customContentAddToNodeAdd,element:t,node:this})}this.mindMap.emit("node_layout_end",this)}var la={getImgTextMarin:sa,getTagContentSize:ra,getNodeRect:oa,addHoverNode:aa,layout:da,customNodeContentRealtimeLayout:ha};class ca{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 vr(this),this.effectiveStyles={},this.shapeInstance=new _r(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._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(la).forEach(t=>{e[t]=la[t]}),Object.keys(kr).forEach(t=>{e[t]=kr[t]}),Object.keys(Qr).forEach(t=>{e[t]=Qr[t]}),Object.keys(Bo).forEach(t=>{e[t]=Bo[t]}),Object.keys(co).forEach(t=>{e[t]=co[t]}),Object.keys(Io).forEach(t=>{e[t]=Io[t]}),this.mindMap.cooperate&&Object.keys(Qo).forEach(t=>{e[t]=Qo[t]}),Object.keys(Yo).forEach(t=>{e[t]=Yo[t]}),this.mindMap.opt.isShowCreateChildBtnIcon&&(Object.keys(na).forEach(t=>{e[t]=na[t]}),this.initQuickCreateChildBtn()),e.bindEvent=!0),this.getSize(),this.updateGeneralization(),this.initDragHandle()}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:s,addCustomContentToNode:r}=this.mindMap.opt,o=["custom","image","icon","text","hyperlink","tag","note","attachment","prefix","postfix",...this.mindMap.nodeInnerPrefixList.map(t=>t.name),...this.mindMap.nodeInnerPostfixList.map(t=>t.name)],a={};Array.isArray(t)?o.forEach(e=>{t.includes(e)&&(a[e]=!0)}):o.forEach(t=>{a[t]=!0}),e&&i&&a.custom&&(this._customNodeContent=i(this)),this._customNodeContent?pr(this._customNodeContent):(a.image&&(this._imgData=this.createImgNode()),a.icon&&(this._iconData=this.createIconNode()),a.text&&(this._textData=this.createTextNode()),a.hyperlink&&(this._hyperlinkData=this.createHyperlinkNode()),a.tag&&(this._tagData=this.createTagNode()),a.note&&(this._noteData=this.createNoteNode()),a.attachment&&(this._attachmentData=this.createAttachmentNode()),this.mindMap.nodeInnerPrefixList.forEach(t=>{a[t.name]&&(this[`_${t.name}Data`]=t.createContent(this))}),a.prefix&&(this._prefixData=n?n(this):null,this._prefixData&&this._prefixData.el&&pr(this._prefixData.el)),a.postfix&&(this._postfixData=s?s(this):null,this._postfixData&&this._postfixData.el&&pr(this._postfixData.el)),this.mindMap.nodeInnerPostfixList.forEach(t=>{a[t.name]&&(this[`_${t.name}Data`]=t.createContent(this))}),r&&"function"===typeof r.create&&(this._customContentAddToNodeAdd=r.create(this),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el&&pr(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:s}=this.getNodeRect(),r=this.width!==n||this.height!==s;return this.width=n,this.height=s,r}bindGroupEvent(){this.group.on("click",t=>{if(this.mindMap.emit("node_click",this,t),this.isMultipleChoice)return t.stopPropagation(),void(this.isMultipleChoice=!1);this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&this.userList.length>0||this.active(t)}),this.group.on("mousedown",t=>{const{readonly:e,enableCtrlKeyNodeSelection:i,useLeftKeySelectionRightKeyDrag:n,mousedownEventPreventDefault:s}=this.mindMap.opt;if(s&&t.preventDefault(),e||(this.isRoot?3!==t.which||n||t.stopPropagation():2!==t.which&&t.stopPropagation()),!e&&(t.ctrlKey||t.metaKey)&&i){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,t)}),this.group.on("mouseup",t=>{this.isRoot||2===t.which||this.mindMap.opt.readonly||t.stopPropagation(),this.mindMap.emit("node_mouseup",this,t)}),this.group.on("mouseenter",t=>{this.isDrag||(this._isMouseenter=!0,this.showExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseenter(),this.mindMap.emit("node_mouseenter",this,t))}),this.group.on("mouseleave",t=>{this._isMouseenter&&(this._isMouseenter=!1,this.hideExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseleave(),this.mindMap.emit("node_mouseleave",this,t))}),this.group.on("dblclick",t=>{const{readonly:e,onlyOneEnableActiveNodeOnCooperate:i}=this.mindMap.opt;e||t.ctrlKey||t.metaKey||(t.stopPropagation(),i&&this.userList.length>0||this.mindMap.emit("node_dblclick",this,t))}),this.group.on("contextmenu",t=>{const{readonly:e,useLeftKeySelectionRightKeyDrag:i}=this.mindMap.opt;e||t.ctrlKey||(t.stopPropagation(),t.preventDefault(),this.mindMap.select&&!i&&this.mindMap.select.hasSelectRange()||(this.getData("isActive")&&1===this.renderer.activeNodeList.length||(this.renderer.clearActiveNodeList(),this.active(t)),this.mindMap.emit("node_contextmenu",t,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,readonly:s}=this.mindMap.opt,r=this.getChildrenLength();if(!i)if(e)this._expandBtn&&r<=0?this.removeExpandBtn():this.renderExpandBtn();else{const{isActive:t,expand:e}=this.getData();r<=0?this.removeExpandBtn():!e||t||this._isMouseenter?this.showExpandBtn():this.hideExpandBtn()}if(n)if(r>0)this.removeQuickCreateChildBtn();else{const{isActive:t}=this.getData();t?this.showQuickCreateChildBtn():this.hideQuickCreateChildBtn()}this.updateDragHandle(),this.renderGeneralization(t),this.updateUserListNode&&this.updateUserListNode();const o=this.group.transform();this.nodeDataSnapshot=s?"":JSON.stringify(this.getData()),this.left===o.translateX&&this.top===o.translateY||this.group.translate(this.left-o.translateX,this.top-o.translateY)}getNodePosInClient(t,e){const i=this.mindMap.draw.transform(),{scaleX:n,scaleY:s,translateX:r,translateY:o}=i,a=t*n+r,h=e*s+o;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;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:s}=this.mindMap.opt;if(e||!n||this.checkIsInClient(s.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 qn,this.group.addClass("smm-node"),this.group.css({cursor:"default"}),this.bindGroupEvent(),this.nodeDraw.add(this.group),this.layout(),this.update(e)):n&&s.removeNodeWhenOutCanvas&&this.removeSelf(),this.children&&this.children.length&&!1!==this.getData("expand")){let n=0;this.children.forEach(s=>{const r=()=>{s.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();this.mindMap.renderer.layout.nodeIsRemoveAllLines&&this.mindMap.renderer.layout.nodeIsRemoveAllLines(this)&&(e=0),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)),this.renderer.layout.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?n.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,s=n?"getSelfInhertStyle":"getSelfStyle",r=e[s]("lineWidth")||e.getStyle("lineWidth",!0),o=e[s]("lineColor")||this.getRainbowLineColor(e)||e.getStyle("lineColor",!0),a=e[s]("lineDasharray")||e.getStyle("lineDasharray",!0);this.style.line(t,{width:r,color:o,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 gs({},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:s,top:r,width:o,height:a}=this;const h=(s+o)*t+i,d=(r+a)*e+n;return s=s*t+i,r=r*e+n,{left:s,right:h,top:r,bottom:d,width:o*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 ca({...this.opt,uid:Cs()});return Object.keys(this).forEach(e=>{t[e]=this[e]}),t}createSvgTextNode(t=""){return(new zn).text(t)}getSvgObjects(){return{SVG:ss,G:qn,Rect:an}}checkEnableDragModifyNodeWidth(){const{enableDragModifyNodeWidth:t,isUseCustomNodeContent:e,customCreateNodeContent:i}=this.mindMap.opt;return t&&(this.mindMap.richText||e&&i)}hasCustomWidth(){return this.checkEnableDragModifyNodeWidth()&&void 0!==this.customTextWidth}getChildrenLength(){return this.nodeData.children?this.nodeData.children.length:0}}var ua=ca;class pa{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}}class ma{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 pa(this.mindMap.opt.maxNodeCacheCount),this.rootNodeCenterOffset=null}doLayout(){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 this.renderer.checkHasRenderSource(n.CHANGE_THEME)}checkIsLayerTypeChange(t,e){return!(t>=2&&e>=2)&&(t>=2&&e<2||(t<2&&e>=2||void 0))}checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(t){this.renderer.checkHasRenderSource(n.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))}checkNodeFixChange(t,e,i){let n=!1;this.mindMap.nodeInnerPrefixList.forEach(i=>{if(i.updateNodeData){const s=i.updateNodeData(t,e);s&&(n=s)}});let s=!1;return this.mindMap.nodeInnerPostfixList.forEach(e=>{if(e.updateNodeData){const n=e.updateNodeData(t,i);n&&(s=n)}}),n||s}createNode(t,e,i,n,s,r){const o={};this.mindMap.nodeInnerPrefixList.forEach(i=>{if(i.createNodeData){const[a,h]=i.createNodeData({data:t,parent:e,ancestors:r,layerIndex:n,index:s});o[a]=h}});const a={};this.mindMap.nodeInnerPostfixList.forEach(i=>{if(i.createNodeData){const[o,h]=i.createNodeData({data:t,parent:e,ancestors:r,layerIndex:n,index:s});a[o]=h}});const h=t.data.uid;let d=null;if(t&&t._node&&!this.renderer.reRender){d=t._node;const s=this.checkIsLayerTypeChange(d.layerIndex,n);d.reset(),d.layerIndex=n,i?d.isRoot=!0:d.parent=e._node,this.cacheNode(t._node.uid,d),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(d);const r=this.checkNodeFixChange(d,o,a),h=this.checkIsNeedResizeSources(),l=this.checkIsNodeDataChange(t._node.nodeDataSnapshot,t.data);(h||l||s||d.getData("resetRichText")&&!d.isUseCustomNodeContent()||d.getData("needUpdate")||r)&&(d.getSize(),d.needLayout=!0),this.checkGetGeneralizationChange(d,h)}else if(!this.lru.has(h)&&!this.renderer.lastNodeCache[h]||this.renderer.reRender){const s=h||Cs();d=new ua({data:t,uid:s,renderer:this.renderer,mindMap:this.mindMap,draw:this.draw,layerIndex:n,isRoot:i,parent:i?null:e._node,...o}),t.data.uid=s,this.cacheNode(s,d),t._node=d}else{d=this.lru.get(h)||this.renderer.lastNodeCache[h];const s=JSON.stringify(d.getData()),r=this.checkIsLayerTypeChange(d.layerIndex,n);d.reset(),d.nodeData=d.handleData(t||{}),d.layerIndex=n,i?d.isRoot=!0:d.parent=e._node,this.cacheNode(h,d),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(d),t._node=d;const l=this.checkIsNeedResizeSources(),c=this.checkIsNodeDataChange(s,t.data),u=this.checkNodeFixChange(d,o,a);(l||c||r||d.getData("resetRichText")&&!d.isUseCustomNodeContent()||d.getData("needUpdate")||u)&&(d.getSize(),d.needLayout=!0),this.checkGetGeneralizationChange(d,l)}return t.data.isActive&&this.renderer.addNodeToActiveList(d),-1!==this.mindMap.renderer.findActiveNodeIndex(d)&&d.setData({isActive:!0}),i?this.root=d:e._node.addChildren(d),d}checkGetGeneralizationChange(t,e){const i=t.getData("generalization");i&&t._generalizationList&&t._generalizationList.length>0&&t._generalizationList.forEach((t,n)=>{const s=t.generalizationNode,r=s.getData(),o=i[n];(e||o&&JSON.stringify(r)!==JSON.stringify(o))&&(o&&(s.nodeData.data=o),s.getSize(),s.needLayout=!0)})}formatPosition(t,e,i){return"number"===typeof t?t:void 0!==s[t]?e*s[t]:/^\d\d*%$/.test(t)?Number.parseFloat(t)/100*e:(e-i)/2}formatInitRootNodePosition(t){const{CENTER:e}=n.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){if(this.rootNodeCenterOffset)return this.rootNodeCenterOffset;let{initRootNodePosition:i}=this.mindMap.opt;const{CENTER:s}=n.INIT_ROOT_NODE_POSITION;if(i=this.formatInitRootNodePosition(i),i[0]===s&&i[1]===s)this.rootNodeCenterOffset={x:0,y:0};else{const i={width:t,height:e},n={width:t,height:e};this.setNodeCenter(i,[s,s]),this.setNodeCenter(n),this.rootNodeCenterOffset={x:n.left-i.left,y:n.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,s=(t,r)=>{e&&t.checkHasGeneralization()&&(n+=t._generalizationNodeWidth),t.children.length?(r+=t.width/2,t.children.forEach(t=>{s(t,r)})):(r+=t.width,i.push(r))};return s(t,0),Math.max(...i)+n}quadraticCurvePath(t,e,i,n,s=!1){let r,o;return s?(r=t+.8*(i-t),o=e+.2*(n-e)):(r=t+.2*(i-t),o=e+.8*(n-e)),`M ${t},${e} Q ${r},${o} ${i},${n}`}cubicBezierPath(t,e,i,n,s=!1){let r,o,a,h;return s?(r=t,o=e+(n-e)/2,a=i,h=o):(r=t+(i-t)/2,o=e,a=r,h=n),`M ${t},${e} C ${r},${o} ${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}createFoldLine(t){const{lineRadius:e}=this.mindMap.themeConfig,i=t.length;let n="",s="";if(i>=3&&e>0){const n=t[i-3],r=t[i-2],o=t[i-1],a=n[0].toFixed(0)===r[0].toFixed(0)&&r[0].toFixed(0)===o[0].toFixed(0)||n[1].toFixed(0)===r[1].toFixed(0)&&r[1].toFixed(0)===o[1].toFixed(0);if(!a){const a=this.computeNewPoint(n,r,e),h=this.computeNewPoint(o,r,e);s=`Q ${r[0]},${r[1]} ${h[0]},${h[1]}`,t.splice(i-2,1,a,s)}}return t.forEach((t,e)=>{if("string"===typeof t)n+=t;else{const[i,s]=t;n+=0===e?`M ${i},${s}`:`L ${i},${s}`}}),n}getMarginX(t){const{themeConfig:e,opt:i}=this.mindMap,{second:n,node:s}=e,r=2*i.hoverRectPadding;return 1===t?n.marginX+r:s.marginX+r}getMarginY(t){const{themeConfig:e,opt:i}=this.mindMap,{second:n,node:s}=e,r=2*i.hoverRectPadding;return 1===t?n.marginY+r:s.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,s=t=>{let i=1/0,r=-1/0,o=1/0,a=-1/0;t.children&&t.children.length>0&&t.children.forEach(t=>{let{left:h,right:d,top:l,bottom:c}=s(t),u=t.checkHasGeneralization()&&t.getData("expand")?t._generalizationNodeWidth+n:0,p=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<o&&(o=l),c+("v"===e?p:0)>a&&(a=c+("v"===e?p: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<o?h.top:o,bottom:h.bottom>a?h.bottom:a}},{left:r,right:o,top:a,bottom:h}=s(t);return{left:r,right:o,top:a,bottom:h,generalizationLineMargin:i,generalizationNodeMargin:n}}getChildrenBoundaries(t,e,i=0,n){let{generalizationLineMargin:s,generalizationNodeMargin:r}=this.mindMap.themeConfig;const o=t.children.slice(i,n+1);let a=1/0,h=-1/0,d=1/0,l=-1/0;return o.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:s,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){e.plot(this.transformPath(i)),t&&t(e,n,!0)}transformPath(t){const{customTransformNodeLinePath:e}=this.mindMap.opt;return e?e(t):t}}var ga=ma;class fa extends ga{constructor(t={},e){super(t),this.isUseLeft=e===n.LAYOUT.LOGICAL_STRUCTURE_LEFT}doLayout(t){let e=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{t(this.root)}];ws(e)}computedBaseValue(){let t=0;ds(this.renderer.renderTree,null,(e,i,n,s,r,o)=>{let a=this.createNode(e,i,n,s,r,o);if(a.sortIndex=t,t++,n?this.setNodeCenter(a):this.isUseLeft?a.left=i._node.left-a.width-this.getMarginX(s):a.left=i._node.left+i._node.width+this.getMarginX(s),!e.data.expand)return!0},(t,e,i,n)=>{let s=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaHeight=s?t._node.children.reduce((t,e)=>t+e.height,0)+(s+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(){ds(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,s=i+e;t.children.forEach(t=>{t.top=s,s+=t.height+e})}},null,!0)}adjustTopValue(){ds(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let s=t.childrenAreaHeight2-2*this.getMarginY(n+1)-t.height;s>0&&this.updateBrothers(t,s/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Ks(t,i);i.forEach((i,s)=>{if(i.uid===t.uid||i.hasCustomPosition())return;let r=0;s<n?r=-e:s>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):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:r,height:o,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 p=s+o/2,m=this.isUseLeft?h.left+h.width:h.left,g=h.top+h.height/2,f=u?h.width*(this.isUseLeft?-1:1):0;p=u&&!t.isRoot?p+o/2:p,g=u?g+h.height/2:g;let x=this.createFoldLine([[l,p],[l+c,p],[l+c,g],[m+f,g]]);this.setLineStyle(i,e[d],x,h)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:r,height:o,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=s+o/2,p=this.isUseLeft?h.left+h.width:h.left,m=h.top+h.height/2;u=l&&!t.isRoot?u+o/2:u,m=l?m+h.height/2:m;let g=l?` L ${this.isUseLeft?h.left:h.left+h.width},${m}`:"",f=`M ${c},${u} L ${p},${m}`+g;this.setLineStyle(i,e[d],f,h)})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:r,height:o,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 p;0===t.layerIndex&&(a=0),p=this.isUseLeft?0!==t.layerIndex||c?n-a:n+r/2:0!==t.layerIndex||c?n+r+a:n+r/2;let m,g=s+o/2,f=this.isUseLeft?h.left+h.width:h.left,x=h.top+h.height/2,w="";g=l&&!t.isRoot?g+o/2:g,x=l?x+h.height/2:x,m=this.isUseLeft?l?` L ${h.left},${x}`:"":l?` L ${h.left+h.width},${x}`:"",w=t.isRoot&&!u?this.quadraticCurvePath(p,g,f,x)+m:this.cubicBezierPath(p,g,f,x)+m,this.setLineStyle(i,e[d],w,h)})}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:s,layerIndex:r}=t;0===r&&(s=0);let{translateX:o,translateY:a}=e.transform(),h=this.mindMap.themeConfig.nodeUseLineStyle?n/2:0,d=this.isUseLeft?0-s:i,l=n/2+h;d===o&&l===a||e.translate(d-o,l-a)}renderGeneralization(t){t.forEach(t=>{let{left:e,top:i,bottom:n,right:s,generalizationLineMargin:r,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),a=this.isUseLeft?e-r:s+r,h=a,d=i,l=a,c=n,u=h+(this.isUseLeft?-20:20),p=d+(c-d)/2,m=`M ${h},${d} Q ${u},${p} ${l},${c}`;t.generalizationLine.plot(m),t.generalizationNode.left=a+(this.isUseLeft?-o:o)-(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 xa=fa;class wa extends ga{constructor(t={}){super(t)}doLayout(t){let e=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{t(this.root)}];ws(e)}computedBaseValue(){ds(this.renderer.renderTree,null,(t,e,i,s,r,o)=>{let a=this.createNode(t,e,i,s,r,o);if(i?this.setNodeCenter(a):(e._node.dir?a.dir=e._node.dir:a.dir=a.getData("dir")||(r%2===0?n.LAYOUT_GROW_DIR.RIGHT:n.LAYOUT_GROW_DIR.LEFT),a.left=a.dir===n.LAYOUT_GROW_DIR.RIGHT?e._node.left+e._node.width+this.getMarginX(s):e._node.left-this.getMarginX(s)-a.width),!t.data.expand)return!0},(t,e,i,s)=>{if(!t.data.expand)return t._node.leftChildrenAreaHeight=0,void(t._node.rightChildrenAreaHeight=0);let r=0,o=0,a=0,h=0;t._node.children.forEach(t=>{t.dir===n.LAYOUT_GROW_DIR.LEFT?(r++,a+=t.height):(o++,h+=t.height)}),t._node.leftChildrenAreaHeight=a+(r+1)*this.getMarginY(s+1),t._node.rightChildrenAreaHeight=h+(o+1)*this.getMarginY(s+1);let d=t._node.checkHasGeneralization()?t._node._generalizationNodeHeight+this.getMarginY(s+1):0;t._node.leftChildrenAreaHeight2=Math.max(t._node.leftChildrenAreaHeight,d),t._node.rightChildrenAreaHeight2=Math.max(t._node.rightChildrenAreaHeight,d)},!0,0)}computedTopValue(){ds(this.root,null,(t,e,i,s)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginY(s+1),i=t.top+t.height/2+e,r=i-t.leftChildrenAreaHeight/2,o=i-t.rightChildrenAreaHeight/2;t.children.forEach(t=>{t.dir===n.LAYOUT_GROW_DIR.LEFT?(t.top=r,r+=t.height+e):(t.top=o,o+=t.height+e)})}},null,!0)}adjustTopValue(){ds(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let s=2*this.getMarginY(n+1)+t.height,r=t.leftChildrenAreaHeight2-s,o=t.rightChildrenAreaHeight2-s;(r>0||o>0)&&this.updateBrothers(t,r/2,o/2)},null,!0)}updateBrothers(t,e,i){if(t.parent){let s=t.parent.children.filter(e=>e.dir===t.dir),r=Ks(t,s);s.forEach((t,s)=>{if(t.hasCustomPosition())return;let o=0,a=t.dir===n.LAYOUT_GROW_DIR.LEFT?e:i;s<r?o=-a:s>r&&(o=a),t.top+=o,t.children&&t.children.length&&this.updateChildren(t.children,"top",o)}),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):this.renderLineStraight(t,e,i)}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:s,top:r,width:o,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),p=this.mindMap.themeConfig.nodeUseLineStyle;t.children.forEach((d,l)=>{let c=0,m=0,g=p?d.width:0;d.dir===n.LAYOUT_GROW_DIR.LEFT?(m=-u,c=0===t.layerIndex?s:s-h,g=-g):(m=u,c=0===t.layerIndex?s+o:s+o+h);let f=r+a/2,x=d.dir===n.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,w=d.top+d.height/2;f=p&&!t.isRoot?f+a/2:f,w=p?w+d.height/2:w;let y=this.createFoldLine([[c,f],[c+m,f],[c+m,w],[x+g,w]]);this.setLineStyle(i,e[l],y,d)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:s,top:r,width:o,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.LAYOUT_GROW_DIR.LEFT?s-h:s+o+h,p=r+a/2,m=d.dir===n.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,g=d.top+d.height/2;p=c&&!t.isRoot?p+a/2:p,g=c?g+d.height/2:g;let f="";c&&(f=d.dir===n.LAYOUT_GROW_DIR.LEFT?` L ${d.left},${g}`:` L ${d.left+d.width},${g}`);let x=`M ${u},${p} L ${m},${g}`+f;this.setLineStyle(i,e[l],x,d)})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:s,top:r,width:o,height:a,expandBtnSize:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(h=0);const{nodeUseLineStyle:c,rootLineKeepSameInCurve:u,rootLineStartPositionKeepSameInCurve:p}=this.mindMap.themeConfig;t.children.forEach((d,l)=>{0===t.layerIndex&&(h=0);let m=0!==t.layerIndex||p?d.dir===n.LAYOUT_GROW_DIR.LEFT?s-h:s+o+h:s+o/2,g=r+a/2,f=d.dir===n.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,w="";g=c&&!t.isRoot?g+a/2:g,x=c?x+d.height/2:x;let y="";c&&(y=d.dir===n.LAYOUT_GROW_DIR.LEFT?` L ${d.left},${x}`:` L ${d.left+d.width},${x}`),w=t.isRoot&&!u?this.quadraticCurvePath(m,g,f,x)+y:this.cubicBezierPath(m,g,f,x)+y,this.setLineStyle(i,e[l],w,d)})}renderExpandBtn(t,e){let{width:i,height:s,expandBtnSize:r}=t,{translateX:o,translateY:a}=e.transform(),h=this.mindMap.themeConfig.nodeUseLineStyle?s/2:0,d=t.dir===n.LAYOUT_GROW_DIR.LEFT?0-r:i,l=s/2+h;if(d===o&&l===a)return;let c=d-o,u=l-a;e.translate(c,u)}renderGeneralization(t){t.forEach(t=>{let e=t.node.dir===n.LAYOUT_GROW_DIR.LEFT,{top:i,bottom:s,left:r,right:o,generalizationLineMargin:a,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),d=e?r-a:o+a,l=d,c=i,u=d,p=s,m=l+(e?-20:20),g=c+(p-c)/2,f=`M ${l},${c} Q ${m},${g} ${u},${p}`;t.generalizationLine.plot(f),t.generalizationNode.left=d+(e?-h:h)-(e?t.generalizationNode.width:0),t.generalizationNode.top=i+(s-i-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,s,r){r.dir===n.LAYOUT_GROW_DIR.LEFT?t.size(e,s).x(-e).y(0):t.size(e,s).x(i).y(0)}}var ya=wa;class va extends ga{constructor(t={}){super(t)}doLayout(t){let e=[()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}];ws(e)}computedBaseValue(){ds(this.renderer.renderTree,null,(t,e,i,n,s,r)=>{let o=this.createNode(t,e,i,n,s,r);if(i?this.setNodeCenter(o):e._node.isRoot&&(o.top=e._node.top+e._node.height+this.getMarginX(n)),!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(){ds(this.root,null,(t,e,i,n)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginX(n+1),s=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)+s+(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)+s+(this.getNodeActChildrenLength(i)>0?i.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){ds(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 s=t.children.length;if(e&&!e.isRoot&&s>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)+s*e;this.updateBrothersTop(t,i)}},(t,e,i)=>{if(i){let{right:e,left:i}=this.getNodeBoundaries(t,"h"),n=e-i,s=t.left-i-(n-t.width)/2;this.updateChildren(t.children,"left",s)}},!0)}updateBrothersLeft(t,e){if(t.parent){let i=t.parent.children,n=Ks(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=Ks(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i>n&&(s=e),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),this.updateBrothersTop(t.parent,e)}}renderLine(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:r,height:o,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=s+o,d=.7*c,u=1/0,p=-1/0;t.children.forEach((t,n)=>{let s=t.left+t.width/2,r=t.top;s<u&&(u=s),s>p&&(p=s);let o=this.mindMap.themeConfig.nodeUseLineStyle?` L ${t.left},${r} L ${t.left+t.width},${r}`:"",a=`M ${s},${h+d} L ${s},${h+d>r?r+t.height:r}`+o;this.setLineStyle(i,e[n],a,t)}),u=Math.min(u,a),p=Math.max(p,a);let m=this.lineDraw.path();if(t.style.line(m),m.plot(this.transformPath(`M ${a},${h} L ${a},${h+d}`)),t._lines.push(m),i&&i(m,t),l>0){let e=this.lineDraw.path();t.style.line(e),e.plot(this.transformPath(`M ${u},${h+d} L ${p},${h+d}`)),t._lines.push(e),i&&i(e,t)}}else{let n=s+o,r=-1/0,h=t.left+.3*t.width;if(t.children.forEach((o,a)=>{let d=o.top+o.height/2;d>r&&(r=d);let l="",c=o.left,u=o.left+o.width<h,p=!1;u?c=o.left+o.width:o.left<h&&o.left+o.width>h&&(p=!0,d=o.top,r=d),d>s&&d<n?l=`M ${u?t.left:t.left+t.width},${d} L ${c},${d}`:d<n?(p&&(d=o.top+o.height,c=h),l=`M ${h},${s} L ${h},${d} L ${c},${d}`):(p&&(c=h),l=`M ${h},${d} L ${c},${d}`);let m=this.mindMap.themeConfig.nodeUseLineStyle?` L ${c},${d-o.height/2} L ${c},${d+o.height/2}`:"";l+=m,this.setLineStyle(i,e[a],l,o)}),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:s,isRoot:r}=t;if(!r){let{translateX:t,translateY:r}=e.transform();e.translate(.3*i-s/2-t,n+s/2-r)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:s,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"h"),o=n+s,a=e,h=n+s,d=i,l=o+20,c=a+(d-a)/2,u=`M ${o},${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,s){t.size(i,e).x(0).y(n)}}var _a=va;class Ma extends ga{constructor(t={}){super(t)}doLayout(t){let e=[()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{t(this.root)}];ws(e)}computedBaseValue(){ds(this.renderer.renderTree,null,(t,e,i,n,s,r)=>{let o=this.createNode(t,e,i,n,s,r);if(i?this.setNodeCenter(o):o.top=e._node.top+e._node.height+this.getMarginX(n),!t.data.expand)return!0},(t,e,i,n)=>{let s=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaWidth=s?t._node.children.reduce((t,e)=>t+e.width,0)+(s+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(){ds(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,s=i+e;t.children.forEach(t=>{t.left=s,s+=t.width+e})}},null,!0)}adjustLeftValue(){ds(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let s=t.childrenAreaWidth2-2*this.getMarginY(n+1)-t.width;s>0&&this.updateBrothers(t,s/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Ks(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i<n?s=-e:i>n&&(s=e),t.left+=s,t.children&&t.children.length&&this.updateChildren(t.children,"left",s)}),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:s,width:r,height:o,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 p=n+r/2,m=0!==t.layerIndex||c?s+o+a:s+o/2,g=h.left+h.width/2,f=h.top,x="",w=l?` L ${h.left},${f} L ${h.left+h.width},${f}`:"";x=t.isRoot&&!u?this.quadraticCurvePath(p,m,g,f,!0)+w:this.cubicBezierPath(p,m,g,f,!0)+w,this.setLineStyle(i,e[d],x,h)})}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:r,height:o}=t;const{nodeUseLineStyle:a}=this.mindMap.themeConfig;let h=n+r/2,d=s+o;t.children.forEach((t,n)=>{let s=t.left+t.width/2,r=t.top,o=a?` L ${t.left},${r} L ${t.left+t.width},${r}`:"",l=`M ${h},${d} L ${s},${r}`+o;this.setLineStyle(i,e[n],l,t)})}renderLineStraight(t,e,i){if(t.children.length<=0)return[];let{left:n,top:s,width:r,height:o,expandBtnSize:a,isRoot:h}=t;const{alwaysShowExpandBtn:d,notShowExpandBtn:l}=this.mindMap.opt;d&&!l||(a=0);let c=n+r/2,u=s+o,p=this.getMarginX(t.layerIndex+1),m=.7*p,g=1/0,f=-1/0,x=t.children.length;t.children.forEach((t,n)=>{let s=t.left+t.width/2,r=u+m>t.top?t.top+t.height:t.top;s<g&&(g=s),s>f&&(f=s);let o=this.mindMap.themeConfig.nodeUseLineStyle?` L ${t.left},${r} L ${t.left+t.width},${r}`:"",a=`M ${s},${u+m} L ${s},${r}`+o;this.setLineStyle(i,e[n],a,t)}),g=Math.min(c,g),f=Math.max(c,f);let w=this.lineDraw.path();if(t.style.line(w),a=x>0&&!h?a:0,w.plot(this.transformPath(`M ${c},${u+a} L ${c},${u+m}`)),t._lines.push(w),i&&i(w,t),x>0){let e=this.lineDraw.path();t.style.line(e),e.plot(this.transformPath(`M ${g},${u+m} L ${f},${u+m}`)),t._lines.push(e),i&&i(e,t)}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:s}=t,{translateX:r,translateY:o}=e.transform();e.translate(i/2-s/2-r,n+s/2-o)}renderGeneralization(t){t.forEach(t=>{let{bottom:e,left:i,right:n,generalizationLineMargin:s,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"v"),o=i,a=e+s,h=n,d=e+s,l=o+(h-o)/2,c=a+20,u=`M ${o},${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,s){t.size(i,e).x(0).y(n)}}var Ea=Ma;class Na extends ga{constructor(t={},e){super(t),this.layout=e}doLayout(t){let e=[()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}];ws(e)}computedBaseValue(){ds(this.renderer.renderTree,null,(t,e,i,s,r,o)=>{let a=this.createNode(t,e,i,s,r,o);if(i?this.setNodeCenter(a):(this.layout===n.LAYOUT.TIMELINE2?e._node.dir?a.dir=e._node.dir:a.dir=r%2===0?n.LAYOUT_GROW_DIR.BOTTOM:n.LAYOUT_GROW_DIR.TOP:a.dir="",e._node.isRoot&&(a.top=e._node.top+(t._node.height>e._node.height?-(t._node.height-e._node.height)/2:(e._node.height-t._node.height)/2))),!t.data.expand)return!0},null,!0,0)}computedLeftTopValue(){ds(this.root,null,(t,e,i,n,s)=>{if(t.getData("expand")&&t.children&&t.children.length){let e=this.getMarginX(n+1),s=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+s+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0);t.children.forEach(i=>{i.left=t.left+.5*t.width,i.top=e,e+=i.height+s+(this.getNodeActChildrenLength(i)>0?i.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){ds(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;t.isRoot&&this.updateBrothersLeft(t);let s=t.children.length;if(e&&!e.isRoot&&s>0){let e=this.getMarginY(n+1),i=t.children.reduce((t,e)=>t+e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0),0)+s*e;this.updateBrothersTop(t,i)}},(t,e,i,s)=>{e&&e.isRoot&&t.dir===n.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"),s=n-e,r=s-t.width;r>0&&(i+=r)})}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Ks(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i>n&&(s=e),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),this.updateBrothersTop(t.parent,e)}}renderLine(t,e,i){if(t.children.length<=0)return[];let{left:s,top:r,width:o,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((s,r)=>{let o=n.left+n.width,a=s.left,h=t.top+t.height/2,d=`M ${o},${h} L ${a},${h}`;this.setLineStyle(i,e[r],d,s),n=s})}else{let s=-1/0,o=1/0,d=t.left+.3*t.width;if(t.children.forEach((t,n)=>{let r=t.top+t.height/2;r>s&&(s=r),r<o&&(o=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.LAYOUT_GROW_DIR.TOP?e.plot(this.transformPath(`M ${d},${r} L ${d},${o}`)):e.plot(this.transformPath(`M ${d},${r+a+h} L ${d},${s}`)),t.style.line(e),t._lines.push(e),i&&i(e,t)}}}renderExpandBtn(t,e){let{width:i,height:s,expandBtnSize:r,isRoot:o}=t;if(!o){let{translateX:o,translateY:a}=e.transform();t.parent&&t.parent.isRoot&&t.dir===n.LAYOUT_GROW_DIR.TOP?e.translate(.3*i-r/2-o,-r/2-a):e.translate(.3*i-r/2-o,s+r/2-a)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:s,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"h"),o=n+s,a=e,h=n+s,d=i,l=o+20,c=a+(d-a)/2,u=`M ${o},${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,s,r){if(this.layout===n.LAYOUT.TIMELINE)t.size(i,e).x(0).y(s);else{let o="";o=r.dir===n.LAYOUT_GROW_DIR.TOP&&1===r.layerIndex?n.LAYOUT_GROW_DIR.TOP:n.LAYOUT_GROW_DIR.BOTTOM,o===n.LAYOUT_GROW_DIR.TOP?t.size(i,e).x(0).y(-e):t.size(i,e).x(0).y(s)}}}var Ta=Na;class Ca extends ga{constructor(t={},e){super(t),this.layout=e}doLayout(t){let e=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{t(this.root)}];ws(e)}computedBaseValue(){ds(this.renderer.renderTree,null,(t,e,i,s,r,o)=>{let a=this.createNode(t,e,i,s,r,o);if(i?this.setNodeCenter(a):(e._node.dir?a.dir=e._node.dir:this.layout===n.LAYOUT.VERTICAL_TIMELINE2?a.dir=n.LAYOUT_GROW_DIR.LEFT:this.layout===n.LAYOUT.VERTICAL_TIMELINE3?a.dir=n.LAYOUT_GROW_DIR.RIGHT:a.dir=r%2===0?n.LAYOUT_GROW_DIR.RIGHT:n.LAYOUT_GROW_DIR.LEFT,e._node.isRoot?a.left=e._node.left+(t._node.width>e._node.width?-(t._node.width-e._node.width)/2:(e._node.width-t._node.width)/2):a.left=a.dir===n.LAYOUT_GROW_DIR.RIGHT?e._node.left+e._node.width+this.getMarginX(s):e._node.left-this.getMarginX(s)-a.width),!t.data.expand)return!0},(t,e,i,n)=>{if(i)return;let s=!1===t.data.expand?0:t._node.children.length;t._node.childrenAreaHeight=s?t._node.children.reduce((t,e)=>t+e.height,0)+(s+1)*this.getMarginY(n+1):0},!0,0)}computedTopValue(){ds(this.root,null,(t,e,i,n,s)=>{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,s=i-t.childrenAreaHeight/2;t.children.forEach(t=>{t.top=s,s+=t.height+e})}}},null,!0)}adjustLeftTopValue(){ds(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;if(i)return;let s=2*this.getMarginY(n+1)+t.height,r=t.childrenAreaHeight-s;r>0&&this.updateBrothers(t,r/2)},null,!0)}updateBrothers(t,e){if(t.parent){let i=t.parent.children,n=Ks(t,i);i.forEach((i,s)=>{if(i.hasCustomPosition())return;if(!t.parent.isRoot&&i.uid===t.uid)return;let r=0;t.parent.isRoot?r=s<n?0:s>n?2*e:e:s<n?r=-e:s>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=Ks(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i>n&&(s=e),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),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:s}=t;const{alwaysShowExpandBtn:r,notShowExpandBtn:o}=this.mindMap.opt;if(r&&!o||(s=0),t.isRoot){let n=t;t.children.forEach((s,r)=>{let o=n.top+n.height,a=s.top,h=t.left+t.width/2,d=`M ${h},${o} L ${h},${a}`;this.setLineStyle(i,e[r],d,s),n=s})}else if(t.dir===n.LAYOUT_GROW_DIR.RIGHT){let n=t.left+t.width,r=t.top+t.height/2,o=this.getMarginX(t.layerIndex+1),a=.6*(o-s);t.children.forEach((t,s)=>{let o=t.left,h=t.top+t.height/2,d=this.createFoldLine([[n,r],[n+a,r],[n+a,h],[o,h]]);this.setLineStyle(i,e[s],d,t)})}else{let n=t.left,r=t.top+t.height/2,o=this.getMarginX(t.layerIndex+1),a=.6*(o-s);t.children.forEach((t,s)=>{let o=t.left+t.width,h=t.top+t.height/2,d=this.createFoldLine([[n,r],[n-a,r],[n-a,h],[o,h]]);this.setLineStyle(i,e[s],d,t)})}}renderLineDirect(t,e,i){if(t.children.length<=0)return[];let{left:s,top:r,width:o,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((s,r)=>{let o=n.top+n.height,a=s.top,h=t.left+t.width/2,d=`M ${h},${o} L ${h},${a}`;this.setLineStyle(i,e[r],d,s),n=s})}else{let t=d.dir===n.LAYOUT_GROW_DIR.LEFT?s-h:s+o+h,c=r+a/2,u=d.dir===n.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,p=d.top+d.height/2,m=`M ${t},${c} L ${u},${p}`;this.setLineStyle(i,e[l],m,d)}})}renderLineCurve(t,e,i){if(t.children.length<=0)return[];let{left:s,top:r,width:o,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((s,r)=>{let o=n.top+n.height,a=s.top,h=t.left+t.width/2,d=`M ${h},${o} L ${h},${a}`;this.setLineStyle(i,e[r],d,s),n=s})}else{let t=d.dir===n.LAYOUT_GROW_DIR.LEFT?s-h:s+o+h,c=r+a/2,u=d.dir===n.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,p=d.top+d.height/2,m=this.cubicBezierPath(t,c,u,p);this.setLineStyle(i,e[l],m,d)}})}renderExpandBtn(t,e){let{width:i,height:s,expandBtnSize:r,isRoot:o}=t;if(!o){let{translateX:o,translateY:a}=e.transform();t.dir===n.LAYOUT_GROW_DIR.RIGHT?e.translate(i-o,s/2-a):e.translate(-r-o,s/2-a)}}renderGeneralization(t){t.forEach(t=>{let e=t.node.dir===n.LAYOUT_GROW_DIR.LEFT,{top:i,bottom:s,left:r,right:o,generalizationLineMargin:a,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),d=e?r-a:o+a,l=d,c=i,u=d,p=s,m=l+(e?-20:20),g=c+(p-c)/2,f=`M ${l},${c} Q ${m},${g} ${u},${p}`;t.generalizationLine.plot(this.transformPath(f)),t.generalizationNode.left=d+(e?-h:h)-(e?t.generalizationNode.width:0),t.generalizationNode.top=i+(s-i-t.generalizationNode.height)/2})}renderExpandBtnRect(t,e,i,s,r){r.dir===n.LAYOUT_GROW_DIR.LEFT?t.size(e,s).x(-e).y(0):t.size(e,s).x(i).y(0)}}var La=Ca,Da={top:{renderExpandBtn({node:t,btn:e,expandBtnSize:i,translateX:n,translateY:s,width:r,height:o}){t.parent&&t.parent.isRoot?e.translate(.3*r-i/2-n,-i/2-s):e.translate(.3*r-i/2-n,o+i/2-s)},renderLine({node:t,line:e,top:i,x:n,lineLength:s,height:r,expandBtnSize:o,maxy:a,ctx:h}){t.parent&&t.parent.isRoot?e.plot(h.transformPath(`M ${n},${i} L ${n+s},${i-Math.tan(ys(h.mindMap.opt.fishboneDeg))*s}`)):e.plot(h.transformPath(`M ${n},${i+r+o} L ${n},${a}`))},computedLeftTopValue({layerIndex:t,node:e,ctx:i}){if(t>=1&&e.children){let n=i.getMarginY(t+1),s=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=s,t.top+=r,r+=t.height+(i.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:t,parent:e,ctx:i,layerIndex:n}){let s=t.children.length,r=i.getMarginY(n+1);if(e&&!e.isRoot&&s>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 s=i.getNodeAreaHeight(t),r=t.top,o=t.left;t.top=e.top-(t.top-e.top)-s+e.height,t.left=e.left+e.width*i.indent+(s+n)/Math.tan(ys(i.mindMap.opt.fishboneDeg)),n+=s,i.updateChildrenPro(t.children,{top:t.top-r,left:t.left-o})})}}},bottom:{renderExpandBtn({node:t,btn:e,expandBtnSize:i,translateX:n,translateY:s,width:r,height:o}){t.parent&&t.parent.isRoot?e.translate(.3*r-i/2-n,o+i/2-s):e.translate(.3*r-i/2-n,-i/2-s)},renderLine({node:t,line:e,top:i,x:n,lineLength:s,height:r,miny:o,ctx:a}){t.parent&&t.parent.isRoot?e.plot(a.transformPath(`M ${n},${i+r} L ${n+s},${i+r+Math.tan(ys(a.mindMap.opt.fishboneDeg))*s}`)):e.plot(a.transformPath(`M ${n},${i} L ${n},${o}`))},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,s=e.top+e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(e=>{e.left=t,e.top=s+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0),s+=e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n})}if(t>1&&e.children){let t=e.left+e.width*i.childIndent,s=e.top-(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)-n;e.children.forEach(e=>{e.left=t,e.top=s-e.height,s-=e.height+(i.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:t,ctx:e,layerIndex:i}){let n=e.getMarginY(i+1),s=t.children.length;if(i>2&&s>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,s=e.expandBtnSize;e.children.forEach(r=>{let o=i.getNodeActChildrenLength(r)>0,a=i.getNodeAreaHeight(r),h=o?a-r.height-(o?r.expandBtnSize:0):0;h-=o?t:0;let d=n+h,l=r.left;r.top+=d,r.left=e.left+e.width*i.indent+(a+s)/Math.tan(ys(i.mindMap.opt.fishboneDeg)),n+=h,s+=a,i.updateChildrenPro(r.children,{top:d,left:r.left-l})})}}}};class ba extends ga{constructor(t={},e){super(t),this.layout=e,this.indent=.3,this.childIndent=.5,this.fishTail=null,this.maxx=0,this.headRatio=1,this.tailRatio=.6,this.paddingXRatio=.3,this.fishHeadPathStr="M4,181 C4,181, 0,177, 4,173 Q 96.09523809523809,0, 288.2857142857143,0 L 288.2857142857143,354 Q 48.047619047619044,354, 8,218.18367346938777 C8,218.18367346938777, 6,214.18367346938777, 8,214.18367346938777 L 41.183673469387756,214.18367346938777 Z",this.fishTailPathStr="M 606.9342905223708 0 Q 713.1342905223709 -177 819.3342905223708 -177 L 766.2342905223709 0 L 819.3342905223708 177 Q 713.1342905223709 177 606.9342905223708 0 z",this.bindEvent(),this.extendShape(),this.beforeChange=this.beforeChange.bind(this)}nodeIsRemoveAllLines(t){return t.isRoot||1===t.layerIndex}isFishbone2(){return this.layout===n.LAYOUT.FISHBONE2}bindEvent(){this.isFishbone2()&&(this.onCheckUpdateFishTail=this.onCheckUpdateFishTail.bind(this),this.mindMap.on("afterExecCommand",this.onCheckUpdateFishTail))}unBindEvent(){this.mindMap.off("afterExecCommand",this.onCheckUpdateFishTail)}extendShape(){this.isFishbone2()&&this.mindMap.addShape({name:"fishHead",createShape:t=>{const e=ss(`<path d="${this.fishHeadPathStr}"></path>`),{width:i,height:n}=t.shapeInstance.getNodeSize();return e.size(i,n),e},getPadding:({width:t,height:e,paddingX:i,paddingY:n})=>{t+=2*i,e+=2*n;let s=this.paddingXRatio*t,r=0;t+=2*s;const o=t/this.headRatio;return r=(o-e)/2,{paddingX:s,paddingY:r}}})}doLayout(t){let e=[()=>{this.computedBaseValue(),this.addFishTail()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue(),this.updateFishTailPosition()},()=>{t(this.root)}];ws(e)}addFishTail(){if(!this.isFishbone2())return;const t=this.mindMap.lineDraw.findOne(".smm-layout-fishbone-tail");t?this.fishTail=t:(this.fishTail=ss(`<path d="${this.fishTailPathStr}"></path>`),this.fishTail.addClass("smm-layout-fishbone-tail"));const e=this.root.height,i=e*this.tailRatio;this.fishTail.size(i,e),this.styleFishTail(),this.mindMap.lineDraw.add(this.fishTail)}onCheckUpdateFishTail(t,e,i){if("SET_NODE_DATA"===t){let t=!1;Object.keys(i).forEach(e=>{wr.includes(e)&&(t=!0)}),t&&this.styleFishTail()}}styleFishTail(){this.root.style.shape(this.fishTail)}removeFishTail(){const t=this.mindMap.lineDraw.findOne(".smm-layout-fishbone-tail");t&&t.remove()}updateFishTailPosition(){this.isFishbone2()&&this.fishTail.x(this.maxx).cy(this.root.top+this.root.height/2)}computedBaseValue(){ds(this.renderer.renderTree,null,(t,e,i,s,r,o)=>{i&&this.isFishbone2()&&(t.data.shape="fishHead");let a=this.createNode(t,e,i,s,r,o);if(i)this.setNodeCenter(a);else if(e._node.dir?a.dir=e._node.dir:a.dir=r%2===0?n.LAYOUT_GROW_DIR.TOP:n.LAYOUT_GROW_DIR.BOTTOM,e._node.isRoot){let t=this.getMarginY(s);const i=this.isFishbone2()?e._node.height/4:0;this.checkIsTop(a)?a.top=e._node.top-a.height-t+i:a.top=e._node.top+e._node.height+t-i}if(!t.data.expand)return!0},null,!0,0)}computedLeftTopValue(){ds(this.root,null,(t,e,i,n)=>{if(t.isRoot){let e=this.getMarginX(n+1);const i=this.isFishbone2()?2:1;let s=t.left+t.width+t.height/i+e,r=t.left+t.width+t.height/i+e;t.children.forEach(t=>{this.checkIsTop(t)?(t.left=s,s+=t.width+e):(t.left=r+20,r+=t.width+e)})}let s={layerIndex:n,node:t,ctx:this};this.checkIsTop(t)?Da.top.computedLeftTopValue(s):Da.bottom.computedLeftTopValue(s)},null,!0)}adjustLeftTopValue(){ds(this.root,null,(t,e,i,n)=>{if(!t.getData("expand"))return;let s={node:t,parent:e,layerIndex:n,ctx:this};this.checkIsTop(t)?Da.top.adjustLeftTopValueBefore(s):Da.bottom.adjustLeftTopValueBefore(s)},(t,e)=>{let i={parent:e,node:t,ctx:this};if(this.checkIsTop(t)?Da.top.adjustLeftTopValueAfter(i):Da.bottom.adjustLeftTopValueAfter(i),t.isRoot){let e=0,i=0,n=-1/0;t.children.forEach(t=>{if(this.checkIsTop(t)){t.left+=e,this.updateChildren(t.children,"left",e);let{left:i,right:s}=this.getNodeBoundaries(t,"h");s>n&&(n=s),e+=s-i}else{t.left+=i,this.updateChildren(t.children,"left",i);let{left:e,right:s}=this.getNodeBoundaries(t,"h");s>n&&(n=s),i+=s-e}}),this.maxx=n}},!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"),s=n-e,r=s-t.width;r>0&&(i+=r)})}updateBrothersTop(t,e){if(t.parent&&!t.parent.isRoot){let i=t.parent.children,n=Ks(t,i);i.forEach((t,i)=>{if(t.hasCustomPosition())return;let s=0;i>n&&(s=e),t.top+=s,t.children&&t.children.length&&this.updateChildren(t.children,"top",s)}),this.checkIsTop(t)?this.updateBrothersTop(t.parent,e):this.updateBrothersTop(t.parent,3===t.layerIndex?0:e)}}checkIsTop(t){return t.dir===n.LAYOUT_GROW_DIR.TOP}renderLine(t,e,i){if(1!==t.layerIndex&&t.children.length<=0)return[];let{top:n,height:s,expandBtnSize:r}=t;const{alwaysShowExpandBtn:o,notShowExpandBtn:a}=this.mindMap.opt;o&&!a||(r=0);let h=t.children.length;if(t.isRoot){let e=-1/0;t.children.forEach(n=>{n.left>e&&(e=n.left);let s=this.getMarginY(n.layerIndex),r=n.left,o=t.height/2+s-(this.isFishbone2()?t.height/4:0),a=o/Math.tan(ys(this.mindMap.opt.fishboneDeg)),h=this.lineDraw.path();this.checkIsTop(n)?h.plot(this.transformPath(`M ${r-a},${n.top+n.height+o} L ${n.left},${n.top+n.height}`)):h.plot(this.transformPath(`M ${r-a},${n.top-o} L ${r},${n.top}`)),t.style.line(h),t._lines.push(h),i&&i(h,t)});let n=t.top+t.height/2,s=t.height/2+this.getMarginY(t.layerIndex+1),r=this.lineDraw.path();const o=this.isFishbone2()?this.maxx:e-s/Math.tan(ys(this.mindMap.opt.fishboneDeg));r.plot(this.transformPath(`M ${t.left+t.width},${n} L ${o},${n}`)),t.style.line(r),t._lines.push(r),i&&i(r,t)}else{let o=-1/0,a=1/0,d=-1/0,l=t.left+t.width*this.indent;if(t.children.forEach((n,s)=>{n.left>d&&(d=n.left);let r=n.top+n.height/2;if(r>o&&(o=r),r<a&&(a=r),t.layerIndex>1){let t=`M ${l},${r} L ${n.left},${r}`;this.setLineStyle(i,e[s],t,n)}}),h>=0){let e=this.lineDraw.path();r=h>0?r:0;let c=d-t.left-t.width*this.indent;c=Math.max(c,0);let u={node:t,line:e,top:n,x:l,lineLength:c,height:s,expandBtnSize:r,maxy:o,miny:a,ctx:this};this.checkIsTop(t)?Da.top.renderLine(u):Da.bottom.renderLine(u),t.style.line(e),t._lines.push(e),i&&i(e,t)}}}renderExpandBtn(t,e){let{width:i,height:n,expandBtnSize:s,isRoot:r}=t;if(!r){let{translateX:r,translateY:o}=e.transform(),a={node:t,btn:e,expandBtnSize:s,translateX:r,translateY:o,width:i,height:n};this.checkIsTop(t)?Da.top.renderExpandBtn(a):Da.bottom.renderExpandBtn(a)}}renderGeneralization(t){t.forEach(t=>{let{top:e,bottom:i,right:n,generalizationLineMargin:s,generalizationNodeMargin:r}=this.getNodeGeneralizationRenderBoundaries(t,"h"),o=n+s,a=e,h=n+s,d=i,l=o+20,c=a+(d-a)/2,u=`M ${o},${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,s,r){let o="";o=r.dir===n.LAYOUT_GROW_DIR.TOP?1===r.layerIndex?n.LAYOUT_GROW_DIR.TOP:n.LAYOUT_GROW_DIR.BOTTOM:1===r.layerIndex?n.LAYOUT_GROW_DIR.BOTTOM:n.LAYOUT_GROW_DIR.TOP,o===n.LAYOUT_GROW_DIR.TOP?t.size(i,e).x(0).y(-e):t.size(i,e).x(0).y(s)}beforeChange(){this.isFishbone2()&&(this.root.nodeData.data.shape=n.SHAPE.RECTANGLE,this.removeFishTail(),this.unBindEvent(),this.mindMap.removeShape("fishHead"))}}var Aa=ba;const Ra="smm-node-edit-wrap";class Sa{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.mindMap.addEditNodeClass(Ra),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.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}setIsShowTextEdit(t){this.showTextEdit=t,t?this.mindMap.keyCommand.stopCheckInSvg():this.mindMap.keyCommand.recoveryCheckInSvg()}async show({node:t,isInserting:e=!1,isFromKeyDown:i=!1,isFromScale:n=!1}){if(t.isUseCustomNodeContent())return;const s=this.getCurrentEditNode();s&&this.hideEditTextBox();const{beforeTextEdit:r,openRealtimeRenderOnNodeTextEdit:o}=this.mindMap.opt;if("function"===typeof r){let i=!1;try{i=await r(t,e)}catch(p){i=!1,this.mindMap.opt.errorHandler(a.BEFORE_TEXT_EDIT_ERROR,p)}if(!i)return}const{offsetLeft:h,offsetTop:d}=Ms(this.mindMap,t);this.mindMap.view.translateXY(h,d);const l=t._textData.node;o&&l.show();const c=l.node.getBoundingClientRect();o&&l.hide();const u={node:t,rect:c,isInserting:e,isFromKeyDown:i,isFromScale:n};this.mindMap.richText?this.mindMap.richText.showEditText(u):(this.currentNode=t,this.showEditTextBox(u))}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.setIsShowTextEdit(!1)),this.show({node:t,isFromScale:!0}))}showEditTextBox({node:t,rect:e,isInserting:i,isFromKeyDown:n,isFromScale:s}){if(this.showTextEdit)return;const{nodeTextEditZIndex:r,textAutoWrapWidth:o,selectTextOnEnterEditText:a,openRealtimeRenderOnNodeTextEdit:h,autoEmptyTextWhenKeydownEnterEdit:l}=this.mindMap.opt;if(s||this.mindMap.emit("before_show_text_edit"),this.registerTmpShortcut(),!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.classList.add(Ra),this.textEditNode.style.cssText=`\n position: fixed;\n box-sizing: border-box;\n ${h?"":"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()}),this.textEditNode.addEventListener("paste",t=>{const e=t.clipboardData.getData("text"),{isSmm:i,data:n}=rr(e);i&&n[0]&&n[0].data?or(t,Ns(n[0].data.text)):or(t),this.emitTextChangeEvent()}),this.textEditNode.addEventListener("input",()=>{this.emitTextChangeEvent()});const t=this.mindMap.opt.customInnerElsAppendTo||document.body;t.appendChild(this.textEditNode)}const c=this.mindMap.view.scale,u=t.style.merge("fontSize"),p=(this.cacheEditingText||t.getData("text")).split(/\n/gim).map(t=>Zs(t)),m="true"===t._textData.node.attr("data-ismultiLine");t.style.domText(this.textEditNode,c),h||(this.textEditNode.style.background=this.getBackground(t)),this.textEditNode.style.zIndex=r,this.textEditNode.innerHTML=n&&l?"":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=o*c+"px",m?(this.textEditNode.style.lineHeight=d,this.textEditNode.style.transform=`translateY(${(d-1)*u/2*c}px)`):this.textEditNode.style.lineHeight="normal",this.setIsShowTextEdit(!0),i||a&&!n?Ys(this.textEditNode):$s(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?Ss(i)?Is(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 us(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.setIsShowTextEdit(!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}}const Oa={[n.LAYOUT.LOGICAL_STRUCTURE]:xa,[n.LAYOUT.LOGICAL_STRUCTURE_LEFT]:xa,[n.LAYOUT.MIND_MAP]:ya,[n.LAYOUT.CATALOG_ORGANIZATION]:_a,[n.LAYOUT.ORGANIZATION_STRUCTURE]:Ea,[n.LAYOUT.TIMELINE]:Ta,[n.LAYOUT.TIMELINE2]:Ta,[n.LAYOUT.VERTICAL_TIMELINE]:La,[n.LAYOUT.VERTICAL_TIMELINE2]:La,[n.LAYOUT.VERTICAL_TIMELINE3]:La,[n.LAYOUT.FISHBONE]:Aa,[n.LAYOUT.FISHBONE2]:Aa};class Ia{constructor(t={}){this.opt=t,this.mindMap=t.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=this.mindMap.opt.data?w()({},this.mindMap.opt.data):null,this.reRender=!1,this.isRendering=!1,this.hasWaitRendering=!1,this.nodeCache={},this.lastNodeCache={},this.renderSourceList=[],this.renderCallbackList=[],this.activeNodeList=[],this.emitNodeActiveEventTimer=null,this.renderTimer=null,this.root=null,this.textEdit=new Sa(this),this.beingCopyData=null,this.highlightBoxNode=null,this.highlightBoxNodeStyle=null,this.lastActiveNodeList=[],this.setLayout(),this.bindEvent(),this.registerCommands(),this.registerShortcutKeys()}setLayout(){this.layout&&this.layout.beforeChange&&this.layout.beforeChange();const{layout:t}=this.mindMap.opt;let e=Oa[t]||this.mindMap[t];e||(e=Oa[n.LAYOUT.LOGICAL_STRUCTURE],this.mindMap.opt.layout=n.LAYOUT.LOGICAL_STRUCTURE),this.layout=new e(this,t)}setData(t){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",()=>{this.mindMap.opt.enableDblclickBackToRootNode&&this.setRootNodeCenter()});const n=fs(()=>{this.renderTree&&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=xs(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)})}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.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=!nr(this.lastActiveNodeList,e);i&&(this.lastActiveNodeList=[...e],clearTimeout(this.emitNodeActiveEventTimer),this.emitNodeActiveEventTimer=setTimeout(()=>{this.mindMap.emit("node_active",t,e)},0))}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(){this.mindMap.keyCommand.save()}endTextEdit(){this.mindMap.keyCommand.restore()}clearCache(){this.layout.lru.clear(),this.nodeCache={},this.lastNodeCache={}}addRenderParams(t,e){if(t){const e=this.renderCallbackList.findIndex(e=>e===t);-1===e&&this.renderCallbackList.push(t)}if(e){const t=this.renderSourceList.findIndex(t=>t===e);-1===t&&this.renderSourceList.push(e)}}checkHasRenderSource(t){t=Array.isArray(t)?t:[t];for(let e=0;e<this.renderSourceList.length;e++)if(t.includes(this.renderSourceList[e]))return!0;return!1}onRenderEnd(){this.renderCallbackList.forEach(t=>{t()}),this.isRendering=!1,this.reRender=!1,this.renderCallbackList=[],this.renderSourceList=[],this.mindMap.emit("node_tree_render_end")}render(t,e){this.addRenderParams(t,e),clearTimeout(this.renderTimer),this.renderTimer=setTimeout(()=>{this._render()},0)}_render(){this.checkHasRenderSource(n.CHANGE_THEME)&&this.resetUnExpandNodeStyle(),this.isRendering?this.hasWaitRendering=!0:(this.isRendering=!0,this.lastNodeCache=this.nodeCache,this.nodeCache={},this.reRender&&this.clearActiveNodeList(),this.renderTree?(this.mindMap.emit("node_tree_render_start"),this.root=null,this.layout.doLayout(t=>{Object.keys(this.lastNodeCache).forEach(t=>{this.nodeCache[t]||(this.removeNodeFromActiveList(this.lastNodeCache[t]),this.emitNodeActiveEvent(),this.lastNodeCache[t].destroy())}),this.root=t,this.root.render(()=>{if(this.isRendering=!1,this.hasWaitRendering)return this.hasWaitRendering=!1,void this.render();this.onRenderEnd()})}),this.emitNodeActiveEvent()):this.onRenderEnd())}renderByCustomNodeContentNode(t){t.getSize(),t.customNodeContentRealtimeLayout(),this.mindMap.render()}resetUnExpandNodeStyle(){this.renderTree&&ds(this.renderTree,null,t=>{if(!t.data.expand)return ds(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 Ks(t,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(ds(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 s=!1,r=!1;switch(i){case n.CREATE_NEW_NODE_BEHAVIOR.DEFAULT:s=e||!t,r=!e&&t;break;case n.CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:s=!1,r=!1;break;case n.CREATE_NEW_NODE_BEHAVIOR.ACTIVE_ONLY:s=!0,r=!1;break;default:break}return{focusNewNode:s,inserting:r}}insertNode(t=!0,e=[],i=null,n=[]){if(e=js(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:s,defaultInsertBelowSecondLevelNodeText:r}=this.mindMap.opt,o=e.length>0?e:this.activeNodeList,a=o.length>1,h=this.hasRichTextPlugin(),{focusNewNode:d,inserting:l}=this.getNewNodeBehavior(t,a),c={expand:!0,richText:h,isActive:d};h&&(c.resetRichText=!0),n=Ws(n,c);const u=i&&i.richText;let p=!1;o.forEach(t=>{if(t.isGeneralization||t.isRoot)return;n=ps(n);const e=t.parent,o=1===t.layerIndex,a=o?s:r,h=Xs(t);u&&c.resetRichText&&delete c.resetRichText;const d={inserting:l,data:{text:a,...c,uid:Cs(),...i||{}},children:[...Vs(n,p)]};p=!0,e.nodeData.children.splice(h+1,0,d)}),d&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(t,e){if(!e||e.length<=0)return;if(t=js(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const i=t.length>0?t:this.activeNodeList,n=this.hasRichTextPlugin(),{focusNewNode:s}=this.getNewNodeBehavior(!1,!0),r={expand:!0,richText:n,isActive:s};n&&(r.resetRichText=!0),e=Ws(e,r);let o=!1;i.forEach(t=>{if(t.isGeneralization||t.isRoot)return;e=ps(e);const i=t.parent,n=Xs(t),s=Vs(e,o);o=!0,i.nodeData.children.splice(n+1,0,...s)}),s&&this.clearActiveNodeList(),this.mindMap.render()}insertChildNode(t=!0,e=[],i=null,n=[]){if(e=js(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:s,defaultInsertBelowSecondLevelNodeText:r}=this.mindMap.opt,o=e.length>0?e:this.activeNodeList,a=o.length>1,h=this.hasRichTextPlugin(),{focusNewNode:d,inserting:l}=this.getNewNodeBehavior(t,a),c={expand:!0,richText:h,isActive:d};h&&(c.resetRichText=!0),n=Ws(n,c);const u=i&&i.richText;let p=!1;o.forEach(t=>{if(t.isGeneralization)return;n=ps(n),t.nodeData.children||(t.nodeData.children=[]);const e=t.isRoot?s:r;u&&c.resetRichText&&delete c.resetRichText;const o={inserting:l,data:{text:e,uid:Cs(),...c,...i||{}},children:[...Vs(n,p)]};p=!0,t.nodeData.children.push(o),t.setData({expand:!0})}),d&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(t,e){if(!e||e.length<=0)return;if(t=js(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const i=t.length>0?t:this.activeNodeList,n=this.hasRichTextPlugin(),{focusNewNode:s}=this.getNewNodeBehavior(!1,!0),r={expand:!0,richText:n,isActive:s};n&&(r.resetRichText=!0),e=Ws(e,r);let o=!1;i.forEach(t=>{t.isGeneralization||(e=ps(e),t.nodeData.children||(t.nodeData.children=[]),e=Vs(e,o),o=!0,t.nodeData.children.push(...e),t.setData({expand:!0}))}),s&&this.clearActiveNodeList(),this.mindMap.render()}insertParentNode(t=!0,e,i){if(e=js(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:n,defaultInsertBelowSecondLevelNodeText:s}=this.mindMap.opt,r=e.length>0?e:this.activeNodeList,o=r.length>1,a=this.hasRichTextPlugin(),{focusNewNode:h,inserting:d}=this.getNewNodeBehavior(t,o),l={expand:!0,richText:a,isActive:h};a&&(l.resetRichText=!0);const c=i&&i.richText;r.forEach(t=>{if(t.isGeneralization||t.isRoot)return;const e=1===t.layerIndex?n:s;c&&l.resetRichText&&delete l.resetRichText;const r={inserting:d,data:{text:e,uid:Cs(),...l,...i||{}},children:[t.nodeData]},o=t.parent,a=Xs(t);o.nodeData.children.splice(a,1,r)}),h&&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,s=n.children,r=Ks(i,s);if(-1===r||0===r)return;let o=r-1;s.splice(r,1),s.splice(o,0,i),n.nodeData.children.splice(r,1),n.nodeData.children.splice(o,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,s=n.children,r=Ks(i,s);if(-1===r||r===s.length-1)return;let o=r+1;s.splice(r,1),s.splice(o,0,i),n.nodeData.children.splice(r,1),n.nodeData.children.splice(o,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=Ks(t,e.children),s=Ks(e,i.children);e.nodeData.children.splice(n,1),i.nodeData.children.splice(s+1,0,t.nodeData),this.mindMap.render()}_handleRemoveCustomStyles(t){let e=!1;return Object.keys(t).forEach(i=>{Bs(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=js(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;ds(this.renderTree,null,t=>{const i=this._handleRemoveCustomStyles(t.data);i&&(e=!0);const n=ur(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||tr(sr(this.beingCopyData)))}cut(){this.mindMap.execCommand("CUT_NODE",t=>{this.beingCopyData=t,this.mindMap.opt.disabledClipboard||tr(sr(t))})}handlePaste(t){const{disabledClipboard:e}=this.mindMap.opt;if(e)return;const i=t.clipboardData||t.originalEvent.clipboardData,n=i.items;let s=null,r="";Array.from(n).forEach(t=>{t.type.indexOf("image")>-1&&(s=t.getAsFile()),t.type.indexOf("text")>-1&&(r=i.getData("text"))}),this.paste()}async paste(){const{errorHandler:t,handleIsSplitByWrapOnPasteCreateNewNode:e,handleNodePasteImg:i,disabledClipboard:n,onlyPasteTextWhenHasImgAndText:s}=this.mindMap.opt;if(!n&&Js())try{const n=await er();let o=n.text||"",h=n.img||null;if(o){let i=null,n=!0;if(this.mindMap.opt.customHandleClipboardText)try{const t=await this.mindMap.opt.customHandleClipboardText(o);if(!bs(t)){n=!1;const e=rr(t);e.isSmm?i=e.data:o=e.data}}catch(r){t(a.CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,r)}if(n){const t=rr(o);t.isSmm?i=t.data:o=t.data}if(i)this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],Array.isArray(i)?i:[i]);else{this.hasRichTextPlugin()&&(o=Zs(o));const t=o.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:o})}):this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:o})}}if(h&&(!o||!s))try{let t=null;t=i&&"function"===typeof i?await i(h):await Ls(h),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(r){t(a.LOAD_CLIPBOARD_IMAGE_ERROR,r)}}catch(r){t(a.READ_CLIPBOARD_ERROR,r)}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=js(t);n=n.filter(t=>!t.isRoot),"after"===i&&n.reverse(),n.forEach(t=>{let n=t.parent,s=n.children,r=Ks(t,s);if(-1===r)return;s.splice(r,1),n.nodeData.children.splice(r,1);let o=e.parent,a=o.children,h=Ks(e,a);-1!==h&&("after"===i&&h++,a.splice(h,0,t),o.nodeData.children.splice(h,0,t.nodeData))}),this.mindMap.render()}removeNode(t=[]){if(t=js(t),this.activeNodeList.length<=0&&t.length<=0)return;let e=null,i=t.length>0,n=i?t:this.activeNodeList,s=n.find(t=>t.isRoot);if(s)this.clearActiveNodeList(),s.children=[],s.nodeData.children=[];else{e=this.getNextActiveNode(n);for(let t=0;t<n.length;t++){const e=n[t],s=this.textEdit.getCurrentEditNode();s&&s.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),ir(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=js(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 s=0;s<i.length;s++){let t=i[s];if(t.isGeneralization)this.deleteNodeGeneralization(t);else{const e=t.parent,i=Xs(t);e.nodeData.children.splice(i,1,...t.nodeData.children||[])}}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=Ks(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=Us(this.activeNodeList);return t=mr(t),t.map(t=>gs({},t,!0))}cutNode(t){if(this.activeNodeList.length<=0)return;let e=Us(this.activeNodeList).filter(t=>!t.isRoot);e=mr(e);const i=e.map(t=>gs({},t,!0));e.forEach(t=>{ir(t)}),this.clearActiveNodeList(),this.mindMap.render(),t&&"function"===typeof t&&t(i)}moveNodeTo(t,e){let i=js(t);i=i.filter(t=>!t.isRoot),i.forEach(t=>{this.removeNodeFromActiveList(t),ir(t),e.setData({expand:!0}),e.nodeData.children.push(t.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(t){t=js(t),this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],t)}setNodeStyle(t,e,i){const n={[e]:i};this.setNodeDataRender(t,n),hs.includes(e)&&(t.parent||t).renderLine(!0)}setNodeStyles(t,e){const i={...e};this.setNodeDataRender(t,i);let n=Object.keys(e),s=!1;n.forEach(t=>{hs.includes(t)&&(s=!0)}),s&&(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,s)=>{s||t.data.uid!==e||(s=!0),s&&!n&&t.children&&t.children.length>0&&(t.data.expand=!1),t.children&&t.children.length>0&&t.children.forEach(t=>{i(t,!1,s)})};i(this.renderTree,!0,!e),this.mindMap.render(()=>{t&&this.setRootNodeCenter()})}expandToLevel(t){this.renderTree&&(ds(this.renderTree,null,(e,i,n,s)=>{const r=s<t;r?e.data.expand=!0:!n&&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.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:s,height:r,custom:o=!1}=e||{url:"",title:"",width:0,height:0,custom:!1};this.setNodeDataRender(t,{image:i,imageTitle:n||"",imageSize:{width:s,height:r,custom:o}})}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})}setNodeTag(t,e){this.setNodeDataRender(t,{tag:e})}insertFormula(t,e=[]){if(!this.hasRichTextPlugin()||!this.mindMap.formula)return;e=js(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=Gs(i);if(n.length<=0)return;const s=this.hasRichTextPlugin(),{focusNewNode:r,inserting:o}=this.getNewNodeBehavior(e,n.length>1);let a=!1;const h=t&&t.richText;n.forEach(e=>{const i={inserting:o,...t||{text:this.mindMap.opt.defaultGeneralizationText},range:e.range||null,uid:Cs(),richText:s,isActive:r};s&&!h&&(i.resetRichText=s);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(){ds(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||!Mr.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){this.mindMap.execCommand("SET_NODE_DATA",t,e),Ps(e)?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:s}=this.mindMap.view.getTransformData(),{left:r,top:o,width:a,height:h}=t;i||(r*=n.scaleX,o*=n.scaleY,a*=n.scaleX,h*=n.scaleY);let d=this.mindMap.width/2,l=this.mindMap.height/2,c=r+a/2,u=o+h/2,p=d-s.x,m=l-s.y,g=p-c,f=m-u;this.mindMap.view.translateX(g),this.mindMap.view.translateY(f),i&&this.mindMap.view.setScale(1)}setRootNodeCenter(){this.moveNodeToCenter(this.root)}expandToNodeUid(t,e=(()=>{})){if(!this.renderTree)return void e();let i=[],n=!1;const s={};ls(this.renderTree,(e,r)=>{if(e.data.uid===t)return i=r?[...s[r.data.uid],r]:[],"stop";const o=ur(e.data);if(o.forEach(o=>{o.uid===t&&(i=r?[...s[r.data.uid],r,e]:[],n=!0)}),n)return"stop";s[e.data.uid]=r?[...s[r.data.uid],r]:[]});let r=!1;if(i.forEach(t=>{t.data.expand||(r=!0,t.data.expand=!0)}),n){const t=i[i.length-1];t&&ds(t,null,t=>{t.data.expand||(r=!0,t.data.expand=!0)})}r?this.mindMap.render(e):e()}findNodeByUid(t){if(!this.root)return;let e=null;return ds(this.root,null,i=>{if(i.getData("uid")===t)return e=i,!0;let n=!1;return(i._generalizationList||[]).forEach(i=>{i.generalizationNode.getData("uid")===t&&(e=i.generalizationNode,n=!0)}),!!n||void 0}),e}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 rn).stroke({color:i.stroke||"transparent"}).fill({color:i.fill||"transparent"}),this.highlightBoxNodeStyle={...i};let n=1/0,s=1/0,r=-1/0,o=-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<s&&(s=t.top);const e=t.left+t.width,i=t.top+t.height;e>r&&(r=e),i>o&&(o=i)})}else n=t.left,s=t.top,r=t.left+t.width,o=t.top+t.height;this.highlightBoxNode.plot([[n,s],[r,s],[r,o],[n,o]]),this.mindMap.otherDraw.add(this.highlightBoxNode)}closeHighlightNode(){this.highlightBoxNode&&this.highlightBoxNode.remove()}hasRichTextPlugin(){return!!this.mindMap.richText}}var za=Ia,Fa={default:rs};const ka={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 Xa=0;Xa<=9;Xa++)ka[Xa]=Xa+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((t,e)=>{ka[t]=e+65});const Ba=ka;class Pa{constructor(t){this.opt=t,this.mindMap=t.mindMap,this.shortcutMap={},this.shortcutMapCache={},this.isPause=!1,this.isInSvg=!1,this.isStopCheckInSvg=!1,this.defaultEnableCheck=this.defaultEnableCheck.bind(this),this.bindEvent()}extendKeyMap(t,e){Ba[t]=e}removeKeyMap(t){"undefined"!==typeof Ba[t]&&delete Ba[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={})}stopCheckInSvg(){const{enableShortcutOnlyWhenMouseInSvg:t}=this.mindMap.opt;t&&(this.isStopCheckInSvg=!0)}recoveryCheckInSvg(){const{enableShortcutOnlyWhenMouseInSvg:t}=this.mindMap.opt;t&&(this.isStopCheckInSvg=!0)}bindEvent(){this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("svg_mouseenter",()=>{this.isInSvg=!0}),this.mindMap.on("svg_mouseleave",()=>{this.isInSvg=!1}),window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}defaultEnableCheck(t){const e=t.target;if(e===document.body)return!0;for(let i=0;i<this.mindMap.editNodeClassList.length;i++){const t=this.mindMap.editNodeClassList[i];if(e.classList.contains(t))return!0}return!1}onKeydown(t){const{enableShortcutOnlyWhenMouseInSvg:e,beforeShortcutRun:i,customCheckEnableShortcut:n}=this.mindMap.opt,s="function"===typeof n?n:this.defaultEnableCheck;s(t)&&(this.isPause||e&&!this.isStopCheckInSvg&&!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 s=0;s<i.length;s++){let t=n.findIndex(t=>t===i[s]);if(-1===t)return!1;n.splice(t,1)}return!0}getOriginEventCodeArr(t){let e=[];return(t.ctrlKey||t.metaKey)&&e.push(Ba["Control"]),t.altKey&&e.push(Ba["Alt"]),t.shiftKey&&e.push(Ba["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(Ba[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}}var Ha=i("0a76");class Ua{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=fs(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;this.mindMap.emit("beforeAddHistory");const t=this.history.length>0?this.history[this.activeHistoryIndex]:null,e=this.getCopyData(),i=JSON.stringify(e);t&&t===i||(this.emitDataUpdatesEvent(t,i),this.history=this.history.slice(0,this.activeHistoryIndex+1),this.history.push(i),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=this.history[this.activeHistoryIndex],n=JSON.parse(i);return this.emitDataUpdatesEvent(e,i),n}}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=this.history[this.activeHistoryIndex],n=JSON.parse(i);return this.emitDataUpdatesEvent(e,i),n}}getCopyData(){if(!this.mindMap.renderer.renderTree)return null;const t=ms({},this.mindMap.renderer.renderTree,!0);return t.smmVersion=Ha.version,t}removeDataUid(t){t=ps(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=JSON.parse(t),s=JSON.parse(e),r=ps(ar(n)),o=ps(ar(s)),a=[],h=(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],h(t.children[n],e)}),t);Object.keys(o).forEach(t=>{r[t]?Qs(r[t],o[t])||a.push({action:"update",oldData:h(r[t],r),data:h(o[t],o)}):a.push({action:"create",data:h(o[t],o)})}),Object.keys(r).forEach(t=>{o[t]||a.push({action:"delete",data:h(r[t],r)})}),this.mindMap.emit(i,a)}}catch(i){this.mindMap.opt.errorHandler(a.DATA_CHANGE_DETAIL_EVENT_ERROR,i)}}}var Ga=Ua;class $a{constructor(){this.has={},this.queue=[],this.nextTick=_s(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 Ya=$a;const Wa={el:null,data:null,viewData:null,readonly:!1,layout:n.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.MOUSE_WHEEL_ACTION.MOVE,mousewheelMoveStep:100,mousewheelZoomActionReverse:!0,defaultInsertSecondLevelNodeText:"二级节点",defaultInsertBelowSecondLevelNodeText:"分支主题",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,alwaysShowExpandBtn:!1,notShowExpandBtn:!1,iconList:[],maxNodeCacheCount:1e3,fitPadding:50,enableCtrlKeyNodeSelection:!0,useLeftKeySelectionRightKeyDrag:!1,beforeTextEdit:null,isUseCustomNodeContent:!1,customCreateNodeContent:null,customInnerElsAppendTo:null,enableAutoEnterTextEditWhenKeydown:!1,autoEmptyTextWhenKeydownEnterEdit:!1,customHandleClipboardText:null,disableMouseWheelZoom:!1,errorHandler:(t,e)=>{console.error(t,e)},enableDblclickBackToRootNode:!1,hoverRectColor:"rgb(94, 200, 248)",hoverRectPadding:2,selectTextOnEnterEditText:!1,deleteNodeActive:!0,fit:!1,tagsColorMap:{},cooperateStyle:{avatarSize:22,fontSize:12},onlyOneEnableActiveNodeOnCooperate:!1,defaultGeneralizationText:"概要",handleIsSplitByWrapOnPasteCreateNewNode:null,addHistoryTime:100,isDisableDrag:!1,createNewNodeBehavior:n.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,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,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,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,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,defaultOuterFrameText:"外框",onlyPainterNodeCustomStyles:!1,beforeDeleteNodeImg:null,imgResizeBtnSize:25,minImgResizeWidth:50,minImgResizeHeight:50,maxImgResizeWidthInheritTheme:!1,maxImgResizeWidth:1/0,maxImgResizeHeight:1/0,customDeleteBtnInnerHTML:"",customResizeBtnInnerHTML:""};class Va{constructor(t={}){if(Va.instanceCount++,this.opt=this.handleOpt(w()(Wa,t)),this.opt.data=this.handleData(this.opt.data),this.el=this.opt.el,!this.el)throw new Error("缺少容器元素el");this.getElRectInfo(),this.initWidth=this.width,this.initHeight=this.height,this.cssEl=null,this.cssTextMap={},this.nodeInnerPrefixList=[],this.nodeInnerPostfixList=[],this.editNodeClassList=[],this.extendShapeList=[],this.initContainer(),this.initTheme(),this.initCache(),Va.pluginList.filter(t=>t.preload).forEach(t=>{this.initPlugin(t)}),this.event=new f({mindMap:this}),this.keyCommand=new Pa({mindMap:this}),this.command=new Ga({mindMap:this}),this.renderer=new za({mindMap:this}),this.view=new u({mindMap:this}),this.batchExecution=new Ya,Va.pluginList.filter(t=>!t.preload).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 r.includes(t.layout)||(t.layout=n.LAYOUT.LOGICAL_STRUCTURE),t.theme=t.theme&&Fa[t.theme]?t.theme:"default",t}handleData(t){return bs(t)||Object.keys(t).length<=0?null:(t=ps(t||{}),t.data&&!t.data.expand&&(t.data.expand=!0),Vs([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=ss().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 h+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)}checkEditNodeClassIndex(t){return this.editNodeClassList.findIndex(e=>e===t)}addEditNodeClass(t){const e=this.checkEditNodeClassIndex(t);-1===e&&this.editNodeClassList.push(t)}deleteEditNodeClass(t){const e=this.checkEditNodeClassIndex(t);-1!==e&&this.editNodeClassList.splice(e,1)}render(t,e=""){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.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")}resize(){const t=this.width,e=this.height;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")}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=gr(Fa[this.opt.theme]||Fa.default,this.opt.themeConfig),vr.setBackgroundStyle(this.el,this.themeConfig)}setTheme(t,e=!1){this.execCommand("CLEAR_ACTIVE_NODE"),this.opt.theme=t,e||this.render(null,n.CHANGE_THEME),this.emit("view_theme_change",t)}getTheme(){return this.opt.theme}setThemeConfig(t,e=!1){const i=ks(this.themeConfig,t);if(this.opt.themeConfig=t,!e){const t=as(i);this.render(null,t?"":n.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(w.a.all([Wa,this.opt,t])),this.emit("after_update_config",this.opt,e)}getLayout(){return this.opt.layout}setLayout(t,e=!1){r.includes(t)||(t=n.LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=t,this.view.reset(),this.renderer.setLayout(),e||this.render(null,n.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(),this.emit("set_data",t)}setFullData(t){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,ps(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(a.EXPORT_ERROR,e)}}toPos(t,e){return{x:t-this.elRect.left,y:e-this.elRect.top}}setMode(t){if(![n.MODE.READONLY,n.MODE.EDIT].includes(t))return;const e=t===n.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:s,node:r}={}){const{watermarkConfig:o,openPerformance:a}=this.opt;a&&this.renderer.forceLoadNode(r);const{cssTextList:h,header:d,headerHeight:l,footer:c,footerHeight:u}=hr({addContentToHeader:n,addContentToFooter:s}),p=this.svg,m=this.draw,g=p.width(),f=p.height(),x=m.transform(),w=this.elRect;m.scale(1/x.scaleX,1/x.scaleY);const y=m.rbox();let v=null;r&&(v=dr(r,y.x,y.y,t,e));const _=0;y.width+=2*t,y.height+=2*e+_+l+u,m.translate(t,e),p.size(y.width,y.height),m.translate(-y.x+w.left,-y.y+w.top);let M=p.clone();const E=this.watermark&&this.watermark.hasWatermark();if(!i&&E){this.watermark.isInExport=!0;const{onlyExport:t}=o,e=y.width>g||y.height>f;e?(this.width=y.width,this.height=y.height,this.watermark.onResize(),M=p.clone(),this.width=g,this.height=f,this.watermark.onResize()):t&&(this.watermark.onResize(),M=p.clone()),t&&this.watermark.clear(),this.watermark.isInExport=!1}[this.joinCss(),...h].forEach(t=>{M.add(ss(`<style>${t}</style>`))}),d&&l>0&&(M.findOne(".smm-container").translate(0,l),d.width(y.width),d.y(e),M.add(d,0)),c&&u>0&&(c.width(y.width),c.y(y.height-e-u),M.add(c));const N=p.find("defs"),T=M.find("defs");return N.forEach((t,e)=>{const i=T[e];if(!i)return;const n=t.children(),s=i.children();for(let r=0;r<n.length;r++){const t=n[r],e=s[r];t&&e&&e.attr("id",t.attr("id"))}}),p.size(g,f),m.transform(x),{svg:M,svgHTML:M.svg(),clipData:v,rect:{...y,ratio:y.width/y.height},origWidth:g,origHeight:f,scaleX:x.scaleX,scaleY:x.scaleY}}addShape(t){if(!t)return;const e=this.extendShapeList.find(e=>e.name===t.name);e||this.extendShapeList.push(t)}removeShape(t){const e=this.extendShapeList.findIndex(e=>e.name===t);-1!==e&&this.extendShapeList.splice(e,1)}getSvgObjects(){return{SVG:ss,G:qn,Rect:an}}addPlugin(t,e){let i=Va.hasPlugin(t);-1===i&&Va.usePlugin(t,e),this.initPlugin(t)}removePlugin(t){let e=Va.hasPlugin(t);-1!==e&&(Va.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}))}destroy(){this.emit("beforeDestroy"),this.renderer.textEdit.hideEditTextBox(),this.renderer.textEdit.removeTextEditEl(),[...Va.pluginList].forEach(t=>{this[t.instanceName]&&this[t.instanceName].beforePluginDestroy&&this[t.instanceName].beforePluginDestroy(),this[t.instanceName]=null}),this.event.unbind(),this.svg.remove(),vr.removeBackgroundStyle(this.el),this.el.classList.remove("smm-mind-map-container"),this.el.innerHTML="",this.el=null,this.removeCss(),Va.instanceCount--}}let ja=[];Va.extendNodeDataNoStylePropList=(t=[])=>{ja.push(...t),o.push(...t)},Va.resetNodeDataNoStylePropList=()=>{ja.forEach(t=>{const e=o.findIndex(e=>e===t);-1!==e&&o.splice(e,1)}),ja=[]},Va.pluginList=[],Va.usePlugin=(t,e={})=>(-1!==Va.hasPlugin(t)||(t.pluginOpt=e,Va.pluginList.push(t)),Va),Va.hasPlugin=t=>Va.pluginList.findIndex(e=>e===t),Va.instanceCount=0,Va.defineTheme=(t,e={})=>{if(Fa[t])return new Error("该主题名称已存在");Fa[t]=gr(rs,e)},Va.removeTheme=t=>{Fa[t]&&(Fa[t]=null)};e["a"]=Va},da91:function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function o(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 o(i,n||t,r),h=s?s+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__||(s=!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(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},d.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,o=new Array(r);n<r;n++)o[n]=i[n].fn;return o},d.prototype.listenerCount=function(t){var e=s?s+t:t,i=this._events[e];return i?i.fn?1:i.length:0},d.prototype.emit=function(t,e,i,n,r,o){var a=s?s+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,o),!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,p=l.length;for(d=0;d<p;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=s?s+t:t;if(!this._events[r])return this;if(!e)return h(this,r),this;var o=this._events[r];if(o.fn)o.fn!==e||n&&!o.once||i&&o.context!==i||h(this,r);else{for(var a=0,d=[],l=o.length;a<l;a++)(o[a].fn!==e||n&&!o[a].once||i&&o[a].context!==i)&&d.push(o[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=s?s+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=s,d.EventEmitter=d,t.exports=d}}]); |