diff --git a/dist/zrender.js b/dist/zrender.js index b8342efbe..582649a83 100644 --- a/dist/zrender.js +++ b/dist/zrender.js @@ -10690,7 +10690,7 @@ var retrieve3$1 = util_1.retrieve3; /** * @type {string} */ - zrender.version = '3.6.2'; + zrender.version = '3.6.3'; /** * Initializing a zrender instance diff --git a/dist/zrender.min.js b/dist/zrender.min.js index 53ded57b2..ac7dc63ac 100644 --- a/dist/zrender.min.js +++ b/dist/zrender.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.zrender=e()}(this,function(){"use strict";function t(e){if(null==e||"object"!=typeof e)return e;var i=e,r=Qe.call(e);if("[object Array]"===r){i=[];for(var n=0,a=e.length;nbi||t<-bi}function _(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,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,this._pausedTime=0,this._paused=!1}function m(t){return(t=Math.round(t))<0?0:t>255?255:t}function y(t){return(t=Math.round(t))<0?0:t>360?360:t}function x(t){return t<0?0:t>1?1:t}function b(t){return m(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function w(t){return x(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function T(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function k(t,e,i){return t+(e-t)*i}function P(t,e,i,r,n){return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function C(t,e){Ii&&S(Ii,e),Ii=Oi.put(t,Ii||e.slice())}function M(t,e){if(t){e=e||[];var i=Oi.get(t);if(i)return S(e,i);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Bi)return S(e,Bi[r]),C(t,e),e;if("#"!==r.charAt(0)){var n=r.indexOf("("),a=r.indexOf(")");if(-1!==n&&a+1===r.length){var o=r.substr(0,n),s=r.substr(n+1,a-(n+1)).split(","),h=1;switch(o){case"rgba":if(4!==s.length)return void P(e,0,0,0,1);h=w(s.pop());case"rgb":return 3!==s.length?void P(e,0,0,0,1):(P(e,b(s[0]),b(s[1]),b(s[2]),h),C(t,e),e);case"hsla":return 4!==s.length?void P(e,0,0,0,1):(s[3]=w(s[3]),L(s,e),C(t,e),e);case"hsl":return 3!==s.length?void P(e,0,0,0,1):(L(s,e),C(t,e),e);default:return}}P(e,0,0,0,1)}else{if(4===r.length)return(l=parseInt(r.substr(1),16))>=0&&l<=4095?(P(e,(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1),C(t,e),e):void P(e,0,0,0,1);if(7===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=16777215?(P(e,(16711680&l)>>16,(65280&l)>>8,255&l,1),C(t,e),e):void P(e,0,0,0,1)}}}}function L(t,e){var i=(parseFloat(t[0])%360+360)%360/360,r=w(t[1]),n=w(t[2]),a=n<=.5?n*(r+1):n+r-n*r,o=2*n-a;return e=e||[],P(e,m(255*T(o,a,i+1/3)),m(255*T(o,a,i)),m(255*T(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function A(t){if(t){var e,i,r=t[0]/255,n=t[1]/255,a=t[2]/255,o=Math.min(r,n,a),s=Math.max(r,n,a),h=s-o,l=(s+o)/2;if(0===h)e=0,i=0;else{i=l<.5?h/(s+o):h/(2-s-o);var u=((s-r)/6+h/2)/h,c=((s-n)/6+h/2)/h,f=((s-a)/6+h/2)/h;r===s?e=f-c:n===s?e=1/3+u-f:a===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,i,l];return null!=t[3]&&d.push(t[3]),d}}function z(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var r=t*(e.length-1),n=Math.floor(r),a=Math.ceil(r),o=e[n],s=e[a],h=r-n;return i[0]=m(k(o[0],s[0],h)),i[1]=m(k(o[1],s[1],h)),i[2]=m(k(o[2],s[2],h)),i[3]=x(k(o[3],s[3],h)),i}}function R(t,e,i){if(e&&e.length&&t>=0&&t<=1){var r=t*(e.length-1),n=Math.floor(r),a=Math.ceil(r),o=M(e[n]),s=M(e[a]),h=r-n,l=E([m(k(o[0],s[0],h)),m(k(o[1],s[1],h)),m(k(o[2],s[2],h)),x(k(o[3],s[3],h))],"rgba");return i?{color:l,leftIndex:n,rightIndex:a,value:r}:l}}function E(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 D(t,e){return t[e]}function B(t,e,i){t[e]=i}function O(t,e,i){return(e-t)*i+t}function I(t,e,i){return i>.5?e:t}function H(t,e,i,r,n){var a=t.length;if(1==n)for(s=0;sn)t.length=n;else for(o=r;o=0&&!(g[i]<=e);i--);i=Math.min(i,l-2)}else{for(i=A;ie);i++);i=Math.min(i-1,l-2)}A=i,z=e;var r=g[i+1]-g[i];if(0!==r)if(P=(e-g[i])/r,h)if(C=_[i],S=_[0===i?i:i-1],M=_[i>l-2?l-1:i+1],L=_[i>l-3?l-1:i+2],f)q(S,C,M,L,P,P*P,P*P*P,o(t,n),v);else{if(d)a=q(S,C,M,L,P,P*P,P*P*P,R,1),a=N(R);else{if(p)return I(C,M,P);a=j(S,C,M,L,P,P*P,P*P*P)}s(t,n,a)}else if(f)H(_[i],_[i+1],P,o(t,n),v);else{var a;if(d)H(_[i],_[i+1],P,R,1),a=N(R);else{if(p)return I(_[i],_[i+1],P);a=O(_[i],_[i+1],P)}s(t,n,a)}},ondestroy:i});return e&&"spline"!==e&&(E.easing=e),E}}}function Y(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}function G(t){for(var e=0;t>=ar;)e|=1&t,t>>=1;return t+e}function Z(t,e,i,r){var n=e+1;if(n===i)return 1;if(r(t[n++],t[e])<0){for(;n=0;)n++;return n-e}function Q(t,e,i){for(i--;e>>1])<0?h=a:s=a+1;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(;l>0;)t[s+l]=t[s+l-1],l--}t[s]=o}}function K(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])>0){for(s=r-n;h0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}else{for(s=n+1;hs&&(h=s);var l=o;o=n-h,h=n-l}for(o++;o>>1);a(t,e[i+u])>0?o=u+1:h=u}return h}function J(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])<0){for(s=n+1;hs&&(h=s);var l=o;o=n-h,h=n-l}else{for(s=r-n;h=0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}for(o++;o>>1);a(t,e[i+u])<0?h=u:o=u+1}return h}function tt(t,e){function i(i){var s=a[i],l=o[i],u=a[i+1],c=o[i+1];o[i]=l+c,i===h-3&&(a[i+1]=a[i+2],o[i+1]=o[i+2]),h--;var f=J(t[u],t,s,l,0,e);s+=f,0!==(l-=f)&&0!==(c=K(t[s+l-1],t,u,c,c-1,e))&&(l<=c?r(s,l,u,c):n(s,l,u,c))}function r(i,r,n,a){var o=0;for(o=0;o=or||d>=or);if(p)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===r){for(o=0;o=0;o--)t[d+o]=t[f+o];if(0===r){_=!0;break}}if(t[c--]=l[u--],1==--a){_=!0;break}if(0!=(g=a-K(t[h],l,0,a,a-1,e))){for(a-=g,d=(c-=g)+1,f=(u-=g)+1,o=0;o=or||g>=or);if(_)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(d=(c-=r)+1,f=(h-=r)+1,o=r-1;o>=0;o--)t[d+o]=t[f+o];t[c]=l[u]}else{if(0===a)throw new Error;for(f=c-(a-1),o=0;o=0;o--)t[d+o]=t[f+o];t[c]=l[u]}else for(f=c-(a-1),o=0;o1;){var t=h-2;if(t>=1&&o[t-1]<=o[t]+o[t+1]||t>=2&&o[t-2]<=o[t]+o[t-1])o[t-1]o[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;h>1;){var t=h-2;t>0&&o[t-1]Ur&&(Xr=0,Nr={}),Xr++,Nr[i]=n,n}function yt(t,e,i,r,n,a){var o=Mt(t,e,n,a),s=mt(t,e);n&&(s+=n[1]+n[3]);var h=o.outerHeight,l=bt(0,s,i),u=wt(0,h,r),c=new ir(l,u,s,h);return c.lineHeight=o.lineHeight,c}function xt(t,e,i,r,n,a,o){var s=Lt(t,{rich:a,truncate:o,font:e,textAlign:i,textPadding:n}),h=s.outerWidth,l=s.outerHeight,u=bt(0,h,i),c=wt(0,l,r);return new ir(u,c,h,l)}function bt(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function wt(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Tt(t,e,i,r,n){if(!e)return"";var a=(t+"").split("\n");n=kt(e,i,r,n);for(var o=0,s=a.length;o=a;s++)o-=a;var h=mt(i);return h>o&&(i="",h=0),o=t-h,r.ellipsis=i,r.ellipsisWidth=h,r.contentWidth=o,r.containerWidth=t,r}function Pt(t,e){var i=e.containerWidth,r=e.font,n=e.contentWidth;if(!i)return"";var a=mt(t,r);if(a<=i)return t;for(var o=0;;o++){if(a<=n||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?St(t,n,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*n/a):0;a=mt(t=t.substr(0,s),r)}return""===t&&(t=e.placeholder),t}function St(t,e,i,r){for(var n=0,a=0,o=t.length;ah)t="",a=[];else if(null!=l)for(var u=kt(l-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),c=0,f=a.length;cn&&At(i,t.substring(n,a)),At(i,r[2],r[1]),n=Yr.lastIndex}nd)return{lines:[],width:0,height:0};L.textWidth=$r.getWidth(L.text,x);var w=m.textWidth,T=null==w||"auto"===w;if("string"==typeof w&&"%"===w.charAt(w.length-1))L.percentWidth=w,l.push(L),w=0;else{if(T){w=L.textWidth;var k=m.textBackgroundColor,P=k&&k.image;P&&(P=Vr.findExistImage(P),Vr.isImageReady(P)&&(w=Math.max(w,P.width*b/P.height)))}var S=y?y[1]+y[3]:0;w+=S;var C=null!=f?f-g:null;null!=C&&C=0&&"right"===(x=w[L]).textAlign;)Ot(t,e,x,r,k,_,M,"right"),P-=x.width,M-=x.width,L--;for(C+=(a-(C-g)-(m-M)-P)/2;S<=L;)Ot(t,e,x=w[S],r,k,_,C+x.width/2,"center"),C+=x.width,S++;_+=k}}function Bt(t,e,i,r,n){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(r=i.width/2+i.x,n=i.height/2+i.y):a&&(r=a[0]+i.x,n=a[1]+i.y),t.translate(r,n),t.rotate(-e.textRotation),t.translate(-r,-n)}}function Ot(t,e,i,r,n,a,o,s){var h=r.rich[i.styleName]||{},l=i.textVerticalAlign,u=a+n/2;"top"===l?u=a+i.height/2:"bottom"===l&&(u=a+n-i.height/2),!i.isLineHolder&&It(h)&&Ht(t,e,h,"right"===s?o-i.width:"center"===s?o-i.width/2:o,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=Vt(o,s,c),u-=i.height/2-c[2]-i.textHeight/2),qt(e,"shadowBlur",tn(h.textShadowBlur,r.textShadowBlur,0)),qt(e,"shadowColor",h.textShadowColor||r.textShadowColor||"transparent"),qt(e,"shadowOffsetX",tn(h.textShadowOffsetX,r.textShadowOffsetX,0)),qt(e,"shadowOffsetY",tn(h.textShadowOffsetY,r.textShadowOffsetY,0)),qt(e,"textAlign",s),qt(e,"textBaseline","middle"),qt(e,"font",i.font||Kr.DEFAULT_FONT);var f=on(h.textStroke||r.textStroke,p),d=sn(h.textFill||r.textFill),p=en(h.textStrokeWidth,r.textStrokeWidth);f&&(qt(e,"lineWidth",p),qt(e,"strokeStyle",f),e.strokeText(i.text,o,u)),d&&(qt(e,"fillStyle",d),e.fillText(i.text,o,u))}function It(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ht(t,e,i,r,n,a,o){var s=i.textBackgroundColor,h=i.textBorderWidth,l=i.textBorderColor,u=ai.isString(s);if(qt(e,"shadowBlur",i.textBoxShadowBlur||0),qt(e,"shadowColor",i.textBoxShadowColor||"transparent"),qt(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),qt(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||h&&l){e.beginPath();var c=i.textBorderRadius;c?Jr.buildPath(e,{x:r,y:n,width:a,height:o,r:c}):e.rect(r,n,a,o),e.closePath()}if(u)qt(e,"fillStyle",s),e.fill();else if(ai.isObject(s)){var f=s.image;(f=Vr.createOrUpdateImage(f,null,t,Ft,s))&&Vr.isImageReady(f)&&e.drawImage(f,r,n,a,o)}h&&l&&(qt(e,"lineWidth",h),qt(e,"strokeStyle",l),e.stroke())}function Ft(t,e){e.image=t}function Wt(t,e,i){var r=e.x||0,n=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)r=i.x+jt(s[0],i.width),n=i.y+jt(s[1],i.height);else{var h=Kr.adjustTextPositionOnRect(s,i,e.textDistance);r=h.x,n=h.y,a=a||h.textAlign,o=o||h.textVerticalAlign}var l=e.textOffset;l&&(r+=l[0],n+=l[1])}return{baseX:r,baseY:n,textAlign:a,textVerticalAlign:o}}function qt(t,e,i){return t[e]=i,t[e]}function jt(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Vt(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Nt(t){t=t||{},Ki.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Br(t.style,this),this._rect=null,this.__clipPaths=[]}function Xt(t){fn.call(this,t)}function Ut(t){return parseInt(t,10)}function Yt(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function Gt(t){t.__unusedCount++}function Zt(t){1==t.__unusedCount&&t.clear()}function Qt(t,e,i){return pn.copy(t.getBoundingRect()),t.transform&&pn.applyTransform(t.transform),vn.width=e,vn.height=i,!pn.intersect(vn)}function $t(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i-Mn&&tMn||t<-Mn}function re(t,e,i,r,n){var a=1-n;return a*a*(a*t+3*n*e)+n*n*(n*r+3*a*i)}function ne(t,e,i,r){var n=1-r;return n*(n*t+2*r*e)+r*r*i}function ae(t,e){return Math.abs(t-e)e&&l>r&&l>a&&l>s||l1&&oe(),c=Bn.cubicAt(e,r,a,s,ka[0]),p>1&&(f=Bn.cubicAt(e,r,a,s,ka[1]))),2==p?ge&&s>r&&s>a||s=0&&l<=1){for(var u=0,c=Bn.quadraticAt(e,r,a,l),f=0;fi||s<-i)return 0;l=Math.sqrt(i*i-s*s);Ta[0]=-l,Ta[1]=l;var h=Math.abs(r-n);if(h<1e-4)return 0;if(h%ba<1e-4){r=0,n=ba;p=a?1:-1;return o>=Ta[0]+t&&o<=Ta[1]+t?p:0}if(a){var l=r;r=ya(n),n=ya(l)}else r=ya(r),n=ya(n);r>n&&(n+=ba);for(var u=0,c=0;c<2;c++){var f=Ta[c];if(f+t>o){var d=Math.atan2(s,f),p=a?1:-1;d<0&&(d=ba+d),(d>=r&&d<=n||d+ba>=r&&d+ba<=n)&&(d>Math.PI/2&&d<1.5*Math.PI&&(p=-p),u+=p)}}return u}function ue(t,e,i,r,n){for(var a=0,o=0,s=0,h=0,l=0,u=0;u1&&(i||(a+=_a(o,s,h,l,r,n))),1==u&&(h=o=t[u],l=s=t[u+1]),c){case ma.M:o=h=t[u++],s=l=t[u++];break;case ma.L:if(i){if(xa(o,s,t[u],t[u+1],e,r,n))return!0}else a+=_a(o,s,t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case ma.C:if(i){if(ua.containStroke(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=se(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case ma.Q:if(i){if(ca.containStroke(o,s,t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=he(o,s,t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case ma.A:var f=t[u++],d=t[u++],p=t[u++],v=t[u++],g=t[u++],_=t[u++],m=(t[u++],1-t[u++]),y=Math.cos(g)*p+f,x=Math.sin(g)*v+d;u>1?a+=_a(o,s,y,x,r,n):(h=y,l=x);var b=(r-f)*v/p+f;if(i){if(ga.containStroke(f,d,v,g,g+_,m,e,b,n))return!0}else a+=le(f,d,v,g,g+_,m,b,n);o=Math.cos(g+_)*p+f,s=Math.sin(g+_)*v+d;break;case ma.R:h=o=t[u++],l=s=t[u++];var y=h+t[u++],x=l+t[u++];if(i){if(xa(h,l,y,l,e,r,n)||xa(y,l,y,x,e,r,n)||xa(y,x,h,x,e,r,n)||xa(h,x,h,l,e,r,n))return!0}else a+=_a(y,l,y,x,r,n),a+=_a(h,x,h,l,r,n);break;case ma.Z:if(i){if(xa(o,s,h,l,e,r,n))return!0}else a+=_a(o,s,h,l,r,n);o=h,s=l}}return i||ae(s,l)||(a+=_a(o,s,h,l,r,n)||0),0!==a}function ce(t){fn.call(this,t),this.path=null}function fe(t,e,i){var r=t.cpx2,n=t.cpy2;return null===r||null===n?[(i?Fa:Ia)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Fa:Ia)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Ha:Oa)(t.x1,t.cpx1,t.x2,e),(i?Ha:Oa)(t.y1,t.cpy1,t.y2,e)]}function de(t,e,i,r,n,a,o){var s=.5*(i-t),h=.5*(r-e);return(2*(e-i)+s+h)*o+(-3*(e-i)-2*s-h)*a+s*n+e}function pe(t,e,i,r,n,a,o,s,h,l,u){var c=h*(Fo/180),f=Ho(c)*(t-i)/2+Io(c)*(e-r)/2,d=-1*Io(c)*(t-i)/2+Ho(c)*(e-r)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=Oo(p),s*=Oo(p));var v=(n===a?-1:1)*Oo((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,g=v*o*d/s,_=v*-s*f/o,m=(t+i)/2+Ho(c)*g-Io(c)*_,y=(e+r)/2+Io(c)*g+Ho(c)*_,x=jo([1,0],[(f-g)/o,(d-_)/s]),b=[(f-g)/o,(d-_)/s],w=[(-1*f-g)/o,(-1*d-_)/s],T=jo(b,w);qo(b,w)<=-1&&(T=Fo),qo(b,w)>=1&&(T=0),0===a&&T>0&&(T-=2*Fo),1===a&&T<0&&(T+=2*Fo),u.addData(l,m,y,o,s,x,T,c,a)}function ve(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===d[0]&&d.shift();for(var p=0;p-es}function ye(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Go}function xe(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Go}function be(t,e){e&&we(t,"transform","matrix("+Yo.call(e,",")+")")}function we(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function Te(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function ke(t,e,i){if(ye(e,i)){var r=i?e.textFill:e.fill;r="transparent"===r?Go:r,"none"!==t.getAttribute("clip-path")&&r===Go&&(r="rgba(0, 0, 0, 0.002)"),we(t,"fill",r),we(t,"fill-opacity",e.opacity)}else we(t,"fill",Go);if(xe(e,i)){var n=i?e.textStroke:e.stroke;we(t,"stroke",n="transparent"===n?Go:n),we(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(e.strokeNoScale?e.host.getLineScale():1)),we(t,"paint-order","stroke"),we(t,"stroke-opacity",e.opacity),e.lineDash?(we(t,"stroke-dasharray",e.lineDash.join(",")),we(t,"stroke-dashoffset",Zo(e.lineDashOffset||0))):we(t,"stroke-dasharray",""),e.lineCap&&we(t,"stroke-linecap",e.lineCap),e.lineJoin&&we(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&we(t,"stroke-miterlimit",e.miterLimit)}else we(t,"stroke",Go)}function Pe(t){for(var e=[],i=0;i=Jo||!me(d)&&(u>-Ko&&u<0||u>Ko)==!!f;var g=_e(a+s*$o(l)),_=_e(o+h*Qo(l));p&&(u=f?Jo-1e-4:1e-4-Jo,v=!0,9===i&&e.push("M",g,_));var m=_e(a+s*$o(l+u)),y=_e(o+h*Qo(l+u));e.push("A",_e(s),_e(h),Zo(c*ts),+v,+f,m,y);break;case Xo.Z:r="Z";break;case Xo.R:var m=_e(t[i++]),y=_e(t[i++]),x=_e(t[i++]),b=_e(t[i++]);e.push("M",m,y,"L",m+x,y,"L",m+x,y+b,"L",m,y+b,"L",m,y)}r&&e.push(r);for(var w=0;w=11)}}(navigator.userAgent),Ge={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Ze={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Qe=Object.prototype.toString,$e=Array.prototype,Ke=$e.forEach,Je=$e.filter,ti=$e.slice,ei=$e.map,ii=$e.reduce,ri="__ec_primitive__";u.prototype={constructor:u,get:function(t){return this["_ec_"+t]},set:function(t,e){return this["_ec_"+t]=e,e},each:function(t,e){void 0!==e&&(t=n(t,e));for(var i in this)this.hasOwnProperty(i)&&t(this[i],i.slice(4))},removeKey:function(t){delete this["_ec_"+t]}};var ni={inherits:function(t,e){function i(){}var r=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var n in r)t.prototype[n]=r[n];t.prototype.constructor=t,t.superClass=e},mixin:function(t,e,r){i(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,r)},clone:t,merge:e,mergeAll:function(t,i){for(var r=t[0],n=1,a=t.length;n3&&(e=ui.call(e,1));for(var r=this._$handlers[t],n=r.length,a=0;a4&&(e=ui.call(e,1,e.length-1));for(var r=e[e.length-1],n=this._$handlers[t],a=n.length,o=0;o=0;a--){var o;if(r[a]!==i&&!r[a].ignore&&(o=v(r[a],t,e))&&(!n.topTarget&&(n.topTarget=r[a]),o!==di)){n.target=r[a];break}}return n}},ai.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){vi.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),r=i.target;if("mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mosueup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||hi.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),ai.mixin(vi,fi),ai.mixin(vi,li);var gi=vi,_i="undefined"==typeof Float32Array?Array:Float32Array,mi={create:function(){var t=new _i(6);return mi.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(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},mul:function(t,e,i){var r=e[0]*i[0]+e[2]*i[1],n=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=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]=a,t[3]=o,t[4]=s,t[5]=h,t},translate:function(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},rotate:function(t,e,i){var r=e[0],n=e[2],a=e[4],o=e[1],s=e[3],h=e[5],l=Math.sin(i),u=Math.cos(i);return t[0]=r*u+o*l,t[1]=-r*l+o*u,t[2]=n*u+s*l,t[3]=-n*l+u*s,t[4]=u*a+l*h,t[5]=u*h-l*a,t},scale:function(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},invert:function(t,e){var i=e[0],r=e[2],n=e[4],a=e[1],o=e[3],s=e[5],h=i*o-a*r;return h?(h=1/h,t[0]=o*h,t[1]=-a*h,t[2]=-r*h,t[3]=i*h,t[4]=(r*s-o*n)*h,t[5]=(a*n-i*s)*h,t):null}},yi=mi,xi=yi.identity,bi=5e-5,wi=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Ti=wi.prototype;Ti.transform=null,Ti.needLocalTransform=function(){return g(this.rotation)||g(this.position[0])||g(this.position[1])||g(this.scale[0]-1)||g(this.scale[1]-1)},Ti.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),r=this.transform;i||e?(r=r||yi.create(),i?this.getLocalTransform(r):xi(r),e&&(i?yi.mul(r,t.transform,r):yi.copy(r,t.transform)),this.transform=r,this.invTransform=this.invTransform||yi.create(),yi.invert(this.invTransform,r)):r&&xi(r)},Ti.getLocalTransform=function(t){return wi.getLocalTransform(this,t)},Ti.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Ti.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var ki=[];Ti.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(yi.mul(ki,t.invTransform,e),e=ki);var i=e[0]*e[0]+e[1]*e[1],r=e[2]*e[2]+e[3]*e[3],n=this.position,a=this.scale;g(i-1)&&(i=Math.sqrt(i)),g(r-1)&&(r=Math.sqrt(r)),e[0]<0&&(i=-i),e[3]<0&&(r=-r),n[0]=e[4],n[1]=e[5],a[0]=i,a[1]=r,this.rotation=Math.atan2(-e[1]/r,e[0]/i)}},Ti.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},Ti.transformCoordToLocal=function(t,e){var i=[t,e],r=this.invTransform;return r&&hi.applyTransform(i,i,r),i},Ti.transformCoordToGlobal=function(t,e){var i=[t,e],r=this.transform;return r&&hi.applyTransform(i,i,r),i},wi.getLocalTransform=function(t,e){xi(e=e||[]);var i=t.origin,r=t.scale||[1,1],n=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),yi.scale(e,e,r),n&&yi.rotate(e,e,n),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var Pi=wi,Si={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:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.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:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Si.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*Si.bounceIn(2*t):.5*Si.bounceOut(2*t-1)+.5}},Ci=Si;_.prototype={constructor:_,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var r=this.easing,n="string"==typeof r?Ci[r]:r,a="function"==typeof n?n(i):i;return this.fire("frame",a),1==i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Mi=_,Li=function(){this.head=null,this.tail=null,this._len=0},Ai=Li.prototype;Ai.insert=function(t){var e=new zi(t);return this.insertEntry(e),e},Ai.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ai.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--},Ai.len=function(){return this._len},Ai.clear=function(){this.head=this.tail=null,this._len=0};var zi=function(t){this.value=t,this.next,this.prev},Ri=function(t){this._list=new Li,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Ei=Ri.prototype;Ei.put=function(t,e){var i=this._list,r=this._map,n=null;if(null==r[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete r[s.key],n=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new zi(e),o.key=t,i.insertEntry(o),r[t]=o}return n},Ei.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},Ei.clear=function(){this._list.clear(),this._map={}};var Di=Ri,Bi={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]},Oi=new Di(20),Ii=null,Hi={parse:M,lift:function(t,e){var i=M(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;return E(i,4===i.length?"rgba":"rgb")}},toHex:function(t,e){var i=M(t);if(i)return((1<<24)+(i[0]<<16)+(i[1]<<8)+ +i[2]).toString(16).slice(1)},fastLerp:z,fastMapToColor:z,lerp:R,mapToColor:R,modifyHSL:function(t,e,i,r){if(t=M(t))return t=A(t),null!=e&&(t[0]=y(e)),null!=i&&(t[1]=w(i)),null!=r&&(t[2]=w(r)),E(L(t),"rgba")},modifyAlpha:function(t,e){if((t=M(t))&&null!=e)return t[3]=x(e),E(t,"rgba")},stringify:E},Fi=ai.isArrayLike,Wi=Array.prototype.slice,qi=function(t,e,i,r){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||D,this._setter=r||B,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};qi.prototype={when:function(t,e){var i=this._tracks;for(var r in e)if(e.hasOwnProperty(r)){if(!i[r]){i[r]=[];var n=this._getter(this._target,r);if(null==n)continue;0!==t&&i[r].push({time:0,value:V(n)})}i[r].push({time:t,value:e[r]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t1)for(var t in arguments)console.log(arguments[t])},Ui=ai.isString,Yi=ai.isFunction,Gi=ai.isObject,Zi=function(){this.animators=[]};Zi.prototype={constructor:Zi,animate:function(t,e){var i,r=!1,n=this,a=this.__zr;if(t){var o=t.split("."),s=n;r="shape"===o[0];for(var h=0,l=o.length;h0&&this.animate(t,!1).when(null==r?500:r,a).delay(n||0),this}};var Qi=Zi,$i=function(t){Pi.call(this,t),fi.call(this,t),Qi.call(this,t),this.id=t.id||Xe()};$i.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(ai.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Y(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Y.create=function(t){return new Y(t.x,t.y,t.width,t.height)};var ir=Y,rr=function(t){t=t||{},Ki.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};rr.prototype={constructor:rr,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(r,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof rr&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,n=ai.indexOf(r,t);return n<0?this:(r.splice(n,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof rr&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,r=this.__storage;for(e=0;es&&(h=s),$(t,i,i+h,i+a,e),a=h}o.pushRun(i,a),o.mergeRuns(),n-=a,i+=a}while(0!==n);o.forceMergeRuns()}},hr=function(){this._roots=[],this._displayList=[],this._displayListLen=0};hr.prototype={constructor:hr,traverse:function(t,e){for(var i=0;i=0&&(this.delFromStorage(t),this._roots.splice(n,1),t instanceof nr&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t.__storage=this,t.dirty(!1),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:et};var lr=hr,ur="undefined"!=typeof window&&!!window.addEventListener,cr=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fr={clientToLocal:rt,normalizeEvent:function(t,e,i){if(null!=(e=e||window.event).zrX)return e;var r=e.type;if(r&&r.indexOf("touch")>=0){var n="touchend"!=r?e.targetTouches[0]:e.changedTouches[0];n&&rt(t,n,e,i)}else rt(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&cr.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e},addEventListener:function(t,e,i){ur?t.addEventListener(e,i):t.attachEvent("on"+e,i)},removeEventListener:function(t,e,i){ur?t.removeEventListener(e,i):t.detachEvent("on"+e,i)},notLeftMouse:function(t){return t.which>1},stop:ur?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Dispatcher:fi},dr="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},pr=fr.Dispatcher,vr=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,pr.call(this)};vr.prototype={constructor:vr,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i1&&r&&r.length>1){var a=at(r)/at(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=ot(r);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},yr=_r,xr=fr.addEventListener,br=fr.removeEventListener,wr=fr.normalizeEvent,Tr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],kr=["touchstart","touchend","touchmove"],Pr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Sr=ai.map(Tr,function(t){var e=t.replace("mouse","pointer");return Pr[e]?e:t}),Cr={mousemove:function(t){t=wr(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=wr(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=wr(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,ht(this,t,"start"),Cr.mousemove.call(this,t),Cr.mousedown.call(this,t),lt(this)},touchmove:function(t){(t=wr(this.dom,t)).zrByTouch=!0,ht(this,t,"change"),Cr.mousemove.call(this,t),lt(this)},touchend:function(t){(t=wr(this.dom,t)).zrByTouch=!0,ht(this,t,"end"),Cr.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Cr.click.call(this,t),lt(this)},pointerdown:function(t){Cr.mousedown.call(this,t)},pointermove:function(t){ut(t)||Cr.mousemove.call(this,t)},pointerup:function(t){Cr.mouseup.call(this,t)},pointerout:function(t){ut(t)||Cr.mouseout.call(this,t)}};ai.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Cr[t]=function(e){e=wr(this.dom,e),this.trigger(t,e)}});var Mr=ft.prototype;Mr.dispose=function(){for(var t=Tr.concat(kr),e=0;e0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var r=("radial"===e.type?pt:dt)(t,e,i),n=e.colorStops,a=0;ah&&(i*=h/(c=i+r),r*=h/c),n+a>h&&(n*=h/(c=n+a),a*=h/c),r+n>l&&(r*=l/(c=r+n),n*=l/c),i+a>l&&(i*=l/(c=i+a),a*=l/c),t.moveTo(o+i,s),t.lineTo(o+h-r,s),0!==r&&t.quadraticCurveTo(o+h,s,o+h,s+r),t.lineTo(o+h,s+l-n),0!==n&&t.quadraticCurveTo(o+h,s+l,o+h-n,s+l),t.lineTo(o+a,s+l),0!==a&&t.quadraticCurveTo(o,s+l,o,s+l-a),t.lineTo(o,s+i),0!==i&&t.quadraticCurveTo(o,s,o+i,s)}},tn=ai.retrieve3,en=ai.retrieve2,rn={left:1,right:1,center:1},nn={top:1,bottom:1,middle:1},an={};an.normalizeTextStyle=function(t){return zt(t),ai.each(t.rich,zt),t},an.renderText=function(t,e,i,r,n){r.rich?Et(t,e,i,r,n):Rt(t,e,i,r,n)};var on=an.getStroke=function(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t},sn=an.getFill=function(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t};an.needDrawText=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)};var hn=an,ln=new ir,un=function(){};un.prototype={constructor:un,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&hn.normalizeTextStyle(i,!0);var r=i.text;if(null!=r&&(r+=""),hn.needDrawText(r,i)){t.save();var n=this.transform;i.transformText?this.setTransform(t):n&&(ln.copy(e),ln.applyTransform(n),e=ln),hn.renderText(this,t,r,i,e),t.restore()}}};var cn=un;Nt.prototype={constructor:Nt,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Ki.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Br(t,this),this.dirty(!1),this}},ai.inherits(Nt,Ki),ai.mixin(Nt,cn);var fn=Nt;Xt.prototype={constructor:Xt,type:"image",brush:function(t,e){var i=this.style,r=i.image;i.bind(t,this,e);var n=this._image=Vr.createOrUpdateImage(r,this._image,this);if(n&&Vr.isImageReady(n)){var a=i.x||0,o=i.y||0,s=i.width,h=i.height,l=n.width/n.height;if(null==s&&null!=h?s=h*l:null==h&&null!=s?h=s/l:null==s&&null==h&&(s=n.width,h=n.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(n,u,c,i.sWidth,i.sHeight,a,o,s,h)}else if(i.sx&&i.sy){var f=s-(u=i.sx),d=h-(c=i.sy);t.drawImage(n,u,c,f,d,a,o,s,h)}else t.drawImage(n,a,o,s,h);this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new ir(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},ai.inherits(Xt,fn);var dn=Xt,pn=new ir(0,0,0,0),vn=new ir(0,0,0,0),gn=function(t,e,i){this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=ai.extend({},i||{}),this.dpr=i.devicePixelRatio||Ni.devicePixelRatio,this._singleCanvas=r,this.root=t;var n=t.style;n&&(n["-webkit-tap-highlight-color"]="transparent",n["-webkit-user-select"]=n["user-select"]=n["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},r){null!=i.width&&(t.width=i.width),null!=i.height&&(t.height=i.height);var s=t.width,h=t.height;this._width=s,this._height=h;var l=new Fr(t,this,1);l.initContext(),o[0]=l,a.push(0),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var u=this._domRoot=Jt(this._width,this._height);t.appendChild(u)}this._progressiveLayers=[],this._hoverlayer,this._hoverElements=[]};gn.prototype={constructor:gn,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._paintList(e,t);for(var r=0;r=0&&i.splice(r,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i=0){if(!s){if((s=this._progressiveLayers[Math.min(l++,4)]).ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){d=s.__nextIdxNotProg-1;continue}h=s.__progress,s.__dirty||(f=h),s.__progress=f+1}_===f&&this._doPaintEl(v,s,!0,s.renderScope)}else this._doPaintEl(v,r,e,o);v.__dirty=!1}}s&&i(s),a&&a.restore(),this._furtherProgressive=!1,ai.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,r){var n=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!Qt(t,this._width,this._height))){var o=t.__clipPaths;(r.prevClipLayer!==e||$t(o,r.prevElClipPaths))&&(r.prevElClipPaths&&(r.prevClipLayer.ctx.restore(),r.prevClipLayer=r.prevElClipPaths=null,r.prevEl=null),o&&(n.save(),Kt(o,n),r.prevClipLayer=e,r.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(n),t.brush(n,r.prevEl||null),r.prevEl=t,t.afterBrush&&t.afterBrush(n)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||((e=new Fr("zr_"+t,this,this.dpr)).__builtin__=!0,this._layerConfig[t]&&ai.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,r=this._zlevelList,n=r.length,a=null,o=-1,s=this._domRoot;if(i[t])Xi("ZLevel "+t+" has been used already");else if(Yt(e)){if(n>0&&t>r[0]){for(o=0;ot);o++);a=i[r[o]]}if(r.splice(o+1,0,t),i[t]=e,!e.virtual)if(a){var h=a.dom;h.nextSibling?s.insertBefore(e.dom,h.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Xi("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,r,n=this._zlevelList;for(r=0;r=0){o!==d&&(o=d,h++);var p=c.__frame=h-1;if(!a){var v=Math.min(s,4);(a=i[v])||(a=i[v]=new Fr("progressive",this,this.dpr)).initContext(),a.__maxProgress=0}a.__dirty=a.__dirty||c.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,p),a.__maxProgress>=a.__progress&&(f.__dirty=!0)}else c.__frame=-1,a&&(a.__nextIdxNotProg=l,s++,a=null)}a&&(s++,a.__nextIdxNotProg=l),this.eachBuiltinLayer(function(t,e){r[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,5),ai.each(i,function(t,e){n[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?ai.merge(i[t],e,!0):i[t]=e;var r=this._layers[t];r&&ai.merge(r,i[t],!0)}},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(ai.indexOf(i,t),1))},resize:function(t,e){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){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers.hasOwnProperty(n)&&this._layers[n].resize(t,e);ai.each(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){function e(t,e){var r=o._zlevelList;null==t&&(t=-1/0);for(var n,a=0;at&&s=0&&k<=1&&(a[d++]=k);else{var p=c*c-4*u*f;if(ee(p)){var v=c/u,g=-v/2;(k=-s/o+v)>=0&&k<=1&&(a[d++]=k),g>=0&&g<=1&&(a[d++]=g)}else if(p>0){var _=Cn(p),m=u*s+1.5*o*(-c+_),y=u*s+1.5*o*(-c-_);(k=(-s-((m=m<0?-Sn(-m,zn):Sn(m,zn))+(y=y<0?-Sn(-y,zn):Sn(y,zn))))/(3*o))>=0&&k<=1&&(a[d++]=k)}else{var x=(2*u*s-3*o*c)/(2*Cn(u*u*u)),b=Math.acos(x)/3,w=Cn(u),T=Math.cos(b),k=(-s-2*w*T)/(3*o),g=(-s+w*(T+An*Math.sin(b)))/(3*o),P=(-s+w*(T-An*Math.sin(b)))/(3*o);k>=0&&k<=1&&(a[d++]=k),g>=0&&g<=1&&(a[d++]=g),P>=0&&P<=1&&(a[d++]=P)}}return d},cubicExtrema:function(t,e,i,r,n){var a=6*i-12*e+6*t,o=9*e+3*r-3*t-9*i,s=3*e-3*t,h=0;if(ee(o))ie(a)&&(c=-s/a)>=0&&c<=1&&(n[h++]=c);else{var l=a*a-4*o*s;if(ee(l))n[0]=-a/(2*o);else if(l>0){var u=Cn(l),c=(-a+u)/(2*o),f=(-a-u)/(2*o);c>=0&&c<=1&&(n[h++]=c),f>=0&&f<=1&&(n[h++]=f)}}return h},cubicSubdivide:function(t,e,i,r,n,a){var o=(e-t)*n+t,s=(i-e)*n+e,h=(r-i)*n+i,l=(s-o)*n+o,u=(h-s)*n+s,c=(u-l)*n+l;a[0]=t,a[1]=o,a[2]=l,a[3]=c,a[4]=c,a[5]=u,a[6]=h,a[7]=r},cubicProjectPoint:function(t,e,i,r,n,a,o,s,h,l,u){var c,f,d,p,v,g=.005,_=1/0;Rn[0]=h,Rn[1]=l;for(var m=0;m<1;m+=.05)En[0]=re(t,i,n,o,m),En[1]=re(e,r,a,s,m),(p=Pn(Rn,En))<_&&(c=m,_=p);_=1/0;for(var y=0;y<32&&!(g=0&&p<_?(c=f,_=p):(Dn[0]=re(t,i,n,o,d),Dn[1]=re(e,r,a,s,d),v=Pn(Dn,Rn),d<=1&&v<_?(c=d,_=v):g*=.5);return u&&(u[0]=re(t,i,n,o,c),u[1]=re(e,r,a,s,c)),Cn(_)},quadraticAt:ne,quadraticDerivativeAt:function(t,e,i,r){return 2*((1-r)*(e-t)+r*(i-e))},quadraticRootAt:function(t,e,i,r,n){var a=t-2*e+i,o=2*(e-t),s=t-r,h=0;if(ee(a))ie(o)&&(c=-s/o)>=0&&c<=1&&(n[h++]=c);else{var l=o*o-4*a*s;if(ee(l))(c=-o/(2*a))>=0&&c<=1&&(n[h++]=c);else if(l>0){var u=Cn(l),c=(-o+u)/(2*a),f=(-o-u)/(2*a);c>=0&&c<=1&&(n[h++]=c),f>=0&&f<=1&&(n[h++]=f)}}return h},quadraticExtremum:function(t,e,i){var r=t+i-2*e;return 0===r?.5:(t-e)/r},quadraticSubdivide:function(t,e,i,r,n){var a=(e-t)*r+t,o=(i-e)*r+e,s=(o-a)*r+a;n[0]=t,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=i},quadraticProjectPoint:function(t,e,i,r,n,a,o,s,h){var l,u=.005,c=1/0;Rn[0]=o,Rn[1]=s;for(var f=0;f<1;f+=.05)En[0]=ne(t,i,n,f),En[1]=ne(e,r,a,f),(g=Pn(Rn,En))=0&&g1e-4)return s[0]=t-i,s[1]=e-r,h[0]=t+i,void(h[1]=e+r);if(qn[0]=Wn(n)*i+t,qn[1]=Fn(n)*r+e,jn[0]=Wn(a)*i+t,jn[1]=Fn(a)*r+e,l(s,qn,jn),u(h,qn,jn),(n%=Nn)<0&&(n+=Nn),(a%=Nn)<0&&(a+=Nn),n>a&&!o?a+=Nn:nn&&(Vn[0]=Wn(d)*i+t,Vn[1]=Fn(d)*r+e,l(s,Vn,s),u(h,Vn,h))};var Yn=On,Gn=Ni.devicePixelRatio,Zn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qn=[],$n=[],Kn=[],Jn=[],ta=Math.min,ea=Math.max,ia=Math.cos,ra=Math.sin,na=Math.sqrt,aa=Math.abs,oa="undefined"!=typeof Float32Array,sa=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};sa.prototype={constructor:sa,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=aa(1/Gn/t)||0,this._uy=aa(1/Gn/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Zn.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=aa(t-this._xi)>this._ux||aa(e-this._yi)>this._uy||this._len<5;return this.addData(Zn.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,r,n,a){return this.addData(Zn.C,t,e,i,r,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,r,n,a):this._ctx.bezierCurveTo(t,e,i,r,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(t,e,i,r){return this.addData(Zn.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},arc:function(t,e,i,r,n,a){return this.addData(Zn.A,t,e,i,i,r,n-r,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,r,n,a),this._xi=ia(n)*i+t,this._yi=ra(n)*i+t,this},arcTo:function(t,e,i,r,n){return this._ctx&&this._ctx.arcTo(t,e,i,r,n),this},rect:function(t,e,i,r){return this._ctx&&this._ctx.rect(t,e,i,r),this.addData(Zn.R,t,e,i,r),this},closePath:function(){this.addData(Zn.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},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&d<=t||u<0&&d>=t||0==u&&(c>0&&p<=e||c<0&&p>=e);)d+=u*(i=o[r=this._dashIdx]),p+=c*i,this._dashIdx=(r+1)%v,u>0&&dh||c>0&&pl||s[r%2?"moveTo":"lineTo"](u>=0?ta(d,t):ea(d,t),c>=0?ta(p,e):ea(p,e));u=d-t,c=p-e,this._dashOffset=-na(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,n,a){var o,s,h,l,u,c=this._dashSum,f=this._dashOffset,d=this._lineDash,p=this._ctx,v=this._xi,g=this._yi,_=Bn.cubicAt,m=0,y=this._dashIdx,x=d.length,b=0;for(f<0&&(f=c+f),f%=c,o=0;o<1;o+=.1)s=_(v,t,i,n,o+.1)-_(v,t,i,n,o),h=_(g,e,r,a,o+.1)-_(g,e,r,a,o),m+=na(s*s+h*h);for(;yf);y++);for(o=(b-f)/m;o<=1;)l=_(v,t,i,n,o),u=_(g,e,r,a,o),y%2?p.moveTo(l,u):p.lineTo(l,u),o+=d[y]/m,y=(y+1)%x;y%2!=0&&p.lineTo(n,a),s=n-l,h=a-u,this._dashOffset=-na(s*s+h*h)},_dashedQuadraticTo:function(t,e,i,r){var n=i,a=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,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,oa&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Qn[0]=Qn[1]=Kn[0]=Kn[1]=Number.MAX_VALUE,$n[0]=$n[1]=Jn[0]=Jn[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,r=0,n=0,a=0;ah||aa(o-n)>l||c===u-1)&&(t.lineTo(a,o),r=a,n=o);break;case Zn.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case Zn.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case Zn.A:var d=s[c++],p=s[c++],v=s[c++],g=s[c++],_=s[c++],m=s[c++],y=s[c++],x=s[c++],b=v>g?v:g,w=v>g?1:v/g,T=v>g?g/v:1,k=_+m;Math.abs(v-g)>.001?(t.translate(d,p),t.rotate(y),t.scale(w,T),t.arc(0,0,b,_,k,1-x),t.scale(1/w,1/T),t.rotate(-y),t.translate(-d,-p)):t.arc(d,p,b,_,k,1-x),1==c&&(e=ia(_)*v+d,i=ra(_)*g+p),r=ia(k)*v+d,n=ra(k)*g+p;break;case Zn.R:e=r=s[c],i=n=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Zn.Z:t.closePath(),r=e,n=i}}}},sa.CMD=Zn;var ha=sa,la={containStroke:function(t,e,i,r,n,a,o){if(0===n)return!1;var s=n,h=0,l=t;if(o>e+s&&o>r+s||ot+s&&a>i+s||ae+c&&u>r+c&&u>a+c&&u>s+c||ut+c&&l>i+c&&l>n+c&&l>o+c||le+l&&h>r+l&&h>a+l||ht+l&&s>i+l&&s>n+l||si||u+ln&&(n+=va);var f=Math.atan2(h,s);return f<0&&(f+=va),f>=r&&f<=n||f+va>=r&&f+va<=n}},_a=function(t,e,i,r,n,a){if(a>e&&a>r||an?o:0},ma=ha.CMD,ya=da.normalizeRadian,xa=la.containStroke,ba=2*Math.PI,wa=1e-4,Ta=[-1,-1,-1],ka=[-1,-1],Pa={contain:function(t,e,i){return ue(t,0,!1,e,i)},containStroke:function(t,e,i,r){return ue(t,e,!0,i,r)}},Sa=Ir.prototype.getCanvasPattern,Ca=Math.abs,Ma=new ha(!0);ce.prototype={constructor:ce,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,r=this.path||Ma,n=i.hasStroke(),a=i.hasFill(),o=i.fill,s=i.stroke,h=a&&!!o.colorStops,l=n&&!!s.colorStops,u=a&&!!o.image,c=n&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var f;h&&(f=f||this.getBoundingRect(),this._fillGradient=i.getGradient(t,o,f)),l&&(f=f||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,f))}h?t.fillStyle=this._fillGradient:u&&(t.fillStyle=Sa.call(o,t)),l?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Sa.call(s,t));var d=i.lineDash,p=i.lineDashOffset,v=!!t.setLineDash,g=this.getGlobalScale();r.setScale(g[0],g[1]),this.__dirtyPath||d&&!v&&n?(r.beginPath(t),d&&!v&&(r.setLineDash(d),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&r.fill(t),d&&v&&(t.setLineDash(d),t.lineDashOffset=p),n&&r.stroke(t),d&&v&&t.setLineDash([]),this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new ha},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var r=this.path;r||(r=this.path=new ha),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),t=r.getBoundingRect()}if(this._rect=t,e.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){n.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(n.width+=a/o,n.height+=a/o,n.x-=a/o/2,n.y-=a/o/2)}return n}return t},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 a=this.path.data;if(n.hasStroke()){var o=n.lineWidth,s=n.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(n.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Pa.containStroke(a,o/s,t,e)))return!0}if(n.hasFill())return Pa.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):fn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(ai.isObject(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Ca(t[0]-1)>1e-10&&Ca(t[3]-1)>1e-10?Math.sqrt(Ca(t[0]*t[3]-t[2]*t[1])):1}},ce.extend=function(t){var e=function(e){ce.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var n in i)!r.hasOwnProperty(n)&&i.hasOwnProperty(n)&&(r[n]=i[n])}t.init&&t.init.call(this,e)};ai.inherits(e,ce);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},ai.inherits(ce,fn);var La=ce,Aa=La.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;ii-2?i-1:c+1],l=t[c>i-3?i-1:c+2]);var p=f*f,v=f*p;r.push([de(s[0],d[0],h[0],l[0],f,p,v),de(s[1],d[1],h[1],l[1],f,p,v)])}return r},Ka=hi.min,Ja=hi.max,to=hi.scale,eo=hi.distance,io=hi.add,ro=function(t,e,i,r){var n,a,o,s,h=[],l=[],u=[],c=[];if(r){o=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,d=t.length;f=2){if(n&&"spline"!==n){var a=ro(r,n,i,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var o=r.length,s=0;s<(i?o:o-1);s++){var h=a[2*s],l=a[2*s+1],u=r[(s+1)%o];t.bezierCurveTo(h[0],h[1],l[0],l[1],u[0],u[1])}}else{"spline"===n&&(r=$a(r,i)),t.moveTo(r[0][0],r[0][1]);for(var s=1,c=r.length;s=11?function(){var e,i=this.__clipPaths,r=this.style;if(i)for(var n=0;n4?a*_o(2*go/i)/_o(go/i):a/3);var s=go/i,h=-go/2,l=r+a*_o(h),u=n+a*mo(h);h+=s,t.moveTo(l,u);for(var c,f=0,d=2*i-1;f=n&&l+1>=a){for(var u=[],c=0;c=n&&c+1>=a)return Me(0,s.components);h[i]=s}else h[i]=void 0}o++}();if(f)return f}},pushComponent:function(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}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,r){for(var n=e.length,a=i.length,o=t.newPos,s=o-r,h=0;o+1=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},Ae.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t._dom&&i.contains(t._dom))"function"==typeof e&&e();else{var r=this.add(t);r&&(t._dom=r)}}},Ae.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Ae.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},Ae.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return ai.each(this._tagNames,function(i){var r=t.getElementsByTagName(i);e=e.concat([].slice.call(r))}),e},Ae.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;ai.each(t,function(t){t[e._markLabel]="0"})},Ae.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Ae.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;ai.each(e,function(e){"1"!==e[i._markLabel]&&t.removeChild(e)})}},Ae.prototype.getSvgProxy=function(t){return t instanceof La?us:t instanceof dn?cs:t instanceof Ra?fs:us},Ae.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Ae.prototype.getSvgElement=function(t){return t.__svgEl};var ds=Ae;ai.inherits(ze,ds),ze.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;ai.each(["fill","stroke"],function(r){if(e.style[r]&&("linear"===e.style[r].type||"radial"===e.style[r].type)){var n,a=e.style[r],o=i.getDefs(!0);a._dom?(n=a._dom,o.contains(a._dom)||i.addDom(n)):n=i.add(a),i.markUsed(e);var s=n.getAttribute("id");t.setAttribute(r,"url(#"+s+")")}})}},ze.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Xi("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},ze.prototype.update=function(t){var e=this;ds.prototype.update.call(this,t,function(){var i=t.type,r=t._dom.tagName;"linear"===i&&"linearGradient"===r||"radial"===i&&"radialGradient"===r?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},ze.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Xi("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;r0){var r,n,a=this.getDefs(!0),o=e[0],s=i?"_textDom":"_dom";o[s]?(n=o[s].getAttribute("id"),r=o[s],a.contains(r)||a.appendChild(r)):(n="zr-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",n),a.appendChild(r),o[s]=r);var h=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var l=Array.prototype.slice.call(o.transform);yi.mul(o.transform,o.parent.invTransform,o.transform),h.brush(o),o.transform=l}else h.brush(o);var u=this.getSvgElement(o);r.appendChild(u),t.setAttribute("clip-path","url(#"+n+")"),e.length>1&&this.updateDom(r,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},Re.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&ai.each(t.__clipPaths,function(t){t._dom&&ds.prototype.markUsed.call(e,t._dom),t._textDom&&ds.prototype.markUsed.call(e,t._textDom)})};var vs=Re,gs=ss.path,_s=ss.image,ms=ss.text,ys=No.createElement,xs=function(t,e){this.root=t,this.storage=e;var i=ys("svg");this.gradientManager=new ps(i),this.clipPathManager=new vs(i);var r=document.createElement("div");r.style.cssText="overflow: hidden;",this._svgRoot=i,this._viewport=r,t.appendChild(r),r.appendChild(i),this.resize(),this._visibleList=[]};xs.prototype={constructor:xs,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused();var e,i=this._svgRoot,r=this._visibleList,n=t.length,a=[];for(e=0;e=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},resize:function(){var t=this._getWidth(),e=this._getHeight();if(this._width!==t&&this._height!==e){this._width=t,this._height=e;var i=this._viewport.style;i.width=t+"px",i.height=e+"px";var r=this._svgRoot;r.setAttribute("width",t),r.setAttribute("height",e)}},getWidth:function(){return this._getWidth()},getHeight:function(){return this._getHeight()},_getWidth:function(){var t=this.root,e=document.defaultView.getComputedStyle(t);return(t.clientWidth||Ee(e.width))-Ee(e.paddingLeft)-Ee(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=document.defaultView.getComputedStyle(t);return(t.clientHeight||Ee(e.height))-Ee(e.paddingTop)-Ee(e.paddingBottom)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)}};for(var bs=["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],ws=0;ws')}}catch(t){e=function(t){return r.createElement("<"+t+' xmlns="'+i+'" class="zrvml">')}}t.exports={doc:r,initVML:function(){if(!n){n=!0;var t=r.styleSheets;t.length<31?r.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}},createNode:e}}});if(!Ye.canvasSupported){var Ss=hi,Cs=ir,Ms=ha.CMD,Ls=Hi,As=Kr,zs=hn,Rs=cn,Es=fn,Ds=dn,Bs=Ra,Os=La,Is=ha,Hs=ko,Fs=Ps,Ws=Math.round,qs=Math.sqrt,js=Math.abs,Vs=Math.cos,Ns=Math.sin,Xs=Math.max,Us=Ss.applyTransform,Ys=21600,Gs=Ys/2,Zs=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ys+","+Ys,t.coordorigin="0,0"},Qs=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},$s=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},Ks=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Js=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},th=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},eh=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},ih=function(t,e,i){var r=Ls.parse(e);i=+i,isNaN(i)&&(i=1),r&&(t.color=$s(r[0],r[1],r[2]),t.opacity=i*r[3])},rh=function(t){var e=Ls.parse(t);return[$s(e[0],e[1],e[2]),e[3]]},nh=function(t,e,i){var r=e.fill;if(null!=r)if(r instanceof Hs){var n,a=0,o=[0,0],s=0,h=1,l=i.getBoundingRect(),u=l.width,c=l.height;if("linear"===r.type){n="gradient";var f=i.transform,d=[r.x*u,r.y*c],p=[r.x2*u,r.y2*c];f&&(Us(d,d,f),Us(p,p,f));var v=p[0]-d[0],g=p[1]-d[1];(a=180*Math.atan2(v,g)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{n="gradientradial";var d=[r.x*u,r.y*c],f=i.transform,_=i.scale,m=u,y=c;o=[(d[0]-l.x)/m,(d[1]-l.y)/y],f&&Us(d,d,f),m/=_[0]*Ys,y/=_[1]*Ys;var x=Xs(m,y);s=0/x,h=2*r.r/x-s}var b=r.colorStops.slice();b.sort(function(t,e){return t.offset-e.offset});for(var w=b.length,T=[],k=[],P=0;P=2){var M=T[0][0],L=T[1][0],A=T[0][1]*e.opacity,z=T[1][1]*e.opacity;t.type=n,t.method="none",t.focus="100%",t.angle=a,t.color=M,t.color2=L,t.colors=k.join(","),t.opacity=z,t.opacity2=A}"radial"===n&&(t.focusposition=o.join(","))}else ih(t,r,e.opacity)},ah=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof Hs||ih(t,e.stroke,e.opacity)},oh=function(t,e,i,r){var n="fill"==e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(n||!n&&i.lineWidth)?(t[n?"filled":"stroked"]="true",i[e]instanceof Hs&&Js(t,a),a||(a=Fs.createNode(e)),n?nh(a,i,r):ah(a,i),Ks(t,a)):(t[n?"filled":"stroked"]="false",Js(t,a))},sh=[[],[],[]],hh=function(t,e){var i,r,n,a,o,s,h=Ms.M,l=Ms.C,u=Ms.L,c=Ms.A,f=Ms.Q,d=[];for(a=0;a.01?z&&(R+=.0125):Math.abs(E-S)<1e-4?z&&RP?_-=.0125:_+=.0125:z&&ES?g+=.0125:g-=.0125),d.push(D,Ws(((P-C)*w+x)*Ys-Gs),",",Ws(((S-M)*T+b)*Ys-Gs),",",Ws(((P+C)*w+x)*Ys-Gs),",",Ws(((S+M)*T+b)*Ys-Gs),",",Ws((R*w+x)*Ys-Gs),",",Ws((E*T+b)*Ys-Gs),",",Ws((g*w+x)*Ys-Gs),",",Ws((_*T+b)*Ys-Gs)),o=g,s=_;break;case Ms.R:var B=sh[0],O=sh[1];B[0]=t[a++],B[1]=t[a++],O[0]=B[0]+t[a++],O[1]=B[1]+t[a++],e&&(Us(B,B,e),Us(O,O,e)),B[0]=Ws(B[0]*Ys-Gs),O[0]=Ws(O[0]*Ys-Gs),B[1]=Ws(B[1]*Ys-Gs),O[1]=Ws(O[1]*Ys-Gs),d.push(" m ",B[0],",",B[1]," l ",O[0],",",B[1]," l ",O[0],",",O[1]," l ",B[0],",",O[1]);break;case Ms.Z:d.push(" x ")}if(i>0){d.push(r);for(var I=0;I100&&(fh=0,ch={});var i,r=dh.style;try{r.font=t,i=r.fontFamily.split(",")[0]}catch(t){}e={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:i||"Microsoft YaHei"},ch[t]=e,fh++}return e};As.measureText=function(t,e){var i=Fs.doc;uh||((uh=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",Fs.doc.body.appendChild(uh));try{uh.style.font=e}catch(t){}return uh.innerHTML="",uh.appendChild(i.createTextNode(t)),{width:uh.offsetWidth}};for(var vh=new Cs,gh=[Rs,Es,Ds,Os,Bs],_h=0;_hbi||t<-bi}function _(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,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,this._pausedTime=0,this._paused=!1}function m(t){return(t=Math.round(t))<0?0:t>255?255:t}function y(t){return(t=Math.round(t))<0?0:t>360?360:t}function x(t){return t<0?0:t>1?1:t}function b(t){return m(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function w(t){return x(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function T(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function k(t,e,i){return t+(e-t)*i}function P(t,e,i,r,n){return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function C(t,e){Ii&&S(Ii,e),Ii=Oi.put(t,Ii||e.slice())}function M(t,e){if(t){e=e||[];var i=Oi.get(t);if(i)return S(e,i);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Bi)return S(e,Bi[r]),C(t,e),e;if("#"!==r.charAt(0)){var n=r.indexOf("("),a=r.indexOf(")");if(-1!==n&&a+1===r.length){var o=r.substr(0,n),s=r.substr(n+1,a-(n+1)).split(","),h=1;switch(o){case"rgba":if(4!==s.length)return void P(e,0,0,0,1);h=w(s.pop());case"rgb":return 3!==s.length?void P(e,0,0,0,1):(P(e,b(s[0]),b(s[1]),b(s[2]),h),C(t,e),e);case"hsla":return 4!==s.length?void P(e,0,0,0,1):(s[3]=w(s[3]),L(s,e),C(t,e),e);case"hsl":return 3!==s.length?void P(e,0,0,0,1):(L(s,e),C(t,e),e);default:return}}P(e,0,0,0,1)}else{if(4===r.length)return(l=parseInt(r.substr(1),16))>=0&&l<=4095?(P(e,(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1),C(t,e),e):void P(e,0,0,0,1);if(7===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=16777215?(P(e,(16711680&l)>>16,(65280&l)>>8,255&l,1),C(t,e),e):void P(e,0,0,0,1)}}}}function L(t,e){var i=(parseFloat(t[0])%360+360)%360/360,r=w(t[1]),n=w(t[2]),a=n<=.5?n*(r+1):n+r-n*r,o=2*n-a;return e=e||[],P(e,m(255*T(o,a,i+1/3)),m(255*T(o,a,i)),m(255*T(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function A(t){if(t){var e,i,r=t[0]/255,n=t[1]/255,a=t[2]/255,o=Math.min(r,n,a),s=Math.max(r,n,a),h=s-o,l=(s+o)/2;if(0===h)e=0,i=0;else{i=l<.5?h/(s+o):h/(2-s-o);var u=((s-r)/6+h/2)/h,c=((s-n)/6+h/2)/h,f=((s-a)/6+h/2)/h;r===s?e=f-c:n===s?e=1/3+u-f:a===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,i,l];return null!=t[3]&&d.push(t[3]),d}}function z(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var r=t*(e.length-1),n=Math.floor(r),a=Math.ceil(r),o=e[n],s=e[a],h=r-n;return i[0]=m(k(o[0],s[0],h)),i[1]=m(k(o[1],s[1],h)),i[2]=m(k(o[2],s[2],h)),i[3]=x(k(o[3],s[3],h)),i}}function R(t,e,i){if(e&&e.length&&t>=0&&t<=1){var r=t*(e.length-1),n=Math.floor(r),a=Math.ceil(r),o=M(e[n]),s=M(e[a]),h=r-n,l=E([m(k(o[0],s[0],h)),m(k(o[1],s[1],h)),m(k(o[2],s[2],h)),x(k(o[3],s[3],h))],"rgba");return i?{color:l,leftIndex:n,rightIndex:a,value:r}:l}}function E(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 D(t,e){return t[e]}function B(t,e,i){t[e]=i}function O(t,e,i){return(e-t)*i+t}function I(t,e,i){return i>.5?e:t}function H(t,e,i,r,n){var a=t.length;if(1==n)for(s=0;sn)t.length=n;else for(o=r;o=0&&!(g[i]<=e);i--);i=Math.min(i,l-2)}else{for(i=A;ie);i++);i=Math.min(i-1,l-2)}A=i,z=e;var r=g[i+1]-g[i];if(0!==r)if(P=(e-g[i])/r,h)if(C=_[i],S=_[0===i?i:i-1],M=_[i>l-2?l-1:i+1],L=_[i>l-3?l-1:i+2],f)q(S,C,M,L,P,P*P,P*P*P,o(t,n),v);else{if(d)a=q(S,C,M,L,P,P*P,P*P*P,R,1),a=N(R);else{if(p)return I(C,M,P);a=j(S,C,M,L,P,P*P,P*P*P)}s(t,n,a)}else if(f)H(_[i],_[i+1],P,o(t,n),v);else{var a;if(d)H(_[i],_[i+1],P,R,1),a=N(R);else{if(p)return I(_[i],_[i+1],P);a=O(_[i],_[i+1],P)}s(t,n,a)}},ondestroy:i});return e&&"spline"!==e&&(E.easing=e),E}}}function Y(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}function G(t){for(var e=0;t>=ar;)e|=1&t,t>>=1;return t+e}function Z(t,e,i,r){var n=e+1;if(n===i)return 1;if(r(t[n++],t[e])<0){for(;n=0;)n++;return n-e}function Q(t,e,i){for(i--;e>>1])<0?h=a:s=a+1;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(;l>0;)t[s+l]=t[s+l-1],l--}t[s]=o}}function K(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])>0){for(s=r-n;h0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}else{for(s=n+1;hs&&(h=s);var l=o;o=n-h,h=n-l}for(o++;o>>1);a(t,e[i+u])>0?o=u+1:h=u}return h}function J(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])<0){for(s=n+1;hs&&(h=s);var l=o;o=n-h,h=n-l}else{for(s=r-n;h=0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}for(o++;o>>1);a(t,e[i+u])<0?h=u:o=u+1}return h}function tt(t,e){function i(i){var s=a[i],l=o[i],u=a[i+1],c=o[i+1];o[i]=l+c,i===h-3&&(a[i+1]=a[i+2],o[i+1]=o[i+2]),h--;var f=J(t[u],t,s,l,0,e);s+=f,0!==(l-=f)&&0!==(c=K(t[s+l-1],t,u,c,c-1,e))&&(l<=c?r(s,l,u,c):n(s,l,u,c))}function r(i,r,n,a){var o=0;for(o=0;o=or||d>=or);if(p)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===r){for(o=0;o=0;o--)t[d+o]=t[f+o];if(0===r){_=!0;break}}if(t[c--]=l[u--],1==--a){_=!0;break}if(0!=(g=a-K(t[h],l,0,a,a-1,e))){for(a-=g,d=(c-=g)+1,f=(u-=g)+1,o=0;o=or||g>=or);if(_)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(d=(c-=r)+1,f=(h-=r)+1,o=r-1;o>=0;o--)t[d+o]=t[f+o];t[c]=l[u]}else{if(0===a)throw new Error;for(f=c-(a-1),o=0;o=0;o--)t[d+o]=t[f+o];t[c]=l[u]}else for(f=c-(a-1),o=0;o1;){var t=h-2;if(t>=1&&o[t-1]<=o[t]+o[t+1]||t>=2&&o[t-2]<=o[t]+o[t-1])o[t-1]o[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;h>1;){var t=h-2;t>0&&o[t-1]Ur&&(Xr=0,Nr={}),Xr++,Nr[i]=n,n}function yt(t,e,i,r,n,a){var o=Mt(t,e,n,a),s=mt(t,e);n&&(s+=n[1]+n[3]);var h=o.outerHeight,l=bt(0,s,i),u=wt(0,h,r),c=new ir(l,u,s,h);return c.lineHeight=o.lineHeight,c}function xt(t,e,i,r,n,a,o){var s=Lt(t,{rich:a,truncate:o,font:e,textAlign:i,textPadding:n}),h=s.outerWidth,l=s.outerHeight,u=bt(0,h,i),c=wt(0,l,r);return new ir(u,c,h,l)}function bt(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function wt(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Tt(t,e,i,r,n){if(!e)return"";var a=(t+"").split("\n");n=kt(e,i,r,n);for(var o=0,s=a.length;o=a;s++)o-=a;var h=mt(i);return h>o&&(i="",h=0),o=t-h,r.ellipsis=i,r.ellipsisWidth=h,r.contentWidth=o,r.containerWidth=t,r}function Pt(t,e){var i=e.containerWidth,r=e.font,n=e.contentWidth;if(!i)return"";var a=mt(t,r);if(a<=i)return t;for(var o=0;;o++){if(a<=n||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?St(t,n,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*n/a):0;a=mt(t=t.substr(0,s),r)}return""===t&&(t=e.placeholder),t}function St(t,e,i,r){for(var n=0,a=0,o=t.length;ah)t="",a=[];else if(null!=l)for(var u=kt(l-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),c=0,f=a.length;cn&&At(i,t.substring(n,a)),At(i,r[2],r[1]),n=Yr.lastIndex}nd)return{lines:[],width:0,height:0};L.textWidth=$r.getWidth(L.text,x);var w=m.textWidth,T=null==w||"auto"===w;if("string"==typeof w&&"%"===w.charAt(w.length-1))L.percentWidth=w,l.push(L),w=0;else{if(T){w=L.textWidth;var k=m.textBackgroundColor,P=k&&k.image;P&&(P=Vr.findExistImage(P),Vr.isImageReady(P)&&(w=Math.max(w,P.width*b/P.height)))}var S=y?y[1]+y[3]:0;w+=S;var C=null!=f?f-g:null;null!=C&&C=0&&"right"===(x=w[L]).textAlign;)Ot(t,e,x,r,k,_,M,"right"),P-=x.width,M-=x.width,L--;for(C+=(a-(C-g)-(m-M)-P)/2;S<=L;)Ot(t,e,x=w[S],r,k,_,C+x.width/2,"center"),C+=x.width,S++;_+=k}}function Bt(t,e,i,r,n){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(r=i.width/2+i.x,n=i.height/2+i.y):a&&(r=a[0]+i.x,n=a[1]+i.y),t.translate(r,n),t.rotate(-e.textRotation),t.translate(-r,-n)}}function Ot(t,e,i,r,n,a,o,s){var h=r.rich[i.styleName]||{},l=i.textVerticalAlign,u=a+n/2;"top"===l?u=a+i.height/2:"bottom"===l&&(u=a+n-i.height/2),!i.isLineHolder&&It(h)&&Ht(t,e,h,"right"===s?o-i.width:"center"===s?o-i.width/2:o,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=Vt(o,s,c),u-=i.height/2-c[2]-i.textHeight/2),qt(e,"shadowBlur",tn(h.textShadowBlur,r.textShadowBlur,0)),qt(e,"shadowColor",h.textShadowColor||r.textShadowColor||"transparent"),qt(e,"shadowOffsetX",tn(h.textShadowOffsetX,r.textShadowOffsetX,0)),qt(e,"shadowOffsetY",tn(h.textShadowOffsetY,r.textShadowOffsetY,0)),qt(e,"textAlign",s),qt(e,"textBaseline","middle"),qt(e,"font",i.font||Kr.DEFAULT_FONT);var f=on(h.textStroke||r.textStroke,p),d=sn(h.textFill||r.textFill),p=en(h.textStrokeWidth,r.textStrokeWidth);f&&(qt(e,"lineWidth",p),qt(e,"strokeStyle",f),e.strokeText(i.text,o,u)),d&&(qt(e,"fillStyle",d),e.fillText(i.text,o,u))}function It(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ht(t,e,i,r,n,a,o){var s=i.textBackgroundColor,h=i.textBorderWidth,l=i.textBorderColor,u=ai.isString(s);if(qt(e,"shadowBlur",i.textBoxShadowBlur||0),qt(e,"shadowColor",i.textBoxShadowColor||"transparent"),qt(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),qt(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||h&&l){e.beginPath();var c=i.textBorderRadius;c?Jr.buildPath(e,{x:r,y:n,width:a,height:o,r:c}):e.rect(r,n,a,o),e.closePath()}if(u)qt(e,"fillStyle",s),e.fill();else if(ai.isObject(s)){var f=s.image;(f=Vr.createOrUpdateImage(f,null,t,Ft,s))&&Vr.isImageReady(f)&&e.drawImage(f,r,n,a,o)}h&&l&&(qt(e,"lineWidth",h),qt(e,"strokeStyle",l),e.stroke())}function Ft(t,e){e.image=t}function Wt(t,e,i){var r=e.x||0,n=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)r=i.x+jt(s[0],i.width),n=i.y+jt(s[1],i.height);else{var h=Kr.adjustTextPositionOnRect(s,i,e.textDistance);r=h.x,n=h.y,a=a||h.textAlign,o=o||h.textVerticalAlign}var l=e.textOffset;l&&(r+=l[0],n+=l[1])}return{baseX:r,baseY:n,textAlign:a,textVerticalAlign:o}}function qt(t,e,i){return t[e]=i,t[e]}function jt(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Vt(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Nt(t){t=t||{},Ki.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Br(t.style,this),this._rect=null,this.__clipPaths=[]}function Xt(t){fn.call(this,t)}function Ut(t){return parseInt(t,10)}function Yt(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function Gt(t){t.__unusedCount++}function Zt(t){1==t.__unusedCount&&t.clear()}function Qt(t,e,i){return pn.copy(t.getBoundingRect()),t.transform&&pn.applyTransform(t.transform),vn.width=e,vn.height=i,!pn.intersect(vn)}function $t(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i-Mn&&tMn||t<-Mn}function re(t,e,i,r,n){var a=1-n;return a*a*(a*t+3*n*e)+n*n*(n*r+3*a*i)}function ne(t,e,i,r){var n=1-r;return n*(n*t+2*r*e)+r*r*i}function ae(t,e){return Math.abs(t-e)e&&l>r&&l>a&&l>s||l1&&oe(),c=Bn.cubicAt(e,r,a,s,ka[0]),p>1&&(f=Bn.cubicAt(e,r,a,s,ka[1]))),2==p?ge&&s>r&&s>a||s=0&&l<=1){for(var u=0,c=Bn.quadraticAt(e,r,a,l),f=0;fi||s<-i)return 0;l=Math.sqrt(i*i-s*s);Ta[0]=-l,Ta[1]=l;var h=Math.abs(r-n);if(h<1e-4)return 0;if(h%ba<1e-4){r=0,n=ba;p=a?1:-1;return o>=Ta[0]+t&&o<=Ta[1]+t?p:0}if(a){var l=r;r=ya(n),n=ya(l)}else r=ya(r),n=ya(n);r>n&&(n+=ba);for(var u=0,c=0;c<2;c++){var f=Ta[c];if(f+t>o){var d=Math.atan2(s,f),p=a?1:-1;d<0&&(d=ba+d),(d>=r&&d<=n||d+ba>=r&&d+ba<=n)&&(d>Math.PI/2&&d<1.5*Math.PI&&(p=-p),u+=p)}}return u}function ue(t,e,i,r,n){for(var a=0,o=0,s=0,h=0,l=0,u=0;u1&&(i||(a+=_a(o,s,h,l,r,n))),1==u&&(h=o=t[u],l=s=t[u+1]),c){case ma.M:o=h=t[u++],s=l=t[u++];break;case ma.L:if(i){if(xa(o,s,t[u],t[u+1],e,r,n))return!0}else a+=_a(o,s,t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case ma.C:if(i){if(ua.containStroke(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=se(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case ma.Q:if(i){if(ca.containStroke(o,s,t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=he(o,s,t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case ma.A:var f=t[u++],d=t[u++],p=t[u++],v=t[u++],g=t[u++],_=t[u++],m=(t[u++],1-t[u++]),y=Math.cos(g)*p+f,x=Math.sin(g)*v+d;u>1?a+=_a(o,s,y,x,r,n):(h=y,l=x);var b=(r-f)*v/p+f;if(i){if(ga.containStroke(f,d,v,g,g+_,m,e,b,n))return!0}else a+=le(f,d,v,g,g+_,m,b,n);o=Math.cos(g+_)*p+f,s=Math.sin(g+_)*v+d;break;case ma.R:h=o=t[u++],l=s=t[u++];var y=h+t[u++],x=l+t[u++];if(i){if(xa(h,l,y,l,e,r,n)||xa(y,l,y,x,e,r,n)||xa(y,x,h,x,e,r,n)||xa(h,x,h,l,e,r,n))return!0}else a+=_a(y,l,y,x,r,n),a+=_a(h,x,h,l,r,n);break;case ma.Z:if(i){if(xa(o,s,h,l,e,r,n))return!0}else a+=_a(o,s,h,l,r,n);o=h,s=l}}return i||ae(s,l)||(a+=_a(o,s,h,l,r,n)||0),0!==a}function ce(t){fn.call(this,t),this.path=null}function fe(t,e,i){var r=t.cpx2,n=t.cpy2;return null===r||null===n?[(i?Fa:Ia)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Fa:Ia)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Ha:Oa)(t.x1,t.cpx1,t.x2,e),(i?Ha:Oa)(t.y1,t.cpy1,t.y2,e)]}function de(t,e,i,r,n,a,o){var s=.5*(i-t),h=.5*(r-e);return(2*(e-i)+s+h)*o+(-3*(e-i)-2*s-h)*a+s*n+e}function pe(t,e,i,r,n,a,o,s,h,l,u){var c=h*(Fo/180),f=Ho(c)*(t-i)/2+Io(c)*(e-r)/2,d=-1*Io(c)*(t-i)/2+Ho(c)*(e-r)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=Oo(p),s*=Oo(p));var v=(n===a?-1:1)*Oo((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,g=v*o*d/s,_=v*-s*f/o,m=(t+i)/2+Ho(c)*g-Io(c)*_,y=(e+r)/2+Io(c)*g+Ho(c)*_,x=jo([1,0],[(f-g)/o,(d-_)/s]),b=[(f-g)/o,(d-_)/s],w=[(-1*f-g)/o,(-1*d-_)/s],T=jo(b,w);qo(b,w)<=-1&&(T=Fo),qo(b,w)>=1&&(T=0),0===a&&T>0&&(T-=2*Fo),1===a&&T<0&&(T+=2*Fo),u.addData(l,m,y,o,s,x,T,c,a)}function ve(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===d[0]&&d.shift();for(var p=0;p-es}function ye(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Go}function xe(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Go}function be(t,e){e&&we(t,"transform","matrix("+Yo.call(e,",")+")")}function we(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function Te(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function ke(t,e,i){if(ye(e,i)){var r=i?e.textFill:e.fill;r="transparent"===r?Go:r,"none"!==t.getAttribute("clip-path")&&r===Go&&(r="rgba(0, 0, 0, 0.002)"),we(t,"fill",r),we(t,"fill-opacity",e.opacity)}else we(t,"fill",Go);if(xe(e,i)){var n=i?e.textStroke:e.stroke;we(t,"stroke",n="transparent"===n?Go:n),we(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(e.strokeNoScale?e.host.getLineScale():1)),we(t,"paint-order","stroke"),we(t,"stroke-opacity",e.opacity),e.lineDash?(we(t,"stroke-dasharray",e.lineDash.join(",")),we(t,"stroke-dashoffset",Zo(e.lineDashOffset||0))):we(t,"stroke-dasharray",""),e.lineCap&&we(t,"stroke-linecap",e.lineCap),e.lineJoin&&we(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&we(t,"stroke-miterlimit",e.miterLimit)}else we(t,"stroke",Go)}function Pe(t){for(var e=[],i=0;i=Jo||!me(d)&&(u>-Ko&&u<0||u>Ko)==!!f;var g=_e(a+s*$o(l)),_=_e(o+h*Qo(l));p&&(u=f?Jo-1e-4:1e-4-Jo,v=!0,9===i&&e.push("M",g,_));var m=_e(a+s*$o(l+u)),y=_e(o+h*Qo(l+u));e.push("A",_e(s),_e(h),Zo(c*ts),+v,+f,m,y);break;case Xo.Z:r="Z";break;case Xo.R:var m=_e(t[i++]),y=_e(t[i++]),x=_e(t[i++]),b=_e(t[i++]);e.push("M",m,y,"L",m+x,y,"L",m+x,y+b,"L",m,y+b,"L",m,y)}r&&e.push(r);for(var w=0;w=11)}}(navigator.userAgent),Ge={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Ze={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Qe=Object.prototype.toString,$e=Array.prototype,Ke=$e.forEach,Je=$e.filter,ti=$e.slice,ei=$e.map,ii=$e.reduce,ri="__ec_primitive__";u.prototype={constructor:u,get:function(t){return this["_ec_"+t]},set:function(t,e){return this["_ec_"+t]=e,e},each:function(t,e){void 0!==e&&(t=n(t,e));for(var i in this)this.hasOwnProperty(i)&&t(this[i],i.slice(4))},removeKey:function(t){delete this["_ec_"+t]}};var ni={inherits:function(t,e){function i(){}var r=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var n in r)t.prototype[n]=r[n];t.prototype.constructor=t,t.superClass=e},mixin:function(t,e,r){i(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,r)},clone:t,merge:e,mergeAll:function(t,i){for(var r=t[0],n=1,a=t.length;n3&&(e=ui.call(e,1));for(var r=this._$handlers[t],n=r.length,a=0;a4&&(e=ui.call(e,1,e.length-1));for(var r=e[e.length-1],n=this._$handlers[t],a=n.length,o=0;o=0;a--){var o;if(r[a]!==i&&!r[a].ignore&&(o=v(r[a],t,e))&&(!n.topTarget&&(n.topTarget=r[a]),o!==di)){n.target=r[a];break}}return n}},ai.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){vi.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),r=i.target;if("mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mosueup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||hi.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),ai.mixin(vi,fi),ai.mixin(vi,li);var gi=vi,_i="undefined"==typeof Float32Array?Array:Float32Array,mi={create:function(){var t=new _i(6);return mi.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(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},mul:function(t,e,i){var r=e[0]*i[0]+e[2]*i[1],n=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=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]=a,t[3]=o,t[4]=s,t[5]=h,t},translate:function(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},rotate:function(t,e,i){var r=e[0],n=e[2],a=e[4],o=e[1],s=e[3],h=e[5],l=Math.sin(i),u=Math.cos(i);return t[0]=r*u+o*l,t[1]=-r*l+o*u,t[2]=n*u+s*l,t[3]=-n*l+u*s,t[4]=u*a+l*h,t[5]=u*h-l*a,t},scale:function(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},invert:function(t,e){var i=e[0],r=e[2],n=e[4],a=e[1],o=e[3],s=e[5],h=i*o-a*r;return h?(h=1/h,t[0]=o*h,t[1]=-a*h,t[2]=-r*h,t[3]=i*h,t[4]=(r*s-o*n)*h,t[5]=(a*n-i*s)*h,t):null}},yi=mi,xi=yi.identity,bi=5e-5,wi=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Ti=wi.prototype;Ti.transform=null,Ti.needLocalTransform=function(){return g(this.rotation)||g(this.position[0])||g(this.position[1])||g(this.scale[0]-1)||g(this.scale[1]-1)},Ti.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),r=this.transform;i||e?(r=r||yi.create(),i?this.getLocalTransform(r):xi(r),e&&(i?yi.mul(r,t.transform,r):yi.copy(r,t.transform)),this.transform=r,this.invTransform=this.invTransform||yi.create(),yi.invert(this.invTransform,r)):r&&xi(r)},Ti.getLocalTransform=function(t){return wi.getLocalTransform(this,t)},Ti.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Ti.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var ki=[];Ti.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(yi.mul(ki,t.invTransform,e),e=ki);var i=e[0]*e[0]+e[1]*e[1],r=e[2]*e[2]+e[3]*e[3],n=this.position,a=this.scale;g(i-1)&&(i=Math.sqrt(i)),g(r-1)&&(r=Math.sqrt(r)),e[0]<0&&(i=-i),e[3]<0&&(r=-r),n[0]=e[4],n[1]=e[5],a[0]=i,a[1]=r,this.rotation=Math.atan2(-e[1]/r,e[0]/i)}},Ti.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},Ti.transformCoordToLocal=function(t,e){var i=[t,e],r=this.invTransform;return r&&hi.applyTransform(i,i,r),i},Ti.transformCoordToGlobal=function(t,e){var i=[t,e],r=this.transform;return r&&hi.applyTransform(i,i,r),i},wi.getLocalTransform=function(t,e){xi(e=e||[]);var i=t.origin,r=t.scale||[1,1],n=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),yi.scale(e,e,r),n&&yi.rotate(e,e,n),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var Pi=wi,Si={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:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.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:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Si.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*Si.bounceIn(2*t):.5*Si.bounceOut(2*t-1)+.5}},Ci=Si;_.prototype={constructor:_,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var r=this.easing,n="string"==typeof r?Ci[r]:r,a="function"==typeof n?n(i):i;return this.fire("frame",a),1==i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Mi=_,Li=function(){this.head=null,this.tail=null,this._len=0},Ai=Li.prototype;Ai.insert=function(t){var e=new zi(t);return this.insertEntry(e),e},Ai.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ai.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--},Ai.len=function(){return this._len},Ai.clear=function(){this.head=this.tail=null,this._len=0};var zi=function(t){this.value=t,this.next,this.prev},Ri=function(t){this._list=new Li,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Ei=Ri.prototype;Ei.put=function(t,e){var i=this._list,r=this._map,n=null;if(null==r[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete r[s.key],n=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new zi(e),o.key=t,i.insertEntry(o),r[t]=o}return n},Ei.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},Ei.clear=function(){this._list.clear(),this._map={}};var Di=Ri,Bi={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]},Oi=new Di(20),Ii=null,Hi={parse:M,lift:function(t,e){var i=M(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;return E(i,4===i.length?"rgba":"rgb")}},toHex:function(t,e){var i=M(t);if(i)return((1<<24)+(i[0]<<16)+(i[1]<<8)+ +i[2]).toString(16).slice(1)},fastLerp:z,fastMapToColor:z,lerp:R,mapToColor:R,modifyHSL:function(t,e,i,r){if(t=M(t))return t=A(t),null!=e&&(t[0]=y(e)),null!=i&&(t[1]=w(i)),null!=r&&(t[2]=w(r)),E(L(t),"rgba")},modifyAlpha:function(t,e){if((t=M(t))&&null!=e)return t[3]=x(e),E(t,"rgba")},stringify:E},Fi=ai.isArrayLike,Wi=Array.prototype.slice,qi=function(t,e,i,r){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||D,this._setter=r||B,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};qi.prototype={when:function(t,e){var i=this._tracks;for(var r in e)if(e.hasOwnProperty(r)){if(!i[r]){i[r]=[];var n=this._getter(this._target,r);if(null==n)continue;0!==t&&i[r].push({time:0,value:V(n)})}i[r].push({time:t,value:e[r]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t1)for(var t in arguments)console.log(arguments[t])},Ui=ai.isString,Yi=ai.isFunction,Gi=ai.isObject,Zi=function(){this.animators=[]};Zi.prototype={constructor:Zi,animate:function(t,e){var i,r=!1,n=this,a=this.__zr;if(t){var o=t.split("."),s=n;r="shape"===o[0];for(var h=0,l=o.length;h0&&this.animate(t,!1).when(null==r?500:r,a).delay(n||0),this}};var Qi=Zi,$i=function(t){Pi.call(this,t),fi.call(this,t),Qi.call(this,t),this.id=t.id||Xe()};$i.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(ai.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Y(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Y.create=function(t){return new Y(t.x,t.y,t.width,t.height)};var ir=Y,rr=function(t){t=t||{},Ki.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};rr.prototype={constructor:rr,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(r,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof rr&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,n=ai.indexOf(r,t);return n<0?this:(r.splice(n,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof rr&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,r=this.__storage;for(e=0;es&&(h=s),$(t,i,i+h,i+a,e),a=h}o.pushRun(i,a),o.mergeRuns(),n-=a,i+=a}while(0!==n);o.forceMergeRuns()}},hr=function(){this._roots=[],this._displayList=[],this._displayListLen=0};hr.prototype={constructor:hr,traverse:function(t,e){for(var i=0;i=0&&(this.delFromStorage(t),this._roots.splice(n,1),t instanceof nr&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t.__storage=this,t.dirty(!1),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:et};var lr=hr,ur="undefined"!=typeof window&&!!window.addEventListener,cr=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fr={clientToLocal:rt,normalizeEvent:function(t,e,i){if(null!=(e=e||window.event).zrX)return e;var r=e.type;if(r&&r.indexOf("touch")>=0){var n="touchend"!=r?e.targetTouches[0]:e.changedTouches[0];n&&rt(t,n,e,i)}else rt(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&cr.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e},addEventListener:function(t,e,i){ur?t.addEventListener(e,i):t.attachEvent("on"+e,i)},removeEventListener:function(t,e,i){ur?t.removeEventListener(e,i):t.detachEvent("on"+e,i)},notLeftMouse:function(t){return t.which>1},stop:ur?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Dispatcher:fi},dr="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},pr=fr.Dispatcher,vr=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,pr.call(this)};vr.prototype={constructor:vr,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i1&&r&&r.length>1){var a=at(r)/at(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=ot(r);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},yr=_r,xr=fr.addEventListener,br=fr.removeEventListener,wr=fr.normalizeEvent,Tr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],kr=["touchstart","touchend","touchmove"],Pr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Sr=ai.map(Tr,function(t){var e=t.replace("mouse","pointer");return Pr[e]?e:t}),Cr={mousemove:function(t){t=wr(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=wr(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=wr(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,ht(this,t,"start"),Cr.mousemove.call(this,t),Cr.mousedown.call(this,t),lt(this)},touchmove:function(t){(t=wr(this.dom,t)).zrByTouch=!0,ht(this,t,"change"),Cr.mousemove.call(this,t),lt(this)},touchend:function(t){(t=wr(this.dom,t)).zrByTouch=!0,ht(this,t,"end"),Cr.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Cr.click.call(this,t),lt(this)},pointerdown:function(t){Cr.mousedown.call(this,t)},pointermove:function(t){ut(t)||Cr.mousemove.call(this,t)},pointerup:function(t){Cr.mouseup.call(this,t)},pointerout:function(t){ut(t)||Cr.mouseout.call(this,t)}};ai.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Cr[t]=function(e){e=wr(this.dom,e),this.trigger(t,e)}});var Mr=ft.prototype;Mr.dispose=function(){for(var t=Tr.concat(kr),e=0;e0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var r=("radial"===e.type?pt:dt)(t,e,i),n=e.colorStops,a=0;ah&&(i*=h/(c=i+r),r*=h/c),n+a>h&&(n*=h/(c=n+a),a*=h/c),r+n>l&&(r*=l/(c=r+n),n*=l/c),i+a>l&&(i*=l/(c=i+a),a*=l/c),t.moveTo(o+i,s),t.lineTo(o+h-r,s),0!==r&&t.quadraticCurveTo(o+h,s,o+h,s+r),t.lineTo(o+h,s+l-n),0!==n&&t.quadraticCurveTo(o+h,s+l,o+h-n,s+l),t.lineTo(o+a,s+l),0!==a&&t.quadraticCurveTo(o,s+l,o,s+l-a),t.lineTo(o,s+i),0!==i&&t.quadraticCurveTo(o,s,o+i,s)}},tn=ai.retrieve3,en=ai.retrieve2,rn={left:1,right:1,center:1},nn={top:1,bottom:1,middle:1},an={};an.normalizeTextStyle=function(t){return zt(t),ai.each(t.rich,zt),t},an.renderText=function(t,e,i,r,n){r.rich?Et(t,e,i,r,n):Rt(t,e,i,r,n)};var on=an.getStroke=function(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t},sn=an.getFill=function(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t};an.needDrawText=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)};var hn=an,ln=new ir,un=function(){};un.prototype={constructor:un,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&hn.normalizeTextStyle(i,!0);var r=i.text;if(null!=r&&(r+=""),hn.needDrawText(r,i)){t.save();var n=this.transform;i.transformText?this.setTransform(t):n&&(ln.copy(e),ln.applyTransform(n),e=ln),hn.renderText(this,t,r,i,e),t.restore()}}};var cn=un;Nt.prototype={constructor:Nt,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Ki.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Br(t,this),this.dirty(!1),this}},ai.inherits(Nt,Ki),ai.mixin(Nt,cn);var fn=Nt;Xt.prototype={constructor:Xt,type:"image",brush:function(t,e){var i=this.style,r=i.image;i.bind(t,this,e);var n=this._image=Vr.createOrUpdateImage(r,this._image,this);if(n&&Vr.isImageReady(n)){var a=i.x||0,o=i.y||0,s=i.width,h=i.height,l=n.width/n.height;if(null==s&&null!=h?s=h*l:null==h&&null!=s?h=s/l:null==s&&null==h&&(s=n.width,h=n.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(n,u,c,i.sWidth,i.sHeight,a,o,s,h)}else if(i.sx&&i.sy){var f=s-(u=i.sx),d=h-(c=i.sy);t.drawImage(n,u,c,f,d,a,o,s,h)}else t.drawImage(n,a,o,s,h);this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new ir(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},ai.inherits(Xt,fn);var dn=Xt,pn=new ir(0,0,0,0),vn=new ir(0,0,0,0),gn=function(t,e,i){this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=ai.extend({},i||{}),this.dpr=i.devicePixelRatio||Ni.devicePixelRatio,this._singleCanvas=r,this.root=t;var n=t.style;n&&(n["-webkit-tap-highlight-color"]="transparent",n["-webkit-user-select"]=n["user-select"]=n["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},r){null!=i.width&&(t.width=i.width),null!=i.height&&(t.height=i.height);var s=t.width,h=t.height;this._width=s,this._height=h;var l=new Fr(t,this,1);l.initContext(),o[0]=l,a.push(0),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var u=this._domRoot=Jt(this._width,this._height);t.appendChild(u)}this._progressiveLayers=[],this._hoverlayer,this._hoverElements=[]};gn.prototype={constructor:gn,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._paintList(e,t);for(var r=0;r=0&&i.splice(r,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i=0){if(!s){if((s=this._progressiveLayers[Math.min(l++,4)]).ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){d=s.__nextIdxNotProg-1;continue}h=s.__progress,s.__dirty||(f=h),s.__progress=f+1}_===f&&this._doPaintEl(v,s,!0,s.renderScope)}else this._doPaintEl(v,r,e,o);v.__dirty=!1}}s&&i(s),a&&a.restore(),this._furtherProgressive=!1,ai.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,r){var n=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!Qt(t,this._width,this._height))){var o=t.__clipPaths;(r.prevClipLayer!==e||$t(o,r.prevElClipPaths))&&(r.prevElClipPaths&&(r.prevClipLayer.ctx.restore(),r.prevClipLayer=r.prevElClipPaths=null,r.prevEl=null),o&&(n.save(),Kt(o,n),r.prevClipLayer=e,r.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(n),t.brush(n,r.prevEl||null),r.prevEl=t,t.afterBrush&&t.afterBrush(n)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||((e=new Fr("zr_"+t,this,this.dpr)).__builtin__=!0,this._layerConfig[t]&&ai.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,r=this._zlevelList,n=r.length,a=null,o=-1,s=this._domRoot;if(i[t])Xi("ZLevel "+t+" has been used already");else if(Yt(e)){if(n>0&&t>r[0]){for(o=0;ot);o++);a=i[r[o]]}if(r.splice(o+1,0,t),i[t]=e,!e.virtual)if(a){var h=a.dom;h.nextSibling?s.insertBefore(e.dom,h.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Xi("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,r,n=this._zlevelList;for(r=0;r=0){o!==d&&(o=d,h++);var p=c.__frame=h-1;if(!a){var v=Math.min(s,4);(a=i[v])||(a=i[v]=new Fr("progressive",this,this.dpr)).initContext(),a.__maxProgress=0}a.__dirty=a.__dirty||c.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,p),a.__maxProgress>=a.__progress&&(f.__dirty=!0)}else c.__frame=-1,a&&(a.__nextIdxNotProg=l,s++,a=null)}a&&(s++,a.__nextIdxNotProg=l),this.eachBuiltinLayer(function(t,e){r[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,5),ai.each(i,function(t,e){n[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?ai.merge(i[t],e,!0):i[t]=e;var r=this._layers[t];r&&ai.merge(r,i[t],!0)}},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(ai.indexOf(i,t),1))},resize:function(t,e){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){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers.hasOwnProperty(n)&&this._layers[n].resize(t,e);ai.each(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){function e(t,e){var r=o._zlevelList;null==t&&(t=-1/0);for(var n,a=0;at&&s=0&&k<=1&&(a[d++]=k);else{var p=c*c-4*u*f;if(ee(p)){var v=c/u,g=-v/2;(k=-s/o+v)>=0&&k<=1&&(a[d++]=k),g>=0&&g<=1&&(a[d++]=g)}else if(p>0){var _=Cn(p),m=u*s+1.5*o*(-c+_),y=u*s+1.5*o*(-c-_);(k=(-s-((m=m<0?-Sn(-m,zn):Sn(m,zn))+(y=y<0?-Sn(-y,zn):Sn(y,zn))))/(3*o))>=0&&k<=1&&(a[d++]=k)}else{var x=(2*u*s-3*o*c)/(2*Cn(u*u*u)),b=Math.acos(x)/3,w=Cn(u),T=Math.cos(b),k=(-s-2*w*T)/(3*o),g=(-s+w*(T+An*Math.sin(b)))/(3*o),P=(-s+w*(T-An*Math.sin(b)))/(3*o);k>=0&&k<=1&&(a[d++]=k),g>=0&&g<=1&&(a[d++]=g),P>=0&&P<=1&&(a[d++]=P)}}return d},cubicExtrema:function(t,e,i,r,n){var a=6*i-12*e+6*t,o=9*e+3*r-3*t-9*i,s=3*e-3*t,h=0;if(ee(o))ie(a)&&(c=-s/a)>=0&&c<=1&&(n[h++]=c);else{var l=a*a-4*o*s;if(ee(l))n[0]=-a/(2*o);else if(l>0){var u=Cn(l),c=(-a+u)/(2*o),f=(-a-u)/(2*o);c>=0&&c<=1&&(n[h++]=c),f>=0&&f<=1&&(n[h++]=f)}}return h},cubicSubdivide:function(t,e,i,r,n,a){var o=(e-t)*n+t,s=(i-e)*n+e,h=(r-i)*n+i,l=(s-o)*n+o,u=(h-s)*n+s,c=(u-l)*n+l;a[0]=t,a[1]=o,a[2]=l,a[3]=c,a[4]=c,a[5]=u,a[6]=h,a[7]=r},cubicProjectPoint:function(t,e,i,r,n,a,o,s,h,l,u){var c,f,d,p,v,g=.005,_=1/0;Rn[0]=h,Rn[1]=l;for(var m=0;m<1;m+=.05)En[0]=re(t,i,n,o,m),En[1]=re(e,r,a,s,m),(p=Pn(Rn,En))<_&&(c=m,_=p);_=1/0;for(var y=0;y<32&&!(g=0&&p<_?(c=f,_=p):(Dn[0]=re(t,i,n,o,d),Dn[1]=re(e,r,a,s,d),v=Pn(Dn,Rn),d<=1&&v<_?(c=d,_=v):g*=.5);return u&&(u[0]=re(t,i,n,o,c),u[1]=re(e,r,a,s,c)),Cn(_)},quadraticAt:ne,quadraticDerivativeAt:function(t,e,i,r){return 2*((1-r)*(e-t)+r*(i-e))},quadraticRootAt:function(t,e,i,r,n){var a=t-2*e+i,o=2*(e-t),s=t-r,h=0;if(ee(a))ie(o)&&(c=-s/o)>=0&&c<=1&&(n[h++]=c);else{var l=o*o-4*a*s;if(ee(l))(c=-o/(2*a))>=0&&c<=1&&(n[h++]=c);else if(l>0){var u=Cn(l),c=(-o+u)/(2*a),f=(-o-u)/(2*a);c>=0&&c<=1&&(n[h++]=c),f>=0&&f<=1&&(n[h++]=f)}}return h},quadraticExtremum:function(t,e,i){var r=t+i-2*e;return 0===r?.5:(t-e)/r},quadraticSubdivide:function(t,e,i,r,n){var a=(e-t)*r+t,o=(i-e)*r+e,s=(o-a)*r+a;n[0]=t,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=i},quadraticProjectPoint:function(t,e,i,r,n,a,o,s,h){var l,u=.005,c=1/0;Rn[0]=o,Rn[1]=s;for(var f=0;f<1;f+=.05)En[0]=ne(t,i,n,f),En[1]=ne(e,r,a,f),(g=Pn(Rn,En))=0&&g1e-4)return s[0]=t-i,s[1]=e-r,h[0]=t+i,void(h[1]=e+r);if(qn[0]=Wn(n)*i+t,qn[1]=Fn(n)*r+e,jn[0]=Wn(a)*i+t,jn[1]=Fn(a)*r+e,l(s,qn,jn),u(h,qn,jn),(n%=Nn)<0&&(n+=Nn),(a%=Nn)<0&&(a+=Nn),n>a&&!o?a+=Nn:nn&&(Vn[0]=Wn(d)*i+t,Vn[1]=Fn(d)*r+e,l(s,Vn,s),u(h,Vn,h))};var Yn=On,Gn=Ni.devicePixelRatio,Zn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qn=[],$n=[],Kn=[],Jn=[],ta=Math.min,ea=Math.max,ia=Math.cos,ra=Math.sin,na=Math.sqrt,aa=Math.abs,oa="undefined"!=typeof Float32Array,sa=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};sa.prototype={constructor:sa,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=aa(1/Gn/t)||0,this._uy=aa(1/Gn/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Zn.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=aa(t-this._xi)>this._ux||aa(e-this._yi)>this._uy||this._len<5;return this.addData(Zn.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,r,n,a){return this.addData(Zn.C,t,e,i,r,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,r,n,a):this._ctx.bezierCurveTo(t,e,i,r,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(t,e,i,r){return this.addData(Zn.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},arc:function(t,e,i,r,n,a){return this.addData(Zn.A,t,e,i,i,r,n-r,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,r,n,a),this._xi=ia(n)*i+t,this._yi=ra(n)*i+t,this},arcTo:function(t,e,i,r,n){return this._ctx&&this._ctx.arcTo(t,e,i,r,n),this},rect:function(t,e,i,r){return this._ctx&&this._ctx.rect(t,e,i,r),this.addData(Zn.R,t,e,i,r),this},closePath:function(){this.addData(Zn.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},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&d<=t||u<0&&d>=t||0==u&&(c>0&&p<=e||c<0&&p>=e);)d+=u*(i=o[r=this._dashIdx]),p+=c*i,this._dashIdx=(r+1)%v,u>0&&dh||c>0&&pl||s[r%2?"moveTo":"lineTo"](u>=0?ta(d,t):ea(d,t),c>=0?ta(p,e):ea(p,e));u=d-t,c=p-e,this._dashOffset=-na(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,n,a){var o,s,h,l,u,c=this._dashSum,f=this._dashOffset,d=this._lineDash,p=this._ctx,v=this._xi,g=this._yi,_=Bn.cubicAt,m=0,y=this._dashIdx,x=d.length,b=0;for(f<0&&(f=c+f),f%=c,o=0;o<1;o+=.1)s=_(v,t,i,n,o+.1)-_(v,t,i,n,o),h=_(g,e,r,a,o+.1)-_(g,e,r,a,o),m+=na(s*s+h*h);for(;yf);y++);for(o=(b-f)/m;o<=1;)l=_(v,t,i,n,o),u=_(g,e,r,a,o),y%2?p.moveTo(l,u):p.lineTo(l,u),o+=d[y]/m,y=(y+1)%x;y%2!=0&&p.lineTo(n,a),s=n-l,h=a-u,this._dashOffset=-na(s*s+h*h)},_dashedQuadraticTo:function(t,e,i,r){var n=i,a=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,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,oa&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Qn[0]=Qn[1]=Kn[0]=Kn[1]=Number.MAX_VALUE,$n[0]=$n[1]=Jn[0]=Jn[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,r=0,n=0,a=0;ah||aa(o-n)>l||c===u-1)&&(t.lineTo(a,o),r=a,n=o);break;case Zn.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case Zn.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case Zn.A:var d=s[c++],p=s[c++],v=s[c++],g=s[c++],_=s[c++],m=s[c++],y=s[c++],x=s[c++],b=v>g?v:g,w=v>g?1:v/g,T=v>g?g/v:1,k=_+m;Math.abs(v-g)>.001?(t.translate(d,p),t.rotate(y),t.scale(w,T),t.arc(0,0,b,_,k,1-x),t.scale(1/w,1/T),t.rotate(-y),t.translate(-d,-p)):t.arc(d,p,b,_,k,1-x),1==c&&(e=ia(_)*v+d,i=ra(_)*g+p),r=ia(k)*v+d,n=ra(k)*g+p;break;case Zn.R:e=r=s[c],i=n=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Zn.Z:t.closePath(),r=e,n=i}}}},sa.CMD=Zn;var ha=sa,la={containStroke:function(t,e,i,r,n,a,o){if(0===n)return!1;var s=n,h=0,l=t;if(o>e+s&&o>r+s||ot+s&&a>i+s||ae+c&&u>r+c&&u>a+c&&u>s+c||ut+c&&l>i+c&&l>n+c&&l>o+c||le+l&&h>r+l&&h>a+l||ht+l&&s>i+l&&s>n+l||si||u+ln&&(n+=va);var f=Math.atan2(h,s);return f<0&&(f+=va),f>=r&&f<=n||f+va>=r&&f+va<=n}},_a=function(t,e,i,r,n,a){if(a>e&&a>r||an?o:0},ma=ha.CMD,ya=da.normalizeRadian,xa=la.containStroke,ba=2*Math.PI,wa=1e-4,Ta=[-1,-1,-1],ka=[-1,-1],Pa={contain:function(t,e,i){return ue(t,0,!1,e,i)},containStroke:function(t,e,i,r){return ue(t,e,!0,i,r)}},Sa=Ir.prototype.getCanvasPattern,Ca=Math.abs,Ma=new ha(!0);ce.prototype={constructor:ce,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,r=this.path||Ma,n=i.hasStroke(),a=i.hasFill(),o=i.fill,s=i.stroke,h=a&&!!o.colorStops,l=n&&!!s.colorStops,u=a&&!!o.image,c=n&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var f;h&&(f=f||this.getBoundingRect(),this._fillGradient=i.getGradient(t,o,f)),l&&(f=f||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,f))}h?t.fillStyle=this._fillGradient:u&&(t.fillStyle=Sa.call(o,t)),l?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Sa.call(s,t));var d=i.lineDash,p=i.lineDashOffset,v=!!t.setLineDash,g=this.getGlobalScale();r.setScale(g[0],g[1]),this.__dirtyPath||d&&!v&&n?(r.beginPath(t),d&&!v&&(r.setLineDash(d),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&r.fill(t),d&&v&&(t.setLineDash(d),t.lineDashOffset=p),n&&r.stroke(t),d&&v&&t.setLineDash([]),this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new ha},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var r=this.path;r||(r=this.path=new ha),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),t=r.getBoundingRect()}if(this._rect=t,e.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){n.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(n.width+=a/o,n.height+=a/o,n.x-=a/o/2,n.y-=a/o/2)}return n}return t},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 a=this.path.data;if(n.hasStroke()){var o=n.lineWidth,s=n.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(n.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Pa.containStroke(a,o/s,t,e)))return!0}if(n.hasFill())return Pa.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):fn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(ai.isObject(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Ca(t[0]-1)>1e-10&&Ca(t[3]-1)>1e-10?Math.sqrt(Ca(t[0]*t[3]-t[2]*t[1])):1}},ce.extend=function(t){var e=function(e){ce.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var n in i)!r.hasOwnProperty(n)&&i.hasOwnProperty(n)&&(r[n]=i[n])}t.init&&t.init.call(this,e)};ai.inherits(e,ce);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},ai.inherits(ce,fn);var La=ce,Aa=La.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;ii-2?i-1:c+1],l=t[c>i-3?i-1:c+2]);var p=f*f,v=f*p;r.push([de(s[0],d[0],h[0],l[0],f,p,v),de(s[1],d[1],h[1],l[1],f,p,v)])}return r},Ka=hi.min,Ja=hi.max,to=hi.scale,eo=hi.distance,io=hi.add,ro=function(t,e,i,r){var n,a,o,s,h=[],l=[],u=[],c=[];if(r){o=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,d=t.length;f=2){if(n&&"spline"!==n){var a=ro(r,n,i,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var o=r.length,s=0;s<(i?o:o-1);s++){var h=a[2*s],l=a[2*s+1],u=r[(s+1)%o];t.bezierCurveTo(h[0],h[1],l[0],l[1],u[0],u[1])}}else{"spline"===n&&(r=$a(r,i)),t.moveTo(r[0][0],r[0][1]);for(var s=1,c=r.length;s=11?function(){var e,i=this.__clipPaths,r=this.style;if(i)for(var n=0;n4?a*_o(2*go/i)/_o(go/i):a/3);var s=go/i,h=-go/2,l=r+a*_o(h),u=n+a*mo(h);h+=s,t.moveTo(l,u);for(var c,f=0,d=2*i-1;f=n&&l+1>=a){for(var u=[],c=0;c=n&&c+1>=a)return Me(0,s.components);h[i]=s}else h[i]=void 0}o++}();if(f)return f}},pushComponent:function(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}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,r){for(var n=e.length,a=i.length,o=t.newPos,s=o-r,h=0;o+1=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},Ae.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t._dom&&i.contains(t._dom))"function"==typeof e&&e();else{var r=this.add(t);r&&(t._dom=r)}}},Ae.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Ae.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},Ae.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return ai.each(this._tagNames,function(i){var r=t.getElementsByTagName(i);e=e.concat([].slice.call(r))}),e},Ae.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;ai.each(t,function(t){t[e._markLabel]="0"})},Ae.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Ae.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;ai.each(e,function(e){"1"!==e[i._markLabel]&&t.removeChild(e)})}},Ae.prototype.getSvgProxy=function(t){return t instanceof La?us:t instanceof dn?cs:t instanceof Ra?fs:us},Ae.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Ae.prototype.getSvgElement=function(t){return t.__svgEl};var ds=Ae;ai.inherits(ze,ds),ze.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;ai.each(["fill","stroke"],function(r){if(e.style[r]&&("linear"===e.style[r].type||"radial"===e.style[r].type)){var n,a=e.style[r],o=i.getDefs(!0);a._dom?(n=a._dom,o.contains(a._dom)||i.addDom(n)):n=i.add(a),i.markUsed(e);var s=n.getAttribute("id");t.setAttribute(r,"url(#"+s+")")}})}},ze.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Xi("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},ze.prototype.update=function(t){var e=this;ds.prototype.update.call(this,t,function(){var i=t.type,r=t._dom.tagName;"linear"===i&&"linearGradient"===r||"radial"===i&&"radialGradient"===r?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},ze.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Xi("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;r0){var r,n,a=this.getDefs(!0),o=e[0],s=i?"_textDom":"_dom";o[s]?(n=o[s].getAttribute("id"),r=o[s],a.contains(r)||a.appendChild(r)):(n="zr-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",n),a.appendChild(r),o[s]=r);var h=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var l=Array.prototype.slice.call(o.transform);yi.mul(o.transform,o.parent.invTransform,o.transform),h.brush(o),o.transform=l}else h.brush(o);var u=this.getSvgElement(o);r.appendChild(u),t.setAttribute("clip-path","url(#"+n+")"),e.length>1&&this.updateDom(r,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},Re.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&ai.each(t.__clipPaths,function(t){t._dom&&ds.prototype.markUsed.call(e,t._dom),t._textDom&&ds.prototype.markUsed.call(e,t._textDom)})};var vs=Re,gs=ss.path,_s=ss.image,ms=ss.text,ys=No.createElement,xs=function(t,e){this.root=t,this.storage=e;var i=ys("svg");this.gradientManager=new ps(i),this.clipPathManager=new vs(i);var r=document.createElement("div");r.style.cssText="overflow: hidden;",this._svgRoot=i,this._viewport=r,t.appendChild(r),r.appendChild(i),this.resize(),this._visibleList=[]};xs.prototype={constructor:xs,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused();var e,i=this._svgRoot,r=this._visibleList,n=t.length,a=[];for(e=0;e=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},resize:function(){var t=this._getWidth(),e=this._getHeight();if(this._width!==t&&this._height!==e){this._width=t,this._height=e;var i=this._viewport.style;i.width=t+"px",i.height=e+"px";var r=this._svgRoot;r.setAttribute("width",t),r.setAttribute("height",e)}},getWidth:function(){return this._getWidth()},getHeight:function(){return this._getHeight()},_getWidth:function(){var t=this.root,e=document.defaultView.getComputedStyle(t);return(t.clientWidth||Ee(e.width))-Ee(e.paddingLeft)-Ee(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=document.defaultView.getComputedStyle(t);return(t.clientHeight||Ee(e.height))-Ee(e.paddingTop)-Ee(e.paddingBottom)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)}};for(var bs=["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],ws=0;ws')}}catch(t){e=function(t){return r.createElement("<"+t+' xmlns="'+i+'" class="zrvml">')}}t.exports={doc:r,initVML:function(){if(!n){n=!0;var t=r.styleSheets;t.length<31?r.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}},createNode:e}}});if(!Ye.canvasSupported){var Ss=hi,Cs=ir,Ms=ha.CMD,Ls=Hi,As=Kr,zs=hn,Rs=cn,Es=fn,Ds=dn,Bs=Ra,Os=La,Is=ha,Hs=ko,Fs=Ps,Ws=Math.round,qs=Math.sqrt,js=Math.abs,Vs=Math.cos,Ns=Math.sin,Xs=Math.max,Us=Ss.applyTransform,Ys=21600,Gs=Ys/2,Zs=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ys+","+Ys,t.coordorigin="0,0"},Qs=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},$s=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},Ks=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Js=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},th=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},eh=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},ih=function(t,e,i){var r=Ls.parse(e);i=+i,isNaN(i)&&(i=1),r&&(t.color=$s(r[0],r[1],r[2]),t.opacity=i*r[3])},rh=function(t){var e=Ls.parse(t);return[$s(e[0],e[1],e[2]),e[3]]},nh=function(t,e,i){var r=e.fill;if(null!=r)if(r instanceof Hs){var n,a=0,o=[0,0],s=0,h=1,l=i.getBoundingRect(),u=l.width,c=l.height;if("linear"===r.type){n="gradient";var f=i.transform,d=[r.x*u,r.y*c],p=[r.x2*u,r.y2*c];f&&(Us(d,d,f),Us(p,p,f));var v=p[0]-d[0],g=p[1]-d[1];(a=180*Math.atan2(v,g)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{n="gradientradial";var d=[r.x*u,r.y*c],f=i.transform,_=i.scale,m=u,y=c;o=[(d[0]-l.x)/m,(d[1]-l.y)/y],f&&Us(d,d,f),m/=_[0]*Ys,y/=_[1]*Ys;var x=Xs(m,y);s=0/x,h=2*r.r/x-s}var b=r.colorStops.slice();b.sort(function(t,e){return t.offset-e.offset});for(var w=b.length,T=[],k=[],P=0;P=2){var M=T[0][0],L=T[1][0],A=T[0][1]*e.opacity,z=T[1][1]*e.opacity;t.type=n,t.method="none",t.focus="100%",t.angle=a,t.color=M,t.color2=L,t.colors=k.join(","),t.opacity=z,t.opacity2=A}"radial"===n&&(t.focusposition=o.join(","))}else ih(t,r,e.opacity)},ah=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof Hs||ih(t,e.stroke,e.opacity)},oh=function(t,e,i,r){var n="fill"==e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(n||!n&&i.lineWidth)?(t[n?"filled":"stroked"]="true",i[e]instanceof Hs&&Js(t,a),a||(a=Fs.createNode(e)),n?nh(a,i,r):ah(a,i),Ks(t,a)):(t[n?"filled":"stroked"]="false",Js(t,a))},sh=[[],[],[]],hh=function(t,e){var i,r,n,a,o,s,h=Ms.M,l=Ms.C,u=Ms.L,c=Ms.A,f=Ms.Q,d=[];for(a=0;a.01?z&&(R+=.0125):Math.abs(E-S)<1e-4?z&&RP?_-=.0125:_+=.0125:z&&ES?g+=.0125:g-=.0125),d.push(D,Ws(((P-C)*w+x)*Ys-Gs),",",Ws(((S-M)*T+b)*Ys-Gs),",",Ws(((P+C)*w+x)*Ys-Gs),",",Ws(((S+M)*T+b)*Ys-Gs),",",Ws((R*w+x)*Ys-Gs),",",Ws((E*T+b)*Ys-Gs),",",Ws((g*w+x)*Ys-Gs),",",Ws((_*T+b)*Ys-Gs)),o=g,s=_;break;case Ms.R:var B=sh[0],O=sh[1];B[0]=t[a++],B[1]=t[a++],O[0]=B[0]+t[a++],O[1]=B[1]+t[a++],e&&(Us(B,B,e),Us(O,O,e)),B[0]=Ws(B[0]*Ys-Gs),O[0]=Ws(O[0]*Ys-Gs),B[1]=Ws(B[1]*Ys-Gs),O[1]=Ws(O[1]*Ys-Gs),d.push(" m ",B[0],",",B[1]," l ",O[0],",",B[1]," l ",O[0],",",O[1]," l ",B[0],",",O[1]);break;case Ms.Z:d.push(" x ")}if(i>0){d.push(r);for(var I=0;I100&&(fh=0,ch={});var i,r=dh.style;try{r.font=t,i=r.fontFamily.split(",")[0]}catch(t){}e={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:i||"Microsoft YaHei"},ch[t]=e,fh++}return e};As.measureText=function(t,e){var i=Fs.doc;uh||((uh=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",Fs.doc.body.appendChild(uh));try{uh.style.font=e}catch(t){}return uh.innerHTML="",uh.appendChild(i.createTextNode(t)),{width:uh.offsetWidth}};for(var vh=new Cs,gh=[Rs,Es,Ds,Os,Bs],_h=0;_h