echarts.common.min.js 680 KB
!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";function e(t,e){"createCanvas"===t&&(Dp=null),Tp[t]=e}function D(t){if(null==t||"object"!=typeof t)return t;var e=t,i=xp.call(t);if("[object Array]"===i){if(!f(t)){e=[];for(var n=0,o=t.length;n<o;n++)e[n]=D(t[n])}}else if(yp[i]){if(!f(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(n=0,o=t.length;n<o;n++)e[n]=D(t[n])}}}else if(!vp[i]&&!f(t)&&!b(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=D(t[r]));return e}function g(t,e,i){if(!R(e)||!R(t))return i?D(e):t;for(var n in e)if(e.hasOwnProperty(n)){var o=t[n],a=e[n];!R(a)||!R(o)||O(a)||O(o)||b(a)||b(o)||r(a)||r(o)||f(a)||f(o)?!i&&n in t||(t[n]=D(e[n])):g(o,a,i)}return t}function u(t,e){for(var i=t[0],n=1,o=t.length;n<o;n++)i=g(i,t[n],e);return i}function P(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function E(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function n(){return Dp||(Dp=Ap().getContext("2d")),Dp}function y(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function a(t,e){function i(){}var n=t.prototype;for(var o in i.prototype=e.prototype,t.prototype=new i,n)t.prototype[o]=n[o];(t.prototype.constructor=t).superClass=e}function o(t,e,i){E(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function N(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function L(t,e,i){if(t&&e)if(t.forEach&&t.forEach===wp)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function k(t,e,i){if(t&&e){if(t.map&&t.map===Mp)return t.map(e,i);for(var n=[],o=0,a=t.length;o<a;o++)n.push(e.call(i,t[o],o,t));return n}}function p(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===Ip)return t.reduce(e,i,n);for(var o=0,a=t.length;o<a;o++)i=e.call(n,i,t[o],o,t);return i}}function I(t,e,i){if(t&&e){if(t.filter&&t.filter===bp)return t.filter(e,i);for(var n=[],o=0,a=t.length;o<a;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function _(t,e){var i=Sp.call(arguments,2);return function(){return t.apply(e,i.concat(Sp.call(arguments)))}}function z(t){var e=Sp.call(arguments,1);return function(){return t.apply(this,e.concat(Sp.call(arguments)))}}function O(t){return"[object Array]"===xp.call(t)}function m(t){return"function"==typeof t}function w(t){return"[object String]"===xp.call(t)}function R(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function r(t){return!!vp[xp.call(t)]}function v(t){return!!yp[xp.call(t)]}function b(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function x(t){return t!=t}function B(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function V(t,e){return null!=t?t:e}function G(t,e,i){return null!=t?t:null!=e?e:i}function s(){return Function.call.apply(Sp,arguments)}function l(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function c(t,e){if(!t)throw new Error(e)}function h(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function d(t){t[Cp]=!0}function f(t){return t[Cp]}function S(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=O(t),n=this;t instanceof S?t.each(e):t&&L(t,e)}function C(t){return new S(t)}function i(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function M(){}function T(t,e){var i=new kp(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function A(t,e){return t[0]=e[0],t[1]=e[1],t}function W(t){var e=new kp(2);return e[0]=t[0],e[1]=t[1],e}function F(t,e,i){return t[0]=e,t[1]=i,t}function H(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function Z(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function U(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function j(t){return Math.sqrt(X(t))}function X(t){return t[0]*t[0]+t[1]*t[1]}function Y(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function q(t,e){var i=j(e);return t[1]=0===i?t[0]=0:(t[0]=e[0]/i,e[1]/i),t}function $(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function K(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function J(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function Q(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function tt(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function et(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function it(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function nt(t,e){return{target:t,topTarget:e&&e.topTarget}}function ot(){}function at(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||Vp}return!1}function rt(){var t=new Fp(6);return st(t),t}function st(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function lt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ht(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function ut(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function ct(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+r*h,t[1]=-n*h+r*u,t[2]=o*u+s*h,t[3]=-o*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t}function dt(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function ft(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function pt(t){var e=rt();return lt(e,t),e}function gt(t){return 5e-5<t||t<-5e-5}function mt(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 vt(t){return(t=Math.round(t))<0?0:255<t?255:t}function yt(t){return t<0?0:1<t?1:t}function xt(t){return vt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function _t(t){return yt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function wt(t,e,i){return i<0?i+=1:1<i&&(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 bt(t,e,i){return t+(e-t)*i}function St(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Mt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function It(t,e){ig&&Mt(ig,e),ig=eg.put(t,ig||e.slice())}function Tt(t,e){if(t){e=e||[];var i=eg.get(t);if(i)return Mt(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in tg)return Mt(e,tg[n]),It(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 St(e,0,0,0,1);l=_t(s.pop());case"rgb":return 3!==s.length?void St(e,0,0,0,1):(St(e,xt(s[0]),xt(s[1]),xt(s[2]),l),It(t,e),e);case"hsla":return 4!==s.length?void St(e,0,0,0,1):(s[3]=_t(s[3]),At(s,e),It(t,e),e);case"hsl":return 3!==s.length?void St(e,0,0,0,1):(At(s,e),It(t,e),e);default:return}}St(e,0,0,0,1)}else{if(4===n.length)return 0<=(h=parseInt(n.substr(1),16))&&h<=4095?(St(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),It(t,e),e):void St(e,0,0,0,1);if(7===n.length){var h=parseInt(n.substr(1),16);return 0<=h&&h<=16777215?(St(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),It(t,e),e):void St(e,0,0,0,1)}}}}function At(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=_t(t[1]),o=_t(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return St(e=e||[],vt(255*wt(r,a,i+1/3)),vt(255*wt(r,a,i)),vt(255*wt(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Dt(t,e){var i=Tt(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 Nt(i,4===i.length?"rgba":"rgb")}}function Ct(t){var e=Tt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Lt(t,e,i){if(e&&e.length&&0<=t&&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]=vt(bt(r[0],s[0],l)),i[1]=vt(bt(r[1],s[1],l)),i[2]=vt(bt(r[2],s[2],l)),i[3]=yt(bt(r[3],s[3],l)),i}}function kt(t,e,i){if(e&&e.length&&0<=t&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Tt(e[o]),s=Tt(e[a]),l=n-o,h=Nt([vt(bt(r[0],s[0],l)),vt(bt(r[1],s[1],l)),vt(bt(r[2],s[2],l)),yt(bt(r[3],s[3],l))],"rgba");return i?{color:h,leftIndex:o,rightIndex:a,value:n}:h}}function Pt(t,e,i,n){if(t=Tt(t))return t=function(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)i=e=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),1<e&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(o=e,(o=Math.round(o))<0?0:360<o?360:o)),null!=i&&(t[1]=_t(i)),null!=n&&(t[2]=_t(n)),Nt(At(t),"rgba");var o}function Ot(t,e){if((t=Tt(t))&&null!=e)return t[3]=yt(e),Nt(t,"rgba")}function Nt(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 Et(t,e){return t[e]}function zt(t,e,i){t[e]=i}function Rt(t,e,i){return(e-t)*i+t}function Bt(t,e,i){return.5<i?e:t}function Vt(t,e,i,n,o){var a=t.length;if(1==o)for(s=0;s<a;s++)n[s]=Rt(t[s],e[s],i);else for(var r=a&&t[0].length,s=0;s<a;s++)for(var l=0;l<r;l++)n[s][l]=Rt(t[s][l],e[s][l],i)}function Gt(t,e,i){var n=t.length,o=e.length;if(n!==o)if(o<n)t.length=o;else for(r=n;r<o;r++)t.push(1===i?e[r]:rg.call(e[r]));for(var a=t[0]&&t[0].length,r=0;r<t.length;r++)if(1===i)isNaN(t[r])&&(t[r]=e[r]);else for(var s=0;s<a;s++)isNaN(t[r][s])&&(t[r][s]=e[r][s])}function Wt(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(a=0;a<n;a++)if(t[a]!==e[a])return!1}else for(var o=t[0].length,a=0;a<n;a++)for(var r=0;r<o;r++)if(t[a][r]!==e[a][r])return!1;return!0}function Ft(t,e,i,n,o,a,r,s,l){var h=t.length;if(1==l)for(c=0;c<h;c++)s[c]=Ht(t[c],e[c],i[c],n[c],o,a,r);else for(var u=t[0].length,c=0;c<h;c++)for(var d=0;d<u;d++)s[c][d]=Ht(t[c][d],e[c][d],i[c][d],n[c][d],o,a,r)}function Ht(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function Zt(t){if(N(t)){var e=t.length;if(N(t[0])){for(var i=[],n=0;n<e;n++)i.push(rg.call(t[n]));return i}return rg.call(t)}return t}function Ut(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function jt(t,e,i,n,a,o){var r,s,l=t._getter,h=t._setter,u="spline"===e,c=n.length;if(c){var d,f=N(n[0].value),p=!1,g=!1,m=f?N((s=(r=n)[r.length-1].value)&&s[0])?2:1:0;n.sort(function(t,e){return t.time-e.time}),d=n[c-1].time;for(var v=[],y=[],x=n[0].value,_=!0,w=0;w<c;w++){v.push(n[w].time/d);var b=n[w].value;if(f&&Wt(b,x,m)||!f&&b===x||(_=!1),"string"==typeof(x=b)){var S=Tt(b);S?(b=S,p=!0):g=!0}y.push(b)}if(o||!_){var M=y[c-1];for(w=0;w<c-1;w++)f?Gt(y[w],M,m):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&Gt(l(t._target,a),M,m);var I,T,A,D,C,L=0,k=0;if(p)var P=[0,0,0,0];var O=new mt({target:t._target,life:d,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<k){for(i=Math.min(L+1,c-1);0<=i&&!(v[i]<=e);i--);i=Math.min(i,c-2)}else{for(i=L;i<c&&!(v[i]>e);i++);i=Math.min(i-1,c-2)}k=e;var n=v[(L=i)+1]-v[i];if(0!==n)if(I=(e-v[i])/n,u)if(A=y[i],T=y[0===i?i:i-1],D=y[c-2<i?c-1:i+1],C=y[c-3<i?c-1:i+2],f)Ft(T,A,D,C,I,I*I,I*I*I,l(t,a),m);else{if(p)o=Ft(T,A,D,C,I,I*I,I*I*I,P,1),o=Ut(P);else{if(g)return Bt(A,D,I);o=Ht(T,A,D,C,I,I*I,I*I*I)}h(t,a,o)}else if(f)Vt(y[i],y[i+1],I,l(t,a),m);else{var o;if(p)Vt(y[i],y[i+1],I,P,1),o=Ut(P);else{if(g)return Bt(y[i],y[i+1],I);o=Rt(y[i],y[i+1],I)}h(t,a,o)}},ondestroy:i});return e&&"spline"!==e&&(O.easing=e),O}}}function Xt(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 Yt(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o<i&&n(t[o],t[o-1])<0;)o++;!function(t,e,i){for(i--;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,o)}else for(;o<i&&0<=n(t[o],t[o-1]);)o++;return o-e}function qt(t,e,i,n,o){for(n===e&&n++;n<i;n++){for(var a,r=t[n],s=e,l=n;s<l;)o(r,t[a=s+l>>>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(;0<h;)t[s+h]=t[s+h-1],h--}t[s]=r}}function $t(t,e,i,n,o,a){var r=0,s=0,l=1;if(0<a(t,e[i+o])){for(s=n-o;l<s&&0<a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[i+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var h=r;r=o-l,l=o-h}for(r++;r<l;){var u=r+(l-r>>>1);0<a(t,e[i+u])?r=u+1:l=u}return l}function Kt(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;l<s&&a(t,e[i+o-l])<0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var h=r;r=o-l,l=o-h}else{for(s=n-o;l<s&&0<=a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}for(r++;r<l;){var u=r+(l-r>>>1);a(t,e[i+u])<0?l=u:r=u+1}return l}function Jt(p,g){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=Kt(p[n],p,e,i,0,g);e+=a,0!=(i-=a)&&0!==(o=$t(p[e+i-1],p,n,o,o-1,g))&&(i<=o?function(t,e,i,n){var o=0;for(o=0;o<e;o++)v[o]=p[t+o];var a=0,r=i,s=t;if(p[s++]=p[r++],0!=--n)if(1!==e){for(var l,h,u,c=m;;){h=l=0,u=!1;do{if(g(p[r],v[a])<0){if(p[s++]=p[r++],h++,(l=0)==--n){u=!0;break}}else if(p[s++]=v[a++],l++,h=0,1==--e){u=!0;break}}while((l|h)<c);if(u)break;do{if(0!==(l=Kt(p[r],v,a,e,0,g))){for(o=0;o<l;o++)p[s+o]=v[a+o];if(s+=l,a+=l,(e-=l)<=1){u=!0;break}}if(p[s++]=p[r++],0==--n){u=!0;break}if(0!==(h=$t(v[a],p,r,n,0,g))){for(o=0;o<h;o++)p[s+o]=p[r+o];if(s+=h,r+=h,0==(n-=h)){u=!0;break}}if(p[s++]=v[a++],1==--e){u=!0;break}c--}while(bg<=l||bg<=h);if(u)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];p[s+n]=v[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)p[s+o]=v[a+o]}}else{for(o=0;o<n;o++)p[s+o]=p[r+o];p[s+n]=v[a]}else for(o=0;o<e;o++)p[s+o]=v[a+o]}(e,i,n,o):function(t,e,i,n){var o=0;for(o=0;o<n;o++)v[o]=p[i+o];var a=t+e-1,r=n-1,s=i+n-1,l=0,h=0;if(p[s--]=p[a--],0!=--e)if(1!==n){for(var u=m;;){var c=0,d=0,f=!1;do{if(g(v[r],p[a])<0){if(p[s--]=p[a--],c++,(d=0)==--e){f=!0;break}}else if(p[s--]=v[r--],d++,c=0,1==--n){f=!0;break}}while((c|d)<u);if(f)break;do{if(0!=(c=e-Kt(v[r],p,t,e,e-1,g))){for(e-=c,h=1+(s-=c),l=1+(a-=c),o=c-1;0<=o;o--)p[h+o]=p[l+o];if(0===e){f=!0;break}}if(p[s--]=v[r--],1==--n){f=!0;break}if(0!=(d=n-$t(p[a],v,0,n,n-1,g))){for(n-=d,h=1+(s-=d),l=1+(r-=d),o=0;o<d;o++)p[h+o]=v[l+o];if(n<=1){f=!0;break}}if(p[s--]=p[a--],0==--e){f=!0;break}u--}while(bg<=c||bg<=d);if(f)break;u<0&&(u=0),u+=2}if((m=u)<1&&(m=1),1===n){for(h=1+(s-=e),l=1+(a-=e),o=e-1;0<=o;o--)p[h+o]=p[l+o];p[s]=v[r]}else{if(0===n)throw new Error;for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o]}}else{for(h=1+(s-=e),l=1+(a-=e),o=e-1;0<=o;o--)p[h+o]=p[l+o];p[s]=v[r]}else for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o]}(e,i,n,o))}var r,s,m=bg,l=0,v=[];r=[],s=[],this.mergeRuns=function(){for(;1<l;){var t=l-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<l;){var t=l-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){r[l]=t,s[l]=e,l+=1}}function Qt(t,e,i,n){i||(i=0),n||(n=t.length);var o=n-i;if(!(o<2)){var a=0;if(o<wg)return void qt(t,i,n,i+(a=Yt(t,i,n,e)),e);var r=new Jt(t,e),s=function(t){for(var e=0;wg<=t;)e|=1&t,t>>=1;return t+e}(o);do{if((a=Yt(t,i,n,e))<s){var l=o;s<l&&(l=s),qt(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 te(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function ee(){return!1}function ie(t,e,i){var n=Ap(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function ne(t){if("string"!=typeof t)return t;var e=Ng.get(t);return e&&e.image}function oe(t,e,i,n,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!i)return e;var a=Ng.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?!re(e=a.image)&&a.pending.push(r):(!e&&(e=new Image),e.onload=ae,Ng.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function ae(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function re(t){return t&&t.width&&t.height}function se(t,e){var i,n,o=t+":"+(e=e||Vg);if(Eg[o])return Eg[o];for(var a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((i=a[s],n=e,Gg.measureText(i,n)).width,r);return Rg<zg&&(zg=0,Eg={}),zg++,Eg[o]=r}function le(t,e,i,n,o,a,r){return a?(l=n,h=ye(t,{rich:a,truncate:r,font:e,textAlign:s=i,textPadding:o}),u=h.outerWidth,c=h.outerHeight,new Xt(he(0,u,s),ue(0,c,l),u,c)):function(t,e,i,n,o,a){var r=ve(t,e,o,a),s=se(t,e);o&&(s+=o[1]+o[3]);var l=r.outerHeight,h=new Xt(he(0,s,i),ue(0,l,n),s,l);return h.lineHeight=r.lineHeight,h}(t,e,i,n,o,r);var s,l,h,u,c}function he(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function ue(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function ce(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 de(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=fe(e,i,n,o);for(var r=0,s=a.length;r<s;r++)a[r]=pe(a[r],o);return a.join("\n")}function fe(t,e,i,n){(n=P({},n)).font=e;i=V(i,"...");n.maxIterations=V(n.maxIterations,2);var o=n.minChar=V(n.minChar,0);n.cnCharWidth=se("国",e);var a=n.ascCharWidth=se("a",e);n.placeholder=V(n.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;var l=se(i);return r<l&&(i="",l=0),r=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=r,n.containerWidth=t,n}function pe(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=se(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?ge(t,o,e.ascCharWidth,e.cnCharWidth):0<a?Math.floor(t.length*o/a):0;a=se(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function ge(t,e,i,n){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?i:n}return a}function me(t){return se("国",t)}function ve(t,e,i,n){null!=t&&(t+="");var o=me(e),a=t?t.split("\n"):[],r=a.length*o,s=r;if(i&&(s+=i[0]+i[2]),t&&n){var l=n.outerHeight,h=n.outerWidth;if(null!=l&&l<s)t="",a=[];else if(null!=h)for(var u=fe(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=a.length;c<d;c++)a[c]=pe(a[c],u)}return{lines:a,height:r,outerHeight:s,lineHeight:o}}function ye(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=Bg.lastIndex=0;null!=(n=Bg.exec(t));){var a=n.index;o<a&&xe(i,t.substring(o,a)),xe(i,n[2],n[1]),o=Bg.lastIndex}o<t.length&&xe(i,t.substring(o,t.length));var r=i.lines,s=0,l=0,h=[],u=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;for(u&&(null!=d&&(d-=u[1]+u[3]),null!=f&&(f-=u[0]+u[2])),D=0;D<r.length;D++){for(var p=r[D],g=0,m=0,v=0;v<p.tokens.length;v++){var y=(C=p.tokens[v]).styleName&&e.rich[C.styleName]||{},x=C.textPadding=y.textPadding,_=C.font=y.font||e.font,w=C.textHeight=V(y.textHeight,me(_));if(x&&(w+=x[0]+x[2]),C.height=w,C.lineHeight=G(y.textLineHeight,e.textLineHeight,w),C.textAlign=y&&y.textAlign||e.textAlign,C.textVerticalAlign=y&&y.textVerticalAlign||"middle",null!=f&&s+C.lineHeight>f)return{lines:[],width:0,height:0};C.textWidth=se(C.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))C.percentWidth=b,h.push(C),b=0;else{if(S){b=C.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&re(I=ne(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var A=null!=d?d-m:null;null!=A&&A<b&&(!S||A<T?(C.text="",C.textWidth=b=0):(C.text=de(C.text,A-T,_,c.ellipsis,{minChar:c.minChar}),C.textWidth=se(C.text,_),b=C.textWidth+T))}m+=C.width=b,y&&(g=Math.max(g,C.lineHeight))}p.width=m,s+=p.lineHeight=g,l=Math.max(l,m)}i.outerWidth=i.width=V(e.textWidth,l),i.outerHeight=i.height=V(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(var D=0;D<h.length;D++){var C=h[D],L=C.percentWidth;C.width=parseInt(L,10)/100*l}return i}function xe(t,e,i){for(var n=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s=o[r],l={styleName:i,text:s,isLineHolder:!s&&!n};if(r)a.push({tokens:[l]});else{var h=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=h.length;1===u&&h[0].isLineHolder?h[0]=l:(s||!u||n)&&h.push(l)}}}function _e(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&h(e)||t.textFont||t.font}function we(t,e){var i,n,o,a,r,s=e.x,l=e.y,h=e.width,u=e.height,c=e.r;h<0&&(s+=h,h=-h),u<0&&(l+=u,u=-u),"number"==typeof c?i=n=o=a=c:c instanceof Array?1===c.length?i=n=o=a=c[0]:2===c.length?(i=o=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],o=c[2]):(i=c[0],n=c[1],o=c[2],a=c[3]):i=n=o=a=0,h<i+n&&(i*=h/(r=i+n),n*=h/r),h<o+a&&(o*=h/(r=o+a),a*=h/r),u<n+o&&(n*=u/(r=n+o),o*=u/r),u<i+a&&(i*=u/(r=i+a),a*=u/r),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.quadraticCurveTo(s+h,l,s+h,l+n),t.lineTo(s+h,l+u-o),0!==o&&t.quadraticCurveTo(s+h,l+u,s+h-o,l+u),t.lineTo(s+a,l+u),0!==a&&t.quadraticCurveTo(s,l+u,s,l+u-a),t.lineTo(s,l+i),0!==i&&t.quadraticCurveTo(s,l,s+i,l)}function be(t){return Se(t),L(t.rich,Se),t}function Se(t){if(t){t.font=_e(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Wg[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Fg[i]?i:"top",t.textPadding&&(t.textPadding=l(t.textPadding))}}function Me(t,e,i,n,o){var a,r,s,l,h,u;n.rich?(r=e,s=i,l=n,h=o,(u=(a=t).__textCotentBlock)&&!a.__dirty||(u=a.__textCotentBlock=ye(s,l)),function(t,e,i,n,o){var a=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,h=Le(s,n,o),u=h.baseX,c=h.baseY,d=h.textAlign,f=h.textVerticalAlign;Ie(e,n,o,u,c);var p=he(u,r,d),g=ue(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;Ae(n)&&De(t,e,n,p,g,r,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)Te(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;0<=C&&"right"===(_=b[C]).textAlign;)Te(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)Te(t,e,_=b[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}(a,r,u,l,h)):function(t,e,i,n,o){var a=ke(e,"font",n.font||Vg),r=n.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=ve(i,a,r,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Le(l,n,o),d=c.baseX,f=c.baseY,p=c.textAlign,g=c.textVerticalAlign;Ie(e,n,o,d,f);var m=ue(f,l,g),v=d,y=m,x=Ae(n);if(x||r){var _=se(i,a);r&&(_+=r[1]+r[3]);var w=he(d,_,p);x&&De(t,e,n,w,m,_,l),r&&(v=Ee(d,p,r),y+=r[0])}ke(e,"textAlign",p||"left"),ke(e,"textBaseline","middle"),ke(e,"shadowBlur",n.textShadowBlur||0),ke(e,"shadowColor",n.textShadowColor||"transparent"),ke(e,"shadowOffsetX",n.textShadowOffsetX||0),ke(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var b=n.textStrokeWidth,S=Pe(n.textStroke,b),M=Oe(n.textFill);S&&(ke(e,"lineWidth",b),ke(e,"strokeStyle",S)),M&&ke(e,"fillStyle",M);for(var I=0;I<h.length;I++)S&&e.strokeText(h[I],v,y),M&&e.fillText(h[I],v,y),y+=u}(t,e,i,n,o)}function Ie(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 Te(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&&Ae(l)&&De(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=Ee(r,s,c),u-=i.height/2-c[2]-i.textHeight/2),ke(e,"shadowBlur",G(l.textShadowBlur,n.textShadowBlur,0)),ke(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ke(e,"shadowOffsetX",G(l.textShadowOffsetX,n.textShadowOffsetX,0)),ke(e,"shadowOffsetY",G(l.textShadowOffsetY,n.textShadowOffsetY,0)),ke(e,"textAlign",s),ke(e,"textBaseline","middle"),ke(e,"font",i.font||Vg);var d=Pe(l.textStroke||n.textStroke,p),f=Oe(l.textFill||n.textFill),p=V(l.textStrokeWidth,n.textStrokeWidth);d&&(ke(e,"lineWidth",p),ke(e,"strokeStyle",d),e.strokeText(i.text,r,u)),f&&(ke(e,"fillStyle",f),e.fillText(i.text,r,u))}function Ae(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function De(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=w(s);if(ke(e,"shadowBlur",i.textBoxShadowBlur||0),ke(e,"shadowColor",i.textBoxShadowColor||"transparent"),ke(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),ke(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?we(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(u)ke(e,"fillStyle",s),e.fill();else if(R(s)){var d=s.image;(d=oe(d,null,t,Ce,s))&&re(d)&&e.drawImage(d,n,o,a,r)}l&&h&&(ke(e,"lineWidth",l),ke(e,"strokeStyle",h),e.stroke())}function Ce(t,e){e.image=t}function Le(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+Ne(s[0],i.width),o=i.y+Ne(s[1],i.height);else{var l=ce(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 ke(t,e,i){return t[e]=Ig(t,e,i),t[e]}function Pe(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Oe(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ne(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function Ee(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function ze(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Re(t){for(var e in t=t||{},dg.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Ag(t.style,this),this._rect=null,this.__clipPaths=[]}function Be(t){Re.call(this,t)}function Ve(t){return parseInt(t,10)}function Ge(t,e,i,n){return i=i||{},n||!mp.canvasSupported?We(t,e,i):mp.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):We(t,e,i),i}function We(t,e,i){var n,o=(n=t).getBoundingClientRect?n.getBoundingClientRect():{left:0,top:0};i.zrX=e.clientX-o.left,i.zrY=e.clientY-o.top}function Fe(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];o&&Ge(t,o,e,i)}else Ge(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&&qg.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function He(t,e,i){Yg?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function Ze(t){return 1<t.which}function Ue(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function je(t){return"mousewheel"===t&&mp.browser.firefox?"DOMMouseScroll":t}function Xe(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 Ye(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function qe(t){var e=t.pointerType;return"pen"===e||"touch"===e}function $e(i){function t(t,e){L(t,function(t){He(i,je(t),e._handlers[t])},e)}var n;Bp.call(this),this.dom=i,this._touching=!1,this._touchTimer,this._gestureMgr=new Jg,this._handlers={},n=this,L(em,function(t){n._handlers[t]=_(om[t],n)}),L(nm,function(t){n._handlers[t]=_(om[t],n)}),L(tm,function(t){var e,i;n._handlers[t]=(e=om[t],i=n,function(){if(!i._touching)return e.apply(i,arguments)})}),mp.pointerEventsSupported?t(nm,this):(mp.touchEventsSupported&&t(em,this),t(tm,this))}function Ke(t,e){var i=new hm(gp(),t,e);return lm[i.id]=i}function Je(t,e){sm[t]=e}function Qe(t){return t instanceof Array?t:null==t?[]:[t]}function ti(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,o=i.length;n<o;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function ei(t){return!dm(t)||fm(t)||t instanceof Date?t:t.value}function ii(t,o){o=(o||[]).slice();var a=k(t||[],function(t,e){return{exist:t}});return cm(o,function(t,e){if(dm(t)){for(i=0;i<a.length;i++)if(!a[i].option&&null!=t.id&&a[i].exist.id===t.id+"")return a[i].option=t,void(o[e]=null);for(var i=0;i<a.length;i++){var n=a[i].exist;if(!(a[i].option||null!=n.id&&null!=t.id||null==t.name||oi(t)||oi(n)||n.name!==t.name+""))return a[i].option=t,void(o[e]=null)}}}),cm(o,function(t,e){if(dm(t)){for(var i=0;i<a.length;i++){var n=a[i].exist;if(!a[i].option&&!oi(n)&&null==t.id){a[i].option=t;break}}i>=a.length&&a.push({option:t})}}),a}function ni(t){var r=C();cm(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),cm(t,function(t,e){var i=t.option;c(!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={})}),cm(t,function(t,e){var i=t.exist,n=t.option,o=t.keyInfo;if(dm(n)){if(o.name=null!=n.name?n.name+"":i?i.name:pm,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 oi(t){return dm(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function ai(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?O(t.dataIndex)?k(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?O(t.name)?k(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function ri(){var e="__\0ec_inner_"+mm+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}function si(s,l,h){if(w(l)){var t={};t[l+"Index"]=0,l=t}var e=h&&h.defaultMainType;!e||li(l,e+"Index")||li(l,e+"Id")||li(l,e+"Name")||(l[e+"Index"]=0);var u={};return cm(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||h&&h.includeMainTypes&&y(h.includeMainTypes,n)<0)){var a={mainType:n};"index"===o&&"all"===t||(a[o]=t);var r=s.queryComponents(a);u[n+"Models"]=r,u[n+"Model"]=r[0]}}else u[e]=t}),u}function li(t,e){return t&&t.hasOwnProperty(e)}function hi(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function ui(t){var e={main:"",sub:""};return t&&(t=t.split(vm),e.main=t[0]||"",e.sub=t[1]||""),e}function ci(t,e){(t.$constructor=t).extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return P(i.prototype,t),i.extend=this.extend,i.superCall=fi,i.superApply=pi,a(i,this),i.superClass=e,i}}function di(t){var e=["__\0is_clz",xm++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function fi(t,e){var i=s(arguments,2);return this.superClass.prototype[e].apply(t,i)}function pi(t,e,i){return this.superClass.prototype[e].apply(t,i)}function gi(i,t){t=t||{};var a={};if(i.registerClass=function(t,e){return e&&(c(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(o=e),'componentType "'+o+'" illegal'),(e=ui(e)).sub?e.sub!==ym&&((i=e,n=a[i.main],n&&n[ym]||((n=a[i.main]={})[ym]=!0),n)[e.sub]=t):a[e.main]=t),t;var i,n,o},i.getClass=function(t,e,i){var n=a[t];if(n&&n[ym]&&(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=ui(t);var i=[],e=a[t.main];return e&&e[ym]?L(e,function(t,e){e!==ym&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=ui(t),!!a[t.main]},i.getAllClassMainTypes=function(){var i=[];return L(a,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=ui(t);var e=a[t.main];return e&&e[ym]},i.parseClassType=ui,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 mi(t){return-Am<t&&t<Am}function vi(t){return Am<t||t<-Am}function yi(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 xi(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function _i(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(mi(r))vi(a)&&0<=(c=-s/a)&&c<=1&&(o[l++]=c);else{var h=a*a-4*r*s;if(mi(h))o[0]=-a/(2*r);else if(0<h){var u=Tm(h),c=(-a+u)/(2*r),d=(-a-u)/(2*r);0<=c&&c<=1&&(o[l++]=c),0<=d&&d<=1&&(o[l++]=d)}}return l}function wi(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 bi(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function Si(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Mi(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function Ii(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 Ti(t,e,i){if(0!==t.length){var n,o=t[0],a=o[0],r=o[0],s=o[1],l=o[1];for(n=1;n<t.length;n++)o=t[n],a=Nm(a,o[0]),r=Em(r,o[0]),s=Nm(s,o[1]),l=Em(l,o[1]);e[0]=a,e[1]=s,i[0]=r,i[1]=l}}function Ai(t,e,i,n,o,a){o[0]=Nm(t,i),o[1]=Nm(e,n),a[0]=Em(t,i),a[1]=Em(e,n)}function Di(t,e,i,n,o,a,r,s,l,h){var u,c=_i,d=yi,f=c(t,i,o,r,Fm);for(l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0,u=0;u<f;u++){var p=d(t,i,o,r,Fm[u]);l[0]=Nm(p,l[0]),h[0]=Em(p,h[0])}for(f=c(e,n,a,s,Hm),u=0;u<f;u++){var g=d(e,n,a,s,Hm[u]);l[1]=Nm(g,l[1]),h[1]=Em(g,h[1])}l[0]=Nm(t,l[0]),h[0]=Em(t,h[0]),l[0]=Nm(r,l[0]),h[0]=Em(r,h[0]),l[1]=Nm(e,l[1]),h[1]=Em(e,h[1]),l[1]=Nm(s,l[1]),h[1]=Em(s,h[1])}function Ci(t,e,i,n,o,a,r,s,l){var h=tt,u=et,c=Math.abs(o-a);if(c%Bm<1e-4&&1e-4<c)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Vm[0]=Rm(o)*i+t,Vm[1]=zm(o)*n+e,Gm[0]=Rm(a)*i+t,Gm[1]=zm(a)*n+e,h(s,Vm,Gm),u(l,Vm,Gm),(o%=Bm)<0&&(o+=Bm),(a%=Bm)<0&&(a+=Bm),a<o&&!r?a+=Bm:o<a&&r&&(o+=Bm),r){var d=a;a=o,o=d}for(var f=0;f<a;f+=Math.PI/2)o<f&&(Wm[0]=Rm(f)*i+t,Wm[1]=zm(f)*n+e,h(s,Wm,s),u(l,Wm,l))}function Li(t,e,i,n,o,a,r){if(0===o)return!1;var s,l=o;if(e+l<r&&n+l<r||r<e-l&&r<n-l||t+l<a&&i+l<a||a<t-l&&a<i-l)return!1;if(t===i)return Math.abs(a-t)<=l/2;var h=(s=(e-n)/(t-i))*a-r+(t*n-i*e)/(t-i);return h*h/(s*s+1)<=l/2*l/2}function ki(t,e,i,n,o,a,r,s,l,h,u){if(0===l)return!1;var c=l;return!(e+c<u&&n+c<u&&a+c<u&&s+c<u||u<e-c&&u<n-c&&u<a-c&&u<s-c||t+c<h&&i+c<h&&o+c<h&&r+c<h||h<t-c&&h<i-c&&h<o-c&&h<r-c)&&function(t,e,i,n,o,a,r,s,l,h,u){var c,d,f,p,g,m=.005,v=1/0;km[0]=l,km[1]=h;for(var y=0;y<1;y+=.05)Pm[0]=yi(t,i,o,r,y),Pm[1]=yi(e,n,a,s,y),(p=Ep(km,Pm))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<Dm);x++)d=c-m,f=c+m,Pm[0]=yi(t,i,o,r,d),Pm[1]=yi(e,n,a,s,d),p=Ep(Pm,km),0<=d&&p<v?(c=d,v=p):(Om[0]=yi(t,i,o,r,f),Om[1]=yi(e,n,a,s,f),g=Ep(Om,km),f<=1&&g<v?(c=f,v=g):m*=.5);return u&&(u[0]=yi(t,i,o,r,c),u[1]=yi(e,n,a,s,c)),Tm(v)}(t,e,i,n,o,a,r,s,h,u,null)<=c/2}function Pi(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var h=r;return!(e+h<l&&n+h<l&&a+h<l||l<e-h&&l<n-h&&l<a-h||t+h<s&&i+h<s&&o+h<s||s<t-h&&s<i-h&&s<o-h)&&function(t,e,i,n,o,a,r,s,l){var h,u=.005,c=1/0;km[0]=r,km[1]=s;for(var d=0;d<1;d+=.05)Pm[0]=bi(t,i,o,d),Pm[1]=bi(e,n,a,d),(m=Ep(km,Pm))<c&&(h=d,c=m);c=1/0;for(var f=0;f<32&&!(u<Dm);f++){var p=h-u,g=h+u;Pm[0]=bi(t,i,o,p),Pm[1]=bi(e,n,a,p);var m=Ep(Pm,km);if(0<=p&&m<c)h=p,c=m;else{Om[0]=bi(t,i,o,g),Om[1]=bi(e,n,a,g);var v=Ep(Om,km);g<=1&&v<c?(h=g,c=v):u*=.5}}return l&&(l[0]=bi(t,i,o,h),l[1]=bi(e,n,a,h)),Tm(c)}(t,e,i,n,o,a,s,l,null)<=h/2}function Oi(t){return(t%=nv)<0&&(t+=nv),t}function Ni(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var h=r;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(i<u-h||u+h<i)return!1;if(Math.abs(n-o)%ov<1e-4)return!0;if(a){var c=n;n=Oi(o),o=Oi(c)}else n=Oi(n),o=Oi(o);o<n&&(o+=ov);var d=Math.atan2(l,s);return d<0&&(d+=ov),n<=d&&d<=o||n<=d+ov&&d+ov<=o}function Ei(t,e,i,n,o,a){if(e<a&&n<a||a<e&&a<n)return 0;if(n===e)return 0;var r=n<e?1:-1,s=(a-e)/(n-e);return 1!==s&&0!==s||(r=n<e?.5:-.5),o<s*(i-t)+t?r:0}function zi(t,e,i,n,o,a,r,s,l,h){if(e<h&&n<h&&a<h&&s<h||h<e&&h<n&&h<a&&h<s)return 0;var u,c=function(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(mi(u)&&mi(c))mi(s)?a[0]=0:0<=(M=-l/s)&&M<=1&&(a[f++]=M);else{var p=c*c-4*u*d;if(mi(p)){var g=c/u,m=-g/2;0<=(M=-s/r+g)&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m)}else if(0<p){var v=Tm(p),y=u*s+1.5*r*(-c+v),x=u*s+1.5*r*(-c-v);0<=(M=(-s-((y=y<0?-Im(-y,Lm):Im(y,Lm))+(x=x<0?-Im(-x,Lm):Im(x,Lm))))/(3*r))&&M<=1&&(a[f++]=M)}else{var _=(2*u*s-3*r*c)/(2*Tm(u*u*u)),w=Math.acos(_)/3,b=Tm(u),S=Math.cos(w),M=(-s-2*b*S)/(3*r),I=(m=(-s+b*(S+Cm*Math.sin(w)))/(3*r),(-s+b*(S-Cm*Math.sin(w)))/(3*r));0<=M&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m),0<=I&&I<=1&&(a[f++]=I)}}return f}(e,n,a,s,h,lv);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=lv[m],y=0===v||1===v?.5:1;yi(t,i,o,r,v)<l||(g<0&&(g=_i(e,n,a,s,hv),hv[1]<hv[0]&&1<g&&(void 0,u=hv[0],hv[0]=hv[1],hv[1]=u),d=yi(e,n,a,s,hv[0]),1<g&&(f=yi(e,n,a,s,hv[1]))),2==g?v<hv[0]?p+=d<e?y:-y:v<hv[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<hv[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function Ri(t,e,i,n,o,a,r,s){if(e<s&&n<s&&a<s||s<e&&s<n&&s<a)return 0;var l=function(t,e,i,n,o){var a=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(mi(a))vi(r)&&0<=(c=-s/r)&&c<=1&&(o[l++]=c);else{var h=r*r-4*a*s;if(mi(h))0<=(c=-r/(2*a))&&c<=1&&(o[l++]=c);else if(0<h){var u=Tm(h),c=(-r+u)/(2*a),d=(-r-u)/(2*a);0<=c&&c<=1&&(o[l++]=c),0<=d&&d<=1&&(o[l++]=d)}}return l}(e,n,a,s,lv);if(0===l)return 0;var h=Mi(e,n,a);if(0<=h&&h<=1){for(var u=0,c=bi(e,n,a,h),d=0;d<l;d++)f=0===lv[d]||1===lv[d]?.5:1,(p=bi(t,i,o,lv[d]))<r||(lv[d]<h?u+=c<e?f:-f:u+=a<c?f:-f);return u}var f=0===lv[0]||1===lv[0]?.5:1,p=bi(t,i,o,lv[0]);return p<r?0:a<e?f:-f}function Bi(t,e,i,n,o,a,r,s){if((s-=e)>i||s<-i)return 0;h=Math.sqrt(i*i-s*s),lv[0]=-h,lv[1]=h;var l=Math.abs(n-o);if(l<1e-4)return 0;if(l%rv<1e-4)return o=rv,p=a?1:-1,r>=lv[n=0]+t&&r<=lv[1]+t?p:0;if(a){var h=n;n=Oi(o),o=Oi(h)}else n=Oi(n),o=Oi(o);o<n&&(o+=rv);for(var u=0,c=0;c<2;c++){var d=lv[c];if(r<d+t){var f=Math.atan2(s,d),p=a?1:-1;f<0&&(f=rv+f),(n<=f&&f<=o||n<=f+rv&&f+rv<=o)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),u+=p)}}return u}function Vi(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,h=0,u=0;u<t.length;){var c=t[u++];switch(c===av.M&&1<u&&(i||(a+=Ei(r,s,l,h,n,o))),1==u&&(l=r=t[u],h=s=t[u+1]),c){case av.M:r=l=t[u++],s=h=t[u++];break;case av.L:if(i){if(Li(r,s,t[u],t[u+1],e,n,o))return!0}else a+=Ei(r,s,t[u],t[u+1],n,o)||0;r=t[u++],s=t[u++];break;case av.C:if(i){if(ki(r,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else a+=zi(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 av.Q:if(i){if(Pi(r,s,t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else a+=Ri(r,s,t[u++],t[u++],t[u],t[u+1],n,o)||0;r=t[u++],s=t[u++];break;case av.A:var d=t[u++],f=t[u++],p=t[u++],g=t[u++],m=t[u++],v=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;1<u?a+=Ei(r,s,x,_,n,o):(l=x,h=_);var w=(n-d)*g/p+d;if(i){if(Ni(d,f,g,m,m+v,y,e,w,o))return!0}else a+=Bi(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case av.R:l=r=t[u++],h=s=t[u++];x=l+t[u++],_=h+t[u++];if(i){if(Li(l,h,x,h,e,n,o)||Li(x,h,x,_,e,n,o)||Li(x,_,l,_,e,n,o)||Li(l,_,l,h,e,n,o))return!0}else a+=Ei(x,h,x,_,n,o),a+=Ei(l,_,l,h,n,o);break;case av.Z:if(i){if(Li(r,s,l,h,e,n,o))return!0}else a+=Ei(r,s,l,h,n,o);r=l,s=h}}return i||(b=s,S=h,Math.abs(b-S)<sv)||(a+=Ei(r,s,l,h,n,o)||0),0!==a;var b,S}function Gi(t){Re.call(this,t),this.path=null}function Wi(t,e,i,n,o,a,r,s,l,h,u){var c=l*(bv/180),d=wv(c)*(t-i)/2+_v(c)*(e-n)/2,f=-1*_v(c)*(t-i)/2+wv(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);1<p&&(r*=xv(p),s*=xv(p));var g=(o===a?-1:1)*xv((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+wv(c)*m-_v(c)*v,x=(e+n)/2+_v(c)*m+wv(c)*v,_=Iv([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=Iv(w,b);Mv(w,b)<=-1&&(S=bv),1<=Mv(w,b)&&(S=0),0===a&&0<S&&(S-=2*bv),1===a&&S<0&&(S+=2*bv),u.addData(h,y,x,r,s,_,S,c,a)}function Fi(t,e){var i=function(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/  /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e<yv.length;e++)i=i.replace(new RegExp(yv[e],"g"),"|"+yv[e]);var n,o=i.split("|"),a=0,r=0,s=new iv,l=iv.CMD;for(e=1;e<o.length;e++){var h,u=o[e],c=u.charAt(0),d=0,f=u.slice(1).replace(/e,-/g,"e-").split(",");0<f.length&&""===f[0]&&f.shift();for(var p=0;p<f.length;p++)f[p]=parseFloat(f[p]);for(;d<f.length&&!isNaN(f[d])&&!isNaN(f[0]);){var g,m,v,y,x,_,w,b=a,S=r;switch(c){case"l":a+=f[d++],r+=f[d++],h=l.L,s.addData(h,a,r);break;case"L":a=f[d++],r=f[d++],h=l.L,s.addData(h,a,r);break;case"m":a+=f[d++],r+=f[d++],h=l.M,s.addData(h,a,r),c="l";break;case"M":a=f[d++],r=f[d++],h=l.M,s.addData(h,a,r),c="L";break;case"h":a+=f[d++],h=l.L,s.addData(h,a,r);break;case"H":a=f[d++],h=l.L,s.addData(h,a,r);break;case"v":r+=f[d++],h=l.L,s.addData(h,a,r);break;case"V":r=f[d++],h=l.L,s.addData(h,a,r);break;case"C":h=l.C,s.addData(h,f[d++],f[d++],f[d++],f[d++],f[d++],f[d++]),a=f[d-2],r=f[d-1];break;case"c":h=l.C,s.addData(h,f[d++]+a,f[d++]+r,f[d++]+a,f[d++]+r,f[d++]+a,f[d++]+r),a+=f[d-2],r+=f[d-1];break;case"S":g=a,m=r;var M=s.len(),I=s.data;n===l.C&&(g+=a-I[M-4],m+=r-I[M-3]),h=l.C,b=f[d++],S=f[d++],a=f[d++],r=f[d++],s.addData(h,g,m,b,S,a,r);break;case"s":g=a,m=r,M=s.len(),I=s.data,n===l.C&&(g+=a-I[M-4],m+=r-I[M-3]),h=l.C,b=a+f[d++],S=r+f[d++],a+=f[d++],r+=f[d++],s.addData(h,g,m,b,S,a,r);break;case"Q":b=f[d++],S=f[d++],a=f[d++],r=f[d++],h=l.Q,s.addData(h,b,S,a,r);break;case"q":b=f[d++]+a,S=f[d++]+r,a+=f[d++],r+=f[d++],h=l.Q,s.addData(h,b,S,a,r);break;case"T":g=a,m=r,M=s.len(),I=s.data,n===l.Q&&(g+=a-I[M-4],m+=r-I[M-3]),a=f[d++],r=f[d++],h=l.Q,s.addData(h,g,m,a,r);break;case"t":g=a,m=r,M=s.len(),I=s.data,n===l.Q&&(g+=a-I[M-4],m+=r-I[M-3]),a+=f[d++],r+=f[d++],h=l.Q,s.addData(h,g,m,a,r);break;case"A":v=f[d++],y=f[d++],x=f[d++],_=f[d++],w=f[d++],Wi(b=a,S=r,a=f[d++],r=f[d++],_,w,v,y,x,h=l.A,s);break;case"a":v=f[d++],y=f[d++],x=f[d++],_=f[d++],w=f[d++],Wi(b=a,S=r,a+=f[d++],r+=f[d++],_,w,v,y,x,h=l.A,s)}}"z"!==c&&"Z"!==c||(h=l.Z,s.addData(h)),n=h}return s.toStatic(),s}(t);return(e=e||{}).buildPath=function(t){if(t.setData)t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e);else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){vv(i,t),this.dirty(!0)},e}function Hi(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function Zi(t,e,i){var n=e.points,o=e.smooth;if(n&&2<=n.length){if(o&&"spline"!==o){var a=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<f;d++)tt(r,r,t[d]),et(s,s,t[d]);tt(r,r,n[0]),et(s,s,n[1])}for(var d=0,f=t.length;d<f;d++){var p=t[d];if(i)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(W(t[d]));continue}o=t[d-1],a=t[d+1]}U(h,a,o),Y(h,h,e);var g=$(p,o),m=$(p,a),v=g+m;0!==v&&(g/=v,m/=v),Y(u,h,-g),Y(c,h,m);var y=H([],p,u),x=H([],p,c);n&&(et(y,y,r),tt(y,y,s),et(x,x,r),tt(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l}(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=function(t,e){for(var i=t.length,n=[],o=0,a=1;a<i;a++)o+=$(t[a-1],t[a]);var r=o/2;for(r=r<i?i:r,a=0;a<r;a++){var s,l,h,u=a/(r-1)*(e?i:i-1),c=Math.floor(u),d=u-c,f=t[c%i];h=e?(s=t[(c-1+i)%i],l=t[(c+1)%i],t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[i-2<c?i-1:c+1],t[i-3<c?i-1:c+2]);var p=d*d,g=d*p;n.push([Hi(s[0],f[0],l[0],h[0],d,p,g),Hi(s[1],f[1],l[1],h[1],d,p,g)])}return n}(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function Ui(t,e,i){var n=t.cpx2,o=t.cpy2;return null===n||null===o?[(i?xi:yi)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?xi:yi)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Si:bi)(t.x1,t.cpx1,t.x2,e),(i?Si:bi)(t.y1,t.cpy1,t.y2,e)]}function ji(t){Re.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Xi(t){return Gi.extend(t)}function Yi(t,e,i,n){var o=new Gi(Fi(t,e)),a=o.getBoundingRect();return i&&("center"===n&&(i=$i(i,a)),Ki(o,i)),o}function qi(t,i,n){var o=new Be({style:{image:t,x:i.x,y:i.y,width:i.width,height:i.height},onload:function(t){if("center"===n){var e={width:t.width,height:t.height};o.setStyle($i(i,e))}}});return o}function $i(t,e){var i,n=e.width/e.height,o=t.height*n;return i=o<=t.width?t.height:(o=t.width)/n,{x:t.x+t.width/2-o/2,y:t.y+t.height/2-i/2,width:o,height:i}}function Ki(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function Ji(t){var e=t.shape,i=t.style.lineWidth;return Zv(2*e.x1)===Zv(2*e.x2)&&(e.x1=e.x2=tn(e.x1,i,!0)),Zv(2*e.y1)===Zv(2*e.y2)&&(e.y1=e.y2=tn(e.y1,i,!0)),t}function Qi(t){var e=t.shape,i=t.style.lineWidth,n=e.x,o=e.y,a=e.width,r=e.height;return e.x=tn(e.x,i,!0),e.y=tn(e.y,i,!0),e.width=Math.max(tn(n+a,i,!1)-e.x,0===a?0:1),e.height=Math.max(tn(o+r,i,!1)-e.y,0===r?0:1),t}function tn(t,e,i){var n=Zv(2*t);return(n+Zv(e))%2==0?n/2:(n+(i?1:-1))/2}function en(t){return null!=t&&"none"!=t}function nn(t){return"string"==typeof t?Dt(t,-.1):t}function on(t){if(t.__hoverStlDirty){var e=t.style.stroke,i=t.style.fill,n=t.__hoverStl;n.fill=n.fill||(en(i)?nn(i):null),n.stroke=n.stroke||(en(e)?nn(e):null);var o={};for(var a in n)null!=n[a]&&(o[a]=t.style[a]);t.__normalStl=o,t.__hoverStlDirty=!1}}function an(t){if(!t.__isHover){if(on(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,i=e.insideRollbackOpt;i&&((o=(n=e).insideRollback)&&(n.textFill=o.textFill,n.textStroke=o.textStroke,n.textStrokeWidth=o.textStrokeWidth)),e.extendFrom(t.__hoverStl),i&&(_n(e,e.insideOriginalTextPosition,i),null==e.textFill&&(e.textFill=i.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}var n,o}function rn(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function sn(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&an(t)}):an(t)}function ln(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&rn(t)}):rn(t)}function hn(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&on(t)}function un(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&sn(this)}function cn(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&ln(this)}function dn(){this.__isEmphasis=!0,sn(this)}function fn(){this.__isEmphasis=!1,ln(this)}function pn(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&hn(t,e)}):hn(t,e),t.on("mouseover",un).on("mouseout",cn),t.on("emphasis",dn).on("normal",fn)}function gn(t,e,i,n,o,a,r){var s,l=(o=o||Xv).labelFetcher,h=o.labelDataIndex,u=o.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(h,"normal",null,u)),null==s&&(s=m(o.defaultText)?o.defaultText(h,o):o.defaultText));var f=c?s:null,p=d?V(l?l.getFormattedLabel(h,"emphasis",null,u):null,s):null;null==f&&null==p||(mn(t,i,a,o),mn(e,n,r,o,!0)),t.text=f,e.text=p}function mn(t,e,i,n,o){return vn(t,e,n,o),i&&P(t,i),t.host&&t.host.dirty&&t.host.dirty(!1),t}function vn(t,e,i,n){if((i=i||Xv).isRectText){var o=e.getShallow("position")||(n?null:"inside");"outside"===o&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=V(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,h=function(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||Xv).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(h)for(var u in r={},h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);yn(r[u]={},c,l,i,n)}return t.rich=r,yn(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function yn(t,e,i,n,o,a){if(i=!o&&i||Xv,t.textFill=xn(e.getShallow("color"),n)||i.color,t.textStroke=xn(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=V(e.getShallow("textBorderWidth"),i.textBorderWidth),!o){if(a){var r=t.textPosition;t.insideRollback=_n(t,r,n),t.insideOriginalTextPosition=r,t.insideRollbackOpt=n}null==t.textFill&&(t.textFill=n.autoColor)}t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=xn(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=xn(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function xn(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function _n(t,e,i){var n,o=i.useInsideStyle;return null==t.textFill&&!1!==o&&(!0===o||i.isRectText&&e&&"string"==typeof e&&0<=e.indexOf("inside"))&&(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 wn(t,e){var i=e||e.getModel("textStyle");return h([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 bn(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)),0<s?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 Sn(t,e,i,n,o){bn(!0,t,e,i,n,o)}function Mn(t,e,i,n,o){bn(!1,t,e,i,n,o)}function In(t,e){for(var i=st([]);t&&t!==e;)ht(i,t.getLocalTransform(),i),t=t.parent;return i}function Tn(t,e,i){return e&&!N(e)&&(e=Up.getLocalTransform(e)),i&&(e=ft([],e)),Q([],t,e)}function An(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=Tn(a,e,i),Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"}function Dn(t,e,n,i){function o(t){var e={position:W(t.position),rotation:t.rotation};return t.shape&&(e.shape=P({},t.shape)),e}if(t&&e){var a=(r={},t.traverse(function(t){!t.isGroup&&t.anid&&(r[t.anid]=t)}),r);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=o(t);t.attr(o(e)),Sn(t,i,n,t.dataIndex)}}})}var r}function Cn(t,n){return k(t,function(t){var e=t[0];e=Uv(e,n.x),e=jv(e,n.x+n.width);var i=t[1];return i=Uv(i,n.y),[e,i=jv(i,n.y+n.height)]})}function Ln(t,e,i){var n=(e=P({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),E(n,i),new Be(e)):Yi(t.replace("path://",""),e,i,"center")}function kn(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Pn(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function On(t,e){var i=ey(t).getParent;return i?i.call(t,e):t.parentModel}function Nn(t){return[t||"",oy++,Math.random().toFixed(5)].join("_")}function En(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(0<o){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 zn(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?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i}function Rn(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Bn(t){return t.sort(function(t,e){return t-e}),t}function Vn(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 Gn(t){var e=t.toString(),i=e.indexOf("e");if(0<i){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Wn(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 Fn(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=k(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=k(a,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),h=k(a,function(t,e){return t-s[e]});l<r;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,f=h.length;d<f;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/o}function Hn(t){var e=2*Math.PI;return(t%e+e)%e}function Zn(t){return-ay<t&&t<ay}function Un(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=sy.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}function jn(t){return Math.pow(10,Xn(t))}function Xn(t){return Math.floor(Math.log(t)/Math.LN10)}function Yn(t,e){var i=Xn(t),n=Math.pow(10,i),o=t/n;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*n,-20<=i?+t.toFixed(i<0?-i:0):t}function qn(t){t.sort(function(t,e){return function t(e,i,n){return e.interval[n]<i.interval[n]||e.interval[n]===i.interval[n]&&(e.close[n]-i.close[n]==(n?-1:1)||!n&&t(e,i,1))}(t,e,0)?-1:1});for(var e=-1/0,i=1,n=0;n<t.length;){for(var o=t[n].interval,a=t[n].close,r=0;r<2;r++)o[r]<=e&&(o[r]=e,a[r]=r?1:1-i),e=o[r],i=a[r];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t}function $n(t){return 0<=t-parseFloat(t)}function Kn(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function Jn(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 Qn(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function to(t,e,i){O(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=uy[a];t=t.replace(cy(r),cy(r,0))}for(var s=0;s<n;s++)for(var l=0;l<o.length;l++){var h=e[s][o[l]];t=t.replace(cy(uy[l],s),i?Qn(h):h)}return t}function eo(i,t,n){return L(t,function(t,e){i=i.replace("{"+e+"}",n?Qn(t):t)}),i}function io(t,e){var i=(t=w(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type;e=t.extraCssText;return i?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Qn(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Qn(i)+";"+(e||"")+'"></span>':""}function no(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Un(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.replace("MM",dy(r)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",dy(s)).replace("d",s).replace("hh",dy(l)).replace("h",l).replace("mm",dy(h)).replace("m",h).replace("ss",dy(u)).replace("s",u)}function oo(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ao(u,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"===u){var l=a.width+(s?-s.x+a.x:0);v=(i=g+l)>f||t.newline?(g=0,i=l,m+=v+d,a.height):Math.max(v,a.height)}else{var h=a.height+(s?-s.y+a.y:0);v=(n=m+h)>p||t.newline?(g+=v+d,m=0,n=h,a.width):Math.max(v,a.width)}t.newline||(o[0]=g,o[1]=m,"horizontal"===u?g=i+d:m=n+d)})}function ro(t,e,i){i=hy(i||0);var n=e.width,o=e.height,a=zn(t.left,n),r=zn(t.top,o),s=zn(t.right,n),l=zn(t.bottom,o),h=zn(t.width,n),u=zn(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)&&(n/o<f?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 p=new Xt(a+i[3],r+i[0],h,u);return p.margin=i,p}function so(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],r=!o||!o.hv||o.hv[1],s=o&&o.boundingMode||"all";if(a||r){var l;if("raw"===s)l="group"===t.type?new Xt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(l=l.clone()).applyTransform(h)}e=ro(E({width:l.width,height:l.height},e),i,n);var u=t.position,c=a?e.x-l.x:0,d=r?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[u[0]+c,u[1]+d])}}function lo(l,h,t){function e(t,e){var i={},n=0,o={},a=0;if(my(t,function(t){o[t]=l[t]}),my(t,function(t){u(h,t)&&(i[t]=o[t]=h[t]),c(i,t)&&n++,c(o,t)&&a++}),d[e])return c(h,t[1])?o[t[2]]=null:c(h,t[2])&&(o[t[1]]=null),o;if(2!==a&&n){if(2<=n)return i;for(var r=0;r<t.length;r++){var s=t[r];if(!u(i,s)&&u(l,s)){i[s]=l[s];break}}return i}return o}function u(t,e){return t.hasOwnProperty(e)}function c(t,e){return null!=t[e]&&"auto"!==t[e]}function i(t,e,i){my(t,function(t){e[t]=i[t]})}!R(t)&&(t={});var d=t.ignoreSize;!O(d)&&(d=[d,d]);var n=e(yy[0],0),o=e(yy[1],1);i(yy[0],l,n),i(yy[1],l,o)}function ho(t){return uo({},t)}function uo(e,i){return i&&e&&my(vy,function(t){i.hasOwnProperty(t)&&(e[t]=i[t])}),e}function co(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:C(),categoryAxisMap:C()},n=Ay[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}function fo(t){return"category"===t.get("type")}function po(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===ky?{}:[]),this.sourceFormat=t.sourceFormat||Py,this.seriesLayoutBy=t.seriesLayoutBy||Ny,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&C(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function go(t){var e=t.option,i=e.data,n=v(i)?Oy:Dy,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);if(l){var h=l.option;i=h.source,n=zy(l).sourceFormat,o=!0,a=a||h.seriesLayoutBy,null==r&&(r=h.sourceHeader),s=s||h.dimensions}var u=function(t,e,i,n,o){if(!t)return{dimensionsDefine:mo(o)};var a,r,s,l;if(e===Cy)"auto"===n||null==n?vo(function(t){null!=t&&"-"!==t&&(w(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],vo(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===Ey?t.length:t[0]?t[0].length:null;else if(e===Ly)o||(o=function(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e){var n=[];return L(e,function(t,e){n.push(e)}),n}}(t),s=!0);else if(e===ky)o||(o=[],s=!0,L(t,function(t,e){o.push(e)}));else if(e===Dy){var h=ei(t[0]);a=O(h)&&h.length||1}return s&&L(o,function(t,e){"name"===(R(t)?t.name:t)&&(l=e)}),{startIndex:r,dimensionsDefine:mo(o),dimensionsDetectCount:a,potentialNameDimIndex:l}}(i,n,a,r,s),c=e.encode;!c&&l&&(c=function(t,e,i,n,o,a){var r=co(t),s={},l=[],h=[],u=t.subType,c=C(["pie","map","funnel"]),d=C(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(r&&null!=d.get(u)){var f=t.ecModel,p=zy(f).datasetMap,g=e.uid+"_"+o,m=p.get(g)||p.set(g,{categoryWayDim:1,valueWayDim:0});L(r.coordSysDims,function(t){if(null==r.firstCategoryDimIndex)e=m.valueWayDim++,s[t]=e,h.push(e);else if(r.categoryAxisMap.get(t))s[t]=0,l.push(0);else{var e=m.categoryWayDim++;s[t]=e,h.push(e)}})}else if(null!=c.get(u)){for(var v,y=0;y<5&&null==v;y++)yo(i,n,o,a.dimensionsDefine,a.startIndex,y)||(v=y);if(null!=v){s.value=v;var x=a.potentialNameDimIndex||Math.max(v-1,0);h.push(x),l.push(x)}}return l.length&&(s.itemName=l),h.length&&(s.seriesName=h),s}(t,l,i,n,a,u)),zy(t).source=new po({data:i,fromDataset:o,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:u.dimensionsDefine,startIndex:u.startIndex,dimensionsDetectCount:u.dimensionsDetectCount,encodeDefine:c})}function mo(t){if(t){var n=C();return k(t,function(t,e){if(null==(t=P({},R(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=n.get(t.name);return i?t.name+="-"+i.count++:n.set(t.name,{count:1}),t})}}function vo(t,e,i,n){if(null==n&&(n=1/0),e===Ey)for(a=0;a<i.length&&a<n;a++)t(i[a]?i[a][0]:null,a);else for(var o=i[0]||[],a=0;a<o.length&&a<n;a++)t(o[a],a)}function yo(t,e,i,n,o,a){function r(t){return(null==t||!isFinite(t)||""===t)&&(!(!w(t)||"-"===t)||void 0)}var s,l;if(v(t))return!1;if(n&&(l=R(l=n[a])?l.name:l),e===Cy)if(i===Ey){for(var h=t[a],u=0;u<(h||[]).length&&u<5;u++)if(null!=(s=r(h[o+u])))return s}else for(u=0;u<t.length&&u<5;u++){var c=t[o+u];if(c&&null!=(s=r(c[a])))return s}else if(e===Ly){if(!l)return;for(u=0;u<t.length&&u<5;u++)if((d=t[u])&&null!=(s=r(d[l])))return s}else if(e===ky){if(!l)return;if(!(h=t[l])||v(h))return!1;for(u=0;u<h.length&&u<5;u++)if(null!=(s=r(h[u])))return s}else if(e===Dy)for(u=0;u<t.length&&u<5;u++){var d=t[u],f=ei(d);if(!O(f))return!1;if(null!=(s=r(f[a])))return s}return!1}function xo(t){var i;t=t,this.option={},this.option[Ry]=1,this._componentsMap=C({series:[]}),this._seriesIndices,this._seriesIndicesMap,i=t,L(this._theme.option,function(t,e){by.hasClass(e)||("object"==typeof t?i[e]=i[e]?g(i[e],t,!1):D(t):null==i[e]&&(i[e]=t))}),g(t,My,!1),this.mergeOption(t)}function _o(t,e){t._seriesIndicesMap=C(t._seriesIndices=k(e,function(t){return t.componentIndex})||[])}function wo(t,e){return e.hasOwnProperty("subType")?I(t,function(t){return t.subType===e.subType}):t}function bo(e){L(Vy,function(t){this[t]=_(e[t],e)},this)}function So(){this._coordinateSystems=[]}function Mo(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Io(t,e,i){var l={width:e,height:i,aspectratio:e/i},h=!0;return L(t,function(t,e){var i,n,o,a=e.match(Uy);if(a&&a[1]&&a[2]){var r=a[1],s=a[2].toLowerCase();i=l[s],n=t,("min"===(o=r)?n<=i:"max"===o?i<=n:i===n)||(h=!1)}}),h}function To(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=Yy.length;i<n;i++){var o=Yy[i],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?g(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?g(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function Ao(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,o=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,E(t[e],n)):t[e]=n),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o)}}function Do(t){Ao(t,"itemStyle"),Ao(t,"lineStyle"),Ao(t,"areaStyle"),Ao(t,"label"),Ao(t,"labelLine"),Ao(t,"upperLabel"),Ao(t,"edgeLabel")}function Co(t){var e=Xy(t)&&t.textStyle;if(e)for(var i=0,n=gm.length;i<n;i++){var o=gm[i];e.hasOwnProperty(o)&&(t[o]=e[o])}}function Lo(t){t&&(Do(t),Co(t.label),t.emphasis&&Co(t.emphasis.label))}function ko(t){return O(t)?t:t?[t]:[]}function Po(t){return(O(t)?t[0]:t)||{}}function Oo(e){L($y,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}function No(t,e){po.isInstance(t)||(t=po.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===Oy&&(this._offset=0,this._dimSize=e,this._data=i),P(this,tx[n===Cy?n+"_"+t.seriesLayoutBy:n])}function Eo(){return this._data.length}function zo(t){return this._data[t]}function Ro(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function Bo(t,e,i,n){return null!=i?t[i]:t}function Vo(t,e,i,n){return Go(t[n],this._dimensionInfos[e])}function Go(t,e){var i=e&&e.type;if("ordinal"!==i)return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Un(t)),null==t||""===t?NaN:+t;var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}function Wo(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var o,a,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(o=s.name,a=s.index),ex[r](n,e,a,o)}}}function Fo(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===Dy||n===Ly){var o=t.getRawDataItem(e);return n!==Dy||R(o)||(o=null),o?o[i]:void 0}}}function Ho(t){return new Zo(t)}function Zo(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}function Uo(t){var i,n,e=t.name;pm===e&&(t.name=(i=t.getRawData(),n=[],L(i.mapDimension("seriesName",!0),function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")||e))}function jo(t){return t.model.getRawData().count()}function Xo(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Yo}function Yo(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function qo(e,i){L(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,z($o,i))})}function $o(t){var e=Ko(t);e&&e.setOutputEnd(this.count())}function Ko(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}}function Jo(){this.group=new _g,this.uid=Nn("viewChart"),this.renderTask=Ho({plan:ea,reset:ia}),this.renderTask.context={view:this}}function Qo(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i<t.childCount();i++)Qo(t.childAt(i),e)}function ta(e,t,i){var n=ai(e,t);null!=n?L(Qe(n),function(t){Qo(e.getItemGraphicEl(t),i)}):e.eachItemGraphicEl(function(t){Qo(t,i)})}function ea(t){return dx(t.model)}function ia(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,a=e.pipelineContext.incrementalRender,r=t.view,s=o&&cx(o).updateMethod;return r[a&&r.incrementalPrepareRender?"incrementalPrepareRender":s&&r[s]?s:"render"](e,i,n,o),a?na:null}function na(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}function oa(t,i,n){function o(){c=(new Date).getTime(),d=null,t.apply(s,l||[])}var a,r,s,l,h,u=0,c=0,d=null;i=i||0;var e=function(){a=(new Date).getTime(),s=this,l=arguments;var t=h||i,e=h||n;h=null,r=a-(e?u:c)-t,clearTimeout(d),e?d=setTimeout(o,t):0<=r?o():d=setTimeout(o,-r),u=a};return e.clear=function(){d&&(clearTimeout(d),d=null)},e.debounceNextCall=function(t){h=t},e}function aa(t,e,i,n){var o=t[e];if(o){var a=o[px]||o,r=o[mx];if(o[gx]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=oa(a,i,"debounce"===n))[px]=a,o[mx]=n,o[gx]=i}return o}}function ra(t,e){var i=t[e];i&&i[px]&&(t[e]=i[px])}function sa(t,e){this.ecInstance=t,this.api=e,this.unfinished,this._stageTaskMap=C()}function la(l,t,h,u,c){function d(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}var f;c=c||{},L(t,function(n,t){if(!c.visualType||c.visualType===n.visualType){var e=l._stageTaskMap.get(n.uid),i=e.seriesTaskMap,o=e.overallTask;if(o){var a,r=o.agentStubMap;r.each(function(t){d(c,t)&&(t.dirty(),a=!0)}),a&&o.dirty(),Sx(o,u);var s=l.getPerformArgs(o,c.block);r.each(function(t){t.perform(s)}),f|=o.perform(s)}else i&&i.each(function(t,e){d(c,t)&&t.dirty();var i=l.getPerformArgs(t,c.block);i.skip=!n.performRawSeries&&h.isSeriesFiltered(t.context.model),Sx(t,u),f|=t.perform(i)})}}),l.unfinished|=f}function ha(t){t.overallReset(t.ecModel,t.api,t.payload)}function ua(t,e){return t.overallProgress&&ca}function ca(){this.agent.dirty(),this.getDownstream().dirty()}function da(){this.agent&&this.agent.dirty()}function fa(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function pa(t){if(t.useClearVisual&&t.data.clearAllVisual(),(t.resetDefines=Qe(t.reset(t.model,t.ecModel,t.api,t.payload))).length)return ga}function ga(t,e){for(var i=e.data,n=e.resetDefines,o=0;o<n.length;o++){var a=n[o];if(a&&a.dataEach)for(var r=t.start;r<t.end;r++)a.dataEach(i,r);else a&&a.progress&&a.progress(t,i)}}function ma(t){return t.data.count()}function va(t,e,i){var n=e.uid,o=t._pipelineMap.get(n);!o.head&&(o.head=i),o.tail&&o.tail.pipe(i),(o.tail=i).__idxInPipeline=o.count++,i.__pipeline=o}function ya(t,e){for(var i in e.prototype)t[i]=M}function xa(n){return function(t,e,i){t=t&&t.toLowerCase(),Bp.prototype[n].call(this,t,e,i)}}function _a(){Bp.call(this)}function wa(t,e,i){function n(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=qx[e]),this.id,this.group,this._dom=t;var o=this._zr=Ke(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=oa(_(o.flush,o),17),(e=D(e))&&Jy(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new So;var a,r,s=this._api=(r=(a=this)._coordSysMgr,P(new bo(a),{getCoordinateSystems:_(r.getCoordinateSystems,r),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return a._model.getComponent(e.mainType,e.index);t=t.parent}}}));this._scheduler=new sa(this,s),Bp.call(this),this._messageCenter=new _a,this._initEvents(),this.resize=_(this.resize,this),this._pendingActions=[],Qt(Yx,n),Qt(Ux,n),o.animation.on("frame",this._onframe,this),d(this)}function ba(t,e,i){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=si(o,e);for(var r=0;r<a.length;r++){var s=a[r];if(s[t]&&null!=(n=s[t](o,e,i)))return n}}function Sa(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(Ux),i.prepareStageTasks(Yx),Ca(t,"component",e,i),Ca(t,"chart",e,i),i.plan()}function Ma(i,e,n,o,t){function a(t){t&&t.__alive&&t[e]&&t[e](t.__model,r,i._api,n)}var r=i._model;if(o){var s={};s[o+"Id"]=n[o+"Id"],s[o+"Index"]=n[o+"Index"],s[o+"Name"]=n[o+"Name"];var l={mainType:o,query:s};t&&(l.subType=t),r&&r.eachComponent(l,function(t,e){a(i["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},i)}else Px(i._componentsViews.concat(i._chartsViews),a)}function Ia(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Ta(e,t){var i=e.type,n=e.escapeConnect,o=Hx[i],a=o.actionInfo,r=(a.update||"update").split(":"),s=r.pop();r=null!=r[0]&&Ex(r[0]),this[Rx]=!0;var l=[e],h=!1;e.batch&&(h=!0,l=k(e.batch,function(t){return(t=E(P({},t),e)).batch=null,t}));var u,c=[],d="highlight"===i||"downplay"===i;Px(l,function(t){(u=(u=o.action(t,this._model,this._api))||P({},t)).type=a.event||u.type,c.push(u),d?Ma(this,s,t,"series"):r&&Ma(this,s,t,r.main,r.sub)},this),"none"===s||d||r||(this[Bx]?(Sa(this),Wx.update.call(this,e),this[Bx]=!1):Wx[s].call(this,e)),u=h?{type:a.event||i,escapeConnect:n,batch:c}:c[0],this[Rx]=!1,!t&&this._messageCenter.trigger(u.type,u)}function Aa(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Ta.call(this,i,t)}}function Da(t){!t&&this.trigger("updated")}function Ca(t,e,o,a){function i(t){var e="_ec_"+t.id+"_"+t.type,i=l[e];if(!i){var n=Ex(t.type);(i=new(r?lx.getClass(n.main,n.sub):Jo.getClass(n.sub))).init(o,u),l[e]=i,s.push(i),h.add(i.group)}t.__viewId=i.__id=e,i.__alive=!0,i.__model=t,i.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!r&&a.prepareView(i,t,o,u)}for(var r="component"===e,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,h=t._zr,u=t._api,n=0;n<s.length;n++)s[n].__alive=!1;for(r?o.eachComponent(function(t,e){"series"!==t&&i(e)}):o.eachSeries(i),n=0;n<s.length;){var c=s[n];c.__alive?n++:(!r&&c.renderTask.dispose(),h.remove(c.group),c.dispose(o,u),s.splice(n,1),delete l[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function La(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function ka(t,e,i,n){var o,a,r,s,l;o=t,a=e,r=i,s=n,Px(l||o._componentsViews,function(t){var e=t.__model;t.render(e,a,r,s),Na(e,t)}),Px(t._chartsViews,function(t){t.__alive=!1}),Pa(t,e,i,n),Px(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function Pa(a,t,e,r,s){var l,i,n,o,h,u=a._scheduler;t.eachSeries(function(t){var e=a._chartsMap[t.__viewId];e.__alive=!0;var i,n,o=e.renderTask;u.updatePayload(o,r),s&&s.get(t.uid)&&o.dirty(),l|=o.perform(u.getPerformArgs(o)),e.group.silent=!!t.get("silent"),Na(t,e),i=e,n=t.get("blendMode")||null,i.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}),u.unfinished|=l,i=a._zr,n=t,o=i.storage,h=0,o.traverse(function(t){t.isGroup||h++}),h>n.get("hoverLayerThreshold")&&!mp.node&&o.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),xx(a._zr.dom,t)}function Oa(e,i){Px(Xx,function(t){t(e,i)})}function Na(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 Ea(t){Jx[t]=!1}function za(t){return Kx[(e=t,i=e_,e.getAttribute?e.getAttribute(i):e[i])];var e,i}function Ra(t,e){qx[t]=e}function Ba(t){jx.push(t)}function Va(t,e){Za(Ux,t,e,1e3)}function Ga(t,e,i){"function"==typeof e&&(i=e,e="");var n=Nx(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,kx(Vx.test(n)&&Vx.test(e)),Hx[n]||(Hx[n]={action:i,actionInfo:t}),Zx[e]=n}function Wa(t,e){So.register(t,e)}function Fa(t,e){Za(Yx,t,e,1e3,"layout")}function Ha(t,e){Za(Yx,t,e,3e3,"visual")}function Za(t,e,i,n,o){(Ox(e)||Nx(e))&&(i=e,e=n);var a=sa.wrapStageHandler(i,o);return a.__prio=e,a.__raw=i,t.push(a),a}function Ua(t,e){$x[t]=e}function ja(t){return by.extend(t)}function Xa(t){return lx.extend(t)}function Ya(t){return sx.extend(t)}function qa(t){return Jo.extend(t)}function $a(t){return i_[t]}function Ka(t){return t}function Ja(t,e,i,n,o){this._old=t,this._new=e,this._oldKeyGetter=i||Ka,this._newKeyGetter=n||Ka,this.context=o}function Qa(t,e,i,n,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[n](t[a],a),s=e[r];null==s?(i.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}function tr(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function er(t){var e=typeof s_.Uint32Array===r_?Array:s_.Uint32Array,i=typeof s_.Uint16Array===r_?Array:s_.Uint16Array;return 65535<t._rawCount?e:i}function ir(e,i){L(h_.concat(i.__wrappedMethods||[]),function(t){i.hasOwnProperty(t)&&(e[t]=i[t])}),e.__wrappedMethods=i.__wrappedMethods}function nr(t){return t}function or(t){return t<this._count&&0<=t?this._indices[t]:-1}function ar(t,e){var i=t._idList[e];return null==i&&(i=t._getIdFromStore(e)),null==i&&(i="e\0\0"+e),i}function rr(t){return O(t)||(t=[t]),t}function sr(t,e){var i=t.dimensions,n=new u_(k(i,t.getDimensionInfo,t),t.hostModel);ir(n,t);for(var o=n._storage={},a=t._storage,r=0;r<i.length;r++){var s=i[r];a[s]&&(o[s]=0<=y(e,s)?lr(a[s]):a[s])}return n}function lr(t){for(var e=new Array(t.length),i=0;i<t.length;i++)e[i]=(n=t[i],o=void 0,(o=n.constructor)===Array?n.slice():new o(n));var n,o;return e}function hr(t,e,i){function l(t,e,i){null!=o_.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,a.set(e,!0))}po.isInstance(e)||(e=po.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),h=C(i.encodeDef),o=C(),a=C(),u=[],r=function(t,e,i,n){return null==n&&(n=Math.max(t.dimensionsDetectCount||1,e.length,i.length),L(e,function(t){var e=t.dimsDef;e&&(n=Math.max(n,e.length))})),n}(e,t,n,i.dimCount),s=0;s<r;s++){var c=n[s]=P({},R(n[s])?n[s]:{name:n[s]}),d=c.name,f=u[s]={otherDims:{}};null!=d&&null==o.get(d)&&(f.name=f.displayName=d,o.set(d,s)),null!=c.type&&(f.type=c.type),null!=c.displayName&&(f.displayName=c.displayName)}h.each(function(t,i){t=Qe(t).slice();var n=h.set(i,[]);L(t,function(t,e){w(t)&&(t=o.get(t)),null!=t&&t<r&&(n[e]=t,l(u[t],i,e))})});var p,g,m=0;L(t,function(n,t){var o,a,r;if(w(n))o=n,n={};else{o=n.name;var e=n.ordinalMeta;n.ordinalMeta=null,(n=D(n)).ordinalMeta=e,a=n.dimsDef,r=n.otherDims,n.name=n.coordDim=n.coordDimIndex=n.dimsDef=n.otherDims=null}var i=Qe(h.get(o));if(!i.length)for(var s=0;s<(a&&a.length||1);s++){for(;m<u.length&&null!=u[m].coordDim;)m++;m<u.length&&i.push(m++)}L(i,function(t,e){var i=u[t];l(E(i,n),o,e),null==i.name&&a&&(i.name=i.displayName=a[e]),i.isSysCoord=!0,r&&E(i.otherDims,r)})});for(var v=i.extraPrefix||"value",y=0;y<r;y++)null==(f=u[y]=u[y]||{}).coordDim&&(f.coordDim=ur(v,a,i.extraFromZero),f.coordDimIndex=0,f.isExtraCoord=!0),null==f.name&&(f.name=ur(f.coordDim,o)),null==f.type&&(p=e,g=y,f.name,yo(p.data,p.sourceFormat,p.seriesLayoutBy,p.dimensionsDefine,p.startIndex,g))&&(f.type="ordinal");return u}function ur(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}function cr(t,e){po.isInstance(t)||(t=po.seriesDataToSource(t));var i,n=e.get("coordinateSystem"),o=So.get(n),a=co(e);a&&(i=k(a.coordSysDims,function(t){var e,i={name:t},n=a.axisMap.get(t);if(n){var o=n.get("type");i.type=tr(o),i.stackable="category"!==(e=o)&&"time"!==e}return i})),i||(i=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]);var r,s,l=f_(t,{coordDimensions:i});a&&L(l,function(t,e){var i=t.coordDim,n=a.categoryAxisMap.get(i);n&&(null==r&&(r=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(s=!0)}),s||null==r||(l[r].otherDims.itemName=0);var h=new u_(l,e),u=null!=r&&function(t){if(t.sourceFormat===Dy){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!O(ei(e))}}(t)?function(t,e,i,n){return n===r?i:this.defaultDimValueGetter(t,e,i,n)}:null;return h.hasItemOption=!1,h.initData(t,null,u),h}function dr(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function fr(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function pr(t){return t._map||(t._map=C(t.categories))}function gr(t){return R(t)&&null!=t.value?t.value:t+""}function mr(t){return Gn(t)+2}function vr(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function yr(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),vr(t,0,e),vr(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function xr(t){return t.get("stack")||__+t.seriesIndex}function _r(t){return t.dim+t.index}function wr(t,e){return br(k(t,function(t){var e=t.getData(),i=t.coordinateSystem.getBaseAxis(),n=i.getExtent(),o="category"===i.type?i.getBandWidth():Math.abs(n[1]-n[0])/e.count();return{bandWidth:o,barWidth:zn(t.get("barWidth"),o),barMaxWidth:zn(t.get("barMaxWidth"),o),barGap:t.get("barGap"),barCategoryGap:t.get("barCategoryGap"),axisKey:_r(i),stackId:xr(t)}}),e)}function br(t,e){var c={};L(t,function(t,e){var i=t.axisKey,n=t.bandWidth,o=c[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;c[i]=o;var r=t.stackId;a[r]||o.autoWidthCount++,a[r]=a[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[r].width&&(a[r].width=s,s=Math.min(o.remainedWidth,s),o.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[r].maxWidth=l);var h=t.barGap;null!=h&&(o.gap=h);var u=t.barCategoryGap;null!=u&&(o.categoryGap=u)});var d={};return L(c,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,o=zn(t.categoryGap,n),a=zn(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),L(e,function(t,e){var i=t.maxWidth;i&&i<l&&(i=Math.min(i,r),t.width&&(i=Math.min(i,t.width)),r-=i,t.width=i,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var h,u=0;L(e,function(t,e){t.width||(t.width=l),u+=(h=t).width*(1+a)}),h&&(u-=h.width*a);var c=-u/2;L(e,function(t,e){d[i][e]=d[i][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}function Sr(t,e,i){var a=wr(I(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),y={},x={};e.eachSeriesByType(t,function(t){if("cartesian2d"===t.coordinateSystem.type){var u=t.getData(),i=t.coordinateSystem,e=i.getBaseAxis(),c=xr(t),n=a[_r(e)][c],d=n.offset,f=n.width,p=i.getOtherAxis(e),g=t.get("barMinHeight")||0,m=e.onZero?p.toGlobalCoord(p.dataToCoord(0)):p.getGlobalExtent()[0],o=[u.mapDimension("x"),u.mapDimension("y")],v=u.mapArray(o,function(t,e){return i.dataToPoint([t,e])},!0);y[c]=y[c]||[],x[c]=x[c]||[],u.setLayout({offset:d,size:f}),u.each(u.mapDimension(p.dim),function(t,e){if(!isNaN(t)){y[c][e]||(y[c][e]={p:m,n:m},x[c][e]={p:m,n:m});var i,n,o,a,r=0<=t?"p":"n",s=v[e],l=y[c][e][r],h=x[c][e][r];p.isHorizontal()?(i=l,n=s[1]+d,o=s[0]-h,a=f,x[c][e][r]+=o,Math.abs(o)<g&&(o=(o<0?-1:1)*g),y[c][e][r]+=o):(i=s[0]+d,n=l,o=f,a=s[1]-h,x[c][e][r]+=a,Math.abs(a)<g&&(a=(a<=0?-1:1)*g),y[c][e][r]+=a),u.setItemLayout(e,{x:i,y:n,width:o,height:a})}},!0)}},this)}function Mr(t,e){return C_(t,D_(e))}function Ir(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,h=null!=s,u=t.getExtent();"ordinal"===a?i=e.getCategories().length:(O(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=zn(n[0],1),n[1]=zn(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(x(r)||x(s)),e.getNeedCrossZero()&&(0<r&&0<s&&!l&&(r=0),r<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c){var d=0<I(c.getSeriesByType("bar"),function(t){return t.getBaseAxis()===e.axis}).length;if(("time"===a||"interval"===a)&&d){var f=function(t,e,i){var n=i.ecModel,o=i.axis.getExtent(),a=o[1]-o[0],r=wr(I(n.getSeriesByType("bar"),function(t){return!n.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}))[i.axis.dim+i.axis.index];if(void 0===r)return{min:t,max:e};var s=1/0;L(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;L(r,function(t){l=Math.max(t.offset+t.width,l)});var h=Math.abs(s)+l,u=e-t,c=u/(1-(s+l)/a)-u;return{min:t-=c*(s/h),max:e+=c*(l/h)}}(r,s,e);r=f.min,s=f.max}}return[r,s]}function Tr(t,e){var i=Ir(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 Ar(t,e){if(e=e||t.get("type"))switch(e){case"category":return new m_(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new x_;default:return(dr.getClass(e)||x_).create(t)}}function Dr(t,e,i,n,o){var a,r=0,s=0,l=(n-o)/180*Math.PI,h=1;40<e.length&&(h=Math.floor(e.length/40));for(var u=0;u<t.length;u+=h){var c=t[u],d=le(e[u],i,"center","top");d.x+=c*Math.cos(l),d.y+=c*Math.sin(l),d.width*=1.3,d.height*=1.3,a?a.intersect(d)?(s++,r=Math.max(r,s)):(a.union(d),s=0):a=d.clone()}return 0===r&&1<h?h:(r+1)*h-1}function Cr(i,n){var e,t=i.scale,o=t.getTicksLabels(),a=t.getTicks();return"string"==typeof n?(e=n,k(o,n=function(t){return e.replace("{value}",null!=t?t:"")})):"function"==typeof n?k(a,function(t,e){return n(Lr(i,t),e)},this):o}function Lr(t,e){return"category"===t.type?t.scale.getLabel(e):e}function kr(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 Pr(t,e,i,n,o,a,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?qi(t.slice(8),new Xt(e,i,n,o),r?"center":"cover"):0===t.indexOf("path://")?Yi(t.slice(7),{},new Xt(e,i,n,o),r?"center":"cover"):new F_({shape:{symbolType:t,x:e,y:i,width:n,height:o}})).__isEmptyBrush=l,s.setColor=kr,s.setColor(a),s}function Or(t,e){return Math.abs(t-e)<Z_}function Nr(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];n+=Ei(o[0],o[1],r[0],r[1],e,i),o=r}var s=t[0];return Or(o[0],s[0])&&Or(o[1],s[1])||(n+=Ei(o[0],o[1],s[0],s[1],e,i)),0!==n}function Er(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function zr(t,e,i){for(var n=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=t.charCodeAt(r)-64,l=t.charCodeAt(r+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function Rr(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function Br(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Wo(t,e,i[0]);if(n){for(var o=[],a=0;a<i.length;a++){var r=Wo(t,e,i[a]);o.push(r)}return o.join(" ")}}function Vr(t){return[t[0]/2,t[1]/2]}function Gr(t,e,i){_g.call(this),this.updateData(t,e,i)}function Wr(t,e){this.parent.drift(t,e)}function Fr(t){this.group=new _g,this._symbolCtor=t||Gr}function Hr(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n&&n(i))&&"none"!==t.getItemVisual(i,"symbol")}function Zr(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Ur(t){return 0<=t?1:-1}function jr(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&&Ur(h.get(s,i))===Ur(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 Xr(t){return isNaN(t[0])||isNaN(t[1])}function Yr(t,e,i,n,o,a,r,s,l,h,u){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(o<=d||d<0)break;if(Xr(p)){if(u){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]),rw(lw,p);else if(0<l){var g=d+a,m=e[g];if(u)for(;m&&Xr(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||Xr(m))rw(hw,p);else{var x,_;if(Xr(m)&&!u&&(m=p),U(sw,m,y),"x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=Np(p,y),_=Np(p,m);aw(hw,p,sw,-l*(1-(v=_/(_+x))))}nw(lw,lw,s),ow(lw,lw,r),nw(hw,hw,s),ow(hw,hw,r),t.bezierCurveTo(lw[0],lw[1],hw[0],hw[1],p[0],p[1]),aw(lw,p,sw,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function qr(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>n[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function $r(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],o=e[i];if(n[0]!==o[0]||n[1]!==o[1])return}return!0}}function Kr(t){return"number"==typeof t?t:t?.3:0}function Jr(t){var e=t.getGlobalExtent();if(t.onBand){var i=t.getBandWidth()/2-1,n=e[1]>e[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Qr(t){return 0<=t?1:-1}function ts(t,e,i){return"polar"===t.type?(o=e,a=i,r=(n=t).getAngleAxis(),s=n.getRadiusAxis().getExtent(),l=r.getExtent(),h=Math.PI/180,u=new Lv({shape:{cx:n.cx,cy:n.cy,r0:s[0],r:s[1],startAngle:-l[0]*h,endAngle:-l[1]*h,clockwise:r.inverse}}),o&&(u.shape.endAngle=-l[0]*h,Mn(u,{shape:{endAngle:-l[1]*h}},a)),u):function(t,e,i){var n=Jr(t.getAxis("x")),o=Jr(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.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 Nv({shape:{x:r,y:s,width:l,height:h}});return e&&(d.shape[a?"width":"height"]=0,Mn(d,{shape:{width:l,height:h}},i)),d}(t,e,i);var n,o,a,r,s,l,h,u}function es(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];a.push(l);var h=[];switch(i){case"end":h[o]=s[o],h[1-o]=l[1-o],a.push(h);break;case"middle":var u=(l[o]+s[o])/2,c=[];h[o]=c[o]=u,h[1-o]=l[1-o],c[1-o]=s[1-o],a.push(h),a.push(c);break;default:h[o]=l[o],h[1-o]=s[1-o],a.push(h)}}return t[r]&&a.push(t[r]),a}function is(t){return this._axes[t]}function ns(t){mw.call(this,t)}function os(t,e){return e.type||(e.data?"category":"value")}function as(t,e,i){return t.getCoordSysModel()===e}function rs(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function ss(t,e,i){var n=t[e];if(i.onZero){var o=i.onZeroAxisIndex;if(null==o){for(var a in n)if(n.hasOwnProperty(a)){var r=n[a];if(r&&!ls(r)){o=+a;break}}null==o&&(i.onZero=!1),i.onZeroAxisIndex=o}else(r=n[o])&&ls(r)&&(i.onZero=!1)}}function ls(t){return"category"===t.type||"time"===t.type||!Iw(t)}function hs(e,t){return k(Dw,function(t){return e.getReferringComponents(t)[0]})}function us(t){return"cartesian2d"===t.get("coordinateSystem")}function cs(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function ds(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function fs(t){t&&(t.ignore=!0)}function ps(t,e,i){var n=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(n&&o){var a=st([]);return ct(a,a,-t.rotation),n.applyTransform(ht([],a,t.getLocalTransform())),o.applyTransform(ht([],a,e.getLocalTransform())),n.intersect(o)}}function gs(t){return"middle"===t||"center"===t}function ms(t,e){var p,g,i,a,m,v,y,n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return p=n,i=e,a=(g=t).getComponent("tooltip"),m=g.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[],Ew(i.getCoordinateSystems(),function(c){function t(t,e,i){var n=i.model.getModel("axisPointer",m),o=n.get("show");if(o&&("auto"!==o||t||xs(n))){null==e&&(e=n.get("triggerTooltip"));var a=(n=t?function(t,e,i,n,o,a){var r=e.getModel("axisPointer"),s={};Ew(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=D(r.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o&&(l.show=!0,!a)){var h=s.lineStyle=r.get("crossStyle");h&&E(l,h.textStyle)}return t.model.getModel("axisPointer",new kn(s,i,n))}(i,f,m,g,t,e):n).get("snap"),r=_s(i.model),s=e||a||"category"===i.type,l=p.axesInfo[r]={key:r,axis:i,coordSys:c,axisPointerModel:n,triggerTooltip:e,involveSeries:s,snap:a,useHandle:xs(n),seriesModels:[]};d[r]=l,p.seriesInvolved|=s;var h=function(t,e){for(var i=e.model,n=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(vs(a[n+"AxisId"],i.id)||vs(a[n+"AxisIndex"],i.componentIndex)||vs(a[n+"AxisName"],i.name))return o}}(v,i);if(null!=h){var u=y[h]||(y[h]={axesInfo:{}});u.axesInfo[r]=l,u.mapper=v[h].mapper,l.linkGroup=u}}}if(c.axisPointerEnabled){var e=_s(c.model),d=p.coordSysAxesInfo[e]={},f=(p.coordSysMap[e]=c).model.getModel("tooltip",a);if(Ew(c.getAxes(),zw(t,!1,null)),c.getTooltipAxes&&a&&f.get("show")){var i="axis"===f.get("trigger"),n="cross"===f.get("axisPointer.type"),o=c.getTooltipAxes(f.get("axisPointer.axis"));(i||n)&&Ew(o.baseAxes,zw(t,!n||"cross",i)),n&&Ew(o.otherAxes,zw(t,"cross",!1))}}}),n.seriesInvolved&&function(o,t){t.eachSeries(function(i){var n=i.coordinateSystem,t=i.get("tooltip.trigger",!0),e=i.get("tooltip.show",!0);n&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==i.get("axisPointer.show",!0)&&Ew(o.coordSysAxesInfo[_s(n.model)],function(t){var e=t.axis;n.getAxis(e.dim)===e&&(t.seriesModels.push(i),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=i.getData().count())})},this)}(n,t),n}function vs(t,e){return"all"===t||O(t)&&0<=y(t,e)||t===e}function ys(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[_s(t)]}function xs(t){return!!t.get("handle.show")}function _s(t){return t.type+"||"+t.id}function ws(t,e,i,n,o,a){var r,s=Rw.getAxisPointerClass(t.axisPointerClass);if(s){var l=(r=ys(e))&&r.axisPointerModel;l?(t._axisPointer||(t._axisPointer=new s)).render(e,l,n,a):bs(t,n)}}function bs(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function Ss(t,e,i){i=i||{};var n=t.coordinateSystem,o=e.axis,a={},r=o.position,s=o.onZero?"onZero":r,l=o.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===l?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(o.onZero){var p=n.getAxis("x"===l?"y":"x",o.onZeroAxisIndex),g=p.toGlobalCoord(p.dataToCoord(0));f[c.onZero]=Math.max(Math.min(g,f[1]),f[0])}a.position=["y"===l?f[c[s]]:u[0],"x"===l?f[c[s]]:u[3]],a.rotation=Math.PI/2*("x"===l?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[r],a.labelOffset=o.onZero?f[c[r]]-f[c.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),B(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===s?-m:m,a.labelInterval=o.getLabelInterval(),a.z2=1,a}function Ms(t,e,i,n,o,a,r){gn(t,e,i.getModel("label"),i.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:Br(o.getData(),a),isRectText:!0,autoColor:n}),Is(t),Is(e)}function Is(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function Ts(t,e,i){i.style.text=null,Sn(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function As(t,e,i){i.style.text=null,Sn(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Ds(t,e,i,n,o,a,r,s){var l=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),u=n.getModel("itemStyle"),c=n.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",u.get("barBorderRadius")||0),t.useStyle(E({fill:l,opacity:h},u.getBarItemStyle()));var d=n.getShallow("cursor");d&&t.attr("cursor",d);r?o.height:o.width;s||Ms(t.style,c,n,l,a,i),pn(t,c)}function Cs(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){Ls(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Ls(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=i?n:0,s=[Math.cos(a)*r,Math.sin(a)*r];o?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function ks(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}_g.call(this);var o=new Lv({z2:2}),a=new Ov,r=new Tv;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 Ps(a,t,e,i,n,o,r){function s(t,e){for(var i=t;0<=i&&(a[i].y-=e,!(0<i&&a[i].y>a[i-1].y+a[i-1].height));i--);}function l(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=h<o+u?Math.sqrt((o+u+c)*(o+u+c)-h*h):Math.abs(t[s].x-i);e&&r<=d&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}a.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=a.length,d=[],f=[],p=0;p<c;p++)(h=a[p].y-u)<0&&function(t,e,i,n){for(var o=t;o<e;o++)if(a[o].y+=i,t<o&&o+1<e&&a[o+1].y>a[o].y+a[o].height)return s(o,i/2);s(e-1,i/2)}(p,c,-h),u=a[p].y+a[p].height;for(r-u<0&&s(c-1,u-r),p=0;p<c;p++)a[p].y>=e?f.push(a[p]):d.push(a[p]);l(d,!1,t,e,i,n),l(f,!0,t,e,i,n)}function Os(){this.group=new _g}function Ns(t,e,i){Y_.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function Es(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=k(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new Ns(i,new x_);return n.name=t.get("name"),(n.model=t).axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.startAngle}function zs(t,e){return E({show:e},t)}function Rs(t,e){return!!Bs(t)[e]}function Bs(t){return t[cb]||(t[cb]={})}function Vs(i){this.pointerChecker,this._zr=i,this._opt={};var t=_,n=t(Gs,this),o=t(Ws,this),a=t(Fs,this),r=t(Hs,this),s=t(Zs,this);Bp.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=E(D(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,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 Gs(t){if(!(Ze(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 Ws(t){if(!Ze(t)&&js(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!Rs(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&&$g(t.event),this.trigger("pan",a,r,n,o,e,i)}}function Fs(t){Ze(t)||(this._dragging=!1)}function Hs(t){if(js(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=0<t.wheelDelta?1.1:1/1.1;Us.call(this,t,e,t.offsetX,t.offsetY)}}function Zs(t){if(!Rs(this._zr,"globalPan")){var e=1<t.pinchScale?1.1:1/1.1;Us.call(this,t,e,t.pinchX,t.pinchY)}}function Us(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&($g(t.event),this.trigger("zoom",e,i,n))}function js(t,e,i){var n=t._opt[e];return n&&(!w(n)||i.event[n+"Key"])}function Xs(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function Ys(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 qs(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!db[n.mainType]&&o&&o.model!==i}function $s(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function Ks(i,t){t.eachChild(function(e){L(e.__regions,function(t){e.trigger(i.isSelected(t.name)?"emphasis":"normal")})})}function Js(t,e){var i=new _g;this._controller=new Vs(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag}function Qs(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)),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 tl(){Up.call(this)}function el(t){this.name=t,this.zoomLimit,Up.call(this),this._roamTransformable=new tl,this._rawTransformable=new tl,this._center,this._zoom}function il(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function nl(t,e,i,n,o){el.call(this,t),this.map=e,this._nameCoordMap=C(),this.loadGeoJson(i,n,o)}function ol(t,e,i,n){var o=i.geoModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function al(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(o[0])||isNaN(o[1])||this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}var a,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),h=e.getWidth(),u=e.getHeight(),c=t.get("aspectScale")||.75,d=r.width/r.height*c,f=!1;if(s&&l&&(s=[zn(s[0],h),zn(s[1],u)],l=zn(l,Math.min(h,u)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(f=!0)),f){var p={};1<d?(p.width=l,p.height=l/d):(p.height=l,p.width=l*d),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else(a=t.getBoxLayoutParams()).aspect=d,p=ro(a,{width:h,height:u});this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function rl(i,t){L(t.get("geoCoord"),function(t,e){i.addGeoCoord(e,t)})}function sl(i){var n=i.mainData,t=i.datas;t||(t={main:n},i.datasAttr={main:"data"}),i.datas=i.mainData=null,dl(n,t,i),Sb(t,function(e){Sb(n.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,z(ll,i))})}),n.wrapMethod("cloneShallow",z(ul,i)),Sb(n.CHANGABLE_METHODS,function(t){n.wrapMethod(t,z(hl,i))}),c(t[n.dataType]===n)}function ll(t,e){if((n=this)[Ib]===n){var i=P({},this[Mb]);dl(i[this.dataType]=e,i,t)}else fl(e,this.dataType,this[Ib],t);var n;return e}function hl(t,e){return t.struct&&t.struct.update(this),e}function ul(i,n){return Sb(n[Mb],function(t,e){t!==n&&fl(t.cloneShallow(),e,n,i)}),n}function cl(t){var e=this[Ib];return null==t||null==e?e:e[Mb][t]}function dl(i,t,n){i[Mb]={},Sb(t,function(t,e){fl(t,e,i,n)})}function fl(t,e,i,n){(i[Mb][e]=t)[Ib]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=cl}function pl(e,t,i){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=k(t||[],function(t){return new kn(t,e,e.ecModel)}),this.leavesModel=new kn(i||{},e,e.ecModel)}function gl(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){!function(t){for(var e=t.children,i=e.length,n=0,o=0;0<=--i;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}(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=function(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=xl(s),a=_l(a),s&&a;){o=xl(o),r=_l(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-h+n(s,a);0<d&&(y=t,x=i,f=(v=s).hierNode.ancestor.parentNode===y.parentNode?v.hierNode.ancestor:x,void 0,m=(g=d)/((p=t).hierNode.i-f.hierNode.i),p.hierNode.change-=m,p.hierNode.shift+=g,p.hierNode.modifier+=g,p.hierNode.prelim+=g,f.hierNode.change+=m,h+=d,l+=d),c+=s.hierNode.modifier,h+=a.hierNode.modifier,l+=o.hierNode.modifier,u+=r.hierNode.modifier}s&&!xl(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!_l(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=h-u,i=t)}var f,p,g,m;var v,y,x;return i}(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function ml(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function vl(t){return arguments.length?t:wl}function yl(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function xl(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function _l(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function wl(t,e){return t.parentNode===e.parentNode?1:2}function bl(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function Sl(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function Ml(t,e,i,n,o,a){var r=!i,s=t.tree.getNodeByDataIndex(e),l=(a=Sl(s,s.getModel(),a),t.tree.root),h=s.parentNode===l?s:s.parentNode||s,u=t.getItemGraphicEl(h.dataIndex),c=h.getLayout(),d=u?{x:u.position[0],y:u.position[1],rawX:u.__radialOldRawX,rawY:u.__radialOldRawY}:c,f=s.getLayout();r?(i=new Gr(t,e,a)).attr("position",[d.x,d.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=f.rawX,i.__radialRawY=f.rawY,n.add(i),t.setItemGraphicEl(e,i),Sn(i,{position:[f.x,f.y]},o);var p=i.getSymbolPath();if("radial"===a.layout){var g,m,v=l.children[0],y=v.getLayout(),x=v.children.length;if(f.x===y.x&&!0===s.isExpand){var _={};_.x=(v.children[0].getLayout().x+v.children[x-1].getLayout().x)/2,_.y=(v.children[0].getLayout().y+v.children[x-1].getLayout().y)/2,(g=Math.atan2(_.y-y.y,_.x-y.x))<0&&(g=2*Math.PI+g),(m=_.x<y.x)&&(g-=Math.PI)}else(g=Math.atan2(f.y-y.y,f.x-y.x))<0&&(g=2*Math.PI+g),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(m=f.x<y.x)&&(g-=Math.PI):(m=f.x>y.x)||(g-=Math.PI);var w=m?"left":"right";p.setStyle({textPosition:w,textRotation:-g,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==l){var b=i.__edge;b||(b=i.__edge=new Rv({shape:Tl(a,d,d),style:E({opacity:0},a.lineStyle)})),Sn(b,{shape:Tl(a,c,f),style:{opacity:1}},o),n.add(b)}}function Il(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,h=(a=Sl(s,s.getModel(),a),s.parentNode===l?s:s.parentNode||s);null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;Sn(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&&Sn(u,{shape:Tl(a,r,r),style:{opacity:0}},o,function(){n.remove(u)})}function Tl(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=yl(l,h),f=yl(l,h+(c-h)*t.curvature),p=yl(u,c+(h-c)*t.curvature),g=yl(u,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}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 Al(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var a=o.length-1;0<=a;a--)n.push(o[a])}}function Dl(t,e,i){if(t&&0<=y(e,t.type)){var n=i.getData().tree.root,o=t.targetNode;if(o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function Cl(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Ll(t,e){return 0<=y(Cl(t),e)}function kl(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 Pl(t){this.group=new _g,t.add(this.group)}function Ol(d,c,f,p,g,i,m,t,e,n){function s(t,e){x?!t.invisible&&i.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function l(t,e,i,n,o,a){var r=m.getModel(),s=B(d.getFormattedLabel(m.dataIndex,"normal",null,null,a?"upperLabel":"label"),r.get("name"));if(!a&&v.isLeafRoot){var l=d.get("drillDownIcon",!0);s=l?l+" "+s:s}var h=r.getModel(a?Eb:Ob),u=r.getModel(a?zb:Nb),c=h.getShallow("show");gn(t,e,h,u,{defaultText:c?s:null,autoColor:i,isRectText:!0}),a&&(t.textRect=D(a)),t.truncate=c&&h.get("ellipsis")?{outerWidth:n,outerHeight:o,minChar:2}:null}function o(t,e,i,n){var o,a,r,s,l,h=null!=w&&f[t][w],u=g[t];return h?(f[t][w]=null,s=h,l=t,(u[_]={}).old="nodeGroup"===l?s.position.slice():P({},s.shape)):x||((h=new e({z:(o=i,a=n,r=o*Rb+a,(r-1)/r)})).__tmDepth=i,function(t,e,i){var n=t[_]={},o=m.parentNode;if(o&&(!p||"drillDown"===p.direction)){var a=0,r=0,s=g.background[o.getRawIndex()];!p&&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}(u,0,h.__tmStorageName=t)),c[t][_]=h}if(m){var v=m.getLayout();if(v&&v.isInView){var h=v.width,u=v.height,y=v.borderWidth,x=v.invisible,_=m.getRawIndex(),w=t&&t.getRawIndex(),a=m.viewChildren,b=v.upperHeight,r=a&&a.length,S=m.getModel("itemStyle"),M=m.getModel("emphasis.itemStyle"),I=o("nodeGroup",Lb);if(I){if(e.add(I),I.attr("position",[v.x||0,v.y||0]),I.__tmNodeWidth=h,I.__tmNodeHeight=u,v.isAboveViewRoot)return I;var T=o("background",kb,n,1);if(T&&function(t,n,o){n.dataIndex=m.dataIndex,n.seriesIndex=d.seriesIndex,n.setShape({x:0,y:0,width:h,height:u});var a=m.getVisual("borderColor",!0),r=M.get("borderColor");s(n,function(){var t=Vb(S);t.fill=a;var e=Bb(M);if(e.fill=r,o){var i=h-2*y;l(t,e,a,i,b,{x:y,y:0,width:i,height:b})}else t.text=e.text=null;n.setStyle(t),pn(n,e)}),t.add(n)}(I,T,r&&v.upperHeight),!r){var A=o("content",kb,n,2);A&&function(t,i){i.dataIndex=m.dataIndex,i.seriesIndex=d.seriesIndex;var n=Math.max(h-2*y,0),o=Math.max(u-2*y,0);i.culling=!0,i.setShape({x:y,y:y,width:n,height:o});var a=m.getVisual("color",!0);s(i,function(){var t=Vb(S);t.fill=a;var e=Bb(M);l(t,e,a,n,o),i.setStyle(t),pn(i,e)}),t.add(i)}(I,A)}return I}}}}function Nl(t,e){var i=t.visual,n=[];R(i)?Fb(i,function(t){n.push(t)}):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),Fl(t,n)}function El(n){return{applyVisual:function(t,e,i){t=this.mapValueToVisual(t),i("color",n(e("color"),t))},_doMap:Gl([0,1])}}function zl(t){var e=this.option.visual;return e[Math.round(En(t,[0,1],[0,e.length-1],!0))]||{}}function Rl(n){return function(t,e,i){i(n,this.mapValueToVisual(t))}}function Bl(t){var e=this.option.visual;return e[this.option.loop&&t!==Zb?t%e.length:t]}function Vl(){return this.option.visual[0]}function Gl(n){return{linear:function(t){return En(t,n,this.option.visual,!0)},category:Bl,piecewise:function(t,e){var i=Wl.call(this,e);return null==i&&(i=En(t,n,this.option.visual,!0)),i},fixed:Vl}}function Wl(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[Ub.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function Fl(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=k(e,function(t){return Tt(t)})),e}function Hl(t,e,i){return t?e<=i:e<i}function Zl(t,e,i,n,o,a){var r,s,l,h,u,c,d,f=t.getModel(),p=t.getLayout();if(p&&!p.invisible&&p.isInView){var g,m=t.getModel(qb),v=(l=m,h=e,u=i[t.depth],c=n,d=P({},h),L(["color","colorAlpha","colorSaturation"],function(t){var e=l.get(t,!0);null==e&&u&&(e=u[t]),null==e&&(e=h[t]),null==e&&(e=c.get(t)),null!=e&&(d[t]=e)}),d),y=m.get("borderColor"),x=m.get("borderColorSaturation");null!=x&&(r=x,y=null!=(s=g=Ul(v))?Pt(s,null,null,r):null),t.setVisual("borderColor",y);var _=t.viewChildren;if(_&&_.length){var w=function(t,e,i,n,o,a){if(a&&a.length){var r=Xl(e,"color")||null!=o.color&&"none"!==o.color&&(Xl(e,"colorAlpha")||Xl(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),h=i.dataExtent.slice();null!=s&&s<h[0]&&(h[0]=s),null!=l&&l>h[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 Ub(c);return d.__drColorMappingBy=u,d}}}(0,f,p,0,v,_);L(_,function(t,e){(t.depth>=o.length||t===o[t.depth])&&Zl(t,function(t,e,i,n,o,a){var r=P({},e);if(o){var s=o.type,l="color"===s&&o.__drColorMappingBy,h="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=o.mapValueToVisual(h)}return r}(f,v,t,e,w,a),i,n,o,a)})}else g=Ul(v),t.setVisual("color",g)}}function Ul(t){var e=jl(t,"color");if(e){var i=jl(t,"colorAlpha"),n=jl(t,"colorSaturation");return n&&(e=Pt(e,null,null,n)),i&&(e=Ot(e,i)),e}}function jl(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function Xl(t,e){var i=t.get(e);return Yb(i)&&i.length?{name:e,range:i}:null}function Yl(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(eS),l=f.get(iS)/2,h=Kl(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 p=(o=Kb(o-2*c,0))*(a=Kb(a-c-d,0)),g=function(t,e,i,n,o,a){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=a;if(o&&!l)return t.viewChildren=[];h=r=I(r,function(t){return!t.isRemoved()}),u=s,u&&h.sort(function(t,e){var i="asc"===u?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0===i?"asc"===u?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:i});var h,u;var c=function(t,e,i){for(var n=0,o=0,a=e.length;o<a;o++)n+=e[o].getValue();var r=t.get("visualDimension");if(e&&e.length)if("value"===r&&i)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];tS(e,function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===c.sum)return t.viewChildren=[];if(c.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 h=o["asc"===n?r-l-1:l].getValue();h/i*e<a&&(s=l,i-=h)}return"asc"===n?o.splice(0,r-s):o.splice(s,r-s),i}(e,i,c.sum,s,r),0===c.sum)return t.viewChildren=[];for(var d=0,f=r.length;d<f;d++){var p=r[d].getValue()/c.sum*i;r[d].setLayout({area:p})}return l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:c.dataExtent},!0),r}(t,f,p,e,i,n);if(g.length){for(var m={x:c,y:d,width:o,height:a},v=Jb(o,a),y=1/0,x=[],_=x.area=0,w=g.length;_<w;){var b=g[_];x.push(b),x.area+=b.getLayout().area;var S=ql(x,v,e.squareRatio);y=S<=y?(_++,S):(x.area-=x.pop().getLayout().area,$l(x,v,m,l,!1),v=Jb(m.width,m.height),x.length=x.area=0,1/0)}if(x.length&&$l(x,v,m,l,!0),!i){var M=f.get("childrenVisibleMin");null!=M&&p<M&&(i=!0)}for(_=0,w=g.length;_<w;_++)Yl(g[_],e,i,n+1)}}}function ql(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;r<s;r++)(n=t[r].getLayout().area)&&(n<a&&(a=n),o<n&&(o=n));var l=t.area*t.area,h=e*e*i;return l?Kb(h*o/l,l/(h*a)):1/0}function $l(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;c<d;c++){var f=t[c],p={},g=u?f.getLayout().area/u:0,m=p[l[r]]=Kb(u-2*n,0),v=i[s[a]]+i[l[a]]-h,y=c===d-1||v<g?v:g,x=p[l[a]]=Kb(y-2*n,0);p[s[r]]=i[s[r]]+Jb(n,m/2),p[s[a]]=h+Jb(n,x/2),h+=y,f.setLayout(p,!0)}i[s[r]]+=u,i[l[r]]-=u}function Kl(t){return t.get(nS)?t.get(oS):0}function Jl(t){return"_EC_"+t}function Ql(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function th(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}function eh(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function ih(t){return"_"+t+"Type"}function nh(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){O(a)||(a=[a,a]);var r=Pr(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function oh(t,e){var i=e[0],n=e[1],o=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,t.cpy1=o?(t.cpx1=o[0],o[1]):t.cpx1=NaN}function ah(t,e,i){_g.call(this),this._createLine(t,e,i)}function rh(t){this._ctor=t||ah,this.group=new _g}function sh(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function lh(t){return isNaN(t[0])||isNaN(t[1])}function hh(t){return!lh(t[0])&&!lh(t[1])}function uh(t,e,i){for(var n,o=t[0],a=t[1],r=t[2],s=1/0,l=i*i,h=.1,u=.1;u<=.9;u+=.1)vS[0]=_S(o[0],a[0],r[0],u),vS[1]=_S(o[1],a[1],r[1],u),(f=bS(wS(vS,e)-l))<s&&(s=f,n=u);for(var c=0;c<32;c++){var d=n+h;yS[0]=_S(o[0],a[0],r[0],n),yS[1]=_S(o[1],a[1],r[1],n),xS[0]=_S(o[0],a[0],r[0],d),xS[1]=_S(o[1],a[1],r[1],d);var f=wS(yS,e)-l;if(bS(f)<.01)break;var p=wS(xS,e)-l;h/=2,f<0?0<=p?n+=h:n-=h:0<=p?n-=h:n+=h}return n}function ch(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function dh(t,e,i){var n=t.getGraphicEl(),o=ch(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 fh(t,e){var i=ch(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function ph(t){return t instanceof Array||(t=[t,t]),t}function gh(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")])}),mh(i)}}function mh(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=W(t.node1.getLayout()),n=W(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 vh(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.curveness")||0,n=W(t.node1.getLayout()),o=W(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 yh(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function xh(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}_g.call(this);var o=new Pv,a=new Ov,r=new Tv;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 _h(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0<i?-1:i<0?1:e?-1:1}}function wh(t,e){return Math.min(e[1],Math.max(e[0],t))}function bh(t,e,i){this._axesMap=C(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function Sh(t,e){return ES(zS(t,e[0]),e[1])}function Mh(t){Bp.call(this),this._zr=t,this.group=new _g,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+eM++,this._handlers={},HS(iM,function(t,e){this._handlers[e]=_(t,this)},this)}function Ih(t,e){var i,n,o,a=t._zr;t._enableGlobalPan||(i=a,n=KS,o=t._uid,Bs(i)[n]=o),HS(t._handlers,function(t,e){a.on(e,t)}),t._brushType=e.brushType,t._brushOption=g(D(tM),e,!0)}function Th(t){var e,i,n,o,a=t._zr;e=a,i=KS,n=t._uid,(o=Bs(e))[i]===n&&(o[i]=null),HS(t._handlers,function(t,e){a.off(e,t)}),t._brushType=t._brushOption=null}function Ah(t,e){var i=nM[e.brushType].createCover(t,e);return i.__brushOption=e,Lh(i,e),t.group.add(i),i}function Dh(t,e){var i=Ph(e);return i.endCreating&&(i.endCreating(t,e),Lh(e,e.__brushOption)),e}function Ch(t,e){var i=e.__brushOption;Ph(e).updateCoverShape(t,e,i.range,i)}function Lh(t,e){var i=e.z;null==i&&(i=YS),t.traverse(function(t){t.z=i,t.z2=i})}function kh(t,e){Ph(e).updateCommon(t,e),Ch(t,e)}function Ph(t){return nM[t.__brushOption.brushType]}function Oh(t,e,i){var n=t._panels;if(!n)return!0;var o,a=t._transform;return HS(n,function(t){t.isTargetByCursor(e,i,a)&&(o=t)}),o}function Nh(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function Eh(e){var t=e._covers,i=t.length;return HS(t,function(t){e.group.remove(t)},e),t.length=0,!!i}function zh(t,e){var i=ZS(t._covers,function(t){var e=t.__brushOption,i=D(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Rh(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Bh(e,i,t,n){var o=new _g;return o.add(new Nv({name:"main",style:Fh(t),silent:!0,draggable:!0,cursor:"move",drift:FS(e,i,o,"nswe"),ondragend:FS(zh,i,{isEnd:!0})})),HS(n,function(t){o.add(new Nv({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:FS(e,i,o,t),ondragend:FS(zh,i,{isEnd:!0})}))}),o}function Vh(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=jS(o,$S),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,p=u-r,g=c-s,m=p+o,v=g+o;Wh(t,e,"main",r,s,p,g),n.transformable&&(Wh(t,e,"w",l,h,a,v),Wh(t,e,"e",d,h,a,v),Wh(t,e,"n",l,h,m,a),Wh(t,e,"s",l,f,m,a),Wh(t,e,"nw",l,h,a,a),Wh(t,e,"ne",d,h,a,a),Wh(t,e,"sw",l,f,a,a),Wh(t,e,"se",d,f,a,a))}function Gh(n,o){var t=o.__brushOption,a=t.transformable,e=o.childAt(0);e.useStyle(Fh(t)),e.attr({silent:!a,cursor:a?"move":"default"}),HS(["w","e","n","s","se","sw","ne","nw"],function(t){var e=o.childOfName(t),i=function t(e,i){if(1<i.length)return("e"===(o=[t(e,(i=i.split(""))[0]),t(e,i[1])])[0]||"w"===o[0])&&o.reverse(),o.join("");var n={left:"w",right:"e",top:"n",bottom:"s"},o=An({w:"left",e:"right",n:"top",s:"bottom"}[i],(a=e,In(a.group)));var a;return n[o]}(n,t);e&&e.attr({silent:!a,invisible:!a,cursor:a?QS[i]+"-resize":null})})}function Wh(t,e,i,n,o,a,r){var s,l,h,u=e.childOfName(i);u&&u.setShape((s=Xh(t,e,[[n,o],[n+a,o+r]]),l=US(s[0][0],s[1][0]),h=US(s[0][1],s[1][1]),{x:l,y:h,width:jS(s[0][0],s[1][0])-l,height:jS(s[0][1],s[1][1])-h}))}function Fh(t){return E({strokeNoScale:!0},t.brushStyle)}function Hh(t,e,i,n){var o=[US(t,i),US(e,n)],a=[jS(t,i),jS(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function Zh(t,e,i,n,o,a,r,s){var l=n.__brushOption,h=t(l.range),u=jh(i,a,r);HS(o.split(""),function(t){var e=JS[t];h[e[0]][e[1]]+=u[e[0]]}),l.range=e(Hh(h[0][0],h[1][0],h[0][1],h[1][1])),kh(i,n),zh(i,{isEnd:!1})}function Uh(t,e,i,n,o){var a=e.__brushOption.range,r=jh(t,i,n);HS(a,function(t){t[0]+=r[0],t[1]+=r[1]}),kh(t,e),zh(t,{isEnd:!1})}function jh(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 Xh(t,e,i){var n=Nh(t,e);return n&&!0!==n?n.clipPath(i,t._transform):D(i)}function Yh(t){var e=t.event;e.preventDefault&&e.preventDefault()}function qh(t,e,i){return t.childOfName("main").contain(e,i)}function $h(t,e,i,n){var o,a=t._creatingCover,r=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],o=i[0]-n[0],a=i[1]-n[1];return XS(o*o+a*a,.5)>qS}(t)||a){if(r&&!a){"single"===s.brushMode&&Eh(t);var l=D(s);l.brushType=Kh(l.brushType,r),l.panelId=!0===r?null:r.panelId,a=t._creatingCover=Ah(t,l),t._covers.push(a)}if(a){var h=nM[Kh(t._brushType,r)];a.__brushOption.range=h.getCreatingRange(Xh(t,a,t._track)),n&&(Dh(t,a),h.updateCommon(t,a)),Ch(t,a),o={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&Oh(t,e,i)&&Eh(t)&&(o={isEnd:n,removeOnClick:!0});return o}function Kh(t,e){return"auto"===t?e.defaultBrushType:t}function Jh(t){if(this._dragging){Yh(t);var e=$h(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0);this._dragging=!1,this._track=[],this._creatingCover=null,e&&zh(this,e)}}function Qh(l){return{createCover:function(t,e){return Bh(FS(Zh,function(t){var e=[t,[0,100]];return l&&e.reverse(),e},function(t){return t[l]}),t,e,[["w","e"],["n","s"]][l])},getCreatingRange:function(t){var e=Rh(t);return[US(e[0][l],e[1][l]),jS(e[0][l],e[1][l])]},updateCoverShape:function(t,e,i,n){var o,a=Nh(t,e);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(l,t._transform);else{var r=t._zr;o=[0,[r.getWidth(),r.getHeight()][1-l]]}var s=[i,o];l&&s.reverse(),Vh(t,e,s,n)},updateCommon:Gh,contain:qh}}function tu(i){return i=nu(i),function(t,e){return Cn(t,i)}}function eu(o,a){return o=nu(o),function(t){var e=null!=a?a:t,i=e?o.width:o.height,n=e?o.x:o.y;return[n,n+(i||0)]}}function iu(n,o,a){return n=nu(n),function(t,e,i){return n.contain(e[0],e[1])&&!qs(t,o,a)}}function nu(t){return Xt.create(t)}function ou(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}function au(t,e,i,n){for(var o=[],a=0;a<i.length;a++){var r=i[a],s=t.get(t.mapDimension(r),e);l=s,("category"===n.getAxis(r).type?null==l:null==l||isNaN(l))||o.push(n.dataToPoint(s,r))}var l;return o}function ru(){var u=[],e=[];return{key:function(t){return u.push(t),this},sortKeys:function(t){return e[u.length-1]=t,this},entries:function(t){return function i(t,n){if(n>=u.length)return t;var o=[],a=e[n++];return L(t,function(t,e){o.push({key:e,values:i(t,n)})}),a?o.sort(function(t,e){return a(t.key,e.key)}):o}(function i(t,n){if(n>=u.length)return t;for(var e=-1,o=t.length,a=u[n++],r={},s={};++e<o;){var l=a(t[e]),h=s[l];h?h.push(t[e]):s[l]=[t[e]]}return L(s,function(t,e){r[e]=i(t,n)}),r}(t,0),0)}}}function su(t,e,i,n,o,a,r){var s;(function(t,e,i){for(var n=t,o=null,a=0;n.length;){o=[];for(var r=0,s=n.length;r<s;r++){var l=n[r];l.setLayout({x:a},!0),l.setLayout({dx:e},!0);for(var h=0,u=l.outEdges.length;h<u;h++)o.push(l.outEdges[h].node2)}n=o,++a}f=t,p=a,L(f,function(t){t.outEdges.length||t.setLayout({x:p-1},!0)}),c=t,d=(i-e)/(a-1),L(c,function(t){var e=t.getLayout().x*d;t.setLayout({x:e},!0)});var c,d;var f,p})(t,i,o),function(t,e,i,n,o){var a=ru().key(function(t){return t.getLayout().x}).sortKeys(yu).entries(t).map(function(t){return t.values});(function(t,e,i,o,a){var r=[];L(e,function(t){var e=t.length,i=0;L(t,function(t){i+=t.getLayout().value});var n=(o-(e-1)*a)/i;r.push(n)}),r.sort(function(t,e){return t-e});var n=r[0];L(e,function(t){L(t,function(t,e){t.setLayout({y:e},!0);var i=t.getLayout().value*n;t.setLayout({dy:i},!0)})}),L(i,function(t){var e=+t.getValue()*n;t.setLayout({dy:e},!0)})})(0,a,e,i,n),lu(a,n,i);for(var r=1;0<o;o--)hu(a,r*=.99),lu(a,n,i),cu(a,r),lu(a,n,i)}(t,e,a,n,r),L(s=t,function(t){t.outEdges.sort(fu),t.inEdges.sort(pu)}),L(s,function(t){var e=0,i=0;L(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),L(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}function lu(t,s,l){L(t,function(t){var e,i,n,o=0,a=t.length;for(t.sort(vu),n=0;n<a;n++)0<(i=o-(e=t[n]).getLayout().y)&&(r=e.getLayout().y+i,e.setLayout({y:r},!0)),o=e.getLayout().y+e.getLayout().dy+s;if(0<(i=o-s-l)){var r=e.getLayout().y-i;for(e.setLayout({y:r},!0),o=e.getLayout().y,n=a-2;0<=n;--n)0<(i=(e=t[n]).getLayout().y+e.getLayout().dy+s-o)&&(r=e.getLayout().y-i,e.setLayout({y:r},!0)),o=e.getLayout().y}})}function hu(t,n){L(t.slice().reverse(),function(t){L(t,function(t){if(t.outEdges.length){var e=gu(t.outEdges,uu)/gu(t.outEdges,xu),i=t.getLayout().y+(e-mu(t))*n;t.setLayout({y:i},!0)}})})}function uu(t){return mu(t.node2)*t.getValue()}function cu(t,n){L(t,function(t){L(t,function(t){if(t.inEdges.length){var e=gu(t.inEdges,du)/gu(t.inEdges,xu),i=t.getLayout().y+(e-mu(t))*n;t.setLayout({y:i},!0)}})})}function du(t){return mu(t.node1)*t.getValue()}function fu(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function pu(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function gu(t,e){for(var i=0,n=t.length,o=-1;++o<n;){var a=+e.call(t,t[o],o);isNaN(a)||(i+=a)}return i}function mu(t){return t.getLayout().y+t.getLayout().dy/2}function vu(t,e){return t.getLayout().y-e.getLayout().y}function yu(t,e){return t<e?-1:e<t?1:t===e?0:NaN}function xu(t){return t.getValue()}function _u(t,e,i,n){_g.call(this),this.bodyIndex,this.whiskerIndex,this.styleUpdater=i,this._createContent(t,e,n),this.updateData(t,e,n),this._seriesModel}function wu(t,e,i){return k(t,function(t){return(t=t.slice())[e]=i.initBaseline,t})}function bu(t){var i={};return L(t,function(t,e){i["ends"+e]=t}),i}function Su(t){this.group=new _g,this.styleUpdater=t}function Mu(t,e,i){var n=e.getItemModel(i),o=n.getModel(gM),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(),pn(t,n.getModel(mM).getItemStyle())}function Iu(t,e,i){var n=e.getItemModel(i),o=n.getModel(xM),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,pn(t,n.getModel(_M).getItemStyle())}function Tu(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 Au(t,e){_g.call(this);var i=new Gr(t,e),n=new _g;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function Du(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=k(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),u([e,t[0],t[1]])}))}function Cu(t,e,i){_g.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function Lu(t,e,i){_g.call(this),this._createPolyline(t,e,i)}function ku(t,e,i){Cu.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function Pu(){this.group=new _g}function Ou(t){return t instanceof Array||(t=[t,t]),t}function Nu(){var t=Ap();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function Eu(t,e,i,n){var o,a,r,s,l,h,u,c,d,f,p,g,m,v,y,x,_,w,b=t.getItemLayout(e),S=i.get("symbolRepeat"),M=i.get("symbolClip"),I=i.get("symbolPosition")||"start",T=(i.get("symbolRotate")||0)*Math.PI/180||0,A=i.get("symbolPatternSize")||2,D=i.isAnimationEnabled(),C={dataIndex:e,layout:b,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:M,symbolRepeat:S,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:A,rotation:T,animationModel:D?i:null,hoverAnimation:D&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};(function(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(O(s)){var c=[zu(l,s[0])-h,zu(l,s[1])-h];c[1]<c[0]&&c.reverse(),a=c[u]}else a=null!=s?zu(l,s)-h:e?n.coordSysExtent[r.index][u]-h:i[r.wh];o.boundingLength=a,e&&(o.repeatCutLength=i[r.wh]),o.pxSign=0<a?1:a<0?-1:0})(i,S,b,n,C),h=t,u=e,c=b,d=S,f=C.boundingLength,p=C.pxSign,g=A,v=C,y=(m=n).valueDim,x=m.categoryDim,_=Math.abs(c[x.wh]),(w=O(w=h.getItemVisual(u,"symbolSize"))?w.slice():(null==w&&(w="100%"),[w,w]))[x.index]=zn(w[x.index],_),w[y.index]=zn(w[y.index],d?_:Math.abs(f)),v.symbolSize=w,(v.symbolScale=[w[0]/g,w[1]/g])[y.index]*=(m.isHorizontal?-1:1)*p,o=C.symbolScale,a=T,r=n,s=C,(l=i.get(GM)||0)&&(FM.attr({scale:o.slice(),rotation:a}),FM.updateTransform(),l/=FM.getLineScale(),l*=o[r.valueDim.index]),s.valueLineWidth=l;var L=C.symbolSize,k=i.get("symbolOffset");return O(k)&&(k=[zn(k[0],L[0]),zn(k[1],L[1])]),function(t,e,i,n,o,a,r,s,l,h,u,c){var d=u.categoryDim,f=u.valueDim,p=c.pxSign,g=Math.max(e[f.index]+s,0),m=g;if(n){var v=Math.abs(l),y=B(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=zn(y,e[f.index]);var _=Math.max(g+2*y,0),w=x?0:2*y,b=$n(n),S=b?n:Ju((v+w)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),w=x?0:2*y,b||"fixed"===n||(S=h?Ju((Math.abs(h)+w)/_):0),m=S*_-w,c.repeatTimes=S,c.symbolMargin=y}var M=p*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[f.index]="start"===r?M:"end"===r?l-M:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var T=c.bundlePosition=[];T[d.index]=i[d.xy],T[f.index]=i[f.xy];var A=c.barRectShape=P({},i);A[f.wh]=p*Math.max(Math.abs(i[f.wh]),Math.abs(I[f.index]+M)),A[d.wh]=i[d.wh];var D=c.clipShape={};D[d.xy]=-i[d.xy],D[d.wh]=u.ecSize[d.wh],D[f.xy]=0,D[f.wh]=i[f.wh]}(i,L,b,S,0,k,I,C.valueLineWidth,C.boundingLength,C.repeatCutLength,n,C),C}function zu(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Ru(t){var e=t.symbolPatternSize,i=Pr(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Bu(t,e,o,i){function n(t){var e=l.slice(),i=o.pxSign,n=t;return("start"===o.symbolRepeatDirection?0<i:i<0)&&(n=u-1-t),e[h.index]=d*(n-u/2+.5)+l[h.index],{position:e,scale:o.symbolScale.slice(),rotation:o.rotation}}var a=t.__pictorialBundle,r=o.symbolSize,s=o.valueLineWidth,l=o.pathPosition,h=e.valueDim,u=o.repeatTimes||0,c=0,d=r[e.valueDim.index]+s+2*o.symbolMargin;for(qu(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c<u?$u(t,null,n(c),o,i):$u(t,null,{scale:[0,0]},o,i,function(){a.remove(t)}),Uu(t,o),c++});c<u;c++){var f=Ru(o);f.__pictorialAnimationIndex=c,f.__pictorialRepeatTimes=u,a.add(f);var p=n(c);$u(f,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},o,i),f.on("mouseover",function(){qu(t,function(t){t.trigger("emphasis")})}).on("mouseout",function(){qu(t,function(t){t.trigger("normal")})}),Uu(f,o)}}function Vu(t,e,i,n){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?$u(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=Ru(i),o.add(a),$u(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),Uu(a,i)}function Gu(t,e,i){var n=P({},e.barRectShape),o=t.__pictorialBarRect;o?$u(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new Nv({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function Wu(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,a=P({},i.clipShape),r=e.valueDim,s=i.animationModel,l=i.dataIndex;if(o)Sn(o,{shape:a},s,l);else{a[r.wh]=0,o=new Nv({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var h={};h[r.wh]=i.clipShape[r.wh],qv[n?"updateProps":"initProps"](o,{shape:h},s,l)}}}function Fu(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=Hu,i.isAnimationEnabled=Zu,i}function Hu(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Zu(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Uu(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:i.slice()},400,"elasticOut")})}function ju(t,e,i,n){var o=new _g,a=new _g;return o.add(a),(o.__pictorialBundle=a).attr("position",i.bundlePosition.slice()),i.symbolRepeat?Bu(o,e,i):Vu(o,0,i),Gu(o,i,n),Wu(o,e,i,n),o.__pictorialShapeStr=Yu(t,i),o.__pictorialSymbolMeta=i,o}function Xu(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var a=[];qu(n,function(t){a.push(t)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),L(a,function(t){Sn(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function Yu(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function qu(e,i,n){L(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&i.call(n,t)})}function $u(t,e,i,n,o,a){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&qv[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,a)}function Ku(t,e,i){var n=i.color,o=i.dataIndex,a=i.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor");qu(t,function(t){t.setColor(n),t.setStyle(E({fill:n,opacity:i.opacity},r)),pn(t,s),l&&(t.cursor=l),t.z2=i.z2});var h={},u=(e.valueDim.posDesc[+(0<i.boundingLength)],t.__pictorialBarRect);Ms(u.style,h,a,n,e.seriesModel,o),pn(u,h)}function Ju(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function Qu(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function tc(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]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[r];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),B(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var u=e.rotate;return null==u&&(u=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-u:u,o.labelInterval=n.getLabelInterval(),o.z2=1,o}function ec(t,e,i,n,o){var l,a,h,u,c,d,f,p,r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var s=(l=e,h=(a=t).axis,u=h.dim,c=l,d=[],f=Number.MAX_VALUE,p=-1,$M(a.seriesModels,function(e,t){var i,n,o=e.getData().mapDimension(u,!0);if(e.getAxisTooltipData){var a=e.getAxisTooltipData(o,l,h);n=a.dataIndices,i=a.nestestValue}else{if(!(n=e.getData().indicesOfNearest(o[0],l,!1,"category"===h.type?.5:null)).length)return;i=e.getData().get(o[0],n[0])}if(null!=i&&isFinite(i)){var r=l-i,s=Math.abs(r);s<=f&&((s<f||0<=r&&p<0)&&(f=s,p=r,c=i,d.length=0),$M(n,function(t){d.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:d,snapToValue:c}),g=s.payloadBatch,m=s.snapToValue;g[0]&&null==o.seriesIndex&&P(o,g[0]),!n&&t.snap&&r.containData(m)&&null!=m&&(e=m),i.showPointer(t,e,g,o),i.showTooltip(t,s,m)}else i.showPointer(t,e)}function ic(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function nc(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=_s(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 oc(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 ac(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function rc(t,e,i){if(!mp.node){var n=e.getZr();QM(n).records||(QM(n).records={}),function(c,d){function t(t,u){c.on(t,function(e){var i,n,o,t,a,r,s,l,h=(i=d,{dispatchAction:o=function(t){var e=n[t.type];e?e.push(t):(t.dispatchAction=o,i.dispatchAction(t))},pendings:n={showTip:[],hideTip:[]}});tI(QM(c).records,function(t){t&&u(t,e,h.dispatchAction)}),t=h.pendings,a=d,s=t.showTip.length,l=t.hideTip.length,s?r=t.showTip[s-1]:l&&(r=t.hideTip[l-1]),r&&(r.dispatchAction=null,a.dispatchAction(r))})}QM(c).initialized||(QM(c).initialized=!0,t("click",z(lc,"click")),t("mousemove",z(lc,"mousemove")),t("globalout",sc))}(n,e),(QM(n).records[t]||(QM(n).records[t]={})).handler=i}}function sc(t,e,i){t.handler("leave",null,i)}function lc(t,e,i,n){e.handler(t,i,n)}function hc(t,e){if(!mp.node){var i=e.getZr();(QM(i).records||{})[t]&&(QM(i).records[t]=null)}}function uc(){}function cc(t,e,i,n){(function i(n,t){if(R(n)&&R(t)){var o=!0;return L(t,function(t,e){o=o&&i(n[e],t)}),!!o}return n===t})(iI(i).lastProp,n)||(iI(i).lastProp=n,e?Sn(i,n,t):(i.stopAnimation(),i.attr(n)))}function dc(t,e){t[e.get("label.show")?"show":"hide"]()}function fc(t){return{position:t.position.slice(),rotation:t.rotation||0}}function pc(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 gc(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 mc(t,e,i,n,o){var a=vc(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=hy(r.get("padding")||0),l=r.getFont(),h=le(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 p,g,m,v,y,x,_=o.verticalAlign;"bottom"===_&&(u[1]-=d),"middle"===_&&(u[1]-=d/2),p=u,g=c,m=d,y=(v=n).getWidth(),x=v.getHeight(),p[0]=Math.min(p[0]+g,y)-g,p[1]=Math.min(p[1]+m,x)-m,p[0]=Math.max(p[0],0),p[1]=Math.max(p[1],0);var w=r.get("backgroundColor");w&&"auto"!==w||(w=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:w,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 vc(t,e,o,i,n){var a=e.scale.getLabel(t,{precision:n.precision}),r=n.formatter;if(r){var s={value:Lr(e,t),seriesData:[]};L(i,function(t){var e=o.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,n=e&&e.getDataParams(i);n&&s.seriesData.push(n)}),w(r)?a=r.replace("{value}",a):m(r)&&(a=r(s))}return a}function yc(t,e,i){var n=rt();return ct(n,n,i.rotation),ut(n,n,i.position),Tn([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function xc(t,e,i,n,o,a){var r=Lw.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),mc(e,n,o,a,{position:yc(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function _c(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}function wc(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}function bc(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}function Sc(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Mc(t){return"x"===t.dim?0:1}function Ic(t){return t.isHorizontal()?0:1}function Tc(t,e){var i=t.getRect();return[i[sI[e]],i[sI[e]]+i[lI[e]]]}function Ac(i,t,e){if(i.count())for(var n,o=t.coordinateSystem,a=t.getLayerSeries(),r=i.mapDimension("single"),s=i.mapDimension("value"),l=k(a,function(t){return k(t.indices,function(t){var e=o.dataToPoint(i.get(r,t));return e[1]=i.get(s,t),e})}),h=function(t){for(var e=t.length,i=t[0].length,n=[],o=[],a=0,r={},s=0;s<i;++s){for(var l=0,h=0;l<e;++l)h+=t[l][s][1];a<h&&(a=h),n.push(h)}for(var u=0;u<i;++u)o[u]=(a-n[u])/2;for(var c=a=0;c<i;++c){var d=n[c]+o[c];a<d&&(a=d)}return r.y0=o,r.max=a,r}(l),u=h.y0,c=e/h.max,d=a.length,f=a[0].indices.length,p=0;p<f;++p){n=u[p]*c,i.setItemLayout(a[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:n,y:l[0][p][1]*c});for(var g=1;g<d;++g)n+=l[g-1][p][1]*c,i.setItemLayout(a[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:n,y:l[g][p][1]*c})}}function Dc(t,e,i){function n(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}_g.call(this);var a=new Lv({z2:fI}),r=new Tv({z2:pI,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function Cc(t,e,i){var n=t.getVisual("color");0===t.getVisual("visualMeta").length&&(n=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(n)return n;if(0===t.depth)return i.option.color[0];var a=i.option.color.length;return i.option.color[function(t){for(var e=t;1<e.depth;)e=e.parentNode;return y(t.getAncestors()[0].children,e)}(t)%a]}function Lc(a,r){return r=r||[0,0],k(["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)}function kc(a,r){return r=r||[0,0],k([0,1],function(t){var e=r[t],i=a[t]/2,n=[],o=[];return n[t]=e-i,o[t]=e+i,n[1-t]=o[1-t]=r[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function Pc(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 Oc(s,l){return k(["Radius","Angle"],function(t,e){var i=this["get"+t+"Axis"](),n=l[e],o=s[e]/2,a="dataTo"+t,r="category"===i.type?i.getBandWidth():Math.abs(i[a](n-o)-i[a](n+o));return"Angle"===t&&(r=r*Math.PI/180),r},this)}function Nc(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function Ec(o,a,e,t){function r(t){null==t&&(t=l),v&&(h=a.getItemModel(t),u=h.getModel(wI),c=h.getModel(bI),d=a.getItemVisual(t,"color"),v=!1)}var i=o.get("renderItem"),n=o.coordinateSystem,s={};n&&(s=n.prepareCustoms?n.prepareCustoms():MI[n.type](n));var l,h,u,c,d,f,p,g=E({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=l),a.get(a.getDimension(t||0),e)},style:function(t,e){null==e&&(e=l),r(e);var i=h.getModel(xI).getItemStyle();null!=d&&(i.fill=d);var n=a.getItemVisual(e,"opacity");return null!=n&&(i.opacity=n),mn(i,u,null,{autoColor:d,isRectText:!0}),i.text=u.getShallow("show")?V(o.getFormattedLabel(e,"normal"),Br(a,e)):null,t&&P(i,t),i},styleEmphasis:function(t,e){null==e&&(e=l),r(e);var i=h.getModel(_I).getItemStyle();return mn(i,c,null,{isRectText:!0},!0),i.text=c.getShallow("show")?G(o.getFormattedLabel(e,"emphasis"),o.getFormattedLabel(e,"normal"),Br(a,e)):null,t&&P(i,t),i},visual:function(t,e){return null==e&&(e=l),a.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis)return function(t,e){var i=[],n=t.axis;if("category"===n.type){for(var o=n.getBandWidth(),a=0;a<t.count;a++)i.push(E({bandWidth:o,axisKey:"axis0",stackId:__+a},t));var r=br(i),s=[];for(a=0;a<t.count;a++){var l=r.axis0[__+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(E({axis:n.getBaseAxis()},t))},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return wn(t,e)}},s.api||{}),m={context:{},seriesId:o.id,seriesName:o.name,seriesIndex:o.seriesIndex,coordSys:s.coordSys,dataInsideLength:a.count(),encode:(f=o.getData(),p={},L(f.dimensions,function(t,e){var i=f.getDimensionInfo(t);if(!i.isExtraCoord){var n=i.coordDim;(p[n]=p[n]||[])[i.coordDimIndex]=e}}),p)},v=!0;return function(t){return l=t,v=!0,i&&i(E({dataIndexInside:t,dataIndex:a.getRawIndex(t)},m),g)||{}}}function zc(t,e,i,n,o,a){return(t=Rc(t,e,i,n,o,a))&&a.setItemGraphicEl(e,t),t}function Rc(t,e,i,n,o,a){var r,s=i.type;if(!t||s===t.__customGraphicType||"path"===s&&i.pathData===t.__customPathData||"image"===s&&i.style.image===t.__customImagePath||"text"===s&&i.style.text===t.__customText||(o.remove(t),t=null),null!=s){var l=!t;if(!t&&(t=function(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=Yi(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 Be({})).__customImagePath=t.style.image:"text"===i?(e=new Tv({})).__customText=t.style.text:e=new(qv[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}(i)),function(e,t,i,n,o,a){var r={},s=i.style||{};if(i.shape&&(r.shape=D(i.shape)),i.position&&(r.position=i.position.slice()),i.scale&&(r.scale=i.scale.slice()),i.origin&&(r.origin=i.origin.slice()),i.rotation&&(r.rotation=i.rotation),"image"===e.type&&i.style&&(l=r.style={},L(["x","y","width","height"],function(t){Nc(t,l,s,e.style,a)})),"text"===e.type&&i.style){var l=r.style={};L(["x","y"],function(t){Nc(t,l,s,e.style,a)}),!s.hasOwnProperty("textFill")&&s.fill&&(s.textFill=s.fill),!s.hasOwnProperty("textStroke")&&s.stroke&&(s.textStroke=s.stroke)}if("group"!==e.type&&(e.useStyle(s),a)){e.style.opacity=0;var h=s.opacity;null==h&&(h=1),Mn(e,{style:{opacity:h}},n,t)}a?e.attr(r):Sn(e,r,n,t),e.attr({z2:i.z2||0,silent:i.silent}),!1!==i.styleEmphasis&&pn(e,i.styleEmphasis)}(t,e,i,n,0,l),"group"===s){var h=t.children()||[],u=i.children||[];if(i.diffChildrenByName)new Ja((r={oldChildren:h,newChildren:u,dataIndex:e,animatableModel:n,group:t,data:a}).oldChildren,r.newChildren,Bc,Bc,r).add(Vc).update(Vc).remove(Gc).execute();else{for(var c=0;c<u.length;c++)Rc(t.childAt(c),e,u[c],n,t,a);for(;c<h.length;c++)h[c]&&t.remove(h[c])}}return o.add(t),t}}function Bc(t,e){var i=t&&t.name;return null!=i?i:SI+e}function Vc(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null;Rc(null!=e?i.oldChildren[e]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function Gc(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function Wc(t,e,i,n){var o=i.type,a=new(qv[o.charAt(0).toUpperCase()+o.slice(1)])(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function Fc(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){Fc(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function Hc(e,t){var i;return L(t,function(t){null!=e[t]&&"auto"!==e[t]&&(i=!0)}),i}function Zc(t,e,i){var o,a={},r="toggleSelected"===t;return i.eachComponent("legend",function(n){r&&null!=o?n[o?"select":"unSelect"](e.name):(n[t](e.name),o=n.isSelected(e.name)),L(n.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&i:a[e]=i}})}),{name:e.name,selected:a}}function Uc(t,e){var i=hy(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),new Nv({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}function jc(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Xc(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function Yc(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}function qc(t,e,i){var n=[1,1];n[t.getOrient().index]=0,lo(e,i,{type:"box",ignoreSize:n})}function $c(o){var i,n,t,e,a,r,s=[],l=o.get("transitionDuration"),h=o.get("backgroundColor"),u=o.getModel("textStyle"),c=o.get("padding");return l&&s.push((r="left "+(a=l)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+a+"s cubic-bezier(0.23, 1, 0.32, 1)",k(BI,function(t){return t+"transition:"+r}).join(";"))),h&&(mp.canvasSupported?s.push("background-Color:"+h):(s.push("background-Color:#"+Ct(h)),s.push("filter:alpha(opacity=70)"))),zI(["width","color","radius"],function(t){var e="border-"+t,i=RI(e),n=o.get(i);null!=n&&s.push(e+":"+n+("color"===t?"":"px"))}),s.push((n=[],t=(i=u).get("fontSize"),(e=i.getTextColor())&&n.push("color:"+e),n.push("font:"+i.getFont()),t&&n.push("line-height:"+Math.round(3*t/2)+"px"),zI(["decoration","align"],function(t){var e=i.get(t);e&&n.push("text-"+t+":"+e)}),n.join(";"))),null!=c&&s.push("padding:"+hy(c).join("px ")+"px"),s.join(";")+";"}function Kc(i,t){if(mp.wxa)return null;var e=document.createElement("div"),n=this._zr=t.getZr();this.el=e,this._x=t.getWidth()/2,this._y=t.getHeight()/2,i.appendChild(e),this._container=i,this._show=!1,this._hideTimeout;var o=this;e.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},e.onmousemove=function(t){if(t=t||window.event,!o._enterable){var e=n.handler;Fe(i,t,!0),e.dispatch("mousemove",t)}},e.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}function Jc(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(kn.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new kn(i,e,e.ecModel))}return e}function Qc(t,e){return t.dispatchAction||_(e.dispatchAction,e)}function td(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 ed(t){return"center"===t||"middle"===t}function id(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function nd(t){return t.dim}function od(t,e){Y_.call(this,"radius",t,e),this.type="category"}function ad(t,e){e=e||[0,360],Y_.call(this,"angle",t,e),this.type="category"}function rd(t,e){return e.type||(e.data?"category":"value")}function sd(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();L(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,t)}),L(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,t)})}}),Tr(n.scale,n.model),Tr(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 ld(t,e){if(t.type=e.get("type"),t.scale=Ar(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}function hd(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 ud(t){return t.getRadiusAxis().inverse?0:1}function cd(n,t){t.update="updateView",Ga(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),L(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}function dd(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function fd(e,t,a){var i={};return JI(t,function(n){var t,o=i[n]=((t=function(){}).prototype.__hidden=t.prototype,new t);JI(e[n],function(t,e){if(Ub.isValidType(e)){var i={type:e,visual:t};a&&a(i,n),o[e]=new Ub(i),"opacity"===e&&((i=D(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new Ub(i))}})}),i}function pd(e,i,t){var n;L(t,function(t){i.hasOwnProperty(t)&&dd(i[t])&&(n=!0)}),n&&L(t,function(t){i.hasOwnProperty(t)&&dd(i[t])?e[t]=D(i[t]):delete e[t]})}function gd(a){var r=["x","y"],s=["width","height"];return{point:function(t,e,i){if(t){var n=i.range;return md(t[a],n)}},rect:function(t,e,i){if(t){var n=i.range,o=[t[r[a]],t[r[a]]+t[s[a]]];return o[1]<o[0]&&o.reverse(),md(o[0],n)||md(o[1],n)||md(n[0],o)||md(n[1],o)}}}}function md(t,e){return e[0]<=t&&t<=e[1]}function vd(t,e,i,n,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(yd(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function yd(t,e,i,n,o,a,r,s){var l,h=xd(i-t,o-r,n-e,a-s);if((l=h)<=1e-6&&-1e-6<=l)return!1;var u=xd(o-t,o-r,a-e,a-s)/h;if(u<0||1<u)return!1;var c=xd(i-t,o-t,n-e,a-e)/h;return!(c<0||1<c)}function xd(t,e,i,n){return t*n-e*i}function _d(t,e,i){var n=this._targetInfoList=[],o={},a=bd(e,t);tT(rT,function(t,e){(!i||!i.include||0<=eT(i.include,e))&&t(a,n,o)})}function wd(t){return t[0]>t[1]&&t.reverse(),t}function bd(t,e){return si(t,e,{includeMainTypes:oT})}function Sd(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=wd(k([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 Md(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function Id(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function Td(t,e){if(!t.isDisposed()){var i=t.getZr();i[fT]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[fT]=!1}}function Ad(t,e,i,n){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](n,i,r.selectors,r))return!0}}function Dd(t){var r=t.brushSelector;if(w(r)){var e=[];return L(QI,function(a,t){e[t]=function(t,e,i,n){var o=e.getItemLayout(t);return a[r](o,i,n)}}),e}if(m(r)){var i={};return L(QI,function(t,e){i[e]=r}),i}return r}function Cd(t){return new Xt(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function Ld(t,e){return g({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new kn(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function kd(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function Pd(t,e){vT[t]=e}function Od(t){return vT[t]}function Nd(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function Ed(t,e,i){this._model=t}function zd(t,e,i,n){var o=i.calendarModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](n):null}function Rd(t,n){var o=t.cellSize;O(o)?1===o.length&&(o[1]=o[0]):o=t.cellSize=[o,o];var e=k([0,1],function(t){return(null!=(e=n)[yy[i=t][0]]||null!=e[yy[i][1]]&&null!=e[yy[i][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t];var e,i});lo(t,n,{type:"box",ignoreSize:e})}function Bd(t,e,i){var n=[1/0,-1/0];return CT(i,function(t){var i=t.getData();i&&CT(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[NaN,NaN]),function(t,e){var i=t.getAxisModel(),n=i.getMin(!0),o="category"===i.get("type"),a=o&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:o&&(e[0]=0<a?0:NaN);var r=i.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=0<a?a-1:NaN),i.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}function Vd(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Wn(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 Gd(e){var i={};return PT(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(i[t]=e[t])}),i}function Wd(t,o){var a=t._rangePropMode,r=t.get("rangeMode");PT([["start","startValue"],["end","endValue"]],function(t,e){var i=null!=o[t[0]],n=null!=o[t[1]];i&&!n?a[e]="percent":!i&&n?a[e]="value":r?a[e]=r[e]:i&&(a[e]="percent")})}function Fd(t){return"vertical"===t?"ns-resize":"ew-resize"}function Hd(t,n){var e=Ud(t),o=n.dataZoomId,a=n.coordId;L(e,function(t,e){var i=t.dataZoomInfos;i[o]&&y(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),jd(e);var i,r,s=e[a];s||((s=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=(i=s,(r=new Vs(t.getZr())).on("pan",ZT(Xd,i)),r.on("zoom",ZT(Yd,i)),r),s.dispatchAction=z($d,t)),!s.dataZoomInfos[o]&&s.count++,s.dataZoomInfos[o]=n;var l,h,u,c,d=(l=s.dataZoomInfos,u={},c={type_true:2,type_move:1,type_false:0,type_undefined:-1},L(l,function(t){var e=!t.disabled&&(!t.zoomLock||"move");c["type_"+h]<c["type_"+e]&&(h=e),P(u,t.roamControllerOpt)}),{controlType:h,opt:u});s.controller.enable(d.controlType,d.opt),s.controller.setPointerChecker(n.containsPoint),aa(s,"dispatchAction",n.throttleRate,"fixRate")}function Zd(t){return t.type+"\0_"+t.id}function Ud(t){var e=t.getZr();return e[UT]||(e[UT]={})}function jd(i){L(i,function(t,e){t.count||(t.controller.dispose(),delete i[e])})}function Xd(e,i,n,o,a,r,s){qd(e,function(t){return t.panGetRange(e.controller,i,n,o,a,r,s)})}function Yd(e,i,n,o){qd(e,function(t){return t.zoomGetRange(e.controller,i,n,o)})}function qd(t,i){var n=[];L(t.dataZoomInfos,function(t){var e=i(t);!t.disabled&&e&&n.push({dataZoomId:t.dataZoomId,start:e[0],end:e[1]})}),t.dispatchAction(n)}function $d(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Kd(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Jd(t,e,i,n){for(var o=e.targetVisuals[n],a=Ub.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var h=a[s],u=o["opacity"===h?"__alphaForOpacity":h];u&&u.applyVisual(i,function(t){return r[t]},function(t,e){r[t]=e})}return r.color}function Qd(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,o=i[0],a=[],r=0;r<=200&&o<i[1];r++)a.push(o),o+=n;return a.push(i[1]),a}function tf(t,e,i){var n=t.option,o=n.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},r="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],h=[0,null,10],u={},c=0;c<3;c++)u[s[1-r][c]]=h[c],u[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=ro(u,a,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*a[d[1]]?0:1]}function ef(e){return L(e||[],function(t){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null)}),e}function nf(t,e,i,n){return new Pv({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){$g(t.event)},ondragend:n})}function of(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function af(t){return"vertical"===t?"ns-resize":"ew-resize"}function rf(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function sf(t){ti(t,"label",["show"])}function lf(t,e,i,n,o,a){var r=[],s=ff(e,n,t),l=e.indicesOfNearest(n,s,!0)[0];r[o]=e.get(i,l,!0),r[a]=e.get(n,l,!0);var h=function(t,e,i){for(var n=-1;n=Math.max(Vn(t.get(e,i)),n),t=t.stackedOn;);return n}(e,n,l);return 0<=(h=Math.min(h,20))&&(r[a]=+r[a].toFixed(h)),r}function hf(t,e){var i,n=t.getData(),o=t.coordinateSystem;if(e&&(i=e,isNaN(parseFloat(i.x))||isNaN(parseFloat(i.y)))&&!O(e.coord)&&o){var a=o.dimensions,r=uf(e,n,o,t);if((e=D(e)).type&&bA[e.type]&&r.baseAxis&&r.valueAxis){var s=_A(a,r.baseAxis.dim),l=_A(a,r.valueAxis.dim);e.coord=bA[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++)bA[h[u]]&&(h[u]=ff(n,n.mapDimension(a[u]),h[u]));e.coord=h}}return e}function uf(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;o<n.length;o++){var a=i.getDimensionInfo(n[o]);if(a.name===e)return a.coordDim}}(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function cf(t,e){return!(t&&t.containData&&e.coord&&(i=e,isNaN(parseFloat(i.x))&&isNaN(parseFloat(i.y))))||t.containData(e.coord);var i}function df(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function ff(t,e,i){if("average"!==i)return t.getDataExtent(e,!0)["max"===i?1:0];var n=0,o=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,o++)},!0),n/o}function pf(s,l,h){var u=l.coordinateSystem;s.each(function(t){var e,i=s.getItemModel(t),n=zn(i.get("x"),h.getWidth()),o=zn(i.get("y"),h.getHeight());if(isNaN(n)||isNaN(o)){if(l.getMarkerPosition)e=l.getMarkerPosition(s.getValues(s.dimensions,t));else if(u){var a=s.get(u.dimensions[0],t),r=s.get(u.dimensions[1],t);e=u.dataToPoint([a,r])}}else e=[n,o];isNaN(n)||(e[0]=n),isNaN(o)||(e[1]=o),s.setItemLayout(t,e)})}function gf(t){return!isNaN(t)&&!isFinite(t)}function mf(t,e,i,n){var o=1-t,a=n.dimensions[t];return gf(e[o])&&gf(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function vf(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(mf(1,i,n,t)||mf(0,i,n,t)))return!0}return cf(t,e[0])&&cf(t,e[1])}function yf(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=zn(s.get("x"),o.getWidth()),h=zn(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"),p=r.getAxis("y");u=r.dimensions;gf(t.get(u[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):gf(t.get(u[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(h)||(a[1]=h)}else a=[l,h];t.setItemLayout(e,a)}function xf(t){return!isNaN(t)&&!isFinite(t)}function _f(t,e,i,n){var o=1-t;return xf(e[o])&&xf(i[o])}function wf(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!_f(1,i,n)&&!_f(0,i,n))||cf(t,{coord:i,x:e.x0,y:e.y0})||cf(t,{coord:n,x:e.x1,y:e.y1})}function bf(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=zn(s.get(i[0]),o.getWidth()),h=zn(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var u=[f=t.get(i[0],e),p=t.get(i[1],e)];r.clampData&&r.clampData(u,u),a=r.dataToPoint(u,!0)}if("cartesian2d"===r.type){var c=r.getAxis("x"),d=r.getAxis("y"),f=t.get(i[0],e),p=t.get(i[1],e);xf(f)?a[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):xf(p)&&(a[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(h)||(a[1]=h)}else a=[l,h];return a}function Sf(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};L(n,function(t,e){a[e]||Mf(o,e)||(o[e]=t)}),i.label&&!Mf(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function Mf(t,e){return t.hasOwnProperty(e)}function If(t,e,i,n,o,a){var r=e.get("color");o?(o.setColor(r),i.add(o),a&&a.onUpdate(o)):((o=Pr(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=g({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 h=t.get("symbolOffset");if(h){var u=n.position=n.position||[0,0];u[0]+=zn(h[0],l[0]),u[1]+=zn(h[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function Tf(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 Af(t){this.model=t}function Df(t){this.model=t}function Cf(t){var o,a,r,e,i,u,n=(o={},a=[],r=[],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});return{value:I([(i=n.seriesGroupByCategoryAxis,u=[],L(i,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,o=[" "].concat(k(t.series,function(t){return t.name})),a=[i.model.getCategories()];L(t.series,function(t){a.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[o.join(WA)],s=0;s<a[0].length;s++){for(var l=[],h=0;h<a.length;h++)l.push(a[h][s]);r.push(l.join(WA))}u.push(r.join("\n"))}),u.join("\n\n"+GA+"\n\n")),(e=n.other,k(e,function(t){var o=t.getRawData(),a=[t.name],r=[];return o.each(o.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],i=o.getName(e),n=0;n<t-1;n++)r[n]=arguments[n];a.push((i?i+WA:"")+r.join(WA))}),a.join("\n")}).join("\n\n"+GA+"\n\n"))],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+GA+"\n\n"),meta:n.meta}}function Lf(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kf(t,a){var r={series:[]};return L(t.split(new RegExp("\n*"+GA+"\n*","g")),function(t,e){if(function(t){if(0<=t.slice(0,t.indexOf("\n")).indexOf(WA))return!0}(t)){var i=function(t){for(var e=t.split(/\n+/g),i=[],n=k(Lf(e.shift()).split(FA),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=Lf(e[o]).split(FA);i.push(a.shift());for(var r=0;r<a.length;r++)n[r]&&(n[r].data[o]=a[r])}return{series:n,categories:i}}(t),n=a[e],o=n.axisDim+"Axis";n&&(r[o]=r[o]||[],r[o][n.axisIndex]={data:i.categories},r.series=r.series.concat(i.series))}else i=function(t){for(var e=t.split(/\n+/g),i=Lf(e.shift()),n=[],o=0;o<e.length;o++){var a,r=Lf(e[o]).split(FA),s="",l=!1;a=isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[o]={name:s,value:[]},n[o].value):n[o]=[];for(var h=0;h<r.length;h++)a.push(+r[h]);1===a.length&&(l?n[o].value=a[0]:n[o]=a[0])}return{name:i,data:n}}(t),r.series.push(i)}),r}function Pf(t){this._dom=null,this.model=t}function Of(t){var e=t[ZA];return e||(e=t[ZA]=[{}]),e}function Nf(t,e,i){(this._brushController=new Mh(i.getZr())).on("brush",_(this._onBrush,this)).mount(),this._isZoomActive}function Ef(e){var i={};return L(["xAxisIndex","yAxisIndex"],function(t){i[t]=e[t],null==i[t]&&(i[t]="all"),(!1===i[t]||"none"===i[t])&&(i[t]=[])}),i}function zf(t,e){t.setIconStatus("back",1<Of(e).length?"emphasis":"normal")}function Rf(t){this.model=t}function Bf(t){return $A(t)}function Vf(t){return parseInt(t,10)}function Gf(t,e){(function(){if(!QA&&tD){QA=!0;var t=tD.styleSheets;t.length<31?tD.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}})(),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 Wf(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ff(t){return kD(1e4*t)/1e4}function Hf(t){return t<RD&&-RD<t}function Zf(t,e){e&&Uf(t,"transform","matrix("+CD.call(e,",")+")")}function Uf(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function jf(t,e,i){if(o=e,null!=(a=i?o.textFill:o.fill)&&a!==LD){var n=i?e.textFill:e.fill;n="transparent"===n?LD:n,"none"!==t.getAttribute("clip-path")&&n===LD&&(n="rgba(0, 0, 0, 0.002)"),Uf(t,"fill",n),Uf(t,"fill-opacity",e.opacity)}else Uf(t,"fill",LD);var o,a,r,s;if(r=e,null!=(s=i?r.textStroke:r.stroke)&&s!==LD){var l=i?e.textStroke:e.stroke;Uf(t,"stroke",l="transparent"===l?LD:l),Uf(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?e.host.getLineScale():1)),Uf(t,"paint-order",i?"stroke":"fill"),Uf(t,"stroke-opacity",e.opacity),e.lineDash?(Uf(t,"stroke-dasharray",e.lineDash.join(",")),Uf(t,"stroke-dashoffset",kD(e.lineDashOffset||0))):Uf(t,"stroke-dasharray",""),e.lineCap&&Uf(t,"stroke-linecap",e.lineCap),e.lineJoin&&Uf(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Uf(t,"stroke-miterlimit",e.miterLimit)}else Uf(t,"stroke",LD)}function Xf(t){return"middle"===t?"middle":"bottom"===t?"baseline":"hanging"}function Yf(){}function qf(t,e,i,n){for(var o=0,a=e.length,r=0,s=0;o<a;o++){var l=e[o];if(l.removed){for(var h=[],u=s;u<s+l.count;u++)h.push(u);l.indices=h,s+=l.count}else{for(h=[],u=r;u<r+l.count;u++)h.push(u);l.indices=h,r+=l.count,l.added||(s+=l.count)}}return e}function $f(t,e,i,n,o){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=o||"_dom",this.nextId=0}function Kf(t,e){$f.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function Jf(t,e){$f.call(this,t,e,"clipPath","__clippath_in_use__")}function Qf(t,e){$f.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function tp(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function ep(t){return parseInt(t,10)}function ip(t,e){return e&&t&&e.parentNode!==t}function np(t,e,i){if(ip(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function op(t,e){if(ip(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function ap(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function rp(t){return t.__textSvgEl}function sp(t){return t.__svgEl}var lp,hp,up,cp,dp,fp,pp=2311,gp=function(){return pp++},mp="undefined"!=typeof wx?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0}:(lp=navigator.userAgent,hp={},up=lp.match(/Firefox\/([\d.]+)/),cp=lp.match(/MSIE\s([\d.]+)/)||lp.match(/Trident\/.+?rv:(([\d.]+))/),dp=lp.match(/Edge\/([\d.]+)/),fp=/micromessenger/i.test(lp),up&&(hp.firefox=!0,hp.version=up[1]),cp&&(hp.ie=!0,hp.version=cp[1]),dp&&(hp.edge=!0,hp.version=dp[1]),fp&&(hp.weChat=!0),{browser:hp,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!hp.ie&&!hp.edge,pointerEventsSupported:"onpointerdown"in window&&(hp.edge||hp.ie&&11<=hp.version)}),vp={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},yp={"[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},xp=Object.prototype.toString,_p=Array.prototype,wp=_p.forEach,bp=_p.filter,Sp=_p.slice,Mp=_p.map,Ip=_p.reduce,Tp={},Ap=function(){return Tp.createCanvas()};Tp.createCanvas=function(){return document.createElement("canvas")};var Dp,Cp="__ec_primitive__";S.prototype={constructor:S,get:function(t){return this.hasOwnProperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=_(t,e)),this)this.hasOwnProperty(i)&&t(this[i],i)},removeKey:function(t){delete this[t]}};var Lp=(Object.freeze||Object)({$override:e,clone:D,merge:g,mergeAll:u,extend:P,defaults:E,createCanvas:Ap,getContext:n,indexOf:y,inherits:a,mixin:o,isArrayLike:N,each:L,map:k,reduce:p,filter:I,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n<o;n++)if(e.call(i,t[n],n,t))return t[n]},bind:_,curry:z,isArray:O,isFunction:m,isString:w,isObject:R,isBuiltInObject:r,isTypedArray:v,isDom:b,eqNaN:x,retrieve:B,retrieve2:V,retrieve3:G,slice:s,normalizeCssArray:l,assert:c,trim:h,setAsPrimitive:d,isPrimitive:f,createHashMap:C,concatArray:i,noop:M}),kp="undefined"==typeof Float32Array?Array:Float32Array,Pp=j,Op=X,Np=$,Ep=K,zp=(Object.freeze||Object)({create:T,copy:A,clone:W,set:F,add:H,scaleAndAdd:Z,sub:U,len:j,length:Pp,lenSquare:X,lengthSquare:Op,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Y,normalize:q,distance:$,dist:Np,distanceSquare:K,distSquare:Ep,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:J,applyTransform:Q,min:tt,max:et});it.prototype={constructor:it,_dragStart:function(t){var e=t.target;e&&e.draggable&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(nt(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(o,a,t),this.dispatchToElement(nt(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;e!==(this._dropTarget=r)&&(s&&r!==s&&this.dispatchToElement(nt(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(nt(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(nt(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(nt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Rp=Array.prototype.slice,Bp=function(){this._$handlers={}};Bp.prototype={constructor:Bp,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var o=0;o<n[t].length;o++)if(n[t][o].h===e)return this;return n[t].push({h:e,one:!0,ctx:i||this}),this},on:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var o=0;o<n[t].length;o++)if(n[t][o].h===e)return this;return n[t].push({h:e,one:!1,ctx:i||this}),this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],o=0,a=i[t].length;o<a;o++)i[t][o].h!=e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;3<i&&(e=Rp.call(e,1));for(var n=this._$handlers[t],o=n.length,a=0;a<o;){switch(i){case 1:n[a].h.call(n[a].ctx);break;case 2:n[a].h.call(n[a].ctx,e[1]);break;case 3:n[a].h.call(n[a].ctx,e[1],e[2]);break;default:n[a].h.apply(n[a].ctx,e)}n[a].one?(n.splice(a,1),o--):a++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;4<i&&(e=Rp.call(e,1,e.length-1));for(var n=e[e.length-1],o=this._$handlers[t],a=o.length,r=0;r<a;){switch(i){case 1:o[r].h.call(n);break;case 2:o[r].h.call(n,e[1]);break;case 3:o[r].h.call(n,e[1],e[2]);break;default:o[r].h.apply(n,e)}o[r].one?(o.splice(r,1),a--):r++}}return this}};var Vp="silent";ot.prototype.dispose=function(){};var Gp=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Wp=function(t,e,i,n){Bp.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new ot,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,it.call(this),this.setHandlerProxy(i)};Wp.prototype={constructor:Wp,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(L(Gp,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=this._hovered,o=n.target;o&&!o.__zr&&(o=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=this.findHover(e,i),r=a.target,s=this.proxy;s.setCursor&&s.setCursor(r?r.cursor:"default"),o&&r!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),r&&r!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);for(var e,i=t.toElement||t.relatedTarget;(i=i&&i.parentNode)&&9!=i.nodeType&&!(e=i===this.painterRoot););!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n,o,a=(t=t||{}).target;if(!a||!a.silent){for(var r="on"+e,s={type:e,event:o=i,target:(n=t).target,topTarget:n.topTarget,cancelBubble:!1,offsetX:o.zrX,offsetY:o.zrY,gestureEvent:o.gestureEvent,pinchX:o.pinchX,pinchY:o.pinchY,pinchScale:o.pinchScale,wheelDelta:o.zrDelta,zrByTouch:o.zrByTouch,which:o.which};a&&(a[r]&&(s.cancelBubble=a[r].call(a,s)),a.trigger(e,s),a=a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,s),t.trigger&&t.trigger(e,s)}))}},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=at(n[a],t,e))&&(!o.topTarget&&(o.topTarget=n[a]),r!==Vp)){o.target=n[a];break}}return o}},L(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(n){Wp.prototype[n]=function(t){var e=this.findHover(t.zrX,t.zrY),i=e.target;if("mousedown"===n)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===n)this._upEl=i;else if("click"===n){if(this._downEl!==this._upEl||!this._downPoint||4<Np(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,n,t)}}),o(Wp,Bp),o(Wp,it);var Fp="undefined"==typeof Float32Array?Array:Float32Array,Hp=(Object.freeze||Object)({create:rt,identity:st,copy:lt,mul:ht,translate:ut,rotate:ct,scale:dt,invert:ft,clone:pt}),Zp=st,Up=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},jp=Up.prototype;jp.transform=null,jp.needLocalTransform=function(){return gt(this.rotation)||gt(this.position[0])||gt(this.position[1])||gt(this.scale[0]-1)||gt(this.scale[1]-1)},jp.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;i||e?(n=n||rt(),i?this.getLocalTransform(n):Zp(n),e&&(i?ht(n,t.transform,n):lt(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||rt(),ft(this.invTransform,n)):n&&Zp(n)},jp.getLocalTransform=function(t){return Up.getLocalTransform(this,t)},jp.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)},jp.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Xp=[];jp.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ht(Xp,t.invTransform,e),e=Xp);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;gt(i-1)&&(i=Math.sqrt(i)),gt(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)}},jp.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]},jp.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&Q(i,i,n),i},jp.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&Q(i,i,n),i},Up.getLocalTransform=function(t,e){Zp(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]),dt(e,e,n),o&&ct(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var Yp={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=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){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Yp.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*Yp.bounceIn(2*t):.5*Yp.bounceOut(2*t-1)+.5}};mt.prototype={constructor:mt,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?Yp[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 qp=function(){this.head=null,this.tail=null,this._len=0},$p=qp.prototype;$p.insert=function(t){var e=new Kp(t);return this.insertEntry(e),e},$p.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},$p.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--},$p.len=function(){return this._len},$p.clear=function(){this.head=this.tail=null,this._len=0};var Kp=function(t){this.value=t,this.next,this.prev},Jp=function(t){this._list=new qp,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Qp=Jp.prototype;Qp.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&&0<a){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Kp(e),r.key=t,i.insertEntry(r),n[t]=r}return o},Qp.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},Qp.clear=function(){this._list.clear(),this._map={}};var tg={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]},eg=new Jp(20),ig=null,ng=Lt,og=kt,ag=(Object.freeze||Object)({parse:Tt,lift:Dt,toHex:Ct,fastLerp:Lt,fastMapToColor:ng,lerp:kt,mapToColor:og,modifyHSL:Pt,modifyAlpha:Ot,stringify:Nt}),rg=Array.prototype.slice,sg=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Et,this._setter=n||zt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};sg.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:Zt(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;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,o=0;for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var r=jt(this,t,function(){--o||n._doneCallback()},this._tracks[a],a,e);r&&(this._clipList.push(r),o++,this.animation&&this.animation.addClip(r),i=r)}if(i){var s=i.onframe;i.onframe=function(t,e){s(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return o||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var o=e[n];t&&o.onframe(this._target,1),i&&i.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var lg=1;"undefined"!=typeof window&&(lg=Math.max(window.devicePixelRatio||1,1));var hg=lg,ug=function(){},cg=function(){this.animators=[]};cg.prototype={constructor:cg,animate:function(t,e){var i,n=!1,o=this,a=this.__zr;if(t){var r=t.split("."),s=o;n="shape"===r[0];for(var l=0,h=r.length;l<h;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=o;if(i){var u=o.animators,c=new sg(i,e);return c.during(function(t){o.dirty(n)}).done(function(){u.splice(y(u,c),1)}),u.push(c),a&&a.animation.addAnimator(c),c}ug('Property "'+t+'" is not existed in element '+o.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,o,a){w(i)?(o=n,n=i,i=0):m(n)?(o=n,n="linear",i=0):m(i)?(o=i,i=0):m(e)?(o=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i);var r=this.animators.slice(),s=r.length;s||o&&o();for(var l=0;l<r.length;l++)r[l].done(function(){--s||o&&o()}).start(n,a)},_animateToShallow:function(t,e,i,n,o){var a={},r=0;for(var s in i)if(i.hasOwnProperty(s))if(null!=e[s])R(i[s])&&!N(i[s])?this._animateToShallow(t?t+"."+s:s,e[s],i[s],n,o):(a[s]=i[s],r++);else if(null!=i[s])if(t){var l={};l[t]={},l[t][s]=i[s],this.attr(l)}else this.attr(s,i[s]);return 0<r&&this.animate(t,!1).when(null==n?500:n,a).delay(o||0),this}};var dg=function(t){Up.call(this,t),Bp.call(this,t),cg.call(this,t),this.id=t.id||gp()};dg.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 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(R(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).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},o(dg,cg),o(dg,Up),o(dg,Bp);var fg,pg,gg,mg,vg=Q,yg=Math.min,xg=Math.max;Xt.prototype={constructor:Xt,union:function(t){var e=yg(t.x,this.x),i=yg(t.y,this.y);this.width=xg(t.x+t.width,this.x+this.width)-e,this.height=xg(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(fg=[],pg=[],gg=[],mg=[],function(t){if(t){fg[0]=gg[0]=this.x,fg[1]=mg[1]=this.y,pg[0]=mg[0]=this.x+this.width,pg[1]=gg[1]=this.y+this.height,vg(fg,fg,t),vg(pg,pg,t),vg(gg,gg,t),vg(mg,mg,t),this.x=yg(fg[0],pg[0],gg[0],mg[0]),this.y=yg(fg[1],pg[1],gg[1],mg[1]);var e=xg(fg[0],pg[0],gg[0],mg[0]),i=xg(fg[1],pg[1],gg[1],mg[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=t.width/this.width,i=t.height/this.height,n=rt();return ut(n,n,[-this.x,-this.y]),dt(n,n,[e,i]),ut(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof Xt||(t=Xt.create(t));var e=this.x,i=this.x+this.width,n=this.y,o=this.y+this.height,a=t.x,r=t.x+t.width,s=t.y,l=t.y+t.height;return!(i<a||r<e||o<s||l<n)},contain:function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new Xt(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}}},Xt.create=function(t){return new Xt(t.x,t.y,t.width,t.height)};var _g=function(t){for(var e in t=t||{},dg.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};_g.prototype={constructor:_g,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);0<=n&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof _g&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=y(n,t);return o<0||(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof _g&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof _g&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(e,o,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof _g&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof _g&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Xt(0,0,0,0),n=t||this._children,o=[],a=0;a<n.length;a++){var r=n[a];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(o);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},a(_g,dg);var wg=32,bg=7,Sg=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Sg.prototype={constructor:Sg,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,o=e.length;n<o;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,mp.canvasSupported&&Qt(i,te)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var o=n,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),o=(a=o).clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof _g&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(i=0;i<this._roots.length;i++){var e=this._roots[i];e instanceof _g&&e.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var i=0,n=t.length;i<n;i++)this.delRoot(t[i]);else{var o=y(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof _g&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:te};var Mg={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Ig=function(t,e,i){return Mg.hasOwnProperty(e)?i*=t.dpr:i},Tg=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Ag=function(t,e){this.extendFrom(t,!1),this.host=e};Ag.prototype={constructor:Ag,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;r<Tg.length;r++){var s=Tg[r],l=s[0];(a||n[l]!==o[l])&&(t[l]=Ig(t,l,n[l]||s[1]))}if((a||n.fill!==o.fill)&&(t.fillStyle=n.fill),(a||n.stroke!==o.stroke)&&(t.strokeStyle=n.stroke),(a||n.opacity!==o.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(a||n.blend!==o.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var h=n.lineWidth;t.lineWidth=h/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},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?function(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(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)})(t,e,i),o=e.colorStops,a=0;a<o.length;a++)n.addColorStop(o[a].offset,o[a].color);return n}};for(var Dg=Ag.prototype,Cg=0;Cg<Tg.length;Cg++){var Lg=Tg[Cg];Lg[0]in Dg||(Dg[Lg[0]]=Lg[1])}Ag.getGradient=Dg.getGradient;var kg=function(t,e){this.image=t,this.repeat=e,this.type="pattern"},Pg=function(t,e,i){var n;i=i||hg,"string"==typeof t?n=ie(t,e,i):R(t)&&(t=(n=t).id),this.id=t;var o=(this.dom=n).style;o&&(n.onselectstart=ee,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};Pg.prototype={constructor:Pg,__dirty:!0,__used:!(kg.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=ie("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,o=n.style,a=this.domBack;o.width=t+"px",o.height=e+"px",n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e,i=this.dom,n=this.ctx,o=i.width,a=i.height,r=this.clearColor,s=this.motionBlur&&!t,l=this.lastFrameAlpha,h=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,o/h,a/h)),n.clearRect(0,0,o,a),r)&&(r.colorStops?(e=r.__canvasGradient||Ag.getGradient(n,r,{x:0,y:0,width:o,height:a}),r.__canvasGradient=e):r.image&&(e=kg.prototype.getCanvasPattern.call(r,n)),n.save(),n.fillStyle=e||r,n.fillRect(0,0,o,a),n.restore());if(s){var u=this.domBack;n.save(),n.globalAlpha=l,n.drawImage(u,0,0,o,a),n.restore()}}};var Og="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Ng=new Jp(50),Eg={},zg=0,Rg=5e3,Bg=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Vg="12px sans-serif",Gg={measureText:function(t,e){var i=n();return i.font=e||Vg,i.measureText(t)}},Wg={left:1,right:1,center:1},Fg={top:1,bottom:1,middle:1},Hg=new Xt,Zg=function(){};Re.prototype={constructor:Re,type:"displayable",__dirty:!0,invisible:!(Zg.prototype={constructor:Zg,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&be(i);var n=i.text;if(null!=n&&(n+=""),ze(n,i)){t.save();var o=this.transform;i.transformText?this.setTransform(t):o&&(Hg.copy(e),Hg.applyTransform(o),e=Hg),Me(this,t,n,i,e),t.restore()}}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,inplace:!1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?dg.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Ag(t,this),this.dirty(!1),this}},a(Re,dg),o(Re,Zg),Be.prototype={constructor:Be,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var o=this._image=oe(n,this._image,this,this.onload);if(o&&re(o)){var a=i.x||0,r=i.y||0,s=i.width,l=i.height,h=o.width/o.height;if(null==s&&null!=l?s=l*h:null==l&&null!=s?l=s/h:null==s&&null==l&&(s=o.width,l=o.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(o,u,c,i.sWidth,i.sHeight,a,r,s,l)}else if(i.sx&&i.sy){var d=s-(u=i.sx),f=l-(c=i.sy);t.drawImage(o,u,c,d,f,a,r,s,l)}else t.drawImage(o,a,r,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Xt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},a(Be,Re);var Ug=new Xt(0,0,0,0),jg=new Xt(0,0,0,0),Xg=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=P({},i||{}),this.dpr=i.devicePixelRatio||hg,this._singleCanvas=n;var o=(this.root=t).style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a,r,s,l=this._zlevelList=[],h=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){null!=i.width&&(t.width=i.width),null!=i.height&&(t.height=i.height);var u=t.width,c=t.height;this._width=u,this._height=c;var d=new Pg(t,this,1);d.__builtin__=!0,d.initContext(),h[314159]=d,l.push(314159),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var f=this._domRoot=(a=this._width,r=this._height,(s=document.createElement("div")).style.cssText=["position:relative","overflow:hidden","width:"+a+"px","height:"+r+"px","padding:0","margin:0","border-width:0"].join(";")+";",s);t.appendChild(f)}this._hoverlayer=null,this._hoverElements=[]};Xg.prototype={constructor:Xg,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var o=i[n],a=this._layers[o];!a.__builtin__&&a.refresh&&a.refresh()}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape});((i.__from=t).__hoverMir=i).setStyle(e),this._hoverElements.push(i)}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=y(i,e);0<=n&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Qt(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(o,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var o=this;Og(function(){o._paintList(t,e,i)})}}},_compositeManually:function(){var e=this.getLayer(314159).ctx,i=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,i,n),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,i,n)})},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];(s=this._layers[o]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,r=0;r<i.length;r++){var s=i[r],l=s.ctx,h={};l.save();var u=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now();if(s.__startIndex===s.__endIndex)s.clear();else if(u===s.__startIndex){var f=t[u];f.incremental&&f.notClear&&!e||s.clear()}-1===u&&(console.error("For some unknown reason. drawIndex is -1"),u=s.__startIndex);for(var p=u;p<s.__endIndex;p++){var g=t[p];if(this._doPaintEl(g,s,e,h),g.__dirty=!1,c&&15<Date.now()-d)break}s.__drawIndex=p,s.__drawIndex<s.__endIndex&&(a=!1),h.prevElClipPaths&&l.restore(),l.restore()}return mp.wxa&&L(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,i,n){var o,a,r,s=e.ctx,l=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!l||l[0]||l[3])&&(!t.culling||(o=t,a=this._width,r=this._height,Ug.copy(o.getBoundingRect()),o.transform&&Ug.applyTransform(o.transform),jg.width=a,jg.height=r,Ug.intersect(jg)))){var h=t.__clipPaths;n.prevElClipPaths&&!function(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}(h,n.prevElClipPaths)||(n.prevElClipPaths&&(e.ctx.restore(),n.prevElClipPaths=null,n.prevEl=null),h&&(s.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(h,s),n.prevElClipPaths=h)),t.beforeBrush&&t.beforeBrush(s),t.brush(s,n.prevEl||null),(n.prevEl=t).afterBrush&&t.afterBrush(s)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var i=this._layers[t];return i||((i=new Pg("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&g(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i,n=this._layers,o=this._zlevelList,a=o.length,r=null,s=-1,l=this._domRoot;if(n[t])ug("ZLevel "+t+" has been used already");else if((i=e)&&(i.__builtin__||"function"==typeof i.resize&&"function"==typeof i.refresh)){if(0<a&&t>o[0]){for(s=0;s<a-1&&!(o[s]<t&&o[s+1]>t);s++);r=n[o[s]]}if(o.splice(s+1,0,t),!(n[t]=e).virtual)if(r){var h=r.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom)}else ug("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n<o.length;n++)i=o[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(o=1;o<t.length;o++)if((r=t[o]).zlevel!==t[o-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}for(var i=null,n=0,o=0;o<t.length;o++){var a,r=t[o],s=r.zlevel;r.incremental?((a=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,n=1):a=this.getLayer(s+(0<n?.01:0),this._needsManuallyCompositing),a.__builtin__||ug("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==o&&(a.__dirty=!0),a.__startIndex=o,a.incremental?a.__drawIndex=-1:a.__drawIndex=o,e(o),i=a),r.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},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]?g(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];o!==t&&o!==t+.01||g(this._layers[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(y(i,t),1))},resize:function(e,i){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=i&&(n.height=i),e=this._getSize(0),i=this._getSize(1),t.style.display="",this._width!=e||i!=this._height){for(var o in t.style.width=e+"px",t.style.height=i+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,i);L(this._progressiveLayers,function(t){t.resize(e,i)}),this.refresh(!0)}this._width=e,this._height=i}else{if(null==e||null==i)return;this._width=e,this._height=i,this.getLayer(314159).resize(e,i)}return 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){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new Pg("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clearColor=t.backgroundColor,e.clear(),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||Ve(s[i])||Ve(r.style[i]))-(Ve(s[o])||0)-(Ve(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,h=a.hasStroke()?a.lineWidth:0,u=Math.max(h/2,-s+r),c=Math.max(h/2,s+r),d=Math.max(h/2,-l+r),f=Math.max(h/2,l+r),p=o.width+u+c,g=o.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-o.x,d-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new Be({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var Yg="undefined"!=typeof window&&!!window.addEventListener,qg=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$g=Yg?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},Kg=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Bp.call(this)};Kg.prototype={constructor:Kg,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=y(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,o=[],a=[],r=0;r<n;r++){var s=i[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<n;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;for(n=o.length,r=0;r<n;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,Og(function t(){e._running&&(Og(t),!e._paused&&e._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},animate:function(t,e){var i=new sg(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},o(Kg,Bp);var Jg=function(){this._track=[]};Jg.prototype={constructor:Jg,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;a<r;a++){var s=n[a],l=Ge(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Qg)if(Qg.hasOwnProperty(e)){var i=Qg[e](this._track,t);if(i)return i}}};var Qg={pinch:function(t,e){var i,n=t.length;if(n){var o=(t[n-1]||{}).points,a=(t[n-2]||{}).points||o;if(a&&1<a.length&&o&&1<o.length){var r=Ue(o)/Ue(a);!isFinite(r)&&(r=1),e.pinchScale=r;var s=[((i=o)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},tm=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],em=["touchstart","touchend","touchmove"],im={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},nm=k(tm,function(t){var e=t.replace("mouse","pointer");return im[e]?e:t}),om={mousemove:function(t){t=Fe(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Fe(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=Fe(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Xe(this,t,"start"),om.mousemove.call(this,t),om.mousedown.call(this,t),Ye(this)},touchmove:function(t){(t=Fe(this.dom,t)).zrByTouch=!0,Xe(this,t,"change"),om.mousemove.call(this,t),Ye(this)},touchend:function(t){(t=Fe(this.dom,t)).zrByTouch=!0,Xe(this,t,"end"),om.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&om.click.call(this,t),Ye(this)},pointerdown:function(t){om.mousedown.call(this,t)},pointermove:function(t){qe(t)||om.mousemove.call(this,t)},pointerup:function(t){om.mouseup.call(this,t)},pointerout:function(t){qe(t)||om.mouseout.call(this,t)}};L(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){om[e]=function(t){t=Fe(this.dom,t),this.trigger(e,t)}});var am=$e.prototype;am.dispose=function(){for(var t=tm.concat(em),e=0;e<t.length;e++){var i=t[e];n=this.dom,o=je(i),a=this._handlers[i],Yg?n.removeEventListener(o,a):n.detachEvent("on"+o,a)}var n,o,a},am.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},o($e,Bp);var rm=!mp.canvasSupported,sm={canvas:Xg},lm={},hm=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,o=new Sg,a=i.renderer;if(rm){if(!sm.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&sm[a]||(a="canvas");var r=new sm[a](e,o,i,t);this.storage=o,this.painter=r;var s=mp.node||mp.worker?null:new $e(r.getViewportRoot());this.handler=new Wp(o,r,s,r.root),this.animation=new Kg({stage:{update:_(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=o.delFromStorage,h=o.addToStorage;o.delFromStorage=function(t){l.call(o,t),t&&t.removeSelfFromZr(n)},o.addToStorage=function(t){h.call(o,t),t.addSelfToZr(n)}};hm.prototype={constructor:hm,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer(t,e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){this._needsRefresh&&this.refreshImmediately(),this._needsRefreshHover&&this.refreshHoverImmediately()},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete lm[t]}};var um=(Object.freeze||Object)({version:"4.0.1",init:Ke,dispose:function(t){if(t)t.dispose();else{for(var e in lm)lm.hasOwnProperty(e)&&lm[e].dispose();lm={}}return this},getInstance:function(t){return lm[t]},registerPainter:Je}),cm=L,dm=R,fm=O,pm="\0-",gm=["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"],mm=0,vm=".",ym="___EC__COMPONENT__CONTAINER___",xm=0,_m=function(s){for(var t=0;t<s.length;t++)s[t][1]||(s[t][1]=s[t][0]);return function(t,e,i){for(var n={},o=0;o<s.length;o++){var a=s[o][1];if(!(e&&0<=y(e,a)||i&&y(i,a)<0)){var r=t.getShallow(a);null!=r&&(n[s[o][0]]=r)}}return n}},wm=_m([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),bm={getLineStyle:function(t){var e=wm(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]}},Sm=_m([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Mm={getAreaStyle:function(t,e){return Sm(this,t,e)}},Im=Math.pow,Tm=Math.sqrt,Am=1e-8,Dm=1e-4,Cm=Tm(3),Lm=1/3,km=T(),Pm=T(),Om=T(),Nm=Math.min,Em=Math.max,zm=Math.sin,Rm=Math.cos,Bm=2*Math.PI,Vm=T(),Gm=T(),Wm=T(),Fm=[],Hm=[],Zm={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Um=[],jm=[],Xm=[],Ym=[],qm=Math.min,$m=Math.max,Km=Math.cos,Jm=Math.sin,Qm=Math.sqrt,tv=Math.abs,ev="undefined"!=typeof Float32Array,iv=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};iv.prototype={constructor:iv,_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=tv(1/hg/t)||0,this._uy=tv(1/hg/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=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(Zm.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=tv(t-this._xi)>this._ux||tv(e-this._yi)>this._uy||this._len<5;return this.addData(Zm.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(Zm.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(Zm.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(Zm.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=Km(o)*i+t,this._yi=Jm(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(Zm.R,t,e,i,n),this},closePath:function(){this.addData(Zm.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;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!ev||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;o<e;o++)i+=t[o].len();for(ev&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i)),o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[n++]=a[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,h=this._yi,u=t-l,c=e-h,d=Qm(u*u+c*c),f=l,p=h,g=r.length;for(a<0&&(a=o+a),f-=(a%=o)*(u/=d),p-=a*(c/=d);0<u&&f<=t||u<0&&t<=f||0==u&&(0<c&&p<=e||c<0&&e<=p);)f+=u*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,0<u&&f<l||u<0&&l<f||0<c&&p<h||c<0&&h<p||s[n%2?"moveTo":"lineTo"](0<=u?qm(f,t):$m(f,t),0<=c?qm(p,e):$m(p,e));u=f-t,c=p-e,this._dashOffset=-Qm(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,p=this._ctx,g=this._xi,m=this._yi,v=yi,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=Qm(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(r=(w-d)/y;r<=1;)h=v(g,t,i,o,r),u=v(m,e,n,a,r),x%2?p.moveTo(h,u):p.lineTo(h,u),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),s=o-h,l=a-u,this._dashOffset=-Qm(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,ev&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Um[0]=Um[1]=Xm[0]=Xm[1]=Number.MAX_VALUE,jm[0]=jm[1]=Ym[0]=Ym[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;a<t.length;){var r=t[a++];switch(1==a&&(n=e=t[a],o=i=t[a+1]),r){case Zm.M:e=n=t[a++],i=o=t[a++],Xm[0]=n,Xm[1]=o,Ym[0]=n,Ym[1]=o;break;case Zm.L:Ai(e,i,t[a],t[a+1],Xm,Ym),e=t[a++],i=t[a++];break;case Zm.C:Di(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Xm,Ym),e=t[a++],i=t[a++];break;case Zm.Q:p=e,g=i,m=t[a++],v=t[a++],y=t[a],x=t[a+1],_=Xm,w=Ym,S=b=void 0,S=bi,M=Em(Nm((b=Mi)(p,m,y),1),0),I=Em(Nm(b(g,v,x),1),0),T=S(p,m,y,M),A=S(g,v,x,I),_[0]=Nm(p,y,T),_[1]=Nm(g,x,A),w[0]=Em(p,y,T),w[1]=Em(g,x,A),e=t[a++],i=t[a++];break;case Zm.A:var s=t[a++],l=t[a++],h=t[a++],u=t[a++],c=t[a++],d=t[a++]+c,f=(t[a++],1-t[a++]);1==a&&(n=Km(c)*h+s,o=Jm(c)*u+l),Ci(s,l,h,u,c,d,f,Xm,Ym),e=Km(d)*h+s,i=Jm(d)*u+l;break;case Zm.R:Ai(n=e=t[a++],o=i=t[a++],n+t[a++],o+t[a++],Xm,Ym);break;case Zm.Z:e=n,i=o}tt(Um,Um,Xm),et(jm,jm,Ym)}var p,g,m,v,y,x,_,w,b,S,M,I,T,A;return 0===a&&(Um[0]=Um[1]=jm[0]=jm[1]=0),new Xt(Um[0],Um[1],jm[0]-Um[0],jm[1]-Um[1])},rebuildPath:function(t){for(var e,i,n,o,a,r,s=this.data,l=this._ux,h=this._uy,u=this._len,c=0;c<u;){var d=s[c++];switch(1==c&&(e=n=s[c],i=o=s[c+1]),d){case Zm.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case Zm.L:a=s[c++],r=s[c++],(tv(a-n)>l||tv(r-o)>h||c===u-1)&&(t.lineTo(a,r),n=a,o=r);break;case Zm.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 Zm.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case Zm.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<g?g:m,b=m<g?1:g/m,S=m<g?m/g:1,M=v+y;.001<Math.abs(g-m)?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1==c&&(e=Km(v)*g+f,i=Jm(v)*m+p),n=Km(M)*g+f,o=Jm(M)*m+p;break;case Zm.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Zm.Z:t.closePath(),n=e,o=i}}}},iv.CMD=Zm;var nv=2*Math.PI,ov=2*Math.PI,av=iv.CMD,rv=2*Math.PI,sv=1e-4,lv=[-1,-1,-1],hv=[-1,-1],uv=kg.prototype.getCanvasPattern,cv=Math.abs,dv=new iv(!0);Gi.prototype={constructor:Gi,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i,n=this.style,o=this.path||dv,a=n.hasStroke(),r=n.hasFill(),s=n.fill,l=n.stroke,h=r&&!!s.colorStops,u=a&&!!l.colorStops,c=r&&!!s.image,d=a&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(h&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));h?t.fillStyle=this._fillGradient:c&&(t.fillStyle=uv.call(s,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=uv.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();o.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&a?(o.beginPath(t),f&&!g&&(o.setLineDash(f),o.setLineDashOffset(p)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r&&o.fill(t),f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a&&o.stroke(t),f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new iv},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new iv),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)),1e-10<r&&(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(1e-10<s&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),Vi(a,r/s,!0,t,e)))return!0}if(o.hasFill())return Vi(a,0,!1,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):Re.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(R(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&&1e-10<cv(t[0]-1)&&1e-10<cv(t[3]-1)?Math.sqrt(cv(t[0]*t[3]-t[2]*t[1])):1}},Gi.extend=function(o){var t=function(t){Gi.call(this,t),o.style&&this.style.extendFrom(o.style,!1);var e=o.shape;if(e){this.shape=this.shape||{};var i=this.shape;for(var n in e)!i.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(i[n]=e[n])}o.init&&o.init.call(this,t)};for(var e in a(t,Gi),o)"style"!==e&&"shape"!==e&&(t.prototype[e]=o[e]);return t},a(Gi,Re);var fv=iv.CMD,pv=[[],[],[]],gv=Math.sqrt,mv=Math.atan2,vv=function(t,e){var i,n,o,a,r,s,l=t.data,h=fv.M,u=fv.C,c=fv.L,d=fv.R,f=fv.A,p=fv.Q;for(a=o=0;o<l.length;){switch(i=l[o++],a=o,n=0,i){case h:case c:n=1;break;case u:n=3;break;case p:n=2;break;case f:var g=e[4],m=e[5],v=gv(e[0]*e[0]+e[1]*e[1]),y=gv(e[2]*e[2]+e[3]*e[3]),x=mv(-e[1]/y,e[0]/v);l[o]*=v,l[o++]+=g,l[o]*=y,l[o++]+=m,l[o++]*=v,l[o++]*=y,l[o++]+=x,l[o++]+=x,a=o+=2;break;case d:s[0]=l[o++],s[1]=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1],s[0]+=l[o++],s[1]+=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1]}for(r=0;r<n;r++)(s=pv[r])[0]=l[o++],s[1]=l[o++],Q(s,s,e),l[a++]=s[0],l[a++]=s[1]}},yv=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],xv=Math.sqrt,_v=Math.sin,wv=Math.cos,bv=Math.PI,Sv=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Mv=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Sv(t)*Sv(e))},Iv=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Mv(t,e))},Tv=function(t){Re.call(this,t)};Tv.prototype={constructor:Tv,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&be(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),i.bind(t,this,e),ze(n,i)&&(this.setTransform(t),Me(this,t,n,i),this.restoreTransform(t))},getBoundingRect:function(){var t=this.style;if(this.__dirty&&be(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=le(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,Pe(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},a(Tv,Re);var Av=Gi.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),Dv=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Cv=function(l){return mp.browser.ie&&11<=mp.browser.version?function(){var t,e=this.__clipPaths,i=this.style;if(e)for(var n=0;n<e.length;n++){var o=e[n],a=o&&o.shape,r=o&&o.type;if(a&&("sector"===r&&a.startAngle===a.endAngle||"rect"===r&&(!a.width||!a.height))){for(s=0;s<Dv.length;s++)Dv[s][2]=i[Dv[s][0]],i[Dv[s][0]]=Dv[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(var s=0;s<Dv.length;s++)i[Dv[s][0]]=Dv[s][2]}:l},Lv=Gi.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Cv(Gi.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(r),u=Math.sin(r);t.moveTo(h*o+i,u*o+n),t.lineTo(h*a+i,u*a+n),t.arc(i,n,a,r,s,!l),t.lineTo(Math.cos(s)*o+i,Math.sin(s)*o+n),0!==o&&t.arc(i,n,o,s,r,l),t.closePath()}}),kv=Gi.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,o,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,o,!0)}}),Pv=Gi.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Zi(t,e,!0)}}),Ov=Gi.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Zi(t,e,!1)}}),Nv=Gi.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width,a=e.height;e.r?we(t,e):t.rect(i,n,o,a),t.closePath()}}),Ev=Gi.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,a=e.y2,r=e.percent;0!==r&&(t.moveTo(i,n),r<1&&(o=i*(1-r)+o*r,a=n*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),zv=[],Rv=Gi.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(u<1&&(Ii(i,r,o,u,zv),r=zv[1],o=zv[2],Ii(n,s,a,u,zv),s=zv[1],a=zv[2]),t.quadraticCurveTo(r,s,o,a)):(u<1&&(wi(i,r,l,o,u,zv),r=zv[1],l=zv[2],o=zv[3],wi(n,s,h,a,u,zv),s=zv[1],h=zv[2],a=zv[3]),t.bezierCurveTo(r,s,l,h,o,a)))},pointAt:function(t){return Ui(this.shape,t,!1)},tangentAt:function(t){var e=Ui(this.shape,t,!0);return q(e,e)}}),Bv=Gi.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*o+i,h*o+n),t.arc(i,n,o,a,r,!s)}}),Vv=Gi.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Gi.prototype.getBoundingRect.call(this)}}),Gv=function(t){this.colorStops=t||[]};Gv.prototype={constructor:Gv,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Wv=function(t,e,i,n,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,Gv.call(this,o)};Wv.prototype={constructor:Wv},a(Wv,Gv);var Fv=function(t,e,i,n,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=o||!1,Gv.call(this,n)};Fv.prototype={constructor:Fv},a(Fv,Gv),ji.prototype.incremental=!0,ji.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},ji.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},ji.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},ji.prototype.eachPendingDisplayable=function(t){for(e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},ji.prototype.update=function(){for(this.updateTransform(),t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},ji.prototype.brush=function(t,e){for(i=this._cursor;i<this._displayables.length;i++)(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t);this._cursor=i;for(var i=0;i<this._temporaryDisplayables.length;i++){var n=this._temporaryDisplayables[i];n.beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Hv=[];ji.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Xt(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(Hv)),t.union(n)}this._rect=t}return this._rect},ji.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++)if(this._displayables[n].contain(t,e))return!0;return!1},a(ji,Re);var Zv=Math.round,Uv=Math.max,jv=Math.min,Xv={},Yv=function(t,e){for(var i=[],n=t.length,o=0;o<n;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var r=new Gi(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r},qv=(Object.freeze||Object)({extendShape:Xi,extendPath:function(t,e){return Gi.extend(Fi(t,e))},makePath:Yi,makeImage:qi,mergePath:Yv,resizePath:Ki,subPixelOptimizeLine:Ji,subPixelOptimizeRect:Qi,subPixelOptimize:tn,setHoverStyle:pn,setLabelStyle:gn,setTextStyle:mn,setText:function(t,e,i){var n,o={isRectText:!0};!1===i?n=!0:o.autoColor=i,vn(t,e,o,n),t.host&&t.host.dirty&&t.host.dirty(!1)},getFont:wn,updateProps:Sn,initProps:Mn,getTransform:In,applyTransform:Tn,transformDirection:An,groupTransition:Dn,clipPointsByRect:Cn,clipRectByRect:function(t,e){var i=Uv(t.x,e.x),n=jv(t.x+t.width,e.x+e.width),o=Uv(t.y,e.y),a=jv(t.y+t.height,e.y+e.height);if(i<=n&&o<=a)return{x:i,y:o,width:n-i,height:a-o}},createIcon:Ln,Group:_g,Image:Be,Text:Tv,Circle:Av,Sector:Lv,Ring:kv,Polygon:Pv,Polyline:Ov,Rect:Nv,Line:Ev,BezierCurve:Rv,Arc:Bv,IncrementalDisplayable:ji,CompoundPath:Vv,LinearGradient:Wv,RadialGradient:Fv,BoundingRect:Xt}),$v=["textStyle","color"],Kv={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get($v):null)},getFont:function(){return wn({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return le(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},Jv=_m([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Qv={getItemStyle:function(t,e){var i=Jv(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]}},ty=o,ey=ri();kn.prototype={constructor:kn,init:null,mergeOption:function(t){g(this.option,t,!0)},get:function(t,e){return null==t?this.option:Pn(this.option,this.parsePath(t),!e&&On(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&On(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i;return new kn(null==t?this.option:Pn(this.option,t=this.parsePath(t)),e=e||(i=On(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(D(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){ey(this).getParent=t},isAnimationEnabled:function(){if(!mp.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ci(kn),di(kn),ty(kn,bm),ty(kn,Mm),ty(kn,Kv),ty(kn,Qv);var iy,ny,oy=0,ay=1e-4,ry=9007199254740991,sy=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,ly=(Object.freeze||Object)({linearMap:En,parsePercent:zn,round:Rn,asc:Bn,getPrecision:Vn,getPrecisionSafe:Gn,getPixelPrecision:Wn,getPercentWithPrecision:Fn,MAX_SAFE_INTEGER:ry,remRadian:Hn,isRadianAroundZero:Zn,parseDate:Un,quantity:jn,nice:Yn,reformIntervals:qn,isNumeric:$n}),hy=l,uy=["a","b","c","d","e","f","g"],cy=function(t,e){return"{"+t+(null==e?"":e)+"}"},dy=function(t){return t<10?"0"+t:t},fy=de,py=le,gy=(Object.freeze||Object)({addCommas:Kn,toCamelCase:Jn,normalizeCssArray:hy,encodeHTML:Qn,formatTpl:to,formatTplSimple:eo,getTooltipMarker:io,formatTime:no,capitalFirst:oo,truncateText:fy,getTextRect:py}),my=L,vy=["left","right","top","bottom","width","height"],yy=[["width","left","right"],["height","top","bottom"]],xy=ao,_y=(z(ao,"vertical"),z(ao,"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")}}}),wy=ri(),by=kn.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){kn.call(this,t,e,i,n),this.uid=Nn("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?ho(t):{};g(t,e.getTheme().get(this.mainType)),g(t,this.getDefaultOption()),i&&lo(t,n,i)},mergeOption:function(t,e){g(this.option,t,!0);var i=this.layoutMode;i&&lo(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=wy(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},a=e.length-1;0<=a;a--)o=g(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});gi(by,{registerWhenExtend:!0}),ny={},(iy=by).registerSubTypeDefaulter=function(t,e){t=ui(t),ny[t.main]=e},iy.determineSubType=function(t,e){var i=e.type;if(!i){var n=ui(t).main;iy.hasSubTypes(t)&&ny[n]&&(i=ny[n](e))}return i},function(t,e){function d(l){var h={},u=[];return L(l,function(i){var t,e,n,o,a,r=c(h,i),s=(t=r.originalDeps=(o=i,a=[],L(by.getClassesByMainType(o),function(t){a=a.concat(t.prototype.dependencies||[])}),a=k(a,function(t){return ui(t).main}),"dataset"!==o&&y(a,"dataset")<=0&&a.unshift("dataset"),a),e=l,n=[],L(t,function(t){0<=y(e,t)&&n.push(t)}),n);r.entryCount=s.length,0===r.entryCount&&u.push(i),L(s,function(t){y(r.predecessor,t)<0&&r.predecessor.push(t);var e=c(h,t);y(e.successor,t)<0&&e.successor.push(i)})}),{graph:h,noEntryList:u}}function c(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}by.topologicalTravel=function(t,e,i,n){function o(t){r[t].entryCount--,0===r[t].entryCount&&s.push(t)}if(t.length){var a=d(e),r=a.graph,s=a.noEntryList,l={};for(L(t,function(t){l[t]=!0});s.length;){var h=s.pop(),u=r[h],c=!!l[h];c&&(i.call(n,h,u.originalDeps.slice()),delete l[h]),L(u.successor,c?function(t){l[t]=!0,o(t)}:o)}L(l,function(){throw new Error("Circle dependency may exists")})}}}(),o(by,_y);var Sy="";"undefined"!=typeof navigator&&(Sy=navigator.platform||"");var My={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Sy.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},Iy=ri(),Ty={clearColorPalette:function(){Iy(this).colorIdx=0,Iy(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=Iy(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Qe(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var h=l[o];return t&&(a[t]=h),n.colorIdx=(o+1)%l.length,h}}},Ay={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),fo(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),fo(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),fo(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),fo(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),fo(r)&&(n.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,o,a,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=o.coordSysDims=e.dimensions.slice();L(e.parallelAxisIndex,function(t,e){var i=s.getComponent("parallelAxis",t),n=l[e];a.set(n,i),fo(i)&&null==o.firstCategoryDimIndex&&(r.set(n,i),o.firstCategoryDimIndex=e)})}},Dy="original",Cy="arrayRows",Ly="objectRows",ky="keyedColumns",Py="unknown",Oy="typedArray",Ny="column",Ey="row";po.seriesDataToSource=function(t){return new po({data:t,sourceFormat:v(t)?Oy:Dy,fromDataset:!1})},di(po);var zy=ri(),Ry="\0_ec_inner",By=kn.extend({constructor:By,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new kn(i),this._optionManager=n},setOption:function(t,e){c(!(Ry 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)):xo.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&&L(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(n){var l=this.option,h=this._componentsMap,i=[];zy(this).datasetMap=C(),L(n,function(t,e){null!=t&&(by.hasClass(e)?e&&i.push(e):l[e]=null==l[e]?D(t):g(l[e],t,!0))}),by.topologicalTravel(i,by.getAllClassMainTypes(),function(r,t){var e=Qe(n[r]),i=ii(h.get(r),e);ni(i),L(i,function(t,e){var i,n,o,a=t.option;R(a)&&(t.keyInfo.mainType=r,t.keyInfo.subType=(i=r,n=a,o=t.exist,n.type?n.type:o?o.subType:by.determineSubType(i,n)))});var s=function(e,t){O(t)||(t=t?[t]:[]);var i={};return L(t,function(t){i[t]=(e.get(t)||[]).slice()}),i}(h,t);l[r]=[],h.set(r,[]),L(i,function(t,e){var i=t.exist,n=t.option;if(c(R(n)||i,"Empty component definition"),n){var o=by.getClass(r,t.keyInfo.subType,!0);if(i&&i instanceof o)i.name=t.keyInfo.name,i.mergeOption(n,this),i.optionUpdated(n,!1);else{var a=P({dependentModels:s,componentIndex:e},t.keyInfo);P(i=new o(n,this,this,a),a),i.init(n,this,this,a),i.optionUpdated(null,!0)}}else i.mergeOption({},this),i.optionUpdated({},!1);h.get(r)[e]=i,l[r][e]=i.option},this),"series"===r&&_o(this,h.get("series"))},this),this._seriesIndicesMap=C(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var n=D(this.option);return L(n,function(t,e){if(by.hasClass(e)){for(var i=(t=Qe(t)).length-1;0<=i;i--)oi(t[i])&&t.splice(i,1);n[e]=t}}),delete n[Ry],n},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,n=t.index,o=t.id,a=t.name,r=this._componentsMap.get(e);if(!r||!r.length)return[];if(null!=n)O(n)||(n=[n]),i=I(k(n,function(t){return r[t]}),function(t){return!!t});else if(null!=o){var s=O(o);i=I(r,function(t){return s&&0<=y(o,t.id)||!s&&t.id===o})}else if(null!=a){var l=O(a);i=I(r,function(t){return l&&0<=y(a,t.name)||!l&&t.name===a})}else i=r.slice();return wo(i,t)},findComponents:function(t){var e,i,n,o,a,r=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",o=s+"Name",!(e=r)||null==e[i]&&null==e[n]&&null==e[o]?null:{mainType:s,index:e[i],id:e[n],name:e[o]});return a=wo(l?this.queryComponents(l):this._componentsMap.get(s),t),t.filter?I(a,t.filter):a},eachComponent:function(t,n,o){var e=this._componentsMap;"function"==typeof t?(o=n,n=t,e.each(function(t,i){L(t,function(t,e){n.call(o,i,t,e)})})):w(t)?L(e.get(t),n,o):R(t)&&L(this.findComponents(t),n,o)},getSeriesByName:function(e){return I(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return I(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(i,n){L(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];i.call(n,e,t)},this)},eachRawSeries:function(t,e){L(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(i,n,o){L(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===i&&n.call(o,e,t)},this)},eachRawSeriesByType:function(t,e,i){return L(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){_o(this,I(this._componentsMap.get("series"),t,e))},restoreData:function(i){var n=this._componentsMap;_o(this,n.get("series"));var o=[];n.each(function(t,e){o.push(e)}),by.topologicalTravel(o,by.getAllClassMainTypes(),function(e,t){L(n.get(e),function(t){("series"!==e||!function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,o=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=o&&t.name!==o}}(t,i))&&t.restoreData()})})}});o(By,Ty);var Vy=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],Gy={};So.prototype={constructor:So,create:function(n,o){var a=[];L(Gy,function(t,e){var i=t.create(n,o);a=a.concat(i||[])}),this._coordinateSystems=a},update:function(e,i){L(this._coordinateSystems,function(t){t.update&&t.update(e,i)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},So.register=function(t,e){Gy[t]=e},So.get=function(t){return Gy[t]};var Wy=L,Fy=D,Hy=k,Zy=g,Uy=/^(min|max)?(.+)$/;Mo.prototype={constructor:Mo,setOption:function(t,e){t&&L(Qe(t.series),function(t){t&&t.data&&v(t.data)&&d(t.data)}),t=Fy(t,!0);var o,i,n=this._optionBackup,a=function(t,i,n){var e,o,a=[],r=[],s=t.timeline;if(t.baseOption&&(o=t.baseOption),(s||t.options)&&(o=o||{},a=(t.options||[]).slice()),t.media){o=o||{};var l=t.media;Wy(l,function(t){t&&t.option&&(t.query?r.push(t):e||(e=t))})}return o||(o=t),o.timeline||(o.timeline=s),Wy([o].concat(a).concat(k(r,function(t){return t.option})),function(e){Wy(i,function(t){t(e,n)})}),{baseOption:o,timelineOptions:a,mediaDefault:e,mediaList:r}}.call(this,t,e,!n);this._newBaseOption=a.baseOption,n?(o=n.baseOption,i=a.baseOption,Wy(i=i||{},function(t,e){if(null!=t){var i=o[e];if(by.hasClass(e)){t=Qe(t);var n=ii(i=Qe(i),t);o[e]=Hy(n,function(t){return t.option&&t.exist?Zy(t.exist,t.option,!0):t.exist||t.option})}else o[e]=Zy(i,t,!0)}}),a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Hy(e.timelineOptions,Fy),this._mediaList=Hy(e.mediaList,Fy),this._mediaDefault=Fy(e.mediaDefault),this._currentMediaIndices=[],Fy(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=Fy(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),o=this._api.getHeight(),a=this._mediaList,r=this._mediaDefault,s=[],l=[];if(!a.length&&!r)return l;for(var h=0,u=a.length;h<u;h++)Io(a[h].query,n,o)&&s.push(h);return!s.length&&r&&(s=[-1]),s.length&&(e=s,i=this._currentMediaIndices,!(e.join(",")===i.join(",")))&&(l=Hy(s,function(t){return Fy(-1===t?r.option:a[t].option)})),this._currentMediaIndices=s,l}};var jy=L,Xy=R,Yy=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],qy=function(e,t){jy(ko(e.series),function(t){Xy(t)&&function(t){if(Xy(t)){To(t),Do(t),Co(t.label),Co(t.upperLabel),Co(t.edgeLabel),t.emphasis&&(Co(t.emphasis.label),Co(t.emphasis.upperLabel),Co(t.emphasis.edgeLabel));var e=t.markPoint;e&&(To(e),Lo(e));var i=t.markLine;i&&(To(i),Lo(i));var n=t.markArea;n&&Lo(n);var o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!v(a))for(s=0;s<a.length;s++)Lo(a[s]);L(t.categories,function(t){Do(t)})}if(o&&!v(o))for(s=0;s<o.length;s++)Lo(o[s]);if((e=t.markPoint)&&e.data)for(var r=e.data,s=0;s<r.length;s++)Lo(r[s]);if((i=t.markLine)&&i.data){var l=i.data;for(s=0;s<l.length;s++)O(l[s])?(Lo(l[s][0]),Lo(l[s][1])):Lo(l[s])}"gauge"===t.type?(Co(t),Co(t),Co(t)):"treemap"===t.type&&(Ao(t.breadcrumb,"itemStyle"),L(t.levels,function(t){Do(t)}))}}(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),jy(i,function(t){jy(ko(e[t]),function(t){t&&(Co(t),Co(t.axisPointer))})}),jy(ko(e.parallel),function(t){var e=t&&t.parallelAxisDefault;Co(e),Co(e&&e.axisPointer)}),jy(ko(e.calendar),function(t){Ao(t,"itemStyle"),Co(t),Co(t),Co(t)}),jy(ko(e.radar),function(t){Co(t)}),jy(ko(e.geo),function(t){Xy(t)&&(Lo(t),jy(ko(t.regions),function(t){Lo(t)}))}),jy(ko(e.timeline),function(t){Lo(t),Ao(t,"label"),Ao(t,"itemStyle"),Ao(t,"controlStyle",!0),Ao(t,"checkpointStyle");var e=t.data;O(e)&&L(e,function(t){R(t)&&(Ao(t,"label"),Ao(t,"itemStyle"))})}),jy(ko(e.toolbox),function(t){Ao(t,"iconStyle"),jy(t.feature,function(t){Ao(t,"iconStyle")})}),Co(Po(e.axisPointer)),Co(Po(e.tooltip).axisPointer)},$y=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Ky=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Jy=function(i,t){qy(i,t),i.series=Qe(i.series),L(i.series,function(t){if(R(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var o,a=t,r=0;r<e.length-1;r++)null==a[o=e[r]]&&(a[o]={}),a=a[o];(n||null==a[e[r]])&&(a[e[r]]=i)}(t,"itemStyle.normal.color",i)}Oo(t)}}),i.dataRange&&(i.visualMap=i.dataRange),L(Ky,function(t){var e=i[t];e&&(O(e)||(e=[e]),L(e,function(t){Oo(t)}))})},Qy=No.prototype;Qy.pure=!1;var tx={arrayRows_column:{pure:Qy.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Ro},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var o=i[n];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Eo,getItem:zo,appendData:Ro},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var o=this._data[i[n].name];e.push(o?o[t]:null)}return e},appendData:function(t){var o=this._data;L(t,function(t,e){for(var i=o[e]||(o[e]=[]),n=0;n<(t||[]).length;n++)i.push(t[n])})}},original:{count:Eo,getItem:zo,appendData:Ro},typedArray:{persistent:!(Qy.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t){t-=this._offset;for(var e=[],i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},ex={arrayRows:Bo,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Bo,original:function(t,e,i,n){var o=ei(t);return null!=i&&o instanceof Array?o[i]:o},typedArray:Bo},ix={arrayRows:Vo,objectRows:function(t,e,i,n){return Go(t[e],this._dimensionInfos[e])},keyedColumns:Vo,original:function(t,e,i,n){var o,a=t&&(null==t.value?t:t.value);return!this._rawData.pure&&(dm(o=t)&&!(o instanceof Array))&&(this.hasItemOption=!0),Go(a instanceof Array?a[n]:a,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},nx=/\{@(.+?)\}/g,ox={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:io(s),$vars:["seriesName","name","value"]}},getFormattedLabel:function(n,t,e,i,o){t=t||"normal";var a=this.getData(e),r=a.getItemModel(n),s=this.getDataParams(n,e);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=r.get("normal"===t?[o||"label","formatter"]:[t,o||"label","formatter"]);return"function"==typeof l?(s.status=t,l(s)):"string"==typeof l?to(l,s).replace(nx,function(t,e){var i=e.length;return"["===e.charAt(0)&&"]"===e.charAt(i-1)&&(e=+e.slice(1,i-1)),Wo(a,n,e)}):void 0},getRawValue:function(t,e){return Wo(this.getData(e),t)},formatTooltip:function(){}},ax=Zo.prototype;ax.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(e=this._plan(this.context)),(this._dirty||"reset"===e)&&(this._dirty=!1,function(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,t._progress=!e&&t._reset&&t._reset(t.context);var i=t._downstream;i&&i.dirty()}(this,n));var a=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var r=this._dueIndex,s=Math.min(null!=a?this._dueIndex+a:1/0,this._dueEnd);!n&&r<s&&this._progress({start:r,end:s},this.context),this._dueIndex=s;var l=null!=this._settedOutputEnd?this._settedOutputEnd:s;this._outputDueEnd=l}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},ax.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},ax.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},ax.pipe=function(t){(this._downstream!==t||this._dirty)&&((this._downstream=t)._upstream=this,t.dirty())},ax.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},ax.getUpstream=function(){return this._upstream},ax.getDownstream=function(){return this._downstream},ax.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var rx=ri(),sx=by.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Ho({count:jo,reset:Xo}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),go(this);var o=this.getInitialData(t,i);qo(o,this),this.dataTask.context.data=o,rx(this).dataBeforeProcessed=o,Uo(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?ho(t):{},o=this.subType;by.hasClass(o)&&(o+="Series"),g(t,e.getTheme().get(this.subType)),g(t,this.getDefaultOption()),ti(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&lo(t,n,i)},mergeOption:function(t,e){t=g(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&lo(this.option,t,i),go(this);var n=this.getInitialData(t,e);qo(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,rx(this).dataBeforeProcessed=n,Uo(this)},fillDataTextStyle:function(t){if(t)for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&ti(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=Ko(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return rx(this).data},setData:function(t){var e=Ko(this);if(e){var i=e.context;i.data!==t&&e.isOverallFilter&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}rx(this).data=t},getSource:function(){return zy(this).source},getRawData:function(){return rx(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(i,l,t){var h=this.getData(),n=h.mapDimension("defaultedTooltip",!0),e=n.length,o=this.getRawValue(i),a=O(o),u=h.getItemVisual(i,"color");R(u)&&u.colorStops&&(u=(u.colorStops[0]||{}).color),u=u||"transparent";var r=1<e||a&&!e?function(t){function e(t,e){var i=h.getDimensionInfo(e);if(i&&!1!==i.otherDims.tooltip){var n=i.type,o=io({color:u,type:"subItem"}),a=(r?o+Qn(i.displayName||"-")+": ":"")+Qn("ordinal"===n?t+"":"time"===n?l?"":no("yyyy/MM/dd hh:mm:ss",t):Kn(t));a&&s.push(a)}}var r=p(t,function(t,e,i){var n=h.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)},0),s=[];return n.length?L(n,function(t){e(Wo(h,i,t),t)}):L(t,e),(r?"<br/>":"")+s.join(r?"<br/>":", ")}(o):Qn(Kn(e?Wo(h,i,n[0]):a?o[0]:o)),s=io(u),c=h.getName(i),d=this.name;return d===pm&&(d=""),d=d?Qn(d)+(l?": ":"<br/>"):"",l?s+d+r:d+s+(c?Qn(c)+": "+r:r)},isAnimationEnabled:function(){if(mp.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=Ty.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},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});o(sx,ox),o(sx,Ty);var lx=function(){this.group=new _g,this.uid=Nn("viewComponent")};lx.prototype={constructor:lx,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var hx=lx.prototype;hx.updateView=hx.updateLayout=hx.updateVisual=function(t,e,i,n){},ci(lx),gi(lx,{registerWhenExtend:!0});var ux=function(){var s=ri();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,o=e.incrementalRender,a=e.large=i.large,r=e.incrementalRender=i.incrementalRender;return(n^a||o^r)&&"reset"}},cx=ri(),dx=ux(),fx=Jo.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){ta(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){ta(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};fx.updateView=fx.updateLayout=fx.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ci(Jo),gi(Jo,{registerWhenExtend:!0}),Jo.markUpdateMethod=function(t,e){cx(t).updateMethod=e};var px="\0__throttleOriginMethod",gx="\0__throttleRate",mx="\0__throttleType",vx={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var i=e.getData(),n=(e.visualColorAccessPath||"itemStyle.color").split("."),o=e.get(n)||e.getColorFromPalette(e.get("name"),null,t.getSeriesCount());if(i.setVisual("color",o),!t.isSeriesFiltered(e))return"function"!=typeof o||o instanceof Gv||i.each(function(t){i.setItemVisual(t,"color",o(e.getDataParams(t)))}),{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}},yx={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:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},xx=function(t,e){function c(t,e){if("string"!=typeof t)return t;var i=t;return L(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function d(t){var e=a.get(t);if(null!=e)return e;for(var i=t.split("."),n=yx.aria,o=0;o<i.length;++o)n=n[i[o]];return n}var i,a=e.getModel("aria");if(a.get("show"))if(a.get("description"))t.setAttribute("aria-label",a.get("description"));else{var f=0;e.eachSeries(function(t,e){++f},this);var n,p=a.get("data.maxCount")||10,o=a.get("series.maxCount")||10,g=Math.min(f,o);if(!(f<1)){var r=((i=e.getModel("title").option)&&i.length&&(i=i[0]),i&&i.text);n=r?c(d("general.withTitle"),{title:r}):d("general.withoutTitle");var m=[];n+=c(d(1<f?"series.multiple.prefix":"series.single.prefix"),{seriesCount:f}),e.eachSeries(function(t,e){if(e<g){var i,n=t.get("name"),o="series."+(1<f?"multiple":"single")+".";i=c(i=d(n?o+"withName":o+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(u=t.subType,yx.series.typeNames[u]||"自定义图")});var a=t.getData();(window.data=a).count()>p?i+=c(d("data.partialData"),{displayCnt:p}):i+=d("data.allData");for(var r=[],s=0;s<a.count();s++)if(s<p){var l=a.getName(s),h=Wo(a,s);r.push(c(d(l?"data.withName":"data.withoutName"),{name:l,value:h}))}i+=r.join(d("data.separator.middle"))+d("data.separator.end"),m.push(i)}var u}),n+=m.join(d("series.multiple.separator.middle"))+d("series.multiple.separator.end"),t.setAttribute("aria-label",n)}}},_x=Math.PI,bx=sa.prototype;bx.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context;return{step:!e&&i.progressiveEnabled&&(!n||n.incrementalRender)&&t.__idxInPipeline>i.bockIndex?i.step:null}}},bx.getPipeline=function(t){return this._pipelineMap.get(t)},bx.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");t.pipelineContext=i.context={incrementalRender:o,large:a}},bx.restorePipelines=function(t){var n=this,o=n._pipelineMap=C();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()),bockIndex:-1,step:e||700,count:0}),va(n,t,t.dataTask)})},bx.prepareStageTasks=function(t,e){var i=this._stageTaskMap,n=this.ecInstance.getModel(),o=this.api;L(t,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,o,t,a,r){function e(t){var e=t.uid,i=s.get(e)||s.set(e,Ho({plan:fa,reset:pa,count:ma}));i.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:n},va(n,t,i)}var s=t.seriesTaskMap||(t.seriesTaskMap=C()),i=o.seriesType,l=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(e):i?a.eachRawSeriesByType(i,e):l&&l(a,r).each(e);var h=n._pipelineMap;s.each(function(t,e){h.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,o),t.overallReset&&function(n,t,e,i,o){function a(t){var e=t.uid,i=s.get(e)||s.set(e,Ho({reset:ua,onDirty:da}));i.context={model:t,overallProgress:u,isOverallFilter:c},i.agent=r,i.__block=u,va(n,t,i)}var r=e.overallTask=e.overallTask||Ho({reset:ha});r.context={ecModel:i,api:o,overallReset:t.overallReset,scheduler:n};var s=r.agentStubMap=r.agentStubMap||C(),l=t.seriesType,h=t.getTargetSeries,u=!0,c=t.isOverallFilter;l?i.eachRawSeriesByType(l,a):h?h(i,o).each(a):(u=!1,L(i.getSeries(),a));var d=n._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,o)},this)},bx.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,va(this,e,o)},bx.performDataProcessorTasks=function(t,e,i){la(this,t,e,i,{block:!0})},bx.performVisualTasks=function(t,e,i,n){la(this,t,e,i,n)},bx.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},bx.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.bockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Sx=bx.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};sa.wrapStageHandler=function(t,e){return m(t)&&(t={overallReset:t,seriesType:function(t){Mx=null;try{t(Ix,Tx)}catch(t){}return Mx}(t)}),t.uid=Nn("stageHandler"),e&&(t.visualType=e),t};var Mx,Ix={},Tx={};ya(Ix,By),ya(Tx,bo),Ix.eachSeriesByType=Ix.eachRawSeriesByType=function(t){Mx=t},Ix.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Mx=t.subType)};var Ax=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Dx={color:Ax,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Ax]},Cx=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Lx={color:Cx,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:Cx[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:Cx},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Lx.categoryAxis.splitLine.show=!1;var kx=c,Px=L,Ox=m,Nx=R,Ex=by.parseClassType,zx={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},Rx="__flagInMainProcess",Bx="__optionUpdated",Vx=/^[a-zA-Z0-9_]+$/;_a.prototype.on=xa("on"),_a.prototype.off=xa("off"),_a.prototype.one=xa("one"),o(_a,Bp);var Gx=wa.prototype;Gx._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Bx]){var e=this[Bx].silent;this[Rx]=!0,Sa(this),Wx.update.call(this),this[Rx]=!1,this[Bx]=!1,Aa.call(this,e),Da.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api,t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(Ux,n),Ia(this,n),t.performVisualTasks(Yx,n),Pa(this,this._model,0,"remain"),i-=+new Date-o}while(0<i&&t.unfinished);t.unfinished||(this._zr&&this._zr.flush(),this.trigger("finished"))}}},Gx.getDom=function(){return this._dom},Gx.getZr=function(){return this._zr},Gx.setOption=function(t,e,i){var n;if(Nx(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[Rx]=!0,!this._model||e){var o=new Mo(this._api),a=this._theme,r=this._model=new By(null,null,a,o);r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,jx),i?(this[Bx]={silent:n},this[Rx]=!1):(Sa(this),Wx.update.call(this),this._zr.flush(),this[Bx]=!1,this[Rx]=!1,Aa.call(this,n),Da.call(this,n))},Gx.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Gx.getModel=function(){return this._model},Gx.getOption=function(){return this._model&&this._model.getOption()},Gx.getWidth=function(){return this._zr.getWidth()},Gx.getHeight=function(){return this._zr.getHeight()},Gx.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Gx.getRenderedCanvas=function(t){if(mp.canvasSupported){(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return L(e.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},Gx.getSvgDataUrl=function(){if(mp.svgSupported){var t=this._zr;return L(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToSvg()}},Gx.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;Px(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 Px(n,function(t){t.group.ignore=!1}),a},Gx.getConnectedDataURL=function(o){if(mp.canvasSupported){var a=this.group,r=Math.min,s=Math.max;if(Jx[a]){var l=1/0,h=1/0,u=-1/0,c=-1/0,d=[],i=o&&o.pixelRatio||1;L(Kx,function(t,e){if(t.group===a){var i=t.getRenderedCanvas(D(o)),n=t.getDom().getBoundingClientRect();l=r(n.left,l),h=r(n.top,h),u=s(n.right,u),c=s(n.bottom,c),d.push({dom:i,left:n.left,top:n.top})}});var t=(u*=i)-(l*=i),e=(c*=i)-(h*=i),n=Ap();n.width=t,n.height=e;var f=Ke(n);return Px(d,function(t){var e=new Be({style:{x:t.left*i-l,y:t.top*i-h,image:t.dom}});f.add(e)}),f.refreshImmediately(),n.toDataURL("image/"+(o&&o.type||"png"))}return this.getDataURL(o)}},Gx.convertToPixel=z(ba,"convertToPixel"),Gx.convertFromPixel=z(ba,"convertFromPixel"),Gx.containPixel=function(t,o){var a;return L(t=si(this._model,t),function(t,n){0<=n.indexOf("Models")&&L(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},Gx.getVisual=function(t,e){var i=(t=si(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)},Gx.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Gx.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Wx={prepareAndUpdate:function(t){Sa(this),Wx.update.call(this,t)},update:function(t){var o,e=this._model,i=this._api,n=this._zr,a=this._coordSysMgr,r=this._scheduler;if(e){e.restoreData(t),r.performSeriesTasks(e),a.create(e,i),r.performDataProcessorTasks(Ux,e,t),Ia(this,e),o={},e.eachSeries(function(t){var e=t.get("stack"),i=t.getData();if(e&&"list"===i.type){var n=o[e];o.hasOwnProperty(e)&&n&&(i.stackedOn=n),o[e]=i}}),a.update(e,i),La(e),r.performVisualTasks(Yx,e,t),ka(this,e,i,t);var s=e.get("backgroundColor")||"transparent",l=n.painter;if(l.isSingleCanvas&&l.isSingleCanvas())n.configLayer(0,{clearColor:s});else{if(!mp.canvasSupported){var h=Tt(s);s=Nt(h,"rgb"),0===h[3]&&(s="transparent")}s.colorStops||s.image?(n.configLayer(0,{clearColor:s}),this.__hasGradientOrPatternBg=!0,this._dom.style.background="transparent"):(this.__hasGradientOrPatternBg&&n.configLayer(0,{clearColor:null}),this.__hasGradientOrPatternBg=!1,this._dom.style.background=s)}Oa(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=C();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)}),La(a),this._scheduler.performVisualTasks(Yx,a,o,{setDirty:!0,dirtyMap:n}),Pa(r,a,0,o,n),Oa(a,this._api)}},updateView:function(t){var e=this._model;e&&(Jo.markUpdateMethod(t,"updateView"),La(e),this._scheduler.performVisualTasks(Yx,e,t,{setDirty:!0}),ka(this,this._model,this._api,t),Oa(e,this._api))},updateVisual:function(t){Wx.update.call(this,t)},updateLayout:function(t){Wx.update.call(this,t)}};Gx.resize=function(t){this._zr.resize(t);var e,i,n,o=this._model;this._loadingFX&&this._loadingFX.resize(),o&&(e=this,i=o.resetOption("media"),n=t&&t.silent,e[Rx]=!0,i&&Sa(e),Wx.update.call(e),e[Rx]=!1,Aa.call(e,n),Da.call(e,n))},Gx.showLoading=function(t,e){if(Nx(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),$x[t]){var i=$x[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},Gx.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},Gx.makeActionFromEvent=function(t){var e=P({},t);return e.type=Zx[t.type],e},Gx.dispatchAction=function(t,e){Nx(e)||(e={silent:!!e}),Hx[t.type]&&this._model&&(this[Rx]?this._pendingActions.push(t):(Ta.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&mp.browser.weChat&&this._throttledZrFlush(),Aa.call(this,e.silent),Da.call(this,e.silent)))},Gx.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},Gx.on=xa("on"),Gx.off=xa("off"),Gx.one=xa("one");var Fx=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];Gx._initEvents=function(){Px(Fx,function(a){this._zr.on(a,function(t){var e,i=this.getModel(),n=t.target;if("globalout"===a)e={};else if(n&&null!=n.dataIndex){var o=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=o&&o.getDataParams(n.dataIndex,n.dataType)||{}}else n&&n.eventData&&(e=P({},n.eventData));e&&(e.event=t,e.type=a,this.trigger(a,e))},this)},this),Px(Zx,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Gx.isDisposed=function(){return this._disposed},Gx.clear=function(){this.setOption({series:[]},!0)},Gx.dispose=function(){if(!this._disposed){this._disposed=!0,hi(this.getDom(),e_,"");var e=this._api,i=this._model;Px(this._componentsViews,function(t){t.dispose(i,e)}),Px(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete Kx[this.id]}},o(wa,Bp);var Hx={},Zx={},Ux=[],jx=[],Xx=[],Yx=[],qx={},$x={},Kx={},Jx={},Qx=new Date-0,t_=new Date-0,e_="_echarts_instance_",i_={},n_=Ea;Ha(2e3,vx),Ba(Jy),Ua("default",function(n,t){E(t=t||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var o=new Nv({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),a=new Bv({shape:{startAngle:-_x/2,endAngle:-_x/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001}),r=new Nv({style:{fill:"none",text:t.text,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});a.animateShape(!0).when(1e3,{endAngle:3*_x/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*_x/2}).delay(300).start("circularInOut");var e=new _g;return e.add(a),e.add(r),e.add(o),e.resize=function(){var t=n.getWidth()/2,e=n.getHeight()/2;a.setShape({cx:t,cy:e});var i=a.shape.r;r.setShape({x:t-i,y:e-i,width:2*i,height:2*i}),o.setShape({x:0,y:0,width:n.getWidth(),height:n.getHeight()})},e.resize(),e}),Ga({type:"highlight",event:"highlight",update:"highlight"},M),Ga({type:"downplay",event:"downplay",update:"downplay"},M),Ra("light",Dx),Ra("dark",Lx);Ja.prototype={constructor:Ja,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(Qa(t,{},n,"_oldKeyGetter",this),Qa(e,i,o,"_newKeyGetter",this),a=0;a<t.length;a++)null!=(s=i[r=n[a]])?((h=s.length)?(1===h&&(i[r]=null),s=s.unshift()):i[r]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a);for(var a=0;a<o.length;a++){var r=o[a];if(i.hasOwnProperty(r)){var s=i[r];if(null==s)continue;if(s.length)for(var l=0,h=s.length;l<h;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var o_=C(["tooltip","label","itemName","itemId","seriesName"]),a_=R,r_="undefined",s_=typeof window===r_?global:window,l_={float:typeof s_.Float64Array===r_?Array:s_.Float64Array,int:typeof s_.Int32Array===r_?Array:s_.Int32Array,ordinal:Array,number:Array,time:Array},h_=["stackedOn","hasItemOption","_nameList","_idList","_rawData","_rawExtent","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],u_=function(t,e){t=t||["x","y"];for(var i={},n=[],o=0;o<t.length;o++){var a,r={};"string"==typeof t[o]?r={name:a=t[o],coordDim:a,coordDimIndex:0,stackable:!1,type:"float"}:(a=(r=t[o]).name,r.type=r.type||"float",r.coordDim||(r.coordDim=a,r.coordDimIndex=0)),r.otherDims=r.otherDims||{},n.push(a),(i[a]=r).index=o}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this.stackedOn=null,this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=function(a){var t={},r=t.encode={},s=t.coordDimMap=C(),l=[];L(a.dimensions,function(t){var e,o=a.getDimensionInfo(t),i=o.coordDim;if(i){var n=r[i];r.hasOwnProperty(i)||(n=r[i]=[]),n[o.coordDimIndex]=t,o.isSysCoord&&!("ordinal"===(e=o.type)||"time"===e)&&(l[0]=t),s.set(i,1)}o_.each(function(t,e){var i=r[e];r.hasOwnProperty(e)||(i=r[e]=[]);var n=o.otherDims[e];null!=n&&!1!==n&&(i[n]=o.name)})});var i=[];s.each(function(t,e){i=i.concat(r[e])}),t.dataDimsOnCoord=i;var e=r.label;e&&e.length&&(l=e.slice());var n=l.slice(),o=r.tooltip;return o&&o.length&&(n=o.slice()),r.defaultedLabel=l,r.defaultedTooltip=n,t}(this)},c_=u_.prototype;c_.type="list",c_.hasItemOption=!0,c_.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},c_.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},c_.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},c_.mapDimension=function(t,e){var i=this._dimensionsSummary.encode[t];return!0===e?i&&i.slice()||[]:i?i[e||0]:null},c_.initData=function(t,e,i){(po.isInstance(t)||N(t))&&(t=new No(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=ix[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},c_.getProvider=function(){return this._rawData},c_.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},c_._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=this._dimensionInfos,l=this._nameList,h=this._idList,u=this._rawExtent,c=this._nameRepeatCount={},d=this._chunkCount,f=d-1,p=0;p<r.length;p++){u[I=r[p]]||(u[I]=[1/0,-1/0]);var g=s[I];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p);var m=l_[g.type];a[I]||(a[I]=[]);var v=a[I][f];if(v&&v.length<n){for(var y=new m(Math.min(e-f*n,n)),x=0;x<v.length;x++)y[x]=v[x];a[I][f]=y}for(M=d*n;M<e;M+=n)a[I].push(new m(Math.min(e-M,n)));this._chunkCount=a[I].length}for(var _=t;_<e;_++){for(var w=o.getItem(_),b=Math.floor(_/n),S=_%n,M=0;M<r.length;M++){var I=r[M],T=a[I][b],A=this._dimValueGetter(w,I,_,M);(T[S]=A)<u[I][0]&&(u[I][0]=A),A>u[I][1]&&(u[I][1]=A)}if(!o.pure){var D=l[_];w&&!D&&(null!=i?D=this._getNameFromStore(_):null!=w.name&&(l[_]=D=w.name));var C=null==w?null:w.id;null==C&&null!=D&&(c[D]=c[D]||0,0<c[C=D]&&(C+="__ec__"+c[D]),c[D]++),null!=C&&(h[_]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={}}},c_._getNameFromStore=function(t){var e=this._nameDimIdx;if(null!=e){var i=this._chunkSize,n=Math.floor(t/i),o=t%i,a=this.dimensions[e],r=this._dimensionInfos[a].ordinalMeta;if(r)return r.categories[t];var s=this._storage[a][n];return s&&s[o]}},c_._getIdFromStore=function(t){var e=this._idDimIdx;if(null!=e){var i=this._chunkSize,n=Math.floor(t/i),o=t%i,a=this.dimensions[e],r=this._dimensionInfos[a].ordinalMeta;if(r)return r.categories[t];var s=this._storage[a][n];return s&&s[o]}},c_.count=function(){return this._count},c_.getIndices=function(){if(this._indices)return new(t=this._indices.constructor)(this._indices.buffer,0,this._count);for(var t=er(this),e=new t(this.count()),i=0;i<e.length;i++)e[i]=i;return e},c_.get=function(t,e,i){if(!(0<=e&&e<this._count))return NaN;var n=this._storage;if(!n[t])return NaN;e=this.getRawIndex(e);var o=Math.floor(e/this._chunkSize),a=e%this._chunkSize,r=n[t][o][a];if(i){var s=this._dimensionInfos[t];if(s&&s.stackable)for(var l=this.stackedOn;l;){var h=l.get(t,e);(0<=r&&0<h||r<=0&&h<0)&&(r+=h),l=l.stackedOn}}return r},c_._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},c_.getValues=function(t,e,i){var n=[];O(t)||(i=e,e=t,t=this.dimensions);for(var o=0,a=t.length;o<a;o++)n.push(this.get(t[o],e,i));return n},c_.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=this._dimensionInfos,n=0,o=e.length;n<o;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},c_.getDataExtent=function(t,e){t=this.getDimension(t);var i=this._storage[t],n=[1/0,-1/0];if(e=!!e&&this.isStacked(t),!i)return n;var o,a=this.count(),r=[t,!!e].join("_");if(!this._indices&&!e)return this._rawExtent[t].slice();if(o=this._extent[r])return o.slice();for(var s=(o=n)[0],l=o[1],h=0;h<a;h++){var u=e?this.get(t,h,!0):this._getFast(t,this.getRawIndex(h));u<s&&(s=u),l<u&&(l=u)}return o=[s,l],this._extent[r]=o},c_.getApproximateExtent=function(t,e){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t,e)},c_.setApproximateExtent=function(t,e,i){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},c_.isStacked=function(t){var e=this._dimensionInfos[t];return e&&e.stackable&&this.stackedOn},c_.getSum=function(t,e){var i=0;if(this._storage[t])for(var n=0,o=this.count();n<o;n++){var a=this.get(t,n,e);isNaN(a)||(i+=a)}return i},c_.indexOf=function(t,e){var i=this._storage[t],n=this._chunkSize;if(i)for(var o=0,a=this.count();o<a;o++){var r=o%n;if(i[Math.floor(o/n)][r]===e)return o}return-1},c_.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},c_.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,o=this._count-1;n<=o;){var a=(n+o)/2|0;if(e[a]<t)n=a+1;else{if(!(e[a]>t))return a;o=a-1}}return-1},c_.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<l;s++){var h=e-this.get(t,s,i),u=Math.abs(h);h<=n&&u<=a&&((u<a||0<=h&&r<0)&&(a=u,r=h,o.length=0),o.push(s))}return o},c_.getRawIndex=nr,c_.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},c_.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||this._getNameFromStore(e)||""},c_.getId=function(t){return ar(this,this.getRawIndex(t))},c_.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var o=(t=k(rr(t),this.getDimension,this)).length;n=n||this;for(var a=0;a<this.count();a++)switch(o){case 0:e.call(n,a);break;case 1:e.call(n,this.get(t[0],a,i),a);break;case 2:e.call(n,this.get(t[0],a,i),this.get(t[1],a,i),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a,i);s[r]=a,e.apply(n,s)}}},c_.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||!1,n=n||this,t=k(rr(t),this.getDimension,this);for(var o=this.count(),a=new(er(this))(o),r=[],s=t.length,l=0,h=t[0],u=0;u<o;u++){var c,d=this.getRawIndex(u);if(0===s)c=e.call(n,u);else if(1===s){var f=i?this.get(h,u,!0):this._getFast(h,d);c=e.call(n,f,u)}else{for(var p=0;p<s;p++)r[p]=i?this.get(t[p],u,!0):this._getFast(h,d);r[p]=u,c=e.apply(n,r)}c&&(a[l++]=d)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?or:nr,this}},c_.selectRange=function(t,e){if(this._count){e=e||!1;var i=[];for(var n in t)t.hasOwnProperty(n)&&i.push(n);var o=i.length;if(o){var a=this.count(),r=new(er(this))(a),s=0,l=i[0],h=t[l][0],u=t[l][1],c=!1;if(!this._indices&&!e){var d=0;if(1===o){for(var f=this._storage[i[0]],p=0;p<this._chunkCount;p++)for(var g=f[p],m=Math.min(this._count-p*this._chunkSize,this._chunkSize),v=0;v<m;v++)(b=g[v])>=h&&b<=u&&(r[s++]=d),d++;c=!0}else if(2===o){f=this._storage[l];var y=this._storage[i[1]],x=t[i[1]][0],_=t[i[1]][1];for(p=0;p<this._chunkCount;p++){g=f[p];var w=y[p];for(m=Math.min(this._count-p*this._chunkSize,this._chunkSize),v=0;v<m;v++){var b=g[v],S=w[v];h<=b&&b<=u&&x<=S&&S<=_&&(r[s++]=d),d++}}c=!0}}if(!c)if(1===o)for(e=e||this.isStacked(l),v=0;v<a;v++)I=this.getRawIndex(v),(b=e?this.get(l,v,!0):this._getFast(l,I))>=h&&b<=u&&(r[s++]=I);else for(v=0;v<a;v++){var M=!0,I=this.getRawIndex(v);for(p=0;p<o;p++){var T=i[p];((b=e?this.get(T,v,!0):this._getFast(n,I))<t[T][0]||b>t[T][1])&&(M=!1)}M&&(r[s++]=this.getRawIndex(v))}return s<a&&(this._indices=r),this._count=s,this._extent={},this.getRawIndex=this._indices?or:nr,this}}},c_.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i,n),o},c_.map=function(t,e,i,n){var o=sr(this,t=k(rr(t),this.getDimension,this));o._indices=this._indices,o.getRawIndex=o._indices?or:nr;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,h=this.count(),u=[],c=0;c<h;c++){for(var d=0;d<l;d++)u[d]=this.get(t[d],c,i);u[l]=c;var f=e&&e.apply(n,u);if(null!=f){"object"!=typeof f&&(r[0]=f,f=r);for(var p=this.getRawIndex(c),g=Math.floor(p/s),m=p%s,v=0;v<f.length;v++){var y=a[t[v]];y&&(y[g][m]=f[v])}}}return o},c_.downSample=function(t,e,i,n){for(var o=sr(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=new(er(this))(h),d=0,f=0;f<h;f+=s){h-f<s&&(s=h-f,r.length=s);for(var p=0;p<s;p++){var g=this.getRawIndex(f+p),m=Math.floor(g/u),v=g%u;r[p]=l[m][v]}var y=i(r),x=this.getRawIndex(Math.min(f+n(r,y)||0,h-1)),_=x%u;l[Math.floor(x/u)][_]=y,c[d++]=x}return o._count=d,o._indices=c,o.getRawIndex=or,o},c_.getItemModel=function(t){var e=this.hostModel;return new kn(this.getRawDataItem(t),e,e&&e.ecModel)},c_.diff=function(e){var i=this;return new Ja(e?e.getIndices():[],this.getIndices(),function(t){return ar(e,t)},function(t){return ar(i,t)})},c_.getVisual=function(t){var e=this._visual;return e&&e[t]},c_.setVisual=function(t,e){if(a_(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},c_.setLayout=function(t,e){if(a_(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},c_.getLayout=function(t){return this._layout[t]},c_.getItemLayout=function(t){return this._itemLayouts[t]},c_.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?P(this._itemLayouts[t]||{},e):e},c_.clearItemLayouts=function(){this._itemLayouts.length=0},c_.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},c_.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,a_(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},c_.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var d_=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};c_.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(d_,e)),this._graphicEls[t]=e},c_.getItemGraphicEl=function(t){return this._graphicEls[t]},c_.eachItemGraphicEl=function(i,n){L(this._graphicEls,function(t,e){t&&i&&i.call(n,t,e)})},c_.cloneShallow=function(t){if(!t){var e=k(this.dimensions,this.getDimensionInfo,this);t=new u_(e,this.hostModel)}if(t._storage=this._storage,ir(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?or:nr,t._extent=D(this._extent),t._approximateExtent=D(this._approximateExtent),t},c_.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(s(arguments)))})},c_.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],c_.CHANGABLE_METHODS=["filterSelf","selectRange"];var f_=function(t,e){return hr((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,extraPrefix:e.extraPrefix,extraFromZero:e.extraFromZero})};dr.prototype.parse=function(t){return t},dr.prototype.getSetting=function(t){return this._setting[t]},dr.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},dr.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},dr.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},dr.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},dr.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e,!0))},dr.prototype.getExtent=function(){return this._extent.slice()},dr.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},dr.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;i<e.length;i++)t.push(this.getLabel(e[i]));return t},dr.prototype.isBlank=function(){return this._isBlank},dr.prototype.setBlank=function(t){this._isBlank=t},ci(dr),gi(dr,{registerWhenExtend:!0}),fr.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&k(i,gr);return new fr({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var p_=fr.prototype;p_.getOrdinal=function(t){return pr(this).get(t)},p_.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=pr(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var g_=dr.prototype,m_=dr.extend({type:"ordinal",init:function(t,e){t&&!O(t)||(t=new fr({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),g_.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return g_.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(g_.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){return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e,!1))},niceTicks:M,niceExtent:M});m_.create=function(){return new m_};var v_=Rn,y_=Rn,x_=dr.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[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),x_.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=mr(t)},getTicks:function(){return function(t,e,i,n){var o=[];if(!t)return o;e[0]<i[0]&&o.push(e[0]);for(var a=i[0];a<=i[1]&&(o.push(a),(a=v_(a+t,n))!==o[o.length-1]);)if(1e4<o.length)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;i<e.length;i++)t.push(this.getLabel(e[i]));return t},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Gn(t)||0:"auto"===i&&(i=this._intervalPrecision),Kn(t=y_(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=function(t,e,i,n){var o={},a=t[1]-t[0],r=o.interval=Yn(a/e,!0);null!=i&&r<i&&(r=o.interval=i),null!=n&&n<r&&(r=o.interval=n);var s=o.intervalPrecision=mr(r);return yr(o.niceTickExtent=[v_(Math.ceil(t[0]/r)*r,s),v_(Math.floor(t[1]/r)*r,s)],t),o}(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=y_(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=y_(Math.ceil(e[1]/o)*o))}});x_.create=function(){return new x_};var __="__ec_stack_",w_=x_.prototype,b_=Math.ceil,S_=Math.floor,M_=x_.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return no(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=864e5,e[1]+=864e5),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-864e5}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=Rn(S_(e[0]/n)*n)),t.fixMax||(e[1]=Rn(b_(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,o=n[1]-n[0],a=o/t;null!=e&&a<e&&(a=e),null!=i&&i<a&&(a=i);var r=I_.length,s=function(t,e,i,n){for(;i<n;){var o=i+n>>>1;t[o][1]<e?i=o+1:n=o}return i}(I_,a,0,r),l=I_[Math.min(s,r-1)],h=l[1];"year"===l[0]&&(h*=Yn(o/h/t,!0));var u=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(b_((n[0]-u)/h)*h+u),Math.round(S_((n[1]-u)/h)*h+u)];yr(c,n),this._stepLvl=l,this._interval=h,this._niceExtent=c},parse:function(t){return+Un(t)}});L(["contain","normalize"],function(e){M_.prototype[e]=function(t){return w_[e].call(this,this.parse(t))}});var I_=[["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]];M_.create=function(t){return new M_({useUTC:t.ecModel.get("useUTC")})};var T_=dr.prototype,A_=x_.prototype,D_=Gn,C_=Rn,L_=Math.floor,k_=Math.ceil,P_=Math.pow,O_=Math.log,N_=dr.extend({type:"log",base:10,$constructor:function(){dr.apply(this,arguments),this._originalScale=new x_},getTicks:function(){var i=this._originalScale,n=this._extent,o=i.getExtent();return k(A_.getTicks.call(this),function(t){var e=Rn(P_(this.base,t));return e=t===n[0]&&i.__fixMin?Mr(e,o[0]):e,t===n[1]&&i.__fixMax?Mr(e,o[1]):e},this)},getLabel:A_.getLabel,scale:function(t){return t=T_.scale.call(this,t),P_(this.base,t)},setExtent:function(t,e){var i=this.base;t=O_(t)/O_(i),e=O_(e)/O_(i),A_.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=T_.getExtent.call(this);e[0]=P_(t,e[0]),e[1]=P_(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Mr(e[0],n[0])),i.__fixMax&&(e[1]=Mr(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=O_(t[0])/O_(e),t[1]=O_(t[1])/O_(e),T_.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e,!0,function(t){return 0<t}))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=jn(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&0<Math.abs(n);)n*=10;var o=[Rn(k_(e[0]/n)*n),Rn(L_(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){A_.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});L(["contain","normalize"],function(e){N_.prototype[e]=function(t){return t=O_(t)/O_(this.base),T_[e].call(this,t)}}),N_.create=function(){return new N_};var E_={getFormattedLabels:function(){return Cr(this.axis,this.get("axisLabel.formatter"))},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&&!x(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&&!x(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:M,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},z_=Xi({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()}}),R_=Xi({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()}}),B_=Xi({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,p=.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-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),V_=Xi({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()}}),G_={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}},W_={};L({line:Ev,rect:Nv,roundRect:Nv,square:Nv,circle:Av,diamond:R_,pin:B_,arrow:V_,triangle:z_},function(t,e){W_[e]=new t});var F_=Xi({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=W_[n];"none"!==e.symbolType&&(o||(o=W_[n="rect"]),G_[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i))}}),H_=(Object.freeze||Object)({createList:function(t){return cr(t.getSource(),t)},getLayoutRect:ro,createScale:function(t,e){var i=e;kn.isInstance(e)||o(i=new kn(e),E_);var n=Ar(i);return n.setExtent(t[0],t[1]),Tr(n,i),n},mixinAxisModelCommonMethods:function(t){o(t,E_)},completeDimensions:hr,createDimensions:f_,createSymbol:Pr}),Z_=1e-8;Er.prototype={constructor:Er,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;s<r.length;s++)"polygon"===r[s].type&&(Ti(r[s].exterior,o,a),tt(i,i,o),et(n,n,a));return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Xt(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++)if("polygon"===i[n].type){var a=i[n].exterior,r=i[n].interiors;if(Nr(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(Nr(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=o.width/o.height;i?n||(n=i/a):i=a*n;for(var r=new Xt(t,e,i,n),s=o.calculateTransform(r),l=this.geometries,h=0;h<l.length;h++)if("polygon"===l[h].type){for(var u=l[h].exterior,c=l[h].interiors,d=0;d<u.length;d++)Q(u[d],u[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)Q(c[f][d],c[f][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]}};var U_=function(t){return function(t){if(!t.UTF8Encoding)return;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var o=i[n].geometry,a=o.coordinates,r=o.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===o.type)a[s]=zr(l,r[s],e);else if("MultiPolygon"===o.type)for(var h=0;h<l.length;h++){var u=l[h];l[h]=zr(u,r[s][h],e)}}t.UTF8Encoding=!1}(t),k(I(t.features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),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&&L(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Er(e.name,o,e.cp);return a.properties=e,a})},j_=En,X_=[0,1],Y_=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};Y_.prototype={constructor:Y_,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return i<=t&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Wn(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&&Rr(i=i.slice(),n.count()),j_(t,X_,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Rr(i=i.slice(),n.count());var o=j_(t,i,X_,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){if(!this.onBand||t)return k(this.scale.getTicks(),this.dataToCoord,this);for(var e=this.getBands(),i=[],n=0;n<e.length;n++)i.push(e[n][0]);return e[n-1]&&i.push(e[n-1][1]),i},getLabelsCoords:function(){return k(this.scale.getTicks(),this.dataToCoord,this)},getBands:function(){for(var t=this.getExtent(),e=[],i=this.scale.count(),n=t[0],o=t[1]-n,a=0;a<i;a++)e.push([o*a/i+n,o*(a+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model,i=e.getModel("axisLabel");t=i.get("interval"),"category"!==this.type||null!=t&&"auto"!==t||(t=Dr(k(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),i.getFont(),this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0,i.get("rotate"))),this._labelInterval=t}return t}};var q_=U_,$_={};L(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){$_[t]=Lp[t]}),ja({type:"dataset",defaultOption:{seriesLayoutBy:Ny,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,i=Py;if(v(e))i=Oy;else if(O(e))for(var n=0,o=e.length;n<o;n++){var a=e[n];if(null!=a){if(O(a)){i=Cy;break}if(R(a)){i=Ly;break}}}else if(R(e)){for(var r in e)if(e.hasOwnProperty(r)&&N(e[r])){i=ky;break}}else if(null!=e)throw new Error("Invalid data");zy(t).sourceFormat=i}(this)}}),Xa({type:"dataset"}),sx.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return cr(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{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 K_=Gr.prototype;K_._createSymbol=function(t,e,i,n){this.removeAll();var o=Pr(t,-1,-1,2,2,e.getItemVisual(i,"color"));o.attr({z2:100,culling:!0,scale:Vr(n)}),o.drift=Wr,this._symbolType=t,this.add(o)},K_.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},K_.getSymbolPath=function(){return this.childAt(0)},K_.getScale=function(){return this.childAt(0).scale},K_.highlight=function(){this.childAt(0).trigger("emphasis")},K_.downplay=function(){this.childAt(0).trigger("normal")},K_.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},K_.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},K_.updateData=function(t,e,i){this.silent=!1;var n,o,a=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,s=(n=e,(o=t.getItemVisual(n,"symbolSize"))instanceof Array?o.slice():[+o,+o]),l=a!==this._symbolType;if(l?this._createSymbol(a,t,e,s):((h=this.childAt(0)).silent=!1,Sn(h,{scale:Vr(s)},r,e)),this._updateCommon(t,e,s,i),l){var h=this.childAt(0),u=i&&i.fadeIn,c={scale:h.scale.slice()};u&&(c.style={opacity:h.style.opacity}),h.scale=[0,0],u&&(h.style.opacity=0),Mn(h,c,r,e)}this._seriesModel=r};var J_=["itemStyle"],Q_=["emphasis","itemStyle"],tw=["label"],ew=["emphasis","label"];K_._updateCommon=function(i,t,e,n){var o=this.childAt(0),a=i.hostModel,r=i.getItemVisual(t,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,h=n&&n.symbolRotate,u=n&&n.symbolOffset,c=n&&n.labelModel,d=n&&n.hoverLabelModel,f=n&&n.hoverAnimation,p=n&&n.cursorStyle;if(!n||i.hasItemOption){var g=n&&n.itemModel?n.itemModel:i.getItemModel(t);s=g.getModel(J_).getItemStyle(["color"]),l=g.getModel(Q_).getItemStyle(),h=g.getShallow("symbolRotate"),u=g.getShallow("symbolOffset"),c=g.getModel(tw),d=g.getModel(ew),f=g.getShallow("hoverAnimation"),p=g.getShallow("cursor")}else l=P({},l);var m=o.style;o.attr("rotation",(h||0)*Math.PI/180||0),u&&o.attr("position",[zn(u[0],e[0]),zn(u[1],e[1])]),p&&o.attr("cursor",p),o.setColor(r,n&&n.symbolInnerColor),o.setStyle(s);var v=i.getItemVisual(t,"opacity");null!=v&&(m.opacity=v);var y=n&&n.useNameLabel;gn(m,l,c,d,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,e){return y?i.getName(t):Br(i,t)},isRectText:!0,autoColor:r}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=l,pn(o);var x=Vr(e);if(f&&a.isAnimationEnabled()){var _=function(){var t=x[1]/x[0];this.animateTo({scale:[Math.max(1.1*x[0],x[0]+3),Math.max(1.1*x[1],x[1]+3*t)]},400,"elasticOut")},w=function(){this.animateTo({scale:x},400,"elasticOut")};o.on("mouseover",_).on("mouseout",w).on("emphasis",_).on("normal",w)}},K_.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),Sn(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},a(Gr,_g);var iw=Fr.prototype;iw.updateData=function(o,a){var r=this.group,s=o.hostModel,l=this._data,h=this._symbolCtor,u=Zr(o);l||r.removeAll(),o.diff(l).add(function(t){var e=o.getItemLayout(t);if(Hr(o,e,t,a)){var i=new h(o,t,u);i.attr("position",e),o.setItemGraphicEl(t,i),r.add(i)}}).update(function(t,e){var i=l.getItemGraphicEl(e),n=o.getItemLayout(t);Hr(o,n,t,a)?(i?(i.updateData(o,t,u),Sn(i,{position:n},s)):(i=new h(o,t)).attr("position",n),r.add(i),o.setItemGraphicEl(t,i)):r.remove(i)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){r.remove(e)})}).execute(),this._data=o},iw.isPersistent=function(){return!0},iw.updateLayout=function(){var n=this._data;n&&n.eachItemGraphicEl(function(t,e){var i=n.getItemLayout(e);t.attr("position",i)})},iw.incrementalPrepareUpdate=function(t){this._seriesScope=Zr(t),this._data=null,this.group.removeAll()},iw.incrementalUpdate=function(t,e,i){for(var n=t.start;n<t.end;n++){var o=e.getItemLayout(n);if(Hr(e,o,n,i)){var a=new this._symbolCtor(e,n,this._seriesScope);a.traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),a.attr("position",o),this.group.add(a),e.setItemGraphicEl(n,a)}}},iw.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 nw=tt,ow=et,aw=Z,rw=A,sw=[],lw=[],hw=[],uw=Gi.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Cv(Gi.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=qr(i,e.smoothConstraint);if(e.connectNulls){for(;0<o&&Xr(i[o-1]);o--);for(;n<o&&Xr(i[n]);n++);}for(;n<o;)n+=Yr(t,i,n,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),cw=Gi.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Cv(Gi.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,a=i.length,r=e.smoothMonotone,s=qr(i,e.smoothConstraint),l=qr(n,e.smoothConstraint);if(e.connectNulls){for(;0<a&&Xr(i[a-1]);a--);for(;o<a&&Xr(i[o]);o++);}for(;o<a;){var h=Yr(t,i,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);Yr(t,n,o+h-1,h,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=h+1,t.closePath()}}});Jo.extend({type:"line",init:function(){var t=new _g,e=new Fr;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,!0),h="polar"===n.type,u=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=function(t,a,r,e){var s=a.getBaseAxis(),i=a.getOtherAxis(s),l=0,n=i.scale.getExtent();"start"===e?l=n[0]:"end"===e?l=n[1]:0<(n=i.scale.getExtent())[0]?l=n[0]:n[1]<0&&(l=n[1]);var o=i.dim,h="x"===o||"radius"===o?1:0,u=r.mapDimension(o);return r.mapArray(u?[u]:[],function(t,e){for(var i,n=r.stackedOn;n&&Qr(n.get(u,e))===Qr(t);){i=n;break}var o=[];return o[h]=r.get(s.dim,e),o[1-h]=i?i.get(u,e,!0):l,a.dataToPoint(o)},!0)}(0,n,a,s.get("origin")),y=t.get("showSymbol"),x=y&&!h&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(a,n),_=this._data;_&&_.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),_.setItemGraphicEl(e,null))}),y||c.remove(),o.add(p);var w=!h&&t.get("step");d&&u.type===n.type&&w===this._step?(m&&!f?f=this._newPolygon(l,v,n,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(ts(n,!1,t)),y&&c.updateData(a,x),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),$r(this._stackedOnPoints,v)&&$r(this._points,l)||(g?this._updateAnimation(a,v,n,i,w):(w&&(l=es(l,n,w),v=es(v,n,w)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:v})))):(y&&c.updateData(a,x),w&&(l=es(l,n,w),v=es(v,n,w)),d=this._newPolyline(l,n,g),m&&(f=this._newPolygon(l,v,n,g)),p.setClipPath(ts(n,!0,t)));var b=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()){for(var n,o=i.length-1;0<=o;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=k(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,d=l[h-1].coord+10,f=d-c;if(f<.001)return"transparent";L(l,function(t){t.offset=(t.coord-c)/f}),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 p=new Wv(0,0,0,0,l,!0);return p[r]=c,p[r+"2"]=d,p}}}(a,n)||a.getVisual("color");d.useStyle(E(r.getLineStyle(),{fill:"none",stroke:b,lineJoin:"bevel"}));var S=t.get("smooth");if(S=Kr(t.get("smooth")),d.setShape({smooth:S,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var M=a.stackedOn,I=0;f.useStyle(E(s.getAreaStyle(),{fill:b,opacity:.7,lineJoin:"bevel"})),M&&(I=Kr(M.hostModel.get("smooth"))),f.setShape({smooth:S,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=v,this._points=l,this._step=w},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=ai(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;(r=new Gr(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 Jo.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=ai(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 Jo.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new uw({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 cw({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];if(i&&i.isLabelIgnored)return _(i.isLabelIgnored,i)},_updateAnimation:function(t,e,i,n,o){var a=this._polyline,r=this._polygon,s=t.hostModel,l=function(t,e,i,n,o,a){for(var r=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),s=[],l=[],h=[],u=[],c=[],d=[],f=[],p=a.dimensions,g=0;g<r.length;g++){var m=r[g],v=!0;switch(m.cmd){case"=":var y=t.getItemLayout(m.idx),x=e.getItemLayout(m.idx1);(isNaN(y[0])||isNaN(y[1]))&&(y=x.slice()),s.push(y),l.push(x),h.push(i[m.idx]),u.push(n[m.idx1]),f.push(e.getRawIndex(m.idx1));break;case"+":_=m.idx,s.push(o.dataToPoint([e.get(p[0],_,!0),e.get(p[1],_,!0)])),l.push(e.getItemLayout(_).slice()),h.push(jr(o,e,_)),u.push(n[_]),f.push(e.getRawIndex(_));break;case"-":var _=m.idx,w=t.getRawIndex(_);w!==_?(s.push(t.getItemLayout(_)),l.push(a.dataToPoint([t.get(p[0],_,!0),t.get(p[1],_,!0)])),h.push(i[_]),u.push(jr(a,t,_)),f.push(w)):v=!1}v&&(c.push(m),d.push(d.length))}d.sort(function(t,e){return f[t]-f[e]});var b=[],S=[],M=[],I=[],T=[];for(g=0;g<d.length;g++)_=d[g],b[g]=s[_],S[g]=l[_],M[g]=h[_],I[g]=u[_],T[g]=c[_];return{current:b,next:S,stackedOnCurrent:M,stackedOnNext:I,status:T}}(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;o&&(h=es(l.current,i,o),u=es(l.stackedOnCurrent,i,o),c=es(l.next,i,o),d=es(l.stackedOnNext,i,o)),a.shape.__points=l.current,a.shape.points=h,Sn(a,{shape:{points:c}},s),r&&(r.setShape({points:h,stackedOnPoints:u}),Sn(r,{shape:{points:c,stackedOnPoints:d}},s));for(var f=[],p=l.status,g=0;g<p.length;g++)if("="===p[g].cmd){var m=t.getItemGraphicEl(p[g].idx1);m&&f.push({el:m,ptIdx:g})}a.animators&&a.animators.length&&a.animators[0].during(function(){for(var t=0;t<f.length;t++)f[t].el.attr("position",a.shape.__points[f[t].ptIdx])})},remove:function(t){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(t,e){t.__temp&&(i.remove(t),n.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var dw=function(t,a,r){return{seriesType:t,performRawSeries:!0,reset:function(s,t,e){var i=s.getData(),n=s.get("symbol")||a,l=s.get("symbolSize");if(i.setVisual({legendSymbol:r||n,symbol:n,symbolSize:l}),!t.isSeriesFiltered(s)){var o="function"==typeof l;return{dataEach:i.hasItemOption||o?function(t,e){if("function"==typeof l){var i=s.getRawValue(e),n=s.getDataParams(e);t.setItemVisual(e,"symbolSize",l(i,n))}if(t.hasItemOption){var o=t.getItemModel(e),a=o.getShallow("symbol",!0),r=o.getShallow("symbolSize",!0);null!=a&&t.setItemVisual(e,"symbol",a),null!=r&&t.setItemVisual(e,"symbolSize",r)}}:null}}}}},fw=function(t){return{seriesType:t,plan:ux(),reset:function(t){var e=t.getData(),c=t.coordinateSystem,d=t.pipelineContext.large;if(c){var f=k(c.dimensions,function(t){return e.getDimension(e.mapDimension(t))}).slice(0,2),p=f.length;return p&&{progress:function(t,e){for(var i=t.end-t.start,n=d&&new Float32Array(i*p),o=t.start,a=0,r=[],s=[];o<t.end;o++){var l;if(1===p)h=e.get(f[0],o,!0),l=!isNaN(h)&&c.dataToPoint(h,null,s);else{var h=r[0]=e.get(f[0],o,!0),u=r[1]=e.get(f[1],o,!0);l=!isNaN(h)&&!isNaN(u)&&c.dataToPoint(r,null,s)}d?(n[a++]=l?l[0]:NaN,n[a++]=l?l[1]:NaN):e.setItemLayout(o,l&&l.slice()||[NaN,NaN])}d&&e.setLayout("symbolPoints",n)}}}}}},pw={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return e},nearest:function(t){return t[0]}},gw=function(t,e){return Math.round(t.length/2)},mw=function(t){this._axes={},this._dimList=[],this.name=t||""};mw.prototype={constructor:mw,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return k(this._dimList,is,this)},getAxesByScale:function(e){return e=e.toLowerCase(),I(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},o=0;o<i.length;o++){var a=i[o],r=this._axes[a];n[a]=r[e](t[a])}return n}},ns.prototype={constructor:ns,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),o=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=o.toGlobalCoord(o.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale.getExtent(),n=this.getAxis("y").scale.getExtent();return(e=e||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),t[0]),Math.max(i[0],i[1])),e[1]=Math.min(Math.max(Math.min(n[0],n[1]),t[1]),Math.max(n[0],n[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},a(ns,mw);var vw=function(t,e,i,n,o){Y_.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"};vw.prototype={constructor:vw,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[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},a(vw,Y_);var yw={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)"]}}},xw={};xw.categoryAxis=g({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},yw),xw.valueAxis=g({boundaryGap:[0,0],splitNumber:5},yw),xw.timeAxis=E({scale:!0,min:"dataMin",max:"dataMax"},xw.valueAxis),xw.logAxis=E({scale:!0,logBase:10},xw.valueAxis);var _w=["value","category","time","log"],ww=function(a,t,r,e){L(_w,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?ho(t):{};g(t,e.getTheme().get(o+"Axis")),g(t,this.getDefaultOption()),t.type=r(a,t),i&&lo(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=fr.createByAxisModel(this))},getCategories:function(){if("category"===this.option.type)return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:u([{},xw[o+"Axis"],e],!0)})}),by.registerSubTypeDefaulter(a+"Axis",z(r,a))},bw=by.extend({type:"cartesian2dAxis",axis:null,init:function(){bw.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){bw.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){bw.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});g(bw.prototype,E_);var Sw={offset:0};ww("x",bw,os,Sw),ww("y",bw,os,Sw),by.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 Mw=L,Iw=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0<i&&0<n||i<0&&n<0)},Tw=Tr,Aw=rs.prototype;Aw.type="grid",Aw.axisPointerEnabled=!0,Aw.getRect=function(){return this._rect},Aw.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),Mw(i.x,function(t){Tw(t.scale,t.model)}),Mw(i.y,function(t){Tw(t.scale,t.model)}),Mw(i.x,function(t){ss(i,"y",t)}),Mw(i.y,function(t){ss(i,"x",t)}),this.resize(this.model,e)},Aw.resize=function(t,e,i){function n(){Mw(o,function(t){var e,i,n,o,a=t.isHorizontal(),r=a?[0,l.width]:[0,l.height],s=t.inverse?1:0;t.setExtent(r[s],r[1-s]),e=t,i=a?l.x:l.y,n=e.getExtent(),o=n[0]+n[1],e.toGlobalCoord="x"===e.dim?function(t){return t+i}:function(t){return o-t+i},e.toLocalCoord="x"===e.dim?function(t){return t-i}:function(t){return o-t+i}})}var l=ro(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=l;var o=this._axesList;n(),!i&&t.get("containLabel")&&(Mw(o,function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e,i,n,o,a,r,s,l,h,u=t.model,c=u.get("axisLabel.show")?u.getFormattedLabels():[],d=u.getModel("axisLabel"),f=1,p=c.length;40<p&&(f=Math.ceil(p/40));for(var g=0;g<p;g+=f)if(!t.isLabelIgnored(g)){var m=(i=d.getTextRect(c[g]),n=d.get("rotate")||0,o=n*Math.PI/180,a=i.plain(),r=a.width,s=a.height,l=r*Math.cos(o)+s*Math.sin(o),h=r*Math.sin(o)+s*Math.cos(o),new Xt(a.x,a.y,l,h));e?e.union(m):e=m}return e}(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");l[i]-=e[i]+n,"top"===t.position?l.y+=e.height+n:"left"===t.position&&(l.x+=e.width+n)}}}),n())},Aw.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]}},Aw.getAxes=function(){return this._axesList.slice()},Aw.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}R(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;n<o.length;n++)if(o[n].getAxis("x").index===t||o[n].getAxis("y").index===e)return o[n]},Aw.getCartesians=function(){return this._coordsList.slice()},Aw.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},Aw.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},Aw._findConvertTarget=function(t,e){var i,n,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;return o?y(l,i=o.coordinateSystem)<0&&(i=null):a&&r?i=this.getCartesian(a.componentIndex,r.componentIndex):a?n=this.getAxis("x",a.componentIndex):r?n=this.getAxis("y",r.componentIndex):s&&s.coordinateSystem===this&&(i=this._coordsList[0]),{cartesian:i,axis:n}},Aw.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Aw._initCartesian=function(r,t,e){function i(a){return function(t,e){if(as(t,r)){var i=t.get("position");"x"===a?"top"!==i&&"bottom"!==i&&s[i="bottom"]&&(i="top"===i?"bottom":"top"):"left"!==i&&"right"!==i&&s[i="left"]&&(i="left"===i?"right":"left"),s[i]=!0;var n=new vw(a,Ar(t),[0,0],t.get("type"),i),o="category"===n.type;n.onBand=o&&t.get("boundaryGap"),n.inverse=t.get("inverse"),n.onZero=t.get("axisLine.onZero"),n.onZeroAxisIndex=t.get("axisLine.onZeroAxisIndex"),(t.axis=n).model=t,n.grid=this,n.index=e,this._axesList.push(n),l[a][e]=n,h[a]++}}}var s={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},h={x:0,y:0};if(t.eachComponent("xAxis",i("x"),this),t.eachComponent("yAxis",i("y"),this),!h.x||!h.y)return this._axesMap={},void(this._axesList=[]);this._axesMap=l,Mw(l.x,function(o,a){Mw(l.y,function(t,e){var i="x"+a+"y"+e,n=new ns(i);n.grid=this,n.model=r,this._coordsMap[i]=n,this._coordsList.push(n),n.addAxis(o),n.addAxis(t)},this)},this)},Aw._updateScale=function(t,l){function h(e,i,t){Mw(e.mapDimension(i.dim,!0),function(t){i.scale.unionExtentFromData(e,t)})}L(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(t){if(us(t)){var e=hs(t),i=e[0],n=e[1];if(!as(i,l)||!as(n,l))return;var o=this.getCartesian(i.componentIndex,n.componentIndex),a=t.getData(),r=o.getAxis("x"),s=o.getAxis("y");"list"===a.type&&(h(a,r),h(a,s))}},this)},Aw.getTooltipAxes=function(n){var o=[],a=[];return Mw(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),i=t.getOtherAxis(e);y(o,e)<0&&o.push(e),y(a,i)<0&&a.push(i)}),{baseAxes:o,otherAxes:a}};var Dw=["xAxis","yAxis"];rs.create=function(n,o){var a=[];return n.eachComponent("grid",function(t,e){var i=new rs(t,n,o);i.name="grid_"+e,i.resize(t,o,!0),t.coordinateSystem=i,a.push(i)}),n.eachSeries(function(t){if(us(t)){var e=hs(t),i=e[0],n=e[1],o=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(i.componentIndex,n.componentIndex)}}),a},rs.dimensions=rs.prototype.dimensions=ns.prototype.dimensions,So.register("cartesian2d",rs);var Cw=Math.PI,Lw=function(t,e){this.opt=e,this.axisModel=t,E(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new _g;var i=new _g({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Lw.prototype={constructor:Lw,hasBuilder:function(t){return!!kw[t]},add:function(t){kw[t].call(this)},getGroup:function(){return this.group}};var kw={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,o=[i[0],0],a=[i[1],0];n&&(Q(o,o,n),Q(a,a,n));var r=P({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Ev(Ji({anid:"line",shape:{x1:o[0],y1:o[1],x2:a[0],y2:a[1]},style:r,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize");if(null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var h=l[0],u=l[1];L([[t.rotation+Math.PI/2,o],[t.rotation-Math.PI/2,a]],function(t,e){if("none"!==s[e]&&null!=s[e]){var i=Pr(s[e],-h/2,-u/2,h,u,r.stroke,!0);i.attr({rotation:t[0],position:t[1],silent:!0}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(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"),r=o.get("length"),s=Nw(o,i.labelInterval),l=n.getTicksCoords(o.get("alignWithLabel")),h=n.scale.getTicks(),u=e.get("axisLabel.showMinLabel"),c=e.get("axisLabel.showMaxLabel"),d=[],f=[],p=t._transform,g=[],m=l.length,v=0;v<m;v++)if(!Ow(n,v,s,m,u,c)){var y=l[v];d[0]=y,f[d[1]=0]=y,f[1]=i.tickDirection*r,p&&(Q(d,d,p),Q(f,f,p));var x=new Ev(Ji({anid:"tick_"+h[v],shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]},style:E(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(x),g.push(x)}return g}}(this,t,e);!function(t,e,i){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");i=i||[];var a=(e=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?(fs(a),fs(h)):ps(a,r)&&(n?(fs(r),fs(u)):(fs(a),fs(h))),!1===o?(fs(s),fs(c)):ps(l,s)&&(o?(fs(l),fs(d)):(fs(s),fs(c)))}(t,function(s,l,h){var u=l.axis;if(B(h.axisLabelShow,l.get("axisLabel.show"))&&!u.scale.isBlank()){var c=l.getModel("axisLabel"),d=c.get("margin"),f=u.scale.getTicks(),p=l.getFormattedLabels(),t=(B(h.labelRotate,c.get("rotate"))||0)*Cw/180,g=Pw(h.rotation,t,h.labelDirection),m=l.getCategories(),v=[],y=ds(l),x=l.get("triggerEvent"),_=l.get("axisLabel.showMinLabel"),w=l.get("axisLabel.showMaxLabel");return L(f,function(t,e){if(!Ow(u,e,h.labelInterval,f.length,_,w)){var i=c;m&&m[t]&&m[t].textStyle&&(i=new kn(m[t].textStyle,c,l.ecModel));var n=i.getTextColor()||l.get("axisLine.lineStyle.color"),o=[u.dataToCoord(t),h.labelOffset+h.labelDirection*d],a=u.scale.getLabel(t),r=new Tv({anid:"label_"+t,position:o,rotation:g.rotation,silent:y,z2:10});mn(r.style,i,{text:p[e],textAlign:i.getShallow("align",!0)||g.textAlign,textVerticalAlign:i.getShallow("verticalAlign",!0)||i.getShallow("baseline",!0)||g.textVerticalAlign,textFill:"function"==typeof n?n("category"===u.type?a:"value"===u.type?t+"":t,e):n}),x&&(r.eventData=cs(l),r.eventData.targetType="axisLabel",r.eventData.value=a),s._dumbGroup.add(r),r.updateTransform(),v.push(r),s.group.add(r),r.decomposeTransform()}}),v}}(this,t,e),i)},axisName:function(){var t,e,i,n,o,a,r=this.opt,s=this.axisModel,l=B(r.axisName,s.get("name"));if(l){var h,u,c=s.get("nameLocation"),d=r.nameDirection,f=s.getModel("nameTextStyle"),p=s.get("nameGap")||0,g=this.axisModel.axis.getExtent(),m=g[0]>g[1]?-1:1,v=["start"===c?g[0]-m*p:"end"===c?g[1]+m*p:(g[0]+g[1])/2,gs(c)?r.labelOffset+d*p:0],y=s.get("nameRotate");null!=y&&(y=y*Cw/180),gs(c)?h=Pw(r.rotation,null!=y?y:r.rotation,d):(t=c,e=g,n=Hn((y||0)-r.rotation),o=e[0]>e[1],a="start"===t&&!o||"start"!==t&&o,h={rotation:n,textAlign:Zn(n-Cw/2)?(i=a?"bottom":"top","center"):Zn(n-1.5*Cw)?(i=a?"top":"bottom","center"):(i="middle",n<1.5*Cw&&Cw/2<n?a?"left":"right":a?"right":"left"),textVerticalAlign:i},null!=(u=r.axisNameAvailableWidth)&&(u=Math.abs(u/Math.sin(h.rotation)),!isFinite(u)&&(u=null)));var x=f.getFont(),_=s.get("nameTruncate",!0)||{},w=_.ellipsis,b=B(r.nameTruncateMaxWidth,_.maxWidth,u),S=null!=w&&null!=b?fy(l,b,x,w,{minChar:2,placeholder:_.placeholder}):l,M=s.get("tooltip",!0),I=s.mainType,T={componentType:I,name:l,$vars:["name"]};T[I+"Index"]=s.componentIndex;var A=new Tv({anid:"name",__fullText:l,__truncatedText:S,position:v,rotation:h.rotation,silent:ds(s),z2:1,tooltip:M&&M.show?P({content:l,formatter:function(){return l},formatterParams:T},M):null});mn(A.style,f,{text:S,textFont:x,textFill:f.getTextColor()||s.get("axisLine.lineStyle.color"),textAlign:h.textAlign,textVerticalAlign:h.textVerticalAlign}),s.get("triggerEvent")&&(A.eventData=cs(s),A.eventData.targetType="axisName",A.eventData.name=l),this._dumbGroup.add(A),A.updateTransform(),this.group.add(A),A.decomposeTransform()}}},Pw=Lw.innerTextLayout=function(t,e,i){var n,o=Hn(e-t);return{rotation:o,textAlign:Zn(o)?(n=0<i?"top":"bottom","center"):Zn(o-Cw)?(n=0<i?"bottom":"top","center"):(n="middle",0<o&&o<Cw?0<i?"right":"left":0<i?"left":"right"),textVerticalAlign:n}},Ow=Lw.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?!i(r=s.getTicks()[e],s.getLabel(r)):e%(i+1))},Nw=Lw.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i},Ew=L,zw=z,Rw=Xa({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&function(t){var e=ys(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=xs(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<l[0]&&(r=l[0]),o.value=r,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}(t),Rw.superApply(this,"render",arguments),ws(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,o){ws(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Rw.superApply(this,"remove",arguments)},dispose:function(t,e){bs(this,e),Rw.superApply(this,"dispose",arguments)}}),Bw=[];Rw.registerAxisPointerClass=function(t,e){Bw[t]=e},Rw.getAxisPointerClass=function(t){return t&&Bw[t]};var Vw=Lw.ifIgnoreOnTick,Gw=Lw.getInterval,Ww=["axisLine","axisTickLabel","axisName"],Fw=["splitArea","splitLine"],Hw=Rw.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _g,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),r=Ss(a,e),s=new Lw(e,r);L(Ww,s.add,s),this._axisGroup.add(s.getGroup()),L(Fw,function(t){e.get(t+".show")&&this["_"+t](e,a,r.labelInterval)},this),Dn(o,this._axisGroup,e),Hw.superCall(this,"render",e,t,i,n)}},_splitLine:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var o=t.getModel("splitLine"),a=o.getModel("lineStyle"),r=a.get("color"),s=Gw(o,i);r=O(r)?r:[r];for(var l=e.coordinateSystem.getRect(),h=n.isHorizontal(),u=0,c=n.getTicksCoords(),d=n.scale.getTicks(),f=t.get("axisLabel.showMinLabel"),p=t.get("axisLabel.showMaxLabel"),g=[],m=[],v=a.getLineStyle(),y=0;y<c.length;y++)if(!Vw(n,y,s,c.length,f,p)){var x=n.toGlobalCoord(c[y]);m[1]=h?(g[0]=x,g[1]=l.y,m[0]=x,l.y+l.height):(g[0]=l.x,g[1]=x,m[0]=l.x+l.width,x);var _=u++%r.length;this._axisGroup.add(new Ev(Ji({anid:"line_"+d[y],shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},style:E({stroke:r[_]},v),silent:!0})))}}},_splitArea:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var o=t.getModel("splitArea"),a=o.getModel("areaStyle"),r=a.get("color"),s=e.coordinateSystem.getRect(),l=n.getTicksCoords(),h=n.scale.getTicks(),u=n.toGlobalCoord(l[0]),c=n.toGlobalCoord(l[0]),d=0,f=Gw(o,i),p=a.getAreaStyle();r=O(r)?r:[r];for(var g=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=1;v<l.length;v++)if(!Vw(n,v,f,l.length,g,m)){var y,x,_,w,b=n.toGlobalCoord(l[v]);w=n.isHorizontal()?(y=u,x=s.y,_=b-y,s.height):(y=s.x,x=c,_=s.width,b-x);var S=d++%r.length;this._axisGroup.add(new Nv({anid:"area_"+h[v],shape:{x:y,y:x,width:_,height:w},style:E({fill:r[S]},p),silent:!0})),u=y+_,c=x+w}}}});Hw.extend({type:"xAxis"}),Hw.extend({type:"yAxis"}),Xa({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Nv({shape:t.coordinateSystem.getRect(),style:E({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Ba(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Ha(dw("line","circle","line")),Fa(fw("line")),Va(zx.PROCESSOR.STATISTIC,{seriesType:"line",reset:function(t,e,i){var n=t.getData(),o=t.get("sampling"),a=t.coordinateSystem;if("cartesian2d"===a.type&&o){var r,s=a.getBaseAxis(),l=a.getOtherAxis(s),h=s.getExtent(),u=h[1]-h[0],c=Math.round(n.count()/u);1<c&&("string"==typeof o?r=pw[o]:"function"==typeof o&&(r=o),r&&t.setData(n.downSample(l.dim,1/c,r,gw)))}}});var Zw=sx.extend({type:"series.__base_bar__",getInitialData:function(t,e){return cr(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,itemStyle:{},emphasis:{}}});Zw.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect"});var Uw=_m([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jw=["itemStyle","barBorderWidth"];P(kn.prototype,{getBarItemStyle:function(t){var e=Uw(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}}),qa({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||this._render(t,e,i),this.group},dispose:M,_render:function(a,t,e){var r,s=this.group,l=a.getData(),h=this._data,u=a.coordinateSystem,i=u.getBaseAxis();"cartesian2d"===u.type?r=i.isHorizontal():"polar"===u.type&&(r="angle"===i.dim);var c=a.isAnimationEnabled()?a:null;l.diff(h).add(function(t){if(l.hasValue(t)){var e=l.getItemModel(t),i=Yw[u.type](l,t,e),n=Xw[u.type](l,t,e,i,r,c);l.setItemGraphicEl(t,n),s.add(n),Ds(n,l,t,e,i,a,r,"polar"===u.type)}}).update(function(t,e){var i=h.getItemGraphicEl(e);if(l.hasValue(t)){var n=l.getItemModel(t),o=Yw[u.type](l,t,n);i?Sn(i,{shape:o},c,t):i=Xw[u.type](l,t,n,o,r,c,!0),l.setItemGraphicEl(t,i),s.add(i),Ds(i,l,t,n,o,a,r,"polar"===u.type)}else s.remove(i)}).remove(function(t){var e=h.getItemGraphicEl(t);"cartesian2d"===u.type?e&&Ts(t,c,e):e&&As(t,c,e)}).execute(),this._data=l},remove:function(e,t){var i=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(t){"sector"===t.type?As(t.dataIndex,e,t):Ts(t.dataIndex,e,t)}):i.removeAll()}});var Xw={cartesian2d:function(t,e,i,n,o,a,r){var s=new Nv({shape:P({},n)});if(a){var l=o?"height":"width",h={};s.shape[l]=0,h[l]=n[l],qv[r?"updateProps":"initProps"](s,{shape:h},a,e)}return s},polar:function(t,e,i,n,o,a,r){var s=new Lv({shape:P({},n)});if(a){var l=o?"r":"endAngle",h={};s.shape[l]=o?0:n.startAngle,h[l]=n[l],qv[r?"updateProps":"initProps"](s,{shape:h},a,e)}return s}},Yw={cartesian2d:function(t,e,i){var n,o,a=t.getItemLayout(e),r=(n=a,o=i.get(jw)||0,Math.min(o,Math.abs(n.width),Math.abs(n.height))),s=0<a.width?1:-1,l=0<a.height?1:-1;return{x:a.x+s*r/2,y:a.y+l*r/2,width:a.width-s*r,height:a.height-l*r}},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}}};Fa(z(Sr,"bar")),Ha(function(t){t.eachSeriesByType("bar",function(t){t.getData().setVisual("legendSymbol","roundRect")})});var qw=function(t,e,i){e=O(e)&&{coordDimensions:e}||P({},e);var n=t.getSource(),o=f_(n,e),a=new u_(o,t);return a.initData(n,i),a},$w={updateSelectedMap:function(t){if(O(t))this._targetList=t.slice();else for(var e=t,i=e.mapDimension("value"),n=(t=this._targetList=[],0),o=e.count();n<o;n++)t.push({name:e.getName(n),value:e.get(i,n),selected:Fo(e,n,"selected")});this._selectTargetMap=p(t||[],function(t,e){return t.set(e.name,e),t},C())},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}},Kw=Ya({type:"series.pie",init:function(t){Kw.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this.getRawData()),this._defaultLabelLine(t)},mergeOption:function(t){Kw.superCall(this,"mergeOption",t),this.updateSelectedMap(this.getRawData())},getInitialData:function(t,e){return qw(this,["value"])},getDataParams:function(t){var e=this.getData(),i=Kw.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Fn(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){ti(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.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:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});o(Kw,$w);var Jw=ks.prototype;Jw.updateData=function(t,e,i){function n(){a.stopAnimation(!0),a.animateTo({shape:{r:l.r+r.get("hoverOffset")}},300,"elasticOut")}function o(){a.stopAnimation(!0),a.animateTo({shape:{r:l.r}},300,"elasticOut")}var a=this.childAt(0),r=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),h=P({},l);h.label=null,i?(a.setShape(h),"scale"===r.getShallow("animationType")?(a.shape.r=l.r0,Mn(a,{shape:{r:l.r}},r,e)):(a.shape.endAngle=l.startAngle,Sn(a,{shape:{endAngle:l.endAngle}},r,e))):Sn(a,{shape:h},r,e);var u=t.getItemVisual(e,"color");a.useStyle(E({lineJoin:"bevel",fill:u},s.getModel("itemStyle").getItemStyle())),a.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var c=s.getShallow("cursor");c&&a.attr("cursor",c),Ls(this,t.getItemLayout(e),r.isSelected(null,e),r.get("selectedOffset"),r.get("animation")),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),s.get("hoverAnimation")&&r.isAnimationEnabled()&&a.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updateLabel(t,e),pn(this)},Jw._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");Sn(i,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),Sn(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"),h=a.getModel("emphasis.label"),u=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color");gn(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})},a(ks,_g),Jo.extend({type:"pie",init:function(){var t=new _g;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=z(Cs,this.uid,t,s,i),c=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new ks(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&&0<o.count()&&"scale"!==h){var d=o.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=_(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r){var s=new Lv({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return Mn(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 Qw=function(i,t){L(t,function(a){a.update="updateView",Ga(a,function(t,e){var o={};return e.eachComponent({mainType:"series",subType:i,query:t},function(i){i[a.method]&&i[a.method](t.name,t.dataIndex);var n=i.getData();n.each(function(t){var e=n.getName(t);o[e]=i.isSelected(e)||!1})}),{name:t.name,selected:o}})})},tb=function(n){return{getTargetSeries:function(t){var e={},i=C();return t.eachSeriesByType(n,function(t){t.__paletteScope=e,i.set(t.uid,t)}),i},reset:function(o,t){var a=o.getRawData(),r={},s=o.getData();s.each(function(t){var e=s.getRawIndex(t);r[e]=t}),a.each(function(t){var e=r[t],i=null!=e&&s.getItemVisual(e,"color",!0);if(i)a.setItemVisual(t,"color",i);else{var n=a.getItemModel(t).get("itemStyle.color")||o.getColorFromPalette(a.getName(t),o.__paletteScope,a.count());a.setItemVisual(t,"color",n),null!=e&&s.setItemVisual(e,"color",n)}})}}},eb=function(M,I,t,e){var T,A,D=M.getData(),C=[],L=!1;D.each(function(t){var e,i,n,o,a=D.getItemLayout(t),r=D.getItemModel(t),s=r.getModel("label"),l=s.get("position")||r.get("emphasis.label.position"),h=r.getModel("labelLine"),u=h.get("length"),c=h.get("length2"),d=(a.startAngle+a.endAngle)/2,f=Math.cos(d),p=Math.sin(d);T=a.cx,A=a.cy;var g="inside"===l||"inner"===l;if("center"===l)e=a.cx,i=a.cy,o="center";else{var m=(g?(a.r+a.r0)/2*f:a.r*f)+T,v=(g?(a.r+a.r0)/2*p:a.r*p)+A;if(e=m+3*f,i=v+3*p,!g){var y=m+f*(u+I-a.r),x=v+p*(u+I-a.r),_=y+(f<0?-1:1)*c;e=_+(f<0?-5:5),n=[[m,v],[y,x],[_,i=x]]}o=g?"center":0<f?"left":"right"}var w=s.getFont(),b=s.get("rotate")?f<0?-d+Math.PI:-d:0,S=le(M.getFormattedLabel(t,"normal")||D.getName(t),w,o,"top");L=!!b,a.label={x:e,y:i,position:l,height:S.height,len:u,len2:c,linePoints:n,textAlign:o,verticalAlign:"middle",rotation:b,inside:g},g||C.push(a.label)}),!L&&M.get("avoidLabelOverlap")&&function(t,e,i,n,o,a){for(var r=[],s=[],l=0;l<t.length;l++)t[l].x<e?r.push(t[l]):s.push(t[l]);for(Ps(s,e,i,n,1,0,a),Ps(r,e,i,n,-1,0,a),l=0;l<t.length;l++){var h=t[l].linePoints;if(h){var u=h[1][0]-h[2][0];t[l].x<e?h[2][0]=t[l].x+3:h[2][0]=t[l].x-3,h[1][1]=h[2][1]=t[l].y,h[1][0]=h[2][0]+u}}}(C,T,A,I,0,e)},ib=2*Math.PI,nb=Math.PI/180,ob=function(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var o=t.getData();o.filterSelf(function(t){for(var e=o.getName(t),i=0;i<n.length;i++)if(!n[i].isSelected(e))return!1;return!0},this)}}}};Qw("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Ha(tb("pie")),Fa(z(function(t,e,T,i){e.eachSeriesByType(t,function(t){var o=t.getData(),e=o.mapDimension("value"),i=t.get("center"),n=t.get("radius");O(n)||(n=[0,n]),O(i)||(i=[i,i]);var a=T.getWidth(),r=T.getHeight(),s=Math.min(a,r),l=zn(i[0],a),h=zn(i[1],r),u=zn(n[0],s/2),c=zn(n[1],s/2),d=-t.get("startAngle")*nb,f=t.get("minAngle")*nb,p=0;o.each(e,function(t){!isNaN(t)&&p++});var g=o.getSum(e),m=Math.PI/(g||p)*2,v=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),_=o.getDataExtent(e);_[0]=0;var w=ib,b=0,S=d,M=v?1:-1;if(o.each(e,function(t,e){var i;if(isNaN(t))o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:l,cy:h,r0:u,r:y?NaN:c});else{(i="area"!==y?0===g&&x?m:t*m:ib/p)<f?w-=i=f:b+=t;var n=S+M*i;o.setItemLayout(e,{angle:i,startAngle:S,endAngle:n,clockwise:v,cx:l,cy:h,r0:u,r:y?En(t,_,[u,c]):c}),S=n}},!0),w<ib&&p)if(w<=.001){var I=ib/p;o.each(e,function(t,e){if(!isNaN(t)){var i=o.getItemLayout(e);i.angle=I,i.startAngle=d+M*e*I,i.endAngle=d+M*(e+1)*I}})}else m=w/b,S=d,o.each(e,function(t,e){if(!isNaN(t)){var i=o.getItemLayout(e),n=i.angle===f?f:t*m;i.startAngle=S,i.endAngle=S+M*n,S+=M*n}});eb(t,c,0,r)})},"pie")),Va(ob("pie")),sx.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return cr(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},progressive:null}});var ab=Xi({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var i=e.points,n=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var r=0;r<i.length;){var s=i[r++],l=i[r++];isNaN(s)||isNaN(l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var o=0;o<i.length;){var a=i[o++],r=i[o++];isNaN(a)||isNaN(r)||t.fillRect(a-n[0]/2,r-n[1]/2,n[0],n[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,o=i.size,a=Math.max(o[0],4),r=Math.max(o[1],4),s=n.length/2-1;0<=s;s--){var l=2*s,h=n[l]-a/2,u=n[l+1]-r/2;if(h<=t&&u<=e&&t<=h+a&&e<=u+r)return s}return-1}}),rb=Os.prototype;rb.isPersistent=function(){return!this._incremental},rb.updateData=function(t){this.group.removeAll();var e=new ab({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},rb.updateLayout=function(t){if(!this._incremental){var n=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var e=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;n=new Float32Array(n.buffer,i,e)}t.setShape("points",n)})}},rb.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new ji({silent:!0})),this.group.add(this._incremental)):this._incremental=null},rb.incrementalUpdate=function(t,e){var i;this._incremental?(i=new ab,this._incremental.addDisplayable(i,!0)):((i=new ab({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental)},rb._setCommon=function(i,t,e){var n=t.hostModel,o=t.getVisual("symbolSize");i.setShape("size",o instanceof Array?o:[o,o]),i.symbolProxy=Pr(t.getVisual("symbol"),0,0,0,0),i.setColor=i.symbolProxy.setColor;var a=i.shape.size[0]<4;i.useStyle(n.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var r=t.getVisual("color");r&&i.setColor(r),e||(i.seriesIndex=n.seriesIndex,i.on("mousemove",function(t){i.dataIndex=null;var e=i.findDataIndex(t.offsetX,t.offsetY);0<=e&&(i.dataIndex=e+(i.startIndex||0))}))},rb.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},rb._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},qa({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||1e4<n.count()||!this._symbolDraw.isPersistent())return{update:!0};var o=fw().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Os:new Fr,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Ha(dw("scatter","circle")),Fa(fw("scatter")),a(Ns,Y_),Es.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Es.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},Es.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},Es.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;l<this._indicatorAxes.length;l++){var h=this._indicatorAxes[l],u=Math.abs(a-h.angle);u<r&&(o=h,s=l,r=u)}return[s,+(o&&o.coodToData(n))]},Es.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=zn(i[0],n),this.cy=zn(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180,this.r=zn(t.get("radius"),a),L(this._indicatorAxes,function(t,e){t.setExtent(0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},Es.prototype.update=function(n,t){function d(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var o=this._indicatorAxes,a=this._model;L(o,function(t){t.scale.setExtent(1/0,-1/0)}),n.eachSeriesByType("radar",function(t,e){if("radar"===t.get("coordinateSystem")&&n.getComponent("radar",t.get("radarIndex"))===a){var i=t.getData();L(o,function(t){t.scale.unionExtentFromData(i,i.mapDimension(t.dim))})}},this);var f=a.get("splitNumber");L(o,function(t,e){var i=Ir(t.scale,t.model);Tr(t.scale,t.model);var n=t.model,o=t.scale,a=n.getMin(),r=n.getMax(),s=o.getInterval();if(null!=a&&null!=r)o.setExtent(+a,+r),o.setInterval((r-a)/f);else if(null!=a)for(var l;l=a+s*f,o.setExtent(+a,l),o.setInterval(s),s=d(s),l<i[1]&&isFinite(l)&&isFinite(i[1]););else if(null!=r)for(var h;h=r-s*f,o.setExtent(h,+r),o.setInterval(s),s=d(s),h>i[0]&&isFinite(h)&&isFinite(i[0]););else{o.getTicks().length-1>f&&(s=d(s));var u=Math.round((i[0]+i[1])/2/s)*s,c=Math.round(f/2);o.setExtent(Rn(u-c*s),Rn(u+(f-c)*s)),o.setInterval(s)}})},Es.dimensions=[],Es.create=function(i,n){var o=[];return i.eachComponent("radar",function(t){var e=new Es(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("radarIndex")||0])}),o},So.register("radar",Es);var sb=xw.valueAxis,lb=(ja({type:"radar",optionUpdated:function(){var o=this.get("boundaryGap"),a=this.get("splitNumber"),r=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"),f=this.get("nameGap"),p=this.get("triggerEvent"),t=k(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=u;if(null!=t.color&&(e=E({color:t.color},u)),t=g(D(t),{boundaryGap:o,splitNumber:a,scale:r,axisLine:s,axisTick:l,axisLabel:h,name:t.text,nameLocation:"end",nameGap:f,nameTextStyle:e,triggerEvent:p},!1),c||(t.name=""),"string"==typeof d){var i=t.name;t.name=d.replace("{value}",null!=i?i:"")}else"function"==typeof d&&(t.name=d(t.name,t));var n=P(new kn(t,null,this.ecModel),E_);return n.mainType="radar",n.componentIndex=this.componentIndex,n},this);this.getIndicatorModels=function(){return t}},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:g({lineStyle:{color:"#bbb"}},sb.axisLine),axisLabel:zs(sb.axisLabel,!1),axisTick:zs(sb.axisTick,!1),splitLine:zs(sb.splitLine,!0),splitArea:zs(sb.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Xa({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;L(k(e.getIndicatorAxes(),function(t){return new Lw(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){L(lb,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 n=t.coordinateSystem,i=n.getIndicatorAxes();if(i.length){var o=t.get("shape"),a=t.getModel("splitLine"),r=t.getModel("splitArea"),s=a.getModel("lineStyle"),l=r.getModel("areaStyle"),h=a.get("show"),u=r.get("show"),c=s.get("color"),d=l.get("color");c=O(c)?c:[c],d=O(d)?d:[d];var f=[],p=[];if("circle"===o)for(var g=i[0].getTicksCoords(),m=n.cx,v=n.cy,y=0;y<g.length;y++)h&&f[M=e(f,c,y)].push(new Av({shape:{cx:m,cy:v,r:g[y]}})),u&&y<g.length-1&&p[M=e(p,d,y)].push(new kv({shape:{cx:m,cy:v,r0:g[y],r:g[y+1]}}));else{var x,_=k(i,function(t,e){var i=t.getTicksCoords();return x=null==x?i.length-1:Math.min(i.length-1,x),k(i,function(t){return n.coordToPoint(t,e)})}),w=[];for(y=0;y<=x;y++){for(var b=[],S=0;S<i.length;S++)b.push(_[S][y]);if(b[0]&&b.push(b[0].slice()),h&&f[M=e(f,c,y)].push(new Ov({shape:{points:b}})),u&&w){var M=e(p,d,y-1);p[M].push(new Pv({shape:{points:b.concat(w)}}))}w=b.slice().reverse()}}var I=s.getLineStyle(),T=l.getAreaStyle();L(p,function(t,e){this.group.add(Yv(t,{style:E({stroke:"none",fill:d[e%d.length]},T),silent:!0}))},this),L(f,function(t,e){this.group.add(Yv(t,{style:E({fill:"none",stroke:c[e%c.length]},I),silent:!0}))},this)}}});var hb=sx.extend({type:"series.radar",dependencies:["radar"],init:function(t){hb.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){return qw(this,{extraPrefix:"indicator_",extraFromZero:!0})},formatTooltip:function(n){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(n);return Qn(""===e?this.name:e)+"<br/>"+k(t,function(t,e){var i=o.get(o.mapDimension(t.dim),n);return Qn(t.name+" : "+i)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});qa({type:"radar",render:function(l,t,e){function h(t,e){var i,n=t.getItemVisual(e,"symbol")||"circle",o=t.getItemVisual(e,"color");if("none"!==n){var a=(O(i=t.getItemVisual(e,"symbolSize"))||(i=[+i,+i]),i),r=Pr(n,-1,-1,2,2,o);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function s(t,e,i,n,o,a){i.removeAll();for(var r=0;r<e.length-1;r++){var s=h(n,o);s&&(t[s.__dimIdx=r]?(s.attr("position",t[r]),qv[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),i.add(s))}}function u(t){return k(t,function(t){return[i.cx,i.cy]})}var i=l.coordinateSystem,v=this.group,y=l.getData(),c=this._data;y.diff(c).add(function(t){var e=y.getItemLayout(t);if(e){var i=new Pv,n=new Ov,o={shape:{points:e}};i.shape.points=u(e),n.shape.points=u(e),Mn(i,o,l,t),Mn(n,o,l,t);var a=new _g,r=new _g;a.add(n),a.add(i),a.add(r),s(n.shape.points,e,r,y,t,!0),y.setItemGraphicEl(t,a)}}).update(function(t,e){var i=c.getItemGraphicEl(e),n=i.childAt(0),o=i.childAt(1),a=i.childAt(2),r={shape:{points:y.getItemLayout(t)}};r.shape.points&&(s(n.shape.points,r.shape.points,a,y,t,!1),Sn(n,r,l),Sn(o,r,l),y.setItemGraphicEl(t,i))}).remove(function(t){v.remove(c.getItemGraphicEl(t))}).execute(),y.eachItemGraphicEl(function(t,e){function i(){r.attr("ignore",d)}function n(){r.attr("ignore",c)}var o=y.getItemModel(e),a=t.childAt(0),r=t.childAt(1),s=t.childAt(2),l=y.getItemVisual(e,"color");v.add(t),a.useStyle(E(o.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),a.hoverStyle=o.getModel("emphasis.lineStyle").getLineStyle();var h=o.getModel("areaStyle"),u=o.getModel("emphasis.areaStyle"),c=h.isEmpty()&&h.parentModel.isEmpty(),d=u.isEmpty()&&u.parentModel.isEmpty();d=d&&c,r.ignore=c,r.useStyle(E(h.getAreaStyle(),{fill:l,opacity:.7})),r.hoverStyle=u.getAreaStyle();var f=o.getModel("itemStyle").getItemStyle(["color"]),p=o.getModel("emphasis.itemStyle").getItemStyle(),g=o.getModel("label"),m=o.getModel("emphasis.label");s.eachChild(function(t){t.setStyle(f),t.hoverStyle=D(p),gn(t.style,t.hoverStyle,g,m,{labelFetcher:y.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:y.get(y.dimensions[t.__dimIdx],e),autoColor:l,isRectText:!0})}),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",i).on("mouseover",i).on("normal",n).on("mouseout",n),pn(t)}),this._data=y},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),Ha(tb("radar")),Ha(dw("radar","circle")),Fa(function(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){for(var o=n.getIndicatorAxes(),a=0;a<n.getIndicatorAxes().length;a++)e.each(e.mapDimension(o[a].dim),function(t,e){i[e]=i[e]||[],i[e][a]=n.dataToPoint(t,a)});e.each(function(t){i[t][0]&&i[t].push(i[t][0].slice()),e.setItemLayout(t,i[t])})}})}),Va(ob("radar")),Ba(function(i){var t=i.polar;if(t){O(t)||(t=[t]);var n=[];L(t,function(t,e){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),i.radar=i.radar||[],O(i.radar)||(i.radar=[i.radar]),i.radar.push(t)):n.push(t)}),i.polar=n}L(i.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});var ub=sx.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],init:function(t){this._fillOption(t,this.getMapType()),ub.superApply(this,"init",arguments),this.updateSelectedMap(this.getRawData())},getInitialData:function(t){return qw(this,["value"])},mergeOption:function(t){this._fillOption(t,this.getMapType()),ub.superApply(this,"mergeOption",arguments),this.updateSelectedMap(this.getRawData())},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(t,e){},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=Kn(this.getRawValue(t)),n=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(n),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(Qn(o[r].name))}return a.join(", ")+"<br />"+Qn(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)"}}}});o(ub,$w);var cb="\0_ec_interaction_mutex";Ga({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),o(Vs,Bp);var db={axisPointer:1,tooltip:1,brush:1};Js.prototype={constructor:Js,draw:function(x,t,e,i,n){var _="geo"===x.mainType,w=x.getData&&x.getData();_&&t.eachComponent({mainType:"series",subType:"map"},function(t){w||t.getHostGeoModel()!==x||(w=t.getData())});var o=x.coordinateSystem,b=this.group,S=o.scale,a={position:o.position,scale:S};!b.childAt(0)||n?b.attr(a):Sn(b,a,x),b.removeAll();var r,s,l,h,u,M=["itemStyle"],I=["emphasis","itemStyle"],T=["label"],A=["emphasis","label"],D=C();L(o.regions,function(t){var e=D.get(t.name)||D.set(t.name,new _g),i=new Vv({shape:{paths:[]}});e.add(i);var n,o=(y=x.getRegionModel(t.name)||x).getModel(M),a=y.getModel(I),r=$s(o),s=$s(a),l=y.getModel(T),h=y.getModel(A);if(w){n=w.indexOfName(t.name);var u=w.getItemVisual(n,"color",!0);u&&(r.fill=u)}L(t.geometries,function(t){if("polygon"===t.type){i.shape.paths.push(new Pv({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)i.shape.paths.push(new Pv({shape:{points:t.interiors[e]}}))}}),i.setStyle(r),i.style.strokeNoScale=!0,i.culling=!0;var c=l.get("show"),d=h.get("show"),f=w&&isNaN(w.get(w.mapDimension("value"),n)),p=w&&w.getItemLayout(n);if(_||f&&(c||d)||p&&p.showLabel){var g,m=_?t.name:n;(!w||0<=n)&&(g=x);var v=new Tv({position:t.center.slice(),scale:[1/S[0],1/S[1]],z2:10,silent:!0});gn(v.style,v.hoverStyle={},l,h,{labelFetcher:g,labelDataIndex:m,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),e.add(v)}if(w)w.setItemGraphicEl(n,e);else{var y=x.getRegionModel(t.name);i.eventData={componentType:"geo",geoIndex:x.componentIndex,name:t.name,region:y&&y.option||{}}}(e.__regions||(e.__regions=[])).push(t),pn(e,s,{hoverSilentOnTouch:!!x.get("selectedMode")}),b.add(e)}),this._updateController(x,t,e),r=this,s=x,h=e,u=i,(l=b).off("click"),l.off("mousedown"),s.get("selectedMode")&&(l.on("mousedown",function(){r._mouseDownFlag=!0}),l.on("click",function(t){if(r._mouseDownFlag){r._mouseDownFlag=!1;for(var e=t.target;!e.__regions;)e=e.parent;if(e){var i={type:("geo"===s.mainType?"geo":"map")+"ToggleSelect",batch:k(e.__regions,function(t){return{name:t.name,from:u.uid}})};i[s.mainType+"Id"]=s.id,h.dispatchAction(i),Ks(s,l)}}})),Ks(x,b)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(n,t,a){function r(){var t={type:"geoRoam",componentType:i};return t[i+"Id"]=n.id,t}var o=n.coordinateSystem,e=this._controller,s=this._controllerHost;s.zoomLimit=n.get("scaleLimit"),s.zoom=o.getZoom(),e.enable(n.get("roam")||!1);var i=n.mainType;e.off("pan").on("pan",function(t,e){this._mouseDownFlag=!1,Xs(s,t,e),a.dispatchAction(P(r(),{dx:t,dy:e}))},this),e.off("zoom").on("zoom",function(t,e,i){if(this._mouseDownFlag=!1,Ys(s,t,e,i),a.dispatchAction(P(r(),{zoom:t,originX:e,originY:i})),this._updateGroup){var n=this.group,o=n.scale;n.traverse(function(t){"text"===t.type&&t.attr("scale",[1/o[0],1/o[1]])})}},this),e.setPointerChecker(function(t,e,i){return o.getViewRectAfterRoam().contain(e,i)&&!qs(t,a,n)})}},qa({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 Js(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(v,t,e){var y=v.originalData,x=this.group;y.each(y.mapDimension("value"),function(t,e){if(!isNaN(t)){var i=y.getItemLayout(e);if(i&&i.point){var n=i.point,o=i.offset,a=new Av({style:{fill:v.getData().getVisual("color")},shape:{cx:n[0]+9*o,cy:n[1],r:3},silent:!0,z2:o?8:10});if(!o){var r=v.mainSeries.getData(),s=y.getName(e),l=r.indexOfName(s),h=y.getItemModel(e),u=h.getModel("label"),c=h.getModel("emphasis.label"),d=r.getItemGraphicEl(l),f=V(v.getFormattedLabel(e,"normal"),s),p=V(v.getFormattedLabel(e,"emphasis"),f),g=function(){var t=mn({},c,{text:c.get("show")?p:null},{isRectText:!0,useInsideStyle:!1},!0);a.style.extendFrom(t),a.__mapOriginalZ2=a.z2,a.z2+=1},m=function(){mn(a.style,u,{text:u.get("show")?f:null,textPosition:u.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=a.__mapOriginalZ2&&(a.z2=a.__mapOriginalZ2,a.__mapOriginalZ2=null)};d.on("mouseover",g).on("mouseout",m).on("emphasis",g).on("normal",m),m()}x.add(a)}}})}}),Ga({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(n,t){var o=n.componentType||"series";t.eachComponent({mainType:o,query:n},function(t){var e=t.coordinateSystem;if("geo"===e.type){var i=Qs(e,n,t.get("scaleLimit"));t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom),"series"===o&&L(t.seriesGroup,function(t){t.setCenter(i.center),t.setZoom(i.zoom)})}})});var fb=Q;o(tl,Up),el.prototype={constructor:el,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Xt(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new Xt(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new Xt(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=Q([],n,t),i=Q([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),lt(this.transform||(this.transform=[]),e.transform||rt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],ft(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?fb(i,t,n):A(i,t)},pointToData:function(t){var e=this.invTransform;return e?fb([],t,e):[t[0],t[1]]},convertToPixel:z(il,"dataToPoint"),convertFromPixel:z(il,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},o(el,Up);for(var pb=[126,25],gb=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],mb=0;mb<gb.length;mb++)for(var vb=0;vb<gb[mb].length;vb++)gb[mb][vb][0]/=10.5,gb[mb][vb][1]/=-14,gb[mb][vb][0]+=pb[0],gb[mb][vb][1]+=pb[1];var yb={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},xb={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},_b=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],wb=[function(t){"china"===t.map&&t.regions.push(new Er("南海诸岛",k(gb,function(t){return{type:"polygon",exterior:t}}),pb))},function(t){L(t.regions,function(t){var e=yb[t.name];if(e){var i=t.center;i[0]+=e[0]/10.5,i[1]+=-e[1]/14}})},function(t){L(t.regions,function(t){var e=xb[t.name];if(e){var i=t.center;i[0]=e[0],i[1]=e[1]}})},function(t){if("china"===t.map)for(var e=0,i=t.regions.length;e<i;++e)"台湾"===t.regions[e].name&&t.regions[e].geometries.push({type:"polygon",exterior:_b[0]})}];nl.prototype={constructor:nl,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},loadGeoJson:function(t,e,i){try{this.regions=t?U_(t):[]}catch(t){throw"Invalid geoJson format\n"+t.message}e=e||{},i=i||{};for(var n=this.regions,o=C(),a=0;a<n.length;a++){var r=n[a].name;r=i.hasOwnProperty(r)?i[r]:r,n[a].name=r,o.set(r,n[a]),this.addGeoCoord(r,n[a].center);var s=e[r];s&&n[a].transformTo(s.left,s.top,s.width,s.height)}this._regionsMap=o,this._rect=null,L(wb,function(t){t(this)},this)},transformTo:function(t,e,i,n){var o=this.getBoundingRect();(o=o.clone()).y=-o.y-o.height;var a=this._rawTransformable;a.transform=o.calculateTransform(new Xt(t,e,i,n)),a.decomposeTransform();var r=a.scale;r[1]=-r[1],a.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){if(this._rect)return this._rect;for(var t,e=this.regions,i=0;i<e.length;i++){var n=e[i].getBoundingRect();(t=t||n.clone()).union(n)}return this._rect=t||new Xt(0,0,0,0)},dataToPoint:function(t,e,i){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return el.prototype.dataToPoint.call(this,t,e,i)},convertToPixel:z(ol,"dataToPoint"),convertFromPixel:z(ol,"pointToData")},o(nl,el);var bb={dimensions:nl.prototype.dimensions,create:function(t,a){var r=[];t.eachComponent("geo",function(t,e){var i=t.get("map"),n=$a(i),o=new nl(i+e,i,n&&n.geoJson,n&&n.specialAreas,t.get("nameMap"));o.zoomLimit=t.get("scaleLimit"),r.push(o),rl(o,t),(t.coordinateSystem=o).model=t,o.resize=al,o.resize(t,a)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=r[e]}});var i={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}}),L(i,function(t,e){var i=$a(e),n=k(t,function(t){return t.get("nameMap")}),o=new nl(e,e,i&&i.geoJson,i&&i.specialAreas,u(n));o.zoomLimit=B.apply(null,k(t,function(t){return t.get("scaleLimit")})),r.push(o),o.resize=al,o.resize(t[0],a),L(t,function(t){rl(t.coordinateSystem=o,t)})}),r},getFilledRegions:function(t,e,i){var n=(t||[]).slice();i=i||{};var o=$a(e),a=o&&o.geoJson;if(!a)return t;for(var r=C(),s=a.features,l=0;l<n.length;l++)r.set(n[l].name,n[l]);for(l=0;l<s.length;l++){var h=s[l].properties.name;r.get(h)||(i.hasOwnProperty(h)&&(h=i[h]),n.push({name:h}))}return n}};Wa("geo",bb),Fa(function(i){var o={};i.eachSeriesByType("map",function(t){var e=t.getMapType();if(!t.getHostGeoModel()&&!o[e]){var l={};L(t.seriesGroup,function(t){var r=t.coordinateSystem,s=t.originalData;t.get("showLegendSymbol")&&i.getComponent("legend")&&s.each(s.mapDimension("value"),function(t,e){var i=s.getName(e),n=r.getRegion(i);if(n&&!isNaN(t)){var o=l[i]||0,a=r.dataToPoint(n.center);l[i]=o+1,s.setItemLayout(e,{point:a,offset:o})}})});var n=t.getData();n.each(function(t){var e=n.getName(t),i=n.getItemLayout(t)||{};i.showLabel=!l[e],n.setItemLayout(t,i)}),o[e]=!0}})}),Ha(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})})}),Va(zx.PROCESSOR.STATISTIC,function(t){var n={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),i=e?"o"+e.id:"i"+t.getMapType();(n[i]=n[i]||[]).push(t)}),L(n,function(t,e){for(var i=function(l,h){var u={};return L(l,function(n){n.each(n.mapDimension("value"),function(t,e){var i="ec-"+n.getName(e);u[i]=u[i]||[],isNaN(t)||u[i].push(t)})}),l[0].map(l[0].mapDimension("value"),function(t,e){for(var i="ec-"+l[0].getName(e),n=0,o=1/0,a=-1/0,r=u[i].length,s=0;s<r;s++)o=Math.min(o,u[i][s]),a=Math.max(a,u[i][s]),n+=u[i][s];return 0===r?NaN:"min"===h?o:"max"===h?a:"average"===h?n/r:n})}(k(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(n=0;n<t.length;n++)(t[n].seriesGroup=t)[n].needsDrawMap=0===n&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}),Ba(function(t){var e=[];L(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,E(t,t.mapLocation))})}),Qw("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Sb=L,Mb="\0__link_datas",Ib="\0__link_mainData",Tb=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};Tb.prototype={constructor:Tb,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),w(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var r=0;!n&&r<a.length;r++)a[r].eachNode(t,e,i);"postorder"===o&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(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<n;e++){var o=i[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){0<=this.dataIndex&&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){0<=this.dataIndex&&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)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},pl.prototype={constructor:pl,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;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},pl.createTree=function(t,e,i){var u=new pl(e,i.levels,i.leaves),c=[],d=1;(function t(e,i){var n=e.value;d=Math.max(d,O(n)?n.length:1),c.push(e);var o,a,r,s=new Tb(e.name,u);i?(o=s,r=(a=i).children,o.parentNode!==a&&(r.push(o),o.parentNode=a)):u.root=s,u._nodes.push(s);var l=e.children;if(l)for(var h=0;h<l.length;h++)t(l[h],s)})(t),u.root.updateDepthAndHeight(0);var n=f_(c,{coordDimensions:["value"],dimensionsCount:d}),o=new u_(n,e);return o.initData(c),sl({mainData:o,struct:u,structAttr:"tree"}),u.update(),u},sx.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n={};n.leaves=i;var o=pl.createTree(e,this,n),a=0;o.eachNode("preorder",function(t){t.depth>a&&(a=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?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 Qn(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:{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}}),qa({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new _g,this.group.add(this._mainGroup)},render:function(n,t,i,e){var o=n.getData(),a=n.layoutInfo,r=this._mainGroup,s=n.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:n.get("expandAndCollapse"),layout:s,orient:n.get("orient"),curvature:n.get("lineStyle.curveness"),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(t){bl(o,t)&&Ml(o,t,null,r,n,h)}).update(function(t,e){var i=l.getItemGraphicEl(e);bl(o,t)?Ml(o,t,i,r,n,h):i&&Il(o,t,i,r,n,h)}).remove(function(t){var e=l.getItemGraphicEl(t);Il(o,t,e,r,n,h)}).execute(),!0===h.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:n.id,dataIndex:e})})}),this._data=o},dispose:function(){},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Ga({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,i=t.getData().tree.getNodeByDataIndex(e);i.isExpand=!i.isExpand})});var Ab=function(t,e){var i,n=(i=e,ro(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}));t.layoutInfo=n;var o=t.get("layout"),a=0,r=0,s=null;s="radial"===o?(a=2*Math.PI,r=Math.min(n.height,n.width)/2,vl(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(a=n.width,r=n.height,vl());var l=t.getData().tree.root,h=l.children[0];(function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var o=i.length-1;0<=o;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)}})(l),function(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<r.length;s++)o.push(r[s])}for(;n=a.pop();)e(n,i)}(h,gl,s),l.hierNode.modifier=-h.hierNode.prelim,Al(h,ml);var u=h,c=h,d=h;Al(h,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>c.getLayout().x&&(c=t),t.depth>d.depth&&(d=t)});var f=u===c?1:s(u,c)/2,p=f-u.getLayout().x,g=0,m=0,v=0,y=0;"radial"===o?(g=a/(c.getLayout().x+f+p),m=r/(d.depth-1||1),Al(h,function(t){v=(t.getLayout().x+p)*g,y=(t.depth-1)*m;var e=yl(v,y);t.setLayout({x:e.x,y:e.y,rawX:v,rawY:y},!0)})):"horizontal"===t.get("orient")?(m=r/(c.getLayout().x+f+p),g=a/(d.depth-1||1),Al(h,function(t){y=(t.getLayout().x+p)*m,v=(t.depth-1)*g,t.setLayout({x:v,y:y},!0)})):(g=a/(c.getLayout().x+f+p),m=r/(d.depth-1||1),Al(h,function(t){v=(t.getLayout().x+p)*g,y=(t.depth-1)*m,t.setLayout({x:v,y:y},!0)}))};Ha(dw("tree","circle")),Fa(function(t,e){t.eachSeriesByType("tree",function(t){Ab(t,e)})}),Fa(function(t,e){t.eachSeriesByType("tree",function(t){Ab(t,e)})}),sx.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:{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;L(t.children,function(t){i(t);var e=t.value;O(e)&&(e=e[0]),n+=e});var e=t.value;O(e)&&(e=e[0]),(null==e||isNaN(e))&&(e=n),e<0&&(e=0),O(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[];n=t.levels=function(t,e){var n,i=e.get("color");if(i)return L(t=t||[],function(t){var e=new kn(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}(n,e);var o={};return o.levels=n,pl.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=Kn(O(i)?i[0]:i);return Qn(e.getName(t)+": "+n)},getDataParams:function(t){var e=sx.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=kl(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=C(),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 Db=5;Pl.prototype={constructor:Pl,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),so(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,r=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=(T=e.pos,A=e.box,N=O=P=k=L=C=D=void 0,C=A.width,L=A.height,k=zn(T.x,C),P=zn(T.y,L),O=zn(T.x2,C),N=zn(T.y2,L),(isNaN(k)||isNaN(parseFloat(T.x)))&&(k=0),(isNaN(O)||isNaN(parseFloat(T.x2)))&&(O=C),(isNaN(P)||isNaN(parseFloat(T.y)))&&(P=0),(isNaN(N)||isNaN(parseFloat(T.y2)))&&(N=L),D=hy(D||0),{width:Math.max(O-k-D[1]-D[3],0),height:Math.max(N-P-D[0]-D[2],0)}),h=e.totalWidth,u=e.renderList,c=u.length-1;0<=c;c--){var d=u[c],f=d.node,p=d.width,g=d.text;l.width<h&&(h-=p-r,p=r,g=null);var m=new Pv({shape:{points:(x=a,_=0,w=p,b=s,S=c===u.length-1,M=0===c,I=void 0,I=[[S?x:x-Db,_],[x+w,_],[x+w,_+b],[S?x:x-Db,_+b]],!M&&I.splice(2,0,[x+w+Db,_+b/2]),!S&&I.push([x,_+b/2]),I)},style:E(i.getItemStyle(),{lineJoin:"bevel",text:g,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:z(o,f)});this.group.add(m),v=t,y=f,m.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:v.componentIndex,seriesName:v.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:y&&y.dataIndex,name:y&&y.name},treePathInfo:y&&kl(y,v)},a+=p+8}var v,y,x,_,w,b,S,M,I,T,A,D,C,L,k,P,O,N},remove:function(){this.group.removeAll()}};var Cb=_,Lb=_g,kb=Nv,Pb=L,Ob=["label"],Nb=["emphasis","label"],Eb=["upperLabel"],zb=["emphasis","upperLabel"],Rb=10,Bb=_m([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Vb=function(t){var e=Bb(t);return e.stroke=e.fill=e.lineWidth=null,e};qa({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(!(y(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Dl(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,h="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,u=this._giveContainerGroup(r),c=this._doRender(u,t,h);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(u,c,t,h),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Lb,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=z(Ol,e,r,s,i,a,l);!function a(r,s,l,h,u){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,u);o&&a(i&&i.viewChildren||[],n&&n.viewChildren||[],o,h,u+1)}h?Pb(s=r,function(t,e){!t.isRemoved()&&i(e,e)}):new Ja(s,r,t,t).add(i).update(i).remove(z(i,null)).execute()}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var h,u=(h={nodeGroup:[],background:[],content:[]},s&&Pb(s,function(t,e){var i=h[e];Pb(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:a,willDeleteEls:u,renderFinally:function(){Pb(u,function(t){Pb(t,function(t){t.parent&&t.parent.remove(t)})}),Pb(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),h=e.get("animationEasing"),u=(r=[],c={},{add:function(t,e,i,n,o){return w(n)&&(o=n,n=0),!c[t.id]&&(c[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:o}),!0)},done:function(t){return o=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e<i;e++){var n=r[e];n.el.animateTo(n.target,n.time,n.delay,n.easing,function(){--t||(r.length=0,c={},o&&o())})}return this}});Pb(a.willDeleteEls,function(t,r){Pb(t,function(t,e){if(!t.invisible){var i,n=t.parent;if(s&&"drillDown"===s.direction)i=n===s.rootNodeGroup?{shape:{x:0,y:0,width:n.__tmNodeWidth,height:n.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var o=0,a=0;n.__tmWillDelete||(o=n.__tmNodeWidth/2,a=n.__tmNodeHeight/2),i="nodeGroup"===r?{position:[o,a],style:{opacity:0}}:{shape:{x:o,y:a,width:0,height:0},style:{opacity:0}}}i&&u.add(t,i,l,h)}})}),Pb(this._storage,function(t,o){Pb(t,function(t,e){var i=a.lastsForAnimation[o][e],n={};i&&("nodeGroup"===o?i.old&&(n.position=t.position.slice(),t.attr("position",i.old)):(i.old&&(n.shape=P({},t.shape),t.setShape(i.old)),i.fadein?(t.setStyle("opacity",0),n.style={opacity:1}):1!==t.style.opacity&&(n.style={opacity:1})),u.add(t,n,l,h))})},this),this._state="animating",u.done(Cb(function(){this._state="ready",a.renderFinally()},this)).start()}var o,r,c},_resetController:function(t){var e=this._controller;e||((e=this._controller=new Vs(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",Cb(this._onPan,this)),e.on("zoom",Cb(this._onZoom,this)));var n=new Xt(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,i){return n.contain(e,i)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t,e){if("animating"!==this._state&&(3<Math.abs(t)||3<Math.abs(e))){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 Xt(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=rt();ut(s,s,[-e,-i]),dt(s,s,[t,t]),ut(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(e,t,i){i||(i=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(i={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Pl(this.group))).render(e,t,i.node,Cb(function(t){"animating"!==this._state&&(Ll(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},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(o,a){var r;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var i=e.transformCoordToLocal(o,a),n=e.shape;if(!(n.x<=i[0]&&i[0]<=n.x+n.width&&n.y<=i[1]&&i[1]<=n.y+n.height))return!1;r={node:t,offsetX:i[0],offsetY:i[1]}}},this),r}});for(var Gb=["treemapZoomToNode","treemapRender","treemapMove"],Wb=0;Wb<Gb.length;Wb++)Ga({type:Gb[Wb],update:"updateView"},function(){});Ga({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var i=Dl(o,["treemapZoomToNode","treemapRootToNode"],t);if(i){var n=t.getViewRoot();n&&(o.direction=Ll(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var Fb=L,Hb=R,Zb=-1,Ub=function(t){var e=t.mappingMethod,i=t.type,n=this.option=D(t);this.type=i,this.mappingMethod=e,this._normalizeData=Xb[e];var o,a,r=jb[i];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._doMap=r._doMap[e],"piecewise"===e?(Nl(n),a=(o=n).pieceList,o.hasSpecialVisual=!1,L(a,function(t,e){t.originIndex=e,null!=t.visual&&(o.hasSpecialVisual=!0)})):"category"===e?n.categories?function(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(Fb(e,function(t,e){n[t]=e}),!O(i)){var o=[];R(i)?Fb(i,function(t,e){var i=n[e];o[null!=i?i:Zb]=t}):o[Zb]=i,i=Fl(t,o)}for(var a=e.length-1;0<=a;a--)null==i[a]&&(delete n[e[a]],e.pop())}(n):Nl(n,!0):(c("linear"!==e||n.dataExtent),Nl(n))};Ub.prototype={constructor:Ub,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return _(this._normalizeData,this)}};var jb=Ub.visualHandlers={color:{applyVisual:Rl("color"),getColorMapper:function(){var o=this.option;return _("category"===o.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),Bl.call(this,t)}:function(t,e,i){var n=!!i;return!e&&(t=this._normalizeData(t)),i=Lt(t,o.parsedVisual,i),n?i:Nt(i,"rgba")},this)},_doMap:{linear:function(t){return Nt(Lt(t,this.option.parsedVisual),"rgba")},category:Bl,piecewise:function(t,e){var i=Wl.call(this,e);return null==i&&(i=Nt(Lt(t,this.option.parsedVisual),"rgba")),i},fixed:Vl}},colorHue:El(function(t,e){return Pt(t,e)}),colorSaturation:El(function(t,e){return Pt(t,null,e)}),colorLightness:El(function(t,e){return Pt(t,null,null,e)}),colorAlpha:El(function(t,e){return Ot(t,e)}),opacity:{applyVisual:Rl("opacity"),_doMap:Gl([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(w(n))i("symbol",n);else if(Hb(n))for(var o in n)n.hasOwnProperty(o)&&i(o,n[o])},_doMap:{linear:zl,category:Bl,piecewise:function(t,e){var i=Wl.call(this,e);return null==i&&(i=zl.call(this,t)),i},fixed:Vl}},symbolSize:{applyVisual:Rl("symbolSize"),_doMap:Gl([0,1])}},Xb={linear:function(t){return En(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=Ub.findPieceIndex(t,e,!0);if(null!=i)return En(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?Zb:e},fixed:M};Ub.listVisualTypes=function(){var i=[];return L(jb,function(t,e){i.push(e)}),i},Ub.addVisualHandler=function(t,e){jb[t]=e},Ub.isValidType=function(t){return jb.hasOwnProperty(t)},Ub.eachVisual=function(t,e,i){R(t)?L(t,e,i):e.call(i,t)},Ub.mapVisual=function(t,n,o){var a,r=O(t)?[]:R(t)?{}:(a=!0,null);return Ub.eachVisual(t,function(t,e){var i=n.call(o,t,e);a?r=i:r[e]=i}),r},Ub.retrieveVisuals=function(i){var n,o={};return i&&Fb(jb,function(t,e){i.hasOwnProperty(e)&&(o[e]=i[e],n=!0)}),n?o:null},Ub.prepareVisualTypes=function(t){if(Hb(t)){var i=[];Fb(t,function(t,e){i.push(e)}),t=i}else{if(!O(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},Ub.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},Ub.findPieceIndex=function(n,t,e){function i(t,e){var i=Math.abs(t-n);i<a&&(a=i,o=e)}for(var o,a=1/0,r=0,s=t.length;r<s;r++){var l=t[r].value;if(null!=l){if(l===n||"string"==typeof l&&l===n+"")return r;e&&i(l,r)}}for(r=0,s=t.length;r<s;r++){var h=t[r],u=h.interval,c=h.close;if(u){if(u[0]===-1/0){if(Hl(c[1],n,u[1]))return r}else if(u[1]===1/0){if(Hl(c[0],u[0],n))return r}else if(Hl(c[0],u[0],n)&&Hl(c[1],n,u[1]))return r;e&&i(u[0],r),e&&i(u[1],r)}}if(e)return n===1/0?t.length-1:n===-1/0?0:o};var Yb=O,qb="itemStyle",$b={seriesType:"treemap",reset:function(t,e,i,n){var o=t.getData().tree,a=o.root,r=t.getModel(qb);a.isRemoved()||Zl(a,{},k(o.levelModels,function(t){return t?t.get(qb):null}),r,t.getViewRoot().getAncestors(),t)}},Kb=Math.max,Jb=Math.min,Qb=B,tS=L,eS=["itemStyle","borderWidth"],iS=["itemStyle","gapWidth"],nS=["upperLabel","show"],oS=["upperLabel","height"],aS={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),r=t.option,s=ro(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],h=zn(Qb(s.width,l[0]),o),u=zn(Qb(s.height,l[1]),a),c=n&&n.type,d=Dl(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=Cl(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var a=(e||{}).node,r=[n,o];if(!a||a===i)return r;for(var s,l=n*o,h=l*t.option.zoomToNodeRatio;s=a.parentNode;){for(var u=0,c=s.children,d=0,f=c.length;d<f;d++)u+=c[d].getValue();var p=a.getValue();if(0===p)return r;h*=u/p;var g=s.getModel(),m=g.get(eS);(h+=4*m*m+(3*m+Math.max(m,Kl(g)))*Math.pow(h,.5))>ry&&(h=ry),a=s}h<l&&(h=l);var v=Math.pow(h/l,.5);return[n*v,o*v]}(t,d,p,h,u):f?[f.width,f.height]:[h,u],v=r.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:r.squareRatio,sort:v,leafDepth:r.leafDepth};p.hostTree.clearLayouts(),x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]},p.setLayout(x),Yl(p,y,!1,0);var x=p.getLayout();tS(g,function(t,e){var i=(g[e+1]||p).getValue();t.setLayout(P({dataExtent:[i,i],borderWidth:0,upperHeight:0},x))})}var _=t.getData().tree.root;_.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,a=o.getLayout();if(!a)return n;for(var r=[a.width/2,a.height/2],s=o;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}(s,f,d),!0),t.setLayoutInfo(s),function e(t,i,n,o,a){var r=t.getLayout(),s=n[a],l=s&&s===t;if(!(s&&!l||a===n.length&&t!==o)){t.setLayout({isInView:!0,invisible:!l&&!i.intersect(r),isAboveViewRoot:l},!0);var h=new Xt(i.x-r.x,i.y-r.y,i.width,i.height);tS(t.viewChildren||[],function(t){e(t,h,n,o,a+1)})}}(_,new Xt(-s.x,-s.y,o,a),g,p,0)}};Ha($b),Fa(aS);var rS=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},sS=rS.prototype;sS.type="graph",sS.isDirected=function(){return this._directed},sS.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[Jl(t)]){var n=new Ql(t,e);return(n.hostGraph=this).nodes.push(n),i[Jl(t)]=n}},sS.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},sS.getNodeById=function(t){return this._nodesMap[Jl(t)]},sS.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),Ql.isInstance(t)||(t=n[Jl(t)]),Ql.isInstance(e)||(e=n[Jl(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new th(t,e,i);return(r.hostGraph=this)._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r}}},sS.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},sS.getEdge=function(t,e){Ql.isInstance(t)&&(t=t.id),Ql.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},sS.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&t.call(e,i[o],o)},sS.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&0<=i[o].node1.dataIndex&&0<=i[o].node2.dataIndex&&t.call(e,i[o],o)},sS.breadthFirstTraverse=function(t,e,i,n){if(Ql.isInstance(e)||(e=this._nodesMap[Jl(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;){var s=r.shift(),l=s[o];for(a=0;a<l.length;a++){var h=l[a],u=h.node1===s?h.node2:h.node1;if(!u.__visited){if(t.call(n,u,s))return;r.push(u),u.__visited=!0}}}}},sS.update=function(){for(var t=this.data,i=this.edgeData,e=this.nodes,n=this.edges,o=0,a=e.length;o<a;o++)e[o].dataIndex=-1;for(o=0,a=t.count();o<a;o++)e[t.getRawIndex(o)].dataIndex=o;i.filterSelf(function(t){var e=n[i.getRawIndex(t)];return 0<=e.node1.dataIndex&&0<=e.node2.dataIndex});for(o=0,a=n.length;o<a;o++)n[o].dataIndex=-1;for(o=0,a=i.count();o<a;o++)n[i.getRawIndex(o)].dataIndex=o},sS.clone=function(){for(var t=new rS(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(n=0;n<i.length;n++){var o=i[n];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},Ql.prototype={constructor:Ql,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},th.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};var lS=function(i,n){return{getValue:function(t){var e=this[i][n];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[i][n].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[i][n].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){0<=this.dataIndex&&this[i][n].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[i][n].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[i][n].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[i][n].getRawIndex(this.dataIndex)}}};o(Ql,lS("hostGraph","data")),o(th,lS("hostGraph","edgeData")),rS.Node=Ql,rS.Edge=th,di(Ql),di(th);var hS=function(t,e,i,n,o){for(var a=new rS(n),r=0;r<t.length;r++)a.addNode(B(t[r].id,t[r].name,r),r);var s=[],l=[],h=0;for(r=0;r<e.length;r++){var u=e[r],c=u.source,d=u.target;a.addEdge(c,d,h)&&(l.push(u),s.push(B(u.id,c+" > "+d)),h++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=cr(t,i);else{var g=So.get(p),m=f_(t,{coordDimensions:(g&&"view"!==g.type&&g.dimensions||[]).concat(["value"])});(f=new u_(m,i)).initData(t)}var v=new u_(["value"],i);return v.initData(l,s),o&&o(f,v),sl({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},uS=Ya({type:"series.graph",init:function(t){uS.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){uS.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){uS.superApply(this,"mergeDefaultAndTheme",arguments),ti(t,["edgeLabel"],["show"])},getInitialData:function(t,a){var e=t.edges||t.links||[],i=t.data||t.nodes||[],r=this;if(i&&e)return hS(i,e,this,!0,function(t,e){function i(t){return(t=this.parsePath(t))&&"label"===t[0]?o:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=r.getModel("edgeLabel"),o=new kn({label:n.option},n.parentModel,a);e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(i),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 uS.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=Qn(l.join(" > ")),o.value&&(l+=" : "+Qn(o.value)),l},_updateCategoriesData:function(){var t=k(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new u_(["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 uS.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:{position:"middle"},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}}}}),cS=Ev.prototype,dS=Rv.prototype,fS=Xi({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){(eh(e)?cS:dS).buildPath(t,e)},pointAt:function(t){return eh(this.shape)?cS.pointAt.call(this,t):dS.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=eh(e)?[e.x2-e.x1,e.y2-e.y1]:dS.tangentAt.call(this,t);return q(i,i)}}),pS=["fromSymbol","toSymbol"],gS=ah.prototype;gS.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),h=U([],l,s);if(q(h,h),t&&(t.attr("position",s),u=a.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(u[1],u[0])),t.attr("scale",[n*r,n*r])),e){e.attr("position",l);var u=a.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(u[1],u[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){i.attr("position",l);var c,d,f,p=5*n;if("end"===i.__position)c=[h[0]*p+l[0],h[1]*p+l[1]],d=.8<h[0]?"left":h[0]<-.8?"right":"center",f=.8<h[1]?"top":h[1]<-.8?"bottom":"middle";else if("middle"===i.__position){var g=r/2,m=[(u=a.tangentAt(g))[1],-u[0]],v=a.pointAt(g);0<m[1]&&(m[0]=-m[0],m[1]=-m[1]),c=[v[0]+m[0]*p,v[1]+m[1]*p],d="center",f="bottom";var y=-Math.atan2(u[1],u[0]);l[0]<s[0]&&(y=Math.PI+y),i.attr("rotation",y)}else c=[-h[0]*p+s[0],-h[1]*p+s[1]],d=.8<h[0]?"right":h[0]<-.8?"left":"center",f=.8<h[1]?"bottom":h[1]<-.8?"top":"middle";i.attr({style:{textVerticalAlign:i.__verticalAlign||f,textAlign:i.__textAlign||d},position:c,scale:[n,n]})}}}},gS._createLine=function(i,n,t){var e,o,a=i.hostModel,r=(e=i.getItemLayout(n),oh((o=new fS({name:"line"})).shape,e),o);r.shape.percent=0,Mn(r,{shape:{percent:1}},a,n),this.add(r);var s=new Tv({name:"label"});this.add(s),L(pS,function(t){var e=nh(t,i,n);this.add(e),this[ih(t)]=i.getItemVisual(n,t)},this),this._updateCommonStl(i,n,t)},gS.updateData=function(o,a,t){var e=o.hostModel,i=this.childOfName("line"),n=o.getItemLayout(a),r={shape:{}};oh(r.shape,n),Sn(i,r,e,a),L(pS,function(t){var e=o.getItemVisual(a,t),i=ih(t);if(this[i]!==e){this.remove(this.childOfName(t));var n=nh(t,o,a);this.add(n)}this[i]=e},this),this._updateCommonStl(o,a,t)},gS._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,r=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle").getLineStyle(),r=h.getModel("emphasis.lineStyle").getLineStyle(),s=h.getModel("label"),l=h.getModel("emphasis.label")}var u=t.getItemVisual(e,"color"),c=G(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(E({strokeNoScale:!0,fill:"none",stroke:u,opacity:c},a)),o.hoverStyle=r,L(pS,function(t){var e=this.childOfName(t);e&&(e.setColor(u),e.setStyle({opacity:c}))},this);var d,f,p,g=s.getShallow("show"),m=l.getShallow("show"),v=this.childOfName("label");if(g||m){if(d=u||"#000",null==(f=n.getFormattedLabel(e,"normal",t.dataType))){var y=n.getRawValue(e);f=null==y?t.getName(e):isFinite(y)?Rn(y):y}p=V(n.getFormattedLabel(e,"emphasis",t.dataType),f)}if(g){var x=mn(v.style,s,{text:f},{autoColor:d});v.__textAlign=x.textAlign,v.__verticalAlign=x.textVerticalAlign,v.__position=s.get("position")||"middle"}else v.setStyle("text",null);v.hoverStyle=m?{text:p,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},v.ignore=!g&&!m,pn(this)},gS.highlight=function(){this.trigger("emphasis")},gS.downplay=function(){this.trigger("normal")},gS.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},gS.setLinePoints=function(t){var e=this.childOfName("line");oh(e.shape,t),e.dirty()},a(ah,_g);var mS=rh.prototype;mS.isPersistent=function(){return!0},mS.updateData=function(l){var h=this,e=h.group,u=h._lineData;h._lineData=l,u||e.removeAll();var c=sh(l);l.diff(u).add(function(t){!function(t,e,i,n){if(hh(e.getItemLayout(i))){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}(h,l,t,c)}).update(function(t,e){var i,n,o,a,r,s;i=h,n=l,o=e,a=t,r=c,s=u.getItemGraphicEl(o),hh(n.getItemLayout(a))?(s?s.updateData(n,a,r):s=new i._ctor(n,a,r),n.setItemGraphicEl(a,s),i.group.add(s)):i.group.remove(s)}).remove(function(t){e.remove(u.getItemGraphicEl(t))}).execute()},mS.updateLayout=function(){var i=this._lineData;i.eachItemGraphicEl(function(t,e){t.updateLayout(i,e)},this)},mS.incrementalPrepareUpdate=function(t){this._seriesScope=sh(t),this._lineData=null,this.group.removeAll()},mS.incrementalUpdate=function(t,e){for(var i=t.start;i<t.end;i++)if(hh(e.getItemLayout(i))){var n=new this._ctor(e,i,this._seriesScope);n.traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),this.group.add(n)}},mS.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},mS._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var vS=[],yS=[],xS=[],_S=bi,wS=Ep,bS=Math.abs,SS=function(t,l){function h(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}var u=[],c=Ii,d=[[],[],[]],f=[[],[]],p=[];l/=2,t.eachEdge(function(t,e){var i=t.getLayout(),n=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");i.__original||(i.__original=[W(i[0]),W(i[1])],i[2]&&i.__original.push(W(i[2])));var a=i.__original;if(null!=i[2]){if(A(d[0],a[0]),A(d[1],a[2]),A(d[2],a[1]),n&&"none"!=n){var r=h(t.node1),s=uh(d,a[0],r*l);c(d[0][0],d[1][0],d[2][0],s,u),d[0][0]=u[3],d[1][0]=u[4],c(d[0][1],d[1][1],d[2][1],s,u),d[0][1]=u[3],d[1][1]=u[4]}if(o&&"none"!=o){r=h(t.node2),s=uh(d,a[1],r*l);c(d[0][0],d[1][0],d[2][0],s,u),d[1][0]=u[1],d[2][0]=u[2],c(d[0][1],d[1][1],d[2][1],s,u),d[1][1]=u[1],d[2][1]=u[2]}A(i[0],d[0]),A(i[1],d[2]),A(i[2],d[1])}else A(f[0],a[0]),A(f[1],a[1]),U(p,f[1],f[0]),q(p,p),n&&"none"!=n&&(r=h(t.node1),Z(f[0],f[0],p,r*l)),o&&"none"!=o&&(r=h(t.node2),Z(f[1],f[1],p,-r*l)),A(i[0],f[0]),A(i[1],f[1])})},MS=["itemStyle","opacity"],IS=["lineStyle","opacity"];qa({type:"graph",init:function(t,e){var i=new Fr,n=new rh,o=this.group;this._controller=new Vs(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(o,t,a){var e=o.coordinateSystem;this._model=o,this._nodeScaleRatio=o.get("nodeScaleRatio");var i=this._symbolDraw,n=this._lineDraw,r=this.group;if("view"===e.type){var s={position:e.position,scale:e.scale};this._firstRender?r.attr(s):Sn(r,s,o)}SS(o.getGraph(),this._getNodeGlobalScale(o));var l=o.getData();i.updateData(l);var h=o.getEdgeData();n.updateData(h),this._updateNodeAndLinkScale(),this._updateController(o,t,a),clearTimeout(this._layoutTimeout);var u=o.forceLayout,c=o.get("force.layoutAnimation");u&&this._startForceLayoutIteration(u,c),l.eachItemGraphicEl(function(t,e){var i=l.getItemModel(e);t.off("drag").off("dragend");var n=l.getItemModel(e).get("draggable");n&&t.on("drag",function(){u&&(u.warmUp(),!this._layouting&&this._startForceLayoutIteration(u,c),u.setFixed(e),l.setItemLayout(e,t.position))},this).on("dragend",function(){u&&u.setUnfixed(e)},this),t.setDraggable(n&&u),t.off("mouseover",t.__focusNodeAdjacency),t.off("mouseout",t.__unfocusNodeAdjacency),i.get("focusNodeAdjacency")&&(t.on("mouseover",t.__focusNodeAdjacency=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))},this),l.graph.eachEdge(function(t){var e=t.getGraphicEl();e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))});var d="circular"===o.get("layout")&&o.get("circular.rotateLabel"),f=l.getLayout("cx"),p=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var i=t.getSymbolPath();if(d){var n=l.getItemLayout(e),o=Math.atan2(n[1]-p,n[0]-f);o<0&&(o=2*Math.PI+o);var a=n[0]<f;a&&(o-=Math.PI);var r=a?"left":"right";i.setStyle({textRotation:-o,textPosition:r,textOrigin:"center"}),i.hoverStyle&&(i.hoverStyle.textPosition=r)}else i.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,i,n){var o=this._model.getData().graph,a=n.dataIndex,r=n.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){dh(t,MS,.1)}),o.eachEdge(function(t){dh(t,IS,.1)}),s&&(fh(s,MS),L(s.edges,function(t){t.dataIndex<0||(fh(t,IS),fh(t.node1,MS),fh(t.node2,MS))})),l&&(fh(l,IS),fh(l.node1,MS),fh(l.node2,MS)))},unfocusNodeAdjacency:function(t,e,i,n){var o=this._model.getData().graph;o.eachNode(function(t){dh(t,MS)}),o.eachEdge(function(t){dh(t,IS)})},_startForceLayoutIteration:function(t,i){var n=this;!function e(){t.step(function(t){n.updateLayout(n._model),(n._layouting=!t)&&(i?n._layoutTimeout=setTimeout(e,16):e())})}()},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!qs(t,a,o)}),"view"===o.coordinateSystem.type?(e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t,e){Xs(n,t,e),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t,dy:e})}).on("zoom",function(t,e,i){Ys(n,t,e,i),a.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t,originX:e,originY:i}),this._updateNodeAndLinkScale(),SS(o.getGraph(),this._getNodeGlobalScale(o)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},updateLayout:function(t){SS(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),Ga({type:"graphRoam",event:"graphRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",query:i},function(t){var e=Qs(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})}),Ga({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series.graph:focusNodeAdjacency"},function(){}),Ga({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series.graph:unfocusNodeAdjacency"},function(){});var TS=Z;Va(function(t){var a=t.findComponents({mainType:"legend"});a&&a.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),n=t.getGraph().data,o=e.mapArray(e.getName);n.filterSelf(function(t){var e=n.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var i=0;i<a.length;i++)if(!a[i].isSelected(e))return!1}return!0})},this)}),Ha(dw("graph","circle",null)),Ha(function(t){var r={};t.eachSeriesByType("graph",function(n){var o=n.getCategoriesData(),i=n.getData(),a={};o.each(function(t){var e=o.getName(t);a["ec-"+e]=t;var i=o.getItemModel(t).get("itemStyle.color")||n.getColorFromPalette(e,r);o.setItemVisual(t,"color",i)}),o.count()&&i.each(function(t){var e=i.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=a["ec-"+e]),i.getItemVisual(t,"color",!0)||i.setItemVisual(t,"color",o.getItemVisual(e,"color")))})})}),Ha(function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=ph(t.get("edgeSymbol")),i=ph(t.get("edgeSymbolSize")),h="lineStyle.color".split("."),u="lineStyle.opacity".split(".");l.setVisual("fromSymbol",e&&e[0]),l.setVisual("toSymbol",e&&e[1]),l.setVisual("fromSymbolSize",i&&i[0]),l.setVisual("toSymbolSize",i&&i[1]),l.setVisual("color",t.get(h)),l.setVisual("opacity",t.get(u)),l.each(function(t){var e=l.getItemModel(t),i=s.getEdgeByIndex(t),n=ph(e.getShallow("symbol",!0)),o=ph(e.getShallow("symbolSize",!0)),a=e.get(h),r=e.get(u);switch(a){case"source":a=i.node1.getVisual("color");break;case"target":a=i.node2.getVisual("color")}n[0]&&i.setVisual("fromSymbol",n[0]),n[1]&&i.setVisual("toSymbol",n[1]),o[0]&&i.setVisual("fromSymbolSize",o[0]),o[1]&&i.setVisual("toSymbolSize",o[1]),i.setVisual("color",a),i.setVisual("opacity",r)})})}),Fa(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),o=[];L(i.dimensions,function(t){o=o.concat(n.mapDimension(t,!0))});for(var a=0;a<n.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var h=n.get(o[l],a);isNaN(h)||(s=!0),r.push(h)}s?n.setItemLayout(a,i.dataToPoint(r)):n.setItemLayout(a,[NaN,NaN])}mh(n.graph)}else e&&"none"!==e||gh(t)})}),Fa(function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&vh(t)})}),Fa(function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var c=t.preservedPoints||{},d=t.getGraph(),f=d.data,i=d.edgeData,n=t.getModel("force"),o=n.get("initLayout");t.preservedPoints?f.each(function(t){var e=f.getId(t);f.setItemLayout(t,c[e]||[NaN,NaN])}):o&&"none"!==o?"circular"===o&&vh(t):gh(t);var a=f.getDataExtent("value"),r=i.getDataExtent("value"),s=n.get("repulsion"),l=n.get("edgeLength");O(s)||(s=[s,s]),O(l)||(l=[l,l]),l=[l[1],l[0]];var h=f.mapArray("value",function(t,e){var i=f.getItemLayout(e),n=En(t,a,s);return isNaN(n)&&(n=(s[0]+s[1])/2),{w:n,rep:n,fixed:f.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),u=i.mapArray("value",function(t,e){var i=d.getEdgeByIndex(e),n=En(t,r,l);return isNaN(n)&&(n=(l[0]+l[1])/2),{n1:h[i.node1.dataIndex],n2:h[i.node2.dataIndex],d:n,curveness:i.getModel().get("lineStyle.curveness")||0}}),p=(e=t.coordinateSystem).getBoundingRect(),g=function(f,p,t){for(var e=t.rect,i=e.width,n=e.height,g=[e.x+i/2,e.y+n/2],m=null==t.gravity?.1:t.gravity,o=0;o<f.length;o++){var a=f[o];a.p||(a.p=T(i*(Math.random()-.5)+g[0],n*(Math.random()-.5)+g[1])),a.pp=W(a.p),a.edges=null}var v=.6;return{warmUp:function(){v=.5},setFixed:function(t){f[t].fixed=!0},setUnfixed:function(t){f[t].fixed=!1},step:function(t){for(var e=[],i=f.length,n=0;n<p.length;n++){var o=p[n],a=o.n1;U(e,(h=o.n2).p,a.p);var r=j(e)-o.d,s=h.w/(a.w+h.w);isNaN(s)&&(s=0),q(e,e),!a.fixed&&TS(a.p,a.p,e,s*r*v),!h.fixed&&TS(h.p,h.p,e,-(1-s)*r*v)}for(n=0;n<i;n++)(d=f[n]).fixed||(U(e,g,d.p),TS(d.p,d.p,e,m*v));for(n=0;n<i;n++){a=f[n];for(var l=n+1;l<i;l++){var h=f[l];U(e,h.p,a.p),0===(r=j(e))&&(F(e,Math.random()-.5,Math.random()-.5),r=1);var u=(a.rep+h.rep)/r/r;!a.fixed&&TS(a.pp,a.pp,e,u),!h.fixed&&TS(h.pp,h.pp,e,-u)}}var c=[];for(n=0;n<i;n++){var d=f[n];d.fixed||(U(c,d.p,d.pp),TS(d.p,d.p,c,v),A(d.pp,d.p))}v*=.992,t&&t(f,p,v<.01)}}}(h,u,{rect:p,gravity:n.get("gravity")}),m=g.step;g.step=function(u){for(var t=0,e=h.length;t<e;t++)h[t].fixed&&A(h[t].p,d.getNodeByIndex(t).getLayout());m(function(t,e,i){for(var n=0,o=t.length;n<o;n++)t[n].fixed||d.getNodeByIndex(n).setLayout(t[n].p),c[f.getId(n)]=t[n].p;for(n=0,o=e.length;n<o;n++){var a=e[n],r=d.getEdgeByIndex(n),s=a.n1.p,l=a.n2.p,h=r.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],A(h[0],s),A(h[1],l),+a.curveness&&(h[2]=[(s[0]+l[0])/2-(s[1]-l[1])*a.curveness,(s[1]+l[1])/2-(l[0]-s[0])*a.curveness]),r.setLayout(h)}u&&u(i)})},t.forceLayout=g,t.preservedPoints=c,g.step()}else t.forceLayout=null})}),Wa("graphView",{create:function(t,g){var m=[];return t.eachSeriesByType("graph",function(t){var e,i,n,o=t.get("coordinateSystem");if(!o||"view"===o){var a=t.getData(),r=[],s=[];Ti(a.mapArray(function(t){var e=a.getItemModel(t);return[+e.get("x"),+e.get("y")]}),r,s),s[0]-r[0]==0&&(s[0]+=1,r[0]-=1),s[1]-r[1]==0&&(s[1]+=1,r[1]-=1);var l=(s[0]-r[0])/(s[1]-r[1]),h=(e=g,i=l,(n=t.getBoxLayoutParams()).aspect=i,ro(n,{width:e.getWidth(),height:e.getHeight()}));isNaN(l)&&(r=[h.x,h.y],s=[h.x+h.width,h.y+h.height]);var u=s[0]-r[0],c=s[1]-r[1],d=h.width,f=h.height,p=t.coordinateSystem=new el;p.zoomLimit=t.get("scaleLimit"),p.setBoundingRect(r[0],r[1],u,c),p.setViewRect(h.x,h.y,d,f),p.setCenter(t.get("center")),p.setZoom(t.get("zoom")),m.push(p)}}),m}}),sx.extend({type:"series.gauge",getInitialData:function(t,e){var i=t.data||[];return O(i)||(i=[i]),t.data=i,qw(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var AS=Gi.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-i(r)*a*(o/3<=a?1:2),l=e.y-n(r)*a*(o/3<=a?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)}}),DS=2*Math.PI,CS=(Jo.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n,o,a,r,s,l,h=t.get("axisLine.lineStyle.color"),u=(o=i,a=(n=t).get("center"),r=o.getWidth(),s=o.getHeight(),l=Math.min(r,s),{cx:zn(a[0],o.getWidth()),cy:zn(a[1],o.getHeight()),r:zn(n.get("radius"),l/2)});this._renderMain(t,e,i,h,u)},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)%DS,c=l,d=r.get("width"),f=0;f<n.length;f++){var p=Math.min(Math.max(n[f][0],0),1),g=new Lv({shape:{startAngle:c,endAngle:h=l+u*p,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-d,r:o.r},silent:!0});g.setStyle({fill:n[f][1]}),g.setStyle(r.getLineStyle(["color","borderWidth","borderColor"])),a.add(g),c=h}var m=function(t){if(t<=0)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};if(!s){var v=l;l=h,h=v}this._renderTicks(t,e,i,m,o,l,h,s),this._renderPointer(t,e,i,m,o,l,h,s),this._renderTitle(t,e,i,m,o),this._renderDetail(t,e,i,m,o)},_renderTicks:function(t,e,i,n,o,a,r,s){for(var l=this.group,h=o.cx,u=o.cy,c=o.r,d=+t.get("min"),f=+t.get("max"),p=t.getModel("splitLine"),g=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=g.get("splitNumber"),x=zn(p.get("length"),c),_=zn(g.get("length"),c),w=a,b=(r-a)/v,S=b/y,M=p.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A=Math.cos(w),D=Math.sin(w);if(p.get("show")){var C=new Ev({shape:{x1:A*c+h,y1:D*c+u,x2:A*(c-x)+h,y2:D*(c-x)+u},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:n(T/v)}),l.add(C)}if(m.get("show")){var L=yh(Rn(T/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),P=n(T/v);l.add(new Tv({style:mn({},m,{text:L,x:A*(c-x-k)+h,y:D*(c-x-k)+u,textVerticalAlign:D<-.4?"top":.4<D?"bottom":"middle",textAlign:A<-.4?"left":.4<A?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var O=0;O<=y;O++){A=Math.cos(w),D=Math.sin(w);var N=new Ev({shape:{x1:A*c+h,y1:D*c+u,x2:A*(c-_)+h,y2:D*(c-_)+u},silent:!0,style:I});"auto"===I.stroke&&N.setStyle({stroke:n((T+O/y)/v)}),l.add(N),w+=S}w-=S}else w+=b}},_renderPointer:function(n,t,e,o,a,i,r,s){var l=this.group,h=this._data;if(n.get("pointer.show")){var u=[+n.get("min"),+n.get("max")],c=[i,r],d=n.getData(),f=d.mapDimension("value");d.diff(h).add(function(t){var e=new AS({shape:{angle:i}});Mn(e,{shape:{angle:En(d.get(f,t),u,c,!0)}},n),l.add(e),d.setItemGraphicEl(t,e)}).update(function(t,e){var i=h.getItemGraphicEl(e);Sn(i,{shape:{angle:En(d.get(f,t),u,c,!0)}},n),l.add(i),d.setItemGraphicEl(t,i)}).remove(function(t){var e=h.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),n=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:zn(n.get("width"),a.r),r:zn(n.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(En(d.get(f,e),u,[0,1],!0))),pn(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else h&&h.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),h=o.cx+zn(l[0],o.r),u=o.cy+zn(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(En(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new Tv({silent:!0,style:mn({},s,{x:h,y:u,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,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+zn(l[0],o.r),u=o.cy+zn(l[1],o.r),c=zn(a.get("width"),o.r),d=zn(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(En(p,[r,s],[0,1],!0));this.group.add(new Tv({silent:!0,style:mn({},a,{x:h,y:u,text:yh(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Ya({type:"series.funnel",init:function(t){CS.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return qw(this,["value"])},_defaultLabelLine:function(t){ti(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=CS.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*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:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),LS=xh.prototype,kS=["itemStyle","opacity"];LS.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=t.getItemModel(e).get(kS);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),Mn(n,{style:{opacity:s}},o,e)):Sn(n,{style:{opacity:s},shape:{points:r.points}},o,e);var l=a.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(E({lineJoin:"round",fill:h},l.getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),pn(this)},LS._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");Sn(i,{shape:{points:r.linePoints||r.linePoints}},o,e),Sn(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"),h=a.getModel("emphasis.label"),u=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color");gn(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()},a(xh,_g),Jo.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 xh(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(){}}),Ha(tb("funnel")),Fa(function(t,S,e){t.eachSeriesByType("funnel",function(t){var e,o=t.getData(),a=o.mapDimension("value"),i=t.get("sort"),r=(e=S,ro(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),n=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,function(t){return t}),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return a?n[t]-n[e]:n[e]-n[t]}),o}(o,i),s=[zn(t.get("minSize"),r.width),zn(t.get("maxSize"),r.width)],l=o.getDataExtent(a),h=t.get("min"),u=t.get("max");null==h&&(h=Math.min(l[0],0)),null==u&&(u=l[1]);var g,c=t.get("funnelAlign"),d=t.get("gap"),f=(r.height-d*(o.count()-1))/o.count(),p=r.y,m=function(t,e){var i,n=En(o.get(a,t)||0,[h,u],s,!0);switch(c){case"left":i=r.x;break;case"center":i=r.x+(r.width-n)/2;break;case"right":i=r.x+r.width-n}return[[i,e],[i+n,e]]};"ascending"===i&&(f=-f,d=-d,p+=r.height,n=n.reverse());for(var v=0;v<n.length;v++){var y=n[v],x=n[v+1],_=o.getItemModel(y).get("itemStyle.height");null==_?_=f:(_=zn(_,r.height),"ascending"===i&&(_=-_));var w=m(y,p),b=m(x,p+_);p+=_+d,o.setItemLayout(y,{points:w.concat(b.slice().reverse())})}(g=o).each(function(t){var e,i,n,o,a=g.getItemModel(t),r=a.getModel("label").get("position"),s=a.getModel("labelLine"),l=g.getItemLayout(t),h=l.points,u="inner"===r||"inside"===r||"center"===r;if(u)e="center",o=[[i=(h[0][0]+h[1][0]+h[2][0]+h[3][0])/4,n=(h[0][1]+h[1][1]+h[2][1]+h[3][1])/4],[i,n]];else{var c,d,f,p=s.get("length");e="left"===r?(c=(h[3][0]+h[0][0])/2,d=(h[3][1]+h[0][1])/2,i=(f=c-p)-5,"right"):(c=(h[1][0]+h[2][0])/2,d=(h[1][1]+h[2][1])/2,i=(f=c+p)+5,"left"),o=[[c,d],[f,d]],n=d}l.label={linePoints:o,x:i,y:n,verticalAlign:"middle",textAlign:e,inside:u}})})}),Va(ob("funnel"));var PS=function(t,e,i,n,o){Y_.call(this,t,e,i),this.type=n||"value",this.axisIndex=o};PS.prototype={constructor:PS,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},a(PS,Y_);var OS=function(t,e,i,n,o,a){e[0]=wh(e[0],i),e[1]=wh(e[1],i),t=t||0;var r=i[1]-i[0];null!=o&&(o=wh(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===n&&(o=a=Math.abs(e[1]-e[0]),n=0);var s=_h(e,n);e[n]+=t;var l=o||0,h=i.slice();s.sign<0?h[0]+=l:h[1]-=l,e[n]=wh(e[n],h),u=_h(e,n),null!=o&&(u.sign!==s.sign||u.span<o)&&(e[1-n]=e[n]+s.sign*o);var u=_h(e,n);return null!=a&&u.span>a&&(e[1-n]=e[n]+u.sign*a),e},NS=L,ES=Math.min,zS=Math.max,RS=Math.floor,BS=Math.ceil,VS=Rn,GS=Math.PI;bh.prototype={type:"parallel",constructor:bh,_init:function(t,r,e){var i=t.dimensions,s=t.parallelAxisIndex;NS(i,function(t,e){var i=s[e],n=r.getComponent("parallelAxis",i),o=this._axesMap.set(t,new PS(t,Ar(n),[0,0],n.get("type"),i)),a="category"===o.type;o.onBand=a&&n.get("boundaryGap"),o.inverse=n.get("inverse"),(n.axis=o).model=n,o.coordinateSystem=n.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 i<=a&&a<=i+e.axisLength&&n<=r&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,n){n.eachSeries(function(t){if(e.contains(t,n)){var i=t.getData();NS(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Tr(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ro(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=Sh(e.get("axisExpandWidth"),l),c=Sh(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&3<h&&c<h&&1<c&&0<u&&0<s,f=e.get("axisExpandWindow");f?(t=Sh(f[1]-f[0],l),f[1]=f[0]+t):(t=Sh(u*(c-1),l),(f=[u*(e.get("axisExpandCenter")||RS(h/2))-t/2])[1]=f[0]+t);var p=(s-t)/(h-c);p<3&&(p=0);var g=[RS(VS(f[0]/u,1))+1,BS(VS(f[1]/u,1))-1],m=p/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:p,axisExpandWindow:f,axisCount:h,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var l=this._rect,h=this._axesMap,t=this.dimensions,u=this._makeLayoutInfo(),c=u.layout;h.each(function(t){var e=[0,u.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),NS(t,function(t,e){var i=(u.axisExpandable?function(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<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],h=a,u=!0):(i=o-(r-1-t)*s,n=s),{position:i,axisNameAvailableWidth:h,axisLabelShow:u,nameTruncateMaxWidth:n}}:function(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}})(e,u),n={horizontal:{x:i.position,y:u.axisLength},vertical:{x:0,y:i.position}},o={horizontal:GS/2,vertical:0},a=[n[c].x+l.x,n[c].y+l.y],r=o[c],s=rt();ct(s,s,r),ut(s,s,a),this._axesLayout[t]={position:a,rotation:r,transform:s,axisNameAvailableWidth:i.axisNameAvailableWidth,axisLabelShow:i.axisLabelShow,nameTruncateMaxWidth:i.nameTruncateMaxWidth,tickDirection:1,labelDirection:1,labelInterval:h.get(t).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(e,t,i){for(var n=this.dimensions,o=k(n,function(t){return e.mapDimension(t)}),a=this._axesMap,r=this.hasAxisBrushed(),s=0,l=e.count();s<l;s++){var h,u=e.getValues(o,s);if(r){h="active";for(var c=0,d=n.length;c<d;c++){var f=n[c];if("inactive"===a.get(f).model.getActiveState(u[c],c)){h="inactive";break}}}else h="normal";t.call(i,h,s)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;n<o;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){return Tn([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return D(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",h=e.axisCollapseWidth,u=this._model.get("axisExpandSlideTriggerArea"),c=null!=u[0];return h?(c&&h&&s<o*u[0]?(l="jump",r=s-o*u[2]):c&&h&&s>o*(1-u[0])?(l="jump",r=s-o*(1-u[2])):0<=(r=s-o*u[1])&&(r=s-o*(1-u[1]))<=0&&(r=0),(r*=e.axisExpandWidth/h)?OS(r,n,a,"all"):l="none"):(o=n[1]-n[0],(n=[zS(0,a[1]*s/o-o/2)])[1]=ES(a[1],n[0]+o),n[0]=n[1]-o),{axisExpandWindow:n,behavior:l}}},So.register("parallel",{create:function(n,o){var a=[];return n.eachComponent("parallel",function(t,e){var i=new bh(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 WS=by.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return _m([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=D(t);if(e)for(var i=e.length-1;0<=i;i--)Bn(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;i<n;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}});g(WS.prototype,E_),ww("parallel",WS,function(t,e){return e.type||(e.data?"category":"value")},{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),by.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){by.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&g(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(e){L(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},_initDimensions:function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[];L(I(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),i.push(t.componentIndex)})}}),Ga({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),Ga("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var FS=z,HS=L,ZS=k,US=Math.min,jS=Math.max,XS=Math.pow,YS=1e4,qS=6,$S=6,KS="globalPan",JS={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},QS={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},tM={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},eM=0;Mh.prototype={constructor:Mh,enableBrush:function(t){return this._brushType&&Th(this),t.brushType&&Ih(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};L(t,function(t){e[t.panelId]=D(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){HS(this._covers,t,e)},updateCovers:function(o){function i(t,e){return(null!=t.id?t.id:n+e)+"-"+t.brushType}function t(t,e){var i=o[t];if(null!=e&&a[e]===l)r[t]=a[e];else{var n=r[t]=null!=e?(a[e].__brushOption=i,a[e]):Dh(s,Ah(s,i));kh(s,n)}}o=k(o,function(t){return g(D(tM),t,!0)});var n="\0-brush-index-",a=this._covers,r=this._covers=[],s=this,l=this._creatingCover;return new Ja(a,o,function(t,e){return i(t.__brushOption,e)},i).add(t).update(t).remove(function(t){a[t]!==l&&s.group.remove(a[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),Eh(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},o(Mh,Bp);var iM={mousedown:function(t){if(this._dragging)Jh.call(this,t);else if(!t.target||!t.target.draggable){Yh(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Oh(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,i){if(t._brushType){var n=t._zr,o=t._covers,a=Oh(t,e,i);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&nM[s.brushType].contain(o[r],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}(this,t,e),this._dragging){Yh(t);var i=$h(this,t,e,!1);i&&zh(this,i)}},mouseup:Jh},nM={lineX:Qh(0),lineY:Qh(1),rect:{createCover:function(t,e){return Bh(FS(Zh,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Rh(t);return Hh(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Vh(t,e,i,n)},updateCommon:Gh,contain:qh},polygon:{createCover:function(t,e){var i=new _g;return i.add(new Ov({name:"main",style:Fh(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Pv({name:"main",draggable:!0,drift:FS(Uh,t,e),ondragend:FS(zh,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:Xh(t,e,i)})},updateCommon:Gh,contain:qh}},oM=["axisLine","axisTickLabel","axisName"],aM=Xa({type:"parallelAxis",init:function(t,e){aM.superApply(this,"init",arguments),(this._brushController=new Mh(e.getZr())).on("brush",_(this._onBrush,this))},render:function(t,e,i,n){if(p=t,g=e,!(m=n)||"axisAreaSelect"!==m.type||g.findComponents({mainType:"parallelAxis",query:m})[0]!==p){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _g,this.group.add(this._axisGroup),t.get("show")){var a=(f=t,e.getComponent("parallel",f.get("parallelIndex"))),r=a.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,h=t.axis.dim,u=P({strokeContainThreshold:l},r.getAxisLayout(h)),c=new Lw(t,u);L(oM,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(u,s,t,a,l,i);var d=n&&!1===n.animation?null:t;Dn(o,this._axisGroup,d)}}var f,p,g,m},_refreshBrushController:function(t,e,i,n,o,a){var r,s,l=i.axis.getExtent(),h=l[1]-l[0],u=Math.min(30,.1*Math.abs(h)),c=Xt.create({x:l[0],y:-o/2,width:h,height:o});c.x-=u,c.width+=2*u,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:tu(c),isTargetByCursor:iu(c,a,n),getLinearBrushOtherExtent:eu(c,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((s=(r=i).axis,k(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[s.dataToCoord(t[0],!0),s.dataToCoord(t[1],!0)]}})))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=k(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}});Xa({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},L(rM,function(t,e){i.getZr().on(e,this._handlers[e]=_(t,this))},this)),aa(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,i){L(this._handlers,function(t,e){i.getZr().off(e,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(P({type:"parallelAxisExpand"},t))}});var rM={mousedown:function(t){ou(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(ou(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))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&&ou(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})}}};Ba(function(t){var n;(function(t){if(!t.parallel){var e=!1;L(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}})(t),L(Qe((n=t).parallelAxis),function(t){if(R(t)){var e=t.parallelIndex||0,i=Qe(n.parallel)[e];i&&i.parallelAxisDefault&&g(t,i.parallelAxisDefault,!1)}})}),sx.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){this.option.progressive&&(this.option.animation=!1);var i=this.getSource();return function(t,e){if(!t.encodeDefine){var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(i){var n=t.encodeDefine=C();L(i.dimensions,function(t){var e=+t.replace("dim","");n.set(t,e)})}}}(i,this),cr(i,this)},getRawIndicesByActiveState:function(i){var t=this.coordinateSystem,n=this.getData(),o=[];return t.eachActiveState(n,function(t,e){i===t&&o.push(n.getRawIndex(e))}),o},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:!1,smooth:!1,animationEasing:"linear"}}),Jo.extend({type:"parallel",init:function(){this._dataGroup=new _g,this.group.add(this._dataGroup),this._data},render:function(t,e,i,n){this._renderForNormal(t,n)},dispose:function(){},_renderForNormal:function(o,a){var t,e,i,n,r,s,l,h,u,c,d,f=this._dataGroup,p=o.getData(),g=this._data,m=o.coordinateSystem,v=m.dimensions,y=o.option.smooth?.3:null;if(p.diff(g).add(function(t){var e,i,n,o,a;i=f,o=au(e=p,n=t,v,m),a=new Ov({shape:{points:o},silent:!0,z2:10}),i.add(a),e.setItemGraphicEl(n,a)}).update(function(t,e){var i=g.getItemGraphicEl(e),n=au(p,t,v,m);p.setItemGraphicEl(t,i),Sn(i,{shape:{points:n}},a&&!1===a.animation?null:o,t)}).remove(function(t){var e=g.getItemGraphicEl(t);f.remove(e)}).execute(),u=y,c=(h=p).hostModel.getModel("lineStyle"),d=c.getLineStyle(),h.eachItemGraphicEl(function(t,e){if(h.hasItemOption){var i=h.getItemModel(e).getModel("lineStyle",c);d=i.getLineStyle(["color","stroke"])}t.useStyle(P(d,{fill:null,stroke:h.getItemVisual(e,"color"),opacity:h.getItemVisual(e,"opacity")})),t.shape.smooth=u}),!this._data){var x=(e=o,i=function(){setTimeout(function(){f.removeClipPath()})},n=(t=m).model,r=t.getRect(),s=new Nv({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),l="horizontal"===n.get("layout")?"width":"height",s.setShape(l,0),Mn(s,{shape:{width:r.width,height:r.height}},e,i),s);f.setClipPath(x)}this._data=p},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var sM=["lineStyle","normal","opacity"];Ha(function(c){c.eachSeriesByType("parallel",function(t){var e=t.getModel("itemStyle"),i=t.getModel("lineStyle"),n=c.get("color"),o=i.get("color")||e.get("color")||n[t.seriesIndex%n.length],a=t.get("inactiveOpacity"),r=t.get("activeOpacity"),s=t.getModel("lineStyle").getLineStyle(),l=t.coordinateSystem,h=t.getData(),u={normal:s.opacity,active:r,inactive:a};l.eachActiveState(h,function(t,e){var i=h.getItemModel(e),n=u[t];if("normal"===t){var o=i.get(sM,!0);null!=o&&(n=o)}h.setItemVisual(e,"opacity",n)}),h.setVisual("color",o)})});var lM=sx.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return hS(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)return lM.superCall(this,"formatTooltip",t,e);var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),Qn(a)},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),hM=Xi({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()}});qa({type:"sankey",_model:null,render:function(g,t,e){var i,n,o,a,r=g.getGraph(),m=this.group,s=g.layoutInfo,l=g.getData(),v=g.getData("edge");this._model=g,m.removeAll(),m.attr("position",[s.x,s.y]),r.eachEdge(function(t){var e=new hM;e.dataIndex=t.dataIndex,e.seriesIndex=g.seriesIndex,e.dataType="edge";var i=t.getModel("lineStyle"),n=i.get("curveness"),o=t.node1.getLayout(),a=t.node2.getLayout(),r=t.getLayout();e.shape.extent=Math.max(1,r.dy);var s=o.x+o.dx,l=o.y+r.sy+r.dy/2,h=a.x,u=a.y+r.ty+r.dy/2,c=s*(1-n)+h*n,d=l,f=s*n+h*(1-n),p=u;switch(e.setShape({x1:s,y1:l,x2:h,y2:u,cpx1:c,cpy1:d,cpx2:f,cpy2:p}),e.setStyle(i.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}pn(e,t.getModel("emphasis.lineStyle").getItemStyle()),m.add(e),v.setItemGraphicEl(t.dataIndex,e)}),r.eachNode(function(t){var e=t.getLayout(),i=t.getModel(),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=new Nv({shape:{x:e.x,y:e.y,width:t.getLayout().dx,height:t.getLayout().dy},style:i.getModel("itemStyle").getItemStyle()}),r=t.getModel("emphasis.itemStyle").getItemStyle();gn(a.style,r,n,o,{labelFetcher:g,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),a.setStyle("fill",t.getVisual("color")),pn(a,r),m.add(a),l.setItemGraphicEl(t.dataIndex,a),a.dataType="node"}),!this._data&&g.get("animation")&&m.setClipPath((i=m.getBoundingRect(),n=g,o=function(){m.removeClipPath()},Mn(a=new Nv({shape:{x:i.x-10,y:i.y-10,width:0,height:i.height+20}}),{shape:{width:i.width+20,height:i.height+20}},n,o),a)),this._data=g.getData()},dispose:function(){}}),Fa(function(t,u,e){t.eachSeriesByType("sankey",function(t){var e,i=t.get("nodeWidth"),n=t.get("nodeGap"),o=(e=u,ro(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),a=(t.layoutInfo=o).width,r=o.height,s=t.getGraph(),l=s.nodes,h=s.edges;L(l,function(t){var e=gu(t.outEdges,xu),i=gu(t.inEdges,xu),n=Math.max(e,i);t.setLayout({value:n},!0)}),su(l,h,i,n,a,r,0!==I(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"))})}),Ha(function(t,e){t.eachSeriesByType("sankey",function(n){var t=n.getGraph().nodes;t.sort(function(t,e){return t.getLayout().value-e.getLayout().value});var o=t[0].getLayout().value,a=t[t.length-1].getLayout().value;L(t,function(t){var e=new Ub({type:"color",mappingMethod:"linear",dataExtent:[o,a],visual:n.get("color")}).mapValueToVisual(t.getLayout().value);t.setVisual("color",e);var i=t.getModel().get("itemStyle.color");null!=i&&t.setVisual("color",i)})})});var uM=Gi.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])}}}),cM=_u.prototype;cM._createContent=function(t,e,i){var n=t.getItemLayout(e),o="horizontal"===n.chartLayout?1:0,a=0;this.add(new Pv({shape:{points:i?wu(n.bodyEnds,o,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=a++;var r=k(n.whiskerEnds,function(t){return i?wu(t,o,n):t});this.add(new uM({shape:bu(r),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=a++},cM.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,o=t.getItemLayout(e),a=qv[i?"initProps":"updateProps"];a(this.childAt(this.bodyIndex),{shape:{points:o.bodyEnds}},n,e),a(this.childAt(this.whiskerIndex),{shape:bu(o.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},a(_u,_g);var dM=Su.prototype;dM.updateData=function(n){var o=this.group,a=this._data,r=this.styleUpdater;n.diff(a).add(function(t){if(n.hasValue(t)){var e=new _u(n,t,r,!0);n.setItemGraphicEl(t,e),o.add(e)}}).update(function(t,e){var i=a.getItemGraphicEl(e);n.hasValue(t)?(i?i.updateData(n,t):i=new _u(n,t,r),o.add(i),n.setItemGraphicEl(t,i)):o.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=n},dM.remove=function(){var e=this.group,t=this._data;this._data=null,t&&t.eachItemGraphicEl(function(t){t&&e.remove(t)})};var fM={_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.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),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],d=[o,a],f=d[h].get("type"),p=d[1-h].get("type"),g=t.data;if(g&&n){var m=[];L(g,function(t,e){var i;t.value&&O(t.value)?(i=t.value.slice(),t.value.unshift(e)):O(t)?(i=t.slice(),t.unshift(e)):i=t,m.push(i)}),t.data=m}var v=this.defaultValueDimensions;return qw(this,{coordDimensions:[{name:u,type:tr(f),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:tr(p),dimsDef:v.slice()}],dimensionsCount:v.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},pM={init:function(){var t=this._whiskerBoxDraw=new Su(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};o(sx.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:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),fM,!0),o(Jo.extend({type:"boxplot",getStyleUpdater:function(){return Mu},dispose:M}),pM,!0);var gM=["itemStyle"],mM=["emphasis","itemStyle"],vM=["itemStyle","borderColor"],yM=L;Ha(function(n,t){var o=n.get("color");n.eachRawSeriesByType("boxplot",function(t){var e=o[t.seriesIndex%o.length],i=t.getData();i.setVisual({legendSymbol:"roundRect",color:t.get(vM)||e}),n.isSeriesFiltered(t)||i.each(function(t){var e=i.getItemModel(t);i.setItemVisual(t,{color:e.get(vM,!0)})})})}),Fa(function(t){var n,o,e=(n=[],o=[],t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),i=y(o,e);i<0&&(i=o.length,o[i]=e,n[i]={axis:e,seriesModels:[]}),n[i].seriesModels.push(t)}),n);yM(e,function(r){var t=r.seriesModels;t.length&&(function(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;yM(o,function(t){h=Math.max(h,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])}yM(o,function(t){var e=t.get("boxWidth");O(e)||(e=[e,e]),l.push([zn(e[0],i)||0,zn(e[1],i)||0])});var u=.8*i-2,c=u/a*.3,d=(u-c*(a-1))/a,f=d/2-u/2;yM(o,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}(r),yM(t,function(t,e){var i,c,n,o,d,f,p,g,m,v,a,y;i=t,c=r.boxOffsetList[e],n=r.boxWidthList[e],d=i.coordinateSystem,f=i.getData(),p=n/2,g=i.get("layout"),v=1-(m="horizontal"===g?0:1),a=["x","y"],y=[],L(f.dimensions,function(t){var e=f.getDimensionInfo(t).coordDim;e===a[v]?y.push(t):e===a[m]&&(o=t)}),null==o||y.length<5||f.each([o].concat(y),function(){function t(t){var e,i=[];return i[m]=o,i[v]=t,isNaN(o)||isNaN(t)?e=[NaN,NaN]:(e=d.dataToPoint(i))[m]+=c,e}function e(t,e){var i=t.slice(),n=t.slice();i[m]+=p,n[m]-=p,e?u.push(i,n):u.push(n,i)}function i(t){var e=[t.slice(),t.slice()];e[0][m]-=p,e[1][m]+=p,h.push(e)}var n=arguments,o=n[0],a=n[y.length+1],r=t(n[3]),s=t(n[1]),l=t(n[5]),h=[[s,t(n[2])],[l,t(n[4])]];i(s),i(l),i(r);var u=[];e(h[0][1],0),e(h[1][1],1),f.setItemLayout(a,{chartLayout:g,initBaseline:r[v],median:r,bodyEnds:u,whiskerEnds:h})})}))})}),o(sx.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:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{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)}}),fM,!0),o(Jo.extend({type:"candlestick",getStyleUpdater:function(){return Iu},dispose:M}),pM,!0);var xM=["itemStyle"],_M=["emphasis","itemStyle"],wM=["itemStyle","borderColor"],bM=["itemStyle","borderColor0"],SM=["itemStyle","color"],MM=["itemStyle","color0"],IM=V;Ba(function(t){t&&O(t.series)&&L(t.series,function(t){R(t)&&"k"===t.type&&(t.type="candlestick")})}),Ha(function(e,t){e.eachRawSeriesByType("candlestick",function(t){var n=t.getData();n.setVisual({legendSymbol:"roundRect"}),e.isSeriesFiltered(t)||n.each(function(t){var e=n.getItemModel(t),i=n.getItemLayout(t).sign;n.setItemVisual(t,{color:e.get(0<i?SM:MM),borderColor:e.get(0<i?wM:bM)})})})}),Fa(function(t){t.eachSeriesByType("candlestick",function(t){var i,e,n,o,a,r,s,l,h,_=t.coordinateSystem,w=t.getData(),b=(n=w,a=(e=t).getBaseAxis(),r="category"===a.type?a.getBandWidth():(o=a.getExtent(),Math.abs(o[1]-o[0])/n.count()),s=zn(IM(e.get("barMaxWidth"),r),r),l=zn(IM(e.get("barMinWidth"),1),r),null!=(h=e.get("barWidth"))?zn(h,r):Math.max(Math.min(r/2,s),l)),S=t.get("layout"),M="horizontal"===S?0:1,I=1-M,u=["x","y"],T=[];if(L(w.dimensions,function(t){var e=w.getDimensionInfo(t).coordDim;e===u[I]?T.push(t):e===u[M]&&(i=t)}),!(null==i||T.length<4)){var A=0;w.each([i].concat(T),function(){function t(t){var e=[];return e[M]=s,e[I]=t,isNaN(s)||isNaN(t)?[NaN,NaN]:_.dataToPoint(e)}function e(t,e){var i=t.slice(),n=t.slice();i[M]=tn(i[M]+b/2,1,!1),n[M]=tn(n[M]-b/2,1,!0),e?x.push(i,n):x.push(n,i)}function i(t){return t[M]=tn(t[M],1),t}var n,o,a,r=arguments,s=r[0],l=r[T.length+1],h=r[1],u=r[2],c=r[3],d=r[4],f=Math.min(h,u),p=Math.max(h,u),g=t(f),m=t(p),v=t(c),y=[[i(t(d)),i(m)],[i(v),i(g)]],x=[];e(m,0),e(g,1),n=u<h?-1:h<u?1:0<A?w.getItemModel(A-1).get()[2]<=u?1:-1:1,w.setItemLayout(l,{chartLayout:S,sign:n,initBaseline:u<h?m[I]:g[I],bodyEnds:x,whiskerEnds:y,brushRect:(o=t(Math.min(h,u,c,d)),a=t(Math.max(h,u,c,d)),o[M]-=b/2,a[M]-=b/2,{x:o[0],y:o[1],width:I?b:a[0]-o[0],height:I?a[1]-o[1]:b})}),++A},!0)}})}),sx.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return cr(this.getSource(),this)},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 TM=Au.prototype;TM.stopEffectAnimation=function(){this.childAt(1).removeAll()},TM.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Pr(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)}Tu(n,t)},TM.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o<n.length;o++){var a=n[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}Tu(i,t)},TM.highlight=function(){this.trigger("emphasis")},TM.downplay=function(){this.trigger("normal")},TM.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n,o=this.childAt(1),a=t.getItemModel(e),r=t.getItemVisual(e,"symbol"),s=(O(n=t.getItemVisual(e,"symbolSize"))||(n=[+n,+n]),n),l=t.getItemVisual(e,"color");o.attr("scale",s),o.traverse(function(t){t.attr({fill:l})});var h=a.getShallow("symbolOffset");if(h){var u=o.position;u[0]=zn(h[0],s[0]),u[1]=zn(h[1],s[1])}o.rotation=(a.getShallow("symbolRotate")||0)*Math.PI/180||0;var c={};if(c.showEffectOn=i.get("showEffectOn"),c.rippleScale=a.get("rippleEffect.scale"),c.brushType=a.get("rippleEffect.brushType"),c.period=1e3*a.get("rippleEffect.period"),c.effectOffset=e/t.count(),c.z=a.getShallow("z")||0,c.zlevel=a.getShallow("zlevel")||0,c.symbolType=r,c.color=l,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===c.showEffectOn)this._effectCfg?this.updateEffectAnimation(c):this.startEffectAnimation(c),this._effectCfg=c;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),f=function(){d.highlight(),"render"!==c.showEffectOn&&this.startEffectAnimation(c)},p=function(){d.downplay(),"render"!==c.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",f,this).on("mouseout",p,this).on("emphasis",f,this).on("normal",p,this)}this._effectCfg=c},TM.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},a(Au,_g),qa({type:"effectScatter",init:function(){this._symbolDraw=new Fr(Au)},render:function(t,e,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n),this.group.add(o.group)},updateTransform:function(t,e,i){var n=t.getData();this.group.dirty();var o=fw().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=pt(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Ha(dw("effectScatter","circle")),Fa(fw("effectScatter"));var AM="undefined"==typeof window?global:window,DM=AM.Uint32Array||Array,CM=AM.Float64Array||Array,LM=sx.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){Du(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),LM.superApply(this,"init",arguments)},mergeOption:function(t){if(Du(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}LM.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=i(this._flatCoords,e.flatCoords),this._flatCoordsOffset=i(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;o<n;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}var a=this._getCoordsFromItemModel(t);for(o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var i=t.length,n=new DM(i),o=new CM(i),a=0,r=0,s=0,l=0;l<i;){s++;var h=t[l++];n[r++]=a+e,n[r++]=h;for(var u=0;u<h;u++){var c=t[l++],d=t[l++];o[a++]=c,o[a++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t,e){var a=new u_(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(t,e,i,n){if(t instanceof Array)return NaN;a.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[n]:o:void 0}),a},formatTooltip:function(t){var e=this.getData().getItemModel(t),i=e.get("name");if(i)return i;var n=e.get("fromName"),o=e.get("toName"),a=[];return null!=n&&a.push(n),null!=o&&a.push(o),Qn(a.join(" > "))},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,incremental:!1,incrementalThreshold:3e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),kM=Cu.prototype;kM.createLine=function(t,e,i){return new ah(t,e,i)},kM._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");O(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Pr(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))},kM._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"),h=B(t.get("delay"),function(t){return t/e.count()*r/3}),u="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,a),0<l&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=h;u&&(c=h(i)),0<n.__t&&(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}},kM.getLineLength=function(t){return Np(t.__p1,t.__cp1)+Np(t.__cp1,t.__p2)},kM.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]},kM.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},kM.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=bi,s=Si;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},kM.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},a(Cu,_g);var PM=Lu.prototype;PM._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new Ov({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},PM.updateData=function(t,e,i){var n=t.hostModel;Sn(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},PM._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),r=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(r=o.getModel("lineStyle").getLineStyle(),s=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(E({strokeNoScale:!0,fill:"none",stroke:a},r)),n.hoverStyle=s,pn(this)},PM.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},a(Lu,_g);var OM=ku.prototype;OM.createLine=function(t,e,i){return new Lu(t,e,i)},OM.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o<e.length;o++){var a=e[o-1],r=e[o];n+=Np(a,r),i.push(n)}if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}},OM.getLineLength=function(t){return this._length},OM.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);0<=r&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}J(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}},a(ku,Cu);var NM=Xi({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(r=0;r<i.length;){var o=i[r++];if(0<o){t.moveTo(i[r++],i[r++]);for(var a=1;a<o;a++)t.lineTo(i[r++],i[r++])}}else for(var r=0;r<i.length;){var s=i[r++],l=i[r++],h=i[r++],u=i[r++];if(t.moveTo(s,l),0<n){var c=(s+h)/2-(l-u)*n,d=(l+u)/2-(h-s)*n;t.quadraticCurveTo(c,d,h,u)}else t.lineTo(h,u)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r<n.length;){var s=n[r++];if(0<s)for(var l=n[r++],h=n[r++],u=1;u<s;u++)if(Li(l,h,c=n[r++],d=n[r++]))return a;a++}else for(a=0,r=0;r<n.length;){l=n[r++],h=n[r++];var c=n[r++],d=n[r++];if(0<o){if(Pi(l,h,(l+c)/2-(h-d)*o,(h+d)/2-(c-l)*o,c,d))return a}else if(Li(l,h,c,d))return a;a++}return-1}}),EM=Pu.prototype;EM.isPersistent=function(){return!this._incremental},EM.updateData=function(t){this.group.removeAll();var e=new NM({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},EM.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new ji({silent:!0})),this.group.add(this._incremental)):this._incremental=null},EM.incrementalUpdate=function(t,e){var i=new NM;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},EM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},EM._setCommon=function(i,t,e){var n=t.hostModel;i.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),i.useStyle(n.getModel("lineStyle").getLineStyle()),i.style.strokeNoScale=!0;var o=t.getVisual("color");o&&i.setStyle("stroke",o),i.setStyle("fill"),e||(i.seriesIndex=n.seriesIndex,i.on("mousemove",function(t){i.dataIndex=null;var e=i.findDataIndex(t.offsetX,t.offsetY);0<e&&(i.dataIndex=e+i.__startIndex)}))},EM._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var zM={seriesType:"lines",plan:ux(),reset:function(g){var m=g.coordinateSystem,v=g.get("polyline"),y=g.pipelineContext.large;return{progress:function(t,e){var i=[];if(y){var n,o=t.end-t.start;if(v){for(var a=0,r=t.start;r<t.end;r++)a+=g.getLineCoordsCount(r);n=new Float32Array(o+2*a)}else n=new Float32Array(2*o);var s=0,l=[];for(r=t.start;r<t.end;r++){c=g.getLineCoords(r,i),v&&(n[s++]=c);for(var h=0;h<c;h++)l=m.dataToPoint(i[h],!1,l),n[s++]=l[0],n[s++]=l[1]}e.setLayout("linesPoints",n)}else for(r=t.start;r<t.end;r++){var u=e.getItemModel(r),c=g.getLineCoords(r,i),d=[];if(v)for(var f=0;f<c;f++)d.push(m.dataToPoint(i[f]));else{d[0]=m.dataToPoint(i[0]),d[1]=m.dataToPoint(i[1]);var p=u.get("lineStyle.curveness");+p&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*p,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*p])}e.setItemLayout(r,d)}}}}};qa({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),a=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),o.updateData(n),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(!this._finished||t.pipelineContext.large)return{update:!0};var o=zM.reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext.large;return i&&n===this._hasEffet&&o===this._isPolyline&&a===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=a?new Pu:new rh(o?n?ku:Lu:n?Cu:ah),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var RM="lineStyle.opacity".split("."),BM={seriesType:"lines",reset:function(t,e,i){var n=Ou(t.get("symbol")),o=Ou(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("opacity",t.get(RM)),{dataEach:a.hasItemOption?function(t,e){var i=t.getItemModel(e),n=Ou(i.getShallow("symbol",!0)),o=Ou(i.getShallow("symbolSize",!0)),a=i.get(RM);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}:null}}};Fa(zM),Ha(BM),sx.extend({type:"series.heatmap",getInitialData:function(t,e){return cr(this.getSource(),this)},preventIncremental:function(){var t=So.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}}),Nu.prototype={update:function(t,e,i,n,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),h=this.pointSize+this.blurSize,u=this.canvas,c=u.getContext("2d"),d=t.length;u.width=e,u.height=i;for(var f=0;f<d;++f){var p=t[f],g=p[0],m=p[1],v=n(p[2]);c.globalAlpha=v,c.drawImage(r,g-h,m-h)}if(!u.width||!u.height)return u;for(var y=c.getImageData(0,0,u.width,u.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(0<v){var I=a(v)?s:l;0<v&&(v=v*S+b),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=Ap()),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}},qa({type:"heatmap",render:function(i,t,e){var n;t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===i&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o,a=i.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(i,e,0,i.getData().count()):"lng"===(o=a.dimensions)[0]&&"lat"===o[1]&&this._renderOnGeo(a,i,n,e)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var a,r,s=t.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),h=s.getAxis("y");a=l.getBandWidth(),r=h.getBandWidth()}for(var u=this.group,c=t.getData(),d=t.getModel("itemStyle").getItemStyle(["color"]),f=t.getModel("emphasis.itemStyle").getItemStyle(),p=t.getModel("label"),g=t.getModel("emphasis.label"),m=s.type,v="cartesian2d"===m?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],y=i;y<n;y++){var x;if("cartesian2d"===m){if(isNaN(c.get(v[2],y)))continue;var _=s.dataToPoint([c.get(v[0],y),c.get(v[1],y)]);x=new Nv({shape:{x:_[0]-a/2,y:_[1]-r/2,width:a,height:r},style:{fill:c.getItemVisual(y,"color"),opacity:c.getItemVisual(y,"opacity")}})}else{if(isNaN(c.get(v[1],y)))continue;x=new Nv({z2:1,shape:s.dataToRect([c.get(v[0],y)]).contentShape,style:{fill:c.getItemVisual(y,"color"),opacity:c.getItemVisual(y,"opacity")}})}var w=c.getItemModel(y);c.hasItemOption&&(d=w.getModel("itemStyle").getItemStyle(["color"]),f=w.getModel("emphasis.itemStyle").getItemStyle(),p=w.getModel("label"),g=w.getModel("emphasis.label"));var b=t.getRawValue(y),S="-";b&&null!=b[2]&&(S=b[2]),gn(d,f,p,g,{labelFetcher:t,labelDataIndex:y,defaultText:S,isRectText:!0}),x.setStyle(d),pn(x,c.hasItemOption?f:P({},f)),(x.incremental=o)&&(x.useHoverLayer=!0),u.add(x),c.setItemGraphicEl(y,x)}},_renderOnGeo:function(o,t,e,i){var n=e.targetVisuals.inRange,a=e.targetVisuals.outOfRange,r=t.getData(),s=this._hmLayer||this._hmLayer||new Nu;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=o.getViewRect().clone(),h=o.getRoamTransform();l.applyTransform(h);var u,c,d,f,p,g,m,v,y,x=Math.max(l.x,0),_=Math.max(l.y,0),w=Math.min(l.width+l.x,i.getWidth()),b=Math.min(l.height+l.y,i.getHeight()),S=w-x,M=b-_,I=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],T=r.mapArray(I,function(t,e,i){var n=o.dataToPoint([t,e]);return n[0]-=x,n[1]-=_,n.push(i),n}),A=e.getExtent(),D="visualMap.continuous"===e.type?(m=A,v=e.option.range,y=m[1]-m[0],v=[(v[0]-m[0])/y,(v[1]-m[0])/y],function(t){return t>=v[0]&&t<=v[1]}):(u=A,c=e.getPieceList(),d=e.option.selected,f=u[1]-u[0],p=(c=k(c,function(t){return{interval:[(t.interval[0]-u[0])/f,(t.interval[1]-u[0])/f]}})).length,g=0,function(t){for(e=g;e<p;e++)if((i=c[e].interval)[0]<=t&&t<=i[1]){g=e;break}if(e===p)for(var e=g-1;0<=e;e--){var i=c[e].interval;if(i[0]<=t&&t<=i[1]){g=e;break}}return 0<=e&&e<p&&d[e]});s.update(T,S,M,n.color.getNormalizer(),{inRange:n.color.getColorMapper(),outOfRange:a.color.getColorMapper()},D);var C=new Be({style:{width:S,height:M,x:x,y:_,image:s.canvas},silent:!0});this.group.add(C)},dispose:function(){}});var VM=Zw.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,VM.superApply(this,"getInitialData",arguments)}}),GM=["itemStyle","borderWidth"],WM=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],FM=new Av;qa({type:"pictorialBar",render:function(t,e,i){var c=this.group,d=t.getData(),f=this._data,n=t.coordinateSystem,o=!!n.getBaseAxis().isHorizontal(),a=n.grid.getRect(),p={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:n,coordSysExtent:[[a.x,a.x+a.width],[a.y,a.y+a.height]],isHorizontal:o,valueDim:WM[+o],categoryDim:WM[1-o]};return d.diff(f).add(function(t){if(d.hasValue(t)){var e=Fu(d,t),i=Eu(d,t,e,p),n=ju(d,p,i);d.setItemGraphicEl(t,n),c.add(n),Ku(n,p,i)}}).update(function(t,e){var i,n,o,a,r,s=f.getItemGraphicEl(e);if(d.hasValue(t)){var l=Fu(d,t),h=Eu(d,t,l,p),u=Yu(d,h);s&&u!==s.__pictorialShapeStr&&(c.remove(s),d.setItemGraphicEl(t,null),s=null),s?(i=s,n=p,a=(o=h).animationModel,r=o.dataIndex,Sn(i.__pictorialBundle,{position:o.bundlePosition.slice()},a,r),o.symbolRepeat?Bu(i,n,o,!0):Vu(i,0,o,!0),Gu(i,o,!0),Wu(i,n,o,!0)):s=ju(d,p,h,!0),d.setItemGraphicEl(t,s),s.__pictorialSymbolMeta=h,c.add(s),Ku(s,p,h)}else c.remove(s)}).remove(function(t){var e=f.getItemGraphicEl(t);e&&Xu(f,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=d,this.group},dispose:M,remove:function(e,t){var i=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(t){Xu(n,t.dataIndex,e,t)}):i.removeAll()}}),Fa(z(Sr,"pictorialBar")),Ha(dw("pictorialBar","roundRect"));var HM=function(t,e,i,n,o){Y_.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null,this._labelInterval=null};HM.prototype={constructor:HM,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},a(HM,Y_),So.register("single",{create:function(n,o){var a=[];return n.eachComponent("singleAxis",function(t,e){var i=new Qu(t,n,o);i.name="single_"+e,i.resize(t,o),t.coordinateSystem=i,a.push(i)}),n.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=e&&e.coordinateSystem}}),a},dimensions:(Qu.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:Qu,_init:function(t,e,i){var n=this.dimension,o=new HM(n,Ar(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).model=t,(o.coordinateSystem=this)._axis=o},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();L(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Tr(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=ro({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}}).dimensions});var ZM=Lw.getInterval,UM=Lw.ifIgnoreOnTick,jM=["axisLine","axisTickLabel","axisName"],XM=Rw.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=tc(t),r=new Lw(t,a);L(jM,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t,a.labelInterval),XM.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=ZM(n,e);r=r instanceof Array?r:[r];for(var l=t.coordinateSystem.getRect(),h=i.isHorizontal(),u=[],c=0,d=i.getTicksCoords(),f=[],p=[],g=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=0;v<d.length;++v)if(!UM(i,v,s,d.length,g,m)){var y=i.toGlobalCoord(d[v]);p[1]=h?(f[0]=y,f[1]=l.y,p[0]=y,l.y+l.height):(f[0]=l.x,f[1]=y,p[0]=l.x+l.width,y);var x=c++%r.length;u[x]=u[x]||[],u[x].push(new Ev(Ji({shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]},style:{lineWidth:a},silent:!0})))}for(v=0;v<u.length;++v)this.group.add(Yv(u[v],{style:{stroke:r[v%r.length],lineDash:o.getLineDash(a),lineWidth:a},silent:!0}))}}}),YM=by.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});g(YM.prototype,E_),ww("single",YM,function(t,e){return e.type||(e.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var qM=function(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var a=i.getData(),r=ai(a,t);if(null==r||r<0||O(r))return{point:[]};var s=a.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(k(l.dimensions,function(t){return a.mapDimension(t)}),r,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}},$M=L,KM=z,JM=ri(),QM=(ja({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),ri()),tI=L,eI=Xa({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";rc("axisPointer",i,function(t,e,i){"none"!==o&&("leave"===t||0<=o.indexOf(t))&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){hc(e.getZr(),"axisPointer"),eI.superApply(this._model,"remove",arguments)},dispose:function(t,e){hc("axisPointer",e),eI.superApply(this._model,"dispose",arguments)}}),iI=ri(),nI=D,oI=_;ci((uc.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=z(cc,e,u);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new _g,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);pc(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)return!0===i;var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=ys(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=iI(t).pointerEl=new qv[o.type](nI(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=iI(t).labelEl=new Nv(nI(e.label));t.add(o),dc(o,n)}},updatePointerEl:function(t,e,i){var n=iI(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=iI(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),dc(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=Ln(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){$g(t.event)},onmousedown:oI(this._onHandleDragMove,this,0,0),drift:oI(this._onHandleDragMove,this),ondragend:oI(this._onHandleDragEnd,this)}),n.add(o)),pc(o,i,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");O(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),aa(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){cc(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fc(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(fc(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(fc(n)),iI(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=uc);var aI=uc.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=Sc(r,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var u=gc(n),c=rI[s](a,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}xc(e,t,Ss(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Ss(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:yc(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=Sc(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];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}}),rI={line:function(t,e,i,n){var o=_c([e,i[0]],[e,i[1]],Mc(t));return Ji({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:wc([e-o/2,i[0]],[o,a],Mc(t))}}};Rw.registerAxisPointerClass("CartesianAxisPointer",aI),Ba(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),Va(zx.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ms(t,e)}),Ga({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var o,n,a,r=t.currTrigger,s=[t.x,t.y],l=t,h=t.dispatchAction||_(i.dispatchAction,i),u=e.getComponent("axisPointer").coordSysAxesInfo;if(u){ac(s)&&(s=qM({seriesIndex:l.seriesIndex,dataIndex:l.dataIndex},e).point);var c=ac(s),d=l.axesInfo,f=u.axesInfo,p="leave"===r||ac(s),g={},m={},v={list:[],map:{}},y={showPointer:KM(ic,m),showTooltip:KM(nc,v)};$M(u.coordSysMap,function(t,e){var a=c||t.containPoint(s);$M(u.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}}(d,t);if(!p&&a&&(!d||n)){var o=n&&n.value;null!=o||c||(o=i.pointToData(s)),null!=o&&ec(t,o,y,!1,g)}})});var x={};return $M(f,function(o,t){var a=o.linkGroup;a&&!m[t]&&$M(a.axesInfo,function(t,e){var i=m[e];if(t!==o&&i){var n=i.value;a.mapper&&(n=o.axis.scale.parse(a.mapper(n,oc(t),oc(o)))),x[o.key]=n}})}),$M(x,function(t,e){ec(f[e],t,y,!0,g)}),o=m,n=f,a=g.axesInfo=[],$M(n,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})}),function(t,e,i,n){if(!ac(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"})}(v,s,t,h),function(t,e,i){var n=i.getZr(),o=JM(n).axisPointerLastHighlights||{},a=JM(n).axisPointerLastHighlights={};$M(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&$M(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];L(o,function(t,e){!a[e]&&s.push(t)}),L(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})}(f,0,i),g}});var sI=["x","y"],lI=["width","height"],hI=uc.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=Tc(r,1-Ic(a)),l=r.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=gc(n),c=uI[h](a,l,s,u);c.style=u,t.graphicKey=c.type,t.pointer=c}xc(e,t,tc(i),i,n,o)},getHandleTransform:function(t,e,i){var n=tc(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:yc(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=Ic(o),s=Tc(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=Tc(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"}}}}),uI={line:function(t,e,i,n){var o=_c([e,i[0]],[e,i[1]],Ic(t));return Ji({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:wc([e-o/2,i[0]],[o,a],Ic(t))}}};Rw.registerAxisPointerClass("SingleAxisPointer",hI),Xa({type:"single"});var cI=sx.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){cI.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=k(ru().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;r<n;++r){var s=i[r].dataList.length;o<s&&(o=s,a=r)}for(var l=0;l<n;++l)if(l!==a)for(var h=i[l].name,u=0;u<o;++u){for(var c=i[a].dataList[u][0],d=i[l].dataList.length,f=-1,p=0;p<d;++p)if(i[l].dataList[p][0]===c){f=p;break}-1===f&&(t[e]=[],t[e][0]=c,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),n=I(t.data,function(t){return void 0!==t[2]}),o=this.fixData(n||[]),a=[],r=this.nameMap=C(),s=0,l=0;l<o.length;++l)a.push(o[l][2]),r.get(o[l][2])||(r.set(o[l][2],s),s++);var h=f_(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:tr(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),u=new u_(h,this);return u.initData(o),u},getLayerSeries:function(){for(var i=this.getData(),t=i.count(),e=[],n=0;n<t;++n)e[n]=n;for(var o=k(ru().key(function(t){return i.get("name",t)}).entries(e),function(t){return{name:t.key,indices:t.values}}),a=i.mapDimension("single"),r=0;r<o.length;++r)o[r].indices.sort(function(t,e){return i.get(a,t)-i.get(a,e)});return o},getAxisTooltipData:function(t,e,i){O(t)||(t=t?[t]:[]);for(var n,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var h=Number.MAX_VALUE,u=-1,c=a[l].indices.length,d=0;d<c;++d){var f=o.get(t[0],a[l].indices[d]),p=Math.abs(f-e);p<=h&&(n=f,h=p,u=a[l].indices[d])}r.push(u)}return{dataIndices:r,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return(isNaN(n)||null==n)&&(n="-"),Qn(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,textAlign:"right",show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});qa({type:"themeRiver",init:function(){this._layers=[]},render:function(T,t,e){function i(t){return t.name}function n(t,e,i){var n,o,a,r,s=this._layers;if("remove"!==t){for(var l,h=[],u=[],c=C[e].indices,d=0;d<c.length;d++){var f=A.getItemLayout(c[d]),p=f.x,g=f.y0,m=f.y;h.push([p,g]),u.push([p,g+m]),l=A.getItemVisual(c[d],"color")}var v,y,x=A.getItemLayout(c[0]),_=A.getItemModel(c[d-1]),w=_.getModel("label"),b=w.get("margin");if("add"===t)S=L[e]=new _g,v=new cw({shape:{points:h,stackedOnPoints:u,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),y=new Tv({style:{x:x.x-b,y:x.y0+x.y/2}}),S.add(v),S.add(y),D.add(S),v.setClipPath((n=v.getBoundingRect(),o=T,a=function(){v.removeClipPath()},Mn(r=new Nv({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}}),{shape:{width:n.width+20,height:n.height+20}},o,a),r));else{var S=s[i];v=S.childAt(0),y=S.childAt(1),D.add(S),L[e]=S,Sn(v,{shape:{points:h,stackedOnPoints:u}},T),Sn(y,{style:{x:x.x-b,y:x.y0+x.y/2}},T)}var M=_.getModel("emphasis.itemStyle"),I=_.getModel("itemStyle");mn(y.style,w,{text:w.get("show")?T.getFormattedLabel(c[d-1],"normal")||A.getName(c[d-1]):null,textVerticalAlign:"middle"}),v.setStyle(P({fill:l},I.getItemStyle(["color"]))),pn(v,M.getItemStyle())}else D.remove(s[e])}var A=T.getData(),D=this.group,C=T.getLayerSeries(),o=A.getLayout("layoutInfo"),a=o.rect,r=o.boundaryGap;D.attr("position",[0,a.y+r[0]]);var L={};new Ja(this._layersSeries||[],C,i,i).add(_(n,this,"add")).update(_(n,this,"update")).remove(_(n,this,"remove")).execute(),this._layersSeries=C,this._layers=L},dispose:function(){}}),Fa(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var a=t.get("boundaryGap"),r=i.getAxis();n.boundaryGap=a,"horizontal"===r.orient?(a[0]=zn(a[0],o.height),a[1]=zn(a[1],o.height),Ac(e,t,o.height-a[0]-a[1])):(a[0]=zn(a[0],o.width),a[1]=zn(a[1],o.width),Ac(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",n)})}),Ha(function(t){t.eachSeriesByType("themeRiver",function(o){var a=o.getData(),r=o.getRawData(),s=o.get("color"),l=C();a.each(function(t){l.set(a.getRawIndex(t),t)}),r.each(function(t){var e=r.getName(t),i=s[(o.nameMap.get(e)-1)%s.length];r.setItemVisual(t,"color",i);var n=l.get(t);null!=n&&a.setItemVisual(n,"color",i)})})}),Va(ob("themeRiver")),sx.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;L(t.children,function(t){i(t);var e=t.value;O(e)&&(e=e[0]),n+=e});var e=t.value;O(e)&&(e=e[0]),(null==e||isNaN(e))&&(e=n),e<0&&(e=0),O(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[],o={};return o.levels=n,pl.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=sx.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=kl(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},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 dI="none",fI=2,pI=4,gI=Dc.prototype;gI.updateData=function(t,e,i,n,o){(this.node=e).piece=this,n=n||this._seriesModel,o=o||this._ecModel;var a=this.childAt(0);a.dataIndex=e.dataIndex;var r=e.getModel(),s=e.getLayout(),l=P({},s);l.label=null;var h,u=Cc(e,0,o),c=r.getModel("itemStyle").getItemStyle();h=E({lineJoin:"bevel",fill:(h="normal"===i?c:g(r.getModel(i+".itemStyle").getItemStyle(),c)).fill||u},h),t?(a.setShape(l),a.shape.r=s.r0,Sn(a,{shape:{r:s.r}},n,e.dataIndex),a.useStyle(h)):Sn(a,{shape:l,style:h},n),"normal"===i&&(a.hoverStyle=r.getModel("emphasis.itemStyle").getItemStyle(),pn(this)),this._updateLabel(n,o,u);var d=r.getShallow("cursor");if(d&&a.attr("cursor",d),t){var f=n.getShallow("highlightPolicy");this._initEvents(a,e,n,f)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel},gI.onEmphasis=function(o){var a=this;this.node.hostTree.root.eachNode(function(t){var e,i,n;t.piece&&(a.node===t?t.piece.updateData(!1,t,"emphasis"):(e=t,i=a.node,(n=o)!==DE.NONE&&(n===DE.SELF?e===i:n===DE.ANCESTOR?e===i||e.isAncestorOf(i):e===i||e.isDescendantOf(i))?t.piece.childAt(0).trigger("highlight"):o!==dI&&t.piece.childAt(0).trigger("downplay")))})},gI.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},gI.onHighlight=function(){this.updateData(!1,this.node,"highlight")},gI.onDownplay=function(){this.updateData(!1,this.node,"downplay")},gI._updateLabel=function(t,e,i){var n=this.node.getModel(),o=n.getModel("label"),a=n.getModel("label.emphasis"),r=B(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);o.get("show")||(r="");var s=this.childAt(1);gn(s.style,s.hoverStyle={},o,a,{defaultText:o.getShallow("show")?r:null,autoColor:i,useInsideStyle:!0});var l,h=this.node.getLayout(),u=(h.startAngle+h.endAngle)/2,c=Math.cos(u),d=Math.sin(u),f=o.get("position"),p=o.get("distance")||0,g=o.get("align");"outside"===f?(l=h.r+p,g=u>Math.PI/2?"right":"left"):g&&"center"!==g?"left"===g?(l=h.r0+p,u>Math.PI/2&&(g="right")):"right"===g&&(l=h.r-p,u>Math.PI/2&&(g="left")):(l=(h.r+h.r0)/2,g="center"),s.attr("style",{text:r,textAlign:g,textVerticalAlign:o.get("verticalAlign")||"middle",opacity:o.get("opacity")});var m=l*c+h.cx,v=l*d+h.cy;s.attr("position",[m,v]);var y=o.getShallow("rotate"),x=0;"radial"===y?(x=-u)<-Math.PI/2&&(x+=Math.PI):"tangential"===y?(x=Math.PI/2-u)>Math.PI/2?x-=Math.PI:x<-Math.PI/2&&(x+=Math.PI):"number"==typeof y&&(x=y*Math.PI/180),s.attr("rotation",x)},gI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this,a=function(){o.onEmphasis(n)},r=function(){o.onNormal()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",function(){o.onDownplay()}).on("highlight",function(){o.onHighlight()})},a(Dc,_g),Jo.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){function r(t,e){if(h||!t||t.getValue()||(t=null),t!==s&&e!==s)if(e&&e.piece)t?e.piece.updateData(!1,t,"normal",o,a):(n=e)&&n.piece&&(l.remove(n.piece),n.piece=null);else if(t){var i=new Dc(t,o,a);l.add(i)}var n}var n=this;this.seriesModel=o,this.api=t,this.ecModel=a;var s=o.getData().tree.root,i=o.getViewRoot(),l=this.group,h=o.get("renderLabelForZeroData"),u=[];i.eachNode(function(t){u.push(t)});var c=this._oldChildren||[];if(function(i,n){function t(t){return t.getId()}function e(t,e){r(null==t?null:i[t],null==e?null:n[e])}0===i.length&&0===n.length||new Ja(n,i,t,t).add(e).update(e).remove(z(e,null)).execute()}(u,c),function(t,e){if(0<e.depth){t.piece?t.piece.updateData(!1,t,"normal",o,a):(t.piece=new Dc(t,o,a),l.add(t.piece)),e.piece._onclickEvent&&e.piece.off("click",e.piece._onclickEvent);var i=function(t){n._rootToNode(e.parentNode)};e.piece._onclickEvent=i,t.piece.on("click",i)}else t.piece&&(l.remove(t.piece),t.piece=null)}(s,i),e&&e.highlight&&e.highlight.piece){var d=o.getShallow("highlightPolicy");e.highlight.piece.onEmphasis(d)}else if(e&&e.unhighlight){var f=s.piece;!f&&s.children.length&&(f=s.children[0].piece),f&&f.onNormal()}this._initEvents(),this._oldChildren=u},dispose:function(){},_initEvents:function(){var s=this,t=function(o){var a=s.seriesModel.get("nodeClick",!0);if(a){var r=!1;s.seriesModel.getViewRoot().eachNode(function(t){if(!r&&t.piece&&t.piece.childAt(0)===o.target){if("rootToNode"===a)s._rootToNode(t);else if("link"===a){var e=t.getModel(),i=e.get("link",!0);if(i){var n=e.get("target",!0)||"_blank";i&&window.open(i,n)}}r=!0}})}};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},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 mI="sunburstRootToNode";Ga({type:mI,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var i=Dl(o,[mI],t);if(i){var n=t.getViewRoot();n&&(o.direction=Ll(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var vI="sunburstHighlight";Ga({type:vI,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=Dl(n,[vI],t);i&&(n.highlight=i.node)})}),Ga({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var yI=Math.PI/180;Ha(z(tb,"sunburst")),Fa(z(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");O(i)||(i=[0,i]),O(e)||(e=[e,e]);var n=C.getWidth(),o=C.getHeight(),u=Math.min(n,o),c=zn(e[0],n),d=zn(e[1],o),f=zn(i[0],u/2),a=zn(i[1],u/2),r=-t.get("startAngle")*yI,p=t.get("minAngle")*yI,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=function(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})}(n,i),n.length&&L(t.children,function(t){e(t,i)})}(s,l);var h=0;L(s.children,function(t){!isNaN(t.getValue())&&h++});var v=s.getValue(),y=Math.PI/(v||h)*2,x=0<s.depth,_=s.height-(x?-1:1),w=(a-f)/(_||1),b=t.get("clockwise"),S=t.get("stillShowZeroSum"),M=b?1:-1,I=function(t,e){if(t){var i=e;if(t!==g){var n=t.getValue(),o=0===v&&S?y:n*y;o<p&&(o=p),i=e+M*o;var a=t.depth-m-(x?-1:1),r=f+w*a,s=f+w*(a+1),l=t.getModel();null!=l.get("r0")&&(r=zn(l.get("r0"),u/2)),null!=l.get("r")&&(s=zn(l.get("r"),u/2)),t.setLayout({angle:o,startAngle:e,endAngle:i,clockwise:b,cx:c,cy:d,r0:r,r:s})}if(t.children&&t.children.length){var h=0;L(t.children,function(t){h+=I(t,e+h)})}return i-e}};if(x){var T=f,A=f+w,D=2*Math.PI;g.setLayout({angle:D,startAngle:r,endAngle:r+D,clockwise:b,cx:c,cy:d,r0:T,r:A})}I(s,r)})},"sunburst")),Va(z(ob,"sunburst"));var xI=["itemStyle"],_I=["emphasis","itemStyle"],wI=["label"],bI=["emphasis","label"],SI="e\0\0",MI={cartesian2d:function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:_(Lc,e)}}},geo:function(i){var t=i.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,e){return i.dataToPoint(t,e)},size:_(kc,i)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:_(Pc,e)}}},polar:function(o){var a=o.getRadiusAxis(),r=o.getAngleAxis(),t=a.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:_(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:_(Oc,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)}}}}};Ya({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0},getInitialData:function(t,e){return cr(this.getSource(),this)}}),qa({type:"custom",_data:null,render:function(n,t,e){var o=this._data,a=n.getData(),r=this.group,s=Ec(n,a,t,e);this.group.removeAll(),a.diff(o).add(function(t){a.hasValue(t)&&zc(null,t,s(t),n,r,a)}).update(function(t,e){var i=o.getItemGraphicEl(e);a.hasValue(t)?zc(i,t,s(t),n,r,a):i&&r.remove(i)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n){for(var o=e.getData(),a=Ec(e,o,i,n),r=t.start;r<t.end;r++)zc(null,r,a(r),e,this.group,o).traverse(function(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)})},dispose:M}),Ba(function(t){var e=t.graphic;O(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var II=ja({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,II.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,c=i.elements=e?[]:i.elements,o=[];this._flatten(n,o);var a=ii(c,o);ni(a);var d=this._elOptionsToUpdate=[];L(a,function(t,e){var i,n,o,a,r,s,l,h,u=t.option;u&&(d.push(u),function(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,u),o=c,a=e,s=P({},r=u),l=o[a],"merge"===(h=r.$action||"merge")?l?(g(l,s,!0),lo(l,s,{ignoreSize:!0}),uo(r,l)):o[a]=s:"replace"===h?o[a]=s:"remove"===h&&l&&(o[a]=null),i=c[e],n=u,i&&(i.hv=n.hv=[Hc(n,["left","right"]),Hc(n,["top","bottom"])],"group"===i.type&&(null==i.width&&(i.width=n.width=0),null==i.height&&(i.height=n.height=0))))},this);for(var r=c.length-1;0<=r;r--)null==c[r]?c.splice(r,1):delete c[r].$action},_flatten:function(t,i,n){L(t,function(t){if(t){n&&(t.parentOption=n),i.push(t);var e=t.children;"group"===t.type&&e&&this._flatten(e,i,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Xa({type:"graphic",init:function(t,e){this._elMap=C(),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 u=this._elMap,c=this.group;L(i,function(t){var e=t.$action,i=t.id,n=u.get(i),o=t.parentId,a=null!=o?u.get(o):c;if("text"===t.type){var r=t.style;t.hv&&t.hv[1]&&(r.textVerticalAlign=r.textBaseline=null),!r.hasOwnProperty("textFill")&&r.fill&&(r.textFill=r.fill),!r.hasOwnProperty("textStroke")&&r.stroke&&(r.textStroke=r.stroke)}var s,l=(s=P({},s=t),L(["id","parentId","$action","hv","bounding"].concat(vy),function(t){delete s[t]}),s);e&&"merge"!==e?"replace"===e?(Fc(n,u),Wc(i,a,l,u)):"remove"===e&&Fc(n,u):n?n.attr(l):Wc(i,a,l,u);var h=u.get(i);h&&(h.__ecGraphicWidth=t.width,h.__ecGraphicHeight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=i.length-1;0<=a;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;so(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 e=this._elMap;e.each(function(t){Fc(t,e)}),this._elMap=C()},dispose:function(){this._clear()}});var TI=ja({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){TI.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<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(a){var r=[],s=[];a.eachRawSeries(function(t){var e,i=t.name;if(s.push(i),t.legendDataProvider){var n=t.legendDataProvider(),o=n.mapArray(n.getName);a.isSeriesFiltered(t)||(s=s.concat(o)),o.length?r=r.concat(o):e=i}else e=i;e&&e!==pm&&r.push(e)}),this._availableNames=s;var t=k(this.get("data")||r,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new kn(t,this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&L(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=y(this._availableNames,t)},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}}});Ga("legendToggleSelect","legendselectchanged",z(Zc,"toggleSelected")),Ga("legendSelect","legendselected",z(Zc,"select")),Ga("legendUnSelect","legendunselected",z(Zc,"unSelect"));var AI=z,DI=L,CI=_g,LI=Xa({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new CI),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()},r=t.get("padding"),s=ro(o,a,r),l=this.layoutInner(t,n,s),h=ro(E({width:l.width,height:l.height},o),a,r);this.group.attr("position",[h.x-l.x,h.y-l.y]),this.group.add(this._backgroundEl=Uc(l,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(l,h,u,c){var d=this.getContentGroup(),f=C(),p=h.get("selectedMode");DI(h.getData(),function(o,a){var r=o.get("name");if(this.newlineDisabled||""!==r&&"\n"!==r){var t=u.getSeriesByName(r)[0];if(!f.get(r))if(t){var e=t.getData(),i=e.getVisual("color");"function"==typeof i&&(i=i(t.getDataParams(0)));var n=e.getVisual("legendSymbol")||"roundRect",s=e.getVisual("symbol");this._createItem(r,a,o,h,n,s,l,i,p).on("click",AI(jc,r,c)).on("mouseover",AI(Xc,t,null,c)).on("mouseout",AI(Yc,t,null,c)),f.set(r,!0)}else u.eachRawSeries(function(t){if(!f.get(r)&&t.legendDataProvider){var e=t.legendDataProvider(),i=e.indexOfName(r);if(i<0)return;var n=e.getItemVisual(i,"color");this._createItem(r,a,o,h,"roundRect",null,l,n,p).on("click",AI(jc,r,c)).on("mouseover",AI(Xc,t,r,c)).on("mouseout",AI(Yc,t,r,c)),f.set(r,!0)}},this)}else d.add(new CI({newline:!0}))},this)},_createItem:function(t,e,i,n,o,a,r,s,l){var h=n.get("itemWidth"),u=n.get("itemHeight"),c=n.get("inactiveColor"),d=n.isSelected(t),f=new CI,p=i.getModel("textStyle"),g=i.get("icon"),m=i.getModel("tooltip"),v=m.parentModel;if(o=g||o,f.add(Pr(o,0,0,h,u,d?s:c,!0)),!g&&a&&(a!==o||"none"==a)){var y=.8*u;"none"===a&&(a="circle"),f.add(Pr(a,(h-y)/2,(u-y)/2,y,y,d?s:c))}var x="left"===r?h+5:-5,_=r,w=n.get("formatter"),b=t;"string"==typeof w&&w?b=w.replace("{name}",null!=t?t:""):"function"==typeof w&&(b=w(t)),f.add(new Tv({style:mn({},p,{text:b,x:x,y:u/2,textFill:d?p.getTextColor():c,textAlign:_,textVerticalAlign:"middle"})}));var S=new Nv({shape:f.getBoundingRect(),invisible:!0,tooltip:m.get("show")?P({content:t,formatter:v.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},m.option):null});return f.add(S),f.eachChild(function(t){t.silent=!0}),S.silent=!l,this.getContentGroup().add(f),pn(f),f.__legendDataIndex=e,f},layoutInner:function(t,e,i){var n=this.getContentGroup();xy(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()}});Va(function(t){var i=t.findComponents({mainType:"legend"});i&&i.length&&t.filterSeries(function(t){for(var e=0;e<i.length;e++)if(!i[e].isSelected(t.name))return!1;return!0})}),by.registerSubTypeDefaulter("legend",function(){return"plain"});var kI=TI.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var o=ho(t);kI.superCall(this,"init",t,e,i,n),qc(this,t,o)},mergeOption:function(t,e){kI.superCall(this,"mergeOption",t,e),qc(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}}),PI=_g,OI=["width","height"],NI=["x","y"],EI=LI.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){EI.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new PI),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new PI),this._showController},resetInner:function(){EI.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,o,e,a){function i(t,e){var i=t+"DataIndex",n=Ln(o.get("pageIcons",!0)[o.getOrient().name][e],{onclick:_(r._pageGo,r,i,o,a)},{x:-l[0]/2,y:-l[1]/2,width:l[0],height:l[1]});n.name=t,s.add(n)}var r=this;EI.superCall(this,"renderInner",t,o,e,a);var s=this._controllerGroup,l=o.get("pageIconSize",!0);O(l)||(l=[l,l]),i("pagePrev",0);var n=o.getModel("pageTextStyle");s.add(new Tv({name:"pageText",style:{textFill:n.getTextColor(),font:n.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),i("pageNext",1)},layoutInner:function(t,e,i){var n=this.getContentGroup(),o=this._containerGroup,a=this._controllerGroup,r=t.getOrient().index,s=OI[r],l=OI[1-r],h=NI[1-r];xy(t.get("orient"),n,t.get("itemGap"),r?i.width:null,r?null:i.height),xy("horizontal",a,t.get("pageButtonItemGap",!0));var u=n.getBoundingRect(),c=a.getBoundingRect(),d=this._showController=u[s]>i[s],f=[-u.x,-u.y];f[r]=n.position[r];var p=[0,0],g=[-c.x,-c.y],m=V(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[r]+=i[s]-c[s]:p[r]+=c[s]+m),g[1-r]+=u[l]/2-c[l]/2,n.attr("position",f),o.attr("position",p),a.attr("position",g);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]+g[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 Nv({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&&Sn(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(n,o){var a=this._controllerGroup;L(["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",w(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){function n(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var e,i,o,a,r=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=OI[u],d=OI[1-u],f=NI[u],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===r&&(a=t)}):a=s.childAt(0);var g=h?Math.ceil(l[c]/h):0;if(a){var m=a.getBoundingRect(),v=a.position[u]+m[f];p[u]=-v-l[f],e=Math.floor(g*(v+m[f]+h/2)/l[c]),e=l[c]&&g?Math.max(0,Math.min(g-1,e)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-p[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,e){var i=n(t);i.intersect(y)&&(null==x&&(x=e),o=t.__legendDataIndex),e===_.length-1&&i[f]+i[c]<=y[f]+y[c]&&(o=null)}),null!=x){var w=n(_[x]);if(y[f]=w[f]+w[c]-y[c],x<=0&&w[f]>=y[f])i=null;else{for(;0<x&&n(_[x-1]).intersect(y);)x--;i=_[x].__legendDataIndex}}}return{contentPosition:p,pageIndex:e,pageCount:g,pagePrevDataIndex:i,pageNextDataIndex:o}}});Ga("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),ja({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 zI=L,RI=Jn,BI=["","-webkit-","-moz-","-o-"];Kc.prototype={constructor:Kc,_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;"+$c(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(_(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var VI=_,GI=L,WI=zn,FI=new Nv({shape:{x:-1,y:-1,width:2,height:2}});Xa({type:"tooltip",init:function(t,e){if(!mp.node){var i=new Kc(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!mp.node&&!mp.wxa){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 n=this._tooltipModel.get("triggerOn");rc("itemTooltip",this._api,VI(function(t,e,i){"none"!==n&&(0<=n.indexOf(t)?this._tryShow(e,i):"leave"===t&&this._hide(i))},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&&!mp.node){var o=Qc(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=FI;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=qM(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&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Qc(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=Jc([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=_(e,this),clearTimeout(this._showTimout),0<i?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var h=this._ecModel,i=this._tooltipModel,n=[e.offsetX,e.offsetY],u=[],c=[],o=Jc([e.tooltipOption,i]);GI(t,function(t){GI(t.dataByAxis,function(o){var a=h.getComponent(o.axisDim+"Axis",o.axisIndex),r=o.value,s=[];if(a&&null!=r){var l=vc(r,a.axis,h,o.seriesDataIndices,o.valueLabelOpt);L(o.seriesDataIndices,function(t){var e=h.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,n=e&&e.getDataParams(i);n.axisDim=o.axisDim,n.axisIndex=o.axisIndex,n.axisType=o.axisType,n.axisId=o.axisId,n.axisValue=Lr(a.axis,r),n.axisValueLabel=l,n&&(c.push(n),s.push(e.formatTooltip(i,!0)))});var t=l;u.push((t?Qn(t)+"<br />":"")+s.join("<br />"))}})},this),u.reverse(),u=u.join("<br /><br />");var a=e.position;this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,a,n[0],n[1],this._tooltipContent,c):this._showTooltipContent(o,u,c,Math.random(),n[0],n[1],a)})},_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=Jc([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),p="item_"+r.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,p,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){n={content:n,formatter:n}}var o=new kn(n,this._tooltipModel,this._ecModel),a=o.get("content"),r=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(i,t,n,e,o,a,r,s){if(this._ticket="",i.get("showContent")&&i.get("show")){var l=this._tooltipContent,h=i.get("formatter");r=r||i.get("position");var u=t;if(h&&"string"==typeof h)u=to(h,n,!0);else if("function"==typeof h){var c=VI(function(t,e){t===this._ticket&&(l.setContent(e),this._updatePosition(i,r,o,a,l,n,s))},this);this._ticket=e,u=h(n,e,c)}l.setContent(u),l.show(i),this._updatePosition(i,r,o,a,l,n,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,u,c,d,f,p,g,m,v,y,x,_,w,b,S,M,I,T,A=o.getSize(),D=t.get("align"),C=t.get("verticalAlign"),L=r&&r.getBoundingRect().clone();if(r&&L.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,L,{viewSize:[s,l],contentSize:A.slice()})),O(e))i=WI(e[0],s),n=WI(e[1],l);else if(R(e)){e.width=A[0],e.height=A[1];var k=ro(e,{width:s,height:l});i=k.x,n=k.y,C=D=null}else n=(i="string"==typeof e&&r?(P=function(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]}(e,L,A))[0]:(h=i,u=n,c=o.el,d=s,f=l,p=D?null:20,g=C?null:20,m=td(c),v=m.width,y=m.height,null!=p&&(d<h+v+p?h-=v+p:h+=p),null!=g&&(f<u+y+g?u-=y+g:u+=g),P=[h,u])[0],P[1]);if(D&&(i-=ed(D)?A[0]/2:"right"===D?A[0]:0),C&&(n-=ed(C)?A[1]/2:"bottom"===C?A[1]:0),t.get("confine")){var P=(x=i,_=n,w=o.el,b=s,S=l,M=td(w),I=M.width,T=M.height,x=Math.min(x+I,b)-I,_=Math.min(_+T,S)-T,[x=Math.max(x,0),_=Math.max(_,0)]);i=P[0],n=P[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(n){var t=this._lastDataByCoordSys,r=!!t&&t.length===n.length;return r&&GI(t,function(t,e){var i=t.dataByAxis||{},a=(n[e]||{}).dataByAxis||[];(r&=i.length===a.length)&&GI(i,function(t,e){var i=a[e]||{},n=t.seriesDataIndices||[],o=i.seriesDataIndices||[];(r&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&n.length===o.length)&&GI(n,function(t,e){var i=o[e];r&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=n,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){mp.node||(this._tooltipContent.hide(),hc("itemTooltip",e))}}),Ga({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Ga({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),od.prototype={constructor:od,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:Y_.prototype.dataToCoord,radiusToData:Y_.prototype.coordToData},a(od,Y_),ad.prototype={constructor:ad,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:Y_.prototype.dataToCoord,angleToData:Y_.prototype.coordToData},a(ad,Y_);var HI=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new od,this._angleAxis=new ad,this._radiusAxis.polar=this._angleAxis.polar=this};HI.prototype={type:"polar",axisPointerEnabled:!0,constructor:HI,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=l<a?1:-1;l<a||r<l;)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 ZI=by.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});g(ZI.prototype,E_);var UI={splitNumber:5};ww("angle",ZI,rd,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),ww("radius",ZI,rd,UI),ja({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%"}}),So.register("polar",{dimensions:HI.prototype.dimensions,create:function(i,s){var l=[];return i.eachComponent("polar",function(t,e){var i=new HI(e);i.update=sd;var n=i.getRadiusAxis(),o=i.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");ld(n,a),ld(o,r),function(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=zn(n[0],o),t.cy=zn(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=zn(e.get("radius"),s);r.inverse?r.setExtent(l,0):r.setExtent(0,l)}(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 jI=["axisLine","axisLabel","axisTick","splitLine","splitArea"];Rw.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();"category"!==i.type&&a.pop(),L(jI,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,a,o)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new Av({shape:{cx:e.cx,cy:e.cy,r:n[ud(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"),r=n[ud(e)],s=k(i,function(t){return new Ev({shape:hd(e,[r,r+a],t)})});this.group.add(Yv(s,{style:E(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var o=t.axis,a=t.getCategories(),r=t.getModel("axisLabel"),s=t.getFormattedLabels(),l=r.get("margin"),h=o.getLabelsCoords(),u=0;u<i.length;u++){var c=n[ud(e)],d=e.coordToPoint([c+l,h[u]]),f=e.cx,p=e.cy,g=Math.abs(d[0]-f)/c<.3?"center":d[0]>f?"left":"right",m=Math.abs(d[1]-p)/c<.3?"middle":d[1]>p?"top":"bottom";a&&a[u]&&a[u].textStyle&&(r=new kn(a[u].textStyle,r,r.ecModel));var v=new Tv({silent:!0});this.group.add(v),mn(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||t.get("axisLine.lineStyle.color"),text:s[u],textAlign:g,textVerticalAlign:m})}},_splitLine:function(t,e,i,n){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),r=0;a=a instanceof Array?a:[a];for(var s=[],l=0;l<i.length;l++){var h=r++%a.length;s[h]=s[h]||[],s[h].push(new Ev({shape:hd(e,n,i[l])}))}for(l=0;l<s.length;l++)this.group.add(Yv(s[l],{style:E({stroke:a[l%a.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,i,n){var o=t.getModel("splitArea").getModel("areaStyle"),a=o.get("color"),r=0;a=a instanceof Array?a:[a];for(var s=[],l=Math.PI/180,h=-i[0]*l,u=Math.min(n[0],n[1]),c=Math.max(n[0],n[1]),d=t.get("clockwise"),f=1;f<i.length;f++){var p=r++%a.length;s[p]=s[p]||[],s[p].push(new Lv({shape:{cx:e.cx,cy:e.cy,r0:u,r:c,startAngle:h,endAngle:-i[f]*l,clockwise:d},silent:!0})),h=-i[f]*l}for(f=0;f<s.length;f++)this.group.add(Yv(s[f],{style:E({fill:a[f%a.length]},o.getAreaStyle()),silent:!0}))}});var XI=["axisLine","axisTickLabel","axisName"],YI=["splitLine","splitArea"];Rw.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getAngleAxis(),a=i.getTicksCoords(),r=o.getExtent()[0],s=i.getExtent(),l=(c=e,d=r,{position:[(u=n).cx,u.cy],rotation:d/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:c.getModel("axisLabel").get("rotate"),z2:1}),h=new Lw(e,l);L(XI,h.add,h),this.group.add(h.getGroup()),L(YI,function(t){e.get(t+".show")&&!i.scale.isBlank()&&this["_"+t](e,n,r,s,a)},this)}var u,c,d},_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=[],h=0;h<o.length;h++){var u=s++%r.length;l[u]=l[u]||[],l[u].push(new Av({shape:{cx:e.cx,cy:e.cy,r:o[h]},silent:!0}))}for(h=0;h<l.length;h++)this.group.add(Yv(l[h],{style:E({stroke:r[h%r.length],fill:null},a.getLineStyle()),silent:!0}))},_splitArea:function(t,e,i,n,o){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],h=o[0],u=1;u<o.length;u++){var c=s++%r.length;l[c]=l[c]||[],l[c].push(new Lv({shape:{cx:e.cx,cy:e.cy,r0:h,r:o[u],startAngle:0,endAngle:2*Math.PI},silent:!0})),h=o[u]}for(u=0;u<l.length;u++)this.group.add(Yv(l[u],{style:E({fill:r[u%r.length]},a.getAreaStyle()),silent:!0}))}});var qI=uc.extend({makeElOption:function(t,e,i,n,o){var a=i.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s=a.polar,l=s.getOtherAxis(a).getExtent();r=a["dataTo"+oo(a.dim)](e);var h=n.get("type");if(h&&"none"!==h){var u=gc(n),c=$I[h](a,s,r,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}mc(t,i,n,o,function(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=rt();ct(d,d,s),ut(d,d,[n.cx,n.cy]),l=Tn([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=Lw.innerTextLayout(s,f*Math.PI/180,-1);h=p.textAlign,u=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;h=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",u=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:h,verticalAlign:u}}(e,i,0,s,n.get("label.margin")))}}),$I={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:_c(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=t.getBandWidth(),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:bc(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:bc(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};Rw.registerAxisPointerClass("PolarAxisPointer",qI),Fa(z(function(t,e,i){var a=i.getWidth(),r=i.getHeight(),A={},D={},s=function(t,e){var f={};L(t,function(t,e){var i=t.getData(),n=t.coordinateSystem.getBaseAxis(),o=n.getExtent(),a="category"===n.type?n.getBandWidth():Math.abs(o[1]-o[0])/i.count(),r=f[nd(n)]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},s=r.stacks;f[nd(n)]=r;var l=id(t);s[l]||r.autoWidthCount++,s[l]=s[l]||{width:0,maxWidth:0};var h=zn(t.get("barWidth"),a),u=zn(t.get("barMaxWidth"),a),c=t.get("barGap"),d=t.get("barCategoryGap");h&&!s[l].width&&(h=Math.min(r.remainedWidth,h),s[l].width=h,r.remainedWidth-=h),u&&(s[l].maxWidth=u),null!=c&&(r.gap=c),null!=d&&(r.categoryGap=d)});var d={};return L(f,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,o=zn(t.categoryGap,n),a=zn(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),L(e,function(t,e){var i=t.maxWidth;i&&i<l&&(i=Math.min(i,r),t.width&&(i=Math.min(i,t.width)),r-=i,t.width=i,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var h,u=0;L(e,function(t,e){t.width||(t.width=l),u+=(h=t).width*(1+a)}),h&&(u-=h.width*a);var c=-u/2;L(e,function(t,e){d[i][e]=d[i][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}(I(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var d=t.getData(),f=t.coordinateSystem,p=f.getAngleAxis(),e=f.getBaseAxis(),g=id(t),i=s[nd(e)][g],m=i.offset,v=i.width,y=f.getOtherAxis(e),n=t.get("center")||["50%","50%"],x=zn(n[0],a),_=zn(n[1],r),w=t.get("barMinHeight")||0,b=t.get("barMinAngle")||0,S=y.getExtent()[0],M=y.model.get("max"),I=y.model.get("min"),o=[d.mapDimension("radius"),d.mapDimension("angle")],T=d.mapArray(o,function(t,e){return f.dataToPoint([t,e])},!0);A[g]=A[g]||[],D[g]=D[g]||[],d.each(d.mapDimension(y.dim),function(t,e){if(!isNaN(t)){A[g][e]||(A[g][e]={p:S,n:S},D[g][e]={p:S,n:S});var i,n,o,a,r=0<=t?"p":"n",s=f.pointToCoord(T[e]),l=D[g][e][r];if("radius"===y.dim)i=l,n=s[0],a=(o=(-s[1]+m)*Math.PI/180)+v*Math.PI/180,Math.abs(n)<w&&(n=i+(n<0?-1:1)*w),D[g][e][r]=n;else{n=(i=s[0]+m)+v,null!=M&&(t=Math.min(t,M)),null!=I&&(t=Math.max(t,I));var h=p.dataToAngle(t);Math.abs(h-l)<b&&(h=l-(t<0?-1:1)*b),o=-l*Math.PI/180,a=-h*Math.PI/180;var u=p.getExtent(),c=h;c===u[0]&&0<t?c=u[1]:c===u[1]&&t<0&&(c=u[0]),D[g][e][r]=c}d.setItemLayout(e,{cx:x,cy:_,r0:i,r:n,startAngle:o,endAngle:a})}},!0)}},this)},"bar")),Xa({type:"polar"}),o(by.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){by.prototype.init.apply(this,arguments),ti(t,"label",["show"])},optionUpdated:function(){var t=this.option,i=this;t.regions=bb.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=p(t.regions||[],function(t,e){return e.name&&t.set(e.name,new kn(e,i)),t},C()),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:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new kn(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}}),$w),Xa({type:"geo",init:function(t,e){var i=new Js(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()}}),cd("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),cd("select",{type:"geoSelect",event:"geoselected"}),cd("unSelect",{type:"geoUnSelect",event:"geounselected"});var KI=["rect","polygon","keep","clear"],JI=L,QI={lineX:gd(0),lineY:gd(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])&&Nr(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!!(Nr(n,o,a)||Nr(n,o+r,a)||Nr(n,o,a+s)||Nr(n,o+r,a+s)||Xt.create(t).contain(l[0],l[1])||vd(o,a,o+r,a,n)||vd(o,a,o,a+s,n)||vd(o+r,a,o+r,a+s,n)||vd(o,a+s,o+r,a+s,n))||void 0}}},tT=L,eT=y,iT=z,nT=["dataToPoint","pointToData"],oT=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],aT=_d.prototype;aT.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=hT[t.brushType](0,i,e);t.__rangeOffset={offset:uT[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},aT.matchOutputRanges=function(t,n,o){tT(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&L(t.coordSyses,function(t){var e=hT[i.brushType](1,t,i.range);o(i,e.values,t,n)})},this)},aT.setInputRanges=function(t,h){tT(t,function(t){var e,i,n,o,a,r=this.findTargetInfo(t,h);if(t.range=t.range||[],r&&!0!==r){t.panelId=r.panelId;var s=hT[t.brushType](0,r.coordSys,t.coordRange),l=t.__rangeOffset;t.range=l?uT[t.brushType](s.values,l.offset,(e=s.xyMinMax,i=l.xyMinMax,n=Id(e),o=Id(i),a=[n[0]/o[0],n[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):s.values}},this)},aT.makePanelOpts=function(i,n){return k(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:tu(e),isTargetByCursor:iu(e,i,t.coordSysModel),getLinearBrushOtherExtent:eu(e)}})},aT.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=eT(n.coordSyses,e.coordinateSystem)},aT.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=bd(e,t),o=0;o<i.length;o++){var a=i[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<sT.length;o++)if(sT[o](n,a))return a}return!0};var rT={grid:function(t,n){var o=t.xAxisModels,a=t.yAxisModels,e=t.gridModels,i=C(),r={},s={};(o||a||e)&&(tT(o,function(t){var e=t.axis.grid.model;i.set(e.id,e),r[e.id]=!0}),tT(a,function(t){var e=t.axis.grid.model;i.set(e.id,e),s[e.id]=!0}),tT(e,function(t){i.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),i.each(function(t){var e=t.coordinateSystem,i=[];tT(e.getCartesians(),function(t,e){(0<=eT(o,t.getAxis("x").model)||0<=eT(a,t.getAxis("y").model))&&i.push(t)}),n.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:i[0],coordSyses:i,getPanelRect:lT.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,i){tT(t.geoModels,function(t){var e=t.coordinateSystem;i.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:lT.geo})})}},sT=[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}],lT={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(In(t)),e}},hT={lineX:iT(Sd,0),lineY:iT(Sd,1),rect:function(t,e,i){var n=e[nT[t]]([i[0][0],i[1][0]]),o=e[nT[t]]([i[0][1],i[1][1]]),a=[wd([n[0],o[0]]),wd([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(i,n,t){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:k(t,function(t){var e=n[nT[i]](t);return o[0][0]=Math.min(o[0][0],e[0]),o[1][0]=Math.min(o[1][0],e[1]),o[0][1]=Math.max(o[0][1],e[0]),o[1][1]=Math.max(o[1][1],e[1]),e}),xyMinMax:o}}},uT={lineX:iT(Md,0),lineY:iT(Md,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,i,n){return k(t,function(t,e){return[t[0]-n[0]*i[e][0],t[1]-n[1]*i[e][1]]})}},cT=["inBrush","outOfBrush"],dT="__ecBrushSelect",fT="__ecInBrushSelectEvent",pT=zx.VISUAL.BRUSH;Fa(pT,function(e,t,i){e.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(t.brushTargetManager=new _d(t.option,e)).setInputRanges(t.areas,e)})}),Ha(pT,function(m,t,e){var o,a,v=[];m.eachComponent({mainType:"brush"},function(s,t){function l(t){return"all"===i||n[t]}function h(t){return!!t.length}function r(e,t,i){var n,o,a=Dd(e);if(a&&(n=t,null==(o=s.option.seriesIndex)||"all"===o||!(O(o)?y(o,n)<0:n!==o))&&(L(p,function(t){a[t.brushType]&&s.brushTargetManager.controlSeries(t,e,m)&&i.push(t),f|=h(i)}),l(t)&&h(i))){var r=e.getData();r.each(function(t){Ad(a,i,r,t)&&(c[t]=1)})}}var u={brushId:s.id,brushIndex:t,brushName:s.name,areas:D(s.areas),selected:[]};v.push(u);var e=s.option,i=e.brushLink,n=[],c=[],d=[],f=0;t||(o=e.throttleType,a=e.throttleDelay);var p=k(s.areas,function(t){return i=E({boundingRect:gT[t.brushType](t)},t),n=i.selectors={},L(QI[i.brushType],function(e,t){n[t]=function(t){return e(t,n,i)}}),i;var i,n}),g=fd(s.option,cT,function(t){t.mappingMethod="fixed"});O(i)&&L(i,function(t){n[t]=1}),m.eachSeries(function(t,e){var i,n,o,a=d[e]=[];"parallel"===t.subType?(n=e,o=(i=t).coordinateSystem,f|=o.hasAxisBrushed(),l(n)&&o.eachActiveState(i.getData(),function(t,e){"active"===t&&(c[e]=1)})):r(t,e,a)}),m.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};u.selected.push(i);var n=Dd(t),o=d[e],a=t.getData(),r=l(e)?function(t){return c[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return Ad(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?f:h(o))&&function(t,h,u,c,d,f){function p(t){return u.getItemVisual(m,t)}function g(t,e){u.setItemVisual(m,t,e)}function e(t,e){m=null==f?t:e;var i=u.getRawDataItem(m);if(!i||!1!==i.visualMap)for(var n=c.call(d,t),o=h[n],a=v[n],r=0,s=a.length;r<s;r++){var l=a[r];o[l]&&o[l].applyVisual(t,p,g)}}var m,v={};L(t,function(t){var e=Ub.prepareVisualTypes(h[t]);v[t]=e}),null==f?u.each(e,!0):u.each([f],e,!0)}(cT,g,a,r)})}),function(t,e,i,n,o){if(o){var a=t.getZr();a[fT]||(a[dT]||(a[dT]=Td),aa(a,dT,i,e)(t,n))}}(t,o,a,v,e)});var gT={lineX:M,lineY:M,rect:function(t){return Cd(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;n<o;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=i[n];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&Cd(e)}},mT=["#ddd"];ja({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"]),i.inBrush=i.inBrush||{},i.outOfBrush=i.outOfBrush||{color:mT}},setAreas:function(t){t&&(this.areas=k(t,function(t){return Ld(this.option,t)},this))},setBrushOption:function(t){this.brushOption=Ld(this.option,t),this.brushType=this.brushOption.brushType}}),Xa({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Mh(e.getZr())).on("brush",_(this._onBrush,this)).mount()},render:function(t){return this.model=t,kd.apply(this,arguments)},updateView:kd,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:D(t),$from:i})}}),Ga({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),Ga({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var vT={},yT=yx.toolbox.brush;Nd.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:D(yT.title)};var xT=Nd.prototype;xT.render=xT.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,L(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===n)?"emphasis":"normal")})},xT.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return L(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},xT.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}})},Pd("brush",Nd),Ba(function(t,e){var i,n,o=t&&t.brush;if(O(o)||(o=o?[o]:[]),o.length){var a=[];L(o,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(a=a.concat(e))});var r=t&&t.toolbox;O(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var s=r.feature||(r.feature={}),l=s.brush||(s.brush={}),h=l.type||(l.type=[]);h.push.apply(h,a),n={},L(i=h,function(t){n[t]=1}),i.length=0,L(n,function(t,e){i.push(e)}),e&&!h.length&&h.push.apply(h,KI)}}),Ed.prototype={constructor:Ed,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=Un(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{y:e,m:i,d:n,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(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").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];L([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=ro(r,l);L([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){O(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:z(zd,"dataToPoint"),convertFromPixel:z(zd,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(O(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=0<n.getTime()-t[1].time?1:-1;n.getDate()!==a&&0<(n.getTime()-t[1].time)*r;)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&&e<n.fweek||t===n.weeks&&e>n.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)}},Ed.dimensions=Ed.prototype.dimensions,Ed.getDimensionsInfo=Ed.prototype.getDimensionsInfo,Ed.create=function(i,n){var o=[];return i.eachComponent("calendar",function(t){var e=new Ed(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},So.register("calendar",Ed);var _T=by.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=ho(t);_T.superApply(this,"init",arguments),Rd(t,o)},mergeOption:function(t,e){_T.superApply(this,"mergeOption",arguments),Rd(this.option,t)}}),wT={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},bT={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Xa({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,h=new Nv({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(h)}},_renderLines:function(i,t,n,o){function e(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)}var a=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.get("splitLine.show"),h=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){e(u.formatedDate),0===c&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}e(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,h,n),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,h,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 Ov({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?eo(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"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Tv({z2:30});mn(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];w(o)&&(o=wT[o.toUpperCase()]||[]);var h="start"===r?0:1,u="horizontal"===e?0:1;a="start"===r?-a:a;for(var c="center"===s,d=0;d<l[h].length-1;d++){var f=l[h][d].slice(),p=this._firstDayOfMonth[d];if(c){var g=this._firstDayPoints[d];f[u]=(g[u]+l[0][d+1][u])/2}var m=n.get("formatter"),v=o[+p.m-1],y={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:v},x=this._formatterLabel(m,y),_=new Tv({z2:30});P(mn(_.style,n,{text:x}),this._monthTextPositionControl(f,c,e,r,a)),i.add(_)}}},_weekTextPositionControl:function(t,e,i,n,o){var a="center",r="middle",s=t[0],l=t[1],h="start"===i;return"horizontal"===e?(s=s+n+(h?1:-1)*o[0]/2,a=h?"right":"left"):(l=l+n+(h?1:-1)*o[1]/2,r=h?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,r=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),h=a.getFirstDayOfWeek();w(s)&&(s=bT[s.toUpperCase()]||[]);var u=a.getNextNDay(e.end.time,7-e.lweek).time,c=[a.getCellWidth(),a.getCellHeight()];l=zn(l,c["horizontal"===i?0:1]),"start"===r&&(u=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var f,p=a.getNextNDay(u,d),g=a.dataToRect([p.time],!1).center;f=Math.abs((d+h)%7);var m=new Tv({z2:30});P(mn(m.style,o,{text:s[f]}),this._weekTextPositionControl(g,i,r,l,c)),n.add(m)}}}}),ja({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"}}}),Xa({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=t.get("textBaseline"),l=new Tv({style:mn({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new Tv({style:mn({},a,{text:u,textFill:a.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink");l.silent=!d,c.silent=!f,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),n.add(l),u&&n.add(c);var p=n.getBoundingRect(),g=t.getBoxLayoutParams();g.width=p.width,g.height=p.height;var m=ro(g,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?m.x+=m.width:"center"===r&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),n.attr("position",[m.x,m.y]);var v={textAlign:r,textVerticalAlign:s};l.setStyle(v),c.setStyle(v),p=n.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new Nv({shape:{x:p.x-y[3],y:p.y-y[0],width:p.width+y[1]+y[3],height:p.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});Qi(_),n.add(_)}}}),by.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var ST,MT,IT,TT,AT=["cartesian2d","polar","singleAxis"],DT=(MT=["axisIndex","axis","index","id"],IT=k(ST=(ST=["x","y","z","radius","angle","single"]).slice(),oo),TT=k(MT=(MT||[]).slice(),oo),function(o,a){L(ST,function(t,e){for(var i={name:t,capital:IT[e]},n=0;n<MT.length;n++)i[MT[n]]=t+TT[n];o.call(a,i)})}),CT=L,LT=Bn,kT=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i,this.hasSeriesStacked};kT.prototype={constructor:kT,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var o=[],a=this.ecModel;return a.eachSeries(function(t){if(n=t.get("coordinateSystem"),0<=y(AT,n)){var e=this._dimName,i=a.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&o.push(t)}var n},this),o},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,o=this.ecModel,a=this.getAxisModel();return t="x"===n||"y"===n?(e="gridIndex","x"===n?"y":"x"):(e="polarIndex","angle"===n?"radius":"angle"),o.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(i=t)}),i},getMinMaxSpan:function(){return D(this._minMaxSpan)},calculateDataWindow:function(e){var n=this._dataExtent,o=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],s=[e.start,e.end],l=[];return CT(["startValue","endValue"],function(t){l.push(null!=e[t]?o.parse(e[t]):null)}),CT([0,1],function(t){var e=l[t],i=s[t];"percent"===a[t]?(null==i&&(i=r[t]),e=o.parse(En(i,r,n,!0))):i=En(e,n,r,!0),l[t]=e,s[t]=i}),{valueWindow:LT(l),percentWindow:LT(s)}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Bd(this,this._dimName,e),this.hasSeriesStacked=!1,CT(e,function(t){var e=t.getData(),i=e.mapDimension(this._dimName);e.isStacked(i)&&(this.hasSeriesStacked=!0)},this);var i=this.calculateDataWindow(t.option);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,o=(n=this)._minMaxSpan={},a=n._dataZoomModel,CT(["min","max"],function(t){o[t+"Span"]=a.get(t+"Span");var e=a.get(t+"ValueSpan");if(null!=e&&(o[t+"ValueSpan"]=e,null!=(e=n.getAxisModel().axis.scale.parse(e)))){var i=n._dataExtent;o[t+"Span"]=En(i[0]+e,i,[0,100],!0)}}),Vd(this)}var n,o,a},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Vd(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),o=t.get("filterMode"),c=this._valueWindow;if("none"!==o){var a=this.getOtherAxisModel();t.get("$fromToolbox")&&a&&a.hasSeriesStacked&&(o="empty"),CT(i,function(i){var h=i.getData(),u=h.mapDimension(n,!0);"weakFilter"===o?h.filterSelf(function(t){for(var e,i,n,o=0;o<u.length;o++){var a=h.get(u[o],t),r=!isNaN(a),s=a<c[0],l=a>c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):CT(u,function(t){if("empty"===o)i.setData(h.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e}));else{var e={};e[t]=c,h.selectRange(e)}}),CT(u,function(t){h.setApproximateExtent(c,t)})})}}}};var PT=L,OT=DT,NT=ja({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=Gd(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Gd(t);g(this.option,t,!0),this.doInit(e)},doInit:function(t){var i=this.option;mp.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),Wd(this,t),PT([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[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 kT(t.name,e,this,n));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();OT(function(t){var e=t.axisIndex;i[e]=Qe(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;OT(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):PT(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})}a&&OT(function(t){if(a){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,o=i.length;n<o;n++)"category"===i[n].get("type")&&e.push(n);(r[t.axisIndex]=e).length&&(a=!1)}},this),a&&this.ecModel.eachSeries(function(o){this._isSeriesHasAllAxesTypeOf(o,"value")&&OT(function(t){var e=r[t.axisIndex],i=o.get(t.axisIndex),n=o.get(t.axisId);y(e,i=o.ecModel.queryComponents({mainType:t.axis,index:i,id:n})[0].componentIndex)<0&&e.push(i)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){!e&&(e=t.name)},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(n,o){var a=!0;return OT(function(t){var e=n.get(t.axisIndex),i=this.dependentModels[t.axis][e];i&&i.get("type")===o||(a=!1)},this),a},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20}},getFirstTargetAxisModel:function(){var i;return OT(function(t){if(null==i){var e=this.get(t.axisIndex);e.length&&(i=this.dependentModels[t.axis][e[0]])}},this),i},eachTargetAxis:function(i,n){var o=this.ecModel;OT(function(e){PT(this.get(e.axisIndex),function(t){i.call(n,e,t,this,o)},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(e,t){var i=this.option;PT([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(i[t[0]]=e[t[0]],i[t[1]]=e[t[1]])},this),!t&&Wd(this,e)},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()}}),ET=lx.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,o=this.ecModel,a={};return t.eachTargetAxis(function(t,e){var i=o.getComponent(t.axis,e);if(i){var n=i.getCoordSysModel();n&&function(t,e,i,n){for(var o,a=0;a<i.length;a++)if(i[a].model===t){o=i[a];break}o||i.push(o={model:t,axisModels:[],coordIndex:n}),o.axisModels.push(e)}(n,i,a[n.mainType]||(a[n.mainType]=[]),n.componentIndex)}},this),a}}),zT=(NT.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"}}}),Nv),RT=En,BT=Bn,VT=_,GT=L,WT="horizontal",FT=["line","bar","candlestick","scatter"],HT=ET.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){HT.superApply(this,"render",arguments),aa(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(){HT.superApply(this,"remove",arguments),ra(this,"_dispatchZoomAction")},dispose:function(){HT.superApply(this,"dispose",arguments),ra(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new _g;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===WT?{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=ho(t.option);L(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=ro(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],"vertical"===this._orient&&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!==WT||o?i===WT&&o?{scale:r?[-1,1]:[-1,-1]}:"vertical"!==i||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 zT({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new zT({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:_(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]],h=[0,e[0]],u=[[e[0],0],[0,0]],c=[],d=h[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0<p&&e%p)f+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:RT(t,a,l,!0);i&&!s&&e?(u.push([u[u.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(u.push([f,0]),c.push([f,0])),u.push([f,n]),c.push([f,n]),f+=d,s=i}});var g=this.dataZoomModel;this._displayables.barGroup.add(new Pv({shape:{points:u},style:E({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Ov({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,h=this.ecModel;return t.eachTargetAxis(function(a,r){L(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){if(!(l||!0!==s&&y(FT,t.get("type"))<0)){var e,i=h.getComponent(a.axis,r).axis,n={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],o=t.coordinateSystem;null!=n&&o.getOtherAxis&&(e=o.getOtherAxis(i).inverse),n=t.getData().mapDimension(n),l={thisAxis:i,series:t,thisDim:a.name,otherDim:n,otherAxisInverse:e}}},this)},this),l}},_renderHandle:function(){var t=this._displayables,a=t.handles=[],r=t.handleLabels=[],s=this._displayables.barGroup,e=this._size,l=this.dataZoomModel;s.add(t.filler=new zT({draggable:!0,cursor:Fd(this._orient),drift:VT(this._onDragMove,this,"all"),onmousemove:function(t){$g(t.event)},ondragstart:VT(this._showDataInfo,this,!0),ondragend:VT(this._onDragEnd,this),onmouseover:VT(this._showDataInfo,this,!0),onmouseout:VT(this._showDataInfo,this,!1),style:{fill:l.get("fillerColor"),textPosition:"inside"}})),s.add(new zT(Qi({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),GT([0,1],function(t){var e=Ln(l.get("handleIcon"),{cursor:Fd(this._orient),draggable:!0,drift:VT(this._onDragMove,this,t),onmousemove:function(t){$g(t.event)},ondragend:VT(this._onDragEnd,this),onmouseover:VT(this._showDataInfo,this,!0),onmouseout:VT(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),i=e.getBoundingRect();this._handleHeight=zn(l.get("handleSize"),this._size[1]),this._handleWidth=i.width/i.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle());var n=l.get("handleColor");null!=n&&(e.style.fill=n),s.add(a[t]=e);var o=l.textStyleModel;this.group.add(r[t]=new Tv({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:o.getTextColor(),textFont:o.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[RT(t[0],[0,100],e,!0),RT(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];OS(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?RT(a.minSpan,r,o,!0):null,null!=a.maxSpan?RT(a.maxSpan,r,o,!0):null),this._range=BT([RT(n[0],o,r,!0),RT(n[1],o,r,!0)])},_updateView:function(t){var n=this._displayables,o=this._handleEnds,e=BT(o.slice()),a=this._size;GT([0,1],function(t){var e=n.handles[t],i=this._handleHeight;e.attr({scale:[i/2,i/2],position:[o[t],a[1]/2-i/2]})},this),n.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=In(a.handles[t].parent,this.group),i=An(0===t?"right":"left",e),n=this._handleWidth/2+5,o=Tn([c[t]+(0===t?-n:n),this._size[1]/2],e);r[t].setStyle({x:o[0],y:o[1],textVerticalAlign:s===WT?"middle":i,textAlign:s===WT?i:"center",text:l[t]})}var i=this.dataZoomModel,a=this._displayables,r=a.handleLabels,s=this._orient,l=["",""];if(i.get("showDetail")){var n=i.findRepresentativeAxisProxy();if(n){var o=n.getAxisModel().axis,h=this._range,u=t?n.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:n.getDataValueWindow();l=[this._formatLabel(u[0],o),this._formatLabel(u[1],o)]}}var c=BT(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 m(n)?n(t,a):w(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=Tn([e,i],this._displayables.barGroup.getLocalTransform(),!0);this._updateInterval(t,n[0]);var o=this.dataZoomModel.get("realtime");this._updateView(!o),o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&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 i;if(GT(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}});NT.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var ZT=z,UT="\0_ec_dataZoom_roams",jT=_,XT=ET.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(a,t,r,e){XT.superApply(this,"render",arguments),function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;i<n;i++)if(t.batch[i].dataZoomId===e)return!1;return!0}(e,a.id)&&(this._range=a.getPercentRange()),L(this.getTargetCoordInfo(),function(t,i){var o=k(t,function(t){return Zd(t.model)});L(t,function(t){var n=t.model,e=a.option;Hd(r,{coordId:Zd(n),allCoordIds:o,containsPoint:function(t,e,i){return n.coordinateSystem.containPoint([e,i])},dataZoomId:a.id,throttleRate:a.get("throttle",!0),panGetRange:jT(this._onPan,this,t,i),zoomGetRange:jT(this._onZoom,this,t,i),zoomLock:e.zoomLock,disabled:e.disabled,roamControllerOpt:{zoomOnMouseWheel:e.zoomOnMouseWheel,moveOnMouseMove:e.moveOnMouseMove,preventDefaultMouseMove:e.preventDefaultMouseMove}})},this)},this)},dispose:function(){var t,i,e;t=this.api,i=this.dataZoomModel.id,L(e=Ud(t),function(t){t.controller.dispose();var e=t.dataZoomInfos;e[i]&&(delete e[i],t.count--)}),jd(e),XT.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=YT[e]([a,r],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return OS(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=YT[e](null,[o,a],s,i,t),h=(0<l.signal?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 OS(0,r,[0,100],0,u.minSpan,u.maxSpan),this._range=r}}}),YT={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}};Va({getTargetSeries:function(t){var n=C();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){L(i.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){n.set(t.uid,t)})})}),n},isOverallFilter:!0,overallReset:function(t,n){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).reset(i,n)}),t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).filterData(i,n)})}),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)})}}),Ga("dataZoom",function(i,t){var n=function(e,s,l){function h(t,i){i.nodes.push(t),s(function(e){L(l(t,e)||[],function(t){i.records[e.name][t]=!0})})}return function(t){var a,r={nodes:[],records:{}};if(s(function(t){r.records[t.name]={}}),!t)return r;for(h(t,r);a=!1,e(function(t){var i,n,o,e;e=t,!(0<=y(r.nodes,e))&&(i=t,n=r,o=!1,s(function(e){L(l(i,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o)&&(h(t,r),a=!0)}),a;);return r}}(_(t.eachComponent,t,"dataZoom"),DT,function(t,e){return t.get(e.axisIndex)}),o=[];t.eachComponent({mainType:"dataZoom",query:i},function(t,e){o.push.apply(o,n(t).nodes)}),L(o,function(t,e){t.setRawRange({start:i.start,end:i.end,startValue:i.startValue,endValue:i.endValue})})});var qT=L,$T=function(t){var e=t&&t.visualMap;O(e)||(e=e?[e]:[]),qT(e,function(t){if(t){Kd(t,"splitList")&&!Kd(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&O(e)&&qT(e,function(t){R(t)&&(Kd(t,"start")&&!Kd(t,"min")&&(t.min=t.start),Kd(t,"end")&&!Kd(t,"max")&&(t.max=t.end))})}})};by.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});var KT=zx.VISUAL.COMPONENT;Ha(KT,{createOnAllSeries:!0,reset:function(i,t){var n=[];return t.eachComponent("visualMap",function(t){var e,c,d,f,p;t.isTargetSeries(i)&&n.push((e=t.stateList,c=t.targetVisuals,d=_(t.getValueState,t),f=t.getDataDimension(i.getData()),p={},L(e,function(t){var e=Ub.prepareVisualTypes(c[t]);p[t]=e}),{progress:function(t,i){null!=f&&(f=i.getDimension(f));for(var n=t.start;n<t.end;n++){var e=i.getRawDataItem(n);if(e&&!1===e.visualMap)return;for(var o=null!=f?i.get(f,n,!0):n,a=d(o),r=c[a],s=p[a],l=0,h=s.length;l<h;l++){var u=s[l];r[u]&&r[u].applyVisual(o,function(t){return i.getItemVisual(n,t)},function(t,e){i.setItemVisual(n,t,e)})}}}}))}),n}}),Ha(KT,{createOnAllSeries:!0,reset:function(o,t){var a=o.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(o)){var e=t.getVisualMeta(_(Jd,null,o,t))||{stops:[],outerColors:[]},i=t.getDataDimension(a),n=a.getDimensionInfo(i);null!=n&&(e.dimension=n.index,r.push(e))}}),o.getData().setVisual("visualMeta",r)}});var JT=function(t,e,i){var n=D((QT[t]||{})[e]);return i&&O(n)?n[n.length-1]:n},QT={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]}},tA=Ub.mapVisual,eA=Ub.eachVisual,iA=O,nA=L,oA=Bn,aA=En,rA=ja({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;mp.canvasSupported||(i.realtime=!1),!e&&pd(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=_(t,this),this.controllerVisuals=fd(this.option.controller,e,t),this.targetVisuals=fd(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,i=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){i.push(e)}):i=Qe(t),i},eachTargetSeries:function(e,i){L(this.getTargetSeriesIndices(),function(t){e.call(i,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var i=!1;return this.eachTargetSeries(function(t){t===e&&(i=!0)}),i},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||["<",">"],O(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),w(h)?h.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):m(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=oA([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length)return t.getDimension(null!=e?e:i.length-1)},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(n){iA(i.color)&&!n.inRange&&(n.inRange={color:i.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")},nA(this.stateList,function(t){var e=n[t];if(w(e)){var i=JT(e,"active",h);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}var e=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},o=i.target||(i.target={}),a=i.controller||(i.controller={});g(o,n),g(a,n);var h=this.isCategory();t.call(this,o),t.call(this,a),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},nA(n,function(t,e){if(Ub.isValidType(e)){var i=JT(e,"inactive",h);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,o,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");nA(this.stateList,function(t){var e=this.itemSize,i=a[t];i||(i=a[t]={color:h?l:[l]}),null==i.symbol&&(i.symbol=r&&D(r)||(h?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&D(s)||(h?e[0]:[e[0],e[0]])),i.symbol=tA(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;eA(n,function(t){o<t&&(o=t)}),i.symbolSize=tA(n,function(t){return aA(t,[0,o],[0,e[0]],!0)})}},this)}.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:M,getValueState:M,getVisualMeta:M}),sA=[20,140],lA=rA.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){lA.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){lA.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=sA[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=sA[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):O(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(){rA.prototype.completeVisualOption.apply(this,arguments),L(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=Bn((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=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)},!0,this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){function t(t,e){o.push({value:t,color:i(t,e)})}for(var e=Qd(0,0,this.getExtent()),n=Qd(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=e.length;r<l&&(!n.length||e[r]<=n[0]);r++)e[r]<n[a]&&t(e[r],"outOfRange");for(h=1;a<s;a++,h=0)h&&o.length&&t(n[a],"outOfRange"),t(n[a],"inRange");for(var h=1;r<l;r++)(!n.length||n[n.length-1]<e[r])&&(h&&(o.length&&t(o[o.length-1].value,"outOfRange"),h=0),t(e[r],"outOfRange"));var u=o.length;return{stops:o,outerColors:[u?o[0].color:"transparent",u?o[u-1].color:"transparent"]}}}),hA=Xa({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=hy(e.get("padding")||0),n=t.getBoundingRect();t.add(new Nv({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(i,n,o){function a(t){return s[t]}function r(t,e){s[t]=e}var t=(o=o||{}).forceState,e=this.visualMapModel,s={};if("symbol"===n&&(s.symbol=e.get("itemSymbol")),"color"===n){var l=e.get("contentColor");s.color=l}var h=e.controllerVisuals[t||e.getValueState(i)];return L(Ub.prepareVisualTypes(h),function(t){var e=h[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=h.__alphaForOpacity),Ub.dependsOn(t,n)&&e&&e.applyVisual(i,a,r)}),s[n]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;so(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:M}),uA=En,cA=L,dA=Math.min,fA=Math.max,pA=hA.extend({type:"visualMap.continuous",init:function(){pA.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var o=this.visualMapModel,a=o.get("textGap"),r=o.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===i?-a:r[1]+a],s),h=this._applyTransform(0===i?"bottom":"top",s),u=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new Tv({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===u?"middle":h,textAlign:"horizontal"===u?h:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,o=this._orient,a=this._useHandle,r=tf(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=nf()),s.add(i.inRange=nf(null,a?af(this._orient):null,_(this._dragHandle,this,"all",!1),_(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("国"),h=fA(l.width,l.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,h,o,r),this._createHandle(s,1,n,h,o,r)),this._createIndicator(s,n,h,o),t.add(s)},_createHandle:function(t,e,i,n,o){var a,r=_(this._dragHandle,this,e,!1),s=_(this._dragHandle,this,e,!0),l=nf((a=n,0===e?[[0,0],[a,0],[a,-a]]:[[0,0],[a,0],[a,a]]),af(this._orient),r,s);l.position[0]=i[0],t.add(l);var h=this.visualMapModel.textStyleModel,u=new Tv({draggable:!0,drift:r,onmousemove:function(t){$g(t.event)},ondragend:s,style:{x:0,y:0,text:"",textFont:h.getFont(),textFill:h.getTextColor()}});this.group.add(u);var c=["horizontal"===o?n/2:1.5*n,"horizontal"===o?0===e?-1.5*n:1.5*n:0===e?-n/2:n/2],d=this._shapes;d.handleThumbs[e]=l,d.handleLabelPoints[e]=c,d.handleLabels[e]=u},_createIndicator:function(t,e,i,n){var o=nf([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new Tv({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(r);var s=["horizontal"===n?i/2:9,0],l=this._shapes;l.indicator=o,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,o[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():of(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[uA(e[0],i,n,!0),uA(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];OS(e,n,o,t,0);var a=i.getExtent();this._dataInterval=[uA(n[0],o,a,!0),uA(n[1],o,a,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,o=[0,e.itemSize[1]],a=t?o:this._handleEnds,r=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,r)},_createBarVisual:function(t,e,i,n){var o={forceState:n,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),r=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(i,r);return{barColor:new Wv(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+n*o;if(a>t[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 _g("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;cA([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=Tn(a.handleLabelPoints[t],In(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,a,r,s,l=this.visualMapModel,h=l.getExtent(),u=l.itemSize,c=[0,u[1]],d=uA(t,h,c,!0),f=this._shapes,p=f.indicator;if(p){p.position[1]=d,p.attr("invisible",!1),p.setShape("points",(o=!!i,a=n,r=d,s=u[1],o?[[0,-dA(a,fA(r,0))],[6,0],[0,dA(a,fA(s-r,0))]]:[[0,0],[5,-5],[5,5]]));var g=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});p.setStyle("fill",g);var m=Tn(f.indicatorLabelPoint,In(p,this.group)),v=f.indicatorLabel;v.attr("invisible",!1);var y=this._applyTransform("left",f.barGroup),x=this._orient;v.setStyle({text:(i||"")+l.formatValueText(e),textVerticalAlign:"horizontal"===x?y:"middle",textAlign:"horizontal"===x?"center":y,x:m[0],y:m[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]=dA(fA(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,n,o,a,r=this.visualMapModel,s=r.itemSize;if(r.option.hoverLink){var l=[0,s[1]],h=r.getExtent();t=dA(fA(l[0],t),l[1]);var u=(i=h,n=l,o=6,(a=r.get("hoverLinkDataSize"))&&(o=uA(a,i,n,!0)/2),o),c=[t-u,t+u],d=uA(t,l,h,!0),f=[uA(c[0],l,h,!0),uA(c[1],l,h,!0)];c[0]<l[0]&&(f[0]=-1/0),l[1]<c[1]&&(f[1]=1/0),e&&(f[0]===-1/0?this._showIndicator(d,f[1],"< ",u):f[1]===1/0?this._showIndicator(d,f[0],"> ",u):this._showIndicator(d,d,"≈ ",u));var p=this._hoverLinkDataIndices,g=[];(e||of(r))&&(g=this._hoverLinkDataIndices=r.findTargetDataIndices(f));var m=function(t,e){function i(t,e,i){for(var n=0,o=t.length;n<o;n++)for(var a=t[n].seriesId,r=Qe(t[n].dataIndex),s=i&&i[a],l=0,h=r.length;l<h;l++){var u=r[l];s&&s[u]?s[u]=null:(e[a]||(e[a]={}))[u]=1}}function a(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var o=a(t[n],!0);o.length&&i.push({seriesId:n,dataIndex:o})}return i}var n={},o={};return i(t||[],n),i(e||[],o,n),[a(n),a(o)]}(p,g);this._dispatchHighDown("downplay",ef(m[0])),this._dispatchHighDown("highlight",ef(m[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.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_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",ef(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=In(e,n?null:this.group);return qv[O(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()}});Ga({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),Ba($T);var gA=rA.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){gA.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();mA[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=D(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=k(this._pieceList,function(t){t=D(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function n(t,e,i){return t&&t[e]&&(R(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var o=this.option,i={},t=Ub.listVisualTypes(),a=this.isCategory();L(o.pieces,function(e){L(t,function(t){e.hasOwnProperty(t)&&(i[t]=1)})}),L(i,function(t,e){var i=0;L(this.stateList,function(t){i|=n(o,t,e)||n(o.target,t,e)},this),!i&&L(this.stateList,function(t){(o[t]||(o[t]={}))[e]=JT(e,"inRange"===t?"active":"inactive",a)})},this),rA.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,L(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;L(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&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=D(t)},getValueState:function(t){var e=Ub.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"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){Ub.findPieceIndex(t,this._pieceList)===n&&i.push(e)},!0,this),o.push({seriesId:t.id,dataIndex:i})},this),o},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(o){function i(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})}if(!this.isCategory()){var a=[],r=[],s=this,t=this._pieceList.slice();if(t.length){var e=t[0].interval[0];e!==-1/0&&t.unshift({interval:[-1/0,e]}),(e=t[t.length-1].interval[1])!==1/0&&t.push({interval:[e,1/0]})}else t.push({interval:[-1/0,1/0]});var n=-1/0;return L(t,function(t){var e=t.interval;e&&(e[0]>n&&i([n,e[0]],"outOfRange"),i(e.slice()),n=e[1])},this),{stops:a,outerColors:r}}}}),mA={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<l;s+=a){var h=r===o-1?n[1]:s+a;e.push({index:r++,interval:[s,h],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),qn(e),L(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;L(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),rf(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;L(t.pieces,function(t,e){R(t)||(t={value:t});var i={text:"",index:e};if(null!=t.label&&(i.text=t.label),t.hasOwnProperty("value")){var n=i.value=t.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],a=i.close=[0,0],r=[1,0,1],s=[-1/0,1/0],l=[],h=0;h<2;h++){for(var u=[["gte","gt","min"],["lte","lt","max"]][h],c=0;c<3&&null==o[h];c++)o[h]=t[u[c]],a[h]=r[c],l[h]=2===c;null==o[h]&&(o[h]=s[h])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(i.value=o[0])}i.visual=Ub.retrieveVisuals(t),d.push(i)},this),rf(t,d),qn(d),L(d,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};hA.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(),h=t.getTextColor(),u=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=B(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,u),L(e.viewPieceList,function(t){var e=t.piece,i=new _g;i.onclick=_(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 Tv({style:{x:"right"===u?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:u,textFont:l,textFill:h,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,u),xy(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:ef(e.findTargetDataIndices(i))})}t.on("mouseover",_(e,this,"highlight")).on("mouseout",_(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return tf(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 _g,r=this.visualMapModel.textStyleModel;a.add(new Tv({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=k(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(Pr(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=D(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,L(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})}}),Ba($T);var vA=Kn,yA=Qn,xA=ja({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(mp.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,n,e,o){var a=this.constructor,r=this.mainType+"Model";e||n.eachSeries(function(t){var e=t.get(this.mainType),i=t[r];e&&e.data?(i?i.mergeOption(e,n,!0):(o&&sf(e),L(e.data,function(t){t instanceof Array?(sf(t[0]),sf(t[1])):sf(t)}),P(i=new a(e,this,n),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),i.__hostSeries=t),t[r]=i):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=O(i)?k(i,vA).join(", "):vA(i),o=e.getName(t),a=yA(this.name);return(null!=i||o)&&(a+="<br />"),o&&(a+=yA(o),null!=i&&(a+=" : ")),null!=i&&(a+=yA(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});o(xA,ox),xA.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 _A=y,wA=z,bA={min:wA(lf,"min"),max:wA(lf,"max"),average:wA(lf,"average")},SA=Xa({type:"marker",init:function(){this.markerGroupMap=C()},render:function(t,i,n){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var o=this.type+"Model";i.eachSeries(function(t){var e=t[o];e&&this.renderSeries(t,e,i,n)},this),e.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});SA.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(pf(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,n,e,i){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Fr),h=function(t,e,i){var n;n=t?k(t&&t.dimensions,function(t){return E({name:t,isSysCoord:!0},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float",isSysCoord:!0}];var o=new u_(n,i),a=k(i.get("data"),z(hf,e));return t&&(a=I(a,z(cf,t))),o.initData(a,null,t?df:function(t){return t.value}),o}(o,t,n);n.setData(h),pf(n.getData(),t,i),h.each(function(t){var e=h.getItemModel(t),i=e.getShallow("symbolSize");"function"==typeof i&&(i=i(n.getRawValue(t),n.getDataParams(t))),h.setItemVisual(t,{symbolSize:i,color:e.get("itemStyle.color")||r.getVisual("color"),symbol:e.getShallow("symbol")})}),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=n})}),l.__keep=!0,l.group.silent=n.get("silent")||t.get("silent")}}),Ba(function(t){t.markPoint=t.markPoint||{}}),xA.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var MA=function(t,e,i,n){var o=t.getData(),a=n.type;if(!O(n)&&("min"===a||"max"===a||"average"===a||null!=n.xAxis||null!=n.yAxis)){var r,s;if(null!=n.yAxis||null!=n.xAxis)r=null!=n.yAxis?"y":"x",e.getAxis(r),s=B(n.yAxis,n.xAxis);else{var l=uf(n,o,e,t);r=l.valueDataDim,l.valueAxis,s=ff(o,r,a)}var h="x"===r?0:1,u=1-h,c=D(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[u]=-1/0,d.coord[u]=1/0;var f=i.get("precision");0<=f&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),c.coord[h]=d.coord[h]=s,n=[c,d,{type:a,valueIndex:n.valueIndex,value:s}]}return(n=[hf(t,n[0]),hf(t,n[1]),P({},n[2])])[2].type=n[2].type||"",g(n[2],n[0]),g(n[2],n[1]),n};SA.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var t=e.markLineModel;if(t){var i=t.getData(),n=t.__from,o=t.__to;n.each(function(t){yf(n,t,!0,e,a),yf(o,t,!1,e,a)}),i.each(function(t){i.setItemLayout(t,[n.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},renderSeries:function(o,i,t,a){function e(t,e,i){var n=t.getItemModel(e);yf(t,e,i,o,a),t.setItemVisual(e,{symbolSize:n.get("symbolSize")||g[i?0:1],symbol:n.get("symbol",!0)||p[i?0:1],color:n.get("itemStyle.color")||s.getVisual("color")})}var n=o.coordinateSystem,r=o.id,s=o.getData(),l=this.markerGroupMap,h=l.get(r)||l.set(r,new rh);this.group.add(h.group);var u=function(t,e,i){var n;n=t?k(t&&t.dimensions,function(t){return E({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new u_(n,i),a=new u_(n,i),r=new u_([],i),s=k(i.get("data"),z(MA,e,t,i));t&&(s=I(s,z(vf,t)));var l=t?df:function(t){return t.value};return o.initData(k(s,function(t){return t[0]}),null,l),a.initData(k(s,function(t){return t[1]}),null,l),r.initData(k(s,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}(n,o,i),c=u.from,d=u.to,f=u.line;i.__from=c,i.__to=d,i.setData(f);var p=i.get("symbol"),g=i.get("symbolSize");O(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),u.from.each(function(t){e(c,t,!0),e(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.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,e){t.traverse(function(t){t.dataModel=i})}),h.__keep=!0,h.group.silent=i.get("silent")||o.get("silent")}}),Ba(function(t){t.markLine=t.markLine||{}}),xA.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var IA=function(t,e,i,n){var o=hf(t,n[0]),a=hf(t,n[1]),r=B,s=o.coord,l=a.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var h=u([{},o,a]);return h.coord=[o.coord,a.coord],h.x0=o.x,h.y0=o.y,h.x1=a.x,h.y1=a.y,h},TA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];SA.extend({type:"markArea",updateTransform:function(t,e,o){e.eachSeries(function(i){var t=i.markAreaModel;if(t){var n=t.getData();n.each(function(e){var t=k(TA,function(t){return bf(n,e,t,i,o)});n.setItemLayout(e,t),n.getItemGraphicEl(e).setShape("points",t)})}},this)},renderSeries:function(i,r,t,n){var e=i.coordinateSystem,o=i.name,a=i.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new _g});this.group.add(l.group),l.__keep=!0;var h=function(t,i,e){var n,o;o=t?(n=k(t&&t.dimensions,function(t){var e=i.getData();return E({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new u_(k(["x0","y0","x1","y1"],function(t,e){return{name:t,type:n[e%2].type}}),e)):new u_(n=[{name:"value",type:"float"}],e);var a=k(e.get("data"),z(IA,i,t,e));t&&(a=I(a,z(wf,t)));var r=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(a,null,r),o.hasItemOption=!0,o}(e,i,r);r.setData(h),h.each(function(e){h.setItemLayout(e,k(TA,function(t){return bf(h,e,t,i,n)})),h.setItemVisual(e,{color:a.getVisual("color")})}),h.diff(l.__data).add(function(t){var e=new Pv({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var i=l.__data.getItemGraphicEl(e);Sn(i,{shape:{points:h.getItemLayout(t)}},r,t),l.group.add(i),h.setItemGraphicEl(t,i)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,e){var i=h.getItemModel(e),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=h.getItemVisual(e,"color");t.useStyle(E(i.getModel("itemStyle").getItemStyle(),{fill:Ot(a,.4),stroke:a})),t.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),gn(t.style,t.hoverStyle,n,o,{labelFetcher:r,labelDataIndex:e,defaultText:h.getName(e)||"",isRectText:!0,autoColor:a}),pn(t,{}),t.dataModel=r}),l.__data=h,l.group.silent=r.get("silent")||i.get("silent")}}),Ba(function(t){t.markArea=t.markArea||{}}),by.registerSubTypeDefaulter("timeline",function(){return"slider"}),Ga({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"),E({currentIndex:i.option.currentIndex},t)}),Ga({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var AA=by.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){AA.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=[];L(e,function(t,e){var i,n=ei(t);R(t)?(i=D(t)).value=e:i=e,a.push(i),w(n)||null!=n&&!isNaN(n)||(n=""),o.push(n+"")}),e=a}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new u_([{name:"value",type:n}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});o(AA.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:[]}}),ox);var DA=lx.extend({type:"timeline"}),CA=function(t,e,i,n){Y_.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};CA.prototype={constructor:CA,getLabelInterval:function(){var t=this.model,e=t.getModel("label"),i=e.get("interval");return null!=i&&"auto"!=i||(i=this._autoLabelInterval)||(i=this._autoLabelInterval=Dr(k(this.scale.getTicks(),this.dataToCoord,this),Cr(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)}}},a(CA,Y_);var LA=_,kA=L,PA=Math.PI;DA.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 Qn(s.scale.getLabel(t))},kA(["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,n,o=t.get("label.position"),a=t.get("orient"),r=(n=e,ro((i=t).getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()},i.get("padding")));null==o||"auto"===o?o="horizontal"===a?r.y+r.height/2<e.getHeight()/2?"-":"+":r.x+r.width/2<e.getWidth()/2?"+":"-":isNaN(o)&&(o={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][o]);var s={horizontal:"center",vertical:0<=o||"+"===o?"left":"right"},l={horizontal:0<=o||"+"===o?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:PA/2},u="vertical"===a?r.height:r.width,c=t.getModel("controlStyle"),d=c.get("show",!0),f=d?c.get("itemSize"):0,p=d?c.get("itemGap"):0,g=f+p,m=t.get("label.rotate")||0;m=m*PA/180;var v,y,x,_,w=c.get("position",!0),b=d&&c.get("showPlayBtn",!0),S=d&&c.get("showPrevBtn",!0),M=d&&c.get("showNextBtn",!0),I=0,T=u;return"left"===w||"bottom"===w?(b&&(v=[0,0],I+=g),S&&(y=[I,0],I+=g)):(b&&(v=[T-f,0],T-=g),S&&(y=[0,0],I+=g)),M&&(x=[T-f,0],T-=g),_=[I,T],t.get("inverse")&&_.reverse(),{viewRect:r,mainLength:u,orient:a,rotation:h[a],labelRotation:m,labelPosOpt:o,labelAlign:t.get("label.align")||s[a],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||l[a],playPosition:v,prevBtnPosition:y,nextBtnPosition:x,axisExtent:_,controlSize:f,controlGap:p}},_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=rt(),h=s.x,u=s.y+s.height;ut(l,l,[-h,-u]),ct(l,l,-PA/2),ut(l,l,[h,u]),(s=s.clone()).applyTransform(l)}var c=n(s),d=n(a.getBoundingRect()),f=n(r.getBoundingRect()),p=a.position,g=r.position;g[0]=p[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m))o(p,d,c,1,v="+"===m?0:1),o(g,f,c,1,1-v);else{var v=0<=m?0:1;o(p,d,c,1,v),g[1]=p[1]+m}a.attr("position",p),r.attr("position",g),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Ar(e,n),a=i.getDataExtent("value");o.setExtent(a[0],a[1]),this._customizeScale(o,i),o.niceTicks();var r=new CA("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 k(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new _g;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new Ev({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:P({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,l,h,u){var c=u.getData(),e=h.scale.getTicks();kA(e,function(t,e){var i=h.dataToCoord(t),n=c.getItemModel(e),o=n.getModel("itemStyle"),a=n.getModel("emphasis.itemStyle"),r={position:[i,0],onclick:LA(this._changeTimeline,this,e)},s=If(n,o,l,r);pn(s,a.getItemStyle()),n.get("tooltip")?(s.dataIndex=e,s.dataModel=u):s.dataIndex=s.dataModel=null},this)},_renderAxisLabel:function(s,l,h,t){var e=t.getModel("label");if(e.get("show")){var u=t.getData(),i=h.scale.getTicks(),c=Cr(h,e.get("formatter")),d=h.getLabelInterval();kA(i,function(t,e){if(!h.isLabelIgnored(e,d)){var i=u.getItemModel(e),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=h.dataToCoord(t),r=new Tv({position:[a,0],rotation:s.labelRotation-s.rotation,onclick:LA(this._changeTimeline,this,e),silent:!1});mn(r.style,n,{text:c[e],textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline}),l.add(r),pn(r,mn({},o))}},this)}},_renderControl:function(t,l,e,h){function i(t,e,i,n){if(t){var o=(a=e,r=p,s={position:t,origin:[u/2,0],rotation:n?-c:0,rectHover:!0,style:d,onclick:i},Yi(h.get(a).replace(/^path:\/\//,""),D(s||{}),new Xt(r[0],r[1],r[2],r[3]),"center"));l.add(o),pn(o,f)}var a,r,s}var u=t.controlSize,c=t.rotation,d=h.getModel("controlStyle").getItemStyle(),f=h.getModel("emphasis.controlStyle").getItemStyle(),p=[0,-u/2,u,u],n=h.getPlayState(),o=h.get("inverse",!0);i(t.nextBtnPosition,"controlStyle.nextIcon",LA(this._changeTimeline,this,o?"-":"+")),i(t.prevBtnPosition,"controlStyle.prevIcon",LA(this._changeTimeline,this,o?"+":"-")),i(t.playPosition,"controlStyle."+(n?"stopIcon":"playIcon"),LA(this._handlePlayClick,this,!n),!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=LA(s._handlePointerDrag,s),t.ondragend=LA(s._handlePointerDragend,s),Tf(t,a,i,n,!0)},onUpdate:function(t){Tf(t,a,i,n)}};this._currentPointer=If(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=Bn(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(LA(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return Tn(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(o){var a,t=this.model.getData(),r=1/0,s=this._axis;return t.each(["value"],function(t,e){var i=s.dataToCoord(t),n=Math.abs(i-o);n<r&&(r=n,a=e)}),a},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Ba(function(t){var e=t&&t.timeline;O(e)||(e=e?[e]:[]),L(e,function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),Sf(t),Mf(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});Mf(n,"position")||(n.position=t.controlPosition),"none"!==n.position||Mf(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}L(t.data||[],function(t){R(t)&&!O(t)&&(!Mf(t,"value")&&Mf(t,"name")&&(t.value=t.name),Sf(t))})}(t)})});var OA=ja({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){OA.superApply(this,"mergeDefaultAndTheme",arguments),L(this.option.feature,function(t,e){var i=Od(e);i&&g(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});Xa({type:"toolbox",render:function(u,c,d,s){function t(t,e){var i,n=m[t],o=m[e],a=new kn(h[n],u,u.ecModel);if(n&&!o){if(0===n.indexOf("my"))i={model:a,onclick:a.option.onclick,featureName:n};else{var r=Od(n);if(!r)return;i=new r(a,c,d)}g[n]=i}else{if(!(i=g[o]))return;i.model=a,i.ecModel=c,i.api=d}n||!o?a.get("show")&&!i.unusable?(function(n,o,t){var a=n.getModel("iconStyle"),r=n.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():n.get("icon"),s=n.get("title")||{};if("string"==typeof e){var i=e,l=s;s={},(e={})[t]=i,s[t]=l}var h=n.iconPaths={};L(e,function(t,e){var i=Ln(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(a.getItemStyle()),i.hoverStyle=r.getItemStyle(),pn(i),u.get("showTitle")&&(i.__title=s[e],i.on("mouseover",function(){var t=r.getItemStyle();i.setStyle({text:s[e],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){i.setStyle({textFill:null})})),i.trigger(n.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",_(o.onclick,o,c,d,e)),h[e]=i})}(a,i,n),a.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(a,c,d,s)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}var e,i,n,o,a,r,l,f=this.group;if(f.removeAll(),u.get("show")){var p=+u.get("itemSize"),h=u.get("feature")||{},g=this._features||(this._features={}),m=[];L(h,function(t,e){m.push(e)}),new Ja(this._featureNames||[],m).add(t).update(t).remove(z(t,null)).execute(),this._featureNames=m,e=f,n=d,o=(i=u).getBoxLayoutParams(),a=i.get("padding"),r={width:n.getWidth(),height:n.getHeight()},l=ro(o,r,a),xy(i.get("orient"),e,i.get("itemGap"),l.width,l.height),so(e,o,r,a),f.add(Uc(f.getBoundingRect(),u)),f.eachChild(function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var n=le(e,_e(i)),o=t.position[0]+f.position[0],a=!1;t.position[1]+f.position[1]+p+n.height>d.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")}})}},updateView:function(t,e,i,n){L(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){L(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){L(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var NA=yx.toolbox.saveAsImage;Af.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:NA.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:NA.lang.slice()},Af.prototype.unusable=!mp.canvasSupported,Af.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||mp.browser.ie||mp.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='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},Pd("saveAsImage",Af);var EA=yx.toolbox.magicType;Df.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:D(EA.title),option:{},seriesIndex:{}};var zA=Df.prototype;zA.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return L(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var RA={line:function(t,e,i,n){if("bar"===t)return g({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 g({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){if("line"===t||"bar"===t)return g({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return g({id:e,stack:""},n.get("option.tiled")||{},!0)}},BA=[["line","bar"],["stack","tiled"]];zA.onclick=function(h,t,u){var c=this.model,e=c.get("seriesIndex."+u);if(RA[u]){var d={series:[]};L(BA,function(t){0<=y(t,u)&&L(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(u,"emphasis"),h.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=RA[u](e,i,t,c);n&&(E(n,t.option),d.series.push(n));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===u||"bar"===u)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=h.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"===u}}}),t.dispatchAction({type:"changeMagicType",currentType:u,newOption:d})}},Ga({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Pd("magicType",Df);var VA=yx.toolbox.dataView,GA=new Array(60).join("-"),WA="\t",FA=new RegExp("["+WA+"]+","g");Pf.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:D(VA.title),lang:D(VA.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Pf.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=Cf(t);if("function"==typeof u){var f=u(e.getOption());"string"==typeof f?l.innerHTML=f:b(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 p=d.meta,g=document.createElement("div");g.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;He(v,"click",i),He(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):kf(h.value,p)}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")&&g.appendChild(y),g.appendChild(v),He(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)+WA+e.substring(n),this.selectionStart=this.selectionEnd=i+1,$g(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},Pf.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Pf.prototype.dispose=function(t,e){this.remove(t,e)},Pd("dataView",Pf),Ga({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,a){var r=[];L(t.newOption.series,function(t){var e,n,i=a.getSeriesByName(t.name)[0];if(i){var o=i.get("data");r.push({name:t.name,data:(e=t.data,n=o,k(e,function(t,e){var i=n&&n[e];return R(i)&&!O(i)?(R(t)&&!O(t)&&(t=t.value),E({value:t},i)):t}))})}else r.push(P({type:"scatter"},t))}),a.mergeOption(E({series:r},t.newOption))});var HA=L,ZA="\0_ec_hist_store";NT.extend({type:"dataZoom.select"}),ET.extend({type:"dataZoom.select"});var UA=yx.toolbox.dataZoom,jA=L;Nf.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:D(UA.title)};var XA=Nf.prototype;XA.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(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 _d(Ef(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)"}})}(t,e,this,n,i),zf(t,e)},XA.onclick=function(t,e,i){YA[i].call(this)},XA.remove=function(t,e){this._brushController.unmount()},XA.dispose=function(t,e){this._brushController.dispose()};var YA={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var n=Of(t),e=n[n.length-1];1<n.length&&n.pop();var o={};return HA(e,function(t,e){for(var i=n.length-1;0<=i;i--)if(t=n[i][e]){o[e]=t;break}}),o}(this.ecModel))}};XA._onBrush=function(t,e){function o(t,e,i){var n,o,a,r=e.getAxis(t),s=r.model,l=(n=t,o=s,c.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(n,o.componentIndex)&&(a=t)}),a),h=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==h.minValueSpan&&null==h.maxValueSpan||(i=OS(0,i.slice(),r.scale.getExtent(),0,h.minValueSpan,h.maxValueSpan)),l&&(u[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}if(e.isEnd&&t.length){var u={},c=this.ecModel;this._brushController.updateCovers([]),new _d(Ef(this.model.option),c,{include:["grid"]}).matchOutputRanges(t,c,function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(o("x",i,e[0]),o("y",i,e[1])):o({lineX:"x",lineY:"y"}[n],i,e)}}),i=u,r=Of(a=c),HA(i,function(t,e){for(var i=r.length-1;0<=i&&!r[i][e];i--);if(i<0){var n=a.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(n){var o=n.getPercentRange();r[0][e]={dataZoomId:e,start:o[0],end:o[1]}}}}),r.push(i),this._dispatchZoomAction(u)}var a,i,r},XA._dispatchZoomAction=function(t){var i=[];jA(t,function(t,e){i.push(D(t))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},Pd("dataZoom",Nf),Ba(function(r){function t(n,t){if(t){var o=n+"Index",a=t[o];null==a||"all"==a||O(a)||(a=!1===a||"none"===a?[]:[a]),e=function(t,e){if(null==a||"all"==a||-1!==y(a,e)){var i={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+n+e};i[o]=e,s.push(i)}},O(i=r[n])||(i=i?[i]:[]),jA(i,e)}var e,i}if(r){var s=r.dataZoom||(r.dataZoom=[]);O(s)||(r.dataZoom=s=[s]);var e=r.toolbox;if(e&&(O(e)&&(e=e[0]),e&&e.feature)){var i=e.feature.dataZoom;t("xAxis",i),t("yAxis",i)}}});var qA=yx.toolbox.restore;Rf.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:qA.title},Rf.prototype.onclick=function(t,e,i){t[ZA]=null,e.dispatchAction({type:"restore",from:this.uid})},Pd("restore",Rf),Ga({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var $A,KA="urn:schemas-microsoft-com:vml",JA="undefined"==typeof window?null:window,QA=!1,tD=JA&&JA.document;if(tD&&!mp.canvasSupported)try{!tD.namespaces.zrvml&&tD.namespaces.add("zrvml",KA),$A=function(t){return tD.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){$A=function(t){return tD.createElement("<"+t+' xmlns="'+KA+'" class="zrvml">')}}var eD=iv.CMD,iD=Math.round,nD=Math.sqrt,oD=Math.abs,aD=Math.cos,rD=Math.sin,sD=Math.max;if(!mp.canvasSupported){var lD=21600,hD=lD/2,uD=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=lD+","+lD,t.coordorigin="0,0"},cD=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},dD=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},fD=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},pD=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},gD=function(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t},mD=function(t,e,i){var n=Tt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=cD(n[0],n[1],n[2]),t.opacity=i*n[3])},vD=function(t,e,i,n){var o,a,r="fill"==e,s=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(r||!r&&i.lineWidth)?(t[r?"filled":"stroked"]="true",i[e]instanceof Gv&&fD(t,s),s||(s=Bf(e)),r?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof Gv){var r,s=0,l=[0,0],h=0,u=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&&(Q(g,g,p),Q(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&&Q(g,g,p),_/=x[0]*lD,w/=x[1]*lD;var b=sD(_,w);h=0/b,u=2*a.r/b-h}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<M;A++){var D=S[A],C=(n=D.color,o=Tt(n),[cD(o[0],o[1],o[2]),o[3]]);T.push(D.offset*u+h+" "+C[0]),0!==A&&A!==M-1||I.push(C)}if(2<=M){var L=I[0][0],k=I[1][0],P=I[0][1]*e.opacity,O=I[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=s,t.color=L,t.color2=k,t.colors=T.join(","),t.opacity=O,t.opacity2=P}"radial"===r&&(t.focusposition=l.join(","))}else mD(t,a,e.opacity)}(s,i,n):(o=s,null!=(a=i).lineDash&&(o.dashstyle=a.lineDash.join(" ")),null==a.stroke||a.stroke instanceof Gv||mD(o,a.stroke,a.opacity)),dD(t,s)):(t[r?"filled":"stroked"]="false",fD(t,s))},yD=[[],[],[]];Gi.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=Bf("shape"),uD(i),this._vmlEl=i),vD(i,"fill",e,this),vD(i,"stroke",e,this);var n=this.transform,o=null!=n,a=i.getElementsByTagName("stroke")[0];if(a){var r=e.lineWidth;if(o&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=nD(oD(s))}a.weight=r+"px"}var l=this.path||(this.path=new iv);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,o,a,r,s,l=eD.M,h=eD.C,u=eD.L,c=eD.A,d=eD.Q,f=[],p=t.data,g=t.len();for(a=0;a<g;){switch(n="",i=0,o=p[a++]){case l:n=" m ",i=1,r=p[a++],s=p[a++],yD[0][0]=r,yD[0][1]=s;break;case u:n=" l ",i=1,r=p[a++],s=p[a++],yD[0][0]=r,yD[0][1]=s;break;case d:case h:n=" c ",i=3;var m,v,y=p[a++],x=p[a++],_=p[a++],w=p[a++];o===d?(_=((m=_)+2*y)/3,w=((v=w)+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[a++],v=p[a++]),yD[0][0]=y,yD[0][1]=x,yD[1][0]=_,yD[1][1]=w,r=yD[2][0]=m,s=yD[2][1]=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=nD(e[0]*e[0]+e[1]*e[1]),I=nD(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[a++],D=p[a++],C=p[a++],L=p[a++],k=p[a++]+T,P=p[a++]+k+T;a++;var O=p[a++],N=A+aD(k)*C,E=D+rD(k)*L,z=(y=A+aD(P)*C,x=D+rD(P)*L,O?" wa ":" at ");Math.abs(N-y)<1e-4&&(.01<Math.abs(P-k)?O&&(N+=.0125):Math.abs(E-D)<1e-4?O&&N<A||!O&&A<N?x-=.0125:x+=.0125:O&&E<D||!O&&D<E?y+=.0125:y-=.0125),f.push(z,iD(((A-C)*M+b)*lD-hD),",",iD(((D-L)*I+S)*lD-hD),",",iD(((A+C)*M+b)*lD-hD),",",iD(((D+L)*I+S)*lD-hD),",",iD((N*M+b)*lD-hD),",",iD((E*I+S)*lD-hD),",",iD((y*M+b)*lD-hD),",",iD((x*I+S)*lD-hD)),r=y,s=x;break;case eD.R:var R=yD[0],B=yD[1];R[0]=p[a++],R[1]=p[a++],B[0]=R[0]+p[a++],B[1]=R[1]+p[a++],e&&(Q(R,R,e),Q(B,B,e)),R[0]=iD(R[0]*lD-hD),B[0]=iD(B[0]*lD-hD),R[1]=iD(R[1]*lD-hD),B[1]=iD(B[1]*lD-hD),f.push(" m ",R[0],",",R[1]," l ",B[0],",",R[1]," l ",B[0],",",B[1]," l ",R[0],",",B[1]);break;case eD.Z:f.push(" x ")}if(0<i){f.push(n);for(var V=0;V<i;V++){var G=yD[V];e&&Q(G,G,e),f.push(iD(G[0]*lD-hD),",",iD(G[1]*lD-hD),V<i-1?",":"")}}}return f.join("")}(l,this.transform),i.style.zIndex=pD(this.zlevel,this.z,this.z2),dD(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Gi.prototype.onRemove=function(t){fD(t,this._vmlEl),this.removeRectText(t)},Gi.prototype.onAdd=function(t){dD(t,this._vmlEl),this.appendRectText(t)};Be.prototype.brushVML=function(t){var e,i,n,o=this.style,a=o.image;if("object"==typeof(n=a)&&n.tagName&&"IMG"===n.tagName.toUpperCase()){var r=a.src;if(r===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var s=a.runtimeStyle,l=s.width,h=s.height;s.width="auto",s.height="auto",e=a.width,i=a.height,s.width=l,s.height=h,this._imageSrc=r,this._imageWidth=e,this._imageHeight=i}a=r}else a===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(a){var u=o.x||0,c=o.y||0,d=o.width,f=o.height,p=o.sWidth,g=o.sHeight,m=o.sx||0,v=o.sy||0,y=p&&g,x=this._vmlEl;x||(x=tD.createElement("div"),uD(x),this._vmlEl=x);var _,w=x.style,b=!1,S=1,M=1;if(this.transform&&(_=this.transform,S=nD(_[0]*_[0]+_[1]*_[1]),M=nD(_[2]*_[2]+_[3]*_[3]),b=_[1]||_[2]),b){var I=[u,c],T=[u+d,c],A=[u,c+f],D=[u+d,c+f];Q(I,I,_),Q(T,T,_),Q(A,A,_),Q(D,D,_);var C=sD(I[0],T[0],A[0],D[0]),L=sD(I[1],T[1],A[1],D[1]),k=[];k.push("M11=",_[0]/S,",","M12=",_[2]/M,",","M21=",_[1]/S,",","M22=",_[3]/M,",","Dx=",iD(u*S+_[4]),",","Dy=",iD(c*M+_[5])),w.padding="0 "+iD(C)+"px "+iD(L)+"px 0",w.filter="progid:DXImageTransform.Microsoft.Matrix("+k.join("")+", SizingMethod=clip)"}else _&&(u=u*S+_[4],c=c*M+_[5]),w.filter="",w.left=iD(u)+"px",w.top=iD(c)+"px";var P=this._imageEl,O=this._cropEl;P||(P=tD.createElement("div"),this._imageEl=P);var N=P.style;if(y){if(e&&i)N.width=iD(S*e*d/p)+"px",N.height=iD(M*i*f/g)+"px";else{var E=new Image,z=this;E.onload=function(){E.onload=null,e=E.width,i=E.height,N.width=iD(S*e*d/p)+"px",N.height=iD(M*i*f/g)+"px",z._imageWidth=e,z._imageHeight=i,z._imageSrc=a},E.src=a}O||((O=tD.createElement("div")).style.overflow="hidden",this._cropEl=O);var R=O.style;R.width=iD((d+m*d/p)*S),R.height=iD((f+v*f/g)*M),R.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-m*d/p*S+",Dy="+-v*f/g*M+")",O.parentNode||x.appendChild(O),P.parentNode!=O&&O.appendChild(P)}else N.width=iD(S*d)+"px",N.height=iD(M*f)+"px",x.appendChild(P),O&&O.parentNode&&(x.removeChild(O),this._cropEl=null);var B="",V=o.opacity;V<1&&(B+=".Alpha(opacity="+iD(100*V)+") "),B+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+a+", SizingMethod=scale)",N.filter=B,x.style.zIndex=pD(this.zlevel,this.z,this.z2),dD(t,x),null!=o.text&&this.drawRectText(t,this.getBoundingRect())}},Be.prototype.onRemove=function(t){fD(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Be.prototype.onAdd=function(t){dD(t,this._vmlEl),this.appendRectText(t)};var xD,_D={},wD=0,bD=document.createElement("div"),SD=function(t){var e=_D[t];if(!e){100<wD&&(wD=0,_D={});var i,n=bD.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"},_D[t]=e,wD++}return e};Gg.measureText=function(t,e){var i=tD;xD||((xD=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",tD.body.appendChild(xD));try{xD.style.font=e}catch(t){}return xD.innerHTML="",xD.appendChild(i.createTextNode(t)),{width:xD.offsetWidth}};for(var MD=new Xt,ID=[Zg,Re,Be,Gi,Tv],TD=0;TD<ID.length;TD++){var AD=ID[TD].prototype;AD.drawRectText=function(t,e,i,n){var o=this.style;this.__dirty&&be(o);var a=o.text;if(null!=a&&(a+=""),a){if(o.rich){var r=ye(a,o);a=[];for(var s=0;s<r.lines.length;s++){for(var l=r.lines[s].tokens,h=[],u=0;u<l.length;u++)h.push(l[u].text);a.push(h.join(""))}a=a.join("\n")}var c,d,f=o.textAlign,p=o.textVerticalAlign,g=SD(o.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||le(a,m,f,p);var v=this.transform;if(v&&!n&&(MD.copy(e),MD.applyTransform(v),e=MD),n)c=e.x,d=e.y;else{var y=o.textPosition,x=o.textDistance;if(y instanceof Array)c=e.x+gD(y[0],e.width),d=e.y+gD(y[1],e.height),f=f||"left";else{var _=ce(y,e,x);c=_.x,d=_.y,f=f||_.textAlign,p=p||_.textVerticalAlign}}c=he(c,i.width,f),d=ue(d,i.height,p),d+=i.height/2;var w,b,S,M=Bf,I=this._textVmlEl;I?b=(w=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),w=M("path"),b=M("textpath"),S=M("skew"),b.style["v-text-align"]="left",uD(I),w.textpathok=!0,b.on=!0,I.from="0 0",I.to="1000 0.05",dD(I,S),dD(I,w),dD(I,b),this._textVmlEl=I);var T=[c,d],A=I.style;A.top=v&&n?(Q(T,T,v),S.on=!0,S.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",S.offset=(iD(T[0])||0)+","+(iD(T[1])||0),S.origin="0 0",A.left="0px"):(S.on=!1,A.left=iD(c)+"px",iD(d)+"px"),b.string=String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{b.style.font=m}catch(t){}vD(I,"fill",{fill:o.textFill,opacity:o.opacity},this),vD(I,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash},this),I.style.zIndex=pD(this.zlevel,this.z,this.z2),dD(t,I)}},AD.removeRectText=function(t){fD(t,this._textVmlEl),this._textVmlEl=null},AD.appendRectText=function(t){dD(t,this._textVmlEl)}}Tv.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},Tv.prototype.onRemove=function(t){this.removeRectText(t)},Tv.prototype.onAdd=function(t){this.appendRectText(t)}}Gf.prototype={constructor:Gf,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!=t||this._height!=e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Vf(e.width))-Vf(e.paddingLeft)-Vf(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Vf(e.height))-Vf(e.paddingTop)-Vf(e.paddingBottom)|0}},L(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;Gf.prototype[t]=(e=t,function(){ug('In IE8.0 VML mode painter not support method "'+e+'"')})}),Je("vml",Gf);var DD=iv.CMD,CD=Array.prototype.join,LD="none",kD=Math.round,PD=Math.sin,OD=Math.cos,ND=Math.PI,ED=2*Math.PI,zD=180/ND,RD=1e-4,BD={};BD.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=Wf("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),t.buildPath(n,t.shape),t.__dirtyPath=!1;var o=function(t){for(var e=[],i=t.data,n=t.len(),o=0;o<n;){var a="",r=0;switch(i[o++]){case DD.M:a="M",r=2;break;case DD.L:a="L",r=2;break;case DD.Q:a="Q",r=4;break;case DD.C:a="C",r=6;break;case DD.A:var s=i[o++],l=i[o++],h=i[o++],u=i[o++],c=i[o++],d=i[o++],f=i[o++],p=i[o++],g=Math.abs(d),m=Hf(g-ED)&&!Hf(g),v=!1;v=ED<=g||!Hf(g)&&(-ND<d&&d<0||ND<d)==!!p;var y=Ff(s+h*OD(c)),x=Ff(l+u*PD(c));m&&(d=p?ED-1e-4:1e-4-ED,v=!0,9===o&&e.push("M",y,x));var _=Ff(s+h*OD(c+d)),w=Ff(l+u*PD(c+d));e.push("A",Ff(h),Ff(u),kD(f*zD),+v,+p,_,w);break;case DD.Z:a="Z";break;case DD.R:_=Ff(i[o++]),w=Ff(i[o++]);var b=Ff(i[o++]),S=Ff(i[o++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}a&&e.push(a);for(var M=0;M<r;M++)e.push(Ff(i[o++]))}return e.join(" ")}(n);o.indexOf("NaN")<0&&Uf(i,"d",o)}jf(i,e),Zf(i,t.transform),null!=e.text&&FD(t,t.getBoundingRect())};var VD={brush:function(t){var e,i,n=t.style,o=n.image;if(o instanceof HTMLImageElement&&(o=o.src),o){var a=n.x||0,r=n.y||0,s=n.width,l=n.height,h=t.__svgEl;h||(h=Wf("image"),t.__svgEl=h),o!==t.__imageSrc&&(e="href",i=o,h.setAttributeNS("http://www.w3.org/1999/xlink",e,i),t.__imageSrc=o),Uf(h,"width",s),Uf(h,"height",l),Uf(h,"x",a),Uf(h,"y",r),Zf(h,t.transform),null!=n.text&&FD(t,t.getBoundingRect())}}},GD={},WD=new Xt,FD=function(t,e,i){var n=t.style;t.__dirty&&be(n);var o=n.text;if(null!=o){o+="";var a=t.__textSvgEl;if(a||(a=Wf("text"),t.__textSvgEl=a),jf(a,n,!0),t instanceof Tv||t.style.transformText)Zf(a,t.transform);else if(t.transform)WD.copy(e),WD.applyTransform(t.transform),e=WD;else{var r=t.transformCoordToGlobal(e.x,e.y);e.x=r[0],e.y=r[1]}var s,l,h=n.textPosition,u=n.textDistance,c=n.textAlign||"left";"number"==typeof n.fontSize&&(n.fontSize+="px");var d=n.font||[n.fontStyle||"",n.fontWeight||"",n.fontSize||"",n.fontFamily||""].join(" ")||Vg,f=Xf(n.textVerticalAlign),p=(i=le(o,d,c,f)).lineHeight;if(h instanceof Array)s=e.x+h[0],l=e.y+h[1];else{var g=ce(h,e,u);s=g.x,l=g.y,f=Xf(g.textVerticalAlign),c=g.textAlign}Uf(a,"alignment-baseline",f),d&&(a.style.font=d);var m=n.textPadding;Uf(a,"x",s),Uf(a,"y",l);var v=o.split("\n"),y=v.length,x=c;"left"===x?(x="start",m&&(s+=m[3])):"right"===x?(x="end",m&&(s-=m[1])):"center"===x&&(x="middle",m&&(s+=(m[3]-m[1])/2));var _=0;if("baseline"===f?(_=-i.height+p,m&&(_-=m[2])):"middle"===f?(_=(-i.height+p)/2,m&&(l+=(m[0]-m[2])/2)):m&&(_+=m[0]),t.__text!==o||t.__textFont!==d){var w=t.__tspanList||[];for(t.__tspanList=w,S=0;S<y;S++)(M=w[S])?M.innerHTML="":(M=w[S]=Wf("tspan"),a.appendChild(M),Uf(M,"alignment-baseline",f),Uf(M,"text-anchor",x)),Uf(M,"x",s),Uf(M,"y",l+S*p+_),M.appendChild(document.createTextNode(v[S]));for(;S<w.length;S++)a.removeChild(w[S]);w.length=y,t.__text=o,t.__textFont=d}else if(t.__tspanList.length)for(var b=t.__tspanList.length,S=0;S<b;++S){var M=t.__tspanList[S];M&&(Uf(M,"x",s),Uf(M,"y",l+S*p+_))}}};GD.drawRectText=FD,GD.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],FD(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},Yf.prototype={diff:function(l,h,t){t||(t=function(t,e){return t===e}),this.equals=t;var u=this;l=l.slice();var c=(h=h.slice()).length,d=l.length,f=1,e=c+d,p=[{newPos:-1,components:[]}],i=this.extractCommon(p[0],h,l,0);if(p[0].newPos+1>=c&&d<=i+1){for(var n=[],o=0;o<h.length;o++)n.push(o);return[{indices:n,count:h.length}]}for(;f<=e;){var a=function(){for(var t=-1*f;t<=f;t+=2){var e,i=p[t-1],n=p[t+1],o=(n?n.newPos:0)-t;i&&(p[t-1]=void 0);var a=i&&i.newPos+1<c,r=n&&0<=o&&o<d;if(a||r){if(!a||r&&i.newPos<n.newPos?(e={newPos:(s=n).newPos,components:s.components.slice(0)},u.pushComponent(e.components,void 0,!0)):((e=i).newPos++,u.pushComponent(e.components,!0,void 0)),o=u.extractCommon(e,h,l,t),e.newPos+1>=c&&d<=o+1)return qf(0,e.components);p[t]=e}else p[t]=void 0}var s;f++}();if(a)return a}},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<o&&s+1<a&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var HD=new Yf;$f.prototype.createElement=Wf,$f.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?((n=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},$f.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},$f.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},$f.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},$f.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var n=[];return L(this._tagNames,function(t){var e=i.getElementsByTagName(t);n=n.concat([].slice.call(e))}),n},$f.prototype.markAllUnused=function(){var e=this;L(this.getDoms(),function(t){t[e._markLabel]="0"})},$f.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},$f.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var i=this;L(this.getDoms(),function(t){"1"!==t[i._markLabel]&&e.removeChild(t)})}},$f.prototype.getSvgProxy=function(t){return t instanceof Gi?BD:t instanceof Be?VD:t instanceof Tv?GD:BD},$f.prototype.getTextSvgElement=function(t){return t.__textSvgEl},$f.prototype.getSvgElement=function(t){return t.__svgEl},a(Kf,$f),Kf.prototype.addWithoutUpdate=function(a,r){if(r&&r.style){var s=this;L(["fill","stroke"],function(t){if(r.style[t]&&("linear"===r.style[t].type||"radial"===r.style[t].type)){var e,i=r.style[t],n=s.getDefs(!0);i._dom?(e=i._dom,n.contains(i._dom)||s.addDom(e)):e=s.add(i),s.markUsed(r);var o=e.getAttribute("id");a.setAttribute(t,"url(#"+o+")")}})}},Kf.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return ug("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},Kf.prototype.update=function(i){var n=this;$f.prototype.update.call(this,i,function(){var t=i.type,e=i._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?n.updateDom(i,i._dom):(n.removeDom(i),n.add(i))})},Kf.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 ug("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;n<o;++n){var a=this.createElement("stop");a.setAttribute("offset",100*i[n].offset+"%"),a.setAttribute("stop-color",i[n].color),e.appendChild(a)}t._dom=e},Kf.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&$f.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&$f.prototype.markUsed.call(this,e._dom)}},a(Jf,$f),Jf.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},Jf.prototype.updateDom=function(t,e,i){if(e&&0<e.length){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"+this._zrId+"-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);ht(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=h}else l.brush(r);var u=this.getSvgElement(r);n.innerHTML="",n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},Jf.prototype.markUsed=function(t){var e=this;t.__clipPaths&&0<t.__clipPaths.length&&L(t.__clipPaths,function(t){t._dom&&$f.prototype.markUsed.call(e,t._dom),t._textDom&&$f.prototype.markUsed.call(e,t._textDom)})},a(Qf,$f),Qf.prototype.addWithoutUpdate=function(t,e){if(e&&tp(e.style)){var i,n=e.style;n._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var o=i.getAttribute("id");t.style.filter="url(#"+o+")"}},Qf.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},Qf.prototype.update=function(t,e){var i=e.style;if(tp(i)){var n=this;$f.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},Qf.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},Qf.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale&&t.scale[0]||1,h=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/h),i.setAttribute("flood-color",r);var u=a/2/l+" "+a/2/h;i.setAttribute("stdDeviation",u),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),s._shadowDom=e},Qf.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&$f.prototype.markUsed.call(this,e._shadowDom)};var ZD=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=P({},i||{});var o=Wf("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new Kf(n,o),this.clipPathManager=new Jf(n,o),this.shadowManager=new Qf(n,o);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=a,t.appendChild(a),a.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]};ZD.prototype={constructor:ZD,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(),this.shadowManager.markAllUnused();var e,i,n=this._svgRoot,o=this._visibleList,a=t.length,r=[];for(e=0;e<a;e++){var s=(i=v=t[e])instanceof Gi?BD:i instanceof Be?VD:i instanceof Tv?GD:BD,l=sp(v)||rp(v);v.invisible||(v.__dirty&&(s&&s.brush(v),this.clipPathManager.update(v),v.style&&(this.gradientManager.update(v.style.fill),this.gradientManager.update(v.style.stroke),this.shadowManager.update(l,v)),v.__dirty=!1),r.push(v))}var h,u,c,d,f=(u=o,c=r,HD.diff(u,c,d));for(e=0;e<f.length;e++)if((g=f[e]).removed)for(m=0;m<g.count;m++){l=sp(v=o[g.indices[m]]);var p=rp(v);ap(n,l),ap(n,p)}for(e=0;e<f.length;e++){var g=f[e];if(g.added)for(m=0;m<g.count;m++){l=sp(v=r[g.indices[m]]),p=rp(v);h?np(n,l,h):op(n,l),l?np(n,p,l):h?np(n,p,h):op(n,p),np(n,p,l),h=p||l||h,this.gradientManager.addWithoutUpdate(l,v),this.shadowManager.addWithoutUpdate(h,v),this.clipPathManager.markUsed(v)}else if(!g.removed)for(var m=0;m<g.count;m++){var v=r[g.indices[m]];h=l=rp(v)||sp(v)||h,this.gradientManager.markUsed(v),this.gradientManager.addWithoutUpdate(l,v),this.shadowManager.markUsed(v),this.shadowManager.addWithoutUpdate(l,v),this.clipPathManager.markUsed(v)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=r},_getDefs:function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?((n=e.insertBefore(Wf("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},resize:function(t,e){var i=this._viewport;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||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||ep(s[i])||ep(r.style[i]))-(ep(s[o])||0)-(ep(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}},L(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;ZD.prototype[t]=(e=t,function(){ug('In SVG mode painter not support method "'+e+'"')})}),Je("svg",ZD),t.version="4.0.2",t.dependencies={zrender:"4.0.1"},t.PRIORITY=zx,t.init=function(t,e,i){var n=za(t);if(n)return n;var o=new wa(t,e,i);return o.id="ec_"+Qx++,Kx[o.id]=o,hi(t,e_,o.id),function(n){function o(t,e){for(var i=0;i<t.length;i++)t[i][a]=e}var a="__connectUpdateStatus";Px(Zx,function(t,e){n._messageCenter.on(e,function(t){if(Jx[n.group]&&0!==n[a]){if(t&&t.escapeConnect)return;var e=n.makeActionFromEvent(t),i=[];Px(Kx,function(t){t!==n&&t.group===n.group&&i.push(t)}),o(i,0),Px(i,function(t){1!==t[a]&&t.dispatchAction(e)}),o(i,2)}})})}(o),o},t.connect=function(e){if(O(e)){var t=e;e=null,Px(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+t_++,Px(t,function(t){t.group=e})}return Jx[e]=!0,e},t.disConnect=Ea,t.disconnect=n_,t.dispose=function(t){"string"==typeof t?t=Kx[t]:t instanceof wa||(t=za(t)),t instanceof wa&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=za,t.getInstanceById=function(t){return Kx[t]},t.registerTheme=Ra,t.registerPreprocessor=Ba,t.registerProcessor=Va,t.registerPostUpdate=function(t){Xx.push(t)},t.registerAction=Ga,t.registerCoordinateSystem=Wa,t.getCoordinateSystemDimensions=function(t){var e=So.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=Fa,t.registerVisual=Ha,t.registerLoading=Ua,t.extendComponentModel=ja,t.extendComponentView=Xa,t.extendSeriesModel=Ya,t.extendChartView=qa,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+");")()),i_[t]={geoJson:e,specialAreas:i}},t.getMap=$a,t.dataTool={},t.zrender=um,t.graphic=qv,t.number=ly,t.format=gy,t.throttle=oa,t.helper=H_,t.matrix=Hp,t.vector=zp,t.color=ag,t.parseGeoJSON=U_,t.parseGeoJson=q_,t.util=$_,t.List=u_,t.Model=kn,t.Axis=Y_,t.env=mp});