zrender.min.js 135 KB

12
  1. !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.zrender={})}(this,function(t){"use strict";function e(t){if(null==t||"object"!=typeof t)return t;var i=t,r=wr.call(t);if("[object Array]"===r){i=[];for(var n=0,a=t.length;n<a;n++)i[n]=e(t[n])}else if(xr[r]){var o=t.constructor;if(t.constructor.from)i=o.from(t);else{i=new o(t.length);for(var n=0,a=t.length;n<a;n++)i[n]=e(t[n])}}else if(!yr[r]&&!b(t)&&!m(t)){i={};for(var s in t)t.hasOwnProperty(s)&&(i[s]=e(t[s]))}return i}function i(t,r,n){if(!g(r)||!g(t))return n?e(r):t;for(var a in r)if(r.hasOwnProperty(a)){var o=t[a],s=r[a];!g(s)||!g(o)||d(s)||d(o)||m(s)||m(o)||_(s)||_(o)||b(s)||b(o)?!n&&a in t||(t[a]=e(r[a],!0)):i(o,s,n)}return t}function r(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function n(t,e,i){for(var r in e)e.hasOwnProperty(r)&&(i?null!=e[r]:null==t[r])&&(t[r]=e[r]);return t}function a(){return Ar||(Ar=Lr().getContext("2d")),Ar}function o(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i}return-1}function s(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}function h(t,e,i){n(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function l(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function u(t,e,i){if(t&&e)if(t.forEach&&t.forEach===kr)t.forEach(e,i);else if(t.length===+t.length)for(var r=0,n=t.length;r<n;r++)e.call(i,t[r],r,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function c(t,e,i){if(t&&e){if(t.map&&t.map===Mr)return t.map(e,i);for(var r=[],n=0,a=t.length;n<a;n++)r.push(e.call(i,t[n],n,t));return r}}function f(t,e){var i=Cr.call(arguments,2);return function(){return t.apply(e,i.concat(Cr.call(arguments)))}}function d(t){return"[object Array]"===wr.call(t)}function p(t){return"function"==typeof t}function v(t){return"[object String]"===wr.call(t)}function g(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function _(t){return!!yr[wr.call(t)]}function m(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function y(t,e){return null!=t?t:e}function x(t,e,i){return null!=t?t:null!=e?e:i}function w(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function b(t){return t[zr]}function k(t){t&&u(t,function(t,e){this.set(e,t)},this)}function T(t,e){var i=new Br(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function C(t){var e=new Br(2);return e[0]=t[0],e[1]=t[1],e}function M(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function P(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function S(t){return Math.sqrt(L(t))}function L(t){return t[0]*t[0]+t[1]*t[1]}function A(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function z(t,e){var i=S(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function R(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function B(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function D(t,e,i){var r=e[0],n=e[1];return t[0]=i[0]*r+i[2]*n+i[4],t[1]=i[1]*r+i[3]*n+i[5],t}function E(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function I(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function O(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function H(t,e){return{target:t,topTarget:e&&e.topTarget}}function F(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which}}function W(){}function V(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var r,n=t;n;){if(n.clipPath&&!n.clipPath.contain(e,i))return!1;n.silent&&(r=!0),n=n.parent}return!r||Vr}return!1}function N(){var t=new jr(6);return q(t),t}function q(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function j(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function X(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}function Y(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function U(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}function G(t,e,i){var r=i[0],n=i[1];return t[0]=e[0]*r,t[1]=e[1]*n,t[2]=e[2]*r,t[3]=e[3]*n,t[4]=e[4]*r,t[5]=e[5]*n,t}function Z(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}function Q(t){return t>Ur||t<-Ur}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 K(t){return(t=Math.round(t))<0?0:t>255?255:t}function J(t){return(t=Math.round(t))<0?0:t>360?360:t}function tt(t){return t<0?0:t>1?1:t}function et(t){return K(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function it(t){return tt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function rt(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 nt(t,e,i){return t+(e-t)*i}function at(t,e,i,r,n){return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t}function ot(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function st(t,e){on&&ot(on,e),on=an.put(t,on||e.slice())}function ht(t,e){if(t){e=e||[];var i=an.get(t);if(i)return ot(e,i);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in nn)return ot(e,nn[r]),st(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 at(e,0,0,0,1);h=it(s.pop());case"rgb":return 3!==s.length?void at(e,0,0,0,1):(at(e,et(s[0]),et(s[1]),et(s[2]),h),st(t,e),e);case"hsla":return 4!==s.length?void at(e,0,0,0,1):(s[3]=it(s[3]),lt(s,e),st(t,e),e);case"hsl":return 3!==s.length?void at(e,0,0,0,1):(lt(s,e),st(t,e),e);default:return}}at(e,0,0,0,1)}else{if(4===r.length)return(l=parseInt(r.substr(1),16))>=0&&l<=4095?(at(e,(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1),st(t,e),e):void at(e,0,0,0,1);if(7===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=16777215?(at(e,(16711680&l)>>16,(65280&l)>>8,255&l,1),st(t,e),e):void at(e,0,0,0,1)}}}}function lt(t,e){var i=(parseFloat(t[0])%360+360)%360/360,r=it(t[1]),n=it(t[2]),a=n<=.5?n*(r+1):n+r-n*r,o=2*n-a;return e=e||[],at(e,K(255*rt(o,a,i+1/3)),K(255*rt(o,a,i)),K(255*rt(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ut(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 ct(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]=K(nt(o[0],s[0],h)),i[1]=K(nt(o[1],s[1],h)),i[2]=K(nt(o[2],s[2],h)),i[3]=tt(nt(o[3],s[3],h)),i}}function ft(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=ht(e[n]),s=ht(e[a]),h=r-n,l=dt([K(nt(o[0],s[0],h)),K(nt(o[1],s[1],h)),K(nt(o[2],s[2],h)),tt(nt(o[3],s[3],h))],"rgba");return i?{color:l,leftIndex:n,rightIndex:a,value:r}:l}}function dt(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 pt(t,e){return t[e]}function vt(t,e,i){t[e]=i}function gt(t,e,i){return(e-t)*i+t}function _t(t,e,i){return i>.5?e:t}function mt(t,e,i,r,n){var a=t.length;if(1==n)for(s=0;s<a;s++)r[s]=gt(t[s],e[s],i);else for(var o=a&&t[0].length,s=0;s<a;s++)for(var h=0;h<o;h++)r[s][h]=gt(t[s][h],e[s][h],i)}function yt(t,e,i){var r=t.length,n=e.length;if(r!==n)if(r>n)t.length=n;else for(o=r;o<n;o++)t.push(1===i?e[o]:un.call(e[o]));for(var a=t[0]&&t[0].length,o=0;o<t.length;o++)if(1===i)isNaN(t[o])&&(t[o]=e[o]);else for(var s=0;s<a;s++)isNaN(t[o][s])&&(t[o][s]=e[o][s])}function xt(t,e,i){if(t===e)return!0;var r=t.length;if(r!==e.length)return!1;if(1===i){for(a=0;a<r;a++)if(t[a]!==e[a])return!1}else for(var n=t[0].length,a=0;a<r;a++)for(var o=0;o<n;o++)if(t[a][o]!==e[a][o])return!1;return!0}function wt(t,e,i,r,n,a,o,s,h){var l=t.length;if(1==h)for(c=0;c<l;c++)s[c]=bt(t[c],e[c],i[c],r[c],n,a,o);else for(var u=t[0].length,c=0;c<l;c++)for(var f=0;f<u;f++)s[c][f]=bt(t[c][f],e[c][f],i[c][f],r[c][f],n,a,o)}function bt(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 kt(t){if(l(t)){var e=t.length;if(l(t[0])){for(var i=[],r=0;r<e;r++)i.push(un.call(t[r]));return i}return un.call(t)}return t}function Tt(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Ct(t){var e=t[t.length-1].value;return l(e&&e[0])?2:1}function Mt(t,e,i,r,n,a){var o=t._getter,s=t._setter,h="spline"===e,u=r.length;if(u){var c,f=l(r[0].value),d=!1,p=!1,v=f?Ct(r):0;r.sort(function(t,e){return t.time-e.time}),c=r[u-1].time;for(var g=[],_=[],m=r[0].value,y=!0,x=0;x<u;x++){g.push(r[x].time/c);var w=r[x].value;if(f&&xt(w,m,v)||!f&&w===m||(y=!1),m=w,"string"==typeof w){var b=ht(w);b?(w=b,d=!0):p=!0}_.push(w)}if(a||!y){for(var k=_[u-1],x=0;x<u-1;x++)f?yt(_[x],k,v):!isNaN(_[x])||isNaN(k)||p||d||(_[x]=k);f&&yt(o(t._target,n),k,v);var T,C,M,P,S,L,A=0,z=0;if(d)var R=[0,0,0,0];var B=new $({target:t._target,life:c,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<z){for(i=T=Math.min(A+1,u-1);i>=0&&!(g[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=A;i<u&&!(g[i]>e);i++);i=Math.min(i-1,u-2)}A=i,z=e;var r=g[i+1]-g[i];if(0!==r)if(C=(e-g[i])/r,h)if(P=_[i],M=_[0===i?i:i-1],S=_[i>u-2?u-1:i+1],L=_[i>u-3?u-1:i+2],f)wt(M,P,S,L,C,C*C,C*C*C,o(t,n),v);else{if(d)a=wt(M,P,S,L,C,C*C,C*C*C,R,1),a=Tt(R);else{if(p)return _t(P,S,C);a=bt(M,P,S,L,C,C*C,C*C*C)}s(t,n,a)}else if(f)mt(_[i],_[i+1],C,o(t,n),v);else{var a;if(d)mt(_[i],_[i+1],C,R,1),a=Tt(R);else{if(p)return _t(_[i],_[i+1],C);a=gt(_[i],_[i+1],C)}s(t,n,a)}},ondestroy:i});return e&&"spline"!==e&&(B.easing=e),B}}}function Pt(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 St(t){for(var e=0;t>=bn;)e|=1&t,t>>=1;return t+e}function Lt(t,e,i,r){var n=e+1;if(n===i)return 1;if(r(t[n++],t[e])<0){for(;n<i&&r(t[n],t[n-1])<0;)n++;At(t,e,n)}else for(;n<i&&r(t[n],t[n-1])>=0;)n++;return n-e}function At(t,e,i){for(i--;e<i;){var r=t[e];t[e++]=t[i],t[i--]=r}}function zt(t,e,i,r,n){for(r===e&&r++;r<i;r++){for(var a,o=t[r],s=e,h=r;s<h;)n(o,t[a=s+h>>>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 Rt(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])>0){for(s=r-n;h<s&&a(t,e[i+n+h])>0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}else{for(s=n+1;h<s&&a(t,e[i+n-h])<=0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s);var l=o;o=n-h,h=n-l}for(o++;o<h;){var u=o+(h-o>>>1);a(t,e[i+u])>0?o=u+1:h=u}return h}function Bt(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])<0){for(s=n+1;h<s&&a(t,e[i+n-h])<0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s);var l=o;o=n-h,h=n-l}else{for(s=r-n;h<s&&a(t,e[i+n+h])>=0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}for(o++;o<h;){var u=o+(h-o>>>1);a(t,e[i+u])<0?h=u:o=u+1}return h}function Dt(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=Bt(t[u],t,s,l,0,e);s+=f,0!==(l-=f)&&0!==(c=Rt(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<r;o++)l[o]=t[i+o];var h=0,u=n,c=i;if(t[c++]=t[u++],0!=--a)if(1!==r){for(var f,d,p,v=s;;){f=0,d=0,p=!1;do{if(e(t[u],l[h])<0){if(t[c++]=t[u++],d++,f=0,0==--a){p=!0;break}}else if(t[c++]=l[h++],f++,d=0,1==--r){p=!0;break}}while((f|d)<v);if(p)break;do{if(0!==(f=Bt(t[u],l,h,r,0,e))){for(o=0;o<f;o++)t[c+o]=l[h+o];if(c+=f,h+=f,(r-=f)<=1){p=!0;break}}if(t[c++]=t[u++],0==--a){p=!0;break}if(0!==(d=Rt(l[h],t,u,a,0,e))){for(o=0;o<d;o++)t[c+o]=t[u+o];if(c+=d,u+=d,0===(a-=d)){p=!0;break}}if(t[c++]=l[h++],1==--r){p=!0;break}v--}while(f>=kn||d>=kn);if(p)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===r){for(o=0;o<a;o++)t[c+o]=t[u+o];t[c+a]=l[h]}else{if(0===r)throw new Error;for(o=0;o<r;o++)t[c+o]=l[h+o]}}else{for(o=0;o<a;o++)t[c+o]=t[u+o];t[c+a]=l[h]}else for(o=0;o<r;o++)t[c+o]=l[h+o]}function n(i,r,n,a){var o=0;for(o=0;o<a;o++)l[o]=t[n+o];var h=i+r-1,u=a-1,c=n+a-1,f=0,d=0;if(t[c--]=t[h--],0!=--r)if(1!==a){for(var p=s;;){var v=0,g=0,_=!1;do{if(e(l[u],t[h])<0){if(t[c--]=t[h--],v++,g=0,0==--r){_=!0;break}}else if(t[c--]=l[u--],g++,v=0,1==--a){_=!0;break}}while((v|g)<p);if(_)break;do{if(0!=(v=r-Bt(l[u],t,i,r,r-1,e))){for(r-=v,d=(c-=v)+1,f=(h-=v)+1,o=v-1;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-Rt(t[h],l,0,a,a-1,e))){for(a-=g,d=(c-=g)+1,f=(u-=g)+1,o=0;o<g;o++)t[d+o]=l[f+o];if(a<=1){_=!0;break}}if(t[c--]=t[h--],0==--r){_=!0;break}p--}while(v>=kn||g>=kn);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<a;o++)t[f+o]=l[o]}}else{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 for(f=c-(a-1),o=0;o<a;o++)t[f+o]=l[o]}var a,o,s=kn,h=0,l=[];a=[],o=[],this.mergeRuns=function(){for(;h>1;){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]&&t--;else if(o[t]>o[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;h>1;){var t=h-2;t>0&&o[t-1]<o[t+1]&&t--,i(t)}},this.pushRun=function(t,e){a[h]=t,o[h]=e,h+=1}}function Et(t,e,i,r){i||(i=0),r||(r=t.length);var n=r-i;if(!(n<2)){var a=0;if(n<bn)return a=Lt(t,i,r,e),void zt(t,i,r,i+a,e);var o=new Dt(t,e),s=St(n);do{if((a=Lt(t,i,r,e))<s){var h=n;h>s&&(h=s),zt(t,i,i+h,i+a,e),a=h}o.pushRun(i,a),o.mergeRuns(),n-=a,i+=a}while(0!==n);o.forceMergeRuns()}}function It(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Ot(t,e,i){var r=null==e.x?0:e.x,n=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(r=r*i.width+i.x,n=n*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),t.createLinearGradient(r,a,n,o)}function Ht(t,e,i){var r=i.width,n=i.height,a=Math.min(r,n),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,h=null==e.r?.5:e.r;return e.global||(o=o*r+i.x,s=s*n+i.y,h*=a),t.createRadialGradient(o,s,0,o,s,h)}function Ft(){return!1}function Wt(t,e,i){var r=Lr(),n=e.getWidth(),a=e.getHeight(),o=r.style;return o.position="absolute",o.left=0,o.top=0,o.width=n+"px",o.height=a+"px",r.width=n*i,r.height=a*i,r.setAttribute("data-zr-dom-id",t),r}function Vt(t){if("string"==typeof t){var e=Bn.get(t);return e&&e.image}return t}function Nt(t,e,i,r,n){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=Bn.get(t),o={hostEl:i,cb:r,cbPayload:n};return a?!jt(e=a.image)&&a.pending.push(o):(!e&&(e=new Image),e.onload=qt,Bn.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function qt(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],r=i.cb;r&&r(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function jt(t){return t&&t.width&&t.height}function Xt(t,e){var i=t+":"+(e=e||Hn);if(Dn[i])return Dn[i];for(var r=(t+"").split("\n"),n=0,a=0,o=r.length;a<o;a++)n=Math.max(re(r[a],e).width,n);return En>In&&(En=0,Dn={}),En++,Dn[i]=n,n}function Yt(t,e,i,r,n,a,o){return a?Gt(t,e,i,r,n,a,o):Ut(t,e,i,r,n,o)}function Ut(t,e,i,r,n,a){var o=ne(t,e,n,a),s=Xt(t,e);n&&(s+=n[1]+n[3]);var h=o.outerHeight,l=new Pt(Zt(0,s,i),Qt(0,h,r),s,h);return l.lineHeight=o.lineHeight,l}function Gt(t,e,i,r,n,a,o){var s=ae(t,{rich:a,truncate:o,font:e,textAlign:i,textPadding:n}),h=s.outerWidth,l=s.outerHeight;return new Pt(Zt(0,h,i),Qt(0,l,r),h,l)}function Zt(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Qt(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function $t(t,e,i){var r=e.x,n=e.y,a=e.height,o=e.width,s=a/2,h="left",l="top";switch(t){case"left":r-=i,n+=s,h="right",l="middle";break;case"right":r+=i+o,n+=s,l="middle";break;case"top":r+=o/2,n-=i,h="center",l="bottom";break;case"bottom":r+=o/2,n+=a+i,h="center";break;case"inside":r+=o/2,n+=s,h="center",l="middle";break;case"insideLeft":r+=i,n+=s,l="middle";break;case"insideRight":r+=o-i,n+=s,h="right",l="middle";break;case"insideTop":r+=o/2,n+=i,h="center";break;case"insideBottom":r+=o/2,n+=a-i,h="center",l="bottom";break;case"insideTopLeft":r+=i,n+=i;break;case"insideTopRight":r+=o-i,n+=i,h="right";break;case"insideBottomLeft":r+=i,n+=a-i,l="bottom";break;case"insideBottomRight":r+=o-i,n+=a-i,h="right",l="bottom"}return{x:r,y:n,textAlign:h,textVerticalAlign:l}}function Kt(t,e,i,r,n){if(!e)return"";var a=(t+"").split("\n");n=Jt(e,i,r,n);for(var o=0,s=a.length;o<s;o++)a[o]=te(a[o],n);return a.join("\n")}function Jt(t,e,i,n){(n=r({},n)).font=e;var i=y(i,"...");n.maxIterations=y(n.maxIterations,2);var a=n.minChar=y(n.minChar,0);n.cnCharWidth=Xt("国",e);var o=n.ascCharWidth=Xt("a",e);n.placeholder=y(n.placeholder,"");for(var s=t=Math.max(0,t-1),h=0;h<a&&s>=o;h++)s-=o;var l=Xt(i);return l>s&&(i="",l=0),s=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=s,n.containerWidth=t,n}function te(t,e){var i=e.containerWidth,r=e.font,n=e.contentWidth;if(!i)return"";var a=Xt(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?ee(t,n,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*n/a):0;a=Xt(t=t.substr(0,s),r)}return""===t&&(t=e.placeholder),t}function ee(t,e,i,r){for(var n=0,a=0,o=t.length;a<o&&n<e;a++){var s=t.charCodeAt(a);n+=0<=s&&s<=127?i:r}return a}function ie(t){return Xt("国",t)}function re(t,e){return Fn.measureText(t,e)}function ne(t,e,i,r){null!=t&&(t+="");var n=ie(e),a=t?t.split("\n"):[],o=a.length*n,s=o;if(i&&(s+=i[0]+i[2]),t&&r){var h=r.outerHeight,l=r.outerWidth;if(null!=h&&s>h)t="",a=[];else if(null!=l)for(var u=Jt(l-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),c=0,f=a.length;c<f;c++)a[c]=te(a[c],u)}return{lines:a,height:o,outerHeight:s,lineHeight:n}}function ae(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var r,n=On.lastIndex=0;null!=(r=On.exec(t));){var a=r.index;a>n&&oe(i,t.substring(n,a)),oe(i,r[2],r[1]),n=On.lastIndex}n<t.length&&oe(i,t.substring(n,t.length));var o=i.lines,s=0,h=0,l=[],u=e.textPadding,c=e.truncate,f=c&&c.outerWidth,d=c&&c.outerHeight;u&&(null!=f&&(f-=u[1]+u[3]),null!=d&&(d-=u[0]+u[2]));for(A=0;A<o.length;A++){for(var p=o[A],v=0,g=0,_=0;_<p.tokens.length;_++){var m=(z=p.tokens[_]).styleName&&e.rich[z.styleName]||{},w=z.textPadding=m.textPadding,b=z.font=m.font||e.font,k=z.textHeight=y(m.textHeight,ie(b));if(w&&(k+=w[0]+w[2]),z.height=k,z.lineHeight=x(m.textLineHeight,e.textLineHeight,k),z.textAlign=m&&m.textAlign||e.textAlign,z.textVerticalAlign=m&&m.textVerticalAlign||"middle",null!=d&&s+z.lineHeight>d)return{lines:[],width:0,height:0};z.textWidth=Xt(z.text,b);var T=m.textWidth,C=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))z.percentWidth=T,l.push(z),T=0;else{if(C){T=z.textWidth;var M=m.textBackgroundColor,P=M&&M.image;P&&jt(P=Vt(P))&&(T=Math.max(T,P.width*k/P.height))}var S=w?w[1]+w[3]:0;T+=S;var L=null!=f?f-g:null;null!=L&&L<T&&(!C||L<S?(z.text="",z.textWidth=T=0):(z.text=Kt(z.text,L-S,b,c.ellipsis,{minChar:c.minChar}),z.textWidth=Xt(z.text,b),T=z.textWidth+S))}g+=z.width=T,m&&(v=Math.max(v,z.lineHeight))}p.width=g,p.lineHeight=v,s+=v,h=Math.max(h,g)}i.outerWidth=i.width=y(e.textWidth,h),i.outerHeight=i.height=y(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(var A=0;A<l.length;A++){var z=l[A],R=z.percentWidth;z.width=parseInt(R,10)/100*h}return i}function oe(t,e,i){for(var r=""===e,n=e.split("\n"),a=t.lines,o=0;o<n.length;o++){var s=n[o],h={styleName:i,text:s,isLineHolder:!s&&!r};if(o)a.push({tokens:[h]});else{var l=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=l.length;1===u&&l[0].isLineHolder?l[0]=h:(s||!u||r)&&l.push(h)}}}function se(t){return(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ")||t.textFont||t.font}function he(t,e){var i,r,n,a,o=e.x,s=e.y,h=e.width,l=e.height,u=e.r;h<0&&(o+=h,h=-h),l<0&&(s+=l,l=-l),"number"==typeof u?i=r=n=a=u:u instanceof Array?1===u.length?i=r=n=a=u[0]:2===u.length?(i=n=u[0],r=a=u[1]):3===u.length?(i=u[0],r=a=u[1],n=u[2]):(i=u[0],r=u[1],n=u[2],a=u[3]):i=r=n=a=0;var c;i+r>h&&(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)}function le(t){return ue(t),u(t.rich,ue),t}function ue(t){if(t){t.font=se(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Wn[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Vn[i]?i:"top",t.textPadding&&(t.textPadding=w(t.textPadding))}}function ce(t,e,i,r,n){r.rich?de(t,e,i,r,n):fe(t,e,i,r,n)}function fe(t,e,i,r,n){var a=we(e,"font",r.font||Hn),o=r.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=ne(i,a,o,r.truncate));var h=s.outerHeight,l=s.lines,u=s.lineHeight,c=xe(h,r,n),f=c.baseX,d=c.baseY,p=c.textAlign,v=c.textVerticalAlign;ve(e,r,n,f,d);var g=Qt(d,h,v),_=f,m=g,y=_e(r);if(y||o){var x=Xt(i,a);o&&(x+=o[1]+o[3]);var w=Zt(f,x,p);y&&me(t,e,r,w,g,x,h),o&&(_=Ce(f,p,o),m+=o[0])}we(e,"textAlign",p||"left"),we(e,"textBaseline","middle"),we(e,"shadowBlur",r.textShadowBlur||0),we(e,"shadowColor",r.textShadowColor||"transparent"),we(e,"shadowOffsetX",r.textShadowOffsetX||0),we(e,"shadowOffsetY",r.textShadowOffsetY||0),m+=u/2;var b=r.textStrokeWidth,k=be(r.textStroke,b),T=ke(r.textFill);k&&(we(e,"lineWidth",b),we(e,"strokeStyle",k)),T&&we(e,"fillStyle",T);for(var C=0;C<l.length;C++)k&&e.strokeText(l[C],_,m),T&&e.fillText(l[C],_,m),m+=u}function de(t,e,i,r,n){var a=t.__textCotentBlock;a&&!t.__dirty||(a=t.__textCotentBlock=ae(i,r)),pe(t,e,a,r,n)}function pe(t,e,i,r,n){var a=i.width,o=i.outerWidth,s=i.outerHeight,h=r.textPadding,l=xe(s,r,n),u=l.baseX,c=l.baseY,f=l.textAlign,d=l.textVerticalAlign;ve(e,r,n,u,c);var p=Zt(u,o,f),v=Qt(c,s,d),g=p,_=v;h&&(g+=h[3],_+=h[0]);var m=g+a;_e(r)&&me(t,e,r,p,v,o,s);for(var y=0;y<i.lines.length;y++){for(var x,w=i.lines[y],b=w.tokens,k=b.length,T=w.lineHeight,C=w.width,M=0,P=g,S=m,L=k-1;M<k&&(!(x=b[M]).textAlign||"left"===x.textAlign);)ge(t,e,x,r,T,_,P,"left"),C-=x.width,P+=x.width,M++;for(;L>=0&&"right"===(x=b[L]).textAlign;)ge(t,e,x,r,T,_,S,"right"),C-=x.width,S-=x.width,L--;for(P+=(a-(P-g)-(m-S)-C)/2;M<=L;)ge(t,e,x=b[M],r,T,_,P+x.width/2,"center"),P+=x.width,M++;_+=T}}function ve(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 ge(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&&_e(h)&&me(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=Ce(o,s,c),u-=i.height/2-c[2]-i.textHeight/2),we(e,"shadowBlur",x(h.textShadowBlur,r.textShadowBlur,0)),we(e,"shadowColor",h.textShadowColor||r.textShadowColor||"transparent"),we(e,"shadowOffsetX",x(h.textShadowOffsetX,r.textShadowOffsetX,0)),we(e,"shadowOffsetY",x(h.textShadowOffsetY,r.textShadowOffsetY,0)),we(e,"textAlign",s),we(e,"textBaseline","middle"),we(e,"font",i.font||Hn);var f=be(h.textStroke||r.textStroke,p),d=ke(h.textFill||r.textFill),p=y(h.textStrokeWidth,r.textStrokeWidth);f&&(we(e,"lineWidth",p),we(e,"strokeStyle",f),e.strokeText(i.text,o,u)),d&&(we(e,"fillStyle",d),e.fillText(i.text,o,u))}function _e(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function me(t,e,i,r,n,a,o){var s=i.textBackgroundColor,h=i.textBorderWidth,l=i.textBorderColor,u=v(s);if(we(e,"shadowBlur",i.textBoxShadowBlur||0),we(e,"shadowColor",i.textBoxShadowColor||"transparent"),we(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),we(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||h&&l){e.beginPath();var c=i.textBorderRadius;c?he(e,{x:r,y:n,width:a,height:o,r:c}):e.rect(r,n,a,o),e.closePath()}if(u)we(e,"fillStyle",s),e.fill();else if(g(s)){var f=s.image;(f=Nt(f,null,t,ye,s))&&jt(f)&&e.drawImage(f,r,n,a,o)}h&&l&&(we(e,"lineWidth",h),we(e,"strokeStyle",l),e.stroke())}function ye(t,e){e.image=t}function xe(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+Te(s[0],i.width),n=i.y+Te(s[1],i.height);else{var h=$t(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 we(t,e,i){return t[e]=i,t[e]}function be(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ke(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Te(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Ce(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Me(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Pe(t){t=t||{},_n.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Mn(t.style,this),this._rect=null,this.__clipPaths=[]}function Se(t){Pe.call(this,t)}function Le(t){return parseInt(t,10)}function Ae(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function ze(t){t.__unusedCount++}function Re(t){1==t.__unusedCount&&t.clear()}function Be(t,e,i){return jn.copy(t.getBoundingRect()),t.transform&&jn.applyTransform(t.transform),Xn.width=e,Xn.height=i,!jn.intersect(Xn)}function De(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}function Ee(t,e){for(var i=0;i<t.length;i++){var r=t[i];r.setTransform(e),e.beginPath(),r.buildPath(e,r.shape),e.clip(),r.restoreTransform(e)}}function Ie(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function Oe(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function He(t,e,i,r){return i=i||{},r||!mr.canvasSupported?Fe(t,e,i):mr.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Fe(t,e,i),i}function Fe(t,e,i){var r=Oe(t);i.zrX=e.clientX-r.left,i.zrY=e.clientY-r.top}function We(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&&He(t,n,e,i)}else He(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&&Gn.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ve(t,e,i){Un?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function Ne(t,e,i){Un?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function qe(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function je(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Xe(t){return"mousewheel"===t&&mr.browser.firefox?"DOMMouseScroll":t}function Ye(t,e,i){var r=t._gestureMgr;"start"===i&&r.clear();var n=r.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&r.clear(),n){var a=n.type;e.gestureEvent=a,t.handler.dispatchToElement({target:n.target},a,n.event)}}function Ue(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Ge(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Ze(t){function e(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}u(Jn,function(e){t._handlers[e]=f(ia[e],t)}),u(ea,function(e){t._handlers[e]=f(ia[e],t)}),u(Kn,function(i){t._handlers[i]=e(ia[i],t)})}function Qe(t){function e(e,i){u(e,function(e){Ve(t,Xe(e),i._handlers[e])},i)}Wr.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Qn,this._handlers={},Ze(this),mr.pointerEventsSupported?e(ea,this):(mr.touchEventsSupported&&e(Jn,this),e(Kn,this))}function $e(t,e){aa[t]=e}function Ke(t){delete oa[t]}function Je(t){return t>-ua&&t<ua}function ti(t){return t>ua||t<-ua}function ei(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 ii(t,e,i,r,n){var a=1-n;return 3*(((e-t)*a+2*(i-e)*n)*a+(r-i)*n*n)}function ri(t,e,i,r,n,a){var o=r+3*(e-i)-t,s=3*(i-2*e+t),h=3*(e-t),l=t-n,u=s*s-3*o*h,c=s*h-9*o*l,f=h*h-3*s*l,d=0;if(Je(u)&&Je(c))Je(s)?a[0]=0:(T=-h/s)>=0&&T<=1&&(a[d++]=T);else{var p=c*c-4*u*f;if(Je(p)){var v=c/u,g=-v/2;(T=-s/o+v)>=0&&T<=1&&(a[d++]=T),g>=0&&g<=1&&(a[d++]=g)}else if(p>0){var _=la(p),m=u*s+1.5*o*(-c+_),y=u*s+1.5*o*(-c-_);(T=(-s-((m=m<0?-ha(-m,da):ha(m,da))+(y=y<0?-ha(-y,da):ha(y,da))))/(3*o))>=0&&T<=1&&(a[d++]=T)}else{var x=(2*u*s-3*o*c)/(2*la(u*u*u)),w=Math.acos(x)/3,b=la(u),k=Math.cos(w),T=(-s-2*b*k)/(3*o),g=(-s+b*(k+fa*Math.sin(w)))/(3*o),C=(-s+b*(k-fa*Math.sin(w)))/(3*o);T>=0&&T<=1&&(a[d++]=T),g>=0&&g<=1&&(a[d++]=g),C>=0&&C<=1&&(a[d++]=C)}}return d}function ni(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(Je(o))ti(a)&&(c=-s/a)>=0&&c<=1&&(n[h++]=c);else{var l=a*a-4*o*s;if(Je(l))n[0]=-a/(2*o);else if(l>0){var u=la(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}function ai(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}function oi(t,e,i,r,n,a,o,s,h,l,u){var c,f,d,p,v,g=.005,_=1/0;pa[0]=h,pa[1]=l;for(var m=0;m<1;m+=.05)va[0]=ei(t,i,n,o,m),va[1]=ei(e,r,a,s,m),(p=Or(pa,va))<_&&(c=m,_=p);_=1/0;for(var y=0;y<32&&!(g<ca);y++)f=c-g,d=c+g,va[0]=ei(t,i,n,o,f),va[1]=ei(e,r,a,s,f),p=Or(va,pa),f>=0&&p<_?(c=f,_=p):(ga[0]=ei(t,i,n,o,d),ga[1]=ei(e,r,a,s,d),v=Or(ga,pa),d<=1&&v<_?(c=d,_=v):g*=.5);return u&&(u[0]=ei(t,i,n,o,c),u[1]=ei(e,r,a,s,c)),la(_)}function si(t,e,i,r){var n=1-r;return n*(n*t+2*r*e)+r*r*i}function hi(t,e,i,r){return 2*((1-r)*(e-t)+r*(i-e))}function li(t,e,i,r,n){var a=t-2*e+i,o=2*(e-t),s=t-r,h=0;if(Je(a))ti(o)&&(c=-s/o)>=0&&c<=1&&(n[h++]=c);else{var l=o*o-4*a*s;if(Je(l))(c=-o/(2*a))>=0&&c<=1&&(n[h++]=c);else if(l>0){var u=la(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}function ui(t,e,i){var r=t+i-2*e;return 0===r?.5:(t-e)/r}function ci(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}function fi(t,e,i,r,n,a,o,s,h){var l,u=.005,c=1/0;pa[0]=o,pa[1]=s;for(var f=0;f<1;f+=.05)va[0]=si(t,i,n,f),va[1]=si(e,r,a,f),(g=Or(pa,va))<c&&(l=f,c=g);c=1/0;for(var d=0;d<32&&!(u<ca);d++){var p=l-u,v=l+u;va[0]=si(t,i,n,p),va[1]=si(e,r,a,p);var g=Or(va,pa);if(p>=0&&g<c)l=p,c=g;else{ga[0]=si(t,i,n,v),ga[1]=si(e,r,a,v);var _=Or(ga,pa);v<=1&&_<c?(l=v,c=_):u*=.5}}return h&&(h[0]=si(t,i,n,l),h[1]=si(e,r,a,l)),la(c)}function di(t,e,i,r,n,a){n[0]=_a(t,i),n[1]=_a(e,r),a[0]=ma(t,i),a[1]=ma(e,r)}function pi(t,e,i,r,n,a,o,s,h,l){var u,c=ni,f=ei,d=c(t,i,n,o,Ca);for(h[0]=1/0,h[1]=1/0,l[0]=-1/0,l[1]=-1/0,u=0;u<d;u++){var p=f(t,i,n,o,Ca[u]);h[0]=_a(p,h[0]),l[0]=ma(p,l[0])}for(d=c(e,r,a,s,Ma),u=0;u<d;u++){var v=f(e,r,a,s,Ma[u]);h[1]=_a(v,h[1]),l[1]=ma(v,l[1])}h[0]=_a(t,h[0]),l[0]=ma(t,l[0]),h[0]=_a(o,h[0]),l[0]=ma(o,l[0]),h[1]=_a(e,h[1]),l[1]=ma(e,l[1]),h[1]=_a(s,h[1]),l[1]=ma(s,l[1])}function vi(t,e,i,r,n,a,o,s){var h=ui,l=si,u=ma(_a(h(t,i,n),1),0),c=ma(_a(h(e,r,a),1),0),f=l(t,i,n,u),d=l(e,r,a,c);o[0]=_a(t,n,f),o[1]=_a(e,a,d),s[0]=ma(t,n,f),s[1]=ma(e,a,d)}function gi(t,e,i,r,n,a,o,s,h){var l=E,u=I,c=Math.abs(n-a);if(c%wa<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-r,h[0]=t+i,void(h[1]=e+r);if(ba[0]=xa(n)*i+t,ba[1]=ya(n)*r+e,ka[0]=xa(a)*i+t,ka[1]=ya(a)*r+e,l(s,ba,ka),u(h,ba,ka),(n%=wa)<0&&(n+=wa),(a%=wa)<0&&(a+=wa),n>a&&!o?a+=wa:n<a&&o&&(n+=wa),o){var f=a;a=n,n=f}for(var d=0;d<a;d+=Math.PI/2)d>n&&(Ta[0]=xa(d)*i+t,Ta[1]=ya(d)*r+e,l(s,Ta,s),u(h,Ta,h))}function _i(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||o<e-s&&o<r-s||a>t+s&&a>i+s||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var u=(h=(e-r)/(t-i))*a-o+(l=(t*r-i*e)/(t-i));return u*u/(h*h+1)<=s/2*s/2}function mi(t,e,i,r,n,a,o,s,h,l,u){if(0===h)return!1;var c=h;return!(u>e+c&&u>r+c&&u>a+c&&u>s+c||u<e-c&&u<r-c&&u<a-c&&u<s-c||l>t+c&&l>i+c&&l>n+c&&l>o+c||l<t-c&&l<i-c&&l<n-c&&l<o-c)&&oi(t,e,i,r,n,a,o,s,l,u,null)<=c/2}function yi(t,e,i,r,n,a,o,s,h){if(0===o)return!1;var l=o;return!(h>e+l&&h>r+l&&h>a+l||h<e-l&&h<r-l&&h<a-l||s>t+l&&s>i+l&&s>n+l||s<t-l&&s<i-l&&s<n-l)&&fi(t,e,i,r,n,a,s,h,null)<=l/2}function xi(t){return(t%=Wa)<0&&(t+=Wa),t}function wi(t,e,i,r,n,a,o,s,h){if(0===o)return!1;var l=o;s-=t,h-=e;var u=Math.sqrt(s*s+h*h);if(u-l>i||u+l<i)return!1;if(Math.abs(r-n)%Va<1e-4)return!0;if(a){var c=r;r=xi(n),n=xi(c)}else r=xi(r),n=xi(n);r>n&&(n+=Va);var f=Math.atan2(h,s);return f<0&&(f+=Va),f>=r&&f<=n||f+Va>=r&&f+Va<=n}function bi(t,e,i,r,n,a){if(a>e&&a>r||a<e&&a<r)return 0;if(r===e)return 0;var o=r<e?1:-1,s=(a-e)/(r-e);return 1!==s&&0!==s||(o=r<e?.5:-.5),s*(i-t)+t>n?o:0}function ki(t,e){return Math.abs(t-e)<ja}function Ti(){var t=Ya[0];Ya[0]=Ya[1],Ya[1]=t}function Ci(t,e,i,r,n,a,o,s,h,l){if(l>e&&l>r&&l>a&&l>s||l<e&&l<r&&l<a&&l<s)return 0;var u=ri(e,r,a,s,l,Xa);if(0===u)return 0;for(var c,f,d=0,p=-1,v=0;v<u;v++){var g=Xa[v],_=0===g||1===g?.5:1;ei(t,i,n,o,g)<h||(p<0&&(p=ni(e,r,a,s,Ya),Ya[1]<Ya[0]&&p>1&&Ti(),c=ei(e,r,a,s,Ya[0]),p>1&&(f=ei(e,r,a,s,Ya[1]))),2==p?g<Ya[0]?d+=c<e?_:-_:g<Ya[1]?d+=f<c?_:-_:d+=s<f?_:-_:g<Ya[0]?d+=c<e?_:-_:d+=s<c?_:-_)}return d}function Mi(t,e,i,r,n,a,o,s){if(s>e&&s>r&&s>a||s<e&&s<r&&s<a)return 0;var h=li(e,r,a,s,Xa);if(0===h)return 0;var l=ui(e,r,a);if(l>=0&&l<=1){for(var u=0,c=si(e,r,a,l),f=0;f<h;f++){d=0===Xa[f]||1===Xa[f]?.5:1;(p=si(t,i,n,Xa[f]))<o||(Xa[f]<l?u+=c<e?d:-d:u+=a<c?d:-d)}return u}var d=0===Xa[0]||1===Xa[0]?.5:1,p=si(t,i,n,Xa[0]);return p<o?0:a<e?d:-d}function Pi(t,e,i,r,n,a,o,s){if((s-=e)>i||s<-i)return 0;l=Math.sqrt(i*i-s*s);Xa[0]=-l,Xa[1]=l;var h=Math.abs(r-n);if(h<1e-4)return 0;if(h%qa<1e-4){r=0,n=qa;p=a?1:-1;return o>=Xa[0]+t&&o<=Xa[1]+t?p:0}if(a){var l=r;r=xi(n),n=xi(l)}else r=xi(r),n=xi(n);r>n&&(n+=qa);for(var u=0,c=0;c<2;c++){var f=Xa[c];if(f+t>o){var d=Math.atan2(s,f),p=a?1:-1;d<0&&(d=qa+d),(d>=r&&d<=n||d+qa>=r&&d+qa<=n)&&(d>Math.PI/2&&d<1.5*Math.PI&&(p=-p),u+=p)}}return u}function Si(t,e,i,r,n){for(var a=0,o=0,s=0,h=0,l=0,u=0;u<t.length;){var c=t[u++];switch(c===Na.M&&u>1&&(i||(a+=bi(o,s,h,l,r,n))),1==u&&(h=o=t[u],l=s=t[u+1]),c){case Na.M:o=h=t[u++],s=l=t[u++];break;case Na.L:if(i){if(_i(o,s,t[u],t[u+1],e,r,n))return!0}else a+=bi(o,s,t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case Na.C:if(i){if(mi(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=Ci(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 Na.Q:if(i){if(yi(o,s,t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=Mi(o,s,t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case Na.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+=bi(o,s,y,x,r,n):(h=y,l=x);var w=(r-f)*v/p+f;if(i){if(wi(f,d,v,g,g+_,m,e,w,n))return!0}else a+=Pi(f,d,v,g,g+_,m,w,n);o=Math.cos(g+_)*p+f,s=Math.sin(g+_)*v+d;break;case Na.R:h=o=t[u++],l=s=t[u++];var y=h+t[u++],x=l+t[u++];if(i){if(_i(h,l,y,l,e,r,n)||_i(y,l,y,x,e,r,n)||_i(y,x,h,x,e,r,n)||_i(h,x,h,l,e,r,n))return!0}else a+=bi(y,l,y,x,r,n),a+=bi(h,x,h,l,r,n);break;case Na.Z:if(i){if(_i(o,s,h,l,e,r,n))return!0}else a+=bi(o,s,h,l,r,n);o=h,s=l}}return i||ki(s,l)||(a+=bi(o,s,h,l,r,n)||0),0!==a}function Li(t,e,i){return Si(t,0,!1,e,i)}function Ai(t,e,i,r){return Si(t,e,!0,i,r)}function zi(t){Pe.call(this,t),this.path=null}function Ri(t,e,i,r,n,a,o,s,h,l,u){var c=h*(ao/180),f=no(c)*(t-i)/2+ro(c)*(e-r)/2,d=-1*ro(c)*(t-i)/2+no(c)*(e-r)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=io(p),s*=io(p));var v=(n===a?-1:1)*io((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+no(c)*g-ro(c)*_,y=(e+r)/2+ro(c)*g+no(c)*_,x=ho([1,0],[(f-g)/o,(d-_)/s]),w=[(f-g)/o,(d-_)/s],b=[(-1*f-g)/o,(-1*d-_)/s],k=ho(w,b);so(w,b)<=-1&&(k=ao),so(w,b)>=1&&(k=0),0===a&&k>0&&(k-=2*ao),1===a&&k<0&&(k+=2*ao),u.addData(l,m,y,o,s,x,k,c,a)}function Bi(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e<eo.length;e++)i=i.replace(new RegExp(eo[e],"g"),"|"+eo[e]);var r,n=i.split("|"),a=0,o=0,s=new Fa,h=Fa.CMD;for(e=1;e<n.length;e++){var l,u=n[e],c=u.charAt(0),f=0,d=u.slice(1).replace(/e,-/g,"e-").split(",");d.length>0&&""===d[0]&&d.shift();for(var p=0;p<d.length;p++)d[p]=parseFloat(d[p]);for(;f<d.length&&!isNaN(d[f])&&!isNaN(d[0]);){var v,g,_,m,y,x,w,b=a,k=o;switch(c){case"l":a+=d[f++],o+=d[f++],l=h.L,s.addData(l,a,o);break;case"L":a=d[f++],o=d[f++],l=h.L,s.addData(l,a,o);break;case"m":a+=d[f++],o+=d[f++],l=h.M,s.addData(l,a,o),c="l";break;case"M":a=d[f++],o=d[f++],l=h.M,s.addData(l,a,o),c="L";break;case"h":a+=d[f++],l=h.L,s.addData(l,a,o);break;case"H":a=d[f++],l=h.L,s.addData(l,a,o);break;case"v":o+=d[f++],l=h.L,s.addData(l,a,o);break;case"V":o=d[f++],l=h.L,s.addData(l,a,o);break;case"C":l=h.C,s.addData(l,d[f++],d[f++],d[f++],d[f++],d[f++],d[f++]),a=d[f-2],o=d[f-1];break;case"c":l=h.C,s.addData(l,d[f++]+a,d[f++]+o,d[f++]+a,d[f++]+o,d[f++]+a,d[f++]+o),a+=d[f-2],o+=d[f-1];break;case"S":v=a,g=o;var T=s.len(),C=s.data;r===h.C&&(v+=a-C[T-4],g+=o-C[T-3]),l=h.C,b=d[f++],k=d[f++],a=d[f++],o=d[f++],s.addData(l,v,g,b,k,a,o);break;case"s":v=a,g=o;var T=s.len(),C=s.data;r===h.C&&(v+=a-C[T-4],g+=o-C[T-3]),l=h.C,b=a+d[f++],k=o+d[f++],a+=d[f++],o+=d[f++],s.addData(l,v,g,b,k,a,o);break;case"Q":b=d[f++],k=d[f++],a=d[f++],o=d[f++],l=h.Q,s.addData(l,b,k,a,o);break;case"q":b=d[f++]+a,k=d[f++]+o,a+=d[f++],o+=d[f++],l=h.Q,s.addData(l,b,k,a,o);break;case"T":v=a,g=o;var T=s.len(),C=s.data;r===h.Q&&(v+=a-C[T-4],g+=o-C[T-3]),a=d[f++],o=d[f++],l=h.Q,s.addData(l,v,g,a,o);break;case"t":v=a,g=o;var T=s.len(),C=s.data;r===h.Q&&(v+=a-C[T-4],g+=o-C[T-3]),a+=d[f++],o+=d[f++],l=h.Q,s.addData(l,v,g,a,o);break;case"A":_=d[f++],m=d[f++],y=d[f++],x=d[f++],w=d[f++],Ri(b=a,k=o,a=d[f++],o=d[f++],x,w,_,m,y,l=h.A,s);break;case"a":_=d[f++],m=d[f++],y=d[f++],x=d[f++],w=d[f++],Ri(b=a,k=o,a+=d[f++],o+=d[f++],x,w,_,m,y,l=h.A,s)}}"z"!==c&&"Z"!==c||(l=h.Z,s.addData(l)),r=l}return s.toStatic(),s}function Di(t,e){var i=Bi(t);return e=e||{},e.buildPath=function(t){if(t.setData)t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e);else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){to(i,t),this.dirty(!0)},e}function Ei(t,e,i){var r=t.cpx2,n=t.cpy2;return null===r||null===n?[(i?ii:ei)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?ii:ei)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?hi:si)(t.x1,t.cpx1,t.x2,e),(i?hi:si)(t.y1,t.cpy1,t.y2,e)]}function Ii(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 Oi(t,e,i){var r=e.points,n=e.smooth;if(r&&r.length>=2){if(n&&"spline"!==n){var a=Mo(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=Co(r,i)),t.moveTo(r[0][0],r[0][1]);for(var s=1,c=r.length;s<c;s++)t.lineTo(r[s][0],r[s][1])}i&&t.closePath()}}function Hi(t){return document.createElementNS(Uo,t)}function Fi(t){return $o(1e4*t)/1e4}function Wi(t){return t<rs&&t>-rs}function Vi(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Qo}function Ni(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Qo}function qi(t,e){e&&ji(t,"transform","matrix("+Zo.call(e,",")+")")}function ji(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function Xi(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function Yi(t,e,i){if(Vi(e,i)){var r=i?e.textFill:e.fill;r="transparent"===r?Qo:r,"none"!==t.getAttribute("clip-path")&&r===Qo&&(r="rgba(0, 0, 0, 0.002)"),ji(t,"fill",r),ji(t,"fill-opacity",e.opacity)}else ji(t,"fill",Qo);if(Ni(e,i)){var n=i?e.textStroke:e.stroke;ji(t,"stroke",n="transparent"===n?Qo:n),ji(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(e.strokeNoScale?e.host.getLineScale():1)),ji(t,"paint-order","stroke"),ji(t,"stroke-opacity",e.opacity),e.lineDash?(ji(t,"stroke-dasharray",e.lineDash.join(",")),ji(t,"stroke-dashoffset",$o(e.lineDashOffset||0))):ji(t,"stroke-dasharray",""),e.lineCap&&ji(t,"stroke-linecap",e.lineCap),e.lineJoin&&ji(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&ji(t,"stroke-miterlimit",e.miterLimit)}else ji(t,"stroke",Qo)}function Ui(t){for(var e=[],i=t.data,r=t.len(),n=0;n<r;){var a="",o=0;switch(i[n++]){case Go.M:a="M",o=2;break;case Go.L:a="L",o=2;break;case Go.Q:a="Q",o=4;break;case Go.C:a="C",o=6;break;case Go.A:var s=i[n++],h=i[n++],l=i[n++],u=i[n++],c=i[n++],f=i[n++],d=i[n++],p=i[n++],v=Math.abs(f),g=Wi(v%es)&&!Wi(v),_=!1;_=v>=es||!Wi(v)&&(f>-ts&&f<0||f>ts)==!!p;var m=Fi(s+l*Jo(c)),y=Fi(h+u*Ko(c));g&&(f=p?es-1e-4:1e-4-es,_=!0,9===n&&e.push("M",m,y));var x=Fi(s+l*Jo(c+f)),w=Fi(h+u*Ko(c+f));e.push("A",Fi(l),Fi(u),$o(d*is),+_,+p,x,w);break;case Go.Z:a="Z";break;case Go.R:var x=Fi(i[n++]),w=Fi(i[n++]),b=Fi(i[n++]),k=Fi(i[n++]);e.push("M",x,w,"L",x+b,w,"L",x+b,w+k,"L",x,w+k,"L",x,w)}a&&e.push(a);for(var T=0;T<o;T++)e.push(Fi(i[n++]))}return e.join(" ")}function Gi(t){return"middle"===t?"middle":"bottom"===t?"baseline":"hanging"}function Zi(){}function Qi(t,e,i,r){for(var n=0,a=e.length,o=0,s=0;n<a;n++){var h=e[n];if(h.removed){for(var l=[],u=s;u<s+h.count;u++)l.push(u);h.indices=l,s+=h.count}else{for(var l=[],u=o;u<o+h.count;u++)l.push(u);h.indices=l,o+=h.count,h.added||(s+=h.count)}}return e}function $i(t){return{newPos:t.newPos,components:t.components.slice(0)}}function Ki(t,e,i){this._svgRoot=t,this._tagNames="string"==typeof e?[e]:e,this._markLabel=i,this.nextId=0}function Ji(t){Ki.call(this,t,["linearGradient","radialGradient"],"__gradient_in_use__")}function tr(t){Ki.call(this,t,"clipPath","__clippath_in_use__")}function er(t){return parseInt(t,10)}function ir(t){return t instanceof zi?ns:t instanceof Se?as:t instanceof co?os:ns}function rr(t,e){return e&&t&&e.parentNode!==t}function nr(t,e,i){if(rr(t,e)&&i){var r=i.nextSibling;r?t.insertBefore(e,r):t.appendChild(e)}}function ar(t,e){if(rr(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function or(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function sr(t){return t.__textSvgEl}function hr(t){return t.__svgEl}function lr(t){return function(){vn('In SVG mode painter not support method "'+t+'"')}}function ur(t){return fs(t)}function cr(){if(!vs&&gs){vs=!0;var t=gs.styleSheets;t.length<31?gs.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function fr(t){return parseInt(t,10)}function dr(t,e){cr(),this.root=t,this.storage=e;var i=document.createElement("div"),r=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",r.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=r,this._vmlViewport=i,this.resize();var n=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){n.call(e,t),t&&t.onRemove&&t.onRemove(r)},e.addToStorage=function(t){t.onAdd&&t.onAdd(r),a.call(e,t)},this._firstPaint=!0}function pr(t){return function(){vn('In IE8.0 VML mode painter not support method "'+t+'"')}}var vr=2311,gr=function(){return vr++},_r={},mr=_r="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0,svgSupported:!0}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),n=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);return i&&(e.firefox=!0,e.version=i[1]),r&&(e.ie=!0,e.version=r[1]),n&&(e.edge=!0,e.version=n[1]),a&&(e.weChat=!0),{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&e.version>=11)}}(navigator.userAgent),yr={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},xr={"[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},wr=Object.prototype.toString,br=Array.prototype,kr=br.forEach,Tr=br.filter,Cr=br.slice,Mr=br.map,Pr=br.reduce,Sr={},Lr=function(){return Sr.createCanvas()};Sr.createCanvas=function(){return document.createElement("canvas")};var Ar,zr="__ec_primitive__";k.prototype={constructor:k,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=f(t,e));for(var i in this)this.hasOwnProperty(i)&&t(this[i],i.slice(4))},removeKey:function(t){delete this["_ec_"+t]}};var Rr=(Object.freeze||Object)({$override:function(t,e){Sr[t]=e},clone:e,merge:i,mergeAll:function(t,e){for(var r=t[0],n=1,a=t.length;n<a;n++)r=i(r,t[n],e);return r},extend:r,defaults:n,createCanvas:Lr,getContext:a,indexOf:o,inherits:s,mixin:h,isArrayLike:l,each:u,map:c,reduce:function(t,e,i,r){if(t&&e){if(t.reduce&&t.reduce===Pr)return t.reduce(e,i,r);for(var n=0,a=t.length;n<a;n++)i=e.call(r,i,t[n],n,t);return i}},filter:function(t,e,i){if(t&&e){if(t.filter&&t.filter===Tr)return t.filter(e,i);for(var r=[],n=0,a=t.length;n<a;n++)e.call(i,t[n],n,t)&&r.push(t[n]);return r}},find:function(t,e,i){if(t&&e)for(var r=0,n=t.length;r<n;r++)if(e.call(i,t[r],r,t))return t[r]},bind:f,curry:function(t){var e=Cr.call(arguments,1);return function(){return t.apply(this,e.concat(Cr.call(arguments)))}},isArray:d,isFunction:p,isString:v,isObject:g,isBuiltInObject:_,isDom:m,eqNaN:function(t){return t!==t},retrieve:function(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]},retrieve2:y,retrieve3:x,slice:function(){return Function.call.apply(Cr,arguments)},normalizeCssArray:w,assert:function(t,e){if(!t)throw new Error(e)},setAsPrimitive:function(t){t[zr]=!0},isPrimitive:b,createHashMap:function(t){return new k(t)},noop:function(){}}),Br="undefined"==typeof Float32Array?Array:Float32Array,Dr=S,Er=L,Ir=R,Or=B,Hr=(Object.freeze||Object)({create:T,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:C,set:function(t,e,i){return t[0]=e,t[1]=i,t},add:M,scaleAndAdd:function(t,e,i,r){return t[0]=e[0]+i[0]*r,t[1]=e[1]+i[1]*r,t},sub:P,len:S,length:Dr,lenSquare:L,lengthSquare:Er,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:A,normalize:z,distance:R,dist:Ir,distanceSquare:B,distSquare:Or,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,r){return t[0]=e[0]+r*(i[0]-e[0]),t[1]=e[1]+r*(i[1]-e[1]),t},applyTransform:D,min:E,max:I});O.prototype={constructor:O,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(H(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,r=t.offsetY,n=i-this._x,a=r-this._y;this._x=i,this._y=r,e.drift(n,a,t),this.dispatchToElement(H(e,t),"drag",t.event);var o=this.findHover(i,r,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(H(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(H(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(H(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(H(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Fr=Array.prototype.slice,Wr=function(){this._$handlers={}};Wr.prototype={constructor:Wr,one:function(t,e,i){var r=this._$handlers;if(!e||!t)return this;r[t]||(r[t]=[]);for(var n=0;n<r[t].length;n++)if(r[t][n].h===e)return this;return r[t].push({h:e,one:!0,ctx:i||this}),this},on:function(t,e,i){var r=this._$handlers;if(!e||!t)return this;r[t]||(r[t]=[]);for(var n=0;n<r[t].length;n++)if(r[t][n].h===e)return this;return r[t].push({h:e,one:!1,ctx:i||this}),this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var r=[],n=0,a=i[t].length;n<a;n++)i[t][n].h!=e&&r.push(i[t][n]);i[t]=r}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=Fr.call(e,1));for(var r=this._$handlers[t],n=r.length,a=0;a<n;){switch(i){case 1:r[a].h.call(r[a].ctx);break;case 2:r[a].h.call(r[a].ctx,e[1]);break;case 3:r[a].h.call(r[a].ctx,e[1],e[2]);break;default:r[a].h.apply(r[a].ctx,e)}r[a].one?(r.splice(a,1),n--):a++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=Fr.call(e,1,e.length-1));for(var r=e[e.length-1],n=this._$handlers[t],a=n.length,o=0;o<a;){switch(i){case 1:n[o].h.call(r);break;case 2:n[o].h.call(r,e[1]);break;case 3:n[o].h.call(r,e[1],e[2]);break;default:n[o].h.apply(r,e)}n[o].one?(n.splice(o,1),a--):o++}}return this}};var Vr="silent";W.prototype.dispose=function(){};var Nr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],qr=function(t,e,i,r){Wr.call(this),this.storage=t,this.painter=e,this.painterRoot=r,i=i||new W,this.proxy=i,i.handler=this,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,O.call(this),u(Nr,function(t){i.on&&i.on(t,this[t],this)},this)};qr.prototype={constructor:qr,mousemove:function(t){var e=t.zrX,i=t.zrY,r=this._hovered,n=r.target;n&&!n.__zr&&(n=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=this.findHover(e,i),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),n&&o!==n&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==n&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!=i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var r=(t=t||{}).target;if(!r||!r.silent){for(var n="on"+e,a=F(e,t,i);r&&(r[n]&&(a.cancelBubble=r[n].call(r,a)),r.trigger(e,a),r=r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[n]&&t[n].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var r=this.storage.getDisplayList(),n={x:t,y:e},a=r.length-1;a>=0;a--){var o;if(r[a]!==i&&!r[a].ignore&&(o=V(r[a],t,e))&&(!n.topTarget&&(n.topTarget=r[a]),o!==Vr)){n.target=r[a];break}}return n}},u(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){qr.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||Ir(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),h(qr,Wr),h(qr,O);var jr="undefined"==typeof Float32Array?Array:Float32Array,Xr=(Object.freeze||Object)({create:N,identity:q,copy:j,mul:X,translate:Y,rotate:U,scale:G,invert:Z}),Yr=q,Ur=5e-5,Gr=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},Zr=Gr.prototype;Zr.transform=null,Zr.needLocalTransform=function(){return Q(this.rotation)||Q(this.position[0])||Q(this.position[1])||Q(this.scale[0]-1)||Q(this.scale[1]-1)},Zr.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),r=this.transform;i||e?(r=r||N(),i?this.getLocalTransform(r):Yr(r),e&&(i?X(r,t.transform,r):j(r,t.transform)),this.transform=r,this.invTransform=this.invTransform||N(),Z(this.invTransform,r)):r&&Yr(r)},Zr.getLocalTransform=function(t){return Gr.getLocalTransform(this,t)},Zr.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)},Zr.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Qr=[];Zr.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(X(Qr,t.invTransform,e),e=Qr);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;Q(i-1)&&(i=Math.sqrt(i)),Q(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)}},Zr.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]},Zr.transformCoordToLocal=function(t,e){var i=[t,e],r=this.invTransform;return r&&D(i,i,r),i},Zr.transformCoordToGlobal=function(t,e){var i=[t,e],r=this.transform;return r&&D(i,i,r),i},Gr.getLocalTransform=function(t,e){Yr(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]),G(e,e,r),n&&U(e,e,n),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var $r={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-$r.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*$r.bounceIn(2*t):.5*$r.bounceOut(2*t-1)+.5}};$.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?$r[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 Kr=function(){this.head=null,this.tail=null,this._len=0},Jr=Kr.prototype;Jr.insert=function(t){var e=new tn(t);return this.insertEntry(e),e},Jr.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++},Jr.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--},Jr.len=function(){return this._len},Jr.clear=function(){this.head=this.tail=null,this._len=0};var tn=function(t){this.value=t,this.next,this.prev},en=function(t){this._list=new Kr,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},rn=en.prototype;rn.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 tn(e),o.key=t,i.insertEntry(o),r[t]=o}return n},rn.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},rn.clear=function(){this._list.clear(),this._map={}};var nn={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]},an=new en(20),on=null,sn=ct,hn=ft,ln=(Object.freeze||Object)({parse:ht,lift:function(t,e){var i=ht(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 dt(i,4===i.length?"rgba":"rgb")}},toHex:function(t){var e=ht(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:ct,fastMapToColor:sn,lerp:ft,mapToColor:hn,modifyHSL:function(t,e,i,r){if(t=ht(t))return t=ut(t),null!=e&&(t[0]=J(e)),null!=i&&(t[1]=it(i)),null!=r&&(t[2]=it(r)),dt(lt(t),"rgba")},modifyAlpha:function(t,e){if((t=ht(t))&&null!=e)return t[3]=tt(e),dt(t,"rgba")},stringify:dt}),un=Array.prototype.slice,cn=function(t,e,i,r){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||pt,this._setter=r||vt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};cn.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:kt(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;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,r=this,n=0;for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var o=Mt(this,t,function(){--n||r._doneCallback()},this._tracks[a],a,e);o&&(this._clipList.push(o),n++,this.animation&&this.animation.addClip(o),i=o)}if(i){var s=i.onframe;i.onframe=function(t,e){s(t,e);for(var i=0;i<r._onframeList.length;i++)r._onframeList[i](t,e)}}return n||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,r=0;r<e.length;r++){var n=e[r];t&&n.onframe(this._target,1),i&&i.removeClip(n)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var fn=1;"undefined"!=typeof window&&(fn=Math.max(window.devicePixelRatio||1,1));var dn=fn,pn=function(){},vn=pn,gn=function(){this.animators=[]};gn.prototype={constructor:gn,animate:function(t,e){var i,r=!1,n=this,a=this.__zr;if(t){var s=t.split("."),h=n;r="shape"===s[0];for(var l=0,u=s.length;l<u;l++)h&&(h=h[s[l]]);h&&(i=h)}else i=n;if(i){var c=n.animators,f=new cn(i,e);return f.during(function(t){n.dirty(r)}).done(function(){c.splice(o(c,f),1)}),c.push(f),a&&a.animation.addAnimator(f),f}vn('Property "'+t+'" is not existed in element '+n.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,r=0;r<i;r++)e[r].stop(t);return e.length=0,this},animateTo:function(t,e,i,r,n,a){v(i)?(n=r,r=i,i=0):p(r)?(n=r,r="linear",i=0):p(i)?(n=i,i=0):p(e)?(n=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i);var o=this.animators.slice(),s=o.length;s||n&&n();for(var h=0;h<o.length;h++)o[h].done(function(){--s||n&&n()}).start(r,a)},_animateToShallow:function(t,e,i,r,n){var a={},o=0;for(var s in i)if(i.hasOwnProperty(s))if(null!=e[s])g(i[s])&&!l(i[s])?this._animateToShallow(t?t+"."+s:s,e[s],i[s],r,n):(a[s]=i[s],o++);else if(null!=i[s])if(t){var h={};h[t]={},h[t][s]=i[s],this.attr(h)}else this.attr(s,i[s]);return o>0&&this.animate(t,!1).when(null==r?500:r,a).delay(n||0),this}};var _n=function(t){Gr.call(this,t),Wr.call(this,t),gn.call(this,t),this.id=t.id||gr()};_n.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(g(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<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},h(_n,gn),h(_n,Gr),h(_n,Wr);var mn=D,yn=Math.min,xn=Math.max;Pt.prototype={constructor:Pt,union:function(t){var e=yn(t.x,this.x),i=yn(t.y,this.y);this.width=xn(t.x+t.width,this.x+this.width)-e,this.height=xn(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[],i=[],r=[];return function(n){if(n){t[0]=i[0]=this.x,t[1]=r[1]=this.y,e[0]=r[0]=this.x+this.width,e[1]=i[1]=this.y+this.height,mn(t,t,n),mn(e,e,n),mn(i,i,n),mn(r,r,n),this.x=yn(t[0],e[0],i[0],r[0]),this.y=yn(t[1],e[1],i[1],r[1]);var a=xn(t[0],e[0],i[0],r[0]),o=xn(t[1],e[1],i[1],r[1]);this.width=a-this.x,this.height=o-this.y}}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,r=t.height/e.height,n=N();return Y(n,n,[-e.x,-e.y]),G(n,n,[i,r]),Y(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof Pt||(t=Pt.create(t));var e=this,i=e.x,r=e.x+e.width,n=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,h=t.y,l=t.y+t.height;return!(r<o||s<i||a<h||l<n)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Pt(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}}},Pt.create=function(t){return new Pt(t.x,t.y,t.width,t.height)};var wn=function(t){t=t||{},_n.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};wn.prototype={constructor:wn,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<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,r=i.indexOf(e);r>=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 wn&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,n=o(r,t);return n<0?this:(r.splice(n,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof wn&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,r=this.__storage;for(e=0;e<i.length;e++)t=i[e],r&&(r.delFromStorage(t),t instanceof wn&&t.delChildrenFromStorage(r)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,r=0;r<i.length;r++){var n=i[r];t.call(e,n,r)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var r=this._children[i];t.call(e,r),"group"===r.type&&r.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof wn&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof wn&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Pt(0,0,0,0),r=t||this._children,n=[],a=0;a<r.length;a++){var o=r[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),h=o.getLocalTransform(n);h?(i.copy(s),i.applyTransform(h),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},s(wn,_n);var bn=32,kn=7,Tn=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Tn.prototype={constructor:Tn,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,r=0,n=e.length;r<n;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,mr.canvasSupported&&Et(i,It)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var r=t.clipPath;if(r){e=e?e.slice():[];for(var n=r,a=t;n;)n.parent=a,n.updateTransform(),e.push(n),a=n,n=n.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var h=o[s];t.__dirty&&(h.__dirty=!0),this._updateAndAddDisplayable(h,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof wn&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(i=0;i<this._roots.length;i++){var e=this._roots[i];e instanceof wn&&e.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var i=0,r=t.length;i<r;i++)this.delRoot(t[i]);else{var n=o(this._roots,t);n>=0&&(this.delFromStorage(t),this._roots.splice(n,1),t instanceof wn&&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:It};var Cn=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Mn=function(t,e){this.extendFrom(t,!1),this.host=e};Mn.prototype={constructor:Mn,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var r=this,n=i&&i.style,a=!n,o=0;o<Cn.length;o++){var s=Cn[o],h=s[0];(a||r[h]!==n[h])&&(t[h]=r[h]||s[1])}if((a||r.fill!==n.fill)&&(t.fillStyle=r.fill),(a||r.stroke!==n.stroke)&&(t.strokeStyle=r.stroke),(a||r.opacity!==n.opacity)&&(t.globalAlpha=null==r.opacity?1:r.opacity),(a||r.blend!==n.blend)&&(t.globalCompositeOperation=r.blend||"source-over"),this.hasStroke()){var l=r.lineWidth;t.lineWidth=l/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},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?Ht:Ot)(t,e,i),n=e.colorStops,a=0;a<n.length;a++)r.addColorStop(n[a].offset,n[a].color);return r}};for(var Pn=Mn.prototype,Sn=0;Sn<Cn.length;Sn++){var Ln=Cn[Sn];Ln[0]in Pn||(Pn[Ln[0]]=Ln[1])}Mn.getGradient=Pn.getGradient;var An=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};An.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var zn=function(t,e,i){var r;i=i||dn,"string"==typeof t?r=Wt(t,e,i):g(t)&&(t=(r=t).id),this.id=t,this.dom=r;var n=r.style;n&&(r.onselectstart=Ft,n["-webkit-user-select"]="none",n["user-select"]="none",n["-webkit-touch-callout"]="none",n["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",n.padding=0,n.margin=0,n["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};zn.prototype={constructor:zn,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.__currentValues={},this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Wt("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),this.ctxBack.__currentValues={},1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,r=this.dom,n=r.style,a=this.domBack;n.width=t+"px",n.height=e+"px",r.width=t*i,r.height=e*i,a&&(a.width=t*i,a.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e=this.dom,i=this.ctx,r=e.width,n=e.height,a=this.clearColor,o=this.motionBlur&&!t,s=this.lastFrameAlpha,h=this.dpr;if(o&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,r/h,n/h)),i.clearRect(0,0,r,n),a){var l;a.colorStops?(l=a.__canvasGradient||Mn.getGradient(i,a,{x:0,y:0,width:r,height:n}),a.__canvasGradient=l):a.image&&(l=An.prototype.getCanvasPattern.call(a,i)),i.save(),i.fillStyle=l||a,i.fillRect(0,0,r,n),i.restore()}if(o){var u=this.domBack;i.save(),i.globalAlpha=s,i.drawImage(u,0,0,r,n),i.restore()}}};var Rn="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Bn=new en(50),Dn={},En=0,In=5e3,On=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Hn="12px sans-serif",Fn={};Fn.measureText=function(t,e){var i=a();return i.font=e||Hn,i.measureText(t)};var Wn={left:1,right:1,center:1},Vn={top:1,bottom:1,middle:1},Nn=new Pt,qn=function(){};qn.prototype={constructor:qn,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&le(i);var r=i.text;if(null!=r&&(r+=""),Me(r,i)){t.save();var n=this.transform;i.transformText?this.setTransform(t):n&&(Nn.copy(e),Nn.applyTransform(n),e=Nn),ce(this,t,r,i,e),t.restore()}}},Pe.prototype={constructor:Pe,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?_n.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 Mn(t,this),this.dirty(!1),this}},s(Pe,_n),h(Pe,qn),Se.prototype={constructor:Se,type:"image",brush:function(t,e){var i=this.style,r=i.image;i.bind(t,this,e);var n=this._image=Nt(r,this._image,this,this.onload);if(n&&jt(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 Pt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},s(Se,Pe);var jn=new Pt(0,0,0,0),Xn=new Pt(0,0,0,0),Yn=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=r({},i||{}),this.dpr=i.devicePixelRatio||dn,this._singleCanvas=n,this.root=t;var a=t.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},n){null!=i.width&&(t.width=i.width),null!=i.height&&(t.height=i.height);var h=t.width,l=t.height;this._width=h,this._height=l;var u=new zn(t,this,1);u.initContext(),s[0]=u,o.push(0),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=Ie(this._width,this._height);t.appendChild(c)}this._progressiveLayers=[],this._hoverlayer,this._hoverElements=[]};Yn.prototype={constructor:Yn,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<i.length;r++){var n=i[r],a=this._layers[n];!a.__builtin__&&a.refresh&&a.refresh()}return this.refreshHover(),this._progressiveLayers.length&&this._startProgessive(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape});i.__from=t,t.__hoverMir=i,i.setStyle(e),this._hoverElements.push(i)}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,r=o(i,e);r>=0&&i.splice(r,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var r=e[i].__from;r&&(r.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Et(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var r={};i.ctx.save();for(var n=0;n<e;){var a=t[n],o=a.__from;o&&o.__zr?(n++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,r))):(t.splice(n,1),o.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,Rn(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,Rn(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,u(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuiltinLayer(ze),this._doPaintList(t,e),this.eachBuiltinLayer(Re)},_doPaintList:function(t,e){function i(t){var e=a.dpr||1;a.save(),a.globalAlpha=1,a.shadowBlur=0,r.__dirty=!0,a.setTransform(1,0,0,1,0,0),a.drawImage(t.dom,0,0,c*e,f*e),a.restore()}for(var r,n,a,o,s,h,l=0,c=this._width,f=this._height,d=this._progress,p=0,v=t.length;p<v;p++){var g=t[p],_=this._singleCanvas?0:g.zlevel,m=g.__frame;if(m<0&&s&&(i(s),s=null),n!==_&&(a&&a.restore(),o={},n=_,(r=this.getLayer(n)).__builtin__||vn("ZLevel "+n+" has been used by unkown layer "+r.id),(a=r.ctx).save(),r.__unusedCount=0,(r.__dirty||e)&&r.clear()),r.__dirty||e){if(m>=0){if(!s){if((s=this._progressiveLayers[Math.min(l++,4)]).ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){p=s.__nextIdxNotProg-1;continue}h=s.__progress,s.__dirty||(d=h),s.__progress=d+1}m===d&&this._doPaintEl(g,s,!0,s.renderScope)}else this._doPaintEl(g,r,e,o);g.__dirty=!1}}s&&i(s),a&&a.restore(),this._furtherProgressive=!1,u(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||!Be(t,this._width,this._height))){var o=t.__clipPaths;(r.prevClipLayer!==e||De(o,r.prevElClipPaths))&&(r.prevElClipPaths&&(r.prevClipLayer.ctx.restore(),r.prevClipLayer=r.prevElClipPaths=null,r.prevEl=null),o&&(n.save(),Ee(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 zn("zr_"+t,this,this.dpr)).__builtin__=!0,this._layerConfig[t]&&i(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])vn("ZLevel "+t+" has been used already");else if(Ae(e)){if(n>0&&t>r[0]){for(o=0;o<n-1&&!(r[o]<t&&r[o+1]>t);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 vn("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,r,n=this._zlevelList;for(r=0;r<n.length;r++)i=n[r],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__&&t.call(e,i,r)},eachOtherLayer:function(t,e){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__||t.call(e,i,r)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){var e=this._layers,i=this._progressiveLayers,r={},n={};this.eachBuiltinLayer(function(t,e){r[e]=t.elCount,t.elCount=0,t.__dirty=!1}),u(i,function(t,e){n[e]=t.elCount,t.elCount=0,t.__dirty=!1});for(var a,o,s=0,h=0,l=0,c=t.length;l<c;l++){var f=t[l],d=e[this._singleCanvas?0:f.zlevel],p=f.progressive;if(d&&(d.elCount++,d.__dirty=d.__dirty||f.__dirty),p>=0){o!==p&&(o=p,h++);var v=f.__frame=h-1;if(!a){var g=Math.min(s,4);(a=i[g])||(a=i[g]=new zn("progressive",this,this.dpr)).initContext(),a.__maxProgress=0}a.__dirty=a.__dirty||f.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,v),a.__maxProgress>=a.__progress&&(d.__dirty=!0)}else f.__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),u(i,function(t,e){n[e]!==t.elCount&&(f.__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 r=this._layerConfig;r[t]?i(r[t],e,!0):r[t]=e;var n=this._layers[t];n&&i(n,r[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(o(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);u(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;a<r.length;a++){var s=r[a],h=o._layers[s];if(!h.__builtin__&&s>t&&s<e){n=h;break}}n&&n.renderToCanvas&&(i.ctx.save(),n.renderToCanvas(i.ctx),i.ctx.restore())}if(t=t||{},this._singleCanvas)return this._layers[0].dom;var i=new zn("image",this,t.pixelRatio||this.dpr);i.initContext(),i.clearColor=t.backgroundColor,i.clear();for(var r,n=this.storage.getDisplayList(!0),a={},o=this,s=0;s<n.length;s++){var h=n[s];h.zlevel!==r&&(e(r,h.zlevel),r=h.zlevel),this._doPaintEl(h,i,!0,a)}return e(r,1/0),i.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||Le(s[i])||Le(o.style[i]))-(Le(s[n])||0)-(Le(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),r=i.getContext("2d"),n=t.getBoundingRect(),a=t.style,o=a.shadowBlur,s=a.shadowOffsetX,h=a.shadowOffsetY,l=a.hasStroke()?a.lineWidth:0,u=Math.max(l/2,-s+o),c=Math.max(l/2,s+o),f=Math.max(l/2,-h+o),d=Math.max(l/2,h+o),p=n.width+u+c,v=n.height+f+d;i.width=p*e,i.height=v*e,r.scale(e,e),r.clearRect(0,0,p,v),r.dpr=e;var g={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-n.x,f-n.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(r);var _=new Se({style:{x:0,y:0,image:i}});return null!=g.position&&(_.position=t.position=g.position),null!=g.rotation&&(_.rotation=t.rotation=g.rotation),null!=g.scale&&(_.scale=t.scale=g.scale),_}};var Un="undefined"!=typeof window&&!!window.addEventListener,Gn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Zn=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,Wr.call(this)};Zn.prototype={constructor:Zn,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=o(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,r=i.length,n=[],a=[],o=0;o<r;o++){var s=i[o],h=s.step(t,e);h&&(n.push(h),a.push(s))}for(o=0;o<r;)i[o]._needsRemove?(i[o]=i[r-1],i.pop(),r--):o++;r=n.length;for(o=0;o<r;o++)a[o].fire(n[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(Rn(t),!e._paused&&e._update())}var e=this;this._running=!0,Rn(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},animate:function(t,e){var i=new cn(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},h(Zn,Wr);var Qn=function(){this._track=[]};Qn.prototype={constructor:Qn,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var r=t.touches;if(r){for(var n={points:[],touches:[],target:e,event:t},a=0,o=r.length;a<o;a++){var s=r[a],h=He(i,s,{});n.points.push([h.zrX,h.zrY]),n.touches.push(s)}this._track.push(n)}},_recognize:function(t){for(var e in $n)if($n.hasOwnProperty(e)){var i=$n[e](this._track,t);if(i)return i}}};var $n={pinch:function(t,e){var i=t.length;if(i){var r=(t[i-1]||{}).points,n=(t[i-2]||{}).points||r;if(n&&n.length>1&&r&&r.length>1){var a=qe(r)/qe(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=je(r);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},Kn=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Jn=["touchstart","touchend","touchmove"],ta={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},ea=c(Kn,function(t){var e=t.replace("mouse","pointer");return ta[e]?e:t}),ia={mousemove:function(t){t=We(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=We(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=We(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Ye(this,t,"start"),ia.mousemove.call(this,t),ia.mousedown.call(this,t),Ue(this)},touchmove:function(t){(t=We(this.dom,t)).zrByTouch=!0,Ye(this,t,"change"),ia.mousemove.call(this,t),Ue(this)},touchend:function(t){(t=We(this.dom,t)).zrByTouch=!0,Ye(this,t,"end"),ia.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&ia.click.call(this,t),Ue(this)},pointerdown:function(t){ia.mousedown.call(this,t)},pointermove:function(t){Ge(t)||ia.mousemove.call(this,t)},pointerup:function(t){ia.mouseup.call(this,t)},pointerout:function(t){Ge(t)||ia.mouseout.call(this,t)}};u(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ia[t]=function(e){e=We(this.dom,e),this.trigger(t,e)}});var ra=Qe.prototype;ra.dispose=function(){for(var t=Kn.concat(Jn),e=0;e<t.length;e++){var i=t[e];Ne(this.dom,Xe(i),this._handlers[i])}},ra.setCursor=function(t){this.dom.style.cursor=t||"default"},h(Qe,Wr);var na=!mr.canvasSupported,aa={canvas:Yn},oa={},sa=function(t,e,i){i=i||{},this.dom=e,this.id=t;var r=this,n=new Tn,a=i.renderer;if(na){if(!aa.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&aa[a]||(a="canvas");var o=new aa[a](e,n,i);this.storage=n,this.painter=o;var s=mr.node?null:new Qe(o.getViewportRoot());this.handler=new qr(n,o,s,o.root),this.animation=new Zn({stage:{update:f(this.flush,this)}}),this.animation.start(),this._needsRefresh;var h=n.delFromStorage,l=n.addToStorage;n.delFromStorage=function(t){h.call(n,t),t&&t.removeSelfFromZr(r)},n.addToStorage=function(t){l.call(n,t),t.addSelfToZr(r)}};sa.prototype={constructor:sa,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer(t,e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){this._needsRefresh&&this.refreshImmediately(),this._needsRefreshHover&&this.refreshHoverImmediately()},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,Ke(this.id)}};var ha=Math.pow,la=Math.sqrt,ua=1e-8,ca=1e-4,fa=la(3),da=1/3,pa=T(),va=T(),ga=T(),_a=Math.min,ma=Math.max,ya=Math.sin,xa=Math.cos,wa=2*Math.PI,ba=T(),ka=T(),Ta=T(),Ca=[],Ma=[],Pa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Sa=[],La=[],Aa=[],za=[],Ra=Math.min,Ba=Math.max,Da=Math.cos,Ea=Math.sin,Ia=Math.sqrt,Oa=Math.abs,Ha="undefined"!=typeof Float32Array,Fa=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Fa.prototype={constructor:Fa,_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=Oa(1/dn/t)||0,this._uy=Oa(1/dn/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(Pa.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=Oa(t-this._xi)>this._ux||Oa(e-this._yi)>this._uy||this._len<5;return this.addData(Pa.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(Pa.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(Pa.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(Pa.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=Da(n)*i+t,this._yi=Ea(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(Pa.R,t,e,i,r),this},closePath:function(){this.addData(Pa.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;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!Ha||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,r=this._len,n=0;n<e;n++)i+=t[n].len();Ha&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i));for(n=0;n<e;n++)for(var a=t[n].data,o=0;o<a.length;o++)this.data[r++]=a[o];this._len=r},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,r,n=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,h=this._xi,l=this._yi,u=t-h,c=e-l,f=Ia(u*u+c*c),d=h,p=l,v=o.length;for(u/=f,c/=f,a<0&&(a=n+a),d-=(a%=n)*u,p-=a*c;u>0&&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&&d<h||u<0&&d>h||c>0&&p<l||c<0&&p>l||s[r%2?"moveTo":"lineTo"](u>=0?Ra(d,t):Ba(d,t),c>=0?Ra(p,e):Ba(p,e));u=d-t,c=p-e,this._dashOffset=-Ia(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,_=ei,m=0,y=this._dashIdx,x=d.length,w=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+=Ia(s*s+h*h);for(;y<x&&!((w+=d[y])>f);y++);for(o=(w-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=-Ia(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,Ha&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Sa[0]=Sa[1]=Aa[0]=Aa[1]=Number.MAX_VALUE,La[0]=La[1]=za[0]=za[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,r=0,n=0,a=0;a<t.length;){var o=t[a++];switch(1==a&&(r=e=t[a],n=i=t[a+1]),o){case Pa.M:e=r=t[a++],i=n=t[a++],Aa[0]=r,Aa[1]=n,za[0]=r,za[1]=n;break;case Pa.L:di(e,i,t[a],t[a+1],Aa,za),e=t[a++],i=t[a++];break;case Pa.C:pi(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Aa,za),e=t[a++],i=t[a++];break;case Pa.Q:vi(e,i,t[a++],t[a++],t[a],t[a+1],Aa,za),e=t[a++],i=t[a++];break;case Pa.A:var s=t[a++],h=t[a++],l=t[a++],u=t[a++],c=t[a++],f=t[a++]+c,d=(t[a++],1-t[a++]);1==a&&(r=Da(c)*l+s,n=Ea(c)*u+h),gi(s,h,l,u,c,f,d,Aa,za),e=Da(f)*l+s,i=Ea(f)*u+h;break;case Pa.R:di(r=e=t[a++],n=i=t[a++],r+t[a++],n+t[a++],Aa,za);break;case Pa.Z:e=r,i=n}E(Sa,Sa,Aa),I(La,La,za)}return 0===a&&(Sa[0]=Sa[1]=La[0]=La[1]=0),new Pt(Sa[0],Sa[1],La[0]-Sa[0],La[1]-Sa[1])},rebuildPath:function(t){for(var e,i,r,n,a,o,s=this.data,h=this._ux,l=this._uy,u=this._len,c=0;c<u;){var f=s[c++];switch(1==c&&(e=r=s[c],i=n=s[c+1]),f){case Pa.M:e=r=s[c++],i=n=s[c++],t.moveTo(r,n);break;case Pa.L:a=s[c++],o=s[c++],(Oa(a-r)>h||Oa(o-n)>l||c===u-1)&&(t.lineTo(a,o),r=a,n=o);break;case Pa.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 Pa.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case Pa.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++],w=v>g?v:g,b=v>g?1:v/g,k=v>g?g/v:1,T=_+m;Math.abs(v-g)>.001?(t.translate(d,p),t.rotate(y),t.scale(b,k),t.arc(0,0,w,_,T,1-x),t.scale(1/b,1/k),t.rotate(-y),t.translate(-d,-p)):t.arc(d,p,w,_,T,1-x),1==c&&(e=Da(_)*v+d,i=Ea(_)*g+p),r=Da(T)*v+d,n=Ea(T)*g+p;break;case Pa.R:e=r=s[c],i=n=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Pa.Z:t.closePath(),r=e,n=i}}}},Fa.CMD=Pa;var Wa=2*Math.PI,Va=2*Math.PI,Na=Fa.CMD,qa=2*Math.PI,ja=1e-4,Xa=[-1,-1,-1],Ya=[-1,-1],Ua=An.prototype.getCanvasPattern,Ga=Math.abs,Za=new Fa(!0);zi.prototype={constructor:zi,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,r=this.path||Za,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=Ua.call(o,t)),l?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Ua.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 Fa},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var r=this.path;r||(r=this.path=new Fa),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)),Ai(a,o/s,t,e)))return!0}if(n.hasFill())return Li(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):Pe.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(g(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&&Ga(t[0]-1)>1e-10&&Ga(t[3]-1)>1e-10?Math.sqrt(Ga(t[0]*t[3]-t[2]*t[1])):1}},zi.extend=function(t){var e=function(e){zi.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)};s(e,zi);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},s(zi,Pe);var Qa=Fa.CMD,$a=[[],[],[]],Ka=Math.sqrt,Ja=Math.atan2,to=function(t,e){var i,r,n,a,o,s,h=t.data,l=Qa.M,u=Qa.C,c=Qa.L,f=Qa.R,d=Qa.A,p=Qa.Q;for(n=0,a=0;n<h.length;){switch(i=h[n++],a=n,r=0,i){case l:case c:r=1;break;case u:r=3;break;case p:r=2;break;case d:var v=e[4],g=e[5],_=Ka(e[0]*e[0]+e[1]*e[1]),m=Ka(e[2]*e[2]+e[3]*e[3]),y=Ja(-e[1]/m,e[0]/_);h[n]*=_,h[n++]+=v,h[n]*=m,h[n++]+=g,h[n++]*=_,h[n++]*=m,h[n++]+=y,h[n++]+=y,a=n+=2;break;case f:s[0]=h[n++],s[1]=h[n++],D(s,s,e),h[a++]=s[0],h[a++]=s[1],s[0]+=h[n++],s[1]+=h[n++],D(s,s,e),h[a++]=s[0],h[a++]=s[1]}for(o=0;o<r;o++)(s=$a[o])[0]=h[n++],s[1]=h[n++],D(s,s,e),h[a++]=s[0],h[a++]=s[1]}},eo=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],io=Math.sqrt,ro=Math.sin,no=Math.cos,ao=Math.PI,oo=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},so=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(oo(t)*oo(e))},ho=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(so(t,e))},lo=(Object.freeze||Object)({createFromString:function(t,e){return new zi(Di(t,e))},extendFromString:function(t,e){return zi.extend(Di(t,e))},mergePath:function(t,e){for(var i=[],r=t.length,n=0;n<r;n++){var a=t[n];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var o=new zi(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o}}),uo=zi.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],r=0;r<i.length;r++)i[r].buildPath(t,i[r].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),zi.prototype.getBoundingRect.call(this)}}),co=function(t){Pe.call(this,t)};co.prototype={constructor:co,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&le(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var r=i.text;null!=r&&(r+=""),i.bind(t,this,e),Me(r,i)&&(this.setTransform(t),ce(this,t,r,i),this.restoreTransform(t))},getBoundingRect:function(){var t=this.style;if(this.__dirty&&le(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=Yt(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,be(t.textStroke,t.textStrokeWidth)){var r=t.textStrokeWidth;i.x-=r/2,i.y-=r/2,i.width+=r,i.height+=r}this._rect=i}return this._rect}},s(co,Pe);var fo=zi.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,r=e.cy,n=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,h=Math.cos(a),l=Math.sin(a);t.moveTo(h*n+i,l*n+r),t.arc(i,r,n,a,o,!s)}}),po=[],vo=zi.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,r=e.y1,n=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,h=e.cpx2,l=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,r),null==h||null==l?(u<1&&(ci(i,o,n,u,po),o=po[1],n=po[2],ci(r,s,a,u,po),s=po[1],a=po[2]),t.quadraticCurveTo(o,s,n,a)):(u<1&&(ai(i,o,h,n,u,po),o=po[1],h=po[2],n=po[3],ai(r,s,l,a,u,po),s=po[1],l=po[2],a=po[3]),t.bezierCurveTo(o,s,h,l,n,a)))},pointAt:function(t){return Ei(this.shape,t,!1)},tangentAt:function(t){var e=Ei(this.shape,t,!0);return z(e,e)}}),go=zi.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),_o=zi.extend({type:"droplet",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=e.width,a=e.height;t.moveTo(i,r+n),t.bezierCurveTo(i+n,r+n,i+3*n/2,r-n/3,i,r-a),t.bezierCurveTo(i-3*n/2,r-n/3,i-n,r+n,i,r+n),t.closePath()}}),mo=zi.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,r=e.cx,n=e.cy,a=e.rx,o=e.ry,s=a*i,h=o*i;t.moveTo(r-a,n),t.bezierCurveTo(r-a,n-h,r-s,n-o,r,n-o),t.bezierCurveTo(r+s,n-o,r+a,n-h,r+a,n),t.bezierCurveTo(r+a,n+h,r+s,n+o,r,n+o),t.bezierCurveTo(r-s,n+o,r-a,n+h,r-a,n),t.closePath()}}),yo=zi.extend({type:"heart",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=e.width,a=e.height;t.moveTo(i,r),t.bezierCurveTo(i+n/2,r-2*a/3,i+2*n,r+a/3,i,r+a),t.bezierCurveTo(i-2*n,r+a/3,i-n/2,r-2*a/3,i,r)}}),xo=Math.PI,wo=Math.sin,bo=Math.cos,ko=zi.extend({type:"isogon",shape:{x:0,y:0,r:0,n:0},buildPath:function(t,e){var i=e.n;if(i&&!(i<2)){var r=e.x,n=e.y,a=e.r,o=2*xo/i,s=-xo/2;t.moveTo(r+a*bo(s),n+a*wo(s));for(var h=0,l=i-1;h<l;h++)s+=o,t.lineTo(r+a*bo(s),n+a*wo(s));t.closePath()}}}),To=zi.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,r=e.y1,n=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(i,r),o<1&&(n=i*(1-o)+n*o,a=r*(1-o)+a*o),t.lineTo(n,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Co=function(t,e){for(var i=t.length,r=[],n=0,a=1;a<i;a++)n+=R(t[a-1],t[a]);var o=n/2;o=o<i?i:o;for(a=0;a<o;a++){var s,h,l,u=a/(o-1)*(e?i:i-1),c=Math.floor(u),f=u-c,d=t[c%i];e?(s=t[(c-1+i)%i],h=t[(c+1)%i],l=t[(c+2)%i]):(s=t[0===c?c:c-1],h=t[c>i-2?i-1:c+1],l=t[c>i-3?i-1:c+2]);var p=f*f,v=f*p;r.push([Ii(s[0],d[0],h[0],l[0],f,p,v),Ii(s[1],d[1],h[1],l[1],f,p,v)])}return r},Mo=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<d;f++)E(o,o,t[f]),I(s,s,t[f]);E(o,o,r[0]),I(s,s,r[1])}for(var f=0,d=t.length;f<d;f++){var p=t[f];if(i)n=t[f?f-1:d-1],a=t[(f+1)%d];else{if(0===f||f===d-1){h.push(C(t[f]));continue}n=t[f-1],a=t[f+1]}P(l,a,n),A(l,l,e);var v=R(p,n),g=R(p,a),_=v+g;0!==_&&(v/=_,g/=_),A(u,l,-v),A(c,l,g);var m=M([],p,u),y=M([],p,c);r&&(I(m,m,o),E(m,m,s),I(y,y,o),E(y,y,s)),h.push(m),h.push(y)}return i&&h.push(h.shift()),h},Po=zi.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Oi(t,e,!0)}}),So=zi.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Oi(t,e,!1)}}),Lo=zi.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,r=e.y,n=e.width,a=e.height;e.r?he(t,e):t.rect(i,r,n,a),t.closePath()}}),Ao=zi.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=2*Math.PI;t.moveTo(i+e.r,r),t.arc(i,r,e.r,0,n,!1),t.moveTo(i+e.r0,r),t.arc(i,r,e.r0,0,n,!0)}}),zo=Math.sin,Ro=Math.cos,Bo=Math.PI/180,Do=zi.extend({type:"rose",shape:{cx:0,cy:0,r:[],k:0,n:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,r,n,a=e.r,o=e.k,s=e.n,h=e.cx,l=e.cy;t.moveTo(h,l);for(var u=0,c=a.length;u<c;u++){n=a[u];for(var f=0;f<=360*s;f++)i=n*zo(o/s*f%360*Bo)*Ro(f*Bo)+h,r=n*zo(o/s*f%360*Bo)*zo(f*Bo)+l,t.lineTo(i,r)}}}),Eo=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Io=zi.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:function(t){return mr.browser.ie&&mr.browser.version>=11?function(){var e,i=this.__clipPaths,r=this.style;if(i)for(var n=0;n<i.length;n++){var a=i[n],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(h=0;h<Eo.length;h++)Eo[h][2]=r[Eo[h][0]],r[Eo[h][0]]=Eo[h][1];e=!0;break}}if(t.apply(this,arguments),e)for(var h=0;h<Eo.length;h++)r[Eo[h][0]]=Eo[h][2]}:t}(zi.prototype.brush),buildPath:function(t,e){var i=e.cx,r=e.cy,n=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,h=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*n+i,u*n+r),t.lineTo(l*a+i,u*a+r),t.arc(i,r,a,o,s,!h),t.lineTo(Math.cos(s)*n+i,Math.sin(s)*n+r),0!==n&&t.arc(i,r,n,s,o,h),t.closePath()}}),Oo=Math.PI,Ho=Math.cos,Fo=Math.sin,Wo=zi.extend({type:"star",shape:{cx:0,cy:0,n:3,r0:null,r:0},buildPath:function(t,e){var i=e.n;if(i&&!(i<2)){var r=e.cx,n=e.cy,a=e.r,o=e.r0;null==o&&(o=i>4?a*Ho(2*Oo/i)/Ho(Oo/i):a/3);var s=Oo/i,h=-Oo/2,l=r+a*Ho(h),u=n+a*Fo(h);h+=s,t.moveTo(l,u);for(var c,f=0,d=2*i-1;f<d;f++)c=f%2==0?o:a,t.lineTo(r+c*Ho(h),n+c*Fo(h)),h+=s;t.closePath()}}}),Vo=Math.cos,No=Math.sin,qo=zi.extend({type:"trochoid",shape:{cx:0,cy:0,r:0,r0:0,d:0,location:"out"},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,r,n,a,o=e.r,s=e.r0,h=e.d,l=e.cx,u=e.cy,c="out"==e.location?1:-1;if(!(e.location&&o<=s)){var f,d=0,p=1;i=(o+c*s)*Vo(0)-c*h*Vo(0)+l,r=(o+c*s)*No(0)-h*No(0)+u,t.moveTo(i,r);do{d++}while(s*d%(o+c*s)!=0);do{f=Math.PI/180*p,n=(o+c*s)*Vo(f)-c*h*Vo((o/s+c)*f)+l,a=(o+c*s)*No(f)-h*No((o/s+c)*f)+u,t.lineTo(n,a),p++}while(p<=s*d/(o+c*s)*360)}}}),jo=function(t){this.colorStops=t||[]};jo.prototype={constructor:jo,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Xo=function(t,e,i,r,n,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==r?0:r,this.type="linear",this.global=a||!1,jo.call(this,n)};Xo.prototype={constructor:Xo},s(Xo,jo);var Yo=function(t,e,i,r,n){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=n||!1,jo.call(this,r)};Yo.prototype={constructor:Yo},s(Yo,jo);var Uo="http://www.w3.org/2000/svg",Go=Fa.CMD,Zo=Array.prototype.join,Qo="none",$o=Math.round,Ko=Math.sin,Jo=Math.cos,ts=Math.PI,es=2*Math.PI,is=180/ts,rs=1e-4,ns={};ns.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=Hi("path"),t.__svgEl=i),t.path||t.createPathProxy();var r=t.path;if(t.__dirtyPath){r.beginPath(),t.buildPath(r,t.shape),t.__dirtyPath=!1;var n=Ui(r);n.indexOf("NaN")<0&&ji(i,"d",n)}Yi(i,e),qi(i,t.transform),null!=e.text&&hs(t,t.getBoundingRect())};var as={};as.brush=function(t){var e=t.style,i=e.image;if(i instanceof HTMLImageElement&&(i=i.src),i){var r=e.x||0,n=e.y||0,a=e.width,o=e.height,s=t.__svgEl;s||(s=Hi("image"),t.__svgEl=s),i!==t.__imageSrc&&(Xi(s,"href",i),t.__imageSrc=i),ji(s,"width",a),ji(s,"height",o),ji(s,"x",r),ji(s,"y",n),qi(s,t.transform),null!=e.text&&hs(t,t.getBoundingRect())}};var os={},ss=new Pt,hs=function(t,e,i){var r=t.style;t.__dirty&&le(r);var n=r.text;if(null!=n){n+="";var a=t.__textSvgEl;if(a||(a=Hi("text"),t.__textSvgEl=a),Yi(a,r,!0),t instanceof co||t.style.transformText)qi(a,t.transform);else if(t.transform)ss.copy(e),ss.applyTransform(t.transform),e=ss;else{var o=t.transformCoordToGlobal(e.x,e.y);e.x=o[0],e.y=o[1]}var s,h,l=r.textPosition,u=r.textDistance,c=r.textAlign||"left";"number"==typeof r.fontSize&&(r.fontSize+="px");var f=r.font||[r.fontStyle||"",r.fontWeight||"",r.fontSize||"",r.fontFamily||""].join(" ")||Hn,d=Gi(r.textVerticalAlign),p=(i=Yt(n,f,c,d)).lineHeight;if(l instanceof Array)s=e.x+l[0],h=e.y+l[1];else{var v=$t(l,e,u);s=v.x,h=v.y,d=Gi(v.textVerticalAlign),c=v.textAlign}ji(a,"alignment-baseline",d),f&&(a.style.font=f);var g=r.textPadding;ji(a,"x",s),ji(a,"y",h);var _=n.split("\n"),m=_.length,y=c;"left"===y?(y="start",g&&(s+=g[3])):"right"===y?(y="end",g&&(s-=g[1])):"center"===y&&(y="middle",g&&(s+=(g[3]-g[1])/2));var x=0;if("baseline"===d?(x=-i.height+p,g&&(x-=g[2])):"middle"===d?(x=(-i.height+p)/2,g&&(h+=(g[0]-g[2])/2)):g&&(x+=g[0]),t.__text!==n||t.__textFont!==f){var w=t.__tspanList||[];t.__tspanList=w;for(k=0;k<m;k++)(T=w[k])?T.innerHTML="":(T=w[k]=Hi("tspan"),a.appendChild(T),ji(T,"alignment-baseline",d),ji(T,"text-anchor",y)),ji(T,"x",s),ji(T,"y",h+k*p+x),T.appendChild(document.createTextNode(_[k]));for(;k<w.length;k++)a.removeChild(w[k]);w.length=m,t.__text=n,t.__textFont=f}else if(t.__tspanList.length)for(var b=t.__tspanList.length,k=0;k<b;++k){var T=t.__tspanList[k];T&&(ji(T,"x",s),ji(T,"y",h+k*p+x))}}};os.drawRectText=hs,os.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],hs(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},Zi.prototype={diff:function(t,e,i){i||(i=function(t,e){return t===e}),this.equals=i;var r=this;t=t.slice();var n=(e=e.slice()).length,a=t.length,o=1,s=n+a,h=[{newPos:-1,components:[]}],l=this.extractCommon(h[0],e,t,0);if(h[0].newPos+1>=n&&l+1>=a){for(var u=[],c=0;c<e.length;c++)u.push(c);return[{indices:u,count:e.length}]}for(;o<=s;){var f=function(){for(var i=-1*o;i<=o;i+=2){var s,l=h[i-1],u=h[i+1],c=(u?u.newPos:0)-i;l&&(h[i-1]=void 0);var f=l&&l.newPos+1<n,d=u&&0<=c&&c<a;if(f||d){if(!f||d&&l.newPos<u.newPos?(s=$i(u),r.pushComponent(s.components,void 0,!0)):((s=l).newPos++,r.pushComponent(s.components,!0,void 0)),c=r.extractCommon(s,e,t,i),s.newPos+1>=n&&c+1>=a)return Qi(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<n&&s+1<a&&this.equals(e[o+1],i[s+1]);)o++,s++,h++;return h&&t.components.push({count:h}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var ls=new Zi,us=function(t,e,i){return ls.diff(t,e,i)};Ki.prototype.createElement=Hi,Ki.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var r=e.length-1;r>=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},Ki.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)}}},Ki.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Ki.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},Ki.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return u(this._tagNames,function(i){var r=t.getElementsByTagName(i);e=e.concat([].slice.call(r))}),e},Ki.prototype.markAllUnused=function(){var t=this;u(this.getDoms(),function(e){e[t._markLabel]="0"})},Ki.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Ki.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;u(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},Ki.prototype.getSvgProxy=function(t){return t instanceof zi?ns:t instanceof Se?as:t instanceof co?os:ns},Ki.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Ki.prototype.getSvgElement=function(t){return t.__svgEl},s(Ji,Ki),Ji.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;u(["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+")")}})}},Ji.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return vn("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},Ji.prototype.update=function(t){var e=this;Ki.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))})},Ji.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 vn("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,r=0,n=i.length;r<n;++r){var a=this.createElement("stop");a.setAttribute("offset",100*i[r].offset+"%"),a.setAttribute("stop-color",i[r].color),e.appendChild(a)}t._dom=e},Ji.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&Ki.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&Ki.prototype.markUsed.call(this,e._dom)}},s(tr,Ki),tr.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},tr.prototype.updateDom=function(t,e,i){if(e&&e.length>0){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);X(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.cloneNode()),t.setAttribute("clip-path","url(#"+n+")"),e.length>1&&this.updateDom(r,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},tr.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&u(t.__clipPaths,function(t){t._dom&&Ki.prototype.markUsed.call(e,t._dom),t._textDom&&Ki.prototype.markUsed.call(e,t._textDom)})};var cs=function(t,e,i){this.root=t,this.storage=e,this._opts=i=r({},i||{});var n=Hi("svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n.style["user-select"]="none",n.style.cssText="position:absolute;left:0;top:0;",this.gradientManager=new Ji(n),this.clipPathManager=new tr(n);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=n,this._viewport=a,t.appendChild(a),a.appendChild(n),this.resize(i.width,i.height),this._visibleList=[]};cs.prototype={constructor:cs,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<n;e++){var o=ir(d=t[e]);d.invisible||(d.__dirty&&(o&&o.brush(d),this.clipPathManager.update(d),d.style&&(this.gradientManager.update(d.style.fill),this.gradientManager.update(d.style.stroke)),d.__dirty=!1),a.push(d))}var s,h=us(r,a);for(e=0;e<h.length;e++)if((c=h[e]).removed)for(f=0;f<c.count;f++){var l=hr(d=r[c.indices[f]]),u=sr(d);or(i,l),or(i,u)}for(e=0;e<h.length;e++){var c=h[e];if(c.added)for(f=0;f<c.count;f++){var l=hr(d=a[c.indices[f]]),u=sr(d);s?nr(i,l,s):ar(i,l),l?nr(i,u,l):s?nr(i,u,s):ar(i,u),nr(i,u,l),s=u||l||s,this.gradientManager.addWithoutUpdate(l,d),this.clipPathManager.markUsed(d)}else if(!c.removed)for(var f=0;f<c.count;f++){var d=a[c.indices[f]];s=l=sr(d)||hr(d)||s,this.gradientManager.markUsed(d),this.gradientManager.addWithoutUpdate(l,d),this.clipPathManager.markUsed(d)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(Hi("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var r=e.length-1;r>=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;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&&this._height!==e){this._width=t,this._height=e;var n=i.style;n.width=t+"px",n.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||er(s[i])||er(o.style[i]))-(er(s[n])||0)-(er(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}},u(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){cs.prototype[t]=lr(t)}),$e("svg",cs);var fs,ds="urn:schemas-microsoft-com:vml",ps="undefined"==typeof window?null:window,vs=!1,gs=ps&&ps.document;if(gs&&!mr.canvasSupported)try{!gs.namespaces.zrvml&&gs.namespaces.add("zrvml",ds),fs=function(t){return gs.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){fs=function(t){return gs.createElement("<"+t+' xmlns="'+ds+'" class="zrvml">')}}var _s=Fa.CMD,ms=Math.round,ys=Math.sqrt,xs=Math.abs,ws=Math.cos,bs=Math.sin,ks=Math.max;if(!mr.canvasSupported){var Ts=21600,Cs=Ts/2,Ms=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ts+","+Ts,t.coordorigin="0,0"},Ps=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},Ss=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},Ls=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},As=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},zs=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},Rs=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},Bs=function(t,e,i){var r=ht(e);i=+i,isNaN(i)&&(i=1),r&&(t.color=Ss(r[0],r[1],r[2]),t.opacity=i*r[3])},Ds=function(t){var e=ht(t);return[Ss(e[0],e[1],e[2]),e[3]]},Es=function(t,e,i){var r=e.fill;if(null!=r)if(r instanceof jo){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&&(D(d,d,f),D(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&&D(d,d,f),m/=_[0]*Ts,y/=_[1]*Ts;var x=ks(m,y);s=0/x,h=2*r.r/x-s}var w=r.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,k=[],T=[],C=0;C<b;C++){var M=w[C],P=Ds(M.color);T.push(M.offset*h+s+" "+P[0]),0!==C&&C!==b-1||k.push(P)}if(b>=2){var S=k[0][0],L=k[1][0],A=k[0][1]*e.opacity,z=k[1][1]*e.opacity;t.type=n,t.method="none",t.focus="100%",t.angle=a,t.color=S,t.color2=L,t.colors=T.join(","),t.opacity=z,t.opacity2=A}"radial"===n&&(t.focusposition=o.join(","))}else Bs(t,r,e.opacity)},Is=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof jo||Bs(t,e.stroke,e.opacity)},Os=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 jo&&As(t,a),a||(a=ur(e)),n?Es(a,i,r):Is(a,i),Ls(t,a)):(t[n?"filled":"stroked"]="false",As(t,a))},Hs=[[],[],[]],Fs=function(t,e){var i,r,n,a,o,s,h=_s.M,l=_s.C,u=_s.L,c=_s.A,f=_s.Q,d=[],p=t.data,v=t.len();for(a=0;a<v;){switch(n=p[a++],r="",i=0,n){case h:r=" m ",i=1,o=p[a++],s=p[a++],Hs[0][0]=o,Hs[0][1]=s;break;case u:r=" l ",i=1,o=p[a++],s=p[a++],Hs[0][0]=o,Hs[0][1]=s;break;case f:case l:r=" c ",i=3;var g,_,m=p[a++],y=p[a++],x=p[a++],w=p[a++];n===f?(g=x,_=w,x=(x+2*m)/3,w=(w+2*y)/3,m=(o+2*m)/3,y=(s+2*y)/3):(g=p[a++],_=p[a++]),Hs[0][0]=m,Hs[0][1]=y,Hs[1][0]=x,Hs[1][1]=w,Hs[2][0]=g,Hs[2][1]=_,o=g,s=_;break;case c:var b=0,k=0,T=1,C=1,M=0;e&&(b=e[4],k=e[5],T=ys(e[0]*e[0]+e[1]*e[1]),C=ys(e[2]*e[2]+e[3]*e[3]),M=Math.atan2(-e[1]/C,e[0]/T));var P=p[a++],S=p[a++],L=p[a++],A=p[a++],z=p[a++]+M,R=p[a++]+z+M;a++;var B=p[a++],E=P+ws(z)*L,I=S+bs(z)*A,m=P+ws(R)*L,y=S+bs(R)*A,O=B?" wa ":" at ";Math.abs(E-m)<1e-4&&(Math.abs(R-z)>.01?B&&(E+=.0125):Math.abs(I-S)<1e-4?B&&E<P||!B&&E>P?y-=.0125:y+=.0125:B&&I<S||!B&&I>S?m+=.0125:m-=.0125),d.push(O,ms(((P-L)*T+b)*Ts-Cs),",",ms(((S-A)*C+k)*Ts-Cs),",",ms(((P+L)*T+b)*Ts-Cs),",",ms(((S+A)*C+k)*Ts-Cs),",",ms((E*T+b)*Ts-Cs),",",ms((I*C+k)*Ts-Cs),",",ms((m*T+b)*Ts-Cs),",",ms((y*C+k)*Ts-Cs)),o=m,s=y;break;case _s.R:var H=Hs[0],F=Hs[1];H[0]=p[a++],H[1]=p[a++],F[0]=H[0]+p[a++],F[1]=H[1]+p[a++],e&&(D(H,H,e),D(F,F,e)),H[0]=ms(H[0]*Ts-Cs),F[0]=ms(F[0]*Ts-Cs),H[1]=ms(H[1]*Ts-Cs),F[1]=ms(F[1]*Ts-Cs),d.push(" m ",H[0],",",H[1]," l ",F[0],",",H[1]," l ",F[0],",",F[1]," l ",H[0],",",F[1]);break;case _s.Z:d.push(" x ")}if(i>0){d.push(r);for(var W=0;W<i;W++){var V=Hs[W];e&&D(V,V,e),d.push(ms(V[0]*Ts-Cs),",",ms(V[1]*Ts-Cs),W<i-1?",":"")}}}return d.join("")};zi.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=ur("shape"),Ms(i),this._vmlEl=i),Os(i,"fill",e,this),Os(i,"stroke",e,this);var r=this.transform,n=null!=r,a=i.getElementsByTagName("stroke")[0];if(a){var o=e.lineWidth;if(n&&!e.strokeNoScale){var s=r[0]*r[3]-r[1]*r[2];o*=ys(xs(s))}a.weight=o+"px"}var h=this.path||(this.path=new Fa);this.__dirtyPath&&(h.beginPath(),this.buildPath(h,this.shape),h.toStatic(),this.__dirtyPath=!1),i.path=Fs(h,this.transform),i.style.zIndex=zs(this.zlevel,this.z,this.z2),Ls(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},zi.prototype.onRemove=function(t){As(t,this._vmlEl),this.removeRectText(t)},zi.prototype.onAdd=function(t){Ls(t,this._vmlEl),this.appendRectText(t)};var Ws=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};Se.prototype.brushVML=function(t){var e,i,r=this.style,n=r.image;if(Ws(n)){var a=n.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var o=n.runtimeStyle,s=o.width,h=o.height;o.width="auto",o.height="auto",e=n.width,i=n.height,o.width=s,o.height=h,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}n=a}else n===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(n){var l=r.x||0,u=r.y||0,c=r.width,f=r.height,d=r.sWidth,p=r.sHeight,v=r.sx||0,g=r.sy||0,_=d&&p,m=this._vmlEl;m||(m=gs.createElement("div"),Ms(m),this._vmlEl=m);var y,x=m.style,w=!1,b=1,k=1;if(this.transform&&(y=this.transform,b=ys(y[0]*y[0]+y[1]*y[1]),k=ys(y[2]*y[2]+y[3]*y[3]),w=y[1]||y[2]),w){var T=[l,u],C=[l+c,u],M=[l,u+f],P=[l+c,u+f];D(T,T,y),D(C,C,y),D(M,M,y),D(P,P,y);var S=ks(T[0],C[0],M[0],P[0]),L=ks(T[1],C[1],M[1],P[1]),A=[];A.push("M11=",y[0]/b,",","M12=",y[2]/k,",","M21=",y[1]/b,",","M22=",y[3]/k,",","Dx=",ms(l*b+y[4]),",","Dy=",ms(u*k+y[5])),x.padding="0 "+ms(S)+"px "+ms(L)+"px 0",x.filter="progid:DXImageTransform.Microsoft.Matrix("+A.join("")+", SizingMethod=clip)"}else y&&(l=l*b+y[4],u=u*k+y[5]),x.filter="",x.left=ms(l)+"px",x.top=ms(u)+"px";var z=this._imageEl,R=this._cropEl;z||(z=gs.createElement("div"),this._imageEl=z);var B=z.style;if(_){if(e&&i)B.width=ms(b*e*c/d)+"px",B.height=ms(k*i*f/p)+"px";else{var E=new Image,I=this;E.onload=function(){E.onload=null,e=E.width,i=E.height,B.width=ms(b*e*c/d)+"px",B.height=ms(k*i*f/p)+"px",I._imageWidth=e,I._imageHeight=i,I._imageSrc=n},E.src=n}R||((R=gs.createElement("div")).style.overflow="hidden",this._cropEl=R);var O=R.style;O.width=ms((c+v*c/d)*b),O.height=ms((f+g*f/p)*k),O.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-v*c/d*b+",Dy="+-g*f/p*k+")",R.parentNode||m.appendChild(R),z.parentNode!=R&&R.appendChild(z)}else B.width=ms(b*c)+"px",B.height=ms(k*f)+"px",m.appendChild(z),R&&R.parentNode&&(m.removeChild(R),this._cropEl=null);var H="",F=r.opacity;F<1&&(H+=".Alpha(opacity="+ms(100*F)+") "),H+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+n+", SizingMethod=scale)",B.filter=H,m.style.zIndex=zs(this.zlevel,this.z,this.z2),Ls(t,m),null!=r.text&&this.drawRectText(t,this.getBoundingRect())}},Se.prototype.onRemove=function(t){As(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Se.prototype.onAdd=function(t){Ls(t,this._vmlEl),this.appendRectText(t)};var Vs,Ns={},qs=0,js=document.createElement("div"),Xs=function(t){var e=Ns[t];if(!e){qs>100&&(qs=0,Ns={});var i,r=js.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"},Ns[t]=e,qs++}return e};!function(t,e){Fn[t]=e}("measureText",function(t,e){var i=gs;Vs||((Vs=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",gs.body.appendChild(Vs));try{Vs.style.font=e}catch(t){}return Vs.innerHTML="",Vs.appendChild(i.createTextNode(t)),{width:Vs.offsetWidth}});for(var Ys=new Pt,Us=[qn,Pe,Se,zi,co],Gs=0;Gs<Us.length;Gs++){var Zs=Us[Gs].prototype;Zs.drawRectText=function(t,e,i,r){var n=this.style;this.__dirty&&le(n);var a=n.text;if(null!=a&&(a+=""),a){if(n.rich){var o=ae(a,n);a=[];for(var s=0;s<o.lines.length;s++){for(var h=o.lines[s].tokens,l=[],u=0;u<h.length;u++)l.push(h[u].text);a.push(l.join(""))}a=a.join("\n")}var c,f,d=n.textAlign,p=n.textVerticalAlign,v=Xs(n.font),g=v.style+" "+v.variant+" "+v.weight+" "+v.size+'px "'+v.family+'"';i=i||Yt(a,g,d,p);var _=this.transform;if(_&&!r&&(Ys.copy(e),Ys.applyTransform(_),e=Ys),r)c=e.x,f=e.y;else{var m=n.textPosition,y=n.textDistance;if(m instanceof Array)c=e.x+Rs(m[0],e.width),f=e.y+Rs(m[1],e.height),d=d||"left";else{var x=$t(m,e,y);c=x.x,f=x.y,d=d||x.textAlign,p=p||x.textVerticalAlign}}c=Zt(c,i.width,d),f=Qt(f,i.height,p),f+=i.height/2;var w,b,k,T=ur,C=this._textVmlEl;C?b=(w=(k=C.firstChild).nextSibling).nextSibling:(C=T("line"),w=T("path"),b=T("textpath"),k=T("skew"),b.style["v-text-align"]="left",Ms(C),w.textpathok=!0,b.on=!0,C.from="0 0",C.to="1000 0.05",Ls(C,k),Ls(C,w),Ls(C,b),this._textVmlEl=C);var M=[c,f],P=C.style;_&&r?(D(M,M,_),k.on=!0,k.matrix=_[0].toFixed(3)+","+_[2].toFixed(3)+","+_[1].toFixed(3)+","+_[3].toFixed(3)+",0,0",k.offset=(ms(M[0])||0)+","+(ms(M[1])||0),k.origin="0 0",P.left="0px",P.top="0px"):(k.on=!1,P.left=ms(c)+"px",P.top=ms(f)+"px"),b.string=Ps(a);try{b.style.font=g}catch(t){}Os(C,"fill",{fill:n.textFill,opacity:n.opacity},this),Os(C,"stroke",{stroke:n.textStroke,opacity:n.opacity,lineDash:n.lineDash},this),C.style.zIndex=zs(this.zlevel,this.z,this.z2),Ls(t,C)}},Zs.removeRectText=function(t){As(t,this._textVmlEl),this._textVmlEl=null},Zs.appendRectText=function(t){Ls(t,this._textVmlEl)}}co.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},co.prototype.onRemove=function(t){this.removeRectText(t)},co.prototype.onAdd=function(t){this.appendRectText(t)}}dr.prototype={constructor:dr,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},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,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var r=t[i];r.invisible||r.ignore?(r.__alreadyNotVisible||r.onRemove(e),r.__alreadyNotVisible=!0):(r.__alreadyNotVisible&&r.onAdd(e),r.__alreadyNotVisible=!1,r.__dirty&&(r.beforeBrush&&r.beforeBrush(),(r.brushVML||r.brush).call(r,e),r.afterBrush&&r.afterBrush())),r.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!=t||this._height!=e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||fr(e.width))-fr(e.paddingLeft)-fr(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||fr(e.height))-fr(e.paddingTop)-fr(e.paddingBottom)|0}},u(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){dr.prototype[t]=pr(t)}),$e("vml",dr),t.version="3.7.4",t.init=function(t,e){var i=new sa(gr(),t,e);return oa[i.id]=i,i},t.dispose=function(t){if(t)t.dispose();else{for(var e in oa)oa.hasOwnProperty(e)&&oa[e].dispose();oa={}}return this},t.getInstance=function(t){return oa[t]},t.registerPainter=$e,t.matrix=Xr,t.vector=Hr,t.color=ln,t.path=lo,t.util=Rr,t.Group=wn,t.Path=zi,t.Image=Se,t.CompoundPath=uo,t.Text=co,t.Arc=fo,t.BezierCurve=vo,t.Circle=go,t.Droplet=_o,t.Ellipse=mo,t.Heart=yo,t.Isogon=ko,t.Line=To,t.Polygon=Po,t.Polyline=So,t.Rect=Lo,t.Ring=Ao,t.Rose=Do,t.Sector=Io,t.Star=Wo,t.Trochoid=qo,t.LinearGradient=Xo,t.RadialGradient=Yo,t.Pattern=An,t.BoundingRect=Pt});