diff --git a/lpro/src/main/webapp/WEB-INF/oss/base/lpm.jsp b/lpro/src/main/webapp/WEB-INF/oss/base/lpm.jsp index 6d802ae..83f3135 100644 --- a/lpro/src/main/webapp/WEB-INF/oss/base/lpm.jsp +++ b/lpro/src/main/webapp/WEB-INF/oss/base/lpm.jsp @@ -61,11 +61,11 @@
IP: - +
PORT: - +
LPM-KEY: @@ -90,11 +90,11 @@
IP: - +
PORT: - +
LPM-KEY: @@ -142,5 +142,8 @@ function t_delete(obj,id){ }); } +function ip_Blur(){ + +} \ No newline at end of file diff --git a/lpro/src/main/webapp/lib/echarts/echarts-liquidfill.min.js b/lpro/src/main/webapp/lib/echarts/echarts-liquidfill.min.js new file mode 100644 index 0000000..f8ab5d8 --- /dev/null +++ b/lpro/src/main/webapp/lib/echarts/echarts-liquidfill.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("echarts")):"function"==typeof define&&define.amd?define(["echarts"],e):"object"==typeof exports?exports["echarts-liquidfill"]=e(require("echarts")):t["echarts-liquidfill"]=e(t.echarts)}(window,(function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=29)}([function(t,e){var r={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},n={"[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},i=Object.prototype.toString,a=Array.prototype,o=a.forEach,s=a.filter,l=a.slice,h=a.map,u=a.reduce,c={};function f(t){if(null==t||"object"!=typeof t)return t;var e=t,a=i.call(t);if("[object Array]"===a){if(!S(t)){e=[];for(var o=0,s=t.length;o1e-10&&(i.width+=o/s,i.height+=o/s,i.x-=o/s/2,i.y-=o/s/2)}return i}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),i=this.style;if(t=r[0],e=r[1],n.contain(t,e)){var a=this.path.data;if(i.hasStroke()){var s=i.lineWidth,l=i.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(i.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),o.containStroke(a,s/l,t,e)))return!0}if(i.hasFill())return o.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!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):n.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(i.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&l(t[0]-1)>1e-10&&l(t[3]-1)>1e-10?Math.sqrt(l(t[0]*t[3]-t[2]*t[1])):1}},u.extend=function(t){var e=function(e){u.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var r=t.shape;if(r){this.shape=this.shape||{};var n=this.shape;for(var i in r)!n.hasOwnProperty(i)&&r.hasOwnProperty(i)&&(n[i]=r[i])}t.init&&t.init.call(this,e)};for(var r in i.inherits(e,u),t)"style"!==r&&"shape"!==r&&(e.prototype[r]=t[r]);return e},i.inherits(u,n);var c=u;t.exports=c},function(t,e){var r="undefined"==typeof Float32Array?Array:Float32Array;function n(t){return Math.sqrt(a(t))}var i=n;function a(t){return t[0]*t[0]+t[1]*t[1]}var o=a;function s(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var l=s;function h(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var u=h;e.create=function(t,e){var n=new r(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.clone=function(t){var e=new r(2);return e[0]=t[0],e[1]=t[1],e},e.set=function(t,e,r){return t[0]=e,t[1]=r,t},e.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},e.scaleAndAdd=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},e.sub=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},e.len=n,e.length=i,e.lenSquare=a,e.lengthSquare=o,e.mul=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},e.div=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},e.normalize=function(t,e){var r=n(e);return 0===r?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t},e.distance=s,e.dist=l,e.distanceSquare=h,e.distSquare=u,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.lerp=function(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t},e.applyTransform=function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},e.min=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},e.max=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}},function(t,e,r){var n,i,a,o,s=r(2),l=r(10),h=s.applyTransform,u=Math.min,c=Math.max;function f(t,e,r,n){r<0&&(t+=r,r=-r),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=r,this.height=n}f.prototype={constructor:f,union:function(t){var e=u(t.x,this.x),r=u(t.y,this.y);this.width=c(t.x+t.width,this.x+this.width)-e,this.height=c(t.y+t.height,this.y+this.height)-r,this.x=e,this.y=r},applyTransform:(n=[],i=[],a=[],o=[],function(t){if(t){n[0]=a[0]=this.x,n[1]=o[1]=this.y,i[0]=o[0]=this.x+this.width,i[1]=a[1]=this.y+this.height,h(n,n,t),h(i,i,t),h(a,a,t),h(o,o,t),this.x=u(n[0],i[0],a[0],o[0]),this.y=u(n[1],i[1],a[1],o[1]);var e=c(n[0],i[0],a[0],o[0]),r=c(n[1],i[1],a[1],o[1]);this.width=e-this.x,this.height=r-this.y}}),calculateTransform:function(t){var e=this,r=t.width/e.width,n=t.height/e.height,i=l.create();return l.translate(i,i,[-e.x,-e.y]),l.scale(i,i,[r,n]),l.translate(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof f||(t=f.create(t));var e=this,r=e.x,n=e.x+e.width,i=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(n=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new f(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}}},f.create=function(t){return new f(t.x,t.y,t.width,t.height)};var d=f;t.exports=d},function(t,e,r){var n=r(2),i=n.create,a=n.distSquare,o=Math.pow,s=Math.sqrt,l=s(3),h=i(),u=i(),c=i();function f(t){return t>-1e-8&&t<1e-8}function d(t){return t>1e-8||t<-1e-8}function p(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function v(t,e,r,n){var i=1-n;return i*(i*t+2*n*e)+n*n*r}e.cubicAt=p,e.cubicDerivativeAt=function(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)},e.cubicRootAt=function(t,e,r,n,i,a){var h=n+3*(e-r)-t,u=3*(r-2*e+t),c=3*(e-t),d=t-i,p=u*u-3*h*c,v=u*c-9*h*d,g=c*c-3*u*d,y=0;if(f(p)&&f(v)){if(f(u))a[0]=0;else(k=-c/u)>=0&&k<=1&&(a[y++]=k)}else{var m=v*v-4*p*g;if(f(m)){var x=v/p,_=-x/2;(k=-u/h+x)>=0&&k<=1&&(a[y++]=k),_>=0&&_<=1&&(a[y++]=_)}else if(m>0){var b=s(m),w=p*u+1.5*h*(-v+b),S=p*u+1.5*h*(-v-b);(k=(-u-((w=w<0?-o(-w,1/3):o(w,1/3))+(S=S<0?-o(-S,1/3):o(S,1/3))))/(3*h))>=0&&k<=1&&(a[y++]=k)}else{var T=(2*p*u-3*h*v)/(2*s(p*p*p)),P=Math.acos(T)/3,M=s(p),O=Math.cos(P),k=(-u-2*M*O)/(3*h),C=(_=(-u+M*(O+l*Math.sin(P)))/(3*h),(-u+M*(O-l*Math.sin(P)))/(3*h));k>=0&&k<=1&&(a[y++]=k),_>=0&&_<=1&&(a[y++]=_),C>=0&&C<=1&&(a[y++]=C)}}return y},e.cubicExtrema=function(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,l=3*e-3*t,h=0;if(f(o)){if(d(a))(c=-l/a)>=0&&c<=1&&(i[h++]=c)}else{var u=a*a-4*o*l;if(f(u))i[0]=-a/(2*o);else if(u>0){var c,p=s(u),v=(-a-p)/(2*o);(c=(-a+p)/(2*o))>=0&&c<=1&&(i[h++]=c),v>=0&&v<=1&&(i[h++]=v)}}return h},e.cubicSubdivide=function(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,h=(s-o)*i+o,u=(l-s)*i+s,c=(u-h)*i+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n},e.cubicProjectPoint=function(t,e,r,n,i,o,l,f,d,v,g){var y,m,x,_,b,w=.005,S=1/0;h[0]=d,h[1]=v;for(var T=0;T<1;T+=.05)u[0]=p(t,r,i,l,T),u[1]=p(e,n,o,f,T),(_=a(h,u))=0&&_=0&&c<=1&&(i[h++]=c)}else{var u=o*o-4*a*l;if(f(u))(c=-o/(2*a))>=0&&c<=1&&(i[h++]=c);else if(u>0){var c,p=s(u),v=(-o-p)/(2*a);(c=(-o+p)/(2*a))>=0&&c<=1&&(i[h++]=c),v>=0&&v<=1&&(i[h++]=v)}}return h},e.quadraticExtremum=function(t,e,r){var n=t+r-2*e;return 0===n?.5:(t-e)/n},e.quadraticSubdivide=function(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r},e.quadraticProjectPoint=function(t,e,r,n,i,o,l,f,d){var p,g=.005,y=1/0;h[0]=l,h[1]=f;for(var m=0;m<1;m+=.05){u[0]=v(t,r,i,m),u[1]=v(e,n,o,m),(w=a(h,u))=0&&wthis._ux||m(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,n,i,a){return this.addData(l.C,t,e,r,n,i,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,n,i,a):this._ctx.bezierCurveTo(t,e,r,n,i,a)),this._xi=i,this._yi=a,this},quadraticCurveTo:function(t,e,r,n){return this.addData(l.Q,t,e,r,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,n):this._ctx.quadraticCurveTo(t,e,r,n)),this._xi=r,this._yi=n,this},arc:function(t,e,r,n,i,a){return this.addData(l.A,t,e,r,r,n,i-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,r,n,i,a),this._xi=v(i)*r+t,this._yi=g(i)*r+e,this},arcTo:function(t,e,r,n,i){return this._ctx&&this._ctx.arcTo(t,e,r,n,i),this},rect:function(t,e,r,n){return this._ctx&&this._ctx.rect(t,e,r,n),this.addData(l.R,t,e,r,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,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,r=0;re.length&&(this._expandData(),e=this.data);for(var r=0;r0&&v<=t||u<0&&v>=t||0===u&&(c>0&&g<=e||c<0&&g>=e);)v+=u*(r=o[n=this._dashIdx]),g+=c*r,this._dashIdx=(n+1)%m,u>0&&vl||c>0&&gh||s[n%2?"moveTo":"lineTo"](u>=0?d(v,t):p(v,t),c>=0?d(g,e):p(g,e));u=v-t,c=g-e,this._dashOffset=-y(u*u+c*c)},_dashedBezierTo:function(t,e,r,i,a,o){var s,l,h,u,c,f=this._dashSum,d=this._dashOffset,p=this._lineDash,v=this._ctx,g=this._xi,m=this._yi,x=n.cubicAt,_=0,b=this._dashIdx,w=p.length,S=0;for(d<0&&(d=f+d),d%=f,s=0;s<1;s+=.1)l=x(g,t,r,a,s+.1)-x(g,t,r,a,s),h=x(m,e,i,o,s+.1)-x(m,e,i,o,s),_+=y(l*l+h*h);for(;bd);b++);for(s=(S-d)/_;s<=1;)u=x(g,t,r,a,s),c=x(m,e,i,o,s),b%2?v.moveTo(u,c):v.lineTo(u,c),s+=p[b]/_,b=(b+1)%w;b%2!=0&&v.lineTo(a,o),l=a-u,h=o-c,this._dashOffset=-y(l*l+h*h)},_dashedQuadraticTo:function(t,e,r,n){var i=r,a=n;r=(r+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,n,i,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,x&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=f[0]=f[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,r=0,n=0,s=0,d=0;dh||m(o-i)>u||f===c-1)&&(t.lineTo(a,o),n=a,i=o);break;case l.C:t.bezierCurveTo(s[f++],s[f++],s[f++],s[f++],s[f++],s[f++]),n=s[f-2],i=s[f-1];break;case l.Q:t.quadraticCurveTo(s[f++],s[f++],s[f++],s[f++]),n=s[f-2],i=s[f-1];break;case l.A:var p=s[f++],y=s[f++],x=s[f++],_=s[f++],b=s[f++],w=s[f++],S=s[f++],T=s[f++],P=x>_?x:_,M=x>_?1:x/_,O=x>_?_/x:1,k=b+w;Math.abs(x-_)>.001?(t.translate(p,y),t.rotate(S),t.scale(M,O),t.arc(0,0,P,b,k,1-T),t.scale(1/M,1/O),t.rotate(-S),t.translate(-p,-y)):t.arc(p,y,P,b,k,1-T),1===f&&(e=v(b)*x+p,r=g(b)*_+y),n=v(k)*x+p,i=g(k)*_+y;break;case l.R:e=n=s[f],r=i=s[f+1],t.rect(s[f++],s[f++],s[f++],s[f++]);break;case l.Z:t.closePath(),n=e,i=r}}}},_.CMD=l;var b=_;t.exports=b},function(t,e,r){(function(t){var r;"undefined"!=typeof window?r=window.__DEV__:void 0!==t&&(r=t.__DEV__),void 0===r&&(r=!0);var n=r;e.__DEV__=n}).call(this,r(34))},function(t,e){var r="undefined"==typeof Float32Array?Array:Float32Array;function n(){var t=new r(6);return i(t),t}function i(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function a(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}e.create=n,e.identity=i,e.copy=a,e.mul=function(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},e.translate=function(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t},e.rotate=function(t,e,r){var n=e[0],i=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(r),u=Math.cos(r);return t[0]=n*u+o*h,t[1]=-n*h+o*u,t[2]=i*u+s*h,t[3]=-i*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t},e.scale=function(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t},e.invert=function(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null},e.clone=function(t){var e=n();return a(e,t),e}},function(t,e,r){var n=r(3),i=r(12),a=r(0),o=a.getContext,s=a.extend,l=a.retrieve2,h=a.retrieve3,u=a.trim,c={},f=0,d=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,p={};function v(t,e){var r=t+":"+(e=e||"12px sans-serif");if(c[r])return c[r];for(var n=(t+"").split("\n"),i=0,a=0,o=n.length;a5e3&&(f=0,c={}),f++,c[r]=i,i}function g(t,e,r){return"right"===r?t-=e:"center"===r&&(t-=e/2),t}function y(t,e,r){return"middle"===r?t-=e/2:"bottom"===r&&(t-=e),t}function m(t,e,r){var n=e.textPosition,i=e.textDistance,a=r.x,o=r.y;i=i||0;var s=r.height,l=r.width,h=s/2,u="left",c="top";switch(n){case"left":a-=i,o+=h,u="right",c="middle";break;case"right":a+=i+l,o+=h,c="middle";break;case"top":a+=l/2,o-=i,u="center",c="bottom";break;case"bottom":a+=l/2,o+=s+i,u="center";break;case"inside":a+=l/2,o+=h,u="center",c="middle";break;case"insideLeft":a+=i,o+=h,c="middle";break;case"insideRight":a+=l-i,o+=h,u="right",c="middle";break;case"insideTop":a+=l/2,o+=i,u="center";break;case"insideBottom":a+=l/2,o+=s-i,u="center",c="bottom";break;case"insideTopLeft":a+=i,o+=i;break;case"insideTopRight":a+=l-i,o+=i,u="right";break;case"insideBottomLeft":a+=i,o+=s-i,c="bottom";break;case"insideBottomRight":a+=l-i,o+=s-i,u="right",c="bottom"}return(t=t||{}).x=a,t.y=o,t.textAlign=u,t.textVerticalAlign=c,t}function x(t,e,r,n,i){if(!e)return"";var a=(t+"").split("\n");i=_(e,r,n,i);for(var o=0,s=a.length;o=a;h++)o-=a;var u=v(r,e);return u>o&&(r="",u=0),o=t-u,n.ellipsis=r,n.ellipsisWidth=u,n.contentWidth=o,n.containerWidth=t,n}function b(t,e){var r=e.containerWidth,n=e.font,i=e.contentWidth;if(!r)return"";var a=v(t,n);if(a<=r)return t;for(var o=0;;o++){if(a<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?w(t,i,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*i/a):0;a=v(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function w(t,e,r,n){for(var i=0,a=0,o=t.length;ac)t="",o=[];else if(null!=f)for(var d=_(f-(r?r[1]+r[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),p=0,v=o.length;pa&&O(r,t.substring(a,o)),O(r,n[2],n[1]),a=d.lastIndex}am)return{lines:[],width:0,height:0};E.textWidth=v(E.text,C);var D=M.textWidth,I=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))E.percentWidth=D,f.push(E),D=0;else{if(I){D=E.textWidth;var L=M.textBackgroundColor,R=L&&L.image;R&&(R=i.findExistImage(R),i.isImageReady(R)&&(D=Math.max(D,R.width*A/R.height)))}var B=k?k[1]+k[3]:0;D+=B;var F=null!=y?y-T:null;null!=F&&F=r.length&&r.push({option:t})}})),r},e.makeIdAndName=function(t){var e=n.createHashMap();a(t,(function(t,r){var n=t.exist;n&&e.set(n.id,t)})),a(t,(function(t,r){var i=t.option;n.assert(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})})),a(t,(function(t,r){var n=t.exist,i=t.option,a=t.keyInfo;if(o(i)){if(a.name=null!=i.name?i.name+"":n?n.name:"series\0"+r,n)a.id=n.id;else if(null!=i.id)a.id=i.id+"";else{var s=0;do{a.id="\0"+a.name+"\0"+s++}while(e.get(a.id))}e.set(a.id,t)}}))},e.isNameSpecified=function(t){var e=t.name;return!(!e||!e.indexOf("series\0"))},e.isIdInner=h,e.compressBatches=function(t,e){var r={},n={};return i(t||[],r),i(e||[],n,r),[a(r),a(n)];function i(t,e,r){for(var n=0,i=t.length;n=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent);t.exports=r},function(t,e,r){var n=r(0),i=n.createHashMap,a=n.isTypedArray,o=r(35).enableClassCheck,s=r(17),l=s.SOURCE_FORMAT_ORIGINAL,h=s.SERIES_LAYOUT_BY_COLUMN,u=s.SOURCE_FORMAT_UNKNOWN,c=s.SOURCE_FORMAT_TYPED_ARRAY,f=s.SOURCE_FORMAT_KEYED_COLUMNS;function d(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===f?{}:[]),this.sourceFormat=t.sourceFormat||u,this.seriesLayoutBy=t.seriesLayoutBy||h,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&i(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}d.seriesDataToSource=function(t){return new d({data:t,sourceFormat:a(t)?c:l,fromDataset:!1})},o(d);var p=d;t.exports=p},function(t,e){e.SOURCE_FORMAT_ORIGINAL="original",e.SOURCE_FORMAT_ARRAY_ROWS="arrayRows",e.SOURCE_FORMAT_OBJECT_ROWS="objectRows",e.SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",e.SOURCE_FORMAT_UNKNOWN="unknown",e.SOURCE_FORMAT_TYPED_ARRAY="typedArray",e.SERIES_LAYOUT_BY_COLUMN="column",e.SERIES_LAYOUT_BY_ROW="row"},function(t,e){var r={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};t.exports=function(t,e,n){return r.hasOwnProperty(e)?n*t.dpr:n}},function(t,e,r){var n=r(43),i=r(44),a=r(20),o=r(45),s=r(0),l=function(t){a.call(this,t),i.call(this,t),o.call(this,t),this.id=t.id||n()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[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 r=this[t];r||(r=this[t]=[]),r[0]=e[0],r[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(s.isObject(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);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 r=0;r5e-5||t<-5e-5}var s=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},l=s.prototype;l.transform=null,l.needLocalTransform=function(){return o(this.rotation)||o(this.position[0])||o(this.position[1])||o(this.scale[0]-1)||o(this.scale[1]-1)};var h=[];l.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),i=this.transform;if(r||e){i=i||n.create(),r?this.getLocalTransform(i):a(i),e&&(r?n.mul(i,t.transform,i):n.copy(i,t.transform)),this.transform=i;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(h);var s=h[0]<0?-1:1,l=h[1]<0?-1:1,u=((h[0]-s)*o+s)/h[0]||0,c=((h[1]-l)*o+l)/h[1]||0;i[0]*=u,i[1]*=u,i[2]*=c,i[3]*=c}this.invTransform=this.invTransform||n.create(),n.invert(this.invTransform,i)}else i&&a(i)},l.getLocalTransform=function(t){return s.getLocalTransform(this,t)},l.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},l.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var u=[],c=n.create();l.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],n=this.position,i=this.scale;o(e-1)&&(e=Math.sqrt(e)),o(r-1)&&(r=Math.sqrt(r)),t[0]<0&&(e=-e),t[3]<0&&(r=-r),n[0]=t[4],n[1]=t[5],i[0]=e,i[1]=r,this.rotation=Math.atan2(-t[1]/r,t[0]/e)}},l.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(n.mul(u,t.invTransform,e),e=u);var r=this.origin;r&&(r[0]||r[1])&&(c[4]=r[0],c[5]=r[1],n.mul(u,e,c),u[4]-=r[0],u[5]-=r[1],e=u),this.setLocalTransform(e)}},l.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},l.transformCoordToLocal=function(t,e){var r=[t,e],n=this.invTransform;return n&&i.applyTransform(r,r,n),r},l.transformCoordToGlobal=function(t,e){var r=[t,e],n=this.transform;return n&&i.applyTransform(r,r,n),r},s.getLocalTransform=function(t,e){a(e=e||[]);var r=t.origin,i=t.scale||[1,1],o=t.rotation||0,s=t.position||[0,0];return r&&(e[4]-=r[0],e[5]-=r[1]),n.scale(e,e,i),o&&n.rotate(e,e,o),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=s[0],e[5]+=s[1],e};var f=s;t.exports=f},function(t,e,r){var n=r(22),i={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function a(t){return(t=Math.round(t))<0?0:t>255?255:t}function o(t){return t<0?0:t>1?1:t}function s(t){return t.length&&"%"===t.charAt(t.length-1)?a(parseFloat(t)/100*255):a(parseInt(t,10))}function l(t){return t.length&&"%"===t.charAt(t.length-1)?o(parseFloat(t)/100):o(parseFloat(t))}function h(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function u(t,e,r){return t+(e-t)*r}function c(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function f(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var d=new n(20),p=null;function v(t,e){p&&f(p,e),p=d.put(t,p||e.slice())}function g(t,e){if(t){e=e||[];var r=d.get(t);if(r)return f(e,r);var n,a=(t+="").replace(/ /g,"").toLowerCase();if(a in i)return f(e,i[a]),v(t,e),e;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(c(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),v(t,e),e):void c(e,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(c(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),v(t,e),e):void c(e,0,0,0,1):void 0;var o=a.indexOf("("),h=a.indexOf(")");if(-1!==o&&h+1===a.length){var u=a.substr(0,o),p=a.substr(o+1,h-(o+1)).split(","),g=1;switch(u){case"rgba":if(4!==p.length)return void c(e,0,0,0,1);g=l(p.pop());case"rgb":return 3!==p.length?void c(e,0,0,0,1):(c(e,s(p[0]),s(p[1]),s(p[2]),g),v(t,e),e);case"hsla":return 4!==p.length?void c(e,0,0,0,1):(p[3]=l(p[3]),y(p,e),v(t,e),e);case"hsl":return 3!==p.length?void c(e,0,0,0,1):(y(p,e),v(t,e),e);default:return}}c(e,0,0,0,1)}}function y(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=l(t[1]),i=l(t[2]),o=i<=.5?i*(n+1):i+n-i*n,s=2*i-o;return c(e=e||[],a(255*h(s,o,r+1/3)),a(255*h(s,o,r)),a(255*h(s,o,r-1/3)),1),4===t.length&&(e[3]=t[3]),e}function m(t,e,r){if(e&&e.length&&t>=0&&t<=1){r=r||[];var n=t*(e.length-1),i=Math.floor(n),s=Math.ceil(n),l=e[i],h=e[s],c=n-i;return r[0]=a(u(l[0],h[0],c)),r[1]=a(u(l[1],h[1],c)),r[2]=a(u(l[2],h[2],c)),r[3]=o(u(l[3],h[3],c)),r}}var x=m;function _(t,e,r){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),i=Math.floor(n),s=Math.ceil(n),l=g(e[i]),h=g(e[s]),c=n-i,f=w([a(u(l[0],h[0],c)),a(u(l[1],h[1],c)),a(u(l[2],h[2],c)),o(u(l[3],h[3],c))],"rgba");return r?{color:f,leftIndex:i,rightIndex:s,value:n}:f}}var b=_;function w(t,e){if(t&&t.length){var r=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(r+=","+t[3]),e+"("+r+")"}}e.parse=g,e.lift=function(t,e){var r=g(t);if(r){for(var n=0;n<3;n++)r[n]=e<0?r[n]*(1-e)|0:(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:t[n]<0&&(r[n]=0);return w(r,4===r.length?"rgba":"rgb")}},e.toHex=function(t){var e=g(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},e.fastLerp=m,e.fastMapToColor=x,e.lerp=_,e.mapToColor=b,e.modifyHSL=function(t,e,r,n){if(t=g(t))return t=function(t){if(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o,h=(s+o)/2;if(0===l)e=0,r=0;else{r=h<.5?l/(s+o):l/(2-s-o);var u=((s-n)/6+l/2)/l,c=((s-i)/6+l/2)/l,f=((s-a)/6+l/2)/l;n===s?e=f-c:i===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,r,h];return null!=t[3]&&d.push(t[3]),d}}(t),null!=e&&(t[0]=(i=e,(i=Math.round(i))<0?0:i>360?360:i)),null!=r&&(t[1]=l(r)),null!=n&&(t[2]=l(n)),w(y(t),"rgba");var i},e.modifyAlpha=function(t,e){if((t=g(t))&&null!=e)return t[3]=o(e),w(t,"rgba")},e.stringify=w},function(t,e){var r=function(){this.head=null,this.tail=null,this._len=0},n=r.prototype;n.insert=function(t){var e=new i(t);return this.insertEntry(e),e},n.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++},n.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.len=function(){return this._len},n.clear=function(){this.head=this.tail=null,this._len=0};var i=function(t){this.value=t,this.next,this.prev},a=function(t){this._list=new r,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},o=a.prototype;o.put=function(t,e){var r=this._list,n=this._map,a=null;if(null==n[t]){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=r.head;r.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,r.insertEntry(s),n[t]=s}return a},o.get=function(t){var e=this._map[t],r=this._list;if(null!=e)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},o.clear=function(){this._list.clear(),this._map={}};var s=a;t.exports=s},function(t,e){var r=1;"undefined"!=typeof window&&(r=Math.max(window.devicePixelRatio||1,1));var n=r;e.debugMode=0,e.devicePixelRatio=n},function(t,e,r){var n=r(0),i=n.retrieve2,a=n.retrieve3,o=n.each,s=n.normalizeCssArray,l=n.isString,h=n.isObject,u=r(11),c=r(25),f=r(12),d=r(18),p=r(7),v=p.ContextCachedBy,g=p.WILL_BE_RESTORED,y=u.DEFAULT_FONT,m={left:1,right:1,center:1},x={top:1,bottom:1,middle:1},_=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],b={},w={};function S(t){if(t){t.font=u.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||m[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;"center"===r&&(r="middle"),t.textVerticalAlign=null==r||x[r]?r:"top",t.textPadding&&(t.textPadding=s(t.textPadding))}}function T(t,e,r,n,i){if(r&&e.textRotation){var a=e.textOrigin;"center"===a?(n=r.width/2+r.x,i=r.height/2+r.y):a&&(n=a[0]+r.x,i=a[1]+r.y),t.translate(n,i),t.rotate(-e.textRotation),t.translate(-n,-i)}}function P(t,e,r,n,o,s,l,h){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.textVerticalAlign,f=s+o/2;"top"===c?f=s+r.height/2:"bottom"===c&&(f=s+o-r.height/2),!r.isLineHolder&&M(u)&&O(t,e,u,"right"===h?l-r.width:"center"===h?l-r.width/2:l,f-r.height/2,r.width,r.height);var d=r.textPadding;d&&(l=R(l,h,d),f-=r.height/2-d[2]-r.textHeight/2),A(e,"shadowBlur",a(u.textShadowBlur,n.textShadowBlur,0)),A(e,"shadowColor",u.textShadowColor||n.textShadowColor||"transparent"),A(e,"shadowOffsetX",a(u.textShadowOffsetX,n.textShadowOffsetX,0)),A(e,"shadowOffsetY",a(u.textShadowOffsetY,n.textShadowOffsetY,0)),A(e,"textAlign",h),A(e,"textBaseline","middle"),A(e,"font",r.font||y);var p=D(u.textStroke||n.textStroke,g),v=I(u.textFill||n.textFill),g=i(u.textStrokeWidth,n.textStrokeWidth);p&&(A(e,"lineWidth",g),A(e,"strokeStyle",p),e.strokeText(r.text,l,f)),v&&(A(e,"fillStyle",v),e.fillText(r.text,l,f))}function M(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function O(t,e,r,n,i,a,o){var s=r.textBackgroundColor,u=r.textBorderWidth,d=r.textBorderColor,p=l(s);if(A(e,"shadowBlur",r.textBoxShadowBlur||0),A(e,"shadowColor",r.textBoxShadowColor||"transparent"),A(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),A(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),p||u&&d){e.beginPath();var v=r.textBorderRadius;v?c.buildPath(e,{x:n,y:i,width:a,height:o,r:v}):e.rect(n,i,a,o),e.closePath()}if(p)if(A(e,"fillStyle",s),null!=r.fillOpacity){var g=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,e.fill(),e.globalAlpha=g}else e.fill();else if(h(s)){var y=s.image;(y=f.createOrUpdateImage(y,null,t,k,s))&&f.isImageReady(y)&&e.drawImage(y,n,i,a,o)}if(u&&d)if(A(e,"lineWidth",u),A(e,"strokeStyle",d),null!=r.strokeOpacity){g=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,e.stroke(),e.globalAlpha=g}else e.stroke()}function k(t,e){e.image=t}function C(t,e,r,n){var i=r.x||0,a=r.y||0,o=r.textAlign,s=r.textVerticalAlign;if(n){var l=r.textPosition;if(l instanceof Array)i=n.x+L(l[0],n.width),a=n.y+L(l[1],n.height);else{var h=e&&e.calculateTextPosition?e.calculateTextPosition(b,r,n):u.calculateTextPosition(b,r,n);i=h.x,a=h.y,o=o||h.textAlign,s=s||h.textVerticalAlign}var c=r.textOffset;c&&(i+=c[0],a+=c[1])}return(t=t||{}).baseX=i,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function A(t,e,r){return t[e]=d(t,e,r),t[e]}function D(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function I(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function L(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function R(t,e,r){return"right"===e?t-r[1]:"center"===e?t+r[3]/2-r[1]/2:t+r[3]}e.normalizeTextStyle=function(t){return S(t),o(t.rich,S),t},e.renderText=function(t,e,r,n,i,a){n.rich?function(t,e,r,n,i,a){a!==g&&(e.__attrCachedBy=v.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=u.parseRichText(r,n));!function(t,e,r,n,i){var a=r.width,o=r.outerWidth,s=r.outerHeight,l=n.textPadding,h=C(w,t,n,i),c=h.baseX,f=h.baseY,d=h.textAlign,p=h.textVerticalAlign;T(e,n,i,c,f);var v=u.adjustTextX(c,o,d),g=u.adjustTextY(f,s,p),y=v,m=g;l&&(y+=l[3],m+=l[0]);var x=y+a;M(n)&&O(t,e,n,v,g,o,s);for(var _=0;_=0&&"right"===(b=k[F]).textAlign;)P(t,e,b,n,D,m,B,"right"),I-=b.width,B-=b.width,F--;for(R+=(a-(R-y)-(x-B)-I)/2;L<=F;)b=k[L],P(t,e,b,n,D,m,R+b.width/2,"center"),R+=b.width,L++;m+=D}}(t,e,o,n,i)}(t,e,r,n,i,a):function(t,e,r,n,i,a){"use strict";var o,s=M(n),l=!1,h=e.__attrCachedBy===v.PLAIN_TEXT;a!==g?(a&&(o=a.style,l=!s&&h&&o),e.__attrCachedBy=s?v.NONE:v.PLAIN_TEXT):h&&(e.__attrCachedBy=v.NONE);var c=n.font||y;l&&c===(o.font||y)||(e.font=c);var f=t.__computedFont;t.__styleFont!==c&&(t.__styleFont=c,f=t.__computedFont=e.font);var p=n.textPadding,m=n.textLineHeight,x=t.__textCotentBlock;x&&!t.__dirtyText||(x=t.__textCotentBlock=u.parsePlainText(r,f,p,m,n.truncate));var b=x.outerHeight,S=x.lines,P=x.lineHeight,k=C(w,t,n,i),A=k.baseX,L=k.baseY,B=k.textAlign||"left",F=k.textVerticalAlign;T(e,n,i,A,L);var E=u.adjustTextY(L,b,F),N=A,z=E;if(s||p){var W=u.getWidth(r,f);p&&(W+=p[1]+p[3]);var q=u.adjustTextX(A,W,B);s&&O(t,e,n,q,E,W,b),p&&(N=R(A,B,p),z+=p[0])}e.textAlign=B,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var H=0;H<_.length;H++){var j=_[H],Y=j[0],U=j[1],V=n[Y];l&&V===o[Y]||(e[U]=d(e,U,V||j[2]))}z+=P/2;var G=n.textStrokeWidth,X=l?o.textStrokeWidth:null,Z=!l||G!==X,Q=!l||Z||n.textStroke!==o.textStroke,$=D(n.textStroke,G),K=I(n.textFill);$&&(Z&&(e.lineWidth=G),Q&&(e.strokeStyle=$));K&&(l&&n.textFill===o.textFill||(e.fillStyle=K));if(1===S.length)$&&e.strokeText(S[0],N,z),K&&e.fillText(S[0],N,z);else for(H=0;Hh&&(r*=h/(o=r+n),n*=h/o),i+a>h&&(i*=h/(o=i+a),a*=h/o),n+i>u&&(n*=u/(o=n+i),i*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),t.moveTo(s+r,l),t.lineTo(s+h-n,l),0!==n&&t.arc(s+h-n,l+n,n,-Math.PI/2,0),t.lineTo(s+h,l+u-i),0!==i&&t.arc(s+h-i,l+u-i,i,0,Math.PI/2),t.lineTo(s+a,l+u),0!==a&&t.arc(s+a,l+u-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+r),0!==r&&t.arc(s+r,l+r,r,Math.PI,1.5*Math.PI)}},function(t,e){var r=2*Math.PI;e.normalizeRadian=function(t){return(t%=r)<0&&(t+=r),t}},function(t,e,r){var n=r(68),i=r(69);e.buildPath=function(t,e,r){var a=e.points,o=e.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=i(a,o,r,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,h=0;h<(r?l:l-1);h++){var u=s[2*h],c=s[2*h+1],f=a[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],f[0],f[1])}}else{"spline"===o&&(a=n(a,r)),t.moveTo(a[0][0],a[0][1]);h=1;for(var d=a.length;hs?(s*=2*t/o,o=2*t):(o*=2*t/s,s=2*t);var l=e?0:b-o/2,h=e?0:w-s/2;return r=n.graphic.makePath(T.slice(7),{},new n.graphic.BoundingRect(l,h,o,s)),e&&(r.position=[-o/2,-s/2]),r}if(S){var u=e?-t[0]:b-t[0],c=e?-t[1]:w-t[1];return a.createSymbol("rect",u,c,2*t[0],2*t[1])}u=e?-t:b-t,c=e?-t:w-t;return"pin"===T?c+=t:"arrow"===T&&(c-=t),a.createSymbol(T,u,c,2*t,2*t)}return new n.graphic.Circle({shape:{cx:e?0:b,cy:e?0:w,r:t}})}function D(){var e=A(m);return e.style.fill=null,e.setStyle(t.getModel("outline.itemStyle").getItemStyle()),e}function I(e,r,i){var a=S?c[0]:c,h=S?d/2:c,u=l.getItemModel(e),f=u.getModel("itemStyle"),p=u.get("phase"),v=o(u.get("amplitude"),2*h),g=o(u.get("waveLength"),2*a),y=h-l.get("value",e)*h*2;p=i?i.shape.phase:"auto"===p?e*Math.PI/4:p;var m=f.getItemStyle();if(!m.fill){var x=t.get("color"),_=e%x.length;m.fill=x[_]}var T=new s({shape:{waveLength:g,radius:a,radiusY:h,cx:2*a,cy:0,waterLevel:y,amplitude:v,phase:p,inverse:r},style:m,position:[b,w]});T.shape._waterLevel=y;var P=u.getModel("emphasis.itemStyle").getItemStyle();P.lineWidth=0,n.graphic.setHoverStyle(T,P);var M=A(c,!0);return M.setStyle({fill:"white"}),T.setClipPath(M),T}function L(t,e,r){var n=l.getItemModel(t),i=n.get("period"),a=n.get("direction"),o=l.get("value",t),s=n.get("phase");s=r?r.shape.phase:"auto"===s?t*Math.PI/4:s;var h=0;h="auto"===i?function(e){var r=l.count();return 0===r?e:e*(.2+(r-t)/r*.8)}(5e3):"function"==typeof i?i(o,t):i;var u=0;"right"===a||null==a?u=Math.PI:"left"===a?u=-Math.PI:"none"===a?u=0:console.error("Illegal direction value for liquid fill."),"none"!==a&&n.get("waveAnimation")&&e.animate("shape",!0).when(0,{phase:s}).when(h/2,{phase:u+s}).when(h,{phase:2*u+s}).during((function(){O&&O.dirty(!0)})).start()}l.diff(k).add((function(e){var r=I(e,!1),a=r.shape.waterLevel;r.shape.waterLevel=S?d/2:c,n.graphic.initProps(r,{shape:{waterLevel:a}},t),r.z2=2,L(e,r,null),i.add(r),l.setItemGraphicEl(e,r),C.push(r)})).update((function(e,r){for(var a=k.getItemGraphicEl(r),o=I(e,!1,a),s={},h=["amplitude","cx","cy","phase","radius","radiusY","waterLevel","waveLength"],u=0;u=0),l=!s&&null!=i;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=i,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=i)}t.insideRollback=e}function at(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ot(t,e,r,n,i,a){if("function"==typeof i&&(a=i,i=null),n&&n.isAnimationEnabled()){var o=t?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),h=n.getShallow("animationDelay"+o);"function"==typeof h&&(h=h(i,n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null)),"function"==typeof s&&(s=s(i)),s>0?e.animateTo(r,s,h||0,l,a,!!a):(e.stopAnimation(),e.attr(r),a&&a())}else e.stopAnimation(),e.attr(r),a&&a()}function st(t,e,r,n,i){ot(!0,t,e,r,n,i)}function lt(t,e,r){return e&&!n.isArrayLike(e)&&(e=h.getLocalTransform(e)),r&&(e=o.invert([],e)),s.applyTransform([],t,e)}function ht(t,e,r,n,i,a,o,s){var l,h=r-t,u=n-e,c=o-i,f=s-a,d=ut(c,f,h,u);if((l=d)<=1e-6&&l>=-1e-6)return!1;var p=t-i,v=e-a,g=ut(p,v,h,u)/d;if(g<0||g>1)return!1;var y=ut(p,v,c,f)/d;return!(y<0||y>1)}function ut(t,e,r,n){return t*n-r*e}R("circle",d),R("sector",p),R("ring",v),R("polygon",g),R("polyline",y),R("rect",m),R("line",x),R("bezierCurve",_),R("arc",b),e.Z2_EMPHASIS_LIFT=1,e.CACHED_LABEL_STYLE_PROPERTIES={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},e.extendShape=function(t){return l.extend(t)},e.extendPath=function(t,e){return i.extendFromString(t,e)},e.registerShape=R,e.getShapeClass=function(t){if(L.hasOwnProperty(t))return L[t]},e.makePath=B,e.makeImage=function(t,e,r){var n=new u({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===r){var i={width:t.width,height:t.height};n.setStyle(F(e,i))}}});return n},e.mergePath=E,e.resizePath=N,e.subPixelOptimizeLine=function(t){return O.subPixelOptimizeLine(t.shape,t.shape,t.style),t},e.subPixelOptimizeRect=function(t){return O.subPixelOptimizeRect(t.shape,t.shape,t.style),t},e.subPixelOptimize=z,e.setElementHoverStyle=G,e.setHoverStyle=function(t,e){J(t,!0),V(t,G,e)},e.setAsHighDownDispatcher=J,e.isHighDownDispatcher=function(t){return!(!t||!t.__highDownDispatcher)},e.getHighlightDigit=function(t){var e=I[t];return null==e&&D<=32&&(e=I[t]=D++),e},e.setLabelStyle=function(t,e,r,i,a,o,s){var l,h=(a=a||A).labelFetcher,u=a.labelDataIndex,c=a.labelDimIndex,f=a.labelProp,d=r.getShallow("show"),p=i.getShallow("show");(d||p)&&(h&&(l=h.getFormattedLabel(u,"normal",null,c,f)),null==l&&(l=n.isFunction(a.defaultText)?a.defaultText(u,a):a.defaultText));var v=d?l:null,g=p?n.retrieve2(h?h.getFormattedLabel(u,"emphasis",null,c,f):null,l):null;null==v&&null==g||(tt(t,r,o,a),tt(e,i,s,a,!0)),t.text=v,e.text=g},e.modifyLabelStyle=function(t,e,r){var i=t.style;e&&(at(i),t.setStyle(e),it(i)),i=t.__hoverStl,r&&i&&(at(i),n.extend(i,r),it(i))},e.setTextStyle=tt,e.setText=function(t,e,r){var n,i={isRectText:!0};!1===r?n=!0:i.autoColor=r,et(t,e,i,n)},e.getFont=function(t,e){var r=e&&e.getModel("textStyle");return n.trim([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))},e.updateProps=st,e.initProps=function(t,e,r,n,i){ot(!1,t,e,r,n,i)},e.getTransform=function(t,e){for(var r=o.identity([]);t&&t!==e;)o.mul(r,t.getLocalTransform(),r),t=t.parent;return r},e.applyTransform=lt,e.transformDirection=function(t,e,r){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),i=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-i:"bottom"===t?i:0];return a=lt(a,e,r),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},e.groupTransition=function(t,e,r,i){if(t&&e){var a,o=(a={},t.traverse((function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)})),a);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=l(t);t.attr(l(e)),st(t,n,r,t.dataIndex)}}}))}function l(t){var e={position:s.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=n.extend({},t.shape)),e}},e.clipPointsByRect=function(t,e){return n.map(t,(function(t){var r=t[0];r=k(r,e.x),r=C(r,e.x+e.width);var n=t[1];return n=k(n,e.y),[r,n=C(n,e.y+e.height)]}))},e.clipRectByRect=function(t,e){var r=k(t.x,e.x),n=C(t.x+t.width,e.x+e.width),i=k(t.y,e.y),a=C(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}},e.createIcon=function(t,e,r){var i=(e=n.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),n.defaults(i,r),new u(e)):B(t.replace("path://",""),e,r,"center")},e.linePolygonIntersect=function(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1&&(u*=o(_),d*=o(_));var b=(i===a?-1:1)*o((u*u*(d*d)-u*u*(x*x)-d*d*(m*m))/(u*u*(x*x)+d*d*(m*m)))||0,w=b*u*x/d,S=b*-d*m/u,T=(t+r)/2+l(y)*w-s(y)*S,P=(e+n)/2+s(y)*w+l(y)*S,M=f([1,0],[(m-w)/u,(x-S)/d]),O=[(m-w)/u,(x-S)/d],k=[(-1*m-w)/u,(-1*x-S)/d],C=f(O,k);c(O,k)<=-1&&(C=h),c(O,k)>=1&&(C=0),0===a&&C>0&&(C-=2*h),1===a&&C<0&&(C+=2*h),g.addData(v,T,P,u,d,M,C,y,a)}var p=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,v=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function g(t,e){var r=function(t){if(!t)return new i;for(var e,r=0,n=0,a=r,o=n,s=new i,l=i.CMD,h=t.match(p),u=0;u0},extendFrom:function(t,e){if(t)for(var r in t)!t.hasOwnProperty(r)||!0!==e&&(!1===e?this.hasOwnProperty(r):null==t[r])||(this[r]=t[r])},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,r){for(var n=("radial"===e.type?l:s)(t,e,r),i=e.colorStops,a=0;a3&&(i=r.call(i,1));for(var o=e.length,s=0;s4&&(i=r.call(i,1,i.length-1));for(var o=i[i.length-1],s=e.length,l=0;l0&&e.animate(r,!1).when(null==a?500:a,u).delay(o||0)}(t,"",t,e,r,n,c);var f=t.animators.slice(),p=f.length;function v(){--p||a&&a()}p||a&&a();for(var g=0;g.5?e:t}function c(t,e,r,n,i){var a=t.length;if(1===i)for(var o=0;oi)t.length=i;else for(var a=n;a=0&&!(O[r]<=e);r--);r=Math.min(r,_-2)}else{for(r=W;r<_&&!(O[r]>e);r++);r=Math.min(r-1,_-2)}W=r,q=e;var n=O[r+1]-O[r];if(0!==n)if(B=(e-O[r])/n,x)if(E=k[r],F=k[0===r?r:r-1],N=k[r>_-2?_-1:r+1],z=k[r>_-3?_-1:r+2],S)p(F,E,N,z,B,B*B,B*B*B,g(t,s),M);else{if(T)i=p(F,E,N,z,B,B*B,B*B*B,H,1),i=y(H);else{if(P)return u(E,N,B);i=v(F,E,N,z,B,B*B,B*B*B)}m(t,s,i)}else if(S)c(k[r],k[r+1],B,g(t,s),M);else{var i;if(T)c(k[r],k[r+1],B,H,1),i=y(H);else{if(P)return u(k[r],k[r+1],B);i=h(k[r],k[r+1],B)}m(t,s,i)}},ondestroy:r});return e&&"spline"!==e&&(j.easing=e),j}}}var x=function(t,e,r,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||s,this._setter=n||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};x.prototype={when:function(t,e){var r=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!r[n]){r[n]=[];var i=this._getter(this._target,n);if(null==i)continue;0!==t&&r[n].push({time:0,value:g(i)})}r[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t1e-4)return p[0]=t-r,p[1]=e-i,v[0]=t+r,void(v[1]=e+i);if(u[0]=l(a)*r+t,u[1]=s(a)*i+e,c[0]=l(o)*r+t,c[1]=s(o)*i+e,g(p,u,c),y(v,u,c),(a%=h)<0&&(a+=h),(o%=h)<0&&(o+=h),a>o&&!d?o+=h:aa&&(f[0]=l(_)*r+t,f[1]=s(_)*i+e,g(p,f,p),y(v,f,v))}},function(t,e,r){var n=r(8),i=r(53),a=r(54),o=r(55),s=r(56),l=r(26).normalizeRadian,h=r(4),u=r(57),c=n.CMD,f=2*Math.PI;var d=[-1,-1,-1],p=[-1,-1];function v(t,e,r,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u1&&(c=void 0,c=p[0],p[0]=p[1],p[1]=c),v=h.cubicAt(e,n,a,s,p[0]),m>1&&(g=h.cubicAt(e,n,a,s,p[1]))),2===m?_e&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=h.quadraticAt(e,n,a,u),p=0;pr||s<-r)return 0;var h=Math.sqrt(r*r-s*s);d[0]=-h,d[1]=h;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u%f<1e-4){n=0,i=f;var c=a?1:-1;return o>=d[0]+t&&o<=d[1]+t?c:0}if(a){h=n;n=l(i),i=l(h)}else n=l(n),i=l(i);n>i&&(i+=f);for(var p=0,v=0;v<2;v++){var g=d[v];if(g+t>o){var y=Math.atan2(s,g);c=a?1:-1;y<0&&(y=f+y),(y>=n&&y<=i||y+f>=n&&y+f<=i)&&(y>Math.PI/2&&y<1.5*Math.PI&&(c=-c),p+=c)}}return p}function m(t,e,r,n,l){for(var h,f,d=0,p=0,m=0,x=0,_=0,b=0;b1&&(r||(d+=u(p,m,x,_,n,l))),1===b&&(x=p=t[b],_=m=t[b+1]),w){case c.M:p=x=t[b++],m=_=t[b++];break;case c.L:if(r){if(i.containStroke(p,m,t[b],t[b+1],e,n,l))return!0}else d+=u(p,m,t[b],t[b+1],n,l)||0;p=t[b++],m=t[b++];break;case c.C:if(r){if(a.containStroke(p,m,t[b++],t[b++],t[b++],t[b++],t[b],t[b+1],e,n,l))return!0}else d+=v(p,m,t[b++],t[b++],t[b++],t[b++],t[b],t[b+1],n,l)||0;p=t[b++],m=t[b++];break;case c.Q:if(r){if(o.containStroke(p,m,t[b++],t[b++],t[b],t[b+1],e,n,l))return!0}else d+=g(p,m,t[b++],t[b++],t[b],t[b+1],n,l)||0;p=t[b++],m=t[b++];break;case c.A:var S=t[b++],T=t[b++],P=t[b++],M=t[b++],O=t[b++],k=t[b++];b+=1;var C=1-t[b++],A=Math.cos(O)*P+S,D=Math.sin(O)*M+T;b>1?d+=u(p,m,A,D,n,l):(x=A,_=D);var I=(n-S)*M/P+S;if(r){if(s.containStroke(S,T,M,O,O+k,C,e,I,l))return!0}else d+=y(S,T,M,O,O+k,C,I,l);p=Math.cos(O+k)*P+S,m=Math.sin(O+k)*M+T;break;case c.R:x=p=t[b++],_=m=t[b++];A=x+t[b++],D=_+t[b++];if(r){if(i.containStroke(x,_,A,_,e,n,l)||i.containStroke(A,_,A,D,e,n,l)||i.containStroke(A,D,x,D,e,n,l)||i.containStroke(x,D,x,_,e,n,l))return!0}else d+=u(A,_,A,D,n,l),d+=u(x,D,x,_,n,l);break;case c.Z:if(r){if(i.containStroke(p,m,x,_,e,n,l))return!0}else d+=u(p,m,x,_,n,l);p=x,m=_}}return r||(h=m,f=_,Math.abs(h-f)<1e-4)||(d+=u(p,m,x,_,n,l)||0),0!==d}e.contain=function(t,e,r){return m(t,0,!1,e,r)},e.containStroke=function(t,e,r,n){return m(t,e,!0,r,n)}},function(t,e){e.containStroke=function(t,e,r,n,i,a,o){if(0===i)return!1;var s=i,l=0;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+f&&c>i+f&&c>o+f&&c>l+f||ct+f&&u>r+f&&u>a+f&&u>s+f||ue+u&&h>i+u&&h>o+u||ht+u&&l>r+u&&l>a+u||lr||f+co&&(o+=i);var p=Math.atan2(u,h);return p<0&&(p+=i),p>=a&&p<=o||p+i>=a&&p+i<=o}},function(t,e){t.exports=function(t,e,r,n,i,a){if(a>e&&a>n||ai?o:0}},function(t,e){var r=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};r.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var n=r;t.exports=n},function(t,e,r){var n=r(8),i=r(2).applyTransform,a=n.CMD,o=[[],[],[]],s=Math.sqrt,l=Math.atan2;t.exports=function(t,e){var r,n,h,u,c,f=t.data,d=a.M,p=a.C,v=a.L,g=a.R,y=a.A,m=a.Q;for(h=0,u=0;h=0&&(r.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,r=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof o&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,i=this._children,a=n.indexOf(i,t);return a<0||(i.splice(a,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof o&&t.delChildrenFromStorage(r)),e&&e.refresh()),this},removeAll:function(){var t,e,r=this._children,n=this.__storage;for(e=0;e=11?function(){var e,r=this.__clipPaths,n=this.style;if(r)for(var a=0;ar-2?r-1:d+1],c=t[d>r-3?r-1:d+2]);var g=p*p,y=p*g;a.push([i(h[0],v[0],u[0],c[0],p,g,y),i(h[1],v[1],u[1],c[1],p,g,y)])}return a}},function(t,e,r){var n=r(2),i=n.min,a=n.max,o=n.scale,s=n.distance,l=n.add,h=n.clone,u=n.sub;t.exports=function(t,e,r,n){var c,f,d,p,v=[],g=[],y=[],m=[];if(n){d=[1/0,1/0],p=[-1/0,-1/0];for(var x=0,_=t.length;x<_;x++)i(d,d,t[x]),a(p,p,t[x]);i(d,d,n[0]),a(p,p,n[1])}for(x=0,_=t.length;x<_;x++){var b=t[x];if(r)c=t[x?x-1:_-1],f=t[(x+1)%_];else{if(0===x||x===_-1){v.push(h(t[x]));continue}c=t[x-1],f=t[x+1]}u(g,f,c),o(g,g,e);var w=s(b,c),S=s(b,f),T=w+S;0!==T&&(w/=T,S/=T),o(y,g,-w),o(m,g,S);var P=l([],b,y),M=l([],b,m);n&&(a(P,P,d),i(P,P,p),a(M,M,d),i(M,M,p)),v.push(P),v.push(M)}return r&&v.push(v.shift()),v}},function(t,e,r){var n=r(1),i=r(27),a=n.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){i.buildPath(t,e,!1)}});t.exports=a},function(t,e,r){var n=r(1),i=r(25),a=r(13).subPixelOptimizeRect,o={},s=n.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var r,n,s,l;this.subPixelOptimize?(a(o,e,this.style),r=o.x,n=o.y,s=o.width,l=o.height,o.r=e.r,e=o):(r=e.x,n=e.y,s=e.width,l=e.height),e.r?i.buildPath(t,e):t.rect(r,n,s,l),t.closePath()}});t.exports=s},function(t,e,r){var n=r(1),i=r(13).subPixelOptimizeLine,a={},o=n.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r,n,o,s;this.subPixelOptimize?(i(a,e,this.style),r=a.x1,n=a.y1,o=a.x2,s=a.y2):(r=e.x1,n=e.y1,o=e.x2,s=e.y2);var l=e.percent;0!==l&&(t.moveTo(r,n),l<1&&(o=r*(1-l)+o*l,s=n*(1-l)+s*l),t.lineTo(o,s))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}});t.exports=o},function(t,e,r){var n=r(1),i=r(2),a=r(4),o=a.quadraticSubdivide,s=a.cubicSubdivide,l=a.quadraticAt,h=a.cubicAt,u=a.quadraticDerivativeAt,c=a.cubicDerivativeAt,f=[];function d(t,e,r){var n=t.cpx2,i=t.cpy2;return null===n||null===i?[(r?c:h)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?c:h)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?u:l)(t.x1,t.cpx1,t.x2,e),(r?u:l)(t.y1,t.cpy1,t.y2,e)]}var p=n.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 r=e.x1,n=e.y1,i=e.x2,a=e.y2,l=e.cpx1,h=e.cpy1,u=e.cpx2,c=e.cpy2,d=e.percent;0!==d&&(t.moveTo(r,n),null==u||null==c?(d<1&&(o(r,l,i,d,f),l=f[1],i=f[2],o(n,h,a,d,f),h=f[1],a=f[2]),t.quadraticCurveTo(l,h,i,a)):(d<1&&(s(r,l,u,i,d,f),l=f[1],u=f[2],i=f[3],s(n,h,c,a,d,f),h=f[1],c=f[2],a=f[3]),t.bezierCurveTo(l,h,u,c,i,a)))},pointAt:function(t){return d(this.shape,t,!1)},tangentAt:function(t){var e=d(this.shape,t,!0);return i.normalize(e,e)}});t.exports=p},function(t,e,r){var n=r(1).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 r=e.cx,n=e.cy,i=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*i+r,h*i+n),t.arc(r,n,i,a,o,!s)}});t.exports=n},function(t,e,r){var n=r(1),i=n.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,r=0;r0;)e.phase-=2*Math.PI;var n=e.phase/Math.PI/2*e.waveLength,a=e.cx-e.radius+n-2*e.radius;t.moveTo(a,e.waterLevel);for(var o=0,s=0;s_y||t<-_y}function ft(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 gt(t){return(t=Math.round(t))<0?0:t>255?255:t}function pt(t){return(t=Math.round(t))<0?0:t>360?360:t}function mt(t){return t<0?0:t>1?1:t}function vt(t){return gt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function yt(t){return mt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function xt(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 _t(t,e,i){return t+(e-t)*i}function bt(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function wt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function St(t,e){Py&&wt(Py,e),Py=ky.put(t,Py||e.slice())}function Mt(t,e){if(t){e=e||[];var i=ky.get(t);if(i)return wt(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in Ly)return wt(e,Ly[n]),St(t,e),e;if("#"!==n.charAt(0)){var o=n.indexOf("("),a=n.indexOf(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void bt(e,0,0,0,1);l=yt(s.pop());case"rgb":return 3!==s.length?void bt(e,0,0,0,1):(bt(e,vt(s[0]),vt(s[1]),vt(s[2]),l),St(t,e),e);case"hsla":return 4!==s.length?void bt(e,0,0,0,1):(s[3]=yt(s[3]),It(s,e),St(t,e),e);case"hsl":return 3!==s.length?void bt(e,0,0,0,1):(It(s,e),St(t,e),e);default:return}}bt(e,0,0,0,1)}else{if(4===n.length)return(h=parseInt(n.substr(1),16))>=0&&h<=4095?(bt(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),St(t,e),e):void bt(e,0,0,0,1);if(7===n.length){var h=parseInt(n.substr(1),16);return h>=0&&h<=16777215?(bt(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),St(t,e),e):void bt(e,0,0,0,1)}}}}function It(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=yt(t[1]),o=yt(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],bt(e,gt(255*xt(r,a,i+1/3)),gt(255*xt(r,a,i)),gt(255*xt(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Tt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,h=(s+r)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+r):l/(2-s-r);var u=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+u-d:a===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}function At(t,e){var i=Mt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return Ot(i,4===i.length?"rgba":"rgb")}}function Ct(t){var e=Mt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Dt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=gt(_t(r[0],s[0],l)),i[1]=gt(_t(r[1],s[1],l)),i[2]=gt(_t(r[2],s[2],l)),i[3]=mt(_t(r[3],s[3],l)),i}}function Lt(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Mt(e[o]),s=Mt(e[a]),l=n-o,h=Ot([gt(_t(r[0],s[0],l)),gt(_t(r[1],s[1],l)),gt(_t(r[2],s[2],l)),mt(_t(r[3],s[3],l))],"rgba");return i?{color:h,leftIndex:o,rightIndex:a,value:n}:h}}function kt(t,e,i,n){if(t=Mt(t))return t=Tt(t),null!=e&&(t[0]=pt(e)),null!=i&&(t[1]=yt(i)),null!=n&&(t[2]=yt(n)),Ot(It(t),"rgba")}function Pt(t,e){if((t=Mt(t))&&null!=e)return t[3]=mt(e),Ot(t,"rgba")}function Ot(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 zt(t,e){return t[e]}function Nt(t,e,i){t[e]=i}function Et(t,e,i){return(e-t)*i+t}function Rt(t,e,i){return i>.5?e:t}function Vt(t,e,i,n,o){var a=t.length;if(1==o)for(s=0;so)t.length=o;else for(r=n;r=0&&!(m[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=L;ie);i++);i=Math.min(i-1,h-2)}L=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(I=(e-m[i])/n,l)if(A=v[i],T=v[0===i?i:i-1],C=v[i>h-2?h-1:i+1],D=v[i>h-3?h-1:i+2],d)Wt(T,A,C,D,I,I*I,I*I*I,r(t,o),p);else{if(f)a=Wt(T,A,C,D,I,I*I,I*I*I,P,1),a=Zt(P);else{if(g)return Rt(A,C,I);a=Ht(T,A,C,D,I,I*I,I*I*I)}s(t,o,a)}else if(d)Vt(v[i],v[i+1],I,r(t,o),p);else{var a;if(f)Vt(v[i],v[i+1],I,P,1),a=Zt(P);else{if(g)return Rt(v[i],v[i+1],I);a=Et(v[i],v[i+1],I)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(O.easing=e),O}}}function jt(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function qt(t){for(var e=0;t>=qy;)e|=1&t,t>>=1;return t+e}function Yt(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o=0;)o++;return o-e}function $t(t,e,i){for(i--;e>>1])<0?l=a:s=a+1;var h=n-s;switch(h){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(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=r}}function Jt(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;ls&&(l=s);var h=r;r=o-l,l=o-h}for(r++;r>>1);a(t,e[i+u])>0?r=u+1:l=u}return l}function Qt(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;ls&&(l=s);var h=r;r=o-l,l=o-h}else{for(s=n-o;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r>>1);a(t,e[i+u])<0?l=u:r=u+1}return l}function te(t,e){function i(i){var s=a[i],h=r[i],u=a[i+1],c=r[i+1];r[i]=h+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=Qt(t[u],t,s,h,0,e);s+=d,0!==(h-=d)&&0!==(c=Jt(t[s+h-1],t,u,c,c-1,e))&&(h<=c?n(s,h,u,c):o(s,h,u,c))}function n(i,n,o,a){var r=0;for(r=0;r=Yy||f>=Yy);if(g)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===n){for(r=0;r=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=h[u--],1==--a){v=!0;break}if(0!=(m=a-Jt(t[l],h,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(u-=m)+1,r=0;r=Yy||m>=Yy);if(v)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=h[u]}else{if(0===a)throw new Error;for(d=c-(a-1),r=0;r=0;r--)t[f+r]=t[d+r];t[c]=h[u]}else for(d=c-(a-1),r=0;r1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]s&&(l=s),Kt(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}function ie(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function ne(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),t.createLinearGradient(n,a,o,r)}function oe(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}function ae(){return!1}function re(t,e,i){var n=iy(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.width=o*i,n.height=a*i,n.setAttribute("data-zr-dom-id",t),n}function se(t){if("string"==typeof t){var e=ax.get(t);return e&&e.image}return t}function le(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=ax.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?!ue(e=a.image)&&a.pending.push(r):(!e&&(e=new Image),e.onload=he,ax.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function he(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;elx&&(sx=0,rx={}),sx++,rx[i]=o,o}function de(t,e,i,n,o,a,r){return a?ge(t,e,i,n,o,a,r):fe(t,e,i,n,o,r)}function fe(t,e,i,n,o,a){var r=Me(t,e,o,a),s=ce(t,e);o&&(s+=o[1]+o[3]);var l=r.outerHeight,h=new jt(pe(0,s,i),me(0,l,n),s,l);return h.lineHeight=r.lineHeight,h}function ge(t,e,i,n,o,a,r){var s=Ie(t,{rich:a,truncate:r,font:e,textAlign:i,textPadding:o}),l=s.outerWidth,h=s.outerHeight;return new jt(pe(0,l,i),me(0,h,n),l,h)}function pe(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function me(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function ve(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",h="top";switch(t){case"left":n-=i,o+=s,l="right",h="middle";break;case"right":n+=i+r,o+=s,h="middle";break;case"top":n+=r/2,o-=i,l="center",h="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",h="middle";break;case"insideLeft":n+=i,o+=s,h="middle";break;case"insideRight":n+=r-i,o+=s,l="right",h="middle";break;case"insideTop":n+=r/2,o+=i,l="center";break;case"insideBottom":n+=r/2,o+=a-i,l="center",h="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=r-i,o+=i,l="right";break;case"insideBottomLeft":n+=i,o+=a-i,h="bottom";break;case"insideBottomRight":n+=r-i,o+=a-i,l="right",h="bottom"}return{x:n,y:o,textAlign:l,textVerticalAlign:h}}function ye(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=xe(e,i,n,o);for(var r=0,s=a.length;r=r;l++)s-=r;var h=ce(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=t,n}function _e(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=ce(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?be(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=ce(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function be(t,e,i,n){for(var o=0,a=0,r=t.length;al)t="",a=[];else if(null!=h)for(var u=xe(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=a.length;co&&Te(i,t.substring(o,a)),Te(i,n[2],n[1]),o=hx.lastIndex}of)return{lines:[],width:0,height:0};k.textWidth=ce(k.text,_);var w=y.textWidth,S=null==w||"auto"===w;if("string"==typeof w&&"%"===w.charAt(w.length-1))k.percentWidth=w,h.push(k),w=0;else{if(S){w=k.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&ue(I=se(I))&&(w=Math.max(w,I.width*b/I.height))}var C=x?x[1]+x[3]:0;w+=C;var D=null!=d?d-m:null;null!=D&&Dl&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>h&&(n*=h/(c=n+o),o*=h/c),i+a>h&&(i*=h/(c=i+a),a*=h/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.quadraticCurveTo(r+l,s,r+l,s+n),t.lineTo(r+l,s+h-o),0!==o&&t.quadraticCurveTo(r+l,s+h,r+l-o,s+h),t.lineTo(r+a,s+h),0!==a&&t.quadraticCurveTo(r,s+h,r,s+h-a),t.lineTo(r,s+i),0!==i&&t.quadraticCurveTo(r,s,r+i,s)}function De(t){return Le(t),d(t.rich,Le),t}function Le(t){if(t){t.font=Ae(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||dx[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||fx[i]?i:"top",t.textPadding&&(t.textPadding=D(t.textPadding))}}function ke(t,e,i,n,o){n.rich?Oe(t,e,i,n,o):Pe(t,e,i,n,o)}function Pe(t,e,i,n,o){var a=We(e,"font",n.font||ux),r=n.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=Me(i,a,r,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Ge(l,n,o),d=c.baseX,f=c.baseY,g=c.textAlign,p=c.textVerticalAlign;Ne(e,n,o,d,f);var m=me(f,l,p),v=d,y=m,x=Re(n);if(x||r){var _=ce(i,a);r&&(_+=r[1]+r[3]);var b=pe(d,_,g);x&&Ve(t,e,n,b,m,_,l),r&&(v=Ue(d,g,r),y+=r[0])}We(e,"textAlign",g||"left"),We(e,"textBaseline","middle"),We(e,"shadowBlur",n.textShadowBlur||0),We(e,"shadowColor",n.textShadowColor||"transparent"),We(e,"shadowOffsetX",n.textShadowOffsetX||0),We(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var w=n.textStrokeWidth,S=He(n.textStroke,w),M=Fe(n.textFill);S&&(We(e,"lineWidth",w),We(e,"strokeStyle",S)),M&&We(e,"fillStyle",M);for(var I=0;I=0&&"right"===(_=w[D]).textAlign;)Ee(t,e,_,n,M,v,C,"right"),I-=_.width,C-=_.width,D--;for(A+=(a-(A-m)-(y-C)-I)/2;T<=D;)Ee(t,e,_=w[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function Ne(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function Ee(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=a+o/2;"top"===h?u=a+i.height/2:"bottom"===h&&(u=a+o-i.height/2),!i.isLineHolder&&Re(l)&&Ve(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=Ue(r,s,c),u-=i.height/2-c[2]-i.textHeight/2),We(e,"shadowBlur",A(l.textShadowBlur,n.textShadowBlur,0)),We(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),We(e,"shadowOffsetX",A(l.textShadowOffsetX,n.textShadowOffsetX,0)),We(e,"shadowOffsetY",A(l.textShadowOffsetY,n.textShadowOffsetY,0)),We(e,"textAlign",s),We(e,"textBaseline","middle"),We(e,"font",i.font||ux);var d=He(l.textStroke||n.textStroke,g),f=Fe(l.textFill||n.textFill),g=T(l.textStrokeWidth,n.textStrokeWidth);d&&(We(e,"lineWidth",g),We(e,"strokeStyle",d),e.strokeText(i.text,r,u)),f&&(We(e,"fillStyle",f),e.fillText(i.text,r,u))}function Re(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ve(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=_(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||l&&h){e.beginPath();var c=i.textBorderRadius;c?Ce(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(u)We(e,"fillStyle",s),e.fill();else if(b(s)){var d=s.image;(d=le(d,null,t,Be,s))&&ue(d)&&e.drawImage(d,n,o,a,r)}l&&h&&(We(e,"lineWidth",l),We(e,"strokeStyle",h),e.stroke())}function Be(t,e){e.image=t}function Ge(t,e,i){var n=e.x||0,o=e.y||0,a=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+Ze(s[0],i.width),o=i.y+Ze(s[1],i.height);else{var l=ve(s,i,e.textDistance);n=l.x,o=l.y,a=a||l.textAlign,r=r||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],o+=h[1])}return{baseX:n,baseY:o,textAlign:a,textVerticalAlign:r}}function We(t,e,i){return t[e]=i,t[e]}function He(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Fe(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ze(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Ue(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Xe(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function je(t){t=t||{},Fy.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Jy(t.style,this),this._rect=null,this.__clipPaths=[]}function qe(t){je.call(this,t)}function Ye(t){return parseInt(t,10)}function $e(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function Ke(t){t.__unusedCount++}function Je(t){1==t.__unusedCount&&t.clear()}function Qe(t,e,i){return mx.copy(t.getBoundingRect()),t.transform&&mx.applyTransform(t.transform),vx.width=e,vx.height=i,!mx.intersect(vx)}function ti(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0){var o="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];o&&oi(t,o,e,i)}else oi(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&&_x.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function si(t,e,i){xx?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function li(t,e,i){xx?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function hi(t){return t.which>1}function ui(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function ci(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function di(t){return"mousewheel"===t&&Uv.browser.firefox?"DOMMouseScroll":t}function fi(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var o=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),o){var a=o.type;e.gestureEvent=a,t.handler.dispatchToElement({target:o.target},a,o.event)}}function gi(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function pi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function mi(t){function e(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}d(Tx,function(e){t._handlers[e]=m(Dx[e],t)}),d(Cx,function(e){t._handlers[e]=m(Dx[e],t)}),d(Ix,function(i){t._handlers[i]=e(Dx[i],t)})}function vi(t){function e(e,i){d(e,function(e){si(t,di(e),i._handlers[e])},i)}fy.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Sx,this._handlers={},mi(this),Uv.pointerEventsSupported?e(Cx,this):(Uv.touchEventsSupported&&e(Tx,this),e(Ix,this))}function yi(t,e){var i=new zx(Fv(),t,e);return Ox[i.id]=i,i}function xi(t,e){Px[t]=e}function _i(t){delete Ox[t]}function bi(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function wi(t,e,i,n){var o=e[1]-e[0],a=i[1]-i[0];if(0===o)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(o>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Si(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?bi(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Mi(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Ii(t){return t.sort(function(t,e){return t-e}),t}function Ti(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ai(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Ci(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Di(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=f(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=f(a,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),h=f(a,function(t,e){return t-s[e]});lu&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/o}function Li(t){var e=2*Math.PI;return(t%e+e)%e}function ki(t){return t>-Ex&&t=-20?+t.toFixed(n<0?-n:0):t}function Ei(t){function e(t,i,n){return t.interval[n]=0}function Vi(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Bi(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function Gi(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Wi(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a':""}function Zi(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Pi(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),h=n["get"+o+"Minutes"](),u=n["get"+o+"Seconds"]();return t=t.replace("MM",Fx(r)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",Fx(s)).replace("d",s).replace("hh",Fx(l)).replace("h",l).replace("mm",Fx(h)).replace("m",h).replace("ss",Fx(u)).replace("s",u)}function Ui(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Xi(t,e,i){return t[Yx+e]=i}function ji(t,e){return t[Yx+e]}function qi(t,e){return t.hasOwnProperty(Yx+e)}function Yi(t){var e={main:"",sub:""};return t&&(t=t.split(jx),e.main=t[0]||"",e.sub=t[1]||""),e}function $i(t){L(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Ki(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(i.prototype,t),i.extend=this.extend,i.superCall=Ji,i.superApply=Qi,h(i,this),i.superClass=e,i}}function Ji(t,e){var i=C(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Qi(t,e,i){return this.superClass.prototype[e].apply(t,i)}function tn(t,e){function i(t){var e=n[t.main];return e&&e[qx]||((e=n[t.main]={})[qx]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){return e&&($i(e),(e=Yi(e)).sub?e.sub!==qx&&(i(e)[e.sub]=t):n[e.main]=t),t},t.getClass=function(t,e,i){var o=n[t];if(o&&o[qx]&&(o=e?o[e]:null),i&&!o)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return o},t.getClassesByMainType=function(t){t=Yi(t);var e=[],i=n[t.main];return i&&i[qx]?d(i,function(t,i){i!==qx&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=Yi(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return d(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=Yi(t);var e=n[t.main];return e&&e[qx]},t.parseClassType=Yi,e.registerWhenExtend){var o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerClass(i,e.type)})}return t}function en(t){return t>-n_&&tn_||t<-n_}function on(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function an(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function rn(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-o,u=s*s-3*r*l,c=s*l-9*r*h,d=l*l-3*s*h,f=0;if(en(u)&&en(c))en(s)?a[0]=0:(M=-l/s)>=0&&M<=1&&(a[f++]=M);else{var g=c*c-4*u*d;if(en(g)){var p=c/u,m=-p/2;(M=-s/r+p)>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m)}else if(g>0){var v=i_(g),y=u*s+1.5*r*(-c+v),x=u*s+1.5*r*(-c-v);(M=(-s-((y=y<0?-e_(-y,r_):e_(y,r_))+(x=x<0?-e_(-x,r_):e_(x,r_))))/(3*r))>=0&&M<=1&&(a[f++]=M)}else{var _=(2*u*s-3*r*c)/(2*i_(u*u*u)),b=Math.acos(_)/3,w=i_(u),S=Math.cos(b),M=(-s-2*w*S)/(3*r),m=(-s+w*(S+a_*Math.sin(b)))/(3*r),I=(-s+w*(S-a_*Math.sin(b)))/(3*r);M>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m),I>=0&&I<=1&&(a[f++]=I)}}return f}function sn(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(en(r))nn(a)&&(c=-s/a)>=0&&c<=1&&(o[l++]=c);else{var h=a*a-4*r*s;if(en(h))o[0]=-a/(2*r);else if(h>0){var u=i_(h),c=(-a+u)/(2*r),d=(-a-u)/(2*r);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function ln(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,h=(s-r)*o+r,u=(l-s)*o+s,c=(u-h)*o+h;a[0]=t,a[1]=r,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n}function hn(t,e,i,n,o,a,r,s,l,h,u){var c,d,f,g,p,m=.005,v=1/0;s_[0]=l,s_[1]=h;for(var y=0;y<1;y+=.05)l_[0]=on(t,i,o,r,y),l_[1]=on(e,n,a,s,y),(g=uy(s_,l_))=0&&g=0&&c<=1&&(o[l++]=c);else{var h=r*r-4*a*s;if(en(h))(c=-r/(2*a))>=0&&c<=1&&(o[l++]=c);else if(h>0){var u=i_(h),c=(-r+u)/(2*a),d=(-r-u)/(2*a);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function fn(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function gn(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function pn(t,e,i,n,o,a,r,s,l){var h,u=.005,c=1/0;s_[0]=r,s_[1]=s;for(var d=0;d<1;d+=.05)l_[0]=un(t,i,o,d),l_[1]=un(e,n,a,d),(m=uy(s_,l_))=0&&m1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(p_[0]=f_(o)*i+t,p_[1]=d_(o)*n+e,m_[0]=f_(a)*i+t,m_[1]=d_(a)*n+e,h(s,p_,m_),u(l,p_,m_),(o%=g_)<0&&(o+=g_),(a%=g_)<0&&(a+=g_),o>a&&!r?a+=g_:oo&&(v_[0]=f_(f)*i+t,v_[1]=d_(f)*n+e,h(s,v_,s),u(l,v_,l))}function bn(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0,h=t;if(r>e+s&&r>n+s||rt+s&&a>i+s||ae+c&&u>n+c&&u>a+c&&u>s+c||ut+c&&h>i+c&&h>o+c&&h>r+c||he+h&&l>n+h&&l>a+h||lt+h&&s>i+h&&s>o+h||si||u+ho&&(o+=z_);var d=Math.atan2(l,s);return d<0&&(d+=z_),d>=n&&d<=o||d+z_>=n&&d+z_<=o}function Tn(t,e,i,n,o,a){if(a>e&&a>n||ao?r:0}function An(t,e){return Math.abs(t-e)e&&h>n&&h>a&&h>s||h1&&Cn(),c=on(e,n,a,s,B_[0]),g>1&&(d=on(e,n,a,s,B_[1]))),2==g?me&&s>n&&s>a||s=0&&h<=1){for(var u=0,c=un(e,n,a,h),d=0;di||s<-i)return 0;h=Math.sqrt(i*i-s*s);V_[0]=-h,V_[1]=h;var l=Math.abs(n-o);if(l<1e-4)return 0;if(l%E_<1e-4){n=0,o=E_;g=a?1:-1;return r>=V_[0]+t&&r<=V_[1]+t?g:0}if(a){var h=n;n=Mn(o),o=Mn(h)}else n=Mn(n),o=Mn(o);n>o&&(o+=E_);for(var u=0,c=0;c<2;c++){var d=V_[c];if(d+t>r){var f=Math.atan2(s,d),g=a?1:-1;f<0&&(f=E_+f),(f>=n&&f<=o||f+E_>=n&&f+E_<=o)&&(f>Math.PI/2&&f<1.5*Math.PI&&(g=-g),u+=g)}}return u}function Pn(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,h=0,u=0;u1&&(i||(a+=Tn(r,s,l,h,n,o))),1==u&&(l=r=t[u],h=s=t[u+1]),c){case N_.M:r=l=t[u++],s=h=t[u++];break;case N_.L:if(i){if(bn(r,s,t[u],t[u+1],e,n,o))return!0}else a+=Tn(r,s,t[u],t[u+1],n,o)||0;r=t[u++],s=t[u++];break;case N_.C:if(i){if(wn(r,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else a+=Dn(r,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],n,o)||0;r=t[u++],s=t[u++];break;case N_.Q:if(i){if(Sn(r,s,t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else a+=Ln(r,s,t[u++],t[u++],t[u],t[u+1],n,o)||0;r=t[u++],s=t[u++];break;case N_.A:var d=t[u++],f=t[u++],g=t[u++],p=t[u++],m=t[u++],v=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(m)*g+d,_=Math.sin(m)*p+f;u>1?a+=Tn(r,s,x,_,n,o):(l=x,h=_);var b=(n-d)*p/g+d;if(i){if(In(d,f,p,m,m+v,y,e,b,o))return!0}else a+=kn(d,f,p,m,m+v,y,b,o);r=Math.cos(m+v)*g+d,s=Math.sin(m+v)*p+f;break;case N_.R:l=r=t[u++],h=s=t[u++];var x=l+t[u++],_=h+t[u++];if(i){if(bn(l,h,x,h,e,n,o)||bn(x,h,x,_,e,n,o)||bn(x,_,l,_,e,n,o)||bn(l,_,l,h,e,n,o))return!0}else a+=Tn(x,h,x,_,n,o),a+=Tn(l,_,l,h,n,o);break;case N_.Z:if(i){if(bn(r,s,l,h,e,n,o))return!0}else a+=Tn(r,s,l,h,n,o);r=l,s=h}}return i||An(s,h)||(a+=Tn(r,s,l,h,n,o)||0),0!==a}function On(t,e,i){return Pn(t,0,!1,e,i)}function zn(t,e,i,n){return Pn(t,e,!0,i,n)}function Nn(t){je.call(this,t),this.path=null}function En(t,e,i,n,o,a,r,s,l,h,u){var c=l*(J_/180),d=K_(c)*(t-i)/2+$_(c)*(e-n)/2,f=-1*$_(c)*(t-i)/2+K_(c)*(e-n)/2,g=d*d/(r*r)+f*f/(s*s);g>1&&(r*=Y_(g),s*=Y_(g));var p=(o===a?-1:1)*Y_((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=p*r*f/s,v=p*-s*d/r,y=(t+i)/2+K_(c)*m-$_(c)*v,x=(e+n)/2+$_(c)*m+K_(c)*v,_=eb([1,0],[(d-m)/r,(f-v)/s]),b=[(d-m)/r,(f-v)/s],w=[(-1*d-m)/r,(-1*f-v)/s],S=eb(b,w);tb(b,w)<=-1&&(S=J_),tb(b,w)>=1&&(S=0),0===a&&S>0&&(S-=2*J_),1===a&&S<0&&(S+=2*J_),u.addData(h,y,x,r,s,_,S,c,a)}function Rn(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===f[0]&&f.shift();for(var g=0;g=2){if(o&&"spline"!==o){var a=hb(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],h=a[2*s+1],u=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===o&&(n=lb(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s=0)&&(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=i.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),n}function xo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function _o(t,e){var i=e||e.getModel("textStyle");return[t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" ")}function bo(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),h=n.getShallow("animationDelay"+r);"function"==typeof h&&(h=h(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),s>0?e.animateTo(i,s,h||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function wo(t,e,i,n,o){bo(!0,t,e,i,n,o)}function So(t,e,i,n,o){bo(!1,t,e,i,n,o)}function Mo(t,e){for(var i=at([]);t&&t!==e;)st(i,t.getLocalTransform(),i),t=t.parent;return i}function Io(t,e,i){return e&&!c(e)&&(e=by.getLocalTransform(e)),i&&(e=ct([],e)),$([],t,e)}function To(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=Io(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Ao(t,e,i,n){function o(t){var e={position:V(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),wo(t,n,i,t.dataIndex)}}})}}function Co(t,e){return f(t,function(t){var i=t[0];i=wb(i,e.x),i=Sb(i,e.x+e.width);var n=t[1];return n=wb(n,e.y),n=Sb(n,e.y+e.height),[i,n]})}function Do(t,e,i){var n=(e=a({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),r(n,i),new qe(e)):Un(t.replace("path://",""),e,i,"center")}function Lo(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function ko(t,e,i){for(var n=0;n=i.length&&i.push({option:t})}}),i}function Bo(t){var e=z();Pb(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),Pb(t,function(t,i){var n=t.option;L(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Pb(t,function(t,i){var n=t.exist,o=t.option,a=t.keyInfo;if(Ob(o)){if(a.name=null!=o.name?o.name+"":n?n.name:"\0-",n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else{var r=0;do{a.id="\0"+a.name+"\0"+r++}while(e.get(a.id))}e.set(a.id,t)}})}function Go(t){return Ob(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Wo(t,e){function i(t,e,i){for(var n=0,o=t.length;nn||l.newline?(a=0,u=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(p?-p.y+f.y:0);(c=r+v)>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=u+i:r=c+i)})}function $o(t,e,i){var n=e.width,o=e.height,a=Si(t.x,n),r=Si(t.y,o),s=Si(t.x2,n),l=Si(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=Gx(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function Ko(t,e,i){i=Gx(i||0);var n=e.width,o=e.height,a=Si(t.left,n),r=Si(t.top,o),s=Si(t.right,n),l=Si(t.bottom,o),h=Si(t.width,n),u=Si(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(h)&&(h=n-s-d-a),isNaN(u)&&(u=o-l-c-r),null!=f&&(isNaN(h)&&isNaN(u)&&(f>n/o?h=.8*n:u=.8*o),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(a)&&(a=n-s-h-d),isNaN(r)&&(r=o-l-u-c),t.left||t.right){case"center":a=n/2-h/2-i[3];break;case"right":a=n-h-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-u/2-i[0];break;case"bottom":r=o-u-c}a=a||0,r=r||0,isNaN(h)&&(h=n-d-a-(s||0)),isNaN(u)&&(u=o-c-r-(l||0));var g=new jt(a+i[3],r+i[0],h,u);return g.margin=i,g}function Jo(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";if(a||s){var h;if("raw"===l)h="group"===t.type?new jt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(h=h.clone()).applyTransform(u)}e=Ko(r({width:h.width,height:h.height},e),i,n);var c=t.position,d=a?e.x-h.x:0,f=s?e.y-h.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function Qo(t,e){return null!=t[Wb[e][0]]||null!=t[Wb[e][1]]&&null!=t[Wb[e][2]]}function ta(t,e,i){function n(i,n){var r={},l=0,h={},u=0;if(Bb(i,function(e){h[e]=t[e]}),Bb(i,function(t){o(e,t)&&(r[t]=h[t]=e[t]),a(r,t)&&l++,a(h,t)&&u++}),s[n])return a(e,i[1])?h[i[2]]=null:a(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&l){if(l>=2)return r;for(var c=0;c=e:"max"===i?t<=e:t===e}function pa(t,e){return t.join(",")===e.join(",")}function ma(t,e){aw(e=e||{},function(e,i){if(null!=e){var n=t[i];if(Ub.hasClass(i)){e=Oo(e);var o=Vo(n=Oo(n),e);t[i]=sw(o,function(t){return t.option&&t.exist?lw(t.exist,t.option,!0):t.exist||t.option})}else t[i]=lw(n,e,!0)}})}function va(t){var e=t&&t.itemStyle;if(e)for(var i=0,o=dw.length;i=0?n():c=setTimeout(n,-a),h=o};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function La(t,e,i,n){var o=t[e];if(o){var a=o[ww]||o,r=o[Mw];if(o[Sw]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Da(a,i,"debounce"===n))[ww]=a,o[Mw]=n,o[Sw]=i}return o}}function ka(t,e){var i=t[e];i&&i[ww]&&(t[e]=i[ww])}function Pa(t){return function(e,i,n){e=e&&e.toLowerCase(),fy.prototype[t].call(this,e,i,n)}}function Oa(){fy.call(this)}function za(t,e,n){function o(t,e){return t.prio-e.prio}n=n||{},"string"==typeof e&&(e=Uw[e]),this.id,this.group,this._dom=t;var a=this._zr=yi(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Da(m(a.flush,a),17),(e=i(e))&&vw(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ua,this._api=$a(this),fy.call(this),this._messageCenter=new Oa,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],ee(Zw,o),ee(Ww,o),a.animation.on("frame",this._onframe,this),k(this)}function Na(t,e,i){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Fo(o,e);for(var r=0;re.get("hoverLayerThreshold")&&!Uv.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function qa(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),o=i>t.get("progressiveThreshold")&&n&&!Uv.node;o&&e.group.traverse(function(t){t.isGroup||(t.progressive=o?Math.floor(i++/n):-1,o&&t.stopAnimation(!0))});var a=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.setStyle("blend",a)})}function Ya(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function $a(t){var e=t._coordSysMgr;return a(new ha(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function Ka(t){function e(t,e){for(var n=0;n=0?o[s]=new h.constructor(a[s].length):o[s]=a[s]}return n}function xr(t,e,n){function o(t,e,i){cS[e]?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,h.set(e,!0))}function a(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}e=e||[],n=n||{},t=(t||[]).slice();var r=(n.dimsDef||[]).slice(),s=z(n.encodeDef),l=z(),h=z(),u=[],c=n.dimCount;if(null==c){var d=_r(e[0]);c=Math.max(y(d)&&d.length||1,t.length,r.length),lS(t,function(t){var e=t.dimsDef;e&&(c=Math.max(c,e.length))})}for(var f=0;f=0&&wr(t)?function(t,e,i,n){return Eo(t)&&(c.hasItemOption=!0),n===u?i:Ro(No(t),h[n])}:function(t,e,i,n){var o=No(t),a=Ro(o&&o[n],h[n]);Eo(t)&&(c.hasItemOption=!0);var r=s&&s.categoryAxesModels;return r&&r[e]&&"string"==typeof a&&(f[e]=f[e]||r[e].getCategories(),(a=l(f[e],a))<0&&!isNaN(a)&&(a=+a)),a};return c.hasItemOption=!1,c.initData(t,d,g),c}function Mr(t){return"category"!==t&&"time"!==t}function Ir(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Tr(t,e){var i,n=[],o=t&&t.dimensions[t.categoryIndex];if(o&&(i=t.categoryAxesModels[o.name]),i){var a=i.getCategories();if(a){var r=e.length;if(y(e[0])&&e[0].length>1){n=[];for(var s=0;sn&&(r=o.interval=n);var s=o.intervalPrecision=Dr(r);return kr(o.niceTickExtent=[mS(Math.ceil(t[0]/r)*r,s),mS(Math.floor(t[1]/r)*r,s)],t),o}function Dr(t){return Ai(t)+2}function Lr(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function kr(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Lr(t,0,e),Lr(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Pr(t,e,i,n){var o=[];if(!t)return o;e[0]1e4)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function Or(t,e){return CS(t,AS(e))}function zr(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,h=null!=s,u=t.getExtent();return"ordinal"===a?i=(e.get("data")||[]).length:(y(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Si(n[0],1),n[1]=Si(n[1],1),o=u[1]-u[0]||Math.abs(u[0])),null==r&&(r="ordinal"===a?i?0:NaN:u[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:u[1]+n[1]*o),"dataMin"===r?r=u[0]:"function"==typeof r&&(r=r({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==r||!isFinite(r))&&(r=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(M(r)||M(s)),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!h&&(s=0)),[r,s]}function Nr(t,e){var i=zr(t,e),n=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Er(t,e){if(e=e||t.get("type"))switch(e){case"category":return new pS(t.getCategories(),[1/0,-1/0]);case"value":return new yS;default:return(Ar.getClass(e)||yS).create(t)}}function Rr(t,e,i,n,o){var a,r=0,s=0,l=(n-o)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u1?h:(r+1)*h-1}function Vr(t,e){var i=t.scale,n=i.getTicksLabels(),o=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),f(n,e)):"function"==typeof e?f(o,function(i,n){return e(Br(t,i),n)},this):n}function Br(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Gr(t){return b(t)&&null!=t.value?t.value:t+""}function Wr(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function Hr(t,e,i,n,o,a,r){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?Xn(t.slice(8),new jt(e,i,n,o),r?"center":"cover"):0===t.indexOf("path://")?Un(t.slice(7),{},new jt(e,i,n,o),r?"center":"cover"):new WS({shape:{symbolType:t,x:e,y:i,width:n,height:o}}),l.__isEmptyBrush=s,l.setColor=Wr,l.setColor(a),l}function Fr(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function Zr(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function Yr(t){var e,i=Xo(t,"label");if(i.length)e=i[0];else for(var n,o=t.dimensions.slice();o.length&&(e=o.pop(),"ordinal"===(n=t.getDimensionInfo(e).type)||"time"===n););return e}function $r(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]}function Kr(t){return[t[0]/2,t[1]/2]}function Jr(t,e,i){jy.call(this),this.updateData(t,e,i)}function Qr(t,e){this.parent.drift(t,e)}function ts(t){this.group=new jy,this._symbolCtor=t||Jr}function es(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}function is(t){return t>=0?1:-1}function ns(t,e,i){for(var n,o=t.getBaseAxis(),a=t.getOtherAxis(o),r=o.onZero?0:a.scale.getExtent()[0],s=a.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,i);h&&is(h.get(s,i))===is(u);){n=h;break}var c=[];return c[l]=e.get(o.dim,i),c[1-l]=n?n.get(s,i,!0):r,t.dataToPoint(c)}function os(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function as(t){return isNaN(t[0])||isNaN(t[1])}function rs(t,e,i,n,o,a,r,s,l,h,u){for(var c=0,d=i,f=0;f=o||d<0)break;if(as(g)){if(u){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](g[0],g[1]),aM(sM,g);else if(l>0){var p=d+a,m=e[p];if(u)for(;m&&as(e[p]);)m=e[p+=a];var v=.5,y=e[c];if(!(m=e[p])||as(m))aM(lM,g);else{as(m)&&!u&&(m=g),H(rM,m,y);var x,_;if("x"===h||"y"===h){var b="x"===h?0:1;x=Math.abs(g[b]-y[b]),_=Math.abs(g[b]-m[b])}else x=hy(g,y),_=hy(g,m);oM(lM,g,rM,-l*(1-(v=_/(_+x))))}iM(sM,sM,s),nM(sM,sM,r),iM(lM,lM,s),nM(lM,lM,r),t.bezierCurveTo(sM[0],sM[1],lM[0],lM[1],g[0],g[1]),oM(sM,g,rM,l*v)}else t.lineTo(g[0],g[1]);c=d,d+=a}return f}function ss(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;on[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function ls(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function cs(t){return t>=0?1:-1}function ds(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),o=0;if(!i.onZero){var a=n.scale.getExtent();a[0]>0?o=a[0]:a[1]<0&&(o=a[1])}var r=n.dim,s="x"===r||"radius"===r?1:0;return e.mapArray([r],function(n,a){for(var l,h=e.stackedOn;h&&cs(h.get(r,a))===cs(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,a),u[1-s]=l?l.get(r,a,!0):o,t.dataToPoint(u)},!0)}function fs(t,e,i){var n=us(t.getAxis("x")),o=us(t.getAxis("y")),a=t.getBaseAxis().isHorizontal(),r=Math.min(n[0],n[1]),s=Math.min(o[0],o[1]),l=Math.max(n[0],n[1])-r,h=Math.max(o[0],o[1])-s,u=i.get("lineStyle.normal.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);a?(s-=c,h+=2*c):(r-=c,l+=2*c);var d=new db({shape:{x:r,y:s,width:l,height:h}});return e&&(d.shape[a?"width":"height"]=0,So(d,{shape:{width:l,height:h}},i)),d}function gs(t,e,i){var n=t.getAngleAxis(),o=t.getRadiusAxis().getExtent(),a=n.getExtent(),r=Math.PI/180,s=new rb({shape:{cx:t.cx,cy:t.cy,r0:o[0],r:o[1],startAngle:-a[0]*r,endAngle:-a[1]*r,clockwise:n.inverse}});return e&&(s.shape.endAngle=-a[0]*r,So(s,{shape:{endAngle:-a[1]*r}},i)),s}function ps(t,e,i){return"polar"===t.type?gs(t,e,i):fs(t,e,i)}function ms(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r=0;o--)if(i[o].dimension<2){n=i[o];break}if(n&&"cartesian2d"===e.type){var a=n.dimension,r=t.dimensions[a],s=e.getAxis(r),l=f(n.stops,function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),h=l.length,u=n.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=l[0].coord-10,g=l[h-1].coord+10,p=g-c;if(p<.001)return"transparent";d(l,function(t){t.offset=(t.coord-c)/p}),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var m=new xb(0,0,0,0,l,!0);return m[r]=c,m[r+"2"]=g,m}}}function ys(t){return this._axes[t]}function xs(t){pM.call(this,t)}function _s(t,e){return e.type||(e.data?"category":"value")}function bs(t,e,i){return t.getCoordSysModel()===e}function ws(t,e){var i=e*Math.PI/180,n=t.plain(),o=n.width,a=n.height,r=o*Math.cos(i)+a*Math.sin(i),s=o*Math.sin(i)+a*Math.cos(i);return new jt(n.x,n.y,r,s)}function Ss(t){var e,i=t.model,n=i.getFormattedLabels(),o=i.getModel("axisLabel"),a=1,r=n.length;r>40&&(a=Math.ceil(r/40));for(var s=0;sn[1],l="start"===e&&!s||"start"!==e&&s;return ki(r-CM/2)?(a=l?"bottom":"top",o="center"):ki(r-1.5*CM)?(a=l?"top":"bottom",o="center"):(a="middle",o=r<1.5*CM&&r>CM/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:o,textVerticalAlign:a}}function Ps(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function Os(t,e,i){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var a=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(zs(a),zs(h)):Ns(a,r)&&(n?(zs(r),zs(u)):(zs(a),zs(h))),!1===o?(zs(s),zs(c)):Ns(l,s)&&(o?(zs(l),zs(d)):(zs(s),zs(c)))}function zs(t){t&&(t.ignore=!0)}function Ns(t,e,i){var n=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(n&&o){var a=at([]);return ht(a,a,-t.rotation),n.applyTransform(st([],a,t.getLocalTransform())),o.applyTransform(st([],a,e.getLocalTransform())),n.intersect(o)}}function Es(t){return"middle"===t||"center"===t}function Rs(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),s=o.get("length"),l=OM(o,i.labelInterval),h=n.getTicksCoords(o.get("alignWithLabel")),u=n.scale.getTicks(),c=e.get("axisLabel.showMinLabel"),d=e.get("axisLabel.showMaxLabel"),f=[],g=[],p=t._transform,m=[],v=h.length,y=0;y=0||t===e}function Us(t){var e=Xs(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=qs(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=0?"p":"n",v=p[i],y=o[s][i][m],x=a[s][i][m];c.isHorizontal()?(n=y,r=v[1]+h,l=v[0]-x,g=u,a[s][i][m]+=l,Math.abs(l)0?"bottom":"top":o.width>0?"left":"right";l||ol(t.style,d,n,h,a,i,g),uo(t,d)}function hl(t,e){var i=t.get(jM)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function ul(t,e,i,n){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){cl(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function cl(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=Math.cos(a),s=Math.sin(a),l=i?n:0,h=[r*l,s*l];o?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function dl(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}jy.call(this);var o=new rb({z2:2}),a=new cb,r=new ib;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function fl(t,e,i,n,o,a,r){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=t.length,d=[],f=[],g=0;ge&&a+1t[a].y+t[a].height)return void s(a,n/2);s(i-1,n/2)}(g,c,-h),u=t[g].y+t[g].height;r-u<0&&s(c-1,u-r);for(g=0;g=i?f.push(t[g]):d.push(t[g]);l(d,!1,e,i,n,o),l(f,!0,e,i,n,o)}function gl(t,e,i,n,o,a){for(var r=[],s=[],l=0;l1?(g.width=l,g.height=l/d):(g.height=l,g.width=l*d),g.y=s[1]-g.height/2,g.x=s[0]-g.width/2}else(a=t.getBoxLayoutParams()).aspect=d,g=Ko(a,{width:h,height:u});this.setViewRect(g.x,g.y,g.width,g.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Tl(t,e){d(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Al(t,e,i){Ll(t)[e]=i}function Cl(t,e,i){var n=Ll(t);n[e]===i&&(n[e]=null)}function Dl(t,e){return!!Ll(t)[e]}function Ll(t){return t[bI]||(t[bI]={})}function kl(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,n=e(Pl,this),o=e(Ol,this),a=e(zl,this),s=e(Nl,this),l=e(El,this);fy.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,h){this.disable(),this._opt=r(i(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",o),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",o),t.off("mouseup",a),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Pl(t){if(!(hi(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Ol(t){if(!hi(t)&&Vl(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!Dl(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&bx(t.event),this.trigger("pan",a,r,n,o,e,i)}}function zl(t){hi(t)||(this._dragging=!1)}function Nl(t){if(Vl(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;Rl.call(this,t,e,t.offsetX,t.offsetY)}}function El(t){if(!Dl(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Rl.call(this,t,e,t.pinchX,t.pinchY)}}function Rl(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(bx(t.event),this.trigger("zoom",e,i,n))}function Vl(t,e,i){var n=t._opt[e];return n&&(!_(n)||i.event[n+"Key"])}function Bl(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function Gl(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var h=a.min||0,u=a.max||1/0;l=Math.max(Math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function Wl(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!wI[n.mainType]&&o&&o.model!==i}function Hl(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function Fl(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(a){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:f(r.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),Zl(e,i)}}}))}function Zl(t,e){e.eachChild(function(e){d(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function Ul(t,e){var i=new jy;this._controller=new kl(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag}function Xl(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointToData(r);t.setCenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var h=t.position,u=(e.originX-h[0])*(a-1),c=(e.originY-h[1])*(a-1);h[0]-=u,h[1]-=c,t.updateTransform();o=t.pointToData(r);t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function jl(t,e){var i={},n=["value"];return d(t,function(t){t.each(n,function(e,n){var o="ec-"+t.getName(n);i[o]=i[o]||[],isNaN(e)||i[o].push(e)})}),t[0].map(n,function(n,o){for(var a="ec-"+t[0].getName(o),r=0,s=1/0,l=-1/0,h=i[a].length,u=0;u=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}function ah(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){uh(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=ch(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function rh(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function sh(t){return arguments.length?t:mh}function lh(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function hh(t,e){return Ko(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function uh(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}function ch(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,h=a.hierNode.modifier,u=r.hierNode.modifier,c=s.hierNode.modifier;s=dh(s),a=fh(a),s&&a;){o=dh(o),r=fh(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-h+n(s,a);d>0&&(ph(gh(s,t,i),t,d),h+=d,l+=d),c+=s.hierNode.modifier,h+=a.hierNode.modifier,l+=o.hierNode.modifier,u+=r.hierNode.modifier}s&&!dh(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!fh(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=h-u,i=t)}return i}function dh(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function fh(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function gh(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function ph(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function mh(t,e){return t.parentNode===e.parentNode?1:2}function vh(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function yh(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle.normal").getItemStyle(),i.hoverItemStyle=e.getModel("itemStyle.emphasis").getItemStyle(),i.lineStyle=e.getModel("lineStyle.normal").getLineStyle(),i.labelModel=e.getModel("label.normal"),i.hoverLabelModel=e.getModel("label.emphasis"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function xh(t,e,i,n,o,a){var s=!i,l=t.tree.getNodeByDataIndex(e),a=yh(l,l.getModel(),a),h=t.tree.root,u=l.parentNode===h?l:l.parentNode||l,c=t.getItemGraphicEl(u.dataIndex),d=u.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,g=l.getLayout();s?(i=new Jr(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=g.rawX,i.__radialRawY=g.rawY,n.add(i),t.setItemGraphicEl(e,i),wo(i,{position:[g.x,g.y]},o);var p=i.getSymbolPath();if("radial"===a.layout){var m,v,y=h.children[0],x=y.getLayout(),_=y.children.length;if(g.x===x.x&&!0===l.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*Math.PI+m),(v=b.xx.x)||(m-=Math.PI);var w=v?"left":"right";p.setStyle({textPosition:w,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(l.parentNode&&l.parentNode!==h){var S=i.__edge;S||(S=i.__edge=new pb({shape:bh(a,f,f),style:r({opacity:0},a.lineStyle)})),wo(S,{shape:bh(a,d,g),style:{opacity:1}},o),n.add(S)}}function _h(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,a=yh(s,s.getModel(),a),h=s.parentNode===l?s:s.parentNode||s;null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;wo(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var u=i.__edge;u&&wo(u,{shape:bh(a,r,r),style:{opacity:0}},o,function(){n.remove(u)})}function bh(t,e,i){var n,o,a,r,s=t.orient;if("radial"===t.layout){var l=e.rawX,h=e.rawY,u=i.rawX,c=i.rawY,d=lh(l,h),f=lh(l,h+(c-h)*t.curvature),g=lh(u,c+(h-c)*t.curvature),p=lh(u,c);return{x1:d.x,y1:d.y,x2:p.x,y2:p.y,cpx1:f.x,cpy1:f.y,cpx2:g.x,cpy2:g.y}}var l=e.x,h=e.y,u=i.x,c=i.y;return"horizontal"===s&&(n=l+(u-l)*t.curvature,o=h,a=u+(l-u)*t.curvature,r=c),"vertical"===s&&(n=l,o=h+(c-h)*t.curvature,a=u,r=c+(h-c)*t.curvature),{x1:l,y1:h,x2:u,y2:c,cpx1:n,cpy1:o,cpx2:a,cpy2:r}}function wh(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s=0;a--)n.push(o[a])}}function Mh(t,e){if(t&&("treemapZoomToNode"===t.type||"treemapRootToNode"===t.type)){var i=e.getData().tree.root,n=t.targetNode;if(n&&i.contains(n))return{node:n};var o=t.targetNodeId;if(null!=o&&(n=i.getNodeById(o)))return{node:n}}}function Ih(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Th(t,e){return l(Ih(t),e)>=0}function Ah(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function Ch(t){var e=0;d(t.children,function(t){Ch(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function Dh(t,e){var i=e.get("color");if(i){var n;return d(t=t||[],function(t){var e=new Lo(t),i=e.get("color");(e.get("itemStyle.normal.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}}function Lh(t){this.group=new jy,t.add(this.group)}function kh(t,e,i,n,o,a){var r=[[o?t:t-CI,e],[t+i,e],[t+i,e+n],[o?t:t-CI,e+n]];return!a&&r.splice(2,0,[t+i+CI,e+n/2]),!o&&r.push([t,e+n/2]),r}function Ph(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&Ah(i,e)}}function Oh(){var t,e=[],i={};return{add:function(t,n,o,a,r){return _(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function Vh(t,e){var i=t.visual,n=[];b(i)?ZI(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasOwnProperty(t.type)||(n[1]=n[0]),Xh(t,n)}function Bh(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:Zh([0,1])}}function Gh(t){var e=this.option.visual;return e[Math.round(wi(t,[0,1],[0,e.length-1],!0))]||{}}function Wh(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Hh(t){var e=this.option.visual;return e[this.option.loop&&t!==XI?t%e.length:t]}function Fh(){return this.option.visual[0]}function Zh(t){return{linear:function(e){return wi(e,t,this.option.visual,!0)},category:Hh,piecewise:function(e,i){var n=Uh.call(this,i);return null==n&&(n=wi(e,t,this.option.visual,!0)),n},fixed:Fh}}function Uh(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[jI.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function Xh(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=f(e,function(t){return Mt(t)})),e}function jh(t,e,i){return t?e<=i:e=o.length||t===o[t.depth])&&qh(t,eu(r,u,t,e,p,a),i,n,o,a)})}else l=$h(u),t.setVisual("color",l)}}function Yh(t,e,i,n){var o=a({},e);return d(["color","colorAlpha","colorSaturation"],function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)}),o}function $h(t){var e=Jh(t,"color");if(e){var i=Jh(t,"colorAlpha"),n=Jh(t,"colorSaturation");return n&&(e=kt(e,null,null,n)),i&&(e=Pt(e,i)),e}}function Kh(t,e){return null!=e?kt(e,null,null,t):null}function Jh(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function Qh(t,e,i,n,o,a){if(a&&a.length){var r=tu(e,"color")||null!=o.color&&"none"!==o.color&&(tu(e,"colorAlpha")||tu(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),h=i.dataExtent.slice();null!=s&&sh[1]&&(h[1]=l);var u=e.get("colorMappingBy"),c={type:r.name,dataExtent:h,visual:r.range};"color"!==c.type||"index"!==u&&"id"!==u?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new jI(c);return d.__drColorMappingBy=u,d}}}function tu(t,e){var i=t.get(e);return $I(i)&&i.length?{name:e,range:i}:null}function eu(t,e,i,n,o,r){var s=a({},e);if(o){var l=o.type,h="color"===l&&o.__drColorMappingBy,u="index"===h?n:"id"===h?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=o.mapValueToVisual(u)}return s}function iu(t,e,i,n){var o,a;if(!t.isRemoved()){var r=t.getLayout();o=r.width,a=r.height;var s=(f=t.getModel()).get(iT),l=f.get(nT)/2,h=du(f),u=Math.max(s,h),c=s-l,d=u-l,f=t.getModel();t.setLayout({borderWidth:s,upperHeight:u,upperLabelHeight:h},!0);var g=(o=JI(o-2*c,0))*(a=JI(a-c-d,0)),p=nu(t,f,g,e,i,n);if(p.length){var m={x:c,y:d,width:o,height:a},v=QI(o,a),y=1/0,x=[];x.area=0;for(var _=0,b=p.length;_=0;l--){var h=o["asc"===n?r-l-1:l].getValue();h/i*es[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}function su(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;ro&&(o=n));var l=t.area*t.area,h=e*e*i;return l?JI(h*o/l,l/(h*a)):1/0}function lu(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],h=i[s[a]],u=e?t.area/e:0;(o||u>i[l[r]])&&(u=i[l[r]]);for(var c=0,d=t.length;cRx&&(h=Rx),a=s}h=0?n+=h:n-=h:g>=0?n-=h:n+=h}return n}function Tu(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Au(t,e,i){var n=t.getGraphicEl(),o=Tu(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function Cu(t,e){var i=Tu(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function Du(t){return t instanceof Array||(t=[t,t]),t}function Lu(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),ku(i)}}function ku(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.normal.curveness")||0,i=V(t.node1.getLayout()),n=V(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)})}function Pu(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=e.getBoundingRect(),n=t.getData(),o=n.graph,a=0,r=n.getSum("value"),s=2*Math.PI/(r||n.count()),l=i.width/2+i.x,h=i.height/2+i.y,u=Math.min(i.width,i.height)/2;o.eachNode(function(t){var e=t.getValue("value");a+=s*(r?e:1)/2,t.setLayout([u*Math.cos(a)+l,u*Math.sin(a)+h]),a+=s*(r?e:1)/2}),n.setLayout({cx:l,cy:h}),o.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.normal.curveness")||0,n=V(t.node1.getLayout()),o=V(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[l*(i*=3)+a*(1-i),h*i+r*(1-i)]),t.setLayout([n,o,e])})}}function Ou(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l0?-1:i<0?1:e?-1:1}}function Zu(t,e){return Math.min(e[1],Math.max(e[0],t))}function Uu(t,e,i){this._axesMap=z(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function Xu(t,e){return NT(ET(t,e[0]),e[1])}function ju(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function qu(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,h=s,u=!1;return t$T}function hc(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function uc(t,e,i,n){var o=new jy;return o.add(new db({name:"main",style:gc(i),silent:!0,draggable:!0,cursor:"move",drift:FT(t,e,o,"nswe"),ondragend:FT(sc,e,{isEnd:!0})})),ZT(n,function(i){o.add(new db({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:FT(t,e,o,i),ondragend:FT(sc,e,{isEnd:!0})}))}),o}function cc(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=jT(o,KT),r=i[0][0],s=i[1][0],l=r-o/2,h=s-o/2,u=i[0][1],c=i[1][1],d=u-a+o/2,f=c-a+o/2,g=u-r,p=c-s,m=g+o,v=p+o;fc(t,e,"main",r,s,g,p),n.transformable&&(fc(t,e,"w",l,h,a,v),fc(t,e,"e",d,h,a,v),fc(t,e,"n",l,h,m,a),fc(t,e,"s",l,f,m,a),fc(t,e,"nw",l,h,a,a),fc(t,e,"ne",d,h,a,a),fc(t,e,"sw",l,f,a,a),fc(t,e,"se",d,f,a,a))}function dc(t,e){var i=e.__brushOption,n=i.transformable,o=e.childAt(0);o.useStyle(gc(i)),o.attr({silent:!n,cursor:n?"move":"default"}),ZT(["w","e","n","s","se","sw","ne","nw"],function(i){var o=e.childOfName(i),a=vc(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?tA[a]+"-resize":null})})}function fc(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(wc(bc(t,e,[[n,o],[n+a,o+r]])))}function gc(t){return r({strokeNoScale:!0},t.brushStyle)}function pc(t,e,i,n){var o=[XT(t,i),XT(e,n)],a=[jT(t,i),jT(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function mc(t){return Mo(t.group)}function vc(t,e){if(e.length>1)return("e"===(n=[vc(t,(e=e.split(""))[0]),vc(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},n=To({w:"left",e:"right",n:"top",s:"bottom"}[e],mc(t));return i[n]}function yc(t,e,i,n,o,a,r,s){var l=n.__brushOption,h=t(l.range),u=_c(i,a,r);ZT(o.split(""),function(t){var e=QT[t];h[e[0]][e[1]]+=u[e[0]]}),l.range=e(pc(h[0][0],h[1][0],h[0][1],h[1][1])),ic(i,n),sc(i,{isEnd:!1})}function xc(t,e,i,n,o){var a=e.__brushOption.range,r=_c(t,i,n);ZT(a,function(t){t[0]+=r[0],t[1]+=r[1]}),ic(t,e),sc(t,{isEnd:!1})}function _c(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function bc(t,e,n){var o=ac(t,e);return o&&!0!==o?o.clipPath(n,t._transform):i(n)}function wc(t){var e=XT(t[0][0],t[1][0]),i=XT(t[0][1],t[1][1]);return{x:e,y:i,width:jT(t[0][0],t[1][0])-e,height:jT(t[0][1],t[1][1])-i}}function Sc(t,e,i){if(t._brushType){var n=t._zr,o=t._covers,a=oc(t,e,i);if(!t._dragging)for(var r=0;r=0?e:NaN}})}function Bc(t){return+t.replace("dim","")}function Gc(t,e){var i=0;d(t,function(t){var e=Bc(t);e>i&&(i=e)});var n=e[0];n&&n.length-1>i&&(i=n.length-1);for(var o=[],a=0;a<=i;a++)o.push("dim"+a);return o}function Wc(t,e,i){var n=t.model,o=t.getRect(),a=new db({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),r="horizontal"===n.get("layout")?"width":"height";return a.setShape(r,0),So(a,{shape:{width:o.width,height:o.height}},e,i),a}function Hc(t,e,i,n){for(var o=[],a=0;a=i.length)return e;for(var o=-1,a=e.length,r=i[n++],s={},l={};++o=i.length)return t;var a=[],r=n[o++];return d(t,function(t,i){a.push({key:i,values:e(t,o)})}),r?a.sort(function(t,e){return r(t.key,e.key)}):a}var i=[],n=[];return{key:function(t){return i.push(t),this},sortKeys:function(t){return n[i.length-1]=t,this},entries:function(i){return e(t(i,0),0)}}}function qc(t,e){return Ko(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Yc(t,e,i,n,o,a,r){Kc(t,i,o),td(t,e,a,n,r),sd(t)}function $c(t){d(t,function(t){var e=ud(t.outEdges,gd),i=ud(t.inEdges,gd),n=Math.max(e,i);t.setLayout({value:n},!0)})}function Kc(t,e,i){for(var n=t,o=null,a=0;n.length;){o=[];for(var r=0,s=n.length;r0;o--)nd(a,r*=.99),id(a,n,i),ad(a,r),id(a,n,i)}function ed(t,e,i,n,o){var a=[];d(e,function(t){var e=t.length,i=0;d(t,function(t){i+=t.getLayout().value});var r=(n-(e-1)*o)/i;a.push(r)}),a.sort(function(t,e){return t-e});var r=a[0];d(e,function(t){d(t,function(t,e){t.setLayout({y:e},!0);var i=t.getLayout().value*r;t.setLayout({dy:i},!0)})}),d(i,function(t){var e=+t.getValue()*r;t.setLayout({dy:e},!0)})}function id(t,e,i){d(t,function(t){var n,o,a,r=0,s=t.length;for(t.sort(dd),a=0;a0){l=n.getLayout().y+o;n.setLayout({y:l},!0)}r=n.getLayout().y+n.getLayout().dy+e}if((o=r-e-i)>0){var l=n.getLayout().y-o;for(n.setLayout({y:l},!0),r=n.getLayout().y,a=s-2;a>=0;--a)(o=(n=t[a]).getLayout().y+n.getLayout().dy+e-r)>0&&(l=n.getLayout().y-o,n.setLayout({y:l},!0)),r=n.getLayout().y}})}function nd(t,e){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outEdges.length){var i=ud(t.outEdges,od)/ud(t.outEdges,gd),n=t.getLayout().y+(i-cd(t))*e;t.setLayout({y:n},!0)}})})}function od(t){return cd(t.node2)*t.getValue()}function ad(t,e){d(t,function(t){d(t,function(t){if(t.inEdges.length){var i=ud(t.inEdges,rd)/ud(t.inEdges,gd),n=t.getLayout().y+(i-cd(t))*e;t.setLayout({y:n},!0)}})})}function rd(t){return cd(t.node1)*t.getValue()}function sd(t){d(t,function(t){t.outEdges.sort(ld),t.inEdges.sort(hd)}),d(t,function(t){var e=0,i=0;d(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),d(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}function ld(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function hd(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function ud(t,e){for(var i=0,n=t.length,o=-1;++oe?1:t===e?0:NaN}function gd(t){return t.getValue()}function pd(t,e,i,n){jy.call(this),this.bodyIndex,this.whiskerIndex,this.styleUpdater=i,this._createContent(t,e,n),this.updateData(t,e,n),this._seriesModel}function md(t,e,i){return f(t,function(t){return t=t.slice(),t[e]=i.initBaseline,t})}function vd(t){var e={};return d(t,function(t,i){e["ends"+i]=t}),e}function yd(t){this.group=new jy,this.styleUpdater=t}function xd(t,e,i){var n=e.getItemModel(i),o=n.getModel(mA),a=e.getItemVisual(i,"color"),r=o.getItemStyle(["borderColor"]),s=t.childAt(t.whiskerIndex);s.style.set(r),s.style.stroke=a,s.dirty();var l=t.childAt(t.bodyIndex);l.style.set(r),l.style.stroke=a,l.dirty(),uo(t,n.getModel(vA).getItemStyle())}function _d(t){var e=[],i=[];return t.eachSeriesByType("boxplot",function(t){var n=t.getBaseAxis(),o=l(i,n);o<0&&(o=i.length,i[o]=n,e[o]={axis:n,seriesModels:[]}),e[o].seriesModels.push(t)}),e}function bd(t){var e,i,n=t.axis,o=t.seriesModels,a=o.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var h=0;xA(o,function(t){h=Math.max(h,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])}xA(o,function(t){var e=t.get("boxWidth");y(e)||(e=[e,e]),l.push([Si(e[0],i)||0,Si(e[1],i)||0])});var u=.8*i-2,c=u/a*.3,d=(u-c*(a-1))/a,f=d/2-u/2;xA(o,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}function wd(t,e,i){var n,o=t.coordinateSystem,a=t.getData(),r=i/2,s=t.get("layout"),l="horizontal"===s?0:1,h=1-l,u=["x","y"],c=[];d(a.dimensions,function(t){var e=a.getDimensionInfo(t).coordDim;e===u[h]?c.push(t):e===u[l]&&(n=t)}),null==n||c.length<5||a.each([n].concat(c),function(){function t(t){var i=[];i[l]=d,i[h]=t;var n;return isNaN(d)||isNaN(t)?n=[NaN,NaN]:(n=o.dataToPoint(i))[l]+=e,n}function i(t,e){var i=t.slice(),n=t.slice();i[l]+=r,n[l]-=r,e?y.push(i,n):y.push(n,i)}function n(t){var e=[t.slice(),t.slice()];e[0][l]-=r,e[1][l]+=r,v.push(e)}var u=arguments,d=u[0],f=u[c.length+1],g=t(u[3]),p=t(u[1]),m=t(u[5]),v=[[p,t(u[2])],[m,t(u[4])]];n(p),n(m),n(g);var y=[];i(v[0][1],0),i(v[1][1],1),a.setItemLayout(f,{chartLayout:s,initBaseline:g[h],median:g,bodyEnds:y,whiskerEnds:v})})}function Sd(t,e,i){var n=e.getItemModel(i),o=n.getModel(_A),a=e.getItemVisual(i,"color"),r=e.getItemVisual(i,"borderColor")||a,s=o.getItemStyle(["color","color0","borderColor","borderColor0"]),l=t.childAt(t.whiskerIndex);l.useStyle(s),l.style.stroke=r;var h=t.childAt(t.bodyIndex);h.useStyle(s),h.style.fill=a,h.style.stroke=r,uo(t,n.getModel(bA).getItemStyle())}function Md(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Si(TA(t.get("barMaxWidth"),o),o),r=Si(TA(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Si(s,o):Math.max(Math.min(o/2,a),r)}function Id(t){return y(t)||(t=[+t,+t]),t}function Td(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function Ad(t,e){jy.call(this);var i=new Jr(t,e),n=new jy;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function Cd(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=f(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),o([e,t[0],t[1]])}))}function Dd(t,e,i){jy.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function Ld(t,e,i){jy.call(this),this._createPolyline(t,e,i)}function kd(t,e,i){Dd.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function Pd(){this.group=new jy,this._lineEl=new PA}function Od(t){return t instanceof Array||(t=[t,t]),t}function zd(){var t=iy();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function Nd(t,e,i){var n=t[1]-t[0],o=(e=f(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}})).length,a=0;return function(t){for(n=a;n=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){a=n;break}}return n>=0&&n=e[0]&&t<=e[1]}}function Rd(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Vd(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,h=i.get("symbolPatternSize")||2,u=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:l,animationModel:u?i:null,hoverAnimation:u&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};Bd(i,a,o,n,c),Wd(t,e,o,a,r,c.boundingLength,c.pxSign,h,n,c),Hd(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return y(f)&&(f=[Si(f[0],d[0]),Si(f[1],d[1])]),Fd(i,d,o,a,r,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function Bd(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),h=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(i[r.wh]<=0);if(y(s)){var c=[Gd(l,s[0])-h,Gd(l,s[1])-h];c[1]0?1:a<0?-1:0}function Gd(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Wd(t,e,i,n,o,a,r,s,l,h){var u=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");y(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Si(f[c.index],d),f[u.index]=Si(f[u.index],n?d:Math.abs(a)),h.symbolSize=f,(h.symbolScale=[f[0]/s,f[1]/s])[u.index]*=(l.isHorizontal?-1:1)*r}function Hd(t,e,i,n,o){var a=t.get(NA)||0;a&&(RA.attr({scale:e.slice(),rotation:i}),RA.updateTransform(),a/=RA.getLineScale(),a*=e[n.valueDim.index]),o.valueLineWidth=a}function Fd(t,e,i,n,o,r,s,l,h,u,c,d){var f=c.categoryDim,g=c.valueDim,p=d.pxSign,m=Math.max(e[g.index]+l,0),v=m;if(n){var y=Math.abs(h),x=I(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Si(x,e[g.index]);var b=Math.max(m+2*x,0),w=_?0:2*x,S=Ri(n),M=S?n:sf((y+w)/b);b=m+2*(x=(y-M*m)/2/(_?M:M-1)),w=_?0:2*x,S||"fixed"===n||(M=u?sf((Math.abs(u)+w)/b):0),v=M*b-w,d.repeatTimes=M,d.symbolMargin=x}var T=p*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[g.index]="start"===s?T:"end"===s?h-T:h/2,r&&(A[0]+=r[0],A[1]+=r[1]);var C=d.bundlePosition=[];C[f.index]=i[f.xy],C[g.index]=i[g.xy];var D=d.barRectShape=a({},i);D[g.wh]=p*Math.max(Math.abs(i[g.wh]),Math.abs(A[g.index]+T)),D[f.wh]=i[f.wh];var L=d.clipShape={};L[f.xy]=-i[f.xy],L[f.wh]=c.ecSize[f.wh],L[g.xy]=0,L[g.wh]=i[g.wh]}function Zd(t){var e=t.symbolPatternSize,i=Hr(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Ud(t,e,i,n){function o(t){var e=l.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(o=u-1-t),e[h.index]=d*(o-u/2+.5)+l[h.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}var a=t.__pictorialBundle,r=i.symbolSize,s=i.valueLineWidth,l=i.pathPosition,h=e.valueDim,u=i.repeatTimes||0,c=0,d=r[e.valueDim.index]+s+2*i.symbolMargin;for(of(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c0)],d=t.__pictorialBarRect;ol(d.style,u,a,n,e.seriesModel,o,c),uo(d,u)}function sf(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function lf(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function hf(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],h={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?h.vertical[a]:l[0],"horizontal"===r?h.horizontal[a]:l[3]];var u={horizontal:0,vertical:1};o.rotation=Math.PI/2*u[r];var c={top:-1,bottom:1,right:1,left:-1};o.labelDirection=o.tickDirection=o.nameDirection=c[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),I(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-d:d,o.labelInterval=n.getLabelInterval(),o.z2=1,o}function uf(t,e,i,n,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var s=cf(e,t),l=s.payloadBatch,h=s.snapToValue;l[0]&&null==o.seriesIndex&&a(o,l[0]),!n&&t.snap&&r.containData(h)&&null!=h&&(e=h),i.showPointer(t,e,l,o),i.showTooltip(t,s,h)}else i.showPointer(t,e)}function cf(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=Number.MAX_VALUE,s=-1;return XA(e.seriesModels,function(e,l){var h,u,c=e.coordDimToDataDim(n);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);u=d.dataIndices,h=d.nestestValue}else{if(!(u=e.getData().indicesOfNearest(c[0],t,!1,"category"===i.type?.5:null)).length)return;h=e.getData().get(c[0],u[0])}if(null!=h&&isFinite(h)){var f=t-h,g=Math.abs(f);g<=r&&((g=0&&s<0)&&(r=g,s=f,o=h,a.length=0),XA(u,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:o}}function df(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function ff(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,h=Ys(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function gf(t,e,i){var n=i.axesInfo=[];XA(e,function(e,i){var o=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(o.status="show"),o.value=a.value,o.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})})}function pf(t,e,i,n){if(!xf(e)&&t.list.length){var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}function mf(t,e,i){var n=i.getZr(),o=qA(n).axisPointerLastHighlights||{},a=qA(n).axisPointerLastHighlights={};XA(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&XA(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];d(o,function(t,e){!a[e]&&s.push(t)}),d(a,function(t,e){!o[e]&&r.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),r.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:r})}function vf(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function yf(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function xf(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function _f(t,e,i){if(!Uv.node){var n=e.getZr();YA(n).records||(YA(n).records={}),bf(n,e),(YA(n).records[t]||(YA(n).records[t]={})).handler=i}}function bf(t,e){function i(i,n){t.on(i,function(i){var o=If(e);$A(YA(t).records,function(t){t&&n(t,i,o.dispatchAction)}),wf(o.pendings,e)})}YA(t).initialized||(YA(t).initialized=!0,i("click",v(Mf,"click")),i("mousemove",v(Mf,"mousemove")),i("globalout",Sf))}function wf(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function Sf(t,e,i){t.handler("leave",null,i)}function Mf(t,e,i,n){e.handler(t,i,n)}function If(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function Tf(t,e){if(!Uv.node){var i=e.getZr();(YA(i).records||{})[t]&&(YA(i).records[t]=null)}}function Af(){}function Cf(t,e,i,n){Df(JA(i).lastProp,n)||(JA(i).lastProp=n,e?wo(i,n,t):(i.stopAnimation(),i.attr(n)))}function Df(t,e){if(b(t)&&b(e)){var i=!0;return d(e,function(e,n){i=i&&Df(t[n],e)}),!!i}return t===e}function Lf(t,e){t[e.get("label.show")?"show":"hide"]()}function kf(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Pf(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function Of(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function zf(t,e,i,n,o){var a=Ef(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=Gx(r.get("padding")||0),l=r.getFont(),h=de(a,l),u=o.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],f=o.align;"right"===f&&(u[0]-=c),"center"===f&&(u[0]-=c/2);var g=o.verticalAlign;"bottom"===g&&(u[1]-=d),"middle"===g&&(u[1]-=d/2),Nf(u,c,d,n);var p=r.get("backgroundColor");p&&"auto"!==p||(p=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:u.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:p,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function Nf(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Ef(t,e,i,n,o){var a=e.scale.getLabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:Br(e,t),seriesData:[]};d(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&s.seriesData.push(o)}),_(r)?a=r.replace("{value}",a):x(r)&&(a=r(s))}return a}function Rf(t,e,i){var n=ot();return ht(n,n,i.rotation),lt(n,n,i.position),Io([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Vf(t,e,i,n,o,a){var r=DM.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),zf(e,n,o,a,{position:Rf(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function Bf(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Gf(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Wf(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}function Hf(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Ff(t){return"x"===t.dim?0:1}function Zf(t){return t.isHorizontal()?0:1}function Uf(t,e){var i=t.getRect();return[i[nC[e]],i[nC[e]]+i[oC[e]]]}function Xf(t,e,i){var n=new db({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return So(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function jf(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,a=e.getLayerSeries(),r=f(a,function(e){return f(e.indices,function(e){var i=o.dataToPoint(t.get("time",e));return i[1]=t.get("value",e),i})}),s=qf(r),l=s.y0,h=i/s.max,u=a.length,c=a[0].indices.length,d=0;da&&(a=h),n.push(h)}for(var u=0;ua&&(a=d)}return r.y0=o,r.max=a,r}function Yf(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function $f(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function Kf(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function Jf(t,e){return f(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Qf(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=Un(n.pathData,null,{x:n.x||0,y:n.y||0,width:n.width||0,height:n.height||0},"center")).__customPathData=t.pathData}else"image"===i?(e=new qe({})).__customImagePath=t.style.image:"text"===i?(e=new ib({})).__customText=t.style.text:e=new(0,Tb[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}function tg(t,e,n,o,a,r){var s={},l=n.style||{};if(n.shape&&(s.shape=i(n.shape)),n.position&&(s.position=n.position.slice()),n.scale&&(s.scale=n.scale.slice()),n.origin&&(s.origin=n.origin.slice()),n.rotation&&(s.rotation=n.rotation),"image"===t.type&&n.style){h=s.style={};d(["x","y","width","height"],function(e){eg(e,h,l,t.style,r)})}if("text"===t.type&&n.style){var h=s.style={};d(["x","y"],function(e){eg(e,h,l,t.style,r)}),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if("group"!==t.type&&(t.useStyle(l),r)){t.style.opacity=0;var u=l.opacity;null==u&&(u=1),So(t,{style:{opacity:u}},o,e)}r?t.attr(s):wo(t,s,o,e),t.attr({z2:n.z2||0,silent:n.silent}),!1!==n.styleEmphasis&&uo(t,n.styleEmphasis)}function eg(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function ig(t,e,i,n){function o(t){null==t&&(t=u),y&&(c=e.getItemModel(t),d=c.getModel(uC),f=c.getModel(cC),g=Yr(e),p=e.getItemVisual(t,"color"),y=!1)}var s=t.get("renderItem"),l=t.coordinateSystem,h={};l&&(h=l.prepareCustoms?l.prepareCustoms():fC[l.type](l));var u,c,d,f,g,p,m=r({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=u),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=u),o(n);var r=c.getModel(lC).getItemStyle();null!=p&&(r.fill=p);var s=e.getItemVisual(n,"opacity");return null!=s&&(r.opacity=s),null!=g&&(fo(r,d,null,{autoColor:p,isRectText:!0}),r.text=d.getShallow("show")?T(t.getFormattedLabel(n,"normal"),e.get(g,n)):null),i&&a(r,i),r},styleEmphasis:function(i,n){null==n&&(n=u),o(n);var r=c.getModel(hC).getItemStyle();return null!=g&&(fo(r,f,null,{isRectText:!0},!0),r.text=f.getShallow("show")?A(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),e.get(g,n)):null),i&&a(r,i),r},visual:function(t,i){return null==i&&(i=u),e.getItemVisual(i,t)},barLayout:function(t){if(l.getBaseAxis){var e=l.getBaseAxis();return nl.getLayoutOnAxis(r({axis:e},t),n)}},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return _o(t,i)}},h.api||{}),v={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:h.coordSys,dataInsideLength:e.count(),encode:ng(t.getData())},y=!0;return function(t){return u=t,y=!0,s&&s(r({dataIndexInside:t,dataIndex:e.getRawIndex(t)},v),m)||{}}}function ng(t){var e={};return d(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}}),e}function og(t,e,i,n,o,a){(t=ag(t,e,i,n,o,a))&&a.setItemGraphicEl(e,t)}function ag(t,e,i,n,o,a){var r=i.type;if(!t||r===t.__customGraphicType||"path"===r&&i.pathData===t.__customPathData||"image"===r&&i.style.image===t.__customImagePath||"text"===r&&i.style.text===t.__customText||(o.remove(t),t=null),null!=r){var s=!t;if(!t&&(t=Qf(i)),tg(t,e,i,n,a,s),"group"===r){var l=t.children()||[],h=i.children||[];if(i.diffChildrenByName)rg({oldChildren:l,newChildren:h,dataIndex:e,animatableModel:n,group:t,data:a});else{for(var u=0;un?t-=l+a:t+=a),null!=r&&(e+h+r>o?e-=h+r:e+=r),[t,e]}function kg(t,e,i,n,o){var a=Pg(i),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Pg(t){var e=t.clientWidth,i=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(t);n&&(e+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),i+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:i}}function Og(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}function zg(t){return"center"===t||"middle"===t}function Ng(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Eg(t){return t.dim}function Rg(t,e){var i={};d(t,function(t,e){var n=t.getData(),o=t.coordinateSystem.getBaseAxis(),a=o.getExtent(),r="category"===o.type?o.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=i[Eg(o)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[Eg(o)]=s;var h=Ng(t);l[h]||s.autoWidthCount++,l[h]=l[h]||{width:0,maxWidth:0};var u=Si(t.get("barWidth"),r),c=Si(t.get("barMaxWidth"),r),d=t.get("barGap"),f=t.get("barCategoryGap");u&&!l[h].width&&(u=Math.min(s.remainedWidth,u),l[h].width=u,s.remainedWidth-=u),c&&(l[h].maxWidth=c),null!=d&&(s.gap=d),null!=f&&(s.categoryGap=f)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,a=Si(t.categoryGap,o),r=Si(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-a)/(l+(l-1)*r);h=Math.max(h,0),d(i,function(t,e){var i=t.maxWidth;i&&ie[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function Ug(t){return t.getRadiusAxis().inverse?0:1}function Xg(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function jg(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,h,u,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=ot();ht(d,d,s),lt(d,d,[n.cx,n.cy]),l=Io([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,g=DM.innerTextLayout(s,f*Math.PI/180,-1);h=g.textAlign,u=g.textVerticalAlign}else{var p=c[1];l=n.coordToPoint([p+o,r]);var m=n.cx,v=n.cy;h=Math.abs(l[0]-m)/p<.3?"center":l[0]>m?"left":"right",u=Math.abs(l[1]-v)/p<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:h,verticalAlign:u}}function qg(t,e){e.update="updateView",ir(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name),d(i.coordinateSystem.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function Yg(t){var e={};d(t,function(t){e[t]=1}),t.length=0,d(e,function(e,i){t.push(i)})}function $g(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Kg(t,e,n){function o(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return HC(e,function(e){var r=a[e]=o();HC(t[e],function(t,o){if(jI.isValidType(o)){var a={type:o,visual:t};n&&n(a,e),r[o]=new jI(a),"opacity"===o&&((a=i(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new jI(a))}})}),a}function Jg(t,e,n){var o;d(n,function(t){e.hasOwnProperty(t)&&$g(e[t])&&(o=!0)}),o&&d(n,function(n){e.hasOwnProperty(n)&&$g(e[n])?t[n]=i(e[n]):delete t[n]})}function Qg(t,e,i,n,o,a){function r(t){return i.getItemVisual(u,t)}function s(t,e){i.setItemVisual(u,t,e)}function l(t,l){u=null==a?t:l;var c=i.getRawDataItem(u);if(!c||!1!==c.visualMap)for(var d=n.call(o,t),f=e[d],g=h[d],p=0,m=g.length;p1)return!1;var u=ap(i-t,o-t,n-e,a-e)/l;return!(u<0||u>1)}function op(t){return t<=1e-6&&t>=-1e-6}function ap(t,e,i,n){return t*n-e*i}function rp(t,e,i){var n=this._targetInfoList=[],o={},a=lp(e,t);ZC($C,function(t,e){(!i||!i.include||UC(i.include,e)>=0)&&t(a,n,o)})}function sp(t){return t[0]>t[1]&&t.reverse(),t}function lp(t,e){return Fo(t,e,{includeMainTypes:qC})}function hp(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=sp(f([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}function up(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function cp(t,e){var i=dp(t),n=dp(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}function dp(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function fp(t,e,i,n,o){if(o){var a=t.getZr();a[nD]||(a[iD]||(a[iD]=gp),La(a,iD,i,e)(t,n))}}function gp(t,e){if(!t.isDisposed()){var i=t.getZr();i[nD]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[nD]=!1}}function pp(t,e,i,n){for(var o=0,a=e.length;o=0}function Dp(t,e,i){function n(t,e){return l(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){var r={nodes:[],records:{}};if(e(function(t){r.records[t.name]={}}),!i)return r;a(i,r);var s;do{s=!1,t(function(t){!n(t,r)&&o(t,r)&&(a(t,r),s=!0)})}while(s);return r}}function Lp(t,e,i){var n=[1/0,-1/0];return mD(i,function(t){var i=t.getData();i&&mD(t.coordDimToDataDim(e),function(t){var e=i.getDataExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:NaN);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Pp(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Ci(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}function Op(t){var e=t._minMaxSpan={},i=t._dataZoomModel;mD(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var o=i.get(n+"ValueSpan");if(null!=o&&(e[n+"ValueSpan"]=o,null!=(o=t.getAxisModel().axis.scale.parse(o)))){var a=t._dataExtent;e[n+"Span"]=wi(a[0]+o,a,[0,100],!0)}})}function zp(t){var e={};return xD(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Np(t,e){var i=t._rangePropMode,n=t.get("rangeMode");xD([["start","startValue"],["end","endValue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function Ep(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function Rp(t){return"vertical"===t?"ns-resize":"ew-resize"}function Vp(t,e){var i=Hp(t),n=e.dataZoomId,o=e.coordId;d(i,function(t,i){var a=t.dataZoomInfos;a[n]&&l(e.allCoordIds,o)<0&&(delete a[n],t.count--)}),Zp(i);var a=i[o];a||((a=i[o]={coordId:o,dataZoomInfos:{},count:0}).controller=Fp(t,a),a.dispatchAction=v(qp,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var r=Yp(a.dataZoomInfos);a.controller.enable(r.controlType,r.opt),a.controller.setPointerChecker(e.containsPoint),La(a,"dispatchAction",e.throttleRate,"fixRate")}function Bp(t,e){var i=Hp(t);d(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),Zp(i)}function Gp(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;in[e]&&(e=o),a(i,t.roamControllerOpt)}),{controlType:e,opt:i}}function $p(t,e,i){i.getAxisProxy(t.name,e).reset(i)}function Kp(t,e,i){i.getAxisProxy(t.name,e).filterData(i)}function Jp(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Qp(t,e){t.eachTargetSeries(function(e){var i=e.getData();Qg(t.stateList,t.targetVisuals,i,t.getValueState,t,t.getDataDimension(i))})}function tm(t){t.eachSeries(function(e){var i=e.getData(),n=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var o=t.getVisualMeta(m(em,null,e,t))||{stops:[],outerColors:[]};o.dimension=t.getDataDimension(i),n.push(o)}}),e.getData().setVisual("visualMeta",n)})}function em(t,e,i,n){for(var o=e.targetVisuals[n],a=jI.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s=0&&(r[a]=+r[a].toFixed(h)),r}function vm(t,e){var n=t.getData(),o=t.coordinateSystem;if(e&&!gm(e)&&!y(e.coord)&&o){var a=o.dimensions,r=ym(e,n,o,t);if((e=i(e)).type&&fL[e.type]&&r.baseAxis&&r.valueAxis){var s=cL(a,r.baseAxis.dim),l=cL(a,r.valueAxis.dim);e.coord=fL[e.type](n,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;u<2;u++)if(fL[h[u]]){var c=t.coordDimToDataDim(a[u])[0];h[u]=bm(n,c,h[u])}e.coord=h}}return e}function ym(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(n.dataDimToCoordDim(o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=n.coordDimToDataDim(o.baseAxis.dim)[0]):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=n.coordDimToDataDim(o.baseAxis.dim)[0],o.valueDataDim=n.coordDimToDataDim(o.valueAxis.dim)[0]),o}function xm(t,e){return!(t&&t.containData&&e.coord&&!fm(e))||t.containData(e.coord)}function _m(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function bm(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,o++)},!0),n/o}return t.getDataExtent(e,!0)["max"===i?1:0]}function wm(t,e,i){var n=e.coordinateSystem;t.each(function(o){var a,r=t.getItemModel(o),s=Si(r.get("x"),i.getWidth()),l=Si(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)a=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var h=t.get(n.dimensions[0],o),u=t.get(n.dimensions[1],o);a=n.dataToPoint([h,u])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),t.setItemLayout(o,a)})}function Sm(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var o=new aS(n,i),a=f(i.get("data"),v(vm,e));return t&&(a=p(a,v(xm,t))),o.initData(a,null,t?_m:function(t){return t.value}),o}function Mm(t){return!isNaN(t)&&!isFinite(t)}function Im(t,e,i,n){var o=1-t,a=n.dimensions[t];return Mm(e[o])&&Mm(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function Tm(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(Im(1,i,n,t)||Im(0,i,n,t)))return!0}return xm(t,e[0])&&xm(t,e[1])}function Am(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Si(s.get("x"),o.getWidth()),h=Si(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=r.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);a=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),g=r.getAxis("y"),u=r.dimensions;Mm(t.get(u[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):Mm(t.get(u[1],e))&&(a[1]=g.toGlobalCoord(g.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(h)||(a[1]=h)}else a=[l,h];t.setItemLayout(e,a)}function Cm(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var o=new aS(n,i),a=new aS(n,i),r=new aS([],i),s=f(i.get("data"),v(pL,e,t,i));t&&(s=p(s,v(Tm,t)));var l=t?_m:function(t){return t.value};return o.initData(f(s,function(t){return t[0]}),null,l),a.initData(f(s,function(t){return t[1]}),null,l),r.initData(f(s,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}function Dm(t){return!isNaN(t)&&!isFinite(t)}function Lm(t,e,i,n){var o=1-t;return Dm(e[o])&&Dm(i[o])}function km(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!Lm(1,i,n,t)&&!Lm(0,i,n,t))||(xm(t,{coord:i,x:e.x0,y:e.y0})||xm(t,{coord:n,x:e.x1,y:e.y1}))}function Pm(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Si(s.get(i[0]),o.getWidth()),h=Si(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var u=t.get(i[0],e),c=t.get(i[1],e);a=r.dataToPoint([u,c],!0)}if("cartesian2d"===r.type){var d=r.getAxis("x"),f=r.getAxis("y"),u=t.get(i[0],e),c=t.get(i[1],e);Dm(u)?a[0]=d.toGlobalCoord(d.getExtent()["x0"===i[0]?0:1]):Dm(c)&&(a[1]=f.toGlobalCoord(f.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(h)||(a[1]=h)}else a=[l,h];return a}function Om(t,e,i){var n,o,a=["x0","y0","x1","y1"];t?(n=f(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}),o=new aS(f(a,function(t,e){return{name:t,type:n[e%2].type}}),i)):o=new aS(n=[{name:"value",type:"float"}],i);var r=f(i.get("data"),v(mL,e,t,i));t&&(r=p(r,v(km,t)));var s=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(r,null,s),o.hasItemOption=!0,o}function zm(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),Nm(t),Em(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});Em(n,"position")||(n.position=t.controlPosition),"none"!==n.position||Em(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}d(t.data||[],function(t){b(t)&&!y(t)&&(!Em(t,"value")&&Em(t,"name")&&(t.value=t.name),Nm(t))})}function Nm(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};d(n,function(t,e){a[e]||Em(o,e)||(o[e]=t)}),i.label&&!Em(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function Em(t,e){return t.hasOwnProperty(e)}function Rm(t,e){return Ko(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function Vm(t,e,n,o){return Un(t.get(e).replace(/^path:\/\//,""),i(o||{}),new jt(n[0],n[1],n[2],n[3]),"center")}function Bm(t,e,i,o,a,r){var s=e.get("color");a?(a.setColor(s),i.add(a),r&&r.onUpdate(a)):((a=Hr(t.get("symbol"),-1,-1,2,2,s)).setStyle("strokeNoScale",!0),i.add(a),r&&r.onCreate(a));var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),o=n({rectHover:!0,z2:100},o,!0);var h=t.get("symbolSize");(h=h instanceof Array?h.slice():[+h,+h])[0]/=2,h[1]/=2,o.scale=h;var u=t.get("symbolOffset");if(u){var c=o.position=o.position||[0,0];c[0]+=Si(u[0],h[0]),c[1]+=Si(u[1],h[1])}var d=t.get("symbolRotate");return o.rotation=(d||0)*Math.PI/180||0,a.attr(o),a.updateTransform(),a}function Gm(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}function Wm(t){return 0===t.indexOf("my")}function Hm(t){this.model=t}function Fm(t){this.model=t}function Zm(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var o=t.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)i.push(t);else{var a=o.getBaseAxis();if("category"===a.type){var r=a.dim+"_"+a.index;e[r]||(e[r]={categoryAxis:a,valueAxis:o.getOtherAxis(a),series:[]},n.push({axisDim:a.dim,axisIndex:a.index})),e[r].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function Um(t){var e=[];return d(t,function(t,i){var n=t.categoryAxis,o=t.valueAxis.dim,a=[" "].concat(f(t.series,function(t){return t.name})),r=[n.model.getCategories()];d(t.series,function(t){r.push(t.getRawData().mapArray(o,function(t){return t}))});for(var s=[a.join(PL)],l=0;l=0)return!0}function $m(t){for(var e=t.split(/\n+/g),i=[],n=f(qm(e.shift()).split(OL),function(t){return{name:t,data:[]}}),o=0;o=0&&!i[o][n];o--);if(o<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var r=a.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}}),i.push(e)}function iv(t){var e=av(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return zL(i,function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}}),n}function nv(t){t[NL]=null}function ov(t){return av(t).length}function av(t){var e=t[NL];return e||(e=t[NL]=[{}]),e}function rv(t,e,i){(this._brushController=new Yu(i.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function sv(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function lv(t,e){t.setIconStatus("back",ov(e)>1?"emphasis":"normal")}function hv(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new rp(sv(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function uv(t){this.model=t}function cv(t){return HL(t)}function dv(){if(!UL&&XL){UL=!0;var t=XL.styleSheets;t.length<31?XL.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function fv(t){return parseInt(t,10)}function gv(t,e){dv(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}function pv(t){return function(){Wy('In IE8.0 VML mode painter not support method "'+t+'"')}}function mv(t){return document.createElementNS(Tk,t)}function vv(t){return Lk(1e4*t)/1e4}function yv(t){return t-Ek}function xv(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Dk}function _v(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Dk}function bv(t,e){e&&wv(t,"transform","matrix("+Ck.call(e,",")+")")}function wv(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function Sv(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function Mv(t,e,i){if(xv(e,i)){var n=i?e.textFill:e.fill;n="transparent"===n?Dk:n,"none"!==t.getAttribute("clip-path")&&n===Dk&&(n="rgba(0, 0, 0, 0.002)"),wv(t,"fill",n),wv(t,"fill-opacity",e.opacity)}else wv(t,"fill",Dk);if(_v(e,i)){var o=i?e.textStroke:e.stroke;wv(t,"stroke",o="transparent"===o?Dk:o),wv(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(e.strokeNoScale?e.host.getLineScale():1)),wv(t,"paint-order","stroke"),wv(t,"stroke-opacity",e.opacity),e.lineDash?(wv(t,"stroke-dasharray",e.lineDash.join(",")),wv(t,"stroke-dashoffset",Lk(e.lineDashOffset||0))):wv(t,"stroke-dasharray",""),e.lineCap&&wv(t,"stroke-linecap",e.lineCap),e.lineJoin&&wv(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&wv(t,"stroke-miterlimit",e.miterLimit)}else wv(t,"stroke",Dk)}function Iv(t){for(var e=[],i=t.data,n=t.len(),o=0;o=zk||!yv(p)&&(d>-Ok&&d<0||d>Ok)==!!g;var y=vv(s+h*Pk(c)),x=vv(l+u*kk(c));m&&(d=g?zk-1e-4:1e-4-zk,v=!0,9===o&&e.push("M",y,x));var _=vv(s+h*Pk(c+d)),b=vv(l+u*kk(c+d));e.push("A",vv(h),vv(u),Lk(f*Nk),+v,+g,_,b);break;case Ak.Z:a="Z";break;case Ak.R:var _=vv(i[o++]),b=vv(i[o++]),w=vv(i[o++]),S=vv(i[o++]);e.push("M",_,b,"L",_+w,b,"L",_+w,b+S,"L",_,b+S,"L",_,b)}a&&e.push(a);for(var M=0;M=11)}}(navigator.userAgent),Xv={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},jv={"[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},qv=Object.prototype.toString,Yv=Array.prototype,$v=Yv.forEach,Kv=Yv.filter,Jv=Yv.slice,Qv=Yv.map,ty=Yv.reduce,ey={},iy=function(){return ey.createCanvas()};ey.createCanvas=function(){return document.createElement("canvas")};var ny,oy="__ec_primitive__";O.prototype={constructor:O,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=m(t,e));for(var i in this)this.hasOwnProperty(i)&&t(this[i],i.slice(4))},removeKey:function(t){delete this["_ec_"+t]}};var ay=(Object.freeze||Object)({$override:e,clone:i,merge:n,mergeAll:o,extend:a,defaults:r,createCanvas:iy,getContext:s,indexOf:l,inherits:h,mixin:u,isArrayLike:c,each:d,map:f,reduce:g,filter:p,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n3&&(e=dy.call(e,1));for(var n=this._$handlers[t],o=n.length,a=0;a4&&(e=dy.call(e,1,e.length-1));for(var n=e[e.length-1],o=this._$handlers[t],a=o.length,r=0;r=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=nt(n[a],t,e))&&(!o.topTarget&&(o.topTarget=n[a]),r!==gy)){o.target=n[a];break}}return o}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){my.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mosueup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||hy(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),u(my,fy),u(my,Q);var vy="undefined"==typeof Float32Array?Array:Float32Array,yy=(Object.freeze||Object)({create:ot,identity:at,copy:rt,mul:st,translate:lt,rotate:ht,scale:ut,invert:ct}),xy=at,_y=5e-5,by=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},wy=by.prototype;wy.transform=null,wy.needLocalTransform=function(){return dt(this.rotation)||dt(this.position[0])||dt(this.position[1])||dt(this.scale[0]-1)||dt(this.scale[1]-1)},wy.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;i||e?(n=n||ot(),i?this.getLocalTransform(n):xy(n),e&&(i?st(n,t.transform,n):rt(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||ot(),ct(this.invTransform,n)):n&&xy(n)},wy.getLocalTransform=function(t){return by.getLocalTransform(this,t)},wy.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)},wy.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Sy=[];wy.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(st(Sy,t.invTransform,e),e=Sy);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],o=this.position,a=this.scale;dt(i-1)&&(i=Math.sqrt(i)),dt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),o[0]=e[4],o[1]=e[5],a[0]=i,a[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},wy.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]},wy.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&$(i,i,n),i},wy.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&$(i,i,n),i},by.getLocalTransform=function(t,e){xy(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ut(e,e,n),o&&ht(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var My={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-My.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*My.bounceIn(2*t):.5*My.bounceOut(2*t-1)+.5}};ft.prototype={constructor:ft,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 n=this.easing,o="string"==typeof n?My[n]:n,a="function"==typeof o?o(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 Iy=function(){this.head=null,this.tail=null,this._len=0},Ty=Iy.prototype;Ty.insert=function(t){var e=new Ay(t);return this.insertEntry(e),e},Ty.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++},Ty.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--},Ty.len=function(){return this._len},Ty.clear=function(){this.head=this.tail=null,this._len=0};var Ay=function(t){this.value=t,this.next,this.prev},Cy=function(t){this._list=new Iy,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Dy=Cy.prototype;Dy.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ay(e),r.key=t,i.insertEntry(r),n[t]=r}return o},Dy.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},Dy.clear=function(){this._list.clear(),this._map={}};var Ly={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]},ky=new Cy(20),Py=null,Oy=Dt,zy=Lt,Ny=(Object.freeze||Object)({parse:Mt,lift:At,toHex:Ct,fastLerp:Dt,fastMapToColor:Oy,lerp:Lt,mapToColor:zy,modifyHSL:kt,modifyAlpha:Pt,stringify:Ot}),Ey=Array.prototype.slice,Ry=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||zt,this._setter=n||Nt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Ry.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:Ft(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t0&&this.animate(t,!1).when(null==n?500:n,a).delay(o||0),this}};var Fy=function(t){by.call(this,t),fy.call(this,t),Hy.call(this,t),this.id=t.id||Fv()};Fy.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(b(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new jt(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}}},jt.create=function(t){return new jt(t.x,t.y,t.width,t.height)};var jy=function(t){t=t||{},Fy.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};jy.prototype={constructor:jy,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,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 jy&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=l(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof jy&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof jy&&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:ie};var Ky=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Jy=function(t,e){this.extendFrom(t,!1),this.host=e};Jy.prototype={constructor:Jy,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 n=this,o=i&&i.style,a=!o,r=0;r0},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 n=("radial"===e.type?oe:ne)(t,e,i),o=e.colorStops,a=0;a=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i=0){if(!s){if((s=this._progressiveLayers[Math.min(h++,4)]).ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(f=l),s.__progress=f+1}y===f&&this._doPaintEl(m,s,!0,s.renderScope)}else this._doPaintEl(m,n,e,r);m.__dirty=!1}}s&&i(s),a&&a.restore(),this._furtherProgressive=!1,d(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var o=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!Qe(t,this._width,this._height))){var r=t.__clipPaths;(n.prevClipLayer!==e||ti(r,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),r&&(o.save(),ei(r,o),n.prevClipLayer=e,n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(o),t.brush(o,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(o)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||((e=new nx("zr_"+t,this,this.dpr)).__builtin__=!0,this._layerConfig[t]&&n(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,r=-1,s=this._domRoot;if(i[t])Wy("ZLevel "+t+" has been used already");else if($e(e)){if(o>0&&t>n[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Wy("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n=0){r!==g&&(r=g,l++);var p=c.__frame=l-1;if(!a){var m=Math.min(s,4);(a=i[m])||(a=i[m]=new nx("progressive",this,this.dpr)).initContext(),a.__maxProgress=0}a.__dirty=a.__dirty||c.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,p),a.__maxProgress>=a.__progress&&(f.__dirty=!0)}else c.__frame=-1,a&&(a.__nextIdxNotProg=h,s++,a=null)}a&&(s++,a.__nextIdxNotProg=h),this.eachBuiltinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,5),d(i,function(t,e){o[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?n(i[t],e,!0):i[t]=e;var o=this._layers[t];o&&n(o,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(l(i,t),1))},resize:function(t,e){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.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 o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);d(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 n=r._zlevelList;null==t&&(t=-1/0);for(var o,a=0;at&&s=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i1&&n&&n.length>1){var a=ui(n)/ui(o);!isFinite(a)&&(a=1),e.pinchScale=a;var r=ci(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},Ix=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Tx=["touchstart","touchend","touchmove"],Ax={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Cx=f(Ix,function(t){var e=t.replace("mouse","pointer");return Ax[e]?e:t}),Dx={mousemove:function(t){t=ri(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=ri(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=ri(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,fi(this,t,"start"),Dx.mousemove.call(this,t),Dx.mousedown.call(this,t),gi(this)},touchmove:function(t){(t=ri(this.dom,t)).zrByTouch=!0,fi(this,t,"change"),Dx.mousemove.call(this,t),gi(this)},touchend:function(t){(t=ri(this.dom,t)).zrByTouch=!0,fi(this,t,"end"),Dx.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Dx.click.call(this,t),gi(this)},pointerdown:function(t){Dx.mousedown.call(this,t)},pointermove:function(t){pi(t)||Dx.mousemove.call(this,t)},pointerup:function(t){Dx.mouseup.call(this,t)},pointerout:function(t){pi(t)||Dx.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Dx[t]=function(e){e=ri(this.dom,e),this.trigger(t,e)}});var Lx=vi.prototype;Lx.dispose=function(){for(var t=Ix.concat(Tx),e=0;e=0||n&&l(n,r)<0)){var s=e.getShallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},Kx=$x([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Jx={getLineStyle:function(t){var e=Kx(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},Qx=$x([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),t_={getAreaStyle:function(t,e){return Qx(this,t,e)}},e_=Math.pow,i_=Math.sqrt,n_=1e-8,o_=1e-4,a_=i_(3),r_=1/3,s_=E(),l_=E(),h_=E(),u_=Math.min,c_=Math.max,d_=Math.sin,f_=Math.cos,g_=2*Math.PI,p_=E(),m_=E(),v_=E(),y_=[],x_=[],__={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},b_=[],w_=[],S_=[],M_=[],I_=Math.min,T_=Math.max,A_=Math.cos,C_=Math.sin,D_=Math.sqrt,L_=Math.abs,k_="undefined"!=typeof Float32Array,P_=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};P_.prototype={constructor:P_,_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=L_(1/By/t)||0,this._uy=L_(1/By/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(__.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=L_(t-this._xi)>this._ux||L_(e-this._yi)>this._uy||this._len<5;return this.addData(__.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,n,o,a){return this.addData(__.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(__.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(__.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=A_(o)*i+t,this._yi=C_(o)*i+t,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(__.R,t,e,i,n),this},closePath:function(){this.addData(__.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&f<=t||u<0&&f>=t||0==u&&(c>0&&g<=e||c<0&&g>=e);)f+=u*(i=r[n=this._dashIdx]),g+=c*i,this._dashIdx=(n+1)%p,u>0&&fl||c>0&&gh||s[n%2?"moveTo":"lineTo"](u>=0?I_(f,t):T_(f,t),c>=0?I_(g,e):T_(g,e));u=f-t,c=g-e,this._dashOffset=-D_(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._ctx,p=this._xi,m=this._yi,v=on,y=0,x=this._dashIdx,_=f.length,b=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(p,t,i,o,r+.1)-v(p,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=D_(s*s+l*l);for(;x<_&&!((b+=f[x])>d);x++);for(r=(b-d)/y;r<=1;)h=v(p,t,i,o,r),u=v(m,e,n,a,r),x%2?g.moveTo(h,u):g.lineTo(h,u),r+=f[x]/y,x=(x+1)%_;x%2!=0&&g.lineTo(o,a),s=o-h,l=a-u,this._dashOffset=-D_(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,k_&&(this.data=new Float32Array(t)))},getBoundingRect:function(){b_[0]=b_[1]=S_[0]=S_[1]=Number.MAX_VALUE,w_[0]=w_[1]=M_[0]=M_[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;al||L_(r-o)>h||c===u-1)&&(t.lineTo(a,r),n=a,o=r);break;case __.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case __.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case __.A:var f=s[c++],g=s[c++],p=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],b=p>m?p:m,w=p>m?1:p/m,S=p>m?m/p:1,M=v+y;Math.abs(p-m)>.001?(t.translate(f,g),t.rotate(x),t.scale(w,S),t.arc(0,0,b,v,M,1-_),t.scale(1/w,1/S),t.rotate(-x),t.translate(-f,-g)):t.arc(f,g,b,v,M,1-_),1==c&&(e=A_(v)*p+f,i=C_(v)*m+g),n=A_(M)*p+f,o=C_(M)*m+g;break;case __.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case __.Z:t.closePath(),n=e,o=i}}}},P_.CMD=__;var O_=2*Math.PI,z_=2*Math.PI,N_=P_.CMD,E_=2*Math.PI,R_=1e-4,V_=[-1,-1,-1],B_=[-1,-1],G_=ix.prototype.getCanvasPattern,W_=Math.abs,H_=new P_(!0);Nn.prototype={constructor:Nn,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path||H_,o=i.hasStroke(),a=i.hasFill(),r=i.fill,s=i.stroke,l=a&&!!r.colorStops,h=o&&!!s.colorStops,u=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),h&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=G_.call(r,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=G_.call(s,t));var f=i.lineDash,g=i.lineDashOffset,p=!!t.setLineDash,m=this.getGlobalScale();n.setScale(m[0],m[1]),this.__dirtyPath||f&&!p&&o?(n.beginPath(t),f&&!p&&(n.setLineDash(f),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&n.fill(t),f&&p&&(t.setLineDash(f),t.lineDashOffset=g),o&&n.stroke(t),f&&p&&t.setLineDash([]),this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new P_},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new P_),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),zn(a,r/s,t,e)))return!0}if(o.hasFill())return On(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):je.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(b(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&W_(t[0]-1)>1e-10&&W_(t[3]-1)>1e-10?Math.sqrt(W_(t[0]*t[3]-t[2]*t[1])):1}},Nn.extend=function(t){var e=function(e){Nn.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};h(e,Nn);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(Nn,je);var F_=P_.CMD,Z_=[[],[],[]],U_=Math.sqrt,X_=Math.atan2,j_=function(t,e){var i,n,o,a,r,s,l=t.data,h=F_.M,u=F_.C,c=F_.L,d=F_.R,f=F_.A,g=F_.Q;for(o=0,a=0;o=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;oi-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var g=d*d,p=d*g;n.push([Wn(s[0],f[0],l[0],h[0],d,g,p),Wn(s[1],f[1],l[1],h[1],d,g,p)])}return n},hb=function(t,e,i,n){var o,a,r,s,l=[],h=[],u=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=i&&a>=o)return{x:i,y:o,width:n-i,height:a-o}},createIcon:Do,Group:jy,Image:qe,Text:ib,Circle:nb,Sector:rb,Ring:sb,Polygon:ub,Polyline:cb,Rect:db,Line:fb,BezierCurve:pb,Arc:mb,CompoundPath:vb,LinearGradient:xb,RadialGradient:_b,BoundingRect:jt}),Ab=["textStyle","color"],Cb={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Ab):null)},getFont:function(){return _o({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return de(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},Db=$x([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Lb={getItemStyle:function(t,e){var i=Db(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},kb=u;Lo.prototype={constructor:Lo,init:null,mergeOption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:ko(this.option,this.parsePath(t),!e&&Po(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&Po(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:ko(this.option,t=this.parsePath(t));return e=e||(i=Po(this,t))&&i.getModel(t),new Lo(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Xi(this,"getParent",t)},isAnimationEnabled:function(){if(!Uv.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Ki(Lo),kb(Lo,Jx),kb(Lo,t_),kb(Lo,Cb),kb(Lo,Lb);var Pb=d,Ob=b,zb=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],Nb={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),o=i.getRawIndex(t),a=i.getName(t,!0),r=i.getRawDataItem(t),s=i.getItemVisual(t,"color");return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:this.seriesIndex,seriesId:this.id,seriesName:this.name,name:a,dataIndex:o,data:r,dataType:e,value:n,color:s,marker:Fi(s),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,o){e=e||"normal";var a=this.getData(i).getItemModel(t),r=this.getDataParams(t,i);null!=n&&r.value instanceof Array&&(r.value=r.value[n]);var s=a.get([o||"label",e,"formatter"]);return"function"==typeof s?(r.status=e,s(r)):"string"==typeof s?Wi(s,r):void 0},getRawValue:function(t,e){var i=this.getData(e).getRawDataItem(t);if(null!=i)return!Ob(i)||i instanceof Array?i:i.value},formatTooltip:N},Eb=function(){var t=0;return function(){var e="\0__ec_prop_getter_"+t++;return function(t){return t[e]||(t[e]={})}}}(),Rb=0,Vb="_",Bb=d,Gb=["left","right","top","bottom","width","height"],Wb=[["width","left","right"],["height","top","bottom"]],Hb=Yo,Fb=(v(Yo,"vertical"),v(Yo,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),Zb=Array.prototype.push,Ub=Lo.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Lo.call(this,t,e,i,n),this.uid=qo("componentModel")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,o=i?ea(t):{};n(t,e.getTheme().get(this.mainType)),n(t,this.getDefaultOption()),i&&ta(t,o,i)},mergeOption:function(t,e){n(this.option,t,!0);var i=this.layoutMode;i&&ta(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){if(!qi(this,"__defaultOption")){for(var t=[],e=this.constructor;e;){var i=e.prototype.defaultOption;i&&t.push(i),e=e.superClass}for(var o={},a=t.length-1;a>=0;a--)o=n(o,t[a],!0);Xi(this,"__defaultOption",o)}return ji(this,"__defaultOption")},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});tn(Ub,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,i){t=Yi(t),e[t.main]=i},t.determineSubType=function(i,n){var o=n.type;if(!o){var a=Yi(i).main;t.hasSubTypes(i)&&e[a]&&(o=e[a](n))}return o}}(Ub),function(t,e){function i(t){var i={},a=[];return d(t,function(r){var s=n(i,r),h=o(s.originalDeps=e(r),t);s.entryCount=h.length,0===s.entryCount&&a.push(r),d(h,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return d(t,function(t){l(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,o){function a(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var r=i(e),s=r.graph,l=r.noEntryList,h={};for(d(t,function(t){h[t]=!0});l.length;){var u=l.pop(),c=s[u],f=!!h[u];f&&(n.call(o,u,c.originalDeps.slice()),delete h[u]),d(c.successor,f?function(t){h[t]=!0,a(t)}:a)}d(h,function(){throw new Error("Circle dependency may exists")})}}}(Ub,function(t){var e=[];return d(Ub.getClassesByMainType(t),function(t){Zb.apply(e,t.prototype.dependencies||[])}),f(e,function(t){return Yi(t).main})}),u(Ub,Fb);var Xb="";"undefined"!=typeof navigator&&(Xb=navigator.platform||"");var jb={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textStyle:{fontFamily:Xb.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},qb={clearColorPalette:function(){Xi(this,"colorIdx",0),Xi(this,"colorNameMap",{})},getColorFromPalette:function(t,e){var i=ji(e=e||this,"colorIdx")||0,n=ji(e,"colorNameMap")||Xi(e,"colorNameMap",{});if(n.hasOwnProperty(t))return n[t];var o=this.get("color",!0)||[];if(o.length){var a=o[i];return t&&(n[t]=a),Xi(e,"colorIdx",(i+1)%o.length),a}}},Yb=d,$b=p,Kb=f,Jb=y,Qb=l,tw=b,ew="\0_ec_inner",iw=Lo.extend({constructor:iw,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Lo(i),this._optionManager=n},setOption:function(t,e){L(!(ew in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):oa.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&Yb(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,o=this._componentsMap,r=[];Yb(t,function(t,o){null!=t&&(Ub.hasClass(o)?r.push(o):e[o]=null==e[o]?i(t):n(e[o],t,!0))}),Ub.topologicalTravel(r,Ub.getAllClassMainTypes(),function(i,n){var r=Oo(t[i]),s=Vo(o.get(i),r);Bo(s),Yb(s,function(t,e){var n=t.option;tw(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=ra(i,n,t.exist))});var l=aa(o,n);e[i]=[],o.set(i,[]),Yb(s,function(t,n){var r=t.exist,s=t.option;if(L(tw(s)||r,"Empty component definition"),s){var h=Ub.getClass(i,t.keyInfo.subType,!0);if(r&&r instanceof h)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var u=a({dependentModels:l,componentIndex:n},t.keyInfo);a(r=new h(s,this,this,u),u),r.init(s,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(i)[n]=r,e[i][n]=r.option},this),"series"===i&&(this._seriesIndices=sa(o.get("series")))},this),this._seriesIndices=this._seriesIndices||[]},getOption:function(){var t=i(this.option);return Yb(t,function(e,i){if(Ub.hasClass(i)){for(var n=(e=Oo(e)).length-1;n>=0;n--)Go(e[n])&&e.splice(n,1);t[i]=e}}),delete t[ew],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var r;if(null!=i)Jb(i)||(i=[i]),r=$b(Kb(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=Jb(n);r=$b(a,function(t){return s&&Qb(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var l=Jb(o);r=$b(a,function(t){return l&&Qb(o,t.name)>=0||!l&&t.name===o})}else r=a.slice();return la(r,t)},findComponents:function(t){var e=t.query,i=t.mainType,n=function(t){var e=i+"Index",n=i+"Id",o=i+"Name";return!t||null==t[e]&&null==t[n]&&null==t[o]?null:{mainType:i,index:t[e],id:t[n],name:t[o]}}(e);return function(e){return t.filter?$b(e,t.filter):e}(la(n?this.queryComponents(n):this._componentsMap.get(i),t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){Yb(t,function(t,o){e.call(i,n,t,o)})});else if(_(t))Yb(n.get(t),e,i);else if(tw(t)){var o=this.findComponents(t);Yb(o,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return $b(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return $b(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},eachSeries:function(t,e){Yb(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){Yb(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){Yb(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)},this)},eachRawSeriesByType:function(t,e,i){return Yb(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return l(this._seriesIndices,t.componentIndex)<0},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=$b(this._componentsMap.get("series"),t,e);this._seriesIndices=sa(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=sa(t.get("series"));var e=[];t.each(function(t,i){e.push(i)}),Ub.topologicalTravel(e,Ub.getAllClassMainTypes(),function(e,i){Yb(t.get(e),function(t){t.restoreData()})})}});u(iw,qb);var nw=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],ow={};ua.prototype={constructor:ua,create:function(t,e){var i=[];d(ow,function(n,o){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){d(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ua.register=function(t,e){ow[t]=e},ua.get=function(t){return ow[t]};var aw=d,rw=i,sw=f,lw=n,hw=/^(min|max)?(.+)$/;ca.prototype={constructor:ca,setOption:function(t,e){t=rw(t,!0);var i=this._optionBackup,n=da.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(ma(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=sw(e.timelineOptions,rw),this._mediaList=sw(e.mediaList,rw),this._mediaDefault=rw(e.mediaDefault),this._currentMediaIndices=[],rw(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=rw(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s":"")+r.join(a?"
":", ")}(o):Gi(Vi(o)),r=n.getName(t),s=n.getItemVisual(t,"color");b(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color);var l=Fi(s=s||"transparent"),h=this.name;return"\0-"===h&&(h=""),h=h?Gi(h)+(e?": ":"
"):"",e?l+h+a:h+l+(r?Gi(r)+": "+a:a)},isAnimationEnabled:function(){if(Uv.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){Xi(this,"data",ji(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var i=this.ecModel,n=qb.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipData:null,getTooltipPosition:null});u(yw,Nb),u(yw,qb);var xw=function(){this.group=new jy,this.uid=qo("viewComponent")};xw.prototype={constructor:xw,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var _w=xw.prototype;_w.updateView=_w.updateLayout=_w.updateVisual=function(t,e,i,n){},Ki(xw),tn(xw,{registerWhenExtend:!0}),Ta.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Ca(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Ca(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var bw=Ta.prototype;bw.updateView=bw.updateLayout=bw.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},Ki(Ta),tn(Ta,{registerWhenExtend:!0});var ww="\0__throttleOriginMethod",Sw="\0__throttleRate",Mw="\0__throttleType",Iw=Math.PI,Tw=d,Aw=Ub.parseClassType,Cw={zrender:"3.7.3"},Dw=1e3,Lw=1e3,kw=3e3,Pw={PROCESSOR:{FILTER:Dw,STATISTIC:5e3},VISUAL:{LAYOUT:Lw,GLOBAL:2e3,CHART:kw,COMPONENT:4e3,BRUSH:5e3}},Ow="__flagInMainProcess",zw="__optionUpdated",Nw=/^[a-zA-Z0-9_]+$/;Oa.prototype.on=Pa("on"),Oa.prototype.off=Pa("off"),Oa.prototype.one=Pa("one"),u(Oa,fy);var Ew=za.prototype;Ew._onframe=function(){if(this[zw]){var t=this[zw].silent;this[Ow]=!0,Rw.prepareAndUpdate.call(this),this[Ow]=!1,this[zw]=!1,Va.call(this,t),Ba.call(this,t)}},Ew.getDom=function(){return this._dom},Ew.getZr=function(){return this._zr},Ew.setOption=function(t,e,i){var n;if(b(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[Ow]=!0,!this._model||e){var o=new ca(this._api),a=this._theme;(this._model=new iw(null,null,a,o)).init(null,null,a,o)}this._model.setOption(t,Hw),i?(this[zw]={silent:n},this[Ow]=!1):(Rw.prepareAndUpdate.call(this),this._zr.flush(),this[zw]=!1,this[Ow]=!1,Va.call(this,n),Ba.call(this,n))},Ew.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Ew.getModel=function(){return this._model},Ew.getOption=function(){return this._model&&this._model.getOption()},Ew.getWidth=function(){return this._zr.getWidth()},Ew.getHeight=function(){return this._zr.getHeight()},Ew.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Ew.getRenderedCanvas=function(t){if(Uv.canvasSupported){(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return d(e.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},Ew.getSvgDataUrl=function(){if(Uv.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToSvg()}},Ew.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;Tw(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Tw(n,function(t){t.group.ignore=!1}),a},Ew.getConnectedDataURL=function(t){if(Uv.canvasSupported){var e=this.group,n=Math.min,o=Math.max;if(qw[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,h=[],u=t&&t.pixelRatio||1;d(jw,function(u,c){if(u.group===e){var d=u.getRenderedCanvas(i(t)),f=u.getDom().getBoundingClientRect();a=n(f.left,a),r=n(f.top,r),s=o(f.right,s),l=o(f.bottom,l),h.push({dom:d,left:f.left,top:f.top})}});var c=(s*=u)-(a*=u),f=(l*=u)-(r*=u),g=iy();g.width=c,g.height=f;var p=yi(g);return Tw(h,function(t){var e=new qe({style:{x:t.left*u-a,y:t.top*u-r,image:t.dom}});p.add(e)}),p.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},Ew.convertToPixel=v(Na,"convertToPixel"),Ew.convertFromPixel=v(Na,"convertFromPixel"),Ew.containPixel=function(t,e){var i;return t=Fo(this._model,t),d(t,function(t,n){n.indexOf("Models")>=0&&d(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}},this)},this),!!i},Ew.getVisual=function(t,e){var i=(t=Fo(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},Ew.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Ew.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Rw={update:function(t){var e=this._model,i=this._api,n=this._coordSysMgr,o=this._zr;if(e){e.restoreData(),n.create(this._model,this._api),Ha.call(this,e,i),Fa.call(this,e),n.update(e,i),Ua.call(this,e,t),Xa.call(this,e,t);var a=e.get("backgroundColor")||"transparent",r=o.painter;if(r.isSingleCanvas&&r.isSingleCanvas())o.configLayer(0,{clearColor:a});else{if(!Uv.canvasSupported){var s=Mt(a);a=Ot(s,"rgb"),0===s[3]&&(a="transparent")}a.colorStops||a.image?(o.configLayer(0,{clearColor:a}),this.__hasGradientOrPatternBg=!0,this._dom.style.background="transparent"):(this.__hasGradientOrPatternBg&&o.configLayer(0,{clearColor:null}),this.__hasGradientOrPatternBg=!1,this._dom.style.background=a)}Tw(Fw,function(t){t(e,i)})}},updateView:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),Ua.call(this,e,t),Ga.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),Ua.call(this,e,t,!0),Ga.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(Za.call(this,e,t),Ga.call(this,"updateLayout",e,t))},prepareAndUpdate:function(t){var e=this._model;Wa.call(this,"component",e),Wa.call(this,"chart",e),Rw.update.call(this,t)}};Ew.resize=function(t){this[Ow]=!0,this._zr.resize(t);var e=this._model&&this._model.resetOption("media");Rw[e?"prepareAndUpdate":"update"].call(this),this._loadingFX&&this._loadingFX.resize(),this[Ow]=!1;var i=t&&t.silent;Va.call(this,i),Ba.call(this,i)},Ew.showLoading=function(t,e){if(b(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Xw[t]){var i=Xw[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},Ew.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},Ew.makeActionFromEvent=function(t){var e=a({},t);return e.type=Gw[t.type],e},Ew.dispatchAction=function(t,e){b(e)||(e={silent:!!e}),Bw[t.type]&&this._model&&(this[Ow]?this._pendingActions.push(t):(Ra.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&Uv.browser.weChat&&this._throttledZrFlush(),Va.call(this,e.silent),Ba.call(this,e.silent)))},Ew.on=Pa("on"),Ew.off=Pa("off"),Ew.one=Pa("one");var Vw=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];Ew._initEvents=function(){Tw(Vw,function(t){this._zr.on(t,function(e){var i,n=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var r=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=r&&r.getDataParams(o.dataIndex,o.dataType)||{}}else o&&o.eventData&&(i=a({},o.eventData));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),Tw(Gw,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Ew.isDisposed=function(){return this._disposed},Ew.clear=function(){this.setOption({series:[]},!0)},Ew.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;Tw(this._componentsViews,function(i){i.dispose(e,t)}),Tw(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete jw[this.id]}},u(za,fy);var Bw={},Gw={},Ww=[],Hw=[],Fw=[],Zw=[],Uw={},Xw={},jw={},qw={},Yw=new Date-0,$w=new Date-0,Kw="_echarts_instance_",Jw={},Qw=Ja;ar(2e3,function(t){t.eachRawSeries(function(e){var i=(e.visualColorAccessPath||"itemStyle.normal.color").split("."),n=e.getData(),o=e.get(i)||e.getColorFromPalette(e.get("name"));n.setVisual("color",o),t.isSeriesFiltered(e)||("function"!=typeof o||o instanceof yb||n.each(function(t){n.setItemVisual(t,"color",o(e.getDataParams(t)))}),n.each(function(t){var e=n.getItemModel(t).get(i,!0);null!=e&&n.setItemVisual(t,"color",e)}))})}),tr(vw),rr("default",function(t,e){r(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new db({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new mb({shape:{startAngle:-Iw/2,endAngle:-Iw/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new db({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*Iw/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Iw/2}).delay(300).start("circularInOut");var a=new jy;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var r=n.shape.r;o.setShape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a}),ir({type:"highlight",event:"highlight",update:"highlight"},N),ir({type:"downplay",event:"downplay",update:"downplay"},N);var tS={};fr.prototype={constructor:fr,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(gr(t,{},n,"_oldKeyGetter",this),gr(e,i,o,"_newKeyGetter",this),a=0;a0&&(_+="__ec__"+u[x]),u[x]++),_&&(h[v]=_)}this._nameList=e,this._idList=h},rS.count=function(){return this.indices.length},rS.get=function(t,e,i){var n=this._storage,o=this.indices[e];if(null==o||!n[t])return NaN;var a=n[t][o];if(i){var r=this._dimensionInfos[t];if(r&&r.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(a>=0&&l>0||a<=0&&l<0)&&(a+=l),s=s.stackedOn}}return a},rS.getValues=function(t,e,i){var n=[];y(t)||(i=e,e=t,t=this.dimensions);for(var o=0,a=t.length;ol&&(l=a));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},rS.getSum=function(t,e){var i=0;if(this._storage[t])for(var n=0,o=this.count();nt))return a;o=a-1}}return-1},rS.indicesOfNearest=function(t,e,i,n){var o=[];if(!this._storage[t])return o;null==n&&(n=1/0);for(var a=Number.MAX_VALUE,r=-1,s=0,l=this.count();s=0&&r<0)&&(a=u,r=h,o.length=0),o.push(s))}return o},rS.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},rS.getRawDataItem=function(t){return this._rawData.getItem(this.getRawIndex(t))},rS.getName=function(t){return this._nameList[this.indices[t]]||""},rS.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},rS.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var o=[],a=(t=f(vr(t),this.getDimension,this)).length,r=this.indices;n=n||this;for(var s=0;sf-g&&(c=f-g,h.length=c);for(var p=0;p=e[0]&&t<=e[1]},Ar.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Ar.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Ar.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Ar.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getDataExtent(e,!0))},Ar.prototype.getExtent=function(){return this._extent.slice()},Ar.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Ar.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;ie[1]&&(e[1]=t[1]),yS.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Dr(t)},getTicks:function(){return Pr(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;i>>1;t[o][1]i&&(a=i);var r=MS.length,s=wS(MS,a,0,r),l=MS[Math.min(s,r-1)],h=l[1];"year"===l[0]&&(h*=Ni(o/h/t,!0));var u=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(_S((n[0]-u)/h)*h+u),Math.round(bS((n[1]-u)/h)*h+u)];kr(c,n),this._stepLvl=l,this._interval=h,this._niceExtent=c},parse:function(t){return+Pi(t)}});d(["contain","normalize"],function(t){SS.prototype[t]=function(e){return xS[t].call(this,this.parse(e))}});var MS=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",36288e5],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];SS.create=function(t){return new SS({useUTC:t.ecModel.get("useUTC")})};var IS=Ar.prototype,TS=yS.prototype,AS=Ai,CS=Mi,DS=Math.floor,LS=Math.ceil,kS=Math.pow,PS=Math.log,OS=Ar.extend({type:"log",base:10,$constructor:function(){Ar.apply(this,arguments),this._originalScale=new yS},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return f(TS.getTicks.call(this),function(n){var o=Mi(kS(this.base,n));return o=n===e[0]&&t.__fixMin?Or(o,i[0]):o,o=n===e[1]&&t.__fixMax?Or(o,i[1]):o},this)},getLabel:TS.getLabel,scale:function(t){return t=IS.scale.call(this,t),kS(this.base,t)},setExtent:function(t,e){var i=this.base;t=PS(t)/PS(i),e=PS(e)/PS(i),TS.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=IS.getExtent.call(this);e[0]=kS(t,e[0]),e[1]=kS(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Or(e[0],n[0])),i.__fixMax&&(e[1]=Or(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=PS(t[0])/PS(e),t[1]=PS(t[1])/PS(e),IS.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getDataExtent(e,!0,function(t){return t>0}))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=Oi(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Mi(LS(e[0]/n)*n),Mi(DS(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){TS.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){OS.prototype[t]=function(e){return e=PS(e)/PS(this.base),IS[t].call(this,e)}}),OS.create=function(){return new OS};var zS={getFormattedLabels:function(){return Vr(this.axis,this.get("axisLabel.formatter"))},getCategories:function(){return"category"===this.get("type")&&f(this.get("data"),Gr)},getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!M(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!M(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:N,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},NS=Zn({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),ES=Zn({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),RS=Zn({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,h=Math.asin(s/r),u=Math.cos(h)*r,c=Math.sin(h),d=Math.cos(h),f=.6*r,g=.7*r;t.moveTo(i-u,l+s),t.arc(i,l,r,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*f,l+s+d*f,i,n-g,i,n),t.bezierCurveTo(i,n-g,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),VS=Zn({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),BS={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},GS={};d({line:fb,rect:db,roundRect:db,square:db,circle:nb,diamond:ES,pin:RS,arrow:VS,triangle:NS},function(t,e){GS[e]=new t});var WS=Zn({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,o=GS[n];"none"!==e.symbolType&&(o||(o=GS[n="rect"]),BS[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i))}}),HS=(Object.freeze||Object)({createList:function(t){return Sr(t.get("data"),t,t.ecModel)},createScale:function(t,e){var i=e;e instanceof Lo||u(i=new Lo(e),zS);var n=Er(i);return n.setExtent(t[0],t[1]),Nr(n,i),n},mixinAxisModelCommonMethods:function(t){u(t,zS)},completeDimensions:xr,createSymbol:Hr}),FS=wi,ZS=[0,1],US=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};US.prototype={constructor:US,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Ci(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&Fr(i=i.slice(),n.count()),FS(t,ZS,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Fr(i=i.slice(),n.count());var o=FS(t,i,ZS,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;n0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&d(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Xr(e.name,o,e.cp);return a.properties=e,a})},qS={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){qS[t]=ay[t]}),yw.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return Sr(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var YS=Jr.prototype;YS._createSymbol=function(t,e,i,n){this.removeAll();var o=Hr(t,-1,-1,2,2,e.getItemVisual(i,"color"));o.attr({z2:100,culling:!0,scale:Kr(n)}),o.drift=Qr,this._symbolType=t,this.add(o)},YS.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},YS.getSymbolPath=function(){return this.childAt(0)},YS.getScale=function(){return this.childAt(0).scale},YS.highlight=function(){this.childAt(0).trigger("emphasis")},YS.downplay=function(){this.childAt(0).trigger("normal")},YS.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},YS.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},YS.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=$r(t,e),r=n!==this._symbolType;if(r?this._createSymbol(n,t,e,a):((s=this.childAt(0)).silent=!1,wo(s,{scale:Kr(a)},o,e)),this._updateCommon(t,e,a,i),r){var s=this.childAt(0),l=i&&i.fadeIn,h={scale:s.scale.slice()};l&&(h.style={opacity:s.style.opacity}),s.scale=[0,0],l&&(s.style.opacity=0),So(s,h,o,e)}this._seriesModel=o};var $S=["itemStyle","normal"],KS=["itemStyle","emphasis"],JS=["label","normal"],QS=["label","emphasis"];YS._updateCommon=function(t,e,i,n){var o=this.childAt(0),r=t.hostModel,s=t.getItemVisual(e,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var l=n&&n.itemStyle,h=n&&n.hoverItemStyle,u=n&&n.symbolRotate,c=n&&n.symbolOffset,d=n&&n.labelModel,f=n&&n.hoverLabelModel,g=n&&n.hoverAnimation,p=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);l=m.getModel($S).getItemStyle(["color"]),h=m.getModel(KS).getItemStyle(),u=m.getShallow("symbolRotate"),c=m.getShallow("symbolOffset"),d=m.getModel(JS),f=m.getModel(QS),g=m.getShallow("hoverAnimation"),p=m.getShallow("cursor")}else h=a({},h);var v=o.style;o.attr("rotation",(u||0)*Math.PI/180||0),c&&o.attr("position",[Si(c[0],i[0]),Si(c[1],i[1])]),p&&o.attr("cursor",p),o.setColor(s,n&&n.symbolInnerColor),o.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(v.opacity=y);var x=n&&n.useNameLabel,_=!x&&Yr(t);(x||null!=_)&&co(v,h,d,f,{labelFetcher:r,labelDataIndex:e,defaultText:x?t.getName(e):t.get(_,e),isRectText:!0,autoColor:s}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=h,uo(o);var b=Kr(i);if(g&&r.isAnimationEnabled()){var w=function(){var t=b[1]/b[0];this.animateTo({scale:[Math.max(1.1*b[0],b[0]+3),Math.max(1.1*b[1],b[1]+3*t)]},400,"elasticOut")},S=function(){this.animateTo({scale:b},400,"elasticOut")};o.on("mouseover",w).on("mouseout",S).on("emphasis",w).on("normal",S)}},YS.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),wo(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},h(Jr,jy);var tM=ts.prototype;tM.updateData=function(t,e){var i=this.group,n=t.hostModel,o=this._data,a=this._symbolCtor,r={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis"),cursorStyle:n.get("cursor")};t.diff(o).add(function(n){var o=t.getItemLayout(n);if(es(t,n,e)){var s=new a(t,n,r);s.attr("position",o),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var h=o.getItemGraphicEl(l),u=t.getItemLayout(s);es(t,s,e)?(h?(h.updateData(t,s,r),wo(h,{position:u},n)):(h=new a(t,s)).attr("position",u),i.add(h),t.setItemGraphicEl(s,h)):i.remove(h)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},tM.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},tM.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll())};var eM=function(t,e,i,n,o,a){for(var r=os(t,e),s=[],l=[],h=[],u=[],c=[],d=[],f=[],g=a.dimensions,p=0;p0&&as(i[o-1]);o--);for(;n0&&as(i[a-1]);a--);for(;o=0){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new Jr(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Ta.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=Ho(o,n);if(null!=a&&a>=0){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else Ta.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new hM({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new uM({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];if(i&&i.isLabelIgnored)return m(i.isLabelIgnored,i)},_updateAnimation:function(t,e,i,n,o){var a=this._polyline,r=this._polygon,s=t.hostModel,l=eM(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;o&&(h=ms(l.current,i,o),u=ms(l.stackedOnCurrent,i,o),c=ms(l.next,i,o),d=ms(l.stackedOnNext,i,o)),a.shape.__points=l.current,a.shape.points=h,wo(a,{shape:{points:c}},s),r&&(r.setShape({points:h,stackedOnPoints:u}),wo(r,{shape:{points:c,stackedOnPoints:d}},s));for(var f=[],g=l.status,p=0;pe&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(mM,US);var vM={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},yM={};yM.categoryAxis=n({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},vM),yM.valueAxis=n({boundaryGap:[0,0],splitNumber:5},vM),yM.timeAxis=r({scale:!0,min:"dataMin",max:"dataMax"},yM.valueAxis),yM.logAxis=r({scale:!0,logBase:10},yM.valueAxis);var xM=["value","category","time","log"],_M=function(t,e,i,a){d(xM,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,o){var a=this.layoutMode,s=a?ea(e):{};n(e,o.getTheme().get(r+"Axis")),n(e,this.getDefaultOption()),e.type=i(t,e),a&&ta(e,s,a)},defaultOption:o([{},yM[r+"Axis"],a],!0)})}),Ub.registerSubTypeDefaulter(t+"Axis",v(i,t))},bM=Ub.extend({type:"cartesian2dAxis",axis:null,init:function(){bM.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){bM.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){bM.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});n(bM.prototype,zS);var wM={offset:0};_M("x",bM,_s,wM),_M("y",bM,_s,wM),Ub.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var SM=d,MM=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},IM=Nr,TM=Ms.prototype;TM.type="grid",TM.axisPointerEnabled=!0,TM.getRect=function(){return this._rect},TM.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),SM(i.x,function(t){IM(t.scale,t.model)}),SM(i.y,function(t){IM(t.scale,t.model)}),SM(i.x,function(t){Is(i,"y",t)}),SM(i.y,function(t){Is(i,"x",t)}),this.resize(this.model,e)},TM.resize=function(t,e,i){function n(){SM(a,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),As(t,e?o.x:o.y)})}var o=Ko(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;n(),!i&&t.get("containLabel")&&(SM(a,function(t){if(!t.model.get("axisLabel.inside")){var e=Ss(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},TM.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},TM.getAxes=function(){return this._axesList.slice()},TM.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}b(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;nh[1]?-1:1,c=["start"===o?h[0]-u*l:"end"===o?h[1]+u*l:(h[0]+h[1])/2,Es(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*CM/180);var f;Es(o)?n=kM(t.rotation,null!=d?d:t.rotation,r):(n=ks(t,o,d||0,h),null!=(f=t.axisNameAvailableWidth)&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var g=s.getFont(),p=e.get("nameTruncate",!0)||{},m=p.ellipsis,v=I(t.nameTruncateMaxWidth,p.maxWidth,f),y=null!=m&&null!=v?Zx(i,v,g,m,{minChar:2,placeholder:p.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,b={componentType:_,name:i,$vars:["name"]};b[_+"Index"]=e.componentIndex;var w=new ib({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:Ps(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:b},x):null});fo(w.style,s,{text:y,textFont:g,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=Ls(e),w.eventData.targetType="axisName",w.eventData.name=i),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},kM=DM.innerTextLayout=function(t,e,i){var n,o,a=Li(e-t);return ki(a)?(o=i>0?"top":"bottom",n="center"):ki(a-CM)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&a0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},PM=DM.ifIgnoreOnTick=function(t,e,i,n,o,a){if(0===e&&o||e===n-1&&a)return!1;var r,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?(r=s.getTicks()[e],!i(r,s.getLabel(r))):e%(i+1))},OM=DM.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i},zM=d,NM=v,EM=lr({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Us(t),EM.superApply(this,"render",arguments),$s(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,o){$s(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),EM.superApply(this,"remove",arguments)},dispose:function(t,e){Ks(this,e),EM.superApply(this,"dispose",arguments)}}),RM=[];EM.registerAxisPointerClass=function(t,e){RM[t]=e},EM.getAxisPointerClass=function(t){return t&&RM[t]};var VM=DM.ifIgnoreOnTick,BM=DM.getInterval,GM=["axisLine","axisTickLabel","axisName"],WM=["splitArea","splitLine"],HM=EM.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new jy,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),r=Js(a,t),s=new DM(t,r);d(GM,s.add,s),this._axisGroup.add(s.getGroup()),d(WM,function(e){t.get(e+".show")&&this["_"+e](t,a,r.labelInterval)},this),Ao(o,this._axisGroup,t),HM.superCall(this,"render",t,e,i,n)}},_splitLine:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var o=t.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color"),l=BM(o,i);s=y(s)?s:[s];for(var h=e.coordinateSystem.getRect(),u=n.isHorizontal(),c=0,d=n.getTicksCoords(),f=n.scale.getTicks(),g=t.get("axisLabel.showMinLabel"),p=t.get("axisLabel.showMaxLabel"),m=[],v=[],x=a.getLineStyle(),_=0;_1){var h;"string"==typeof i?h=fM[i]:"function"==typeof i&&(h=i),h&&(e=e.downSample(a.dim,1/l,h,gM),t.setData(e))}}},this)},"line"));var FM="__ec_stack_";nl.getLayoutOnAxis=function(t,e){var i=[],n=t.axis;if("category"===n.type){for(var o=n.getBandWidth(),a=0;a0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};or(v(nl,"bar")),ar(function(t){t.eachSeriesByType("bar",function(t){t.getData().setVisual("legendSymbol","roundRect")})});var $M={updateSelectedMap:function(t){this._targetList=t.slice(),this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},z())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},KM=hr({type:"series.pie",init:function(t){KM.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){KM.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=xr(["value"],t.data),n=new aS(i,this);return n.initData(t.data),n},getDataParams:function(t){var e=this.getData(),i=KM.superCall(this,"getDataParams",t),n=[];return e.each("value",function(t){n.push(t)}),i.percent=Di(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){zo(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationType:"expansion",animationEasing:"cubicOut",data:[]}});u(KM,$M);var JM=dl.prototype;JM.updateData=function(t,e,i){function n(){s.stopAnimation(!0),s.animateTo({shape:{r:u.r+l.get("hoverOffset")}},300,"elasticOut")}function o(){s.stopAnimation(!0),s.animateTo({shape:{r:u.r}},300,"elasticOut")}var s=this.childAt(0),l=t.hostModel,h=t.getItemModel(e),u=t.getItemLayout(e),c=a({},u);c.label=null,i?(s.setShape(c),"scale"===l.getShallow("animationType")?(s.shape.r=u.r0,So(s,{shape:{r:u.r}},l,e)):(s.shape.endAngle=u.startAngle,wo(s,{shape:{endAngle:u.endAngle}},l,e))):wo(s,{shape:c},l,e);var d=h.getModel("itemStyle"),f=t.getItemVisual(e,"color");s.useStyle(r({lineJoin:"bevel",fill:f},d.getModel("normal").getItemStyle())),s.hoverStyle=d.getModel("emphasis").getItemStyle();var g=h.getShallow("cursor");g&&s.attr("cursor",g),cl(this,t.getItemLayout(e),h.get("selected"),l.get("selectedOffset"),l.get("animation")),s.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoverAnimation")&&l.isAnimationEnabled()&&s.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),uo(this)},JM._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");wo(i,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),wo(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label.normal"),h=a.getModel("label.emphasis"),u=a.getModel("labelLine.normal"),c=a.getModel("labelLine.emphasis"),s=t.getItemVisual(e,"color");co(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=u.get("smooth");d&&!0===d&&(d=.4),i.setShape({smooth:d})},h(dl,jy);Ta.extend({type:"pie",init:function(){var t=new jy;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,h=t.get("animationType"),u=v(ul,this.uid,t,s,i),c=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new dl(o,t);l&&"scale"!==h&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",u),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=a.getItemGraphicEl(e);i.updateData(o,t),i.off("click"),c&&i.on("click",u),r.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&l&&o.count()>0&&"scale"!==h){var d=o.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,g=m(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,g,t))}this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r){var s=new rb({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return So(s,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var QM=function(t,e){d(e,function(e){e.update="updateView",ir(e,function(i,n){var o={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);o[i]=t.isSelected(i)||!1})}),{name:i.name,selected:o}})})},tI=function(t,e){var i={};e.eachRawSeriesByType(t,function(t){var n=t.getRawData(),o={};if(!e.isSeriesFiltered(t)){var a=t.getData();a.each(function(t){var e=a.getRawIndex(t);o[e]=t}),n.each(function(e){var r=o[e],s=null!=r&&a.getItemVisual(r,"color",!0);if(s)n.setItemVisual(e,"color",s);else{var l=n.getItemModel(e).get("itemStyle.normal.color")||t.getColorFromPalette(n.getName(e),i);n.setItemVisual(e,"color",l),null!=r&&a.setItemVisual(r,"color",l)}})}})},eI=function(t,e,i,n){var o,a,r=t.getData(),s=[],l=!1;r.each(function(i){var n,h,u,c,d=r.getItemLayout(i),f=r.getItemModel(i),g=f.getModel("label.normal"),p=g.get("position")||f.get("label.emphasis.position"),m=f.getModel("labelLine.normal"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),b=Math.sin(x);o=d.cx,a=d.cy;var w="inside"===p||"inner"===p;if("center"===p)n=d.cx,h=d.cy,c="center";else{var S=(w?(d.r+d.r0)/2*_:d.r*_)+o,M=(w?(d.r+d.r0)/2*b:d.r*b)+a;if(n=S+3*_,h=M+3*b,!w){var I=S+_*(v+e-d.r),T=M+b*(v+e-d.r),A=I+(_<0?-1:1)*y,C=T;n=A+(_<0?-5:5),h=C,u=[[S,M],[I,T],[A,C]]}c=w?"center":_>0?"left":"right"}var D=g.getFont(),L=g.get("rotate")?_<0?-x+Math.PI:-x:0,k=de(t.getFormattedLabel(i,"normal")||r.getName(i),D,c,"top");l=!!L,d.label={x:n,y:h,position:p,height:k.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:L,inside:w},w||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&gl(s,o,a,e,i,n)},iI=2*Math.PI,nI=Math.PI/180,oI=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),o=0;o=0;a--){var r=n[a],s=o[a],l=r[0]-s[0]/2,h=r[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return a}return-1}}),rI=pl.prototype;rI.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray(function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i})}),e.symbolProxy=Hr(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i)}),this.group.add(e)},rI.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},rI.remove=function(){this.group.removeAll()},ur({type:"scatter",init:function(){this._normalSymbolDraw=new ts,this._largeSymbolDraw=new pl},render:function(t,e,i){var n=t.getData(),o=this._largeSymbolDraw,a=this._normalSymbolDraw,r=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?o:a;this._symbolDraw=s,s.updateData(n),r.add(s.group),r.remove(s===o?a.group:o.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)},dispose:function(){}}),ar(v(cM,"scatter","circle",null)),or(v(dM,"scatter")),h(ml,US),vl.prototype.getIndicatorAxes=function(){return this._indicatorAxes},vl.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},vl.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},vl.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;ln[0]&&isFinite(c)&&isFinite(n[0]))}else{r.getTicks().length-1>a&&(h=i(h));var d=Math.round((n[0]+n[1])/2/h)*h,f=Math.round(a/2);r.setExtent(Mi(d-f*h),Mi(d+(a-f)*h)),r.setInterval(h)}})},vl.dimensions=[],vl.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var o=new vl(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},ua.register("radar",vl);var sI=yM.valueAxis,lI=(sr({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),o=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),h=this.get("axisLabel"),u=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),g=this.get("nameGap"),p=this.get("triggerEvent"),m=f(this.get("indicator")||[],function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var m=u;if(null!=f.color&&(m=r({color:f.color},u)),f=n(i(f),{boundaryGap:t,splitNumber:e,scale:o,axisLine:s,axisTick:l,axisLabel:h,name:f.text,nameLocation:"end",nameGap:g,nameTextStyle:m,triggerEvent:p},!1),c||(f.name=""),"string"==typeof d){var v=f.name;f.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(f.name=d(f.name,f));var y=a(new Lo(f,null,this.ecModel),zS);return y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this.getIndicatorModels=function(){return m}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:n({lineStyle:{color:"#bbb"}},sI.axisLine),axisLabel:yl(sI.axisLabel,!1),axisTick:yl(sI.axisTick,!1),splitLine:yl(sI.splitLine,!0),splitArea:yl(sI.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);lr({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;d(f(e.getIndicatorAxes(),function(t){return new DM(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){d(lI,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var o=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),h=s.getModel("areaStyle"),u=a.get("show"),c=s.get("show"),g=l.get("color"),p=h.get("color");g=y(g)?g:[g],p=y(p)?p:[p];var m=[],v=[];if("circle"===o)for(var x=n[0].getTicksCoords(),_=i.cx,b=i.cy,w=0;w"+f(i,function(t,i){return Gi(t.name+" : "+e[i])}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptyCircle",symbolSize:4}});ur({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=xl(t.getItemVisual(e,"symbolSize")),a=Hr(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeAll();for(var l=0;l"+Gi(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{areaColor:"rgba(255,215,0,0.8)"}}}});u(_I,$M);var bI="\0_ec_interaction_mutex";ir({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),u(kl,fy);var wI={axisPointer:1,tooltip:1,brush:1};Ul.prototype={constructor:Ul,draw:function(t,e,i,n,o){var a="geo"===t.mainType,r=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childAt(0)||o?l.attr(u):wo(l,u,t),l.removeAll();var c=["itemStyle","normal"],f=["itemStyle","emphasis"],g=["label","normal"],p=["label","emphasis"],m=z();d(s.regions,function(e){var i=m.get(e.name)||m.set(e.name,new jy),n=new vb({shape:{paths:[]}});i.add(n);var o,s=(D=t.getRegionModel(e.name)||t).getModel(c),u=D.getModel(f),v=Hl(s),y=Hl(u),x=D.getModel(g),_=D.getModel(p);if(r){o=r.indexOfName(e.name);var b=r.getItemVisual(o,"color",!0);b&&(v.fill=b)}d(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new ub({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new ub({shape:{points:t.interiors[e]}}))}}),n.setStyle(v),n.style.strokeNoScale=!0,n.culling=!0;var w=x.get("show"),S=_.get("show"),M=r&&isNaN(r.get("value",o)),I=r&&r.getItemLayout(o);if(a||M&&(w||S)||I&&I.showLabel){var T,A=a?e.name:o;(!r||o>=0)&&(T=t);var C=new ib({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});co(C.style,C.hoverStyle={},x,_,{labelFetcher:T,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(C)}if(r)r.setItemGraphicEl(o,i);else{var D=t.getRegionModel(e.name);n.eventData={componentType:"geo",geoIndex:t.componentIndex,name:e.name,region:D&&D.option||{}}}(i.__regions||(i.__regions=[])).push(e),uo(i,y,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)}),this._updateController(t,e,i),Fl(this,t,l,i,n),Zl(t,l)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var o=t.coordinateSystem,r=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=o.getZoom(),r.enable(t.get("roam")||!1);var l=t.mainType;r.off("pan").on("pan",function(t,e){this._mouseDownFlag=!1,Bl(s,t,e),i.dispatchAction(a(n(),{dx:t,dy:e}))},this),r.off("zoom").on("zoom",function(t,e,o){if(this._mouseDownFlag=!1,Gl(s,t,e,o),i.dispatchAction(a(n(),{zoom:t,originX:e,originY:o})),this._updateGroup){var r=this.group,l=r.scale;r.traverse(function(t){"text"===t.type&&t.attr("scale",[1/l[0],1/l[1]])})}},this),r.setPointerChecker(function(e,n,a){return o.getViewRectAfterRoam().contain(n,a)&&!Wl(e,i,t)})}},ur({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new Ul(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,o=this.group;n.each("value",function(e,i){if(!isNaN(e)){var a=n.getItemLayout(i);if(a&&a.point){var r=a.point,s=a.offset,l=new nb({style:{fill:t.getData().getVisual("color")},shape:{cx:r[0]+9*s,cy:r[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainSeries.getData(),u=n.getName(i),c=h.indexOfName(u),d=n.getItemModel(i),f=d.getModel("label.normal"),g=d.getModel("label.emphasis"),p=h.getItemGraphicEl(c),m=T(t.getFormattedLabel(i,"normal"),u),v=T(t.getFormattedLabel(i,"emphasis"),m),y=function(){var t=fo({},g,{text:g.get("show")?v:null},{isRectText:!0,useInsideStyle:!1},!0);l.style.extendFrom(t),l.__mapOriginalZ2=l.z2,l.z2+=1},x=function(){fo(l.style,f,{text:f.get("show")?m:null,textPosition:f.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=l.__mapOriginalZ2&&(l.z2=l.__mapOriginalZ2,l.__mapOriginalZ2=null)};p.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}o.add(l)}}})}}),ir({type:"geoRoam",event:"geoRoam",update:"updateLayout"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=Xl(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&d(e.seriesGroup,function(t){t.setCenter(o.center),t.setZoom(o.zoom)})}})});or(function(t){var e={};t.eachSeriesByType("map",function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var o={};d(i.seriesGroup,function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each("value",function(t,e){var a=n.getName(e),r=i.getRegion(a);if(r&&!isNaN(t)){var s=o[a]||0,l=i.dataToPoint(r.center);o[a]=s+1,n.setItemLayout(e,{point:l,offset:s})}})});var a=i.getData();a.each(function(t){var e=a.getName(t),i=a.getItemLayout(t)||{};i.showLabel=!o[e],a.setItemLayout(t,i)}),e[n]=!0}})}),ar(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle.normal"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})})}),er(Pw.PROCESSOR.STATISTIC,function(t){var e={};t.eachSeriesByType("map",function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),d(e,function(t,e){for(var i=jl(f(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;ne&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(o||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)}},ih.prototype={constructor:ih,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;ia&&(a=t.depth)});var r=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return Gi(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",orient:"horizontal",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{normal:{color:"#ccc",width:1.5,curveness:.5}},itemStyle:{normal:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5}},label:{normal:{show:!0,color:"#555"}},leaves:{label:{normal:{show:!0}}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),ur({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new jy,this.group.add(this._mainGroup)},render:function(t,e,i,n){var o=t.getData(),a=t.layoutInfo,r=this._mainGroup,s=t.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]);var l=this._data,h={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.get("orient"),curvature:t.get("lineStyle.normal.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(e){vh(o,e)&&xh(o,e,null,r,t,h)}).update(function(e,i){var n=l.getItemGraphicEl(i);vh(o,e)?xh(o,e,n,r,t,h):n&&_h(o,e,n,r,t,h)}).remove(function(e){var i=l.getItemGraphicEl(e);_h(o,e,i,r,t,h)}).execute(),!0===h.expandAndCollapse&&o.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=o},dispose:function(){},remove:function(){this._mainGroup.removeAll(),this._data=null}}),ir({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand})});var AI=function(t,e){var i=hh(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;"radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,r=sh(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,r=sh());var s=t.getData().tree.root,l=s.children[0];oh(s),wh(l,ah,r),s.hierNode.modifier=-l.hierNode.prelim,Sh(l,rh);var h=l,u=l,c=l;Sh(l,function(t){var e=t.getLayout().x;eu.getLayout().x&&(u=t),t.depth>c.depth&&(c=t)});var d=h===u?1:r(h,u)/2,f=d-h.getLayout().x,g=0,p=0,m=0,v=0;"radial"===n?(g=o/(u.getLayout().x+d+f),p=a/(c.depth-1||1),Sh(l,function(t){m=(t.getLayout().x+f)*g,v=(t.depth-1)*p;var e=lh(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)})):"horizontal"===t.get("orient")?(p=a/(u.getLayout().x+d+f),g=o/(c.depth-1||1),Sh(l,function(t){v=(t.getLayout().x+f)*p,m=(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})):(g=o/(u.getLayout().x+d+f),p=a/(c.depth-1||1),Sh(l,function(t){m=(t.getLayout().x+f)*g,v=(t.depth-1)*p,t.setLayout({x:m,y:v},!0)}))};ar(v(cM,"tree","circle",null)),or(function(t,e){t.eachSeriesByType("tree",function(t){AI(t,e)})}),or(function(t,e){t.eachSeriesByType("tree",function(t){AI(t,e)})}),yw.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{normal:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}}},label:{normal:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0}},upperLabel:{normal:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},emphasis:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},itemStyle:{normal:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};Ch(i);var n=t.levels||[];n=t.levels=Dh(n,e);var o={};return o.levels=n,ih.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=Vi(y(i)?i[0]:i);return Gi(e.getName(t)+": "+n)},getDataParams:function(t){var e=yw.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Ah(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},a(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=z(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var CI=5;Lh.prototype={constructor:Lh,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle.normal"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),Jo(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a=0,s=e.emptyItemWidth,l=t.get("breadcrumb.height"),h=$o(e.pos,e.box),u=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],g=f.node,p=f.width,m=f.text;u>h.width&&(u-=p-s,p=s,m=null);var y=new ub({shape:{points:kh(a,0,p,l,d===c.length-1,0===d)},style:r(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:v(o,g)});this.group.add(y),Ph(y,t,g),a+=p+8}},remove:function(){this.group.removeAll()}};var DI=m,LI=jy,kI=db,PI=d,OI=["label","normal"],zI=["label","emphasis"],NI=["upperLabel","normal"],EI=["upperLabel","emphasis"],RI=10,VI=1,BI=2,GI=$x([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),WI=function(t){var e=GI(t);return e.stroke=e.fill=e.lineWidth=null,e};ur({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(l(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Mh(n,t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,h=this._storage,u="treemapRootToNode"===a&&o&&h?{rootNodeGroup:h.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(r),d=this._doRender(c,t,u);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?d.renderFinally():this._doAnimation(c,d,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new LI,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,h=null!=s?e[s]:null,c=u(l,h,i,a);c&&n(l&&l.viewChildren||[],h&&h.viewChildren||[],c,o,a+1)}o?(e=t,PI(t,function(t,e){!t.isRemoved()&&s(e,e)})):new fr(e,t,r,r).add(s).update(s).remove(v(s,null)).execute()}var o=e.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},s={nodeGroup:[],background:[],content:[]},l=this._storage,h=[],u=v(zh,e,s,l,i,r,h);n(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&PI(t,function(t,i){var n=e[i];PI(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}(l);return this._oldTree=o,this._storage=s,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){PI(c,function(t){PI(t,function(t){t.parent&&t.parent.remove(t)})}),PI(h,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationDurationUpdate"),r=i.get("animationEasing"),s=Oh();PI(e.willDeleteEls,function(t,e){PI(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drillDown"===n.direction)a=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var h=0,u=0;l.__tmWillDelete||(h=l.__tmNodeWidth/2,u=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[h,u],style:{opacity:0}}:{shape:{x:h,y:u,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,o,r)}})}),PI(this._storage,function(t,i){PI(t,function(t,n){var l=e.lastsForAnimation[i][n],h={};l&&("nodeGroup"===i?l.old&&(h.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(h.shape=a({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),h.style={opacity:1}):1!==t.style.opacity&&(h.style={opacity:1})),s.add(t,h,o,r))})},this),this._state="animating",s.done(DI(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new kl(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",DI(this._onPan,this)),e.on("zoom",DI(this._onZoom,this)));var i=new jt(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t,e){if("animating"!==this._state&&(Math.abs(t)>3||Math.abs(e)>3)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onZoom:function(t,e,i){if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new jt(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=ot();lt(s,s,[-e,-i]),ut(s,s,[t,t]),lt(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Lh(this.group))).render(t,e,i.node,DI(function(e){"animating"!==this._state&&(Th(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(n){var o=this._storage.background[n.getRawIndex()];if(o){var a=o.transformCoordToLocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}},this),i}});for(var HI=["treemapZoomToNode","treemapRender","treemapMove"],FI=0;FI=0&&t.call(e,i[o],o)},sT.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},sT.breadthFirstTraverse=function(t,e,i,n){if(e instanceof gu||(e=this._nodesMap[fu(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a=0&&i.node2.dataIndex>=0});for(var o=0,a=n.length;o=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};u(gu,lT("hostGraph","data")),u(pu,lT("hostGraph","edgeData")),rT.Node=gu,rT.Edge=pu;var hT=function(t,e,i,n,o){for(var a=new rT(n),r=0;r "+d)),h++)}var f,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)f=Sr(t,i,i.ecModel);else{var p=ua.get(g),m=xr((p&&"view"!==p.type?p.dimensions||[]:[]).concat(["value"]),t);(f=new aS(m,i)).initData(t)}var v=new aS(["value"],i);return v.initData(l,s),o&&o(f,v),ql({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},uT=hr({type:"series.graph",init:function(t){uT.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){uT.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){uT.superApply(this,"mergeDefaultAndTheme",arguments),zo(t.edgeLabel,["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return hT(n,i,this,!0,function(t,i){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?r:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var a=o.getModel("edgeLabel"),r=new Lo({label:a.option},a.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Gi(l.join(" > ")),o.value&&(l+=" : "+Gi(o.value)),l}return uT.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=f(this.option.categories||[],function(t){return null!=t.value?t:a({value:0},t)}),e=new aS(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return uT.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{normal:{position:"middle"},emphasis:{}},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{normal:{show:!1,formatter:"{b}"},emphasis:{show:!0}},itemStyle:{normal:{},emphasis:{}},lineStyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}}),cT=fb.prototype,dT=pb.prototype,fT=Zn({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(mu(e)?cT:dT).buildPath(t,e)},pointAt:function(t){return mu(this.shape)?cT.pointAt.call(this,t):dT.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=mu(e)?[e.x2-e.x1,e.y2-e.y1]:dT.tangentAt.call(this,t);return X(i,i)}}),gT=["fromSymbol","toSymbol"],pT=bu.prototype;pT.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var o=1,a=this.parent;a;)a.scale&&(o/=a.scale[0]),a=a.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),h=r.pointAt(s),u=H([],h,l);if(X(u,u),e&&(e.attr("position",l),c=r.tangentAt(0),e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])),i){i.attr("position",h);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",h);var d,f,g,p=5*o;if("end"===n.__position)d=[u[0]*p+h[0],u[1]*p+h[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",g=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentAt(m))[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*p,y[1]+v[1]*p],f="center",g="bottom";var x=-Math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",g=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||f},position:d,scale:[o,o]})}}}},pT._createLine=function(t,e,i){var n=t.hostModel,o=xu(t.getItemLayout(e));o.shape.percent=0,So(o,{shape:{percent:1}},n,e),this.add(o);var a=new ib({name:"label"});this.add(a),d(gT,function(i){var n=yu(i,t,e);this.add(n),this[vu(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},pT.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),r={shape:{}};_u(r.shape,a),wo(o,r,n,e),d(gT,function(i){var n=t.getItemVisual(e,i),o=vu(i);if(this[o]!==n){this.remove(this.childOfName(i));var a=yu(i,t,e);this.add(a)}this[o]=n},this),this._updateCommonStl(t,e,i)},pT._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,s=i&&i.hoverLineStyle,l=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);a=u.getModel("lineStyle.normal").getLineStyle(),s=u.getModel("lineStyle.emphasis").getLineStyle(),l=u.getModel("label.normal"),h=u.getModel("label.emphasis")}var c=t.getItemVisual(e,"color"),f=A(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(r({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},a)),o.hoverStyle=s,d(gT,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var g,p,m,v,y=l.getShallow("show"),x=h.getShallow("show"),_=this.childOfName("label");if(y||x){var b=n.getRawValue(e);p=null==b?p=t.getName(e):isFinite(b)?Mi(b):b,g=c||"#000",m=T(n.getFormattedLabel(e,"normal",t.dataType),p),v=T(n.getFormattedLabel(e,"emphasis",t.dataType),m)}if(y){var w=fo(_.style,l,{text:m},{autoColor:g});_.__textAlign=w.textAlign,_.__verticalAlign=w.textVerticalAlign,_.__position=l.get("position")||"middle"}else _.setStyle("text",null);_.hoverStyle=x?{text:v,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},_.ignore=!y&&!x,uo(this)},pT.highlight=function(){this.trigger("emphasis")},pT.downplay=function(){this.trigger("normal")},pT.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},pT.setLinePoints=function(t){var e=this.childOfName("line");_u(e.shape,t),e.dirty()},h(bu,jy);var mT=Mu.prototype;mT.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,o=t.hostModel,a={lineStyle:o.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:o.getModel("lineStyle.emphasis").getLineStyle(),labelModel:o.getModel("label.normal"),hoverLabelModel:o.getModel("label.emphasis")};t.diff(e).add(function(e){if(Su(t.getItemLayout(e))){var o=new n(t,e,a);t.setItemGraphicEl(e,o),i.add(o)}}).update(function(o,r){var s=e.getItemGraphicEl(r);Su(t.getItemLayout(o))?(s?s.updateData(t,o,a):s=new n(t,o,a),t.setItemGraphicEl(o,s),i.add(s)):i.remove(s)}).remove(function(t){i.remove(e.getItemGraphicEl(t))}).execute(),this._lineData=t},mT.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},mT.remove=function(){this.group.removeAll()};var vT=[],yT=[],xT=[],_T=un,bT=uy,wT=Math.abs,ST=function(t,e){function i(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}var n=[],o=gn,a=[[],[],[]],r=[[],[]],s=[];e/=2,t.eachEdge(function(t,l){var h=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");h.__original||(h.__original=[V(h[0]),V(h[1])],h[2]&&h.__original.push(V(h[2])));var d=h.__original;if(null!=h[2]){if(R(a[0],d[0]),R(a[1],d[2]),R(a[2],d[1]),u&&"none"!=u){var f=i(t.node1),g=Iu(a,d[0],f*e);o(a[0][0],a[1][0],a[2][0],g,n),a[0][0]=n[3],a[1][0]=n[4],o(a[0][1],a[1][1],a[2][1],g,n),a[0][1]=n[3],a[1][1]=n[4]}if(c&&"none"!=c){var f=i(t.node2),g=Iu(a,d[1],f*e);o(a[0][0],a[1][0],a[2][0],g,n),a[1][0]=n[1],a[2][0]=n[2],o(a[0][1],a[1][1],a[2][1],g,n),a[1][1]=n[1],a[2][1]=n[2]}R(h[0],a[0]),R(h[1],a[2]),R(h[2],a[1])}else{if(R(r[0],d[0]),R(r[1],d[1]),H(s,r[1],r[0]),X(s,s),u&&"none"!=u){f=i(t.node1);W(r[0],r[0],s,f*e)}if(c&&"none"!=c){f=i(t.node2);W(r[1],r[1],s,-f*e)}R(h[0],r[0]),R(h[1],r[1])}})},MT=["itemStyle","normal","opacity"],IT=["lineStyle","normal","opacity"];ur({type:"graph",init:function(t,e){var i=new ts,n=new Mu,o=this.group;this._controller=new kl(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var o=this._symbolDraw,a=this._lineDraw,r=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstRender?r.attr(s):wo(r,s,t)}ST(t.getGraph(),this._getNodeGlobalScale(t));var l=t.getData();o.updateData(l);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var u=t.forceLayout,c=t.get("force.layoutAnimation");u&&this._startForceLayoutIteration(u,c),l.eachItemGraphicEl(function(e,n){var o=l.getItemModel(n);e.off("drag").off("dragend");var a=l.getItemModel(n).get("draggable");a&&e.on("drag",function(){u&&(u.warmUp(),!this._layouting&&this._startForceLayoutIteration(u,c),u.setFixed(n),l.setItemLayout(n,e.position))},this).on("dragend",function(){u&&u.setUnfixed(n)},this),e.setDraggable(a&&u),e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),o.get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))},this),l.graph.eachEdge(function(e){var n=e.getGraphicEl();n.off("mouseover",n.__focusNodeAdjacency),n.off("mouseout",n.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))});var d="circular"===t.get("layout")&&t.get("circular.rotateLabel"),f=l.getLayout("cx"),g=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var i=t.getSymbolPath();if(d){var n=l.getItemLayout(e),o=Math.atan2(n[1]-g,n[0]-f);o<0&&(o=2*Math.PI+o);var a=n[0]=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}}),CT=2*Math.PI,DT=(Ta.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=Nu(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,u=(h-l)%CT,c=l,d=r.get("width"),f=0;f=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(p.get("show")&&T!==v){for(var O=0;O<=y;O++){var A=Math.cos(b),C=Math.sin(b),z=new fb({shape:{x1:A*c+h,y1:C*c+u,x2:A*(c-_)+h,y2:C*(c-_)+u},silent:!0,style:I});"auto"===I.stroke&&z.setStyle({stroke:n((T+O/y)/v)}),l.add(z),b+=S}b-=S}else b+=w}},_renderPointer:function(t,e,i,n,o,a,r,s){var l=this.group,h=this._data;if(t.get("pointer.show")){var u=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getData();d.diff(h).add(function(e){var i=new AT({shape:{angle:a}});So(i,{shape:{angle:wi(d.get("value",e),u,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)}).update(function(e,i){var n=h.getItemGraphicEl(i);wo(n,{shape:{angle:wi(d.get("value",e),u,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)}).remove(function(t){var e=h.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),a=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:Si(a.get("width"),o.r),r:Si(a.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(wi(d.get("value",e),u,[0,1],!0))),uo(t,i.getModel("itemStyle.emphasis").getItemStyle())}),this._data=d}else h&&h.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getModel("title");if(a.get("show")){var r=a.get("offsetCenter"),s=o.cx+Si(r[0],o.r),l=o.cy+Si(r[1],o.r),h=+t.get("min"),u=+t.get("max"),c=n(wi(t.getData().get("value",0),[h,u],[0,1],!0));this.group.add(new ib({silent:!0,style:fo({},a,{x:s,y:l,text:t.getData().getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:c,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),h=o.cx+Si(l[0],o.r),u=o.cy+Si(l[1],o.r),c=Si(a.get("width"),o.r),d=Si(a.get("height"),o.r),f=t.getData().get("value",0),g=n(wi(f,[r,s],[0,1],!0));this.group.add(new ib({silent:!0,style:fo({},a,{x:h,y:u,text:Eu(f,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),hr({type:"series.funnel",init:function(t){DT.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){var i=xr(["value"],t.data),n=new aS(i,this);return n.initData(t.data),n},_defaultLabelLine:function(t){zo(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},getDataParams:function(t){var e=this.getData(),i=DT.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{normal:{show:!0,position:"outer"},emphasis:{show:!0}},labelLine:{normal:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},emphasis:{}},itemStyle:{normal:{borderColor:"#fff",borderWidth:1},emphasis:{}}}})),LT=Ru.prototype,kT=["itemStyle","normal","opacity"];LT.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e),l=t.getItemModel(e).get(kT);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:s.points}),n.setStyle({opacity:0}),So(n,{style:{opacity:l}},o,e)):wo(n,{style:{opacity:l},shape:{points:s.points}},o,e);var h=a.getModel("itemStyle"),u=t.getItemVisual(e,"color");n.setStyle(r({lineJoin:"round",fill:u},h.getModel("normal").getItemStyle(["opacity"]))),n.hoverStyle=h.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),uo(this)},LT._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");wo(i,{shape:{points:r.linePoints||r.linePoints}},o,e),wo(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label.normal"),h=a.getModel("label.emphasis"),u=a.getModel("labelLine.normal"),c=a.getModel("labelLine.emphasis"),s=t.getItemVisual(e,"color");co(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},h(Ru,jy);Ta.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new Ru(n,t);n.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});ar(v(tI,"funnel")),or(function(t,e,i){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=t.get("sort"),o=Vu(t,e),a=Bu(i,n),r=[Si(t.get("minSize"),o.width),Si(t.get("maxSize"),o.width)],s=i.getDataExtent("value"),l=t.get("min"),h=t.get("max");null==l&&(l=Math.min(s[0],0)),null==h&&(h=s[1]);var u=t.get("funnelAlign"),c=t.get("gap"),d=(o.height-c*(i.count()-1))/i.count(),f=o.y,g=function(t,e){var n,a=wi(i.get("value",t)||0,[l,h],r,!0);switch(u){case"left":n=o.x;break;case"center":n=o.x+(o.width-a)/2;break;case"right":n=o.x+o.width-a}return[[n,e],[n+a,e]]};"ascending"===n&&(d=-d,c=-c,f+=o.height,a=a.reverse());for(var p=0;pa&&(e[1-n]=e[n]+u.sign*a),e},zT=d,NT=Math.min,ET=Math.max,RT=Math.floor,VT=Math.ceil,BT=Mi,GT=Math.PI;Uu.prototype={type:"parallel",constructor:Uu,_init:function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;zT(n,function(t,i){var n=o[i],a=e.getComponent("parallelAxis",n),r=this._axesMap.set(t,new PT(t,Er(a),[0,0],a.get("type"),n)),s="category"===r.type;r.onBand=s&&a.get("boundaryGap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinateSystem=a.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return a>=i&&a<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();zT(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,t),Nr(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=Ko(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],h=this.dimensions.length,u=Xu(e.get("axisExpandWidth"),l),c=Xu(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&h>3&&h>c&&c>1&&u>0&&s>0,f=e.get("axisExpandWindow");f?(t=Xu(f[1]-f[0],l),f[1]=f[0]+t):(t=Xu(u*(c-1),l),(f=[u*(e.get("axisExpandCenter")||RT(h/2))-t/2])[1]=f[0]+t);var g=(s-t)/(h-c);g<3&&(g=0);var p=[RT(BT(f[0]/u,1))+1,VT(BT(f[1]/u,1))-1],m=g/u*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:g,axisExpandWindow:f,axisCount:h,winInnerIndices:p,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),zT(i,function(i,a){var r=(n.axisExpandable?qu:ju)(a,n),s={horizontal:{x:r.position,y:n.axisLength},vertical:{x:0,y:r.position}},l={horizontal:GT/2,vertical:0},h=[s[o].x+t.x,s[o].y+t.y],u=l[o],c=ot();ht(c,c,u),lt(c,c,h),this._axesLayout[i]={position:h,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1,labelInterval:e.get(i).getLabelInterval()}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i){for(var n=this.dimensions,o=this._axesMap,a=this.hasAxisBrushed(),r=0,s=t.count();ro*(1-u[0])?(l="jump",r=s-o*(1-u[2])):(r=s-o*u[1])>=0&&(r=s-o*(1-u[1]))<=0&&(r=0),(r*=e.axisExpandWidth/h)?OT(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[ET(0,a[1]*s/o-o/2)])[1]=NT(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},ua.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",function(n,o){var a=new Uu(n,t,e);a.name="parallel_"+o,a.resize(n,e),n.coordinateSystem=a,a.model=n,i.push(a)}),t.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}});var WT=Ub.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return $x([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=i(t);if(e)for(var n=e.length-1;n>=0;n--)Ii(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;i5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Rc(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};tr(function(t){Wu(t),Hu(t)}),yw.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.normal.color",getInitialData:function(t,e){var i=e.getComponent("parallel",this.get("parallelIndex")),n=i.parallelAxisIndex,o=t.data,a=i.dimensions,r=f(Gc(a,o),function(t,i){var r=l(a,t),s=r>=0&&e.getComponent("parallelAxis",n[r]);return s&&"category"===s.get("type")?(Vc(s,t,o),{name:t,type:"ordinal"}):r<0&&xr.guessOrdinal(o,i)?{name:t,type:"ordinal"}:t}),s=new aS(r,this);return s.initData(o),this.option.progressive&&(this.option.animation=!1),s},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,o){t===e&&n.push(i.getRawIndex(o))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveOpacity:.05,activeOpacity:1,lineStyle:{normal:{width:1,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationEasing:"linear"}});Ta.extend({type:"parallel",init:function(){this._dataGroup=new jy,this.group.add(this._dataGroup),this._data},render:function(t,e,i,n){this._renderForNormal(t,n)},dispose:function(){},_renderForNormal:function(t,e){var i=this._dataGroup,n=t.getData(),o=this._data,a=t.coordinateSystem,r=a.dimensions,s=t.option.smooth?.3:null;if(n.diff(o).add(function(t){Fc(n,i,t,r,a)}).update(function(i,s){var l=o.getItemGraphicEl(s),h=Hc(n,i,r,a);n.setItemGraphicEl(i,l),wo(l,{shape:{points:h}},e&&!1===e.animation?null:t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);i.remove(e)}).execute(),Zc(n,s),!this._data){var l=Wc(a,t,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(l)}this._data=n},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var lA=["lineStyle","normal","opacity"];ar(function(t){t.eachSeriesByType("parallel",function(e){var i=e.getModel("itemStyle.normal"),n=e.getModel("lineStyle.normal"),o=t.get("color"),a=n.get("color")||i.get("color")||o[e.seriesIndex%o.length],r=e.get("inactiveOpacity"),s=e.get("activeOpacity"),l=e.getModel("lineStyle.normal").getLineStyle(),h=e.coordinateSystem,u=e.getData(),c={normal:l.opacity,active:s,inactive:r};h.eachActiveState(u,function(t,e){var i=u.getItemModel(e),n=c[t];if("normal"===t){var o=i.get(lA,!0);null!=o&&(n=o)}u.setItemVisual(e,"opacity",n)}),u.setVisual("color",a)})});var hA=yw.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return hT(i,e,this,!0).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),Gi(a)}return hA.superCall(this,"formatTooltip",t,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,layoutIterations:32,label:{normal:{show:!0,position:"right",color:"#000",fontSize:12},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:1,borderColor:"#333"}},lineStyle:{normal:{color:"#314656",opacity:.2,curveness:.5},emphasis:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),uA=Zn({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildPath:function(t,e){var i=e.extent/2;t.moveTo(e.x1,e.y1-i),t.bezierCurveTo(e.cpx1,e.cpy1-i,e.cpx2,e.cpy2-i,e.x2,e.y2-i),t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i),t.closePath()}});ur({type:"sankey",_model:null,render:function(t,e,i){var n=t.getGraph(),o=this.group,a=t.layoutInfo,r=t.getData(),s=t.getData("edge");this._model=t,o.removeAll(),o.attr("position",[a.x,a.y]),n.eachEdge(function(e){var i=new uA;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n=e.getModel("lineStyle.normal"),a=n.get("curveness"),r=e.node1.getLayout(),l=e.node2.getLayout(),h=e.getLayout();i.shape.extent=Math.max(1,h.dy);var u=r.x+r.dx,c=r.y+h.sy+h.dy/2,d=l.x,f=l.y+h.ty+h.dy/2,g=u*(1-a)+d*a,p=c,m=u*a+d*(1-a),v=f;switch(i.setShape({x1:u,y1:c,x2:d,y2:f,cpx1:g,cpy1:p,cpx2:m,cpy2:v}),i.setStyle(n.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}uo(i,e.getModel("lineStyle.emphasis").getItemStyle()),o.add(i),s.setItemGraphicEl(e.dataIndex,i)}),n.eachNode(function(e){var i=e.getLayout(),n=e.getModel(),a=n.getModel("label.normal"),s=n.getModel("label.emphasis"),l=new db({shape:{x:i.x,y:i.y,width:e.getLayout().dx,height:e.getLayout().dy},style:n.getModel("itemStyle.normal").getItemStyle()}),h=e.getModel("itemStyle.emphasis").getItemStyle();co(l.style,h,a,s,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),l.setStyle("fill",e.getVisual("color")),uo(l,h),o.add(l),r.setItemGraphicEl(e.dataIndex,l),l.dataType="node"}),!this._data&&t.get("animation")&&o.setClipPath(Xc(o.getBoundingRect(),t,function(){o.removeClipPath()})),this._data=t.getData()},dispose:function(){}});or(function(t,e,i){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=qc(t,e);t.layoutInfo=o;var a=o.width,r=o.height,s=t.getGraph(),l=s.nodes,h=s.edges;$c(l),Yc(l,h,i,n,a,r,0!==p(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"))})}),ar(function(t,e){t.eachSeriesByType("sankey",function(t){var e=t.getGraph().nodes;e.sort(function(t,e){return t.getLayout().value-e.getLayout().value});var i=e[0].getLayout().value,n=e[e.length-1].getLayout().value;d(e,function(e){var o=new jI({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",o);var a=e.getModel().get("itemStyle.normal.color");null!=a&&e.setVisual("color",a)})})});var cA=Nn.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var i in e)if(e.hasOwnProperty(i)&&0===i.indexOf("ends")){var n=e[i];t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1])}}}),dA=pd.prototype;dA._createContent=function(t,e,i){var n=t.getItemLayout(e),o="horizontal"===n.chartLayout?1:0,a=0;this.add(new ub({shape:{points:i?md(n.bodyEnds,o,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=a++;var r=f(n.whiskerEnds,function(t){return i?md(t,o,n):t});this.add(new cA({shape:vd(r),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=a++},dA.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,o=t.getItemLayout(e),a=Tb[i?"initProps":"updateProps"];a(this.childAt(this.bodyIndex),{shape:{points:o.bodyEnds}},n,e),a(this.childAt(this.whiskerIndex),{shape:vd(o.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},h(pd,jy);var fA=yd.prototype;fA.updateData=function(t){var e=this.group,i=this._data,n=this.styleUpdater;t.diff(i).add(function(i){if(t.hasValue(i)){var o=new pd(t,i,n,!0);t.setItemGraphicEl(i,o),e.add(o)}}).update(function(o,a){var r=i.getItemGraphicEl(a);t.hasValue(o)?(r?r.updateData(t,o):r=new pd(t,o,n),e.add(r),t.setItemGraphicEl(o,r)):e.remove(r)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)}).execute(),this._data=t},fA.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})};var gA={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getCategories(),n=!0):"category"===s?(t.layout="vertical",i=a.getCategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseAxisDim=l[h],c=l[1-h],f=t.data;n&&d(f,function(t,e){t.value&&y(t.value)?t.value.unshift(e):y(t)&&t.unshift(e)});var g=this.defaultValueDimensions,p=[{name:u,otherDims:{tooltip:!1},dimsDef:["base"]},{name:c,dimsDef:g.slice()}];p=xr(p,f,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions"),dimCount:g.length+1});var m=new aS(p,this);return m.initData(f,i?i.slice():null),m},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},pA={init:function(){var t=this._whiskerBoxDraw=new yd(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};u(yw.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["min","Q1","median","Q3","max"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{normal:{color:"#fff",borderWidth:1},emphasis:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),gA,!0),u(Ta.extend({type:"boxplot",getStyleUpdater:function(){return xd},dispose:N}),pA,!0);var mA=["itemStyle","normal"],vA=["itemStyle","emphasis"],yA=["itemStyle","normal","borderColor"],xA=d;ar(function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",function(e){var n=i[e.seriesIndex%i.length],o=e.getData();o.setVisual({legendSymbol:"roundRect",color:e.get(yA)||n}),t.isSeriesFiltered(e)||o.each(function(t){var e=o.getItemModel(t);o.setItemVisual(t,{color:e.get(yA,!0)})})})}),or(function(t){var e=_d(t);xA(e,function(t){var e=t.seriesModels;e.length&&(bd(t),xA(e,function(e,i){wd(e,t.boxOffsetList[i],t.boxWidthList[i])}))})}),u(yw.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return i.rect(n.brushRect)}}),gA,!0),u(Ta.extend({type:"candlestick",getStyleUpdater:function(){return Sd},dispose:N}),pA,!0);var _A=["itemStyle","normal"],bA=["itemStyle","emphasis"],wA=["itemStyle","normal","borderColor"],SA=["itemStyle","normal","borderColor0"],MA=["itemStyle","normal","color"],IA=["itemStyle","normal","color0"],TA=T;tr(function(t){t&&y(t.series)&&d(t.series,function(t){b(t)&&"k"===t.type&&(t.type="candlestick")})}),ar(function(t,e){t.eachRawSeriesByType("candlestick",function(e){var i=e.getData();i.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||i.each(function(t){var e=i.getItemModel(t),n=i.getItemLayout(t).sign;i.setItemVisual(t,{color:e.get(n>0?MA:IA),borderColor:e.get(n>0?wA:SA)})})})}),or(function(t){t.eachSeriesByType("candlestick",function(t){var e,i=t.coordinateSystem,n=t.getData(),o=Md(t,n),a=t.get("layout"),r="horizontal"===a?0:1,s=1-r,l=["x","y"],h=[];if(d(n.dimensions,function(t){var i=n.getDimensionInfo(t).coordDim;i===l[s]?h.push(t):i===l[r]&&(e=t)}),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),function(){function t(t){var e=[];return e[r]=d,e[s]=t,isNaN(d)||isNaN(t)?[NaN,NaN]:i.dataToPoint(e)}function e(t,e){var i=t.slice(),n=t.slice();i[r]=Kn(i[r]+o/2,1,!1),n[r]=Kn(n[r]-o/2,1,!0),e?M.push(i,n):M.push(n,i)}function l(t){return t[r]=Kn(t[r],1),t}var c=arguments,d=c[0],f=c[h.length+1],g=c[1],p=c[2],m=c[3],v=c[4],y=Math.min(g,p),x=Math.max(g,p),_=t(y),b=t(x),w=t(m),S=[[l(t(v)),l(b)],[l(w),l(_)]],M=[];e(b,0),e(_,1);var I;I=g>p?-1:g0?n.getItemModel(u-1).get()[2]<=p?1:-1:1,n.setItemLayout(f,{chartLayout:a,sign:I,initBaseline:g>p?b[s]:_[s],bodyEnds:M,whiskerEnds:S,brushRect:function(){var e=t(Math.min(g,p,m,v)),i=t(Math.max(g,p,m,v));return e[r]-=o/2,i[r]-=o/2,{x:e[0],y:e[1],width:s?o:i[0]-e[0],height:s?i[1]-e[1]:o}}()}),++u},!0)}})}),yw.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return Sr(t.data,this,e)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var AA=Ad.prototype;AA.stopEffectAnimation=function(){this.childAt(1).removeAll()},AA.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Hr(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}Td(n,t)},AA.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o "))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}}),DA=Dd.prototype;DA.createLine=function(t,e,i){return new bu(t,e,i)},DA._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Hr(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},DA._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,a=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),h=I(e.get("delay"),function(e){return e/t.count()*r/3}),u="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,a),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},DA.getLineLength=function(t){return hy(t.__p1,t.__cp1)+hy(t.__cp1,t.__p2)},DA.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},DA.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},DA.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=un,s=cn;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),h=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(h,l)-Math.PI/2,t.ignore=!1},DA.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},h(Dd,jy);var LA=Ld.prototype;LA._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new cb({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},LA.updateData=function(t,e,i){var n=t.hostModel;wo(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},LA._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),s=i&&i.lineStyle,l=i&&i.hoverLineStyle;i&&!t.hasItemOption||(s=o.getModel("lineStyle.normal").getLineStyle(),l=o.getModel("lineStyle.emphasis").getLineStyle()),n.useStyle(r({strokeNoScale:!0,fill:"none",stroke:a},s)),n.hoverStyle=l,uo(this)},LA.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},h(Ld,jy);var kA=kd.prototype;kA.createLine=function(t,e,i){return new Ld(t,e,i)},kA.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;re);r++);r=Math.min(r-1,o-2)}Y(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},h(kd,Dd);var PA=Zn({shape:{polyline:!1,segs:[]},buildPath:function(t,e){for(var i=e.segs,n=e.polyline,o=0;o2?t.quadraticCurveTo(a[2][0],a[2][1],a[1][0],a[1][1]):t.lineTo(a[1][0],a[1][1])}},findDataIndex:function(t,e){for(var i=this.shape,n=i.segs,o=i.polyline,a=Math.max(this.style.lineWidth,1),r=0;r2){if(Sn(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],a,t,e))return r}else if(bn(s[0][0],s[0][1],s[1][0],s[1][1],a,t,e))return r}return-1}}),OA=Pd.prototype;OA.updateData=function(t){this.group.removeAll();var e=this._lineEl,i=t.hostModel;e.setShape({segs:t.mapArray(t.getItemLayout),polyline:i.get("polyline")}),e.useStyle(i.getModel("lineStyle.normal").getLineStyle());var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)}),this.group.add(e)},OA.updateLayout=function(t){var e=t.getData();this._lineEl.setShape({segs:e.mapArray(e.getItemLayout)})},OA.remove=function(){this.group.removeAll()},ur({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._lineDraw,a=t.get("effect.show"),r=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largeThreshold");a===this._hasEffet&&r===this._isPolyline&&s===this._isLarge||(o&&o.remove(),o=this._lineDraw=s?new Pd:new Mu(r?a?kd:Ld:a?Dd:bu),this._hasEffet=a,this._isPolyline=r,this._isLarge=s);var l=t.get("zlevel"),h=t.get("effect.trailLength"),u=i.getZr(),c="svg"===u.painter.getType();c||u.painter.getLayer(l).clear(!0),null==this._lastZlevel||c||u.configLayer(this._lastZlevel,{motionBlur:!1}),a&&h&&(c||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(h/10+.9,1),0)})),this.group.add(o.group),o.updateData(n),this._lastZlevel=l},updateLayout:function(t,e,i){this._lineDraw.updateLayout(t);var n=i.getZr();"svg"===n.painter.getType()||n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0);var i=e.getZr();"svg"===i.painter.getType()||i.painter.getLayer(this._lastZlevel).clear(!0)},dispose:function(){}});or(function(t){t.eachSeriesByType("lines",function(t){var e=t.coordinateSystem,i=t.getData();i.each(function(n){var o=i.getItemModel(n),a=o.option instanceof Array?o.option:o.get("coords"),r=[];if(t.get("polyline"))for(var s=0;s0){var I=a(v)?s:l;v>0&&(v=v*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),u},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=iy()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},ur({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(o,t,i):Rd(o)&&this._renderOnGeo(o,t,n,i)},dispose:function(){},_renderOnCartesianAndCalendar:function(t,e,i){if("cartesian2d"===t.type)var n=t.getAxis("x"),o=t.getAxis("y"),r=n.getBandWidth(),s=o.getBandWidth();var l=this.group,h=e.getData(),u=e.getModel("itemStyle.normal").getItemStyle(["color"]),c=e.getModel("itemStyle.emphasis").getItemStyle(),d=e.getModel("label.normal"),f=e.getModel("label.emphasis"),g=t.type,p="cartesian2d"===g?[e.coordDimToDataDim("x")[0],e.coordDimToDataDim("y")[0],e.coordDimToDataDim("value")[0]]:[e.coordDimToDataDim("time")[0],e.coordDimToDataDim("value")[0]];h.each(function(i){var n;if("cartesian2d"===g){if(isNaN(h.get(p[2],i)))return;var o=t.dataToPoint([h.get(p[0],i),h.get(p[1],i)]);n=new db({shape:{x:o[0]-r/2,y:o[1]-s/2,width:r,height:s},style:{fill:h.getItemVisual(i,"color"),opacity:h.getItemVisual(i,"opacity")}})}else{if(isNaN(h.get(p[1],i)))return;n=new db({z2:1,shape:t.dataToRect([h.get(p[0],i)]).contentShape,style:{fill:h.getItemVisual(i,"color"),opacity:h.getItemVisual(i,"opacity")}})}var m=h.getItemModel(i);h.hasItemOption&&(u=m.getModel("itemStyle.normal").getItemStyle(["color"]),c=m.getModel("itemStyle.emphasis").getItemStyle(),d=m.getModel("label.normal"),f=m.getModel("label.emphasis"));var v=e.getRawValue(i),y="-";v&&null!=v[2]&&(y=v[2]),co(u,c,d,f,{labelFetcher:e,labelDataIndex:i,defaultText:y,isRectText:!0}),n.setStyle(u),uo(n,h.hasItemOption?c:a({},c)),l.add(n),h.setItemGraphicEl(i,n)})},_renderOnGeo:function(t,e,i,n){var o=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new zd;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),h=t.getRoamTransform().transform;l.applyTransform(h);var u=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),g=d-u,p=f-c,m=r.mapArray(["lng","lat","value"],function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=u,o[1]-=c,o.push(n),o}),v=i.getExtent(),y="visualMap.continuous"===i.type?Ed(v,i.option.range):Nd(v,i.getPieceList(),i.option.selected);s.update(m,g,p,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var x=new qe({style:{width:g,height:p,x:u,y:c,image:s.canvas},silent:!0});this.group.add(x)}});var zA=ZM.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,zA.superApply(this,"getInitialData",arguments)}}),NA=["itemStyle","normal","borderWidth"],EA=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],RA=new nb;ur({type:"pictorialBar",render:function(t,e,i){var n=this.group,o=t.getData(),a=this._data,r=t.coordinateSystem,s=!!r.getBaseAxis().isHorizontal(),l=r.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:EA[+s],categoryDim:EA[1-s]};return o.diff(a).add(function(t){if(o.hasValue(t)){var e=Yd(o,t),i=Vd(o,t,e,h),a=Qd(o,h,i);o.setItemGraphicEl(t,a),n.add(a),rf(a,h,i)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(o.hasValue(t)){var r=Yd(o,t),s=Vd(o,t,r,h),l=nf(o,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),o.setItemGraphicEl(t,null),i=null),i?tf(i,h,s):i=Qd(o,h,s,!0),o.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),rf(i,h,s)}else n.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&ef(a,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=o,this.group},dispose:N,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(e){ef(n,e.dataIndex,t,e)}):i.removeAll()}});or(v(nl,"pictorialBar")),ar(v(cM,"pictorialBar","roundRect",null));var VA=function(t,e,i,n,o){US.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null,this._labelInterval=null};VA.prototype={constructor:VA,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},h(VA,US),lf.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:lf,_init:function(t,e,i){var n=this.dimension,o=new VA(n,Er(t),[0,0],t.get("type"),t.get("position")),a="category"===o.type;o.onBand=a&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData(),i=this.dimension;this._axis.scale.unionExtentFromData(e,t.coordDimToDataDim(i)),Nr(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=Ko({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},ua.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",function(n,o){var a=new lf(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i},dimensions:lf.prototype.dimensions});var BA=DM.getInterval,GA=DM.ifIgnoreOnTick,WA=["axisLine","axisTickLabel","axisName"],HA=EM.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=hf(t),r=new DM(t,a);d(WA,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t,a.labelInterval),HA.superCall(this,"render",t,e,i,n)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("width"),r=o.get("color"),s=BA(n,e);r=r instanceof Array?r:[r];for(var l=t.coordinateSystem.getRect(),h=i.isHorizontal(),u=[],c=0,d=i.getTicksCoords(),f=[],g=[],p=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=0;v=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Tf(e.getZr(),"axisPointer"),KA.superApply(this._model,"remove",arguments)},dispose:function(t,e){Tf("axisPointer",e),KA.superApply(this._model,"dispose",arguments)}}),JA=Eb(),QA=i,tC=m;(Af.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=v(Cf,e,u);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new jy,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);Pf(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=Xs(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=JA(t).pointerEl=new Tb[o.type](QA(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=JA(t).labelEl=new db(QA(e.label));t.add(o),Lf(o,n)}},updatePointerEl:function(t,e,i){var n=JA(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=JA(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),Lf(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=Do(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){bx(t.event)},onmousedown:tC(this._onHandleDragMove,this,0,0),drift:tC(this._onHandleDragMove,this),ondragend:tC(this._onHandleDragEnd,this)}),i.add(n)),Pf(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),La(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){Cf(this._axisPointerModel,!e&&this._moveAnimation,this._handle,kf(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(kf(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(kf(n)),JA(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=Af,Ki(Af);var eC=Af.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=Hf(r,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var u=Of(n),c=iC[s](a,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}Vf(e,t,Js(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Js(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Rf(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=Hf(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(r[1],h[l]),h[l]=Math.max(r[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),iC={line:function(t,e,i,n){var o=Bf([e,i[0]],[e,i[1]],Ff(t));return Yn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Gf([e-o/2,i[0]],[o,a],Ff(t))}}};EM.registerAxisPointerClass("CartesianAxisPointer",eC),tr(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),er(Pw.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Bs(t,e)}),ir({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||m(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){xf(o)&&(o=UA({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=xf(o),h=a.axesInfo,u=s.axesInfo,c="leave"===n||xf(o),d={},f={},g={list:[],map:{}},p={showPointer:jA(df,f),showTooltip:jA(ff,g)};XA(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);XA(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,a=vf(h,t);if(!c&&i&&(!h||a)){var r=a&&a.value;null!=r||l||(r=n.pointToData(o)),null!=r&&uf(t,r,p,!1,d)}})});var v={};return XA(u,function(t,e){var i=t.linkGroup;i&&!f[e]&&XA(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,yf(e),yf(t)))),v[t.key]=a}})}),XA(v,function(t,e){uf(u[e],t,p,!0,d)}),gf(f,u,d),pf(g,o,t,r),mf(u,0,i),d}});var nC=["x","y"],oC=["width","height"],aC=Af.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=Uf(r,1-Zf(a)),l=r.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=Of(n),c=rC[h](a,l,s,u);c.style=u,t.graphicKey=c.type,t.pointer=c}Vf(e,t,hf(i),i,n,o)},getHandleTransform:function(t,e,i){var n=hf(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Rf(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=Zf(o),s=Uf(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var h=Uf(a,1-r),u=(h[1]+h[0])/2,c=[u,u];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),rC={line:function(t,e,i,n){var o=Bf([e,i[0]],[e,i[1]],Zf(t));return Yn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Gf([e-o/2,i[0]],[o,a],Zf(t))}}};EM.registerAxisPointerClass("SingleAxisPointer",aC),lr({type:"single"});var sC=yw.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){sC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=f(jc().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),n=i.length,o=-1,a=-1,r=0;ro&&(o=s,a=r)}for(var l=0;ln[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r}),size:m(Jf,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:m(t.dataToPoint,t)}}}};hr({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0},getInitialData:function(t,e){return Sr(t.data,this,e)}}),ur({type:"custom",_data:null,render:function(t,e,i){var n=this._data,o=t.getData(),a=this.group,r=ig(t,o,e,i);o.diff(n).add(function(e){o.hasValue(e)&&og(null,e,r(e),t,a,o)}).update(function(e,i){var s=n.getItemGraphicEl(i);o.hasValue(e)?og(s,e,r(e),t,a,o):s&&a.remove(s)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&a.remove(e)}).execute(),this._data=o},dispose:N}),tr(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var gC=sr({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,gC.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=Vo(o,a);Bo(r);var s=this._elOptionsToUpdate=[];d(r,function(t,e){var i=t.option;i&&(s.push(i),gg(t,i),pg(o,e,i),mg(o[e],i))},this);for(var l=o.length-1;l>=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});lr({type:"graphic",init:function(t,e){this._elMap=z(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,i),this._relocate(t,i)},_updateElements:function(t,e){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,o=this.group;d(i,function(t){var e=t.$action,i=t.id,a=n.get(i),r=t.parentId,s=null!=r?n.get(r):o;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textVerticalAlign=l.textBaseline=null),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}var h=dg(t);e&&"merge"!==e?"replace"===e?(cg(a,n),ug(i,s,h,n)):"remove"===e&&cg(a,n):a?a.attr(h):ug(i,s,h,n);var u=n.get(i);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;Jo(s,r,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){cg(e,t)}),this._elMap=z()},dispose:function(){this._clear()}});var pC=sr({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){pC.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});ir("legendToggleSelect","legendselectchanged",v(vg,"toggleSelected")),ir("legendSelect","legendselected",v(vg,"select")),ir("legendUnSelect","legendunselected",v(vg,"unSelect"));var mC=v,vC=d,yC=jy,xC=lr({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new yC),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var o=t.getBoxLayoutParams(),a={width:i.getWidth(),height:i.getHeight()},s=t.get("padding"),l=Ko(o,a,s),h=this.layoutInner(t,n,l),u=Ko(r({width:h.width,height:h.height},o),a,s);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=xg(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var o=this.getContentGroup(),a=z(),r=e.get("selectedMode");vC(e.getData(),function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=i.getSeriesByName(h)[0];if(!a.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var f=c.getVisual("legendSymbol")||"roundRect",g=c.getVisual("symbol");this._createItem(h,l,s,e,f,g,t,d,r).on("click",mC(_g,h,n)).on("mouseover",mC(bg,u,null,n)).on("mouseout",mC(wg,u,null,n)),a.set(h,!0)}else i.eachRawSeries(function(i){if(!a.get(h)&&i.legendDataProvider){var o=i.legendDataProvider(),u=o.indexOfName(h);if(u<0)return;var c=o.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,r).on("click",mC(_g,h,n)).on("mouseover",mC(bg,i,h,n)).on("mouseout",mC(wg,i,h,n)),a.set(h,!0)}},this)}else o.add(new yC({newline:!0}))},this)},_createItem:function(t,e,i,n,o,r,s,l,h){var u=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.isSelected(t),g=new yC,p=i.getModel("textStyle"),m=i.get("icon"),v=i.getModel("tooltip"),y=v.parentModel;if(o=m||o,g.add(Hr(o,0,0,u,c,f?l:d,!0)),!m&&r&&(r!==o||"none"==r)){var x=.8*c;"none"===r&&(r="circle"),g.add(Hr(r,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,b=s,w=n.get("formatter"),S=t;"string"==typeof w&&w?S=w.replace("{name}",null!=t?t:""):"function"==typeof w&&(S=w(t)),g.add(new ib({style:fo({},p,{text:S,x:_,y:c/2,textFill:f?p.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var M=new db({shape:g.getBoundingRect(),invisible:!0,tooltip:v.get("show")?a({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},v.option):null});return g.add(M),g.eachChild(function(t){t.silent=!0}),M.silent=!h,this.getContentGroup().add(g),uo(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();Hb(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var o=n.getBoundingRect();return n.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()}});er(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[s],f=[-u.x,-u.y];f[r]=n.position[r];var g=[0,0],p=[-c.x,-c.y],m=T(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?p[r]+=i[s]-c[s]:g[r]+=c[s]+m),p[1-r]+=u[l]/2-c[l]/2,n.attr("position",f),o.attr("position",g),a.attr("position",p);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+p[1-r]),o.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],o.setClipPath(new db({shape:y})),o.__rectSize=y[s]}else a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&wo(n,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var i,n,o,a,r=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=wC[u],d=wC[1-u],f=SC[u],g=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===r&&(a=t)}):a=s.childAt(0);var p=h?Math.ceil(l[c]/h):0;if(a){var m=a.getBoundingRect(),v=a.position[u]+m[f];g[u]=-v-l[f],i=Math.floor(p*(v+m[f]+h/2)/l[c]),i=l[c]&&p?Math.max(0,Math.min(p-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-g[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),o=t.__legendDataIndex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(o=null)}),null!=x){var b=e(_[x]);if(y[f]=b[f]+b[c]-y[c],x<=0&&b[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legendDataIndex}}}return{contentPosition:g,pageIndex:i,pageCount:p,pagePrevDataIndex:n,pageNextDataIndex:o}}});ir("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),sr({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var IC=d,TC=Bi,AC=["","-webkit-","-moz-","-o-"];Ag.prototype={constructor:Ag,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+Tg(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var CC=m,DC=d,LC=Si,kC=new db({shape:{x:-1,y:-1,width:2,height:2}});lr({type:"tooltip",init:function(t,e){if(!Uv.node){var i=new Ag(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!Uv.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");_f("itemTooltip",this._api,CC(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!Uv.node){var o=Dg(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=kC;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=UA(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;this._alwaysShowContent||o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Dg(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=Cg([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,o=[e.offsetX,e.offsetY],a=[],r=[],s=Cg([e.tooltipOption,n]);DC(t,function(t){DC(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,o=[];if(e&&null!=n){var s=Ef(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(a){var l=i.getSeriesByIndex(a.seriesIndex),h=a.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=Br(e.axis,n),u.axisValueLabel=s,u&&(r.push(u),o.push(l.formatTooltip(h,!0)))});var l=s;a.push((l?Gi(l)+"
":"")+o.join("
"))}})},this),a.reverse(),a=a.join("

");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,o[0],o[1],this._tooltipContent,r):this._showTooltipContent(s,a,r,Math.random(),o[0],o[1],l)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,h=r.getData(),u=Cg([h.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=r.getDataParams(s,l),f=r.formatTooltip(s,!1,l),g="item_"+r.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,g,t.offsetX,t.offsetY,t.position,t.target)}),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new Lo(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var u=e;if(h&&"string"==typeof h)u=Wi(h,i,!0);else if("function"==typeof h){var c=CC(function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,r,o,a,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,r,o,a,l,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=o.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:h.slice()})),y(e))i=LC(e[0],s),n=LC(e[1],l);else if(b(e)){e.width=h[0],e.height=h[1];var f=Ko(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else"string"==typeof e&&r?(i=(g=Og(e,d,h))[0],n=g[1]):(i=(g=Lg(i,n,o.el,s,l,u?null:20,c?null:20))[0],n=g[1]);if(u&&(i-=zg(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=zg(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var g=kg(i,n,o.el,s,l);i=g[0],n=g[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&DC(e,function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&DC(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&DC(o,function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Uv.node||(this._tooltipContent.hide(),Tf("itemTooltip",e))}}),ir({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),ir({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Vg.prototype={constructor:Vg,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:US.prototype.dataToCoord,radiusToData:US.prototype.coordToData},h(Vg,US),Bg.prototype={constructor:Bg,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:US.prototype.dataToCoord,angleToData:US.prototype.coordToData},h(Bg,US);var PC=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Vg,this._angleAxis=new Bg,this._radiusAxis.polar=this._angleAxis.polar=this};PC.prototype={type:"polar",axisPointerEnabled:!0,constructor:PC,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=lr;)l+=360*h;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var OC=Ub.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n(OC.prototype,zS);var zC={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};_M("angle",OC,Gg,zC.angle),_M("radius",OC,Gg,zC.radius),sr({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var NC={dimensions:PC.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new PC(n);o.update=Hg;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Fg(a,s),Fg(r,l),Wg(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};ua.register("polar",NC);var EC=["axisLine","axisLabel","axisTick","splitLine","splitArea"];EM.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords();"category"!==i.type&&a.pop(),d(EC,function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,n,a,o)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new nb({shape:{cx:e.cx,cy:e.cy,r:n[Ug(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[Ug(e)],l=f(i,function(t){return new fb({shape:Zg(e,[s,s+a],t)})});this.group.add(Ib(l,{style:r(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var o=t.axis,a=t.get("data"),r=t.getModel("axisLabel"),s=t.getFormattedLabels(),l=r.get("margin"),h=o.getLabelsCoords(),u=0;uf?"left":"right",m=Math.abs(d[1]-g)/c<.3?"middle":d[1]>g?"top":"bottom";a&&a[u]&&a[u].textStyle&&(r=new Lo(a[u].textStyle,r,r.ecModel));var v=new ib({silent:!0});this.group.add(v),fo(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||t.get("axisLine.lineStyle.color"),text:s[u],textAlign:p,textVerticalAlign:m})}},_splitLine:function(t,e,i,n){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],h=0;h=0?"p":"n",S=i.pointToCoord(M[n]),I=r[u][n][p];if("radius"===g.dim)o=I,s=S[0],c=(h=(-S[1]+d)*Math.PI/180)+f*Math.PI/180,Math.abs(s)0?C=A[1]:C===A[1]&&t<0&&(C=A[0]),r[u][n][p]=C}e.setItemLayout(n,{cx:m,cy:v,r0:o,r:s,startAngle:h,endAngle:c})}},!0)}},this)},"bar")),lr({type:"polar"}),u(Ub.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){Ub.prototype.init.apply(this,arguments),zo(t.label,["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=xI.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=g(t.regions||[],function(t,i){return i.name&&t.set(i.name,new Lo(i,e)),t},z()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new Lo(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),$M),lr({type:"geo",init:function(t,e){var i=new Ul(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var o=this._mapDraw;t.get("show")?o.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),qg("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),qg("select",{type:"geoSelect",event:"geoselected"}),qg("unSelect",{type:"geoUnSelect",event:"geounselected"});var WC=["rect","polygon","keep","clear"],HC=d,FC={lineX:tp(0),lineY:tp(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&Ur(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return!!(Ur(n,o,a)||Ur(n,o+r,a)||Ur(n,o,a+s)||Ur(n,o+r,a+s)||jt.create(t).contain(l[0],l[1])||ip(o,a,o+r,a,n)||ip(o,a,o,a+s,n)||ip(o+r,a,o+r,a+s,n)||ip(o,a+s,o+r,a+s,n))||void 0}}},ZC=d,UC=l,XC=v,jC=["dataToPoint","pointToData"],qC=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],YC=rp.prototype;YC.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=QC[t.brushType](0,i,e);t.__rangeOffset={offset:tD[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},YC.matchOutputRanges=function(t,e,i){ZC(t,function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&d(n.coordSyses,function(n){var o=QC[t.brushType](1,n,t.range);i(t,o.values,n,e)})},this)},YC.setInputRanges=function(t,e){ZC(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&!0!==i){t.panelId=i.panelId;var n=QC[t.brushType](0,i.coordSys,t.coordRange),o=t.__rangeOffset;t.range=o?tD[t.brushType](n.values,o.offset,cp(n.xyMinMax,o.xyMinMax)):n.values}},this)},YC.makePanelOpts=function(t,e){return f(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:Lc(n),isTargetByCursor:Pc(n,t,i.coordSysModel),getLinearBrushOtherExtent:kc(n)}})},YC.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&UC(n.coordSyses,e.coordinateSystem)>=0},YC.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=lp(e,t),o=0;o=0||UC(n,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:JC.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){ZC(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:JC.geo})})}},KC=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],JC={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Mo(t)),e}},QC={lineX:XC(hp,0),lineY:XC(hp,1),rect:function(t,e,i){var n=e[jC[t]]([i[0][0],i[1][0]]),o=e[jC[t]]([i[0][1],i[1][1]]),a=[sp([n[0],o[0]]),sp([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[jC[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o}),xyMinMax:n}}},tD={lineX:XC(up,0),lineY:XC(up,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},eD=["inBrush","outOfBrush"],iD="__ecBrushSelect",nD="__ecInBrushSelectEvent",oD=Pw.VISUAL.BRUSH;or(oD,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new rp(e.option,t)).setInputRanges(e.areas,t)})}),ar(oD,function(t,e,n){var o,a,s=[];t.eachComponent({mainType:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function h(t){return!!t.length}function u(t,e){var i=t.coordinateSystem;b|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=mp(i);if(a&&!vp(e,n)&&(d(w,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),b|=h(o)}),l(n)&&h(o))){var r=i.getData();r.each(function(t){pp(a,o,r,t)&&(x[t]=1)})}}var g={brushId:e.id,brushIndex:n,brushName:e.name,areas:i(e.areas),selected:[]};s.push(g);var p=e.option,m=p.brushLink,v=[],x=[],_=[],b=0;n||(o=p.throttleType,a=p.throttleDelay);var w=f(e.areas,function(t){return yp(r({boundingRect:aD[t.brushType](t)},t))}),S=Kg(e.option,eD,function(t){t.mappingMethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=_[e]=[];"parallel"===t.subType?u(t,e):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};g.selected.push(i);var n=mp(t),o=_[e],a=t.getData(),r=l(e)?function(t){return x[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return pp(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?b:h(o))&&Qg(eD,S,a,r)})}),fp(e,o,a,s,n)});var aD={lineX:N,lineY:N,rect:function(t){return xp(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&xp(e)}},rD=["#ddd"];sr({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&Jg(i,t,["inBrush","outOfBrush"]),i.inBrush=i.inBrush||{},i.outOfBrush=i.outOfBrush||{color:rD}},setAreas:function(t){t&&(this.areas=f(t,function(t){return _p(this.option,t)},this))},setBrushOption:function(t){this.brushOption=_p(this.option,t),this.brushType=this.brushOption.brushType}});lr({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Yu(e.getZr())).on("brush",m(this._onBrush,this)).mount()},render:function(t){return this.model=t,bp.apply(this,arguments)},updateView:bp,updateLayout:bp,updateVisual:bp,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i(t),$from:n})}}),ir({type:"brush",event:"brush",update:"updateView"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),ir({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var sD={},lD={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}}},hD=lD.toolbox.brush;Mp.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:i(hD.title)};var uD=Mp.prototype;uD.render=uD.updateView=uD.updateLayout=function(t,e,i){var n,o,a;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,d(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},uD.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},uD.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},wp("brush",Mp),tr(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Yg(s),e&&!s.length&&s.push.apply(s,WC)}});Ip.prototype={constructor:Ip,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"}]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Pi(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:o,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)?this.getDateInfo(t):((t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle.normal").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},h=this._rect=Ko(r,l);d([0,1],function(t){i(a,t)||(a[t]=h[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[NaN,NaN];var a=i.day,r=this._getRangeInfo([n.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:v(Tp,"dataToPoint"),convertFromPixel:v(Tp,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(y(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==a&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(o+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},Ip.dimensions=Ip.prototype.dimensions,Ip.getDimensionsInfo=Ip.prototype.getDimensionsInfo,Ip.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var o=new Ip(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},ua.register("calendar",Ip);var cD=Ub.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{normal:{color:"#fff",borderWidth:1,borderColor:"#ccc"}},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=ea(t);cD.superApply(this,"init",arguments),Ap(t,o)},mergeOption:function(t,e){cD.superApply(this,"mergeOption",arguments),Ap(this.option,t)}}),dD={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},fD={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};lr({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle.normal").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,h=new db({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(h)}},_renderLines:function(t,e,i,n){function o(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var o=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawSplitline(o,s,n)}var a=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),h=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){o(u.formatedDate),0===c&&(u=r.getDateInfo(e.start.y+"-"+e.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}o(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,h,i),s,n),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,h,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new cb({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?Hi(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:d},p=this._formatterLabel(f,g),m=new ib({z2:30});fo(m.style,o,{text:p}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),h=[this._tlpoints,this._blpoints];_(o)&&(o=dD[o.toUpperCase()]||[]);var u="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f=a[0]&&t<=a[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;if("none"!==o){var r=this.getOtherAxisModel();t.get("$fromToolbox")&&r&&"category"===r.get("type")&&(o="empty"),mD(n,function(t){var n=t.getData(),r=t.coordDimToDataDim(i);"weakFilter"===o?n&&n.filterSelf(function(t){for(var e,i,o,s=0;sa[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(e=!0),c&&(i=!0)}return o&&e&&i}):n&&mD(r,function(i){"empty"===o?t.setData(n.map(i,function(t){return e(t)?t:NaN})):n.filterSelf(i,e)})})}}}};var xD=d,_D=pD,bD=sr({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=zp(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=zp(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;Uv.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Np(this,t),xD([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new yD(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();_D(function(e){var i=e.axisIndex;t[i]=Oo(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;_D(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):xD(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&_D(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a0?100:20}},getFirstTargetAxisModel:function(){var t;return _D(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;_D(function(n){xD(this.get(n.axisIndex),function(o){t.call(e,n,o,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;xD([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Np(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),wD=xw.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var o,a=0;a0&&e%p)g+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:MD(t,a,h,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([g,0]),d.push([g,0])),c.push([g,n]),d.push([g,n]),g+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new ub({shape:{points:c},style:r({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new cb({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(o,a){d(t.getAxisProxy(o.name,a).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(LD,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,h=Ep(o.name),u=t.coordinateSystem;null!=h&&u.getOtherAxis&&(r=u.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:o.name,otherDim:h,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new SD({draggable:!0,cursor:Rp(this._orient),drift:TD(this._onDragMove,this,"all"),onmousemove:function(t){bx(t.event)},ondragstart:TD(this._showDataInfo,this,!0),ondragend:TD(this._onDragEnd,this),onmouseover:TD(this._showDataInfo,this,!0),onmouseout:TD(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new SD($n({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),AD([0,1],function(t){var o=Do(a.get("handleIcon"),{cursor:Rp(this._orient),draggable:!0,drift:TD(this._onDragMove,this,t),onmousemove:function(t){bx(t.event)},ondragend:TD(this._onDragEnd,this),onmouseover:TD(this._showDataInfo,this,!0),onmouseout:TD(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=Si(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new ib({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[MD(t[0],[0,100],e,!0),MD(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];OT(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?MD(a.minSpan,r,o,!0):null,null!=a.maxSpan?MD(a.maxSpan,r,o,!0):null),this._range=ID([MD(n[0],o,r,!0),MD(n[1],o,r,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=ID(i.slice()),o=this._size;AD([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Mo(n.handles[t].parent,this.group),i=To(0===t?"right":"left",e),s=this._handleWidth/2+DD,l=Io([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===CD?"middle":i,textAlign:a===CD?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,a=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,h=this._range,u=t?s.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=ID(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=Io([e,i],this._displayables.barGroup.getLocalTransform(),!0);this._updateInterval(t,n[0]);var o=this.dataZoomModel.get("realtime");this._updateView(!o),o&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2;this._updateInterval("all",i[0]-o),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(AD(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});bD.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var PD=v,OD="\0_ec_dataZoom_roams",zD=m,ND=wD.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){ND.superApply(this,"render",arguments),Gp(n,t.id)&&(this._range=t.getPercentRange()),d(this.getTargetCoordInfo(),function(e,n){var o=f(e,function(t){return Wp(t.model)});d(e,function(e){var a=e.model,r=t.option;Vp(i,{coordId:Wp(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:zD(this._onPan,this,e,n),zoomGetRange:zD(this._onZoom,this,e,n),zoomLock:r.zoomLock,disabled:r.disabled,roamControllerOpt:{zoomOnMouseWheel:r.zoomOnMouseWheel,moveOnMouseMove:r.moveOnMouseMove,preventDefaultMouseMove:r.preventDefaultMouseMove}})},this)},this)},dispose:function(){Bp(this.api,this.dataZoomModel.id),ND.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,n,o,a,r,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=ED[e]([a,r],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return OT(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,i,n,o,a){var r=this._range.slice(),s=t.axisModels[0];if(s){var l=ED[e](null,[o,a],s,i,t),h=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(r[1]-r[0])+r[0];n=Math.max(1/n,0),r[0]=(r[0]-h)*n+h,r[1]=(r[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return OT(0,r,[0,100],0,u.minSpan,u.maxSpan),this._range=r}}}),ED={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=h[1]-h[0],r.pixelStart=h[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}};er(function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis($p),t.eachTargetAxis(Kp)}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}),ir("dataZoom",function(t,e){var i=Dp(m(e.eachComponent,e,"dataZoom"),pD,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var RD=d,VD=function(t){var e=t&&t.visualMap;y(e)||(e=e?[e]:[]),RD(e,function(t){if(t){Jp(t,"splitList")&&!Jp(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&y(e)&&RD(e,function(t){b(t)&&(Jp(t,"start")&&!Jp(t,"min")&&(t.min=t.start),Jp(t,"end")&&!Jp(t,"max")&&(t.max=t.end))})}})};Ub.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}),ar(Pw.VISUAL.COMPONENT,function(t){t.eachComponent("visualMap",function(t){Qp(t)}),tm(t)});var BD={get:function(t,e,n){var o=i((GD[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},GD={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},WD=jI.mapVisual,HD=jI.eachVisual,FD=y,ZD=d,UD=Ii,XD=wi,jD=N,qD=["#f6efa6","#d88273","#bf444c"],YD=sr({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;Uv.canvasSupported||(i.realtime=!1),!e&&Jg(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=m(t,this),this.controllerVisuals=Kg(this.option.controller,e,t),this.targetVisuals=Kg(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Oo(t),e},eachTargetSeries:function(t,e){d(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,h=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(h)?h.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(h)?o?h(t[0],t[1]):h(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=UD([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){FD(e.color)&&!t.inRange&&(t.inRange={color:e.color.slice().reverse()}),t.inRange=t.inRange||{color:qD},ZD(this.stateList,function(e){var i=t[e];if(_(i)){var n=BD.get(i,"active",s);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.option,o={inRange:e.inRange,outOfRange:e.outOfRange},a=e.target||(e.target={}),r=e.controller||(e.controller={});n(a,o),n(r,o);var s=this.isCategory();t.call(this,a),t.call(this,r),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},ZD(n,function(t,e){if(jI.isValidType(e)){var i=BD.get(e,"inactive",s);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,a,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");ZD(this.stateList,function(a){var r=this.itemSize,l=t[a];l||(l=t[a]={color:s?o:[o]}),null==l.symbol&&(l.symbol=e&&i(e)||(s?"roundRect":["roundRect"])),null==l.symbolSize&&(l.symbolSize=n&&i(n)||(s?r[0]:[r[0],r[0]])),l.symbol=WD(l.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var h=l.symbolSize;if(null!=h){var u=-1/0;HD(h,function(t){t>u&&(u=t)}),l.symbolSize=WD(h,function(t){return XD(t,[0,u],[0,r[0]],!0)})}},this)}.call(this,r)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:jD,getValueState:jD,getVisualMeta:jD}),$D=[20,140],KD=YD.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){KD.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){KD.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=$D[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=$D[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){YD.prototype.completeVisualOption.apply(this,arguments),d(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Ii((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=im(0,0,this.getExtent()),n=im(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new jy("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,a=i.handleLabels;tL([0,1],function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=Io(i.handleLabelPoints[r],Mo(s,this.group));a[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=QD(t,a,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",sm(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);u.setStyle("fill",d);var f=Io(h.indicatorLabelPoint,Mo(u,this.group)),g=h.indicatorLabel;g.attr("invisible",!1);var p=this._applyTransform("left",h.barGroup),m=this._orient;g.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===m?p:"middle",textAlign:"horizontal"===m?"center":p,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=eL(iL(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=eL(iL(o[0],t),o[1]);var r=lm(i,a,o),s=[t-r,t+r],l=QD(t,o,a,!0),h=[QD(s[0],o,a,!0),QD(s[1],o,a,!0)];s[0]o[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",r):h[1]===1/0?this._showIndicator(l,h[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var u=this._hoverLinkDataIndices,c=[];(e||hm(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=Wo(u,c);this._dispatchHighDown("downplay",om(d[0])),this._dispatchHighDown("highlight",om(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.getDimension(i.getDataDimension(o)),r=o.get(a,e.dataIndex,!0);isNaN(r)||this._showIndicator(r,r)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",om(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=Mo(e,n?null:this.group);return Tb[y(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});ir({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),tr(VD);var rL=YD.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){rL.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();sL[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=i(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=f(this._pieceList,function(t){var t=i(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(b(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=jI.listVisualTypes(),o=this.isCategory();d(e.pieces,function(t){d(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.stateList,function(t){(e[t]||(e[t]={}))[n]=BD.get(n,"inRange"===t?"active":"inactive",o)})},this),YD.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;d(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=i(t)},getValueState:function(t){var e=jI.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){jI.findPieceIndex(e,this._pieceList)===t&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var r=o.getRepresentValue({interval:e});a||(a=o.getValueState(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],o=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),sL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};JD.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),a=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),h=l.endsText,u=I(e.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],s,u,r),d(l.viewPieceList,function(n){var l=n.piece,h=new jy;h.onclick=m(this._onItemClick,this,l),this._enableHoverLink(h,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(h,c,[0,0,s[0],s[1]]),u){var d=this.visualMapModel.getValueState(c);h.add(new ib({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}t.add(h)},this),h&&this._renderEndsText(t,h[1],s,u,r),Hb(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:om(i.findTargetDataIndices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return nm(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new jy,r=this.visualMapModel.textStyleModel;a.add(new ib({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=f(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Hr(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,o=i(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}});tr(VD);var lL=Vi,hL=Gi,uL=sr({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(Uv.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var o=this.constructor,r=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),s=t[r];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&dm(i),d(i.data,function(t){t instanceof Array?(dm(t[0]),dm(t[1])):dm(t)}),a(s=new o(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[r]=s):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,lL).join(", "):lL(i),o=e.getName(t),a=hL(this.name);return(null!=i||o)&&(a+="
"),o&&(a+=hL(o),null!=i&&(a+=" : ")),null!=i&&(a+=hL(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});u(uL,Nb),uL.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}});var cL=l,dL=v,fL={min:dL(mm,"min"),max:dL(mm,"max"),average:dL(mm,"average")},gL=lr({type:"marker",init:function(){this.markerGroupMap=z()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});gL.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(wm(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new ts),h=Sm(o,t,e);e.setData(h),wm(e.getData(),t,n),h.each(function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markPoint=t.markPoint||{}}),uL.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},lineStyle:{normal:{type:"dashed"},emphasis:{width:3}},animationEasing:"linear"}});var pL=function(t,e,o,r){var s=t.getData(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||null!=r.xAxis||null!=r.yAxis)){var h,u;if(null!=r.yAxis||null!=r.xAxis)h=null!=r.yAxis?"y":"x",e.getAxis(h),u=I(r.yAxis,r.xAxis);else{var c=ym(r,s,e,t);h=c.valueDataDim,c.valueAxis,u=bm(s,h,l)}var d="x"===h?0:1,f=1-d,g=i(r),p={};g.type=null,g.coord=[],p.coord=[],g.coord[f]=-1/0,p.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof u&&(u=+u.toFixed(Math.min(m,20))),g.coord[d]=p.coord[d]=u,r=[g,p,{type:l,valueIndex:r.valueIndex,value:u}]}return r=[vm(t,r[0]),vm(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};gL.extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){Am(o,e,!0,t,i),Am(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);Am(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||p[o?0:1],symbol:a.get("symbol",!0)||g[o?0:1],color:a.get("itemStyle.normal.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(r)||l.set(r,new Mu);this.group.add(h.group);var u=Cm(a,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setData(f);var g=e.get("symbol"),p=e.get("symbolSize");y(g)||(g=[g,g]),"number"==typeof p&&(p=[p,p]),u.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.normal.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),h.updateData(f),u.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markLine=t.markLine||{}}),uL.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemStyle:{normal:{borderWidth:0}}}});var mL=function(t,e,i,n){var a=vm(t,n[0]),r=vm(t,n[1]),s=I,l=a.coord,h=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=o([{},a,r]);return u.coord=[a.coord,r.coord],u.x0=a.x,u.y0=a.y,u.x1=r.x,u.y1=r.y,u},vL=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];gL.extend({type:"markArea",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=f(vL,function(o){return Pm(n,e,o,t,i)});n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.name,s=t.getData(),l=this.markerGroupMap,h=l.get(a)||l.set(a,{group:new jy});this.group.add(h.group),h.__keep=!0;var u=Om(o,t,e);e.setData(u),u.each(function(e){u.setItemLayout(e,f(vL,function(i){return Pm(u,e,i,t,n)})),u.setItemVisual(e,{color:s.getVisual("color")})}),u.diff(h.__data).add(function(t){var e=new ub({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),h.group.add(e)}).update(function(t,i){var n=h.__data.getItemGraphicEl(i);wo(n,{shape:{points:u.getItemLayout(t)}},e,t),h.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=h.__data.getItemGraphicEl(t);h.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,i){var n=u.getItemModel(i),o=n.getModel("label.normal"),a=n.getModel("label.emphasis"),s=u.getItemVisual(i,"color");t.useStyle(r(n.getModel("itemStyle.normal").getItemStyle(),{fill:Pt(s,.4),stroke:s})),t.hoverStyle=n.getModel("itemStyle.emphasis").getItemStyle(),co(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:s}),uo(t,{}),t.dataModel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),tr(function(t){t.markArea=t.markArea||{}});Ub.registerSubTypeDefaulter("timeline",function(){return"slider"}),ir({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),r({currentIndex:i.option.currentIndex},t)}),ir({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var yL=Ub.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{normal:{},emphasis:{}},label:{normal:{color:"#000"},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){yL.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=No(t);b(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new aS([{name:"value",type:r}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});u(yL.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",normal:{show:!0,interval:"auto",rotate:0,color:"#304654"},emphasis:{show:!0,color:"#c23531"}},itemStyle:{normal:{color:"#304654",borderWidth:1},emphasis:{color:"#c23531"}},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",normal:{color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Nb);var xL=xw.extend({type:"timeline"}),_L=function(t,e,i,n){US.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};_L.prototype={constructor:_L,getLabelInterval:function(){var t=this.model,e=t.getModel("label.normal"),i=e.get("interval");return null!=i&&"auto"!=i?i:((i=this._autoLabelInterval)||(i=this._autoLabelInterval=Rr(f(this.scale.getTicks(),this.dataToCoord,this),Vr(this,e.get("formatter")),e.getFont(),"horizontal"===t.get("orient")?0:90,e.get("rotate"))),i)},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},h(_L,US);var bL=m,wL=d,SL=Math.PI;xL.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return Gi(s.scale.getLabel(t))},wL(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.normal.position"),n=t.get("orient"),o=Rm(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:SL/2},l="vertical"===n?o.height:o.width,h=t.getModel("controlStyle"),u=h.get("show"),c=u?h.get("itemSize"):0,d=u?h.get("itemGap"):0,f=c+d,g=t.get("label.normal.rotate")||0;g=g*SL/180;var p,m,v,y,x=h.get("position",!0),_=(u=h.get("show",!0))&&h.get("showPlayBtn",!0),b=u&&h.get("showPrevBtn",!0),w=u&&h.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(p=[0,0],S+=f),b&&(m=[S,0],S+=f),w&&(v=[M-c,0],M-=f)):(_&&(p=[M-c,0],M-=f),b&&(m=[0,0],S+=f),w&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:l,orient:n,rotation:s[n],labelRotation:g,labelPosOpt:i,labelAlign:t.get("label.normal.align")||a[n],labelBaseline:t.get("label.normal.verticalAlign")||t.get("label.normal.baseline")||r[n],playPosition:p,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._mainGroup,r=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=ot(),h=s.x,u=s.y+s.height;lt(l,l,[-h,-u]),ht(l,l,-SL/2),lt(l,l,[h,u]),(s=s.clone()).applyTransform(l)}var c=n(s),d=n(a.getBoundingRect()),f=n(r.getBoundingRect()),g=a.position,p=r.position;p[0]=g[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m))o(g,d,c,1,v="+"===m?0:1),o(p,f,c,1,1-v);else{var v=m>=0?0:1;o(g,d,c,1,v),p[1]=g[1]+m}a.attr("position",g),r.attr("position",p),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Er(e,n),a=i.getDataExtent("value");o.setExtent(a[0],a[1]),this._customizeScale(o,i),o.niceTicks();var r=new _L("value",o,t.axisExtent,n);return r.model=e,r},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],function(t){return t})},t.getTicksLabels=function(){return f(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new jy;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new fb({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();wL(a,function(t,a){var r=i.dataToCoord(t),s=o.getItemModel(a),l=s.getModel("itemStyle.normal"),h=s.getModel("itemStyle.emphasis"),u={position:[r,0],onclick:bL(this._changeTimeline,this,a)},c=Bm(s,l,e,u);uo(c,h.getItemStyle()),s.get("tooltip")?(c.dataIndex=a,c.dataModel=n):c.dataIndex=c.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var o=n.getModel("label.normal");if(o.get("show")){var a=n.getData(),r=i.scale.getTicks(),s=Vr(i,o.get("formatter")),l=i.getLabelInterval();wL(r,function(n,o){if(!i.isLabelIgnored(o,l)){var r=a.getItemModel(o),h=r.getModel("label.normal"),u=r.getModel("label.emphasis"),c=i.dataToCoord(n),d=new ib({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:bL(this._changeTimeline,this,o),silent:!1});fo(d.style,h,{text:s[o],textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(d),uo(d,fo({},u))}},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,u){if(t){var c=Vm(n,i,h,{position:t,origin:[a/2,0],rotation:u?-r:0,rectHover:!0,style:s,onclick:o});e.add(c),uo(c,l)}}var a=t.controlSize,r=t.rotation,s=n.getModel("controlStyle.normal").getItemStyle(),l=n.getModel("controlStyle.emphasis").getItemStyle(),h=[0,-a/2,a,a],u=n.getPlayState(),c=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",bL(this._changeTimeline,this,c?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",bL(this._changeTimeline,this,c?"+":"-")),o(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),bL(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=bL(s._handlePointerDrag,s),t.ondragend=bL(s._handlePointerDragend,s),Gm(t,a,i,n,!0)},onUpdate:function(t){Gm(t,a,i,n)}};this._currentPointer=Bm(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Ii(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),ii.getHeight()&&(n.textPosition="top",l=!0);var h=l?-5-o.height:s+8;a+o.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):a-o.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},updateLayout:function(t,e,i,n){d(this._features,function(t){t.updateLayout&&t.updateLayout(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var IL=lD.toolbox.saveAsImage;Hm.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:IL.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:IL.lang.slice()},Hm.prototype.unusable=!Uv.canvasSupported,Hm.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||Uv.browser.ie||Uv.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,n+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},wp("saveAsImage",Hm);var TL=lD.toolbox.magicType;Fm.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(TL.title),option:{},seriesIndex:{}};var AL=Fm.prototype;AL.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var CL={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},DL=[["line","bar"],["stack","tiled"]];AL.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(CL[i]){var a={series:[]};d(DL,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var o=e.subType,s=e.id,l=CL[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var h=e.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:a})}},ir({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),wp("magicType",Fm);var LL=lD.toolbox.dataView,kL=new Array(60).join("-"),PL="\t",OL=new RegExp("["+PL+"]+","g");Qm.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i(LL.title),lang:i(LL.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Qm.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),h=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var u=o.get("optionToContent"),c=o.get("contentToOption"),d=jm(t);if("function"==typeof u){var f=u(e.getOption());"string"==typeof f?l.innerHTML=f:S(f)&&l.appendChild(f)}else l.appendChild(h),h.readOnly=o.get("readOnly"),h.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=o.get("textColor"),h.style.borderColor=o.get("textareaBorderColor"),h.style.backgroundColor=o.get("textareaColor"),h.value=d.value;var g=d.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;si(v,"click",i),si(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Jm(h.value,g)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&p.appendChild(y),p.appendChild(v),si(h,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+PL+e.substring(n),this.selectionStart=this.selectionEnd=i+1,bx(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(p),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},Qm.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Qm.prototype.dispose=function(t,e){this.remove(t,e)},wp("dataView",Qm),ir({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:tv(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(r({series:i},t.newOption))});var zL=d,NL="\0_ec_hist_store";bD.extend({type:"dataZoom.select"}),wD.extend({type:"dataZoom.select"});var EL=lD.toolbox.dataZoom,RL=d,VL="\0_ec_\0toolbox-dataZoom_";rv.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i(EL.title)};var BL=rv.prototype;BL.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,hv(t,e,this,n,i),lv(t,e)},BL.onclick=function(t,e,i){GL[i].call(this)},BL.remove=function(t,e){this._brushController.unmount()},BL.dispose=function(t,e){this._brushController.dispose()};var GL={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(iv(this.ecModel))}};BL._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),h=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==h.minValueSpan&&null==h.maxValueSpan||(i=OT(0,i.slice(),r.scale.getExtent(),0,h.minValueSpan,h.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new rp(sv(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),ev(a,o),this._dispatchZoomAction(o)}},BL._dispatchZoomAction=function(t){var e=[];RL(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},wp("dataZoom",rv),tr(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"==a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"==a||-1!==l(a,i)){var r={type:"select",$fromToolbox:!0,id:VL+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),RL(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);y(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var WL=lD.toolbox.restore;uv.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:WL.title},uv.prototype.onclick=function(t,e,i){nv(t),e.dispatchAction({type:"restore",from:this.uid})},wp("restore",uv),ir({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var HL,FL="urn:schemas-microsoft-com:vml",ZL="undefined"==typeof window?null:window,UL=!1,XL=ZL&&ZL.document;if(XL&&!Uv.canvasSupported)try{!XL.namespaces.zrvml&&XL.namespaces.add("zrvml",FL),HL=function(t){return XL.createElement("')}}catch(t){HL=function(t){return XL.createElement("<"+t+' xmlns="'+FL+'" class="zrvml">')}}var jL=P_.CMD,qL=Math.round,YL=Math.sqrt,$L=Math.abs,KL=Math.cos,JL=Math.sin,QL=Math.max;if(!Uv.canvasSupported){var tk=21600,ek=tk/2,ik=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=tk+","+tk,t.coordorigin="0,0"},nk=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},ok=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},ak=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},rk=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},sk=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},lk=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},hk=function(t,e,i){var n=Mt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=ok(n[0],n[1],n[2]),t.opacity=i*n[3])},uk=function(t){var e=Mt(t);return[ok(e[0],e[1],e[2]),e[3]]},ck=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof yb){var o,a=0,r=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*u,n.y*c],g=[n.x2*u,n.y2*c];d&&($(f,f,d),$(g,g,d));var p=g[0]-f[0],m=g[1]-f[1];(a=180*Math.atan2(p,m)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*u,n.y*c],d=i.transform,v=i.scale,y=u,x=c;r=[(f[0]-h.x)/y,(f[1]-h.y)/x],d&&$(f,f,d),y/=v[0]*tk,x/=v[1]*tk;var _=QL(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorStops.slice();b.sort(function(t,e){return t.offset-e.offset});for(var w=b.length,S=[],M=[],I=0;I=2){var C=S[0][0],D=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=C,t.color2=D,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===o&&(t.focusposition=r.join(","))}else hk(t,n,e.opacity)},dk=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof yb||hk(t,e.stroke,e.opacity)},fk=function(t,e,i,n){var o="fill"==e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof yb&&rk(t,a),a||(a=cv(e)),o?ck(a,i,n):dk(a,i),ak(t,a)):(t[o?"filled":"stroked"]="false",rk(t,a))},gk=[[],[],[]],pk=function(t,e){var i,n,o,a,r,s,l=jL.M,h=jL.C,u=jL.L,c=jL.A,d=jL.Q,f=[],g=t.data,p=t.len();for(a=0;a.01?O&&(z+=.0125):Math.abs(N-C)<1e-4?O&&zA?x-=.0125:x+=.0125:O&&NC?y+=.0125:y-=.0125),f.push(E,qL(((A-D)*M+w)*tk-ek),",",qL(((C-L)*I+S)*tk-ek),",",qL(((A+D)*M+w)*tk-ek),",",qL(((C+L)*I+S)*tk-ek),",",qL((z*M+w)*tk-ek),",",qL((N*I+S)*tk-ek),",",qL((y*M+w)*tk-ek),",",qL((x*I+S)*tk-ek)),r=y,s=x;break;case jL.R:var R=gk[0],V=gk[1];R[0]=g[a++],R[1]=g[a++],V[0]=R[0]+g[a++],V[1]=R[1]+g[a++],e&&($(R,R,e),$(V,V,e)),R[0]=qL(R[0]*tk-ek),V[0]=qL(V[0]*tk-ek),R[1]=qL(R[1]*tk-ek),V[1]=qL(V[1]*tk-ek),f.push(" m ",R[0],",",R[1]," l ",V[0],",",R[1]," l ",V[0],",",V[1]," l ",R[0],",",V[1]);break;case jL.Z:f.push(" x ")}if(i>0){f.push(n);for(var B=0;B100&&(xk=0,yk={});var i,n=_k.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},yk[t]=e,xk++}return e};!function(t,e){cx[t]=e}("measureText",function(t,e){var i=XL;vk||((vk=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",XL.body.appendChild(vk));try{vk.style.font=e}catch(t){}return vk.innerHTML="",vk.appendChild(i.createTextNode(t)),{width:vk.offsetWidth}});for(var wk=new jt,Sk=[px,je,qe,Nn,ib],Mk=0;Mk=o&&h+1>=a){for(var u=[],c=0;c=o&&c+1>=a)return Cv(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},Lv.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 n=this.add(t);n&&(t._dom=n)}}},Lv.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Lv.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},Lv.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},Lv.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},Lv.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Lv.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},Lv.prototype.getSvgProxy=function(t){return t instanceof Nn?Rk:t instanceof qe?Vk:t instanceof ib?Bk:Rk},Lv.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Lv.prototype.getSvgElement=function(t){return t.__svgEl},h(kv,Lv),kv.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getDefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.addDom(o)):o=i.add(a),i.markUsed(e);var s=o.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},kv.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Wy("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},kv.prototype.update=function(t){var e=this;Lv.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},kv.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 Wy("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,n=0,o=i.length;n0){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var h=Array.prototype.slice.call(r.transform);st(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=h}else l.brush(r);var u=this.getSvgElement(r);n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},Pv.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&Lv.prototype.markUsed.call(e,t._dom),t._textDom&&Lv.prototype.markUsed.call(e,t._textDom)})};var Zk=function(t,e){this.root=t,this.storage=e;var i=mv("svg");i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("version","1.1"),i.setAttribute("baseProfile","full"),i.style["user-select"]="none",this.gradientManager=new kv(i),this.clipPathManager=new Pv(i);var n=document.createElement("div");n.style.cssText="overflow: hidden;",this._svgRoot=i,this._viewport=n,t.appendChild(n),n.appendChild(i),this.resize(),this._visibleList=[]};Zk.prototype={constructor:Zk,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,n=this._visibleList,o=t.length,a=[];for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(){var t=this._getWidth(),e=this._getHeight();if(this._width!==t&&this._height!==e){this._width=t,this._height=e;var i=this._viewport.style;i.width=t+"px",i.height=e+"px";var n=this._svgRoot;n.setAttribute("width",t),n.setAttribute("height",e)}},getWidth:function(){return this._getWidth()},getHeight:function(){return this._getHeight()},_getWidth:function(){var t=this.root,e=document.defaultView.getComputedStyle(t);return(t.clientWidth||Ov(e.width))-Ov(e.paddingLeft)-Ov(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=document.defaultView.getComputedStyle(t);return(t.clientHeight||Ov(e.height))-Ov(e.paddingTop)-Ov(e.paddingBottom)|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)}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Zk.prototype[t]=Wv(t)}),xi("svg",Zk),t.version="3.8.4",t.dependencies=Cw,t.PRIORITY=Pw,t.init=function(t,e,i){var n=Qa(t);if(n)return n;var o=new za(t,e,i);return o.id="ec_"+Yw++,jw[o.id]=o,t.setAttribute?t.setAttribute(Kw,o.id):t[Kw]=o.id,Ka(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,d(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+$w++,d(e,function(e){e.group=t})}return qw[t]=!0,t},t.disConnect=Ja,t.disconnect=Qw,t.dispose=function(t){"string"==typeof t?t=jw[t]:t instanceof za||(t=Qa(t)),t instanceof za&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=Qa,t.getInstanceById=function(t){return jw[t]},t.registerTheme=function(t,e){Uw[t]=e},t.registerPreprocessor=tr,t.registerProcessor=er,t.registerPostUpdate=function(t){Fw.push(t)},t.registerAction=ir,t.registerCoordinateSystem=nr,t.getCoordinateSystemDimensions=function(t){var e=ua.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=or,t.registerVisual=ar,t.registerLoading=rr,t.extendComponentModel=sr,t.extendComponentView=lr,t.extendSeriesModel=hr,t.extendChartView=ur,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,i){e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),Jw[t]={geoJson:e,specialAreas:i}},t.getMap=cr,t.dataTool=tS,t.zrender=Nx,t.graphic=Tb,t.number=Bx,t.format=Xx,t.throttle=Da,t.helper=HS,t.matrix=yy,t.vector=cy,t.color=Ny,t.util=qS,t.List=aS,t.Model=Lo,t.Axis=US,t.env=Uv,t.parseGeoJson=jS}); + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);o&&(e.edge=!0,e.version=o[1]);a&&(e.weChat=!0);return{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&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[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},u=Object.prototype.toString,i=Array.prototype,r=i.forEach,h=i.filter,o=i.slice,c=i.map,d=i.reduce,a={};function f(t,e){"createCanvas"===t&&(g=null),a[t]=e}function k(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,o=t.length;n>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",o[u]+":0",n[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(e,a),a,o);if(r)return r(t,i,n),!0}return!1}function zt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Bt="undefined"!=typeof window&&!!window.addEventListener,Vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[];function Ft(t,e,i,n){return i=i||{},n||!v.canvasSupported?Wt(t,e,i):v.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):Wt(t,e,i),i}function Wt(t,e,i){if(v.domSupported&&t.getBoundingClientRect){var n=e.clientX,o=e.clientY;if(zt(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=o-a.top)}if(Rt(Gt,t,n,o))return i.zrX=Gt[0],void(i.zrY=Gt[1])}i.zrX=i.zrY=0}function Ht(t){return t||window.event}function Zt(t,e,i){if(null!=(e=Ht(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&Ft(t,o,e,i)}else Ft(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&&Vt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ut(t,e,i,n){Bt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Xt=Bt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yt(t){return 2===t.which||3===t.which}function jt(){this._track=[]}function qt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}jt.prototype={constructor:jt,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 n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;an.getWidth()||i<0||i>n.getHeight()}te.prototype={constructor:te,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(E(ee,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,n=ne(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(i||this.trigger("globalout",{type:"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 n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=function(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,stop:Jt}}(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;0<=a;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=ie(n[a],t,e))&&(o.topTarget||(o.topTarget=n[a]),r!==$t)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new jt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){te.prototype[r]=function(t){var e,i,n=t.zrX,o=t.zrY,a=ne(this,n,o);if("mouseup"===r&&a||(i=(e=this.findHover(n,o)).target),"mousedown"===r)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===r)this._upEl=i;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Ge(t,e),e):void Re(e,0,0,0,1):7===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=16777215?(Re(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Ge(t,e),e):void Re(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Re(e,0,0,0,1);u=Ne(l.pop());case"rgb":return 3!==l.length?void Re(e,0,0,0,1):(Re(e,Pe(l[0]),Pe(l[1]),Pe(l[2]),u),Ge(t,e),e);case"hsla":return 4!==l.length?void Re(e,0,0,0,1):(l[3]=Ne(l[3]),We(l,e),Ge(t,e),e);case"hsl":return 3!==l.length?void Re(e,0,0,0,1):(We(l,e),Ge(t,e),e);default:return}}Re(e,0,0,0,1)}}function We(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ne(t[1]),o=Ne(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return Re(e=e||[],Le(255*Oe(r,a,i+1/3)),Le(255*Oe(r,a,i)),Le(255*Oe(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function He(t,e){var i=Fe(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],T=m[u-2=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Di(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}}},Di.create=function(t){return new Di(t.x,t.y,t.width,t.height)};var Ci=function(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ci.prototype={constructor:Ci,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>>1])<0?l=a:s=1+a;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function Ri(p,g){var r,s,m=ki,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],o=s[t+1];s[t]=i+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=Ei(p[n],p,e,i,0,g);e+=a,0!==(i-=a)&&0!==(o=Oi(p[e+i-1],p,n,o,o-1,g))&&(i<=o?function(t,e,i,n){var o=0;for(o=0;os[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(o);do{if((a=Pi(t,i,n,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===r?bn(t,o,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};C.textWidth=pn(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&sn(T=on(T))&&(S=Math.max(S,T.width*b/T.height))}var A=_?_[1]+_[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&Dn[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else vi("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n=a.length&&a.push({option:t})}}),a}function Zo(t){var r=Q();Eo(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),Eo(t,function(t,e){var i=t.option;Y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyInfo||(t.keyInfo={})}),Eo(t,function(t,e){var i=t.exist,n=t.option,o=t.keyInfo;if(Ro(n)){if(o.name=null!=n.name?n.name+"":i?i.name:Bo+e,i)o.id=i.id;else if(null!=n.id)o.id=n.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function Uo(t){var e=t.name;return!(!e||!e.indexOf(Bo))}function Xo(t){return Ro(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Yo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?L(t.dataIndex)?O(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?L(t.name)?O(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function jo(){var e="__\0ec_inner_"+qo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var qo=0;function Ko(s,l,u){if(R(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||$o(l,e+"Index")||$o(l,e+"Id")||$o(l,e+"Name")||(l[e+"Index"]=0);var h={};return Eo(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],o=(i[2]||"").toLowerCase();if(!(!n||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&_(u.includeMainTypes,n)<0)){var a={mainType:n};"index"===o&&"all"===t||(a[o]=t);var r=s.queryComponents(a);h[n+"Models"]=r,h[n+"Model"]=r[0]}}else h[e]=t}),h}function $o(t,e){return t&&t.hasOwnProperty(e)}function Jo(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Qo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function ta(t,i){var n=Q(),o=[];return E(t,function(t){var e=i(t);(n.get(e)||(o.push(e),n.set(e,[]))).push(t)}),{keys:o,buckets:n}}var ea=".",ia="___EC__COMPONENT__CONTAINER___";function na(t){var e={main:"",sub:""};return t&&(t=t.split(ea),e.main=t[0]||"",e.sub=t[1]||""),e}function oa(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return P(e.prototype,t),e.extend=this.extend,e.superCall=sa,e.superApply=la,w(e,this),e.superClass=i,e}}var aa=0;function ra(t){var e=["__\0is_clz",aa++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function sa(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function la(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ua(i,t){t=t||{};var o={};if(i.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=na(e)).sub){if(e.sub!==ia){(function(t){var e=o[t.main];e&&e[ia]||((e=o[t.main]={})[ia]=!0);return e})(e)[e.sub]=t}}else o[e.main]=t;return t},i.getClass=function(t,e,i){var n=o[t];if(n&&n[ia]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=na(t);var i=[],e=o[t.main];return e&&e[ia]?E(e,function(t,e){e!==ia&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=na(t),!!o[t.main]},i.getAllClassMainTypes=function(){var i=[];return E(o,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=na(t);var e=o[t.main];return e&&e[ia]},i.parseClassType=na,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function ha(s){for(var t=0;tthis._ux||or(e-this._yi)>this._uy||this._len<5;return this.addData(ja.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,n,o,a){return this.addData(ja.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(ja.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(ja.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=er(o)*i+t,this._yi=ir(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ja.R,t,e,i,n),this},closePath:function(){this.addData(ja.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;for(var e=this._dashIdx=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;il||or(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case ja.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m=yr[n=0]+t&&r<=yr[1]+t?h:0}if(a){l=n;n=cr(o),o=cr(l)}else n=cr(n),o=cr(o);oMath.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Sr(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;hMath.abs(a[1])?0=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Rl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Bl(t){return t.sort(function(t,e){return t-e}),t}function Vl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Gl(t){var e=t.toString(),i=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var Hl=9007199254740991;function Zl(t){var e=2*Math.PI;return(t%e+e)%e}function Ul(t){return-Ol"'])/g,ou={"&":"&","<":"<",">":">",'"':""","'":"'"};function au(t){return null==t?"":(t+"").replace(nu,function(t,e){return ou[e]})}function ru(t,e){return"{"+t+(null==e?"":e)+"}"}var su=["a","b","c","d","e","f","g"];function lu(t,e,i){L(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function cu(t,e){return"0000".substr(0,e-(t+="").length)+t}function du(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yl(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",cu(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",cu(s,2)).replace("d",s).replace("hh",cu(l,2)).replace("h",l).replace("mm",cu(u,2)).replace("m",u).replace("ss",cu(h,2)).replace("s",h).replace("SSS",cu(c,3))}function fu(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var pu=xn;function gu(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}var mu=(Object.freeze||Object)({addCommas:tu,toCamelCase:eu,normalizeCssArray:iu,encodeHTML:au,formatTpl:lu,formatTplSimple:uu,getTooltipMarker:hu,formatTime:du,capitalFirst:fu,truncateText:pu,getTextBoundingRect:function(t){return gn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return gn(t,e,i,n,o,s,a,r)},windowOpen:gu}),vu=E,yu=["left","right","top","bottom","width","height"],xu=[["width","left","right"],["height","top","bottom"]];function _u(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,o=t.position,a=t.getBoundingRect(),r=c.childAt(e+1),s=r&&r.getBoundingRect();if("horizontal"===h){var l=a.width+(s?-s.x+a.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,a.height):Math.max(v,a.height)}else{var u=a.height+(s?-s.y+a.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,a.width):Math.max(v,a.width)}t.newline||(o[0]=g,o[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var wu=_u;T(_u,"vertical"),T(_u,"horizontal");function bu(t,e,i){i=iu(i||0);var n=e.width,o=e.height,a=Rl(t.left,n),r=Rl(t.top,o),s=Rl(t.right,n),l=Rl(t.bottom,o),u=Rl(t.width,n),h=Rl(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(n/oe)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},zu="original",Bu="arrayRows",Vu="objectRows",Gu="keyedColumns",Fu="unknown",Wu="typedArray",Hu="column",Zu="row";function Uu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Gu?{}:[]),this.sourceFormat=t.sourceFormat||Fu,this.seriesLayoutBy=t.seriesLayoutBy||Hu,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Uu.seriesDataToSource=function(t){return new Uu({data:t,sourceFormat:V(t)?Wu:zu,fromDataset:!1})},ra(Uu);var Xu={Must:1,Might:2,Not:3},Yu=jo();function ju(t){var e=t.option,i=e.data,n=V(i)?Wu:zu,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=Qu(t);if(l){var u=l.option;i=u.source,n=Yu(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,o){if(!t)return{dimensionsDefine:qu(o)};var a,r;if(e===Bu)"auto"===n||null==n?Ku(function(t){null!=t&&"-"!==t&&(R(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],Ku(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===Zu?t.length:t[0]?t[0].length:null;else if(e===Vu)o=o||function(t){var e,i=0;for(;i":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:au(tu(t)),style:p}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,r=this.getRawValue(o),s=L(r),v=m.getItemVisual(o,"color");z(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(r):i(n?Hh(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=hu({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(o),_=this.name;Uo(this)||(_=""),_=_?au(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?au(x)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=Ru.getColorFromPalette.call(this,t,e,i);return o=o||n.getColorFromPalette(t,e,i)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function lc(t){var e=t.name;Uo(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return E(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function uc(t){return t.model.getRawData().count()}function hc(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),cc}function cc(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function dc(e,i){E(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,T(fc,i))})}function fc(t){var e=pc(t);e&&e.setOutputEnd(this.count())}function pc(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}b(sc,Xh),b(sc,Ru);var gc=function(){this.group=new Ci,this.uid=Nl("viewComponent")};gc.prototype={constructor:gc,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var mc=gc.prototype;mc.updateView=mc.updateLayout=mc.updateVisual=function(t,e,i,n){},oa(gc),ua(gc,{registerWhenExtend:!0});function vc(){var s=jo();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,o=e.progressiveRender,a=e.large=i&&i.large,r=e.progressiveRender=i&&i.progressiveRender;return!!(n^a||o^r)&&"reset"}}var yc=jo(),xc=vc();function _c(){this.group=new Ci,this.uid=Nl("viewChart"),this.renderTask=Yh({plan:Mc,reset:Ic}),this.renderTask.context={view:this}}var wc=_c.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Sc(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Sc(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function bc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Qs(t)))for(var n=0,o=t.childCount();nc?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var r=[],s=0;si.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},Bc.getPipeline=function(t){return this._pipelineMap.get(t)},Bc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},Bc.restorePipelines=function(t){var n=this,o=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;o.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Kc(n,t,t.dataTask)})},Bc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),o=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,o,t,a,r){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=o.seriesType,i=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):i&&i(a,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Yh({plan:Uc,reset:Xc,count:qc}));i.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:n},Kc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,o),t.overallReset&&function(n,t,e,i,o){var a=e.overallTask=e.overallTask||Yh({reset:Fc});a.context={ecModel:i,api:o,overallReset:t.overallReset,scheduler:n};var r=a.agentStubMap=a.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,o).each(c):(u=!1,E(i.getSeries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,Yh({reset:Wc,onDirty:Zc})),a.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=a,i.__block=u,Kc(n,t,i)}var d=n._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))})}(this,t,e,n,o)},this)},Bc.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,Kc(this,e,o)},Bc.performDataProcessorTasks=function(t,e){Vc(this,this._dataProcessorHandlers,t,e,{block:!0})},Bc.performVisualTasks=function(t,e,i){Vc(this,this._visualHandlers,t,e,i)},Bc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Bc.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Gc=Bc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Fc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Wc(t,e){return t.overallProgress&&Hc}function Hc(){this.agent.dirty(),this.getDownstream().dirty()}function Zc(){this.agent&&this.agent.dirty()}function Uc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Xc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Vo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),p.painter.getSvgRoot().innerHTML=g,o.connectedBackgroundColor&&p.painter.setBackgroundColor(o.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}return o.connectedBackgroundColor&&p.add(new rs({shape:{x:0,y:0,width:t,height:e},style:{fill:o.connectedBackgroundColor}})),Td(f,function(t){var e=new Qn({style:{x:t.left*i-u,y:t.top*i-h,image:t.dom}});p.add(e)}),p.refreshImmediately(),n.toDataURL("image/"+(o&&o.type||"png"))}return this.getDataURL(o)}},zd.convertToPixel=T(Bd,"convertToPixel"),zd.convertFromPixel=T(Bd,"convertFromPixel"),zd.containPixel=function(t,o){var a;if(!this._disposed)return E(t=Ko(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint)a|=!!e.containPoint(o);else if("seriesModels"===n){var i=this._chartsMap[t.__viewId];i&&i.containPoint&&(a|=i.containPoint(o,t))}},this)},this),!!a},zd.getVisual=function(t,e){var i=(t=Ko(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},zd.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},zd.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Vd={prepareAndUpdate:function(t){Gd(this),Vd.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),Wd(this,e),o.update(e,i),Yd(e),a.performVisualTasks(e,t),jd(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(v.canvasSupported)n.setBackgroundColor(r);else{var s=Fe(r);r=$e(s,"rgb"),0===s[3]&&(r="transparent")}Kd(e,i)}},updateTransform:function(o){var a=this._model,r=this,s=this._api;if(a){var l=[];a.eachComponent(function(t,e){var i=r.getViewOfComponentModel(e);if(i&&i.__alive)if(i.updateTransform){var n=i.updateTransform(e,a,s,o);n&&n.update&&l.push(i)}else l.push(i)});var n=Q();a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];if(e.updateTransform){var i=e.updateTransform(t,a,s,o);i&&i.update&&n.set(t.uid,1)}else n.set(t.uid,1)}),Yd(a),this._scheduler.performVisualTasks(a,o,{setDirty:!0,dirtyMap:n}),qd(r,a,s,o,n),Kd(a,this._api)}},updateView:function(t){var e=this._model;e&&(_c.markUpdateMethod(t,"updateView"),Yd(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),jd(this,this._model,this._api,t),Kd(e,this._api))},updateVisual:function(t){Vd.update.call(this,t)},updateLayout:function(t){Vd.update.call(this,t)}};function Gd(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),Xd(t,"component",e,i),Xd(t,"chart",e,i),i.plan()}function Fd(e,i,n,o,t){var a=e._model;if(o){var r={};r[o+"Id"]=n[o+"Id"],r[o+"Index"]=n[o+"Index"],r[o+"Name"]=n[o+"Name"];var s={mainType:o,query:r};t&&(s.subType=t);var l=n.excludeSeriesId;null!=l&&(l=Q(Vo(l))),a&&a.eachComponent(s,function(t){l&&null!=l.get(t.id)||u(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else Td(e._componentsViews.concat(e._chartsViews),u);function u(t){t&&t.__alive&&t[i]&&t[i](t.__model,a,e._api,n)}}function Wd(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Hd(e,t){var i=e.type,n=e.escapeConnect,o=tf[i],a=o.actionInfo,r=(a.update||"update").split(":"),s=r.pop();r=null!=r[0]&&Cd(r[0]),this[kd]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=O(e.batch,function(t){return(t=D(P({},t),e)).batch=null,t}));var h,c=[],d="highlight"===i||"downplay"===i;Td(l,function(t){(h=(h=o.action(t,this._model,this._api))||P({},t)).type=a.event||h.type,c.push(h),d?Fd(this,s,t,"series"):r&&Fd(this,s,t,r.main,r.sub)},this),"none"===s||d||r||(this[Pd]?(Gd(this),Vd.update.call(this,e),this[Pd]=!1):Vd[s].call(this,e)),h=u?{type:a.event||i,escapeConnect:n,batch:c}:c[0],this[kd]=!1,t||this._messageCenter.trigger(h.type,h)}function Zd(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Hd.call(this,i,t)}}function Ud(t){t||this.trigger("updated")}function Xd(t,e,o,a){for(var r="component"===e,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,i=0;it.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),Ec(n._zr.dom,t)}function Kd(e,i){Td(af,function(t){t(e,i)})}zd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[kd]=!0,i&&Gd(this),Vd.update.call(this),this[kd]=!1,Zd.call(this,n),Ud.call(this,n)}}},zd.showLoading=function(t,e){if(!this._disposed&&(Dd(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),lf[t])){var i=lf[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},zd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},zd.makeActionFromEvent=function(t){var e=P({},t);return e.type=ef[t.type],e},zd.dispatchAction=function(t,e){this._disposed||(Dd(e)||(e={silent:!!e}),tf[t.type]&&this._model&&(this[kd]?this._pendingActions.push(t):(Hd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Zd.call(this,e.silent),Ud.call(this,e.silent))))},zd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},zd.on=Od("on",!1),zd.off=Od("off",!1),zd.one=Od("one",!1);var $d=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Jd(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Qd(){this.eventInfo}zd._initEvents=function(){Td($d,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var o=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=o&&o.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=P({},n.eventData));if(e){var a=e.componentType,r=e.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",r=e.seriesIndex);var s=a&&null!=r&&i.getComponent(a,r),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),Td(ef,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},zd.isDisposed=function(){return this._disposed},zd.clear=function(){this._disposed||this.setOption({series:[]},!0)},zd.dispose=function(){if(!this._disposed){this._disposed=!0,Jo(this.getDom(),ff,"");var e=this._api,i=this._model;Td(this._componentsViews,function(t){t.dispose(i,e)}),Td(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete uf[this.id]}},b(Rd,Ct),Qd.prototype={constructor:Qd,normalizeQuery:function(t){var s={},l={},u={};if(R(t)){var e=Cd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};E(t,function(t,e){for(var i=!1,n=0;nx[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Kf(this)},jf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&it))return a;o=a-1}}return-1},jf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=1/0,a=-1,r=0,s=0,l=this.count();st[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return rw[1]&&(w[1]=_)}}}return o},jf.downSample=function(t,e,i,n){for(var o=ip(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Hf(this))(u),f=0,p=0;pc[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=Qf,o},jf.getItemModel=function(t){var e=this.hostModel;return new Cl(this.getRawDataItem(t),e,e&&e.ecModel)},jf.diff=function(e){var i=this;return new kf(e?e.getIndices():[],this.getIndices(),function(t){return tp(e,t)},function(t){return tp(i,t)})},jf.getVisual=function(t){var e=this._visual;return e&&e[t]},jf.setVisual=function(t,e){if(zf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},jf.setLayout=function(t,e){if(zf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},jf.getLayout=function(t){return this._layout[t]},jf.getItemLayout=function(t){return this._itemLayouts[t]},jf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?P(this._itemLayouts[t]||{},e):e},jf.clearItemLayouts=function(){this._itemLayouts.length=0},jf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},jf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,zf(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},jf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function ap(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function rp(t,e,i){Uu.isInstance(e)||(e=Uu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),o=Q(),a=Q(),l=[],r=function(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return E(e,function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))}),o}(e,t,n,i.dimCount),s=0;s=e[0]&&t<=e[1]},mp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},mp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},mp.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},mp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},mp.prototype.getExtent=function(){return this._extent.slice()},mp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},mp.prototype.isBlank=function(){return this._isBlank},mp.prototype.setBlank=function(t){this._isBlank=t},mp.prototype.getLabel=null,oa(mp),ua(mp,{registerWhenExtend:!0}),vp.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&O(i,_p);return new vp({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var yp=vp.prototype;function xp(t){return t._map||(t._map=Q(t.categories))}function _p(t){return z(t)&&null!=t.value?t.value:t+""}yp.getOrdinal=function(t){return xp(this).get(t)},yp.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=xp(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var wp=mp.prototype,bp=mp.extend({type:"ordinal",init:function(t,e){t&&!L(t)||(t=new vp({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),wp.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return wp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(wp.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:et,niceExtent:et});bp.create=function(){return new bp};var Sp=zl;function Mp(t){return Gl(t)+2}function Ip(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Tp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Ip(t,0,e),Ip(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Ap=zl,Dp=mp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),Dp.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Mp(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;i[0]s&&(t?a.push(Ap(s+e,o)):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;on[0]&&h>>1;t[o][1]>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}Ag.prototype={constructor:Ag,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;ss[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=zl(t),e=zl(e),c?en[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var xm=Ar.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=ym(i,e.smoothConstraint);if(e.connectNulls){for(;0n)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return E(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Cm(t,e,i){if("cartesian2d"!==t.type)return bm(t,e,i);var n=t.getBaseAxis().isHorizontal(),o=wm(t,e,i);if(!i.get("clip",!0)){var a=o.shape,r=Math.max(a.width,a.height);n?(a.y-=r,a.height+=2*r):(a.x-=r,a.width+=2*r)}return o}_c.extend({type:"line",init:function(){var t=new Ci,e=new im;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();oh[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";E(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new gs(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(a,n)||a.getVisual("color");d.useStyle(D(r.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Tm(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(D(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=Tm(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(r=new Xg(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else _c.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(null!=a&&0<=a){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else _c.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new xm({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new _m({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,o,a,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=sm(o,e,r),v=sm(a,t,s),y=0;ye&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(zm,Gg);var Bm={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Vm={};Vm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Bm),Vm.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Bm),Vm.timeAxis=D({scale:!0,min:"dataMin",max:"dataMax"},Vm.valueAxis),Vm.logAxis=D({scale:!0,logBase:10},Vm.valueAxis);function Gm(a,t,r,e){E(Fm,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Iu(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),i&&Mu(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=vp.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:p([{},Vm[o+"Axis"],e],!0)})}),ku.registerSubTypeDefaulter(a+"Axis",T(r,a))}var Fm=["value","category","time","log"],Wm=ku.extend({type:"cartesian2dAxis",axis:null,init:function(){Wm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Wm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Wm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Hm(t,e){return e.type||(e.data?"category":"value")}m(Wm.prototype,dg);var Zm={offset:0};function Um(t,e){return t.getCoordSysModel()===e}function Xm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}Gm("x",Wm,Hm,Zm),Gm("y",Wm,Hm,Zm),ku.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Ym=Xm.prototype;function jm(t,e,i,n){i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)qm(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&qm(a[u])&&!n[h(a[u])]){o=a[u];break}o&&(n[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function qm(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,sv(a)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*tv/180),sv(a)?n=nv(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var o,a,r=Zl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;o=Ul(r-tv/2)?(a=l?"bottom":"top","center"):Ul(r-1.5*tv)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*tv&&tv/2l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=i.r0}}});var ny=Math.PI/180;function oy(o,t,e,i,n,a,r,s,l,u){function h(t,e,i){for(var n=t;nl+r);n++)if(o[n].y+=i,to[n].y+o[n].height)return void c(n,i/2);c(e-1,i/2)}function c(t,e){for(var i=t;0<=i&&!(o[i].y-eo[i-1].y+o[i-1].height));i--);}function d(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?v.push(o[y]):m.push(o[y]);d(m,!1,t,e,i,n),d(v,!0,t,e,i,n)}function ay(t){return"center"===t.position}function ry(L,k,P,t,N,e){var O,E,R=L.getData(),z=[],B=!1,V=(L.get("minShowLabelAngle")||0)*ny;R.each(function(t){var e=R.getItemLayout(t),i=R.getItemModel(t),n=i.getModel("label"),o=n.get("position")||i.get("emphasis.label.position"),a=n.get("distanceToLabelLine"),r=n.get("alignTo"),s=Rl(n.get("margin"),P),l=n.get("bleedMargin"),u=n.getFont(),h=i.getModel("labelLine"),c=h.get("length");c=Rl(c,P);var d=h.get("length2");if(d=Rl(d,P),!(e.anglei[0]&&isFinite(h)&&isFinite(i[0]););else{var l=o.getTicks().length-1;c"+O(t,function(t,e){var i=o.get(o.mapDimension(t.dim),n);return au(t.name+" : "+i)}).join("
")},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(O(i.dimensions,function(t){return e.mapDimension(t)}),t,!0),o=0,a=n.length;o"+au(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}}),jv);var Ry="\0_ec_interaction_mutex";function zy(t,e){return!!By(t)[e]}function By(t){return t[Ry]||(t[Ry]={})}function Vy(i){this.pointerChecker,this._zr=i,this._opt={};var t=A,n=t(Gy,this),o=t(Fy,this),a=t(Wy,this),r=t(Hy,this),s=t(Zy,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=D(k(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",o),i.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",o),i.off("mouseup",a),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Gy(t){if(!(Yt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Fy(t){if(this._dragging&&Yy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!zy(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Xt(t.event),Xy(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function Wy(t){Yt(t)||(this._dragging=!1)}function Hy(t){var e=Yy("zoomOnMouseWheel",t,this._opt),i=Yy("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;ei&&(i=t.depth)});var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:i;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return au(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var zx=Cs({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,a=i[0],r=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Rl(e.forkPosition,1),c=[];c[l]=o[l],c[u]=o[u]+(r[u]-o[u])*h,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;dx.x)||(m-=Math.PI);var b=v?"left":"right",S=a.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:a.labelModel.get("position")||b,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(t,e,i,n,o,a,r,s,l){var u=l.edgeShape,h=n.__edge;if("curve"===u)e.parentNode&&e.parentNode!==i&&cl(h=h||(n.__edge=new ds({shape:Wx(l,o,o),style:D({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:Wx(l,a,r),style:{opacity:1}},t);else if("polyline"===u&&"orthogonal"===l.layout&&e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var c=e.children,d=[],f=0;fh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Hx(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Px(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),Hx(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Hx(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}(t,e)})}),sc.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;L(e)&&(e=e[0]),n+=e});var e=t.value;L(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);L(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[],o=O((n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(E(t=t||[],function(t){var e=new Cl(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e))||[],function(t){return new Cl(t,this,e)},this),a=Ax.createTree(i,this,null,function(t){t.wrapMethod("getItemModel",function(t,e){var i=a.getNodeByDataIndex(e),n=o[i.depth];return n&&(t.parentModel=n),t})});return a.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=L(i)?tu(i[0]):tu(i);return au(e.getName(t)+": "+n)},getDataParams:function(t){var e=sc.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Yx(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},P(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var jx=5;function qx(t){this.group=new Ci,t.add(this.group)}function Kx(t,e,i,n,o,a){var r=[[o?t:t-jx,e],[t+i,e],[t+i,e+n],[o?t:t-jx,e+n]];return a||r.splice(2,0,[t+i+jx,e+n/2]),o||r.push([t,e+n/2]),r}qx.prototype={constructor:qx,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),Su(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,o=e.height,a=Rl(t.x,n),r=Rl(t.y,o),s=Rl(t.x2,n),l=Rl(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=iu(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new Qr({shape:{points:Kx(s,0,m,u,f===d.length-1,0===f)},style:D(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:T(o,g)});this.group.add(y),a=t,r=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:a.componentIndex,seriesIndex:a.componentIndex,seriesName:a.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Yx(r,a)},s+=m+8}},remove:function(){this.group.removeAll()}};function $x(t){var e=s_(t);return e.stroke=e.fill=e.lineWidth=null,e}var Jx=A,Qx=Ci,t_=rs,e_=E,i_=["label"],n_=["emphasis","label"],o_=["upperLabel"],a_=["emphasis","upperLabel"],r_=10,s_=ha([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function l_(h,r,s,l,u,e,c,t,i,n){if(c){var d=c.getLayout(),o=h.getData();if(o.setItemGraphicEl(c.dataIndex,null),d&&d.isInView){var f=d.width,p=d.height,g=d.borderWidth,m=d.invisible,v=c.getRawIndex(),y=t&&t.getRawIndex(),a=c.viewChildren,x=d.upperHeight,_=a&&a.length,w=c.getModel("itemStyle"),b=c.getModel("emphasis.itemStyle"),S=L("nodeGroup",Qx);if(S){if(i.add(S),S.attr("position",[d.x||0,d.y||0]),S.__tmNodeWidth=f,S.__tmNodeHeight=p,d.isAboveViewRoot)return S;var M=c.getModel(),I=L("background",t_,n,1);if(I&&function(t,e,i){if(e.dataIndex=c.dataIndex,e.seriesIndex=h.seriesIndex,e.setShape({x:0,y:0,width:f,height:p}),m)A(e);else{e.invisible=!1;var n=c.getVisual("borderColor",!0),o=b.get("borderColor"),a=$x(w);a.fill=n;var r=s_(b);if(r.fill=o,i){var s=f-2*g;D(a,r,n,s,x,{x:g,y:0,width:s,height:x})}else a.text=r.text=null;e.setStyle(a),Us(e,r)}t.add(e)}(S,I,_&&d.upperLabelHeight),_)Qs(S)&&Js(S,!1),I&&(Js(I,!0),o.setItemGraphicEl(c.dataIndex,I));else{var T=L("content",t_,n,2);T&&function(t,e){e.dataIndex=c.dataIndex,e.seriesIndex=h.seriesIndex;var i=Math.max(f-2*g,0),n=Math.max(p-2*g,0);if(e.culling=!0,e.setShape({x:g,y:g,width:i,height:n}),m)A(e);else{e.invisible=!1;var o=c.getVisual("color",!0),a=$x(w);a.fill=o;var r=s_(b);D(a,r,o,i,n),e.setStyle(a),Us(e,r)}t.add(e)}(S,T),I&&Qs(I)&&Js(I,!1),Js(S,!0),o.setItemGraphicEl(c.dataIndex,S)}return S}}}function A(t){t.invisible||e.push(t)}function D(t,e,i,n,o,a){var r=M.get("name"),s=M.getModel(a?o_:i_),l=M.getModel(a?a_:n_),u=s.getShallow("show");el(t,e,s,l,{defaultText:u?r:null,autoColor:i,isRectText:!0,labelFetcher:h,labelDataIndex:c.dataIndex,labelProp:a?"upperLabel":"label"}),C(t,a,d),C(e,a,d),a&&(t.textRect=k(a)),t.truncate=u&&s.get("ellipsis")?{outerWidth:n,outerHeight:o,minChar:2}:null}function C(t,e,i){var n=t.text;if(!e&&i.isLeafRoot&&null!=n){var o=h.get("drillDownIcon",!0);t.text=o?o+" "+n:n}}function L(t,e,i,n){var o=null!=y&&s[t][y],a=u[t];return o?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodeGroup"===i?e.position.slice():P({},e.shape)}(a,o,t)):m||((o=new e({z:function(t,e){var i=t*r_+e;return(i-1)/i}(i,n)})).__tmDepth=i,function(t,e,i){var n=t[v]={},o=c.parentNode;if(o&&(!l||"drillDown"===l.direction)){var a=0,r=0,s=u.background[o.getRawIndex()];!l&&s&&s.old&&(a=s.old.width,r=s.old.height),n.old="nodeGroup"===i?[0,r]:{x:a,y:r,width:0,height:0}}n.fadein="nodeGroup"!==i}(a,0,o.__tmStorageName=t)),r[t][v]=o}}Cf({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Zx(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Qx,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,o=this._oldTree,a={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=T(l_,e,r,s,i,a,l);!function a(r,s,l,u,h){u?e_(s=r,function(t,e){t.isRemoved()||i(e,e)}):new kf(s,r,t,t).add(i).update(i).remove(T(i,null)).execute();function t(t){return t.getId()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,o=c(i,n,l,h);o&&a(i&&i.viewChildren||[],n&&n.viewChildren||[],o,u,h+1)}}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var u,h,d=(h={nodeGroup:[],background:[],content:[]},(u=s)&&e_(u,function(t,e){var i=h[e];e_(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){e_(d,function(t){e_(t,function(t){t.parent&&t.parent.remove(t)})}),e_(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),h=function(){var a,r=[],s={};return{add:function(t,e,i,n,o){return R(n)&&(o=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:o}),!0)},done:function(t){return a=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e=r.length||t===r[t.depth]){var i=R_(l,c,t,e,y,s);n(t,i,o,a,r,s)}})}else p=P_(c),t.setVisual("color",p)}(a,{},O(o.levelModels,function(t){return t?t.get(C_):null}),r,t.getViewRoot().getAncestors(),t)}};function k_(i,n,o,a){var r=P({},n);return E(["color","colorAlpha","colorSaturation"],function(t){var e=i.get(t,!0);null==e&&o&&(e=o[t]),null==e&&(e=n[t]),null==e&&(e=a.get(t)),null!=e&&(r[t]=e)}),r}function P_(t){var e=N_(t,"color");if(e){var i=N_(t,"colorAlpha"),n=N_(t,"colorSaturation");return n&&(e=qe(e,null,null,n)),i&&(e=Ke(e,i)),e}}function N_(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function O_(t,e,i,n,o,a){if(a&&a.length){var r=E_(e,"color")||null!=o.color&&"none"!==o.color&&(E_(e,"colorAlpha")||E_(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new g_(c);return d.__drColorMappingBy=h,d}}}function E_(t,e){var i=t.get(e);return D_(i)&&i.length?{name:e,range:i}:null}function R_(t,e,i,n,o,a){var r=P({},e);if(o){var s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=o.mapValueToVisual(u)}return r}var z_=Math.max,B_=Math.min,V_=W,G_=E,F_=["itemStyle","borderWidth"],W_=["itemStyle","gapWidth"],H_=["upperLabel","show"],Z_=["upperLabel","height"],U_={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),r=t.option,s=bu(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=Rl(V_(s.width,l[0]),o),h=Rl(V_(s.height,l[1]),a),c=n&&n.type,d=Zx(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=Ux(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var a,r=(e||{}).node,s=[n,o];if(!r||r===i)return s;var l=n*o,u=l*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,c=a.children,d=0,f=c.length;ds[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*ei[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=gp(t,i);else{var g=lh.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=lp(t,{coordDimensions:m});(f=new Yf(v,i)).initData(t)}var y=new Yf(["value"],i);return y.initData(l,s),o&&o(f,y),yx({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var nw=Df({type:"series.graph",init:function(t){nw.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new qv(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){nw.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){nw.superApply(this,"mergeDefaultAndTheme",arguments),Go(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return iw(i,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),n=new Cl({label:i.option},i.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Cl({emphasis:{label:o.option}},o.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"!==i)return nw.superApply(this,"formatTooltip",arguments);var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=au(l.join(" > ")),o.value&&(l+=" : "+au(o.value)),l},_updateCategoriesData:function(){var t=O(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new Yf(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return nw.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),ow=ls.prototype,aw=ds.prototype;function rw(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var sw=Cs({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[rw(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:ow.buildPath,_buildPathCurve:aw.buildPath,pointAt:function(t){return this[rw(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:ow.pointAt,_pointAtCurve:aw.pointAt,tangentAt:function(t){var e=this.shape,i=rw(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(i,i)},_tangentAtCurve:aw.tangentAt}),lw=["fromSymbol","toSymbol"];function uw(t){return"_"+t+"Type"}function hw(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){L(a)||(a=[a,a]);var r=wg(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function cw(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function dw(t,e,i){Ci.call(this),this._createLine(t,e,i)}var fw=dw.prototype;function pw(t){this._ctor=t||dw,this.group=new Ci}fw.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,o=this.parent;o;)o.scale&&(n/=o.scale[0]),o=o.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var r=a.shape.percent,s=a.pointAt(0),l=a.pointAt(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=a.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=a.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f,p;i.attr("position",l);var g=i.__labelDistance,m=g[0]*n,v=g[1]*n,y=r/2,x=[(h=a.tangentAt(y))[1],-h[0]],_=a.pointAt(y);0=t&&(0===e?0:n[e-1][0])a&&(e[1-n]=e[n]+c.sign*a),e}function Qw(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?Jw(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[nb(0,a[1]*s/o-o/2)])[1]=ib(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},lh.register("parallel",{create:function(n,o){var a=[];return n.eachComponent("parallel",function(t,e){var i=new lb(t,n,o);i.name="parallel_"+e,i.resize(t,o),(t.coordinateSystem=i).model=t,a.push(i)}),n.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),a}});var hb=ku.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return ha([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=k(t);if(e)for(var i=e.length-1;0<=i;i--)Bl(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;nn.getWidth()||i<0||i>n.getHeight()}(t,e)){var n=t._zr,o=t._covers,a=Pb(t,e,i);if(!t._dragging)for(var r=0;rf&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===a?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function fM(t,e,i){Ci.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var pM=fM.prototype;function gM(t,e,i){Ci.call(this),this._createPolyline(t,e,i)}pM.createLine=function(t,e,i){return new dw(t,e,i)},pM._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");L(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=wg(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._symbolScale=n,this._updateEffectAnimation(t,i,e))},pM._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var o=this,a=e.getItemLayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=W(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),0e);r++);r=Math.min(r-1,o-2)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(vM,fM);var xM=Cs({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var o=0;o=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,o){var i=e[1]-e[0],a=(n=O(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0==o?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var JM=["axisLine","axisTickLabel","axisName"],QM=["splitArea","splitLine"],tI=mv.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,n){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Ci;var r=$M(e),s=new Qm(e,r);E(JM,s.add,s),o.add(this._axisGroup),o.add(s.getGroup()),E(QM,function(t){e.get(t+".show")&&this["_"+t](e)},this),ml(a,this._axisGroup,e),tI.superCall(this,"render",e,t,i,n)},remove:function(){bv(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fr)return!0;if(a){var s=fv(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=yI(t).pointerEl=new bl[o.type](xI(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=yI(t).labelEl=new rs(xI(e.label));t.add(o),SI(o,n)}},updatePointerEl:function(t,e,i){var n=yI(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=yI(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),SI(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,a=i.getModel("handle"),r=i.get("status");if(!a.get("show")||!r||"hide"===r)return o&&n.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=yl(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Xt(t.event)},onmousedown:_I(this._onHandleDragMove,this,0,0),drift:_I(this._onHandleDragMove,this),ondragend:_I(this._onHandleDragEnd,this)}),n.add(o)),II(o,i,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");L(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),kc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){bI(this._axisPointerModel,!e&&this._moveAnimation,this._handle,MI(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(MI(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(MI(n)),yI(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=wI);var OI=wI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=EI(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=TI(n),c=RI[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}LI(e,t,_v(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=_v(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:CI(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=EI(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function EI(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var RI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:kI([e,i[0]],[e,i[1]],zI(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:PI([e-n/2,i[0]],[n,o],zI(t))}}};function zI(t){return"x"===t.dim?0:1}mv.registerAxisPointerClass("CartesianAxisPointer",OI),yf(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!L(e)&&(t.axisPointer.link=[e])}}),xf(Ld.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=cv(t,e)}),_f({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||A(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){hI(r)&&(r=iI({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=hI(r),u=o.axesInfo,h=s.axesInfo,c="leave"===n||hI(r),d={},f={},p={list:[],map:{}},g={showPointer:oI(sI,f),showTooltip:oI(lI,p)};nI(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);nI(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&a&&(!u||n)){var o=n&&n.value;null!=o||l||(o=i.pointToData(r)),null!=o&&rI(t,o,g,!1,d)}})});var m={};return nI(h,function(o,t){var a=o.linkGroup;a&&!f[t]&&nI(a.axesInfo,function(t,e){var i=f[e];if(t!==o&&i){var n=i.value;a.mapper&&(n=o.axis.scale.parse(a.mapper(n,uI(t),uI(o)))),m[o.key]=n}})}),nI(m,function(t,e){rI(h[e],t,g,!0,d)}),function(o,t,e){var a=e.axesInfo=[];nI(t,function(t,e){var i=t.axisPointerModel.option,n=o[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(hI(e)||!t.list.length)return n({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(p,r,t,a),function(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",a=aI(n)[o]||{},r=aI(n)[o]={};nI(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&nI(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];E(a,function(t,e){r[e]||l.push(t)}),E(r,function(t,e){a[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}});var BI=["x","y"],VI=["width","height"],GI=wI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=HI(r,1-WI(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=TI(n),c=FI[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}LI(e,t,$M(i),i,n,o)},getHandleTransform:function(t,e,i){var n=$M(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:CI(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=WI(o),s=HI(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=HI(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),FI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:kI([e,i[0]],[e,i[1]],WI(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:PI([e-n/2,i[0]],[n,o],WI(t))}}};function WI(t){return t.isHorizontal()?0:1}function HI(t,e){var i=t.getRect();return[i[BI[e]],i[BI[e]]+i[VI[e]]]}mv.registerAxisPointerClass("SingleAxisPointer",GI),Af({type:"single"});var ZI=sc.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){ZI.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this))},fixData:function(t){var e=t.length,i=ta(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var o=n.length,a=-1,r=-1,s=0;sMath.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===w?(b=-f)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-f)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},JI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(n)}function a(){r.onNormal()}var r=this;i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w($I,Ci);_c.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){var n=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,i=o.getViewRoot(),l=this.group,u=o.get("renderLabelForZeroData"),h=[];i.eachNode(function(t){h.push(t)});var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new $I(t,o,a);l.add(i),r.setItemGraphicEl(t.dataIndex,i)}}(null==t?null:i[t],null==e?null:n[e])}new kf(n,i,t,t).add(e).update(e).remove(T(e,null)).execute()}(h,c),function(t,e){if(0=i.r0}}});var QI="sunburstRootToNode";_f({type:QI,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var i=Zx(o,[QI],t);if(i){var n=t.getViewRoot();n&&(o.direction=Xx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var tT="sunburstHighlight";_f({type:tT,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=Zx(n,[tT],t);i&&(n.highlight=i.node)})});_f({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var eT=Math.PI/180;function iT(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0==i?(t.dataIndex-e.dataIndex)*(n?-1:1):i})}function nT(a,r){return r=r||[0,0],O(["x","y"],function(t,e){var i=this.getAxis(t),n=r[e],o=a[e]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}Sf(T(iy,"sunburst")),bf(T(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");L(i)||(i=[0,i]),L(e)||(e=[e,e]);var n=C.getWidth(),o=C.getHeight(),h=Math.min(n,o),c=Rl(e[0],n),d=Rl(e[1],o),f=Rl(i[0],h/2),a=Rl(i[1],h/2),r=-t.get("startAngle")*eT,p=t.get("minAngle")*eT,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=iT(n,i);n.length&&E(t.children,function(t){e(t,i)})}(s,l);var u=0;E(s.children,function(t){isNaN(t.getValue())||u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:A(function(t){var e=a.dataToRadius(t[0]),i=r.dataToAngle(t[1]),n=o.coordToPoint([e,i]);return n.push(e,i*Math.PI/180),n}),size:A(rT,o)}}},calendar:function(i){var t=i.getRect(),e=i.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:i.getCellWidth(),cellHeight:i.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return i.dataToPoint(t,e)}}}}};function pT(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function gT(a,r,e,t){var i=a.get("renderItem"),n=a.coordinateSystem,o={};n&&(o=n.prepareCustoms?n.prepareCustoms():fT[n.type](n));var s,l,u,h,c,d=D({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(lT).getItemStyle();null!=c&&(i.fill=c);var n=r.getItemVisual(e,"opacity");null!=n&&(i.opacity=n);var o=t?_T(t,u):u;return nl(i,o,null,{autoColor:c,isRectText:!0}),i.text=o.getShallow("show")?H(a.getFormattedLabel(e,"normal"),Ug(r,e)):null,t&&wT(i,t),i},styleEmphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(uT).getItemStyle(),n=t?_T(t,h):h;return nl(i,n,null,{isRectText:!0},!0),i.text=n.getShallow("show")?Z(a.getFormattedLabel(e,"emphasis"),a.getFormattedLabel(e,"normal"),Ug(r,e)):null,t&&wT(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;oe[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n,a=this.r,r=this.r0;return o<=a*a&&r*r<=o}}}};var kT=ku.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(kT.prototype,dg);var PT={splitNumber:5};function NT(t,e){return e.type||(e.data?"category":"value")}function OT(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();E(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,pp(e,t))}),E(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,pp(e,t))})}}),rg(n.scale,n.model),rg(o.scale,o.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),r=360/n.scale.count();n.inverse?a[1]+=r:a[1]-=r,n.setExtent(a[0],a[1])}}function ET(t,e){if(t.type=e.get("type"),t.scale=sg(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}(e.axis=t).model=e}Gm("angle",kT,NT,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Gm("radius",kT,NT,PT),Tf({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),lh.register("polar",{dimensions:LT.prototype.dimensions,create:function(i,s){var l=[];return i.eachComponent("polar",function(t,e){var i=new LT(e);i.update=OT;var n=i.getRadiusAxis(),o=i.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");ET(n,a),ET(o,r),function(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Rl(n[0],o),t.cy=Rl(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:L(l)||(l=[0,l]),l=[Rl(l[0],s),Rl(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(i,t,s),l.push(i),(t.coordinateSystem=i).model=t}),i.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=e.coordinateSystem}}),l}});var RT=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function zT(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function BT(t){return t.getRadiusAxis().inverse?0:1}function VT(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}mv.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=O(i.getViewLabels(),function(t){return(t=k(t)).coord=i.dataToCoord(t.tickValue),t});VT(s),VT(a),E(RT,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,a,r,o,s)},this)}},_axisLine:function(t,e,i,n,o){var a,r=t.getModel("axisLine.lineStyle"),s=BT(e),l=s?0:1;(a=0===o[l]?new Yr({shape:{cx:e.cx,cy:e.cy,r:o[s]},style:r.getLineStyle(),z2:1,silent:!0}):new Kr({shape:{cx:e.cx,cy:e.cy,r:o[s],r0:o[l]},style:r.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),s=o[BT(e)],l=O(i,function(t){return new ls({shape:zT(e,[s,s+r],t.coord)})});this.group.add(Es(l,{style:D(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*r.get("length"),l=o[BT(e)],u=[],h=0;hr?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";p&&p[n]&&p[n].textStyle&&(i=new Cl(p[n].textStyle,g,g.ecModel));var h=new Ur({silent:Qm.isLabelSilent(c)});this.group.add(h),nl(h.style,i,{x:a[0],y:a[1],textFill:i.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=Qm.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;um?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,i,0,s,d))}});var HT={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:kI(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:NI(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:NI(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};function ZT(n,t){t.update="updateView",_f(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),E(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}mv.registerAxisPointerClass("PolarAxisPointer",WT),bf(T(function(t,e,i){var N={},O=function(t){var g={};E(t,function(t,e){var i=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=TT(n,o),r=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=g[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[a]=l;var h=IT(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Rl(t.get("barWidth"),s),d=Rl(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var d={};return E(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,o=Rl(t.categoryGap,n),a=Rl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t,e){var i=t.maxWidth;i&&i=n.start.time&&i.timea.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();n.setDate(o+i-1);var r=n.getDate();if(r!==a)for(var s=0n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},UT.dimensions=UT.prototype.dimensions,UT.getDimensionsInfo=UT.prototype.getDimensionsInfo,UT.create=function(i,n){var o=[];return i.eachComponent("calendar",function(t){var e=new UT(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("calendarIndex")||0])}),o},lh.register("calendar",UT);var YT=ku.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=Iu(t);YT.superApply(this,"init",arguments),jT(t,o)},mergeOption:function(t,e){YT.superApply(this,"mergeOption",arguments),jT(this.option,t)}});function jT(t,e){var i=t.cellSize;L(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=O([0,1],function(t){return function(t,e){return null!=t[xu[e][0]]||null!=t[xu[e][1]]&&null!=t[xu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});Mu(t,e,{type:"box",ignoreSize:n})}var qT={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},KT={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Af({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new rs({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(i,t,n,o){var a=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(i,t,n);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,e,n),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,e,n),s,o)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new ts({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?uu(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Ur({z2:30});nl(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),a=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];R(o)&&(o=qT[o.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;a="start"===r?-a:a;for(var c="center"===s,d=0;dd.getHeight()&&(i.textPosition="top",a=!0);var r=a?-5-n.height:p+8;o+n.width/2>d.getWidth()?(i.textPosition=["100%",r],i.textAlign="right"):o-n.width/2<0&&(i.textPosition=[0,r],i.textAlign="left")}})}function t(t,e){var i,n=m[t],o=m[e],a=u[n],r=new Cl(a,h,h.ecModel);if(l&&null!=l.newTitle&&l.featureName===n&&(a.title=l.newTitle),n&&!o){if(function(t){return 0===t.indexOf("my")}(n))i={model:r,onclick:r.option.onclick,featureName:n};else{var s=oA(n);if(!s)return;i=new s(r,c,d)}g[n]=i}else{if(!(i=g[o]))return;i.model=r,i.ecModel=c,i.api=d}n||!o?r.get("show")&&!i.unusable?(function(o,a,t){var r=o.getModel("iconStyle"),s=o.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():o.get("icon"),l=o.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=o.iconPaths={};E(e,function(t,e){var i=yl(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(r.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",P({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),$s(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(o.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",A(a.onclick,a,c,d,e)),u[e]=i})}(r,i,n),r.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(r,c,d,l)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){E(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){E(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){E(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var sA=Oc.toolbox.saveAsImage;function lA(t){this.model=t}lA.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:sA.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:sA.lang.slice()},lA.prototype.unusable=!v.canvasSupported,lA.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType()?"svg":i.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(a.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var h=i.get("lang"),c='';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+o,d.target="_blank",d.href=a;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},nA("saveAsImage",lA);var uA=Oc.toolbox.magicType,hA="__ec_magicType_stack__";function cA(t){this.model=t}cA.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:k(uA.title),option:{},seriesIndex:{}};var dA=cA.prototype;dA.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return E(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var fA={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var o=i.get("stack")===hA;if("line"===t||"bar"===t)return n.setIconStatus("stack",o?"normal":"emphasis"),m({id:e,stack:o?"":hA},n.get("option.stack")||{},!0)}},pA=[["line","bar"],["stack"]];dA.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(fA[h]){var i,d={series:[]};if(E(pA,function(t){0<=_(t,h)&&E(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=fA[h](e,i,t,c);n&&(D(n,t.option),d.series.push(n));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundaryGap="bar"===h}}}),"stack"===h)i=d.series&&d.series[0]&&d.series[0].stack===hA?m({stack:uA.title.tiled},uA.title):k(uA.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:i,featureName:"magicType"})}},_f({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),nA("magicType",cA);var gA=Oc.toolbox.dataView,mA=new Array(60).join("-"),vA="\t";function yA(t){var e=function(t){var o={},a=[],r=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)a.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;o[n]||(o[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),o[n].series.push(t)}else a.push(t)}}),{seriesGroupByCategoryAxis:o,other:a,meta:r}}(t);return{value:M([function(t){var h=[];return E(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,o=[" "].concat(O(t.series,function(t){return t.name})),a=[i.model.getCategories()];E(t.series,function(t){a.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[o.join(vA)],s=0;st[1]&&t.reverse(),t}function kA(t,e){return Ko(t,e,{includeMainTypes:AA})}CA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=EA[t.brushType](0,i,e);t.__rangeOffset={offset:zA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},CA.matchOutputRanges=function(t,n,o){SA(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&E(t.coordSyses,function(t){var e=EA[i.brushType](1,t,i.range);o(i,e.values,t,n)})},this)},CA.setInputRanges=function(t,o){SA(t,function(t){var e=this.findTargetInfo(t,o);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=EA[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?zA[t.brushType](i.values,n.offset,function(t,e){var i=VA(t),n=VA(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}(i.xyMinMax,n.xyMinMax)):i.values}},this)},CA.makePanelOpts=function(i,n){return O(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:eS(e),isTargetByCursor:nS(e,i,t.coordSysModel),getLinearBrushOtherExtent:iS(e)}})},CA.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=MA(n.coordSyses,e.coordinateSystem)},CA.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=kA(e,t),o=0;on[1]&&(n[1]=e[1])})}),n[1]c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):$A(h,function(t){if("empty"===o)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),$A(h,function(t){u.setApproximateExtent(c,t)}))})}}};var tD=E,eD=jA,iD=Tf({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=nD(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=nD(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),oD(this,t);var n=this.settledOption;tD([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new KA(t.name,e,this,n));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();eD(function(t){var e=t.axisIndex;i[e]=Vo(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;eD(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var a=!0,e=this.get("orient",!0),r=this.option,t=this.dependentModels;if(a){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(r[i+"AxisIndex"]=[0],a=!1):tD(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})}a&&eD(function(t){if(a){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&UD(e)}};function UD(t){return new Di(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var XD=["#ddd"];Tf({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;e||PD(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:XD},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=O(t,function(t){return YD(this.option,t)},this))},setBrushOption:function(t){this.brushOption=YD(this.option,t),this.brushType=this.brushOption.brushType}});function YD(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cl(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function jD(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}Af({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Ib(e.getZr())).on("brush",A(this._onBrush,this)).mount()},render:function(t){return this.model=t,jD.apply(this,arguments)},updateTransform:function(t,e){return GD(e),jD.apply(this,arguments)},updateView:jD,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:k(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:k(t),$from:i})}}),_f({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),_f({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),_f({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var qD=Oc.toolbox.brush;function KD(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}KD.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:k(qD.title)};var $D=KD.prototype;$D.render=$D.updateView=function(e,t,i){var n,o,a;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===n)?"emphasis":"normal")})},$D.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return E(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},$D.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},nA("brush",KD),yf(function(t,e){var i=t&&t.brush;if(L(i)||(i=i?[i]:[]),i.length){var n=[];E(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;L(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(i){var e={};E(i,function(t){e[t]=1}),i.length=0,E(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,DD)}}),Tf({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Af({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Ur({style:nl({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Ur({style:nl({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){gu(d,"_"+t.get("target"))}),f&&c.on("click",function(){gu(d,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=bu(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new rs({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});function JD(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};E(n,function(t,e){a[e]||QD(o,e)||(o[e]=t)}),i.label&&!QD(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function QD(t,e){return t.hasOwnProperty(e)}ku.registerSubTypeDefaulter("timeline",function(){return"slider"}),_f({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),D({currentIndex:i.option.currentIndex},t)}),_f({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var tC=ku.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){tC.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,o=this._names=[];if("category"===i){var a=[];E(e,function(t,e){var i,n=Wo(t);z(t)?(i=k(t)).value=e:i=e,a.push(i),R(n)||null!=n&&!isNaN(n)||(n=""),o.push(n+"")}),e=a}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new Yf([{name:"value",type:n}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(tC.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Xh);function eC(t,e,i,n){Gg.call(this,t,e,i),this.type=n||"value",this.model=null}var iC=gc.extend({type:"timeline"});eC.prototype={constructor:eC,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(eC,Gg);var nC=A,oC=E,aC=Math.PI;function rC(t,e,i,n,o,a){var r=e.get("color");o?(o.setColor(r),i.add(o),a&&a.onUpdate(o)):((o=wg(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),n=m({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=Rl(u[0],l[0]),h[1]+=Rl(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function sC(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}iC.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var o=this._layout(e,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,e);e.formatTooltip=function(t){return au(s.scale.getLabel(t))},oC(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,a,s,e)},this),this._renderAxisLabel(o,r,s,e),this._position(o,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2n[1]&&(i=n[1]),i"),o&&(a+=uC(o),null!=i&&(a+=" : ")),null!=i&&(a+=uC(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(cC,Xh),cC.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var dC=_;function fC(t,e,i,n,o,a){var r=[],s=fp(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=_C(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(s,u);var h=e.get(n,u),c=Vl(e.get(n,u));return 0<=(c=Math.min(c,20))&&(r[a]=+r[a].toFixed(c)),[r,h]}var pC=T,gC={min:pC(fC,"min"),max:pC(fC,"max"),average:pC(fC,"average")};function mC(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!L(e.coord)&&n){var o=n.dimensions,a=vC(e,i,n,t);if((e=k(e)).type&&gC[e.type]&&a.baseAxis&&a.valueAxis){var r=dC(o,a.baseAxis.dim),s=dC(o,a.valueAxis.dim),l=gC[e.type](i,a.baseDataDim,a.valueDataDim,r,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)gC[u[h]]&&(u[h]=_C(i,i.mapDimension(o[h]),u[h]));e.coord=u}}return e}function vC(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;oi[o],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[o]-c[o]:p[n]+=c[o]+m);g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[o]=d?i[o]:h[o],v[a]=Math.max(h[a],c[a]),v[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[o],d){var y={x:0,y:0};y[o]=Math.max(i[o]-c[o]-m,0),y[a]=v[a],l.setClipPath(new rs({shape:y})),l.__rectSize=y[o]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&cl(s,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,o){var a=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],i=a.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=n.get("pageFormatter"),i=o.pageIndex,r=null!=i?i+1:0,s=o.pageCount;t&&e&&t.setStyle("text",R(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,a=qC[o],r=KC[o],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[o]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i=e&&t.s<=e+n}},_findTargetItemIndex:function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(o=e)}),null!=o?o:a):0;var o,a}});_f("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});iD.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var JC=rs,QC=El,tL=Bl,eL=A,iL=E,nL="horizontal",oL="vertical",aL=["line","bar","candlestick","scatter"],rL=aD.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){rL.superApply(this,"render",arguments),kc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){rL.superApply(this,"remove",arguments),Pc(this,"_dispatchZoomAction")},dispose:function(){rL.superApply(this,"dispose",arguments),Pc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ci;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===nL?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Iu(t.option);E(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=bu(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===oL&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==nL||o?i===nL&&o?{scale:r?[-1,1]:[-1,-1]}:i!==oL||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new JC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new JC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(iL(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function sL(t){return"vertical"===t?"ns-resize":"ew-resize"}iD.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var lL="\0_ec_dataZoom_roams";function uL(t,n){var e=cL(t),o=n.dataZoomId,a=n.coordId;E(e,function(t,e){var i=t.dataZoomInfos;i[o]&&_(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),dL(e);var i=e[a];i||((i=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new Vy(t.getZr());return E(["pan","zoom","scrollMove"],function(a){e.on(a,function(n){var o=[];E(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[a],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&o.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),o.length&&r.dispatchAction(o)})}),e}(t,i),i.dispatchAction=T(fL,t)),i.dataZoomInfos[o]||i.count++,i.dataZoomInfos[o]=n;var r=function(t){var n,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return E(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+n]"],L(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),R(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):C(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=LL([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;0<=o;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});m(n,i),m(o,i);var u=this.isCategory();function a(n){DL(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},CL(this.stateList,function(t){var e=n[t];if(R(e)){var i=ML(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},CL(n,function(t,e){if(g_.isValidType(e)){var i=ML(e,"inactive",u);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");CL(this.stateList,function(t){var e=this.itemSize,i=a[t];null==(i=i||(a[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&k(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&k(s)||(u?e[0]:[e[0],e[0]])),i.symbol=TL(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;AL(n,function(t){oe[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){PL.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Bl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){var t=EL(this,"outOfRange",this.getExtent()),e=EL(this,"inRange",this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Ci("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,o){if(this._useHandle){var a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels;GL([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=pl(a.handleLabelPoints[t],fl(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=VL(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-FL(e,WL(i,0))],[6,0],[0,FL(e,WL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=pl(u.indicatorLabelPoint,fl(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=FL(WL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=FL(WL(o[0],t),o[1]);var r=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=VL(o,e,i,!0)/2);return n}(i,a,o),s=[t-r,t+r],l=VL(t,o,a,!0),u=[VL(s[0],o,a,!0),VL(s[1],o,a,!0)];s[0] ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||UL(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;ni&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=o(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:a.push({value:t[0],color:n},{value:t[1],color:n})}}}),jL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var r=0,s=n[0];r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function qL(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}RL.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,h),E(e.viewPieceList,function(t){var e=t.piece,i=new Ci;i.onclick=A(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var o=this.visualMapModel.getValueState(n);i.add(new Ur({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,h),wu(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:BL(e.findTargetDataIndices(i),e)})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return zL(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new Ci,r=this.visualMapModel.textStyleModel;a.add(new Ur({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=O(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(wg(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=k(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,E(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});yf(yL);var KL,$L="urn:schemas-microsoft-com:vml",JL="undefined"==typeof window?null:window,QL=!1,tk=JL&&JL.document;function ek(t){return KL(t)}if(tk&&!v.canvasSupported)try{tk.namespaces.zrvml||tk.namespaces.add("zrvml",$L),KL=function(t){return tk.createElement("')}}catch(t){KL=function(t){return tk.createElement("<"+t+' xmlns="'+$L+'" class="zrvml">')}}var ik,nk=rr.CMD,ok=Math.round,ak=Math.sqrt,rk=Math.abs,sk=Math.cos,lk=Math.sin,uk=Math.max;if(!v.canvasSupported){var hk=",",ck="progid:DXImageTransform.Microsoft",dk=21600,fk=dk/2,pk=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=dk+","+dk,t.coordorigin="0,0"},gk=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},mk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},vk=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},yk=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},xk=Yn,_k=function(t,e,i){var n=Fe(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=gk(n[0],n[1],n[2]),t.opacity=i*n[3])},wk=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof cs&&vk(t,a),a=a||ek(e),o?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof cs){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){r="gradient";var p=i.transform,g=[a.x*d,a.y*f],m=[a.x2*d,a.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*dk,w/=x[1]*dk;var b=uk(_,w);u=0/b,h=2*a.r/b-u}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],A=0;A=c&&d<=i+1){for(var n=[],o=0;o=c&&d<=o+1)return hP(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=a();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1\n\r<"))}},E(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){MP.prototype[t]=function(t){return function(){vi('In SVG mode painter not support method "'+t+'"')}}(t)}),Po("svg",MP),t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=Ld,t.init=function(t,e,i){var n=mf(t);if(n)return n;var o=new Rd(t,e,i);return o.id="ec_"+cf++,uf[o.id]=o,Jo(t,ff,o.id),function(n){var o="__connectUpdateStatus";function a(t,e){for(var i=0;i