123 |
- (function(){var _p={r:function(t){if(_p[t].inited){return _p[t].value}if(typeof _p[t].value==="function"){var e={exports:{}},n=_p[t].value(null,e.exports,e);_p[t].inited=true;_p[t].value=n;if(n!==undefined){return n}else{for(var r in e.exports){if(e.exports.hasOwnProperty(r)){_p[t].inited=true;_p[t].value=e.exports;return e.exports}}}}else{_p[t].inited=true;return _p[t].value}}};_p[0]={value:function(t){function e(t){var e=parseFloat(t,10);if(/ms/.test(t)){return e}if(/s/.test(t)){return e*1e3}if(/min/.test(t)){return e*60*1e3}return e}var n=_p.r(8);var r=_p.r(1);var i=_p.r(11).createClass("Animator",{constructor:function(t,e,n){if(arguments.length==1){var r=arguments[0];this.beginValue=r.beginValue;this.finishValue=r.finishValue;this.setter=r.setter}else{this.beginValue=t;this.finishValue=e;this.setter=n}},start:function(t,n,r,i,s){if(arguments.length===2&&typeof n=="object"){r=n.easing;i=n.delay;s=n.callback;n=n.duration}if(arguments.length===4&&typeof i=="function"){s=i;i=0}var a=this.create(t,n,r,s);i=e(i);if(i>0){setTimeout(function(){a.play()},i)}else{a.play()}return a},create:function(t,s,a,o){var u;s=s&&e(s)||i.DEFAULT_DURATION;a=a||i.DEFAULT_EASING;if(typeof a=="string"){a=r[a]}u=new n(this,t,s,a);if(typeof o=="function"){u.on("finish",o)}return u},reverse:function(){return new i(this.finishValue,this.beginValue,this.setter)}});i.DEFAULT_DURATION=300;i.DEFAULT_EASING="linear";var s=_p.r(60);_p.r(11).extendClass(s,{animate:function(t,e,n,r,i){var s=this._KityAnimateQueue=this._KityAnimateQueue||[];var a=t.create(this,e,n,i);function o(){s.shift();if(s.length){setTimeout(s[0].t.play.bind(s[0].t),s[0].d)}}a.on("finish",o);s.push({t:a,d:r});if(s.length==1){setTimeout(a.play.bind(a),r)}return this},timeline:function(){return this._KityAnimateQueue[0].t},stop:function(){var t=this._KityAnimateQueue;if(t){while(t.length){t.shift().t.stop()}}return this}});return i}};_p[1]={value:function(t,e,n){var r={linear:function(t,e,n,r){return n*(t/r)+e},swing:function(t,e,n,i){return r.easeOutQuad(t,e,n,i)},ease:function(t,e,n,i){return r.easeInOutCubic(t,e,n,i)},easeInQuad:function(t,e,n,r){return n*(t/=r)*t+e},easeOutQuad:function(t,e,n,r){return-n*(t/=r)*(t-2)+e},easeInOutQuad:function(t,e,n,r){if((t/=r/2)<1)return n/2*t*t+e;return-n/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,n,r){return n*(t/=r)*t*t+e},easeOutCubic:function(t,e,n,r){return n*((t=t/r-1)*t*t+1)+e},easeInOutCubic:function(t,e,n,r){if((t/=r/2)<1)return n/2*t*t*t+e;return n/2*((t-=2)*t*t+2)+e},easeInQuart:function(t,e,n,r){return n*(t/=r)*t*t*t+e},easeOutQuart:function(t,e,n,r){return-n*((t=t/r-1)*t*t*t-1)+e},easeInOutQuart:function(t,e,n,r){if((t/=r/2)<1)return n/2*t*t*t*t+e;return-n/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(t,e,n,r){return n*(t/=r)*t*t*t*t+e},easeOutQuint:function(t,e,n,r){return n*((t=t/r-1)*t*t*t*t+1)+e},easeInOutQuint:function(t,e,n,r){if((t/=r/2)<1)return n/2*t*t*t*t*t+e;return n/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(t,e,n,r){return-n*Math.cos(t/r*(Math.PI/2))+n+e},easeOutSine:function(t,e,n,r){return n*Math.sin(t/r*(Math.PI/2))+e},easeInOutSine:function(t,e,n,r){return-n/2*(Math.cos(Math.PI*t/r)-1)+e},easeInExpo:function(t,e,n,r){return t===0?e:n*Math.pow(2,10*(t/r-1))+e},easeOutExpo:function(t,e,n,r){return t==r?e+n:n*(-Math.pow(2,-10*t/r)+1)+e},easeInOutExpo:function(t,e,n,r){if(t===0)return e;if(t==r)return e+n;if((t/=r/2)<1)return n/2*Math.pow(2,10*(t-1))+e;return n/2*(-Math.pow(2,-10*--t)+2)+e},easeInCirc:function(t,e,n,r){return-n*(Math.sqrt(1-(t/=r)*t)-1)+e},easeOutCirc:function(t,e,n,r){return n*Math.sqrt(1-(t=t/r-1)*t)+e},easeInOutCirc:function(t,e,n,r){if((t/=r/2)<1)return-n/2*(Math.sqrt(1-t*t)-1)+e;return n/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(t,e,n,r){var i=1.70158;var s=0;var a=n;if(t===0)return e;if((t/=r)==1)return e+n;if(!s)s=r*.3;if(a<Math.abs(n)){a=n;i=s/4}else i=s/(2*Math.PI)*Math.asin(n/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*r-i)*(2*Math.PI)/s))+e},easeOutElastic:function(t,e,n,r){var i=1.70158;var s=0;var a=n;if(t===0)return e;if((t/=r)==1)return e+n;if(!s)s=r*.3;if(a<Math.abs(n)){a=n;i=s/4}else i=s/(2*Math.PI)*Math.asin(n/a);return a*Math.pow(2,-10*t)*Math.sin((t*r-i)*(2*Math.PI)/s)+n+e},easeInOutElastic:function(t,e,n,r){var i=1.70158;var s=0;var a=n;if(t===0)return e;if((t/=r/2)==2)return e+n;if(!s)s=r*(.3*1.5);if(a<Math.abs(n)){a=n;var i=s/4}else var i=s/(2*Math.PI)*Math.asin(n/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*r-i)*(2*Math.PI)/s))+e;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*r-i)*(2*Math.PI)/s)*.5+n+e},easeInBack:function(t,e,n,r,i){if(i==undefined)i=1.70158;return n*(t/=r)*t*((i+1)*t-i)+e},easeOutBack:function(t,e,n,r,i){if(i==undefined)i=1.70158;return n*((t=t/r-1)*t*((i+1)*t+i)+1)+e},easeInOutBack:function(t,e,n,r,i){if(i==undefined)i=1.70158;if((t/=r/2)<1)return n/2*(t*t*(((i*=1.525)+1)*t-i))+e;return n/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)+e},easeInBounce:function(t,e,n,i){return n-r.easeOutBounce(i-t,0,n,i)+e},easeOutBounce:function(t,e,n,r){if((t/=r)<1/2.75){return n*(7.5625*t*t)+e}else if(t<2/2.75){return n*(7.5625*(t-=1.5/2.75)*t+.75)+e}else if(t<2.5/2.75){return n*(7.5625*(t-=2.25/2.75)*t+.9375)+e}else{return n*(7.5625*(t-=2.625/2.75)*t+.984375)+e}},easeInOutBounce:function(t,e,n,i){if(t<i/2)return r.easeInBounce(t*2,0,n,i)*.5+e;return r.easeOutBounce(t*2-i,0,n,i)*.5+n*.5+e}};return r}};_p[2]={value:function(t,e){var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,1e3/60)};var r=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||window.clearTimeout;var i;var s=[];function a(t){if(s.push(t)===1){i=n(o)}}function o(){var t=s;s=[];while(t.length){c(t.pop())}i=0}function u(t){var e=f(t);a(e);return e}function h(t){var e=s.indexOf(t);if(~e){s.splice(e,1)}if(s.length===0){r(i)}}function f(t){var e={index:0,time:+new Date,elapsed:0,action:t,next:function(){a(e)}};return e}function c(t){var e=+new Date;var n=e-t.time;if(n>200){n=1e3/60}t.dur=n;t.elapsed+=n;t.time=e;t.action.call(null,t);t.index++}e.requestFrame=u;e.releaseFrame=h}};_p[3]={value:function(t){var e=_p.r(0);var n=_p.r(34);var r=_p.r(46);var i=_p.r(60);var s=_p.r(11).createClass("MotionAnimator",{base:e,constructor:function(t,e){var i=this;this.callBase({beginValue:0,finishValue:1,setter:function(t,e){var s=i.motionPath instanceof r?i.motionPath.getPathData():i.motionPath;var a=n.pointAtPath(s,e);t.setTranslate(a.x,a.y);if(this.doRotate)t.setRotate(a.tan.getAngle())}});this.doRotate=e;this.motionPath=t}});_p.r(11).extendClass(i,{motion:function(t,e,n,r,i){return this.animate(new s(t),e,n,r,i)}});return s}};_p[4]={value:function(t){var e=_p.r(0);var n=_p.r(11).createClass("OpacityAnimator",{base:e,constructor:function(t){this.callBase({beginValue:function(t){return t.getOpacity()},finishValue:t,setter:function(t,e){t.setOpacity(e)}})}});var r=_p.r(60);_p.r(11).extendClass(r,{fxOpacity:function(t,e,r,i,s){return this.animate(new n(t),e,r,i,s)},fadeTo:function(){return this.fxOpacity.apply(this,arguments)},fadeIn:function(){return this.fxOpacity.apply(this,[1].concat([].slice.call(arguments)))},fadeOut:function(){return this.fxOpacity.apply(this,[0].concat([].slice.call(arguments)))}});return n}};_p[5]={value:function(t){var e=_p.r(0);var n=_p.r(34);var r=_p.r(11).createClass("OpacityAnimator",{base:e,constructor:function(t){this.callBase({beginValue:function(t){this.beginPath=t.getPathData();return 0},finishValue:1,setter:function(e,r){e.setPathData(n.pathTween(this.beginPath,t,r))}})}});var i=_p.r(46);_p.r(11).extendClass(i,{fxPath:function(t,e,n,i,s){return this.animate(new r(t),e,n,i,s)}});return r}};_p[6]={value:function(t){var e=_p.r(0);var n=_p.r(11).createClass("RotateAnimator",{base:e,constructor:function(t){this.callBase({beginValue:0,finishValue:t,setter:function(t,e,n){var r=n.getDelta();t.rotate(r,ax,ay)}})}});var r=_p.r(60);_p.r(11).extendClass(r,{fxRotate:function(t,e,r,i,s){return this.animate(new n(t),e,r,i,s)}});return n}};_p[7]={value:function(t){var e=_p.r(0);var n=_p.r(11).createClass("ScaleAnimator",{base:e,constructor:function(t,e){this.callBase({beginValue:0,finishValue:1,setter:function(n,r,i){var s=i.getDelta();var a=Math.pow(t,s);var o=Math.pow(e,s);n.scale(o,a)}})}});var r=_p.r(60);_p.r(11).extendClass(r,{fxScale:function(t,e,r,i,s,a){return this.animate(new n(t,e),r,i,s,a)}});return n}};_p[8]={value:function(t){var e=_p.r(33);var n=_p.r(12);var r=_p.r(2);function i(t,e,r){return n.paralle(t,e,function(t,e){return t+(e-t)*r})}function s(t,e){return n.paralle(t,e,function(t,e){return e-t})}function a(t,e,n){this.timeline=t;this.target=t.target;this.type=e;for(var r in n){if(n.hasOwnProperty(r)){this[r]=n[r]}}}var o=_p.r(11).createClass("Timeline",{mixins:[e],constructor:function(t,e,n,r){this.callMixin();this.target=e;this.time=0;this.duration=n;this.easing=r;this.animator=t;this.beginValue=t.beginValue;this.finishValue=t.finishValue;this.setter=t.setter;this.status="ready"},nextFrame:function(t){if(this.status!="playing"){return}this.time+=t.dur;this.setValue(this.getValue());if(this.time>=this.duration){this.timeUp()}t.next()},getPlayTime:function(){return this.rollbacking?this.duration-this.time:this.time},getTimeProportion:function(){return this.getPlayTime()/this.duration},getValueProportion:function(){return this.easing(this.getPlayTime(),0,1,this.duration)},getValue:function(){var t=this.beginValue;var e=this.finishValue;var n=this.getValueProportion();return i(t,e,n)},setValue:function(t){this.lastValue=this.currentValue;this.currentValue=t;this.setter.call(this.target,this.target,t,this)},getDelta:function(){this.lastValue=this.lastValue===undefined?this.beginValue:this.lastValue;return s(this.lastValue,this.currentValue)},play:function(){var t=this.status;this.status="playing";switch(t){case"ready":if(n.isFunction(this.beginValue)){this.beginValue=this.beginValue.call(this.target,this.target)}if(n.isFunction(this.finishValue)){this.finishValue=this.finishValue.call(this.target,this.target)}this.time=0;this.setValue(this.beginValue);this.frame=r.requestFrame(this.nextFrame.bind(this));break;case"finished":case"stoped":this.time=0;this.frame=r.requestFrame(this.nextFrame.bind(this));break;case"paused":this.frame.next()}this.fire("play",new a(this,"play",{lastStatus:t}));return this},pause:function(){this.status="paused";this.fire("pause",new a(this,"pause"));r.releaseFrame(this.frame);return this},stop:function(){this.status="stoped";this.setValue(this.finishValue);this.rollbacking=false;this.fire("stop",new a(this,"stop"));r.releaseFrame(this.frame);return this},timeUp:function(){if(this.repeatOption){this.time=0;if(this.rollback){if(this.rollbacking){this.decreaseRepeat();this.rollbacking=false}else{this.rollbacking=true;this.fire("rollback",new a(this,"rollback"))}}else{this.decreaseRepeat()}if(!this.repeatOption){this.finish()}else{this.fire("repeat",new a(this,"repeat"))}}else{this.finish()}},finish:function(){this.setValue(this.finishValue);this.status="finished";this.fire("finish",new a(this,"finish"));r.releaseFrame(this.frame)},decreaseRepeat:function(){if(this.repeatOption!==true){this.repeatOption--}},repeat:function(t,e){this.repeatOption=t;this.rollback=e;return this}});o.requestFrame=r.requestFrame;o.releaseFrame=r.releaseFrame;return o}};_p[9]={value:function(t){var e=_p.r(0);var n=_p.r(11).createClass("TranslateAnimator",{base:e,constructor:function(t,e){this.callBase({x:0,y:0},{x:t,y:e},function(t,e,n){var r=n.getDelta();t.translate(r.x,r.y)})}});var r=_p.r(60);_p.r(11).extendClass(r,{fxTranslate:function(t,e,r,i,s,a){return this.animate(new n(t,e),r,i,s,a)}});return n}};_p[10]={value:function(){var t=function(){var t=navigator.userAgent.toLowerCase(),e=window.opera,n;n={platform:function(t){var e={win32:"Win",macintel:"Mac"};return e[t.platform.toLowerCase()]||"Lux"}(navigator),lb:function(t){if(~t.indexOf("lbbrowser")){return~t.indexOf("msie")?"ie":"chrome"}return false}(t),sg:/se[\s\S]+metasr/.test(t),bd:!!~t.indexOf("bidubrowser"),edge:!!~t.indexOf("edge"),chrome:false,opera:!!e&&e.version,webkit:t.indexOf(" applewebkit/")>-1,mac:t.indexOf("macintosh")>-1};n.ie=!n.lb&&/(msie\s|trident.*rv:)([\w.]+)/.test(t);n.gecko=navigator.product=="Gecko"&&!n.webkit&&!n.opera&&!n.ie;var r=0;if(n.ie){r=(t.match(/(msie\s|trident.*rv:)([\w.]+)/)[2]||0)*1;n.ie11Compat=document.documentMode==11;n.ie9Compat=document.documentMode==9}if(n.gecko){var i=t.match(/rv:([\d\.]+)/);if(i){i=i[1].split(".");r=i[0]*1e4+(i[1]||0)*100+(i[2]||0)*1}}if(/chrome\/(\d+\.\d)/i.test(t)&&!n.bd&&!n.opera&&!n.lb&&!n.sg&&!n.edge){n.chrome=+RegExp["$1"]}if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(t)&&!/chrome/i.test(t)){n.safari=+(RegExp["$1"]||RegExp["$2"])}if(n.opera)r=parseFloat(e.version());if(n.webkit)r=parseFloat(t.match(/ applewebkit\/(\d+)/)[1]);if(n.bd)r=parseFloat(t.match(/bidubrowser\/(\d+)/)[1]);if(n.opera)r=parseFloat(t.match(/opr\/(\d+)/)[1]);if(n.edge)r=parseFloat(t.match(/edge\/(\d+)/)[1]);n.version=r;n.isCompatible=!n.mobile&&(n.ie&&r>=6||n.gecko&&r>=10801||n.opera&&r>=9.5||n.air&&r>=1||n.webkit&&r>=522||false);return n}();return t}};_p[11]={value:function(require,exports){function Class(){}exports.Class=Class;Class.__KityClassName="Class";Class.prototype.base=function(t){var e=arguments.callee.caller;var n=e.__KityMethodClass.__KityBaseClass.prototype[t];return n.apply(this,Array.prototype.slice.call(arguments,1))};Class.prototype.callBase=function(){var t=arguments.callee.caller;var e=t.__KityMethodClass.__KityBaseClass.prototype[t.__KityMethodName];return e.apply(this,arguments)};Class.prototype.mixin=function(t){var e=arguments.callee.caller;var n=e.__KityMethodClass.__KityMixins;if(!n){return this}var r=n[t];return r.apply(this,Array.prototype.slice.call(arguments,1))};Class.prototype.callMixin=function(){var t=arguments.callee.caller;var e=t.__KityMethodName;var n=t.__KityMethodClass.__KityMixins;if(!n){return this}var r=n[e];if(e=="constructor"){for(var i=0,s=r.length;i<s;i++){r[i].call(this)}return this}else{return r.apply(this,arguments)}};Class.prototype.pipe=function(t){if(typeof t=="function"){t.call(this,this)}return this};Class.prototype.getType=function(){return this.__KityClassName};Class.prototype.getClass=function(){return this.constructor};function checkBaseConstructorCall(t,e){var n=t.toString();if(!/this\.callBase/.test(n)){throw new Error(e+" : 类构造函数没有调用父类的构造函数!为了安全,请调用父类的构造函数")}}var KITY_INHERIT_FLAG="__KITY_INHERIT_FLAG_"+ +new Date;function inherit(constructor,BaseClass,classname){var KityClass=eval("(function "+classname+"( __inherit__flag ) {"+"if( __inherit__flag != KITY_INHERIT_FLAG ) {"+"KityClass.__KityConstructor.apply(this, arguments);"+"}"+"this.__KityClassName = KityClass.__KityClassName;"+"})");KityClass.__KityConstructor=constructor;KityClass.prototype=new BaseClass(KITY_INHERIT_FLAG);for(var methodName in BaseClass.prototype){if(BaseClass.prototype.hasOwnProperty(methodName)&&methodName.indexOf("__Kity")!==0){KityClass.prototype[methodName]=BaseClass.prototype[methodName]}}KityClass.prototype.constructor=KityClass;return KityClass}function mixin(t,e){if(false===e instanceof Array){return t}var n,r=e.length,i,s;t.__KityMixins={constructor:[]};for(n=0;n<r;n++){i=e[n].prototype;for(s in i){if(false===i.hasOwnProperty(s)||s.indexOf("__Kity")===0){continue}if(s==="constructor"){t.__KityMixins.constructor.push(i[s])}else{t.prototype[s]=t.__KityMixins[s]=i[s]}}}return t}function extend(t,e){if(e.__KityClassName){e=e.prototype}for(var n in e){if(e.hasOwnProperty(n)&&n.indexOf("__Kity")&&n!="constructor"){var r=t.prototype[n]=e[n];r.__KityMethodClass=t;r.__KityMethodName=n}}return t}exports.createClass=function(t,e){var n,r,i;if(arguments.length===1){e=arguments[0];t="AnonymousClass"}i=e.base||Class;if(e.hasOwnProperty("constructor")){n=e.constructor;if(i!=Class){checkBaseConstructorCall(n,t)}}else{n=function(){this.callBase.apply(this,arguments);this.callMixin.apply(this,arguments)}}r=inherit(n,i,t);r=mixin(r,e.mixins);r.__KityClassName=n.__KityClassName=t;r.__KityBaseClass=n.__KityBaseClass=i;r.__KityMethodName=n.__KityMethodName="constructor";r.__KityMethodClass=n.__KityMethodClass=r;delete e.mixins;delete e.constructor;delete e.base;r=extend(r,e);return r};exports.extendClass=extend}};_p[12]={value:function(){var t={each:function t(e,n,r){if(e===null){return}if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++){if(n.call(r,e[i],i,e)===false){return false}}}else{for(var a in e){if(e.hasOwnProperty(a)){if(n.call(r,e[a],a,e)===false){return false}}}}},extend:function t(e){var n=arguments,r=this.isBoolean(n[n.length-1])?n[n.length-1]:false,i=this.isBoolean(n[n.length-1])?n.length-1:n.length;for(var s=1;s<i;s++){var a=n[s];for(var o in a){if(!r||!e.hasOwnProperty(o)){e[o]=a[o]}}}return e},deepExtend:function(t,e){var n=arguments,r=this.isBoolean(n[n.length-1])?n[n.length-1]:false,i=this.isBoolean(n[n.length-1])?n.length-1:n.length;for(var s=1;s<i;s++){var a=n[s];for(var o in a){if(!r||!t.hasOwnProperty(o)){if(this.isObject(t[o])&&this.isObject(a[o])){this.deepExtend(t[o],a[o],r)}else{t[o]=a[o]}}}}return t},clone:function t(e){var n={};for(var r in e){if(e.hasOwnProperty(r)){n[r]=e[r]}}return n},copy:function t(e){if(typeof e!=="object")return e;if(typeof e==="function")return null;return JSON.parse(JSON.stringify(e))},queryPath:function(t,e){var n=t.split(".");var r=0,i=e,s=n.length;while(r<s){if(n[r]in i){i=i[n[r]];r++;if(r>=s||i===undefined){return i}}else{return undefined}}},getValue:function(t,e){return t!==undefined?t:e},flatten:function e(n){var r=[],i=n.length,s;for(s=0;s<i;s++){if(n[s]instanceof Array){r=r.concat(t.flatten(n[s]))}else{r.push(n[s])}}return r},paralle:function e(n,r,i){var s,a,o,u,h;if(n instanceof Array){h=[];for(o=0;o<n.length;o++){h.push(t.paralle(n[o],r[o],i))}return h}if(n instanceof Object){s=n.getClass&&n.getClass();if(s&&s.parse){n=n.valueOf();r=r.valueOf();h=t.paralle(n,r,i);h=s.parse(h)}else{h={};for(u in n){if(n.hasOwnProperty(u)&&r.hasOwnProperty(u)){h[u]=t.paralle(n[u],r[u],i)}}}return h}if(false===isNaN(parseFloat(n))){return i(n,r)}return h},parallelize:function e(n){return function(e,r){return t.paralle(e,r,n)}}};t.each(["String","Function","Array","Number","RegExp","Object","Boolean"],function(e){t["is"+e]=function t(n){return Object.prototype.toString.apply(n)=="[object "+e+"]"}});return t}};_p[13]={value:function(t,e,n){var r=_p.r(16),i=_p.r(12);var s=_p.r(11).createClass("ColorMatrixEffect",{base:r,constructor:function(t,e){this.callBase(r.NAME_COLOR_MATRIX);this.set("type",i.getValue(t,s.TYPE_MATRIX));this.set("in",i.getValue(e,r.INPUT_SOURCE_GRAPHIC))}});i.extend(s,{TYPE_MATRIX:"matrix",TYPE_SATURATE:"saturate",TYPE_HUE_ROTATE:"hueRotate",TYPE_LUMINANCE_TO_ALPHA:"luminanceToAlpha",MATRIX_ORIGINAL:"10000010000010000010".split("").join(" "),MATRIX_EMPTY:"00000000000000000000".split("").join(" ")});return s}};_p[14]={value:function(t,e,n){var r=_p.r(16),i=_p.r(12);var s=_p.r(11).createClass("CompositeEffect",{base:r,constructor:function(t,e,n){this.callBase(r.NAME_COMPOSITE);this.set("operator",i.getValue(t,s.OPERATOR_OVER));if(e){this.set("in",e)}if(n){this.set("in2",n)}}});i.extend(s,{OPERATOR_OVER:"over",OPERATOR_IN:"in",OPERATOR_OUT:"out",OPERATOR_ATOP:"atop",OPERATOR_XOR:"xor",OPERATOR_ARITHMETIC:"arithmetic"});return s}};_p[15]={value:function(t,e,n){var r=_p.r(16),i=_p.r(12);var s=_p.r(11).createClass("ConvolveMatrixEffect",{base:r,constructor:function(t,e){this.callBase(r.NAME_CONVOLVE_MATRIX);this.set("edgeMode",i.getValue(t,s.MODE_DUPLICATE));this.set("in",i.getValue(e,r.INPUT_SOURCE_GRAPHIC))}});i.extend(s,{MODE_DUPLICATE:"duplicate",MODE_WRAP:"wrap",MODE_NONE:"none"});return s}};_p[16]={value:function(t,e,n){var r=_p.r(67),i=_p.r(11).createClass("Effect",{constructor:function(t){this.node=r.createNode(t)},getId:function(){return this.node.id},setId:function(t){this.node.id=t;return this},set:function(t,e){this.node.setAttribute(t,e);return this},get:function(t){return this.node.getAttribute(t)},getNode:function(){return this.node},toString:function(){return this.node.getAttribute("result")||""}});_p.r(12).extend(i,{NAME_GAUSSIAN_BLUR:"feGaussianBlur",NAME_OFFSET:"feOffset",NAME_COMPOSITE:"feComposite",NAME_COLOR_MATRIX:"feColorMatrix",NAME_CONVOLVE_MATRIX:"feConvolveMatrix",INPUT_SOURCE_GRAPHIC:"SourceGraphic",INPUT_SOURCE_ALPHA:"SourceAlpha",INPUT_BACKGROUND_IMAGE:"BackgroundImage",INPUT_BACKGROUND_ALPHA:"BackgroundAlpha",INPUT_FILL_PAINT:"FillPaint",INPUT_STROKE_PAINT:"StrokePaint"});return i}};_p[17]={value:function(t,e,n){var r=_p.r(16),i=_p.r(12);return _p.r(11).createClass("GaussianblurEffect",{base:r,constructor:function(t,e){this.callBase(r.NAME_GAUSSIAN_BLUR);this.set("stdDeviation",i.getValue(t,1));this.set("in",i.getValue(e,r.INPUT_SOURCE_GRAPHIC))}})}};_p[18]={value:function(t,e,n){var r=_p.r(16),i=_p.r(12);return _p.r(11).createClass("OffsetEffect",{base:r,constructor:function(t,e,n){this.callBase(r.NAME_OFFSET);this.set("dx",i.getValue(t,0));this.set("dy",i.getValue(e,0));this.set("in",i.getValue(n,r.INPUT_SOURCE_GRAPHIC))}})}};_p[19]={value:function(t){return _p.r(11).createClass("EffectContainer",{base:_p.r(29),addEffect:function(t,e){return this.addItem.apply(this,arguments)},prependEffect:function(){return this.prependItem.apply(this,arguments)},appendEffect:function(){return this.appendItem.apply(this,arguments)},removeEffect:function(t){return this.removeItem.apply(this,arguments)},addEffects:function(){return this.addItems.apply(this,arguments)},setEffects:function(){return this.setItems.apply(this,arguments)},getEffect:function(){return this.getItem.apply(this,arguments)},getEffects:function(){return this.getItems.apply(this,arguments)},getFirstEffect:function(){return this.getFirstItem.apply(this,arguments)},getLastEffect:function(){return this.getLastItem.apply(this,arguments)},handleAdd:function(t,e){var n=this.getEffects().length,r=this.getItem(e+1);if(n===e+1){this.node.appendChild(t.getNode());return}this.node.insertBefore(t.getNode(),r.getNode())}})}};_p[20]={value:function(t,e,n){var r=_p.r(67);var i=_p.r(11);var s=i.createClass("Filter",{mixins:[_p.r(19)],constructor:function(t,e,n,i){this.node=r.createNode("filter");if(t!==undefined){this.set("x",t)}if(e!==undefined){this.set("y",e)}if(n!==undefined){this.set("width",n)}if(i!==undefined){this.set("height",i)}},getId:function(){return this.id},setId:function(t){this.node.id=t;return this},set:function(t,e){this.node.setAttribute(t,e);return this},get:function(t){return this.node.getAttribute(t)},getNode:function(){return this.node}});var a=_p.r(60);i.extendClass(a,{applyFilter:function(t){var e=t.get("id");if(e){this.node.setAttribute("filter","url(#"+e+")")}return this}});return s}};_p[21]={value:function(t,e,n){var r=_p.r(17);return _p.r(11).createClass("GaussianblurFilter",{base:_p.r(20),constructor:function(t){this.callBase();this.addEffect(new r(t))}})}};_p[22]={value:function(t,e,n){var r=_p.r(17),i=_p.r(16),s=_p.r(13),a=_p.r(28),o=_p.r(12),u=_p.r(14),h=_p.r(18);return _p.r(11).createClass("ProjectionFilter",{base:_p.r(20),constructor:function(t,e,n){this.callBase();this.gaussianblurEffect=new r(t,i.INPUT_SOURCE_ALPHA);this.gaussianblurEffect.set("result","gaussianblur");this.addEffect(this.gaussianblurEffect);this.offsetEffect=new h(e,n,this.gaussianblurEffect);this.offsetEffect.set("result","offsetBlur");this.addEffect(this.offsetEffect);this.colorMatrixEffect=new s(s.TYPE_MATRIX,this.offsetEffect);this.colorMatrixEffect.set("values",s.MATRIX_ORIGINAL);this.colorMatrixEffect.set("result","colorOffsetBlur");this.addEffect(this.colorMatrixEffect);this.compositeEffect=new u(u.OPERATOR_OVER,i.INPUT_SOURCE_GRAPHIC,this.colorMatrixEffect);this.addEffect(this.compositeEffect)},setColor:function(t){var e=null,n=null,r=[];if(o.isString(t)){t=a.parse(t)}if(!t){return this}e=s.MATRIX_EMPTY.split(" ");r.push(t.get("r"));r.push(t.get("g"));r.push(t.get("b"));for(var i=0,u=r.length;i<u;i++){e[i*5+3]=r[i]/255}e[18]=t.get("a");this.colorMatrixEffect.set("values",e.join(" "));return this},setOpacity:function(t){var e=this.colorMatrixEffect.get("values").split(" ");e[18]=t;this.colorMatrixEffect.set("values",e.join(" "));return this},setOffset:function(t,e){this.setOffsetX(t);this.setOffsetY(e)},setOffsetX:function(t){this.offsetEffect.set("dx",t)},setOffsetY:function(t){this.offsetEffect.set("dy",t)},setDeviation:function(t){this.gaussianblurEffect.set("stdDeviation",t)}})}};_p[23]={value:function(t,e,n){return _p.r(11).createClass("Bezier",{mixins:[_p.r(51)],base:_p.r(46),constructor:function(t){this.callBase();t=t||[];this.changeable=true;this.setBezierPoints(t)},getBezierPoints:function(){return this.getPoints()},setBezierPoints:function(t){return this.setPoints(t)},onContainerChanged:function(){if(this.changeable){this.update()}},update:function(){var t=null,e=this.getBezierPoints();if(e.length<2){return}t=this.getDrawer();t.clear();var n=e[0].getVertex(),r=null,i=null;t.moveTo(n.x,n.y);for(var s=1,a=e.length;s<a;s++){n=e[s].getVertex();i=e[s].getBackward();r=e[s-1].getForward();t.bezierTo(r.x,r.y,i.x,i.y,n.x,n.y)}return this}})}};_p[24]={value:function(t,e,n){var r=_p.r(63);var i=_p.r(73);var s=_p.r(11).createClass("BezierPoint",{constructor:function(t,e,n){this.vertex=new r(t,e);this.forward=new r(t,e);this.backward=new r(t,e);this.setSmooth(n===undefined||n);this.setSymReflaction(true)},clone:function(){var t=new s,e=null;e=this.getVertex();t.setVertex(e.x,e.y);e=this.getForward();t.setForward(e.x,e.y);e=this.getBackward();t.setBackward(e.x,e.y);t.setSymReflaction(this.isSymReflaction);t.setSmooth(this.isSmooth());return t},setVertex:function(t,e){this.vertex.setPoint(t,e);this.update();return this},moveTo:function(t,e){var n=this.forward.getPoint(),r=this.backward.getPoint(),i=this.vertex.getPoint(),s={left:t-i.x,top:e-i.y};this.forward.setPoint(n.x+s.left,n.y+s.top);this.backward.setPoint(r.x+s.left,r.y+s.top);this.vertex.setPoint(t,e);this.update()},setForward:function(t,e){this.forward.setPoint(t,e);if(this.smooth){this.updateAnother(this.forward,this.backward)}this.update();this.lastControlPointSet=this.forward;return this},setBackward:function(t,e){this.backward.setPoint(t,e);if(this.smooth){this.updateAnother(this.backward,this.forward)}this.update();this.lastControlPointSet=this.backward;return this},setSymReflaction:function(t){this.symReflaction=t;if(this.smooth)this.setSmooth(true);return this},isSymReflaction:function(){return this.symReflaction},updateAnother:function(t,e){var n=this.getVertex(),r=i.fromPoints(t.getPoint(),n),s=i.fromPoints(n,e.getPoint());s=r.normalize(this.isSymReflaction()?r.length():s.length());e.setPoint(n.x+s.x,n.y+s.y);return this},setSmooth:function(t){var e;this.smooth=!!t;if(this.smooth&&(e=this.lastControlPointSet)){this.updateAnother(e,e==this.forward?this.backward:this.forward)}return this},isSmooth:function(){return this.smooth},getVertex:function(){return this.vertex.getPoint()},getForward:function(){return this.forward.getPoint()},getBackward:function(){return this.backward.getPoint()},update:function(){if(!this.container){return this}if(this.container.update)this.container.update(this)}});return s}};_p[25]={value:function(t,e,n){var r=_p.r(11).createClass("Box",{constructor:function(t,e,n,r){var i=arguments[0];if(i&&typeof i==="object"){t=i.x;e=i.y;n=i.width;r=i.height}if(n<0){t-=n=-n}if(r<0){e-=r=-r}this.x=t||0;this.y=e||0;this.width=n||0;this.height=r||0;this.left=this.x;this.right=this.x+this.width;this.top=this.y;this.bottom=this.y+this.height;this.cx=this.x+this.width/2;this.cy=this.y+this.height/2},getRangeX:function(){return[this.left,this.right]},getRangeY:function(){return[this.top,this.bottom]},merge:function(t){if(this.isEmpty()){return new r(t.x,t.y,t.width,t.height)}var e=Math.min(this.left,t.left),n=Math.max(this.right,t.right),i=Math.min(this.top,t.top),s=Math.max(this.bottom,t.bottom);return new r(e,i,n-e,s-i)},intersect:function(t){if(!t instanceof r){t=new r(t)}var e=Math.max(this.left,t.left),n=Math.min(this.right,t.right),i=Math.max(this.top,t.top),s=Math.min(this.bottom,t.bottom);if(e>n||i>s)return new r;return new r(e,i,n-e,s-i)},expand:function(t,e,n,i){if(arguments.length<1){return new r(this)}if(arguments.length<2){e=t}if(arguments.length<3){n=t}if(arguments.length<4){i=e}var s=this.left-i,a=this.top-t,o=this.width+e,u=this.height+t;return new r(s,a,o,u)},valueOf:function(){return[this.x,this.y,this.width,this.height]},toString:function(){return this.valueOf().join(" ")},isEmpty:function(){return!this.width||!this.height}});r.parse=function(t){if(typeof t=="string"){return r.parse(t.split(/[\s,]+/).map(parseFloat))}if(t instanceof Array){return new r(t[0],t[1],t[2],t[3])}if("x"in t)return new r(t);return null};return r}};_p[26]={value:function(t,e,n){return _p.r(11).createClass("Circle",{base:_p.r(32),constructor:function(t,e,n){this.callBase(t,t,e,n)},getRadius:function(){return this.getRadiusX()},setRadius:function(t){return this.callBase(t,t)}})}};_p[27]={value:function(t,e,n){var r=_p.r(11);var i=_p.r(60);var s=r.createClass("Clip",{base:i,mixins:[_p.r(61)],constructor:function(t){this.callBase("clipPath",t)},clip:function(t){t.getNode().setAttribute("clip-path",this);return this}});r.extendClass(i,{clipWith:function(t){if(t instanceof i){t=new s(t.getPaper()).addShape(t)}t.clip(this);return this}});return s}};_p[28]={value:function(t,e,n){var r=_p.r(12),i=_p.r(64),s={},a=_p.r(11).createClass("Color",{constructor:function(){var t=null;if(typeof arguments[0]==="string"){t=s.parseToValue(arguments[0]);if(t===null){t={r:0,g:0,b:0,h:0,s:0,l:0,a:1}}}else{t={r:arguments[0]|0,g:arguments[1]|0,b:arguments[2]|0,a:arguments[3]===undefined?1:parseFloat(arguments[3])};t=s.overflowFormat(t);t=r.extend(t,s.rgbValueToHslValue(t))}this._color=t},set:function(t,e){var n=null;if(!a._MAX_VALUE[t]){throw new Error("Color set(): Illegal parameter")}if(t!=="a"){e=Math.floor(e)}if(t=="h"){e=(e+360)%360}this._color[t]=Math.max(a._MIN_VALUE[t],Math.min(a._MAX_VALUE[t],e));if("rgb".indexOf(t)!==-1){this._color=r.extend(this._color,s.rgbValueToHslValue(this._color))}else if("hsl".indexOf(t)!==-1){this._color=r.extend(this._color,s.hslValueToRGBValue(this._color))}return this},inc:function(t,e){e=this.get(t)+e;if(t=="h"){e=(e+360)%360}else{e=Math.min(a._MAX_VALUE[t],e);e=Math.max(a._MIN_VALUE[t],e)}return this.clone().set(t,e)},dec:function(t,e){return this.inc(t,-e)},clone:function(){return new a(this.toRGBA())},get:function(t){if(!a._MAX_VALUE[t]){return null}return this._color[t]},getValues:function(){return r.clone(this._color)},valueOf:function(){return this.getValues()},toRGB:function(){return s.toString(this._color,"rgb")},toRGBA:function(){return s.toString(this._color,"rgba")},toHEX:function(){return s.toString(this._color,"hex")},toHSL:function(){return s.toString(this._color,"hsl")},toHSLA:function(){return s.toString(this._color,"hsla")},toString:function(){if(this._color.a===1){return this.toRGB()}return this.toRGBA()}});r.extend(a,{_MAX_VALUE:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},_MIN_VALUE:{r:0,g:0,b:0,h:0,s:0,l:0,a:0},R:"r",G:"g",B:"b",H:"h",S:"s",L:"l",A:"a",parse:function(t){var e;if(r.isString(t)){e=s.parseToValue(t)}if(r.isObject(t)&&"r"in t){e=t}if(e===null){return new a}return new a(e.r,e.g,e.b,e.a)},createHSL:function(t,e,n){return a.createHSLA(t,e,n,1)},createHSLA:function(t,e,n,r){var i=null;e+="%";n+="%";i=["hsla("+t,e,n,r+")"];return a.parse(i.join(", "))},createRGB:function(t,e,n){return a.createRGBA(t,e,n,1)},createRGBA:function(t,e,n,r){return new a(t,e,n,r)}});r.extend(s,{parseToValue:function(t){var e={};t=i.EXTEND_STANDARD[t]||i.COLOR_STANDARD[t]||t;if(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(t)){e=s.hexToValue(t)}else if(/^(rgba?)/i.test(t)){e=s.rgbaToValue(t)}else if(/^(hsla?)/i.test(t)){e=s.hslaToValue(t)}else{return null}return s.overflowFormat(e)},hexToValue:function(t){var e={},n=["r","g","b"];
- if(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(t)){t=RegExp.$1.split("");r.each(n,function(n,r){if(t.length===3){e[n]=s.toNumber(t[r]+t[r])}else{e[n]=s.toNumber(t[r*2]+t[r*2+1])}});e=r.extend(e,s.rgbValueToHslValue(e));e.a=1;return e}return null},rgbaToValue:function(t){var e={},n=false,i=["r","g","b"];if(/^(rgba?)/i.test(t)){n=RegExp.$1.length===4;t=t.replace(/^rgba?/i,"").replace(/\s+/g,"").replace(/[^0-9,.]/g,"").split(",");r.each(i,function(n,r){e[n]=t[r]|0});e=r.extend(e,s.rgbValueToHslValue(e));e.a=n?parseFloat(t[3]):1;return e}return null},hslaToValue:function(t){var e={},n=false;if(/^(hsla?)/i.test(t)){n=RegExp.$1.length===4;t=t.replace(/^hsla?/i,"").replace(/\s+/g,"").replace(/[^0-9,.]/g,"").split(",");e.h=t[0]|0;e.s=t[1]|0;e.l=t[2]|0;e=r.extend(e,s.hslValueToRGBValue(e));e=s.hslValueToRGBValue(e);e.a=n?parseFloat(t[3]):1;return e}return null},hslValueToRGBValue:function(t){function e(t,e,n){if(n<0){n+=1}else if(n>1){n-=1}if(6*n<1){return t+(e-t)*6*n}else if(2*n<1){return e}else if(3*n<2){return t+(e-t)*((2/3-n)*6)}return t}var n=null,i=null,s={};t=r.extend({},t);t.h=t.h/360;t.s=t.s/100;t.l=t.l/100;if(t.s===0){s.r=s.g=s.b=t.l}else{if(t.l<.5){n=t.l*(1+t.s)}else{n=t.l+t.s-t.l*t.s}i=2*t.l-n;s.r=e(i,n,t.h+1/3);s.g=e(i,n,t.h);s.b=e(i,n,t.h-1/3)}s.r=Math.min(Math.round(s.r*255),255);s.g=Math.min(Math.round(s.g*255),255);s.b=Math.min(Math.round(s.b*255),255);return s},rgbValueToHslValue:function(t){var e=null,n=null,i={};t=r.extend({},t);t.r=t.r/255;t.g=t.g/255;t.b=t.b/255;e=Math.max(t.r,t.g,t.b);n=Math.min(t.r,t.g,t.b);if(e===n){i.h=0}else if(e===t.r){if(t.g>=t.b){i.h=60*(t.g-t.b)/(e-n)}else{i.h=60*(t.g-t.b)/(e-n)+360}}else if(e===t.g){i.h=60*(t.b-t.r)/(e-n)+120}else if(e===t.b){i.h=60*(t.r-t.g)/(e-n)+240}i.l=(e+n)/2;if(i.l===0||e===n){i.s=0}else if(i.l>0&&i.l<=.5){i.s=(e-n)/(e+n)}else{i.s=(e-n)/(2-e-n)}i.h=Math.round(i.h);i.s=Math.round(i.s*100);i.l=Math.round(i.l*100);return i},toString:function(t,e){var n=[];t=r.extend({},t);if(e.indexOf("hsl")!==-1){t.s+="%";t.l+="%"}if(e!=="hex"){r.each(e.split(""),function(e){n.push(t[e])});return(e+"("+n.join(", ")+")").toLowerCase()}else{n.push(s.toHexValue(+t.r));n.push(s.toHexValue(+t.g));n.push(s.toHexValue(+t.b));return("#"+n.join("")).toLowerCase()}},toNumber:function(t){return Number("0x"+t)|0},toHexValue:function(t){var e=t.toString(16);return e.length===1?"0"+e:e},overflowFormat:function(t){var e=r.extend({},t),n="rgba";r.each(n.split(""),function(t){if(!e.hasOwnProperty(t)){return}e[t]=Math.min(a._MAX_VALUE[t],e[t]);e[t]=Math.max(a._MIN_VALUE[t],e[t])});return e}});return a}};_p[29]={value:function(t,e,n){function r(){this.container.removeItem(this);return this}return _p.r(11).createClass("Container",{getItems:function(){return this.items||(this.items=[])},getItem:function(t){return this.getItems()[t]},getFirstItem:function(){return this.getItem(0)},getLastItem:function(){return this.getItem(this.getItems().length-1)},indexOf:function(t){return this.getItems().indexOf(t)},eachItem:function(t){var e=this.getItems(),n=e.length,r;for(r=0;r<n;r++){t.call(this,r,e[r])}return this},addItem:function(t,e,n){var i=this.getItems(),s=i.length;if(~i.indexOf(t)){return this}if(!(e>=0&&e<s)){e=s}i.splice(e,0,t);if(typeof t==="object"){t.container=this;t.remove=r}this.handleAdd(t,e);if(!n){this.onContainerChanged("add",[t])}return this},addItems:function(t){for(var e=0,n=t.length;e<n;e++){this.addItem(t[e],-1,true)}this.onContainerChanged("add",t);return this},setItems:function(t){return this.clear().addItems(t)},appendItem:function(t){return this.addItem(t)},prependItem:function(t){return this.addItem(t,0)},removeItem:function(t,e){if(typeof t!=="number"){return this.removeItem(this.indexOf(t))}var n=this.getItems(),r=n.length,i=n[t];if(i===undefined){return this}n.splice(t,1);if(i.container){delete i.container}if(i.remove){delete i.remove}this.handleRemove(i,t);if(!e){this.onContainerChanged("remove",[i])}return this},clear:function(){var t=[];var e;while(e=this.getFirstItem()){t.push(e);this.removeItem(0,true)}this.onContainerChanged("remove",t);return this},onContainerChanged:function(t,e){},handleAdd:function(t,e){},handleRemove:function(t,e){}})}};_p[30]={value:function(t,e,n){var r=_p.r(12),i={getCurvePanLines:function(t,e){var n=i.getCenterPoints(t),r=i.getPanLine(t.length,n);return i.getMovedPanLines(t,r,e)},getCenterPoints:function(t){var e={},n=null;for(var r=0,i=0,s=t.length;r<s;r++){i=r===s-1?0:r+1;n=r+","+i;e[n]={x:(t[r].x+t[i].y)/2,y:(t[r].x+t[i].y)/2}}return e},getPanLine:function(t,e){var n={},r=null;for(var i=0,s;i<t;i++){var a=null,o=null;s=(i+1)%t;r=s;a=e[i+","+s];i=s;s=(i+1)%t;o=e[i+","+s];n[r]={points:[{x:a.x,y:a.y},{x:o.x,y:o.y}],center:{x:(a.x+o.x)/2,y:(a.y+o.y)/2}};i=(r+t-1)%t}return n},getMovedPanLines:function(t,e,n){var i={};r.each(t,function(t,s){var a=e[s],o=a.center,u={x:o.x-t.x,y:o.y-t.y};var h=i[s]={points:[],center:{x:t.x,y:t.y}};r.each(a.points,function(t,e){var r={x:t.x-u.x,y:t.y-u.y};var i=h.center;var s=r.x-i.x;var a=r.y-i.y;r.x=i.x+n*s;r.y=i.y+n*a;h.points.push(r)})});return i}};return _p.r(11).createClass("Curve",{base:_p.r(46),mixins:[_p.r(51)],constructor:function(t,e){this.callBase();this.setPoints(t||[]);this.closeState=!!e;this.changeable=true;this.smoothFactor=1;this.update()},onContainerChanged:function(){if(this.changeable){this.update()}},setSmoothFactor:function(t){this.smoothFactor=t<0?0:t;this.update();return this},getSmoothFactor:function(){return this.smoothFactor},update:function(){var t=this.getPoints(),e=null,n=this.getDrawer(),r=null,s=null,a=null;n.clear();if(t.length===0){return this}else{n.moveTo(t[0])}if(t.length===1){return this}if(t.length===2){n.lineTo(t[1]);return this}e=i.getCurvePanLines(t,this.getSmoothFactor());for(var o=1,u=t.length;o<u;o++){r=e[o].center;if(this.closeState||o!=u-1){s=e[o].points[0]}else{s=e[o].center}if(this.closeState||o!=1){a=e[o-1].points[1]}else{a=e[o-1].center}n.bezierTo(a.x,a.y,s.x,s.y,r.x,r.y)}if(this.closeState){r=e[0].center;s=e[0].points[0];a=e[t.length-1].points[1];n.bezierTo(a.x,a.y,s.x,s.y,r.x,r.y)}return this},close:function(){this.closeState=true;return this.update()},open:function(){this.closeState=false;return this.update()},isClose:function(){return!!this.closeState}})}};_p[31]={value:function(t,e,n){return _p.r(11).createClass("Data",{constructor:function(){this._data={}},setData:function(t,e){this._data[t]=e;return this},getData:function(t){return this._data[t]},removeData:function(t){delete this._data[t];return this}})}};_p[32]={value:function(t,e,n){var r=_p.r(12),i=_p.r(50);return _p.r(11).createClass("Ellipse",{base:_p.r(46),constructor:function(t,e,n,r){this.callBase();this.rx=t||0;this.ry=e||0;this.cx=n||0;this.cy=r||0;this.update()},update:function(){var t=this.rx,e=this.ry,n=this.cx+t,r=this.cx-t,i=this.cy;var s=this.getDrawer();s.clear();s.moveTo(n,i);s.arcTo(t,e,0,1,1,r,i);s.arcTo(t,e,0,1,1,n,i);return this},getRadius:function(){return{x:this.rx,y:this.ry}},getRadiusX:function(){return this.rx},getRadiusY:function(){return this.ry},getCenter:function(){return new i(this.cx,this.cy)},getCenterX:function(){return this.cx},getCenterY:function(){return this.cy},setRadius:function(t,e){this.rx=t;this.ry=e;return this.update()},setRadiusX:function(t){this.rx=t;return this.update()},setRadiusY:function(t){this.ry=t;return this.update()},setCenter:function(t,e){if(arguments.length==1){var n=i.parse(arguments[0]);t=n.x;e=n.y}this.cx=t;this.cy=e;return this.update()},setCenterX:function(t){this.cx=t;return this.update()},setCenterY:function(t){this.cy=t;return this.update()}})}};_p[33]={value:function(t,e,n){(function(){function t(t,e){e=e||{bubbles:false,cancelable:false,detail:undefined};var n=document.createEvent("CustomEvent");n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail);return n}t.prototype=window.Event.prototype;window.CustomEvent=t})();var r=_p.r(12),i=_p.r(62);var s={},a={},o=0;function u(t,e,n){n=!!n;if(r.isString(t)){t=t.match(/\S+/g)}r.each(t,function(t){f.call(this,this.node,t,e,n)},this);return this}function h(t,e){var n=null,i=this._EVNET_UID,o=e===undefined;n=a[i][t];if(!o){o=true;r.each(n,function t(r,i){if(r===e){delete n[i]}else{o=false}})}if(o){l(this.node,t,s[i][t]);delete a[i][t];delete s[i][t]}return this}function f(t,e,n,o){var u=this._EVNET_UID,h=this;if(!s[u]){s[u]={}}if(!s[u][e]){s[u][e]=function t(n){n=new i(n||window.event);r.each(a[u][e],function t(r){var i;if(r){i=r.call(h,n);if(o){h.off(e,r)}}return i},h)}}if(!a[u]){a[u]={}}if(!a[u][e]){a[u][e]=[n];if(!!t&&"on"+e in t){c(t,e,s[u][e])}}else{a[u][e].push(n)}}function c(t,e,n){if(t.addEventListener){t.addEventListener(e,n,false)}else{t.attachEvent("on"+e,n)}}function l(t,e,n){if(t.removeEventListener){t.removeEventListener(e,n,false)}else{t.detachEvent(e,n)}}function p(t,e,n){var r=new CustomEvent(e,{bubbles:true,cancelable:true});r._kityParam=n;t.dispatchEvent(r)}function d(t,e,n){var i=null,a=null;var o=s[t._EVNET_UID];if(!o)return;a=o[e];if(!a){return}i=r.extend({type:e,target:t},n||{});a.call(t,i)}return _p.r(11).createClass("EventHandler",{constructor:function(){this._EVNET_UID=++o},addEventListener:function(t,e){return u.call(this,t,e,false)},addOnceEventListener:function(t,e){return u.call(this,t,e,true)},removeEventListener:function(t,e){return h.call(this,t,e)},on:function(t,e){return this.addEventListener.apply(this,arguments)},once:function(t,e){return this.addOnceEventListener.apply(this,arguments)},off:function(){return this.removeEventListener.apply(this,arguments)},fire:function(t,e){return this.trigger.apply(this,arguments)},trigger:function(t,e){d(this,t,e);return this}})}};_p[34]={value:function(t){var e=_p.r(12);var n=_p.r(50);var r=_p.r(73);var i=_p.r(43);var s={};var a=/([achlmrqstvz])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?\s*)+)/gi,o=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)\s*,?\s*/gi,u={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0};function h(t){var e,n,r,i,s;e=[];for(n=0;n<t.length;n++){i=t[n];e.push(s=[]);for(r=0;r<i.length;r++){s.push(i[r])}}if(t.isUniform)e.isUniform=true;if(t.isAbsolute)e.isAbsolute=true;if(t.isCurve)e.isCurve=true;return e}function f(t,e,n){function r(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e){return t.push(t.splice(n,1)[0])}}function i(){var s=Array.prototype.slice.call(arguments,0),a=s.join("␀"),o=i.cache=i.cache||{},u=i.count=i.count||[];if(o.hasOwnProperty(a)){r(u,a);return n?n(o[a]):o[a]}if(u.length>=1e3){delete o[u.shift()]}u.push(a);o[a]=t.apply(e,s);return n?n(o[a]):o[a]}return i}s.pathToString=function(t){t=t||this;if(typeof t=="string")return t;if(t instanceof Array){t=e.flatten(t);return t.join(",").replace(/,?([achlmqrstvxz]),?/gi,"$1")}};s.parsePathString=f(function(t){var e=[];t.replace(a,function(t,n,r){var i=[],s=n.toLowerCase();r.replace(o,function(t,e){if(e)i.push(+e)});if(s=="m"&&i.length>2){e.push([n].concat(i.splice(0,2)));s="l";n=n=="m"?"l":"L"}if(s=="r"){e.push([n].concat(i))}else{while(i.length>=u[s]){e.push([n].concat(i.splice(0,u[s])));if(!u[s]){break}}}});e.isUniform=true;e.toString=s.pathToString;return e});s.pathToAbsolute=f(function(t){var e=t.isUniform?t:s.parsePathString(s.pathToString(t));var n=[],r=0,i=0,a=0,o=0,u=0;var h,f,c,l,p,d,g,v;if(e[0][0]=="M"){r=+e[0][1];i=+e[0][2];a=r;o=i;u++;n[0]=["M",r,i]}for(h,f,c=u,d=e.length;c<d;c++){n.push(h=[]);f=e[c];if(f[0]!=f[0].toUpperCase()){h[0]=f[0].toUpperCase();switch(h[0]){case"A":h[1]=f[1];h[2]=f[2];h[3]=f[3];h[4]=f[4];h[5]=f[5];h[6]=+(f[6]+r);h[7]=+(f[7]+i);break;case"V":h[1]=+f[1]+i;break;case"H":h[1]=+f[1]+r;break;case"M":a=+f[1]+r;o=+f[2]+i;break;default:for(l=1,g=f.length;l<g;l++){h[l]=+f[l]+(l%2?r:i)}}}else{for(p=0,v=f.length;p<v;p++){h[p]=f[p]}}switch(h[0]){case"Z":r=a;i=o;break;case"H":r=h[1];break;case"V":i=h[1];break;case"M":a=h[h.length-2];o=h[h.length-1];break;default:r=h[h.length-2];i=h[h.length-1]}}n.isUniform=true;n.isAbsolute=true;n.toString=s.pathToString;return n});function c(t,e,n,r,i,s,a,o,u,h){var f=Math,l=f.PI,p=Math.abs,d=l*120/180,g=l/180*(+i||0),v=[],_,m=function(t,e,n){var r=t*f.cos(n)-e*f.sin(n),i=t*f.sin(n)+e*f.cos(n);return{x:r,y:i}};var y,b,x,w,A,C,P,T,M,E,S,O,R,I,N,B,k,V,L,F,D,U,H,G,K,X,z,j,q,Y;if(!h){_=m(t,e,-g);t=_.x;e=_.y;_=m(o,u,-g);o=_.x;u=_.y;y=f.cos(l/180*i);b=f.sin(l/180*i);w=(t-o)/2;A=(e-u)/2;x=w*w/(n*n)+A*A/(r*r);if(x>1){x=f.sqrt(x);n=x*n;r=x*r}C=n*n;P=r*r;T=(s==a?-1:1)*f.sqrt(p((C*P-C*A*A-P*w*w)/(C*A*A+P*w*w)));M=T*n*A/r+(t+o)/2;E=T*-r*w/n+(e+u)/2;S=f.asin(((e-E)/r).toFixed(9));O=f.asin(((u-E)/r).toFixed(9));S=t<M?l-S:S;O=o<M?l-O:O;if(S<0)S=l*2+S;if(O<0)O=l*2+O;if(a&&S>O){S=S-l*2}if(!a&&O>S){O=O-l*2}}else{S=h[0];O=h[1];M=h[2];E=h[3]}R=O-S;if(p(R)>d){I=O;N=o;B=u;O=S+d*(a&&O>S?1:-1);o=M+n*f.cos(O);u=E+r*f.sin(O);v=c(o,u,n,r,i,0,a,N,B,[O,I,M,E])}R=O-S;k=f.cos(S);V=f.sin(S);L=f.cos(O);F=f.sin(O);D=f.tan(R/4);U=4/3*n*D;H=4/3*r*D;G=[t,e];K=[t+U*V,e-H*k];X=[o+U*F,u-H*L];z=[o,u];K[0]=2*G[0]-K[0];K[1]=2*G[1]-K[1];if(h){return[K,X,z].concat(v)}else{v=[K,X,z].concat(v).join().split(",");j=[];for(q=0,Y=v.length;q<Y;q++){j[q]=q%2?m(v[q-1],v[q],g).y:m(v[q],v[q+1],g).x}return j}}function l(t,e,n,r,i,s){var a=1/3,o=2/3;return[a*t+o*n,a*e+o*r,a*i+o*n,a*s+o*r,i,s]}s.pathToCurve=f(function(t){var e,n,r,i;var a,o,u,h,f,p;var d,g;var v=[];if(!t.isAbsolute)t=s.pathToAbsolute(t);for(e=0;e<t.length;e++){r=t[e][0];i=t[e].slice(1);if(r=="M"){a=f=o=i;v.push(t[e]);continue}if(r=="Z"){h=true;r="L";i=a}u=i.slice(i.length-2);if(r=="H"){u=[i[0],o[1]];r="L"}if(r=="V"){u=[o[0],i[0]];r="L"}if(r=="S"||r=="T"){p=[o[0]+(o[0]-f[0]),o[1]+(o[1]-f[1])]}switch(r){case"L":d=o;g=u;break;case"C":d=i.slice(0,2);g=i.slice(2,4);break;case"S":d=p.slice();g=i.slice(0,2);break;case"Q":f=i.slice(0,2);i=l.apply(null,o.concat(i));d=i.slice(0,2);g=i.slice(2,4);break;case"T":i=l.apply(null,o.concat(p).concat(i));d=i.slice(0,2);g=i.slice(2,4);break;case"A":i=c.apply(null,o.concat(i));n=0;while(n in i){d=i.slice(n,n+2);g=i.slice(n+2,n+4);u=i.slice(n+4,n+6);v.push(["C"].concat(d).concat(g).concat(u));n+=6}break}if(r!="A"){v.push(["C"].concat(d).concat(g).concat(u))}o=u;if(r!="Q"){f=g}if(h){v.push(["Z"]);h=false}}v.isUniform=true;v.isAbsolute=true;v.isCurve=true;v.toString=s.pathToString;return v});function p(t,e){function n(t){return function(e,n){return e+t*(n-e)}}var r=n(e||.5),i=t,s=i[0],a=i[1],o=i[2],u=i[3],h=i[4],f=i[5],c=i[6],l=i[7],p=r(s,o),d=r(a,u),g=r(o,h),v=r(u,f),_=r(h,c),m=r(f,l),y=r(p,g),b=r(d,v),x=r(g,_),w=r(v,m),A=r(y,x),C=r(b,w);return[[s,a,p,d,y,b,A,C],[A,C,x,w,_,m,c,l]]}s.cutBezier=f(p);s.subBezier=function(t,e,n){var r=p(t,e)[0];return n?p(r,n/e)[1]:r};s.pointAtBezier=function(t,e){var i=p(t,e)[0];var a=n.parse(i.slice(6)),o=n.parse(i.slice(4,2)),u=r.fromPoints(o,a);if(e===0){a.tan=s.pointAtBezier(t,.01).tan}else{a.tan=u.normalize()}return a};s.bezierLength=f(function t(e){function n(t){var e=f*Math.pow(t,4)+c*Math.pow(t,3)+l*Math.pow(t,2)+p*t+d;if(e<0){e=0}return Math.pow(e,.5)}var r=e;var i,s,a;var o,u,h;var f,c,l,p,d;i=-3*r[0]+9*r[2]-9*r[4]+3*r[6];s=6*r[0]-12*r[2]+6*r[4];a=-3*r[0]+3*r[2];o=-3*r[1]+9*r[3]-9*r[5]+3*r[7];u=6*r[1]-12*r[3]+6*r[5];h=-3*r[1]+3*r[3];f=Math.pow(i,2)+Math.pow(o,2);c=2*(i*s+o*u);l=2*(i*a+o*h)+Math.pow(s,2)+Math.pow(u,2);p=2*(s*a+u*h);d=Math.pow(a,2)+Math.pow(h,2);return(n(0)+n(1)+4*(n(.125)+n(.375)+n(.625)+n(.875))+2*(n(.25)+n(.5)+n(.75)))/24});var d=f(function(t){var e,n,r,i,a,o,u;o=[];u=0;for(e=0,n=t.length;e<n;e++){r=t[e];if(r[0]=="M"){i=r.slice(1);o.push(null);continue}if(r[0]=="Z"){o.push(null);continue}a=s.bezierLength(i.concat(r.slice(1)));o.push([u,u+a]);u+=a;i=r.slice(4)}o.totalLength=u;return o});s.subPath=function(t,e,n){var r;n=n||0;r=e-n;r=r-(r|0);n=n-(n|0);e=n+r;if(e>1){return s.subPath(t,1,n).concat(s.subPath(t,e-1))}if(!t.isCurve){t=s.pathToCurve(t)}var i=d(t);var a=i.totalLength;var o=a*e,u=a*(n||0);var h=[];var f,c,l,p,g;var v;var _,m,y;for(f=0,c=t.length;f<c;f++){if(t[f][0]=="M"){v=t[f].slice(1);if(y){h.push(t[f].slice())}continue}if(t[f][0]=="Z"){continue}l=i[f][0];p=i[f][1];g=p-l;_=v.concat(t[f].slice(1));if(u>p){v=_.slice(_.length-2);continue}else if(u>=l){m=s.subBezier(_,Math.min((o-l)/g,1),(u-l)/g);y=true;v=m.slice(0,2);h.push(["M"].concat(m.slice(0,2)));h.push(["C"].concat(m.slice(2)))}else if(o>=p){h.push(t[f].slice())}else if(o>=l){m=s.subBezier(_,(o-l)/g);h.push(["C"].concat(m.slice(2)));y=false}else{break}v=_.slice(_.length-2)}h.isAbsolute=true;h.isCurve=true;h.isUniform=true;h.toString=s.pathToString;return h};s.pointAtPath=function(t,e){if(!t.isCurve){t=s.pathToCurve(t)}var i=s.subPath(t,e);var a=i[i.length-1][0]=="Z"?i[i.length-2]:i[i.length-1];a=a.slice(1);var o=n.parse(a.slice(4)),u=n.parse(a.slice(2,4));o.tan=r.fromPoints(u,o).normalize();return o};s.pathLength=f(function(t){if(!t.isCurve){t=s.pathToCurve(t)}var e=d(t);return e.totalLength});s.pathKeyPoints=f(function(t){var e,n,r,i;if(!t.isCurve){t=s.pathToCurve(t)}i=[];for(e=0,n=t.length;e<n;e++){if(t[e][0]=="z")continue;i.push(t[e].slice(t[e].length-2))}return i});var g=f(function(t,e){if(!t.isCurve)t=s.pathToCurve(t);if(!e.isCurve)e=s.pathToCurve(e);var n=h(t);var r=h(e);n.i=0;r.i=0;n.o=r;r.o=n;function i(t,e){return t[e||t.i]&&t[e||t.i][0]}function a(t,e){return t[e||t.i]&&t[e||t.i].slice(1)}function o(t,e){var n=a(t,e);return n&&n.slice(-2)}function u(t){if(i(t)=="Z"){t.splice(t.i,1);return true}return false}function f(t){if(i(t)=="M"){t.o.splice(t.o.i,0,["M"].concat(o(t.o,t.o.i-1)));t.i++;t.o.i++;return true}return false}function c(t){var e;var n=1;while(!e){e=o(t,t.length-n++)}t.o.i=t.i;while(t.length<t.o.length){if(u(t.o))continue;if(f(t.o))continue;t.push(["C"].concat(e).concat(e).concat(e));t.i++;t.o.i++}}while(n.i<n.length&&r.i<r.length){if(u(n)||u(r))continue;if(i(n)==i(r)){n.i++;r.i++;continue}if(f(n)||f(r))continue;n.i++;r.i++}if(n.i==n.length)c(n);if(r.i==r.length)c(r);delete n.i;delete n.o;delete r.i;delete r.o;return[n,r]});s.alignCurve=g;s.pathTween=function(t,e,n){if(n===0)return t;if(n===1)return e;var r=g(t,e);var i=[],s,a,o;t=r[0];e=r[1];for(a=0;a<t.length;a++){i.push(s=[]);s.push(t[a][0]);for(o=1;o<t[a].length;o++){s.push(t[a][o]+n*(e[a][o]-t[a][o]))}}i.isUniform=i.isCurve=i.isAbsolute=true;return i};s.transformPath=f(function(t,e){var r,i,a,o,u,h;if(!t.isCurve){t=s.pathToCurve(t)}o=[];for(r=0,i=t.length;r<i;r++){o.push(u=[t[r][0]]);for(a=1;a<t[r].length;a+=2){h=t[r].slice(a,a+2);h=e.transformPoint(n.parse(h));o.push(h)}}return o});_p.r(11).extendClass(i,{transformPath:function(t){return s.transformPath(t,this)}});return s}};_p[35]={value:function(t,e,n){var r=_p.r(67);var i=_p.r(58);var s=_p.r(28);return _p.r(11).createClass("GradientBrush",{base:i,constructor:function(t,e){this.callBase(t,e);this.stops=[]},addStop:function(t,e,n){var i=r.createNode("stop");if(!(e instanceof s)){e=s.parse(e)}if(n===undefined){n=e.get("a")}i.setAttribute("offset",t);i.setAttribute("stop-color",e.toRGB());if(n<1){i.setAttribute("stop-opacity",n)}this.node.appendChild(i);return this}})}};_p[36]={value:function(t,e,n){var r=_p.r(61);return _p.r(11).createClass("Group",{mixins:[r],base:_p.r(60),constructor:function t(){this.callBase("g")}})}};_p[37]={value:function(t,e,n){var r=_p.r(61);return _p.r(11).createClass("HyperLink",{mixins:[r],base:_p.r(60),constructor:function(t){this.callBase("a");this.setHref(t)},setHref:function(t){this.node.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t);return this},getHref:function(){return this.node.getAttributeNS("xlink:href")},setTarget:function(t){this.node.setAttribute("target",t);return this},getTarget:function(){return this.node.getAttribute("target")}})}};_p[38]={value:function(t,e,n){return _p.r(11).createClass("Image",{base:_p.r(60),constructor:function(t,e,n,r,i){this.callBase("image");this.url=t;this.width=e||0;this.height=n||0;this.x=r||0;this.y=i||0;this.update()},update:function(){this.node.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.url);this.node.setAttribute("x",this.x);this.node.setAttribute("y",this.y);this.node.setAttribute("width",this.width);this.node.setAttribute("height",this.height);return this},setUrl:function(t){this.url=t===""?null:t;return this.update()},getUrl:function(){return this.url},setWidth:function(t){this.width=t;return this.update()},getWidth:function(){return this.width},setHeight:function(t){this.height=t;return this.update()},getHeight:function(){return this.height},setX:function(t){this.x=t;return this.update()},getX:function(){return this.x},setY:function(t){this.y=t;return this.update()},getY:function(){return this.y}})}};_p[39]={value:function(t,e,n){return _p.r(11).createClass("Line",{base:_p.r(46),constructor:function(t,e,n,r){this.callBase();this.point1={x:t||0,y:e||0};this.point2={x:n||0,y:r||0};this.update()},setPoint1:function(t,e){this.point1.x=t;this.point1.y=e;return this.update()},setPoint2:function(t,e){this.point2.x=t;this.point2.y=e;return this.update()},getPoint1:function(){return{x:this.point1.x,y:this.point1.y}},getPoint2:function(){return{x:this.point2.x,y:this.point2.y}},update:function(){var t=this.getDrawer();t.clear();t.moveTo(this.point1.x,this.point1.y);t.lineTo(this.point2.x,this.point2.y);return this}})}};_p[40]={value:function(t,e,n){var r=_p.r(67);var i=_p.r(35);return _p.r(11).createClass("LinearGradientBrush",{base:i,constructor:function(t){this.callBase("linearGradient",t);this.setStartPosition(0,0);this.setEndPosition(1,0)},setStartPosition:function(t,e){this.node.setAttribute("x1",t);this.node.setAttribute("y1",e);return this},setEndPosition:function(t,e){this.node.setAttribute("x2",t);this.node.setAttribute("y2",e);return this},getStartPosition:function(){return{x:+this.node.getAttribute("x1"),y:+this.node.getAttribute("y1")}},getEndPosition:function(){return{x:+this.node.getAttribute("x2"),y:+this.node.getAttribute("y2")}}})}};_p[41]={value:function(t,e,n){var r=_p.r(50);var i=_p.r(11).createClass("Marker",{base:_p.r(58),mixins:[_p.r(61),_p.r(75)],constructor:function(){this.callBase("marker");this.setOrient("auto")},setRef:function(t,e){if(arguments.length===1){e=t.y;t=t.x}this.node.setAttribute("refX",t);this.node.setAttribute("refY",e);return this},getRef:function(){return new r(+this.node.getAttribute("refX"),+this.node.getAttribute("refY"))},setWidth:function(t){this.node.setAttribute("markerWidth",this.width=t);return this},setOrient:function(t){this.node.setAttribute("orient",this.orient=t);return this},getOrient:function(){return this.orient},getWidth:function(){return+this.width},setHeight:function(t){this.node.setAttribute("markerHeight",this.height=t);return this},getHeight:function(){return+this.height}});var s=_p.r(46);_p.r(11).extendClass(s,{setMarker:function(t,e){e=e||"end";if(!t){this.node.removeAttribute("marker-"+e)}else{this.node.setAttribute("marker-"+e,t.toString())}return this}});return i}};_p[42]={value:function(t,e,n){var r=_p.r(11);var i=_p.r(60);var s=r.createClass("Mask",{base:i,mixins:[_p.r(61)],constructor:function(){this.callBase("mask")},mask:function(t){t.getNode().setAttribute("mask","url(#"+this.getId()+")");return this}});r.extendClass(i,{maskWith:function(t){t.mask(this);return this}});return s}};_p[43]={value:function(t,e,n){var r=_p.r(12);var i=_p.r(25);var s=/matrix\s*\((.+)\)/i;var a=_p.r(50);function o(t,e){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}function u(t){return t*Math.PI/180}var h=_p.r(11).createClass("Matrix",{constructor:function(){if(arguments.length){this.setMatrix.apply(this,arguments)}else{this.setMatrix(1,0,0,1,0,0)}},translate:function(t,e){this.m=o(this.m,{a:1,c:0,e:t,b:0,d:1,f:e});return this},rotate:function(t){var e=u(t);var n=Math.sin(e),r=Math.cos(e);this.m=o(this.m,{a:r,c:-n,e:0,b:n,d:r,f:0});return this},scale:function(t,e){if(e===undefined){e=t}this.m=o(this.m,{a:t,c:0,e:0,b:0,d:e,f:0});return this},skew:function(t,e){if(e===undefined){e=t}var n=Math.tan(u(t)),r=Math.tan(u(e));this.m=o(this.m,{a:1,c:n,e:0,b:r,d:1,f:0});return this},inverse:function(){var t=this.m,e=t.a,n=t.b,r=t.c,i=t.d,s=t.e,a=t.f,o,u,f,c,l,p,d;o=e*i-n*r;u=i/o;f=-n/o;c=-r/o;l=e/o;p=(r*a-s*i)/o;d=(n*s-e*a)/o;return new h(u,f,c,l,p,d)},setMatrix:function(t,e,n,i,s,a){if(arguments.length===1){this.m=r.clone(arguments[0])}else{this.m={a:t,b:e,c:n,d:i,e:s,f:a}}return this},getMatrix:function(){return r.clone(this.m)},getTranslate:function(){var t=this.m;return{x:t.e/t.a,y:t.f/t.d}},mergeMatrix:function(t){return new h(o(this.m,t.m))},merge:function(t){return this.mergeMatrix(t)},toString:function(){return this.valueOf().join(" ")},valueOf:function(){var t=this.m;return[t.a,t.b,t.c,t.d,t.e,t.f]},equals:function(t){var e=this.m,n=t.m;return e.a==n.a&&e.b==n.b&&e.c==n.c&&e.d==n.d&&e.e==n.e&&e.f==n.f},transformPoint:function(){return h.transformPoint.apply(null,[].slice.call(arguments).concat([this.m]))},transformBox:function(t){return h.transformBox(t,this.m)},clone:function(){return new h(this.m)}});h.parse=function(t){var e;var n=parseFloat;if(t instanceof Array){return new h({a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]})}if(e=s.exec(t)){var r=e[1].split(",");if(r.length!=6){r=e[1].split(" ")}return new h({a:n(r[0]),b:n(r[1]),c:n(r[2]),d:n(r[3]),e:n(r[4]),f:n(r[5])})}return new h};h.transformPoint=function(t,e,n){if(arguments.length===2){n=e;e=t.y;t=t.x}return new a(n.a*t+n.c*e+n.e,n.b*t+n.d*e+n.f)};h.transformBox=function(t,e){var n=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,o=-Number.MAX_VALUE;var u=[[t.x,t.y],[t.x+t.width,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height]];var f,c,l=[];while(f=u.pop()){c=h.transformPoint(f[0],f[1],e);l.push(c);n=Math.min(n,c.x);s=Math.max(s,c.x);a=Math.min(a,c.y);o=Math.max(o,c.y)}t=new i({x:n,y:a,width:s-n,height:o-a});r.extend(t,{closurePoints:l});return t};h.getCTM=function(t,e){var n={a:1,b:0,c:0,d:1,e:0,f:0};var r=t.shapeNode||t.node;e=e||"parent";function i(t,e){var n;try{n=e.getScreenCTM().inverse()}catch(t){throw new Error("Can not inverse source element' ctm.")}return n.multiply(t.getScreenCTM())}switch(e){case"screen":n=r.getScreenCTM();break;case"doc":case"paper":n=r.getCTM();break;case"view":case"top":if(t.getPaper()){n=r.getTransformToElement!==undefined?r.getTransformToElement(t.getPaper().shapeNode):i(r,t.getPaper().shapeNode)}break;case"parent":if(t.node.parentNode){n=r.getTransformToElement!==undefined?r.getTransformToElement(t.node.parentNode):i(r,t.node.parentNode)}break;default:if(e.node){n=r.getTransformToElement!==undefined?r.getTransformToElement(e.shapeNode||e.node):i(r,e.shapeNode||e.node)}}return n?new h(n.a,n.b,n.c,n.d,n.e,n.f):new h};return h}};_p[44]={value:function(t,e,n){var r=_p.r(64),i=_p.r(28),s=_p.r(12);var a=_p.r(11).createClass("Palette",{constructor:function(){this.color={}},get:function(t){var e=this.color[t]||r.EXTEND_STANDARD[t]||r.COLOR_STANDARD[t]||"";if(e){return new i(e)}return null},getColorValue:function(t){return this.color[t]||r.EXTEND_STANDARD[t]||r.COLOR_STANDARD[t]||""},add:function(t,e){if(typeof e==="string"){this.color[t]=new i(e).toRGBA()}else{this.color[t]=e.toRGBA()}return e},remove:function(t){if(this.color.hasOwnProperty(t)){delete this.color[t];return true}return false}});s.extend(a,{getColor:function(t){var e=r.EXTEND_STANDARD[t]||r.COLOR_STANDARD[t];if(e){return new i(e)}return null},getColorValue:function(t){return r.EXTEND_STANDARD[t]||r.COLOR_STANDARD[t]||""},addColor:function(t,e){if(typeof e==="string"){r.EXTEND_STANDARD[t]=new i(e).toRGBA()}else{r.EXTEND_STANDARD[t]=e.toRGBA()}return e},removeColor:function(t){if(r.EXTEND_STANDARD.hasOwnProperty(t)){delete r.EXTEND_STANDARD[t];return true}return false}});return a}};_p[45]={value:function(t,e,n){var r=_p.r(11);var i=_p.r(12);var s=_p.r(67);var a=_p.r(29);var o=_p.r(61);var u=_p.r(75);var h=_p.r(33);var f=_p.r(66);var c=_p.r(43);var l=r.createClass("Paper",{mixins:[o,h,f,u],constructor:function(t){this.callBase();this.node=this.createSVGNode();this.node.paper=this;this.node.appendChild(this.resourceNode=s.createNode("defs"));this.node.appendChild(this.shapeNode=s.createNode("g"));this.resources=new a;this.setWidth("100%").setHeight("100%");if(t){this.renderTo(t)}this.callMixin()},renderTo:function(t){if(i.isString(t)){t=document.getElementById(t)}this.container=t;t.appendChild(this.node)},createSVGNode:function(){var t=s.createNode("svg");t.setAttribute("xmlns","http://www.w3.org/2000/svg");t.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");t.setAttribute("version","1.1");return t},getNode:function(){return this.node},getContainer:function(){return this.container},getWidth:function(){return this.node.clientWidth},setWidth:function(t){this.node.setAttribute("width",t);return this},getHeight:function(){return this.node.clientHeight},setHeight:function(t){this.node.setAttribute("height",t);return this},setViewPort:function(t,e,n){var r,i;if(arguments.length==1){r=arguments[0];t=r.center.x;e=r.center.y;n=r.zoom}n=n||1;i=this.getViewBox();var s=new c;var a=i.x+i.width/2-t,o=i.y+i.height/2-e;s.translate(-t,-e);s.scale(n);s.translate(t,e);s.translate(a,o);this.shapeNode.setAttribute("transform","matrix("+s+")");this.viewport={center:{x:t,y:e},offset:{x:a,y:o},zoom:n};return this},getViewPort:function(){if(!this.viewport){var t=this.getViewBox();return{zoom:1,center:{x:t.x+t.width/2,y:t.y+t.height/2},offset:{x:0,y:0}}}return this.viewport},getViewPortMatrix:function(){return c.parse(this.shapeNode.getAttribute("transform"))},getViewPortTransform:function(){var t=this.shapeNode.getCTM();return new c(t.a,t.b,t.c,t.d,t.e,t.f)},getTransform:function(){return this.getViewPortTransform().reverse()},addResource:function(t){this.resources.appendItem(t);if(t.node){this.resourceNode.appendChild(t.node)}return this},removeResource:function(t){if(t.remove){t.remove()}if(t.node){this.resourceNode.removeChild(t.node)}return this},getPaper:function(){return this}});var p=_p.r(60);r.extendClass(p,{getPaper:function(){var t=this.container;while(t&&t instanceof l===false){t=t.container}return t},isAttached:function(){return!!this.getPaper()},whenPaperReady:function(t){var e=this;function n(){var n=e.getPaper();if(n&&t){t.call(e,n)}return n}if(!n()){this.on("add treeadd",function t(){if(n()){e.off("add",t);e.off("treeadd",t)}})}return this}});return l}};_p[46]={value:function(t,e,n){var r=_p.r(12);var i=_p.r(11).createClass;var s=_p.r(60);var a=_p.r(67);var o=_p.r(34);var u=Array.prototype.slice,h=r.flatten;var f=i("PathDrawer",{constructor:function(t){this.segment=[];this.path=t;this.__clear=false},getPath:function(){return this.path},redraw:function(){this._transation=this._transation||[];return this.clear()},done:function(){var t=this._transation;this._transation=null;this.push(t);return this},clear:function(){if(this._transation){this._transation=[]}else{this.path.setPathData("M 0 0")}this._clear=true;return this},push:function(){var t=u.call(arguments);var e;if(this._transation){this._transation.push(t);return this}if(this._clear){e="";this._clear=false}else{e=this.path.getPathData()}e=e||"";this.path.setPathData(e+o.pathToString(t));return this},moveTo:function(t,e){return this.push("M",u.call(arguments))},moveBy:function(t,e){return this.push("m",u.call(arguments))},lineTo:function(t,e){return this.push("L",u.call(arguments))},lineBy:function(t,e){return this.push("l",u.call(arguments))},arcTo:function(t,e,n,r,i,s,a){return this.push("A",u.call(arguments))},arcBy:function(t,e,n,r,i,s,a){return this.push("a",arguments)},carcTo:function(t,e,n,r,i){return this.push("A",[t,t,0].concat(u.call(arguments,1)))},carcBy:function(t,e,n,r,i){return this.push("a",[t,t,0].concat(u.call(arguments,1)))},bezierTo:function(t,e,n,r,i,s){return this.push("C",u.call(arguments))},bezierBy:function(t,e,n,r,i,s){return this.push("c",u.call(arguments))},close:function(){return this.push("z")}});return i("Path",{base:s,constructor:function(t){this.callBase("path");if(t){this.setPathData(t)}this.node.setAttribute("fill",a.defaults.fill);this.node.setAttribute("stroke",a.defaults.stroke)},setPathData:function(t){t=t||"M0,0";this.pathdata=o.pathToString(t);this.node.setAttribute("d",this.pathdata);this.trigger("shapeupdate",{type:"pathdata"});return this;
- },getPathData:function(){return this.pathdata||""},getDrawer:function(){return new f(this)},isClosed:function(){var t=this.getPathData();return!!~t.indexOf("z")||!!~t.indexOf("Z")}})}};_p[47]={value:function(t,e,n){var r=_p.r(58);var i=_p.r(61);var s=_p.r(67);return _p.r(11).createClass("PatternBrush",{base:r,mixins:[i],constructor:function(t){this.callBase("pattern",t);this.node.setAttribute("patternUnits","userSpaceOnUse")},setX:function(t){this.x=t;this.node.setAttribute("x",t);return this},setY:function(t){this.y=t;this.node.setAttribute("y",t);return this},setWidth:function(t){this.width=t;this.node.setAttribute("width",t);return this},setHeight:function(t){this.height=t;this.node.setAttribute("height",t);return this},getWidth:function(){return this.width},getHeight:function(){return this.height}})}};_p[48]={value:function(t,e,n){var r=_p.r(28);return _p.r(11).createClass("Pen",{constructor:function(t,e){this.brush=t;this.width=e||1;this.linecap=null;this.linejoin=null;this.dashArray=null;this.opacity=1},getBrush:function(){return this.brush},setBrush:function(t){this.brush=t;return this},setColor:function(t){return this.setBrush(t)},getColor:function(){return this.brush instanceof r?this.brush:null},getWidth:function(){return this.width},setWidth:function(t){this.width=t;return this},getOpacity:function(){return this.opacity},setOpacity:function(t){this.opacity=t},getLineCap:function(){return this.linecap},setLineCap:function(t){this.linecap=t;return this},getLineJoin:function(){return this.linejoin},setLineJoin:function(t){this.linejoin=t;return this},getDashArray:function(){return this.dashArray},setDashArray:function(t){this.dashArray=t;return this},stroke:function(t){var e=t.node;e.setAttribute("stroke",this.brush.toString());e.setAttribute("stroke-width",this.getWidth());if(this.getOpacity()<1){e.setAttribute("stroke-opacity",this.getOpacity())}if(this.getLineCap()){e.setAttribute("stroke-linecap",this.getLineCap())}if(this.getLineJoin()){e.setAttribute("stroke-linejoin",this.getLineJoin())}if(this.getDashArray()){e.setAttribute("stroke-dasharray",this.getDashArray())}}})}};_p[49]={value:function(t,e,n){return _p.r(11).createClass({base:_p.r(68),constructor:function(t,e,n){this.callBase([0,t],e,n)},getRadius:function(){return this.getSectionArray()[1]},setRadius:function(t){this.setSectionArray([0,t])}})}};_p[50]={value:function(t,e,n){var r=_p.r(11).createClass("Point",{constructor:function(t,e){this.x=t||0;this.y=e||0},offset:function(t,e){if(arguments.length==1){e=t.y;t=t.x}return new r(this.x+t,this.y+e)},valueOf:function(){return[this.x,this.y]},toString:function(){return this.valueOf().join(" ")},spof:function(){return new r((this.x|0)+.5,(this.y|0)+.5)},round:function(){return new r(this.x|0,this.y|0)},isOrigin:function(){return this.x===0&&this.y===0}});r.fromPolar=function(t,e,n){if(n!="rad"){e=e/180*Math.PI}return new r(t*Math.cos(e),t*Math.sin(e))};r.parse=function(t){if(!t)return new r;if(t instanceof r){return t}if(typeof t=="string"){return r.parse(t.split(/\s*[\s,]\s*/))}if("0"in t&&"1"in t){return new r(t[0],t[1])}};return r}};_p[51]={value:function(t,e,n){return _p.r(11).createClass("PointContainer",{base:_p.r(29),constructor:function(){this.callBase()},addPoint:function(t,e){return this.addItem.apply(this,arguments)},prependPoint:function(){return this.prependItem.apply(this,arguments)},appendPoint:function(){return this.appendItem.apply(this,arguments)},removePoint:function(t){return this.removeItem.apply(this,arguments)},addPoints:function(){return this.addItems.apply(this,arguments)},setPoints:function(){return this.setItems.apply(this,arguments)},getPoint:function(){return this.getItem.apply(this,arguments)},getPoints:function(){return this.getItems.apply(this,arguments)},getFirstPoint:function(){return this.getFirstItem.apply(this,arguments)},getLastPoint:function(){return this.getLastItem.apply(this,arguments)}})}};_p[52]={value:function(t,e,n){var r=_p.r(12);return _p.r(11).createClass("Poly",{base:_p.r(46),mixins:[_p.r(51)],constructor:function(t,e){this.callBase();this.closeable=!!e;this.setPoints(t||[]);this.changeable=true;this.update()},onContainerChanged:function(){if(this.changeable){this.update()}},update:function(){var t=this.getDrawer(),e=this.getPoints();t.clear();if(!e.length){return this}t.moveTo(e[0]);for(var n=1,r,i=e.length;n<i;n++){r=e[n];t.lineTo(r)}if(this.closeable&&e.length>2){t.close()}return this}})}};_p[53]={value:function(t,e,n){return _p.r(11).createClass("Polygon",{base:_p.r(52),constructor:function(t){this.callBase(t,true)}})}};_p[54]={value:function(t,e,n){return _p.r(11).createClass("Polyline",{base:_p.r(52),constructor:function(t){this.callBase(t)}})}};_p[55]={value:function(t,e,n){var r=_p.r(35);return _p.r(11).createClass("RadialGradientBrush",{base:r,constructor:function(t){this.callBase("radialGradient",t);this.setCenter(.5,.5);this.setFocal(.5,.5);this.setRadius(.5)},setCenter:function(t,e){this.node.setAttribute("cx",t);this.node.setAttribute("cy",e);return this},getCenter:function(){return{x:+this.node.getAttribute("cx"),y:+this.node.getAttribute("cy")}},setFocal:function(t,e){this.node.setAttribute("fx",t);this.node.setAttribute("fy",e);return this},getFocal:function(){return{x:+this.node.getAttribute("fx"),y:+this.node.getAttribute("fy")}},setRadius:function(t){this.node.setAttribute("r",t);return this},getRadius:function(){return+this.node.getAttribute("r")}})}};_p[56]={value:function(t,e,n){var r={},i=_p.r(12),s=_p.r(50),a=_p.r(25);i.extend(r,{formatRadius:function(t,e,n){var r=Math.floor(Math.min(t/2,e/2));return Math.min(r,n)}});var o=_p.r(11).createClass("Rect",{base:_p.r(46),constructor:function(t,e,n,i,s){this.callBase();this.x=n||0;this.y=i||0;this.width=t||0;this.height=e||0;this.radius=r.formatRadius(this.width,this.height,s||0);this.update()},update:function(){var t=this.x,e=this.y,n=this.width,r=this.height,i=this.radius;var s=this.getDrawer().redraw();if(!i){s.push("M",t,e);s.push("h",n);s.push("v",r);s.push("h",-n);s.push("z")}else{n-=2*i;r-=2*i;s.push("M",t+i,e);s.push("h",n);s.push("a",i,i,0,0,1,i,i);s.push("v",r);s.push("a",i,i,0,0,1,-i,i);s.push("h",-n);s.push("a",i,i,0,0,1,-i,-i);s.push("v",-r);s.push("a",i,i,0,0,1,i,-i);s.push("z")}s.done();return this},setWidth:function(t){this.width=t;return this.update()},setHeight:function(t){this.height=t;return this.update()},setSize:function(t,e){this.width=t;this.height=e;return this.update()},setBox:function(t){this.x=t.x;this.y=t.y;this.width=t.width;this.height=t.height;return this.update()},getBox:function(){return new a(this.x,this.y,this.width,this.height)},getRadius:function(){return this.radius},setRadius:function(t){this.radius=r.formatRadius(this.width,this.height,t||0);return this.update()},getPosition:function(){return new s(this.x,this.y)},setPosition:function(t,e){if(arguments.length==1){var n=s.parse(arguments[0]);e=n.y;t=n.x}this.x=t;this.y=e;return this.update()},getWidth:function(){return this.width},getHeight:function(){return this.height},getPositionX:function(){return this.x},getPositionY:function(){return this.y},setPositionX:function(t){this.x=t;return this.update()},setPositionY:function(t){this.y=t;return this.update()}});return o}};_p[57]={value:function(t,e,n){var r=_p.r(50);return _p.r(11).createClass("RegularPolygon",{base:_p.r(46),constructor:function(t,e,n,i){this.callBase();this.radius=e||0;this.side=Math.max(t||3,3);if(arguments.length>2){if(arguments.length==3){i=n.y;n=n.x}}this.center=new r(n,i);this.draw()},getSide:function(){return this.side},setSide:function(t){this.side=t;return this.draw()},getRadius:function(){return this.radius},setRadius:function(t){this.radius=t;return this.draw()},draw:function(){var t=this.radius,e=this.side,n=Math.PI*2/e,i=this.getDrawer(),s;i.clear();i.moveTo(r.fromPolar(t,Math.PI/2,"rad").offset(this.center));for(s=0;s<=e;s++){i.lineTo(r.fromPolar(t,n*s+Math.PI/2,"rad").offset(this.center))}i.close();return this}})}};_p[58]={value:function(t,e,n){var r=_p.r(67);return _p.r(11).createClass("Resource",{constructor:function(t,e){this.callBase();this.node=r.createNode(t);if(e){e.addResource(this)}},toString:function(){return"url(#"+this.node.id+")"}})}};_p[59]={value:function(t,e,n){return _p.r(11).createClass({base:_p.r(68),constructor:function(t,e){this.callBase([t,e],360,0)},getInnerRadius:function(){return this.getSectionArray()[0]},getOuterRadius:function(){return this.getSectionArray()[1]},setInnerRadius:function(t){this.setSectionArray([t,this.getOuterRadius()])},setOuterRadius:function(t){this.setSectionArray([this.getInnerRadius(),t])}})}};_p[60]={value:function(t,e,n){var r=_p.r(67);var i=_p.r(12);var s=_p.r(33);var a=_p.r(66);var o=_p.r(31);var u=_p.r(43);var h=_p.r(48);var f=Array.prototype.slice;var c=_p.r(25);var l=_p.r(11).createClass("Shape",{mixins:[s,a,o],constructor:function t(e){this.node=r.createNode(e);this.node.shape=this;this.transform={translate:null,rotate:null,scale:null,matrix:null};this.callMixin()},getId:function(){return this.node.id},setId:function(t){this.node.id=t;return this},getNode:function(){return this.node},getBoundaryBox:function(){var t;try{t=this.node.getBBox()}catch(e){t={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}return new c(t)},getRenderBox:function(t){var e=this.getBoundaryBox();var n=this.getTransform(t);return n.transformBox(e)},getWidth:function(){return this.getRenderBox().width},getHeight:function(){return this.getRenderBox().height},getSize:function(){var t=this.getRenderBox();delete t.x;delete t.y;return t},setOpacity:function(t){this.node.setAttribute("opacity",t);return this},getOpacity:function(){var t=this.node.getAttribute("opacity");return t?+t:1},setVisible:function(t){if(t){this.node.removeAttribute("display")}else{this.node.setAttribute("display","none")}return this},getVisible:function(){this.node.getAttribute("display")},hasAncestor:function(t){var e=this.container;while(e){if(e===t){return true}e=e.container}return false},getTransform:function(t){return u.getCTM(this,t)},clearTransform:function(){this.node.removeAttribute("transform");this.transform={translate:null,rotate:null,scale:null,matrix:null};this.trigger("shapeupdate",{type:"transform"});return this},_applyTransform:function(){var t=this.transform,e=[];if(t.translate){e.push(["translate(",t.translate,")"])}if(t.rotate){e.push(["rotate(",t.rotate,")"])}if(t.scale){e.push(["scale(",t.scale,")"])}if(t.matrix){e.push(["matrix(",t.matrix,")"])}this.node.setAttribute("transform",i.flatten(e).join(" "));return this},setMatrix:function(t){this.transform.matrix=t;return this._applyTransform()},setTranslate:function(t){this.transform.translate=t!==null&&f.call(arguments)||null;return this._applyTransform()},setRotate:function(t){this.transform.rotate=t!==null&&f.call(arguments)||null;return this._applyTransform()},setScale:function(t){this.transform.scale=t!==null&&f.call(arguments)||null;return this._applyTransform()},translate:function(t,e){var n=this.transform.matrix||new u;if(e===undefined){e=0}this.transform.matrix=n.translate(t,e);return this._applyTransform()},rotate:function(t){var e=this.transform.matrix||new u;this.transform.matrix=e.rotate(t);return this._applyTransform()},scale:function(t,e){var n=this.transform.matrix||new u;if(e===undefined){e=t}this.transform.matrix=n.scale(t,e);return this._applyTransform()},skew:function(t,e){var n=this.transform.matrix||new u;if(e===undefined){e=t}this.transform.matrix=n.skew(t,e);return this._applyTransform()},stroke:function(t,e){if(t&&t.stroke){t.stroke(this)}else if(t){this.node.setAttribute("stroke",t.toString());if(e){this.node.setAttribute("stroke-width",e)}}else if(t===null){this.node.removeAttribute("stroe")}return this},fill:function(t){if(t){this.node.setAttribute("fill",t.toString())}if(t===null){this.node.removeAttribute("fill")}return this},setAttr:function(t,e){var n=this;if(i.isObject(t)){i.each(t,function(t,e){n.setAttr(e,t)})}if(e===undefined||e===null||e===""){this.node.removeAttribute(t)}else{this.node.setAttribute(t,e)}return this},getAttr:function(t){return this.node.getAttribute(t)}});return l}};_p[61]={value:function(t,e,n){var r=_p.r(29);var i=_p.r(12);var s=_p.r(11).createClass("ShapeContainer",{base:r,isShapeContainer:true,handleAdd:function(t,e){var n=this.getShapeNode();n.insertBefore(t.node,n.childNodes[e]||null);t.trigger("add",{container:this});if(t.notifyTreeModification){t.notifyTreeModification("treeadd",this)}},handleRemove:function(t,e){var n=this.getShapeNode();n.removeChild(t.node);t.trigger("remove",{container:this});if(t.notifyTreeModification){t.notifyTreeModification("treeremove",this)}},notifyTreeModification:function(t,e){this.eachItem(function(n,r){if(r.notifyTreeModification){r.notifyTreeModification(t,e)}r.trigger(t,{container:e})})},getShape:function(t){return this.getItem(t)},addShape:function(t,e){return this.addItem(t,e)},put:function(t){this.addShape(t);return t},appendShape:function(t){return this.addShape(t)},prependShape:function(t){return this.addShape(t,0)},replaceShape:function(t,e){var n=this.indexOf(e);if(n===-1){return}this.removeShape(n);this.addShape(t,n);return this},addShapeBefore:function(t,e){var n=this.indexOf(e);return this.addShape(t,n)},addShapeAfter:function(t,e){var n=this.indexOf(e);return this.addShape(t,n===-1?undefined:n+1)},addShapes:function(t){return this.addItems(t)},removeShape:function(t){return this.removeItem(t)},getShapes:function(){return this.getItems()},getShapesByType:function(t){var e=[];function n(r){if(t.toLowerCase()==r.getType().toLowerCase()){e.push(r)}if(r.isShapeContainer){i.each(r.getShapes(),function(t){n(t)})}}n(this);return e},getShapeById:function(t){return this.getShapeNode().getElementById(t).shape},arrangeShape:function(t,e){return this.removeShape(t).addShape(t,e)},getShapeNode:function(){return this.shapeNode||this.node}});var a=_p.r(60);_p.r(11).extendClass(a,{bringTo:function(t){this.container.arrangeShape(this,t);return this},bringFront:function(){return this.bringTo(this.container.indexOf(this)+1)},bringBack:function(){return this.bringTo(this.container.indexOf(this)-1)},bringTop:function(){this.container.removeShape(this).addShape(this);return this},bringRear:function(){return this.bringTo(0)},bringRefer:function(t,e){if(t.container){if(this.remove){this.remove()}t.container.addShape(this,t.container.indexOf(t)+(e||0))}return this},bringAbove:function(t){return this.bringRefer(t)},bringBelow:function(t){return this.bringRefer(t,1)},replaceBy:function(t){if(this.container){t.bringAbove(this);this.remove()}return this}});return s}};_p[62]={value:function(t,e,n){var r=_p.r(43),i=_p.r(12),s=_p.r(50);return _p.r(11).createClass("ShapeEvent",{constructor:function(t){var e=null;if(!i.isObject(t.target)){this.type=t.type;e=t.target;if(e.correspondingUseElement){e=e.correspondingUseElement}this.originEvent=t;this.targetShape=e.shape||e.paper||t.currentTarget&&(t.currentTarget.shape||t.currentTarget.paper);if(t._kityParam){i.extend(this,t._kityParam)}}else{i.extend(this,t)}},preventDefault:function(){var t=this.originEvent;if(!t){return true}if(t.preventDefault){t.preventDefault();return t.cancelable}else{t.returnValue=false;return true}},getPosition:function(t,e){if(!this.originEvent){return null}var n=this.originEvent.touches?this.originEvent.touches[e||0]:this.originEvent;var i=this.targetShape;var a=i.shapeNode||i.node;var o=new s(n&&n.clientX||0,n&&n.clientY||0);var u=r.transformPoint(o,a.getScreenCTM().inverse());var h=r.getCTM(i,t||"view").transformPoint(u);return h},stopPropagation:function(){var t=this.originEvent;if(!t){return true}if(t.stopPropagation){t.stopPropagation()}else{t.cancelBubble=false}}})}};_p[63]={value:function(t,e,n){return _p.r(11).createClass("ShapePoint",{base:_p.r(50),constructor:function(t,e){this.callBase(t,e)},setX:function(t){return this.setPoint(t,this.y)},setY:function(t){return this.setPoint(this.x,t)},setPoint:function(t,e){this.x=t;this.y=e;this.update();return this},getPoint:function(){return this},update:function(){if(this.container&&this.container.update){this.container.update()}return this}})}};_p[64]={value:{COLOR_STANDARD:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00"},EXTEND_STANDARD:{}}};_p[65]={value:function(t,e,n){var r={3:.2,5:.38196601125,6:.57735026919,8:.541196100146,10:.726542528005,12:.707106781187};var i=_p.r(50);return _p.r(11).createClass("Star",{base:_p.r(46),constructor:function(t,e,n,r,s){this.callBase();this.vertex=t||3;this.radius=e||0;this.shrink=n;this.offset=r||new i(0,0);this.angleOffset=s||0;this.draw()},getVertex:function(){return this.vertex},setVertex:function(t){this.vertex=t;return this.draw()},getRadius:function(){return this.radius},setRadius:function(t){this.radius=t;return this.draw()},getShrink:function(){return this.shrink},setShrink:function(t){this.shrink=t;return this.draw()},getOffset:function(){return this.offset},setOffset:function(t){this.offset=t;return this.draw()},getAngleOffset:function(){return this.angleOffset},setAngleOffset:function(t){this.angleOffset=t;return this.draw()},draw:function(){var t=this.radius,e=this.radius*(this.shrink||r[this.vertex]||.5),n=this.vertex,s=this.offset,a=90,o=180/n,u=this.angleOffset,h=this.getDrawer(),f,c;h.clear();h.moveTo(i.fromPolar(e,a));for(f=1;f<=n*2;f++){c=a+o*f;if(f%2){h.lineTo(i.fromPolar(t,c+u).offset(s))}else{h.lineTo(i.fromPolar(e,c))}}h.close()}})}};_p[66]={value:function(t,e,n){var r=_p.r(11).createClass("ClassList",{constructor:function(t){this._node=t;this._list=t.className.toString().split(" ")},_update:function(){this._node.className=this._list.join(" ")},add:function(t){this._list.push(t);this._update()},remove:function(t){var e=this._list.indexOf(t);if(~e){this._list.splice(e,1)}this._update()},contains:function(t){return!!~this._list.indexOf(t)}});function i(t){if(!t.classList){t.classList=new r(t)}return t.classList}return _p.r(11).createClass("Styled",{addClass:function(t){i(this.node).add(t);return this},removeClass:function(t){i(this.node).remove(t);return this},hasClass:function(t){return i(this.node).contains(t)},setStyle:function(t){if(arguments.length==2){this.node.style[arguments[0]]=arguments[1];return this}for(var e in t){if(t.hasOwnProperty(e)){this.node.style[e]=t[e]}}return this}})}};_p[67]={value:function(t,e,n){var r=document;var i=0;var s={createNode:function(t){var e=r.createElementNS(s.ns,t);e.id="kity_"+t+"_"+i++;return e},defaults:{stroke:"none",fill:"none"},xlink:"http://www.w3.org/1999/xlink",ns:"http://www.w3.org/2000/svg"};return s}};_p[68]={value:function(t,e,n){var r=_p.r(50);return _p.r(11).createClass("Sweep",{base:_p.r(46),constructor:function(t,e,n){this.callBase();this.sectionArray=t||[];this.angle=e||0;this.angleOffset=n||0;this.draw()},getSectionArray:function(){return this.sectionArray},setSectionArray:function(t){this.sectionArray=t;return this.draw()},getAngle:function(){return this.angle},setAngle:function(t){this.angle=t;return this.draw()},getAngleOffset:function(){return this.angleOffset},setAngleOffset:function(t){this.angleOffset=t;return this.draw()},draw:function(){var t=this.sectionArray,e;for(e=0;e<t.length;e+=2){this.drawSection(t[e],t[e+1])}return this},drawSection:function(t,e){var n=this.angle&&(this.angle%360?this.angle%360:360),i=this.angleOffset,s=i+n/2,a=i+n,o=n<0?0:1,u=this.getDrawer();u.redraw();if(n===0){u.done();return}u.moveTo(r.fromPolar(t,i));u.lineTo(r.fromPolar(e,i));if(e){u.carcTo(e,0,o,r.fromPolar(e,s));u.carcTo(e,0,o,r.fromPolar(e,a))}u.lineTo(r.fromPolar(t,a));if(t){u.carcTo(t,0,o,r.fromPolar(t,s));u.carcTo(t,0,o,r.fromPolar(t,i))}u.close();u.done()}})}};_p[69]={value:function(t,e,n){var r=_p.r(70);var i=_p.r(61);var s=_p.r(67);var a=_p.r(12);var o={};function u(t){var e=t._cachedFontHash;if(o[e]){return o[e]}var n=t.getContent();t.setContent("脑图");var r=t.getBoundaryBox(),i=t.getY();if(!r.height)return{top:0,bottom:0,middle:0};var s=i-r.y+ +t.node.getAttribute("dy"),a=s-r.height;t.setContent(n);return o[e]={top:s,bottom:a,middle:(s+a)/2}}return _p.r(11).createClass("Text",{base:r,mixins:[i],constructor:function(t){this.callBase("text");if(t!==undefined){this.setContent(t)}this._buildFontHash()},fixPosition:function(){if(!this.__fixedPosition){this.setVerticalAlign(this.getVerticalAlign())}},_buildFontHash:function(){var t=window.getComputedStyle(this.node);this._cachedFontHash=[t.fontFamily,t.fontSize,t.fontStretch,t.fontStyle,t.fontVariant,t.fontWeight].join("-")},_fontChanged:function(t){var e=this._lastFont;var n=a.extend({},e,t);if(!e){this._lastFont=t;return true}var r=e.family!=n.family||e.size!=n.size||e.style!=n.style||e.weight!=n.weight;this._lastFont=n;return r},setX:function(t){this.node.setAttribute("x",t);return this},setPosition:function(t,e){return this.setX(t).setY(e)},setY:function(t){this.node.setAttribute("y",t);return this},getX:function(){return+this.node.getAttribute("x")||0},getY:function(){return+this.node.getAttribute("y")||0},setFont:function(t){this.callBase(t);if(this._fontChanged(t)){this._buildFontHash();this.setVerticalAlign(this.getVerticalAlign())}return this},setTextAnchor:function(t){this.node.setAttribute("text-anchor",t);return this},getTextAnchor:function(){return this.node.getAttribute("text-anchor")||"start"},setVerticalAlign:function(t){this.whenPaperReady(function(){var e;switch(t){case"top":e=u(this).top;break;case"bottom":e=u(this).bottom;break;case"middle":e=u(this).middle;break;default:e=0}if(e)this.__fixedPosition=true;this.node.setAttribute("dy",e)});this.verticalAlign=t;return this},getVerticalAlign:function(){return this.verticalAlign||"baseline"},setStartOffset:function(t){if(this.shapeNode!=this.node){this.shapeNode.setAttribute("startOffset",t*100+"%")}},addSpan:function(t){this.addShape(t);return this},setPath:function(t){var e=this.shapeNode;if(this.shapeNode==this.node){e=this.shapeNode=s.createNode("textPath");while(this.node.firstChild){this.shapeNode.appendChild(this.node.firstChild)}this.node.appendChild(e)}e.setAttributeNS(s.xlink,"xlink:href","#"+t.node.id);this.setTextAnchor(this.getTextAnchor());return this}})}};_p[70]={value:function(t,e,n){var r=_p.r(60);return _p.r(11).createClass("TextContent",{base:r,constructor:function(t){this.callBase(t);this.shapeNode=this.shapeNode||this.node;this.shapeNode.setAttribute("text-rendering","geometricPrecision")},clearContent:function(){while(this.shapeNode.firstChild){this.shapeNode.removeChild(this.shapeNode.firstChild)}return this},setContent:function(t){this.shapeNode.textContent=t;return this},getContent:function(){return this.shapeNode.textContent},appendContent:function(t){this.shapeNode.textContent+=t;return this},setSize:function(t){return this.setFontSize(t)},setFontSize:function(t){return this.setFont({size:t})},setFontFamily:function(t){return this.setFont({family:t})},setFontBold:function(t){return this.setFont({weight:t?"bold":"normal"})},setFontItalic:function(t){return this.setFont({style:t?"italic":"normal"})},setFont:function(t){var e=this.node;["family","size","weight","style"].forEach(function(n){if(t[n]===null){e.removeAttribute("font-"+n)}else if(t[n]){e.setAttribute("font-"+n,t[n])}});return this},getExtentOfChar:function(t){return this.node.getExtentOfChar(t)},getRotationOfChar:function(t){return this.node.getRotationOfChar(t)},getCharNumAtPosition:function(t,e){return this.node.getCharNumAtPosition(this.node.viewportElement.createSVGPoint(t,e))}})}};_p[71]={value:function(t,e,n){var r=_p.r(70);var i=_p.r(66);return _p.r(11).createClass("TextSpan",{base:r,mixins:[i],constructor:function(t){this.callBase("tspan");this.setContent(t)}})}};_p[72]={value:function(t,e,n){var r=_p.r(67);var i=_p.r(11);var s=i.createClass("Use",{base:_p.r(60),constructor:function(t){this.callBase("use");this.ref(t)},ref:function(t){if(!t){this.node.removeAttributeNS(r.xlink,"xlink:href");return this}var e=t.getId();if(e){this.node.setAttributeNS(r.xlink,"xlink:href","#"+e)}if(t.node.getAttribute("fill")==="none"){t.node.removeAttribute("fill")}if(t.node.getAttribute("stroke")==="none"){t.node.removeAttribute("stroke")}return this}});var a=_p.r(60);i.extendClass(a,{use:function(){return new s(this)}});return s}};_p[73]={value:function(t,e,n){var r=_p.r(50);var i=_p.r(43);var s=_p.r(11).createClass("Vector",{base:r,constructor:function(t,e){this.callBase(t,e)},square:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.square())},add:function(t){return new s(this.x+t.x,this.y+t.y)},minus:function(t){return new s(this.x-t.x,this.y-t.y)},dot:function(t){return this.x*t.x+this.y*t.y},project:function(t){return t.multipy(this.dot(t)/t.square())},normalize:function(t){if(t===undefined){t=1}return this.multipy(t/this.length())},multipy:function(t){return new s(this.x*t,this.y*t)},rotate:function(t,e){if(e=="rad"){t=t/Math.PI*180}var n=(new i).rotate(t).transformPoint(this);return new s(n.x,n.y)},vertical:function(){return new s(this.y,-this.x)},reverse:function(){return this.multipy(-1)},getAngle:function(){var t=this.length();if(t===0)return 0;var e=Math.acos(this.x/t);var n=this.y>0?1:-1;return n*180*e/Math.PI}});s.fromPoints=function(t,e){return new s(e.x-t.x,e.y-t.y)};s.fromPolar=function(){var t=r.fromPolar.apply(r,arguments);return new s(t.x,t.y)};_p.r(11).extendClass(r,{asVector:function(){return new s(this.x,this.y)}});return s}};_p[74]={value:function(t,e,n){var r=_p.r(61);var i=_p.r(75);return _p.r(11).createClass("View",{mixins:[r,i],base:_p.r(74),constructor:function(){this.callBase("view")}})}};_p[75]={value:function(t,e,n){return _p.r(11).createClass("ViewBox",{getViewBox:function(){var t=this.node.getAttribute("viewBox");if(t===null){return{x:0,y:0,width:this.node.clientWidth||this.node.parentNode.clientWidth,height:this.node.clientHeight||this.node.parentNode.clientHeight}}else{t=t.split(" ");return{x:+t[0],y:+t[1],width:+t[2],height:+t[3]}}},setViewBox:function(t,e,n,r){this.node.setAttribute("viewBox",[t,e,n,r].join(" "));return this}})}};_p[76]={value:function(t,e,n){var r={},i=_p.r(12);r.version="2.0.0";i.extend(r,{createClass:_p.r(11).createClass,extendClass:_p.r(11).extendClass,Utils:i,Browser:_p.r(10),Box:_p.r(25),Bezier:_p.r(23),BezierPoint:_p.r(24),Circle:_p.r(26),Clip:_p.r(27),Color:_p.r(28),Container:_p.r(29),Curve:_p.r(30),Ellipse:_p.r(32),Group:_p.r(36),Gradient:_p.r(35),HyperLink:_p.r(37),Image:_p.r(38),Line:_p.r(39),LinearGradient:_p.r(40),Mask:_p.r(42),Matrix:_p.r(43),Marker:_p.r(41),Palette:_p.r(44),Paper:_p.r(45),Path:_p.r(46),Pattern:_p.r(47),Pen:_p.r(48),Point:_p.r(50),PointContainer:_p.r(51),Polygon:_p.r(53),Polyline:_p.r(54),Pie:_p.r(49),RadialGradient:_p.r(55),Resource:_p.r(58),Rect:_p.r(56),RegularPolygon:_p.r(57),Ring:_p.r(59),Shape:_p.r(60),ShapePoint:_p.r(63),ShapeContainer:_p.r(61),Sweep:_p.r(68),Star:_p.r(65),Text:_p.r(69),TextSpan:_p.r(71),Use:_p.r(72),Vector:_p.r(73),g:_p.r(34),Animator:_p.r(0),Easing:_p.r(1),OpacityAnimator:_p.r(4),RotateAnimator:_p.r(6),ScaleAnimator:_p.r(7),Timeline:_p.r(8),TranslateAnimator:_p.r(9),PathAnimator:_p.r(5),MotionAnimator:_p.r(3),requestFrame:_p.r(2).requestFrame,releaseFrame:_p.r(2).releaseFrame,Filter:_p.r(20),GaussianblurFilter:_p.r(21),ProjectionFilter:_p.r(22),ColorMatrixEffect:_p.r(13),CompositeEffect:_p.r(14),ConvolveMatrixEffect:_p.r(15),Effect:_p.r(16),GaussianblurEffect:_p.r(17),OffsetEffect:_p.r(18)});return window.kity=r}};var moduleMapping={kity:76};function use(t){_p.r([moduleMapping[t]])}use("kity")})();
|