You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
202 KiB
1 lines
202 KiB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).zrender={})}(this,function(t){"use strict";var e=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},h=new function(){this.browser=new e,this.node=!1,this.wxa=!1,this.worker=!1,this.canvasSupported=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(h.wxa=!0,h.canvasSupported=!0,h.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?(h.worker=!0,h.canvasSupported=!0):"undefined"==typeof navigator?(h.node=!0,h.canvasSupported=!0,h.svgSupported=!0):function(t,e){var i=e.browser,r=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);r&&(i.firefox=!0,i.version=r[1]);n&&(i.ie=!0,i.version=n[1]);o&&(i.edge=!0,i.version=o[1],i.newEdge=18<+o[1].split(".")[0]);a&&(i.weChat=!0);e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!i.ie&&!i.edge,e.pointerEventsSupported="onpointerdown"in window&&(i.edge||i.ie&&11<=+i.version),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(i.ie&&"transition"in s||i.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||i.ie&&9<=+i.version}(navigator.userAgent,h);var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},l={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},u=Object.prototype.toString,i=Array.prototype,a=i.forEach,p=i.filter,n=i.slice,c=i.map,r=function(){}.constructor,o=r?r.prototype:null,f={};var d=2311;function y(){return d++}function g(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function v(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!q(t)){e=[];for(var r=0,n=t.length;r<n;r++)e[r]=v(t[r])}}else if(l[i]){if(!q(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(r=0,n=t.length;r<n;r++)e[r]=v(t[r])}}}else if(!s[i]&&!q(t)&&!F(t))for(var a in e={},t)t.hasOwnProperty(a)&&(e[a]=v(t[a]));return e}function _(t,e,i){if(!R(e)||!R(t))return i?v(e):t;for(var r in e){var n,o;e.hasOwnProperty(r)&&(n=t[r],!R(o=e[r])||!R(n)||C(o)||C(n)||F(o)||F(n)||O(o)||O(n)||q(o)||q(n)?!i&&r in t||(t[r]=v(e[r])):_(n,o,i))}return t}function m(t,e){if(Object.assign)Object.assign(t,e);else for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function x(t,e,i){for(var r=L(e),n=0;n<r.length;n++){var o=r[n];(i?null!=e[o]:null==t[o])&&(t[o]=e[o])}return t}var w=function(){return f.createCanvas()};function M(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i}return-1}function b(t,e,i){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(e),n=0;n<r.length;n++){var o=r[n];"constructor"!==o&&(i?null!=e[o]:null==t[o])&&(t[o]=e[o])}else x(t,e,i)}function D(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function k(t,e,i){if(t&&e)if(t.forEach&&t.forEach===a)t.forEach(e,i);else if(t.length===+t.length)for(var r=0,n=t.length;r<n;r++)e.call(i,t[r],r,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function W(t,e,i){if(!t)return[];if(!e)return X(t);if(t.map&&t.map===c)return t.map(e,i);for(var r=[],n=0,o=t.length;n<o;n++)r.push(e.call(i,t[n],n,t));return r}function S(t,e,i,r){if(t&&e){for(var n=0,o=t.length;n<o;n++)i=e.call(r,i,t[n],n,t);return i}}function L(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e}f.createCanvas=function(){return document.createElement("canvas")};var T=o&&P(o.bind)?o.call.bind(o.bind):function(t,e){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return function(){return t.apply(e,i.concat(n.call(arguments)))}};function C(t){return Array.isArray?Array.isArray(t):"[object Array]"===u.call(t)}function P(t){return"function"==typeof t}function A(t){return"string"==typeof t}function z(t){return"number"==typeof t}function R(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function O(t){return!!s[u.call(t)]}function I(t){return!!l[u.call(t)]}function F(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function B(t){return null!=t.colorStops}function E(t){return null!=t.image}function H(t,e){return null!=t?t:e}function N(t,e,i){return null!=t?t:null!=e?e:i}function X(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return n.apply(t,e)}function U(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function Y(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var j="__ec_primitive__";function q(t){return t[j]}var G=(V.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},V.prototype.set=function(t,e){return this.data[t]=e},V.prototype.each=function(t,e){for(var i in this.data)this.data.hasOwnProperty(i)&&t.call(e,this.data[i],i)},V.prototype.keys=function(){return L(this.data)},V.prototype.removeKey=function(t){delete this.data[t]},V);function V(t){this.data={};var i=C(t);this.data={};var r=this;function e(t,e){i?r.set(t,e):r.set(e,t)}t instanceof V?t.each(e):t&&k(t,e)}function Z(t,e){var i,r=Object.create?Object.create(t):((i=function(){}).prototype=t,new i);return e&&m(r,e),r}function K(t,e){return t.hasOwnProperty(e)}function Q(){}var $=Object.freeze({__proto__:null,$override:function(t,e){f[t]=e},guid:y,logError:g,clone:v,merge:_,mergeAll:function(t,e){for(var i=t[0],r=1,n=t.length;r<n;r++)i=_(i,t[r],e);return i},extend:m,defaults:x,createCanvas:w,indexOf:M,inherits:function(t,e){var i=t.prototype;function r(){}for(var n in r.prototype=e.prototype,t.prototype=new r,i)i.hasOwnProperty(n)&&(t.prototype[n]=i[n]);(t.prototype.constructor=t).superClass=e},mixin:b,isArrayLike:D,each:k,map:W,reduce:S,filter:function(t,e,i){if(!t)return[];if(!e)return X(t);if(t.filter&&t.filter===p)return t.filter(e,i);for(var r=[],n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)&&r.push(t[n]);return r},find:function(t,e,i){if(t&&e)for(var r=0,n=t.length;r<n;r++)if(e.call(i,t[r],r,t))return t[r]},keys:L,bind:T,curry:function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return function(){return t.apply(this,e.concat(n.call(arguments)))}},isArray:C,isFunction:P,isString:A,isStringSafe:function(t){return"[object String]"===u.call(t)},isNumber:z,isObject:R,isBuiltInObject:O,isTypedArray:I,isDom:F,isGradientObject:B,isImagePatternObject:E,isRegExp:function(t){return"[object RegExp]"===u.call(t)},eqNaN:function(t){return t!=t},retrieve:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,r=t.length;i<r;i++)if(null!=t[i])return t[i]},retrieve2:H,retrieve3:N,slice:X,normalizeCssArray:U,assert:function(t,e){if(!t)throw new Error(e)},trim:Y,setAsPrimitive:function(t){t[j]=!0},isPrimitive:q,HashMap:G,createHashMap:function(t){return new G(t)},concatArray:function(t,e){for(var i=new t.constructor(t.length+e.length),r=0;r<t.length;r++)i[r]=t[r];for(var n=t.length,r=0;r<e.length;r++)i[r+n]=e[r];return i},createObject:Z,hasOwn:K,noop:Q}),J=function(t,e){return(J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function tt(t,e){function i(){this.constructor=t}J(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function et(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function it(t){return[t[0],t[1]]}function rt(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function nt(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function ot(t){return Math.sqrt(at(t))}function at(t){return t[0]*t[0]+t[1]*t[1]}function st(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function ht(t,e){var i=ot(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function lt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ut=lt;function pt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ct=pt;function ft(t,e,i,r){return t[0]=e[0]+r*(i[0]-e[0]),t[1]=e[1]+r*(i[1]-e[1]),t}function dt(t,e,i){var r=e[0],n=e[1];return t[0]=i[0]*r+i[2]*n+i[4],t[1]=i[1]*r+i[3]*n+i[5],t}function yt(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function gt(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var vt=Object.freeze({__proto__:null,create:et,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:it,set:function(t,e,i){return t[0]=e,t[1]=i,t},add:rt,scaleAndAdd:function(t,e,i,r){return t[0]=e[0]+i[0]*r,t[1]=e[1]+i[1]*r,t},sub:nt,len:ot,length:ot,lenSquare:at,lengthSquare:at,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:st,normalize:ht,distance:lt,dist:ut,distanceSquare:pt,distSquare:ct,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:ft,applyTransform:dt,min:yt,max:gt}),_t=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},mt=(xt.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new _t(e,t),"dragstart",t.event))},xt.prototype._drag=function(t){var e,i,r,n,o,a,s=this._draggingTarget;s&&(e=t.offsetX,i=t.offsetY,r=e-this._x,n=i-this._y,this._x=e,this._y=i,s.drift(r,n,t),this.handler.dispatchToElement(new _t(s,t),"drag",t.event),o=this.handler.findHover(e,i,s).target,a=this._dropTarget,s!==(this._dropTarget=o)&&(a&&o!==a&&this.handler.dispatchToElement(new _t(a,t),"dragleave",t.event),o&&o!==a&&this.handler.dispatchToElement(new _t(o,t),"dragenter",t.event)))},xt.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new _t(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new _t(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},xt);function xt(t){(this.handler=t).on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}var wt=(bt.prototype.on=function(t,e,i,r){this._$handlers||(this._$handlers={});var n=this._$handlers;if("function"==typeof e&&(r=i,i=e,e=null),!i||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),n[t]||(n[t]=[]);for(var a=0;a<n[t].length;a++)if(n[t][a].h===i)return this;var s={h:i,query:e,ctx:r||this,callAtLast:i.zrEventfulCallAtLast},h=n[t].length-1,l=n[t][h];return l&&l.callAtLast?n[t].splice(h,0,s):n[t].push(s),this},bt.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},bt.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var r=[],n=0,o=i[t].length;n<o;n++)i[t][n].h!==e&&r.push(i[t][n]);i[t]=r}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},bt.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],n=this._$eventProcessor;if(r)for(var o=e.length,a=r.length,s=0;s<a;s++){var h=r[s];if(!n||!n.filter||null==h.query||n.filter(t,h.query))switch(o){case 0:h.h.call(h.ctx);break;case 1:h.h.call(h.ctx,e[0]);break;case 2:h.h.call(h.ctx,e[0],e[1]);break;default:h.h.apply(h.ctx,e)}}return n&&n.afterTrigger&&n.afterTrigger(t),this},bt.prototype.triggerWithContext=function(t){if(!this._$handlers)return this;var e=this._$handlers[t],i=this._$eventProcessor;if(e)for(var r=arguments,n=r.length,o=r[n-1],a=e.length,s=0;s<a;s++){var h=e[s];if(!i||!i.filter||null==h.query||i.filter(t,h.query))switch(n){case 0:h.h.call(o);break;case 1:h.h.call(o,r[0]);break;case 2:h.h.call(o,r[0],r[1]);break;default:h.h.apply(o,r.slice(1,n-1))}}return i&&i.afterTrigger&&i.afterTrigger(t),this},bt);function bt(t){t&&(this._$eventProcessor=t)}var kt=Math.log(2);function St(t,e,i,r,n,o){var a=r+"-"+n,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var h=Math.round(Math.log((1<<s)-1&~n)/kt);return t[i][h]}for(var l=r|1<<i,u=i+1;r&1<<u;)u++;for(var p=0,c=0,f=0;c<s;c++){var d=1<<c;d&n||(p+=(f%2?-1:1)*t[i][c]*St(t,e-1,u,l,n|d,o),f++)}return o[a]=p}function Tt(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],r={},n=St(i,8,0,0,0,r);if(0!==n){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*St(i,7,0===a?1:0,1<<a,1<<s,r)/n*e[a];return function(t,e,i){var r=e*o[6]+i*o[7]+1;t[0]=(e*o[0]+i*o[1]+o[2])/r,t[1]=(e*o[3]+i*o[4]+o[5])/r}}}var Ct="___zrEVENTSAVED";function Pt(t,e,i,r,n){if(e.getBoundingClientRect&&h.domSupported&&!At(e)){var o=e[Ct]||(e[Ct]={}),a=function(t,e,i){for(var r=i?"invTrans":"trans",n=e[r],o=e.srcCoords,a=[],s=[],h=!0,l=0;l<4;l++){var u=t[l].getBoundingClientRect(),p=2*l,c=u.left,f=u.top;a.push(c,f),h=h&&o&&c===o[p]&&f===o[1+p],s.push(t[l].offsetLeft,t[l].offsetTop)}return h&&n?n:(e.srcCoords=a,e[r]=i?Tt(s,a):Tt(a,s))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var r=["left","right"],n=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=a.style,h=o%2,l=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[h]+":0",n[l]+":0",r[1-h]+":auto",n[1-l]+":auto",""].join("!important;"),t.appendChild(a),i.push(a)}return i}(e,o),o,n);if(a)return a(t,i,r),1}}function At(t){return"CANVAS"===t.nodeName.toUpperCase()}var Mt="undefined"!=typeof window&&!!window.addEventListener,Dt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Lt=[];function zt(t,e,i,r){return i=i||{},r||!h.canvasSupported?Rt(t,e,i):h.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Rt(t,e,i),i}function Rt(t,e,i){if(h.domSupported&&t.getBoundingClientRect){var r=e.clientX,n=e.clientY;if(At(t)){var o=t.getBoundingClientRect();return i.zrX=r-o.left,void(i.zrY=n-o.top)}if(Pt(Lt,t,r,n))return i.zrX=Lt[0],void(i.zrY=Lt[1])}i.zrX=i.zrY=0}function Ot(t){return t||window.event}function It(t,e,i){if(null!=(e=Ot(e)).zrX)return e;var r,n,o=e.type;o&&0<=o.indexOf("touch")?(r="touchend"!==o?e.targetTouches[0]:e.changedTouches[0])&&zt(t,r,e,i):(zt(t,e,e,i),n=function(t){var e=t.wheelDelta;if(e)return e;var i=t.deltaX,r=t.deltaY;return null!=i&&null!=r?3*(0!==r?Math.abs(r):Math.abs(i))*(0<r||!(r<0)&&0<i?-1:1):e}(e),e.zrDelta=n?n/120:-(e.detail||0)/3);var a=e.button;return null==e.which&&void 0!==a&&Dt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}var Ft=Mt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Bt=(Et.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},Et.prototype.clear=function(){return this._track.length=0,this},Et.prototype._doTrack=function(t,e,i){var r=t.touches;if(r){for(var n={points:[],touches:[],target:e,event:t},o=0,a=r.length;o<a;o++){var s=r[o],h=zt(i,s,{});n.points.push([h.zrX,h.zrY]),n.touches.push(s)}this._track.push(n)}},Et.prototype._recognize=function(t){for(var e in Nt)if(Nt.hasOwnProperty(e)){var i=Nt[e](this._track,t);if(i)return i}},Et);function Et(){this._track=[]}function Ht(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}var Nt={pinch:function(t,e){var i=t.length;if(i){var r,n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&1<o.length&&n&&1<n.length){var a=Ht(n)/Ht(o);isFinite(a)||(a=1),e.pinchScale=a;var s=[((r=n)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},Wt="silent";function Xt(){Ft(this.event)}var Ut,Yt=(tt(jt,Ut=wt),jt.prototype.dispose=function(){},jt.prototype.setCursor=function(){},jt);function jt(){var t=null!==Ut&&Ut.apply(this,arguments)||this;return t.handler=null,t}var qt,Gt=function(t,e){this.x=t,this.y=e},Vt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Zt=(tt(Kt,qt=wt),Kt.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(k(Vt,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},Kt.prototype.mousemove=function(t){var e=t.zrX,i=t.zrY,r=Qt(this,e,i),n=this._hovered,o=n.target;o&&!o.__zr&&(o=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=r?new Gt(e,i):this.findHover(e,i),s=a.target,h=this.proxy;h.setCursor&&h.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},Kt.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},Kt.prototype.resize=function(){this._hovered=new Gt(0,0)},Kt.prototype.dispatch=function(t,e){var i=this[t];i&&i.call(this,e)},Kt.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},Kt.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},Kt.prototype.dispatchToElement=function(t,e,i){var r=(t=t||{}).target;if(!r||!r.silent){for(var n,o,a="on"+e,s={type:e,event:o=i,target:(n=t).target,topTarget:n.topTarget,cancelBubble:!1,offsetX:o.zrX,offsetY:o.zrY,gestureEvent:o.gestureEvent,pinchX:o.pinchX,pinchY:o.pinchY,pinchScale:o.pinchScale,wheelDelta:o.zrDelta,zrByTouch:o.zrByTouch,which:o.which,stop:Xt};r&&(r[a]&&(s.cancelBubble=!!r[a].call(r,s)),r.trigger(e,s),r=r.__hostTarget?r.__hostTarget:r.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[a]&&t[a].call(t,s),t.trigger&&t.trigger(e,s)}))}},Kt.prototype.findHover=function(t,e,i){for(var r=this.storage.getDisplayList(),n=new Gt(t,e),o=r.length-1;0<=o;o--){var a=void 0;if(r[o]!==i&&!r[o].ignore&&(a=function(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var r=t,n=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(e,i))return!1;r.silent&&(n=!0)}var s=r.__hostTarget;r=s||r.parent}return!n||Wt}return!1}(r[o],t,e))&&(n.topTarget||(n.topTarget=r[o]),a!==Wt)){n.target=r[o];break}}return n},Kt.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new Bt);var i=this._gestureMgr;"start"===e&&i.clear();var r,n,o=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);"end"===e&&i.clear(),o&&(r=o.type,t.gestureEvent=r,(n=new Gt).target=o.target,this.dispatchToElement(n,r,o.event))},Kt);function Kt(t,e,i,r){var n=qt.call(this)||this;return n._hovered=new Gt(0,0),n.storage=t,n.painter=e,n.painterRoot=r,i=i||new Yt,n.proxy=null,n.setHandlerProxy(i),n._draggingMgr=new mt(n),n}function Qt(t,e,i){var r=t.painter;return e<0||e>r.getWidth()||i<0||i>r.getHeight()}k(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){Zt.prototype[a]=function(t){var e,i,r=t.zrX,n=t.zrY,o=Qt(this,r,n);if("mouseup"===a&&o||(i=(e=this.findHover(r,n)).target),"mousedown"===a)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===a)this._upEl=i;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4<ut(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var $t=32,Jt=7;function te(t,e,i,r){var n=e+1;if(n===i)return 1;if(r(t[n++],t[e])<0){for(;n<i&&r(t[n],t[n-1])<0;)n++;!function(t,e,i){i--;for(;e<i;){var r=t[e];t[e++]=t[i],t[i--]=r}}(t,e,n)}else for(;n<i&&0<=r(t[n],t[n-1]);)n++;return n-e}function ee(t,e,i,r,n){for(r===e&&r++;r<i;r++){for(var o,a=t[r],s=e,h=r;s<h;)n(a,t[o=s+h>>>1])<0?h=o:s=1+o;var l=r-s;switch(l){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<l;)t[s+l]=t[s+l-1],l--}t[s]=a}}function ie(t,e,i,r,n,o){var a=0,s=0,h=1;if(0<o(t,e[i+n])){for(s=r-n;h<s&&0<o(t,e[i+n+h]);)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s),a+=n,h+=n}else{for(s=n+1;h<s&&o(t,e[i+n-h])<=0;)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s);var l=a,a=n-h,h=n-l}for(a++;a<h;){var u=a+(h-a>>>1);0<o(t,e[i+u])?a=u+1:h=u}return h}function re(t,e,i,r,n,o){var a=0,s=0,h=1;if(o(t,e[i+n])<0){for(s=n+1;h<s&&o(t,e[i+n-h])<0;)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s);var l=a,a=n-h,h=n-l}else{for(s=r-n;h<s&&0<=o(t,e[i+n+h]);)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s),a+=n,h+=n}for(a++;a<h;){var u=a+(h-a>>>1);o(t,e[i+u])<0?h=u:a=u+1}return h}function ne(d,y){var a,s,g=Jt,h=0,v=(d.length,[]);function e(t){var e=a[t],i=s[t],r=a[t+1],n=s[t+1];s[t]=i+n,t===h-3&&(a[t+1]=a[t+2],s[t+1]=s[t+2]),h--;var o=re(d[r],d,e,i,0,y);e+=o,0!=(i-=o)&&0!==(n=ie(d[e+i-1],d,r,n,n-1,y))&&(i<=n?function(t,e,i,r){var n=0;for(n=0;n<e;n++)v[n]=d[t+n];var o=0,a=i,s=t;if(d[s++]=d[a++],0==--r){for(n=0;n<e;n++)d[s+n]=v[o+n];return}if(1===e){for(n=0;n<r;n++)d[s+n]=d[a+n];return d[s+r]=v[o]}var h,l,u,p=g;for(;;){l=h=0,u=!1;do{if(y(d[a],v[o])<0){if(d[s++]=d[a++],l++,(h=0)==--r){u=!0;break}}else if(d[s++]=v[o++],h++,l=0,1==--e){u=!0;break}}while((h|l)<p);if(u)break;do{if(0!==(h=re(d[a],v,o,e,0,y))){for(n=0;n<h;n++)d[s+n]=v[o+n];if(s+=h,o+=h,(e-=h)<=1){u=!0;break}}if(d[s++]=d[a++],0==--r){u=!0;break}if(0!==(l=ie(v[o],d,a,r,0,y))){for(n=0;n<l;n++)d[s+n]=d[a+n];if(s+=l,a+=l,0===(r-=l)){u=!0;break}}if(d[s++]=v[o++],1==--e){u=!0;break}p--}while(Jt<=h||Jt<=l);if(u)break;p<0&&(p=0),p+=2}if((g=p)<1&&(g=1),1===e){for(n=0;n<r;n++)d[s+n]=d[a+n];d[s+r]=v[o]}else{if(0===e)throw new Error;for(n=0;n<e;n++)d[s+n]=v[o+n]}}:function(t,e,i,r){var n=0;for(n=0;n<r;n++)v[n]=d[i+n];var o=t+e-1,a=r-1,s=i+r-1,h=0,l=0;if(d[s--]=d[o--],0==--e){for(h=s-(r-1),n=0;n<r;n++)d[h+n]=v[n];return}if(1===r){for(l=(s-=e)+1,h=(o-=e)+1,n=e-1;0<=n;n--)d[l+n]=d[h+n];return d[s]=v[a]}var u=g;for(;;){var p=0,c=0,f=!1;do{if(y(v[a],d[o])<0){if(d[s--]=d[o--],p++,(c=0)==--e){f=!0;break}}else if(d[s--]=v[a--],c++,p=0,1==--r){f=!0;break}}while((p|c)<u);if(f)break;do{if(0!==(p=e-re(v[a],d,t,e,e-1,y))){for(e-=p,l=(s-=p)+1,h=(o-=p)+1,n=p-1;0<=n;n--)d[l+n]=d[h+n];if(0===e){f=!0;break}}if(d[s--]=v[a--],1==--r){f=!0;break}if(0!==(c=r-ie(d[o],v,0,r,r-1,y))){for(r-=c,l=(s-=c)+1,h=(a-=c)+1,n=0;n<c;n++)d[l+n]=v[h+n];if(r<=1){f=!0;break}}if(d[s--]=d[o--],0==--e){f=!0;break}u--}while(Jt<=p||Jt<=c);if(f)break;u<0&&(u=0),u+=2}(g=u)<1&&(g=1);if(1===r){for(l=(s-=e)+1,h=(o-=e)+1,n=e-1;0<=n;n--)d[l+n]=d[h+n];d[s]=v[a]}else{if(0===r)throw new Error;for(h=s-(r-1),n=0;n<r;n++)d[h+n]=v[n]}})(e,i,r,n)}return a=[],s=[],{mergeRuns:function(){for(;1<h;){var t=h-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},forceMergeRuns:function(){for(;1<h;){var t=h-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},pushRun:function(t,e){a[h]=t,s[h]=e,h+=1}}}function oe(t,e,i,r){i=i||0;var n=(r=r||t.length)-i;if(!(n<2)){var o=0;if(n<$t)ee(t,i,r,i+(o=te(t,i,r,e)),e);else{var a,s=ne(t,e),h=function(t){for(var e=0;$t<=t;)e|=1&t,t>>=1;return t+e}(n);do{(o=te(t,i,r,e))<h&&(h<(a=n)&&(a=h),ee(t,i,i+a,i+o,e),o=a),s.pushRun(i,o),s.mergeRuns(),n-=o,i+=o}while(0!==n);s.forceMergeRuns()}}}var ae=1,se=4,he=!1;function le(){he||(he=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ue(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var pe=(ce.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},ce.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return!t&&i.length||this.updateDisplayList(e),i},ce.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,r=0,n=e.length;r<n;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,h.canvasSupported&&oe(i,ue)},ce.prototype._updateAndAddDisplayable=function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.update(),t.afterUpdate();var r=t.getClipPath();if(t.ignoreClip)e=null;else if(r){e=e?e.slice():[];for(var n=r,o=t;n;)n.parent=o,n.updateTransform(),e.push(n),n=(o=n).getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var h=a[s];t.__dirty&&(h.__dirty|=ae),this._updateAndAddDisplayable(h,e,i)}t.__dirty=0}else{var l=t;e&&e.length?l.__clipPaths=e:l.__clipPaths&&0<l.__clipPaths.length&&(l.__clipPaths=[]),isNaN(l.z)&&(le(),l.z=0),isNaN(l.z2)&&(le(),l.z2=0),isNaN(l.zlevel)&&(le(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var u=t.getDecalElement&&t.getDecalElement();u&&this._updateAndAddDisplayable(u,e,i);var p=t.getTextGuideLine();p&&this._updateAndAddDisplayable(p,e,i);var c=t.getTextContent();c&&this._updateAndAddDisplayable(c,e,i)}},ce.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},ce.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);else{var r=M(this._roots,t);0<=r&&this._roots.splice(r,1)}},ce.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},ce.prototype.getRoots=function(){return this._roots},ce.prototype.dispose=function(){this._displayList=null,this._roots=null},ce);function ce(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ue}var fe="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},de={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-de.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*de.bounceIn(2*t):.5*de.bounceOut(2*t-1)+.5}},ye=(ge.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var i=(t-this._startTime-this._pausedTime)/this._life;i<0&&(i=0),i=Math.min(i,1);var r=this.easing,n="string"==typeof r?de[r]:r,o="function"==typeof n?n(i):i;if(this.onframe&&this.onframe(o),1===i){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},ge.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},ge.prototype.pause=function(){this._paused=!0},ge.prototype.resume=function(){this._paused=!1},ge);function ge(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var ve=function(t){this.value=t},_e=(me.prototype.insert=function(t){var e=new ve(t);return this.insertEntry(e),e},me.prototype.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},me.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},me.prototype.len=function(){return this._len},me.prototype.clear=function(){this.head=this.tail=null,this._len=0},me);function me(){this._len=0}var xe=(we.prototype.put=function(t,e){var i,r,n,o=this._list,a=this._map,s=null;return null==a[t]&&(i=o.len(),r=this._lastRemovedEntry,i>=this._maxSize&&0<i&&(n=o.head,o.remove(n),delete a[n.key],s=n.value,this._lastRemovedEntry=n),r?r.value=e:r=new ve(e),r.key=t,o.insertEntry(r),a[t]=r),s},we.prototype.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},we.prototype.clear=function(){this._list.clear(),this._map={}},we.prototype.len=function(){return this._list.len()},we);function we(t){this._list=new _e,this._maxSize=10,this._map={},this._maxSize=t}var be={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ke(t){return(t=Math.round(t))<0?0:255<t?255:t}function Se(t){return t<0?0:1<t?1:t}function Te(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?ke(parseFloat(e)/100*255):ke(parseInt(e,10))}function Ce(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Se(parseFloat(e)/100):Se(parseFloat(e))}function Pe(t,e,i){return i<0?i+=1:1<i&&--i,6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Ae(t,e,i){return t+(e-t)*i}function Me(t,e,i,r,n){return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t}function De(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Le=new xe(20),ze=null;function Re(t,e){ze&&De(ze,e),ze=Le.put(t,ze||e.slice())}function Oe(t,e){if(t){e=e||[];var i=Le.get(t);if(i)return De(e,i);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in be)return De(e,be[r]),Re(t,e),e;var n,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?0<=(n=parseInt(r.slice(1,4),16))&&n<=4095?(Me(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,5===o?parseInt(r.slice(4),16)/15:1),Re(t,e),e):void Me(e,0,0,0,1):7===o||9===o?0<=(n=parseInt(r.slice(1,7),16))&&n<=16777215?(Me(e,(16711680&n)>>16,(65280&n)>>8,255&n,9===o?parseInt(r.slice(7),16)/255:1),Re(t,e),e):void Me(e,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var h=r.substr(0,a),l=r.substr(a+1,s-(a+1)).split(","),u=1;switch(h){case"rgba":if(4!==l.length)return 3===l.length?Me(e,+l[0],+l[1],+l[2],1):Me(e,0,0,0,1);u=Ce(l.pop());case"rgb":return 3!==l.length?void Me(e,0,0,0,1):(Me(e,Te(l[0]),Te(l[1]),Te(l[2]),u),Re(t,e),e);case"hsla":return 4!==l.length?void Me(e,0,0,0,1):(l[3]=Ce(l[3]),Ie(l,e),Re(t,e),e);case"hsl":return 3!==l.length?void Me(e,0,0,0,1):(Ie(l,e),Re(t,e),e);default:return}}Me(e,0,0,0,1)}}function Ie(t,e){var i=(parseFloat(t[0])%360+360)%360/360,r=Ce(t[1]),n=Ce(t[2]),o=n<=.5?n*(r+1):n+r-n*r,a=2*n-o;return Me(e=e||[],ke(255*Pe(a,o,i+1/3)),ke(255*Pe(a,o,i)),ke(255*Pe(a,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Fe(t){var e=Oe(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Be(t,e,i){if(e&&e.length&&0<=t&&t<=1){i=i||[];var r=t*(e.length-1),n=Math.floor(r),o=Math.ceil(r),a=e[n],s=e[o],h=r-n;return i[0]=ke(Ae(a[0],s[0],h)),i[1]=ke(Ae(a[1],s[1],h)),i[2]=ke(Ae(a[2],s[2],h)),i[3]=Se(Ae(a[3],s[3],h)),i}}function Ee(t,e,i){if(e&&e.length&&0<=t&&t<=1){var r=t*(e.length-1),n=Math.floor(r),o=Math.ceil(r),a=Oe(e[n]),s=Oe(e[o]),h=r-n,l=He([ke(Ae(a[0],s[0],h)),ke(Ae(a[1],s[1],h)),ke(Ae(a[2],s[2],h)),Se(Ae(a[3],s[3],h))],"rgba");return i?{color:l,leftIndex:n,rightIndex:o,value:r}:l}}function He(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function Ne(t,e){var i=Oe(t);return i?(.299*i[0]+.587*i[1]+.114*i[2])*i[3]/255+(1-i[3])*e:0}var We=Object.freeze({__proto__:null,parse:Oe,lift:function(t,e){var i=Oe(t);if(i){for(var r=0;r<3;r++)i[r]=e<0?i[r]*(1-e)|0:(255-i[r])*e+i[r]|0,255<i[r]?i[r]=255:i[r]<0&&(i[r]=0);return He(i,4===i.length?"rgba":"rgb")}},toHex:Fe,fastLerp:Be,fastMapToColor:Be,lerp:Ee,mapToColor:Ee,modifyHSL:function(t,e,i,r){var n,o=Oe(t);if(t)return o=function(t){if(t){var e,i,r,n,o,a=t[0]/255,s=t[1]/255,h=t[2]/255,l=Math.min(a,s,h),u=Math.max(a,s,h),p=u-l,c=(u+l)/2;0==p?i=e=0:(i=c<.5?p/(u+l):p/(2-u-l),r=((u-a)/6+p/2)/p,n=((u-s)/6+p/2)/p,o=((u-h)/6+p/2)/p,a===u?e=o-n:s===u?e=1/3+r-o:h===u&&(e=2/3+n-r),e<0&&(e+=1),1<e&&--e);var f=[360*e,i,c];return null!=t[3]&&f.push(t[3]),f}}(o),null!=e&&(o[0]=(n=e,(n=Math.round(n))<0?0:360<n?360:n)),null!=i&&(o[1]=Ce(i)),null!=r&&(o[2]=Ce(r)),He(Ie(o),"rgba")},modifyAlpha:function(t,e){var i=Oe(t);if(i&&null!=e)return i[3]=Se(e),He(i,"rgba")},stringify:He,lum:Ne,random:function(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}}),Xe=Array.prototype.slice;function Ue(t,e,i){return(e-t)*i+t}function Ye(t,e,i,r){for(var n=e.length,o=0;o<n;o++)t[o]=Ue(e[o],i[o],r)}function je(t,e,i,r){for(var n=e.length,o=0;o<n;o++)t[o]=e[o]+i[o]*r;return t}function qe(t,e,i,r){for(var n=e.length,o=n&&e[0].length,a=0;a<n;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=e[a][s]+i[a][s]*r}return t}function Ge(t,e){var i=t.length;if(i===e.length){for(var r=0;r<i;r++)if(t[r]!==e[r])return;return 1}}function Ve(t,e,i,r,n,o,a){var s=.5*(i-t),h=.5*(r-e);return(2*(e-i)+s+h)*a+(-3*(e-i)-2*s-h)*o+s*n+e}function Ze(t,e,i,r,n,o,a,s){for(var h=e.length,l=0;l<h;l++)t[l]=Ve(e[l],i[l],r[l],n[l],o,a,s)}function Ke(t){if(D(t)){var e=t.length;if(D(t[0])){for(var i=[],r=0;r<e;r++)i.push(Xe.call(t[r]));return i}return Xe.call(t)}return t}function Qe(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}var $e=[0,0,0,0],Je=(ti.prototype.isFinished=function(){return this._finished},ti.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},ti.prototype.needsAnimate=function(){return!this._isAllValueEqual&&2<=this.keyframes.length&&this.interpolable},ti.prototype.getAdditiveTrack=function(){return this._additiveTrack},ti.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var i,r=this.keyframes,n=r.length;if(this.interpolable)if(D(e)){var o,a=D((i=e)&&i[0])?2:1;if(0<n&&this.arrDim!==a)return void(this.interpolable=!1);if(1==a&&"number"!=typeof e[0]||2==a&&"number"!=typeof e[0][0])return void(this.interpolable=!1);0<n&&(o=r[n-1],this._isAllValueEqual&&(1==a&&Ge(e,o.value)||(this._isAllValueEqual=!1))),this.arrDim=a}else{if(0<this.arrDim)return void(this.interpolable=!1);if("string"==typeof e){var s=Oe(e);s?(e=s,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&0<n&&(o=r[n-1],(this.isValueColor&&!Ge(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var h={time:t,value:e,percent:0};return this.keyframes.push(h),h},ti.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort(function(t,e){return t.time-e.time});for(var i=this.arrDim,r=e.length,n=e[r-1],o=0;o<r;o++)e[o].percent=e[o].time/this.maxTime,0<i&&o!==r-1&&function(t,e,i){var r=t,n=e;if(r.push&&n.push){var o=r.length,a=n.length;if(o!==a)if(a<o)r.length=a;else for(var s=o;s<a;s++)r.push(1===i?n[s]:Xe.call(n[s]));for(var h=r[0]&&r[0].length,s=0;s<r.length;s++)if(1===i)isNaN(r[s])&&(r[s]=n[s]);else for(var l=0;l<h;l++)isNaN(r[s][l])&&(r[s][l]=n[s][l])}}(e[o].value,n.value,i);if(t&&this.needsAnimate()&&t.needsAnimate()&&i===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;for(var a=e[0].value,o=0;o<r;o++)0===i?this.isValueColor?e[o].additiveValue=je([],e[o].value,a,-1):e[o].additiveValue=e[o].value-a:1===i?e[o].additiveValue=je([],e[o].value,a,-1):2===i&&(e[o].additiveValue=qe([],e[o].value,a,-1))}},ti.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=null!=this._additiveTrack,r=i?"additiveValue":"value",n=this.keyframes,o=this.keyframes.length,a=this.propName,s=this.arrDim,h=this.isValueColor;if(e<0)l=0;else if(e<this._lastFramePercent){for(var l=Math.min(this._lastFrame+1,o-1);0<=l&&!(n[l].percent<=e);l--);l=Math.min(l,o-2)}else{for(l=this._lastFrame;l<o&&!(n[l].percent>e);l++);l=Math.min(l-1,o-2)}var u,p,c,f,d,y,g,v,_,m,x=n[l+1],w=n[l];w&&x&&(this._lastFrame=l,this._lastFramePercent=e,0!=(u=x.percent-w.percent)&&(p=(e-w.percent)/u,c=i?this._additiveValue:h?$e:t[a],(0<s||h)&&!c&&(c=this._additiveValue=[]),this.useSpline?(f=n[l][r],d=n[0===l?l:l-1][r],y=n[o-2<l?o-1:l+1][r],g=n[o-3<l?o-1:l+2][r],0<s?(1===s?Ze:function(t,e,i,r,n,o,a,s){for(var h=e.length,l=e[0].length,u=0;u<h;u++){t[u]||(t[1]=[]);for(var p=0;p<l;p++)t[u][p]=Ve(e[u][p],i[u][p],r[u][p],n[u][p],o,a,s)}})(c,d,f,y,g,p,p*p,p*p*p):h?(Ze(c,d,f,y,g,p,p*p,p*p*p),i||(t[a]=Qe(c))):(v=void 0,v=this.interpolable?Ve(d,f,y,g,p,p*p,p*p*p):y,i?this._additiveValue=v:t[a]=v)):0<s?(1===s?Ye:function(t,e,i,r){for(var n=e.length,o=n&&e[0].length,a=0;a<n;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=Ue(e[a][s],i[a][s],r)}})(c,w[r],x[r],p):h?(Ye(c,w[r],x[r],p),i||(t[a]=Qe(c))):(v=void 0,v=this.interpolable?Ue(w[r],x[r],p):(_=w[r],m=x[r],.5<p?m:_),i?this._additiveValue=v:t[a]=v),i&&this._addToTarget(t)))}},ti.prototype._addToTarget=function(t){var e=this.arrDim,i=this.propName,r=this._additiveValue;0===e?this.isValueColor?(Oe(t[i],$e),je($e,$e,r,1),t[i]=Qe($e)):t[i]=t[i]+r:1===e?je(t[i],t[i],r,1):2===e&&qe(t[i],t[i],r,1)},ti);function ti(t){this.keyframes=[],this.maxTime=0,this.arrDim=0,this.interpolable=!0,this._needsSort=!1,this._isAllValueEqual=!0,this._lastFrame=0,this._lastFramePercent=0,this.propName=t}var ei=(ii.prototype.getTarget=function(){return this._target},ii.prototype.changeTarget=function(t){this._target=t},ii.prototype.when=function(t,e){return this.whenWithKeys(t,e,L(e))},ii.prototype.whenWithKeys=function(t,e,i){for(var r=this._tracks,n=0;n<i.length;n++){var o=i[n],a=r[o];if(!a){a=r[o]=new Je(o);var s,h=void 0,l=this._getAdditiveTrack(o);if(l?(h=(s=l.keyframes[l.keyframes.length-1])&&s.value,l.isValueColor&&h&&(h=Qe(h))):h=this._target[o],null==h)continue;0!==t&&a.addKeyframe(0,Ke(h)),this._trackKeys.push(o)}a.addKeyframe(t,Ke(e[o]))}return this._maxTime=Math.max(this._maxTime,t),this},ii.prototype.pause=function(){this._clip.pause(),this._paused=!0},ii.prototype.resume=function(){this._clip.resume(),this._paused=!1},ii.prototype.isPaused=function(){return!!this._paused},ii.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneList;if(t)for(var e=t.length,i=0;i<e;i++)t[i].call(this)},ii.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedList;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var i=0;i<e.length;i++)e[i].call(this)},ii.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},ii.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var r=0;r<i.length;r++){var n=i[r].getTrack(t);n&&(e=n)}return e},ii.prototype.start=function(t,e){if(!(0<this._started)){this._started=1;for(var i,o=this,a=[],r=0;r<this._trackKeys.length;r++){var n,s=this._trackKeys[r],h=this._tracks[s],l=this._getAdditiveTrack(s),u=h.keyframes;h.prepare(l),h.needsAnimate()?a.push(h):h.interpolable||(n=u[u.length-1])&&(o._target[h.propName]=n.value)}return a.length||e?(i=new ye({life:this._maxTime,loop:this._loop,delay:this._delay,onframe:function(t){o._started=2;var e=o._additiveAnimators;if(e){for(var i=!1,r=0;r<e.length;r++)if(e[r]._clip){i=!0;break}i||(o._additiveAnimators=null)}for(r=0;r<a.length;r++)a[r].step(o._target,t);var n=o._onframeList;if(n)for(r=0;r<n.length;r++)n[r](o._target,t)},ondestroy:function(){o._doneCallback()}}),this._clip=i,this.animation&&this.animation.addClip(i),t&&"spline"!==t&&(i.easing=t)):this._doneCallback(),this}},ii.prototype.stop=function(t){var e;this._clip&&(e=this._clip,t&&e.onframe(1),this._abortedCallback())},ii.prototype.delay=function(t){return this._delay=t,this},ii.prototype.during=function(t){return t&&(this._onframeList||(this._onframeList=[]),this._onframeList.push(t)),this},ii.prototype.done=function(t){return t&&(this._doneList||(this._doneList=[]),this._doneList.push(t)),this},ii.prototype.aborted=function(t){return t&&(this._abortedList||(this._abortedList=[]),this._abortedList.push(t)),this},ii.prototype.getClip=function(){return this._clip},ii.prototype.getTrack=function(t){return this._tracks[t]},ii.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,r=this._trackKeys,n=0;n<t.length;n++){var o=i[t[n]];o&&(e?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}for(var a=!0,n=0;n<r.length;n++)if(!i[r[n]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},ii.prototype.saveFinalToTarget=function(t,e){if(t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var r,n,o,a=e[i],s=this._tracks[a];s&&!s.isFinished()&&(n=(r=s.keyframes)[r.length-1])&&(o=Ke(n.value),s.isValueColor&&(o=Qe(o)),t[a]=o)}}},ii.prototype.__changeFinalValue=function(t,e){e=e||L(t);for(var i=0;i<e.length;i++){var r,n,o=e[i],a=this._tracks[o];a&&1<(r=a.keyframes).length&&(n=r.pop(),a.addKeyframe(n.time,t[o]),a.prepare(a.getAdditiveTrack()))}},ii);function ii(t,e,i){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,(this._loop=e)&&i?g("Can' use additive animation on looped animation."):this._additiveAnimators=i}var ri,ni=(tt(oi,ri=wt),oi.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?((this._clipsTail.next=t).prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},oi.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},oi.prototype.removeClip=function(t){var e,i;t.animation&&(e=t.prev,i=t.next,e?e.next=i:this._clipsHead=i,i?i.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null)},oi.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},oi.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,i=e-this._time,r=this._clipsHead;r;)var n=r.next,r=(r.step(e,i)&&(r.ondestroy&&r.ondestroy(),this.removeClip(r)),n);this._time=e,t||(this.onframe(i),this.trigger("frame",i),this.stage.update&&this.stage.update())},oi.prototype._startLoop=function(){var e=this;this._running=!0,fe(function t(){e._running&&(fe(t),e._paused||e.update())})},oi.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},oi.prototype.stop=function(){this._running=!1},oi.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},oi.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},oi.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},oi.prototype.isFinished=function(){return null==this._clipsHead},oi.prototype.animate=function(t,e){e=e||{},this.start();var i=new ei(t,e.loop);return this.addAnimator(i),i},oi);function oi(t){var e=ri.call(this)||this;return e._running=!1,e._time=0,e._pausedTime=0,e._pauseStart=0,e._paused=!1,t=t||{},e.stage=t.stage||{},e.onframe=t.onframe||function(){},e}var ai,si,hi=h.domSupported,li=(si={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:ai=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:W(ai,function(t){var e=t.replace("mouse","pointer");return si.hasOwnProperty(e)?e:t})}),ui=["mousemove","mouseup"],pi=["pointermove","pointerup"],ci=!1;function fi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function di(t){t&&(t.zrByTouch=!0)}function yi(t,e){for(var i=e,r=!1;i&&9!==i.nodeType&&!(r=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return r}var gi=function(t,e){this.stopPropagation=Q,this.stopImmediatePropagation=Q,this.preventDefault=Q,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},vi={mousedown:function(t){t=It(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=It(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=It(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){yi(this,(t=It(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){ci=!0,t=It(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){ci||(t=It(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){di(t=It(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),vi.mousemove.call(this,t),vi.mousedown.call(this,t)},touchmove:function(t){di(t=It(this.dom,t)),this.handler.processGesture(t,"change"),vi.mousemove.call(this,t)},touchend:function(t){di(t=It(this.dom,t)),this.handler.processGesture(t,"end"),vi.mouseup.call(this,t),new Date-this.__lastTouchMoment<300&&vi.click.call(this,t)},pointerdown:function(t){vi.mousedown.call(this,t)},pointermove:function(t){fi(t)||vi.mousemove.call(this,t)},pointerup:function(t){vi.mouseup.call(this,t)},pointerout:function(t){fi(t)||vi.mouseout.call(this,t)}};k(["click","dblclick","contextmenu"],function(e){vi[e]=function(t){t=It(this.dom,t),this.trigger(e,t)}});var _i={pointermove:function(t){fi(t)||_i.mousemove.call(this,t)},pointerup:function(t){_i.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function mi(r,n){var o=n.domHandlers;h.pointerEventsSupported?k(li.pointer,function(e){wi(n,e,function(t){o[e].call(r,t)})}):(h.touchEventsSupported&&k(li.touch,function(i){wi(n,i,function(t){var e;o[i].call(r,t),(e=n).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),k(li.mouse,function(e){wi(n,e,function(t){t=Ot(t),n.touching||o[e].call(r,t)})}))}function xi(n,o){function t(r){wi(o,r,function(t){var e,i;t=Ot(t),yi(n,t.target)||(i=t,t=It((e=n).dom,new gi(e,i),!0),o.domHandlers[r].call(n,t))},{capture:!0})}h.pointerEventsSupported?k(pi,t):h.touchEventsSupported||k(ui,t)}function wi(t,e,i,r){var n,o,a,s;t.mounted[e]=i,t.listenerOpts[e]=r,n=t.domTarget,o=e,a=i,s=r,Mt?n.addEventListener(o,a,s):n.attachEvent("on"+o,a)}function bi(t){var e,i,r,n,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,r=o[i=a],n=t.listenerOpts[a],Mt?e.removeEventListener(i,r,n):e.detachEvent("on"+i,r));t.mounted={}}var ki,Si=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Ti=(tt(Ci,ki=wt),Ci.prototype.dispose=function(){bi(this._localHandlerScope),hi&&bi(this._globalHandlerScope)},Ci.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},Ci.prototype.__togglePointerCapture=function(t){var e;this.__mayPointerCapture=null,hi&&+this.__pointerCapturing^+t&&(this.__pointerCapturing=t,e=this._globalHandlerScope,t?xi(this,e):bi(e))},Ci);function Ci(t,e){var i=ki.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=e,i._localHandlerScope=new Si(t,vi),hi&&(i._globalHandlerScope=new Si(document,_i)),mi(i,i._localHandlerScope),i}var Pi=1;"undefined"!=typeof window&&(Pi=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ai=Pi,Mi="#333",Di="#ccc";function Li(){return[1,0,0,1,0,0]}function zi(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Ri(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Oi(t,e,i){var r=e[0]*i[0]+e[2]*i[1],n=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],h=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=r,t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=h,t}function Ii(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Fi(t,e,i){var r=e[0],n=e[2],o=e[4],a=e[1],s=e[3],h=e[5],l=Math.sin(i),u=Math.cos(i);return t[0]=r*u+a*l,t[1]=-r*l+a*u,t[2]=n*u+s*l,t[3]=-n*l+u*s,t[4]=u*o+l*h,t[5]=u*h-l*o,t}function Bi(t,e,i){var r=i[0],n=i[1];return t[0]=e[0]*r,t[1]=e[1]*n,t[2]=e[2]*r,t[3]=e[3]*n,t[4]=e[4]*r,t[5]=e[5]*n,t}function Ei(t,e){var i=e[0],r=e[2],n=e[4],o=e[1],a=e[3],s=e[5],h=i*a-o*r;return h?(h=1/h,t[0]=a*h,t[1]=-o*h,t[2]=-r*h,t[3]=i*h,t[4]=(r*s-a*n)*h,t[5]=(o*n-i*s)*h,t):null}var Hi=Object.freeze({__proto__:null,create:Li,identity:zi,copy:Ri,mul:Oi,translate:Ii,rotate:Fi,scale:Bi,invert:Ei,clone:function(t){var e=Li();return Ri(e,t),e}}),Ni=zi;function Wi(t){return 5e-5<t||t<-5e-5}var Xi,Ui=[],Yi=[],ji=Li(),qi=Math.abs,Gi=(Vi.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},Vi.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},Vi.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},Vi.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},Vi.prototype.needLocalTransform=function(){return Wi(this.rotation)||Wi(this.x)||Wi(this.y)||Wi(this.scaleX-1)||Wi(this.scaleY-1)},Vi.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),r=this.transform;i||e?(r=r||Li(),i?this.getLocalTransform(r):Ni(r),e&&(i?Oi(r,t.transform,r):Ri(r,t.transform)),this.transform=r,this._resolveGlobalScaleRatio(r)):r&&Ni(r)},Vi.prototype._resolveGlobalScaleRatio=function(t){var e,i,r,n,o=this.globalScaleRatio;null!=o&&1!==o&&(this.getGlobalScale(Ui),r=((Ui[0]-(e=Ui[0]<0?-1:1))*o+e)/Ui[0]||0,n=((Ui[1]-(i=Ui[1]<0?-1:1))*o+i)/Ui[1]||0,t[0]*=r,t[1]*=r,t[2]*=n,t[3]*=n),this.invTransform=this.invTransform||Li(),Ei(this.invTransform,t)},Vi.prototype.getLocalTransform=function(t){return Vi.getLocalTransform(this,t)},Vi.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},Vi.prototype.setLocalTransform=function(t){var e,i,r,n;t&&(n=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],e=Math.atan2(t[1],t[0]),i=Math.PI/2+e-Math.atan2(t[3],t[2]),r=Math.sqrt(r)*Math.cos(i),n=Math.sqrt(n),this.skewX=i,this.skewY=0,this.rotation=-e,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=r,this.originX=0,this.originY=0)},Vi.prototype.decomposeTransform=function(){var t,e,i,r;this.transform&&(t=this.parent,e=this.transform,t&&t.transform&&(Oi(Yi,t.invTransform,e),e=Yi),i=this.originX,r=this.originY,(i||r)&&(ji[4]=i,ji[5]=r,Oi(Yi,e,ji),Yi[4]-=i,Yi[5]-=r,e=Yi),this.setLocalTransform(e))},Vi.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},Vi.prototype.transformCoordToLocal=function(t,e){var i=[t,e],r=this.invTransform;return r&&dt(i,i,r),i},Vi.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],r=this.transform;return r&&dt(i,i,r),i},Vi.prototype.getLineScale=function(){var t=this.transform;return t&&1e-10<qi(t[0]-1)&&1e-10<qi(t[3]-1)?Math.sqrt(qi(t[0]*t[3]-t[2]*t[1])):1},Vi.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,r=t.originY||0,n=t.scaleX,o=t.scaleY,a=t.rotation||0,s=t.x,h=t.y,l=t.skewX?Math.tan(t.skewX):0,u=t.skewY?Math.tan(-t.skewY):0;return i||r?(e[4]=-i*n-l*r*o,e[5]=-r*o-u*i*n):e[4]=e[5]=0,e[0]=n,e[3]=o,e[1]=u*n,e[2]=l*o,a&&Fi(e,e,a),e[4]+=i+s,e[5]+=r+h,e},Vi.initDefaultProps=((Xi=Vi.prototype).x=0,Xi.y=0,Xi.scaleX=1,Xi.scaleY=1,Xi.originX=0,Xi.originY=0,Xi.skewX=0,Xi.skewY=0,Xi.rotation=0,void(Xi.globalScaleRatio=1)),Vi);function Vi(){}var Zi=(Ki.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},Ki.prototype.clone=function(){return new Ki(this.x,this.y)},Ki.prototype.set=function(t,e){return this.x=t,this.y=e,this},Ki.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},Ki.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},Ki.prototype.scale=function(t){this.x*=t,this.y*=t},Ki.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},Ki.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},Ki.prototype.dot=function(t){return this.x*t.x+this.y*t.y},Ki.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Ki.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},Ki.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},Ki.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},Ki.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},Ki.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},Ki.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},Ki.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},Ki.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},Ki.set=function(t,e,i){t.x=e,t.y=i},Ki.copy=function(t,e){t.x=e.x,t.y=e.y},Ki.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},Ki.lenSquare=function(t){return t.x*t.x+t.y*t.y},Ki.dot=function(t,e){return t.x*e.x+t.y*e.y},Ki.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},Ki.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},Ki.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},Ki.scaleAndAdd=function(t,e,i,r){t.x=e.x+i.x*r,t.y=e.y+i.y*r},Ki.lerp=function(t,e,i,r){var n=1-r;t.x=n*e.x+r*i.x,t.y=n*e.y+r*i.y},Ki);function Ki(t,e){this.x=t||0,this.y=e||0}var Qi=Math.min,$i=Math.max,Ji=new Zi,tr=new Zi,er=new Zi,ir=new Zi,rr=new Zi,nr=new Zi,or=(ar.prototype.union=function(t){var e=Qi(t.x,this.x),i=Qi(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=$i(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=$i(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},ar.prototype.applyTransform=function(t){ar.applyTransform(this,this,t)},ar.prototype.calculateTransform=function(t){var e=t.width/this.width,i=t.height/this.height,r=Li();return Ii(r,r,[-this.x,-this.y]),Bi(r,r,[e,i]),Ii(r,r,[t.x,t.y]),r},ar.prototype.intersect=function(t,e){if(!t)return!1;t instanceof ar||(t=ar.create(t));var i,r,n,o,a,s,h,l,u=this,p=u.x,c=u.x+u.width,f=u.y,d=u.y+u.height,y=t.x,g=t.x+t.width,v=t.y,_=t.y+t.height,m=!(c<y||g<p||d<v||_<f);return e&&(i=1/0,r=0,n=Math.abs(c-y),o=Math.abs(g-p),a=Math.abs(d-v),s=Math.abs(_-f),h=Math.min(n,o),l=Math.min(a,s),c<y||g<p?r<h&&(r=h,n<o?Zi.set(nr,-n,0):Zi.set(nr,o,0)):h<i&&(i=h,n<o?Zi.set(rr,n,0):Zi.set(rr,-o,0)),d<v||_<f?r<l&&(r=l,a<s?Zi.set(nr,0,-a):Zi.set(nr,0,s)):h<i&&(i=h,a<s?Zi.set(rr,0,a):Zi.set(rr,0,-s))),e&&Zi.copy(e,m?rr:nr),m},ar.prototype.contain=function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},ar.prototype.clone=function(){return new ar(this.x,this.y,this.width,this.height)},ar.prototype.copy=function(t){ar.copy(this,t)},ar.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},ar.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},ar.prototype.isZero=function(){return 0===this.width||0===this.height},ar.create=function(t){return new ar(t.x,t.y,t.width,t.height)},ar.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},ar.applyTransform=function(t,e,i){if(i){if(i[1]<1e-5&&-1e-5<i[1]&&i[2]<1e-5&&-1e-5<i[2]){var r=i[0],n=i[3],o=i[4],a=i[5];return t.x=e.x*r+o,t.y=e.y*n+a,t.width=e.width*r,t.height=e.height*n,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Ji.x=er.x=e.x,Ji.y=ir.y=e.y,tr.x=ir.x=e.x+e.width,tr.y=er.y=e.y+e.height,Ji.transform(i),ir.transform(i),tr.transform(i),er.transform(i),t.x=Qi(Ji.x,tr.x,er.x,ir.x),t.y=Qi(Ji.y,tr.y,er.y,ir.y);var s=$i(Ji.x,tr.x,er.x,ir.x),h=$i(Ji.y,tr.y,er.y,ir.y);t.width=s-t.x,t.height=h-t.y}else t!==e&&ar.copy(t,e)},ar);function ar(t,e,i,r){i<0&&(t+=i,i=-i),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=i,this.height=r}var sr,hr,lr={},ur="12px sans-serif";var pr={measureText:function(t,e){return sr=sr||w().getContext("2d"),hr!==e&&(hr=sr.font=e||ur),sr.measureText(t)}};function cr(t,e){var i=lr[e=e||ur],r=(i=i||(lr[e]=new xe(500))).get(t);return null==r&&(r=pr.measureText(t,e).width,i.put(t,r)),r}function fr(t,e,i,r){var n=cr(t,e),o=gr(e),a=dr(0,n,i),s=yr(0,o,r);return new or(a,s,n,o)}function dr(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function yr(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function gr(t){return cr("国",t)}function vr(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}var _r="__zr_normal__",mr=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],xr={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},wr={},br=new or(0,0,0,0),kr=(Sr.prototype._init=function(t){this.attr(t)},Sr.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;(r=r||(this.transform=[1,0,0,1,0,0]))[4]+=t,r[5]+=e,this.decomposeTransform(),this.markRedraw()},Sr.prototype.beforeUpdate=function(){},Sr.prototype.afterUpdate=function(){},Sr.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},Sr.prototype.updateInnerText=function(t){var e,i,r,n,o,a,s,h,l,u,p,c,f,d,y,g,v,_=this._textContent;!_||_.ignore&&!t||(this.textConfig||(this.textConfig={}),i=(e=this.textConfig).local,o=n=void 0,a=!1,(r=_.attachedTransform).parent=i?this:null,p=!1,r.x=_.x,r.y=_.y,r.originX=_.originX,r.originY=_.originY,r.rotation=_.rotation,r.scaleX=_.scaleX,r.scaleY=_.scaleY,null!=e.position&&(s=br,e.layoutRect?s.copy(e.layoutRect):s.copy(this.getBoundingRect()),i||s.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(wr,e,s):function(t,e,i){var r=e.position||"inside",n=null!=e.distance?e.distance:5,o=i.height,a=i.width,s=o/2,h=i.x,l=i.y,u="left",p="top";if(r instanceof Array)h+=vr(r[0],i.width),l+=vr(r[1],i.height),p=u=null;else switch(r){case"left":h-=n,l+=s,u="right",p="middle";break;case"right":h+=n+a,l+=s,p="middle";break;case"top":h+=a/2,l-=n,u="center",p="bottom";break;case"bottom":h+=a/2,l+=o+n,u="center";break;case"inside":h+=a/2,l+=s,u="center",p="middle";break;case"insideLeft":h+=n,l+=s,p="middle";break;case"insideRight":h+=a-n,l+=s,u="right",p="middle";break;case"insideTop":h+=a/2,l+=n,u="center";break;case"insideBottom":h+=a/2,l+=o-n,u="center",p="bottom";break;case"insideTopLeft":h+=n,l+=n;break;case"insideTopRight":h+=a-n,l+=n,u="right";break;case"insideBottomLeft":h+=n,l+=o-n,p="bottom";break;case"insideBottomRight":h+=a-n,l+=o-n,u="right",p="bottom"}(t=t||{}).x=h,t.y=l,t.align=u,t.verticalAlign=p}(wr,e,s),r.x=wr.x,r.y=wr.y,n=wr.align,o=wr.verticalAlign,(h=e.origin)&&null!=e.rotation&&(u=l=void 0,u="center"===h?(l=.5*s.width,.5*s.height):(l=vr(h[0],s.width),vr(h[1],s.height)),p=!0,r.originX=-r.x+l+(i?0:s.x),r.originY=-r.y+u+(i?0:s.y))),null!=e.rotation&&(r.rotation=e.rotation),(c=e.offset)&&(r.x+=c[0],r.y+=c[1],p||(r.originX=-c[0],r.originY=-c[1])),f=null==e.inside?"string"==typeof e.position&&0<=e.position.indexOf("inside"):e.inside,d=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=g=y=void 0,f&&this.canBeInsideText()?(y=e.insideFill,g=e.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=g&&"auto"!==g||(g=this.getInsideTextStroke(y),v=!0)):(y=e.outsideFill,g=e.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=g&&"auto"!==g||(g=this.getOutsideStroke(y),v=!0)),(y=y||"#000")===d.fill&&g===d.stroke&&v===d.autoStroke&&n===d.align&&o===d.verticalAlign||(a=!0,d.fill=y,d.stroke=g,d.autoStroke=v,d.align=n,d.verticalAlign=o,_.setDefaultTextStyle(d)),_.__dirty|=ae,a&&_.dirtyStyle(!0))},Sr.prototype.canBeInsideText=function(){return!0},Sr.prototype.getInsideTextFill=function(){return"#fff"},Sr.prototype.getInsideTextStroke=function(t){return"#000"},Sr.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Di:Mi},Sr.prototype.getOutsideStroke=function(t){for(var e=this.__zr&&this.__zr.getBackgroundColor(),i="string"==typeof e&&Oe(e),r=(i=i||[255,255,255,1])[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*r+(n?0:255)*(1-r);return i[3]=1,He(i,"rgba")},Sr.prototype.traverse=function(t,e){},Sr.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},m(this.extra,e)):this[t]=e},Sr.prototype.hide=function(){this.ignore=!0,this.markRedraw()},Sr.prototype.show=function(){this.ignore=!1,this.markRedraw()},Sr.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(R(t))for(var i=L(t),r=0;r<i.length;r++){var n=i[r];this.attrKV(n,t[n])}return this.markRedraw(),this},Sr.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var r,n,o=this.animators[i],a=o.__fromStateTransition;a&&a!==_r||(n=(r=o.targetName)?e[r]:e,o.saveFinalToTarget(n))}},Sr.prototype._innerSaveToNormal=function(t){var e=(e=this._normalState)||(this._normalState={});t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,mr)},Sr.prototype._savePrimaryToNormal=function(t,e,i){for(var r=0;r<i.length;r++){var n=i[r];null==t[n]||n in e||(e[n]=this[n])}},Sr.prototype.hasState=function(){return 0<this.currentStates.length},Sr.prototype.getState=function(t){return this.states[t]},Sr.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},Sr.prototype.clearStates=function(t){this.useState(_r,!1,t)},Sr.prototype.useState=function(t,e,i,r){var n=t===_r;if(this.hasState()||!n){var o,a=this.currentStates,s=this.stateTransition;if(!(0<=M(a,t))||!e&&1!==a.length){if(this.stateProxy&&!n&&(o=this.stateProxy(t)),(o=o||this.states&&this.states[t])||n){n||this.saveCurrentToNormalState(o);var h=!!(o&&o.hoverLayer||r);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,o,this._normalState,e,!i&&!this.__inHover&&s&&0<s.duration,s);var l=this._textContent,u=this._textGuide;return l&&l.useState(t,e,i,h),u&&u.useState(t,e,i,h),n?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ae),o}g("State "+t+" not exists.")}}},Sr.prototype.useStates=function(t,e,i){if(t.length){var r=[],n=this.currentStates,o=t.length,a=o===n.length;if(a)for(var s=0;s<o;s++)if(t[s]!==n[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var h=t[s],l=void 0;this.stateProxy&&(l=this.stateProxy(h,t)),(l=l||this.states[h])&&r.push(l)}var u=r[o-1],p=!!(u&&u.hoverLayer||i);p&&this._toggleHoverLayerFlag(!0);var c=this._mergeStates(r),f=this.stateTransition;this.saveCurrentToNormalState(c),this._applyStateObj(t.join(","),c,this._normalState,!1,!e&&!this.__inHover&&f&&0<f.duration,f);var d=this._textContent,y=this._textGuide;d&&d.useStates(t,e,p),y&&y.useStates(t,e,p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ae)}else this.clearStates()},Sr.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},Sr.prototype.removeState=function(t){var e,i=M(this.currentStates,t);0<=i&&((e=this.currentStates.slice()).splice(i,1),this.useStates(e))},Sr.prototype.replaceState=function(t,e,i){var r=this.currentStates.slice(),n=M(r,t),o=0<=M(r,e);0<=n?o?r.splice(n,1):r[n]=e:i&&!o&&r.push(e),this.useStates(r)},Sr.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},Sr.prototype._mergeStates=function(t){for(var e,i={},r=0;r<t.length;r++){var n=t[r];m(i,n),n.textConfig&&m(e=e||{},n.textConfig)}return e&&(i.textConfig=e),i},Sr.prototype._applyStateObj=function(t,e,i,r,n,o){var a=!(e&&r);e&&e.textConfig?(this.textConfig=m({},r?this.textConfig:i.textConfig),m(this.textConfig,e.textConfig)):a&&i.textConfig&&(this.textConfig=i.textConfig);for(var s={},h=!1,l=0;l<mr.length;l++){var u=mr[l],p=n&&xr[u];e&&null!=e[u]?p?(h=!0,s[u]=e[u]):this[u]=e[u]:a&&null!=i[u]&&(p?(h=!0,s[u]=i[u]):this[u]=i[u])}if(!n)for(l=0;l<this.animators.length;l++){var c=this.animators[l],f=c.targetName;c.__changeFinalValue(f?(e||i)[f]:e||i)}h&&this._transitionState(t,s,o)},Sr.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");if(t===this)throw new Error("Recursive component attachment.");var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},Sr.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},Sr.prototype.getClipPath=function(){return this._clipPath},Sr.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},Sr.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},Sr.prototype.getTextContent=function(){return this._textContent},Sr.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.attachedTransform=new Gi,this._attachComponent(t),this._textContent=t,this.markRedraw()}},Sr.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),m(this.textConfig,t),this.markRedraw()},Sr.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},Sr.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.attachedTransform=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},Sr.prototype.getTextGuideLine=function(){return this._textGuide},Sr.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},Sr.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},Sr.prototype.markRedraw=function(){this.__dirty|=ae;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},Sr.prototype.dirty=function(){this.markRedraw()},Sr.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,i=this._textGuide;e&&(e.__inHover=t),i&&(i.__inHover=t)},Sr.prototype.addSelfToZr=function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)},Sr.prototype.removeSelfFromZr=function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)},Sr.prototype.animate=function(t,e){var i=t?this[t]:this;if(i){var r=new ei(i,e);return this.addAnimator(r,t),r}g('Property "'+t+'" is not existed in element '+this.id)},Sr.prototype.addAnimator=function(i,t){var e=this.__zr,r=this;i.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,e=M(t,i);0<=e&&t.splice(e,1)}),this.animators.push(i),e&&e.animation.addAnimator(i),e&&e.wakeUp()},Sr.prototype.updateDuringAnimation=function(t){this.markRedraw()},Sr.prototype.stopAnimation=function(t,e){for(var i=this.animators,r=i.length,n=[],o=0;o<r;o++){var a=i[o];t&&t!==a.scope?n.push(a):a.stop(e)}return this.animators=n,this},Sr.prototype.animateTo=function(t,e,i){Tr(this,t,e,i)},Sr.prototype.animateFrom=function(t,e,i){Tr(this,t,e,i,!0)},Sr.prototype._transitionState=function(t,e,i,r){for(var n=Tr(this,e,i,r),o=0;o<n.length;o++)n[o].__fromStateTransition=t},Sr.prototype.getBoundingRect=function(){return null},Sr.prototype.getPaintRect=function(){return null},Sr.initDefaultProps=function(){var t=Sr.prototype;t.type="element",t.name="",t.ignore=!1,t.silent=!1,t.isGroup=!1,t.draggable=!1,t.dragging=!1,t.ignoreClip=!1,t.__inHover=!1,t.__dirty=ae;var r={};function a(t,e,i){r[t+e+i]||(console.warn("DEPRECATED: '"+t+"' has been deprecated. use '"+e+"', '"+i+"' instead"),r[t+e+i]=!0)}function e(e,i,r,n){function o(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[n]},set:function(t){e[n]=t}})}Object.defineProperty(t,e,{get:function(){var t;return a(e,r,n),this[i]||(t=this[i]=[],o(this,t)),this[i]},set:function(t){a(e,r,n),this[r]=t[0],this[n]=t[1],this[i]=t,o(this,t)}})}Object.defineProperty&&(!h.browser.ie||8<h.browser.version)&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))}(),Sr);function Sr(t){this.id=y(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}function Tr(t,e,i,r,n){var o=[];!function t(e,i,r,n,o,a,s,h){var l=[];var u=[];var p=L(n);var c=o.duration;var f=o.delay;var d=o.additive;var y=o.setToFinal;var g=!R(a);for(var v=0;v<p.length;v++){var _=p[v];if(null!=r[_]&&null!=n[_]&&(g||a[_]))if(R(n[_])&&!D(n[_])){if(i){h||(r[_]=n[_],e.updateDuringAnimation(i));continue}t(e,_,r[_],n[_],o,a&&a[_],s,h)}else l.push(_),u.push(_);else h||(r[_]=n[_],e.updateDuringAnimation(i),u.push(_))}var m=l.length;if(0<m||o.force&&!s.length){for(var x=e.animators,w=[],b=0;b<x.length;b++)x[b].targetName===i&&w.push(x[b]);if(!d&&w.length)for(var b=0;b<w.length;b++){var k,S=w[b].stopTracks(u);S&&(k=M(x,w[b]),x.splice(k,1))}var T=void 0,C=void 0,P=void 0;if(h){C={},y&&(T={});for(var b=0;b<m;b++){var _=l[b];C[_]=r[_],y?T[_]=n[_]:r[_]=n[_]}}else if(y){P={};for(var b=0;b<m;b++){var _=l[b];P[_]=Ke(r[_]),Pr(r,n,_)}}var A=new ei(r,!1,d?w:null);A.targetName=i,o.scope&&(A.scope=o.scope),y&&T&&A.whenWithKeys(0,T,l),P&&A.whenWithKeys(0,P,l),A.whenWithKeys(null==c?500:c,h?C:n,l).delay(f||0),e.addAnimator(A,i),s.push(A)}}(t,"",t,e,i=i||{},r,o,n);function a(){l=!0,--h<=0&&(l?u&&u():p&&p())}function s(){--h<=0&&(l?u&&u():p&&p())}var h=o.length,l=!1,u=i.done,p=i.aborted;h||u&&u(),0<o.length&&i.during&&o[0].during(function(t,e){i.during(e)});for(var c=0;c<o.length;c++){var f=o[c];f.done(a),f.aborted(s),f.start(i.easing,i.force)}return o}function Cr(t,e,i){for(var r=0;r<i;r++)t[r]=e[r]}function Pr(t,e,i){if(D(e[i]))if(D(t[i])||(t[i]=[]),I(e[i])){var r=e[i].length;t[i].length!==r&&(t[i]=new e[i].constructor(r),Cr(t[i],e[i],r))}else{var n=e[i],o=t[i],a=n.length;if(D(n[0]))for(var s=n[0].length,h=0;h<a;h++)o[h]?Cr(o[h],n[h],s):o[h]=Array.prototype.slice.call(n[h]);else Cr(o,n,a);o.length=n.length}else t[i]=e[i]}b(kr,wt),b(kr,Gi);var Ar,Mr=(tt(Dr,Ar=kr),Dr.prototype.childrenRef=function(){return this._children},Dr.prototype.children=function(){return this._children.slice()},Dr.prototype.childAt=function(t){return this._children[t]},Dr.prototype.childOfName=function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},Dr.prototype.childCount=function(){return this._children.length},Dr.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),t.__hostTarget))throw"This elemenet has been used as an attachment";return this},Dr.prototype.addBefore=function(t,e){var i,r;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&0<=(r=(i=this._children).indexOf(e))&&(i.splice(r,0,t),this._doAdd(t)),this},Dr.prototype.replaceAt=function(t,e){var i,r=this._children,n=r[e];return t&&t!==this&&t.parent!==this&&t!==n&&(r[e]=t,n.parent=null,(i=this.__zr)&&n.removeSelfFromZr(i),this._doAdd(t)),this},Dr.prototype._doAdd=function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},Dr.prototype.remove=function(t){var e=this.__zr,i=this._children,r=M(i,t);return r<0||(i.splice(r,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},Dr.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,i=0;i<t.length;i++){var r=t[i];e&&r.removeSelfFromZr(e),r.parent=null}return t.length=0,this},Dr.prototype.eachChild=function(t,e){for(var i=this._children,r=0;r<i.length;r++){var n=i[r];t.call(e,n,r)}return this},Dr.prototype.traverse=function(t,e){for(var i=0;i<this._children.length;i++){var r=this._children[i],n=t.call(e,r);r.isGroup&&!n&&r.traverse(t,e)}return this},Dr.prototype.addSelfToZr=function(t){Ar.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].addSelfToZr(t)},Dr.prototype.removeSelfFromZr=function(t){Ar.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].removeSelfFromZr(t)},Dr.prototype.getBoundingRect=function(t){for(var e=new or(0,0,0,0),i=t||this._children,r=[],n=null,o=0;o<i.length;o++){var a,s,h=i[o];h.ignore||h.invisible||(a=h.getBoundingRect(),(s=h.getLocalTransform(r))?(or.applyTransform(e,a,s),(n=n||e.clone()).union(e)):(n=n||a.clone()).union(a))}return n||e},Dr);function Dr(t){var e=Ar.call(this)||this;return e.isGroup=!0,e._children=[],e.attr(t),e}Mr.prototype.type="group";var Lr=!h.canvasSupported,zr={},Rr={};var Or=(Ir.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},Ir.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},Ir.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},Ir.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return Ne(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,i=0,r=e.length,n=0;n<r;n++)i+=Ne(e[n].color,1);return(i/=r)<.4}return!1}(t)},Ir.prototype.getBackgroundColor=function(){return this._backgroundColor},Ir.prototype.setDarkMode=function(t){this._darkMode=t},Ir.prototype.isDarkMode=function(){return this._darkMode},Ir.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},Ir.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},Ir.prototype.flush=function(){this._flush(!1)},Ir.prototype._flush=function(t){var e,i=(new Date).getTime();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var r=(new Date).getTime();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-i})):0<this._sleepAfterStill&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},Ir.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},Ir.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},Ir.prototype.addHover=function(t){},Ir.prototype.removeHover=function(t){},Ir.prototype.clearHover=function(){},Ir.prototype.refreshHover=function(){this._needsRefreshHover=!0},Ir.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},Ir.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},Ir.prototype.clearAnimation=function(){this.animation.clear()},Ir.prototype.getWidth=function(){return this.painter.getWidth()},Ir.prototype.getHeight=function(){return this.painter.getHeight()},Ir.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},Ir.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},Ir.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},Ir.prototype.on=function(t,e,i){return this.handler.on(t,e,i),this},Ir.prototype.off=function(t,e){this.handler.off(t,e)},Ir.prototype.trigger=function(t,e){this.handler.trigger(t,e)},Ir.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof Mr&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},Ir.prototype.dispose=function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete Rr[t]},Ir);function Ir(t,e,i){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var n=new pe,o=i.renderer||"canvas";if(Lr)throw new Error("IE8 support has been dropped since 5.0");if(zr[o]||(o=L(zr)[0]),!zr[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");i.useDirtyRect=null!=i.useDirtyRect&&i.useDirtyRect;var a=new zr[o](e,n,i,t);this.storage=n,this.painter=a;var s=h.node||h.worker?null:new Ti(a.getViewportRoot(),a.root);this.handler=new Zt(n,a,s,a.root),this.animation=new ni({stage:{update:function(){return r._flush(!0)}}}),this.animation.start()}function Fr(t,e){zr[t]=e}var Br="__zr_style_"+Math.round(10*Math.random()),Er={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Hr={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Er[Br]=!0;var Nr,Wr,Xr=["z","z2","invisible"],Ur=["invisible"],Yr=(tt(jr,Nr=kr),jr.prototype._init=function(t){for(var e=L(t),i=0;i<e.length;i++){var r=e[i];"style"===r?this.useStyle(t[r]):Nr.prototype.attrKV.call(this,r,t[r])}this.style||this.useStyle({})},jr.prototype.beforeBrush=function(){},jr.prototype.afterBrush=function(){},jr.prototype.innerBeforeBrush=function(){},jr.prototype.innerAfterBrush=function(){},jr.prototype.shouldBePainted=function(t,e,i,r){var n=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(t,e,i){return qr.copy(t.getBoundingRect()),t.transform&&qr.applyTransform(t.transform),Gr.width=e,Gr.height=i,!qr.intersect(Gr)}(this,t,e)||n&&!n[0]&&!n[3])return!1;if(i&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},jr.prototype.contain=function(t,e){return this.rectContain(t,e)},jr.prototype.traverse=function(t,e){t.call(e,this)},jr.prototype.rectContain=function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},jr.prototype.getPaintRect=function(){var t,e,i,r,n,o,a,s=this._paintRect;return this._paintRect&&!this.__dirty||(t=this.transform,e=this.getBoundingRect(),r=(i=this.style).shadowBlur||0,n=i.shadowOffsetX||0,o=i.shadowOffsetY||0,s=this._paintRect||(this._paintRect=new or(0,0,0,0)),t?or.applyTransform(s,e,t):s.copy(e),(r||n||o)&&(s.width+=2*r+Math.abs(n),s.height+=2*r+Math.abs(o),s.x=Math.min(s.x,s.x+n-r),s.y=Math.min(s.y,s.y+o-r)),a=this.dirtyRectTolerance,s.isZero()||(s.x=Math.floor(s.x-a),s.y=Math.floor(s.y-a),s.width=Math.ceil(s.width+1+2*a),s.height=Math.ceil(s.height+1+2*a))),s},jr.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new or(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},jr.prototype.getPrevPaintRect=function(){return this._prevPaintRect},jr.prototype.animateStyle=function(t){return this.animate("style",t)},jr.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},jr.prototype.attrKV=function(t,e){"style"!==t?Nr.prototype.attrKV.call(this,t,e):this.style?this.setStyle(e):this.useStyle(e)},jr.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:m(this.style,t),this.dirtyStyle(),this},jr.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},jr.prototype.dirty=function(){this.dirtyStyle()},jr.prototype.styleChanged=function(){return!!(2&this.__dirty)},jr.prototype.styleUpdated=function(){this.__dirty&=-3},jr.prototype.createStyle=function(t){return Z(Er,t)},jr.prototype.useStyle=function(t){t[Br]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},jr.prototype.isStyleObject=function(t){return t[Br]},jr.prototype._innerSaveToNormal=function(t){Nr.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.style&&!e.style&&(e.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,e,Xr)},jr.prototype._applyStateObj=function(t,e,i,r,n,o){Nr.prototype._applyStateObj.call(this,t,e,i,r,n,o);var a,s=!(e&&r);if(e&&e.style?n?r?a=e.style:(a=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(a,e.style)):(a=this._mergeStyle(this.createStyle(),r?this.style:i.style),this._mergeStyle(a,e.style)):s&&(a=i.style),a)if(n){var h=this.style;if(this.style=this.createStyle(s?{}:h),s)for(var l=L(h),u=0;u<l.length;u++)(c=l[u])in a&&(a[c]=a[c],this.style[c]=h[c]);for(var p=L(a),u=0;u<p.length;u++){var c=p[u];this.style[c]=this.style[c]}this._transitionState(t,{style:a},o,this.getAnimationStyleProps())}else this.useStyle(a);for(var f=this.__inHover?Ur:Xr,u=0;u<f.length;u++)c=f[u],e&&null!=e[c]?this[c]=e[c]:s&&null!=i[c]&&(this[c]=i[c])},jr.prototype._mergeStates=function(t){for(var e,i=Nr.prototype._mergeStates.call(this,t),r=0;r<t.length;r++){var n=t[r];n.style&&(e=e||{},this._mergeStyle(e,n.style))}return e&&(i.style=e),i},jr.prototype._mergeStyle=function(t,e){return m(t,e),t},jr.prototype.getAnimationStyleProps=function(){return Hr},jr.initDefaultProps=((Wr=jr.prototype).type="displayable",Wr.invisible=!1,Wr.z=0,Wr.z2=0,Wr.zlevel=0,Wr.culling=!1,Wr.cursor="pointer",Wr.rectHover=!1,Wr.incremental=!1,Wr._rect=null,Wr.dirtyRectTolerance=0,void(Wr.__dirty=2|ae)),jr);function jr(t){return Nr.call(this,t)||this}var qr=new or(0,0,0,0),Gr=new or(0,0,0,0);var Vr=Math.pow,Zr=Math.sqrt,Kr=1e-8,Qr=1e-4,$r=Zr(3),Jr=1/3,tn=et(),en=et(),rn=et();function nn(t){return-Kr<t&&t<Kr}function on(t){return Kr<t||t<-Kr}function an(t,e,i,r,n){var o=1-n;return o*o*(o*t+3*n*e)+n*n*(n*r+3*o*i)}function sn(t,e,i,r,n){var o=1-n;return 3*(((e-t)*o+2*(i-e)*n)*o+(r-i)*n*n)}function hn(t,e,i,r,n){var o,a,s,h,l=6*i-12*e+6*t,u=9*e+3*r-3*t-9*i,p=3*e-3*t,c=0;return nn(u)?on(l)&&0<=(s=-p/l)&&s<=1&&(n[c++]=s):nn(o=l*l-4*u*p)?n[0]=-l/(2*u):0<o&&(h=(-l-(a=Zr(o)))/(2*u),0<=(s=(-l+a)/(2*u))&&s<=1&&(n[c++]=s),0<=h&&h<=1&&(n[c++]=h)),c}function ln(t,e,i,r,n,o){var a=(e-t)*n+t,s=(i-e)*n+e,h=(r-i)*n+i,l=(s-a)*n+a,u=(h-s)*n+s,p=(u-l)*n+l;o[0]=t,o[1]=a,o[2]=l,o[3]=p,o[4]=p,o[5]=u,o[6]=h,o[7]=r}function un(t,e,i,r){var n=1-r;return n*(n*t+2*r*e)+r*r*i}function pn(t,e,i,r){return 2*((1-r)*(e-t)+r*(i-e))}function cn(t,e,i){var r=t+i-2*e;return 0==r?.5:(t-e)/r}function fn(t,e,i,r,n){var o=(e-t)*r+t,a=(i-e)*r+e,s=(a-o)*r+o;n[0]=t,n[1]=o,n[2]=s,n[3]=s,n[4]=a,n[5]=i}var dn=Math.min,yn=Math.max,gn=Math.sin,vn=Math.cos,_n=2*Math.PI,mn=et(),xn=et(),wn=et();function bn(t,e,i,r,n,o){n[0]=dn(t,i),n[1]=dn(e,r),o[0]=yn(t,i),o[1]=yn(e,r)}var kn=[],Sn=[];var Tn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Cn=[],Pn=[],An=[],Mn=[],Dn=[],Ln=[],zn=Math.min,Rn=Math.max,On=Math.cos,In=Math.sin,Fn=Math.sqrt,Bn=Math.abs,En=Math.PI,Hn=2*En,Nn="undefined"!=typeof Float32Array,Wn=[];function Xn(t){return Math.round(t/En*1e8)/1e8%2*En}function Un(t,e){var i=Xn(t[0]);i<0&&(i+=Hn);var r=i-t[0],n=t[1];n+=r,!e&&Hn<=n-i?n=i+Hn:e&&Hn<=i-n?n=i-Hn:!e&&n<i?n=i+(Hn-Xn(i-n)):e&&i<n&&(n=i-(Hn-Xn(n-i))),t[0]=i,t[1]=n}var Yn,jn=(qn.prototype.increaseVersion=function(){this._version++},qn.prototype.getVersion=function(){return this._version},qn.prototype.setScale=function(t,e,i){0<(i=i||0)&&(this._ux=Bn(i/Ai/t)||0,this._uy=Bn(i/Ai/e)||0)},qn.prototype.setDPR=function(t){this.dpr=t},qn.prototype.setContext=function(t){this._ctx=t},qn.prototype.getContext=function(){return this._ctx},qn.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},qn.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},qn.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Tn.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},qn.prototype.lineTo=function(t,e){var i,r=Bn(t-this._xi),n=Bn(e-this._yi),o=r>this._ux||n>this._uy;return this.addData(Tn.L,t,e),this._ctx&&o&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(i=r*r+n*n)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=i),this},qn.prototype.bezierCurveTo=function(t,e,i,r,n,o){return this.addData(Tn.C,t,e,i,r,n,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,i,r,n,o):this._ctx.bezierCurveTo(t,e,i,r,n,o)),this._xi=n,this._yi=o,this},qn.prototype.quadraticCurveTo=function(t,e,i,r){return this.addData(Tn.Q,t,e,i,r),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,i,r):this._ctx.quadraticCurveTo(t,e,i,r)),this._xi=i,this._yi=r,this},qn.prototype.arc=function(t,e,i,r,n,o){Wn[0]=r,Wn[1]=n,Un(Wn,o),r=Wn[0];var a=(n=Wn[1])-r;return this.addData(Tn.A,t,e,i,i,r,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,r,n,o),this._xi=On(n)*i+t,this._yi=In(n)*i+e,this},qn.prototype.arcTo=function(t,e,i,r,n){return this._ctx&&this._ctx.arcTo(t,e,i,r,n),this},qn.prototype.rect=function(t,e,i,r){return this._ctx&&this._ctx.rect(t,e,i,r),this.addData(Tn.R,t,e,i,r),this},qn.prototype.closePath=function(){this._drawPendingPt(),this.addData(Tn.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},qn.prototype.fill=function(t){t&&t.fill(),this.toStatic()},qn.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},qn.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e,this._needsDash=!0}else this._lineDash=null,this._needsDash=!1;return this},qn.prototype.setLineDashOffset=function(t){return this._dashOffset=t,this},qn.prototype.len=function(){return this._len},qn.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Nn||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},qn.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,r=this._len,n=0;n<e;n++)i+=t[n].len();for(Nn&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i)),n=0;n<e;n++)for(var o=t[n].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},qn.prototype.addData=function(t,e,i,r,n,o,a,s,h){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},qn.prototype._drawPendingPt=function(){0<this._pendingPtDist&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},qn.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},qn.prototype._dashedLineTo=function(t,e){var i,r,n=this._dashSum,o=this._lineDash,a=this._ctx,s=this._dashOffset,h=this._xi,l=this._yi,u=t-h,p=e-l,c=Fn(u*u+p*p),f=h,d=l,y=o.length;for(s<0&&(s=n+s),f-=(s%=n)*(u/=c),d-=s*(p/=c);0<u&&f<=t||u<0&&t<=f||0===u&&(0<p&&d<=e||p<0&&e<=d);)f+=u*(i=o[r=this._dashIdx]),d+=p*i,this._dashIdx=(r+1)%y,0<u&&f<h||u<0&&h<f||0<p&&d<l||p<0&&l<d||a[r%2?"moveTo":"lineTo"]((0<=u?zn:Rn)(f,t),(0<=p?zn:Rn)(d,e));u=f-t,p=d-e,this._dashOffset=-Fn(u*u+p*p)},qn.prototype._dashedBezierTo=function(t,e,i,r,n,o){var a,s,h,l,u,p=this._ctx,c=this._dashSum,f=this._dashOffset,d=this._lineDash,y=this._xi,g=this._yi,v=0,_=this._dashIdx,m=d.length,x=0;for(f<0&&(f=c+f),f%=c,a=0;a<1;a+=.1)s=an(y,t,i,n,a+.1)-an(y,t,i,n,a),h=an(g,e,r,o,a+.1)-an(g,e,r,o,a),v+=Fn(s*s+h*h);for(;_<m&&!(f<(x+=d[_]));_++);for(a=(x-f)/v;a<=1;)l=an(y,t,i,n,a),u=an(g,e,r,o,a),_%2?p.moveTo(l,u):p.lineTo(l,u),a+=d[_]/v,_=(_+1)%m;_%2!=0&&p.lineTo(n,o),s=n-l,h=o-u,this._dashOffset=-Fn(s*s+h*h)},qn.prototype._dashedQuadraticTo=function(t,e,i,r){var n=i,o=r;i=(i+2*t)/3,r=(r+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,r,n,o)},qn.prototype.toStatic=function(){var t;this._saveData&&(this._drawPendingPt(),(t=this.data)instanceof Array&&(t.length=this._len,Nn&&11<this._len&&(this.data=new Float32Array(t))))},qn.prototype.getBoundingRect=function(){An[0]=An[1]=Dn[0]=Dn[1]=Number.MAX_VALUE,Mn[0]=Mn[1]=Ln[0]=Ln[1]=-Number.MAX_VALUE;for(var t,e,i,r,n,o,a,s,h,l,u,p,c,f,d=this.data,y=0,g=0,v=0,_=0,m=0;m<this._len;){var x=d[m++],w=1===m;switch(w&&(v=y=d[m],_=g=d[m+1]),x){case Tn.M:y=v=d[m++],g=_=d[m++],Dn[0]=v,Dn[1]=_,Ln[0]=v,Ln[1]=_;break;case Tn.L:bn(y,g,d[m],d[m+1],Dn,Ln),y=d[m++],g=d[m++];break;case Tn.C:!function(t,e,i,r,n,o,a,s,h,l){var u=hn,p=an,c=u(t,i,n,a,kn);h[0]=1/0,h[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var f=0;f<c;f++){var d=p(t,i,n,a,kn[f]);h[0]=dn(d,h[0]),l[0]=yn(d,l[0])}for(c=u(e,r,o,s,Sn),f=0;f<c;f++){var y=p(e,r,o,s,Sn[f]);h[1]=dn(y,h[1]),l[1]=yn(y,l[1])}h[0]=dn(t,h[0]),l[0]=yn(t,l[0]),h[0]=dn(a,h[0]),l[0]=yn(a,l[0]),h[1]=dn(e,h[1]),l[1]=yn(e,l[1]),h[1]=dn(s,h[1]),l[1]=yn(s,l[1])}(y,g,d[m++],d[m++],d[m++],d[m++],d[m],d[m+1],Dn,Ln),y=d[m++],g=d[m++];break;case Tn.Q:t=y,e=g,i=d[m++],r=d[m++],n=d[m],o=d[m+1],a=Dn,s=Ln,f=c=p=u=l=h=void 0,l=un,u=yn(dn((h=cn)(t,i,n),1),0),p=yn(dn(h(e,r,o),1),0),c=l(t,i,n,u),f=l(e,r,o,p),a[0]=dn(t,n,c),a[1]=dn(e,o,f),s[0]=yn(t,n,c),s[1]=yn(e,o,f),y=d[m++],g=d[m++];break;case Tn.A:var b=d[m++],k=d[m++],S=d[m++],T=d[m++],C=d[m++],P=d[m++]+C;m+=1;var A=!d[m++];w&&(v=On(C)*S+b,_=In(C)*T+k),function(t,e,i,r,n,o,a,s,h){var l,u=yt,p=gt,c=Math.abs(n-o);if(c%_n<1e-4&&1e-4<c)return s[0]=t-i,s[1]=e-r,h[0]=t+i,h[1]=e+r;mn[0]=vn(n)*i+t,mn[1]=gn(n)*r+e,xn[0]=vn(o)*i+t,xn[1]=gn(o)*r+e,u(s,mn,xn),p(h,mn,xn),(n%=_n)<0&&(n+=_n),(o%=_n)<0&&(o+=_n),o<n&&!a?o+=_n:n<o&&a&&(n+=_n),a&&(l=o,o=n,n=l);for(var f=0;f<o;f+=Math.PI/2)n<f&&(wn[0]=vn(f)*i+t,wn[1]=gn(f)*r+e,u(s,wn,s),p(h,wn,h))}(b,k,S,T,C,P,A,Dn,Ln),y=On(P)*S+b,g=In(P)*T+k;break;case Tn.R:bn(v=y=d[m++],_=g=d[m++],v+d[m++],_+d[m++],Dn,Ln);break;case Tn.Z:y=v,g=_}yt(An,An,Dn),gt(Mn,Mn,Ln)}return 0===m&&(An[0]=An[1]=Mn[0]=Mn[1]=0),new or(An[0],An[1],Mn[0]-An[0],Mn[1]-An[1])},qn.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,r=this._uy,n=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var h=this._pathSegLen,l=0,u=0,p=0;p<e;){var c=t[p++],f=1===p;f&&(a=n=t[p],s=o=t[p+1]);var d=-1;switch(c){case Tn.M:n=a=t[p++],o=s=t[p++];break;case Tn.L:var y=t[p++],g=(m=t[p++])-o;(Bn(M=y-n)>i||Bn(g)>r||p===e-1)&&(d=Math.sqrt(M*M+g*g),n=y,o=m);break;case Tn.C:var v=t[p++],_=t[p++],y=t[p++],m=t[p++],x=t[p++],w=t[p++],d=function(t,e,i,r,n,o,a,s,h){for(var l=t,u=e,p=0,c=1/h,f=1;f<=h;f++){var d=f*c,y=an(t,i,n,a,d),g=an(e,r,o,s,d),v=y-l,_=g-u;p+=Math.sqrt(v*v+_*_),l=y,u=g}return p}(n,o,v,_,y,m,x,w,10),n=x,o=w;break;case Tn.Q:d=function(t,e,i,r,n,o,a){for(var s=t,h=e,l=0,u=1/a,p=1;p<=a;p++){var c=p*u,f=un(t,i,n,c),d=un(e,r,o,c),y=f-s,g=d-h;l+=Math.sqrt(y*y+g*g),s=f,h=d}return l}(n,o,v=t[p++],_=t[p++],y=t[p++],m=t[p++],10),n=y,o=m;break;case Tn.A:var b=t[p++],k=t[p++],S=t[p++],T=t[p++],C=t[p++],P=t[p++],A=P+C;p+=1,t[p++],f&&(a=On(C)*S+b,s=In(C)*T+k),d=Rn(S,T)*zn(Hn,Math.abs(P)),n=On(A)*S+b,o=In(A)*T+k;break;case Tn.R:a=n=t[p++],s=o=t[p++],d=2*t[p++]+2*t[p++];break;case Tn.Z:var M=a-n,g=s-o;d=Math.sqrt(M*M+g*g),n=a,o=s}0<=d&&(l+=h[u++]=d)}return this._pathLen=l},qn.prototype.rebuildPath=function(t,e){var i,r,n,o,a,s,h,l,u,p,c=this.data,f=this._ux,d=this._uy,y=this._len,g=e<1,v=0,_=0,m=0;if(!g||(this._pathSegLen||this._calculateLength(),h=this._pathSegLen,l=e*this._pathLen))t:for(var x=0;x<y;){var w=c[x++],b=1===x;switch(b&&(i=n=c[x],r=o=c[x+1]),w){case Tn.M:0<m&&(t.lineTo(u,p),m=0),i=n=c[x++],r=o=c[x++],t.moveTo(n,o);break;case Tn.L:a=c[x++],s=c[x++];var k=Bn(a-n),S=Bn(s-o);if(f<k||d<S){if(g){if(l<v+(j=h[_++])){var T=(l-v)/j;t.lineTo(n*(1-T)+a*T,o*(1-T)+s*T);break t}v+=j}t.lineTo(a,s),n=a,o=s,m=0}else{var C=k*k+S*S;m<C&&(u=a,p=s,m=C)}break;case Tn.C:var P=c[x++],A=c[x++],M=c[x++],D=c[x++],L=c[x++],z=c[x++];if(g){if(l<v+(j=h[_++])){ln(n,P,M,L,T=(l-v)/j,Cn),ln(o,A,D,z,T,Pn),t.bezierCurveTo(Cn[1],Pn[1],Cn[2],Pn[2],Cn[3],Pn[3]);break t}v+=j}t.bezierCurveTo(P,A,M,D,L,z),n=L,o=z;break;case Tn.Q:if(P=c[x++],A=c[x++],M=c[x++],D=c[x++],g){if(l<v+(j=h[_++])){fn(n,P,M,T=(l-v)/j,Cn),fn(o,A,D,T,Pn),t.quadraticCurveTo(Cn[1],Pn[1],Cn[2],Pn[2]);break t}v+=j}t.quadraticCurveTo(P,A,M,D),n=M,o=D;break;case Tn.A:var R=c[x++],O=c[x++],I=c[x++],F=c[x++],B=c[x++],E=c[x++],H=c[x++],N=!c[x++],W=F<I?I:F,X=.001<Bn(I-F),U=B+E,Y=!1;if(g&&(l<v+(j=h[_++])&&(U=B+E*(l-v)/j,Y=!0),v+=j),X&&t.ellipse?t.ellipse(R,O,I,F,H,B,U,N):t.arc(R,O,W,B,U,N),Y)break t;b&&(i=On(B)*I+R,r=In(B)*F+O),n=On(U)*I+R,o=In(U)*F+O;break;case Tn.R:i=n=c[x],r=o=c[x+1],a=c[x++],s=c[x++];var j,q=c[x++],G=c[x++];if(g){if(l<v+(j=h[_++])){var V=l-v;t.moveTo(a,s),t.lineTo(a+zn(V,q),s),0<(V-=q)&&t.lineTo(a+q,s+zn(V,G)),0<(V-=G)&&t.lineTo(a+Rn(q-V,0),s+G),0<(V-=q)&&t.lineTo(a,s+Rn(G-V,0));break t}v+=j}t.rect(a,s,q,G);break;case Tn.Z:if(0<m&&(t.lineTo(u,p),m=0),g){if(l<v+(j=h[_++])){T=(l-v)/j,t.lineTo(n*(1-T)+i*T,o*(1-T)+r*T);break t}v+=j}t.closePath(),n=i,o=r}}},qn.CMD=Tn,qn.initDefaultProps=((Yn=qn.prototype)._saveData=!0,Yn._needsDash=!1,Yn._dashOffset=0,Yn._dashIdx=0,Yn._dashSum=0,Yn._ux=0,Yn._uy=0,Yn._pendingPtDist=0,void(Yn._version=0)),qn);function qn(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function Gn(t,e,i,r,n,o,a){if(0!==n){var s=n,h=0;if(!(e+s<a&&r+s<a||a<e-s&&a<r-s||t+s<o&&i+s<o||o<t-s&&o<i-s)){if(t===i)return Math.abs(o-t)<=s/2;var l=(h=(e-r)/(t-i))*o-a+(t*r-i*e)/(t-i);return l*l/(h*h+1)<=s/2*s/2}}}function Vn(t,e,i,r,n,o,a,s,h,l,u){if(0!==h){var p=h;if(!(e+p<u&&r+p<u&&o+p<u&&s+p<u||u<e-p&&u<r-p&&u<o-p&&u<s-p||t+p<l&&i+p<l&&n+p<l&&a+p<l||l<t-p&&l<i-p&&l<n-p&&l<a-p))return function(t,e,i,r,n,o,a,s,h,l,u){var p,c,f,d,y,g=.005,v=1/0;tn[0]=h,tn[1]=l;for(var _=0;_<1;_+=.05)en[0]=an(t,i,n,a,_),en[1]=an(e,r,o,s,_),(d=ct(tn,en))<v&&(p=_,v=d);v=1/0;for(var m=0;m<32&&!(g<Qr);m++)c=p-g,f=p+g,en[0]=an(t,i,n,a,c),en[1]=an(e,r,o,s,c),d=ct(en,tn),0<=c&&d<v?(p=c,v=d):(rn[0]=an(t,i,n,a,f),rn[1]=an(e,r,o,s,f),y=ct(rn,tn),f<=1&&y<v?(p=f,v=y):g*=.5);return u&&(u[0]=an(t,i,n,a,p),u[1]=an(e,r,o,s,p)),Zr(v)}(t,e,i,r,n,o,a,s,l,u,null)<=p/2}}function Zn(t,e,i,r,n,o,a,s,h){if(0!==a){var l=a;if(!(e+l<h&&r+l<h&&o+l<h||h<e-l&&h<r-l&&h<o-l||t+l<s&&i+l<s&&n+l<s||s<t-l&&s<i-l&&s<n-l))return function(t,e,i,r,n,o,a,s,h){var l,u=.005,p=1/0;tn[0]=a,tn[1]=s;for(var c=0;c<1;c+=.05){en[0]=un(t,i,n,c),en[1]=un(e,r,o,c),(v=ct(tn,en))<p&&(l=c,p=v)}p=1/0;for(var f=0;f<32&&!(u<Qr);f++){var d=l-u,y=l+u;en[0]=un(t,i,n,d),en[1]=un(e,r,o,d);var g,v=ct(en,tn);0<=d&&v<p?(l=d,p=v):(rn[0]=un(t,i,n,y),rn[1]=un(e,r,o,y),g=ct(rn,tn),y<=1&&g<p?(l=y,p=g):u*=.5)}return h&&(h[0]=un(t,i,n,l),h[1]=un(e,r,o,l)),Zr(p)}(t,e,i,r,n,o,s,h,null)<=l/2}}var Kn=2*Math.PI;function Qn(t){return(t%=Kn)<0&&(t+=Kn),t}var $n=2*Math.PI;function Jn(t,e,i,r,n,o){if(e<o&&r<o||o<e&&o<r)return 0;if(r===e)return 0;var a=(o-e)/(r-e),s=r<e?1:-1;1!=a&&0!=a||(s=r<e?.5:-.5);var h=a*(i-t)+t;return h===n?1/0:n<h?s:0}var to=jn.CMD,eo=2*Math.PI,io=1e-4;var ro=[-1,-1,-1],no=[-1,-1];function oo(t,e,i,r,n,o,a,s,h,l){if(e<l&&r<l&&o<l&&s<l||l<e&&l<r&&l<o&&l<s)return 0;var u,p,c,f,d,y,g,v,_,m,x,w,b,k,S,T,C,P,A,M,D,L,z,R,O=(f=ro,L=(P=3*((c=o)-2*(p=r)+(u=e)))*(A=3*(p-u))-9*(C=s+3*(p-c)-u)*(M=u-l),z=A*A-3*P*M,R=0,nn(D=P*P-3*C*A)&&nn(L)?nn(P)?f[0]=0:0<=(k=-A/P)&&k<=1&&(f[R++]=k):nn(d=L*L-4*D*z)?(S=-(y=L/D)/2,0<=(k=-P/C+y)&&k<=1&&(f[R++]=k),0<=S&&S<=1&&(f[R++]=S)):0<d?(_=D*P+1.5*C*(-L-(g=Zr(d))),0<=(k=(-P-((v=(v=D*P+1.5*C*(-L+g))<0?-Vr(-v,Jr):Vr(v,Jr))+(_=_<0?-Vr(-_,Jr):Vr(_,Jr))))/(3*C))&&k<=1&&(f[R++]=k)):(m=(2*D*P-3*C*L)/(2*Zr(D*D*D)),x=Math.acos(m)/3,k=(-P-2*(w=Zr(D))*(b=Math.cos(x)))/(3*C),S=(-P+w*(b+$r*Math.sin(x)))/(3*C),T=(-P+w*(b-$r*Math.sin(x)))/(3*C),0<=k&&k<=1&&(f[R++]=k),0<=S&&S<=1&&(f[R++]=S),0<=T&&T<=1&&(f[R++]=T)),R);if(0===O)return 0;for(var I,F=0,B=-1,E=void 0,H=void 0,N=0;N<O;N++){var W=ro[N],X=0===W||1===W?.5:1;an(t,i,n,a,W)<h||(B<0&&(B=hn(e,r,o,s,no),no[1]<no[0]&&1<B&&(I=void 0,I=no[0],no[0]=no[1],no[1]=I),E=an(e,r,o,s,no[0]),1<B&&(H=an(e,r,o,s,no[1]))),2===B?W<no[0]?F+=E<e?X:-X:W<no[1]?F+=H<E?X:-X:F+=s<H?X:-X:W<no[0]?F+=E<e?X:-X:F+=s<E?X:-X)}return F}function ao(t,e,i,r,n,o,a,s){if(e<s&&r<s&&o<s||s<e&&s<r&&s<o)return 0;var h,l,u,p,c,f,d,y,g,v,_,m=(u=ro,g=2*((l=r)-(h=e)),v=h-s,_=0,nn(y=h-2*l+o)?on(g)&&0<=(f=-v/g)&&f<=1&&(u[_++]=f):nn(p=g*g-4*y*v)?0<=(f=-g/(2*y))&&f<=1&&(u[_++]=f):0<p&&(d=(-g-(c=Zr(p)))/(2*y),0<=(f=(-g+c)/(2*y))&&f<=1&&(u[_++]=f),0<=d&&d<=1&&(u[_++]=d)),_);if(0===m)return 0;var x=cn(e,r,o);if(0<=x&&x<=1){for(var w=0,b=un(e,r,o,x),k=0;k<m;k++){var S=0===ro[k]||1===ro[k]?.5:1;un(t,i,n,ro[k])<a||(ro[k]<x?w+=b<e?S:-S:w+=o<b?S:-S)}return w}S=0===ro[0]||1===ro[0]?.5:1;return un(t,i,n,ro[0])<a?0:o<e?S:-S}function so(t,e,i,r,n){for(var o,a,s=t.data,h=t.len(),l=0,u=0,p=0,c=0,f=0,d=0;d<h;){var y=s[d++],g=1===d;switch(y===to.M&&1<d&&(i||(l+=Jn(u,p,c,f,r,n))),g&&(c=u=s[d],f=p=s[d+1]),y){case to.M:u=c=s[d++],p=f=s[d++];break;case to.L:if(i){if(Gn(u,p,s[d],s[d+1],e,r,n))return!0}else l+=Jn(u,p,s[d],s[d+1],r,n)||0;u=s[d++],p=s[d++];break;case to.C:if(i){if(Vn(u,p,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],e,r,n))return!0}else l+=oo(u,p,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],r,n)||0;u=s[d++],p=s[d++];break;case to.Q:if(i){if(Zn(u,p,s[d++],s[d++],s[d],s[d+1],e,r,n))return!0}else l+=ao(u,p,s[d++],s[d++],s[d],s[d+1],r,n)||0;u=s[d++],p=s[d++];break;case to.A:var v=s[d++],_=s[d++],m=s[d++],x=s[d++],w=s[d++],b=s[d++];d+=1;var k=!!(1-s[d++]),S=Math.cos(w)*m+v,T=Math.sin(w)*x+_;g?(c=S,f=T):l+=Jn(u,p,S,T,r,n);var C=(r-v)*x/m+v;if(i){if(function(t,e,i,r,n,o,a,s,h){if(0!==a){var l=a;s-=t,h-=e;var u,p=Math.sqrt(s*s+h*h);if(!(i<p-l||p+l<i)){if(Math.abs(r-n)%$n<1e-4)return 1;(n=o?(u=r,r=Qn(n),Qn(u)):(r=Qn(r),Qn(n)))<r&&(n+=$n);var c=Math.atan2(h,s);return c<0&&(c+=$n),r<=c&&c<=n||r<=c+$n&&c+$n<=n}}}(v,_,x,w,w+b,k,e,C,n))return!0}else l+=function(t,e,i,r,n,o,a,s){if(i<(s-=e)||s<-i)return 0;var h=Math.sqrt(i*i-s*s);ro[0]=-h,ro[1]=h;var l,u=Math.abs(r-n);if(u<1e-4)return 0;if(eo-1e-4<=u){n=eo;var p=o?1:-1;return a>=ro[r=0]+t&&a<=ro[1]+t?p:0}n<r&&(l=r,r=n,n=l),r<0&&(r+=eo,n+=eo);for(var c=0,f=0;f<2;f++){var d,y=ro[f];a<y+t&&(p=o?1:-1,(d=Math.atan2(s,y))<0&&(d=eo+d),(r<=d&&d<=n||r<=d+eo&&d+eo<=n)&&(d>Math.PI/2&&d<1.5*Math.PI&&(p=-p),c+=p))}return c}(v,_,x,w,w+b,k,C,n);u=Math.cos(w+b)*m+v,p=Math.sin(w+b)*x+_;break;case to.R:c=u=s[d++],f=p=s[d++];if(S=c+s[d++],T=f+s[d++],i){if(Gn(c,f,S,f,e,r,n)||Gn(S,f,S,T,e,r,n)||Gn(S,T,c,T,e,r,n)||Gn(c,T,c,f,e,r,n))return!0}else l+=Jn(S,f,S,T,r,n),l+=Jn(c,T,c,f,r,n);break;case to.Z:if(i){if(Gn(u,p,c,f,e,r,n))return!0}else l+=Jn(u,p,c,f,r,n);u=c,p=f}}return i||(o=p,a=f,Math.abs(o-a)<io)||(l+=Jn(u,p,c,f,r,n)||0),0!==l}var ho,lo,uo=x({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Er),po={style:x({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Hr.style)},co=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],fo=(tt(yo,ho=Yr),yo.prototype.update=function(){var e=this;ho.prototype.update.call(this);var t=this.style;if(t.decal){var i=this._decalEl=this._decalEl||new yo;i.buildPath===yo.prototype.buildPath&&(i.buildPath=function(t){e.buildPath(t,e.shape)}),i.silent=!0;var r=i.style;for(var n in t)r[n]!==t[n]&&(r[n]=t[n]);r.fill=t.fill?t.decal:null,r.decal=null,r.shadowColor=null,t.strokeFirst&&(r.stroke=null);for(var o=0;o<co.length;++o)i[co[o]]=this[co[o]];i.__dirty|=ae}else this._decalEl&&(this._decalEl=null)},yo.prototype.getDecalElement=function(){return this._decalEl},yo.prototype._init=function(t){var e=L(t);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var r=0;r<e.length;r++){var n=e[r],o=t[n];"style"===n?this.style?m(this.style,o):this.useStyle(o):"shape"===n?m(this.shape,o):ho.prototype.attrKV.call(this,n,o)}this.style||this.useStyle({})},yo.prototype.getDefaultStyle=function(){return null},yo.prototype.getDefaultShape=function(){return{}},yo.prototype.canBeInsideText=function(){return this.hasFill()},yo.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(A(t)){var e=Ne(t,0);return.5<e?Mi:.2<e?"#eee":Di}if(t)return Di}return Mi},yo.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(A(e)){var i=this.__zr;if(!(!i||!i.isDarkMode())==Ne(t,0)<.4)return e}},yo.prototype.buildPath=function(t,e,i){},yo.prototype.pathUpdated=function(){this.__dirty&=~se},yo.prototype.createPathProxy=function(){this.path=new jn(!1)},yo.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))},yo.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},yo.prototype.getBoundingRect=function(){var t,e,i=this._rect,r=this.style,n=!i;if(n&&(t=!1,this.path||(t=!0,this.createPathProxy()),e=this.path,(t||this.__dirty&se)&&(e.beginPath(),this.buildPath(e,this.shape,!1),this.pathUpdated()),i=e.getBoundingRect()),this._rect=i,this.hasStroke()&&this.path&&0<this.path.len()){var o,a,s,h=this._rectWithStroke||(this._rectWithStroke=i.clone());return(this.__dirty||n)&&(h.copy(i),o=r.strokeNoScale?this.getLineScale():1,s=r.lineWidth,this.hasFill()||(a=this.strokeContainThreshold,s=Math.max(s,null==a?4:a)),1e-10<o&&(h.width+=s/o,h.height+=s/o,h.x-=s/o/2,h.y-=s/o/2)),h}return i},yo.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),n=this.style;if(t=i[0],e=i[1],r.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=n.lineWidth,s=n.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),so(o,a/s,!0,t,e)))return!0}if(this.hasFill())return so(o,0,!1,t,e)}return!1},yo.prototype.dirtyShape=function(){this.__dirty|=se,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},yo.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},yo.prototype.animateShape=function(t){return this.animate("shape",t)},yo.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},yo.prototype.attrKV=function(t,e){"shape"===t?this.setShape(e):ho.prototype.attrKV.call(this,t,e)},yo.prototype.setShape=function(t,e){var i=(i=this.shape)||(this.shape={});return"string"==typeof t?i[t]=e:m(i,t),this.dirtyShape(),this},yo.prototype.shapeChanged=function(){return!!(this.__dirty&se)},yo.prototype.createStyle=function(t){return Z(uo,t)},yo.prototype._innerSaveToNormal=function(t){ho.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.shape&&!e.shape&&(e.shape=m({},this.shape))},yo.prototype._applyStateObj=function(t,e,i,r,n,o){ho.prototype._applyStateObj.call(this,t,e,i,r,n,o);var a,s=!(e&&r);if(e&&e.shape?n?r?a=e.shape:(a=m({},i.shape),m(a,e.shape)):(a=m({},r?this.shape:i.shape),m(a,e.shape)):s&&(a=i.shape),a)if(n){this.shape=m({},this.shape);for(var h={},l=L(a),u=0;u<l.length;u++){var p=l[u];"object"==typeof a[p]?this.shape[p]=a[p]:h[p]=a[p]}this._transitionState(t,{shape:h},o)}else this.shape=a,this.dirtyShape()},yo.prototype._mergeStates=function(t){for(var e,i=ho.prototype._mergeStates.call(this,t),r=0;r<t.length;r++){var n=t[r];n.shape&&(e=e||{},this._mergeStyle(e,n.shape))}return e&&(i.shape=e),i},yo.prototype.getAnimationStyleProps=function(){return po},yo.prototype.isZeroArea=function(){return!1},yo.extend=function(i){var r,t=(tt(e,r=yo),e.prototype.getDefaultStyle=function(){return v(i.style)},e.prototype.getDefaultShape=function(){return v(i.shape)},e);function e(t){var e=r.call(this,t)||this;return i.init&&i.init.call(e,t),e}for(var n in i)"function"==typeof i[n]&&(t.prototype[n]=i[n]);return t},yo.initDefaultProps=((lo=yo.prototype).type="path",lo.strokeContainThreshold=5,lo.segmentIgnoreThreshold=0,lo.subPixelOptimize=!1,lo.autoBatch=!1,void(lo.__dirty=2|ae|se)),yo);function yo(t){return ho.call(this,t)||this}var go=jn.CMD,vo=[[],[],[]],_o=Math.sqrt,mo=Math.atan2;var xo=Math.sqrt,wo=Math.sin,bo=Math.cos,ko=Math.PI;function So(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function To(t,e){return(t[0]*e[0]+t[1]*e[1])/(So(t)*So(e))}function Co(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(To(t,e))}function Po(t,e,i,r,n,o,a,s,h,l,u){var p=h*(ko/180),c=bo(p)*(t-i)/2+wo(p)*(e-r)/2,f=-1*wo(p)*(t-i)/2+bo(p)*(e-r)/2,d=c*c/(a*a)+f*f/(s*s);1<d&&(a*=xo(d),s*=xo(d));var y,g=(n===o?-1:1)*xo((a*a*(s*s)-a*a*(f*f)-s*s*(c*c))/(a*a*(f*f)+s*s*(c*c)))||0,v=g*a*f/s,_=g*-s*c/a,m=(t+i)/2+bo(p)*v-wo(p)*_,x=(e+r)/2+wo(p)*v+bo(p)*_,w=Co([1,0],[(c-v)/a,(f-_)/s]),b=[(c-v)/a,(f-_)/s],k=[(-1*c-v)/a,(-1*f-_)/s],S=Co(b,k);To(b,k)<=-1&&(S=ko),1<=To(b,k)&&(S=0),S<0&&(y=Math.round(S/ko*1e6)/1e6,S=2*ko+y%2*ko),u.addData(l,m,x,a,s,w,S,p,o)}var Ao=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Mo=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Do,Lo=(tt(zo,Do=fo),zo.prototype.applyTransform=function(t){},zo);function zo(){return null!==Do&&Do.apply(this,arguments)||this}function Ro(t){return null!=t.setData}function Oo(t,e){var i=function(t){var e=new jn;if(!t)return e;var i,r=0,n=0,o=r,a=n,s=jn.CMD,h=t.match(Ao);if(!h)return e;for(var l=0;l<h.length;l++){for(var u=h[l],p=u.charAt(0),c=void 0,f=u.match(Mo)||[],d=f.length,y=0;y<d;y++)f[y]=parseFloat(f[y]);for(var g=0;g<d;){var v=void 0,_=void 0,m=void 0,x=void 0,w=void 0,b=void 0,k=void 0,S=r,T=n,C=void 0,P=void 0;switch(p){case"l":r+=f[g++],n+=f[g++],c=s.L,e.addData(c,r,n);break;case"L":r=f[g++],n=f[g++],c=s.L,e.addData(c,r,n);break;case"m":r+=f[g++],n+=f[g++],c=s.M,e.addData(c,r,n),o=r,a=n,p="l";break;case"M":r=f[g++],n=f[g++],c=s.M,e.addData(c,r,n),o=r,a=n,p="L";break;case"h":r+=f[g++],c=s.L,e.addData(c,r,n);break;case"H":r=f[g++],c=s.L,e.addData(c,r,n);break;case"v":n+=f[g++],c=s.L,e.addData(c,r,n);break;case"V":n=f[g++],c=s.L,e.addData(c,r,n);break;case"C":c=s.C,e.addData(c,f[g++],f[g++],f[g++],f[g++],f[g++],f[g++]),r=f[g-2],n=f[g-1];break;case"c":c=s.C,e.addData(c,f[g++]+r,f[g++]+n,f[g++]+r,f[g++]+n,f[g++]+r,f[g++]+n),r+=f[g-2],n+=f[g-1];break;case"S":v=r,_=n,C=e.len(),P=e.data,i===s.C&&(v+=r-P[C-4],_+=n-P[C-3]),c=s.C,S=f[g++],T=f[g++],r=f[g++],n=f[g++],e.addData(c,v,_,S,T,r,n);break;case"s":v=r,_=n,C=e.len(),P=e.data,i===s.C&&(v+=r-P[C-4],_+=n-P[C-3]),c=s.C,S=r+f[g++],T=n+f[g++],r+=f[g++],n+=f[g++],e.addData(c,v,_,S,T,r,n);break;case"Q":S=f[g++],T=f[g++],r=f[g++],n=f[g++],c=s.Q,e.addData(c,S,T,r,n);break;case"q":S=f[g++]+r,T=f[g++]+n,r+=f[g++],n+=f[g++],c=s.Q,e.addData(c,S,T,r,n);break;case"T":v=r,_=n,C=e.len(),P=e.data,i===s.Q&&(v+=r-P[C-4],_+=n-P[C-3]),r=f[g++],n=f[g++],c=s.Q,e.addData(c,v,_,r,n);break;case"t":v=r,_=n,C=e.len(),P=e.data,i===s.Q&&(v+=r-P[C-4],_+=n-P[C-3]),r+=f[g++],n+=f[g++],c=s.Q,e.addData(c,v,_,r,n);break;case"A":m=f[g++],x=f[g++],w=f[g++],b=f[g++],k=f[g++],Po(S=r,T=n,r=f[g++],n=f[g++],b,k,m,x,w,c=s.A,e);break;case"a":m=f[g++],x=f[g++],w=f[g++],b=f[g++],k=f[g++],Po(S=r,T=n,r+=f[g++],n+=f[g++],b,k,m,x,w,c=s.A,e)}}"z"!==p&&"Z"!==p||(c=s.Z,e.addData(c),r=o,n=a),i=c}return e.toStatic(),e}(t),r=m({},e);return r.buildPath=function(t){var e;Ro(t)?(t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e,1)):(e=t,i.rebuildPath(e,1))},r.applyTransform=function(t){!function(t,e){for(var i,r,n,o,a=t.data,s=t.len(),h=go.M,l=go.C,u=go.L,p=go.R,c=go.A,f=go.Q,d=0,y=0;d<s;){switch(i=a[d++],y=d,r=0,i){case h:case u:r=1;break;case l:r=3;break;case f:r=2;break;case c:var g=e[4],v=e[5],_=_o(e[0]*e[0]+e[1]*e[1]),m=_o(e[2]*e[2]+e[3]*e[3]),x=mo(-e[1]/m,e[0]/_);a[d]*=_,a[d++]+=g,a[d]*=m,a[d++]+=v,a[d++]*=_,a[d++]*=m,a[d++]+=x,a[d++]+=x,y=d+=2;break;case p:o[0]=a[d++],o[1]=a[d++],dt(o,o,e),a[y++]=o[0],a[y++]=o[1],o[0]+=a[d++],o[1]+=a[d++],dt(o,o,e),a[y++]=o[0],a[y++]=o[1]}for(n=0;n<r;n++){var w=vo[n];w[0]=a[d++],w[1]=a[d++],dt(w,w,e),a[y++]=w[0],a[y++]=w[1]}}t.increaseVersion()}(i,t),this.dirtyShape()},r}function Io(t,e){return new Lo(Oo(t,e))}var Fo=Object.freeze({__proto__:null,createFromString:Io,extendFromString:function(t,e){var i,r=Oo(t,e);function n(t){var e=i.call(this,t)||this;return e.applyTransform=r.applyTransform,e.buildPath=r.buildPath,e}return tt(n,i=Lo),n},mergePath:function(t,e){for(var i=[],r=t.length,n=0;n<r;n++){var o=t[n];o.path||o.createPathProxy(),o.shapeChanged()&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var a=new fo(e);return a.createPathProxy(),a.buildPath=function(t){var e;Ro(t)&&(t.appendPath(i),(e=t.getContext())&&t.rebuildPath(e,1))},a}}),Bo=x({x:0,y:0},Er),Eo={style:x({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Hr.style)};var Ho,No=(tt(Wo,Ho=Yr),Wo.prototype.createStyle=function(t){return Z(Bo,t)},Wo.prototype._getSize=function(t){var e=this.style,i=e[t];if(null!=i)return i;var r,n=(r=e.image)&&"string"!=typeof r&&r.width&&r.height?e.image:this.__image;if(!n)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?n[t]:n[t]/n[o]*a},Wo.prototype.getWidth=function(){return this._getSize("width")},Wo.prototype.getHeight=function(){return this._getSize("height")},Wo.prototype.getAnimationStyleProps=function(){return Eo},Wo.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new or(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},Wo);function Wo(){return null!==Ho&&Ho.apply(this,arguments)||this}No.prototype.type="image";var Xo,Uo=function(){this.cx=0,this.cy=0,this.r=0},Yo=(tt(jo,Xo=fo),jo.prototype.getDefaultShape=function(){return new Uo},jo.prototype.buildPath=function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},jo);function jo(t){return Xo.call(this,t)||this}Yo.prototype.type="circle";var qo=Math.round;function Go(t,e,i){if(!e)return t;var r=qo(2*t);return(r+qo(e))%2==0?r/2:(r+(i?1:-1))/2}var Vo,Zo=function(){this.x=0,this.y=0,this.width=0,this.height=0},Ko={},Qo=(tt($o,Vo=fo),$o.prototype.getDefaultShape=function(){return new Zo},$o.prototype.buildPath=function(t,e){var i,r,n,o,a,s,h,l,u,p,c,f,d,y,g,v,_;this.subPixelOptimize?(r=(i=function(t,e,i){if(e){var r=e.x,n=e.y,o=e.width,a=e.height;t.x=r,t.y=n,t.width=o,t.height=a;var s=i&&i.lineWidth;return s&&(t.x=Go(r,s,!0),t.y=Go(n,s,!0),t.width=Math.max(Go(r+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(Go(n+a,s,!1)-t.y,0===a?0:1)),t}}(Ko,e,this.style)).x,n=i.y,o=i.width,a=i.height,i.r=e.r,e=i):(r=e.x,n=e.y,o=e.width,a=e.height),e.r?(s=t,d=(h=e).x,y=h.y,g=h.width,v=h.height,_=h.r,g<0&&(d+=g,g=-g),v<0&&(y+=v,v=-v),"number"==typeof _?l=u=p=c=_:_ instanceof Array?1===_.length?l=u=p=c=_[0]:2===_.length?(l=p=_[0],u=c=_[1]):3===_.length?(l=_[0],u=c=_[1],p=_[2]):(l=_[0],u=_[1],p=_[2],c=_[3]):l=u=p=c=0,g<l+u&&(l*=g/(f=l+u),u*=g/f),g<p+c&&(p*=g/(f=p+c),c*=g/f),v<u+p&&(u*=v/(f=u+p),p*=v/f),v<l+c&&(l*=v/(f=l+c),c*=v/f),s.moveTo(d+l,y),s.lineTo(d+g-u,y),0!==u&&s.arc(d+g-u,y+u,u,-Math.PI/2,0),s.lineTo(d+g,y+v-p),0!==p&&s.arc(d+g-p,y+v-p,p,0,Math.PI/2),s.lineTo(d+c,y+v),0!==c&&s.arc(d+c,y+v-c,c,Math.PI/2,Math.PI),s.lineTo(d,y+l),0!==l&&s.arc(d+l,y+l,l,Math.PI,1.5*Math.PI)):t.rect(r,n,o,a)},$o.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},$o);function $o(t){return Vo.call(this,t)||this}Qo.prototype.type="rect";var Jo,ta=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},ea=(tt(ia,Jo=fo),ia.prototype.getDefaultShape=function(){return new ta},ia.prototype.buildPath=function(t,e){var i=e.cx,r=e.cy,n=e.rx,o=e.ry,a=.5522848*n,s=.5522848*o;t.moveTo(i-n,r),t.bezierCurveTo(i-n,r-s,i-a,r-o,i,r-o),t.bezierCurveTo(i+a,r-o,i+n,r-s,i+n,r),t.bezierCurveTo(i+n,r+s,i+a,r+o,i,r+o),t.bezierCurveTo(i-a,r+o,i-n,r+s,i-n,r),t.closePath()},ia);function ia(t){return Jo.call(this,t)||this}ea.prototype.type="ellipse";var ra,na={},oa=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},aa=(tt(sa,ra=fo),sa.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},sa.prototype.getDefaultShape=function(){return new oa},sa.prototype.buildPath=function(t,e){var i,r,n,o,a;a=this.subPixelOptimize?(r=(i=function(t,e,i){if(e){var r=e.x1,n=e.x2,o=e.y1,a=e.y2;t.x1=r,t.x2=n,t.y1=o,t.y2=a;var s=i&&i.lineWidth;return s&&(qo(2*r)===qo(2*n)&&(t.x1=t.x2=Go(r,s,!0)),qo(2*o)===qo(2*a)&&(t.y1=t.y2=Go(o,s,!0))),t}}(na,e,this.style)).x1,n=i.y1,o=i.x2,i.y2):(r=e.x1,n=e.y1,o=e.x2,e.y2);var s=e.percent;0!==s&&(t.moveTo(r,n),s<1&&(o=r*(1-s)+o*s,a=n*(1-s)+a*s),t.lineTo(o,a))},sa.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},sa);function sa(t){return ra.call(this,t)||this}function ha(t,e,i,r,n,o,a){var s=.5*(i-t),h=.5*(r-e);return(2*(e-i)+s+h)*a+(-3*(e-i)-2*s-h)*o+s*n+e}function la(t,e,i){var r=e.smooth,n=e.points;if(n&&2<=n.length){if(r&&"spline"!==r){var o=function(t,e,i,r){var n,o,a,s,h=[],l=[],u=[],p=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var c=0,f=t.length;c<f;c++)yt(a,a,t[c]),gt(s,s,t[c]);yt(a,a,r[0]),gt(s,s,r[1])}for(c=0,f=t.length;c<f;c++){var d=t[c];if(i)n=t[c?c-1:f-1],o=t[(c+1)%f];else{if(0===c||c===f-1){h.push(it(t[c]));continue}n=t[c-1],o=t[c+1]}nt(l,o,n),st(l,l,e);var y=lt(d,n),g=lt(d,o),v=y+g;0!==v&&(y/=v,g/=v),st(u,l,-y),st(p,l,g);var _=rt([],d,u),m=rt([],d,p);r&&(gt(_,_,a),yt(_,_,s),gt(m,m,a),yt(m,m,s)),h.push(_),h.push(m)}return i&&h.push(h.shift()),h}(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;s<(i?a:a-1);s++){var h=o[2*s],l=o[2*s+1],u=n[(s+1)%a];t.bezierCurveTo(h[0],h[1],l[0],l[1],u[0],u[1])}}else{"spline"===r&&(n=function(t,e){for(var i=t.length,r=[],n=0,o=1;o<i;o++)n+=lt(t[o-1],t[o]);for(var a=(a=n/2)<i?i:a,o=0;o<a;o++){var s=o/(a-1)*(e?i:i-1),h=Math.floor(s),l=s-h,u=void 0,p=t[h%i],c=void 0,f=void 0,f=e?(u=t[(h-1+i)%i],c=t[(h+1)%i],t[(h+2)%i]):(u=t[0===h?h:h-1],c=t[i-2<h?i-1:h+1],t[i-3<h?i-1:h+2]),d=l*l,y=l*d;r.push([ha(u[0],p[0],c[0],f[0],l,d,y),ha(u[1],p[1],c[1],f[1],l,d,y)])}return r}(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,p=n.length;s<p;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}aa.prototype.type="line";var ua,pa=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},ca=(tt(fa,ua=fo),fa.prototype.getDefaultShape=function(){return new pa},fa.prototype.buildPath=function(t,e){la(t,e,!0)},fa);function fa(t){return ua.call(this,t)||this}ca.prototype.type="polygon";var da,ya=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},ga=(tt(va,da=fo),va.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},va.prototype.getDefaultShape=function(){return new ya},va.prototype.buildPath=function(t,e){la(t,e,!1)},va);function va(t){return da.call(this,t)||this}ga.prototype.type="polyline";var _a=(ma.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},ma);function ma(t){this.colorStops=t||[]}var xa,wa=(tt(ba,xa=_a),ba);function ba(t,e,i,r,n,o){var a=xa.call(this,n)||this;return a.x=null==t?0:t,a.y=null==e?0:e,a.x2=null==i?1:i,a.y2=null==r?0:r,a.type="linear",a.global=o||!1,a}var ka,Sa=(tt(Ta,ka=_a),Ta);function Ta(t,e,i,r,n){var o=ka.call(this,r)||this;return o.x=null==t?.5:t,o.y=null==e?.5:e,o.r=null==i?.5:i,o.type="radial",o.global=n||!1,o}var Ca,Pa,Aa=x({strokeFirst:!0,font:ur,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},uo),Ma=(tt(Da,Ca=Yr),Da.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&0<t.lineWidth},Da.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},Da.prototype.createStyle=function(t){return Z(Aa,t)},Da.prototype.setBoundingRect=function(t){this._rect=t},Da.prototype.getBoundingRect=function(){var t,e,i,r=this.style;return this._rect||(null!=(t=r.text)?t+="":t="",(e=function(t,e,i,r){var n=((t||"")+"").split("\n");if(1===n.length)return fr(n[0],e,i,r);for(var o=new or(0,0,0,0),a=0;a<n.length;a++){var s=fr(n[a],e,i,r);0===a?o.copy(s):o.union(s)}return o}(t,r.font,r.textAlign,r.textBaseline)).x+=r.x||0,e.y+=r.y||0,this.hasStroke()&&(i=r.lineWidth,e.x-=i/2,e.y-=i/2,e.width+=i,e.height+=i),this._rect=e),this._rect},Da.initDefaultProps=void(Da.prototype.dirtyRectTolerance=10),Da);function Da(){return null!==Ca&&Ca.apply(this,arguments)||this}Ma.prototype.type="tspan";var La={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},za=L(La),Ra={"alignment-baseline":"textBaseline","stop-color":"stopColor"},Oa=L(Ra),Ia=(Fa.prototype.parse=function(t,e){e=e||{};var i=function(t){A(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}(t);if(!i)throw new Error("Illegal svg");this._defsUsePending=[];var r=new Mr;this._root=r;var n=[],o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),s=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),Xa(i,r,null,!0,!1);for(var h,l,u,p,c,f,d,y,g,v=i.firstChild;v;)this._parseNode(v,r,n,null,!1,!1),v=v.nextSibling;return function(t,e){for(var i=0;i<e.length;i++){var r=e[i];r[0].style[r[1]]=t[r[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],!o||4<=(u=qa(o)).length&&(h={x:parseFloat(u[0]||0),y:parseFloat(u[1]||0),width:parseFloat(u[2]),height:parseFloat(u[3])}),h&&null!=a&&null!=s&&(d=(f={x:0,y:0,width:a,height:s}).width/(c=h).width,y=f.height/c.height,l={scale:g=Math.min(d,y),x:-(c.x+c.width/2)*g+(f.x+f.width/2),y:-(c.y+c.height/2)*g+(f.y+f.height/2)},e.ignoreViewBox||(p=r,(r=new Mr).add(p),p.scaleX=p.scaleY=l.scale,p.x=l.x,p.y=l.y)),e.ignoreRootClip||null==a||null==s||r.setClipPath(new Qo({shape:{x:0,y:0,width:a,height:s}})),{root:r,width:a,height:s,viewBoxRect:h,viewBoxTransform:l,named:n}},Fa.prototype._parseNode=function(t,e,i,r,n,o){var a,s,h,l,u,p,c,f=t.nodeName.toLowerCase(),d=r;if("defs"===f&&(n=!0),"text"===f&&(o=!0),"defs"===f||"switch"===f?a=e:(n||(s=Pa[f])&&K(Pa,f)&&(a=s.call(this,t,e),(h=t.getAttribute("name"))?(l={name:h,namedFrom:null,svgNodeTagLower:f,el:a},i.push(l),"g"===f&&(d=l)):r&&i.push({name:r.name,namedFrom:r,svgNodeTagLower:f,el:a}),e.add(a)),(u=Ba[f])&&K(Ba,f)&&(p=u.call(this,t),(c=t.getAttribute("id"))&&(this._defs[c]=p))),a&&a.isGroup)for(var y=t.firstChild;y;)1===y.nodeType?this._parseNode(y,a,i,d,n,o):3===y.nodeType&&o&&this._parseText(y,a),y=y.nextSibling},Fa.prototype._parseText=function(t,e){var i=new Ma({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Na(e,i),Xa(t,i,this._defsUsePending,!1,!1),function(t,e){var i,r,n=e.__selfStyle;n&&(i=n.textBaseline,(r=i)&&"auto"!==i&&"baseline"!==i?"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r);var o,a,s=e.__inheritedStyle;s&&(o=s.textAlign,(a=o)&&("middle"===o&&(a="center"),t.style.textAlign=a))}(i,e);var r=i.style,n=r.fontSize;n&&n<9&&(r.fontSize=9,i.scaleX*=n/9,i.scaleY*=n/9);var o=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=o;var a=i.getBoundingRect();return this._textX+=a.width,e.add(i),i},Fa.internalField=void(Pa={g:function(t,e){var i=new Mr;return Na(e,i),Xa(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new Qo;return Na(e,i),Xa(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new Yo;return Na(e,i),Xa(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new aa;return Na(e,i),Xa(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new ea;return Na(e,i),Xa(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i,r=t.getAttribute("points");r&&(i=Wa(r));var n=new ca({shape:{points:i||[]},silent:!0});return Na(e,n),Xa(t,n,this._defsUsePending,!1,!1),n},polyline:function(t,e){var i,r=t.getAttribute("points");r&&(i=Wa(r));var n=new ga({shape:{points:i||[]},silent:!0});return Na(e,n),Xa(t,n,this._defsUsePending,!1,!1),n},image:function(t,e){var i=new No;return Na(e,i),Xa(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",r=t.getAttribute("y")||"0",n=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(n),this._textY=parseFloat(r)+parseFloat(o);var a=new Mr;return Na(e,a),Xa(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var i=t.getAttribute("x"),r=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=r&&(this._textY=parseFloat(r));var n=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Mr;return Na(e,a),Xa(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),a},path:function(t,e){var i=Io(t.getAttribute("d")||"");return Na(e,i),Xa(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),Fa);function Fa(){this._defs={},this._root=null}var Ba={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),i=parseInt(t.getAttribute("y1")||"0",10),r=parseInt(t.getAttribute("x2")||"10",10),n=parseInt(t.getAttribute("y2")||"0",10),o=new wa(e,i,r,n);return Ea(t,o),Ha(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),i=parseInt(t.getAttribute("cy")||"0",10),r=parseInt(t.getAttribute("r")||"0",10),n=new Sa(e,i,r);return Ea(t,n),Ha(t,n),n}};function Ea(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function Ha(t,e){for(var i,r,n,o,a=t.firstChild;a;){1===a.nodeType&&"stop"===a.nodeName.toLocaleLowerCase()&&(r=void 0,r=(i=a.getAttribute("offset"))&&0<i.indexOf("%")?parseInt(i,10)/100:i?parseFloat(i):0,Ka(a,n={},n),o=n.stopColor||a.getAttribute("stop-color")||"#000000",e.colorStops.push({offset:r,color:o})),a=a.nextSibling}}function Na(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),x(e.__inheritedStyle,t.__inheritedStyle))}function Wa(t){for(var e=qa(t),i=[],r=0;r<e.length;r+=2){var n=parseFloat(e[r]),o=parseFloat(e[r+1]);i.push([n,o])}return i}function Xa(t,e,i,r,n){var o=e,a=o.__inheritedStyle=o.__inheritedStyle||{},s={};1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var r=[],n=null;i.replace(Ga,function(t,e,i){return r.push(e,i),""});for(var o=r.length-1;0<o;o-=2){var a=r[o],s=r[o-1],h=qa(a);switch(n=n||Li(),s){case"translate":Ii(n,n,[parseFloat(h[0]),parseFloat(h[1]||"0")]);break;case"scale":Bi(n,n,[parseFloat(h[0]),parseFloat(h[1]||h[0])]);break;case"rotate":Fi(n,n,-parseFloat(h[0])*Va);break;case"skewX":var l=Math.tan(parseFloat(h[0])*Va);Oi(n,[1,0,l,1,0,0],n);break;case"skewY":var u=Math.tan(parseFloat(h[0])*Va);Oi(n,[1,u,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(h[0]),n[1]=parseFloat(h[1]),n[2]=parseFloat(h[2]),n[3]=parseFloat(h[3]),n[4]=parseFloat(h[4]),n[5]=parseFloat(h[5])}}e.setLocalTransform(n)}}(t,e),Ka(t,a,s),r||function(t,e,i){for(var r=0;r<za.length;r++){var n=za[r];null!=(o=t.getAttribute(n))&&(e[La[n]]=o)}for(r=0;r<Oa.length;r++){var o,n=Oa[r];null!=(o=t.getAttribute(n))&&(i[Ra[n]]=o)}}(t,a,s)),o.style=o.style||{},null!=a.fill&&(o.style.fill=Ya(o,"fill",a.fill,i)),null!=a.stroke&&(o.style.stroke=Ya(o,"stroke",a.stroke,i)),k(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){null!=a[t]&&(o.style[t]=parseFloat(a[t]))}),k(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(t){null!=a[t]&&(o.style[t]=a[t])}),n&&(o.__selfStyle=s),a.lineDash&&(o.style.lineDash=W(qa(a.lineDash),function(t){return parseFloat(t)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(o.invisible=!0),"none"===a.display&&(o.ignore=!0)}var Ua=/^url\(\s*#(.*?)\)/;function Ya(t,e,i,r){var n=i&&i.match(Ua);if(!n)return"none"===i&&(i=null),i;var o=Y(n[1]);r.push([t,e,o])}var ja=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function qa(t){return t.match(ja)||[]}var Ga=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Va=Math.PI/180;var Za=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Ka(t,e,i){var r,n=t.getAttribute("style");if(n)for(Za.lastIndex=0;null!=(r=Za.exec(n));){var o=r[1],a=K(La,o)?La[o]:null;a&&(e[a]=r[2]);var s=K(Ra,o)?Ra[o]:null;s&&(i[s]=r[2])}}var Qa=Math.PI,$a=2*Qa,Ja=Math.sin,ts=Math.cos,es=Math.acos,is=Math.atan2,rs=Math.abs,ns=Math.sqrt,os=Math.max,as=Math.min,ss=1e-4;function hs(t,e,i,r,n,o,a){var s=t-i,h=e-r,l=(a?o:-o)/ns(s*s+h*h),u=l*h,p=-l*s,c=t+u,f=e+p,d=i+u,y=r+p,g=(c+d)/2,v=(f+y)/2,_=d-c,m=y-f,x=_*_+m*m,w=n-o,b=c*y-d*f,k=(m<0?-1:1)*ns(os(0,w*w*x-b*b)),S=(b*m-_*k)/x,T=(-b*_-m*k)/x,C=(b*m+_*k)/x,P=(-b*_+m*k)/x,A=S-g,M=T-v,D=C-g,L=P-v;return D*D+L*L<A*A+M*M&&(S=C,T=P),{cx:S,cy:T,x01:-u,y01:-p,x11:S*(n/w-1),y11:T*(n/w-1)}}function ls(t,e){var i,r,n,o,a,s,h,l,u,p,c,f,d,y,g,v,_,m,x,w,b,k,S,T,C,P,A,M,D,L,z,R,O=os(e.r,0),I=os(e.r0||0,0),F=0<O;(F||0<I)&&(F||(O=I,I=0),O<I&&(i=O,O=I,I=i),r=!!e.clockwise,s=(n=e.startAngle)===(o=e.endAngle)?0:(Un(a=[n,o],!r),rs(a[0]-a[1])),h=e.cx,l=e.cy,u=e.cornerRadius||0,p=e.innerCornerRadius||0,ss<O?$a-ss<s?(t.moveTo(h+O*ts(n),l+O*Ja(n)),t.arc(h,l,O,n,o,!r),ss<I&&(t.moveTo(h+I*ts(o),l+I*Ja(o)),t.arc(h,l,I,o,n,r))):(c=rs(O-I)/2,f=as(c,u),C=d=as(c,p),P=f,y=O*ts(n),g=O*Ja(n),v=I*ts(o),_=I*Ja(o),L=D=M=A=void 0,(ss<f||ss<d)&&(A=O*ts(o),M=O*Ja(o),D=I*ts(n),L=I*Ja(n),s<Qa&&((m=function(t,e,i,r,n,o,a,s){var h=i-t,l=r-e,u=a-n,p=s-o,c=p*h-u*l;if(!(c*c<ss))return[t+(c=(u*(e-o)-p*(t-n))/c)*h,e+c*l]}(y,g,D,L,A,M,v,_))&&(x=y-m[0],w=g-m[1],b=A-m[0],k=M-m[1],S=1/Ja(es((x*b+w*k)/(ns(x*x+w*w)*ns(b*b+k*k)))/2),T=ns(m[0]*m[0]+m[1]*m[1]),C=as(d,(I-T)/(S-1)),P=as(f,(O-T)/(1+S))))),ss<s?ss<P?(z=hs(D,L,y,g,O,P,r),R=hs(A,M,v,_,O,P,r),t.moveTo(h+z.cx+z.x01,l+z.cy+z.y01),P<f?t.arc(h+z.cx,l+z.cy,P,is(z.y01,z.x01),is(R.y01,R.x01),!r):(t.arc(h+z.cx,l+z.cy,P,is(z.y01,z.x01),is(z.y11,z.x11),!r),t.arc(h,l,O,is(z.cy+z.y11,z.cx+z.x11),is(R.cy+R.y11,R.cx+R.x11),!r),t.arc(h+R.cx,l+R.cy,P,is(R.y11,R.x11),is(R.y01,R.x01),!r))):(t.moveTo(h+y,l+g),t.arc(h,l,O,n,o,!r)):t.moveTo(h+y,l+g),ss<I&&ss<s?ss<C?(z=hs(v,_,A,M,I,-C,r),R=hs(y,g,D,L,I,-C,r),t.lineTo(h+z.cx+z.x01,l+z.cy+z.y01),C<d?t.arc(h+z.cx,l+z.cy,C,is(z.y01,z.x01),is(R.y01,R.x01),!r):(t.arc(h+z.cx,l+z.cy,C,is(z.y01,z.x01),is(z.y11,z.x11),!r),t.arc(h,l,I,is(z.cy+z.y11,z.cx+z.x11),is(R.cy+R.y11,R.cx+R.x11),r),t.arc(h+R.cx,l+R.cy,C,is(R.y11,R.x11),is(R.y01,R.x01),!r))):(t.lineTo(h+v,l+_),t.arc(h,l,I,o,n,r)):t.lineTo(h+v,l+_)):t.moveTo(h,l),t.closePath())}var us,ps=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0},cs=(tt(fs,us=fo),fs.prototype.getDefaultShape=function(){return new ps},fs.prototype.buildPath=function(t,e){ls(t,e)},fs.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},fs);function fs(t){return us.call(this,t)||this}cs.prototype.type="sector";var ds=jn.CMD,ys=[];function gs(t,e){return Math.abs(t-e)<1e-5}function vs(t){var n,e,i,r=t.data,o=t.len(),a=[],s=0,h=0,l=0,u=0;function p(t,e){n&&2<n.length&&a.push(n),n=[t,e]}function c(t,e,i,r){gs(t,i)&&gs(e,r)||n.push(t,e,i,r,i,r)}for(var f,d,y,g,v,_,m,x,w,b,k,S,T,C,P,A,M,D,L,z=0;z<o;){var R=r[z++],O=1===z;switch(O&&(l=s=r[z],u=h=r[z+1],R!==ds.L&&R!==ds.C&&R!==ds.Q||(n=[l,u])),R){case ds.M:s=l=r[z++],h=u=r[z++],p(l,u);break;case ds.L:c(s,h,X=r[z++],U=r[z++]),s=X,h=U;break;case ds.C:n.push(r[z++],r[z++],r[z++],r[z++],s=r[z++],h=r[z++]);break;case ds.Q:X=r[z++],U=r[z++],e=r[z++],i=r[z++],n.push(s+2/3*(X-s),h+2/3*(U-h),e+2/3*(X-e),i+2/3*(U-i),e,i),s=e,h=i;break;case ds.A:var I=r[z++],F=r[z++],B=r[z++],E=r[z++],H=r[z++],N=r[z++]+H;z+=1;var W=!r[z++],X=Math.cos(H)*B+I,U=Math.sin(H)*E+F;O?p(l=X,u=U):c(s,h,X,U),s=Math.cos(N)*B+I,h=Math.sin(N)*E+F;for(var Y=(W?-1:1)*Math.PI/2,j=H;W?N<j:j<N;j+=Y){var q=W?Math.max(j+Y,N):Math.min(j+Y,N);f=j,d=q,y=I,g=F,v=B,_=E,L=D=M=A=P=C=T=S=k=b=w=x=m=void 0,m=Math.abs(d-f),x=4*Math.tan(m/4)/3,w=d<f?-1:1,b=Math.cos(f),k=Math.sin(f),S=Math.cos(d),T=Math.sin(d),C=b*v+y,P=k*_+g,A=S*v+y,M=T*_+g,D=v*x*w,L=_*x*w,n.push(C-D*k,P+L*b,A+D*T,M-L*S,A,M)}break;case ds.R:l=s=r[z++],u=h=r[z++],X=l+r[z++],U=u+r[z++],p(X,u),c(X,u,X,U),c(X,U,l,U),c(l,U,l,u),c(l,u,X,u);break;case ds.Z:n&&c(s,h,l,u),s=l,h=u}}return n&&2<n.length&&a.push(n),a}function _s(t,e){for(var i=t.length,r=t[i-2],n=t[i-1],o=[],a=0;a<e.length;)o[a++]=r,o[a++]=n;return o}function ms(t,e){for(var i,r,n,o=[],a=[],s=0;s<Math.max(t.length,e.length);s++){var h=t[s],l=e[s],u=void 0,p=void 0;h?l?(r=u=(i=function(t,e){var i=t.length,r=e.length;if(i===r)return[t,e];for(var n=i<r?t:e,o=Math.min(i,r),a=Math.abs(r-i)/6,s=(o-2)/6,h=Math.ceil(a/s)+1,l=[n[0],n[1]],u=a,p=[],c=[],f=2;f<o;){var d=n[f-2],y=n[f-1],g=n[f++],v=n[f++],_=n[f++],m=n[f++],x=n[f++],w=n[f++];if(u<=0)l.push(g,v,_,m,x,w);else{for(var b=Math.min(u,h-1)+1,k=1;k<=b;k++){var S=k/b;ln(d,g,_,x,S,p),ln(y,v,m,w,S,c),d=p[3],y=c[3],l.push(p[1],c[1],p[2],c[2],d,y),g=p[5],v=c[5],_=p[6],m=c[6]}u-=b-1}}return n===t?[l,e]:[t,l]}(h,l))[0],n=p=i[1]):(p=_s(n||h,h),u=h):(u=_s(r||l,l),p=l),o.push(u),a.push(p)}return[o,a]}function xs(t){for(var e=0,i=0,r=0,n=t.length,o=0,a=n-2;o<n;a=o,o+=2){var s=t[a],h=t[a+1],l=t[o],u=t[o+1],p=s*u-l*h;e+=p,i+=(s+l)*p,r+=(h+u)*p}return 0===e?[t[0]||0,t[1]||0]:[i/e/3,r/e/3,e]}function ws(t,e,i,r){for(var n,o=[],a=0;a<t.length;a++){var s=t[a],h=e[a],l=xs(s),u=xs(h);null==n&&(n=l[2]<0!=u[2]<0);var p=[],c=[],f=0,d=1/0,y=[],g=s.length;n&&(s=function(t){for(var e=[],i=t.length,r=0;r<i;r+=2)e[r]=t[i-r-2],e[r+1]=t[i-r-1];return e}(s));for(var v=6*function(t,e,i,r){for(var n=(t.length-2)/6,o=1/0,a=0,s=t.length,h=s-2,l=0;l<n;l++){for(var u=6*l,p=0,c=0;c<s;c+=2){var f=0===c?u:(u+c-2)%h+2,d=t[f]-i[0],y=t[1+f]-i[1],g=e[c]-r[0]-d,v=e[c+1]-r[1]-y;p+=g*g+v*v}p<o&&(o=p,a=l)}return a}(s,h,l,u),_=g-2,m=0;m<_;m+=2){var x=(v+m)%_+2;p[m+2]=s[x]-l[0],p[m+3]=s[1+x]-l[1]}if(p[0]=s[v]-l[0],p[1]=s[1+v]-l[1],0<i)for(var w=r/i,b=-r/2;b<=r/2;b+=w){for(var k=Math.sin(b),S=Math.cos(b),T=0,m=0;m<s.length;m+=2){var C=p[m],P=p[m+1],A=h[m]-u[0],M=h[m+1]-u[1],D=A*S-M*k,L=A*k+M*S,z=(y[m]=D)-C,R=(y[m+1]=L)-P;T+=z*z+R*R}if(T<d){d=T,f=b;for(var O=0;O<y.length;O++)c[O]=y[O]}}else for(var I=0;I<g;I+=2)c[I]=h[I]-u[0],c[I+1]=h[I+1]-u[1];o.push({from:p,to:c,fromCp:l,toCp:u,rotation:-f})}return o}function bs(t){for(var e=this.__morphingData,i=this.__morphT,r=1-i,n=[],o=0;o<e.length;o++){var a=e[o],s=a.from,h=a.to,l=a.rotation*i,u=a.fromCp,p=a.toCp,c=Math.sin(l),f=Math.cos(l);ft(n,u,p,i);for(var d=0;d<s.length;d+=2){var y=s[d],g=s[d+1],v=y*r+h[d]*i,_=g*r+h[d+1]*i;ys[d]=v*f-_*c+n[0],ys[d+1]=v*c+_*f+n[1]}for(d=0;d<s.length;)0===d&&t.moveTo(ys[d++],ys[d++]),t.bezierCurveTo(ys[d++],ys[d++],ys[d++],ys[d++],ys[d++],ys[d++])}}function ks(t,e,i){t.__morphingData=e,t.__morphT=i}function Ss(t){return null!=t.__oldBuildPath}var Ts,Cs=(tt(Ps,Ts=fo),Ps.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),i=0;i<t.length;i++)e=e||t[i].shapeChanged();e&&this.dirtyShape()},Ps.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},Ps.prototype.buildPath=function(t,e){for(var i=e.paths||[],r=0;r<i.length;r++)i[r].buildPath(t,i[r].shape,!0)},Ps.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},Ps.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),fo.prototype.getBoundingRect.call(this)},Ps);function Ps(){var t=null!==Ts&&Ts.apply(this,arguments)||this;return t.type="compound",t}var As,Ms=[],Ds=(tt(Ls,As=Yr),Ls.prototype.traverse=function(t,e){t.call(e,this)},Ls.prototype.useStyle=function(){this.style={}},Ls.prototype.getCursor=function(){return this._cursor},Ls.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},Ls.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},Ls.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},Ls.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},Ls.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Ls.prototype.getDisplayables=function(){return this._displayables},Ls.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},Ls.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Ls.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var e,t=0;t<this._temporaryDisplayables.length;t++)(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null},Ls.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new or(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],r=i.getBoundingRect().clone();i.needLocalTransform()&&r.applyTransform(i.getLocalTransform(Ms)),t.union(r)}this._rect=t}return this._rect},Ls.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(t,e))return!0;return!1},Ls);function Ls(){var t=null!==As&&As.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}var zs=new xe(50);function Rs(t,e,i,r,n){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!i)return e;var o=zs.get(t),a={hostEl:i,cb:r,cbPayload:n};return o?Is(e=o.image)||o.pending.push(a):((e=new Image).onload=e.onerror=Os,zs.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return e}function Os(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],r=i.cb;r&&r(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Is(t){return t&&t.width&&t.height}var Fs=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Bs(t,e,i,r){var n=m({},r=r||{});n.font=e,i=H(i,"..."),n.maxIterations=H(r.maxIterations,2);var o=n.minChar=H(r.minChar,0);n.cnCharWidth=cr("国",e);var a=n.ascCharWidth=cr("a",e);n.placeholder=H(r.placeholder,"");for(var s=t=Math.max(0,t-1),h=0;h<o&&a<=s;h++)s-=a;var l=cr(i,e);return s<l&&(i="",l=0),s=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=s,n.containerWidth=t,n}function Es(t,e){var i=e.containerWidth,r=e.font,n=e.contentWidth;if(!i)return"";if((s=cr(t,r))<=i)return t;for(var o=0;;o++){if(s<=n||o>=e.maxIterations){t+=e.ellipsis;break}var a=0===o?function(t,e,i,r){for(var n=0,o=0,a=t.length;o<a&&n<e;o++){var s=t.charCodeAt(o);n+=0<=s&&s<=127?i:r}return o}(t,n,e.ascCharWidth,e.cnCharWidth):0<s?Math.floor(t.length*n/s):0,s=cr(t=t.substr(0,a),r)}return""===t&&(t=e.placeholder),t}var Hs=function(){},Ns=function(t){this.tokens=[],t&&(this.tokens=t)},Ws=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function Xs(t,e){var i=new Ws;if(null!=t&&(t+=""),!t)return i;for(var r,n=e.width,o=e.height,a=e.overflow,s="break"!==a&&"breakAll"!==a||null==n?null:{width:n,accumWidth:0,breakAll:"breakAll"===a},h=Fs.lastIndex=0;null!=(r=Fs.exec(t));){var l=r.index;h<l&&Us(i,t.substring(h,l),e,s),Us(i,r[2],e,s,r[1]),h=Fs.lastIndex}h<t.length&&Us(i,t.substring(h,t.length),e,s);var u=[],p=0,c=0,f=e.padding,d="truncate"===a,y="truncate"===e.lineOverflow;function g(t,e,i){t.width=e,t.lineHeight=i,p+=i,c=Math.max(c,e)}t:for(var v=0;v<i.lines.length;v++){for(var _=i.lines[v],m=0,x=0,w=0;w<_.tokens.length;w++){var b=(z=_.tokens[w]).styleName&&e.rich[z.styleName]||{},k=z.textPadding=b.padding,S=k?k[1]+k[3]:0,T=z.font=b.font||e.font;z.contentHeight=gr(T);var C=H(b.height,z.contentHeight);if(z.innerHeight=C,k&&(C+=k[0]+k[2]),z.height=C,z.lineHeight=N(b.lineHeight,e.lineHeight,C),z.align=b&&b.align||e.align,z.verticalAlign=b&&b.verticalAlign||"middle",y&&null!=o&&p+z.lineHeight>o){0<w?(_.tokens=_.tokens.slice(0,w),g(_,x,m),i.lines=i.lines.slice(0,v+1)):i.lines=i.lines.slice(0,v);break t}var P,A,M,D=b.width,L=null==D||"auto"===D;"string"==typeof D&&"%"===D.charAt(D.length-1)?(z.percentWidth=D,u.push(z),z.contentWidth=cr(z.text,T)):(!L||(A=(P=b.backgroundColor)&&P.image)&&Is(A=function(t){if("string"!=typeof t)return t;var e=zs.get(t);return e&&e.image}(A))&&(z.width=Math.max(z.width,A.width*C/A.height)),null!=(M=d&&null!=n?n-x:null)&&M<z.width?!L||M<S?(z.text="",z.width=z.contentWidth=0):(z.text=function(t,e,i,r,n){if(!e)return"";var o=(t+"").split("\n");n=Bs(e,i,r,n);for(var a=0,s=o.length;a<s;a++)o[a]=Es(o[a],n);return o.join("\n")}(z.text,M-S,T,e.ellipsis,{minChar:e.truncateMinChar}),z.width=z.contentWidth=cr(z.text,T)):z.contentWidth=cr(z.text,T)),z.width+=S,x+=z.width,b&&(m=Math.max(m,z.lineHeight))}g(_,x,m)}i.outerWidth=i.width=H(n,c),i.outerHeight=i.height=H(o,p),i.contentHeight=p,i.contentWidth=c,f&&(i.outerWidth+=f[1]+f[3],i.outerHeight+=f[0]+f[2]);for(v=0;v<u.length;v++){var z,R=(z=u[v]).percentWidth;z.width=parseInt(R,10)/100*i.width}return i}function Us(t,e,i,r,n){var o,a,s,h,l,u,p=""===e,c=n&&i.rich[n]||{},f=t.lines,d=c.font||i.font,y=!1;r?(h=(s=c.padding)?s[1]+s[3]:0,null!=c.width&&"auto"!==c.width?(l=vr(c.width,r.width)+h,0<f.length&&l+r.accumWidth>r.width&&(o=e.split("\n"),y=!0),r.accumWidth=l):(u=js(e,d,r.width,r.breakAll,r.accumWidth),r.accumWidth=u.accumWidth+h,a=u.linesWidths,o=u.lines)):o=e.split("\n");for(var g=0;g<o.length;g++){var v,_,m=o[g],x=new Hs;x.styleName=n,x.text=m,x.isLineHolder=!m&&!p,x.width="number"==typeof c.width?c.width:a?a[g]:cr(m,d),g||y?f.push(new Ns([x])):1===(_=(v=(f[f.length-1]||(f[0]=new Ns)).tokens).length)&&v[0].isLineHolder?v[0]=x:!m&&_&&!p||v.push(x)}}var Ys=S(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function js(t,e,i,r,n){for(var o,a,s=[],h=[],l="",u="",p=0,c=0,f=0;f<t.length;f++){var d,y,g=t.charAt(f);"\n"!==g?(d=cr(g,e),y=!r&&(a=void 0,!(!(33<=(a=(o=g).charCodeAt(0))&&a<=255)||Ys[o])),(s.length?i<c+d:i<n+c+d)?c?(l||u)&&(c=y?(l||(l=u,u="",c=p=0),s.push(l),h.push(c-p),u+=g,l="",p+=d):(u&&(l+=u,c+=p,u="",p=0),s.push(l),h.push(c),l=g,d)):y?(s.push(u),h.push(p),u=g,p=d):(s.push(g),h.push(d)):(c+=d,y?(u+=g,p+=d):(u&&(l+=u,u="",p=0),l+=g))):(u&&(l+=u,c+=p),s.push(l),h.push(c),u=l="",c=p=0)}return s.length||l||(l=t,u="",p=0),u&&(l+=u),l&&(s.push(l),h.push(c)),1===s.length&&(c+=n),{accumWidth:c,lines:s,linesWidths:h}}var qs,Gs={fill:"#000"},Vs={style:x({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Hr.style)},Zs=(tt(Ks,qs=Yr),Ks.prototype.childrenRef=function(){return this._children},Ks.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var e=this._children[t];e.zlevel=this.zlevel,e.z=this.z,e.z2=this.z2,e.culling=this.culling,e.cursor=this.cursor,e.invisible=this.invisible}var i,r=this.attachedTransform;r?(r.updateTransform(),(i=r.transform)?(this.transform=this.transform||[],Ri(this.transform,i)):this.transform=null):qs.prototype.update.call(this)},Ks.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),this.attachedTransform?this.attachedTransform.getComputedTransform():qs.prototype.getComputedTransform.call(this)},Ks.prototype._updateSubTexts=function(){var t;this._childCursor=0,Js(t=this.style),k(t.rich,Js),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},Ks.prototype.addSelfToZr=function(t){qs.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=t},Ks.prototype.removeSelfFromZr=function(t){qs.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=null},Ks.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new or(0,0,0,0),e=this._children,i=[],r=null,n=0;n<e.length;n++){var o=e[n],a=o.getBoundingRect(),s=o.getLocalTransform(i);s?(t.copy(a),t.applyTransform(s),(r=r||t.clone()).union(t)):(r=r||a.clone()).union(a)}this._rect=r||t}return this._rect},Ks.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Gs},Ks.prototype.setTextContent=function(t){throw new Error("Can't attach text on another text")},Ks.prototype._mergeStyle=function(t,e){if(!e)return t;var i=e.rich,r=t.rich||i&&{};return m(t,e),i&&r?(this._mergeRich(r,i),t.rich=r):r&&(t.rich=r),t},Ks.prototype._mergeRich=function(t,e){for(var i=L(e),r=0;r<i.length;r++){var n=i[r];t[n]=t[n]||{},m(t[n],e[n])}},Ks.prototype.getAnimationStyleProps=function(){return Vs},Ks.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),(this._children[this._childCursor++]=e).__zr=this.__zr,e.parent=this,e},Ks.prototype._updatePlainTexts=function(){var t,e,i,r=this.style,n=r.font||ur,o=r.padding,a=function(t,e){null!=t&&(t+="");var i,r,n=e.overflow,o=e.padding,a=e.font,s="truncate"===n,h=gr(a),l=H(e.lineHeight,h),u="truncate"===e.lineOverflow,p=e.width,c=(r=null!=p&&"break"===n||"breakAll"===n?t?js(t,e.font,p,"breakAll"===n,0).lines:[]:t?t.split("\n"):[]).length*l,f=H(e.height,c);f<c&&u&&(i=Math.floor(f/l),r=r.slice(0,i));var d=f,y=p;if(o&&(d+=o[0]+o[2],null!=y&&(y+=o[1]+o[3])),t&&s&&null!=y)for(var g=Bs(p,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v<r.length;v++)r[v]=Es(r[v],g);if(null==p){for(var _=0,v=0;v<r.length;v++)_=Math.max(cr(r[v],a),_);p=_}return{lines:r,height:f,outerHeight:d,lineHeight:l,calculatedLineHeight:h,contentHeight:c,width:p}}(ih(r),r),s=rh(r),h=!!r.backgroundColor,l=a.outerHeight,u=a.lines,p=a.lineHeight,c=this._defaultStyle,f=r.x||0,d=r.y||0,y=r.align||c.align||"left",g=r.verticalAlign||c.verticalAlign||"top",v=f,_=yr(d,a.contentHeight,g);(s||o)&&(t=a.width,o&&(t+=o[1]+o[3]),e=dr(f,t,y),i=yr(d,l,g),s&&this._renderBackground(r,r,e,i,t,l)),_+=p/2,o&&(v=eh(f,y,o),"top"===g?_+=o[0]:"bottom"===g&&(_-=o[2]));for(var m,x=0,w=!1,b=(null==(m="fill"in r?r.fill:(w=!0,c.fill))||"none"===m?null:m.image||m.colorStops?"#000":m),k=(th("stroke"in r?r.stroke:h||c.autoStroke&&!w?null:(x=2,c.stroke))),S=0<r.textShadowBlur,T=null!=r.width&&("truncate"===r.overflow||"break"===r.overflow||"breakAll"===r.overflow),C=a.calculatedLineHeight,P=0;P<u.length;P++){var A=this._getOrCreateChild(Ma),M=A.createStyle();A.useStyle(M),M.text=u[P],M.x=v,M.y=_,y&&(M.textAlign=y),M.textBaseline="middle",M.opacity=r.opacity,M.strokeFirst=!0,S&&(M.shadowBlur=r.textShadowBlur||0,M.shadowColor=r.textShadowColor||"transparent",M.shadowOffsetX=r.textShadowOffsetX||0,M.shadowOffsetY=r.textShadowOffsetY||0),k&&(M.stroke=k,M.lineWidth=r.lineWidth||x,M.lineDash=r.lineDash,M.lineDashOffset=r.lineDashOffset||0),b&&(M.fill=b),M.font=n,_+=p,T&&A.setBoundingRect(new or(dr(M.x,r.width,M.textAlign),yr(M.y,C,M.textBaseline),r.width,C))}},Ks.prototype._updateRichTexts=function(){var t=this.style,e=Xs(ih(t),t),i=e.width,r=e.outerWidth,n=e.outerHeight,o=t.padding,a=t.x||0,s=t.y||0,h=this._defaultStyle,l=t.align||h.align,u=t.verticalAlign||h.verticalAlign,p=dr(a,r,l),c=yr(s,n,u),f=p,d=c;o&&(f+=o[3],d+=o[0]);var y=f+i;rh(t)&&this._renderBackground(t,t,p,c,r,n);for(var g=!!t.backgroundColor,v=0;v<e.lines.length;v++){for(var _=e.lines[v],m=_.tokens,x=m.length,w=_.lineHeight,b=_.width,k=0,S=f,T=y,C=x-1,P=void 0;k<x&&(!(P=m[k]).align||"left"===P.align);)this._placeToken(P,t,w,d,S,"left",g),b-=P.width,S+=P.width,k++;for(;0<=C&&"right"===(P=m[C]).align;)this._placeToken(P,t,w,d,T,"right",g),b-=P.width,T-=P.width,C--;for(S+=(i-(S-f)-(y-T)-b)/2;k<=C;)P=m[k],this._placeToken(P,t,w,d,S+P.width/2,"center",g),S+=P.width,k++;d+=w}},Ks.prototype._placeToken=function(t,e,i,r,n,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var h=t.verticalAlign,l=r+i/2;"top"===h?l=r+t.height/2:"bottom"===h&&(l=r+i-t.height/2),!t.isLineHolder&&rh(s)&&this._renderBackground(s,e,"right"===o?n-t.width:"center"===o?n-t.width/2:n,l-t.height/2,t.width,t.height);var u=!!s.backgroundColor,p=t.textPadding;p&&(n=eh(n,o,p),l-=t.height/2-p[0]-t.innerHeight/2);var c=this._getOrCreateChild(Ma),f=c.createStyle();c.useStyle(f);var d=this._defaultStyle,y=!1,g=0,v=th("fill"in s?s.fill:"fill"in e?e.fill:(y=!0,d.fill)),_=th("stroke"in s?s.stroke:"stroke"in e?e.stroke:u||a||d.autoStroke&&!y?null:(g=2,d.stroke)),m=0<s.textShadowBlur||0<e.textShadowBlur;f.text=t.text,f.x=n,f.y=l,m&&(f.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,f.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||ur,f.opacity=N(s.opacity,e.opacity,1),_&&(f.lineWidth=N(s.lineWidth,e.lineWidth,g),f.lineDash=H(s.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=_),v&&(f.fill=v);var x=t.contentWidth,w=t.contentHeight;c.setBoundingRect(new or(dr(f.x,x,f.textAlign),yr(f.y,w,f.textBaseline),x,w))},Ks.prototype._renderBackground=function(t,e,i,r,n,o){var a,s,h,l,u,p=t.backgroundColor,c=t.borderWidth,f=t.borderColor,d=p&&p.image,y=p&&!d,g=t.borderRadius,v=this;(y||c&&f)&&((a=this._getOrCreateChild(Qo)).useStyle(a.createStyle()),a.style.fill=null,(h=a.shape).x=i,h.y=r,h.width=n,h.height=o,h.r=g,a.dirtyShape()),y?((u=a.style).fill=p||null,u.fillOpacity=H(t.fillOpacity,1)):d&&((s=this._getOrCreateChild(No)).onload=function(){v.dirtyStyle()},(l=s.style).image=p.image,l.x=i,l.y=r,l.width=n,l.height=o),c&&f&&((u=a.style).lineWidth=c,u.stroke=f,u.strokeOpacity=H(t.strokeOpacity,1),u.lineDash=t.borderDash,u.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(u.strokeFirst=!0,u.lineWidth*=2));var _=(a||s).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=N(t.opacity,e.opacity,1)},Ks.makeFont=function(t){var e,i="";return(t.fontSize||t.fontFamily||t.fontWeight)&&(e="",e="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,i=[t.fontStyle,t.fontWeight,e,t.fontFamily||"sans-serif"].join(" ")),i&&Y(i)||t.textFont||t.font},Ks);function Ks(t){var e=qs.call(this)||this;return e.type="text",e._children=[],e._defaultStyle=Gs,e.attr(t),e}var Qs={left:!0,right:1,center:1},$s={top:1,bottom:1,middle:1};function Js(t){var e,i;t&&(t.font=Zs.makeFont(t),"middle"===(e=t.align)&&(e="center"),t.align=null==e||Qs[e]?e:"left","center"===(i=t.verticalAlign)&&(i="middle"),t.verticalAlign=null==i||$s[i]?i:"top",t.padding&&(t.padding=U(t.padding)))}function th(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function eh(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function ih(t){var e=t.text;return null!=e&&(e+=""),e}function rh(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var nh,oh=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},ah=(tt(sh,nh=fo),sh.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},sh.prototype.getDefaultShape=function(){return new oh},sh.prototype.buildPath=function(t,e){var i=e.cx,r=e.cy,n=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,h=Math.cos(o),l=Math.sin(o);t.moveTo(h*n+i,l*n+r),t.arc(i,r,n,o,a,!s)},sh);function sh(t){return nh.call(this,t)||this}ah.prototype.type="arc";var hh=[],lh=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function uh(t,e,i){var r=t.cpx2,n=t.cpy2;return null===r||null===n?[(i?sn:an)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?sn:an)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?pn:un)(t.x1,t.cpx1,t.x2,e),(i?pn:un)(t.y1,t.cpy1,t.y2,e)]}var ph,ch=(tt(fh,ph=fo),fh.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},fh.prototype.getDefaultShape=function(){return new lh},fh.prototype.buildPath=function(t,e){var i=e.x1,r=e.y1,n=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,h=e.cpx2,l=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,r),null==h||null==l?(u<1&&(fn(i,a,n,u,hh),a=hh[1],n=hh[2],fn(r,s,o,u,hh),s=hh[1],o=hh[2]),t.quadraticCurveTo(a,s,n,o)):(u<1&&(ln(i,a,h,n,u,hh),a=hh[1],h=hh[2],n=hh[3],ln(r,s,l,o,u,hh),s=hh[1],l=hh[2],o=hh[3]),t.bezierCurveTo(a,s,h,l,n,o)))},fh.prototype.pointAt=function(t){return uh(this.shape,t,!1)},fh.prototype.tangentAt=function(t){var e=uh(this.shape,t,!0);return ht(e,e)},fh);function fh(t){return ph.call(this,t)||this}ch.prototype.type="bezier-curve";var dh,yh=function(){this.cx=0,this.cy=0,this.width=0,this.height=0},gh=(tt(vh,dh=fo),vh.prototype.getDefaultShape=function(){return new yh},vh.prototype.buildPath=function(t,e){var i=e.cx,r=e.cy,n=e.width,o=e.height;t.moveTo(i,r+n),t.bezierCurveTo(i+n,r+n,i+3*n/2,r-n/3,i,r-o),t.bezierCurveTo(i-3*n/2,r-n/3,i-n,r+n,i,r+n),t.closePath()},vh);function vh(t){return dh.call(this,t)||this}gh.prototype.type="droplet";var _h,mh=function(){this.cx=0,this.cy=0,this.width=0,this.height=0},xh=(tt(wh,_h=fo),wh.prototype.getDefaultShape=function(){return new mh},wh.prototype.buildPath=function(t,e){var i=e.cx,r=e.cy,n=e.width,o=e.height;t.moveTo(i,r),t.bezierCurveTo(i+n/2,r-2*o/3,i+2*n,r+o/3,i,r+o),t.bezierCurveTo(i-2*n,r+o/3,i-n/2,r-2*o/3,i,r)},wh);function wh(t){return _h.call(this,t)||this}xh.prototype.type="heart";var bh,kh=Math.PI,Sh=Math.sin,Th=Math.cos,Ch=function(){this.x=0,this.y=0,this.r=0,this.n=0},Ph=(tt(Ah,bh=fo),Ah.prototype.getDefaultShape=function(){return new Ch},Ah.prototype.buildPath=function(t,e){var i=e.n;if(i&&!(i<2)){var r=e.x,n=e.y,o=e.r,a=2*kh/i,s=-kh/2;t.moveTo(r+o*Th(s),n+o*Sh(s));for(var h=0,l=i-1;h<l;h++)s+=a,t.lineTo(r+o*Th(s),n+o*Sh(s));t.closePath()}},Ah);function Ah(t){return bh.call(this,t)||this}Ph.prototype.type="isogon";var Mh,Dh=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Lh=(tt(zh,Mh=fo),zh.prototype.getDefaultShape=function(){return new Dh},zh.prototype.buildPath=function(t,e){var i=e.cx,r=e.cy,n=2*Math.PI;t.moveTo(i+e.r,r),t.arc(i,r,e.r,0,n,!1),t.moveTo(i+e.r0,r),t.arc(i,r,e.r0,0,n,!0)},zh);function zh(t){return Mh.call(this,t)||this}Lh.prototype.type="ring";var Rh,Oh=Math.sin,Ih=Math.cos,Fh=Math.PI/180,Bh=function(){this.cx=0,this.cy=0,this.r=[],this.k=0,this.n=1},Eh=(tt(Hh,Rh=fo),Hh.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Hh.prototype.getDefaultShape=function(){return new Bh},Hh.prototype.buildPath=function(t,e){var i,r,n,o=e.r,a=e.k,s=e.n,h=e.cx,l=e.cy;t.moveTo(h,l);for(var u=0,p=o.length;u<p;u++){n=o[u];for(var c=0;c<=360*s;c++)i=n*Oh(a/s*c%360*Fh)*Ih(c*Fh)+h,r=n*Oh(a/s*c%360*Fh)*Oh(c*Fh)+l,t.lineTo(i,r)}},Hh);function Hh(t){return Rh.call(this,t)||this}Eh.prototype.type="rose";var Nh,Wh=Math.PI,Xh=Math.cos,Uh=Math.sin,Yh=function(){this.cx=0,this.cy=0,this.n=3,this.r=0},jh=(tt(qh,Nh=fo),qh.prototype.getDefaultShape=function(){return new Yh},qh.prototype.buildPath=function(t,e){var i=e.n;if(i&&!(i<2)){var r=e.cx,n=e.cy,o=e.r,a=e.r0;null==a&&(a=4<i?o*Xh(2*Wh/i)/Xh(Wh/i):o/3);var s=Wh/i,h=-Wh/2,l=r+o*Xh(h),u=n+o*Uh(h);h+=s,t.moveTo(l,u);for(var p,c=0,f=2*i-1;c<f;c++)p=c%2==0?a:o,t.lineTo(r+p*Xh(h),n+p*Uh(h)),h+=s;t.closePath()}},qh);function qh(t){return Nh.call(this,t)||this}jh.prototype.type="star";var Gh,Vh=Math.cos,Zh=Math.sin,Kh=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0,this.d=0,this.location="out"},Qh=(tt($h,Gh=fo),$h.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},$h.prototype.getDefaultShape=function(){return new Kh},$h.prototype.buildPath=function(t,e){var i,r,n=e.r,o=e.r0,a=e.d,s=e.cx,h=e.cy,l="out"===e.location?1:-1;if(!(e.location&&n<=o)){var u,p=0,c=1,f=(n+l*o)*Vh(0)-l*a*Vh(0)+s,d=(n+l*o)*Zh(0)-a*Zh(0)+h;for(t.moveTo(f,d);o*++p%(n+l*o)!=0;);for(;u=Math.PI/180*c,i=(n+l*o)*Vh(u)-l*a*Vh((n/o+l)*u)+s,r=(n+l*o)*Zh(u)-a*Zh((n/o+l)*u)+h,t.lineTo(i,r),++c<=o*p/(n+l*o)*360;);}},$h);function $h(t){return Gh.call(this,t)||this}Qh.prototype.type="trochoid";function Jh(t,e){this.image=t,this.repeat=e,this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1}var tl=[0,0],el=[0,0],il=new Zi,rl=new Zi,nl=(ol.prototype.fromBoundingRect=function(t,e){var i=this._corners,r=this._axes,n=t.x,o=t.y,a=n+t.width,s=o+t.height;if(i[0].set(n,o),i[1].set(a,o),i[2].set(a,s),i[3].set(n,s),e)for(var h=0;h<4;h++)i[h].transform(e);for(Zi.sub(r[0],i[1],i[0]),Zi.sub(r[1],i[3],i[0]),r[0].normalize(),r[1].normalize(),h=0;h<2;h++)this._origin[h]=r[h].dot(i[0])},ol.prototype.intersect=function(t,e){var i=!0,r=!e;return il.set(1/0,1/0),rl.set(0,0),!this._intersectCheckOneSide(this,t,il,rl,r,1)&&(i=!1,r)||!this._intersectCheckOneSide(t,this,il,rl,r,-1)&&(i=!1,r)||r||Zi.copy(e,i?il:rl),i},ol.prototype._intersectCheckOneSide=function(t,e,i,r,n,o){for(var a=!0,s=0;s<2;s++){var h=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,tl),this._getProjMinMaxOnAxis(s,e._corners,el),tl[1]<el[0]||el[1]<tl[0]){if(a=!1,n)return a;var l=Math.abs(el[0]-tl[1]),u=Math.abs(tl[0]-el[1]);Math.min(l,u)>r.len()&&(l<u?Zi.scale(r,h,-l*o):Zi.scale(r,h,u*o))}else i&&(l=Math.abs(el[0]-tl[1]),u=Math.abs(tl[0]-el[1]),Math.min(l,u)<i.len()&&(l<u?Zi.scale(i,h,l*o):Zi.scale(i,h,-u*o)))}return a},ol.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var r=this._axes[t],n=this._origin,o=e[0].dot(r)+n[t],a=o,s=o,h=1;h<e.length;h++)var l=e[h].dot(r)+n[t],a=Math.min(l,a),s=Math.max(l,s);i[0]=a,i[1]=s},ol);function ol(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new Zi;for(i=0;i<2;i++)this._axes[i]=new Zi;t&&this.fromBoundingRect(t,e)}var al=(sl.prototype.update=function(t){var e=this.dom.style;e.width=t.width+"px",e.height=t.height+"px",e.left=t.x+"px",e.top=t.y+"px"},sl.prototype.hide=function(){this.dom.style.opacity="0"},sl.prototype.show=function(t){var e=this;clearTimeout(this._hideTimeout),this.dom.style.opacity="1",this._hideTimeout=setTimeout(function(){e.hide()},t||1e3)},sl);function sl(t){var e=this.dom=document.createElement("div");for(var i in e.className="ec-debug-dirty-rect",t=m({},t),m(t,{backgroundColor:"rgba(0, 0, 255, 0.2)",border:"1px solid #00f"}),e.style.cssText="\nposition: absolute;\nopacity: 0;\ntransition: opacity 0.5s linear;\npointer-events: none;\n",t)t.hasOwnProperty(i)&&(e.style[i]=t[i])}function hl(t,e,i){for(var r,n,o,a,s,h,l,u,p,c,f,d,y,g,v,_,m="radial"===e.type?(u=t,p=e,f=(c=i).width,d=c.height,y=Math.min(f,d),g=null==p.x?.5:p.x,v=null==p.y?.5:p.y,_=null==p.r?.5:p.r,p.global||(g=g*f+c.x,v=v*d+c.y,_*=y),u.createRadialGradient(g,v,0,g,v,_)):(r=t,o=i,a=null==(n=e).x?0:n.x,s=null==n.x2?1:n.x2,h=null==n.y?0:n.y,l=null==n.y2?0:n.y2,n.global||(a=a*o.width+o.x,s=s*o.width+o.x,h=h*o.height+o.y,l=l*o.height+o.y),a=isNaN(a)?0:a,s=isNaN(s)?1:s,h=isNaN(h)?0:h,l=isNaN(l)?0:l,r.createLinearGradient(a,h,s,l)),x=e.colorStops,w=0;w<x.length;w++)m.addColorStop(x[w].offset,x[w].color);return m}function ll(t,e){if(t!==e&&(t||e)){if(!t||!e||t.length!==e.length)return 1;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return 1}}function ul(t,e){return t&&"solid"!==t&&0<e?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:z(t)?[t]:C(t)?t:null):null}var pl=new jn(!0);function cl(t){var e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))}function fl(t){var e=t.fill;return null!=e&&"none"!==e}function dl(t,e){var i;null!=e.fillOpacity&&1!==e.fillOpacity?(i=t.globalAlpha,t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=i):t.fill()}function yl(t,e){var i;null!=e.strokeOpacity&&1!==e.strokeOpacity?(i=t.globalAlpha,t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=i):t.stroke()}function gl(t,e,i){var r=Rs(e.image,e.__image,i);if(Is(r)){var n,o=t.createPattern(r,e.repeat||"repeat");return"function"==typeof DOMMatrix&&o.setTransform&&((n=new DOMMatrix).rotateSelf(0,0,(e.rotation||0)/Math.PI*180),n.scaleSelf(e.scaleX||1,e.scaleY||1),n.translateSelf(e.x||0,e.y||0),o.setTransform(n)),o}}var vl=["shadowBlur","shadowOffsetX","shadowOffsetY"],_l=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function ml(t,e,i,r,n){var o,a=!1;if(!r&&e===(i=i||{}))return!1;!r&&e.opacity===i.opacity||(a||(Cl(t,n),a=!0),o=Math.max(Math.min(e.opacity,1),0),t.globalAlpha=isNaN(o)?Er.opacity:o),!r&&e.blend===i.blend||(a||(Cl(t,n),a=!0),t.globalCompositeOperation=e.blend||Er.blend);for(var s=0;s<vl.length;s++){var h=vl[s];!r&&e[h]===i[h]||(a||(Cl(t,n),a=!0),t[h]=t.dpr*(e[h]||0))}return!r&&e.shadowColor===i.shadowColor||(a||(Cl(t,n),a=!0),t.shadowColor=e.shadowColor||Er.shadowColor),a}function xl(t,e,i,r,n){var o=Pl(e,n.inHover),a=r?null:i&&Pl(i,n.inHover)||{};if(o!==a){var s,h=ml(t,o,a,r,n);!r&&o.fill===a.fill||(h||(Cl(t,n),h=!0),t.fillStyle=o.fill),!r&&o.stroke===a.stroke||(h||(Cl(t,n),h=!0),t.strokeStyle=o.stroke),!r&&o.opacity===a.opacity||(h||(Cl(t,n),h=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()&&(s=o.lineWidth/(o.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1),t.lineWidth!==s&&(h||(Cl(t,n),h=!0),t.lineWidth=s));for(var l=0;l<_l.length;l++){var u=_l[l],p=u[0];!r&&o[p]===a[p]||(h||(Cl(t,n),h=!0),t[p]=o[p]||u[1])}return h}}function wl(t,e){var i=e.transform,r=t.dpr||1;i?t.setTransform(r*i[0],r*i[1],r*i[2],r*i[3],r*i[4],r*i[5]):t.setTransform(r,0,0,r,0,0)}var bl=1,kl=2,Sl=3,Tl=4;function Cl(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Pl(t,e){return e&&t.__hoverStyle||t.style}function Al(t,e,i,r){var n=e.transform;if(!e.shouldBePainted(i.viewWidth,i.viewHeight,!1,!1))return e.__dirty&=~ae,void(e.__isRendered=!1);var o,a,s,h,l,u,p,c,f,d,y,g,v,_,m,x,w,b,k,S,T,C,P,A,M,D,L,z,R,O,I,F,B=e.__clipPaths,E=i.prevElClipPaths,H=!1,N=!1;E&&!ll(B,E)||(E&&E.length&&(Cl(t,i),t.restore(),N=H=!0,i.prevElClipPaths=null,i.allClipped=!1,i.prevEl=null),B&&B.length&&(Cl(t,i),t.save(),function(t,e,i){for(var r=!1,n=0;n<t.length;n++){var o=t[n],r=r||o.isZeroArea();wl(e,o),e.beginPath(),o.buildPath(e,o.shape),e.clip()}i.allClipped=r}(B,t,i),H=!0),i.prevElClipPaths=B),i.allClipped?e.__isRendered=!1:(e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush(),(o=i.prevEl)||(N=H=!0),a=e instanceof fo&&e.autoBatch&&(s=e.style,h=fl(s),l=cl(s),!(s.lineDash||!(+h^+l)||h&&"string"!=typeof s.fill||l&&"string"!=typeof s.stroke||s.strokePercent<1||s.strokeOpacity<1||s.fillOpacity<1)),H||(u=n,p=o.transform,u&&p?u[0]!==p[0]||u[1]!==p[1]||u[2]!==p[2]||u[3]!==p[3]||u[4]!==p[4]||u[5]!==p[5]:u||p)?(Cl(t,i),wl(t,e)):a||Cl(t,i),c=Pl(e,i.inHover),e instanceof fo?(i.lastDrawType!==bl&&(N=!0,i.lastDrawType=bl),xl(t,e,o,N,i),a&&(i.batchFill||i.batchStroke)||t.beginPath(),function(t,e,i,r){var n=cl(i),o=fl(i),a=i.strokePercent,s=a<1,h=!e.path;e.silent&&!s||!h||e.createPathProxy();var l,u,p,c,f,d,y,g,v,_,m,x=e.path||pl;r||(l=i.fill,u=i.stroke,p=o&&!!l.colorStops,c=n&&!!u.colorStops,f=o&&!!l.image,d=n&&!!u.image,m=_=v=g=y=void 0,(p||c)&&(m=e.getBoundingRect()),p&&(y=e.__dirty?hl(t,l,m):e.__canvasFillGradient,e.__canvasFillGradient=y),c&&(g=e.__dirty?hl(t,u,m):e.__canvasStrokeGradient,e.__canvasStrokeGradient=g),f&&(v=e.__dirty||!e.__canvasFillPattern?gl(t,l,e):e.__canvasFillPattern,e.__canvasFillPattern=v),d&&(_=e.__dirty||!e.__canvasStrokePattern?gl(t,u,e):e.__canvasStrokePattern,e.__canvasStrokePattern=v),p?t.fillStyle=y:f&&(v?t.fillStyle=v:o=!1),c?t.strokeStyle=g:d&&(_?t.strokeStyle=_:n=!1));var w,b=i.lineDash&&0<i.lineWidth&&ul(i.lineDash,i.lineWidth),k=i.lineDashOffset,S=!!t.setLineDash,T=e.getGlobalScale();x.setScale(T[0],T[1],e.segmentIgnoreThreshold),!b||(w=i.strokeNoScale&&e.getLineScale?e.getLineScale():1)&&1!==w&&(b=W(b,function(t){return t/w}),k/=w);var C=!0;(h||e.__dirty&se||b&&!S&&n)&&(x.setDPR(t.dpr),s?x.setContext(null):(x.setContext(t),C=!1),x.reset(),b&&!S&&(x.setLineDash(b),x.setLineDashOffset(k)),e.buildPath(x,e.shape,r),x.toStatic(),e.pathUpdated()),C&&x.rebuildPath(t,s?a:1),b&&S&&(t.setLineDash(b),t.lineDashOffset=k),r||(i.strokeFirst?(n&&yl(t,i),o&&dl(t,i)):(o&&dl(t,i),n&&yl(t,i))),b&&S&&t.setLineDash([])}(t,e,c,a),a&&(i.batchFill=c.fill||"",i.batchStroke=c.stroke||"")):e instanceof Ma?(i.lastDrawType!==Sl&&(N=!0,i.lastDrawType=Sl),xl(t,e,o,N,i),M=t,D=e,null!=(F=(L=c).text)&&(F+=""),F&&(M.font=L.font||ur,M.textAlign=L.textAlign,M.textBaseline=L.textBaseline,z=void 0,M.setLineDash&&(R=L.lineDash&&0<L.lineWidth&&ul(L.lineDash,L.lineWidth),O=L.lineDashOffset,R&&((I=L.strokeNoScale&&D.getLineScale?D.getLineScale():1)&&1!==I&&(R=W(R,function(t){return t/I}),O/=I),M.setLineDash(R),M.lineDashOffset=O,z=!0)),L.strokeFirst?(cl(L)&&M.strokeText(F,L.x,L.y),fl(L)&&M.fillText(F,L.x,L.y)):(fl(L)&&M.fillText(F,L.x,L.y),cl(L)&&M.strokeText(F,L.x,L.y)),z&&M.setLineDash([]))):e instanceof No?(i.lastDrawType!==kl&&(N=!0,i.lastDrawType=kl),C=o,P=N,ml(t,Pl(e,(A=i).inHover),C&&Pl(C,A.inHover),P,A),f=t,y=c,(T=(d=e).__image=Rs(y.image,d.__image,d,d.onload))&&Is(T)&&(g=y.x||0,v=y.y||0,_=d.getWidth(),m=d.getHeight(),x=T.width/T.height,null==_&&null!=m?_=m*x:null==m&&null!=_?m=_/x:null==_&&null==m&&(_=T.width,m=T.height),y.sWidth&&y.sHeight?(w=y.sx||0,b=y.sy||0,f.drawImage(T,w,b,y.sWidth,y.sHeight,g,v,_,m)):y.sx&&y.sy?(k=_-(w=y.sx),S=m-(b=y.sy),f.drawImage(T,w,b,k,S,g,v,_,m)):f.drawImage(T,g,v,_,m))):e instanceof Ds&&(i.lastDrawType!==Tl&&(N=!0,i.lastDrawType=Tl),function(t,e,i){var r=e.getDisplayables(),n=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:i.viewWidth,viewHeight:i.viewHeight,inHover:i.inHover};for(o=e.getCursor(),a=r.length;o<a;o++){(u=r[o]).beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Al(t,u,s,o===a-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),s.prevEl=u}for(var h=0,l=n.length;h<l;h++){var u;(u=n[h]).beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Al(t,u,s,h===l-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),s.prevEl=u}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,i)),a&&r&&Cl(t,i),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),(i.prevEl=e).__dirty=0,e.__isRendered=!0)}function Ml(){return!1}function Dl(t,e,i){var r=w(),n=e.getWidth(),o=e.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=n+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",t)),r.width=n*i,r.height=o*i,r}var Ll,zl=(tt(Rl,Ll=wt),Rl.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},Rl.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},Rl.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},Rl.prototype.setUnpainted=function(){this.__firstTimePaint=!0},Rl.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Dl("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},Rl.prototype.createRepaintRects=function(t,e,i,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var p=[],c=this.maxRepaintRectCount,f=!1,d=new or(0,0,0,0);function n(t){if(t.isFinite()&&!t.isZero())if(0===p.length)(e=new or(0,0,0,0)).copy(t),p.push(e);else{for(var e,i=!1,r=1/0,n=0,o=0;o<p.length;++o){var a,s,h,l=p[o];if(l.intersect(t)){var u=new or(0,0,0,0);u.copy(l),u.union(t),p[o]=u,i=!0;break}f&&(d.copy(t),d.union(l),a=t.width*t.height,s=l.width*l.height,(h=d.width*d.height-a-s)<r&&(r=h,n=o))}f&&(p[n].union(t),i=!0),i||((e=new or(0,0,0,0)).copy(t),p.push(e)),f=f||p.length>=c}}for(var o,a=this.__startIndex;a<this.__endIndex;++a)(h=t[a])&&(u=h.shouldBePainted(i,r,!0,!0),(l=h.__isRendered&&(h.__dirty&ae||!u)?h.getPrevPaintRect():null)&&n(l),(o=u&&(h.__dirty&ae||!h.__isRendered)?h.getPaintRect():null)&&n(o));for(var s,a=this.__prevStartIndex;a<this.__prevEndIndex;++a){var h,l,u=(h=e[a]).shouldBePainted(i,r,!0,!0);!h||u&&h.__zr||!h.__isRendered||(l=h.getPrevPaintRect())&&n(l)}do{for(s=!1,a=0;a<p.length;)if(p[a].isZero())p.splice(a,1);else{for(var y=a+1;y<p.length;)p[a].intersect(p[y])?(s=!0,p[a].union(p[y]),p.splice(y,1)):y++;a++}}while(s);return this._paintRects=p},Rl.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},Rl.prototype.resize=function(t,e){var i=this.dpr,r=this.dom,n=r.style,o=this.domBack;n&&(n.width=t+"px",n.height=e+"px"),r.width=t*i,r.height=e*i,o&&(o.width=t*i,o.height=e*i,1!==i&&this.ctxBack.scale(i,i))},Rl.prototype.clear=function(t,o,e){var i=this.dom,a=this.ctx,r=i.width,n=i.height;o=o||this.clearColor;var s=this.motionBlur&&!t,h=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,r/l,n/l));var p=this.domBack;function c(t,e,i,r){var n;a.clearRect(t,e,i,r),o&&"transparent"!==o&&(n=void 0,B(o)?(n=o.__canvasGradient||hl(a,o,{x:0,y:0,width:i,height:r}),o.__canvasGradient=n):E(o)&&(n=gl(a,o,{dirty:function(){u.setUnpainted(),u.__painter.refresh()}})),a.save(),a.fillStyle=n||o,a.fillRect(t,e,i,r),a.restore()),s&&(a.save(),a.globalAlpha=h,a.drawImage(p,t,e,i,r),a.restore())}!e||s?c(0,0,r,n):e.length&&k(e,function(t){c(t.x*l,t.y*l,t.width*l,t.height*l)})},Rl);function Rl(t,e,i){var r,n=Ll.call(this)||this;n.motionBlur=!1,n.lastFrameAlpha=.7,n.dpr=1,n.virtual=!1,n.config={},n.incremental=!1,n.zlevel=0,n.maxRepaintRectCount=5,n.__dirty=!0,n.__firstTimePaint=!0,n.__used=!1,n.__drawIndex=0,n.__startIndex=0,n.__endIndex=0,n.__prevStartIndex=null,n.__prevEndIndex=null,i=i||Ai,"string"==typeof t?r=Dl(t,e,i):R(t)&&(t=(r=t).id),n.id=t;var o=(n.dom=r).style;return o&&(r.onselectstart=Ml,o.webkitUserSelect="none",o.userSelect="none",o.webkitTapHighlightColor="rgba(0,0,0,0)",o["-webkit-touch-callout"]="none",o.padding="0",o.margin="0",o.borderWidth="0"),n.domBack=null,n.ctxBack=null,n.painter=e,n.config=null,n.dpr=i,n}var Ol=314159;function Il(t){return parseInt(t,10)}var Fl=(Bl.prototype.getType=function(){return"canvas"},Bl.prototype.isSingleCanvas=function(){return this._singleCanvas},Bl.prototype.getViewportRoot=function(){return this._domRoot},Bl.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},Bl.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),i=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,i,t,this._redrawId);for(var n=0;n<r.length;n++){var o,a=r[n],s=this._layers[a];!s.__builtin__&&s.refresh&&(o=0===n?this._backgroundColor:null,s.refresh(o))}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},Bl.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},Bl.prototype._paintHoverList=function(t){var e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){for(var r,n={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<e;o++){var a=t[o];a.__inHover&&(i=i||(this._hoverlayer=this.getLayer(1e5)),r||(r=i.ctx).save(),Al(r,a,n,o===e-1))}r&&r.restore()}},Bl.prototype.getHoverLayer=function(){return this.getLayer(1e5)},Bl.prototype.paintOne=function(t,e){Al(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)},Bl.prototype._paintList=function(t,e,i,r){var n,o,a,s;this._redrawId===r&&(i=i||!1,this._updateLayerStatus(t),o=(n=this._doPaintList(t,e,i)).finished,a=n.needsRefreshHover,this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(t),o?this.eachLayer(function(t){t.afterBrush&&t.afterBrush()}):(s=this,fe(function(){s._paintList(t,e,i,r)})))},Bl.prototype._compositeManually=function(){var e=this.getLayer(Ol).ctx,i=this._domRoot.width,r=this._domRoot.height;e.clearRect(0,0,i,r),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,i,r)})},Bl.prototype._doPaintList=function(d,y,g){for(var v=this,_=[],m=this._opts.useDirtyRect,t=0;t<this._zlevelList.length;t++){var e=this._zlevelList[t],i=this._layers[e];i.__builtin__&&i!==this._hoverlayer&&(i.__dirty||g)&&_.push(i)}for(var x=!0,w=!1,b=this,r=0;r<_.length;r++)!function(t){var e,r,n=_[t],o=n.ctx,i=m&&n.createRepaintRects(d,y,b._width,b._height),a=g?n.__startIndex:n.__drawIndex,s=!g&&n.incremental&&Date.now,h=s&&Date.now(),l=n.zlevel===b._zlevelList[0]?b._backgroundColor:null;function u(t){var e={inHover:!1,allClipped:!1,prevEl:null,viewWidth:v._width,viewHeight:v._height};for(r=a;r<n.__endIndex;r++){var i=d[r];if(i.__inHover&&(w=!0),v._doPaintEl(i,n,m,t,e,r===n.__endIndex-1),s&&15<Date.now()-h)break}e.prevElClipPaths&&o.restore()}if(n.__startIndex===n.__endIndex?n.clear(!1,l,i):a===n.__startIndex&&((e=d[a]).incremental&&e.notClear&&!g||n.clear(!1,l,i)),-1===a&&(console.error("For some unknown reason. drawIndex is -1"),a=n.__startIndex),i)if(0===i.length)r=n.__endIndex;else for(var p=b.dpr,c=0;c<i.length;++c){var f=i[c];o.save(),o.beginPath(),o.rect(f.x*p,f.y*p,f.width*p,f.height*p),o.clip(),u(f),o.restore()}else o.save(),u(),o.restore();n.__drawIndex=r,n.__drawIndex<n.__endIndex&&(x=!1)}(r);return h.wxa&&k(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),{finished:x,needsRefreshHover:w}},Bl.prototype._doPaintEl=function(t,e,i,r,n,o){var a,s=e.ctx;i?(a=t.getPaintRect(),(!r||a&&a.intersect(r))&&(Al(s,t,n,o),t.setPrevPaintRect(a))):Al(s,t,n,o)},Bl.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Ol);var i=this._layers[t];return i||((i=new zl("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?_(i,this._layerConfig[t],!0):this._layerConfig[t-.01]&&_(i,this._layerConfig[t-.01],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},Bl.prototype.insertLayer=function(t,e){var i,r=this._layers,n=this._zlevelList,o=n.length,a=this._domRoot,s=null,h=-1;if(r[t])g("ZLevel "+t+" has been used already");else if(function(t){if(t){if(t.__builtin__)return 1;if("function"==typeof t.resize&&"function"==typeof t.refresh)return 1}}(e)){if(0<o&&t>n[0]){for(h=0;h<o-1&&!(n[h]<t&&n[h+1]>t);h++);s=r[n[h]]}n.splice(h+1,0,t),(r[t]=e).virtual||(s?(i=s.dom).nextSibling?a.insertBefore(e.dom,i.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.__painter=this}else g("Layer of zlevel "+t+" is not valid")},Bl.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,r=0;r<i.length;r++){var n=i[r];t.call(e,this._layers[n],n)}},Bl.prototype.eachBuiltinLayer=function(t,e){for(var i=this._zlevelList,r=0;r<i.length;r++){var n=i[r],o=this._layers[n];o.__builtin__&&t.call(e,o,n)}},Bl.prototype.eachOtherLayer=function(t,e){for(var i=this._zlevelList,r=0;r<i.length;r++){var n=i[r],o=this._layers[n];o.__builtin__||t.call(e,o,n)}},Bl.prototype.getLayers=function(){return this._layers},Bl.prototype._updateLayerStatus=function(t){function e(t){n&&(n.__endIndex!==t&&(n.__dirty=!0),n.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++)if((s=t[i]).zlevel!==t[i-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}for(var r,n=null,o=0,a=0;a<t.length;a++){var s,h=(s=t[a]).zlevel,l=void 0;r!==h&&(r=h,o=0),s.incremental?((l=this.getLayer(h+.001,this._needsManuallyCompositing)).incremental=!0,o=1):l=this.getLayer(h+(0<o?.01:0),this._needsManuallyCompositing),l.__builtin__||g("ZLevel "+h+" has been used by unkown layer "+l.id),l!==n&&(l.__used=!0,l.__startIndex!==a&&(l.__dirty=!0),l.__startIndex=a,l.incremental?l.__drawIndex=-1:l.__drawIndex=a,e(a),n=l),s.__dirty&ae&&!s.__inHover&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=a))}e(a),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},Bl.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},Bl.prototype._clearLayer=function(t){t.clear()},Bl.prototype.setBackgroundColor=function(t){this._backgroundColor=t,k(this._layers,function(t){t.setUnpainted()})},Bl.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?_(i[t],e,!0):i[t]=e;for(var r=0;r<this._zlevelList.length;r++){var n=this._zlevelList[r];n!==t&&n!==t+.01||_(this._layers[n],i[t],!0)}}},Bl.prototype.delLayer=function(t){var e=this._layers,i=this._zlevelList,r=e[t];r&&(r.dom.parentNode.removeChild(r.dom),delete e[t],i.splice(M(i,t),1))},Bl.prototype.resize=function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts;if(null!=t&&(r.width=t),null!=e&&(r.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){for(var n in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(n)&&this._layers[n].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(Ol).resize(t,e)}return this},Bl.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},Bl.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},Bl.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Ol].dom;var e=new zl("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var i=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var r=e.dom.width,n=e.dom.height;this.eachLayer(function(t){t.__builtin__?i.drawImage(t.dom,0,0,r,n):t.renderToCanvas&&(i.save(),t.renderToCanvas(i),i.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,h=a.length;s<h;s++){var l=a[s];Al(i,l,o,s===h-1)}return e.dom},Bl.prototype.getWidth=function(){return this._width},Bl.prototype.getHeight=function(){return this._height},Bl.prototype._getSize=function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[r]||Il(s[i])||Il(a.style[i]))-(Il(s[n])||0)-(Il(s[o])||0)|0},Bl.prototype.pathToImage=function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),r=i.getContext("2d"),n=t.getBoundingRect(),o=t.style,a=o.shadowBlur*e,s=o.shadowOffsetX*e,h=o.shadowOffsetY*e,l=t.hasStroke()?o.lineWidth:0,u=Math.max(l/2,a-s),p=Math.max(l/2,s+a),c=Math.max(l/2,a-h),f=Math.max(l/2,h+a),d=n.width+u+p,y=n.height+c+f;i.width=d*e,i.height=y*e,r.scale(e,e),r.clearRect(0,0,d,y),r.dpr=e;var g={x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,originX:t.originX,originY:t.originY};t.x=u-n.x,t.y=c-n.y,t.rotation=0,t.scaleX=1,t.scaleY=1,t.updateTransform(),t&&Al(r,t,{inHover:!1,viewWidth:this._width,viewHeight:this._height},!0);var v=new No({style:{x:0,y:0,image:i}});return m(t,g),v},Bl);function Bl(t,e,i,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=m({},i||{}),this.dpr=i.devicePixelRatio||Ai,this._singleCanvas=n;var o=(this.root=t).style;o&&(o.webkitTapHighlightColor="transparent",o.webkitUserSelect="none",o.userSelect="none",o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList;this._prevDisplayList=[];var s,h,l,u,p,c,f,d,y=this._layers;n?(h=(s=t).width,l=s.height,null!=i.width&&(h=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,s.width=h*this.dpr,s.height=l*this.dpr,this._width=h,this._height=l,(u=new zl(s,this,this.dpr)).__builtin__=!0,u.initContext(),(y[Ol]=u).zlevel=Ol,a.push(Ol),this._domRoot=t):(this._width=this._getSize(0),this._height=this._getSize(1),p=this._domRoot=(c=this._width,f=this._height,(d=document.createElement("div")).style.cssText=["position:relative","width:"+c+"px","height:"+f+"px","padding:0","margin:0","border-width:0"].join(";")+";",d),t.appendChild(p))}function El(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Hl(h,l,u){u=u||function(t,e){return t===e},h=h.slice();var p=(l=l.slice()).length,c=h.length,f=1,t=p+c,d=[{newPos:-1,components:[]}],e=Nl(d[0],l,h,0,u);if(d[0].newPos+1>=p&&c<=e+1){for(var i=[],r=0;r<l.length;r++)i.push(r);return[{indices:i,count:l.length,added:!1,removed:!1}]}for(;f<=t;){var n=function(){for(var t,e=-1*f;e<=f;e+=2){var i,r=d[e-1],n=d[e+1],o=(n?n.newPos:0)-e;r&&(d[e-1]=void 0);var a=r&&r.newPos+1<p,s=n&&0<=o&&o<c;if(a||s){if(!a||s&&r.newPos<n.newPos?Wl((i={newPos:(t=n).newPos,components:t.components.slice(0)}).components,!1,!0):((i=r).newPos++,Wl(i.components,!0,!1)),o=Nl(i,l,h,e,u),i.newPos+1>=p&&c<=o+1)return function(t){for(var e=0,i=t.length,r=0,n=0;e<i;e++){var o=t[e];if(o.removed){for(s=n;s<n+o.count;s++)o.indices.push(s);n+=o.count}else{for(var a=[],s=r;s<r+o.count;s++)a.push(s);o.indices=a,r+=o.count,o.added||(n+=o.count)}}return t}(i.components);d[e]=i}else d[e]=void 0}f++}();if(n)return n}}function Nl(t,e,i,r,n){for(var o=e.length,a=i.length,s=t.newPos,h=s-r,l=0;s+1<o&&h+1<a&&n(e[s+1],i[h+1]);)s++,h++,l++;return l&&t.components.push({count:l,added:!1,removed:!1,indices:[]}),t.newPos=s,h}function Wl(t,e,i){var r=t[t.length-1];r&&r.added===e&&r.removed===i?t[t.length-1]={count:r.count+1,added:e,removed:i,indices:[]}:t.push({count:1,added:e,removed:i,indices:[]})}var Xl="none",Ul=Math.round,Yl=Math.sin,jl=Math.cos,ql=Math.PI,Gl=2*Math.PI,Vl=180/ql;function Zl(t){return Ul(1e3*t)/1e3}function Kl(t){return Ul(1e4*t)/1e4}function Ql(t){return t<1e-4&&-1e-4<t}function $l(t,e){e&&Jl(t,"transform","matrix("+Zl(e[0])+","+Zl(e[1])+","+Zl(e[2])+","+Zl(e[3])+","+Kl(e[4])+","+Kl(e[5])+")")}function Jl(t,e,i){i&&("linear"===i.type||"radial"===i.type)||t.setAttribute(e,i)}function tu(t,e,i){var r,n,o,a,s,h,l,u,p=null==e.opacity?1:e.opacity;i instanceof No?t.style.opacity=p+"":(null!=(n=e.fill)&&n!==Xl?(Jl(t,"fill",r="transparent"===(r=e.fill)?Xl:r),Jl(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*p:p)+"")):Jl(t,"fill",Xl),null!=(u=e.stroke)&&u!==Xl?(Jl(t,"stroke",o="transparent"===(o=e.stroke)?Xl:o),a=e.lineWidth,Jl(t,"stroke-width",((s=e.strokeNoScale?i.getLineScale():1)?a/s:0)+""),Jl(t,"paint-order",e.strokeFirst?"stroke":"fill"),Jl(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*p:p)+""),(h=e.lineDash&&0<a&&ul(e.lineDash,a))?(l=e.lineDashOffset,s&&1!==s&&(h=W(h,function(t){return t/s}),l=l&&Ul(l/=s)),Jl(t,"stroke-dasharray",h.join(",")),Jl(t,"stroke-dashoffset",(l||0)+"")):Jl(t,"stroke-dasharray",""),e.lineCap&&Jl(t,"stroke-linecap",e.lineCap),e.lineJoin&&Jl(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Jl(t,"stroke-miterlimit",e.miterLimit+"")):Jl(t,"stroke",Xl))}var eu=(iu.prototype.reset=function(){this._d=[],this._str=""},iu.prototype.moveTo=function(t,e){this._add("M",t,e)},iu.prototype.lineTo=function(t,e){this._add("L",t,e)},iu.prototype.bezierCurveTo=function(t,e,i,r,n,o){this._add("C",t,e,i,r,n,o)},iu.prototype.quadraticCurveTo=function(t,e,i,r){this._add("Q",t,e,i,r)},iu.prototype.arc=function(t,e,i,r,n,o){this.ellipse(t,e,i,i,0,r,n,o)},iu.prototype.ellipse=function(t,e,i,r,n,o,a,s){var h=0===this._d.length,l=a-o,u=!s,p=Math.abs(l),c=Ql(p-Gl)||(u?Gl<=l:Gl<=-l),f=!1,f=!!c||!Ql(p)&&ql<=(0<l?l%Gl:l%Gl+Gl)==!!u,d=Kl(t+i*jl(o)),y=Kl(e+r*Yl(o));c&&(l=u?Gl-1e-4:1e-4-Gl,f=!0,h&&this._d.push("M",d,y));var g=Kl(t+i*jl(o+l)),v=Kl(e+r*Yl(o+l));if(isNaN(d)||isNaN(y)||isNaN(i)||isNaN(r)||isNaN(n)||isNaN(Vl)||isNaN(g)||isNaN(v))return"";this._d.push("A",Kl(i),Kl(r),Ul(n*Vl),+f,+u,g,v)},iu.prototype.rect=function(t,e,i,r){this._add("M",t,e),this._add("L",t+i,e),this._add("L",t+i,e+r),this._add("L",t,e+r),this._add("L",t,e)},iu.prototype.closePath=function(){0<this._d.length&&this._add("Z")},iu.prototype._add=function(t,e,i,r,n,o,a,s,h){this._d.push(t);for(var l=1;l<arguments.length;l++){var u=arguments[l];if(isNaN(u))return void(this._invalid=!0);this._d.push(Kl(u))}},iu.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(" "),this._d=[]},iu.prototype.getStr=function(){return this._str},iu);function iu(){}var ru={brush:function(t){var e=t.style,i=t.__svgEl;i||(i=El("path"),t.__svgEl=i),t.path||t.createPathProxy();var r=t.path;t.shapeChanged()&&(r.beginPath(),t.buildPath(r,t.shape),t.pathUpdated());var n=r.getVersion(),o=t,a=o.__svgPathBuilder;(o.__svgPathVersion!==n||!a||t.style.strokePercent<1)&&((a=a||(o.__svgPathBuilder=new eu)).reset(),r.rebuildPath(a,t.style.strokePercent),a.generateStr(),o.__svgPathVersion=n),Jl(i,"d",a.getStr()),tu(i,e,t),$l(i,t.transform)}},nu={brush:function(t){var e,i,r,n,o,a,s,h=t.style,l=h.image;l instanceof HTMLImageElement?l=l.src:l instanceof HTMLCanvasElement&&(l=l.toDataURL()),l&&(e=h.x||0,i=h.y||0,r=h.width,n=h.height,(o=t.__svgEl)||(o=El("image"),t.__svgEl=o),l!==t.__imageSrc&&(a="href",s=l,o.setAttributeNS("http://www.w3.org/1999/xlink",a,s),t.__imageSrc=l),Jl(o,"width",r+""),Jl(o,"height",n+""),Jl(o,"x",e+""),Jl(o,"y",i+""),tu(o,h,t),$l(o,t.transform))}},ou={left:"start",right:"end",center:"middle",middle:"middle"};var au={brush:function(t){var e,i,r,n,o,a,s,h,l,u,p=t.style,c=p.text;null!=c&&(c+=""),!c||isNaN(p.x)||isNaN(p.y)||((e=t.__svgEl)||(e=El("text"),i="xml:space",r="preserve",e.setAttributeNS("http://www.w3.org/XML/1998/namespace",i,r),t.__svgEl=e),n=p.font||ur,e.style.font=n,e.textContent=c,tu(e,p,t),$l(e,t.transform),o=p.x||0,s=p.y||0,h=gr(n),"top"===(l=p.textBaseline)?s+=h/2:"bottom"===l&&(s-=h/2),a=s,u=ou[p.textAlign]||p.textAlign,Jl(e,"dominant-baseline","central"),Jl(e,"text-anchor",u),Jl(e,"x",o+""),Jl(e,"y",a+""))}},su=(hu.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");if(0!==i.length)return i[0];if(t){var r=e.insertBefore(this.createElement("defs"),e.firstChild);return r.contains||(r.contains=function(t){var e=r.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),r}return null},hu.prototype.doUpdate=function(t,e){var i,r;t&&(i=this.getDefs(!1),t[this._domName]&&i.contains(t[this._domName])?"function"==typeof e&&e(t):(r=this.add(t))&&(t[this._domName]=r))},hu.prototype.add=function(t){return null},hu.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},hu.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},hu.prototype.getDoms=function(){var r=this.getDefs(!1);if(!r)return[];var n=[];return k(this._tagNames,function(t){for(var e=r.getElementsByTagName(t),i=0;i<e.length;i++)n.push(e[i])}),n},hu.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;k(t,function(t){t[e._markLabel]="0"})},hu.prototype.markDomUsed=function(t){t&&(t[this._markLabel]="1")},hu.prototype.markDomUnused=function(t){t&&(t[this._markLabel]="0")},hu.prototype.isDomUnused=function(t){return t&&"1"!==t[this._markLabel]},hu.prototype.removeUnused=function(){var e=this,i=this.getDefs(!1);i&&k(this.getDoms(),function(t){e.isDomUnused(t)&&i.removeChild(t)})},hu.prototype.getSvgProxy=function(t){return t instanceof fo?ru:t instanceof No?nu:t instanceof Ma?au:ru},hu.prototype.getSvgElement=function(t){return t.__svgEl},hu);function hu(t,e,i,r,n){this.nextId=0,this._domName="_dom",this.createElement=El,this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=r,n&&(this._domName=n)}function lu(t){return"linear"===t.type}function uu(t){return"radial"===t.type}function pu(t){return t&&("linear"===t.type||"radial"===t.type)}var cu,fu=(tt(du,cu=su),du.prototype.addWithoutUpdate=function(a,s){var h;s&&s.style&&(h=this,k(["fill","stroke"],function(t){var e,i,r,n,o=s.style[t];pu(o)&&(e=o,i=h.getDefs(!0),r=void 0,e.__dom?(r=e.__dom,i.contains(e.__dom)||h.addDom(r)):r=h.add(e),h.markUsed(s),n=r.getAttribute("id"),a.setAttribute(t,"url(#"+n+")"))}))},du.prototype.add=function(t){var e;if(lu(t))e=this.createElement("linearGradient");else{if(!uu(t))return g("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},du.prototype.update=function(r){var n;pu(r)&&(n=this).doUpdate(r,function(){var t,e,i=r.__dom;i&&(t=i.tagName,"linear"===(e=r.type)&&"linearGradient"===t||"radial"===e&&"radialGradient"===t?n.updateDom(r,r.__dom):(n.removeDom(r),n.add(r)))})},du.prototype.updateDom=function(t,e){if(lu(t))e.setAttribute("x1",t.x+""),e.setAttribute("y1",t.y+""),e.setAttribute("x2",t.x2+""),e.setAttribute("y2",t.y2+"");else{if(!uu(t))return void g("Illegal gradient type.");e.setAttribute("cx",t.x+""),e.setAttribute("cy",t.y+""),e.setAttribute("r",t.r+"")}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,r=0,n=i.length;r<n;++r){var o=this.createElement("stop");o.setAttribute("offset",100*i[r].offset+"%");var a,s,h=i[r].color;-1<h.indexOf("rgba")?(a=Oe(h)[3],s=Fe(h),o.setAttribute("stop-color","#"+s),o.setAttribute("stop-opacity",a+"")):o.setAttribute("stop-color",i[r].color),e.appendChild(o)}t.__dom=e},du.prototype.markUsed=function(t){var e;t.style&&((e=t.style.fill)&&e.__dom&&cu.prototype.markDomUsed.call(this,e.__dom),(e=t.style.stroke)&&e.__dom&&cu.prototype.markDomUsed.call(this,e.__dom))},du);function du(t,e){return cu.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")||this}var yu=Math.round(9*Math.random());function gu(){this._id="__ec_inner_"+yu++}function vu(t){return t&&(t.image||t.svgElement)}var _u,mu=new(gu.prototype.get=function(t){return this._guard(t)[this._id]},gu.prototype.set=function(t,e){var i=this._guard(t);return"function"==typeof Object.defineProperty?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},gu.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},gu.prototype.has=function(t){return!!this._guard(t)[this._id]},gu.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},gu),xu=(tt(wu,_u=su),wu.prototype.addWithoutUpdate=function(o,a){var s;a&&a.style&&(s=this,k(["fill","stroke"],function(t){var e,i,r,n=a.style[t];vu(n)&&(e=s.getDefs(!0),(i=mu.get(n))?e.contains(i)||s.addDom(i):i=s.add(n),s.markUsed(a),r=i.getAttribute("id"),o.setAttribute(t,"url(#"+r+")"))}))},wu.prototype.add=function(t){if(vu(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},wu.prototype.update=function(e){var i;vu(e)&&(i=this).doUpdate(e,function(){var t=mu.get(e);i.updateDom(e,t)})},wu.prototype.updateDom=function(t,e){var i=t.svgElement;if(i instanceof SVGElement)i.parentNode!==e&&(e.innerHTML="",e.appendChild(i),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var r,n,o,a=void 0,s=e.getElementsByTagName("image");if(s.length){if(!t.image)return void e.removeChild(s[0]);a=s[0]}else t.image&&(a=this.createElement("image"));a&&(r=void 0,"string"==typeof(n=t.image)?r=n:n instanceof HTMLImageElement?r=n.src:n instanceof HTMLCanvasElement&&(r=n.toDataURL()),r&&(a.setAttribute("href",r),a.setAttribute("x","0"),a.setAttribute("y","0"),(o=Rs(r,a,{dirty:function(){}},function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")}))&&o.width&&o.height&&(e.setAttribute("width",o.width+""),e.setAttribute("height",o.height+"")),e.appendChild(a)))}var h="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/Math.PI*180+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")";e.setAttribute("patternTransform",h),mu.set(t,e)},wu.prototype.markUsed=function(t){t.style&&(vu(t.style.fill)&&_u.prototype.markDomUsed.call(this,mu.get(t.style.fill)),vu(t.style.stroke)&&_u.prototype.markDomUsed.call(this,mu.get(t.style.stroke)))},wu);function wu(t,e){return _u.call(this,t,e,["pattern"],"__pattern_in_use__")||this}function bu(t){var e=t.__clipPaths;return e&&0<e.length}var ku,Su=(tt(Tu,ku=su),Tu.prototype.markAllUnused=function(){for(var t in ku.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[t]);this._keyDuplicateCount={}},Tu.prototype._getClipPathGroup=function(t,e){if(bu(t)){var i=t.__clipPaths,r=this._keyDuplicateCount,n=function(t){var e=[];if(t)for(var i=0;i<t.length;i++){var r=t[i];e.push(r.id)}return e.join(",")}(i);return ll(i,e&&e.__clipPaths)&&(r[n]=r[n]||0,r[n]&&(n+="-"+r[n]),r[n]++),this._refGroups[n]||(this._refGroups[n]=this.createElement("g"))}},Tu.prototype.update=function(t,e){var i=this._getClipPathGroup(t,e);return i&&(this.markDomUsed(i),this.updateDom(i,t.__clipPaths)),i},Tu.prototype.updateDom=function(t,e){var i,r,n,o,a;e&&0<e.length?(i=this.getDefs(!0),o=n=void 0,(r=e[0])._dom?(o=r._dom.getAttribute("id"),n=r._dom,i.contains(n)||i.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),i.appendChild(n),r._dom=n),this.getSvgProxy(r).brush(r),a=this.getSvgElement(r),n.innerHTML="",n.appendChild(a),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(n,e.slice(1))):t&&t.setAttribute("clip-path","none")},Tu.prototype.markUsed=function(t){var e=this;t.__clipPaths&&k(t.__clipPaths,function(t){t._dom&&ku.prototype.markDomUsed.call(e,t._dom)})},Tu.prototype.removeUnused=function(){ku.prototype.removeUnused.call(this);var t={};for(var e in this._refGroups){var i=this._refGroups[e];this.isDomUnused(i)?i.parentNode&&i.parentNode.removeChild(i):t[e]=i}this._refGroups=t},Tu);function Tu(t,e){var i=ku.call(this,t,e,"clipPath","__clippath_in_use__")||this;return i._refGroups={},i._keyDuplicateCount={},i}var Cu,Pu=(tt(Au,Cu=su),Au.prototype._getFromPool=function(){var t,e=this._shadowDomPool.pop();return e||((e=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++),t=this.createElement("feDropShadow"),e.appendChild(t),this.addDom(e)),e},Au.prototype.update=function(t,e){var i,r,n,o,a,s,h=e.style;(s=h)&&(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)?(o=(n=e).style,a=n.getGlobalScale(),i=[o.shadowColor,(o.shadowBlur||0).toFixed(2),(o.shadowOffsetX||0).toFixed(2),(o.shadowOffsetY||0).toFixed(2),a[0],a[1]].join(","),(r=e._shadowDom=this._shadowDomMap[i])||(r=this._getFromPool(),this._shadowDomMap[i]=r),this.updateDom(t,e,r)):this.remove(t,e)},Au.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},Au.prototype.updateDom=function(t,e,i){var r,n,o,a,s,h,l=i.children[0],u=e.style,p=e.getGlobalScale(),c=p[0],f=p[1];c&&f&&(r=u.shadowOffsetX||0,n=u.shadowOffsetY||0,o=u.shadowBlur,a=u.shadowColor,l.setAttribute("dx",r/c+""),l.setAttribute("dy",n/f+""),l.setAttribute("flood-color",a),s=o/2/c+" "+o/2/f,l.setAttribute("stdDeviation",s),i.setAttribute("x","-100%"),i.setAttribute("y","-100%"),i.setAttribute("width","300%"),i.setAttribute("height","300%"),h=(e._shadowDom=i).getAttribute("id"),t.style.filter="url(#"+h+")")},Au.prototype.removeUnused=function(){if(this.getDefs(!1)){var t=this._shadowDomPool;for(var e in this._shadowDomMap){var i=this._shadowDomMap[e];t.push(i)}this._shadowDomMap={}}},Au);function Au(t,e){var i=Cu.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")||this;return i._shadowDomMap={},i._shadowDomPool=[],i}function Mu(t){return parseInt(t,10)}function Du(t){return t instanceof fo?ru:t instanceof No?nu:t instanceof Ma?au:ru}function Lu(t,e){return e&&t&&e.parentNode!==t}function zu(t,e,i){var r;Lu(t,e)&&i&&((r=i.nextSibling)?t.insertBefore(e,r):t.appendChild(e))}function Ru(t,e){var i;Lu(t,e)&&((i=t.firstChild)?t.insertBefore(e,i):t.appendChild(e))}function Ou(t){return t.__svgEl}var Iu=(Fu.prototype.getType=function(){return"svg"},Fu.prototype.getViewportRoot=function(){return this._viewport},Fu.prototype.getSvgDom=function(){return this._svgDom},Fu.prototype.getSvgRoot=function(){return this._svgRoot},Fu.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},Fu.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},Fu.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=El("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},Fu.prototype.createSVGElement=El,Fu.prototype.paintOne=function(t){var e=Du(t);return e&&e.brush(t),Ou(t)},Fu.prototype._paintList=function(t){var e=this._gradientManager,i=this._patternManager,r=this._clipPathManager,n=this._shadowManager;e.markAllUnused(),i.markAllUnused(),r.markAllUnused(),n.markAllUnused();for(var o=this._svgRoot,a=this._visibleList,s=t.length,h=[],l=0;l<s;l++){var u=Du(b=t[l]),p=Ou(b);b.invisible||(!b.__dirty&&p||(u&&u.brush(b),(p=Ou(b))&&b.style&&(e.update(b.style.fill),e.update(b.style.stroke),i.update(b.style.fill),i.update(b.style.stroke),n.update(p,b)),b.__dirty=0),p&&h.push(b))}for(var c,f,d,y,g,v,_,m=Hl(a,h),l=0;l<m.length;l++)if((w=m[l]).removed)for(var x=0;x<w.count;x++)p=Ou(b=a[w.indices[x]]),bu(b)?(g=p)&&g.parentNode&&g.parentNode.removeChild(g):(d=o,(y=p)&&d&&y.parentNode===d&&d.removeChild(y));for(var w,l=0;l<m.length;l++)if(!(w=m[l]).removed)for(x=0;x<w.count;x++){var b=h[w.indices[x]],k=r.update(b,v);k!==_&&(c=f,k&&(c?zu(o,k,c):Ru(o,k),f=k,c=null),_=k),p=Ou(b),c?zu(_||o,p,c):Ru(_||o,p),c=p||c,_||(f=c),e.markUsed(b),e.addWithoutUpdate(p,b),i.markUsed(b),i.addWithoutUpdate(p,b),r.markUsed(b),v=b}e.removeUnused(),i.removeUnused(),r.removeUnused(),n.removeUnused(),this._visibleList=h},Fu.prototype.resize=function(t,e){var i=this._viewport;i.style.display="none";var r,n,o=this._opts;null!=t&&(o.width=t),null!=e&&(o.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width===t&&this._height===e||(this._width=t,this._height=e,(r=i.style).width=t+"px",r.height=e+"px",(n=this._svgDom).setAttribute("width",t+""),n.setAttribute("height",e+"")),this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},Fu.prototype.getWidth=function(){return this._width},Fu.prototype.getHeight=function(){return this._height},Fu.prototype._getSize=function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[r]||Mu(s[i])||Mu(a.style[i]))-(Mu(s[n])||0)-(Mu(s[o])||0)|0},Fu.prototype.dispose=function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},Fu.prototype.clear=function(){var t=this._viewport;t&&t.parentNode&&t.parentNode.removeChild(t)},Fu.prototype.toDataURL=function(){this.refresh();var t=this._svgDom,e=t.outerHTML||(t.parentNode&&t.parentNode).innerHTML;return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(e.replace(/></g,">\n\r<"))},Fu);function Fu(t,e,i,r){this.type="svg",this.refreshHover=Bu("refreshHover"),this.pathToImage=Bu("pathToImage"),this.configLayer=Bu("configLayer"),this.root=t,this.storage=e,this._opts=i=m({},i||{});var n=El("svg");n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n.style.cssText="user-select:none;position:absolute;left:0;top:0;";var o=El("g");n.appendChild(o);var a=El("g");n.appendChild(a),this._gradientManager=new fu(r,a),this._patternManager=new xu(r,a),this._clipPathManager=new Su(r,a),this._shadowManager=new Pu(r,a);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=n,this._svgRoot=a,this._backgroundRoot=o,this._viewport=s,t.appendChild(s),s.appendChild(n),this.resize(i.width,i.height),this._visibleList=[]}function Bu(t){return function(){g('In SVG mode painter not support method "'+t+'"')}}Fr("canvas",Fl),Fr("svg",Iu),t.Arc=ah,t.ArcShape=oh,t.BezierCurve=ch,t.BezierCurveShape=lh,t.BoundingRect=or,t.Circle=Yo,t.CircleShape=Uo,t.CompoundPath=Cs,t.Droplet=gh,t.DropletShape=yh,t.Element=kr,t.Ellipse=ea,t.EllipseShape=ta,t.Group=Mr,t.Heart=xh,t.HeartShape=mh,t.Image=No,t.IncrementalDisplayable=Ds,t.Isogon=Ph,t.IsogonShape=Ch,t.Line=aa,t.LineShape=oa,t.LinearGradient=wa,t.OrientedBoundingRect=nl,t.Path=fo,t.Pattern=Jh,t.Point=Zi,t.Polygon=ca,t.PolygonShape=pa,t.Polyline=ga,t.PolylineShape=ya,t.RadialGradient=Sa,t.Rect=Qo,t.RectShape=Zo,t.Ring=Lh,t.RingShape=Dh,t.Rose=Eh,t.RoseShape=Bh,t.Sector=cs,t.SectorShape=ps,t.Star=jh,t.StarShape=Yh,t.TSpan=Ma,t.Text=Zs,t.Trochoid=Qh,t.TrochoidShape=Kh,t.color=We,t.dispose=function(t){t.dispose()},t.disposeAll=function(){for(var t in Rr)Rr.hasOwnProperty(t)&&Rr[t].dispose();Rr={}},t.getInstance=function(t){return Rr[t]},t.init=function(t,e){var i=new Or(y(),t,e);return Rr[i.id]=i},t.matrix=Hi,t.morphPath=function(t,e,i){var r,n;if(!t||!e)return e;t.path||t.createPathProxy(),(r=t.path).beginPath(),t.buildPath(r,t.shape),e.path||e.createPathProxy(),(n=e.path)===r&&(n=new jn(!1)),n.beginPath(),Ss(e)?e.__oldBuildPath(n,e.shape):e.buildPath(n,e.shape);var o=ms(vs(r),vs(n)),a=ws(o[0],o[1],10,Math.PI);!function(t,e,i){if(Ss(t))return ks(t,e,i);var r=t;r.__oldBuildPath=r.buildPath,r.buildPath=bs,ks(r,e,i)}(e,a,0);var s=i&&i.done,h=i&&i.aborted,l=i&&i.during;return e.animateTo({__morphT:1},x({during:function(t){e.dirtyShape(),l&&l(t)},done:function(){var t;Ss(t=e)&&(t.buildPath=t.__oldBuildPath,t.__oldBuildPath=t.__morphingData=null),e.createPathProxy(),e.dirtyShape(),s&&s()},aborted:function(){h&&h()}},i)),e},t.parseSVG=function(t,e){return(new Ia).parse(t,e)},t.path=Fo,t.registerPainter=Fr,t.showDebugDirtyRect=function(t,n){n=n||{};var e=t.painter;if(!e.getLayers)throw new Error("Debug dirty rect can only been used on canvas renderer.");if(e.isSingleCanvas())throw new Error("Debug dirty rect can only been used on zrender inited with container.");var o=document.createElement("div");o.style.cssText="\nposition:absolute;\nleft:0;\ntop:0;\nright:0;\nbottom:0;\npointer-events:none;\n",o.className="ec-debug-dirty-rect-container";var a=[],i=t.dom;i.appendChild(o),"static"===getComputedStyle(i).position&&(i.style.position="relative"),t.on("rendered",function(){if(e.getLayers){var r=0;e.eachBuiltinLayer(function(t){if(t.debugGetPaintRects)for(var e=t.debugGetPaintRects(),i=0;i<e.length;i++)e[i].width&&e[i].height&&(a[r]||(a[r]=new al(n.style),o.appendChild(a[r].dom)),a[r].show(n.autoHideDelay),a[r].update(e[i]),r++)});for(var t=r;t<a.length;t++)a[t].hide()}})},t.util=$,t.vector=vt,t.version="5.1.1",Object.defineProperty(t,"__esModule",{value:!0})});
|