From 1a70ce0d624829a55480f471a51a9324f11e21b9 Mon Sep 17 00:00:00 2001 From: ACTom Date: Tue, 23 Oct 2018 22:40:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=87=BApng?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8Cdata:?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=9B=BE=E7=89=87=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/kityminder.core.js | 59 +++++++++++++++++++++------------- dist/kityminder.core.min.js | 4 +-- src/protocol/png.js | 63 +++++++++++++++++++++++-------------- 3 files changed, 78 insertions(+), 48 deletions(-) diff --git a/dist/kityminder.core.js b/dist/kityminder.core.js index 6c608ecc..dcf619da 100644 --- a/dist/kityminder.core.js +++ b/dist/kityminder.core.js @@ -1,6 +1,6 @@ /*! * ==================================================== - * Kity Minder Core - v1.4.50 - 2018-09-17 + * Kity Minder Core - v1.4.50 - 2018-10-23 * https://github.com/fex-team/kityminder-core * GitHub: https://github.com/fex-team/kityminder-core.git * Copyright (c) 2018 Baidu FEX; Licensed BSD-3-Clause @@ -8159,27 +8159,42 @@ _p[66] = { */ function xhrLoadImage(info, callback) { return Promise(function(resolve, reject) { - var xmlHttp = new XMLHttpRequest(); - xmlHttp.open("GET", info.url + "?_=" + Date.now(), true); - xmlHttp.responseType = "blob"; - xmlHttp.onreadystatechange = function() { - if (xmlHttp.readyState === 4 && xmlHttp.status === 200) { - var blob = xmlHttp.response; - var image = document.createElement("img"); - image.src = DomURL.createObjectURL(blob); - image.onload = function() { - DomURL.revokeObjectURL(image.src); - resolve({ - element: image, - x: info.x, - y: info.y, - width: info.width, - height: info.height - }); - }; - } - }; - xmlHttp.send(); + if (info.url.indexOf("data:") === 0) { + var image = document.createElement("img"); + image.src = info.url; + image.onload = function() { + DomURL.revokeObjectURL(image.src); + resolve({ + element: image, + x: info.x, + y: info.y, + width: info.width, + height: info.height + }); + }; + } else { + var xmlHttp = new XMLHttpRequest(); + xmlHttp.open("GET", info.url + "?_=" + Date.now(), true); + xmlHttp.responseType = "blob"; + xmlHttp.onreadystatechange = function() { + if (xmlHttp.readyState === 4 && xmlHttp.status === 200) { + var blob = xmlHttp.response; + var image = document.createElement("img"); + image.src = DomURL.createObjectURL(blob); + image.onload = function() { + DomURL.revokeObjectURL(image.src); + resolve({ + element: image, + x: info.x, + y: info.y, + width: info.width, + height: info.height + }); + }; + } + }; + xmlHttp.send(); + } }); } function getSVGInfo(minder) { diff --git a/dist/kityminder.core.min.js b/dist/kityminder.core.min.js index 1f1b2a6a..7a216f3e 100644 --- a/dist/kityminder.core.min.js +++ b/dist/kityminder.core.min.js @@ -1,10 +1,10 @@ /*! * ==================================================== - * Kity Minder Core - v1.4.50 - 2018-09-17 + * Kity Minder Core - v1.4.50 - 2018-10-23 * https://github.com/fex-team/kityminder-core * GitHub: https://github.com/fex-team/kityminder-core.git * Copyright (c) 2018 Baidu FEX; Licensed BSD-3-Clause * ==================================================== */ -!function(){function a(a){b.r([c[a]])}var b={r:function(a){if(b[a].inited)return b[a].value;if("function"!=typeof b[a].value)return b[a].inited=!0,b[a].value;var c={exports:{}},d=b[a].value(null,c.exports,c);if(b[a].inited=!0,b[a].value=d,void 0!==d)return d;for(var e in c.exports)if(c.exports.hasOwnProperty(e))return b[a].inited=!0,b[a].value=c.exports,c.exports}};b[0]={value:function(a,c,d){var e=b.r(17),f=b.r(11),g=(new e.Marker).pipe(function(){var a=7,b=new e.Circle(a-1);this.addShape(b),this.setRef(a-1,0).setViewBox(-a,-a,a+a,a+a).setWidth(a).setHeight(a),this.dot=b,this.node.setAttribute("markerUnits","userSpaceOnUse")});f.register("arc",function(a,b,c,d,f){var h,i,j,k=a.getLayoutBox(),l=b.getLayoutBox(),m=Math.abs,n=[],o=k.x>l.x?"right":"left";a.getMinder().getPaper().addResource(g),h=new e.Point(l.cx,l.cy),i="left"==o?new e.Point(k.right+2,k.cy):new e.Point(k.left-2,k.cy),j=e.Vector.fromPoints(h,i),n.push("M",h),n.push("A",m(j.x),m(j.y),0,0,j.x*j.y>0?0:1,i),c.setMarker(g),g.dot.fill(f),c.setPathData(n)})}},b[1]={value:function(a,c,d){var e=b.r(17),f=b.r(11),g=(new e.Marker).pipe(function(){var a=7,b=new e.Circle(a-1);this.addShape(b),this.setRef(a-1,0).setViewBox(-a,-a,a+a,a+a).setWidth(a).setHeight(a),this.dot=b,this.node.setAttribute("markerUnits","userSpaceOnUse")});f.register("arc_tp",function(a,b,c,d,f){var h=a.getLayoutBox(),i=b.getLayoutBox(),j=a.getIndex(),k=b.getChildren()[j+1];a.getIndex()>0&&(i=b.getChildren()[j-1].getLayoutBox());var l,m,n=(Math.abs,[]);h.x,i.x;a.getMinder().getPaper().addResource(g),l=new e.Point(i.cx,i.cy),m=new e.Point(h.cx,h.cy);var o=Math.sqrt(Math.pow(l.x-m.x,2)+Math.pow(l.y-m.y,2));if(o=0==a.getIndex()?.4*o:o,e.Vector.fromPoints(l,m),n.push("M",l),n.push("A",o,o,0,0,1,m),c.setMarker(g),g.dot.fill(f),c.setPathData(n),k&&k.getConnection()){var p=k.getConnection(),q=k.getLayoutBox(),r=new e.Point(q.cx,q.cy),s=Math.sqrt(Math.pow(m.x-r.x,2)+Math.pow(m.y-r.y,2));n=[],n.push("M",m),n.push("A",s,s,0,0,1,r),p.setMarker(g),g.dot.fill(f),p.setPathData(n)}})}},b[2]={value:function(a,c,d){b.r(17);b.r(11).register("bezier",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=b.getLayoutVectorOut().normalize(),g=Math.round,h=Math.abs,i=[];if(i.push("M",g(d.x),g(d.y)),h(f.x)>h(f.y)){var j=(e.x+d.x)/2;i.push("C",j,d.y,j,e.y,e.x,e.y)}else{var k=(e.y+d.y)/2;i.push("C",d.x,k,e.x,k,e.x,e.y)}c.setMarker(null),c.setPathData(i)})}},b[3]={value:function(a,c,d){b.r(17);b.r(11).register("fish-bone-master",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=Math.abs,g=f(d.y-e.y),h=f(d.x-e.x),i=[];i.push("M",d.x,d.y),i.push("h",h-g),i.push("L",e.x,e.y),c.setMarker(null),c.setPathData(i)})}},b[4]={value:function(a,c,d){b.r(17);b.r(11).register("l",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=b.getLayoutVectorOut(),g=[],h=Math.round,i=Math.abs;g.push("M",d.round()),i(f.x)>i(f.y)?g.push("H",h(e.x)):g.push("V",e.y),g.push("L",e),c.setPathData(g)})}},b[5]={value:function(a,c,d){b.r(17);b.r(11).register("poly",function(a,b,c,d){var e=b.getLayoutVertexOut(),f=a.getLayoutVertexIn(),g=b.getLayoutVectorOut().normalize(),h=Math.round,i=Math.abs,j=[];switch(j.push("M",h(e.x),h(e.y)),!0){case i(g.x)>i(g.y)&&g.x<0:j.push("h",-b.getStyle("margin-left")),j.push("v",f.y-e.y),j.push("H",f.x);break;case i(g.x)>i(g.y)&&g.x>=0:j.push("h",b.getStyle("margin-right")),j.push("v",f.y-e.y),j.push("H",f.x);break;case i(g.x)<=i(g.y)&&g.y<0:j.push("v",-b.getStyle("margin-top")),j.push("h",f.x-e.x),j.push("V",f.y);break;case i(g.x)<=i(g.y)&&g.y>=0:j.push("v",b.getStyle("margin-bottom")),j.push("h",f.x-e.x),j.push("V",f.y)}c.setMarker(null),c.setPathData(j)})}},b[6]={value:function(a,c,d){var e=b.r(17);b.r(11).register("under",function(a,b,c,d,f){var g,h,i,j,k=a.getLayoutBox(),l=b.getLayoutBox(),m=(Math.abs,[]),n=k.x>l.x?"right":"left",o=(a.getStyle("connect-radius"),k.bottom+3),p="sub"==b.getType()?l.bottom+3:l.cy;"right"==n?(g=new e.Point(l.right,p),h=new e.Point(k.left-10,o),i=new e.Point(k.right,o)):(g=new e.Point(l.left,p),h=new e.Point(k.right+10,o),i=new e.Point(k.left,o)),j=(g.x+h.x)/2,m.push("M",g),m.push("C",j,g.y,j,h.y,h),m.push("L",i),c.setMarker(null),c.setPathData(m)})}},b[7]={value:function(a,c,d){var e=b.r(17),f=b.r(19);if(-1!=location.href.indexOf("boxv")){var g;Object.defineProperty(e.Box.prototype,"visualization",{get:function(){return g?g.setBox(this):null}}),f.registerInitHook(function(){this.on("paperrender",function(){g=new e.Rect,g.fill("rgba(200, 200, 200, .5)"),g.stroke("orange"),this.getRenderContainer().addShape(g)})})}}},b[8]={value:function(a,c,d){var e=b.r(19),f={enableAnimation:!0,layoutAnimationDuration:300,viewAnimationDuration:100,zoomAnimationDuration:300},g={};e.registerInitHook(function(){this.setDefaultOptions(f),this.getOption("enableAnimation")||this.disableAnimation()}),e.prototype.enableAnimation=function(){for(var a in f)f.hasOwnProperty(a)&&this.setOption(g[a])},e.prototype.disableAnimation=function(){for(var a in f)f.hasOwnProperty(a)&&(g[a]=this.getOption(a),this.setOption(a,0))}}},b[9]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(19)),g=(b.r(21),b.r(13)),h=0,i=e.createClass("Command",{constructor:function(){this._isContentChange=!0,this._isSelectionChange=!1},execute:function(a,b){throw new Error("Not Implement: Command.execute()")},setContentChanged:function(a){this._isContentChange=!!a},isContentChanged:function(){return this._isContentChange},setSelectionChanged:function(a){this._isSelectionChange=!!a},isSelectionChanged:function(){return this._isContentChange},queryState:function(a){return h},queryValue:function(a){return 0},isNeedUndo:function(){return!0}});i.STATE_NORMAL=h,i.STATE_ACTIVE=1,i.STATE_DISABLED=-1,e.extendClass(f,{_getCommand:function(a){return this._commands[a.toLowerCase()]},_queryCommand:function(a,b,c){var d=this._getCommand(a);if(d){var e=d["query"+b];if(e)return e.apply(d,[this].concat(c))}return 0},queryCommandState:function(a){return this._queryCommand(a,"State",[].slice.call(arguments,1))},queryCommandValue:function(a){return this._queryCommand(a,"Value",[].slice.call(arguments,1))},execCommand:function(a){if(!a)return null;a=a.toLowerCase();var b,c,d,e,f=[].slice.call(arguments,1),h=this;return b=this._getCommand(a),e={command:b,commandName:a.toLowerCase(),commandArgs:f},!(!b||!~this.queryCommandState(a))&&(this._hasEnterExecCommand?(d=b.execute.apply(b,[h].concat(f)),this._hasEnterExecCommand||this._interactChange()):(this._hasEnterExecCommand=!0,c=this._fire(new g("beforeExecCommand",e,!0)),c||(this._fire(new g("preExecCommand",e,!1)),d=b.execute.apply(b,[h].concat(f)),this._fire(new g("execCommand",e,!1)),b.isContentChanged()&&this._firePharse(new g("contentchange")),this._interactChange()),this._hasEnterExecCommand=!1),void 0===d?null:d)}}),d.exports=i}},b[10]={value:function(a,c,d){function e(a){switch(a.version||(a.root?"1.4.0":"1.1.3")){case"1.1.3":h(a);case"1.2.0":case"1.2.1":g(a);case"1.3.0":case"1.3.1":case"1.3.2":case"1.3.3":case"1.3.4":case"1.3.5":i(a)}return a}function f(a,b){b(a),a.children&&a.children.forEach(function(a){f(a,b)})}function g(a){f(a,function(a){var b=a.data;delete b.layout_bottom_offset,delete b.layout_default_offset,delete b.layout_filetree_offset})}function h(a){var b=a.data.currentstyle;delete a.data.currentstyle,"bottom"==b?(a.template="structure",a.theme="snow"):"default"==b&&(a.template="default",a.theme="classic"),f(a,function(a){var b=a.data;"PriorityIcon"in b&&(b.priority=b.PriorityIcon,delete b.PriorityIcon),"ProgressIcon"in b&&(b.progress=1+(b.ProgressIcon-1<<1),delete b.ProgressIcon),delete b.point,delete b.layout})}function i(a){a.root={data:a.data,children:a.children},delete a.data,delete a.children}b.r(33);return e}},b[11]={value:function(a,c,d){function e(a,b){k[a]=b}var f=b.r(17),g=b.r(33),h=b.r(20),i=b.r(19),j=b.r(21),k={};e("default",function(a,b,c){c.setPathData(["M",b.getLayoutVertexOut(),"L",a.getLayoutVertexIn()])}),f.extendClass(j,{getConnect:function(){return this.data.connect||"default"},getConnectProvider:function(){return k[this.getConnect()]||k.default},getConnection:function(){return this._connection||null}}),f.extendClass(i,{getConnectContainer:function(){return this._connectContainer},createConnect:function(a){if(!a.isRoot()){var b=new f.Path;a._connection=b,this._connectContainer.addShape(b),this.updateConnect(a)}},removeConnect:function(a){var b=this;a.traverse(function(a){b._connectContainer.removeShape(a._connection),a._connection=null})},updateConnect:function(a){var b=a._connection,c=a.parent;if(c&&b){if(c.isCollapsed())return void b.setVisible(!1);b.setVisible(!0);var d=a.getConnectProvider(),e=a.getStyle("connect-color")||"white",f=a.getStyle("connect-width")||2;b.stroke(e,f),d(a,c,b,f,e),f%2==0?b.setTranslate(.5,.5):b.setTranslate(0,0)}}}),h.register("Connect",{init:function(){this._connectContainer=(new f.Group).setId(g.uuid("minder_connect_group")),this.getRenderContainer().prependShape(this._connectContainer)},events:{nodeattach:function(a){this.createConnect(a.node)},nodedetach:function(a){this.removeConnect(a.node)},"layoutapply layoutfinish noderender":function(a){this.updateConnect(a.node)}}}),c.register=e}},b[12]={value:function(a,c,d){function e(a,b){l[a]=b;for(var c in l)l.hasOwnProperty(c)&&(l[c]=l[c],l[c].name=c)}function f(a){return void 0===a?l:l[a]||null}var g=b.r(17),h=(b.r(33),b.r(19)),i=(b.r(21),b.r(13)),j=b.r(10),k=b.r(25),l={};c.registerProtocol=e,c.getRegisterProtocol=f,g.extendClass(h,{setup:function(a){if("string"==typeof a&&(a=document.querySelector(a)),a){var b=a.getAttribute("minder-data-type");if(b in l){var c=a.textContent;a.textContent=null,this.renderTo(a),this.importData(b,c)}return this}},exportJson:function(){function a(b){var c={};c.data=b.getData();var d=b.getChildren();c.children=[];for(var e=0;e200&&(b=0),f(a,a.parent?a.parent.getGlobalLayoutTransform():new g.Matrix),this}}),d.exports=l}},b[19]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=[],h=e.createClass("Minder",{constructor:function(a){this._options=f.extend({},a);for(var b,c=g.slice();c.length;)"function"==typeof(b=c.shift())&&b.call(this,this._options);this.fire("finishInitHook")}});h.version="1.4.43",h.registerInitHook=function(a){g.push(a)},d.exports=h}},b[20]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=b.r(19),h={};c.register=function(a,b){h[a]=b},g.registerInitHook(function(){this._initModules()}),e.extendClass(g,{_initModules:function(){var a=h,b=this._options.modules||f.keys(a);this._commands={},this._query={},this._modules={},this._rendererClasses={};var c,d,e,g,i,j,k,l=this;for(c=0;c=0&&(b=this.children.splice(c,1)[0],b.parent=null,b.root=b)},clearChildren:function(){this.children=[]},getChild:function(a){return this.children[a]},getRenderContainer:function(){return this.rc},getCommonAncestor:function(a){return h.getCommonAncestor(this,a)},contains:function(a){return this==a||this.isAncestorOf(a)},clone:function(){var a=new h;return a.data=f.clone(this.data),this.children.forEach(function(b){a.appendChild(b.clone())}),a},compareTo:function(a){if(!f.comparePlainObject(this.data,a.data))return!1;if(!f.comparePlainObject(this.temp,a.temp))return!1;if(this.children.length!=a.children.length)return!1;for(var b=0;this.children[b];){if(!this.children[b].compareTo(a.children[b]))return!1;b++}return!0},getMinder:function(){return this.getRoot().minder}});h.getCommonAncestor=function(a,b){if(a instanceof Array)return h.getCommonAncestor.apply(this,a);switch(arguments.length){case 1:return a.parent||a;case 2:if(a.isAncestorOf(b))return a;if(b.isAncestorOf(a))return b;for(var c=a.parent;c&&!c.isAncestorOf(b);)c=c.parent;return c;default:return Array.prototype.reduce.call(arguments,function(a,b){return h.getCommonAncestor(a,b)},a)}},e.extendClass(g,{getRoot:function(){return this._root},setRoot:function(a){this._root=a,a.minder=this},getAllNode:function(){var a=[];return this.getRoot().traverse(function(b){a.push(b)}),a},getNodeById:function(a){return this.getNodesById([a])[0]},getNodesById:function(a){var b=this.getAllNode(),c=[];return b.forEach(function(b){-1!=a.indexOf(b.getData("id"))&&c.push(b)}),c},createNode:function(a,b,c){var d=new h(a);return this.fire("nodecreate",{node:d,parent:b,index:c}),this.appendNode(d,b,c),d},appendNode:function(a,b,c){return b&&b.insertChild(a,c),this.attachNode(a),this},removeNode:function(a){a.parent&&(a.parent.removeChild(a),this.detachNode(a),this.fire("noderemove",{node:a}))},attachNode:function(a){var b=this.getRenderContainer();a.traverse(function(a){a.attached=!0,b.addShape(a.getRenderContainer())}),b.addShape(a.getRenderContainer()),this.fire("nodeattach",{node:a})},detachNode:function(a){var b=this.getRenderContainer();a.traverse(function(a){a.attached=!1,b.removeShape(a.getRenderContainer())}),this.fire("nodedetach",{node:a})},getMinderTitle:function(){return this.getRoot().getText()}}),d.exports=h}},b[22]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=b.r(19);g.registerInitHook(function(a){this._defaultOptions={}}),e.extendClass(g,{setDefaultOptions:function(a){return f.extend(this._defaultOptions,a),this},getOption:function(a){return a?a in this._options?this._options[a]:this._defaultOptions[a]:f.extend({},this._defaultOptions,this._options)},setOption:function(a,b){this._options[a]=b}})}},b[23]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=b.r(19);g.registerInitHook(function(){this._initPaper()}),e.extendClass(g,{_initPaper:function(){this._paper=new e.Paper,this._paper._minder=this,this._paper.getNode().ondragstart=function(a){a.preventDefault()},this._paper.shapeNode.setAttribute("transform","translate(0.5, 0.5)"),this._addRenderContainer(),this.setRoot(this.createNode()),this._options.renderTo&&this.renderTo(this._options.renderTo)},_addRenderContainer:function(){this._rc=(new e.Group).setId(f.uuid("minder")),this._paper.addShape(this._rc)},renderTo:function(a){if("string"==typeof a&&(a=document.querySelector(a)),a){if("script"==a.tagName.toLowerCase()){var b=document.createElement("div");b.id=a.id,b.class=a.class,a.parentNode.insertBefore(b,a),a.parentNode.removeChild(a),a=b}a.classList.add("km-view"),this._paper.renderTo(this._renderTarget=a),this._bindEvents(),this.fire("paperrender")}return this},getRenderContainer:function(){return this._rc},getPaper:function(){return this._paper},getRenderTarget:function(){return this._renderTarget}})}},b[24]={value:function(a,c,d){function e(a,b,c,d){return c=a.createNode(b.data,c,d),b.children.forEach(function(b,d){e(a,b,c,d)}),c}function f(a,b){var c=b.path.split("/");c.shift();var d,f=c.shift();if("root"==f){var g=c.indexOf("data");if(g>-1){f="data";var h=c.splice(g+1);b.dataPath=h}else f="node";d=a.getRoot();for(var i,j;i=c.shift();)"children"!=i&&(void 0!==j&&(d=d.getChild(j)),j=+i);b.index=j,b.node=d}switch(b.express=[f,b.op].join(".")){case"theme.replace":a.useTheme(b.value);break;case"template.replace":a.useTemplate(b.value);break;case"node.add":e(a,b.value,b.node,b.index).renderTree(),a.layout();break;case"node.remove":a.removeNode(b.node.getChild(b.index)),a.layout();break;case"data.add":case"data.replace":case"data.remove":var k,l=b.node.data;for(c=b.dataPath.slice();l&&c.length>1;)k=c.shift(),k in l?l=l[k]:"remove"!=b.op&&(l=l[k]={});l&&(k=c.shift(),l[k]=b.value),"expandState"==k?d.renderTree():d.render(),a.layout()}a.fire("patch",{patch:b})}var g=b.r(17),h=b.r(19);g.extendClass(h,{applyPatches:function(a){for(var b=0;b=0;--c)if(a[c].isAncestorOf(b))return!0;return!1}var c,d=this.getSelectedNodes().slice(0),e=[],f=d.indexOf(this.getRoot());for(~f&&!a&&d.splice(f,1),d.sort(function(a,b){return a.getLevel()-b.getLevel()});c=d.pop();)b(d,c)||e.push(c);return e}}),e.extendClass(h,{isSelected:function(){var a=this.getMinder();return a&&-1!=a.getSelectedNodes().indexOf(this)}})}},b[29]={value:function(a,c,d){function e(a){var b=4096,c=8192,d=16384,e=0;return"string"==typeof a?a.toLowerCase().split(/\+\s*/).forEach(function(a){switch(a){case"ctrl":case"cmd":e|=b;break;case"alt":e|=c;break;case"shift":e|=d;break;default:e|=h[a]}}):((a.ctrlKey||a.metaKey)&&(e|=b),a.altKey&&(e|=c),a.shiftKey&&(e|=d),e|=a.keyCode),e}var f=b.r(17),g=b.r(33),h=b.r(15),i=b.r(19),j=b.r(13);f.extendClass(j,{isShortcutKey:function(a){var b=this.originEvent;return!!b&&e(a)==e(b)}}),i.registerInitHook(function(){this._initShortcutKey()}),f.extendClass(i,{_initShortcutKey:function(){this._bindShortcutKeys()},_bindShortcutKeys:function(){var a=this._shortcutKeys={};this.on("keydown",function(b){for(var c in a)if(a.hasOwnProperty(c)&&b.isShortcutKey(c)){var d=a[c];if(d.__statusCondition&&d.__statusCondition!=this.getStatus())return;d(),b.preventDefault()}})},addShortcut:function(a,b){var c=this._shortcutKeys;a.split(/\|\s*/).forEach(function(a){var d,e=a.split("::");e.length>1&&(a=e[1],d=e[0],b.__statusCondition=d),c[a]=b})},addCommandShortcutKeys:function(a,b){var c=this._commandShortcutKeys||(this._commandShortcutKeys={}),d={};b?d[a]=b:d=a;var e=this;g.each(d,function(a,b){c[b]=a,e.addShortcut(a,function(){-1!==e.queryCommandState(b)&&e.execCommand(b)})})},getCommandShortcutKey:function(a){var b=this._commandShortcutKeys;return b&&b[a]||null},supportClipboardEvent:function(a){return!!a.ClipboardEvent}(window)})}},b[30]={value:function(a,c,d){var e=b.r(17),f=b.r(19),g=~window.location.href.indexOf("status"),h=~window.location.href.indexOf("trace");f.registerInitHook(function(){this._initStatus()}),e.extendClass(f,{_initStatus:function(){this._status="normal",this._rollbackStatus="normal"},setStatus:function(a,b){return"readonly"!=this._status||b?(a!=this._status&&(this._rollbackStatus=this._status,this._status=a,this.fire("statuschange",{lastStatus:this._rollbackStatus,currentStatus:this._status}),g&&(console.log(window.event.type,this._rollbackStatus,"->",this._status),h&&console.trace())),this):this},rollbackStatus:function(){this.setStatus(this._rollbackStatus)},getRollbackStatus:function(){return this._rollbackStatus},getStatus:function(){return this._status}})}},b[31]={value:function(a,c,d){function e(a,b){l[a]=b}var f=b.r(17),g=b.r(33),h=b.r(19),i=b.r(9),j=b.r(21),k=b.r(20),l={};c.register=e,g.extend(h,{getTemplateList:function(){return l}}),f.extendClass(h,function(){var a=h.prototype.getTheme;return{useTemplate:function(a,b){this.setTemplate(a),this.refresh(b||800)},getTemplate:function(){return this._template||"default"},setTemplate:function(a){this._template=a||null},getTemplateSupport:function(a){var b=l[this.getTemplate()];return b&&b[a]},getTheme:function(b){return(this.getTemplateSupport("getTheme")||a).call(this,b)}}}()),f.extendClass(j,function(){var a=j.prototype.getLayout,b=j.prototype.getConnect;return{getLayout:function(){return(this.getMinder().getTemplateSupport("getLayout")||a).call(this,this)},getConnect:function(){return(this.getMinder().getTemplateSupport("getConnect")||b).call(this,this)}}}()),k.register("TemplateModule",{commands:{template:f.createClass("TemplateCommand",{base:i,execute:function(a,b){a.useTemplate(b),a.execCommand("camera")},queryValue:function(a){return a.getTemplate()||"default"}})}})}},b[32]={value:function(a,c,d){function e(a,b){m[a]=b}var f=b.r(17),g=b.r(33),h=b.r(19),i=b.r(21),j=b.r(20),k=b.r(9),l={left:function(a){return 3 in a&&a[3]||1 in a&&a[1]||a[0]},right:function(a){return 1 in a&&a[1]||a[0]},top:function(a){return a[0]},bottom:function(a){return 2 in a&&a[2]||a[0]}},m={};c.register=e,g.extend(h,{getThemeList:function(){return m}}),f.extendClass(h,{useTheme:function(a){return this.setTheme(a),this.refresh(800),!0},setTheme:function(a){if(a&&!m[a])throw new Error("Theme "+a+" not exists!");var b=this._theme;this._theme=a||null;var c=this.getRenderTarget();return c&&(c.classList.remove("km-theme-"+b),a&&c.classList.add("km-theme-"+a),c.style.background=this.getStyle("background")),this.fire("themechange",{theme:a}),this},getTheme:function(a){return this._theme||this.getOption("defaultTheme")||"fresh-blue"},getThemeItems:function(a){this.getTheme(a);return m[this.getTheme(a)]},getStyle:function(a,b){var c,d,e,f,h=this.getThemeItems(b);if(a in h)return h[a];if(c=a.split("-"),c.length<2)return null;if(d=c.pop(),(a=c.join("-"))in h){if(e=h[a],g.isArray(e)&&(f=l[d]))return f(e);if(!isNaN(e))return e}return null},getNodeStyle:function(a,b){var c=this.getStyle(a.getType()+"-"+b,a);return null!==c?c:this.getStyle(b,a)}}),f.extendClass(i,{getStyle:function(a){return this.getMinder().getNodeStyle(this,a)}}),j.register("Theme",{defaultOptions:{defaultTheme:"fresh-blue"},commands:{theme:f.createClass("ThemeCommand",{base:k,execute:function(a,b){return a.useTheme(b)},queryValue:function(a){return a.getTheme()||"default"}})}}),h.registerInitHook(function(){this.setTheme()})}},b[33]={value:function(a,c){var d=b.r(17),e={};c.extend=d.Utils.extend.bind(d.Utils),c.each=d.Utils.each.bind(d.Utils),c.uuid=function(a){return e[a]=e[a]?e[a]+1:1,a+e[a]},c.guid=function(){return(1e6*+new Date+Math.floor(1e6*Math.random())).toString(36)},c.trim=function(a){return a.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")},c.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},c.clone=function(a){return JSON.parse(JSON.stringify(a))},c.comparePlainObject=function(a,b){return JSON.stringify(a)==JSON.stringify(b)},c.encodeHtml=function(a,b){return a?a.replace(b||/[&<">'](?:(amp|lt|quot|gt|#39|nbsp);)?/g,function(a,b){return b?a:{"<":"<","&":"&",'"':""",">":">","'":"'"}[a]}):""},c.clearWhiteSpace=function(a){return a.replace(/[\u200b\t\r\n]/g,"")},c.each(["String","Function","Array","Number","RegExp","Object"],function(a){var b=Object.prototype.toString;c["is"+a]=function(c){return b.apply(c)=="[object "+a+"]"}})}},b[34]={value:function(a,c,d){d.exports=window.kityminder=b.r(35)}},b[35]={value:function(a,c,d){var e={version:b.r(19).version};b.r(33),e.Minder=b.r(19),e.Command=b.r(9),e.Node=b.r(21),b.r(22),b.r(8),e.Event=b.r(13),e.data=b.r(12),b.r(10),e.KeyMap=b.r(15),b.r(29),b.r(30),b.r(23),b.r(28),b.r(14),b.r(16),e.Module=b.r(20),b.r(26),e.Render=b.r(27),e.Connect=b.r(11),e.Layout=b.r(18),e.Theme=b.r(32),e.Template=b.r(31),e.Promise=b.r(25),b.r(7),b.r(24),b.r(42),b.r(43),b.r(44),b.r(45),b.r(46),b.r(47),b.r(48),b.r(50),b.r(49),b.r(51),b.r(52),b.r(53),b.r(54),b.r(55),b.r(56),b.r(57),b.r(58),b.r(59),b.r(60),b.r(61),b.r(62),b.r(63),b.r(64),b.r(68),b.r(65),b.r(67),b.r(66),b.r(40),b.r(36),b.r(37),b.r(38),b.r(39),b.r(41),b.r(75),b.r(78),b.r(77),b.r(76),b.r(78),b.r(80),b.r(79),b.r(0),b.r(1),b.r(2),b.r(3),b.r(4),b.r(5),b.r(6),b.r(69),b.r(73),b.r(70),b.r(72),b.r(71),b.r(74),d.exports=e}},b[36]={value:function(a,c,d){function e(a){function b(a){var b=[],d=a.getLayoutBox(),e=5;return"x"==c?(b.push({type:"up",node:a,area:new f.Box({x:d.x,y:d.top-a.getStyle("margin-top")-e,width:d.width,height:a.getStyle("margin-top")}),path:["M",d.x,d.top-e,"L",d.right,d.top-e]}),b.push({type:"down",node:a,area:new f.Box({x:d.x,y:d.bottom+e,width:d.width,height:a.getStyle("margin-bottom")}),path:["M",d.x,d.bottom+e,"L",d.right,d.bottom+e]})):(b.push({type:"up",node:a,area:new f.Box({x:d.left-a.getStyle("margin-left")-e,y:d.top,width:a.getStyle("margin-left"),height:d.height}),path:["M",d.left-e,d.top,"L",d.left-e,d.bottom]}),b.push({type:"down",node:a,area:new f.Box({x:d.right+e,y:d.top,width:a.getStyle("margin-right"),height:d.height}),path:["M",d.right+e,d.top,"L",d.right+e,d.bottom]})),b}var c="left"==a||"right"==a?"x":"y",d="left"==a||"top"==a?-1:1,e={left:"right",right:"left",top:"bottom",bottom:"top",x:"y",y:"x"};g.register(a,f.createClass({base:g,doLayout:function(b,g){var h=b.getContentBox();if("x"==c?(b.setVertexOut(new f.Point(h[a],h.cy)),b.setLayoutVectorOut(new f.Vector(d,0))):(b.setVertexOut(new f.Point(h.cx,h[a])),b.setLayoutVectorOut(new f.Vector(0,d))),!g.length)return!1;g.forEach(function(b){var g=b.getContentBox();b.setLayoutTransform(new f.Matrix),"x"==c?(b.setVertexIn(new f.Point(g[e[a]],g.cy)),b.setLayoutVectorIn(new f.Vector(d,0))):(b.setVertexIn(new f.Point(g.cx,g[e[a]])),b.setLayoutVectorIn(new f.Vector(0,d)))}),this.align(g,e[a]),this.stack(g,e[c]);var i=this.getBranchBox(g),j=0,k=0;"x"==c?(j=h[a],j+=d*b.getStyle("margin-"+a),j+=d*g[0].getStyle("margin-"+e[a]),k=h.bottom,k-=h.height/2,k-=i.height/2,k-=i.y):(j=h.right,j-=h.width/2,j-=i.width/2,j-=i.x,k=h[a],k+=d*b.getStyle("margin-"+a),k+=d*g[0].getStyle("margin-"+e[a])),this.move(g,j,k)},getOrderHint:b}))}var f=b.r(17),g=b.r(18);["left","right","top","bottom"].forEach(e)}},b[37]={value:function(a,c,d){function e(a){var b="filetree-"+(a>0?"down":"up");g.register(b,f.createClass({base:g,doLayout:function(b,c,d){var e=b.getContentBox(),g=20;if(b.setVertexOut(new f.Point(e.left+g,a>0?e.bottom:e.top)),b.setLayoutVectorOut(new f.Vector(0,a)),c.length){c.forEach(function(a){var b=a.getContentBox();a.setLayoutTransform(new f.Matrix),a.setVertexIn(new f.Point(b.left,b.cy)),a.setLayoutVectorIn(new f.Vector(1,0))}),this.align(c,"left"),this.stack(c,"y");var h=0;h+=e.left,h+=g,h+=c[0].getStyle("margin-left");var i=0;a>0?(i+=e.bottom,i+=b.getStyle("margin-bottom"),i+=c[0].getStyle("margin-top")):(i-=this.getTreeBox(c).bottom,i+=e.top,i-=b.getStyle("margin-top"),i-=c[0].getStyle("margin-bottom")),this.move(c,h,i)}},getOrderHint:function(a){var b=[],c=a.getLayoutBox(),d=a.getLevel()>1?3:5;return b.push({type:"up",node:a,area:new f.Box({x:c.x,y:c.top-a.getStyle("margin-top")-d,width:c.width,height:a.getStyle("margin-top")}),path:["M",c.x,c.top-d,"L",c.right,c.top-d]}),b.push({type:"down",node:a,area:new f.Box({x:c.x,y:c.bottom+d,width:c.width,height:a.getStyle("margin-bottom")}),path:["M",c.x,c.bottom+d,"L",c.right,c.bottom+d]}),b}}))}var f=b.r(17),g=b.r(18);[-1,1].forEach(e)}},b[38]={value:function(a,c,d){var e=b.r(17),f=b.r(18);f.register("fish-bone-master",e.createClass("FishBoneMasterLayout",{base:f,doLayout:function(a,b,c){var d=[],f=[],g=b[0],h=a.getContentBox();if(a.setVertexOut(new e.Point(h.right,h.cy)),a.setLayoutVectorOut(new e.Vector(1,0)),g){var i=(g.getContentBox(),a.getStyle("margin-right")),j=g.getStyle("margin-left"),k=g.getStyle("margin-top"),l=g.getStyle("margin-bottom");b.forEach(function(a,b){a.setLayoutTransform(new e.Matrix);var c=a.getContentBox();b%2?(f.push(a),a.setVertexIn(new e.Point(c.left,c.top)),a.setLayoutVectorIn(new e.Vector(1,1))):(d.push(a),a.setVertexIn(new e.Point(c.left,c.bottom)),a.setLayoutVectorIn(new e.Vector(1,-1)))}),this.stack(d,"x"),this.stack(f,"x"),this.align(d,"bottom"),this.align(f,"top");var m=h.right+i+j,n=h.cy-l-a.getStyle("margin-top"),o=h.cy+k+a.getStyle("margin-bottom");this.move(d,m,n),this.move(f,m+j,o)}}}))}},b[39]={value:function(a,c,d){var e=b.r(17),f=b.r(18);f.register("fish-bone-slave",e.createClass("FishBoneSlaveLayout",{base:f,doLayout:function(a,b,c){var d=this,f=Math.abs,g=.382,h=a.getContentBox(),i=a.getLayoutVectorIn();a.setLayoutVectorOut(i);var j=h.left+h.width*g,k=new e.Point(j,i.y>0?h.bottom:h.top);a.setVertexOut(k);var l=b[0];if(l){var m=l.getContentBox();b.forEach(function(a,b){a.setLayoutTransform(new e.Matrix),a.setLayoutVectorIn(new e.Vector(1,0)),a.setVertexIn(new e.Point(m.left,m.cy))}),this.stack(b,"y"),this.align(b,"left");var n=0,o=0;n+=k.x,a.getLayoutVectorOut().y<0?(o-=this.getTreeBox(b).bottom,o+=a.getContentBox().top,o-=a.getStyle("margin-top"),o-=l.getStyle("margin-bottom")):(o+=a.getContentBox().bottom,o+=a.getStyle("margin-bottom"),o+=l.getStyle("margin-top")),this.move(b,n,o),2==c&&b.forEach(function(a){var b=a.getLayoutTransform(),c=a.getContentBox(),g=b.transformPoint(new e.Point(c.left,0));d.move([a],f(g.y-k.y),0)})}}}))}},b[40]={value:function(a,c,d){var e=b.r(17),f=b.r(18),g=b.r(19);f.register("mind",e.createClass({base:f,doLayout:function(a,b){var c=Math.ceil(a.children.length/2),d=[],f=[];b.forEach(function(a){a.getIndex()=c.length))return c.splice(this.getIndex(),1),c.splice(a,0,this),this}}});var k=g.createClass("ArrangeUpCommand",{base:i,execute:function(a){var b=a.getSelectedNodes();b.sort(e);var c=b.map(function(a){return a.getIndex()});b.forEach(function(a,b){a.arrange(c[b]-1)}),a.layout(300)},queryState:function(a){return a.getSelectedNode()?0:-1}}),l=g.createClass("ArrangeUpCommand",{base:i,execute:function(a){var b=a.getSelectedNodes();b.sort(f);var c=b.map(function(a){return a.getIndex()});b.forEach(function(a,b){a.arrange(c[b]+1)}),a.layout(300)},queryState:function(a){return a.getSelectedNode()?0:-1}}),m=g.createClass("ArrangeCommand",{base:i,execute:function(a,b){var c=a.getSelectedNodes().slice();if(c.length){if(h.getCommonAncestor(c)==c[0].parent){var d=c.map(function(a){return{index:a.getIndex(),node:a}}),e=Math.min.apply(Math,d.map(function(a){return a.index}))>=b;d.sort(function(a,b){return e?b.index-a.index:a.index-b.index}),d.forEach(function(a){a.node.arrange(b)}),a.layout(300)}}},queryState:function(a){return a.getSelectedNode()?0:-1}});j.register("ArrangeModule",{commands:{arrangeup:k,arrangedown:l,arrange:m},contextmenu:[{command:"arrangeup"},{command:"arrangedown"},{divider:!0}],commandShortcutKeys:{arrangeup:"normal::alt+Up",arrangedown:"normal::alt+Down"}})}},b[43]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(19),b.r(21),b.r(9)),g=b.r(20),h=b.r(61);g.register("basestylemodule",function(){function a(a,b){return a.getData(b)||a.getStyle(b)}var b=this;return h.registerStyleHook(function(b,c){var d=a(b,"font-weight"),e=a(b,"font-style");[d,e].join("/");c.eachItem(function(a,b){b.setFont({weight:d,style:e})})}),{commands:{bold:e.createClass("boldCommand",{base:f,execute:function(a){var b=a.getSelectedNodes();1==this.queryState("bold")?b.forEach(function(a){a.setData("font-weight").render()}):b.forEach(function(a){a.setData("font-weight","bold").render()}),a.layout()},queryState:function(){var a=b.getSelectedNodes(),c=0;return 0===a.length?-1:(a.forEach(function(a){if(a&&a.getData("font-weight"))return c=1,!1}),c)}}),italic:e.createClass("italicCommand",{base:f,execute:function(a){var b=a.getSelectedNodes();1==this.queryState("italic")?b.forEach(function(a){a.setData("font-style").render()}):b.forEach(function(a){a.setData("font-style","italic").render()}),a.layout()},queryState:function(){var a=b.getSelectedNodes(),c=0;return 0===a.length?-1:(a.forEach(function(a){if(a&&a.getData("font-style"))return c=1,!1}),c)}})},commandShortcutKeys:{bold:"ctrl+b",italic:"ctrl+i"}}})}},b[44]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(21)),g=b.r(9);b.r(20).register("ClipboardModule",function(){function a(b,d){h.push(d),c.appendNode(d,b),d.render(),d.setLayoutOffset(null);var e=d.children.map(function(a){return a.clone()});d.clearChildren();for(var f,g=0;f=e[g];g++)a(d,f)}function b(a){a.length&&(a.sort(function(a,b){return a.getIndex()-b.getIndex()}),d=a.map(function(a){return a.clone()}))}var c=this,d=[],h=[],i=e.createClass("CopyCommand",{base:g,execute:function(a){b(a.getSelectedAncestors(!0)),this.setContentChanged(!1)}}),j=e.createClass("CutCommand",{base:g,execute:function(a){var c=a.getSelectedAncestors();0!==c.length&&(b(c),a.select(f.getCommonAncestor(c),!0),c.slice().forEach(function(b){a.removeNode(b)}),a.layout(300))}}),k=e.createClass("PasteCommand",{base:g,execute:function(b){if(d.length){var c=b.getSelectedNodes();if(!c.length)return;for(var e,f=0;e=d[f];f++)for(var g,i=0;g=c[i];i++)a(g,e.clone());b.select(h,!0),h=[],b.layout(300)}},queryState:function(a){return a.getSelectedNode()?0:-1}});if(c.supportClipboardEvent&&!e.Browser.gecko){var l=function(a){this.fire("beforeCopy",a)},m=function(a){this.fire("beforeCut",a)},n=function(a){this.fire("beforePaste",a)};return{commands:{copy:i,cut:j,paste:k},clipBoardEvents:{copy:l.bind(c),cut:m.bind(c),paste:n.bind(c)},sendToClipboard:b}}return{commands:{copy:i,cut:j,paste:k},commandShortcutKeys:{copy:"normal::ctrl+c|",cut:"normal::ctrl+x",paste:"normal::ctrl+v"},sendToClipboard:b}})}},b[45]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(21)),g=b.r(9),h=b.r(20),i=e.createClass("MoveToParentCommand",{base:g,execute:function(a,b,c){for(var d,e=0;ed&&"up"==a.type&&b--,a.node.setLayoutOffset(null),this._minder.execCommand("arrange",b),this._renderOrderHint(null)}else this._minder.fire("savescene");this._minder.layout(300),this._leaveDragMode(),this._minder.fire("contentchange")}},_enterDragMode:function(){return this._calcDragSources(),this._dragSources.length?(this._fadeDragSources(.5),this._calcDropTargets(),this._calcOrderHints(),this._dragMode=!0,this._minder.setStatus("dragtree"),!0):(this._startPosition=null,!1)},_calcDragSources:function(){this._dragSources=this._minder.getSelectedAncestors()},_fadeDragSources:function(a){var b=this._minder;this._dragSources.forEach(function(c){c.getRenderContainer().setOpacity(a,200),c.traverse(function(c){a<1?b.detachNode(c):b.attachNode(c)},!0)})},_calcDropTargets:function(){function a(b,c){var d,e=[];return e.push(c),c.getChildren().forEach(function(c){for(d=0;d.5*Math.min(d(b),d(c))||(a.width+1>=Math.min(b.width,c.width)||a.height+1>=Math.min(b.height,c.height))))}),this._renderDropHint(this._dropSucceedTarget),!!this._dropSucceedTarget},_orderTest:function(){return this._orderSucceedHint=this._boxTest(this._orderHints,function(a){return a.area}),this._renderOrderHint(this._orderSucceedHint),!!this._orderSucceedHint},_renderDropHint:function(a){this._dropHinter.render(a)},_renderOrderHint:function(a){this._orderHinter.render(a)},preventDragMove:function(){this._startPosition=null}});h.register("DragTree",function(){var a;return{init:function(){a=new l(this),window.addEventListener("mouseup",function(){a.dragEnd()})},events:{"normal.mousedown inputready.mousedown":function(b){b.originEvent.button||b.getTargetNode()&&b.getTargetNode()!=this.getRoot()&&a.dragStart(b.getPosition())},"normal.mousemove dragtree.mousemove":function(b){a.dragMove(b.getPosition())},"normal.mouseup dragtree.beforemouseup":function(b){a.dragEnd(),b.preventDefault()},statuschange:function(b){"textedit"==b.lastStatus&&"normal"==b.currentStatus&&a.preventDragMove()}},commands:{movetoparent:i}}})}},b[46]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=b.r(15),h=b.r(21),i=b.r(9),j=b.r(20),k=b.r(27);j.register("Expand",function(){var a=this,b="expandState",c="collapse";e.extendClass(h,{expand:function(){return this.setData(b,"expand"),this},collapse:function(){return this.setData(b,c),this},isExpanded:function(){return this.getData(b)!==c&&(this.isRoot()||this.parent.isExpanded())},isCollapsed:function(){return!this.isExpanded()}});var d=e.createClass("ExpandCommand",{base:i,execute:function(a,b){var c=a.getSelectedNode();if(c){for(b&&(c=c.parent);c.parent;)c.expand(),c=c.parent;c.renderTree(),a.layout(100)}},queryState:function(a){var b=a.getSelectedNode();return!b||b.isRoot()||b.isExpanded()?-1:0}}),j=e.createClass("ExpandToLevelCommand",{base:i,execute:function(a,b){a.getRoot().traverse(function(a){a.getLevel()c&&e>f?(a=c,b=a/e):b>d&&(b=d,a=b*e),{width:0|a,height:0|b}}return{defaultOptions:{maxImageWidth:200,maxImageHeight:200},commands:{image:e.createClass("ImageCommand",{base:f,execute:function(c,d,e){var f=c.getSelectedNodes();a(d,function(a,g){f.forEach(function(f){var h=b(a,g,c.getOption("maxImageWidth"),c.getOption("maxImageHeight"));f.setData("image",d),f.setData("imageTitle",d&&e),f.setData("imageSize",d&&h),f.render()}),c.fire("saveScene"),c.layout(300)})},queryState:function(a){var b=a.getSelectedNodes(),c=0;return 0===b.length?-1:(b.forEach(function(a){if(a&&a.getData("image"))return c=0,!1}),c)},queryValue:function(a){var b=a.getSelectedNode();return{url:b.getData("image"),title:b.getData("imageTitle")}}})},renderers:{top:e.createClass("ImageRenderer",{base:h,create:function(a){return new e.Image(a.getData("image"))},shouldRender:function(a){return a.getData("image")},update:function(a,b,c){var d=b.getData("image"),f=b.getData("imageTitle"),g=b.getData("imageSize"),h=b.getStyle("space-top");if(g){f&&a.node.setAttributeNS("http://www.w3.org/1999/xlink","title",f);var i=c.cx-g.width/2,j=c.y-g.height-h;return a.setUrl(d).setX(0|i).setY(0|j).setWidth(0|g.width).setHeight(0|g.height),new e.Box(0|i,0|j,0|g.width,0|g.height)}}})}}})}},b[51]={value:function(a,c,d){var e=(b.r(17),b.r(33),b.r(15),b.r(19),b.r(21),b.r(9),b.r(20));b.r(27);e.register("KeyboardModule",function(){function a(a){var b,d=[];a.traverse(function(a){b=a.getLayoutBox(),b.width&&b.height&&d.push({left:b.x,top:b.y,right:b.x+b.width,bottom:b.y+b.height,width:b.width,height:b.height,node:a})});for(var e=0;ef.right&&(!g.right||ef.bottom&&(!g.down||e>1].getGlobalLayoutTransform()),a.select(e,!0),a.layout(600)},queryState:function(a){var b=a.getSelectedNodes();if(!b.length)return-1;var c=b[0].parent;if(!c)return-1;for(var d=1;d>>c|d<<32-c},b=function(a,b,j,k,l){var m=d+f[c][a]%16,n=d+(f[c][a]>>4);b%=4,j=4+j%4,k=8+k%4,l=12+l%4,h[b]+=h[j]+(i[m]^e[n%16]),g(l,b,16),h[k]+=h[l],g(j,k,12),h[b]+=h[j]+(i[n]^e[m%16]),g(l,b,8),h[k]+=h[l],g(j,k,7)},function(f,g){g instanceof Array&&4===g.length||(g=[0,0,0,0]);var k,l,m,n,o,p,q,r;for(l=a.slice(0),k=e.slice(0,8),c=0;c<4;c+=1)k[c]^=g[c];if(m=16*f.length,o=m%512>446||m%512==0?0:m,m%512==432)f+="老";else{for(f+="耀";f.length%32!=27;)f+="\0";f+=""}for(i=[],r=0;r=0;c--)d=b.charCodeAt(c),e^=(e<<5)+d+(e>>2);return 2147483647&e},getResourceColor:function(a){var c,d=this._getResourceColorIndexMapping();return Object.prototype.hasOwnProperty.call(d,a)||(c=this._getNextResourceColorIndex(),d[a]=c),b[d[a]]||e.Color.createHSL(Math.floor(this.getHashCode(a)/2147483647*359),100,85)},getUsedResource:function(){var a,b=this._getResourceColorIndexMapping(),c=[];for(a in b)Object.prototype.hasOwnProperty.call(b,a)&&c.push(a);return c},_getNextResourceColorIndex:function(){var a,c,d,e=this._getResourceColorIndexMapping();c=[];for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&c.push(e[a]);for(d=0;dv)for(var w=u-v;w--;)s=(new e.Text).setAttr("text-rendering","inherit"),e.Browser.ie||e.Browser.edge?s.setVerticalAlign("top"):s.setAttr("dominant-baseline","text-before-edge"),a.addItem(s);for(q=0,s;t=g[q],s=a.getItem(q);q++)s.setContent(t),(e.Browser.ie||e.Browser.edge)&&s.fixPosition();this.setTextStyle(b,a);var x=b.getText()+["font-size","font-name","font-weight","font-style"].map(c).join("/");return b._currentTextHash==x&&b._currentTextGroupBox?b._currentTextGroupBox:(b._currentTextHash=x,function(){a.eachItem(function(a,b){var c=m+a*i*h;b.setY(c);var d=b.getBoundaryBox();o=o.merge(new e.Box(0,c,d.height&&d.width||1,i))});var c=new e.Box(p(o.x),p(o.y),p(o.width),p(o.height));return b._currentTextGroupBox=c,c})},setTextStyle:function(a,b){l._styleHooks.forEach(function(c){c(a,b)})}}),m=e.createClass({base:h,execute:function(a,b){var c=a.getSelectedNode();c&&(c.setText(b),c.render(),a.layout())},queryState:function(a){return 1==a.getSelectedNodes().length?0:-1},queryValue:function(a){var b=a.getSelectedNode();return b?b.getText():null}});f.extend(l,{_styleHooks:[],registerStyleHook:function(a){l._styleHooks.push(a)}}),e.extendClass(g,{getTextGroup:function(){return this.getRenderer("TextRenderer").getRenderShape()}}),i.register("text",{commands:{text:m},renderers:{center:l}}),d.exports=l}},b[62]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(19),b.r(21),b.r(9)),g=b.r(20),h=(b.r(27),e.createClass("ViewDragger",{constructor:function(a){this._minder=a,this._enabled=!1,this._bind();var b=this;this._minder.getViewDragger=function(){return b},this.setEnabled(!1)},isEnabled:function(){return this._enabled},setEnabled:function(a){var b=this._minder.getPaper();b.setStyle("cursor",a?"pointer":"default"),b.setStyle("cursor",a?"-webkit-grab":"default"),this._enabled=a},timeline:function(){return this._moveTimeline},move:function(a,b){var c=(this._minder,this.getMovement().offset(a));this.moveTo(c,b)},moveTo:function(a,b){if(b){var c=this;return this._moveTimeline&&this._moveTimeline.stop(),this._moveTimeline=this._minder.getRenderContainer().animate(new e.Animator(this.getMovement(),a,function(a,b){c.moveTo(b)}),b,"easeOutCubic").timeline(),this._moveTimeline.on("finish",function(){c._moveTimeline=null}),this}this._minder.getRenderContainer().setTranslate(a.round()),this._minder.fire("viewchange")},getMovement:function(){var a=this._minder.getRenderContainer().transform.translate;return a?a[0]:new e.Point},getView:function(){var a=this._minder,b=a._lastClientSize||{width:a.getRenderTarget().clientWidth,height:a.getRenderTarget().clientHeight},c=this.getMovement(),d=new e.Box(0,0,b.width,b.height);return a.getPaper().getViewPortMatrix().inverse().translate(-c.x,-c.y).transformBox(d)},_bind:function(){function a(a){if(d){d=null,a.stopPropagation(),c&&(b.setEnabled(!1),c=!1,"hand"==b._minder.getStatus()&&b._minder.rollbackStatus());b._minder.getPaper().setStyle("cursor","hand"==b._minder.getStatus()?"-webkit-grab":"default"),b._minder.fire("viewchanged")}}var b=this,c=!1,d=null,f=null;this._minder.on("normal.mousedown normal.touchstart inputready.mousedown inputready.touchstart readonly.mousedown readonly.touchstart",function(a){2==a.originEvent.button&&a.originEvent.preventDefault(),(a.getTargetNode()==this.getRoot()||2==a.originEvent.button||a.originEvent.altKey)&&(d=a.getPosition("view"),c=!0)}).on("normal.mousemove normal.touchmove readonly.mousemove readonly.touchmove inputready.mousemove inputready.touchmove",function(a){if("touchmove"==a.type&&a.preventDefault(),c){if(e.Vector.fromPoints(d,a.getPosition("view")).length()>10){this.setStatus("hand",!0);b._minder.getPaper().setStyle("cursor","-webkit-grabbing")}}}).on("hand.beforemousedown hand.beforetouchstart",function(a){if(b.isEnabled()){d=a.getPosition("view"),a.stopPropagation();b._minder.getPaper().setStyle("cursor","-webkit-grabbing")}}).on("hand.beforemousemove hand.beforetouchmove",function(a){if(d){f=a.getPosition("view");var c=e.Vector.fromPoints(d,f);b.move(c),a.stopPropagation(),a.preventDefault(),a.originEvent.preventDefault(),d=f}}).on("mouseup touchend",a),window.addEventListener("mouseup",a),this._minder.on("contextmenu",function(a){a.preventDefault()})}}));g.register("View",function(){var a=e.createClass("ToggleHandCommand",{base:f,execute:function(a){"hand"!=a.getStatus()?a.setStatus("hand",!0):a.rollbackStatus(),this.setContentChanged(!1)},queryState:function(a){return"hand"==a.getStatus()?1:0},enableReadOnly:!0}),b=e.createClass("CameraCommand",{base:f,execute:function(a,b){b=b||a.getRoot();var c=a.getPaper().getViewPort(),d=b.getRenderContainer().getRenderBox("view"),f=c.center.x-d.x-d.width/2,g=c.center.y-d.y,h=a._viewDragger,i=a.getOption("viewAnimationDuration");h.move(new e.Point(f,g),i),this.setContentChanged(!1)},enableReadOnly:!0}),c=e.createClass("MoveCommand",{base:f,execute:function(a,b){var c=a._viewDragger,d=a._lastClientSize,f=a.getOption("viewAnimationDuration");switch(b){case"up":c.move(new e.Point(0,d.height/2),f);break;case"down":c.move(new e.Point(0,-d.height/2),f);break;case"left":c.move(new e.Point(d.width/2,0),f);break;case"right":c.move(new e.Point(-d.width/2,0),f)}},enableReadOnly:!0});return{init:function(){this._viewDragger=new h(this)},commands:{hand:a,camera:b,move:c},events:{statuschange:function(a){this._viewDragger.setEnabled("hand"==a.currentStatus)},mousewheel:function(a){var b,c;if(a=a.originEvent,!a.ctrlKey&&!a.shiftKey){"wheelDeltaX"in a?(b=a.wheelDeltaX||0,c=a.wheelDeltaY||0):(b=0,c=a.wheelDelta),this._viewDragger.move({x:b/2.5,y:c/2.5});var d=this;clearTimeout(this._mousewheeltimer),this._mousewheeltimer=setTimeout(function(){d.fire("viewchanged")},100),a.preventDefault()}},"normal.dblclick readonly.dblclick":function(a){a.kityEvent.targetShape instanceof e.Paper&&this.execCommand("camera",this.getRoot(),800)},"paperrender finishInitHook":function(){this.getRenderTarget()&&(this.execCommand("camera",null,0),this._lastClientSize={width:this.getRenderTarget().clientWidth,height:this.getRenderTarget().clientHeight})},resize:function(a){var b={width:this.getRenderTarget().clientWidth,height:this.getRenderTarget().clientHeight},c=this._lastClientSize;this._viewDragger.move(new e.Point((b.width-c.width)/2|0,(b.height-c.height)/2|0)),this._lastClientSize=b},"selectionchange layoutallfinish":function(a){var b=this.getSelectedNode(),c=this;if(e.Browser.edge&&this.fire("paperrender"),b){var d=this._viewDragger,f=d.timeline();if(f)return void f.on("finish",function(){c.fire("selectionchange")});var g=d.getView(),h=b.getLayoutBox(),i=50,j=0,k=0;h.right>g.right?j+=g.right-h.right-i:h.leftg.bottom&&(k+=g.bottom-h.bottom-i),h.top=100?"optimize-speed":"geometricPrecision";h.getRenderContainer().setAttr("text-rendering",a)}function b(a){var b=a.shapeNode,c=b.getCTM(),d=new e.Matrix(c.a,c.b,c.c,c.d,.5+(0|c.e),.5+(0|c.f));b.setAttribute("transform","matrix("+d.toString()+")")}function c(b,c){var f=b.getPaper();f.getViewPort();if(c){a();var g=b.getOption("zoomAnimationDuration");if(b.getRoot().getComplex()>200||!g)b._zoomValue=c,b.zoom(c),b.fire("viewchange");else{var h=new e.Animator({beginValue:b._zoomValue,finishValue:c,setter:function(a,b){a.zoom(b)}});b._zoomValue=c,d&&d.pause(),d=h.start(b,g,"easeInOutSine"),d.on("finish",function(){b.fire("viewchange")})}b.fire("zoom",{zoom:c})}}var d,h=this;e.extendClass(f,{zoom:function(a){var c=this.getPaper(),d=c.getViewPort();d.zoom=a/100,d.center={x:d.center.x,y:d.center.y},c.setViewPort(d),100==a&&b(c)},getZoomValue:function(){return this._zoomValue}});var i=e.createClass("Zoom",{base:g,execute:c,queryValue:function(a){return a._zoomValue}}),j=e.createClass("ZoomInCommand",{base:g,execute:function(a){c(a,this.nextValue(a))},queryState:function(a){return+!this.nextValue(a)},nextValue:function(a){var b,c=a.getOption("zoom");for(b=0;ba._zoomValue)return c[b];return 0},enableReadOnly:!0}),k=e.createClass("ZoomOutCommand",{base:g,execute:function(a){c(a,this.nextValue(a))},queryState:function(a){return+!this.nextValue(a)},nextValue:function(a){var b,c=a.getOption("zoom");for(b=c.length-1;b>=0;b--)if(c[b]100&&(clearTimeout(this._wheelZoomTimeout),this._wheelZoomTimeout=setTimeout(function(){c.getPaper()._zoom;b>0?c.execCommand("zoomin"):b<0&&c.execCommand("zoomout")},100),a.originEvent.preventDefault())}}},commandShortcutKeys:{zoomin:"ctrl+=",zoomout:"ctrl+-"}}})}},b[64]={value:function(a,c,d){b.r(12).registerProtocol("json",d.exports={fileDescription:"KityMinder 格式",fileExtension:".km",dataType:"text",mineType:"application/json",encode:function(a){return JSON.stringify(a)},decode:function(a){return JSON.parse(a)}})}},b[65]={value:function(a,c,d){function e(a){return f(a,1).join("\n")}function f(a,b){var c=[];b=b||1;var d=g(b);c.push(d+" "+a.data.text),c.push(o);var e=a.data.note;if(e){var h=/^#/.test(e);h&&(c.push(p),e=e.replace(/^#+/gm,function(a){return d+a})),c.push(e),h&&c.push(q),c.push(o)}return a.children&&a.children.forEach(function(a){c=c.concat(f(a,b+1))}),c}function g(a){for(var b="";a--;)b+="#";return b}function h(a){var b,c,d,e,f,g,h,m={};a=a.replace(/^(.+)\n={3,}/,function(a,b){return"# "+b}),b=a.split(n);for(var o=0;oe+1?f&&j(f,c):(e=d.level,f=i(d.content,m[e-1]),m[e]=f));return l(m[1]),m[1]}function i(a,b){var c={data:{text:a,note:""}};return b&&(b.children?b.children.push(c):b.children=[c]),c}function j(a,b){a.data.note+=b+"\n"}function k(a){var b=/^(#+)?\s*(.*)$/.exec(a);return{level:b[1]&&b[1].length||null,content:b[2],noteStart:a==p,noteClose:a==q,codeBlock:/^\s*```/.test(a)}}function l(a){if(/\S/.test(a.data.note)){for(var b=a.data.note.split("\n");b.length&&!/\S/.test(b[0]);)b.shift();for(;b.length&&!/\S/.test(b[b.length-1]);)b.pop();a.data.note=b.join("\n")}else a.data.note=null,delete a.data.note;a.children&&a.children.forEach(l)}var m=b.r(12),n=/\r\n|\r|\n/,o="",p="\x3c!--Note--\x3e",q="\x3c!--/Note--\x3e";m.registerProtocol("markdown",d.exports={fileDescription:"Markdown/GFM 格式",fileExtension:".md",mineType:"text/markdown",dataType:"text",encode:function(a){return e(a.root)},decode:function(a){return h(a)}})}},b[66]={value:function(a,c,d){function e(a,b){return new k(function(b,c){var d=document.createElement("img");d.onload=function(){b({element:this,x:a.x,y:a.y,width:a.width,height:a.height})},d.onerror=function(a){c(a)},d.crossOrigin="anonymous",d.src=a.url})}function f(a,b){return k(function(b,c){var d=new XMLHttpRequest;d.open("GET",a.url+"?_="+Date.now(),!0),d.responseType="blob",d.onreadystatechange=function(){if(4===d.readyState&&200===d.status){var c=d.response,e=document.createElement("img");e.src=l.createObjectURL(c),e.onload=function(){l.revokeObjectURL(e.src),b({element:e,x:a.x,y:a.y,width:a.width,height:a.height})}}},d.send()})}function g(a){function b(c){var d=c.data;if(d.image){a.renderNode(c);var d=c.data,e=d.image,f=d.imageSize,g=c.getRenderBox("ImageRenderer",a.getRenderContainer()),h={url:e,width:f.width,height:f.height,x:-j.getBoundaryBox().x+g.x,y:-j.getBoundaryBox().y+g.y};o.push(h)}if("collapse"!==d.expandState)for(var i=c.getChildren(),k=0;kt.width?c.width:t.width,v=c&&c.height&&c.height>t.height?c.height:t.height,w=c&&c.width&&c.width>t.width?(c.width-t.width)/2:0,x=c&&c.height&&c.height>t.height?(c.height-t.height)/2:0,y=t.dataUrl,z=t.imagesInfo,A=20;if(o.width=u+2*A,o.height=v+2*A,r){return e({url:r[1]}).then(function(a){return d(p,p.createPattern(a.element,"repeat")),n()})}return d(p,s.toString()),n()}var i=b.r(17),j=b.r(12),k=b.r(25),l=window.URL||window.webkitURL||window;j.registerProtocol("png",d.exports={fileDescription:"PNG 图片",fileExtension:".png",mineType:"image/png",dataType:"base64",encode:h})}},b[67]={value:function(a,c,d){function e(a,b,c){function d(a,b){var c;try{c=b.getScreenCTM().inverse()}catch(a){throw new Error("Can not inverse source element' ctm.")}return c.multiply(a.getScreenCTM())}function e(a,b){b instanceof Function||(b=function(){});for(var c=[],d=[],e=[],f=0,g=a.length;f0?"right":"left":a.parent.getLayout()},getConnect:function(a){return 1==a.getLevel()?"arc":"under"}})}},b[70]={value:function(a,c,d){b.r(31).register("filetree",{getLayout:function(a){return a.getData("layout")?a.getData("layout"):a.isRoot()?"bottom":"filetree-down"},getConnect:function(a){return 1==a.getLevel()?"poly":"l"}})}},b[71]={value:function(a,c,d){b.r(31).register("fish-bone",{getLayout:function(a){if(a.getData("layout"))return a.getData("layout");var b=a.getLevel();return 0===b?"fish-bone-master":1===b?"fish-bone-slave":a.getLayoutPointPreview().y>0?"filetree-up":"filetree-down"},getConnect:function(a){switch(a.getLevel()){case 1:return"fish-bone-master";case 2:return"line";default:return"l"}}})}},b[72]={value:function(a,c,d){b.r(31).register("right",{getLayout:function(a){return a.getData("layout")||"right"},getConnect:function(a){return 1==a.getLevel()?"arc":"bezier"}})}},b[73]={value:function(a,c,d){b.r(31).register("structure",{getLayout:function(a){return a.getData("layout")||"bottom"},getConnect:function(a){return"poly"}})}},b[74]={value:function(a,c,d){b.r(31).register("tianpan",{getLayout:function(a){return a.getData("layout")?a.getData("layout"):0===a.getLevel()?"tianpan":a.parent.getLayout()},getConnect:function(a){return"arc_tp"}})}},b[75]={value:function(a,c,d){var e=b.r(32);["classic","classic-compact"].forEach(function(a){var b="classic-compact"==a;e.register(a,{background:'#3A4144 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=") repeat',"root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":24,"root-padding":b?[10,25]:[15,25],"root-margin":b?[15,25]:[30,100],"root-radius":30,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":16,"main-padding":b?[5,15]:[6,20],"main-margin":b?[5,10]:20,"main-radius":10,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","sub-color":"white","sub-background":"transparent","sub-stroke":"none","sub-font-size":12,"sub-padding":[5,10],"sub-margin":b?[5,10]:[15,20],"sub-tree-margin":30,"sub-radius":5,"sub-space":5,"connect-color":"white","connect-width":2,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","selected-color":"black","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","sub-drop-hint-width":2,"main-drop-hint-width":4,"root-drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})})}},b[76]={value:function(a,c,d){b.r(32).register("fish",{background:'#3A4144 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=") repeat',"root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":24,"root-padding":[35,35],"root-margin":30,"root-radius":100,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":16,"main-padding":[6,20],"main-margin":[20,20],"main-radius":5,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","sub-color":"black","sub-background":"white","sub-stroke":"white","sub-font-size":12,"sub-padding":[5,10],"sub-margin":[10],"sub-radius":5,"sub-space":5,"connect-color":"white","connect-width":3,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})}},b[77]={value:function(a,c,d){function e(a,b,c){return h.Color.createHSL(a,b,c)}function f(a,b){return{background:"#fbfbfb","root-color":"white","root-background":e(a,37,60),"root-stroke":e(a,37,60),"root-font-size":16,"root-padding":b?[6,12]:[12,24],"root-margin":b?10:[30,100],"root-radius":5,"root-space":10,"main-color":"black","main-background":e(a,33,95),"main-stroke":e(a,37,60),"main-stroke-width":1,"main-font-size":14,"main-padding":[6,20],"main-margin":b?8:20,"main-radius":3,"main-space":5,"sub-color":"black","sub-background":"transparent","sub-stroke":"none","sub-font-size":12,"sub-padding":b?[3,5]:[5,10],"sub-margin":b?[4,8]:[15,20],"sub-radius":5,"sub-space":5,"connect-color":e(a,37,60),"connect-width":1,"connect-radius":5,"selected-stroke":e(a,26,30),"selected-stroke-width":"3","blur-selected-stroke":e(a,10,60),"marquee-background":e(a,100,80).set("a",.1),"marquee-stroke":e(a,37,60),"drop-hint-color":e(a,26,35),"drop-hint-width":5,"order-hint-area-color":e(a,100,30).set("a",.5),"order-hint-path-color":e(a,100,25),"order-hint-path-width":1,"text-selection-color":e(a,100,20),"line-height":1.5}}var g,h=b.r(17),i=b.r(32),j={red:0,soil:25,green:122,blue:204,purple:246,pink:334};for(g in j)i.register("fresh-"+g,f(j[g])),i.register("fresh-"+g+"-compat",f(j[g],!0))}},b[78]={value:function(a,c,d){var e=b.r(32);["snow","snow-compact"].forEach(function(a){var b="snow-compact"==a;e.register(a,{background:'#3A4144 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=") repeat',"root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":24,"root-padding":b?[5,10]:[15,25],"root-margin":b?15:30,"root-radius":5,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":16,"main-padding":b?[4,10]:[6,20],"main-margin":b?[5,10]:[20,40],"main-radius":5,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","sub-color":"black","sub-background":"white","sub-stroke":"white","sub-font-size":12,"sub-padding":[5,10],"sub-margin":b?[5,10]:[10,20],"sub-radius":5,"sub-space":5,"connect-color":"white","connect-width":2,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})})}},b[79]={value:function(a,c,d){var e=b.r(32);["tianpan","tianpan-compact"].forEach(function(a){var b="tianpan-compact"==a;e.register(a,{background:'#3A4144 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=") repeat',"root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":25,"root-padding":b?15:20,"root-margin":b?[15,25]:100,"root-radius":30,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","root-shape":"circle","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":15,"main-padding":b?10:12,"main-margin":b?10:12,"main-radius":10,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","main-shape":"circle","sub-color":"#333","sub-background":"#99ca6a","sub-stroke":"#a4c5c0","sub-font-size":13,"sub-padding":5,"sub-margin":b?6:10,"sub-tree-margin":30,"sub-radius":5,"sub-space":5,"sub-shadow":"rgba(0, 0, 0, .25)","sub-shape":"circle","connect-color":"white","connect-width":2,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","selected-color":"black","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","sub-drop-hint-width":2,"main-drop-hint-width":4,"root-drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.4})})}},b[80]={value:function(a,c,d){b.r(32).register("wire",{background:"black",color:"#999",stroke:"none",padding:10,margin:20,"font-size":14,"connect-color":"#999","connect-width":1,"selected-background":"#999","selected-color":"black","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","sub-drop-hint-width":2,"main-drop-hint-width":4,"root-drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})}};var c={"expose-kityminder":34};a("expose-kityminder")}(); \ No newline at end of file +!function(){function a(a){b.r([c[a]])}var b={r:function(a){if(b[a].inited)return b[a].value;if("function"!=typeof b[a].value)return b[a].inited=!0,b[a].value;var c={exports:{}},d=b[a].value(null,c.exports,c);if(b[a].inited=!0,b[a].value=d,void 0!==d)return d;for(var e in c.exports)if(c.exports.hasOwnProperty(e))return b[a].inited=!0,b[a].value=c.exports,c.exports}};b[0]={value:function(a,c,d){var e=b.r(17),f=b.r(11),g=(new e.Marker).pipe(function(){var a=7,b=new e.Circle(a-1);this.addShape(b),this.setRef(a-1,0).setViewBox(-a,-a,a+a,a+a).setWidth(a).setHeight(a),this.dot=b,this.node.setAttribute("markerUnits","userSpaceOnUse")});f.register("arc",function(a,b,c,d,f){var h,i,j,k=a.getLayoutBox(),l=b.getLayoutBox(),m=Math.abs,n=[],o=k.x>l.x?"right":"left";a.getMinder().getPaper().addResource(g),h=new e.Point(l.cx,l.cy),i="left"==o?new e.Point(k.right+2,k.cy):new e.Point(k.left-2,k.cy),j=e.Vector.fromPoints(h,i),n.push("M",h),n.push("A",m(j.x),m(j.y),0,0,j.x*j.y>0?0:1,i),c.setMarker(g),g.dot.fill(f),c.setPathData(n)})}},b[1]={value:function(a,c,d){var e=b.r(17),f=b.r(11),g=(new e.Marker).pipe(function(){var a=7,b=new e.Circle(a-1);this.addShape(b),this.setRef(a-1,0).setViewBox(-a,-a,a+a,a+a).setWidth(a).setHeight(a),this.dot=b,this.node.setAttribute("markerUnits","userSpaceOnUse")});f.register("arc_tp",function(a,b,c,d,f){var h=a.getLayoutBox(),i=b.getLayoutBox(),j=a.getIndex(),k=b.getChildren()[j+1];a.getIndex()>0&&(i=b.getChildren()[j-1].getLayoutBox());var l,m,n=(Math.abs,[]);h.x,i.x;a.getMinder().getPaper().addResource(g),l=new e.Point(i.cx,i.cy),m=new e.Point(h.cx,h.cy);var o=Math.sqrt(Math.pow(l.x-m.x,2)+Math.pow(l.y-m.y,2));if(o=0==a.getIndex()?.4*o:o,e.Vector.fromPoints(l,m),n.push("M",l),n.push("A",o,o,0,0,1,m),c.setMarker(g),g.dot.fill(f),c.setPathData(n),k&&k.getConnection()){var p=k.getConnection(),q=k.getLayoutBox(),r=new e.Point(q.cx,q.cy),s=Math.sqrt(Math.pow(m.x-r.x,2)+Math.pow(m.y-r.y,2));n=[],n.push("M",m),n.push("A",s,s,0,0,1,r),p.setMarker(g),g.dot.fill(f),p.setPathData(n)}})}},b[2]={value:function(a,c,d){b.r(17);b.r(11).register("bezier",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=b.getLayoutVectorOut().normalize(),g=Math.round,h=Math.abs,i=[];if(i.push("M",g(d.x),g(d.y)),h(f.x)>h(f.y)){var j=(e.x+d.x)/2;i.push("C",j,d.y,j,e.y,e.x,e.y)}else{var k=(e.y+d.y)/2;i.push("C",d.x,k,e.x,k,e.x,e.y)}c.setMarker(null),c.setPathData(i)})}},b[3]={value:function(a,c,d){b.r(17);b.r(11).register("fish-bone-master",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=Math.abs,g=f(d.y-e.y),h=f(d.x-e.x),i=[];i.push("M",d.x,d.y),i.push("h",h-g),i.push("L",e.x,e.y),c.setMarker(null),c.setPathData(i)})}},b[4]={value:function(a,c,d){b.r(17);b.r(11).register("l",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=b.getLayoutVectorOut(),g=[],h=Math.round,i=Math.abs;g.push("M",d.round()),i(f.x)>i(f.y)?g.push("H",h(e.x)):g.push("V",e.y),g.push("L",e),c.setPathData(g)})}},b[5]={value:function(a,c,d){b.r(17);b.r(11).register("poly",function(a,b,c,d){var e=b.getLayoutVertexOut(),f=a.getLayoutVertexIn(),g=b.getLayoutVectorOut().normalize(),h=Math.round,i=Math.abs,j=[];switch(j.push("M",h(e.x),h(e.y)),!0){case i(g.x)>i(g.y)&&g.x<0:j.push("h",-b.getStyle("margin-left")),j.push("v",f.y-e.y),j.push("H",f.x);break;case i(g.x)>i(g.y)&&g.x>=0:j.push("h",b.getStyle("margin-right")),j.push("v",f.y-e.y),j.push("H",f.x);break;case i(g.x)<=i(g.y)&&g.y<0:j.push("v",-b.getStyle("margin-top")),j.push("h",f.x-e.x),j.push("V",f.y);break;case i(g.x)<=i(g.y)&&g.y>=0:j.push("v",b.getStyle("margin-bottom")),j.push("h",f.x-e.x),j.push("V",f.y)}c.setMarker(null),c.setPathData(j)})}},b[6]={value:function(a,c,d){var e=b.r(17);b.r(11).register("under",function(a,b,c,d,f){var g,h,i,j,k=a.getLayoutBox(),l=b.getLayoutBox(),m=(Math.abs,[]),n=k.x>l.x?"right":"left",o=(a.getStyle("connect-radius"),k.bottom+3),p="sub"==b.getType()?l.bottom+3:l.cy;"right"==n?(g=new e.Point(l.right,p),h=new e.Point(k.left-10,o),i=new e.Point(k.right,o)):(g=new e.Point(l.left,p),h=new e.Point(k.right+10,o),i=new e.Point(k.left,o)),j=(g.x+h.x)/2,m.push("M",g),m.push("C",j,g.y,j,h.y,h),m.push("L",i),c.setMarker(null),c.setPathData(m)})}},b[7]={value:function(a,c,d){var e=b.r(17),f=b.r(19);if(-1!=location.href.indexOf("boxv")){var g;Object.defineProperty(e.Box.prototype,"visualization",{get:function(){return g?g.setBox(this):null}}),f.registerInitHook(function(){this.on("paperrender",function(){g=new e.Rect,g.fill("rgba(200, 200, 200, .5)"),g.stroke("orange"),this.getRenderContainer().addShape(g)})})}}},b[8]={value:function(a,c,d){var e=b.r(19),f={enableAnimation:!0,layoutAnimationDuration:300,viewAnimationDuration:100,zoomAnimationDuration:300},g={};e.registerInitHook(function(){this.setDefaultOptions(f),this.getOption("enableAnimation")||this.disableAnimation()}),e.prototype.enableAnimation=function(){for(var a in f)f.hasOwnProperty(a)&&this.setOption(g[a])},e.prototype.disableAnimation=function(){for(var a in f)f.hasOwnProperty(a)&&(g[a]=this.getOption(a),this.setOption(a,0))}}},b[9]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(19)),g=(b.r(21),b.r(13)),h=0,i=e.createClass("Command",{constructor:function(){this._isContentChange=!0,this._isSelectionChange=!1},execute:function(a,b){throw new Error("Not Implement: Command.execute()")},setContentChanged:function(a){this._isContentChange=!!a},isContentChanged:function(){return this._isContentChange},setSelectionChanged:function(a){this._isSelectionChange=!!a},isSelectionChanged:function(){return this._isContentChange},queryState:function(a){return h},queryValue:function(a){return 0},isNeedUndo:function(){return!0}});i.STATE_NORMAL=h,i.STATE_ACTIVE=1,i.STATE_DISABLED=-1,e.extendClass(f,{_getCommand:function(a){return this._commands[a.toLowerCase()]},_queryCommand:function(a,b,c){var d=this._getCommand(a);if(d){var e=d["query"+b];if(e)return e.apply(d,[this].concat(c))}return 0},queryCommandState:function(a){return this._queryCommand(a,"State",[].slice.call(arguments,1))},queryCommandValue:function(a){return this._queryCommand(a,"Value",[].slice.call(arguments,1))},execCommand:function(a){if(!a)return null;a=a.toLowerCase();var b,c,d,e,f=[].slice.call(arguments,1),h=this;return b=this._getCommand(a),e={command:b,commandName:a.toLowerCase(),commandArgs:f},!(!b||!~this.queryCommandState(a))&&(this._hasEnterExecCommand?(d=b.execute.apply(b,[h].concat(f)),this._hasEnterExecCommand||this._interactChange()):(this._hasEnterExecCommand=!0,c=this._fire(new g("beforeExecCommand",e,!0)),c||(this._fire(new g("preExecCommand",e,!1)),d=b.execute.apply(b,[h].concat(f)),this._fire(new g("execCommand",e,!1)),b.isContentChanged()&&this._firePharse(new g("contentchange")),this._interactChange()),this._hasEnterExecCommand=!1),void 0===d?null:d)}}),d.exports=i}},b[10]={value:function(a,c,d){function e(a){switch(a.version||(a.root?"1.4.0":"1.1.3")){case"1.1.3":h(a);case"1.2.0":case"1.2.1":g(a);case"1.3.0":case"1.3.1":case"1.3.2":case"1.3.3":case"1.3.4":case"1.3.5":i(a)}return a}function f(a,b){b(a),a.children&&a.children.forEach(function(a){f(a,b)})}function g(a){f(a,function(a){var b=a.data;delete b.layout_bottom_offset,delete b.layout_default_offset,delete b.layout_filetree_offset})}function h(a){var b=a.data.currentstyle;delete a.data.currentstyle,"bottom"==b?(a.template="structure",a.theme="snow"):"default"==b&&(a.template="default",a.theme="classic"),f(a,function(a){var b=a.data;"PriorityIcon"in b&&(b.priority=b.PriorityIcon,delete b.PriorityIcon),"ProgressIcon"in b&&(b.progress=1+(b.ProgressIcon-1<<1),delete b.ProgressIcon),delete b.point,delete b.layout})}function i(a){a.root={data:a.data,children:a.children},delete a.data,delete a.children}b.r(33);return e}},b[11]={value:function(a,c,d){function e(a,b){k[a]=b}var f=b.r(17),g=b.r(33),h=b.r(20),i=b.r(19),j=b.r(21),k={};e("default",function(a,b,c){c.setPathData(["M",b.getLayoutVertexOut(),"L",a.getLayoutVertexIn()])}),f.extendClass(j,{getConnect:function(){return this.data.connect||"default"},getConnectProvider:function(){return k[this.getConnect()]||k.default},getConnection:function(){return this._connection||null}}),f.extendClass(i,{getConnectContainer:function(){return this._connectContainer},createConnect:function(a){if(!a.isRoot()){var b=new f.Path;a._connection=b,this._connectContainer.addShape(b),this.updateConnect(a)}},removeConnect:function(a){var b=this;a.traverse(function(a){b._connectContainer.removeShape(a._connection),a._connection=null})},updateConnect:function(a){var b=a._connection,c=a.parent;if(c&&b){if(c.isCollapsed())return void b.setVisible(!1);b.setVisible(!0);var d=a.getConnectProvider(),e=a.getStyle("connect-color")||"white",f=a.getStyle("connect-width")||2;b.stroke(e,f),d(a,c,b,f,e),f%2==0?b.setTranslate(.5,.5):b.setTranslate(0,0)}}}),h.register("Connect",{init:function(){this._connectContainer=(new f.Group).setId(g.uuid("minder_connect_group")),this.getRenderContainer().prependShape(this._connectContainer)},events:{nodeattach:function(a){this.createConnect(a.node)},nodedetach:function(a){this.removeConnect(a.node)},"layoutapply layoutfinish noderender":function(a){this.updateConnect(a.node)}}}),c.register=e}},b[12]={value:function(a,c,d){function e(a,b){l[a]=b;for(var c in l)l.hasOwnProperty(c)&&(l[c]=l[c],l[c].name=c)}function f(a){return void 0===a?l:l[a]||null}var g=b.r(17),h=(b.r(33),b.r(19)),i=(b.r(21),b.r(13)),j=b.r(10),k=b.r(25),l={};c.registerProtocol=e,c.getRegisterProtocol=f,g.extendClass(h,{setup:function(a){if("string"==typeof a&&(a=document.querySelector(a)),a){var b=a.getAttribute("minder-data-type");if(b in l){var c=a.textContent;a.textContent=null,this.renderTo(a),this.importData(b,c)}return this}},exportJson:function(){function a(b){var c={};c.data=b.getData();var d=b.getChildren();c.children=[];for(var e=0;e200&&(b=0),f(a,a.parent?a.parent.getGlobalLayoutTransform():new g.Matrix),this}}),d.exports=l}},b[19]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=[],h=e.createClass("Minder",{constructor:function(a){this._options=f.extend({},a);for(var b,c=g.slice();c.length;)"function"==typeof(b=c.shift())&&b.call(this,this._options);this.fire("finishInitHook")}});h.version="1.4.43",h.registerInitHook=function(a){g.push(a)},d.exports=h}},b[20]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=b.r(19),h={};c.register=function(a,b){h[a]=b},g.registerInitHook(function(){this._initModules()}),e.extendClass(g,{_initModules:function(){var a=h,b=this._options.modules||f.keys(a);this._commands={},this._query={},this._modules={},this._rendererClasses={};var c,d,e,g,i,j,k,l=this;for(c=0;c=0&&(b=this.children.splice(c,1)[0],b.parent=null,b.root=b)},clearChildren:function(){this.children=[]},getChild:function(a){return this.children[a]},getRenderContainer:function(){return this.rc},getCommonAncestor:function(a){return h.getCommonAncestor(this,a)},contains:function(a){return this==a||this.isAncestorOf(a)},clone:function(){var a=new h;return a.data=f.clone(this.data),this.children.forEach(function(b){a.appendChild(b.clone())}),a},compareTo:function(a){if(!f.comparePlainObject(this.data,a.data))return!1;if(!f.comparePlainObject(this.temp,a.temp))return!1;if(this.children.length!=a.children.length)return!1;for(var b=0;this.children[b];){if(!this.children[b].compareTo(a.children[b]))return!1;b++}return!0},getMinder:function(){return this.getRoot().minder}});h.getCommonAncestor=function(a,b){if(a instanceof Array)return h.getCommonAncestor.apply(this,a);switch(arguments.length){case 1:return a.parent||a;case 2:if(a.isAncestorOf(b))return a;if(b.isAncestorOf(a))return b;for(var c=a.parent;c&&!c.isAncestorOf(b);)c=c.parent;return c;default:return Array.prototype.reduce.call(arguments,function(a,b){return h.getCommonAncestor(a,b)},a)}},e.extendClass(g,{getRoot:function(){return this._root},setRoot:function(a){this._root=a,a.minder=this},getAllNode:function(){var a=[];return this.getRoot().traverse(function(b){a.push(b)}),a},getNodeById:function(a){return this.getNodesById([a])[0]},getNodesById:function(a){var b=this.getAllNode(),c=[];return b.forEach(function(b){-1!=a.indexOf(b.getData("id"))&&c.push(b)}),c},createNode:function(a,b,c){var d=new h(a);return this.fire("nodecreate",{node:d,parent:b,index:c}),this.appendNode(d,b,c),d},appendNode:function(a,b,c){return b&&b.insertChild(a,c),this.attachNode(a),this},removeNode:function(a){a.parent&&(a.parent.removeChild(a),this.detachNode(a),this.fire("noderemove",{node:a}))},attachNode:function(a){var b=this.getRenderContainer();a.traverse(function(a){a.attached=!0,b.addShape(a.getRenderContainer())}),b.addShape(a.getRenderContainer()),this.fire("nodeattach",{node:a})},detachNode:function(a){var b=this.getRenderContainer();a.traverse(function(a){a.attached=!1,b.removeShape(a.getRenderContainer())}),this.fire("nodedetach",{node:a})},getMinderTitle:function(){return this.getRoot().getText()}}),d.exports=h}},b[22]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=b.r(19);g.registerInitHook(function(a){this._defaultOptions={}}),e.extendClass(g,{setDefaultOptions:function(a){return f.extend(this._defaultOptions,a),this},getOption:function(a){return a?a in this._options?this._options[a]:this._defaultOptions[a]:f.extend({},this._defaultOptions,this._options)},setOption:function(a,b){this._options[a]=b}})}},b[23]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=b.r(19);g.registerInitHook(function(){this._initPaper()}),e.extendClass(g,{_initPaper:function(){this._paper=new e.Paper,this._paper._minder=this,this._paper.getNode().ondragstart=function(a){a.preventDefault()},this._paper.shapeNode.setAttribute("transform","translate(0.5, 0.5)"),this._addRenderContainer(),this.setRoot(this.createNode()),this._options.renderTo&&this.renderTo(this._options.renderTo)},_addRenderContainer:function(){this._rc=(new e.Group).setId(f.uuid("minder")),this._paper.addShape(this._rc)},renderTo:function(a){if("string"==typeof a&&(a=document.querySelector(a)),a){if("script"==a.tagName.toLowerCase()){var b=document.createElement("div");b.id=a.id,b.class=a.class,a.parentNode.insertBefore(b,a),a.parentNode.removeChild(a),a=b}a.classList.add("km-view"),this._paper.renderTo(this._renderTarget=a),this._bindEvents(),this.fire("paperrender")}return this},getRenderContainer:function(){return this._rc},getPaper:function(){return this._paper},getRenderTarget:function(){return this._renderTarget}})}},b[24]={value:function(a,c,d){function e(a,b,c,d){return c=a.createNode(b.data,c,d),b.children.forEach(function(b,d){e(a,b,c,d)}),c}function f(a,b){var c=b.path.split("/");c.shift();var d,f=c.shift();if("root"==f){var g=c.indexOf("data");if(g>-1){f="data";var h=c.splice(g+1);b.dataPath=h}else f="node";d=a.getRoot();for(var i,j;i=c.shift();)"children"!=i&&(void 0!==j&&(d=d.getChild(j)),j=+i);b.index=j,b.node=d}switch(b.express=[f,b.op].join(".")){case"theme.replace":a.useTheme(b.value);break;case"template.replace":a.useTemplate(b.value);break;case"node.add":e(a,b.value,b.node,b.index).renderTree(),a.layout();break;case"node.remove":a.removeNode(b.node.getChild(b.index)),a.layout();break;case"data.add":case"data.replace":case"data.remove":var k,l=b.node.data;for(c=b.dataPath.slice();l&&c.length>1;)k=c.shift(),k in l?l=l[k]:"remove"!=b.op&&(l=l[k]={});l&&(k=c.shift(),l[k]=b.value),"expandState"==k?d.renderTree():d.render(),a.layout()}a.fire("patch",{patch:b})}var g=b.r(17),h=b.r(19);g.extendClass(h,{applyPatches:function(a){for(var b=0;b=0;--c)if(a[c].isAncestorOf(b))return!0;return!1}var c,d=this.getSelectedNodes().slice(0),e=[],f=d.indexOf(this.getRoot());for(~f&&!a&&d.splice(f,1),d.sort(function(a,b){return a.getLevel()-b.getLevel()});c=d.pop();)b(d,c)||e.push(c);return e}}),e.extendClass(h,{isSelected:function(){var a=this.getMinder();return a&&-1!=a.getSelectedNodes().indexOf(this)}})}},b[29]={value:function(a,c,d){function e(a){var b=4096,c=8192,d=16384,e=0;return"string"==typeof a?a.toLowerCase().split(/\+\s*/).forEach(function(a){switch(a){case"ctrl":case"cmd":e|=b;break;case"alt":e|=c;break;case"shift":e|=d;break;default:e|=h[a]}}):((a.ctrlKey||a.metaKey)&&(e|=b),a.altKey&&(e|=c),a.shiftKey&&(e|=d),e|=a.keyCode),e}var f=b.r(17),g=b.r(33),h=b.r(15),i=b.r(19),j=b.r(13);f.extendClass(j,{isShortcutKey:function(a){var b=this.originEvent;return!!b&&e(a)==e(b)}}),i.registerInitHook(function(){this._initShortcutKey()}),f.extendClass(i,{_initShortcutKey:function(){this._bindShortcutKeys()},_bindShortcutKeys:function(){var a=this._shortcutKeys={};this.on("keydown",function(b){for(var c in a)if(a.hasOwnProperty(c)&&b.isShortcutKey(c)){var d=a[c];if(d.__statusCondition&&d.__statusCondition!=this.getStatus())return;d(),b.preventDefault()}})},addShortcut:function(a,b){var c=this._shortcutKeys;a.split(/\|\s*/).forEach(function(a){var d,e=a.split("::");e.length>1&&(a=e[1],d=e[0],b.__statusCondition=d),c[a]=b})},addCommandShortcutKeys:function(a,b){var c=this._commandShortcutKeys||(this._commandShortcutKeys={}),d={};b?d[a]=b:d=a;var e=this;g.each(d,function(a,b){c[b]=a,e.addShortcut(a,function(){-1!==e.queryCommandState(b)&&e.execCommand(b)})})},getCommandShortcutKey:function(a){var b=this._commandShortcutKeys;return b&&b[a]||null},supportClipboardEvent:function(a){return!!a.ClipboardEvent}(window)})}},b[30]={value:function(a,c,d){var e=b.r(17),f=b.r(19),g=~window.location.href.indexOf("status"),h=~window.location.href.indexOf("trace");f.registerInitHook(function(){this._initStatus()}),e.extendClass(f,{_initStatus:function(){this._status="normal",this._rollbackStatus="normal"},setStatus:function(a,b){return"readonly"!=this._status||b?(a!=this._status&&(this._rollbackStatus=this._status,this._status=a,this.fire("statuschange",{lastStatus:this._rollbackStatus,currentStatus:this._status}),g&&(console.log(window.event.type,this._rollbackStatus,"->",this._status),h&&console.trace())),this):this},rollbackStatus:function(){this.setStatus(this._rollbackStatus)},getRollbackStatus:function(){return this._rollbackStatus},getStatus:function(){return this._status}})}},b[31]={value:function(a,c,d){function e(a,b){l[a]=b}var f=b.r(17),g=b.r(33),h=b.r(19),i=b.r(9),j=b.r(21),k=b.r(20),l={};c.register=e,g.extend(h,{getTemplateList:function(){return l}}),f.extendClass(h,function(){var a=h.prototype.getTheme;return{useTemplate:function(a,b){this.setTemplate(a),this.refresh(b||800)},getTemplate:function(){return this._template||"default"},setTemplate:function(a){this._template=a||null},getTemplateSupport:function(a){var b=l[this.getTemplate()];return b&&b[a]},getTheme:function(b){return(this.getTemplateSupport("getTheme")||a).call(this,b)}}}()),f.extendClass(j,function(){var a=j.prototype.getLayout,b=j.prototype.getConnect;return{getLayout:function(){return(this.getMinder().getTemplateSupport("getLayout")||a).call(this,this)},getConnect:function(){return(this.getMinder().getTemplateSupport("getConnect")||b).call(this,this)}}}()),k.register("TemplateModule",{commands:{template:f.createClass("TemplateCommand",{base:i,execute:function(a,b){a.useTemplate(b),a.execCommand("camera")},queryValue:function(a){return a.getTemplate()||"default"}})}})}},b[32]={value:function(a,c,d){function e(a,b){m[a]=b}var f=b.r(17),g=b.r(33),h=b.r(19),i=b.r(21),j=b.r(20),k=b.r(9),l={left:function(a){return 3 in a&&a[3]||1 in a&&a[1]||a[0]},right:function(a){return 1 in a&&a[1]||a[0]},top:function(a){return a[0]},bottom:function(a){return 2 in a&&a[2]||a[0]}},m={};c.register=e,g.extend(h,{getThemeList:function(){return m}}),f.extendClass(h,{useTheme:function(a){return this.setTheme(a),this.refresh(800),!0},setTheme:function(a){if(a&&!m[a])throw new Error("Theme "+a+" not exists!");var b=this._theme;this._theme=a||null;var c=this.getRenderTarget();return c&&(c.classList.remove("km-theme-"+b),a&&c.classList.add("km-theme-"+a),c.style.background=this.getStyle("background")),this.fire("themechange",{theme:a}),this},getTheme:function(a){return this._theme||this.getOption("defaultTheme")||"fresh-blue"},getThemeItems:function(a){this.getTheme(a);return m[this.getTheme(a)]},getStyle:function(a,b){var c,d,e,f,h=this.getThemeItems(b);if(a in h)return h[a];if(c=a.split("-"),c.length<2)return null;if(d=c.pop(),(a=c.join("-"))in h){if(e=h[a],g.isArray(e)&&(f=l[d]))return f(e);if(!isNaN(e))return e}return null},getNodeStyle:function(a,b){var c=this.getStyle(a.getType()+"-"+b,a);return null!==c?c:this.getStyle(b,a)}}),f.extendClass(i,{getStyle:function(a){return this.getMinder().getNodeStyle(this,a)}}),j.register("Theme",{defaultOptions:{defaultTheme:"fresh-blue"},commands:{theme:f.createClass("ThemeCommand",{base:k,execute:function(a,b){return a.useTheme(b)},queryValue:function(a){return a.getTheme()||"default"}})}}),h.registerInitHook(function(){this.setTheme()})}},b[33]={value:function(a,c){var d=b.r(17),e={};c.extend=d.Utils.extend.bind(d.Utils),c.each=d.Utils.each.bind(d.Utils),c.uuid=function(a){return e[a]=e[a]?e[a]+1:1,a+e[a]},c.guid=function(){return(1e6*+new Date+Math.floor(1e6*Math.random())).toString(36)},c.trim=function(a){return a.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")},c.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},c.clone=function(a){return JSON.parse(JSON.stringify(a))},c.comparePlainObject=function(a,b){return JSON.stringify(a)==JSON.stringify(b)},c.encodeHtml=function(a,b){return a?a.replace(b||/[&<">'](?:(amp|lt|quot|gt|#39|nbsp);)?/g,function(a,b){return b?a:{"<":"<","&":"&",'"':""",">":">","'":"'"}[a]}):""},c.clearWhiteSpace=function(a){return a.replace(/[\u200b\t\r\n]/g,"")},c.each(["String","Function","Array","Number","RegExp","Object"],function(a){var b=Object.prototype.toString;c["is"+a]=function(c){return b.apply(c)=="[object "+a+"]"}})}},b[34]={value:function(a,c,d){d.exports=window.kityminder=b.r(35)}},b[35]={value:function(a,c,d){var e={version:b.r(19).version};b.r(33),e.Minder=b.r(19),e.Command=b.r(9),e.Node=b.r(21),b.r(22),b.r(8),e.Event=b.r(13),e.data=b.r(12),b.r(10),e.KeyMap=b.r(15),b.r(29),b.r(30),b.r(23),b.r(28),b.r(14),b.r(16),e.Module=b.r(20),b.r(26),e.Render=b.r(27),e.Connect=b.r(11),e.Layout=b.r(18),e.Theme=b.r(32),e.Template=b.r(31),e.Promise=b.r(25),b.r(7),b.r(24),b.r(42),b.r(43),b.r(44),b.r(45),b.r(46),b.r(47),b.r(48),b.r(50),b.r(49),b.r(51),b.r(52),b.r(53),b.r(54),b.r(55),b.r(56),b.r(57),b.r(58),b.r(59),b.r(60),b.r(61),b.r(62),b.r(63),b.r(64),b.r(68),b.r(65),b.r(67),b.r(66),b.r(40),b.r(36),b.r(37),b.r(38),b.r(39),b.r(41),b.r(75),b.r(78),b.r(77),b.r(76),b.r(78),b.r(80),b.r(79),b.r(0),b.r(1),b.r(2),b.r(3),b.r(4),b.r(5),b.r(6),b.r(69),b.r(73),b.r(70),b.r(72),b.r(71),b.r(74),d.exports=e}},b[36]={value:function(a,c,d){function e(a){function b(a){var b=[],d=a.getLayoutBox(),e=5;return"x"==c?(b.push({type:"up",node:a,area:new f.Box({x:d.x,y:d.top-a.getStyle("margin-top")-e,width:d.width,height:a.getStyle("margin-top")}),path:["M",d.x,d.top-e,"L",d.right,d.top-e]}),b.push({type:"down",node:a,area:new f.Box({x:d.x,y:d.bottom+e,width:d.width,height:a.getStyle("margin-bottom")}),path:["M",d.x,d.bottom+e,"L",d.right,d.bottom+e]})):(b.push({type:"up",node:a,area:new f.Box({x:d.left-a.getStyle("margin-left")-e,y:d.top,width:a.getStyle("margin-left"),height:d.height}),path:["M",d.left-e,d.top,"L",d.left-e,d.bottom]}),b.push({type:"down",node:a,area:new f.Box({x:d.right+e,y:d.top,width:a.getStyle("margin-right"),height:d.height}),path:["M",d.right+e,d.top,"L",d.right+e,d.bottom]})),b}var c="left"==a||"right"==a?"x":"y",d="left"==a||"top"==a?-1:1,e={left:"right",right:"left",top:"bottom",bottom:"top",x:"y",y:"x"};g.register(a,f.createClass({base:g,doLayout:function(b,g){var h=b.getContentBox();if("x"==c?(b.setVertexOut(new f.Point(h[a],h.cy)),b.setLayoutVectorOut(new f.Vector(d,0))):(b.setVertexOut(new f.Point(h.cx,h[a])),b.setLayoutVectorOut(new f.Vector(0,d))),!g.length)return!1;g.forEach(function(b){var g=b.getContentBox();b.setLayoutTransform(new f.Matrix),"x"==c?(b.setVertexIn(new f.Point(g[e[a]],g.cy)),b.setLayoutVectorIn(new f.Vector(d,0))):(b.setVertexIn(new f.Point(g.cx,g[e[a]])),b.setLayoutVectorIn(new f.Vector(0,d)))}),this.align(g,e[a]),this.stack(g,e[c]);var i=this.getBranchBox(g),j=0,k=0;"x"==c?(j=h[a],j+=d*b.getStyle("margin-"+a),j+=d*g[0].getStyle("margin-"+e[a]),k=h.bottom,k-=h.height/2,k-=i.height/2,k-=i.y):(j=h.right,j-=h.width/2,j-=i.width/2,j-=i.x,k=h[a],k+=d*b.getStyle("margin-"+a),k+=d*g[0].getStyle("margin-"+e[a])),this.move(g,j,k)},getOrderHint:b}))}var f=b.r(17),g=b.r(18);["left","right","top","bottom"].forEach(e)}},b[37]={value:function(a,c,d){function e(a){var b="filetree-"+(a>0?"down":"up");g.register(b,f.createClass({base:g,doLayout:function(b,c,d){var e=b.getContentBox(),g=20;if(b.setVertexOut(new f.Point(e.left+g,a>0?e.bottom:e.top)),b.setLayoutVectorOut(new f.Vector(0,a)),c.length){c.forEach(function(a){var b=a.getContentBox();a.setLayoutTransform(new f.Matrix),a.setVertexIn(new f.Point(b.left,b.cy)),a.setLayoutVectorIn(new f.Vector(1,0))}),this.align(c,"left"),this.stack(c,"y");var h=0;h+=e.left,h+=g,h+=c[0].getStyle("margin-left");var i=0;a>0?(i+=e.bottom,i+=b.getStyle("margin-bottom"),i+=c[0].getStyle("margin-top")):(i-=this.getTreeBox(c).bottom,i+=e.top,i-=b.getStyle("margin-top"),i-=c[0].getStyle("margin-bottom")),this.move(c,h,i)}},getOrderHint:function(a){var b=[],c=a.getLayoutBox(),d=a.getLevel()>1?3:5;return b.push({type:"up",node:a,area:new f.Box({x:c.x,y:c.top-a.getStyle("margin-top")-d,width:c.width,height:a.getStyle("margin-top")}),path:["M",c.x,c.top-d,"L",c.right,c.top-d]}),b.push({type:"down",node:a,area:new f.Box({x:c.x,y:c.bottom+d,width:c.width,height:a.getStyle("margin-bottom")}),path:["M",c.x,c.bottom+d,"L",c.right,c.bottom+d]}),b}}))}var f=b.r(17),g=b.r(18);[-1,1].forEach(e)}},b[38]={value:function(a,c,d){var e=b.r(17),f=b.r(18);f.register("fish-bone-master",e.createClass("FishBoneMasterLayout",{base:f,doLayout:function(a,b,c){var d=[],f=[],g=b[0],h=a.getContentBox();if(a.setVertexOut(new e.Point(h.right,h.cy)),a.setLayoutVectorOut(new e.Vector(1,0)),g){var i=(g.getContentBox(),a.getStyle("margin-right")),j=g.getStyle("margin-left"),k=g.getStyle("margin-top"),l=g.getStyle("margin-bottom");b.forEach(function(a,b){a.setLayoutTransform(new e.Matrix);var c=a.getContentBox();b%2?(f.push(a),a.setVertexIn(new e.Point(c.left,c.top)),a.setLayoutVectorIn(new e.Vector(1,1))):(d.push(a),a.setVertexIn(new e.Point(c.left,c.bottom)),a.setLayoutVectorIn(new e.Vector(1,-1)))}),this.stack(d,"x"),this.stack(f,"x"),this.align(d,"bottom"),this.align(f,"top");var m=h.right+i+j,n=h.cy-l-a.getStyle("margin-top"),o=h.cy+k+a.getStyle("margin-bottom");this.move(d,m,n),this.move(f,m+j,o)}}}))}},b[39]={value:function(a,c,d){var e=b.r(17),f=b.r(18);f.register("fish-bone-slave",e.createClass("FishBoneSlaveLayout",{base:f,doLayout:function(a,b,c){var d=this,f=Math.abs,g=.382,h=a.getContentBox(),i=a.getLayoutVectorIn();a.setLayoutVectorOut(i);var j=h.left+h.width*g,k=new e.Point(j,i.y>0?h.bottom:h.top);a.setVertexOut(k);var l=b[0];if(l){var m=l.getContentBox();b.forEach(function(a,b){a.setLayoutTransform(new e.Matrix),a.setLayoutVectorIn(new e.Vector(1,0)),a.setVertexIn(new e.Point(m.left,m.cy))}),this.stack(b,"y"),this.align(b,"left");var n=0,o=0;n+=k.x,a.getLayoutVectorOut().y<0?(o-=this.getTreeBox(b).bottom,o+=a.getContentBox().top,o-=a.getStyle("margin-top"),o-=l.getStyle("margin-bottom")):(o+=a.getContentBox().bottom,o+=a.getStyle("margin-bottom"),o+=l.getStyle("margin-top")),this.move(b,n,o),2==c&&b.forEach(function(a){var b=a.getLayoutTransform(),c=a.getContentBox(),g=b.transformPoint(new e.Point(c.left,0));d.move([a],f(g.y-k.y),0)})}}}))}},b[40]={value:function(a,c,d){var e=b.r(17),f=b.r(18),g=b.r(19);f.register("mind",e.createClass({base:f,doLayout:function(a,b){var c=Math.ceil(a.children.length/2),d=[],f=[];b.forEach(function(a){a.getIndex()=c.length))return c.splice(this.getIndex(),1),c.splice(a,0,this),this}}});var k=g.createClass("ArrangeUpCommand",{base:i,execute:function(a){var b=a.getSelectedNodes();b.sort(e);var c=b.map(function(a){return a.getIndex()});b.forEach(function(a,b){a.arrange(c[b]-1)}),a.layout(300)},queryState:function(a){return a.getSelectedNode()?0:-1}}),l=g.createClass("ArrangeUpCommand",{base:i,execute:function(a){var b=a.getSelectedNodes();b.sort(f);var c=b.map(function(a){return a.getIndex()});b.forEach(function(a,b){a.arrange(c[b]+1)}),a.layout(300)},queryState:function(a){return a.getSelectedNode()?0:-1}}),m=g.createClass("ArrangeCommand",{base:i,execute:function(a,b){var c=a.getSelectedNodes().slice();if(c.length){if(h.getCommonAncestor(c)==c[0].parent){var d=c.map(function(a){return{index:a.getIndex(),node:a}}),e=Math.min.apply(Math,d.map(function(a){return a.index}))>=b;d.sort(function(a,b){return e?b.index-a.index:a.index-b.index}),d.forEach(function(a){a.node.arrange(b)}),a.layout(300)}}},queryState:function(a){return a.getSelectedNode()?0:-1}});j.register("ArrangeModule",{commands:{arrangeup:k,arrangedown:l,arrange:m},contextmenu:[{command:"arrangeup"},{command:"arrangedown"},{divider:!0}],commandShortcutKeys:{arrangeup:"normal::alt+Up",arrangedown:"normal::alt+Down"}})}},b[43]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(19),b.r(21),b.r(9)),g=b.r(20),h=b.r(61);g.register("basestylemodule",function(){function a(a,b){return a.getData(b)||a.getStyle(b)}var b=this;return h.registerStyleHook(function(b,c){var d=a(b,"font-weight"),e=a(b,"font-style");[d,e].join("/");c.eachItem(function(a,b){b.setFont({weight:d,style:e})})}),{commands:{bold:e.createClass("boldCommand",{base:f,execute:function(a){var b=a.getSelectedNodes();1==this.queryState("bold")?b.forEach(function(a){a.setData("font-weight").render()}):b.forEach(function(a){a.setData("font-weight","bold").render()}),a.layout()},queryState:function(){var a=b.getSelectedNodes(),c=0;return 0===a.length?-1:(a.forEach(function(a){if(a&&a.getData("font-weight"))return c=1,!1}),c)}}),italic:e.createClass("italicCommand",{base:f,execute:function(a){var b=a.getSelectedNodes();1==this.queryState("italic")?b.forEach(function(a){a.setData("font-style").render()}):b.forEach(function(a){a.setData("font-style","italic").render()}),a.layout()},queryState:function(){var a=b.getSelectedNodes(),c=0;return 0===a.length?-1:(a.forEach(function(a){if(a&&a.getData("font-style"))return c=1,!1}),c)}})},commandShortcutKeys:{bold:"ctrl+b",italic:"ctrl+i"}}})}},b[44]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(21)),g=b.r(9);b.r(20).register("ClipboardModule",function(){function a(b,d){h.push(d),c.appendNode(d,b),d.render(),d.setLayoutOffset(null);var e=d.children.map(function(a){return a.clone()});d.clearChildren();for(var f,g=0;f=e[g];g++)a(d,f)}function b(a){a.length&&(a.sort(function(a,b){return a.getIndex()-b.getIndex()}),d=a.map(function(a){return a.clone()}))}var c=this,d=[],h=[],i=e.createClass("CopyCommand",{base:g,execute:function(a){b(a.getSelectedAncestors(!0)),this.setContentChanged(!1)}}),j=e.createClass("CutCommand",{base:g,execute:function(a){var c=a.getSelectedAncestors();0!==c.length&&(b(c),a.select(f.getCommonAncestor(c),!0),c.slice().forEach(function(b){a.removeNode(b)}),a.layout(300))}}),k=e.createClass("PasteCommand",{base:g,execute:function(b){if(d.length){var c=b.getSelectedNodes();if(!c.length)return;for(var e,f=0;e=d[f];f++)for(var g,i=0;g=c[i];i++)a(g,e.clone());b.select(h,!0),h=[],b.layout(300)}},queryState:function(a){return a.getSelectedNode()?0:-1}});if(c.supportClipboardEvent&&!e.Browser.gecko){var l=function(a){this.fire("beforeCopy",a)},m=function(a){this.fire("beforeCut",a)},n=function(a){this.fire("beforePaste",a)};return{commands:{copy:i,cut:j,paste:k},clipBoardEvents:{copy:l.bind(c),cut:m.bind(c),paste:n.bind(c)},sendToClipboard:b}}return{commands:{copy:i,cut:j,paste:k},commandShortcutKeys:{copy:"normal::ctrl+c|",cut:"normal::ctrl+x",paste:"normal::ctrl+v"},sendToClipboard:b}})}},b[45]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(21)),g=b.r(9),h=b.r(20),i=e.createClass("MoveToParentCommand",{base:g,execute:function(a,b,c){for(var d,e=0;ed&&"up"==a.type&&b--,a.node.setLayoutOffset(null),this._minder.execCommand("arrange",b),this._renderOrderHint(null)}else this._minder.fire("savescene");this._minder.layout(300),this._leaveDragMode(),this._minder.fire("contentchange")}},_enterDragMode:function(){return this._calcDragSources(),this._dragSources.length?(this._fadeDragSources(.5),this._calcDropTargets(),this._calcOrderHints(),this._dragMode=!0,this._minder.setStatus("dragtree"),!0):(this._startPosition=null,!1)},_calcDragSources:function(){this._dragSources=this._minder.getSelectedAncestors()},_fadeDragSources:function(a){var b=this._minder;this._dragSources.forEach(function(c){c.getRenderContainer().setOpacity(a,200),c.traverse(function(c){a<1?b.detachNode(c):b.attachNode(c)},!0)})},_calcDropTargets:function(){function a(b,c){var d,e=[];return e.push(c),c.getChildren().forEach(function(c){for(d=0;d.5*Math.min(d(b),d(c))||(a.width+1>=Math.min(b.width,c.width)||a.height+1>=Math.min(b.height,c.height))))}),this._renderDropHint(this._dropSucceedTarget),!!this._dropSucceedTarget},_orderTest:function(){return this._orderSucceedHint=this._boxTest(this._orderHints,function(a){return a.area}),this._renderOrderHint(this._orderSucceedHint),!!this._orderSucceedHint},_renderDropHint:function(a){this._dropHinter.render(a)},_renderOrderHint:function(a){this._orderHinter.render(a)},preventDragMove:function(){this._startPosition=null}});h.register("DragTree",function(){var a;return{init:function(){a=new l(this),window.addEventListener("mouseup",function(){a.dragEnd()})},events:{"normal.mousedown inputready.mousedown":function(b){b.originEvent.button||b.getTargetNode()&&b.getTargetNode()!=this.getRoot()&&a.dragStart(b.getPosition())},"normal.mousemove dragtree.mousemove":function(b){a.dragMove(b.getPosition())},"normal.mouseup dragtree.beforemouseup":function(b){a.dragEnd(),b.preventDefault()},statuschange:function(b){"textedit"==b.lastStatus&&"normal"==b.currentStatus&&a.preventDragMove()}},commands:{movetoparent:i}}})}},b[46]={value:function(a,c,d){var e=b.r(17),f=b.r(33),g=b.r(15),h=b.r(21),i=b.r(9),j=b.r(20),k=b.r(27);j.register("Expand",function(){var a=this,b="expandState",c="collapse";e.extendClass(h,{expand:function(){return this.setData(b,"expand"),this},collapse:function(){return this.setData(b,c),this},isExpanded:function(){return this.getData(b)!==c&&(this.isRoot()||this.parent.isExpanded())},isCollapsed:function(){return!this.isExpanded()}});var d=e.createClass("ExpandCommand",{base:i,execute:function(a,b){var c=a.getSelectedNode();if(c){for(b&&(c=c.parent);c.parent;)c.expand(),c=c.parent;c.renderTree(),a.layout(100)}},queryState:function(a){var b=a.getSelectedNode();return!b||b.isRoot()||b.isExpanded()?-1:0}}),j=e.createClass("ExpandToLevelCommand",{base:i,execute:function(a,b){a.getRoot().traverse(function(a){a.getLevel()c&&e>f?(a=c,b=a/e):b>d&&(b=d,a=b*e),{width:0|a,height:0|b}}return{defaultOptions:{maxImageWidth:200,maxImageHeight:200},commands:{image:e.createClass("ImageCommand",{base:f,execute:function(c,d,e){var f=c.getSelectedNodes();a(d,function(a,g){f.forEach(function(f){var h=b(a,g,c.getOption("maxImageWidth"),c.getOption("maxImageHeight"));f.setData("image",d),f.setData("imageTitle",d&&e),f.setData("imageSize",d&&h),f.render()}),c.fire("saveScene"),c.layout(300)})},queryState:function(a){var b=a.getSelectedNodes(),c=0;return 0===b.length?-1:(b.forEach(function(a){if(a&&a.getData("image"))return c=0,!1}),c)},queryValue:function(a){var b=a.getSelectedNode();return{url:b.getData("image"),title:b.getData("imageTitle")}}})},renderers:{top:e.createClass("ImageRenderer",{base:h,create:function(a){return new e.Image(a.getData("image"))},shouldRender:function(a){return a.getData("image")},update:function(a,b,c){var d=b.getData("image"),f=b.getData("imageTitle"),g=b.getData("imageSize"),h=b.getStyle("space-top");if(g){f&&a.node.setAttributeNS("http://www.w3.org/1999/xlink","title",f);var i=c.cx-g.width/2,j=c.y-g.height-h;return a.setUrl(d).setX(0|i).setY(0|j).setWidth(0|g.width).setHeight(0|g.height),new e.Box(0|i,0|j,0|g.width,0|g.height)}}})}}})}},b[51]={value:function(a,c,d){var e=(b.r(17),b.r(33),b.r(15),b.r(19),b.r(21),b.r(9),b.r(20));b.r(27);e.register("KeyboardModule",function(){function a(a){var b,d=[];a.traverse(function(a){b=a.getLayoutBox(),b.width&&b.height&&d.push({left:b.x,top:b.y,right:b.x+b.width,bottom:b.y+b.height,width:b.width,height:b.height,node:a})});for(var e=0;ef.right&&(!g.right||ef.bottom&&(!g.down||e>1].getGlobalLayoutTransform()),a.select(e,!0),a.layout(600)},queryState:function(a){var b=a.getSelectedNodes();if(!b.length)return-1;var c=b[0].parent;if(!c)return-1;for(var d=1;d>>c|d<<32-c},b=function(a,b,j,k,l){var m=d+f[c][a]%16,n=d+(f[c][a]>>4);b%=4,j=4+j%4,k=8+k%4,l=12+l%4,h[b]+=h[j]+(i[m]^e[n%16]),g(l,b,16),h[k]+=h[l],g(j,k,12),h[b]+=h[j]+(i[n]^e[m%16]),g(l,b,8),h[k]+=h[l],g(j,k,7)},function(f,g){g instanceof Array&&4===g.length||(g=[0,0,0,0]);var k,l,m,n,o,p,q,r;for(l=a.slice(0),k=e.slice(0,8),c=0;c<4;c+=1)k[c]^=g[c];if(m=16*f.length,o=m%512>446||m%512==0?0:m,m%512==432)f+="老";else{for(f+="耀";f.length%32!=27;)f+="\0";f+=""}for(i=[],r=0;r=0;c--)d=b.charCodeAt(c),e^=(e<<5)+d+(e>>2);return 2147483647&e},getResourceColor:function(a){var c,d=this._getResourceColorIndexMapping();return Object.prototype.hasOwnProperty.call(d,a)||(c=this._getNextResourceColorIndex(),d[a]=c),b[d[a]]||e.Color.createHSL(Math.floor(this.getHashCode(a)/2147483647*359),100,85)},getUsedResource:function(){var a,b=this._getResourceColorIndexMapping(),c=[];for(a in b)Object.prototype.hasOwnProperty.call(b,a)&&c.push(a);return c},_getNextResourceColorIndex:function(){var a,c,d,e=this._getResourceColorIndexMapping();c=[];for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&c.push(e[a]);for(d=0;dv)for(var w=u-v;w--;)s=(new e.Text).setAttr("text-rendering","inherit"),e.Browser.ie||e.Browser.edge?s.setVerticalAlign("top"):s.setAttr("dominant-baseline","text-before-edge"),a.addItem(s);for(q=0,s;t=g[q],s=a.getItem(q);q++)s.setContent(t),(e.Browser.ie||e.Browser.edge)&&s.fixPosition();this.setTextStyle(b,a);var x=b.getText()+["font-size","font-name","font-weight","font-style"].map(c).join("/");return b._currentTextHash==x&&b._currentTextGroupBox?b._currentTextGroupBox:(b._currentTextHash=x,function(){a.eachItem(function(a,b){var c=m+a*i*h;b.setY(c);var d=b.getBoundaryBox();o=o.merge(new e.Box(0,c,d.height&&d.width||1,i))});var c=new e.Box(p(o.x),p(o.y),p(o.width),p(o.height));return b._currentTextGroupBox=c,c})},setTextStyle:function(a,b){l._styleHooks.forEach(function(c){c(a,b)})}}),m=e.createClass({base:h,execute:function(a,b){var c=a.getSelectedNode();c&&(c.setText(b),c.render(),a.layout())},queryState:function(a){return 1==a.getSelectedNodes().length?0:-1},queryValue:function(a){var b=a.getSelectedNode();return b?b.getText():null}});f.extend(l,{_styleHooks:[],registerStyleHook:function(a){l._styleHooks.push(a)}}),e.extendClass(g,{getTextGroup:function(){return this.getRenderer("TextRenderer").getRenderShape()}}),i.register("text",{commands:{text:m},renderers:{center:l}}),d.exports=l}},b[62]={value:function(a,c,d){var e=b.r(17),f=(b.r(33),b.r(19),b.r(21),b.r(9)),g=b.r(20),h=(b.r(27),e.createClass("ViewDragger",{constructor:function(a){this._minder=a,this._enabled=!1,this._bind();var b=this;this._minder.getViewDragger=function(){return b},this.setEnabled(!1)},isEnabled:function(){return this._enabled},setEnabled:function(a){var b=this._minder.getPaper();b.setStyle("cursor",a?"pointer":"default"),b.setStyle("cursor",a?"-webkit-grab":"default"),this._enabled=a},timeline:function(){return this._moveTimeline},move:function(a,b){var c=(this._minder,this.getMovement().offset(a));this.moveTo(c,b)},moveTo:function(a,b){if(b){var c=this;return this._moveTimeline&&this._moveTimeline.stop(),this._moveTimeline=this._minder.getRenderContainer().animate(new e.Animator(this.getMovement(),a,function(a,b){c.moveTo(b)}),b,"easeOutCubic").timeline(),this._moveTimeline.on("finish",function(){c._moveTimeline=null}),this}this._minder.getRenderContainer().setTranslate(a.round()),this._minder.fire("viewchange")},getMovement:function(){var a=this._minder.getRenderContainer().transform.translate;return a?a[0]:new e.Point},getView:function(){var a=this._minder,b=a._lastClientSize||{width:a.getRenderTarget().clientWidth,height:a.getRenderTarget().clientHeight},c=this.getMovement(),d=new e.Box(0,0,b.width,b.height);return a.getPaper().getViewPortMatrix().inverse().translate(-c.x,-c.y).transformBox(d)},_bind:function(){function a(a){if(d){d=null,a.stopPropagation(),c&&(b.setEnabled(!1),c=!1,"hand"==b._minder.getStatus()&&b._minder.rollbackStatus());b._minder.getPaper().setStyle("cursor","hand"==b._minder.getStatus()?"-webkit-grab":"default"),b._minder.fire("viewchanged")}}var b=this,c=!1,d=null,f=null;this._minder.on("normal.mousedown normal.touchstart inputready.mousedown inputready.touchstart readonly.mousedown readonly.touchstart",function(a){2==a.originEvent.button&&a.originEvent.preventDefault(),(a.getTargetNode()==this.getRoot()||2==a.originEvent.button||a.originEvent.altKey)&&(d=a.getPosition("view"),c=!0)}).on("normal.mousemove normal.touchmove readonly.mousemove readonly.touchmove inputready.mousemove inputready.touchmove",function(a){if("touchmove"==a.type&&a.preventDefault(),c){if(e.Vector.fromPoints(d,a.getPosition("view")).length()>10){this.setStatus("hand",!0);b._minder.getPaper().setStyle("cursor","-webkit-grabbing")}}}).on("hand.beforemousedown hand.beforetouchstart",function(a){if(b.isEnabled()){d=a.getPosition("view"),a.stopPropagation();b._minder.getPaper().setStyle("cursor","-webkit-grabbing")}}).on("hand.beforemousemove hand.beforetouchmove",function(a){if(d){f=a.getPosition("view");var c=e.Vector.fromPoints(d,f);b.move(c),a.stopPropagation(),a.preventDefault(),a.originEvent.preventDefault(),d=f}}).on("mouseup touchend",a),window.addEventListener("mouseup",a),this._minder.on("contextmenu",function(a){a.preventDefault()})}}));g.register("View",function(){var a=e.createClass("ToggleHandCommand",{base:f,execute:function(a){"hand"!=a.getStatus()?a.setStatus("hand",!0):a.rollbackStatus(),this.setContentChanged(!1)},queryState:function(a){return"hand"==a.getStatus()?1:0},enableReadOnly:!0}),b=e.createClass("CameraCommand",{base:f,execute:function(a,b){b=b||a.getRoot();var c=a.getPaper().getViewPort(),d=b.getRenderContainer().getRenderBox("view"),f=c.center.x-d.x-d.width/2,g=c.center.y-d.y,h=a._viewDragger,i=a.getOption("viewAnimationDuration");h.move(new e.Point(f,g),i),this.setContentChanged(!1)},enableReadOnly:!0}),c=e.createClass("MoveCommand",{base:f,execute:function(a,b){var c=a._viewDragger,d=a._lastClientSize,f=a.getOption("viewAnimationDuration");switch(b){case"up":c.move(new e.Point(0,d.height/2),f);break;case"down":c.move(new e.Point(0,-d.height/2),f);break;case"left":c.move(new e.Point(d.width/2,0),f);break;case"right":c.move(new e.Point(-d.width/2,0),f)}},enableReadOnly:!0});return{init:function(){this._viewDragger=new h(this)},commands:{hand:a,camera:b,move:c},events:{statuschange:function(a){this._viewDragger.setEnabled("hand"==a.currentStatus)},mousewheel:function(a){var b,c;if(a=a.originEvent,!a.ctrlKey&&!a.shiftKey){"wheelDeltaX"in a?(b=a.wheelDeltaX||0,c=a.wheelDeltaY||0):(b=0,c=a.wheelDelta),this._viewDragger.move({x:b/2.5,y:c/2.5});var d=this;clearTimeout(this._mousewheeltimer),this._mousewheeltimer=setTimeout(function(){d.fire("viewchanged")},100),a.preventDefault()}},"normal.dblclick readonly.dblclick":function(a){a.kityEvent.targetShape instanceof e.Paper&&this.execCommand("camera",this.getRoot(),800)},"paperrender finishInitHook":function(){this.getRenderTarget()&&(this.execCommand("camera",null,0),this._lastClientSize={width:this.getRenderTarget().clientWidth,height:this.getRenderTarget().clientHeight})},resize:function(a){var b={width:this.getRenderTarget().clientWidth,height:this.getRenderTarget().clientHeight},c=this._lastClientSize;this._viewDragger.move(new e.Point((b.width-c.width)/2|0,(b.height-c.height)/2|0)),this._lastClientSize=b},"selectionchange layoutallfinish":function(a){var b=this.getSelectedNode(),c=this;if(e.Browser.edge&&this.fire("paperrender"),b){var d=this._viewDragger,f=d.timeline();if(f)return void f.on("finish",function(){c.fire("selectionchange")});var g=d.getView(),h=b.getLayoutBox(),i=50,j=0,k=0;h.right>g.right?j+=g.right-h.right-i:h.leftg.bottom&&(k+=g.bottom-h.bottom-i),h.top=100?"optimize-speed":"geometricPrecision";h.getRenderContainer().setAttr("text-rendering",a)}function b(a){var b=a.shapeNode,c=b.getCTM(),d=new e.Matrix(c.a,c.b,c.c,c.d,.5+(0|c.e),.5+(0|c.f));b.setAttribute("transform","matrix("+d.toString()+")")}function c(b,c){var f=b.getPaper();f.getViewPort();if(c){a();var g=b.getOption("zoomAnimationDuration");if(b.getRoot().getComplex()>200||!g)b._zoomValue=c,b.zoom(c),b.fire("viewchange");else{var h=new e.Animator({beginValue:b._zoomValue,finishValue:c,setter:function(a,b){a.zoom(b)}});b._zoomValue=c,d&&d.pause(),d=h.start(b,g,"easeInOutSine"),d.on("finish",function(){b.fire("viewchange")})}b.fire("zoom",{zoom:c})}}var d,h=this;e.extendClass(f,{zoom:function(a){var c=this.getPaper(),d=c.getViewPort();d.zoom=a/100,d.center={x:d.center.x,y:d.center.y},c.setViewPort(d),100==a&&b(c)},getZoomValue:function(){return this._zoomValue}});var i=e.createClass("Zoom",{base:g,execute:c,queryValue:function(a){return a._zoomValue}}),j=e.createClass("ZoomInCommand",{base:g,execute:function(a){c(a,this.nextValue(a))},queryState:function(a){return+!this.nextValue(a)},nextValue:function(a){var b,c=a.getOption("zoom");for(b=0;ba._zoomValue)return c[b];return 0},enableReadOnly:!0}),k=e.createClass("ZoomOutCommand",{base:g,execute:function(a){c(a,this.nextValue(a))},queryState:function(a){return+!this.nextValue(a)},nextValue:function(a){var b,c=a.getOption("zoom");for(b=c.length-1;b>=0;b--)if(c[b]100&&(clearTimeout(this._wheelZoomTimeout),this._wheelZoomTimeout=setTimeout(function(){c.getPaper()._zoom;b>0?c.execCommand("zoomin"):b<0&&c.execCommand("zoomout")},100),a.originEvent.preventDefault())}}},commandShortcutKeys:{zoomin:"ctrl+=",zoomout:"ctrl+-"}}})}},b[64]={value:function(a,c,d){b.r(12).registerProtocol("json",d.exports={fileDescription:"KityMinder 格式",fileExtension:".km",dataType:"text",mineType:"application/json",encode:function(a){return JSON.stringify(a)},decode:function(a){return JSON.parse(a)}})}},b[65]={value:function(a,c,d){function e(a){return f(a,1).join("\n")}function f(a,b){var c=[];b=b||1;var d=g(b);c.push(d+" "+a.data.text),c.push(o);var e=a.data.note;if(e){var h=/^#/.test(e);h&&(c.push(p),e=e.replace(/^#+/gm,function(a){return d+a})),c.push(e),h&&c.push(q),c.push(o)}return a.children&&a.children.forEach(function(a){c=c.concat(f(a,b+1))}),c}function g(a){for(var b="";a--;)b+="#";return b}function h(a){var b,c,d,e,f,g,h,m={};a=a.replace(/^(.+)\n={3,}/,function(a,b){return"# "+b}),b=a.split(n);for(var o=0;oe+1?f&&j(f,c):(e=d.level,f=i(d.content,m[e-1]),m[e]=f));return l(m[1]),m[1]}function i(a,b){var c={data:{text:a,note:""}};return b&&(b.children?b.children.push(c):b.children=[c]),c}function j(a,b){a.data.note+=b+"\n"}function k(a){var b=/^(#+)?\s*(.*)$/.exec(a);return{level:b[1]&&b[1].length||null,content:b[2],noteStart:a==p,noteClose:a==q,codeBlock:/^\s*```/.test(a)}}function l(a){if(/\S/.test(a.data.note)){for(var b=a.data.note.split("\n");b.length&&!/\S/.test(b[0]);)b.shift();for(;b.length&&!/\S/.test(b[b.length-1]);)b.pop();a.data.note=b.join("\n")}else a.data.note=null,delete a.data.note;a.children&&a.children.forEach(l)}var m=b.r(12),n=/\r\n|\r|\n/,o="",p="\x3c!--Note--\x3e",q="\x3c!--/Note--\x3e";m.registerProtocol("markdown",d.exports={fileDescription:"Markdown/GFM 格式",fileExtension:".md",mineType:"text/markdown",dataType:"text",encode:function(a){return e(a.root)},decode:function(a){return h(a)}})}},b[66]={value:function(a,c,d){function e(a,b){return new k(function(b,c){var d=document.createElement("img");d.onload=function(){b({element:this,x:a.x,y:a.y,width:a.width,height:a.height})},d.onerror=function(a){c(a)},d.crossOrigin="anonymous",d.src=a.url})}function f(a,b){return k(function(b,c){if(0===a.url.indexOf("data:")){var d=document.createElement("img");d.src=a.url,d.onload=function(){l.revokeObjectURL(d.src),b({element:d,x:a.x,y:a.y,width:a.width,height:a.height})}}else{var e=new XMLHttpRequest;e.open("GET",a.url+"?_="+Date.now(),!0),e.responseType="blob",e.onreadystatechange=function(){if(4===e.readyState&&200===e.status){var c=e.response,d=document.createElement("img");d.src=l.createObjectURL(c),d.onload=function(){l.revokeObjectURL(d.src),b({element:d,x:a.x,y:a.y,width:a.width,height:a.height})}}},e.send()}})}function g(a){function b(c){var d=c.data;if(d.image){a.renderNode(c);var d=c.data,e=d.image,f=d.imageSize,g=c.getRenderBox("ImageRenderer",a.getRenderContainer()),h={url:e,width:f.width,height:f.height,x:-j.getBoundaryBox().x+g.x,y:-j.getBoundaryBox().y+g.y};o.push(h)}if("collapse"!==d.expandState)for(var i=c.getChildren(),k=0;kt.width?c.width:t.width,v=c&&c.height&&c.height>t.height?c.height:t.height,w=c&&c.width&&c.width>t.width?(c.width-t.width)/2:0,x=c&&c.height&&c.height>t.height?(c.height-t.height)/2:0,y=t.dataUrl,z=t.imagesInfo,A=20;if(o.width=u+2*A,o.height=v+2*A,r){return e({url:r[1]}).then(function(a){return d(p,p.createPattern(a.element,"repeat")),n()})}return d(p,s.toString()),n()}var i=b.r(17),j=b.r(12),k=b.r(25),l=window.URL||window.webkitURL||window;j.registerProtocol("png",d.exports={fileDescription:"PNG 图片",fileExtension:".png",mineType:"image/png",dataType:"base64",encode:h})}},b[67]={value:function(a,c,d){function e(a,b,c){function d(a,b){var c;try{c=b.getScreenCTM().inverse()}catch(a){throw new Error("Can not inverse source element' ctm.")}return c.multiply(a.getScreenCTM())}function e(a,b){b instanceof Function||(b=function(){});for(var c=[],d=[],e=[],f=0,g=a.length;f0?"right":"left":a.parent.getLayout()},getConnect:function(a){return 1==a.getLevel()?"arc":"under"}})}},b[70]={value:function(a,c,d){b.r(31).register("filetree",{getLayout:function(a){return a.getData("layout")?a.getData("layout"):a.isRoot()?"bottom":"filetree-down"},getConnect:function(a){return 1==a.getLevel()?"poly":"l"}})}},b[71]={value:function(a,c,d){b.r(31).register("fish-bone",{getLayout:function(a){if(a.getData("layout"))return a.getData("layout");var b=a.getLevel();return 0===b?"fish-bone-master":1===b?"fish-bone-slave":a.getLayoutPointPreview().y>0?"filetree-up":"filetree-down"},getConnect:function(a){switch(a.getLevel()){case 1:return"fish-bone-master";case 2:return"line";default:return"l"}}})}},b[72]={value:function(a,c,d){b.r(31).register("right",{getLayout:function(a){return a.getData("layout")||"right"},getConnect:function(a){return 1==a.getLevel()?"arc":"bezier"}})}},b[73]={value:function(a,c,d){b.r(31).register("structure",{getLayout:function(a){return a.getData("layout")||"bottom"},getConnect:function(a){return"poly"}})}},b[74]={value:function(a,c,d){b.r(31).register("tianpan",{getLayout:function(a){return a.getData("layout")?a.getData("layout"):0===a.getLevel()?"tianpan":a.parent.getLayout()},getConnect:function(a){return"arc_tp"}})}},b[75]={value:function(a,c,d){var e=b.r(32);["classic","classic-compact"].forEach(function(a){var b="classic-compact"==a;e.register(a,{background:'#3A4144 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=") repeat',"root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":24,"root-padding":b?[10,25]:[15,25],"root-margin":b?[15,25]:[30,100],"root-radius":30,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":16,"main-padding":b?[5,15]:[6,20],"main-margin":b?[5,10]:20,"main-radius":10,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","sub-color":"white","sub-background":"transparent","sub-stroke":"none","sub-font-size":12,"sub-padding":[5,10],"sub-margin":b?[5,10]:[15,20],"sub-tree-margin":30,"sub-radius":5,"sub-space":5,"connect-color":"white","connect-width":2,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","selected-color":"black","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","sub-drop-hint-width":2,"main-drop-hint-width":4,"root-drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})})}},b[76]={value:function(a,c,d){b.r(32).register("fish",{background:'#3A4144 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=") repeat',"root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":24,"root-padding":[35,35],"root-margin":30,"root-radius":100,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":16,"main-padding":[6,20],"main-margin":[20,20],"main-radius":5,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","sub-color":"black","sub-background":"white","sub-stroke":"white","sub-font-size":12,"sub-padding":[5,10],"sub-margin":[10],"sub-radius":5,"sub-space":5,"connect-color":"white","connect-width":3,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})}},b[77]={value:function(a,c,d){function e(a,b,c){return h.Color.createHSL(a,b,c)}function f(a,b){return{background:"#fbfbfb","root-color":"white","root-background":e(a,37,60),"root-stroke":e(a,37,60),"root-font-size":16,"root-padding":b?[6,12]:[12,24],"root-margin":b?10:[30,100],"root-radius":5,"root-space":10,"main-color":"black","main-background":e(a,33,95),"main-stroke":e(a,37,60),"main-stroke-width":1,"main-font-size":14,"main-padding":[6,20],"main-margin":b?8:20,"main-radius":3,"main-space":5,"sub-color":"black","sub-background":"transparent","sub-stroke":"none","sub-font-size":12,"sub-padding":b?[3,5]:[5,10],"sub-margin":b?[4,8]:[15,20],"sub-radius":5,"sub-space":5,"connect-color":e(a,37,60),"connect-width":1,"connect-radius":5,"selected-stroke":e(a,26,30),"selected-stroke-width":"3","blur-selected-stroke":e(a,10,60),"marquee-background":e(a,100,80).set("a",.1),"marquee-stroke":e(a,37,60),"drop-hint-color":e(a,26,35),"drop-hint-width":5,"order-hint-area-color":e(a,100,30).set("a",.5),"order-hint-path-color":e(a,100,25),"order-hint-path-width":1,"text-selection-color":e(a,100,20),"line-height":1.5}}var g,h=b.r(17),i=b.r(32),j={red:0,soil:25,green:122,blue:204,purple:246,pink:334};for(g in j)i.register("fresh-"+g,f(j[g])),i.register("fresh-"+g+"-compat",f(j[g],!0))}},b[78]={value:function(a,c,d){var e=b.r(32);["snow","snow-compact"].forEach(function(a){var b="snow-compact"==a;e.register(a,{background:'#3A4144 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=") repeat',"root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":24,"root-padding":b?[5,10]:[15,25],"root-margin":b?15:30,"root-radius":5,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":16,"main-padding":b?[4,10]:[6,20],"main-margin":b?[5,10]:[20,40],"main-radius":5,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","sub-color":"black","sub-background":"white","sub-stroke":"white","sub-font-size":12,"sub-padding":[5,10],"sub-margin":b?[5,10]:[10,20],"sub-radius":5,"sub-space":5,"connect-color":"white","connect-width":2,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})})}},b[79]={value:function(a,c,d){var e=b.r(32);["tianpan","tianpan-compact"].forEach(function(a){var b="tianpan-compact"==a;e.register(a,{background:'#3A4144 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=") repeat',"root-color":"#430","root-background":"#e9df98","root-stroke":"#e9df98","root-font-size":25,"root-padding":b?15:20,"root-margin":b?[15,25]:100,"root-radius":30,"root-space":10,"root-shadow":"rgba(0, 0, 0, .25)","root-shape":"circle","main-color":"#333","main-background":"#a4c5c0","main-stroke":"#a4c5c0","main-font-size":15,"main-padding":b?10:12,"main-margin":b?10:12,"main-radius":10,"main-space":5,"main-shadow":"rgba(0, 0, 0, .25)","main-shape":"circle","sub-color":"#333","sub-background":"#99ca6a","sub-stroke":"#a4c5c0","sub-font-size":13,"sub-padding":5,"sub-margin":b?6:10,"sub-tree-margin":30,"sub-radius":5,"sub-space":5,"sub-shadow":"rgba(0, 0, 0, .25)","sub-shape":"circle","connect-color":"white","connect-width":2,"main-connect-width":3,"connect-radius":5,"selected-background":"rgb(254, 219, 0)","selected-stroke":"rgb(254, 219, 0)","selected-color":"black","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","sub-drop-hint-width":2,"main-drop-hint-width":4,"root-drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.4})})}},b[80]={value:function(a,c,d){b.r(32).register("wire",{background:"black",color:"#999",stroke:"none",padding:10,margin:20,"font-size":14,"connect-color":"#999","connect-width":1,"selected-background":"#999","selected-color":"black","marquee-background":"rgba(255,255,255,.3)","marquee-stroke":"white","drop-hint-color":"yellow","sub-drop-hint-width":2,"main-drop-hint-width":4,"root-drop-hint-width":4,"order-hint-area-color":"rgba(0, 255, 0, .5)","order-hint-path-color":"#0f0","order-hint-path-width":1,"text-selection-color":"rgb(27,171,255)","line-height":1.5})}};var c={"expose-kityminder":34};a("expose-kityminder")}(); \ No newline at end of file diff --git a/src/protocol/png.js b/src/protocol/png.js index 22096c8d..1942e615 100644 --- a/src/protocol/png.js +++ b/src/protocol/png.js @@ -33,31 +33,46 @@ define(function(require, exports, module) { */ function xhrLoadImage(info, callback) { return Promise(function (resolve, reject) { - var xmlHttp = new XMLHttpRequest(); - - xmlHttp.open('GET', info.url + '?_=' + Date.now(), true); - xmlHttp.responseType = 'blob'; - xmlHttp.onreadystatechange = function () { - if (xmlHttp.readyState === 4 && xmlHttp.status === 200) { - var blob = xmlHttp.response; - - var image = document.createElement('img'); - - image.src = DomURL.createObjectURL(blob); - image.onload = function () { - DomURL.revokeObjectURL(image.src); - resolve({ - element: image, - x: info.x, - y: info.y, - width: info.width, - height: info.height - }); - }; - } - }; + if (info.url.indexOf('data:') === 0) { + var image = document.createElement('img'); + image.src = info.url; + image.onload = function () { + DomURL.revokeObjectURL(image.src); + resolve({ + element: image, + x: info.x, + y: info.y, + width: info.width, + height: info.height + }); + }; + } else { + var xmlHttp = new XMLHttpRequest(); + + xmlHttp.open('GET', info.url + '?_=' + Date.now(), true); + xmlHttp.responseType = 'blob'; + xmlHttp.onreadystatechange = function () { + if (xmlHttp.readyState === 4 && xmlHttp.status === 200) { + var blob = xmlHttp.response; + + var image = document.createElement('img'); + + image.src = DomURL.createObjectURL(blob); + image.onload = function () { + DomURL.revokeObjectURL(image.src); + resolve({ + element: image, + x: info.x, + y: info.y, + width: info.width, + height: info.height + }); + }; + } + }; - xmlHttp.send(); + xmlHttp.send(); + } }); }