!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){var e={},n={},i=t.match(/firefox\/([\d.]+)/),r=t.match(/msie\s([\d.]+)/)||t.match(/trident\/.+?rv:(([\d.]+))/),o=t.match(/edge\/([\d.]+)/),a=/micromessenger/i.test(t);return i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1]),a&&(n.wechat=!0),{browser:n,os:e,node:!1,canvassupported:!!document.createelement("canvas").getcontext,svgsupported:"undefined"!=typeof svgrect,toucheventssupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointereventssupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domsupported:"undefined"!=typeof document}}function n(t,e){"createcanvas"===t&&(jm=null),km[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=wm.call(t);if("[object array]"===n){if(!e(t)){e=[];for(var r=0,o=t.length;o>r;r++)e[r]=i(t[r])}}else if(gm[n]){if(!e(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(var r=0,o=t.length;o>r;r++)e[r]=i(t[r])}}}else if(!hm[n]&&!e(t)&&!i(t)){e={};for(var s in t)t.hasownproperty(s)&&(e[s]=i(t[s]))}return e}function r(t,e,n){if(!m(e)||!m(t))return n?i(e):t;for(var o in e)if(e.hasownproperty(o)){var a=t[o],s=e[o];!m(s)||!m(a)||_(s)||_(a)||i(s)||i(a)||s(s)||s(a)||e(s)||e(a)?!n&&o in t||(t[o]=i(e[o],!0)):r(a,s,n)}return t}function o(t,e){for(var n=t[0],i=1,o=t.length;o>i;i++)n=r(n,t[i],e);return n}function a(t,e){for(var n in e)e.hasownproperty(n)&&(t[n]=e[n]);return t}function s(t,e,n){for(var i in e)e.hasownproperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function l(){return jm||(jm=$m().getcontext("2d")),jm}function u(t,e){if(t){if(t.indexof)return t.indexof(e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1}function h(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)t.prototype[r]=i[r];t.prototype.constructor=t,t.superclass=e}function c(t,e,n){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,n)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,n){if(t&&e)if(t.foreach&&t.foreach===xm)t.foreach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;r>i;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasownproperty(o)&&e.call(n,t[o],o,t)}function p(t,e,n){if(t&&e){if(t.map&&t.map===qm)return t.map(e,n);for(var i=[],r=0,o=t.length;o>r;r++)i.push(e.call(n,t[r],r,t));return i}}function g(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===jm)return t.reduce(e,n,i);for(var r=0,o=t.length;o>r;r++)n=e.call(i,n,t[r],r,t);return n}}function v(t,e,n){if(t&&e){if(t.filter&&t.filter===ym)return t.filter(e,n);for(var i=[],r=0,o=t.length;o>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}}function m(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function y(t,e){var n=um.call(arguments,2);return function(){return t.apply(e,n.concat(um.call(arguments)))}}function x(t){var e=um.call(arguments,1);return function(){return t.apply(this,e.concat(um.call(arguments)))}}function _(t){return"[object array]"===wm.call(t)}function b(t){return"function"==typeof t}function w(t){return"[object string]"===wm.call(t)}function m(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function s(t){return!!hm[wm.call(t)]}function t(t){return!!gm[wm.call(t)]}function i(t){return"object"==typeof t&&"number"==typeof t.nodetype&&"object"==typeof t.ownerdocument}function c(t){return t!==t}function a(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function d(t,e){return null!=t?t:e}function k(t,e,n){return null!=t?t:null!=e?e:n}function p(){return function.call.apply(um,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 o(t,e){if(!t)throw new error(e)}function z(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\ufeff\xa0]+|[\s\ufeff\xa0]+$/g,"")}function r(t){t[qm]=!0}function e(t){return t[qm]}function b(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=_(t);this.data={};var i=this;t instanceof b?t.each(e):t&&f(t,e)}function n(t){return new b(t)}function v(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i=0;if(r){var o="touchend"!==i?e.targettouches[0]:e.changedtouches[0];o&&fe(t,o,e,n)}else fe(t,e,e,n),e.zrdelta=e.wheeldelta?e.wheeldelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&hy.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ve(t,e,n){uy?t.addeventlistener(e,n):t.attachevent("on"+e,n)}function me(t,e,n){uy?t.removeeventlistener(e,n):t.detachevent("on"+e,n)}function ye(t){return 2===t.which||3===t.which}function xe(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return math.sqrt(e*e+n*n)}function _e(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function be(t,e,n){return{type:t,event:n,target:e.target,toptarget:e.toptarget,cancelbubble:!1,offsetx:n.zrx,offsety:n.zry,gestureevent:n.gestureevent,pinchx:n.pinchx,pinchy:n.pinchy,pinchscale:n.pinchscale,wheeldelta:n.zrdelta,zrbytouch:n.zrbytouch,which:n.which,stop:we}}function we(){cy(this.event)}function me(){}function se(t,e,n){if(t[t.recthover?"rectcontain":"contain"](e,n)){for(var i,r=t;r;){if(r.clippath&&!r.clippath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return i?py:!0}return!1}function te(){var t=new my(6);return ie(t),t}function ie(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ce(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 ae(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function de(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function ke(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=math.sin(n),h=math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function pe(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function le(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function oe(t){var e=te();return ce(e,t),e}function ze(t){return t>_y||-_y>t}function re(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1: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 ee(t){return t=math.round(t),0>t?0:t>255?255:t}function be(t){return t=math.round(t),0>t?0:t>360?360:t}function ne(t){return 0>t?0:t>1?1:t}function ve(t){return ee(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100*255:parseint(t,10))}function fe(t){return ne(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100:parsefloat(t))}function he(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function ge(t,e,n){return t+(e-t)*n}function we(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function ze(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function xe(t,e){zy&&ze(zy,e),zy=oy.put(t,zy||e.slice())}function ye(t,e){if(t){e=e||[];var n=oy.get(t);if(n)return ze(e,n);t+="";var i=t.replace(/ /g,"").tolowercase();if(i in ly)return ze(e,ly[i]),xe(t,e),e;if("#"!==i.charat(0)){var r=i.indexof("("),o=i.indexof(")");if(-1!==r&&o+1===i.length){var a=i.substr(0,r),s=i.substr(r+1,o-(r+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void we(e,0,0,0,1);l=fe(s.pop());case"rgb":return 3!==s.length?void we(e,0,0,0,1):(we(e,ve(s[0]),ve(s[1]),ve(s[2]),l),xe(t,e),e);case"hsla":return 4!==s.length?void we(e,0,0,0,1):(s[3]=fe(s[3]),ue(s,e),xe(t,e),e);case"hsl":return 3!==s.length?void we(e,0,0,0,1):(ue(s,e),xe(t,e),e);default:return}}we(e,0,0,0,1)}else{if(4===i.length){var u=parseint(i.substr(1),16);return u>=0&&4095>=u?(we(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),xe(t,e),e):void we(e,0,0,0,1)}if(7===i.length){var u=parseint(i.substr(1),16);return u>=0&&16777215>=u?(we(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),xe(t,e),e):void we(e,0,0,0,1)}}}}function ue(t,e){var n=(parsefloat(t[0])%360+360)%360/360,i=fe(t[1]),r=fe(t[2]),o=.5>=r?r*(i+1):r+i-r*i,a=2*r-o;return e=e||[],we(e,ee(255*he(a,o,n+1/3)),ee(255*he(a,o,n)),ee(255*he(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function qe(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=math.min(i,r,o),s=math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=.5>u?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}function je(t,e){var n=ye(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return en(n,4===n.length?"rgba":"rgb")}}function ke(t){var e=ye(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1):void 0}function $e(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=math.floor(i),o=math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=ee(ge(a[0],s[0],l)),n[1]=ee(ge(a[1],s[1],l)),n[2]=ee(ge(a[2],s[2],l)),n[3]=ne(ge(a[3],s[3],l)),n}}function je(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=math.floor(i),o=math.ceil(i),a=ye(e[r]),s=ye(e[o]),l=i-r,u=en([ee(ge(a[0],s[0],l)),ee(ge(a[1],s[1],l)),ee(ge(a[2],s[2],l)),ne(ge(a[3],s[3],l))],"rgba");return n?{color:u,leftindex:r,rightindex:o,value:i}:u}}function qe(t,e,n,i){return t=ye(t),t?(t=qe(t),null!=e&&(t[0]=be(e)),null!=n&&(t[1]=fe(n)),null!=i&&(t[2]=fe(i)),en(ue(t),"rgba")):void 0}function tn(t,e){return t=ye(t),t&&null!=e?(t[3]=ne(e),en(t,"rgba")):void 0}function en(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function nn(t,e){return t[e]}function rn(t,e,n){t[e]=n}function on(t,e,n){return(e-t)*n+t}function an(t,e,n){return n>.5?e:t}function sn(t,e,n,i,r){var o=t.length;if(1===r)for(var a=0;o>a;a++)i[a]=on(t[a],e[a],n);else for(var s=o&&t[0].length,a=0;o>a;a++)for(var l=0;s>l;l++)i[a][l]=on(t[a][l],e[a][l],n)}function ln(t,e,n){var i=t.length,r=e.length;if(i!==r){var o=i>r;if(o)t.length=r;else for(var a=i;r>a;a++)t.push(1===n?e[a]:ny.call(e[a]))}for(var s=t[0]&&t[0].length,a=0;al;l++)isnan(t[a][l])&&(t[a][l]=e[a][l])}function un(t,e,n){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===n){for(var r=0;i>r;r++)if(t[r]!==e[r])return!1}else for(var o=t[0].length,r=0;i>r;r++)for(var a=0;o>a;a++)if(t[r][a]!==e[r][a])return!1;return!0}function hn(t,e,n,i,r,o,a,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=cn(t[h],e[h],n[h],i[h],r,o,a);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=cn(t[h][d],e[h][d],n[h][d],i[h][d],r,o,a)}function cn(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function dn(t){if(d(t)){var e=t.length;if(d(t[0])){for(var n=[],i=0;e>i;i++)n.push(ny.call(t[i]));return n}return ny.call(t)}return t}function fn(t){return t[0]=math.floor(t[0]),t[1]=math.floor(t[1]),t[2]=math.floor(t[2]),"rgba("+t.join(",")+")"}function pn(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function gn(t,e,n,i,r,o){var a=t._getter,s=t._setter,l="spline"===e,u=i.length;if(u){var h,c=i[0].value,f=d(c),p=!1,g=!1,v=f?pn(i):0;i.sort(function(t,e){return t.time-e.time}),h=i[u-1].time;for(var m=[],y=[],x=i[0].value,_=!0,b=0;u>b;b++){m.push(i[b].time/h);var w=i[b].value;if(f&&un(w,x,v)||!f&&w===x||(_=!1),x=w,"string"==typeof w){var m=ye(w);m?(w=m,p=!0):g=!0}y.push(w)}if(o||!_){for(var s=y[u-1],b=0;u-1>b;b++)f?ln(y[b],s,v):!isnan(y[b])||isnan(s)||g||p||(y[b]=s);f&&ln(a(t._target,r),s,v);var t,i,c,a,d,k,p=0,l=0;if(p)var o=[0,0,0,0];var z=function(t,e){var n;if(0>e)n=0;else if(l>e){for(t=math.min(p+1,u-1),n=t;n>=0&&!(m[n]<=e);n--);n=math.min(n,u-2)}else{for(n=p;u>n&&!(m[n]>e);n++);n=math.min(n-1,u-2)}p=n,l=e;var i=m[n+1]-m[n];if(0!==i)if(i=(e-m[n])/i,l)if(a=y[n],c=y[0===n?n:n-1],d=y[n>u-2?u-1:n+1],k=y[n>u-3?u-1:n+2],f)hn(c,a,d,k,i,i*i,i*i*i,a(t,r),v);else{var o;if(p)o=hn(c,a,d,k,i,i*i,i*i*i,o,1),o=fn(o);else{if(g)return an(a,d,i);o=cn(c,a,d,k,i,i*i,i*i*i)}s(t,r,o)}else if(f)sn(y[n],y[n+1],i,a(t,r),v);else{var o;if(p)sn(y[n],y[n+1],i,o,1),o=fn(o);else{if(g)return an(y[n],y[n+1],i);o=on(y[n],y[n+1],i)}s(t,r,o)}},r=new re({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:z,ondestroy:n});return e&&"spline"!==e&&(r.easing=e),r}}}function vn(t,e,n,i,r,o,a,s){function l(){h--,h||o&&o()}w(i)?(o=r,r=i,i=0):b(r)?(o=r,r="linear",i=0):b(i)?(o=i,i=0):b(n)?(o=n,n=500):n||(n=500),t.stopanimation(),mn(t,"",t,e,n,i,s);var u=t.animators.slice(),h=u.length;h||o&&o();for(var c=0;c0&&t.animate(e,!1).when(null==r?500:r,s).delay(o||0)}function yn(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}function xn(t,e,n,i){0>n&&(t+=n,n=-n),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function _n(t){for(var e=0;t>=$y;)e|=1&t,t>>=1;return t+e}function bn(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;wn(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function wn(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function mn(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var o,a=t[i],s=e,l=i;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function sn(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;s>l&&o(t,e[n+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[n+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function tn(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;s>l&&o(t,e[n+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;s>l&&o(t,e[n+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function in(t,e){function n(t,e){l[c]=t,u[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]u[t+1])break;o(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]=r?a(i,r,o,h):s(i,r,o,h)))}function a(n,i,r,o){var a=0;for(a=0;i>a;a++)d[a]=t[n+a];var s=0,l=r,u=n;if(t[u++]=t[l++],0!==--o){if(1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];return void(t[u+o]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--o){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--i){p=!0;break}while(g>(c|f));if(p)break;do{if(c=tn(t[l],d,s,i,0,e),0!==c){for(a=0;c>a;a++)t[u+a]=d[s+a];if(u+=c,s+=c,i-=c,1>=i){p=!0;break}}if(t[u++]=t[l++],0===--o){p=!0;break}if(f=sn(d[s],t,l,o,0,e),0!==f){for(a=0;f>a;a++)t[u+a]=t[l+a];if(u+=f,l+=f,o-=f,0===o){p=!0;break}}if(t[u++]=d[s++],1===--i){p=!0;break}g--}while(c>=jy||f>=jy);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];t[u+o]=d[s]}else{if(0===i)throw new error;for(a=0;i>a;a++)t[u+a]=d[s+a]}}else for(a=0;i>a;a++)t[u+a]=d[s+a]}function s(n,i,r,o){var a=0;for(a=0;o>a;a++)d[a]=t[r+a];var s=n+i-1,l=o-1,u=r+o-1,c=0,f=0;if(t[u--]=t[s--],0!==--i){if(1===o){for(u-=i,s-=i,f=u+1,c=s+1,a=i-1;a>=0;a--)t[f+a]=t[c+a];return void(t[u]=d[l])}for(var p=h;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--i){m=!0;break}}else if(t[u--]=d[l--],v++,g=0,1===--o){m=!0;break}while(p>(g|v));if(m)break;do{if(g=i-tn(d[l],t,n,i,i-1,e),0!==g){for(u-=g,s-=g,i-=g,f=u+1,c=s+1,a=g-1;a>=0;a--)t[f+a]=t[c+a];if(0===i){m=!0;break}}if(t[u--]=d[l--],1===--o){m=!0;break}if(v=o-sn(t[s],d,0,o,o-1,e),0!==v){for(u-=v,l-=v,o-=v,f=u+1,c=l+1,a=0;v>a;a++)t[f+a]=d[c+a];if(1>=o){m=!0;break}}if(t[u--]=t[s--],0===--i){m=!0;break}p--}while(g>=jy||v>=jy);if(m)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===o){for(u-=i,s-=i,f=u+1,c=s+1,a=i-1;a>=0;a--)t[f+a]=t[c+a];t[u]=d[l]}else{if(0===o)throw new error;for(c=u-(o-1),a=0;o>a;a++)t[c+a]=d[a]}}else for(c=u-(o-1),a=0;o>a;a++)t[c+a]=d[a]}var l,u,h=jy,c=0,d=[];l=[],u=[],this.mergeruns=i,this.forcemergeruns=r,this.pushrun=n}function cn(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var o=0;if($y>r)return o=bn(t,n,i,e),void mn(t,n,i,n+o,e);var a=new in(t,e),s=_n(r);do{if(o=bn(t,n,i,e),s>o){var l=r;l>s&&(l=s),mn(t,n,n+l,n+o,e),o=l}a.pushrun(n,o),a.mergeruns(),r-=o,n+=o}while(0!==r);a.forcemergeruns()}}function an(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function dn(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=isnan(i)?0:i,r=isnan(r)?1:r,o=isnan(o)?0:o,a=isnan(a)?0:a;var s=t.createlineargradient(i,o,r,a);return s}function kn(t,e,n){var i=n.width,r=n.height,o=math.min(i,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(a=a*i+n.x,s=s*r+n.y,l*=o);var u=t.createradialgradient(a,s,0,a,s,l);return u}function pn(){return!1}function ln(t,e,n){var i=$m(),r=e.getwidth(),o=e.getheight(),a=i.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",i.setattribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}function on(t){if("string"==typeof t){var e=dx.get(t);return e&&e.image}return t}function zn(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!n)return e;var o=dx.get(t),a={hostel:n,cb:i,cbpayload:r};return o?(e=o.image,!en(e)&&o.pending.push(a)):(e=new image,e.onload=e.onerror=rn,dx.put(t,e.__cachedimgobj={image:e,pending:[a]}),e.src=e.__zrimagesrc=t),e}return t}return e}function rn(){var t=this.__cachedimgobj;this.onload=this.onerror=this.__cachedimgobj=null;for(var e=0;eo;o++)r=math.max(jn(i[o],e).width,r);return px>gx&&(px=0,fx={}),px++,fx[n]=r,r}function nn(t,e,n,i,r,o,a,s){return a?fn(t,e,n,i,r,o,a,s):vn(t,e,n,i,r,o,s)}function vn(t,e,n,i,r,o,a){var s=kn(t,e,r,o,a),l=bn(t,e);r&&(l+=r[1]+r[3]);var u=s.outerheight,h=hn(0,l,n),c=gn(0,u,i),d=new xn(h,c,l,u);return d.lineheight=s.lineheight,d}function fn(t,e,n,i,r,o,a,s){var l=$n(t,{rich:a,truncate:s,font:e,textalign:n,textpadding:r,textlineheight:o}),u=l.outerwidth,h=l.outerheight,c=hn(0,u,n),d=gn(0,h,i);return new xn(c,d,u,h)}function hn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function gn(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function wn(t,e,n){var i=e.x,r=e.y,o=e.height,a=e.width,s=o/2,l="left",u="top";switch(t){case"left":i-=n,r+=s,l="right",u="middle";break;case"right":i+=n+a,r+=s,u="middle";break;case"top":i+=a/2,r-=n,l="center",u="bottom";break;case"bottom":i+=a/2,r+=o+n,l="center";break;case"inside":i+=a/2,r+=s,l="center",u="middle";break;case"insideleft":i+=n,r+=s,u="middle";break;case"insideright":i+=a-n,r+=s,l="right",u="middle";break;case"insidetop":i+=a/2,r+=n,l="center";break;case"insidebottom":i+=a/2,r+=o-n,l="center",u="bottom";break;case"insidetopleft":i+=n,r+=n;break;case"insidetopright":i+=a-n,r+=n,l="right";break;case"insidebottomleft":i+=n,r+=o-n,u="bottom";break;case"insidebottomright":i+=a-n,r+=o-n,l="right",u="bottom"}return{x:i,y:r,textalign:l,textverticalalign:u}}function zn(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=xn(e,n,i,r);for(var a=0,s=o.length;s>a;a++)o[a]=yn(o[a],r);return o.join("\n")}function xn(t,e,n,i){i=a({},i),i.font=e;var n=d(n,"...");i.maxiterations=d(i.maxiterations,2);var r=i.minchar=d(i.minchar,0);i.cncharwidth=bn("国",e);var o=i.asccharwidth=bn("a",e);i.placeholder=d(i.placeholder,"");for(var s=t=math.max(0,t-1),l=0;r>l&&s>=o;l++)s-=o;var u=bn(n,e);return u>s&&(n="",u=0),s=t-u,i.ellipsis=n,i.ellipsiswidth=u,i.contentwidth=s,i.containerwidth=t,i}function yn(t,e){var n=e.containerwidth,i=e.font,r=e.contentwidth;if(!n)return"";var o=bn(t,i);if(n>=o)return t;for(var a=0;;a++){if(r>=o||a>=e.maxiterations){t+=e.ellipsis;break}var s=0===a?un(t,r,e.asccharwidth,e.cncharwidth):o>0?math.floor(t.length*r/o):0;t=t.substr(0,s),o=bn(t,i)}return""===t&&(t=e.placeholder),t}function un(t,e,n,i){for(var r=0,o=0,a=t.length;a>o&&e>r;o++){var s=t.charcodeat(o);r+=s>=0&&127>=s?n:i}return o}function qn(t){return bn("国",t)}function jn(t,e){return yx.measuretext(t,e)}function kn(t,e,n,i,r){null!=t&&(t+="");var o=d(i,qn(e)),a=t?t.split("\n"):[],s=a.length*o,l=s;if(n&&(l+=n[0]+n[2]),t&&r){var u=r.outerheight,h=r.outerwidth;if(null!=u&&l>u)t="",a=[];else if(null!=h)for(var c=xn(h-(n?n[1]+n[3]:0),e,r.ellipsis,{minchar:r.minchar,placeholder:r.placeholder}),d=0,f=a.length;f>d;d++)a[d]=yn(a[d],c)}return{lines:a,height:s,outerheight:l,lineheight:o}}function $n(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,r=vx.lastindex=0;null!=(i=vx.exec(t));){var o=i.index;o>r&&jn(n,t.substring(r,o)),jn(n,i[2],i[1]),r=vx.lastindex}rf)return{lines:[],width:0,height:0};x.textwidth=bn(x.text,w);var s=_.textwidth,t=null==s||"auto"===s;if("string"==typeof s&&"%"===s.charat(s.length-1))x.percentwidth=s,u.push(x),s=0;else{if(t){s=x.textwidth;var i=_.textbackgroundcolor,c=i&&i.image;c&&(c=on(c),en(c)&&(s=math.max(s,c.width*m/c.height)))}var a=b?b[1]+b[3]:0;s+=a;var p=null!=d?d-m:null;null!=p&&s>p&&(!t||a>p?(x.text="",x.textwidth=s=0):(x.text=zn(x.text,p-a,w,c.ellipsis,{minchar:c.minchar}),x.textwidth=bn(x.text,w),s=x.textwidth+a))}m+=x.width=s,_&&(v=math.max(v,x.lineheight))}g.width=m,g.lineheight=v,s+=v,l=math.max(l,m)}n.outerwidth=n.width=d(e.textwidth,l),n.outerheight=n.height=d(e.textheight,s),h&&(n.outerwidth+=h[1]+h[3],n.outerheight+=h[0]+h[2]);for(var p=0;pl&&(a+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?n=i=r=o=h:h instanceof array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),i+r>u&&(c=i+r,i*=u/c,r*=u/c),n+o>u&&(c=n+o,n*=u/c,o*=u/c),t.moveto(a+n,s),t.lineto(a+l-i,s),0!==i&&t.arc(a+l-i,s+i,i,-math.pi/2,0),t.lineto(a+l,s+u-r),0!==r&&t.arc(a+l-r,s+u-r,r,0,math.pi/2),t.lineto(a+o,s+u),0!==o&&t.arc(a+o,s+u-o,o,math.pi/2,math.pi),t.lineto(a,s+n),0!==n&&t.arc(a+n,s+n,n,math.pi,1.5*math.pi)}function ei(t){return ni(t),f(t.rich,ni),t}function ni(t){if(t){t.font=qn(t);var e=t.textalign;"middle"===e&&(e="center"),t.textalign=null==e||_x[e]?e:"left";var n=t.textverticalalign||t.textbaseline;"center"===n&&(n="middle"),t.textverticalalign=null==n||bx[n]?n:"top";var i=t.textpadding;i&&(t.textpadding=l(t.textpadding))}}function ii(t,e,n,i,r,o){i.rich?oi(t,e,n,i,r,o):ri(t,e,n,i,r,o)}function ri(t,e,n,i,r,o){var a,s=ui(i),l=!1,u=e.__attrcachedby===nx.plain_text;o!==ix?(o&&(a=o.style,l=!s&&u&&a),e.__attrcachedby=s?nx.none:nx.plain_text):u&&(e.__attrcachedby=nx.none);var h=i.font||xx;l&&h===(a.font||xx)||(e.font=h);var c=t.__computedfont;t.__stylefont!==h&&(t.__stylefont=h,c=t.__computedfont=e.font);var d=i.textpadding,f=i.textlineheight,p=t.__textcotentblock;(!p||t.__dirtytext)&&(p=t.__textcotentblock=kn(n,c,d,f,i.truncate));var g=p.outerheight,v=p.lines,m=p.lineheight,y=di(g,i,r),x=y.basex,_=y.basey,b=y.textalign||"left",w=y.textverticalalign;si(e,i,r,x,_);var m=gn(_,g,w),s=x,t=m;if(s||d){var i=bn(n,c),c=i;d&&(c+=d[1]+d[3]);var a=hn(x,c,b);s&&hi(t,e,i,a,m,c,g),d&&(s=mi(x,b,d),t+=d[0])}e.textalign=b,e.textbaseline="middle",e.globalalpha=i.opacity||1;for(var d=0;di&&(_=w[i],!_.textalign||"left"===_.textalign);)li(t,e,_,i,s,m,c,"left"),t-=_.width,c+=_.width,i++;for(;d>=0&&(_=w[d],"right"===_.textalign);)li(t,e,_,i,s,m,a,"right"),t-=_.width,a-=_.width,d--;for(c+=(o-(c-v)-(y-a)-t)/2;d>=i;)_=w[i],li(t,e,_,i,s,m,c+_.width/2,"center"),c+=_.width,i++;m+=s}}function si(t,e,n,i,r){if(n&&e.textrotation){var o=e.textorigin;"center"===o?(i=n.width/2+n.x,r=n.height/2+n.y):o&&(i=o[0]+n.x,r=o[1]+n.y),t.translate(i,r),t.rotate(-e.textrotation),t.translate(-i,-r)}}function li(t,e,n,i,r,o,a,s){var l=i.rich[n.stylename]||{};l.text=n.text;var u=n.textverticalalign,h=o+r/2;"top"===u?h=o+n.height/2:"bottom"===u&&(h=o+r-n.height/2),!n.islineholder&&ui(l)&&hi(t,e,l,"right"===s?a-n.width:"center"===s?a-n.width/2:a,h-n.height/2,n.width,n.height);var c=n.textpadding;c&&(a=mi(a,s,c),h-=n.height/2-c[2]-n.textheight/2),fi(e,"shadowblur",k(l.textshadowblur,i.textshadowblur,0)),fi(e,"shadowcolor",l.textshadowcolor||i.textshadowcolor||"transparent"),fi(e,"shadowoffsetx",k(l.textshadowoffsetx,i.textshadowoffsetx,0)),fi(e,"shadowoffsety",k(l.textshadowoffsety,i.textshadowoffsety,0)),fi(e,"textalign",s),fi(e,"textbaseline","middle"),fi(e,"font",n.font||xx);var d=pi(l.textstroke||i.textstroke,p),f=gi(l.textfill||i.textfill),p=d(l.textstrokewidth,i.textstrokewidth);d&&(fi(e,"linewidth",p),fi(e,"strokestyle",d),e.stroketext(n.text,a,h)),f&&(fi(e,"fillstyle",f),e.filltext(n.text,a,h))}function ui(t){return!!(t.textbackgroundcolor||t.textborderwidth&&t.textbordercolor)}function hi(t,e,n,i,r,o,a){var s=n.textbackgroundcolor,l=n.textborderwidth,u=n.textbordercolor,h=w(s);if(fi(e,"shadowblur",n.textboxshadowblur||0),fi(e,"shadowcolor",n.textboxshadowcolor||"transparent"),fi(e,"shadowoffsetx",n.textboxshadowoffsetx||0),fi(e,"shadowoffsety",n.textboxshadowoffsety||0),h||l&&u){e.beginpath();var c=n.textborderradius;c?ti(e,{x:i,y:r,width:o,height:a,r:c}):e.rect(i,r,o,a),e.closepath()}if(h)if(fi(e,"fillstyle",s),null!=n.fillopacity){var d=e.globalalpha;e.globalalpha=n.fillopacity*n.opacity,e.fill(),e.globalalpha=d}else e.fill();else if(m(s)){var f=s.image;f=zn(f,null,t,ci,s),f&&en(f)&&e.drawimage(f,i,r,o,a)}if(l&&u)if(fi(e,"linewidth",l),fi(e,"strokestyle",u),null!=n.strokeopacity){var d=e.globalalpha;e.globalalpha=n.strokeopacity*n.opacity,e.stroke(),e.globalalpha=d}else e.stroke()}function ci(t,e){e.image=t}function di(t,e,n){var i=e.x||0,r=e.y||0,o=e.textalign,a=e.textverticalalign;if(n){var s=e.textposition;if(s instanceof array)i=n.x+vi(s[0],n.width),r=n.y+vi(s[1],n.height);else{var l=wn(s,n,e.textdistance);i=l.x,r=l.y,o=o||l.textalign,a=a||l.textverticalalign}var u=e.textoffset;u&&(i+=u[0],r+=u[1])}return{basex:i,basey:r,textalign:o,textverticalalign:a}}function fi(t,e,n){return t[e]=ex(t,e,n),t[e] }function pi(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorstops?"#000":t}function gi(t){return null==t||"none"===t?null:t.image||t.colorstops?"#000":t}function vi(t,e){return"string"==typeof t?t.lastindexof("%")>=0?parsefloat(t)/100*e:parsefloat(t):t}function mi(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function yi(t,e){return null!=t&&(t||e.textbackgroundcolor||e.textborderwidth&&e.textbordercolor||e.textpadding)}function xi(t){t=t||{},yy.call(this,t);for(var e in t)t.hasownproperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new ox(t.style,this),this._rect=null,this.__clippaths=[]}function _i(t){xi.call(this,t)}function bi(t){return parseint(t,10)}function wi(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function mi(t,e,n){return kx.copy(t.getboundingrect()),t.transform&&kx.applytransform(t.transform),px.width=e,px.height=n,!kx.intersect(px)}function si(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;ni;i++){var o=n[i];!t.emphasis[e].hasownproperty(o)&&t[e].hasownproperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function vi(t){return!qx(t)||jx(t)||t instanceof date?t:t.value}function fi(t){return qx(t)&&!(t instanceof array)}function hi(t,e){e=(e||[]).slice();var n=p(t||[],function(t){return{exist:t}});return ux(e,function(t,i){if(qx(t)){for(var r=0;r=n.length&&n.push({option:t})}}),n}function gi(t){var e=n();ux(t,function(t){var n=t.exist;n&&e.set(n.id,t)}),ux(t,function(t){var n=t.option;o(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyinfo&&(t.keyinfo={})}),ux(t,function(t,n){var i=t.exist,r=t.option,o=t.keyinfo;if(qx(r)){if(o.name=null!=r.name?r.name+"":i?i.name:kx+n,i)o.id=i.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do o.id="\x00"+o.name+"\x00"+a++;while(e.get(o.id))}e.set(o.id,t)}})}function wi(t){var e=t.name;return!(!e||!e.indexof(kx))}function zi(t){return qx(t)&&t.id&&0===(t.id+"").indexof("\x00_ec_\x00")}function xi(t,e){function n(t,e,n){for(var i=0,r=t.length;r>i;i++)for(var o=t[i].seriesid,a=bi(t[i].dataindex),s=n&&n[o],l=0,u=a.length;u>l;l++){var h=a[l];s&&s[h]?s[h]=null:(e[o]||(e[o]={}))[h]=1}}function i(t,e){var n=[];for(var r in t)if(t.hasownproperty(r)&&null!=t[r])if(e)n.push(+r);else{var o=i(t[r],!0);o.length&&n.push({seriesid:r,dataindex:o})}return n}var r={},o={};return n(t||[],r),n(e||[],o,r),[i(r),i(o)]}function yi(t,e){return null!=e.dataindexinside?e.dataindexinside:null!=e.dataindex?_(e.dataindex)?p(e.dataindex,function(e){return t.indexofrawindex(e)}):t.indexofrawindex(e.dataindex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexofname(e)}):t.indexofname(e.name):void 0}function ui(){var t="__\x00ec_inner_"+jx++ +"_"+math.random().tofixed(5);return function(e){return e[t]||(e[t]={})}}function qi(t,e,n){if(w(e)){var i={};i[e+"index"]=0,e=i}var r=n&&n.defaultmaintype;!r||ji(e,r+"index")||ji(e,r+"id")||ji(e,r+"name")||(e[r+"index"]=0);var o={};return ux(e,function(i,r){var i=e[r];if("dataindex"===r||"dataindexinside"===r)return void(o[r]=i);var a=r.match(/^(\w+)(index|id|name)$/)||[],s=a[1],l=(a[2]||"").tolowercase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includemaintypes&&u(n.includemaintypes,s)<0)){var h={maintype:s};("index"!==l||"all"!==i)&&(h[l]=i);var c=t.querycomponents(h);o[s+"models"]=c,o[s+"model"]=c[0]}}),o}function ji(t,e){return t&&t.hasownproperty(e)}function ki(t,e,n){t.setattribute?t.setattribute(e,n):t[e]=n}function $i(t,e){return t.getattribute?t.getattribute(e):t[e]}function ji(t){return"auto"===t?fm.domsupported?"html":"richtext":t||"html"}function qi(t){var e={main:"",sub:""};return t&&(t=t.split(qx),e.main=t[0]||"",e.sub=t[1]||""),e}function tr(t){o(/^[a-za-z0-9_]+([.][a-za-z0-9_]+)?$/.test(t),'componenttype "'+t+'" illegal')}function er(t){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(n.prototype,t),n.extend=this.extend,n.supercall=ir,n.superapply=rr,h(n,this),n.superclass=e,n}}function nr(t){var e=["__\x00is_clz",e_++,math.random().tofixed(3)].join("_");t.prototype[e]=!0,t.isinstance=function(t){return!(!t||!t[e])}}function ir(t,e){var n=p(arguments,2);return this.superclass.prototype[e].apply(t,n)}function rr(t,e,n){return this.superclass.prototype[e].apply(t,n)}function or(t,e){function n(t){var e=i[t.main];return e&&e[t_]||(e=i[t.main]={},e[t_]=!0),e}e=e||{};var i={};if(t.registerclass=function(t,e){if(e)if(tr(e),e=qi(e),e.sub){if(e.sub!==t_){var r=n(e);r[e.sub]=t}}else i[e.main]=t;return t},t.getclass=function(t,e,n){var r=i[t];if(r&&r[t_]&&(r=e?r[e]:null),n&&!r)throw new error(e?"component "+t+"."+(e||"")+" not exists. load it first.":t+".type should be specified.");return r},t.getclassesbymaintype=function(t){t=qi(t);var e=[],n=i[t.main];return n&&n[t_]?f(n,function(t,n){n!==t_&&e.push(t)}):e.push(n),e},t.hasclass=function(t){return t=qi(t),!!i[t.main]},t.getallclassmaintypes=function(){var t=[];return f(i,function(e,n){t.push(n)}),t},t.hassubtypes=function(t){t=qi(t);var e=i[t.main];return e&&e[t_]},t.parseclasstype=qi,e.registerwhenextend){var r=t.extend;r&&(t.extend=function(e){var n=r.call(this,e);return t.registerclass(n,e.type)})}return t}function ar(t){return t>-u_&&u_>t}function sr(t){return t>u_||-u_>t}function lr(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function ur(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function hr(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,d=l*l-3*s*u,f=0;if(ar(h)&&ar(c))if(ar(s))o[0]=0;else{var p=-l/s;p>=0&&1>=p&&(o[f++]=p)}else{var g=c*c-4*h*d;if(ar(g)){var v=c/h,p=-s/a+v,m=-v/2;p>=0&&1>=p&&(o[f++]=p),m>=0&&1>=m&&(o[f++]=m)}else if(g>0){var y=l_(g),x=h*s+1.5*a*(-c+y),_=h*s+1.5*a*(-c-y);x=0>x?-s_(-x,d_):s_(x,d_),_=0>_?-s_(-_,d_):s_(_,d_);var p=(-s-(x+_))/(3*a);p>=0&&1>=p&&(o[f++]=p)}else{var b=(2*h*s-3*a*c)/(2*l_(h*h*h)),w=math.acos(b)/3,m=l_(h),s=math.cos(w),p=(-s-2*m*s)/(3*a),m=(-s+m*(s+c_*math.sin(w)))/(3*a),t=(-s+m*(s-c_*math.sin(w)))/(3*a);p>=0&&1>=p&&(o[f++]=p),m>=0&&1>=m&&(o[f++]=m),t>=0&&1>=t&&(o[f++]=t)}}return f}function cr(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(ar(a)){if(sr(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(ar(h))r[0]=-o/(2*a);else if(h>0){var c=l_(h),u=(-o+c)/(2*a),d=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function dr(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function fr(t,e,n,i,r,o,a,s,l,u,h){var c,d,f,p,g,v=.005,m=1/0;f_[0]=l,f_[1]=u;for(var y=0;1>y;y+=.05)p_[0]=lr(t,n,r,a,y),p_[1]=lr(e,i,o,s,y),p=oy(f_,p_),m>p&&(c=y,m=p);m=1/0;for(var x=0;32>x&&!(h_>v);x++)d=c-v,f=c+v,p_[0]=lr(t,n,r,a,d),p_[1]=lr(e,i,o,s,d),p=oy(p_,f_),d>=0&&m>p?(c=d,m=p):(g_[0]=lr(t,n,r,a,f),g_[1]=lr(e,i,o,s,f),g=oy(g_,f_),1>=f&&m>g?(c=f,m=g):v*=.5);return h&&(h[0]=lr(t,n,r,a,c),h[1]=lr(e,i,o,s,c)),l_(m)}function pr(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function gr(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function vr(t,e,n,i,r){var o=t-2*e+n,a=2*(e-t),s=t-i,l=0;if(ar(o)){if(sr(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(ar(h)){var u=-a/(2*o);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=l_(h),u=(-a+c)/(2*o),d=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function mr(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function yr(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function xr(t,e,n,i,r,o,a,s,l){var u,h=.005,c=1/0;f_[0]=a,f_[1]=s;for(var d=0;1>d;d+=.05){p_[0]=pr(t,n,r,d),p_[1]=pr(e,i,o,d);var f=oy(f_,p_);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(h_>h);p++){var g=u-h,v=u+h;p_[0]=pr(t,n,r,g),p_[1]=pr(e,i,o,g);var f=oy(p_,f_);if(g>=0&&c>f)u=g,c=f;else{g_[0]=pr(t,n,r,v),g_[1]=pr(e,i,o,v);var m=oy(g_,f_);1>=v&&c>m?(u=v,c=m):h*=.5}}return l&&(l[0]=pr(t,n,r,u),l[1]=pr(e,i,o,u)),l_(c)}function _r(t,e,n){if(0!==t.length){var i,r=t[0],o=r[0],a=r[0],s=r[1],l=r[1];for(i=1;ih;h++){var p=d(t,n,r,a,s_[h]);l[0]=v_(p,l[0]),u[0]=m_(p,u[0])}for(f=c(e,i,o,s,t_),h=0;f>h;h++){var g=d(e,i,o,s,t_[h]);l[1]=v_(g,l[1]),u[1]=m_(g,u[1])}l[0]=v_(t,l[0]),u[0]=m_(t,u[0]),l[0]=v_(a,l[0]),u[0]=m_(a,u[0]),l[1]=v_(e,l[1]),u[1]=m_(e,u[1]),l[1]=v_(s,l[1]),u[1]=m_(s,u[1])}function mr(t,e,n,i,r,o,a,s){var l=mr,u=pr,h=m_(v_(l(t,n,r),1),0),c=m_(v_(l(e,i,o),1),0),d=u(t,n,r,h),f=u(e,i,o,c);a[0]=v_(t,r,d),a[1]=v_(e,o,f),s[0]=m_(t,r,d),s[1]=m_(e,o,f)}function sr(t,e,n,i,r,o,a,s,l){var u=ae,h=se,c=math.abs(r-o);if(1e-4>c%__&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(b_[0]=x_(r)*n+t,b_[1]=y_(r)*i+e,w_[0]=x_(o)*n+t,w_[1]=y_(o)*i+e,u(s,b_,w_),h(l,b_,w_),r%=__,0>r&&(r+=__),o%=__,0>o&&(o+=__),r>o&&!a?o+=__:o>r&&a&&(r+=__),a){var d=o;o=r,r=d}for(var f=0;o>f;f+=math.pi/2)f>r&&(m_[0]=x_(f)*n+t,m_[1]=y_(f)*i+e,u(s,m_,s),h(l,m_,l))}function tr(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0,u=t;if(a>e+s&&a>i+s||e-s>a&&i-s>a||o>t+s&&o>n+s||t-s>o&&n-s>o)return!1;if(t===n)return math.abs(o-t)<=s/2;l=(e-i)/(t-n),u=(t*i-n*e)/(t-n);var h=l*o-a+u,c=h*h/(l*l+1);return s/2*s/2>=c}function ir(t,e,n,i,r,o,a,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>i+c&&h>o+c&&h>s+c||e-c>h&&i-c>h&&o-c>h&&s-c>h||u>t+c&&u>n+c&&u>r+c&&u>a+c||t-c>u&&n-c>u&&r-c>u&&a-c>u)return!1;var d=fr(t,e,n,i,r,o,a,s,u,h,null);return c/2>=d}function cr(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;if(l>e+u&&l>i+u&&l>o+u||e-u>l&&i-u>l&&o-u>l||s>t+u&&s>n+u&&s>r+u||t-u>s&&n-u>s&&r-u>s)return!1;var h=xr(t,e,n,i,r,o,s,l,null);return u/2>=h}function ar(t){return t%=v_,0>t&&(t+=v_),t}function dr(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var h=math.sqrt(s*s+l*l);if(h-u>n||n>h+u)return!1;if(math.abs(i-r)%f_<1e-4)return!0;if(o){var c=i;i=ar(r),r=ar(c)}else i=ar(i),r=ar(r);i>r&&(r+=f_);var d=math.atan2(l,s);return 0>d&&(d+=f_),d>=i&&r>=d||d+f_>=i&&r>=d+f_}function kr(t,e,n,i,r,o){if(o>e&&o>i||e>o&&i>o)return 0;if(i===e)return 0;var a=e>i?1:-1,s=(o-e)/(i-e);(1===s||0===s)&&(a=e>i?.5:-.5);var l=s*(n-t)+t;return l===r?1/0:l>r?a:0}function pr(t,e){return math.abs(t-e)e&&u>i&&u>o&&u>s||e>u&&i>u&&o>u&&s>u)return 0;var h=hr(e,i,o,s,u,z_);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var v=z_[g],m=0===v||1===v?.5:1,y=lr(t,n,r,a,v);l>y||(0>p&&(p=cr(e,i,o,s,x_),x_[1]1&&lr(),c=lr(e,i,o,s,x_[0]),p>1&&(d=lr(e,i,o,s,x_[1]))),f+=2===p?vc?m:-m:vd?m:-m:d>s?m:-m:vc?m:-m:c>s?m:-m)}return f}function zr(t,e,n,i,r,o,a,s){if(s>e&&s>i&&s>o||e>s&&i>s&&o>s)return 0;var l=vr(e,i,o,s,z_);if(0===l)return 0;var u=mr(e,i,o);if(u>=0&&1>=u){for(var h=0,c=pr(e,i,o,u),d=0;l>d;d++){var f=0===z_[d]||1===z_[d]?.5:1,p=pr(t,n,r,z_[d]);a>p||(h+=z_[d]c?f:-f:c>o?f:-f)}return h}var f=0===z_[0]||1===z_[0]?.5:1,p=pr(t,n,r,z_[0]);return a>p?0:e>o?f:-f}function rr(t,e,n,i,r,o,a,s){if(s-=e,s>n||-n>s)return 0;var l=math.sqrt(n*n-s*s);z_[0]=-l,z_[1]=l;var u=math.abs(i-r);if(1e-4>u)return 0;if(1e-4>u%g_){i=0,r=g_;var h=o?1:-1;return a>=z_[0]+t&&a<=z_[1]+t?h:0}if(o){var l=i;i=ar(r),r=ar(l)}else i=ar(i),r=ar(r);i>r&&(r+=g_);for(var c=0,d=0;2>d;d++){var f=z_[d];if(f+t>a){var p=math.atan2(s,f),h=o?1:-1;0>p&&(p=g_+p),(p>=i&&r>=p||p+g_>=i&&r>=p+g_)&&(p>math.pi/2&&p<1.5*math.pi&&(h=-h),c+=h)}}return c}function er(t,e,n,i,r){for(var o=0,a=0,s=0,l=0,u=0,h=0;h1&&(n||(o+=kr(a,s,l,u,i,r))),1===h&&(a=t[h],s=t[h+1],l=a,u=s),c){case h_.m:l=t[h++],u=t[h++],a=l,s=u;break;case h_.l:if(n){if(tr(a,s,t[h],t[h+1],e,i,r))return!0}else o+=kr(a,s,t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case h_.c:if(n){if(ir(a,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else o+=or(a,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case h_.q:if(n){if(cr(a,s,t[h++],t[h++],t[h],t[h+1],e,i,r))return!0}else o+=zr(a,s,t[h++],t[h++],t[h],t[h+1],i,r)||0;a=t[h++],s=t[h++];break;case h_.a:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],v=t[h++],m=t[h++];h+=1;var y=1-t[h++],x=math.cos(v)*p+d,_=math.sin(v)*g+f;h>1?o+=kr(a,s,x,_,i,r):(l=x,u=_);var b=(i-d)*g/p+d;if(n){if(dr(d,f,g,v,v+m,y,e,b,r))return!0}else o+=rr(d,f,g,v,v+m,y,b,r);a=math.cos(v+m)*p+d,s=math.sin(v+m)*g+f;break;case h_.r:l=a=t[h++],u=s=t[h++];var w=t[h++],m=t[h++],x=l+w,_=u+m;if(n){if(tr(l,u,x,u,e,i,r)||tr(x,u,x,_,e,i,r)||tr(x,_,l,_,e,i,r)||tr(l,_,l,u,e,i,r))return!0}else o+=kr(x,u,x,_,i,r),o+=kr(l,_,l,u,i,r);break;case h_.z:if(n){if(tr(a,s,l,u,e,i,r))return!0}else o+=kr(a,s,l,u,i,r);a=l,s=u}}return n||pr(s,u)||(o+=kr(a,s,l,u,i,r)||0),0!==o}function br(t,e,n){return er(t,0,!1,e,n)}function nr(t,e,n,i){return er(t,e,!0,n,i)}function vr(t){xi.call(this,t),this.path=null}function fr(t,e,n,i,r,o,a,s,l,u,h){var c=l*(ib/180),d=nb(c)*(t-n)/2+eb(c)*(e-i)/2,f=-1*eb(c)*(t-n)/2+nb(c)*(e-i)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=tb(p),s*=tb(p));var g=(r===o?-1:1)*tb((a*a*s*s-a*a*f*f-s*s*d*d)/(a*a*f*f+s*s*d*d))||0,v=g*a*f/s,m=g*-s*d/a,y=(t+n)/2+nb(c)*v-eb(c)*m,x=(e+i)/2+eb(c)*v+nb(c)*m,_=ab([1,0],[(d-v)/a,(f-m)/s]),b=[(d-v)/a,(f-m)/s],w=[(-1*d-v)/a,(-1*f-m)/s],m=ab(b,w);ob(b,w)<=-1&&(m=ib),ob(b,w)>=1&&(m=0),0===o&&m>0&&(m-=2*ib),1===o&&0>m&&(m+=2*ib),h.adddata(u,y,x,a,s,_,m,c,o)}function hr(t){if(!t)return new n_;for(var e,n=0,i=0,r=n,o=i,a=new n_,s=n_.cmd,l=t.match(sb),u=0;ug;g++)f[g]=parsefloat(f[g]);for(var v=0;p>v;){var m,y,x,_,b,w,m,s=n,t=i;switch(d){case"l":n+=f[v++],i+=f[v++],h=s.l,a.adddata(h,n,i);break;case"l":n=f[v++],i=f[v++],h=s.l,a.adddata(h,n,i);break;case"m":n+=f[v++],i+=f[v++],h=s.m,a.adddata(h,n,i),r=n,o=i,d="l";break;case"m":n=f[v++],i=f[v++],h=s.m,a.adddata(h,n,i),r=n,o=i,d="l";break;case"h":n+=f[v++],h=s.l,a.adddata(h,n,i);break;case"h":n=f[v++],h=s.l,a.adddata(h,n,i);break;case"v":i+=f[v++],h=s.l,a.adddata(h,n,i);break;case"v":i=f[v++],h=s.l,a.adddata(h,n,i);break;case"c":h=s.c,a.adddata(h,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),n=f[v-2],i=f[v-1];break;case"c":h=s.c,a.adddata(h,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i),n+=f[v-2],i+=f[v-1];break;case"s":m=n,y=i;var i=a.len(),c=a.data;e===s.c&&(m+=n-c[i-4],y+=i-c[i-3]),h=s.c,s=f[v++],t=f[v++],n=f[v++],i=f[v++],a.adddata(h,m,y,s,t,n,i);break;case"s":m=n,y=i;var i=a.len(),c=a.data;e===s.c&&(m+=n-c[i-4],y+=i-c[i-3]),h=s.c,s=n+f[v++],t=i+f[v++],n+=f[v++],i+=f[v++],a.adddata(h,m,y,s,t,n,i);break;case"q":s=f[v++],t=f[v++],n=f[v++],i=f[v++],h=s.q,a.adddata(h,s,t,n,i);break;case"q":s=f[v++]+n,t=f[v++]+i,n+=f[v++],i+=f[v++],h=s.q,a.adddata(h,s,t,n,i);break;case"t":m=n,y=i;var i=a.len(),c=a.data;e===s.q&&(m+=n-c[i-4],y+=i-c[i-3]),n=f[v++],i=f[v++],h=s.q,a.adddata(h,m,y,n,i);break;case"t":m=n,y=i;var i=a.len(),c=a.data;e===s.q&&(m+=n-c[i-4],y+=i-c[i-3]),n+=f[v++],i+=f[v++],h=s.q,a.adddata(h,m,y,n,i);break;case"a":x=f[v++],_=f[v++],b=f[v++],w=f[v++],m=f[v++],s=n,t=i,n=f[v++],i=f[v++],h=s.a,fr(s,t,n,i,w,m,x,_,b,h,a);break;case"a":x=f[v++],_=f[v++],b=f[v++],w=f[v++],m=f[v++],s=n,t=i,n+=f[v++],i+=f[v++],h=s.a,fr(s,t,n,i,w,m,x,_,b,h,a)}}("z"===d||"z"===d)&&(h=s.z,a.adddata(h),n=r,i=o),e=h}return a.tostatic(),a}function gr(t,e){var n=hr(t);return e=e||{},e.buildpath=function(t){if(t.setdata){t.setdata(n.data);var e=t.getcontext();e&&t.rebuildpath(e)}else{var e=t;n.rebuildpath(e)}},e.applytransform=function(t){q_(n,t),this.dirty(!0)},e}function wr(t,e){return new vr(gr(t,e))}function zr(t,e){return vr.extend(gr(t,e))}function xr(t,e){for(var n=[],i=t.length,r=0;i>r;r++){var o=t[r];o.path||o.createpathproxy(),o.__dirtypath&&o.buildpath(o.path,o.shape,!0),n.push(o.path)}var a=new vr(e);return a.createpathproxy(),a.buildpath=function(t){t.appendpath(n);var e=t.getcontext();e&&t.rebuildpath(e)},a}function yr(t,e,n,i,r,o,a){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*a+(-3*(e-n)-2*s-l)*o+s*r+e}function ur(t,e,n){var i=e.points,r=e.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var o=vb(i,r,n,e.smoothconstraint);t.moveto(i[0][0],i[0][1]);for(var a=i.length,s=0;(n?a:a-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=i[(s+1)%a];t.beziercurveto(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(i=gb(i,n)),t.moveto(i[0][0],i[0][1]);for(var s=1,c=i.length;c>s;s++)t.lineto(i[s][0],i[s][1])}n&&t.closepath()}}function qr(t,e,n){var i=n&&n.linewidth;if(e&&i){var r=e.x1,o=e.x2,a=e.y1,s=e.y2;xb(2*r)===xb(2*o)?t.x1=t.x2=kr(r,i,!0):(t.x1=r,t.x2=o),xb(2*a)===xb(2*s)?t.y1=t.y2=kr(a,i,!0):(t.y1=a,t.y2=s)}}function jr(t,e,n){var i=n&&n.linewidth;if(e&&i){var r=e.x,o=e.y,a=e.width,s=e.height;t.x=kr(r,i,!0),t.y=kr(o,i,!0),t.width=math.max(kr(r+a,i,!1)-t.x,0===a?0:1),t.height=math.max(kr(o+s,i,!1)-t.y,0===s?0:1)}}function kr(t,e,n){var i=xb(2*t);return(i+xb(e))%2===0?i/2:(i+(n?1:-1))/2}function $r(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?ur:lr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?ur:lr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?gr:pr)(t.x1,t.cpx1,t.x2,e),(n?gr:pr)(t.y1,t.cpy1,t.y2,e)]}function jr(t){xi.call(this,t),this._displayables=[],this._temporarydisplayables=[],this._cursor=0,this.notclear=!0}function qr(t){return vr.extend(t)}function to(t,e){return zr(t,e)}function eo(t,e,n,i){var r=wr(t,e);return n&&("center"===i&&(n=io(n,r.getboundingrect())),ro(r,n)),r}function no(t,e,n){var i=new _i({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setstyle(io(e,r))}}});return i}function io(t,e){var n,i=e.width/e.height,r=t.height*i;r<=t.width?n=t.height:(r=t.width,n=r/i);var o=t.x+t.width/2,a=t.y+t.height/2;return{x:o-r/2,y:a-n/2,width:r,height:n}}function ro(t,e){if(t.applytransform){var n=t.getboundingrect(),i=n.calculatetransform(e);t.applytransform(i)}}function oo(t){var e=t.shape,n=t.style.linewidth;return lb(2*e.x1)===lb(2*e.x2)&&(e.x1=e.x2=so(e.x1,n,!0)),lb(2*e.y1)===lb(2*e.y2)&&(e.y1=e.y2=so(e.y1,n,!0)),t}function ao(t){var e=t.shape,n=t.style.linewidth,i=e.x,r=e.y,o=e.width,a=e.height;return e.x=so(e.x,n,!0),e.y=so(e.y,n,!0),e.width=math.max(so(i+o,n,!1)-e.x,0===o?0:1),e.height=math.max(so(r+a,n,!1)-e.y,0===a?0:1),t}function so(t,e,n){var i=lb(2*t);return(i+lb(e))%2===0?i/2:(i+(n?1:-1))/2}function lo(t){return null!=t&&"none"!==t}function uo(t){if("string"!=typeof t)return t;var e=nb.get(t);return e||(e=je(t,-.1),1e4>vb&&(nb.set(t,e),vb++)),e}function ho(t){if(t.__hoverstldirty){t.__hoverstldirty=!1;var e=t.__hoverstl;if(!e)return void(t.__cachednormalstl=t.__cachednormalz2=null);var n=t.__cachednormalstl={};t.__cachednormalz2=t.z2;var i=t.style;for(var r in e)null!=e[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}}function co(t){var e=t.__hoverstl;if(e&&!t.__highlighted){var n=t.usehoverlayer;t.__highlighted=n?"layer":"plain";var i=t.__zr;if(i||!n){var r=t,o=t.style;n&&(r=i.addhover(t),o=r.style),lo(o),n||ho(r),o.extendfrom(e),fo(o,e,"fill"),fo(o,e,"stroke"),po(o),n||(t.dirty(!1),t.z2+=eb)}}}function fo(t,e,n){!lo(e[n])&&lo(t[n])&&(t[n]=uo(t[n]))}function po(t){var e=t.__highlighted;if(e)if(t.__highlighted=!1,"layer"===e)t.__zr&&t.__zr.removehover(t);else if(e){var n=t.style,i=t.__cachednormalstl;i&&(lo(n),t.setstyle(i),po(n));var r=t.__cachednormalz2;null!=r&&t.z2-r===eb&&(t.z2=r)}}function go(t,e){t.isgroup?t.traverse(function(t){!t.isgroup&&e(t)}):e(t)}function vo(t,e){e=t.__hoverstl=e!==!1&&(e||{}),t.__hoverstldirty=!0,t.__highlighted&&(t.__cachednormalstl=null,po(t),co(t))}function mo(t){return t&&t.__isemphasisentered}function yo(t){this.__hoversilentontouch&&t.zrbytouch||!this.__isemphasisentered&&go(this,co)}function xo(t){this.__hoversilentontouch&&t.zrbytouch||!this.__isemphasisentered&&go(this,po)}function _o(){this.__isemphasisentered=!0,go(this,co)}function bo(){this.__isemphasisentered=!1,go(this,po)}function wo(t,e,n){t.isgroup?t.traverse(function(t){!t.isgroup&&vo(t,t.hoverstyle||e)}):vo(t,t.hoverstyle||e),mo(t,n)}function mo(t,e){var n=e===!1;if(t.__hoversilentontouch=null!=e&&e.hoversilentontouch,!n||t.__hoverstyletrigger){var i=n?"off":"on";t[i]("mouseover",yo)[i]("mouseout",xo),t[i]("emphasis",_o)[i]("normal",bo),t.__hoverstyletrigger=!n}}function so(t,e,n,i,r,o,a){r=r||rb;var s,l=r.labelfetcher,u=r.labeldataindex,h=r.labeldimindex,c=n.getshallow("show"),d=i.getshallow("show");(c||d)&&(l&&(s=l.getformattedlabel(u,"normal",null,h)),null==s&&(s=b(r.defaulttext)?r.defaulttext(u,r):r.defaulttext));var f=c?s:null,p=d?d(l?l.getformattedlabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(to(t,n,o,r),to(e,i,a,r,!0)),t.text=f,e.text=p}function to(t,e,n,i,r){return co(t,e,i,r),n&&a(t,n),t}function io(t,e,n){var i,r={isrecttext:!0};n===!1?i=!0:r.autocolor=n,co(t,e,r,i)}function co(t,e,n,i){if(n=n||rb,n.isrecttext){var r=e.getshallow("position")||(i?null:"inside");"outside"===r&&(r="top"),t.textposition=r,t.textoffset=e.getshallow("offset");var o=e.getshallow("rotate");null!=o&&(o*=math.pi/180),t.textrotation=o,t.textdistance=d(e.getshallow("distance"),i?null:5)}var a,s=e.ecmodel,l=s&&s.option.textstyle,u=ao(e);if(u){a={};for(var h in u)if(u.hasownproperty(h)){var c=e.getmodel(["rich",h]);do(a[h]={},c,l,n,i)}}return t.rich=a,do(t,e,l,n,i,!0),n.forcerich&&!n.textstyle&&(n.textstyle={}),t}function ao(t){for(var e;t&&t!==t.ecmodel;){var n=(t.option||rb).rich;if(n){e=e||{};for(var i in n)n.hasownproperty(i)&&(e[i]=1)}t=t.parentmodel}return e}function do(t,e,n,i,r,o){n=!r&&n||rb,t.textfill=ko(e.getshallow("color"),i)||n.color,t.textstroke=ko(e.getshallow("textbordercolor"),i)||n.textbordercolor,t.textstrokewidth=d(e.getshallow("textborderwidth"),n.textborderwidth),t.insiderawtextposition=t.textposition,r||(o&&(t.insiderollbackopt=i,po(t)),null==t.textfill&&(t.textfill=i.autocolor)),t.fontstyle=e.getshallow("fontstyle")||n.fontstyle,t.fontweight=e.getshallow("fontweight")||n.fontweight,t.fontsize=e.getshallow("fontsize")||n.fontsize,t.fontfamily=e.getshallow("fontfamily")||n.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"),o&&i.disablebox||(t.textbackgroundcolor=ko(e.getshallow("backgroundcolor"),i),t.textpadding=e.getshallow("padding"),t.textbordercolor=ko(e.getshallow("bordercolor"),i),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")||n.textshadowcolor,t.textshadowblur=e.getshallow("textshadowblur")||n.textshadowblur,t.textshadowoffsetx=e.getshallow("textshadowoffsetx")||n.textshadowoffsetx,t.textshadowoffsety=e.getshallow("textshadowoffsety")||n.textshadowoffsety}function ko(t,e){return"auto"!==t?t:e&&e.autocolor?e.autocolor:null}function po(t){var e=t.insiderollbackopt;if(e&&null==t.textfill){var n,i=e.useinsidestyle,r=t.insiderawtextposition,o=e.autocolor;i!==!1&&(i===!0||e.isrecttext&&r&&"string"==typeof r&&r.indexof("inside")>=0)?(n={textfill:null,textstroke:t.textstroke,textstrokewidth:t.textstrokewidth},t.textfill="#fff",null==t.textstroke&&(t.textstroke=o,null==t.textstrokewidth&&(t.textstrokewidth=2))):null!=o&&(n={textfill:null},t.textfill=o),n&&(t.insiderollback=n)}}function lo(t){var e=t.insiderollback;e&&(t.textfill=e.textfill,t.textstroke=e.textstroke,t.textstrokewidth=e.textstrokewidth,t.insiderollback=null)}function oo(t,e){var n=e||e.getmodel("textstyle");return z([t.fontstyle||n&&n.getshallow("fontstyle")||"",t.fontweight||n&&n.getshallow("fontweight")||"",(t.fontsize||n&&n.getshallow("fontsize")||12)+"px",t.fontfamily||n&&n.getshallow("fontfamily")||"sans-serif"].join(" "))}function zo(t,e,n,i,r,o){"function"==typeof r&&(o=r,r=null);var a=i&&i.isanimationenabled();if(a){var s=t?"update":"",l=i.getshallow("animationduration"+s),u=i.getshallow("animationeasing"+s),h=i.getshallow("animationdelay"+s);"function"==typeof h&&(h=h(r,i.getanimationdelayparams?i.getanimationdelayparams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateto(n,l,h||0,u,o,!!o):(e.stopanimation(),e.attr(n),o&&o())}else e.stopanimation(),e.attr(n),o&&o()}function ro(t,e,n,i,r){zo(!0,t,e,n,i,r)}function eo(t,e,n,i,r){zo(!1,t,e,n,i,r)}function bo(t,e){for(var n=ie([]);t&&t!==e;)ae(n,t.getlocaltransform(),n),t=t.parent;return n}function no(t,e,n){return e&&!d(e)&&(e=by.getlocaltransform(e)),n&&(e=le([],e)),oe([],t,e)}function vo(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=no(o,e,n),math.abs(o[0])>math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function fo(t,e,n){function i(t){var e={};return t.traverse(function(t){!t.isgroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:w(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var o=i(t);e.traverse(function(t){if(!t.isgroup&&t.anid){var e=o[t.anid];if(e){var i=r(t);t.attr(r(e)),ro(t,i,n,t.dataindex)}}})}}function ho(t,e){return p(t,function(t){var n=t[0];n=ob(n,e.x),n=zb(n,e.x+e.width);var i=t[1];return i=ob(i,e.y),i=zb(i,e.y+e.height),[n,i]})}function go(t,e){var n=ob(t.x,e.x),i=zb(t.x+t.width,e.x+e.width),r=ob(t.y,e.y),o=zb(t.y+t.height,e.y+e.height);return i>=n&&o>=r?{x:n,y:r,width:i-n,height:o-r}:void 0}function wo(t,e,n){e=a({recthover:!0},e);var i=e.style={strokenoscale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexof("image://")?(i.image=t.slice(8),s(i,n),new _i(e)):eo(t.replace("path://",""),e,n,"center"):void 0}function zo(t,e,n){this.parentmodel=e,this.ecmodel=n,this.option=t}function xo(t,e,n){for(var i=0;i=0&&n.push(t)}),n}t.topologicaltravel=function(t,e,i,r){function o(t){l[t].entrycount--,0===l[t].entrycount&&u.push(t)}function a(t){h[t]=!0,o(t)}if(t.length){var s=n(e),l=s.graph,u=s.noentrylist,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(i.call(r,c,d.originaldeps.slice()),delete h[c]),f(d.successor,p?a:o)}f(h,function(){throw new error("circle dependency may exists")})}}}function ko(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function $o(t,e,n,i){var r=e[1]-e[0],o=n[1]-n[0];if(0===r)return 0===o?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function jo(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?ko(t).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?0/0:+t}function qo(t,e,n){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),n?t:+t}function ta(t){return t.sort(function(t,e){return t-e}),t}function ea(t){if(t=+t,isnan(t))return 0;for(var e=1,n=0;math.round(t*e)/e!==t;)e*=10,n++;return n}function na(t){var e=t.tostring(),n=e.indexof("e");if(n>0){var i=+e.slice(n+1);return 0>i?-i:0}var r=e.indexof(".");return 0>r?0:e.length-1-r}function ia(t,e){var n=math.log,i=math.ln10,r=math.floor(n(t[1]-t[0])/i),o=math.round(n(math.abs(e[1]-e[0]))/i),a=math.min(math.max(-r+o,0),20);return isfinite(a)?a:20}function ra(t,e,n){if(!t[e])return 0;var i=g(t,function(t,e){return t+(isnan(e)?0:e)},0);if(0===i)return 0;for(var r=math.pow(10,n),o=p(t,function(t){return(isnan(t)?0:t)/i*r*100}),a=100*r,s=p(o,function(t){return math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(o,function(t,e){return t-s[e]});a>l;){for(var h=number.negative_infinity,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function oa(t){var e=2*math.pi;return(t%e+e)%e}function aa(t){return t>-qb&&qb>t}function sa(t){if(t instanceof date)return t;if("string"==typeof t){var e=kb.exec(t);if(!e)return new date(0/0);if(e[8]){var n=+e[4]||0;return"z"!==e[8].touppercase()&&(n-=e[8].slice(0,3)),new date(date.utc(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(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)}return new date(null==t?0/0:math.round(t))}function la(t){return math.pow(10,ua(t))}function ua(t){return math.floor(math.log(t)/math.ln10)}function ha(t,e){var n,i=ua(t),r=math.pow(10,i),o=t/r;return n=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=n*r,i>=-20?+t.tofixed(0>i?-i:0):t}function ca(t,e){var n=(t.length-1)*e+1,i=math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function da(t){function e(t,n,i){return t.interval[i]s;s++)o[s]<=n&&(o[s]=n,a[s]=s?1:1-i),n=o[s],i=a[s];o[0]===o[1]&&a[0]*a[1]!==1?t.splice(r,1):r++}return t}function fa(t){return t-parsefloat(t)>=0}function pa(t){return isnan(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function ga(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 va(t){return null==t?"":(t+"").replace(qb,function(t,e){return tw[e]})}function ma(t,e,n){_(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;os;s++)for(var l=0;l':'':{rendermode:r,content:"{marker"+o+"|} ",style:{color:n}}:""}function _a(t,e){return t+="","0000".substr(0,e-t.length)+t}function ba(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="mm-dd\nyyyy");var i=sa(e),r=n?"utc":"",o=i["get"+r+"fullyear"](),a=i["get"+r+"month"]()+1,s=i["get"+r+"date"](),l=i["get"+r+"hours"](),u=i["get"+r+"minutes"](),h=i["get"+r+"seconds"](),c=i["get"+r+"milliseconds"]();return t=t.replace("mm",_a(a,2)).replace("m",a).replace("yyyy",o).replace("yy",o%100).replace("dd",_a(s,2)).replace("d",s).replace("hh",_a(l,2)).replace("h",l).replace("mm",_a(u,2)).replace("m",u).replace("ss",_a(h,2)).replace("s",h).replace("sss",_a(c,3))}function wa(t){return t?t.charat(0).touppercase()+t.substr(1):t}function ma(t){return nn(t.text,t.font,t.textalign,t.textverticalalign,t.textpadding,t.textlineheight,t.rich,t.truncate)}function sa(t,e,n,i,r,o,a,s){return nn(t,e,n,i,r,s,o,a)}function ta(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachchild(function(l,u){var h,c,d=l.position,f=l.getboundingrect(),p=e.childat(u+1),g=p&&p.getboundingrect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);h=o+v,h>i||l.newline?(o=0,h=v,a+=s+n,s=f.height):s=math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=a+m,c>r||l.newline?(o+=s+n,a=0,c=m,s=f.width):s=math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=h+n:a=c+n)})}function ia(t,e,n){n=jb(n||0);var i=e.width,r=e.height,o=jo(t.left,i),a=jo(t.top,r),s=jo(t.right,i),l=jo(t.bottom,r),u=jo(t.width,i),h=jo(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isnan(u)&&(u=i-s-d-o),isnan(h)&&(h=r-l-c-a),null!=f&&(isnan(u)&&isnan(h)&&(f>i/r?u=.8*i:h=.8*r),isnan(u)&&(u=f*h),isnan(h)&&(h=u/f)),isnan(o)&&(o=i-s-u-d),isnan(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isnan(u)&&(u=i-d-o-(s||0)),isnan(h)&&(h=r-c-a-(l||0));var p=new xn(o+n[3],a+n[0],u,h);return p.margin=n,p}function ca(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],l=r&&r.boundingmode||"all";if(o||a){var u;if("raw"===l)u="group"===t.type?new xn(0,0,+e.width||0,+e.height||0):t.getboundingrect();else if(u=t.getboundingrect(),t.needlocaltransform()){var h=t.getlocaltransform();u=u.clone(),u.applytransform(h)}e=ia(s({width:u.width,height:u.height},e),n,i);var c=t.position,d=o?e.x-u.x:0,f=a?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function aa(t,e){return null!=t[sw[e][0]]||null!=t[sw[e][1]]&&null!=t[sw[e][2]]}function da(t,e,n){function i(n,i){var a={},l=0,u={},h=0,c=2;if(ow(n,function(e){u[e]=t[e]}),ow(n,function(t){r(e,t)&&(a[t]=u[t]=e[t]),o(a,t)&&l++,o(u,t)&&h++}),s[i])return o(e,n[1])?u[n[2]]=null:o(e,n[2])&&(u[n[1]]=null),u;if(h!==c&&l){if(l>=c)return a;for(var d=0;di;i++)if(t[i].length>e)return t[i];return t[n-1]}function za(t){var e=t.get("coordinatesystem"),n={coordsysname:e,coordsysdims:[],axismap:n(),categoryaxismap:n()},i=vw[e];return i?(i(t,n,n.axismap,n.categoryaxismap),n):void 0}function ra(t){return"category"===t.get("type")}function ea(t){this.fromdataset=t.fromdataset,this.data=t.data||(t.sourceformat===_w?{}:[]),this.sourceformat=t.sourceformat||bw,this.serieslayoutby=t.serieslayoutby||mw,this.dimensionsdefine=t.dimensionsdefine,this.encodedefine=t.encodedefine&&n(t.encodedefine),this.startindex=t.startindex||0,this.dimensionsdetectcount=t.dimensionsdetectcount}function ba(t){var e=t.option.source,n=bw;if(t(e))n=ww;else if(_(e)){0===e.length&&(n=yw);for(var i=0,r=e.length;r>i;i++){var o=e[i];if(null!=o){if(_(o)){n=yw;break}if(m(o)){n=xw;break}}}}else if(m(e)){for(var a in e)if(e.hasownproperty(a)&&d(e[a])){n=_w;break}}else if(null!=e)throw new error("invalid data");tw(t).sourceformat=n}function na(t){return tw(t).source}function va(t){tw(t).datasetmap=n()}function fa(t){var e=t.option,n=e.data,i=t(n)?ww:mw,r=!1,o=e.serieslayoutby,a=e.sourceheader,s=e.dimensions,l=ya(t);if(l){var u=l.option;n=u.source,i=tw(l).sourceformat,r=!0,o=o||u.serieslayoutby,null==a&&(a=u.sourceheader),s=s||u.dimensions}var h=ha(n,i,o,a,s),c=e.encode;!c&&l&&(c=xa(t,l,n,i,o,h)),tw(t).source=new ea({data:n,fromdataset:r,serieslayoutby:o,sourceformat:i,dimensionsdefine:h.dimensionsdefine,startindex:h.startindex,dimensionsdetectcount:h.dimensionsdetectcount,encodedefine:c})}function ha(t,e,n,i,r){if(!t)return{dimensionsdefine:ga(r)};var o,a,s;if(e===yw)"auto"===i||null==i?wa(function(t){null!=t&&"-"!==t&&(w(t)?null==a&&(a=1):a=0)},n,t,10):a=i?1:0,r||1!==a||(r=[],wa(function(t,e){r[e]=null!=t?t:""},n,t)),o=r?r.length:n===sw?t.length:t[0]?t[0].length:null;else if(e===xw)r||(r=za(t),s=!0);else if(e===_w)r||(r=[],s=!0,f(t,function(t,e){r.push(e)}));else if(e===mw){var l=vi(t[0]);o=_(l)&&l.length||1}var u;return s&&f(r,function(t,e){"name"===(m(t)?t.name:t)&&(u=e)}),{startindex:a,dimensionsdefine:ga(r),dimensionsdetectcount:o,potentialnamedimindex:u}}function ga(t){if(t){var e=n();return p(t,function(t){if(t=a({},m(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayname&&(t.displayname=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function wa(t,e,n,i){if(null==i&&(i=1/0),e===sw)for(var r=0;rr;r++)t(n[r]?n[r][0]:null,r);else for(var o=n[0]||[],r=0;rr;r++)t(o[r],r)}function za(t){for(var e,n=0;nx&&null==y;x++)qa(n,i,r,o.dimensionsdefine,o.startindex,x)||(y=x);if(null!=y){s.value=y;var _=o.potentialnamedimindex||math.max(y-1,0);u.push(_),l.push(_)}}return l.length&&(s.itemname=l),u.length&&(s.seriesname=u),s}function ya(t){var e=t.option,n=e.data;return n?void 0:t.ecmodel.getcomponent("dataset",e.datasetindex||0)}function ua(t,e){return qa(t.data,t.sourceformat,t.serieslayoutby,t.dimensionsdefine,t.startindex,e)}function qa(t,e,n,i,r,o){function a(t){return null!=t&&isfinite(t)&&""!==t?!1:w(t)&&"-"!==t?!0:void 0}var s,l=5;if(t(t))return!1;var u;if(i&&(u=i[o],u=m(u)?u.name:u),e===yw)if(n===sw){for(var h=t[o],c=0;c<(h||[]).length&&l>c;c++)if(null!=(s=a(h[r+c])))return s}else for(var c=0;cc;c++){var d=t[r+c];if(d&&null!=(s=a(d[o])))return s}else if(e===xw){if(!u)return;for(var c=0;cc;c++){var f=t[c];if(f&&null!=(s=a(f[u])))return s}}else if(e===_w){if(!u)return;var h=t[u];if(!h||t(h))return!1;for(var c=0;cc;c++)if(null!=(s=a(h[c])))return s}else if(e===mw)for(var c=0;cc;c++){var f=t[c],p=vi(f);if(!_(p))return!1;if(null!=(s=a(p[o])))return s}return!1}function ja(t,e){if(e){var n=e.seiresindex,i=e.seriesid,r=e.seriesname;return null!=n&&t.componentindex!==n||null!=i&&t.id!==i||null!=r&&t.name!==r}}function ka(t,e){var n=t.color&&!t.colorlayer;f(e,function(e,o){"colorlayer"===o&&n||cw.hasclass(o)||("object"==typeof e?t[o]=t[o]?r(t[o],e,!1):i(e):null==t[o]&&(t[o]=e))})}function $a(t){t=t,this.option={},this.option[iw]=1,this._componentsmap=n({series:[]}),this._seriesindices,this._seriesindicesmap,ka(t,this._theme.option),r(t,fw,!1),this.mergeoption(t)}function ja(t,e){_(e)||(e=e?[e]:[]);var n={};return f(e,function(e){n[e]=(t.get(e)||[]).slice()}),n}function qa(t,e,n){var i=e.type?e.type:n?n.subtype:cw.determinesubtype(t,e);return i}function ts(t,e){t._seriesindicesmap=n(t._seriesindices=p(e,function(t){return t.componentindex})||[])}function es(t,e){return e.hasownproperty("subtype")?v(t,function(t){return t.subtype===e.subtype}):t}function ns(t){f(aw,function(e){this[e]=y(t[e],t)},this)}function is(){this._coordinatesystems=[]}function rs(t){this._api=t,this._timelineoptions=[],this._medialist=[],this._mediadefault,this._currentmediaindices=[],this._optionbackup,this._newbaseoption}function os(t,e,n){var i,r,o=[],a=[],s=t.timeline;if(t.baseoption&&(r=t.baseoption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;kw(l,function(t){t&&t.option&&(t.query?a.push(t):i||(i=t))})}return r||(r=t),r.timeline||(r.timeline=s),kw([r].concat(o).concat(p(a,function(t){return t.option})),function(t){kw(e,function(e){e(t,n)})}),{baseoption:r,timelineoptions:o,mediadefault:i,medialist:a}}function as(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return f(t,function(t,e){var n=e.match(zw);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].tolowercase();ss(i[a],t,o)||(r=!1)}}),r}function ss(t,e,n){return"min"===n?t>=e:"max"===n?e>=t:t===e}function ls(t,e){return t.join(",")===e.join(",")}function us(t,e){e=e||{},kw(e,function(e,n){if(null!=e){var i=t[n];if(cw.hasclass(n)){e=bi(e),i=bi(i);var r=hi(i,e);t[n]=lw(r,function(t){return t.option&&t.exist?ow(t.exist,t.option,!0):t.exist||t.option})}else t[n]=ow(i,e,!0)}})}function hs(t){var e=t&&t.itemstyle;if(e)for(var n=0,i=bw.length;i>n;n++){var o=bw[n],a=e.normal,s=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?r(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?r(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function cs(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,s(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function ds(t){cs(t,"itemstyle"),cs(t,"linestyle"),cs(t,"areastyle"),cs(t,"label"),cs(t,"labelline"),cs(t,"upperlabel"),cs(t,"edgelabel")}function fs(t,e){var n=ew(t)&&t[e],i=ew(n)&&n.textstyle;if(i)for(var r=0,o=$x.length;o>r;r++){var e=$x[r];i.hasownproperty(e)&&(n[e]=i[e])}}function ps(t){t&&(ds(t),fs(t,"label"),t.emphasis&&fs(t.emphasis,"label"))}function gs(t){if(ew(t)){hs(t),ds(t),fs(t,"label"),fs(t,"upperlabel"),fs(t,"edgelabel"),t.emphasis&&(fs(t.emphasis,"label"),fs(t.emphasis,"upperlabel"),fs(t.emphasis,"edgelabel"));var e=t.markpoint;e&&(hs(e),ps(e));var n=t.markline;n&&(hs(n),ps(n));var i=t.markarea;i&&ps(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!t(o))for(var a=0;a=0;p--){var g=t[p];if(s||(d=g.data.rawindexof(g.stackedbydimension,c)),d>=0){var v=g.data.getbyrawindex(g.stackresultdimension,d);if(h>=0&&v>0||0>=h&&0>v){h+=v,f=v;break}}}return i[0]=h,i[1]=f,i});a.hostmodel.setdata(l),e.data=l})}function ws(t,e){ea.isinstance(t)||(t=ea.seriesdatatosource(t)),this._source=t;var n=this._data=t.data,i=t.sourceformat;i===ww&&(this._offset=0,this._dimsize=e,this._data=n);var r=zw[i===yw?i+"_"+t.serieslayoutby:i];a(this,r)}function ms(){return this._data.length}function ss(t){return this._data[t]}function ts(t){for(var e=0;ee.outputdata.count()&&e.model.getrawdata().cloneshallow(e.outputdata)}function fs(t,e){f(t.changable_methods,function(n){t.wrapmethod(n,x(hs,e))})}function hs(t){var e=gs(t);e&&e.setoutputend(this.count())}function gs(t){var e=(t.ecmodel||{}).scheduler,n=e&&e.getpipeline(t.uid);if(n){var i=n.currenttask;if(i){var r=i.agentstubmap;r&&(i=r.get(t.uid))}return i}}function ws(){this.group=new ky,this.uid=uo("viewchart"),this.rendertask=ps({plan:ys,reset:us}),this.rendertask.context={view:this}}function zs(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n=0?i():c=settimeout(i,-o),u=r};return d.clear=function(){c&&(cleartimeout(c),c=null)},d.debouncenextcall=function(t){l=t},d}function js(t,e,n,i){var r=t[e];if(r){var o=r[am]||r,a=r[lm],s=r[sm];if(s!==n||a!==i){if(null==n||!i)return t[e]=o;r=t[e]=qs(o,n,"debounce"===i),r[am]=o,r[lm]=i,r[sm]=n}return r}}function ks(t,e){var n=t[e];n&&n[am]&&(t[e]=n[am])}function $s(t,e,n,i){this.ecinstance=t,this.api=e,this.unfinished;var n=this._dataprocessorhandlers=n.slice(),i=this._visualhandlers=i.slice();this._allhandlers=n.concat(i),this._stagetaskmap=n()}function js(t,e,n,i,r){function o(t,e){return t.setdirty&&(!t.dirtymap||t.dirtymap.get(e.__pipeline.id))}r=r||{};var a;f(e,function(e){if(!r.visualtype||r.visualtype===e.visualtype){var s=t._stagetaskmap.get(e.uid),l=s.seriestaskmap,u=s.overalltask;if(u){var h,c=u.agentstubmap;c.each(function(t){o(r,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),gm(u,i);var d=t.getperformargs(u,r.block);c.each(function(t){t.perform(d)}),a|=u.perform(d)}else l&&l.each(function(s){o(r,s)&&s.dirty();var l=t.getperformargs(s,r.block);l.skip=!e.performrawseries&&n.isseriesfiltered(s.context.model),gm(s,i),a|=s.perform(l)})}}),t.unfinished|=a}function qs(t,e,n,i,r){function o(n){var o=n.uid,s=a.get(o)||a.set(o,ps({plan:ol,reset:al,count:ll}));s.context={model:n,ecmodel:i,api:r,useclearvisual:e.isvisual&&!e.islayout,plan:e.plan,reset:e.reset,scheduler:t},ul(t,n,s)}var a=n.seriestaskmap||(n.seriestaskmap=n()),s=e.seriestype,l=e.gettargetseries;e.createonallseries?i.eachrawseries(o):s?i.eachrawseriesbytype(s,o):l&&l(i,r).each(o);var u=t._pipelinemap;a.each(function(t,e){u.get(e)||(t.dispose(),a.removekey(e))})}function tl(t,e,n,i,r){function o(e){var n=e.uid,i=s.get(n);i||(i=s.set(n,ps({reset:nl,ondirty:rl})),a.dirty()),i.context={model:e,overallprogress:h,modifyoutputend:c},i.agent=a,i.__block=h,ul(t,e,i)}var a=n.overalltask=n.overalltask||ps({reset:el});a.context={ecmodel:i,api:r,overallreset:e.overallreset,scheduler:t};var s=a.agentstubmap=a.agentstubmap||n(),l=e.seriestype,u=e.gettargetseries,h=!0,c=e.modifyoutputend;l?i.eachrawseriesbytype(l,o):u?u(i,r).each(o):(h=!1,f(i.getseries(),o));var d=t._pipelinemap;s.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),s.removekey(e))})}function el(t){t.overallreset(t.ecmodel,t.api,t.payload)}function nl(t){return t.overallprogress&&il}function il(){this.agent.dirty(),this.getdownstream().dirty()}function rl(){this.agent&&this.agent.dirty()}function ol(t){return t.plan&&t.plan(t.model,t.ecmodel,t.api,t.payload)}function al(t){t.useclearvisual&&t.data.clearallvisual();var e=t.resetdefines=bi(t.reset(t.model,t.ecmodel,t.api,t.payload));return e.length>1?p(e,function(t,e){return sl(e)}):vm}function sl(t){return function(e,n){var i=n.data,r=n.resetdefines[t];if(r&&r.dataeach)for(var o=e.start;o0?parseint(i,10)/100:i?parsefloat(i):0;var r=n.getattribute("stop-color")||"#000000";e.addcolorstop(i,r)}n=n.nextsibling}}function gl(t,e){t&&t.__inheritedstyle&&(e.__inheritedstyle||(e.__inheritedstyle={}),s(e.__inheritedstyle,t.__inheritedstyle))}function vl(t){for(var e=z(t).split(cm),n=[],i=0;i0;o-=2){var a=r[o],s=r[o-1];switch(i=i||te(),s){case"translate":a=z(a).split(cm),de(i,i,[parsefloat(a[0]),parsefloat(a[1]||0)]);break;case"scale":a=z(a).split(cm),pe(i,i,[parsefloat(a[0]),parsefloat(a[1]||a[0])]);break;case"rotate":a=z(a).split(cm),ke(i,i,parsefloat(a[0]));break;case"skew":a=z(a).split(cm),console.warn("skew transform is not supported yet");break;case"matrix":var a=z(a).split(cm);i[0]=parsefloat(a[0]),i[1]=parsefloat(a[1]),i[2]=parsefloat(a[2]),i[3]=parsefloat(a[3]),i[4]=parsefloat(a[4]),i[5]=parsefloat(a[5])}}e.setlocaltransform(i)}}function _l(t){var e=t.getattribute("style"),n={};if(!e)return n;var i={};om.lastindex=0;for(var r;null!=(r=om.exec(e));)i[r[1]]=r[2];for(var o in km)km.hasownproperty(o)&&null!=i[o]&&(n[km[o]]=i[o]);return n}function bl(t,e,n){var i=e/t.width,r=n/t.height,o=math.min(i,r),a=[o,o],s=[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+n/2];return{scale:a,position:s}}function wl(t,e){var n=new fl;return n.parse(t,e)}function ml(t){return function(e,n,i){e=e&&e.tolowercase(),ly.prototype[t].call(this,e,n,i)}}function sl(){ly.call(this)}function tl(t,e,n){function r(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=cs[e]),this.id,this.group,this._dom=t;var o="canvas",a=this._zr=li(t,{renderer:n.renderer||o,devicepixelratio:n.devicepixelratio,width:n.width,height:n.height});this._throttledzrflush=qs(y(a.flush,a),17);var e=i(e);e&&hw(e,!0),this._theme=e,this._chartsviews=[],this._chartsmap={},this._componentsviews=[],this._componentsmap={},this._coordsysmgr=new is;var s=this._api=wl(this);cn(hs,r),cn(ss,r),this._scheduler=new $s(this,s,ss,hs),ly.call(this,this._eceventprocessor=new zl),this._messagecenter=new sl,this._initevents(),this.resize=y(this.resize,this),this._pendingactions=[],a.animation.on("frame",this._onframe,this),ol(a,this),r(this)}function il(t,e,n){var i,r=this._model,o=this._coordsysmgr.getcoordinatesystems();e=qi(r,e);for(var a=0;ae.get("hoverlayerthreshold")&&!fm.node&&n.traverse(function(t){t.isgroup||(t.usehoverlayer=!0)})}function hl(t,e){var n=t.get("blendmode")||null;e.group.traverse(function(t){t.isgroup||t.style.blend!==n&&t.setstyle("blend",n),t.eachpendingdisplayable&&t.eachpendingdisplayable(function(t){t.setstyle("blend",n)})})}function gl(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function wl(t){var e=t._coordsysmgr;return a(new ns(t),{getcoordinatesystems:y(e.getcoordinatesystems,e),getcomponentbyelement:function(e){for(;e;){var n=e.__eccomponentinfo;if(null!=n)return t._model.getcomponent(n.maintype,n.index);e=e.parent}}})}function zl(){this.eventinfo}function xl(t){function e(t,e){for(var n=0;n65535?is:as}function mu(t){var e=t.constructor;return e===array?t.slice():new e(t)}function su(t,e){f(ds.concat(e.__wrappedmethods||[]),function(n){e.hasownproperty(n)&&(t[n]=e[n])}),t.__wrappedmethods=e.__wrappedmethods,f(ks,function(n){t[n]=i(e[n])}),t._calculationinfo=a(e._calculationinfo)}function tu(t,e,n,i,r){var o=ts[e.type],a=i-1,s=e.name,l=t[s][a];if(l&&l.lengthc;c+=n)t[s].push(new o(math.min(r-c,n)))}function iu(t){var e=t._invertedindicesmap;f(e,function(n,i){var r=t._dimensioninfos[i],o=r.ordinalmeta;if(o){n=e[i]=new cs(o.categories.length);for(var a=0;a=0?this._indices[t]:-1}function ku(t,e){var n=t._idlist[e];return null==n&&(n=cu(t,t._iddimidx,e)),null==n&&(n=ss+e),n}function pu(t){return _(t)||(t=[t]),t}function lu(t,e){var n=t.dimensions,i=new ps(p(n,t.getdimensioninfo,t),t.hostmodel);su(i,t);for(var r=i._storage={},o=t._storage,a=0;a=0?(r[s]=ou(o[s]),i._rawextent[s]=zu(),i._extent[s]=null):r[s]=o[s])}return i}function ou(t){for(var e=new array(t.length),n=0;np;p++){var g=o[p]=a({},m(o[p])?o[p]:{name:o[p]}),v=g.name,m=c[p]={otherdims:{}};null!=v&&null==u.get(v)&&(m.name=m.displayname=v,u.set(v,p)),null!=g.type&&(m.type=g.type),null!=g.displayname&&(m.displayname=g.displayname)}l.each(function(t,e){if(t=bi(t).slice(),1===t.length&&t[0]<0)return void l.set(e,!1);var n=l.set(e,[]);f(t,function(t,i){w(t)&&(t=u.get(t)),null!=t&&d>t&&(n[i]=t,r(c[t],e,i))})});var y=0;f(t,function(t){var e,t,n,o;if(w(t))e=t,t={};else{e=t.name;var a=t.ordinalmeta;t.ordinalmeta=null,t=i(t),t.ordinalmeta=a,n=t.dimsdef,o=t.otherdims,t.name=t.coorddim=t.coorddimindex=t.dimsdef=t.otherdims=null}var u=l.get(e);if(u!==!1){var u=bi(u);if(!u.length)for(var h=0;h<(n&&n.length||1);h++){for(;yt;t++){var m=c[t]=c[t]||{},i=m.coorddim;null==i&&(m.coorddim=bu(s,h,b),m.coorddimindex=0,(!x||0>=_)&&(m.isextracoord=!0),_--),null==m.name&&(m.name=bu(m.coorddim,u)),null==m.type&&ua(e,t,m.name)&&(m.type="ordinal")}return c}function eu(t,e,n,i){var r=math.max(t.dimensionsdetectcount||1,e.length,n.length,i||0);return f(e,function(t){var e=t.dimsdef;e&&(r=math.max(r,e.length))}),r}function bu(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function nu(t,e,n){n=n||{};var i,r,o,a,s=n.byindex,l=n.stackedcoorddimension,u=!(!t||!t.get("stack"));if(f(e,function(t,n){w(t)&&(e[n]=t={name:t}),u&&!t.isextracoord&&(s||i||!t.ordinalmeta||(i=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coorddim||(r=t))}),!r||s||i||(s=!0),r){o="__\x00ecstackresult",a="__\x00ecstackedover",i&&(i.createinvertedindices=!0);var h=r.coorddim,c=r.type,d=0;f(e,function(t){t.coorddim===h&&d++}),e.push({name:o,coorddim:h,coorddimindex:d,type:c,isextracoord:!0,iscalculationcoord:!0}),d++,e.push({name:a,coorddim:a,coorddimindex:d,type:c,isextracoord:!0,iscalculationcoord:!0})}return{stackeddimension:r&&r.name,stackedbydimension:i&&i.name,isstackedbyindex:s,stackedoverdimension:a,stackresultdimension:o}}function vu(t,e){return!!e&&e===t.getcalculationinfo("stackeddimension")}function fu(t,e){return vu(t,e)?t.getcalculationinfo("stackresultdimension"):e}function hu(t,e,n){n=n||{},ea.isinstance(t)||(t=ea.seriesdatatosource(t));var i,r=e.get("coordinatesystem"),o=is.get(r),a=za(e);a&&(i=p(a.coordsysdims,function(t){var e={name:t},n=a.axismap.get(t);if(n){var i=n.get("type");e.type=_u(i)}return e})),i||(i=o&&(o.getdimensionsinfo?o.getdimensionsinfo():o.dimensions.slice())||["x","y"]);var s,l,u=zs(t,{coorddimensions:i,generatecoord:n.generatecoord});a&&f(u,function(t,e){var n=t.coorddim,i=a.categoryaxismap.get(n);i&&(null==s&&(s=e),t.ordinalmeta=i.getordinalmeta()),null!=t.otherdims.itemname&&(l=!0)}),l||null==s||(u[s].otherdims.itemname=0);var h=nu(e,u),c=new ps(u,e);c.setcalculationinfo(h);var d=null!=s&&gu(t)?function(t,e,n,i){return i===s?n:this.defaultdimvaluegetter(t,e,n,i)}:null;return c.hasitemoption=!1,c.initdata(t,null,d),c}function gu(t){if(t.sourceformat===mw){var e=wu(t.data||[]);return null!=e&&!_(vi(e))}}function wu(t){for(var e=0;ea&&(a=r.interval=n),null!=i&&a>i&&(a=r.interval=i);var s=r.intervalprecision=ju(a),l=r.nicetickextent=[ns(math.ceil(t[0]/a)*a,s),ns(math.floor(t[1]/a)*a,s)];return $u(l,t),r}function ju(t){return na(t)+2}function ku(t,e,n){t[e]=math.max(math.min(t[e],n[1]),n[0])}function $u(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),ku(t,0,e),ku(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function ju(t,e,n,i){var r=[];if(!t)return r;var o=1e4;e[0]o)return[];return e[1]>(r.length?r[r.length-1]:n[1])&&r.push(e[1]),r}function qu(t){return t.get("stack")||hs+t.seriesindex}function th(t){return t.dim+t.index}function eh(t,e){var n=[];return e.eachseriesbytype(t,function(t){ah(t)&&!sh(t)&&n.push(t)}),n}function nh(t){var e=[];return f(t,function(t){var n=t.getdata(),i=t.coordinatesystem,r=i.getbaseaxis(),o=r.getextent(),a="category"===r.type?r.getbandwidth():math.abs(o[1]-o[0])/n.count(),s=jo(t.get("barwidth"),a),l=jo(t.get("barmaxwidth"),a),u=t.get("bargap"),h=t.get("barcategorygap");e.push({bandwidth:a,barwidth:s,barmaxwidth:l,bargap:u,barcategorygap:h,axiskey:th(r),stackid:qu(t)})}),ih(e)}function ih(t){var e={};f(t,function(t){var n=t.axiskey,i=t.bandwidth,r=e[n]||{bandwidth:i,remainedwidth:i,autowidthcount:0,categorygap:"20%",gap:"30%",stacks:{}},o=r.stacks;e[n]=r;var a=t.stackid;o[a]||r.autowidthcount++,o[a]=o[a]||{width:0,maxwidth:0};var s=t.barwidth;s&&!o[a].width&&(o[a].width=s,s=math.min(r.remainedwidth,s),r.remainedwidth-=s);var l=t.barmaxwidth;l&&(o[a].maxwidth=l);var u=t.bargap;null!=u&&(r.gap=u);var h=t.barcategorygap;null!=h&&(r.categorygap=h)});var n={};return f(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandwidth,o=jo(t.categorygap,r),a=jo(t.gap,1),s=t.remainedwidth,l=t.autowidthcount,u=(s-o)/(l+(l-1)*a);u=math.max(u,0),f(i,function(t){var e=t.maxwidth;e&&u>e&&(e=math.min(e,s),t.width&&(e=math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*a),u=math.max(u,0);var h,c=0;f(i,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+a)}),h&&(c-=h.width*a);var d=-c/2;f(i,function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+a)})}),n}function rh(t,e,n){if(t&&e){var i=t[th(e)];return null!=i&&null!=n&&(i=i[qu(n)]),i}}function oh(t,e){var n=eh(t,e),i=nh(n),r={};f(n,function(t){var e=t.getdata(),n=t.coordinatesystem,o=n.getbaseaxis(),a=qu(t),s=i[th(o)][a],l=s.offset,u=s.width,h=n.getotheraxis(o),c=t.get("barminheight")||0;r[a]=r[a]||[],e.setlayout({offset:l,size:u});for(var d=e.mapdimension(h.dim),f=e.mapdimension(o.dim),p=vu(e,d),g=h.ishorizontal(),v=lh(o,h,p),m=0,y=e.count();y>m;m++){var x=e.get(d,m),_=e.get(f,m);if(!isnan(x)){var b=x>=0?"p":"n",w=v;p&&(r[a][_]||(r[a][_]={p:v,n:v}),w=r[a][_][b]);var m,s,t,i;if(g){var c=n.datatopoint([x,_]);m=w,s=c[1]+l,t=c[0]-v,i=u,math.abs(t)t?-1:1)*c),p&&(r[a][_][b]+=t)}else{var c=n.datatopoint([_,x]);m=c[0]+l,s=w,t=u,i=c[1]-v,math.abs(i)=i?-1:1)*c),p&&(r[a][_][b]+=i)}e.setitemlayout(m,{x:m,y:s,width:t,height:i})}}},this)}function ah(t){return t.coordinatesystem&&"cartesian2d"===t.coordinatesystem.type}function sh(t){return t.pipelinecontext&&t.pipelinecontext.large}function lh(t,e){var n,i,r=e.getglobalextent();r[0]>r[1]?(n=r[1],i=r[0]):(n=r[0],i=r[1]);var o=e.toglobalcoord(e.datatocoord(0));return n>o&&(o=n),o>i&&(o=i),o}function uh(t,e){return rt(t,it(e))}function hh(t,e){var n,i,r,o=t.type,a=e.getmin(),s=e.getmax(),l=null!=a,u=null!=s,h=t.getextent();"ordinal"===o?n=e.getcategories().length:(i=e.get("boundarygap"),_(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=jo(i[0],1),i[1]=jo(i[1],1),r=h[1]-h[0]||math.abs(h[0])),null==a&&(a="ordinal"===o?n?0:0/0:h[0]-i[0]*r),null==s&&(s="ordinal"===o?n?n-1:0/0:h[1]+i[1]*r),"datamin"===a?a=h[0]:"function"==typeof a&&(a=a({min:h[0],max:h[1]})),"datamax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==a||!isfinite(a))&&(a=0/0),(null==s||!isfinite(s))&&(s=0/0),t.setblank(c(a)||c(s)||"ordinal"===o&&!t.getordinalmeta().categories.length),e.getneedcrosszero()&&(a>0&&s>0&&!l&&(a=0),0>a&&0>s&&!u&&(s=0));var c=e.ecmodel;if(c&&"time"===o){var d,p=eh("bar",c);if(f(p,function(t){d|=t.getbaseaxis()===e.axis}),d){var g=nh(p),v=ch(a,s,e,g);a=v.min,s=v.max}}return[a,s]}function ch(t,e,n,i){var r=n.axis.getextent(),o=r[1]-r[0],a=rh(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;f(a,function(t){s=math.min(t.offset,s)});var l=-1/0;f(a,function(t){l=math.max(t.offset+t.width,l)}),s=math.abs(s),l=math.abs(l);var u=s+l,h=e-t,c=1-(s+l)/o,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function dh(t,e){var n=hh(t,e),i=null!=e.getmin(),r=null!=e.getmax(),o=e.get("splitnumber");"log"===t.type&&(t.base=e.get("logbase"));var a=t.type;t.setextent(n[0],n[1]),t.niceextent({splitnumber:o,fixmin:i,fixmax:r,mininterval:"interval"===a||"time"===a?e.get("mininterval"):null,maxinterval:"interval"===a||"time"===a?e.get("maxinterval"):null});var s=e.get("interval");null!=s&&t.setinterval&&t.setinterval(s)}function fh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new bs(t.getordinalmeta?t.getordinalmeta():t.getcategories(),[1/0,-1/0]);case"value":return new fs;default:return(zu.getclass(e)||fs).create(t)}}function ph(t){var e=t.scale.getextent(),n=e[0],i=e[1];return!(n>0&&i>0||0>n&&0>i)}function gh(t){var e=t.getlabelmodel().get("formatter"),n="category"===t.type?t.scale.getextent()[0]:null;return"string"==typeof e?e=function(e){return function(n){return n=t.scale.getlabel(n),e.replace("{value}",null!=n?n:"")}}(e):"function"==typeof e?function(i,r){return null!=n&&(r=i-n),e(vh(t,i),r)}:function(e){return t.scale.getlabel(e)}}function vh(t,e){return"category"===t.type?t.scale.getlabel(e):e}function mh(t){var e=t.model,n=t.scale;if(e.get("axislabel.show")&&!n.isblank()){var i,r,o="category"===t.type,a=n.getextent();o?r=n.count():(i=n.getticks(),r=i.length);var s,l=t.getlabelmodel(),u=gh(t),h=1;r>40&&(h=math.ceil(r/40));for(var c=0;r>c;c+=h){var d=i?i[c]:a[0]+c,f=u(d),p=l.gettextrect(f),g=yh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function yh(t,e){var n=e*math.pi/180,i=t.plain(),r=i.width,o=i.height,a=r*math.cos(n)+o*math.sin(n),s=r*math.sin(n)+o*math.cos(n),l=new xn(i.x,i.y,a,s);return l}function xh(t){var e=t.get("interval");return null==e?"auto":e}function _h(t){return"category"===t.type&&0===xh(t.getlabelmodel())}function bh(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symboltype?n.stroke=t:this.__isemptybrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function wh(t,e,n,i,r,o,a){var s=0===t.indexof("empty");s&&(t=t.substr(5,1).tolowercase()+t.substr(6));var l;return l=0===t.indexof("image://")?no(t.slice(8),new xn(e,n,i,r),a?"center":"cover"):0===t.indexof("path://")?eo(t.slice(7),{},new xn(e,n,i,r),a?"center":"cover"):new yt({shape:{symboltype:t,x:e,y:n,width:i,height:r}}),l.__isemptybrush=s,l.setcolor=bh,l.setcolor(o),l}function mh(t){return hu(t.getsource(),t)}function sh(t,e){var n=e;zo.isinstance(e)||(n=new zo(e),c(n,ht));var i=fh(n);return i.setextent(t[0],t[1]),dh(i,n),i}function th(t){c(t,ht)}function ih(t,e){return math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=o,r=s,o=l,i.push([s/n,l/n])}return i}function ph(t){return"category"===t.type?oh(t):eh(t)}function lh(t,e){return"category"===t.type?rh(t,e):{ticks:t.scale.getticks()}}function oh(t){var e=t.getlabelmodel(),n=zh(t,e);return!e.get("show")||t.scale.isblank()?{labels:[],labelcategoryinterval:n.labelcategoryinterval}:n}function zh(t,e){var n=bh(t,"labels"),i=xh(e),r=nh(n,i);if(r)return r;var o,a;return b(i)?o=zh(t,i):(a="auto"===i?fh(t):i,o=wh(t,a)),vh(n,i,{labels:o,labelcategoryinterval:a})}function rh(t,e){var n=bh(t,"ticks"),i=xh(e),r=nh(n,i);if(r)return r;var o,a;if((!e.get("show")||t.scale.isblank())&&(o=[]),b(i))o=zh(t,i,!0);else if("auto"===i){var s=zh(t,t.getlabelmodel());a=s.labelcategoryinterval,o=p(s.labels,function(t){return t.tickvalue})}else a=i,o=wh(t,a,!0);return vh(n,i,{ticks:o,tickcategoryinterval:a})}function eh(t){var e=t.scale.getticks(),n=gh(t);return{labels:p(e,function(e,i){return{formattedlabel:n(e,i),rawlabel:t.scale.getlabel(e),tickvalue:e}})}}function bh(t,e){return mt(t)[e]||(mt(t)[e]=[])}function nh(t,e){for(var n=0;n40&&(s=math.max(1,math.floor(a/40)));for(var l=o[0],u=t.datatocoord(l+1)-t.datatocoord(l),h=math.abs(u*math.cos(i)),c=math.abs(u*math.sin(i)),d=0,f=0;l<=o[1];l+=s){var p=0,g=0,v=nn(n(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,d=math.max(d,p,7),f=math.max(f,g,7)}var m=d/h,y=f/c;isnan(m)&&(m=1/0),isnan(y)&&(y=1/0);var x=math.max(0,math.floor(math.min(m,y))),_=mt(t.model),b=_.lastautointerval,w=_.lasttickcount;return null!=b&&null!=w&&math.abs(b-x)<=1&&math.abs(w-a)<=1&&b>x?x=b:(_.lasttickcount=a,_.lastautointerval=x),x}function gh(t){var e=t.getlabelmodel();return{axisrotate:t.getrotate?t.getrotate():t.ishorizontal&&!t.ishorizontal()?90:0,labelrotate:e.get("rotate")||0,font:e.getfont()}}function wh(t,e,n){function i(t){l.push(n?t:{formattedlabel:r(t),rawlabel:o.getlabel(t),tickvalue:t})}var r=gh(t),o=t.scale,a=o.getextent(),s=t.getlabelmodel(),l=[],u=math.max((e||0)+1,1),h=a[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=math.round(math.ceil(h/u)*u));var d=_h(t),f=s.get("showminlabel")||d,p=s.get("showmaxlabel")||d;f&&h!==a[0]&&i(a[0]);for(var g=h;g<=a[1];g+=u)i(g);return p&&g!==a[1]&&i(a[1]),l}function zh(t,e,n){var i=t.scale,r=gh(t),o=[];return f(i.getticks(),function(t){var a=i.getlabel(t);e(t,a)&&o.push(n?t:{formattedlabel:r(t),rawlabel:a,tickvalue:t})}),o}function xh(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function yh(t,e,n,i,r){function o(t,e){return h?t>e:e>t}var a=e.length;if(t.onband&&!i&&a){var s,l=t.getextent();if(1===a)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var u=e[1].coord-e[0].coord;f(e,function(t){t.coord-=u/2;var e=e||0;e%2>0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[a-1].coord+u},e.push(s)}var h=l[0]>l[1];o(e[0].coord,l[0])&&(r?e[0].coord=l[0]:e.shift()),r&&o(l[0],e[0].coord)&&e.unshift({coord:l[0]}),o(l[1],s.coord)&&(r?s.coord=l[1]:e.pop()),r&&o(s.coord,l[1])&&e.push({coord:l[1]})}}function uh(t){return this._axes[t]}function qh(t){dt.call(this,t)}function jh(t,e){return e.type||(e.data?"category":"value")}function kh(t,e){return t.getcoordsysmodel()===e}function $h(t,e,n){this._coordsmap={},this._coordslist=[],this._axesmap={},this._axeslist=[],this._initcartesian(t,e,n),this.model=t}function jh(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getaxesonzeroof=function(){return o?[o]:[]};var o,a=t[e],s=n.model,l=s.get("axisline.onzero"),u=s.get("axisline.onzeroaxisindex");if(l){if(null!=u)qh(a[u])&&(o=a[u]);else for(var h in a)if(a.hasownproperty(h)&&qh(a[h])&&!i[r(a[h])]){o=a[h];break}o&&(i[r(o)]=!0)}}function qh(t){return t&&"category"!==t.type&&"time"!==t.type&&ph(t)}function tc(t,e){var n=t.getextent(),i=n[0]+n[1];t.toglobalcoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.tolocalcoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function ec(t){return p(nt,function(e){var n=t.getreferringcomponents(e)[0];return n})}function nc(t){return"cartesian2d"===t.get("coordinatesystem")}function ic(t,e){var n=t.mapdimension("defaultedlabel",!0),i=n.length;if(1===i)return ds(t,e,n[0]);if(i){for(var r=[],o=0;o0?"bottom":"top":r.width>0?"left":"right";l||rc(t.style,d,i,u,o,n,p),wo(t,d)}function uc(t,e){var n=t.get(gt)||0;return math.min(n,math.abs(e.width),math.abs(e.height))}function hc(t,e,n){var i=t.getdata(),r=[],o=i.getlayout("valueaxishorizontal")?1:0;r[1-o]=i.getlayout("valueaxisstart");var a=new xt({shape:{points:i.getlayout("largepoints")},incremental:!!n,__startpoint:r,__valueidx:o});e.add(a),cc(a,t,i)}function cc(t,e,n){var i=n.getvisual("bordercolor")||n.getvisual("color"),r=e.getmodel("itemstyle").getitemstyle(["color","bordercolor"]);t.usestyle(r),t.style.fill=null,t.style.stroke=i,t.style.linewidth=n.getlayout("barwidth")}function dc(t){var e={componenttype:t.maintype,componentindex:t.componentindex};return e[t.maintype+"index"]=t.componentindex,e}function fc(t,e,n,i){var r,o,a=oa(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return aa(a-yt/2)?(o=l?"bottom":"top",r="center"):aa(a-1.5*yt)?(o=l?"top":"bottom",r="center"):(o="middle",r=1.5*yt>a&&a>yt/2?l?"left":"right":l?"right":"left"),{rotation:a,textalign:r,textverticalalign:o}}function pc(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerevent")||e&&e.show)}function gc(t,e,n){if(!_h(t.axis)){var i=t.get("axislabel.showminlabel"),r=t.get("axislabel.showmaxlabel");e=e||[],n=n||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];i===!1?(vc(o),vc(u)):mc(o,a)&&(i?(vc(a),vc(h)):(vc(o),vc(u))),r===!1?(vc(s),vc(c)):mc(l,s)&&(r?(vc(l),vc(d)):(vc(s),vc(c)))}}function vc(t){t&&(t.ignore=!0)}function mc(t,e){var n=t&&t.getboundingrect().clone(),i=e&&e.getboundingrect().clone();if(n&&i){var r=ie([]);return ke(r,r,-t.rotation),n.applytransform(ae([],r,t.getlocaltransform())),i.applytransform(ae([],r,e.getlocaltransform())),n.intersect(i)}}function yc(t){return"middle"===t||"center"===t}function xc(t,e,n){var i=e.axis;if(e.get("axistick.show")&&!i.scale.isblank()){for(var r=e.getmodel("axistick"),o=r.getmodel("linestyle"),a=r.get("length"),l=i.gettickscoords(),u=[],h=[],c=t._transform,d=[],f=0;f=0||t===e}function cc(t){var e=ac(t);if(e){var n=e.axispointermodel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=kc(n);null==o&&(r.status=s?"show":"hide");var l=i.getextent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0?n=i[0]:i[1]<0&&(n=i[1]),n}function qc(t,e,n,i){var r=0/0;t.stacked&&(r=n.get(n.getcalculationinfo("stackedoverdimension"),i)),isnan(r)&&(r=t.valuestart);var o=t.basedataoffset,a=[];return a[o]=n.get(t.basedim,i),a[1-o]=r,e.datatopoint(a)}function jc(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function kc(t){return isnan(t[0])||isnan(t[1])}function $c(t,e,n,i,r,o,a,s,l,u){return"none"!==u&&u?jc.apply(this,arguments):qc.apply(this,arguments)}function jc(t,e,n,i,r,o,a,s,l,u,h){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(kc(p)){if(h){d+=o;continue}break}if(d===n)t[o>0?"moveto":"lineto"](p[0],p[1]);else if(l>0){var g=e[c],v="y"===u?1:0,m=(p[v]-g[v])*l;pi(vi,g),vi[v]=g[v]+m,pi(mi,p),mi[v]=p[v]-m,t.beziercurveto(vi[0],vi[1],mi[0],mi[1],p[0],p[1])}else t.lineto(p[0],p[1]);c=d,d+=o}return f}function qc(t,e,n,i,r,o,a,s,l,u,h){for(var c=0,d=n,f=0;i>f;f++){var p=e[d];if(d>=r||0>d)break;if(kc(p)){if(h){d+=o;continue}break}if(d===n)t[o>0?"moveto":"lineto"](p[0],p[1]),pi(vi,p);else if(l>0){var g=d+o,v=e[g];if(h)for(;v&&kc(e[g]);)g+=o,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||kc(v))pi(mi,p);else{kc(v)&&!h&&(v=p),u(gi,v,y);var x,_;if("x"===u||"y"===u){var b="x"===u?0:1;x=math.abs(p[b]-y[b]),_=math.abs(p[b]-v[b])}else x=ry(p,y),_=ry(p,v);m=_/(_+x),fi(mi,p,gi,-l*(1-m))}ci(vi,vi,s),di(vi,vi,a),ci(mi,mi,s),di(mi,mi,a),t.beziercurveto(vi[0],vi[1],mi[0],mi[1],p[0],p[1]),fi(vi,p,gi,l*m)}else t.lineto(p[0],p[1]);c=d,d+=o}return f}function td(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;ri[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1])}return{min:e?n:i,max:e?i:n}}function ed(t,e){if(t.length===e.length){for(var n=0;ne[0]?1:-1;e[0]+=i*n,e[1]-=i*n}return e}function rd(t,e,n){if(!n.valuedim)return[];for(var i=[],r=0,o=e.count();o>r;r++)i.push(qc(n,t,e,r));return i}function od(t,e,n,i){var r=id(t.getaxis("x")),o=id(t.getaxis("y")),a=t.getbaseaxis().ishorizontal(),s=math.min(r[0],r[1]),l=math.min(o[0],o[1]),u=math.max(r[0],r[1])-s,h=math.max(o[0],o[1])-l;if(n)s-=.5,u+=.5,l-=.5,h+=.5;else{var c=i.get("linestyle.width")||2,d=i.get("clipoverflow")?c/2:math.max(u,h);a?(l-=d,h+=2*d):(s-=d,u+=2*d)}var f=new bb({shape:{x:s,y:l,width:u,height:h}});return e&&(f.shape[a?"width":"height"]=0,eo(f,{shape:{width:u,height:h}},i)),f}function ad(t,e,n,i){var r=t.getangleaxis(),o=t.getradiusaxis(),a=o.getextent().slice();a[0]>a[1]&&a.reverse();var s=r.getextent(),l=math.pi/180;n&&(a[0]-=.5,a[1]+=.5);var u=new fb({shape:{cx:qo(t.cx,1),cy:qo(t.cy,1),r0:qo(a[0],1),r:qo(a[1],1),startangle:-s[0]*l,endangle:-s[1]*l,clockwise:r.inverse}});return e&&(u.shape.endangle=-s[0]*l,eo(u,{shape:{endangle:-s[1]*l}},i)),u}function sd(t,e,n,i){return"polar"===t.type?ad(t,e,n,i):od(t,e,n,i)}function ld(t,e,n){for(var i=e.getbaseaxis(),r="x"===i.dim||"radius"===i.dim?0:1,o=[],a=0;a=0;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getdimensioninfo(s);if(i=l&&l.coorddim,"x"===i||"y"===i){r=n[o];break}}if(r){var u=e.getaxis(i),h=p(r.stops,function(t){return{coord:u.toglobalcoord(u.datatocoord(t.value)),color:t.color}}),c=h.length,d=r.outercolors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,v=h[0].coord-g,m=h[c-1].coord+g,y=m-v;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-v)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var x=new db(0,0,0,0,h,!0);return x[i]=v,x[i+"2"]=m,x}}}function hd(t,e,n){var i=t.get("showallsymbol"),r="auto"===i;if(!i||r){var o=n.getaxesbyscale("ordinal")[0];if(o&&(!r||!cd(o,e))){var a=e.mapdimension(o.dim),s={};return f(o.getviewlabels(),function(t){s[t.tickvalue]=1}),function(t){return!s.hasownproperty(e.get(a,t))}}}}function cd(t,e){var n=t.getextent(),i=math.abs(n[1]-n[0])/t.scale.count();isnan(i)&&(i=0);for(var r=e.count(),o=math.max(1,math.round(r/5)),a=0;r>a;a+=o)if(1.5*rc.getsymbolsize(e,a)[t.ishorizontal()?1:0]>i)return!1; return!0}function dd(t,e,n,i){var r=e.getdata(),o=this.dataindex,a=r.getname(o),s=e.get("selectedoffset");i.dispatchaction({type:"pietoggleselect",from:t,name:a,seriesid:e.id}),r.each(function(t){fd(r.getitemgraphicel(t),r.getitemlayout(t),e.isselected(r.getname(t)),s,n)})}function fd(t,e,n,i,r){var o=(e.startangle+e.endangle)/2,a=math.cos(o),s=math.sin(o),l=n?i:0,u=[a*l,s*l];r?t.animate().when(200,{position:u}).start("bounceout"):t.attr("position",u)}function pd(t,e){function n(){o.ignore=o.hoverignore,a.ignore=a.hoverignore}function i(){o.ignore=o.normalignore,a.ignore=a.normalignore}ky.call(this);var r=new fb({z2:2}),o=new yb,a=new ub;this.add(r),this.add(o),this.add(a),this.updatedata(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function gd(t,e,n,i,r,o,a){function s(e,n,i){for(var r=e;n>r;r++)if(t[r].y+=i,r>e&&n>r+1&&t[r+1].y>t[r].y+t[r].height)return void l(r,i/2);l(n-1,i/2)}function l(e,n){for(var i=e;i>=0&&(t[i].y-=n,!(i>0&&t[i].y>t[i-1].y+t[i-1].height));i--);}function u(t,e,n,i,r,o){for(var a=o>0?e?number.max_value:0:e?number.max_value:0,s=0,l=t.length;l>s;s++){var u=math.abs(t[s].y-i),h=t[s].len,c=t[s].len2,d=r+h>u?math.sqrt((r+h+c)*(r+h+c)-u*u):math.abs(t[s].x-n);e&&d>=a&&(d=a-10),!e&&a>=d&&(d=a+10),t[s].x=n+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var h,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)h=t[g].y-c,0>h&&s(g,d,-h,r),c=t[g].y+t[g].height;0>a-c&&l(d-1,c-a);for(var g=0;d>g;g++)t[g].y>=n?p.push(t[g]):f.push(t[g]);u(f,!1,e,n,i,r),u(p,!0,e,n,i,r)}function vd(t,e,n,i,r,o){for(var a=[],s=[],l=0;l0?"p":"n",o=i.getvisual("bordercolor"+r)||i.getvisual("color"+r),a=n.getmodel(ni).getitemstyle(fi);e.usestyle(a),e.style.fill=null,e.style.stroke=o}function md(t,e,n,i,r){var o;return o=n>i?-1:i>n?1:e>0?t.get(r,e-1)<=i?1:-1:1}function sd(t,e){var n,i=t.getbaseaxis(),r="category"===i.type?i.getbandwidth():(n=i.getextent(),math.abs(n[1]-n[0])/e.count()),o=jo(d(t.get("barmaxwidth"),r),r),a=jo(d(t.get("barminwidth"),1),r),s=t.get("barwidth");return null!=s?jo(s,r):math.max(math.min(r/2,o),a)}function td(t){return t.get("stack")||"__ec_stack_"+t.seriesindex}function id(t){return t.dim}function cd(t,e,n){var i=(n.getwidth(),n.getheight(),{}),r=ad(v(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 e=t.getdata(),n=t.coordinatesystem,o=n.getbaseaxis(),a=td(t),s=r[id(o)][a],l=s.offset,u=s.width,h=n.getotheraxis(o),c=t.coordinatesystem.cx,d=t.coordinatesystem.cy,f=t.get("barminheight")||0,p=t.get("barminangle")||0;i[a]=i[a]||[];for(var g=e.mapdimension(h.dim),v=e.mapdimension(o.dim),m=vu(e,g),y=h.getextent()[0],x=0,_=e.count();_>x;x++){var b=e.get(g,x),w=e.get(v,x);if(!isnan(b)){var m=b>=0?"p":"n",s=y;m&&(i[a][w]||(i[a][w]={p:y,n:y}),s=i[a][w][m]);var t,i,c,a;if("radius"===h.dim){var d=h.datatoradius(b)-y,k=o.datatoangle(w);math.abs(d)d?-1:1)*f),t=s,i=s+d,c=k-l,a=c-u,m&&(i[a][w][m]=i)}else{var p=h.datatoangle(b,!0)-y,l=o.datatoradius(w);math.abs(p)p?-1:1)*p),t=l+l,i=t+u,c=s,a=s+p,m&&(i[a][w][m]=a)}e.setitemlayout(x,{cx:c,cy:d,r0:t,r:i,startangle:-c*math.pi/180,endangle:-a*math.pi/180})}}}},this)}function ad(t){var e={};f(t,function(t){var n=t.getdata(),i=t.coordinatesystem,r=i.getbaseaxis(),o=r.getextent(),a="category"===r.type?r.getbandwidth():math.abs(o[1]-o[0])/n.count(),s=e[id(r)]||{bandwidth:a,remainedwidth:a,autowidthcount:0,categorygap:"20%",gap:"30%",stacks:{}},l=s.stacks;e[id(r)]=s;var u=td(t);l[u]||s.autowidthcount++,l[u]=l[u]||{width:0,maxwidth:0};var h=jo(t.get("barwidth"),a),c=jo(t.get("barmaxwidth"),a),d=t.get("bargap"),f=t.get("barcategorygap");h&&!l[u].width&&(h=math.min(s.remainedwidth,h),l[u].width=h,s.remainedwidth-=h),c&&(l[u].maxwidth=c),null!=d&&(s.gap=d),null!=f&&(s.categorygap=f)});var n={};return f(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandwidth,o=jo(t.categorygap,r),a=jo(t.gap,1),s=t.remainedwidth,l=t.autowidthcount,u=(s-o)/(l+(l-1)*a);u=math.max(u,0),f(i,function(t){var e=t.maxwidth;e&&u>e&&(e=math.min(e,s),t.width&&(e=math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*a),u=math.max(u,0);var h,c=0;f(i,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+a)}),h&&(c-=h.width*a);var d=-c/2;f(i,function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+a)})}),n}function dd(t,e){tt.call(this,"radius",t,e),this.type="category"}function kd(t,e){e=e||[0,360],tt.call(this,"angle",t,e),this.type="category"}function pd(t,e){return e.type||(e.data?"category":"value")}function ld(t,e,n){var i=e.get("center"),r=n.getwidth(),o=n.getheight();t.cx=jo(i[0],r),t.cy=jo(i[1],o);var a=t.getradiusaxis(),s=math.min(r,o)/2,l=jo(e.get("radius"),s);a.inverse?a.setextent(l,0):a.setextent(0,l)}function od(t){var e=this,n=e.getangleaxis(),i=e.getradiusaxis();if(n.scale.setextent(1/0,-1/0),i.scale.setextent(1/0,-1/0),t.eachseries(function(t){if(t.coordinatesystem===e){var r=t.getdata();f(r.mapdimension("radius",!0),function(t){i.scale.unionextentfromdata(r,fu(r,t))}),f(r.mapdimension("angle",!0),function(t){n.scale.unionextentfromdata(r,fu(r,t))})}}),dh(n.scale,n.model),dh(i.scale,i.model),"category"===n.type&&!n.onband){var r=n.getextent(),o=360/n.scale.count();n.inverse?r[1]+=o:r[1]-=o,n.setextent(r[0],r[1])}}function zd(t,e){if(t.type=e.get("type"),t.scale=fh(e),t.onband=e.get("boundarygap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleaxis"===e.maintype){t.inverse^=e.get("clockwise");var n=e.get("startangle");t.setextent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}function rd(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordtopoint([e[0],n]),r=t.coordtopoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function ed(t){var e=t.getradiusaxis();return e.inverse?0:1}function bd(t){var e=t[0],n=t[t.length-1];e&&n&&math.abs(math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}function nd(t,e,n){return{position:[t.cx,t.cy],rotation:n/180*math.pi,labeldirection:-1,tickdirection:-1,namedirection:1,labelrotate:e.getmodel("axislabel").get("rotate"),z2:1}}function vd(t,e,n,i,r){var o=t.axis;if(!o.scale.isblank()&&o.containdata(e)){if(!t.involveseries)return void n.showpointer(t,e);var s=fd(e,t),l=s.payloadbatch,u=s.snaptovalue;l[0]&&null==r.seriesindex&&a(r,l[0]),!i&&t.snap&&o.containdata(u)&&null!=u&&(e=u),n.showpointer(t,e,l,r),n.showtooltip(t,s,u)}}function fd(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=number.max_value,s=-1;return ac(e.seriesmodels,function(e){var l,u,h=e.getdata().mapdimension(i,!0);if(e.getaxistooltipdata){var c=e.getaxistooltipdata(h,t,n);u=c.dataindices,l=c.nestestvalue}else{if(u=e.getdata().indicesofnearest(h[0],t,"category"===n.type?.5:null),!u.length)return;l=e.getdata().get(h[0],u[0])}if(null!=l&&isfinite(l)){var d=t-l,f=math.abs(d);a>=f&&((a>f||d>=0&&0>s)&&(a=f,s=d,r=l,o.length=0),ac(u,function(t){o.push({seriesindex:e.seriesindex,dataindexinside:t,dataindex:e.getdata().getrawindex(t)})}))}}),{payloadbatch:o,snaptovalue:r}}function hd(t,e,n,i){t[e.key]={value:n,payloadbatch:i}}function gd(t,e,n,i){var r=n.payloadbatch,o=e.axis,a=o.model,s=e.axispointermodel;if(e.triggertooltip&&r.length){var l=e.coordsys.model,u=pc(l),h=t.map[u];h||(h=t.map[u]={coordsysid:l.id,coordsysindex:l.componentindex,coordsystype:l.type,coordsysmaintype:l.maintype,databyaxis:[]},t.list.push(h)),h.databyaxis.push({axisdim:o.dim,axisindex:a.componentindex,axistype:a.type,axisid:a.id,value:i,valuelabelopt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesdataindices:r.slice()})}}function wd(t,e,n){var i=n.axesinfo=[];ac(e,function(e,n){var r=e.axispointermodel.option,o=t[n];o?(!e.usehandle&&(r.status="show"),r.value=o.value,r.seriesdataindices=(o.payloadbatch||[]).slice()):!e.usehandle&&(r.status="hide"),"show"===r.status&&i.push({axisdim:e.axis.dim,axisindex:e.axis.model.componentindex,value:r.value})})}function zd(t,e,n,i){if(qd(e)||!t.list.length)return void i({type:"hidetip"});var r=((t.list[0].databyaxis[0]||{}).seriesdataindices||[])[0]||{};i({type:"showtip",escapeconnect:!0,x:e[0],y:e[1],tooltipoption:n.tooltipoption,position:n.position,dataindexinside:r.dataindexinside,dataindex:r.dataindex,seriesindex:r.seriesindex,databycoordsys:t.list})}function xd(t,e,n){var i=n.getzr(),r="axispointerlasthighlights",o=lc(i)[r]||{},a=lc(i)[r]={};ac(t,function(t){var e=t.axispointermodel.option;"show"===e.status&&ac(e.seriesdataindices,function(t){var e=t.seriesindex+" | "+t.dataindex;a[e]=t})});var s=[],l=[];f(o,function(t,e){!a[e]&&l.push(t)}),f(a,function(t,e){!o[e]&&s.push(t)}),l.length&&n.dispatchaction({type:"downplay",escapeconnect:!0,batch:l}),s.length&&n.dispatchaction({type:"highlight",escapeconnect:!0,batch:s})}function yd(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisdim&&e.axis.model.componentindex===i.axisindex)return i}}function ud(t){var e=t.axis.model,n={},i=n.axisdim=t.axis.dim;return n.axisindex=n[i+"axisindex"]=e.componentindex,n.axisname=n[i+"axisname"]=e.name,n.axisid=n[i+"axisid"]=e.id,n}function qd(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function jd(t,e,n){if(!fm.node){var i=e.getzr();hc(i).records||(hc(i).records={}),kd(i,e);var r=hc(i).records[t]||(hc(i).records[t]={});r.handler=n}}function kd(t,e){function n(n,i){t.on(n,function(n){var r=tf(e);cc(hc(t).records,function(t){t&&i(t,n,r.dispatchaction)}),$d(r.pendings,e)})}hc(t).initialized||(hc(t).initialized=!0,n("click",x(qd,"click")),n("mousemove",x(qd,"mousemove")),n("globalout",jd))}function $d(t,e){var n,i=t.showtip.length,r=t.hidetip.length;i?n=t.showtip[i-1]:r&&(n=t.hidetip[r-1]),n&&(n.dispatchaction=null,e.dispatchaction(n))}function jd(t,e,n){t.handler("leave",null,n)}function qd(t,e,n,i){e.handler(t,n,i)}function tf(t){var e={showtip:[],hidetip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchaction=n,t.dispatchaction(i))};return{dispatchaction:n,pendings:e}}function ef(t,e){if(!fm.node){var n=e.getzr(),i=(hc(n).records||{})[t];i&&(hc(n).records[t]=null)}}function nf(){}function rf(t,e,n,i){of(fc(n).lastprop,i)||(fc(n).lastprop=i,e?ro(n,i,t):(n.stopanimation(),n.attr(i)))}function of(t,e){if(m(t)&&m(e)){var n=!0;return f(e,function(e,i){n=n&&of(t[i],e)}),!!n}return t===e}function af(t,e){t[e.get("label.show")?"show":"hide"]()}function sf(t){return{position:t.position.slice(),rotation:t.rotation||0}}function lf(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function uf(t){var e,n=t.get("type"),i=t.getmodel(n+"style");return"line"===n?(e=i.getlinestyle(),e.fill=null):"shadow"===n&&(e=i.getareastyle(),e.stroke=null),e}function hf(t,e,n,i,r){var o=n.get("value"),a=df(o,e.axis,e.ecmodel,n.get("seriesdataindices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),s=n.getmodel("label"),l=jb(s.get("padding")||0),u=s.getfont(),h=nn(a,u),c=r.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=r.verticalalign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),cf(c,d,f,i);var v=s.get("backgroundcolor");v&&"auto"!==v||(v=e.get("axisline.linestyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderradius")},position:c.slice(),style:{text:a,textfont:u,textfill:s.gettextcolor(),textposition:"inside",fill:v,stroke:s.get("bordercolor")||"transparent",linewidth:s.get("borderwidth")||0,shadowblur:s.get("shadowblur"),shadowcolor:s.get("shadowcolor"),shadowoffsetx:s.get("shadowoffsetx"),shadowoffsety:s.get("shadowoffsety")},z2:10}}function cf(t,e,n,i){var r=i.getwidth(),o=i.getheight();t[0]=math.min(t[0]+e,r)-e,t[1]=math.min(t[1]+n,o)-n,t[0]=math.max(t[0],0),t[1]=math.max(t[1],0)}function df(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getlabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:vh(e,t),seriesdata:[]};f(i,function(t){var e=n.getseriesbyindex(t.seriesindex),i=t.dataindexinside,r=e&&e.getdataparams(i);r&&s.seriesdata.push(r)}),w(a)?o=a.replace("{value}",o):b(a)&&(o=a(s))}return o}function ff(t,e,n){var i=te();return ke(i,i,n.rotation),de(i,i,n.position),no([t.datatocoord(e),(n.labeloffset||0)+(n.labeldirection||1)*(n.labelmargin||0)],i)}function pf(t,e,n,i,r,o){var a=ut.innertextlayout(n.rotation,0,n.labeldirection);n.labelmargin=r.get("label.margin"),hf(e,i,r,o,{position:ff(i.axis,t,n),align:a.textalign,verticalalign:a.textverticalalign})}function gf(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function vf(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function mf(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startangle:r,endangle:o,clockwise:!0}}function yf(t,e){var n={};return n[e.dim+"axisindex"]=e.index,t.getcartesian(n)}function xf(t){return"x"===t.dim?0:1}function _f(t,e,n,i,r){var o=e.axis,a=o.datatocoord(t),s=i.getangleaxis().getextent()[0];s=s/180*math.pi;var l,u,h,c=i.getradiusaxis().getextent();if("radius"===o.dim){var d=te();ke(d,d,s),de(d,d,[i.cx,i.cy]),l=no([a,-r],d);var f=e.getmodel("axislabel").get("rotate")||0,p=ut.innertextlayout(s,f*math.pi/180,-1);u=p.textalign,h=p.textverticalalign}else{var g=c[1];l=i.coordtopoint([g+r,a]);var v=i.cx,m=i.cy;u=math.abs(l[0]-v)/g<.3?"center":l[0]>v?"left":"right",h=math.abs(l[1]-m)/g<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalalign:h}}function bf(){by.call(this)}function wf(t){this.name=t,this.zoomlimit,by.call(this),this._roamtransformable=new bf,this._rawtransformable=new bf,this._center,this._zoom}function mf(t,e,n,i){var r=n.seriesmodel,o=r?r.coordinatesystem:null;return o===this?o[t](i):null}function sf(t){for(var e,n=0;n1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else o=t.getboxlayoutparams(),o.aspect=c,f=ia(o,{width:u,height:h});this.setviewrect(f.x,f.y,f.width,f.height),this.setcenter(t.get("center")),this.setzoom(t.get("zoom"))}function pf(t,e){f(e.get("geocoord"),function(e,n){t.addgeocoord(n,e)})}function lf(t,e,n){var i=rf(t);i[e]=n}function of(t,e,n){var i=rf(t),r=i[e];r===n&&(i[e]=null)}function zf(t,e){return!!rf(t)[e]}function rf(t){return t[fc]||(t[fc]={})}function ef(t){this.pointerchecker,this._zr=t,this._opt={};var e=y,n=e(bf,this),r=e(nf,this),o=e(vf,this),a=e(ff,this),l=e(hf,this);ly.call(this),this.setpointerchecker=function(t){this.pointerchecker=t},this.enable=function(e,u){this.disable(),this._opt=s(i(u)||{},{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",n),t.on("mousemove",r),t.on("mouseup",o)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",a),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",l)},this.dispose=this.disable,this.isdragging=function(){return this._dragging},this.ispinching=function(){return this._pinching}}function bf(t){if(!(ye(t)||t.target&&t.target.draggable)){var e=t.offsetx,n=t.offsety;this.pointerchecker&&this.pointerchecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}}function nf(t){if(this._dragging&&zf("moveonmousemove",t,this._opt)&&"pinch"!==t.gestureevent&&!zf(this._zr,"globalpan")){var e=t.offsetx,n=t.offsety,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventdefaultmousemove&&cy(t.event),wf(this,"pan","moveonmousemove",t,{dx:o,dy:a,oldx:i,oldy:r,newx:e,newy:n})}}function vf(t){ye(t)||(this._dragging=!1)}function ff(t){var e=zf("zoomonmousewheel",t,this._opt),n=zf("moveonmousewheel",t,this._opt),i=t.wheeldelta,r=math.abs(i),o=t.offsetx,a=t.offsety;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1,l=i>0?s:1/s;gf(this,"zoom","zoomonmousewheel",t,{scale:l,originx:o,originy:a})}if(n){var u=math.abs(i),h=(i>0?1:-1)*(u>3?.4:u>1?.15:.05);gf(this,"scrollmove","moveonmousewheel",t,{scrolldelta:h,originx:o,originy:a})}}}function hf(t){if(!zf(this._zr,"globalpan")){var e=t.pinchscale>1?1.1:1/1.1;gf(this,"zoom",null,t,{scale:e,originx:t.pinchx,originy:t.pinchy})}}function gf(t,e,n,i,r){t.pointerchecker&&t.pointerchecker(i,r.originx,r.originy)&&(cy(i.event),wf(t,e,n,i,r))}function wf(t,e,n,i,r){r.isavailablebehavior=y(zf,null,n,i),t.trigger(e,r)}function zf(t,e,n){var i=n[t];return!t||i&&(!w(i)||e.event[i+"key"])}function xf(t,e,n){var i=t.target,r=i.position;r[0]+=e,r[1]+=n,i.dirty()}function yf(t,e,n,i){var r=t.target,o=t.zoomlimit,a=r.position,s=r.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var u=o.min||0,h=o.max||1/0;l=math.max(math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,a[0]-=(n-a[0])*(c-1),a[1]-=(i-a[1])*(c-1),s[0]*=c,s[1]*=c,r.dirty()}function uf(t,e,n){var i=e.getcomponentbyelement(t.toptarget),r=i&&i.coordinatesystem;return i&&i!==n&&!hc[i.maintype]&&r&&r.model!==n}function qf(t){var e=t.getitemstyle(),n=t.get("areacolor");return null!=n&&(e.fill=n),e}function jf(t,e,n,i,r){n.off("click"),n.off("mousedown"),e.get("selectedmode")&&(n.on("mousedown",function(){t._mousedownflag=!0}),n.on("click",function(o){if(t._mousedownflag){t._mousedownflag=!1;for(var a=o.target;!a.__regions;)a=a.parent;if(a){var s={type:("geo"===e.maintype?"geo":"map")+"toggleselect",batch:p(a.__regions,function(t){return{name:t.name,from:r.uid}})};s[e.maintype+"id"]=e.id,i.dispatchaction(s),kf(e,n)}}}))}function kf(t,e){e.eachchild(function(e){f(e.__regions,function(n){e.trigger(t.isselected(n.name)?"emphasis":"normal")})})}function $f(t,e){var n=new ky;this.uid=uo("ec_map_draw"),this._controller=new ef(t.getzr()),this._controllerhost={target:e?n:null},this.group=n,this._updategroup=e,this._mousedownflag,this._mapname,this._initialized,n.add(this._regionsgroup=new ky),n.add(this._backgroundgroup=new ky)}function jf(t,e,n){var i=t.getzoom(),r=t.getcenter(),o=e.zoom,a=t.datatopoint(r);if(null!=e.dx&&null!=e.dy){a[0]-=e.dx,a[1]-=e.dy;var r=t.pointtodata(a);t.setcenter(r)}if(null!=o){if(n){var s=n.min||0,l=n.max||1/0;o=math.max(math.min(i*o,l),s)/i}t.scale[0]*=o,t.scale[1]*=o;var u=t.position,h=(e.originx-u[0])*(o-1),c=(e.originy-u[1])*(o-1);u[0]-=h,u[1]-=c,t.updatetransform();var r=t.pointtodata(a);t.setcenter(r),t.setzoom(o*i)}return{center:t.getcenter(),zoom:t.getzoom()}}function qf(t,e){e.update="updateview",nu(e,function(e,n){var i={};return n.eachcomponent({maintype:"geo",query:e},function(n){n[t](e.name);var r=n.coordinatesystem;f(r.regions,function(t){i[t.name]=n.isselected(t.name)||!1})}),{selected:i,name:e.name}})}function tp(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}function ep(t,e){var n=[];return t.eachcomponent("singleaxis",function(i,r){var o=new tp(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinatesystem=o,n.push(o)}),t.eachseries(function(e){if("singleaxis"===e.get("coordinatesystem")){var n=t.querycomponents({maintype:"singleaxis",index:e.get("singleaxisindex"),id:e.get("singleaxisid")})[0];e.coordinatesystem=n&&n.coordinatesystem}}),n}function np(t,e){e=e||{};var n=t.coordinatesystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getrect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];var h={horizontal:0,vertical:1};r.rotation=math.pi/2*h[a];var c={top:-1,bottom:1,right:1,left:-1};r.labeldirection=r.tickdirection=r.namedirection=c[o],t.get("axistick.inside")&&(r.tickdirection=-r.tickdirection),a(e.labelinside,t.get("axislabel.inside"))&&(r.labeldirection=-r.labeldirection);var d=e.rotate;return null==d&&(d=t.get("axislabel.rotate")),r.labelrotation="top"===o?-d:d,r.z2=1,r}function ip(t,e){return e.type||(e.data?"category":"value")}function rp(t){return t.ishorizontal()?0:1}function op(t,e){var n=t.getrect();return[n[qc[e]],n[qc[e]]+n[jc[e]]]}function ap(t){this._model=t}function sp(t,e,n,i){var r=n.calendarmodel,o=n.seriesmodel,a=r?r.coordinatesystem:o?o.coordinatesystem:null;return a===this?a[t](i):null}function lp(t,e){var n=t.cellsize;_(n)?1===n.length&&(n[1]=n[0]):n=t.cellsize=[n,n];var i=p([0,1],function(t){return aa(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]});da(t,e,{type:"box",ignoresize:i})}function up(t,e,n){var i,r={},o="toggleselected"===t;return n.eachcomponent("legend",function(n){o&&null!=i?n[i?"select":"unselect"](e.name):(n[t](e.name),i=n.isselected(e.name));var a=n.getdata();f(a,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isselected(e);r[e]=r.hasownproperty(e)?r[e]&&i:i}})}),{name:e.name,selected:r}}function hp(t,e,n){var i=e.getboxlayoutparams(),r=e.get("padding"),o={width:n.getwidth(),height:n.getheight()},a=ia(i,o,r);lw(e.get("orient"),t,e.get("itemgap"),a.width,a.height),ca(t,i,o,r)}function cp(t,e){var n=jb(e.get("padding")),i=e.getitemstyle(["color","opacity"]);i.fill=e.get("backgroundcolor");var t=new bb({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderradius")},style:i,silent:!0,z2:-1});return t}function dp(t,e){e.dispatchaction({type:"legendtoggleselect",name:t})}function fp(t,e,n,i){var r=n.getzr().storage.getdisplaylist()[0];r&&r.usehoverlayer||n.dispatchaction({type:"highlight",seriesname:t,name:e,excludeseriesid:i})}function pp(t,e,n,i){var r=n.getzr().storage.getdisplaylist()[0];r&&r.usehoverlayer||n.dispatchaction({type:"downplay",seriesname:t,name:e,excludeseriesid:i})}function gp(t,e,n){var i=t.getorient(),r=[1,1];r[i.index]=0,da(e,n,{type:"box",ignoresize:r})}function vp(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return p(ga,function(t){return t+"transition:"+n}).join(";")}function mp(t){var e=[],n=t.get("fontsize"),i=t.gettextcolor();return i&&e.push("color:"+i),e.push("font:"+t.getfont()),n&&e.push("line-height:"+math.round(3*n/2)+"px"),fa(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function yp(t){var e=[],n=t.get("transitionduration"),i=t.get("backgroundcolor"),r=t.getmodel("textstyle"),o=t.get("padding");return n&&e.push(vp(n)),i&&(fm.canvassupported?e.push("background-color:"+i):(e.push("background-color:#"+ke(i)),e.push("filter:alpha(opacity=70)"))),fa(["width","color","radius"],function(n){var i="border-"+n,r=pa(i),o=t.get(r);null!=o&&e.push(i+":"+o+("color"===n?"":"px"))}),e.push(mp(r)),null!=o&&e.push("padding:"+jb(o).join("px ")+"px"),e.join(";")+";"}function xp(t,e){if(fm.wxa)return null;var n=document.createelement("div"),i=this._zr=e.getzr();this.el=n,this._x=e.getwidth()/2,this._y=e.getheight()/2,t.appendchild(n),this._container=t,this._show=!1,this._hidetimeout;var r=this;n.onmouseenter=function(){r._enterable&&(cleartimeout(r._hidetimeout),r._show=!0),r._incontent=!0},n.onmousemove=function(e){if(e=e||window.event,!r._enterable){var n=i.handler;ge(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hidelater(r._hidedelay),r._incontent=!1}}function _p(t){this._zr=t.getzr(),this._show=!1,this._hidetimeout}function bp(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(zo.isinstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new zo(n,e,e.ecmodel))}return e}function wp(t,e){return t.dispatchaction||y(e.dispatchaction,e)}function mp(t,e,n,i,r,o,a){var s=n.getoutersize(),l=s.width,u=s.height;return null!=o&&(t+l+o>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}function sp(t,e,n,i,r){var o=n.getoutersize(),a=o.width,s=o.height;return t=math.min(t+a,i)-a,e=math.min(e+s,r)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}function tp(t,e,n){var i=n[0],r=n[1],o=5,a=0,s=0,l=e.width,u=e.height;switch(t){case"inside":a=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":a=e.x+l/2-i/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-i/2,s=e.y+u+o;break;case"left":a=e.x-i-o,s=e.y+u/2-r/2;break;case"right":a=e.x+l+o,s=e.y+u/2-r/2}return[a,s]}function ip(t){return"center"===t||"middle"===t}function cp(t){ni(t,"label",["show"])}function ap(t){return!(isnan(parsefloat(t.x))&&isnan(parsefloat(t.y)))}function dp(t){return!isnan(parsefloat(t.x))&&!isnan(parsefloat(t.y))}function kp(t,e,n,i,r,o){var a=[],s=vu(e,i),l=s?e.getcalculationinfo("stackresultdimension"):i,u=ep(e,l,t),h=e.indicesofnearest(l,u)[0];a[r]=e.get(n,h),a[o]=e.get(i,h);var c=ea(e.get(i,h));return c=math.min(c,20),c>=0&&(a[o]=+a[o].tofixed(c)),a}function pp(t,e){var n=t.getdata(),r=t.coordinatesystem;if(e&&!dp(e)&&!_(e.coord)&&r){var o=r.dimensions,a=lp(e,n,r,t);if(e=i(e),e.type&&ia[e.type]&&a.baseaxis&&a.valueaxis){var s=sa(o,a.baseaxis.dim),l=sa(o,a.valueaxis.dim);e.coord=ia[e.type](n,a.basedatadim,a.valuedatadim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xaxis?e.xaxis:e.radiusaxis,null!=e.yaxis?e.yaxis:e.angleaxis],h=0;2>h;h++)ia[u[h]]&&(u[h]=ep(n,n.mapdimension(o[h]),u[h]));e.coord=u}}return e}function lp(t,e,n,i){var r={};return null!=t.valueindex||null!=t.valuedim?(r.valuedatadim=null!=t.valueindex?e.getdimension(t.valueindex):t.valuedim,r.valueaxis=n.getaxis(op(i,r.valuedatadim)),r.baseaxis=n.getotheraxis(r.valueaxis),r.basedatadim=e.mapdimension(r.baseaxis.dim)):(r.baseaxis=i.getbaseaxis(),r.valueaxis=n.getotheraxis(r.baseaxis),r.basedatadim=e.mapdimension(r.baseaxis.dim),r.valuedatadim=e.mapdimension(r.valueaxis.dim)),r}function op(t,e){var n=t.getdata(),i=n.dimensions;e=n.getdimension(e);for(var r=0;ri?t.coord&&t.coord[i]:t.value}function ep(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,function(t){isnan(t)||(i+=t,r++)}),i/r}return"median"===n?t.getmedian(e):t.getdataextent(e,!0)["max"===n?1:0]}function bp(t,e,n){var i=e.coordinatesystem;t.each(function(r){var o,a=t.getitemmodel(r),s=jo(a.get("x"),n.getwidth()),l=jo(a.get("y"),n.getheight());if(isnan(s)||isnan(l)){if(e.getmarkerposition)o=e.getmarkerposition(t.getvalues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.datatopoint([u,h])}}else o=[s,l];isnan(s)||(o[0]=s),isnan(l)||(o[1]=l),t.setitemlayout(r,o)})}function np(t,e,n){var i;i=t?p(t&&t.dimensions,function(t){var n=e.getdata().getdimensioninfo(e.getdata().mapdimension(t))||{};return s({name:t},n)}):[{name:"value",type:"float"}];var r=new ps(i,n),o=p(n.get("data"),x(pp,e));return t&&(o=v(o,x(zp,t))),r.initdata(o,null,t?rp:function(t){return t.value}),r}function vp(t){return!isnan(t)&&!isfinite(t)}function fp(t,e,n){var i=1-t;return vp(e[i])&&vp(n[i])}function hp(t,e){var n=e.coord[0],i=e.coord[1];return"cartesian2d"===t.type&&n&&i&&(fp(1,n,i,t)||fp(0,n,i,t))?!0:zp(t,{coord:n,x:e.x0,y:e.y0})||zp(t,{coord:i,x:e.x1,y:e.y1})}function gp(t,e,n,i,r){var o,a=i.coordinatesystem,s=t.getitemmodel(e),l=jo(s.get(n[0]),r.getwidth()),u=jo(s.get(n[1]),r.getheight());if(isnan(l)||isnan(u)){if(i.getmarkerposition)o=i.getmarkerposition(t.getvalues(n,e));else{var h=t.get(n[0],e),c=t.get(n[1],e),d=[h,c];a.clampdata&&a.clampdata(d,d),o=a.datatopoint(d,!0)}if("cartesian2d"===a.type){var f=a.getaxis("x"),p=a.getaxis("y"),h=t.get(n[0],e),c=t.get(n[1],e);vp(h)?o[0]=f.toglobalcoord(f.getextent()["x0"===n[0]?0:1]):vp(c)&&(o[1]=p.toglobalcoord(p.getextent()["y0"===n[1]?0:1]))}isnan(l)||(o[0]=l),isnan(u)||(o[1]=u)}else o=[l,u];return o}function wp(t,e,n){var i,r,o=["x0","y0","x1","y1"];t?(i=p(t&&t.dimensions,function(t){var n=e.getdata(),i=n.getdimensioninfo(n.mapdimension(t))||{};return s({name:t},i)}),r=new ps(p(o,function(t,e){return{name:t,type:i[e%2].type}}),n)):(i=[{name:"value",type:"float"}],r=new ps(i,n));var a=p(n.get("data"),x(aa,e,t,n));t&&(a=v(a,x(hp,t)));var l=t?function(t,e,n,i){return t.coord[math.floor(i/2)][i%2]}:function(t){return t.value};return r.initdata(a,null,l),r.hasitemoption=!0,r}function zp(t){var e=t.type,n={number:"value",time:"time"};if(n[e]&&(t.axistype=n[e],delete t.type),xp(t),yp(t,"controlposition")){var i=t.controlstyle||(t.controlstyle={});yp(i,"position")||(i.position=t.controlposition),"none"!==i.position||yp(i,"show")||(i.show=!1,delete i.position),delete t.controlposition}f(t.data||[],function(t){m(t)&&!_(t)&&(!yp(t,"value")&&yp(t,"name")&&(t.value=t.name),xp(t))})}function xp(t){var e=t.itemstyle||(t.itemstyle={}),n=e.emphasis||(e.emphasis={}),i=t.label||t.label||{},r=i.normal||(i.normal={}),o={normal:1,emphasis:1};f(i,function(t,e){o[e]||yp(r,e)||(r[e]=t)}),n.label&&!yp(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function yp(t,e){return t.hasownproperty(e)}function up(t,e){return ia(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()},t.get("padding"))}function qp(t,e,n,r){var o=eo(t.get(e).replace(/^path:\/\//,""),i(r||{}),new xn(n[0],n[1],n[2],n[3]),"center");return o}function jp(t,e,n,i,o,a){var s=e.get("color");if(o)o.setcolor(s),n.add(o),a&&a.onupdate(o);else{var l=t.get("symbol");o=wh(l,-1,-1,2,2,s),o.setstyle("strokenoscale",!0),n.add(o),a&&a.oncreate(o)}var u=e.getitemstyle(["color","symbol","symbolsize"]);o.setstyle(u),i=r({recthover:!0,z2:100},i,!0);var h=t.get("symbolsize");h=h instanceof array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,i.scale=h;var c=t.get("symboloffset");if(c){var d=i.position=i.position||[0,0];d[0]+=jo(c[0],h[0]),d[1]+=jo(c[1],h[1])}var f=t.get("symbolrotate");return i.rotation=(f||0)*math.pi/180||0,o.attr(i),o.updatetransform(),o}function kp(t,e,n,i,r){if(!t.dragging){var o=i.getmodel("checkpointstyle"),a=n.datatocoord(i.getdata().get(["value"],e));r||!o.get("animation",!0)?t.attr({position:[a,0]}):(t.stopanimation(!0),t.animateto({position:[a,0]},o.get("animationduration",!0),o.get("animationeasing",!0))) }}function $p(t){return u(va,t)>=0}function jp(t,e){t=t.slice();var n=p(t,wa);e=(e||[]).slice();var i=p(e,wa);return function(r,o){f(t,function(t,a){for(var s={name:t,capital:n[a]},l=0;l=0}function r(t,i){var r=!1;return e(function(e){f(n(t,e)||[],function(t){i.records[e.name][t]&&(r=!0)})}),r}function o(t,i){i.nodes.push(t),e(function(e){f(n(t,e)||[],function(t){i.records[e.name][t]=!0})})}return function(n){function a(t){!i(t,s)&&r(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!n)return s;o(n,s);var l;do l=!1,t(a);while(l);return s}}function tg(t,e,n){var i=[1/0,-1/0];return ha(n,function(t){var n=t.getdata();n&&ha(n.mapdimension(e,!0),function(t){var e=n.getapproximateextent(t);e[0]i[1]&&(i[1]=e[1])})}),i[1]0?0:0/0);var a=n.getmax(!0);return null!=a&&"datamax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:0/0),n.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function ng(t,e){var n=t.getaxismodel(),i=t._percentwindow,r=t._valuewindow;if(i){var o=ia(r,[0,500]);o=math.min(o,20);var a=e||0===i[0]&&100===i[1];n.setrange(a?null:+r[0].tofixed(o),a?null:+r[1].tofixed(o))}}function ig(t){var e=t._minmaxspan={},n=t._datazoommodel;ha(["min","max"],function(i){e[i+"span"]=n.get(i+"span");var r=n.get(i+"valuespan");if(null!=r&&(e[i+"valuespan"]=r,r=t.getaxismodel().axis.scale.parse(r),null!=r)){var o=t._dataextent;e[i+"span"]=$o(o[0]+r,o,[0,100],!0)}})}function rg(t){var e={};return za(["start","end","startvalue","endvalue","throttle"],function(n){t.hasownproperty(n)&&(e[n]=t[n])}),e}function og(t,e){var n=t._rangepropmode,i=t.get("rangemode");za([["start","startvalue"],["end","endvalue"]],function(t,r){var o=null!=e[t[0]],a=null!=e[t[1]];o&&!a?n[r]="percent":!o&&a?n[r]="value":i?n[r]=i[r]:o&&(n[r]="percent")})}function ag(t,e){var n=t[e]-t[1-e];return{span:math.abs(n),sign:n>0?-1:0>n?1:e?-1:1}}function sg(t,e){return math.min(e[1],math.max(e[0],t))}function lg(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function ug(t){return"vertical"===t?"ns-resize":"ew-resize"}function hg(t,e){var n=fg(t),i=e.datazoomid,r=e.coordid;f(n,function(t){var n=t.datazoominfos;n[i]&&u(e.allcoordids,r)<0&&(delete n[i],t.count--)}),gg(n);var o=n[r];o||(o=n[r]={coordid:r,datazoominfos:{},count:0},o.controller=pg(t,o),o.dispatchaction=x(vg,t)),!o.datazoominfos[i]&&o.count++,o.datazoominfos[i]=e;var a=mg(o.datazoominfos);o.controller.enable(a.controltype,a.opt),o.controller.setpointerchecker(e.containspoint),js(o,"dispatchaction",e.datazoommodel.get("throttle",!0),"fixrate")}function cg(t,e){var n=fg(t);f(n,function(t){t.controller.dispose();var n=t.datazoominfos;n[e]&&(delete n[e],t.count--)}),gg(n)}function dg(t){return t.type+"\x00_"+t.id}function fg(t){var e=t.getzr();return e[ld]||(e[ld]={})}function pg(t,e){var n=new ef(t.getzr());return f(["pan","zoom","scrollmove"],function(t){n.on(t,function(n){var i=[];f(e.datazoominfos,function(r){if(n.isavailablebehavior(r.datazoommodel.option)){var o=(r.getrange||{})[t],a=o&&o(e.controller,n);!r.datazoommodel.get("disabled",!0)&&a&&i.push({datazoomid:r.datazoomid,start:a[0],end:a[1]})}}),i.length&&e.dispatchaction(i)})}),n}function gg(t){f(t,function(e,n){e.count||(e.controller.dispose(),delete t[n])})}function vg(t,e){t.dispatchaction({type:"datazoom",batch:e})}function mg(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return f(t,function(t){var o=t.datazoommodel,a=o.get("disabled",!0)?!1:o.get("zoomlock",!0)?"move":!0;i[n+a]>i[n+e]&&(e=a),r&=o.get("preventdefaultmousemove",!0)}),{controltype:e,opt:{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!0,preventdefaultmousemove:!!r}}}function yg(t){return function(e,n,i,r){var o=this._range,a=o.slice(),s=e.axismodels[0];if(s){var l=t(a,s,e,n,i,r);return qa(l,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function xg(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,n){t.push(n)})}function _g(t){var e=t.piecelist;t.hasspecialvisual=!1,f(e,function(e,n){e.originindex=n,null!=e.visual&&(t.hasspecialvisual=!0)})}function bg(t){var e=t.categories,n=t.visual,i=t.categorymap={};if(gd(e,function(t,e){i[t]=e}),!_(n)){var r=[];m(n)?gd(n,function(t,e){var n=i[e];r[null!=n?n:md]=t}):r[md]=n,n=kg(t,r)}for(var o=e.length-1;o>=0;o--)null==n[o]&&(delete i[e[o]],e.pop())}function wg(t,e){var n=t.visual,i=[];m(n)?gd(n,function(t){i.push(t)}):null!=n&&i.push(n);var r={color:1,symbol:1};e||1!==i.length||r.hasownproperty(t.type)||(i[1]=i[0]),kg(t,i)}function mg(t){return{applyvisual:function(e,n,i){e=this.mapvaluetovisual(e),i("color",t(n("color"),e))},_domap:ag([0,1])}}function sg(t){var e=this.option.visual;return e[math.round($o(t,[0,1],[0,e.length-1],!0))]||{}}function tg(t){return function(e,n,i){i(t,this.mapvaluetovisual(e))}}function ig(t){var e=this.option.visual;return e[this.option.loop&&t!==md?t%e.length:t]}function cg(){return this.option.visual[0]}function ag(t){return{linear:function(e){return $o(e,t,this.option.visual,!0)},category:ig,piecewise:function(e,n){var i=dg.call(this,n);return null==i&&(i=$o(e,t,this.option.visual,!0)),i},fixed:cg}}function dg(t){var e=this.option,n=e.piecelist;if(e.hasspecialvisual){var i=yd.findpieceindex(t,n),r=n[i];if(r&&r.visual)return r.visual[this.type]}}function kg(t,e){return t.visual=e,"color"===t.type&&(t.parsedvisual=p(e,function(t){return ye(t)})),e}function pg(t,e,n){return t?n>=e:n>e}function lg(t){if(t)for(var e in t)if(t.hasownproperty(e))return!0}function og(t,e,n){function r(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return bd(e,function(e){var a=o[e]=r();bd(t[e],function(t,r){if(yd.isvalidtype(r)){var o={type:r,visual:t};n&&n(o,e),a[r]=new yd(o),"opacity"===r&&(o=i(o),o.type="coloralpha",a.__hidden.__alphaforopacity=new yd(o))}})}),o}function zg(t,e,n){var r;f(n,function(t){e.hasownproperty(t)&&lg(e[t])&&(r=!0)}),r&&f(n,function(n){e.hasownproperty(n)&&lg(e[n])?t[n]=i(e[n]):delete t[n]})}function rg(t,e,n,i,r,o){function a(t){return n.getitemvisual(h,t)}function s(t,e){n.setitemvisual(h,t,e)}function l(t,l){h=null==o?t:l;var c=n.getrawdataitem(h);if(!c||c.visualmap!==!1)for(var d=i.call(r,t),f=e[d],p=u[d],g=0,v=p.length;v>g;g++){var m=p[g];f[m]&&f[m].applyvisual(t,a,s)}}var u={};f(t,function(t){var n=yd.preparevisualtypes(e[t]);u[t]=n});var h;null==o?n.each(l):n.each([o],l)}function eg(t,e,n,i){function r(t,r){function a(t){return r.getitemvisual(l,t)}function s(t,e){r.setitemvisual(l,t,e)}null!=i&&(i=r.getdimension(i));for(var l;null!=(l=t.next());){var u=r.getrawdataitem(l);if(!u||u.visualmap!==!1)for(var h=null!=i?r.get(i,l,!0):l,c=n(h),d=e[c],f=o[c],p=0,g=f.length;g>p;p++){var v=f[p];d[v]&&d[v].applyvisual(h,a,s)}}}var o={};return f(t,function(t){var n=yd.preparevisualtypes(e[t]);o[t]=n}),{progress:r}}function bg(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range,o=e[t];return ng(o,r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]u||u>1)return!1;var h=gg(n-t,r-t,i-e,o-e)/l;return 0>h||h>1?!1:!0}function hg(t){return 1e-6>=t&&t>=-1e-6}function gg(t,e,n,i){return t*i-e*n}function wg(t){return t=yg(t),function(e){return ho(e,t)}}function zg(t,e){return t=yg(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function xg(t,e,n){return t=yg(t),function(i,r){return t.contain(r[0],r[1])&&!uf(i,e,n)}}function yg(t){return xn.create(t)}function ug(t,e,n){var i=this._targetinfolist=[],r={},o=jg(e,t);md(dd,function(t,e){(!n||!n.include||sd(n.include,e)>=0)&&t(o,i,r)})}function qg(t){return t[0]>t[1]&&t.reverse(),t}function jg(t,e){return qi(t,e,{includemaintypes:cd})}function kg(t,e,n,i){var r=n.getaxis(["x","y"][t]),o=qg(p([0,1],function(t){return e?r.coordtodata(r.tolocalcoord(i[t])):r.toglobalcoord(r.datatocoord(i[t]))})),a=[];return a[t]=o,a[1-t]=[0/0,0/0],{values:o,xyminmax:a}}function $g(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function jg(t,e){var n=qg(t),i=qg(e),r=[n[0]/i[0],n[1]/i[1]];return isnan(r[0])&&(r[0]=1),isnan(r[1])&&(r[1]=1),r}function qg(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function tv(t,e,n,i,r){if(r){var o=t.getzr();if(!o[ed]){o[rd]||(o[rd]=ev);var a=js(o,rd,n,e);a(t,i)}}}function ev(t,e){if(!t.isdisposed()){var n=t.getzr();n[ed]=!0,t.dispatchaction({type:"brushselect",batch:e}),n[ed]=!1}}function nv(t,e,n,i){for(var r=0,o=e.length;o>r;r++){var a=e[r];if(t[a.brushtype](i,n,a.selectors,a))return!0}}function iv(t){var e=t.brushselector;if(w(e)){var n=[];return f(wd,function(t,i){n[i]=function(n,i,r,o){var a=i.getitemlayout(n);return t[e](a,r,o)}}),n}if(b(e)){var i={};return f(wd,function(t,n){i[n]=e}),i}return e}function rv(t,e){var n=t.option.seriesindex;return null!=n&&"all"!==n&&(_(n)?u(n,e)<0:e!==n)}function ov(t){var e=t.selectors={};return f(wd[t.brushtype],function(n,i){e[i]=function(i){return n(i,e,t)}}),t}function av(t){return new xn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function sv(t,e){return r({brushtype:t.brushtype,brushmode:t.brushmode,transformable:t.transformable,brushstyle:new zo(t.brushstyle).getitemstyle(),removeonclick:t.removeonclick,z:t.z},e,!0)}function lv(t){ly.call(this),this._zr=t,this.group=new ky,this._brushtype,this._brushoption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingcover,this._creatingpanel,this._enableglobalpan,this._uid="brushcontroller_"+qd++,this._handlers={},hd(tk,function(t,e){this._handlers[e]=y(t,this)},this)}function uv(t,e){var n=t._zr;t._enableglobalpan||lf(n,jd,t._uid),hd(t._handlers,function(t,e){n.on(e,t)}),t._brushtype=e.brushtype,t._brushoption=r(i(jd),e,!0)}function hv(t){var e=t._zr;of(e,jd,t._uid),hd(t._handlers,function(t,n){e.off(n,t)}),t._brushtype=t._brushoption=null}function cv(t,e){var n=ek[e.brushtype].createcover(t,e);return n.__brushoption=e,pv(n,e),t.group.add(n),n}function dv(t,e){var n=vv(e);return n.endcreating&&(n.endcreating(t,e),pv(e,e.__brushoption)),e}function fv(t,e){var n=e.__brushoption;vv(e).updatecovershape(t,e,n.range,n)}function pv(t,e){var n=e.z;null==n&&(n=yd),t.traverse(function(t){t.z=n,t.z2=n})}function gv(t,e){vv(e).updatecommon(t,e),fv(t,e)}function vv(t){return ek[t.__brushoption.brushtype]}function mv(t,e,n){var i=t._panels;if(!i)return!0;var r,o=t._transform;return hd(i,function(t){t.istargetbycursor(e,n,o)&&(r=t)}),r}function yv(t,e){var n=t._panels;if(!n)return!0;var i=e.__brushoption.panelid;return null!=i?n[i]:!0}function xv(t){var e=t._covers,n=e.length;return hd(e,function(e){t.group.remove(e)},t),e.length=0,!!n}function _v(t,e){var n=gd(t._covers,function(t){var e=t.__brushoption,n=i(e.range);return{brushtype:e.brushtype,panelid:e.panelid,range:n}});t.trigger("brush",n,{isend:!!e.isend,removeonclick:!!e.removeonclick})}function bv(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1],a=xd(r*r+o*o,.5);return a>ud}function wv(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function mv(t,e,n,i){var r=new ky;return r.add(new bb({name:"main",style:cv(n),silent:!0,draggable:!0,cursor:"move",drift:fd(t,e,r,"nswe"),ondragend:fd(_v,e,{isend:!0})})),hd(i,function(n){r.add(new bb({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:fd(t,e,r,n),ondragend:fd(_v,e,{isend:!0})}))}),r}function sv(t,e,n,i){var r=i.brushstyle.linewidth||0,o=zd(r,qd),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,h=n[0][1],c=n[1][1],d=h-o+r/2,f=c-o+r/2,p=h-a,g=c-s,v=p+r,m=g+r;iv(t,e,"main",a,s,p,g),i.transformable&&(iv(t,e,"w",l,u,o,m),iv(t,e,"e",d,u,o,m),iv(t,e,"n",l,u,v,o),iv(t,e,"s",l,f,v,o),iv(t,e,"nw",l,u,o,o),iv(t,e,"ne",d,u,o,o),iv(t,e,"sw",l,f,o,o),iv(t,e,"se",d,f,o,o))}function tv(t,e){var n=e.__brushoption,i=n.transformable,r=e.childat(0);r.usestyle(cv(n)),r.attr({silent:!i,cursor:i?"move":"default"}),hd(["w","e","n","s","se","sw","ne","nw"],function(n){var r=e.childofname(n),o=kv(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?$d[o]+"-resize":null})})}function iv(t,e,n,i,r,o,a){var s=e.childofname(n);s&&s.setshape(rv(zv(t,e,[[i,r],[i+o,r+a]])))}function cv(t){return s({strokenoscale:!0},t.brushstyle)}function av(t,e,n,i){var r=[wd(t,n),wd(e,i)],o=[zd(t,n),zd(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function dv(t){return bo(t.group)}function kv(t,e){if(e.length>1){e=e.split("");var n=[kv(t,e[0]),kv(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}var i={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},n=vo(i[e],dv(t));return r[n]}function pv(t,e,n,i,r,o,a){var s=i.__brushoption,l=t(s.range),u=ov(n,o,a);hd(r.split(""),function(t){var e=kd[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(av(l[0][0],l[1][0],l[0][1],l[1][1])),gv(n,i),_v(n,{isend:!1})}function lv(t,e,n,i){var r=e.__brushoption.range,o=ov(t,n,i);hd(r,function(t){t[0]+=o[0],t[1]+=o[1]}),gv(t,e),_v(t,{isend:!1})}function ov(t,e,n){var i=t.group,r=i.transformcoordtolocal(e,n),o=i.transformcoordtolocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function zv(t,e,n){var r=yv(t,e);return r&&r!==!0?r.clippath(n,t._transform):i(n)}function rv(t){var e=wd(t[0][0],t[1][0]),n=wd(t[0][1],t[1][1]),i=zd(t[0][0],t[1][0]),r=zd(t[0][1],t[1][1]);return{x:e,y:n,width:i-e,height:r-n}}function ev(t,e,n){if(t._brushtype){var i=t._zr,r=t._covers,o=mv(t,e,n);if(!t._dragging)for(var a=0;au;u++){var c=s[u],d=a["opacity"===c?"__alphaforopacity":c];d&&d.applyvisual(n,r,o)}return l.color}function jv(t,e,n){if(n[0]===n[1])return n.slice();for(var i=200,r=(n[1]-n[0])/i,o=n[0],a=[],s=0;i>=s&&oc;c++)h[s[1-a][c]]=u[c],h[l[c]]=2===c?n[0]:i[l[c]];var d=[["x","width",3],["y","height",0]][a],f=ia(h,o,i.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function $v(t){return f(t||[],function(){null!=t.dataindex&&(t.dataindexinside=t.dataindex,t.dataindex=null)}),t}function jv(t,e,n,i){return new mb({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){cy(t.event)},ondragend:i})}function qv(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function tm(t,e,n,i){return t?[[0,-mk(e,sk(n,0))],[ik,0],[0,mk(e,sk(i-n,0))]]:[[0,0],[5,-5],[5,5]]}function em(t,e,n){var i=tk/2,r=t.get("hoverlinkdatasize");return r&&(i=bk(r,e,n,!0)/2),i}function nm(t){var e=t.get("hoverlinkonhandle");return!!(null==e?t.get("realtime"):e)}function im(t){return"vertical"===t?"ns-resize":"ew-resize"}function rm(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}function om(t){return 0===t.indexof("my")}function am(t){this.model=t}function sm(t){this.model=t}function lm(t){var e={},n=[],i=[];return t.eachrawseries(function(t){var r=t.coordinatesystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getbaseaxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryaxis:o,valueaxis:r.getotheraxis(o),series:[]},i.push({axisdim:o.dim,axisindex:o.index})),e[a].series.push(t)}else n.push(t)}}),{seriesgroupbycategoryaxis:e,other:n,meta:i}}function um(t){var e=[];return f(t,function(t){var n=t.categoryaxis,i=t.valueaxis,r=i.dim,o=[" "].concat(p(t.series,function(t){return t.name})),a=[n.model.getcategories()];f(t.series,function(t){a.push(t.getrawdata().maparray(r,function(t){return t}))});for(var s=[o.join(fk)],l=0;la;a++)i[a]=arguments[a];n.push((o?o+fk:"")+i.join(fk))}),n.join("\n")}).join("\n\n"+vk+"\n\n")}function cm(t){var e=lm(t);return{value:v([um(e.seriesgroupbycategoryaxis),hm(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+vk+"\n\n"),meta:e.meta}}function dm(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function fm(t){var e=t.slice(0,t.indexof("\n"));return e.indexof(fk)>=0?!0:void 0}function pm(t){for(var e=t.split(/\n+/g),n=dm(e.shift()).split(hk),i=[],r=p(n,function(t){return{name:t,data:[]}}),o=0;o=0;r--){var o=n[r];if(o[i])break}if(0>r){var a=t.querycomponents({maintype:"datazoom",subtype:"select",id:i})[0];if(a){var s=a.getpercentrange();n[0][i]={datazoomid:i,start:s[0],end:s[1]}}}}),n.push(e)}function _m(t){var e=mm(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return gk(n,function(t,n){for(var r=e.length-1;r>=0;r--){var t=e[r][n];if(t){i[n]=t;break}}}),i}function bm(t){t[wk]=null}function wm(t){return mm(t).length}function mm(t){var e=t[wk];return e||(e=t[wk]=[{}]),e}function sm(t,e,n){(this._brushcontroller=new lv(n.getzr())).on("brush",y(this._onbrush,this)).mount(),this._iszoomactive}function tm(t){var e={};return f(["xaxisindex","yaxisindex"],function(n){e[n]=t[n],null==e[n]&&(e[n]="all"),(e[n]===!1||"none"===e[n])&&(e[n]=[])}),e}function im(t,e){t.seticonstatus("back",wm(e)>1?"emphasis":"normal")}function cm(t,e,n,i,r){var o=n._iszoomactive;i&&"takeglobalcursor"===i.type&&(o="datazoomselect"===i.key?i.datazoomselectactive:!1),n._iszoomactive=o,t.seticonstatus("zoom",o?"emphasis":"normal");var a=new ug(tm(t.option),e,{include:["grid"]});n._brushcontroller.setpanels(a.makepanelopts(r,function(t){return t.xaxisdeclared&&!t.yaxisdeclared?"linex":!t.xaxisdeclared&&t.yaxisdeclared?"liney":"rect"})).enablebrush(o?{brushtype:"auto",brushstyle:{linewidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}function am(t){this.model=t}function dm(t,e,n,i){var r=n.type,o=fb[r.charat(0).touppercase()+r.slice(1)],a=new o(n);e.add(a),i.set(t,a),a.__ecgraphicid=t}function km(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){km(t,e)}),e.removekey(t.__ecgraphicid),n.remove(t))}function pm(t){return t=a({},t),f(["id","parentid","$action","hv","bounding"].concat(aw),function(e){delete t[e]}),t}function lm(t,e){var n;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}function om(t,e){var n=t.exist;if(e.id=t.keyinfo.id,!e.type&&n&&(e.type=n.type),null==e.parentid){var i=e.parentoption;i?e.parentid=i.id:n&&(e.parentid=n.parentid)}e.parentoption=null}function zm(t,e,n){var i=a({},n),o=t[e],s=n.$action||"merge";"merge"===s?o?(r(o,i,!0),da(o,i,{ignoresize:!0}),pa(n,o)):t[e]=i:"replace"===s?t[e]=i:"remove"===s&&o&&(t[e]=null)}function rm(t,e){t&&(t.hv=e.hv=[lm(e,["left","right"]),lm(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function em(t,e){var n=t.eventdata;t.silent||t.ignore||n||(n=t.eventdata={componenttype:"graphic",componentindex:e.componentindex,name:t.name}),n&&(n.info=t.info)}var bm=2311,nm=function(){return bm++},vm={};vm="object"==typeof wx&&"function"==typeof wx.getsysteminfosync?{browser:{},os:{},node:!1,wxa:!0,canvassupported:!0,svgsupported:!1,toucheventssupported:!0,domsupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvassupported:!0,domsupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvassupported:!0,svgsupported:!0,domsupported:!1}:e(navigator.useragent);var fm=vm,hm={"[object function]":1,"[object regexp]":1,"[object date]":1,"[object error]":1,"[object canvasgradient]":1,"[object canvaspattern]":1,"[object image]":1,"[object canvas]":1},gm={"[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},wm=object.prototype.tostring,zm=array.prototype,xm=zm.foreach,ym=zm.filter,um=zm.slice,qm=zm.map,jm=zm.reduce,km={},$m=function(){return km.createcanvas()};km.createcanvas=function(){return document.createelement("canvas")};var jm,qm="__ec_primitive__";b.prototype={constructor:b,get:function(t){return this.data.hasownproperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var n in this.data)this.data.hasownproperty(n)&&t(this.data[n],n)},removekey:function(t){delete this.data[t]}};var ty=(object.freeze||object)({$override:n,clone:i,merge:r,mergeall:o,extend:a,defaults:s,createcanvas:$m,getcontext:l,indexof:u,inherits:h,mixin:c,isarraylike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:x,isarray:_,isfunction:b,isstring:w,isobject:m,isbuiltinobject:s,istypedarray:t,isdom:i,eqnan:c,retrieve:a,retrieve2:d,retrieve3:k,slice:p,normalizecssarray:l,assert:o,trim:z,setasprimitive:r,isprimitive:e,createhashmap:n,concatarray:v,noop:f}),ey="undefined"==typeof float32array?array:float32array,ny=q,iy=j,ry=ee,oy=ne,ay=(object.freeze||object)({create:h,copy:g,clone:w,set:z,add:x,scaleandadd:y,sub:u,len:q,length:ny,lensquare:j,lengthsquare:iy,mul:k,div:$,dot:j,scale:q,normalize:te,distance:ee,dist:ry,distancesquare:ne,distsquare:oy,negate:ie,lerp:re,applytransform:oe,min:ae,max:se});le.prototype={constructor:le,_dragstart:function(t){var e=t.target;e&&e.draggable&&(this._draggingtarget=e,e.dragging=!0,this._x=t.offsetx,this._y=t.offsety,this.dispatchtoelement(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingtarget;if(e){var n=t.offsetx,i=t.offsety,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.dispatchtoelement(ue(e,t),"drag",t.event);var a=this.findhover(n,i,e).target,s=this._droptarget;this._droptarget=a,e!==a&&(s&&a!==s&&this.dispatchtoelement(ue(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchtoelement(ue(a,t),"dragenter",t.event))}},_dragend:function(t){var e=this._draggingtarget;e&&(e.dragging=!1),this.dispatchtoelement(ue(e,t),"dragend",t.event),this._droptarget&&this.dispatchtoelement(ue(this._droptarget,t),"drop",t.event),this._draggingtarget=null,this._droptarget=null}};var sy=array.prototype.slice,ly=function(t){this._$handlers={},this._$eventprocessor=t};ly.prototype={constructor:ly,one:function(t,e,n,i){return ce(this,t,e,n,i,!0)},on:function(t,e,n,i){return ce(this,t,e,n,i,!1)},issilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,o=n[t].length;o>r;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var e=this._$handlers[t],n=this._$eventprocessor;if(e){var i=arguments,r=i.length;r>3&&(i=sy.call(i,1));for(var o=e.length,a=0;o>a;){var s=e[a];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))a++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(a,1),o--):a++}}}return n&&n.aftertrigger&&n.aftertrigger(t),this},triggerwithcontext:function(t){var e=this._$handlers[t],n=this._$eventprocessor;if(e){var i=arguments,r=i.length;r>4&&(i=sy.call(i,1,i.length-1));for(var o=i[i.length-1],a=e.length,s=0;a>s;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(o);break;case 2:l.h.call(o,i[1]);break;case 3:l.h.call(o,i[1],i[2]);break;default:l.h.apply(o,i)}l.one?(e.splice(s,1),a--):s++}}}return n&&n.aftertrigger&&n.aftertrigger(t),this}};var uy="undefined"!=typeof window&&!!window.addeventlistener,hy=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,cy=uy?function(t){t.preventdefault(),t.stoppropagation(),t.cancelbubble=!0}:function(t){t.returnvalue=!1,t.cancelbubble=!0},dy=function(){this._track=[]};dy.prototype={constructor:dy,recognize:function(t,e,n){return this._dotrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_dotrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;a>o;o++){var s=i[o],l=fe(n,s,{});r.points.push([l.zrx,l.zry]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in fy)if(fy.hasownproperty(e)){var n=fy[e](this._track,t);if(n)return n}}};var fy={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var o=xe(i)/xe(r);!isfinite(o)&&(o=1),e.pinchscale=o;var a=_e(i);return e.pinchx=a[0],e.pinchy=a[1],{type:"pinch",target:t[0].target,event:e}}}}},py="silent";me.prototype.dispose=function(){};var gy=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],vy=function(t,e,n,i){ly.call(this),this.storage=t,this.painter=e,this.painterroot=i,n=n||new me,this.proxy=null,this._hovered={},this._lasttouchmoment,this._lastx,this._lasty,this._gesturemgr,le.call(this),this.sethandlerproxy(n)};vy.prototype={constructor:vy,sethandlerproxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(gy,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrx,n=t.zry,i=this._hovered,r=i.target;r&&!r.__zr&&(i=this.findhover(i.x,i.y),r=i.target);var o=this._hovered=this.findhover(e,n),a=o.target,s=this.proxy;s.setcursor&&s.setcursor(a?a.cursor:"default"),r&&a!==r&&this.dispatchtoelement(i,"mouseout",t),this.dispatchtoelement(o,"mousemove",t),a&&a!==r&&this.dispatchtoelement(o,"mouseover",t)},mouseout:function(t){this.dispatchtoelement(this._hovered,"mouseout",t);var e,n=t.toelement||t.relatedtarget;do n=n&&n.parentnode;while(n&&9!==n.nodetype&&!(e=n===this.painterroot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.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,n){t=t||{};var i=t.target;if(!i||!i.silent){for(var r="on"+e,o=be(e,t,n);i&&(i[r]&&(o.cancelbubble=i[r].call(i,o)),i.trigger(e,o),i=i.parent,!o.cancelbubble););o.cancelbubble||(this.trigger(e,o),this.painter&&this.painter.eachotherlayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},findhover:function(t,e,n){for(var i=this.storage.getdisplaylist(),r={x:t,y:e},o=i.length-1;o>=0;o--){var a;if(i[o]!==n&&!i[o].ignore&&(a=se(i[o],t,e))&&(!r.toptarget&&(r.toptarget=i[o]),a!==py)){r.target=i[o];break}}return r},processgesture:function(t,e){this._gesturemgr||(this._gesturemgr=new dy);var n=this._gesturemgr;"start"===e&&n.clear();var i=n.recognize(t,this.findhover(t.zrx,t.zry,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureevent=r,this.dispatchtoelement({target:i.target},r,i.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){vy.prototype[t]=function(e){var n=this.findhover(e.zrx,e.zry),i=n.target;if("mousedown"===t)this._downel=i,this._downpoint=[e.zrx,e.zry],this._upel=i;else if("mouseup"===t)this._upel=i;else if("click"===t){if(this._downel!==this._upel||!this._downpoint||ry(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(n,t,e)}}),c(vy,ly),c(vy,le);var my="undefined"==typeof float32array?array:float32array,yy=(object.freeze||object)({create:te,identity:ie,copy:ce,mul:ae,translate:de,rotate:ke,scale:pe,invert:le,clone:oe}),xy=ie,_y=5e-5,by=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},wy=by.prototype;wy.transform=null,wy.needlocaltransform=function(){return ze(this.rotation)||ze(this.position[0])||ze(this.position[1])||ze(this.scale[0]-1)||ze(this.scale[1]-1)};var my=[];wy.updatetransform=function(){var t=this.parent,e=t&&t.transform,n=this.needlocaltransform(),i=this.transform;if(!n&&!e)return void(i&&xy(i));i=i||te(),n?this.getlocaltransform(i):xy(i),e&&(n?ae(i,t.transform,i):ce(i,t.transform)),this.transform=i;var r=this.globalscaleratio;if(null!=r&&1!==r){this.getglobalscale(my);var o=my[0]<0?-1:1,a=my[1]<0?-1:1,s=((my[0]-o)*r+o)/my[0]||0,l=((my[1]-a)*r+a)/my[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invtransform=this.invtransform||te(),le(this.invtransform,i)},wy.getlocaltransform=function(t){return by.getlocaltransform(this,t) },wy.settransform=function(t){var e=this.transform,n=t.dpr||1;e?t.settransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.settransform(n,0,0,n,0,0)},wy.restoretransform=function(t){var e=t.dpr||1;t.settransform(e,0,0,e,0,0)};var sy=[],ty=te();wy.setlocaltransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,r=this.scale;ze(e-1)&&(e=math.sqrt(e)),ze(n-1)&&(n=math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=math.atan2(-t[1]/n,t[0]/e)}},wy.decomposetransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ae(sy,t.invtransform,e),e=sy);var n=this.origin;n&&(n[0]||n[1])&&(ty[4]=n[0],ty[5]=n[1],ae(sy,e,ty),sy[4]-=n[0],sy[5]-=n[1],e=sy),this.setlocaltransform(e)}},wy.getglobalscale=function(t){var e=this.transform;return t=t||[],e?(t[0]=math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},wy.transformcoordtolocal=function(t,e){var n=[t,e],i=this.invtransform;return i&&oe(n,n,i),n},wy.transformcoordtoglobal=function(t,e){var n=[t,e],i=this.transform;return i&&oe(n,n,i),n},by.getlocaltransform=function(t,e){e=e||[],xy(e);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),pe(e,e,i),r&&ke(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=o[0],e[5]+=o[1],e};var iy={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*(-math.pow(2,-10*(t-1))+2)},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,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*math.asin(1/n)/(2*math.pi),-(n*math.pow(2,10*(t-=1))*math.sin(2*(t-e)*math.pi/i)))},elasticout:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*math.asin(1/n)/(2*math.pi),n*math.pow(2,-10*t)*math.sin(2*(t-e)*math.pi/i)+1)},elasticinout:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||1>n?(n=1,e=i/4):e=i*math.asin(1/n)/(2*math.pi),(t*=2)<1?-.5*n*math.pow(2,10*(t-=1))*math.sin(2*(t-e)*math.pi/i):n*math.pow(2,-10*(t-=1))*math.sin(2*(t-e)*math.pi/i)*.5+1)},backin:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backout:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backinout:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bouncein:function(t){return 1-iy.bounceout(1-t)},bounceout:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceinout:function(t){return.5>t?.5*iy.bouncein(2*t):.5*iy.bounceout(2*t-1)+.5}};re.prototype={constructor:re,step:function(t,e){if(this._initialized||(this._starttime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedtime+=e);var n=(t-this._starttime-this._pausedtime)/this._life;if(!(0>n)){n=math.min(n,1);var i=this.easing,r="string"==typeof i?iy[i]:i,o="function"==typeof r?r(n):n;return this.fire("frame",o),1===n?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){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var cy=function(){this.head=null,this.tail=null,this._len=0},ay=cy.prototype;ay.insert=function(t){var e=new dy(t);return this.insertentry(e),e},ay.insertentry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},ay.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},ay.len=function(){return this._len},ay.clear=function(){this.head=this.tail=null,this._len=0};var dy=function(t){this.value=t,this.next,this.prev},ky=function(t){this._list=new cy,this._map={},this._maxsize=t||10,this._lastremovedentry=null},py=ky.prototype;py.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastremovedentry;if(o>=this._maxsize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastremovedentry=s}a?a.value=e:a=new dy(e),a.key=t,n.insertentry(a),i[t]=a}return r},py.get=function(t){var e=this._map[t],n=this._list;return null!=e?(e!==n.tail&&(n.remove(e),n.insertentry(e)),e.value):void 0},py.clear=function(){this._list.clear(),this._map={}};var ly={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},oy=new ky(20),zy=null,ry=$e,ey=je,by=(object.freeze||object)({parse:ye,lift:je,tohex:ke,fastlerp:$e,fastmaptocolor:ry,lerp:je,maptocolor:ey,modifyhsl:qe,modifyalpha:tn,stringify:en}),ny=array.prototype.slice,vy=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||nn,this._setter=i||rn,this._clipcount=0,this._delay=0,this._donelist=[],this._onframelist=[],this._cliplist=[]};vy.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasownproperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:dn(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframelist.push(t),this},pause:function(){for(var t=0;tn;n++)t[n].call(this)},start:function(t,e){var n,i=this,r=0,o=function(){r--,r||i._donecallback()};for(var a in this._tracks)if(this._tracks.hasownproperty(a)){var s=gn(this,t,o,this._tracks[a],a,e);s&&(this._cliplist.push(s),r++,this.animation&&this.animation.addclip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var n=0;n1&&(wy=function(){for(var t in arguments)console.log(arguments[t])});var zy=wy,xy=function(){this.animators=[]};xy.prototype={constructor:xy,animate:function(t,e){var n,i=!1,r=this,o=this.__zr;if(t){var a=t.split("."),s=r;i="shape"===a[0];for(var l=0,h=a.length;h>l;l++)s&&(s=s[a[l]]);s&&(n=s)}else n=r;if(!n)return void zy('property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new vy(n,e);return d.during(function(){r.dirty(i)}).done(function(){c.splice(u(c,d),1)}),c.push(d),o&&o.animation.addanimator(d),d},stopanimation:function(t){for(var e=this.animators,n=e.length,i=0;n>i;i++)e[i].stop(t);return e.length=0,this},animateto:function(t,e,n,i,r,o){vn(this,t,e,n,i,r,o)},animatefrom:function(t,e,n,i,r,o){vn(this,t,e,n,i,r,o,!0)}};var yy=function(t){by.call(this,t),ly.call(this,t),xy.call(this,t),this.id=t.id||nm()};yy.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 n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposetransform(),this.dirty(!1)},beforeupdate:function(){},afterupdate:function(){},update:function(){this.updatetransform()},traverse:function(){},attrkv:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[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(m(t))for(var n in t)t.hasownproperty(n)&&this.attrkv(n,t[n]);return this.dirty(!1),this},setclippath:function(t){var e=this.__zr;e&&t.addselftozr(e),this.clippath&&this.clippath!==t&&this.removeclippath(),this.clippath=t,t.__zr=e,t.__cliptarget=this,this.dirty(!1)},removeclippath:function(){var t=this.clippath;t&&(t.__zr&&t.removeselffromzr(t.__zr),t.__zr=null,t.__cliptarget=null,this.clippath=null,this.dirty(!1))},addselftozr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;ni||n>s||l>o||r>u)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new xn(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}}},xn.create=function(t){return new xn(t.x,t.y,t.width,t.height)};var ky=function(t){t=t||{},yy.call(this,t);for(var e in t)t.hasownproperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ky.prototype={constructor:ky,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,n=0;n=0&&(n.splice(i,0,t),this._doadd(t))}return this},_doadd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addtostorage(t),t instanceof ky&&t.addchildrentostorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=u(i,t);return 0>r?this:(i.splice(r,1),t.parent=null,n&&(n.delfromstorage(t),t instanceof ky&&t.delchildrenfromstorage(n)),e&&e.refresh(),this)},removeall:function(){var t,e,n=this._children,i=this.__storage;for(e=0;ei;i++)this._updateandadddisplayable(e[i],null,t);n.length=this._displaylistlen,fm.canvassupported&&cn(n,an)},_updateandadddisplayable:function(t,e,n){if(!t.ignore||n){t.beforeupdate(),t.__dirty&&t.update(),t.afterupdate();var i=t.clippath;if(i){e=e?e.slice():[];for(var r=i,o=t;r;)r.parent=o,r.updatetransform(),e.push(r),o=r,r=r.clippath}if(t.isgroup){for(var a=t._children,s=0;se;e++)this.delroot(t[e]);else{var r=u(this._roots,t);r>=0&&(this.delfromstorage(t),this._roots.splice(r,1),t instanceof ky&&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:an};var tx={shadowblur:1,shadowoffsetx:1,shadowoffsety:1,textshadowblur:1,textshadowoffsetx:1,textshadowoffsety:1,textboxshadowblur:1,textboxshadowoffsetx:1,textboxshadowoffsety:1},ex=function(t,e,n){return tx.hasownproperty(e)?n*=t.dpr:n},nx={none:0,style_bind:1,plain_text:2},ix=9,rx=[["shadowblur",0],["shadowoffsetx",0],["shadowoffsety",0],["shadowcolor","#000"],["linecap","butt"],["linejoin","miter"],["miterlimit",10]],ox=function(t){this.extendfrom(t,!1)};ox.prototype={constructor:ox,fill:"#000",stroke:null,opacity:1,fillopacity:null,strokeopacity:null,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,n){var i=this,r=n&&n.style,o=!r||t.__attrcachedby!==nx.style_bind;t.__attrcachedby=nx.style_bind;for(var a=0;a0},extendfrom:function(t,e){if(t)for(var n in t)!t.hasownproperty(n)||e!==!0&&(e===!1?this.hasownproperty(n):null==t[n])||(this[n]=t[n])},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,n){for(var i="radial"===e.type?kn:dn,r=i(t,e,n),o=e.colorstops,a=0;a=0&&n.splice(i,1),t.__hovermir=null},clearhover:function(){for(var t=this._hoverelements,e=0;er;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invtransform=a.invtransform,o.__clippaths=a.__clippaths,this._dopaintel(o,n,!0,i))):(t.splice(r,1),a.__hovermir=null,e--)}n.ctx.restore()}},gethoverlayer:function(){return this.getlayer(ix)},_paintlist:function(t,e,n){if(this._redrawid===n){e=e||!1,this._updatelayerstatus(t);var i=this._dopaintlist(t,e);if(this._needsmanuallycompositing&&this._compositemanually(),!i){var r=this;cx(function(){r._paintlist(t,e,n)})}}},_compositemanually:function(){var t=this.getlayer(cx).ctx,e=this._domroot.width,n=this._domroot.height;t.clearrect(0,0,e,n),this.eachbuiltinlayer(function(i){i.virtual&&t.drawimage(i.dom,0,0,e,n)})},_dopaintlist:function(t,e){for(var n=[],i=0;i15)break}}o.__drawindex=v,o.__drawindex0&&t>i[0]){for(a=0;r-1>a&&!(i[a]t);a++);o=n[i[a]]}if(i.splice(a+1,0,t),n[t]=e,!e.virtual)if(o){var l=o.dom;l.nextsibling?s.insertbefore(e.dom,l.nextsibling):s.appendchild(e.dom)}else s.firstchild?s.insertbefore(e.dom,s.firstchild):s.appendchild(e.dom)},eachlayer:function(t,e){var n,i,r=this._zlevellist;for(i=0;i0?ax:0),this._needsmanuallycompositing),a.__builtin__||zy("zlevel "+s+" has been used by unkown layer "+a.id),a!==r&&(a.__used=!0,a.__startindex!==n&&(a.__dirty=!0),a.__startindex=n,a.__drawindex=a.incremental?-1:n,e(n),r=a),i.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawindex<0&&(a.__drawindex=n))}e(n),this.eachbuiltinlayer(function(t){!t.__used&&t.getelementcount()>0&&(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()},setbackgroundcolor:function(t){this._backgroundcolor=t},configlayer:function(t,e){if(e){var n=this._layerconfig;n[t]?r(n[t],e,!0):n[t]=e;for(var i=0;i=0&&this._clips.splice(e,1)},removeanimator:function(t){for(var e=t.getclips(),n=0;na;a++){var s=n[a],l=s.step(t,e);l&&(r.push(l),o.push(s))}for(var a=0;i>a;)n[a]._needsremove?(n[a]=n[i-1],n.pop(),i--):a++;i=r.length;for(var a=0;i>a;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startloop:function(){function t(){e._running&&(cx(t),!e._paused&&e._update())}var e=this;this._running=!0,cx(t)},start:function(){this._time=(new date).gettime(),this._pausedtime=0,this._startloop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pausestart=(new date).gettime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedtime+=(new date).gettime()-this._pausestart,this._paused=!1)},clear:function(){this._clips=[]},isfinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var n=new vy(t,e.loop,e.getter,e.setter);return this.addanimator(n),n}},c(ox,ly);var zx=300,rx=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ex=["touchstart","touchend","touchmove"],bx={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},nx=p(rx,function(t){var e=t.replace("mouse","pointer");return bx[e]?e:t}),vx={mousemove:function(t){t=ge(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=ge(this.dom,t);var e=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=ge(this.dom,t),t.zrbytouch=!0,this._lasttouchmoment=new date,this.handler.processgesture(this,t,"start"),vx.mousemove.call(this,t),vx.mousedown.call(this,t),ai(this)},touchmove:function(t){t=ge(this.dom,t),t.zrbytouch=!0,this.handler.processgesture(this,t,"change"),vx.mousemove.call(this,t),ai(this)},touchend:function(t){t=ge(this.dom,t),t.zrbytouch=!0,this.handler.processgesture(this,t,"end"),vx.mouseup.call(this,t),+new date-this._lasttouchmoment=0||i&&u(i,a)<0)){var s=e.getshallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},i_=n_([["linewidth","width"],["stroke","color"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),r_={getlinestyle:function(t){var e=i_(this,t),n=this.getlinedash(e.linewidth);return n&&(e.linedash=n),e},getlinedash:function(t){null==t&&(t=1);var e=this.get("type"),n=math.max(t,2),i=4*t;return"solid"===e||null==e?null:"dashed"===e?[i,i]:[n,n]}},o_=n_([["fill","color"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["opacity"],["shadowcolor"]]),a_={getareastyle:function(t,e){return o_(this,t,e)}},s_=math.pow,l_=math.sqrt,u_=1e-8,h_=1e-4,c_=l_(3),d_=1/3,f_=h(),p_=h(),g_=h(),v_=math.min,m_=math.max,y_=math.sin,x_=math.cos,__=2*math.pi,b_=h(),w_=h(),m_=h(),s_=[],t_=[],i_={m:1,l:2,c:3,q:4,a:5,z:6,r:7},c_=[],a_=[],d_=[],k_=[],p_=math.min,l_=math.max,o_=math.cos,z_=math.sin,r_=math.sqrt,e_=math.abs,b_="undefined"!=typeof float32array,n_=function(t){this._savedata=!t,this._savedata&&(this.data=[]),this._ctx=null};n_.prototype={constructor:n_,_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=e_(1/gy/t)||0,this._uy=e_(1/gy/e)||0},getcontext:function(){return this._ctx},beginpath:function(t){return this._ctx=t,t&&t.beginpath(),t&&(this.dpr=t.dpr),this._savedata&&(this._len=0),this._linedash&&(this._linedash=null,this._dashoffset=0),this},moveto:function(t,e){return this.adddata(i_.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 n=e_(t-this._xi)>this._ux||e_(e-this._yi)>this._uy||this._len<5;return this.adddata(i_.l,t,e),this._ctx&&n&&(this._needsdash()?this._dashedlineto(t,e):this._ctx.lineto(t,e)),n&&(this._xi=t,this._yi=e),this},beziercurveto:function(t,e,n,i,r,o){return this.adddata(i_.c,t,e,n,i,r,o),this._ctx&&(this._needsdash()?this._dashedbezierto(t,e,n,i,r,o):this._ctx.beziercurveto(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},quadraticcurveto:function(t,e,n,i){return this.adddata(i_.q,t,e,n,i),this._ctx&&(this._needsdash()?this._dashedquadraticto(t,e,n,i):this._ctx.quadraticcurveto(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,o){return this.adddata(i_.a,t,e,n,n,i,r-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=o_(r)*n+t,this._yi=z_(r)*n+e,this},arcto:function(t,e,n,i,r){return this._ctx&&this._ctx.arcto(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.adddata(i_.r,t,e,n,i),this},closepath:function(){this.adddata(i_.z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsdash()&&this._dashedlineto(e,n),t.closepath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.tostatic()},stroke:function(t){t&&t.stroke(),this.tostatic()},setlinedash:function(t){if(t instanceof array){this._linedash=t,this._dashidx=0;for(var e=0,n=0;nn;n++)this.data[n]=t[n];this._len=e},appendpath:function(t){t instanceof array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;e>r;r++)n+=t[r].len();b_&&this.data instanceof float32array&&(this.data=new float32array(i+n));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;ae.length&&(this._expanddata(),e=this.data);for(var n=0;no&&(o=r+o),o%=r,f-=o*h,p-=o*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)i=this._dashidx,n=a[i],f+=h*n,p+=c*n,this._dashidx=(i+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[i%2?"moveto":"lineto"](h>=0?p_(f,t):l_(f,t),c>=0?p_(p,e):l_(p,e));h=f-t,c=p-e,this._dashoffset=-r_(h*h+c*c)},_dashedbezierto:function(t,e,n,i,r,o){var a,s,l,u,h,c=this._dashsum,d=this._dashoffset,f=this._linedash,p=this._ctx,g=this._xi,v=this._yi,m=lr,y=0,x=this._dashidx,_=f.length,b=0;for(0>d&&(d=c+d),d%=c,a=0;1>a;a+=.1)s=m(g,t,n,r,a+.1)-m(g,t,n,r,a),l=m(v,e,i,o,a+.1)-m(v,e,i,o,a),y+=r_(s*s+l*l);for(;_>x&&(b+=f[x],!(b>d));x++);for(a=(b-d)/y;1>=a;)u=m(g,t,n,r,a),h=m(v,e,i,o,a),x%2?p.moveto(u,h):p.lineto(u,h),a+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineto(r,o),s=r-u,l=o-h,this._dashoffset=-r_(s*s+l*l)},_dashedquadraticto:function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedbezierto(t,e,n,i,r,o)},tostatic:function(){var t=this.data;t instanceof array&&(t.length=this._len,b_&&(this.data=new float32array(t)))},getboundingrect:function(){c_[0]=c_[1]=d_[0]=d_[1]=number.max_value,a_[0]=a_[1]=k_[0]=k_[1]=-number.max_value;for(var t=this.data,e=0,n=0,i=0,r=0,o=0;oc;){var d=s[c++];switch(1===c&&(i=s[c],r=s[c+1],e=i,n=r),d){case i_.m:e=i=s[c++],n=r=s[c++],t.moveto(i,r);break;case i_.l:o=s[c++],a=s[c++],(e_(o-i)>l||e_(a-r)>u||c===h-1)&&(t.lineto(o,a),i=o,r=a);break;case i_.c:t.beziercurveto(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case i_.q:t.quadraticcurveto(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case i_.a:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],x=s[c++],_=s[c++],b=g>v?g:v,w=g>v?1:g/v,m=g>v?v/g:1,s=math.abs(g-v)>.001,t=m+y;s?(t.translate(f,p),t.rotate(x),t.scale(w,m),t.arc(0,0,b,m,t,1-_),t.scale(1/w,1/m),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,b,m,t,1-_),1===c&&(e=o_(m)*g+f,n=z_(m)*v+p),i=o_(t)*g+f,r=z_(t)*v+p;break;case i_.r:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case i_.z:t.closepath(),i=e,r=n}}}},n_.cmd=i_;var v_=2*math.pi,f_=2*math.pi,h_=n_.cmd,g_=2*math.pi,w_=1e-4,z_=[-1,-1,-1],x_=[-1,-1],y_=ux.prototype.getcanvaspattern,u_=math.abs,q_=new n_(!0);vr.prototype={constructor:vr,type:"path",__dirtypath:!0,strokecontainthreshold:5,subpixeloptimize:!1,brush:function(t,e){var n=this.style,i=this.path||q_,r=n.hasstroke(),o=n.hasfill(),a=n.fill,s=n.stroke,l=o&&!!a.colorstops,u=r&&!!s.colorstops,h=o&&!!a.image,c=r&&!!s.image;if(n.bind(t,this,e),this.settransform(t),this.__dirty){var d;l&&(d=d||this.getboundingrect(),this._fillgradient=n.getgradient(t,a,d)),u&&(d=d||this.getboundingrect(),this._strokegradient=n.getgradient(t,s,d))}l?t.fillstyle=this._fillgradient:h&&(t.fillstyle=y_.call(a,t)),u?t.strokestyle=this._strokegradient:c&&(t.strokestyle=y_.call(s,t));var f=n.linedash,p=n.linedashoffset,g=!!t.setlinedash,v=this.getglobalscale();if(i.setscale(v[0],v[1]),this.__dirtypath||f&&!g&&r?(i.beginpath(t),f&&!g&&(i.setlinedash(f),i.setlinedashoffset(p)),this.buildpath(i,this.shape,!1),this.path&&(this.__dirtypath=!1)):(t.beginpath(),this.path.rebuildpath(t)),o)if(null!=n.fillopacity){var m=t.globalalpha;t.globalalpha=n.fillopacity*n.opacity,i.fill(t),t.globalalpha=m}else i.fill(t);if(f&&g&&(t.setlinedash(f),t.linedashoffset=p),r)if(null!=n.strokeopacity){var m=t.globalalpha;t.globalalpha=n.strokeopacity*n.opacity,i.stroke(t),t.globalalpha=m}else i.stroke(t);f&&g&&t.setlinedash([]),null!=n.text&&(this.restoretransform(t),this.drawrecttext(t,this.getboundingrect()))},buildpath:function(){},createpathproxy:function(){this.path=new n_},getboundingrect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new n_),this.__dirtypath&&(i.beginpath(),this.buildpath(i,this.shape,!1)),t=i.getboundingrect()}if(this._rect=t,e.hasstroke()){var r=this._rectwithstroke||(this._rectwithstroke=t.clone());if(this.__dirty||n){r.copy(t);var o=e.linewidth,a=e.strokenoscale?this.getlinescale():1;e.hasfill()||(o=math.max(o,this.strokecontainthreshold||4)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var n=this.transformcoordtolocal(t,e),i=this.getboundingrect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path.data;if(r.hasstroke()){var a=r.linewidth,s=r.strokenoscale?this.getlinescale():1;if(s>1e-10&&(r.hasfill()||(a=math.max(a,this.strokecontainthreshold)),nr(o,a/s,t,e)))return!0}if(r.hasfill())return br(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtypath=t,this._rect=null),this.__dirty=this.__dirtytext=!0,this.__zr&&this.__zr.refresh(),this.__cliptarget&&this.__cliptarget.dirty()},animateshape:function(t){return this.animate("shape",t)},attrkv:function(t,e){"shape"===t?(this.setshape(e),this.__dirtypath=!0,this._rect=null):xi.prototype.attrkv.call(this,t,e)},setshape:function(t,e){var n=this.shape;if(n){if(m(t))for(var i in t)t.hasownproperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getlinescale:function(){var t=this.transform;return t&&u_(t[0]-1)>1e-10&&u_(t[3]-1)>1e-10?math.sqrt(u_(t[0]*t[3]-t[2]*t[1])):1}},vr.extend=function(t){var e=function(e){vr.call(this,e),t.style&&this.style.extendfrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasownproperty(r)&&n.hasownproperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};h(e,vr);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},h(vr,xi);var j_=n_.cmd,k_=[[],[],[]],$_=math.sqrt,j_=math.atan2,q_=function(t,e){var n,i,r,o,a,s,l=t.data,u=j_.m,h=j_.c,c=j_.l,d=j_.r,f=j_.a,p=j_.q;for(r=0,o=0;ra;a++){var s=k_[a];s[0]=l[r++],s[1]=l[r++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},tb=math.sqrt,eb=math.sin,nb=math.cos,ib=math.pi,rb=function(t){return math.sqrt(t[0]*t[0]+t[1]*t[1])},ob=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(rb(t)*rb(e))},ab=function(t,e){return(t[0]*e[1]=11?function(){var e,n=this.__clippaths,i=this.style;if(n)for(var r=0;ro;o++)r+=ee(t[o-1],t[o]);var a=r/2;a=n>a?n:a;for(var o=0;a>o;o++){var s,l,u,h=o/(a-1)*(e?n:n-1),c=math.floor(h),d=h-c,f=t[c%n];e?(s=t[(c-1+n)%n],l=t[(c+1)%n],u=t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[c>n-2?n-1:c+1],u=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([yr(s[0],f[0],l[0],u[0],d,p,g),yr(s[1],f[1],l[1],u[1],d,p,g)])}return i},vb=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)ae(a,a,t[d]),se(s,s,t[d]);ae(a,a,i[0]),se(s,s,i[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(n)r=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(w(t[d]));continue}r=t[d-1],o=t[d+1]}u(u,o,r),q(u,u,e);var g=ee(p,r),v=ee(p,o),m=g+v;0!==m&&(g/=m,v/=m),q(h,u,-g),q(c,u,v);var y=x([],p,h),x=x([],p,c);i&&(se(y,y,a),ae(y,y,s),se(x,x,a),ae(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l},mb=vr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothconstraint:null},buildpath:function(t,e){ur(t,e,!0)}}),yb=vr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothconstraint:null},style:{stroke:"#000",fill:null},buildpath:function(t,e){ur(t,e,!1)}}),xb=math.round,_b={},bb=vr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildpath:function(t,e){var n,i,r,o;this.subpixeloptimize?(jr(_b,e,this.style),n=_b.x,i=_b.y,r=_b.width,o=_b.height,_b.r=e.r,e=_b):(n=e.x,i=e.y,r=e.width,o=e.height),e.r?ti(t,e):t.rect(n,i,r,o),t.closepath()}}),wb={},mb=vr.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildpath:function(t,e){var n,i,r,o;this.subpixeloptimize?(qr(wb,e,this.style),n=wb.x1,i=wb.y1,r=wb.x2,o=wb.y2):(n=e.x1,i=e.y1,r=e.x2,o=e.y2);var a=e.percent;0!==a&&(t.moveto(n,i),1>a&&(r=n*(1-a)+r*a,o=i*(1-a)+o*a),t.lineto(r,o))},pointat:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),sb=[],tb=vr.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 n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveto(n,i),null==l||null==u?(1>h&&(yr(n,a,r,h,sb),a=sb[1],r=sb[2],yr(i,s,o,h,sb),s=sb[1],o=sb[2]),t.quadraticcurveto(a,s,r,o)):(1>h&&(dr(n,a,l,r,h,sb),a=sb[1],l=sb[2],r=sb[3],dr(i,s,u,o,h,sb),s=sb[1],u=sb[2],o=sb[3]),t.beziercurveto(a,s,l,u,r,o)))},pointat:function(t){return $r(this.shape,t,!1)},tangentat:function(t){var e=$r(this.shape,t,!0);return te(e,e)}}),ib=vr.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 n=e.cx,i=e.cy,r=math.max(e.r,0),o=e.startangle,a=e.endangle,s=e.clockwise,l=math.cos(o),u=math.sin(o);t.moveto(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)}}),cb=vr.extend({type:"compound",shape:{paths:null},_updatepathdirty:function(){for(var t=this.__dirtypath,e=this.shape.paths,n=0;n"'])/g,tw={"&":"&","<":"<",">":">",'"':""","'":"'"},ew=["a","b","c","d","e","f","g"],nw=function(t,e){return"{"+t+(null==e?"":e)+"}"},iw=zn,rw=(object.freeze||object)({addcommas:pa,tocamelcase:ga,normalizecssarray:jb,encodehtml:va,formattpl:ma,formattplsimple:ya,gettooltipmarker:xa,formattime:ba,capitalfirst:wa,truncatetext:iw,gettextboundingrect:ma,gettextrect:sa}),ow=f,aw=["left","right","top","bottom","width","height"],sw=[["width","left","right"],["height","top","bottom"]],lw=ta,uw=(x(ta,"vertical"),x(ta,"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")}}}),hw=ui(),cw=zo.extend({type:"component",id:"",name:"",maintype:"",subtype:"",componentindex:0,defaultoption:null,ecmodel:null,dependentmodels:[],uid:null,layoutmode:null,$constructor:function(t,e,n,i){zo.call(this,t,e,n,i),this.uid=uo("ec_cpt_model")},init:function(t,e,n){this.mergedefaultandtheme(t,n)},mergedefaultandtheme:function(t,e){var n=this.layoutmode,i=n?ka(t):{},o=e.gettheme();r(t,o.get(this.maintype)),r(t,this.getdefaultoption()),n&&da(t,i,n)},mergeoption:function(t){r(this.option,t,!0);var e=this.layoutmode;e&&da(this.option,t,e)},optionupdated:function(){},getdefaultoption:function(){var t=hw(this);if(!t.defaultoption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultoption;i&&e.push(i),n=n.superclass}for(var o={},a=e.length-1;a>=0;a--)o=r(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)})}});or(cw,{registerwhenextend:!0}),qo(cw),jo(cw,la),c(cw,uw);var dw="";"undefined"!=typeof navigator&&(dw=navigator.platform||"");var fw={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientcolor:["#f6efa6","#d88273","#bf444c"],textstyle:{fontfamily:dw.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},pw=ui(),gw={clearcolorpalette:function(){pw(this).coloridx=0,pw(this).colornamemap={}},getcolorfrompalette:function(t,e,n){e=e||this;var i=pw(e),r=i.coloridx||0,o=i.colornamemap=i.colornamemap||{};if(o.hasownproperty(t))return o[t];var a=bi(this.get("color",!0)),s=this.get("colorlayer",!0),l=null!=n&&s?oa(s,n):a;if(l=l||a,l&&l.length){var u=l[r];return t&&(o[t]=u),i.coloridx=(r+1)%l.length,u}}},vw={cartesian2d:function(t,e,n,i){var r=t.getreferringcomponents("xaxis")[0],o=t.getreferringcomponents("yaxis")[0];e.coordsysdims=["x","y"],n.set("x",r),n.set("y",o),ra(r)&&(i.set("x",r),e.firstcategorydimindex=0),ra(o)&&(i.set("y",o),e.firstcategorydimindex=1)},singleaxis:function(t,e,n,i){var r=t.getreferringcomponents("singleaxis")[0];e.coordsysdims=["single"],n.set("single",r),ra(r)&&(i.set("single",r),e.firstcategorydimindex=0)},polar:function(t,e,n,i){var r=t.getreferringcomponents("polar")[0],o=r.findaxismodel("radiusaxis"),a=r.findaxismodel("angleaxis");e.coordsysdims=["radius","angle"],n.set("radius",o),n.set("angle",a),ra(o)&&(i.set("radius",o),e.firstcategorydimindex=0),ra(a)&&(i.set("angle",a),e.firstcategorydimindex=1)},geo:function(t,e){e.coordsysdims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecmodel,o=r.getcomponent("parallel",t.get("parallelindex")),a=e.coordsysdims=o.dimensions.slice();f(o.parallelaxisindex,function(t,o){var s=r.getcomponent("parallelaxis",t),l=a[o];n.set(l,s),ra(s)&&null==e.firstcategorydimindex&&(i.set(l,s),e.firstcategorydimindex=o)})}},mw="original",yw="arrayrows",xw="objectrows",_w="keyedcolumns",bw="unknown",ww="typedarray",mw="column",sw="row";ea.seriesdatatosource=function(t){return new ea({data:t,sourceformat:t(t)?ww:mw,fromdataset:!1})},nr(ea);var tw=ui(),iw="\x00_ec_inner",cw=zo.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new zo(n),this._optionmanager=i},setoption:function(t,e){o(!(iw in t),"please use chart.getoption()"),this._optionmanager.setoption(t,e),this.resetoption(null)},resetoption:function(t){var e=!1,n=this._optionmanager;if(!t||"recreate"===t){var i=n.mountoption("recreate"===t);this.option&&"recreate"!==t?(this.restoredata(),this.mergeoption(i)):$a.call(this,i),e=!0}if(("timeline"===t||"media"===t)&&this.restoredata(),!t||"recreate"===t||"timeline"===t){var r=n.gettimelineoption(this);r&&(this.mergeoption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=n.getmediaoption(this,this._api);o.length&&f(o,function(t){this.mergeoption(t,e=!0)},this)}return e},mergeoption:function(t){function e(e,i){var r=bi(t[e]),s=hi(o.get(e),r);gi(s),f(s,function(t){var n=t.option;m(n)&&(t.keyinfo.maintype=e,t.keyinfo.subtype=qa(e,n,t.exist))});var l=ja(o,i);n[e]=[],o.set(e,[]),f(s,function(t,i){var r=t.exist,s=t.option;if(o(m(s)||r,"empty component definition"),s){var u=cw.getclass(e,t.keyinfo.subtype,!0);if(r&&r instanceof u)r.name=t.keyinfo.name,r.mergeoption(s,this),r.optionupdated(s,!1);else{var h=a({dependentmodels:l,componentindex:i},t.keyinfo);r=new u(s,this,this,h),a(r,h),r.init(s,this,this,h),r.optionupdated(null,!0)}}else r.mergeoption({},this),r.optionupdated({},!1);o.get(e)[i]=r,n[e][i]=r.option},this),"series"===e&&ts(this,o.get("series"))}var n=this.option,o=this._componentsmap,s=[];va(this),f(t,function(t,e){null!=t&&(cw.hasclass(e)?e&&s.push(e):n[e]=null==n[e]?i(t):r(n[e],t,!0))}),cw.topologicaltravel(s,cw.getallclassmaintypes(),e,this),this._seriesindicesmap=n(this._seriesindices=this._seriesindices||[])},getoption:function(){var t=i(this.option);return f(t,function(e,n){if(cw.hasclass(n)){for(var e=bi(e),i=e.length-1;i>=0;i--)zi(e[i])&&e.splice(i,1);t[n]=e}}),delete t[iw],t},gettheme:function(){return this._theme},getcomponent:function(t,e){var n=this._componentsmap.get(t);return n?n[e||0]:void 0},querycomponents:function(t){var e=t.maintype;if(!e)return[];var n=t.index,i=t.id,r=t.name,o=this._componentsmap.get(e);if(!o||!o.length)return[];var a;if(null!=n)_(n)||(n=[n]),a=v(p(n,function(t){return o[t]}),function(t){return!!t});else if(null!=i){var s=_(i);a=v(o,function(t){return s&&u(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var l=_(r);a=v(o,function(t){return l&&u(r,t.name)>=0||!l&&t.name===r})}else a=o.slice();return es(a,t)},findcomponents:function(t){function e(t){var e=r+"index",n=r+"id",i=r+"name";return!t||null==t[e]&&null==t[n]&&null==t[i]?null:{maintype:r,index:t[e],id:t[n],name:t[i]}}function n(e){return t.filter?v(e,t.filter):e}var i=t.query,r=t.maintype,o=e(i),a=o?this.querycomponents(o):this._componentsmap.get(r);return n(es(a,t))},eachcomponent:function(t,e,n){var i=this._componentsmap;if("function"==typeof t)n=e,e=t,i.each(function(t,i){f(t,function(t,r){e.call(n,i,t,r)})});else if(w(t))f(i.get(t),e,n);else if(m(t)){var r=this.findcomponents(t);f(r,e,n)}},getseriesbyname:function(t){var e=this._componentsmap.get("series");return v(e,function(e){return e.name===t})},getseriesbyindex:function(t){return this._componentsmap.get("series")[t]},getseriesbytype:function(t){var e=this._componentsmap.get("series");return v(e,function(e){return e.subtype===t})},getseries:function(){return this._componentsmap.get("series").slice()},getseriescount:function(){return this._componentsmap.get("series").length},eachseries:function(t,e){f(this._seriesindices,function(n){var i=this._componentsmap.get("series")[n];t.call(e,i,n)},this)},eachrawseries:function(t,e){f(this._componentsmap.get("series"),t,e)},eachseriesbytype:function(t,e,n){f(this._seriesindices,function(i){var r=this._componentsmap.get("series")[i];r.subtype===t&&e.call(n,r,i)},this)},eachrawseriesbytype:function(t,e,n){return f(this.getseriesbytype(t),e,n)},isseriesfiltered:function(t){return null==this._seriesindicesmap.get(t.componentindex)},getcurrentseriesindices:function(){return(this._seriesindices||[]).slice()},filterseries:function(t,e){var n=v(this._componentsmap.get("series"),t,e);ts(this,n)},restoredata:function(t){var e=this._componentsmap;ts(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),cw.topologicaltravel(n,cw.getallclassmaintypes(),function(n){f(e.get(n),function(e){("series"!==n||!ja(e,t))&&e.restoredata()})})}});c(cw,gw);var aw=["getdom","getzr","getwidth","getheight","getdevicepixelratio","dispatchaction","isdisposed","on","off","getdataurl","getconnecteddataurl","getmodel","getoption","getviewofcomponentmodel","getviewofseriesmodel"],dw={};is.prototype={constructor:is,create:function(t,e){var n=[];f(dw,function(i){var r=i.create(t,e);n=n.concat(r||[])}),this._coordinatesystems=n},update:function(t,e){f(this._coordinatesystems,function(n){n.update&&n.update(t,e)})},getcoordinatesystems:function(){return this._coordinatesystems.slice()}},is.register=function(t,e){dw[t]=e},is.get=function(t){return dw[t]};var kw=f,pw=i,lw=p,ow=r,zw=/^(min|max)?(.+)$/;rs.prototype={constructor:rs,setoption:function(t,e){t&&f(bi(t.series),function(t){t&&t.data&&t(t.data)&&r(t.data)}),t=pw(t,!0);var n=this._optionbackup,i=os.call(this,t,e,!n);this._newbaseoption=i.baseoption,n?(us(n.baseoption,i.baseoption),i.timelineoptions.length&&(n.timelineoptions=i.timelineoptions),i.medialist.length&&(n.medialist=i.medialist),i.mediadefault&&(n.mediadefault=i.mediadefault)):this._optionbackup=i},mountoption:function(t){var e=this._optionbackup;return this._timelineoptions=lw(e.timelineoptions,pw),this._medialist=lw(e.medialist,pw),this._mediadefault=pw(e.mediadefault),this._currentmediaindices=[],pw(t?e.baseoption:this._newbaseoption)},gettimelineoption:function(t){var e,n=this._timelineoptions;if(n.length){var i=t.getcomponent("timeline");i&&(e=pw(n[i.getcurrentindex()],!0))}return e},getmediaoption:function(){var t=this._api.getwidth(),e=this._api.getheight(),n=this._medialist,i=this._mediadefault,r=[],o=[];if(!n.length&&!i)return o;for(var a=0,s=n.length;s>a;a++)as(n[a].query,t,e)&&r.push(a);return!r.length&&i&&(r=[-1]),r.length&&!ls(r,this._currentmediaindices)&&(o=lw(r,function(t){return pw(-1===t?i.option:n[t].option)})),this._currentmediaindices=r,o}};var rw=f,ew=m,bw=["areastyle","linestyle","nodestyle","linkstyle","chordstyle","label","labelline"],nw=function(t,e){rw(vs(t.series),function(t){ew(t)&&gs(t)});var n=["xaxis","yaxis","radiusaxis","angleaxis","singleaxis","parallelaxis","radar"];e&&n.push("valueaxis","categoryaxis","logaxis","timeaxis"),rw(n,function(e){rw(vs(t[e]),function(t){t&&(fs(t,"axislabel"),fs(t.axispointer,"label"))})}),rw(vs(t.parallel),function(t){var e=t&&t.parallelaxisdefault;fs(e,"axislabel"),fs(e&&e.axispointer,"label")}),rw(vs(t.calendar),function(t){cs(t,"itemstyle"),fs(t,"daylabel"),fs(t,"monthlabel"),fs(t,"yearlabel")}),rw(vs(t.radar),function(t){fs(t,"name")}),rw(vs(t.geo),function(t){ew(t)&&(ps(t),rw(vs(t.regions),function(t){ps(t)}))}),rw(vs(t.timeline),function(t){ps(t),cs(t,"label"),cs(t,"itemstyle"),cs(t,"controlstyle",!0);var e=t.data;_(e)&&f(e,function(t){m(t)&&(cs(t,"label"),cs(t,"itemstyle"))})}),rw(vs(t.toolbox),function(t){cs(t,"iconstyle"),rw(t.feature,function(t){cs(t,"iconstyle")})}),fs(ms(t.axispointer),"label"),fs(ms(t.tooltip).axispointer,"label")},vw=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],fw=["grid","geo","parallel","legend","toolbox","title","visualmap","datazoom","timeline"],hw=function(t,e){nw(t,e),t.series=bi(t.series),f(t.series,function(t){if(m(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockwise&&(t.clockwise=t.clockwise),"gauge"===e){var n=ys(t,"pointer.color");null!=n&&xs(t,"itemstyle.normal.color",n)}_s(t)}}),t.datarange&&(t.visualmap=t.datarange),f(fw,function(e){var n=t[e];n&&(_(n)||(n=[n]),f(n,function(t){_s(t)}))})},gw=function(t){var e=n();t.eachseries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getdata(),o={stackresultdimension:r.getcalculationinfo("stackresultdimension"),stackedoverdimension:r.getcalculationinfo("stackedoverdimension"),stackeddimension:r.getcalculationinfo("stackeddimension"),stackedbydimension:r.getcalculationinfo("stackedbydimension"),isstackedbyindex:r.getcalculationinfo("isstackedbyindex"),data:r,seriesmodel:t};if(!o.stackeddimension||!o.isstackedbyindex&&!o.stackedbydimension)return;i.length&&r.setcalculationinfo("stackedonseries",i[i.length-1].seriesmodel),i.push(o)}}),e.each(bs)},ww=ws.prototype;ww.pure=!1,ww.persistent=!0,ww.getsource=function(){return this._source};var zw={arrayrows_column:{pure:!0,count:function(){return math.max(0,this._data.length-this._source.startindex)},getitem:function(t){return this._data[t+this._source.startindex]},appenddata:ts},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=[],n=this._data,i=0;i=1)&&(t=1),t}var n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputdata=n.context.outputdata}this.__pipeline&&(this.__pipeline.currenttask=this);var o;this._plan&&!i&&(o=this._plan(this.context));var a=e(this._modby),s=this._moddatacount||0,l=e(t&&t.modby),u=t&&t.moddatacount||0;(a!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=zs(this,i)),this._modby=l,this._moddatacount=u;var c=t&&t.step;if(this._dueend=n?n._outputdueend:this._count?this._count(this.context):1/0,this._progress){var d=this._dueindex,f=math.min(null!=c?this._dueindex+c:1/0,this._dueend);if(!i&&(h||f>d)){var p=this._progress;if(_(p))for(var g=0;gi?i++:null}function e(){var t=i%a*r+math.ceil(i/a),e=i>=n?null:o>t?t:i;return i++,e}var n,i,r,o,a,s={reset:function(l,u,h,c){i=l,n=u,r=h,o=c,a=math.ceil(o/r),s.next=r>1&&o>0?e:t}};return s}();jw.dirty=function(){this._dirty=!0,this._ondirty&&this._ondirty(this.context)},jw.unfinished=function(){return this._progress&&this._dueindex":"",v=p+s.join(p||", ");return{rendermode:i,content:v,style:u}}function o(t){return{rendermode:i,content:va(pa(t)),style:u}}var a=this;i=i||"html";var s="html"===i?"
":"\n",l="richtext"===i,u={},h=0,c=this.getdata(),d=c.mapdimension("defaultedtooltip",!0),p=d.length,v=this.getrawvalue(t),m=_(v),y=c.getitemvisual(t,"color");m(y)&&y.colorstops&&(y=(y.colorstops[0]||{}).color),y=y||"transparent";var x=p>1||m&&!p?r(v):o(p?ds(c,t,d[0]):m?v[0]:v),b=x.content,w=a.seriesindex+"at"+h,s=xa({color:y,type:"item",rendermode:i,markerid:w});u[w]=y,++h;var t=c.getname(t),i=this.name;wi(this)||(i=""),i=i?va(i)+(e?": ":s):"";var c="string"==typeof s?s:s.content,a=e?c+i+b:i+c+(t?va(t)+": "+b:b);return{html:a,markers:u}},isanimationenabled:function(){if(fm.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,n){var i=this.ecmodel,r=gw.getcolorfrompalette.call(this,t,e,n);return r||(r=i.getcolorfrompalette(t,e,n)),r},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});c(jw,qw),c(jw,gw);var qw=function(){this.group=new ky,this.uid=uo("viewcomponent")};qw.prototype={constructor:qw,init:function(){},render:function(){},dispose:function(){},filterforexposedevent:null};var tm=qw.prototype;tm.updateview=tm.updatelayout=tm.updatevisual=function(){},er(qw),or(qw,{registerwhenextend:!0});var em=function(){var t=ui();return function(e){var n=t(e),i=e.pipelinecontext,r=n.large,o=n.progressiverender,a=n.large=i.large,s=n.progressiverender=i.progressiverender;return!!(r^a||o^s)&&"reset"}},nm=ui(),im=em();ws.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){xs(t.getdata(),i,"emphasis")},downplay:function(t,e,n,i){xs(t.getdata(),i,"normal")},remove:function(){this.group.removeall()},dispose:function(){},incrementalpreparerender:null,incrementalrender:null,updatetransform:null,filterforexposedevent:null};var rm=ws.prototype;rm.updateview=rm.updatelayout=rm.updatevisual=function(t,e,n,i){this.render(t,e,n,i)},er(ws,["dispose"]),or(ws,{registerwhenextend:!0}),ws.markupdatemethod=function(t,e){nm(t).updatemethod=e};var om={incrementalpreparerender:{progress:function(t,e){e.view.incrementalrender(t,e.model,e.ecmodel,e.api,e.payload)}},render:{forcefirstprogress:!0,progress:function(t,e){e.view.render(e.model,e.ecmodel,e.api,e.payload)}}},am="\x00__throttleoriginmethod",sm="\x00__throttlerate",lm="\x00__throttletype",um={createonallseries:!0,performrawseries:!0,reset:function(t,e){var n=t.getdata(),i=(t.visualcoloraccesspath||"itemstyle.color").split("."),r=t.get(i)||t.getcolorfrompalette(t.name,null,e.getseriescount());if(n.setvisual("color",r),!e.isseriesfiltered(t)){"function"!=typeof r||r instanceof ab||n.each(function(e){n.setitemvisual(e,"color",r(t.getdataparams(e)))});var o=function(t,e){var n=t.getitemmodel(e),r=n.get(i,!0);null!=r&&t.setitemvisual(e,"color",r)};return{dataeach:n.hasitemoption?o:null}}}},hm={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:""}}}},cm=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return f(e,function(t,e){n=n.replace(new regexp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=a.get(t);if(null==e){for(var n=t.split("."),i=hm.aria,r=0;rs)){var d=r();l=d?n(i("general.withtitle"),{title:d}):i("general.withouttitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=n(i(g),{seriescount:s}),e.eachseries(function(t,e){if(c>e){var r,a=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=i(a?l+"withname":l+"withoutname"),r=n(r,{seriesid:t.seriesindex,seriesname:t.get("name"),seriestype:o(t.subtype)});var h=t.getdata();window.data=h,r+=h.count()>u?n(i("data.partialdata"),{displaycnt:u}):i("data.alldata");for(var d=[],f=0;ff){var g=h.getname(f),v=ds(h,f);d.push(n(i(g?"data.withname":"data.withoutname"),{name:g,value:v}))}r+=d.join(i("data.separator.middle"))+i("data.separator.end"),p.push(r)}}),l+=p.join(i("series.multiple.separator.middle"))+i("series.multiple.separator.end"),t.setattribute("aria-label",l)}}},dm=math.pi,fm=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textcolor:"#000",maskcolor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new bb({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4}),i=new ib({shape:{startangle:-dm/2,endangle:-dm/2+.1,r:10},style:{stroke:e.color,linecap:"round",linewidth:5},zlevel:e.zlevel,z:10001}),r=new bb({style:{fill:"none",text:e.text,textposition:"right",textdistance:10,textfill:e.textcolor},zlevel:e.zlevel,z:10001});i.animateshape(!0).when(1e3,{endangle:3*dm/2}).start("circularinout"),i.animateshape(!0).when(1e3,{startangle:3*dm/2}).delay(300).start("circularinout");var o=new ky;return o.add(i),o.add(r),o.add(n),o.resize=function(){var e=t.getwidth()/2,o=t.getheight()/2;i.setshape({cx:e,cy:o});var a=i.shape.r;r.setshape({x:e-a,y:o-a,width:2*a,height:2*a}),n.setshape({x:0,y:0,width:t.getwidth(),height:t.getheight()})},o.resize(),o},pm=$s.prototype;pm.restoredata=function(t,e){t.restoredata(e),this._stagetaskmap.each(function(t){var e=t.overalltask;e&&e.dirty()})},pm.getperformargs=function(t,e){if(t.__pipeline){var n=this._pipelinemap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveenabled&&(!i||i.progressiverender)&&t.__idxinpipeline>n.blockindex,o=r?n.step:null,a=i&&i.moddatacount,s=null!=a?math.ceil(a/o):null;return{step:o,modby:s,moddatacount:a}}},pm.getpipeline=function(t){return this._pipelinemap.get(t)},pm.updatestreammodes=function(t,e){var n=this._pipelinemap.get(t.uid),i=t.getdata(),r=i.count(),o=n.progressiveenabled&&e.incrementalpreparerender&&r>=n.threshold,a=t.get("large")&&r>=t.get("largethreshold"),s="mod"===t.get("progressivechunkmode")?r:null;t.pipelinecontext=n.context={progressiverender:o,moddatacount:s,large:a}},pm.restorepipelines=function(t){var e=this,n=e._pipelinemap=n();t.eachseries(function(t){var i=t.getprogressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getprogressivethreshold(),progressiveenabled:i&&!(t.preventincremental&&t.preventincremental()),blockindex:-1,step:math.round(i||700),count:0}),ul(e,t,t.datatask)})},pm.preparestagetasks=function(){var t=this._stagetaskmap,e=this.ecinstance.getmodel(),n=this.api;f(this._allhandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&qs(this,i,r,e,n),i.overallreset&&tl(this,i,r,e,n)},this)},pm.prepareview=function(t,e,n,i){var r=t.rendertask,o=r.context;o.model=e,o.ecmodel=n,o.api=i,r.__block=!t.incrementalpreparerender,ul(this,e,r)},pm.performdataprocessortasks=function(t,e){js(this,this._dataprocessorhandlers,t,e,{block:!0})},pm.performvisualtasks=function(t,e,n){js(this,this._visualhandlers,t,e,n)},pm.performseriestasks=function(t){var e;t.eachseries(function(t){e|=t.datatask.perform()}),this.unfinished|=e},pm.plan=function(){this._pipelinemap.each(function(t){var e=t.tail;do{if(e.__block){t.blockindex=e.__idxinpipeline;break}e=e.getupstream()}while(e)})};var gm=pm.updatepayload=function(t,e){"remain"!==e&&(t.context.payload=e)},vm=sl(0);$s.wrapstagehandler=function(t,e){return b(t)&&(t={overallreset:t,seriestype:hl(t)}),t.uid=uo("stagehandler"),e&&(t.visualtype=e),t};var mm,ym={},xm={};cl(ym,cw),cl(xm,ns),ym.eachseriesbytype=ym.eachrawseriesbytype=function(t){mm=t},ym.eachcomponent=function(t){"series"===t.maintype&&t.subtype&&(mm=t.subtype)};var _m=["#37a2da","#32c5e9","#67e0e3","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e062ae","#e690d1","#e7bcf3","#9d96f5","#8378ea","#96bfff"],bm={color:_m,colorlayer:[["#37a2da","#ffd85c","#fd7b5f"],["#37a2da","#67e0e3","#ffdb5c","#ff9f7f","#e062ae","#9d96f5"],["#37a2da","#32c5e9","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e7bcf3","#8378ea","#96bfff"],_m]},wm="#eee",mm=function(){return{axisline:{linestyle:{color:wm}},axistick:{linestyle:{color:wm}},axislabel:{textstyle:{color:wm}},splitline:{linestyle:{type:"dashed",color:"#aaa"}},splitarea:{areastyle:{color:wm}}}},sm=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],tm={color:sm,backgroundcolor:"#333",tooltip:{axispointer:{linestyle:{color:wm},crossstyle:{color:wm}}},legend:{textstyle:{color:wm}},textstyle:{color:wm},title:{textstyle:{color:wm}},toolbox:{iconstyle:{normal:{bordercolor:wm}}},datazoom:{textstyle:{color:wm}},visualmap:{textstyle:{color:wm}},timeline:{linestyle:{color:wm},itemstyle:{normal:{color:sm[1]}},label:{normal:{textstyle:{color:wm}}},controlstyle:{normal:{color:wm,bordercolor:wm}}},timeaxis:mm(),logaxis:mm(),valueaxis:mm(),categoryaxis:mm(),line:{symbol:"circle"},graph:{color:sm},gauge:{title:{textstyle:{color:wm}}},candlestick:{itemstyle:{normal:{color:"#fd1050",color0:"#0cf49b",bordercolor:"#fd1050",bordercolor0:"#0cf49b"}}}};tm.categoryaxis.splitline.show=!1,cw.extend({type:"dataset",defaultoption:{serieslayoutby:mw,sourceheader:null,dimensions:null,source:null},optionupdated:function(){ba(this)}}),qw.extend({type:"dataset"});var im=vr.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildpath:function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveto(i-o,r),t.beziercurveto(i-o,r-l,i-s,r-a,i,r-a),t.beziercurveto(i+s,r-a,i+o,r-l,i+o,r),t.beziercurveto(i+o,r+l,i+s,r+a,i,r+a),t.beziercurveto(i-s,r+a,i-o,r+l,i-o,r),t.closepath()}}),cm=/[\s,]+/;fl.prototype.parse=function(t,e){e=e||{};var n=dl(t);if(!n)throw new error("illegal svg");var i=new ky;this._root=i;var r=n.getattribute("viewbox")||"",o=parsefloat(n.getattribute("width")||e.width),a=parsefloat(n.getattribute("height")||e.height);isnan(o)&&(o=null),isnan(a)&&(a=null),ml(n,i,null,!0);for(var s=n.firstchild;s;)this._parsenode(s,i),s=s.nextsibling; var l,u;if(r){var h=z(r).split(cm);h.length>=4&&(l={x:parsefloat(h[0]||0),y:parsefloat(h[1]||0),width:parsefloat(h[2]),height:parsefloat(h[3])})}if(l&&null!=o&&null!=a&&(u=bl(l,o,a),!e.ignoreviewbox)){var c=i;i=new ky,i.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignorerootclip||null==o||null==a||i.setclippath(new bb({shape:{x:0,y:0,width:o,height:a}})),{root:i,width:o,height:a,viewboxrect:l,viewboxtransform:u}},fl.prototype._parsenode=function(t,e){var n=t.nodename.tolowercase();"defs"===n?this._isdefine=!0:"text"===n&&(this._istext=!0);var i;if(this._isdefine){var r=dm[n];if(r){var o=r.call(this,t),a=t.getattribute("id");a&&(this._defs[a]=o)}}else{var r=am[n];r&&(i=r.call(this,t,e),e.add(i))}for(var s=t.firstchild;s;)1===s.nodetype&&this._parsenode(s,i),3===s.nodetype&&this._istext&&this._parsetext(s,i),s=s.nextsibling;"defs"===n?this._isdefine=!1:"text"===n&&(this._istext=!1)},fl.prototype._parsetext=function(t,e){if(1===t.nodetype){var n=t.getattribute("dx")||0,i=t.getattribute("dy")||0;this._textx+=parsefloat(n),this._texty+=parsefloat(i)}var r=new ub({style:{text:t.textcontent,transformtext:!0},position:[this._textx||0,this._texty||0]});gl(e,r),ml(t,r,this._defs);var o=r.style.fontsize;o&&9>o&&(r.style.fontsize=9,r.scale=r.scale||[1,1],r.scale[0]*=o/9,r.scale[1]*=o/9);var a=r.getboundingrect();return this._textx+=a.width,e.add(r),r};var am={g:function(t,e){var n=new ky;return gl(e,n),ml(t,n,this._defs),n},rect:function(t,e){var n=new bb;return gl(e,n),ml(t,n,this._defs),n.setshape({x:parsefloat(t.getattribute("x")||0),y:parsefloat(t.getattribute("y")||0),width:parsefloat(t.getattribute("width")||0),height:parsefloat(t.getattribute("height")||0)}),n},circle:function(t,e){var n=new hb;return gl(e,n),ml(t,n,this._defs),n.setshape({cx:parsefloat(t.getattribute("cx")||0),cy:parsefloat(t.getattribute("cy")||0),r:parsefloat(t.getattribute("r")||0)}),n},line:function(t,e){var n=new mb;return gl(e,n),ml(t,n,this._defs),n.setshape({x1:parsefloat(t.getattribute("x1")||0),y1:parsefloat(t.getattribute("y1")||0),x2:parsefloat(t.getattribute("x2")||0),y2:parsefloat(t.getattribute("y2")||0)}),n},ellipse:function(t,e){var n=new im;return gl(e,n),ml(t,n,this._defs),n.setshape({cx:parsefloat(t.getattribute("cx")||0),cy:parsefloat(t.getattribute("cy")||0),rx:parsefloat(t.getattribute("rx")||0),ry:parsefloat(t.getattribute("ry")||0)}),n},polygon:function(t,e){var n=t.getattribute("points");n&&(n=vl(n));var i=new mb({shape:{points:n||[]}});return gl(e,i),ml(t,i,this._defs),i},polyline:function(t,e){var n=new vr;gl(e,n),ml(t,n,this._defs);var i=t.getattribute("points");i&&(i=vl(i));var r=new yb({shape:{points:i||[]}});return r},image:function(t,e){var n=new _i;return gl(e,n),ml(t,n,this._defs),n.setstyle({image:t.getattribute("xlink:href"),x:t.getattribute("x"),y:t.getattribute("y"),width:t.getattribute("width"),height:t.getattribute("height")}),n},text:function(t,e){var n=t.getattribute("x")||0,i=t.getattribute("y")||0,r=t.getattribute("dx")||0,o=t.getattribute("dy")||0;this._textx=parsefloat(n)+parsefloat(r),this._texty=parsefloat(i)+parsefloat(o);var a=new ky;return gl(e,a),ml(t,a,this._defs),a},tspan:function(t,e){var n=t.getattribute("x"),i=t.getattribute("y");null!=n&&(this._textx=parsefloat(n)),null!=i&&(this._texty=parsefloat(i));var r=t.getattribute("dx")||0,o=t.getattribute("dy")||0,a=new ky;return gl(e,a),ml(t,a,this._defs),this._textx+=r,this._texty+=o,a},path:function(t,e){var n=t.getattribute("d")||"",i=wr(n);return gl(e,i),ml(t,i,this._defs),i}},dm={lineargradient:function(t){var e=parseint(t.getattribute("x1")||0,10),n=parseint(t.getattribute("y1")||0,10),i=parseint(t.getattribute("x2")||10,10),r=parseint(t.getattribute("y2")||0,10),o=new db(e,n,i,r);return pl(t,o),o},radialgradient:function(){}},km={fill:"fill",stroke:"stroke","stroke-width":"linewidth",opacity:"opacity","fill-opacity":"fillopacity","stroke-opacity":"strokeopacity","stroke-dasharray":"linedash","stroke-dashoffset":"linedashoffset","stroke-linecap":"linecap","stroke-linejoin":"linejoin","stroke-miterlimit":"miterlimit","font-family":"fontfamily","font-size":"fontsize","font-style":"fontstyle","font-weight":"fontweight","text-align":"textalign","alignment-baseline":"textbaseline"},pm=/url\(\s*#(.*?)\)/,lm=/(translate|scale|rotate|skewx|skewy|matrix)\(([\-\s0-9\.e,]*)\)/g,om=/([^\s:;]+)\s*:\s*([^:;]+)/g,zm=n(),rm={registermap:function(t,e,n){var i;return _(e)?i=e:e.svg?i=[{type:"svg",source:e.svg,specialareas:e.specialareas}]:(e.geojson&&!e.features&&(n=e.specialareas,e=e.geojson),i=[{type:"geojson",source:e,specialareas:n}]),f(i,function(t){var e=t.type;"geojson"===e&&(e=t.type="geojson");var n=em[e];n(t)}),zm.set(t,i)},retrievemap:function(t){return zm.get(t)}},em={geojson:function(t){var e=t.source;t.geojson=w(e)?"undefined"!=typeof json&&json.parse?json.parse(e):new function("return ("+e+");")():e},svg:function(t){t.svgxml=dl(t.source)}},bm=o,nm=f,vm=b,fm=m,hm=cw.parseclasstype,gm="4.2.1",wm={zrender:"4.0.6"},zm=1,xm=1e3,ym=5e3,um=1e3,qm=2e3,jm=3e3,km=4e3,$m=5e3,jm={processor:{filter:xm,statistic:ym},visual:{layout:um,global:qm,chart:jm,component:km,brush:$m}},qm="__flaginmainprocess",ts="__optionupdated",es=/^[a-za-z0-9_]+$/;sl.prototype.on=ml("on"),sl.prototype.off=ml("off"),sl.prototype.one=ml("one"),c(sl,ly);var ns=tl.prototype;ns._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[ts]){var e=this[ts].silent;this[qm]=!0,cl(this),is.update.call(this),this[qm]=!1,this[ts]=!1,pl.call(this,e),ll.call(this,e)}else if(t.unfinished){var n=zm,i=this._model,r=this._api;t.unfinished=!1;do{var o=+new date;t.performseriestasks(i),t.performdataprocessortasks(i),dl(this,i),t.performvisualtasks(i),nl(this,this._model,r,"remain"),n-=+new date-o}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},ns.getdom=function(){return this._dom},ns.getzr=function(){return this._zr},ns.setoption=function(t,e,n){var i;if(fm(e)&&(n=e.lazyupdate,i=e.silent,e=e.notmerge),this[qm]=!0,!this._model||e){var r=new rs(this._api),o=this._theme,a=this._model=new cw(null,null,o,r);a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setoption(t,ls),n?(this[ts]={silent:i},this[qm]=!1):(cl(this),is.update.call(this),this._zr.flush(),this[ts]=!1,this[qm]=!1,pl.call(this,i),ll.call(this,i))},ns.settheme=function(){console.error("echarts#settheme() is deprecated in echarts 3.0")},ns.getmodel=function(){return this._model},ns.getoption=function(){return this._model&&this._model.getoption()},ns.getwidth=function(){return this._zr.getwidth()},ns.getheight=function(){return this._zr.getheight()},ns.getdevicepixelratio=function(){return this._zr.painter.dpr||window.devicepixelratio||1},ns.getrenderedcanvas=function(t){if(fm.canvassupported){t=t||{},t.pixelratio=t.pixelratio||1,t.backgroundcolor=t.backgroundcolor||this._model.get("backgroundcolor");var e=this._zr;return e.painter.getrenderedcanvas(t)}},ns.getsvgdataurl=function(){if(fm.svgsupported){var t=this._zr,e=t.storage.getdisplaylist();return f(e,function(t){t.stopanimation(!0)}),t.painter.pathtodataurl()}},ns.getdataurl=function(t){t=t||{};var e=t.excludecomponents,n=this._model,i=[],r=this;nm(e,function(t){n.eachcomponent({maintype:t},function(t){var e=r._componentsmap[t.__viewid];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.getrenderedcanvas(t).todataurl("image/"+(t&&t.type||"png"));return nm(i,function(t){t.group.ignore=!1}),o},ns.getconnecteddataurl=function(t){if(fm.canvassupported){var e=this.group,n=math.min,r=math.max,o=1/0;if(ps[e]){var a=o,s=o,l=-o,u=-o,h=[],c=t&&t.pixelratio||1;f(fs,function(o){if(o.group===e){var c=o.getrenderedcanvas(i(t)),d=o.getdom().getboundingclientrect();a=n(d.left,a),s=n(d.top,s),l=r(d.right,l),u=r(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),a*=c,s*=c,l*=c,u*=c;var d=l-a,p=u-s,g=$m();g.width=d,g.height=p;var v=li(g);return nm(h,function(t){var e=new _i({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshimmediately(),g.todataurl("image/"+(t&&t.type||"png"))}return this.getdataurl(t)}},ns.converttopixel=x(il,"converttopixel"),ns.convertfrompixel=x(il,"convertfrompixel"),ns.containpixel=function(t,e){var n,i=this._model;return t=qi(i,t),f(t,function(t,i){i.indexof("models")>=0&&f(t,function(t){var r=t.coordinatesystem;if(r&&r.containpoint)n|=!!r.containpoint(e);else if("seriesmodels"===i){var o=this._chartsmap[t.__viewid];o&&o.containpoint&&(n|=o.containpoint(e,t))}},this)},this),!!n},ns.getvisual=function(t,e){var n=this._model;t=qi(n,t,{defaultmaintype:"series"});var i=t.seriesmodel,r=i.getdata(),o=t.hasownproperty("dataindexinside")?t.dataindexinside:t.hasownproperty("dataindex")?r.indexofrawindex(t.dataindex):null;return null!=o?r.getitemvisual(o,e):r.getvisual(e)},ns.getviewofcomponentmodel=function(t){return this._componentsmap[t.__viewid]},ns.getviewofseriesmodel=function(t){return this._chartsmap[t.__viewid]};var is={prepareandupdate:function(t){cl(this),is.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordsysmgr,o=this._scheduler;if(e){o.restoredata(e,t),o.performseriestasks(e),r.create(e,n),o.performdataprocessortasks(e,t),dl(this,e),r.update(e,n),rl(e),o.performvisualtasks(e,t),el(this,e,n,t);var a=e.get("backgroundcolor")||"transparent";if(fm.canvassupported)i.setbackgroundcolor(a);else{var s=ye(a);a=en(s,"rgb"),0===s[3]&&(a="transparent")}vl(e,n)}},updatetransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachcomponent(function(o,a){var s=n.getviewofcomponentmodel(a);if(s&&s.__alive)if(s.updatetransform){var l=s.updatetransform(a,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var o=n();e.eachseries(function(r){var a=n._chartsmap[r.__viewid];if(a.updatetransform){var s=a.updatetransform(r,e,i,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)}),rl(e),this._scheduler.performvisualtasks(e,t,{setdirty:!0,dirtymap:o}),nl(n,e,i,t,o),vl(e,this._api)}},updateview:function(t){var e=this._model;e&&(ws.markupdatemethod(t,"updateview"),rl(e),this._scheduler.performvisualtasks(e,t,{setdirty:!0}),el(this,this._model,this._api,t),vl(e,this._api))},updatevisual:function(t){is.update.call(this,t)},updatelayout:function(t){is.update.call(this,t)}};ns.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingfx&&this._loadingfx.resize(),e){var n=e.resetoption("media"),i=t&&t.silent;this[qm]=!0,n&&cl(this),is.update.call(this),this[qm]=!1,pl.call(this,i),ll.call(this,i)}},ns.showloading=function(t,e){if(fm(t)&&(e=t,t=""),t=t||"default",this.hideloading(),ds[t]){var n=ds[t](this._api,e),i=this._zr;this._loadingfx=n,i.add(n)}},ns.hideloading=function(){this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null},ns.makeactionfromevent=function(t){var e=a({},t);return e.type=as[t.type],e},ns.dispatchaction=function(t,e){if(fm(e)||(e={silent:!!e}),os[t.type]&&this._model){if(this[qm])return void this._pendingactions.push(t);kl.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&fm.browser.wechat&&this._throttledzrflush(),pl.call(this,e.silent),ll.call(this,e.silent)}},ns.appenddata=function(t){var e=t.seriesindex,n=this.getmodel(),i=n.getseriesbyindex(e);i.appenddata(t),this._scheduler.unfinished=!0},ns.on=ml("on"),ns.off=ml("off"),ns.one=ml("one");var rs=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];ns._initevents=function(){nm(rs,function(t){var e=function(e){var n,i=this.getmodel(),r=e.target,o="globalout"===t;if(o)n={};else if(r&&null!=r.dataindex){var s=r.datamodel||i.getseriesbyindex(r.seriesindex);n=s&&s.getdataparams(r.dataindex,r.datatype,r)||{}}else r&&r.eventdata&&(n=a({},r.eventdata));if(n){var l=n.componenttype,u=n.componentindex;("markline"===l||"markpoint"===l||"markarea"===l)&&(l="series",u=n.seriesindex);var h=l&&null!=u&&i.getcomponent(l,u),c=h&&this["series"===h.maintype?"_chartsmap":"_componentsmap"][h.__viewid];n.event=e,n.type=t,this._eceventprocessor.eventinfo={targetel:r,packedevent:n,model:h,view:c},this.trigger(t,n)}};e.zreventfulcallatlast=!0,this._zr.on(t,e,this)},this),nm(as,function(t,e){this._messagecenter.on(e,function(t){this.trigger(e,t)},this)},this)},ns.isdisposed=function(){return this._disposed},ns.clear=function(){this.setoption({series:[]},!0)},ns.dispose=function(){if(!this._disposed){this._disposed=!0,ki(this.getdom(),ms,"");var t=this._api,e=this._model;nm(this._componentsviews,function(n){n.dispose(e,t)}),nm(this._chartsviews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete fs[this.id]}},c(tl,ly),zl.prototype={constructor:zl,normalizequery:function(t){var e={},n={},i={};if(w(t)){var r=hm(t);e.maintype=r.main||null,e.subtype=r.sub||null}else{var o=["index","name","id"],a={name:1,dataindex:1,datatype:1};f(t,function(t,r){for(var s=!1,l=0;l0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.maintype=c,e[u.tolowercase()]=t,s=!0)}}a.hasownproperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptquery:e,dataquery:n,otherquery:i}},filter:function(t,e){function n(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var i=this.eventinfo;if(!i)return!0;var r=i.targetel,o=i.packedevent,a=i.model,s=i.view;if(!a||!s)return!0;var l=e.cptquery,u=e.dataquery;return n(l,a,"maintype")&&n(l,a,"subtype")&&n(l,a,"index","componentindex")&&n(l,a,"name")&&n(l,a,"id")&&n(u,o,"name")&&n(u,o,"dataindex")&&n(u,o,"datatype")&&(!s.filterforexposedevent||s.filterforexposedevent(t,e.otherquery,r,o))},aftertrigger:function(){this.eventinfo=null}};var os={},as={},ss=[],ls=[],us=[],hs=[],cs={},ds={},fs={},ps={},gs=new date-0,vs=new date-0,ms="_echarts_instance_",ys=ql;au(qm,um),ql(hw),tu(ym,gw),lu("default",fm),nu({type:"highlight",event:"highlight",update:"highlight"},f),nu({type:"downplay",event:"downplay",update:"downplay"},f),jl("light",bm),jl("dark",tm);var xs={};mu.prototype={constructor:mu,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,e=this._old,n=this._new,i={},r={},o=[],a=[];for(yu(e,i,o,"_oldkeygetter",this),yu(n,r,a,"_newkeygetter",this),t=0;th;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var _s=n(["tooltip","label","itemname","itemid","seriesname"]),bs=m,ws="undefined",ms=-1,ss="e\x00\x00",ts={"float":typeof float64array===ws?array:float64array,"int":typeof int32array===ws?array:int32array,ordinal:array,number:array,time:array},is=typeof uint32array===ws?array:uint32array,cs=typeof int32array===ws?array:int32array,as=typeof uint16array===ws?array:uint16array,ds=["hasitemoption","_namelist","_idlist","_invertedindicesmap","_rawdata","_chunksize","_chunkcount","_dimvaluegetter","_count","_rawcount","_namedimidx","_iddimidx"],ks=["_extent","_approximateextent","_rawextent"],ps=function(t,e){t=t||["x","y"];for(var n={},i=[],r={},o=0;oh;h++){var c=r[h];a[c]||(a[c]=zu()),i[c]||(i[c]=[]),tu(i,this._dimensioninfos[c],n,u,l),this._chunkcount=i[c].length}for(var d=new array(o),f=s;l>f;f++){for(var p=f-s,g=math.floor(f/n),v=f%n,m=0;o>m;m++){var c=r[m],y=this._dimvaluegetterarrayrows(t[p]||d,c,p,m);i[c][g][v]=y;var x=a[c];yx[1]&&(x[1]=y)}e&&(this._namelist[f]=e[p])}this._rawcount=this._count=l,this._extent={},iu(this)},ls._initdatafromprovider=function(t,e){if(!(t>=e)){for(var n,i=this._chunksize,r=this._rawdata,o=this._storage,a=this.dimensions,s=a.length,l=this._dimensioninfos,u=this._namelist,h=this._idlist,c=this._rawextent,d=this._namerepeatcount={},f=this._chunkcount,p=0;s>p;p++){var g=a[p];c[g]||(c[g]=zu());var v=l[g];0===v.otherdims.itemname&&(n=this._namedimidx=p),0===v.otherdims.itemid&&(this._iddimidx=p),o[g]||(o[g]=[]),tu(o,v,i,f,e),this._chunkcount=o[g].length}for(var m=new array(s),y=t;e>y;y++){m=r.getitem(y,m);for(var x=math.floor(y/i),_=y%i,b=0;s>b;b++){var g=a[b],w=o[g][x],m=this._dimvaluegetter(m,g,y,b);w[_]=m;var s=c[g];ms[1]&&(s[1]=m)}if(!r.pure){var t=u[y];if(m&&null==t)if(null!=m.name)u[y]=t=m.name;else if(null!=n){var i=a[n],c=o[i][x];if(c){t=c[_];var a=l[i].ordinalmeta;a&&a.categories.length&&(t=a.categories[t])}}var d=null==m?null:m.id;null==d&&null!=t&&(d[t]=d[t]||0,d=t,d[t]>0&&(d+="__ec__"+d[t]),d[t]++),null!=d&&(h[y]=d)}}!r.persistent&&r.clean&&r.clean(),this._rawcount=this._count=e,this._extent={},iu(this)}},ls.count=function(){return this._count},ls.getindices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===array){t=new n(i);for(var r=0;i>r;r++)t[r]=e[r]}else t=new n(e.buffer,0,i)}else for(var n=wu(this),t=new n(this.count()),r=0;r=0&&e=0&&ei;i++)n.push(this.get(t[i],e));return n},ls.hasvalue=function(t){for(var e=this._dimensionssummary.datadimsoncoord,n=this._dimensioninfos,i=0,r=e.length;r>i;i++)if("ordinal"!==n[e[i]].type&&isnan(this.get(e[i],t)))return!1;return!0},ls.getdataextent=function(t){t=this.getdimension(t);var e=this._storage[t],n=zu();if(!e)return n;var i,r=this.count(),o=!this._indices;if(o)return this._rawextent[t].slice();if(i=this._extent[t])return i.slice();i=n;for(var a=i[0],s=i[1],l=0;r>l;l++){var u=this._getfast(t,this.getrawindex(l));a>u&&(a=u),u>s&&(s=u)}return i=[a,s],this._extent[t]=i,i},ls.getapproximateextent=function(t){return t=this.getdimension(t),this._approximateextent[t]||this.getdataextent(t)},ls.setapproximateextent=function(t,e){e=this.getdimension(e),this._approximateextent[e]=t.slice()},ls.getcalculationinfo=function(t){return this._calculationinfo[t]},ls.setcalculationinfo=function(t,e){bs(t)?a(this._calculationinfo,t):this._calculationinfo[t]=e},ls.getsum=function(t){var e=this._storage[t],n=0;if(e)for(var i=0,r=this.count();r>i;i++){var o=this.get(t,i);isnan(o)||(n+=o)}return n},ls.getmedian=function(t){var e=[];this.each(t,function(t){isnan(t)||e.push(t)});var n=[].concat(e).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},ls.rawindexof=function(t,e){var n=t&&this._invertedindicesmap[t],i=n[e];return null==i||isnan(i)?ms:i},ls.indexofname=function(t){for(var e=0,n=this.count();n>e;e++)if(this.getname(e)===t)return e;return-1},ls.indexofrawindex=function(t){if(!this._indices)return t;if(t>=this._rawcount||0>t)return-1;var e=this._indices,n=e[t];if(null!=n&&n=i;){var o=(i+r)/2|0;if(e[o]t))return o;r=o-1}}return-1},ls.indicesofnearest=function(t,e,n){var i=this._storage,r=i[t],o=[];if(!r)return o;null==n&&(n=1/0);for(var a=number.max_value,s=-1,l=0,u=this.count();u>l;l++){var h=e-this.get(t,l),c=math.abs(h);n>=h&&a>=c&&((a>c||h>=0&&0>s)&&(a=c,s=h,o.length=0),o.push(l))}return o},ls.getrawindex=au,ls.getrawdataitem=function(t){if(this._rawdata.persistent)return this._rawdata.getitem(this.getrawindex(t));for(var e=[],n=0;na;a++)s[a]=this.get(t[a],o);s[a]=o,e.apply(n,s)}}},ls.filterself=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=p(pu(t),this.getdimension,this);for(var r=this.count(),o=wu(this),a=new o(r),s=[],l=t.length,u=0,h=t[0],c=0;r>c;c++){var d,f=this.getrawindex(c);if(0===l)d=e.call(n,c);else if(1===l){var g=this._getfast(h,f);d=e.call(n,g,c)}else{for(var v=0;l>v;v++)s[v]=this._getfast(h,f);s[v]=c,d=e.apply(n,s)}d&&(a[u++]=f)}return r>u&&(this._indices=a),this._count=u,this._extent={},this.getrawindex=this._indices?du:au,this}},ls.selectrange=function(t){if(this._count){var e=[];for(var n in t)t.hasownproperty(n)&&e.push(n);var i=e.length;if(i){var r=this.count(),o=wu(this),a=new o(r),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===i){for(var f=this._storage[e[0]],p=0;pm;m++){var y=g[m];(y>=u&&h>=y||isnan(y))&&(a[s++]=d),d++}c=!0}else if(2===i){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],b=t[e[1]][1],p=0;pm;m++){var y=g[m],m=w[m];(y>=u&&h>=y||isnan(y))&&(m>=_&&b>=m||isnan(m))&&(a[s++]=d),d++}c=!0}}if(!c)if(1===i)for(var m=0;r>m;m++){var s=this.getrawindex(m),y=this._getfast(l,s);(y>=u&&h>=y||isnan(y))&&(a[s++]=s)}else for(var m=0;r>m;m++){for(var t=!0,s=this.getrawindex(m),p=0;i>p;p++){var i=e[p],y=this._getfast(n,s);(yt[i][1])&&(t=!1)}t&&(a[s++]=this.getrawindex(m))}return r>s&&(this._indices=a),this._count=s,this._extent={},this.getrawindex=this._indices?du:au,this}}},ls.maparray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},ls.map=function(t,e,n,i){n=n||i||this,t=p(pu(t),this.getdimension,this);var r=lu(this,t);r._indices=this._indices,r.getrawindex=r._indices?du:au;for(var o=r._storage,a=[],s=this._chunksize,l=t.length,u=this.count(),h=[],c=r._rawextent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(n,h);if(null!=g){"object"!=typeof g&&(a[0]=g,g=a);for(var v=this.getrawindex(d),m=math.floor(v/s),y=v%s,x=0;xw[1]&&(w[1]=b)}}}return r},ls.downsample=function(t,e,n,i){for(var r=lu(this,[t]),o=r._storage,a=[],s=math.floor(1/e),l=o[t],u=this.count(),h=this._chunksize,c=r._rawextent[t],d=new(wu(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,a.length=s);for(var g=0;s>g;g++){var v=this.getrawindex(p+g),m=math.floor(v/h),y=v%h;a[g]=l[m][y]}var x=n(a),_=this.getrawindex(math.min(p+i(a,x)||0,u-1)),b=math.floor(_/h),w=_%h;l[b][w]=x,xc[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getrawindex=du,r},ls.getitemmodel=function(t){var e=this.hostmodel;return new zo(this.getrawdataitem(t),e,e&&e.ecmodel)},ls.diff=function(t){var e=this;return new mu(t?t.getindices():[],this.getindices(),function(e){return ku(t,e)},function(t){return ku(e,t)})},ls.getvisual=function(t){var e=this._visual;return e&&e[t]},ls.setvisual=function(t,e){if(bs(t))for(var n in t)t.hasownproperty(n)&&this.setvisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},ls.setlayout=function(t,e){if(bs(t))for(var n in t)t.hasownproperty(n)&&this.setlayout(n,t[n]);else this._layout[t]=e},ls.getlayout=function(t){return this._layout[t]},ls.getitemlayout=function(t){return this._itemlayouts[t]},ls.setitemlayout=function(t,e,n){this._itemlayouts[t]=n?a(this._itemlayouts[t]||{},e):e},ls.clearitemlayouts=function(){this._itemlayouts.length=0},ls.getitemvisual=function(t,e,n){var i=this._itemvisuals[t],r=i&&i[e];return null!=r||n?r:this.getvisual(e)},ls.setitemvisual=function(t,e,n){var i=this._itemvisuals[t]||{},r=this.hasitemvisual;if(this._itemvisuals[t]=i,bs(e))for(var o in e)e.hasownproperty(o)&&(i[o]=e[o],r[o]=!0);else i[e]=n,r[e]=!0},ls.clearallvisual=function(){this._visual={},this._itemvisuals=[],this.hasitemvisual={}};var os=function(t){t.seriesindex=this.seriesindex,t.dataindex=this.dataindex,t.datatype=this.datatype};ls.setitemgraphicel=function(t,e){var n=this.hostmodel;e&&(e.dataindex=t,e.datatype=this.datatype,e.seriesindex=n&&n.seriesindex,"group"===e.type&&e.traverse(os,e)),this._graphicels[t]=e},ls.getitemgraphicel=function(t){return this._graphicels[t]},ls.eachitemgraphicel=function(t,e){f(this._graphicels,function(n,i){n&&t&&t.call(e,n,i)})},ls.cloneshallow=function(t){if(!t){var e=p(this.dimensions,this.getdimensioninfo,this);t=new ps(e,this.hostmodel)}if(t._storage=this._storage,su(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getrawindex=t._indices?du:au,t},ls.wrapmethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedmethods=this.__wrappedmethods||[],this.__wrappedmethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(p(arguments)))})},ls.transferable_methods=["cloneshallow","downsample","map"],ls.changable_methods=["filterself","selectrange"];var zs=function(t,e){return e=e||{},ru(e.coorddimensions||[],t,{dimsdef:e.dimensionsdefine||t.dimensionsdefine,encodedef:e.encodedefine||t.encodedefine,dimcount:e.dimensionscount,generatecoord:e.generatecoord,generatecoordcount:e.generatecoordcount})};zu.prototype.parse=function(t){return t},zu.prototype.getsetting=function(t){return this._setting[t]},zu.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},zu.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},zu.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},zu.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},zu.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},zu.prototype.getextent=function(){return this._extent.slice()},zu.prototype.setextent=function(t,e){var n=this._extent;isnan(t)||(n[0]=t),isnan(e)||(n[1]=e)},zu.prototype.isblank=function(){return this._isblank},zu.prototype.setblank=function(t){this._isblank=t},zu.prototype.getlabel=null,er(zu),or(zu,{registerwhenextend:!0}),xu.createbyaxismodel=function(t){var e=t.option,n=e.data,i=n&&p(n,uu);return new xu({categories:i,needcollect:!i,deduplication:e.dedplication!==!1})};var rs=xu.prototype;rs.getordinal=function(t){return yu(this).get(t)},rs.parseandcollect=function(t){var e,n=this._needcollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=yu(this);return e=i.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=0/0),e};var es=zu.prototype,bs=zu.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new xu({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),es.contain.call(this,t)&&null!=this._ordinalmeta.categories[t]},normalize:function(t){return es.normalize.call(this,this.parse(t))},scale:function(t){return math.round(es.scale.call(this,t))},getticks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getlabel:function(t){return this.isblank()?void 0:this._ordinalmeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionextentfromdata:function(t,e){this.unionextent(t.getapproximateextent(e))},getordinalmeta:function(){return this._ordinalmeta},niceticks:f,niceextent:f});bs.create=function(){return new bs};var ns=qo,vs=qo,fs=zu.extend({type:"interval",_interval:0,_intervalprecision:2,setextent:function(t,e){var n=this._extent;isnan(t)||(n[0]=parsefloat(t)),isnan(e)||(n[1]=parsefloat(e))},unionextent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),fs.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=ju(t)},getticks:function(){return ju(this._interval,this._extent,this._niceextent,this._intervalprecision)},getlabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=na(t)||0:"auto"===n&&(n=this._intervalprecision),t=vs(t,n,!0),pa(t)},niceticks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isfinite(r)){0>r&&(r=-r,i.reverse());var o=qu(i,t,e,n);this._intervalprecision=o.intervalprecision,this._interval=o.interval,this._niceextent=o.nicetickextent}},niceextent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixmax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isfinite(i)||(e[0]=0,e[1]=1),this.niceticks(t.splitnumber,t.mininterval,t.maxinterval);var r=this._interval;t.fixmin||(e[0]=vs(math.floor(e[0]/r)*r)),t.fixmax||(e[1]=vs(math.ceil(e[1]/r)*r))}});fs.create=function(){return new fs};var hs="__ec_stack_",gs=.5,ws="undefined"!=typeof float32array?float32array:array,zs={seriestype:"bar",plan:em(),reset:function(t){function e(t,e){for(var n,c=new ws(2*t.count),d=[],f=[],p=0;null!=(n=t.next());)f[u]=e.get(a,n),f[1-u]=e.get(s,n),d=i.datatopoint(f,null,d),c[p++]=d[0],c[p++]=d[1];e.setlayout({largepoints:c,barwidth:h,valueaxisstart:lh(r,o,!1),valueaxishorizontal:l})}if(ah(t)&&sh(t)){var n=t.getdata(),i=t.coordinatesystem,r=i.getbaseaxis(),o=i.getotheraxis(r),a=n.mapdimension(o.dim),s=n.mapdimension(r.dim),l=o.ishorizontal(),u=l?0:1,h=rh(nh([t]),r,t).width; return h>gs||(h=gs),{progress:e}}}},xs=fs.prototype,ys=math.ceil,us=math.floor,qs=1e3,js=60*qs,ks=60*js,$s=24*ks,js=function(t,e,n,i){for(;i>n;){var r=n+i>>>1;t[r][1]o&&(o=e),null!=n&&o>n&&(o=n);var a=tt.length,s=js(tt,o,0,a),l=tt[math.min(s,a-1)],u=l[1];if("year"===l[0]){var h=r/u,c=ha(h/t,!0);u*=c}var d=this.getsetting("useutc")?0:60*new date(+i[0]||+i[1]).gettimezoneoffset()*1e3,f=[math.round(ys((i[0]-d)/u)*u+d),math.round(us((i[1]-d)/u)*u+d)];$u(f,i),this._steplvl=l,this._interval=u,this._niceextent=f},parse:function(t){return+sa(t)}});f(["contain","normalize"],function(t){qs.prototype[t]=function(e){return xs[t].call(this,this.parse(e))}});var tt=[["hh:mm:ss",qs],["hh:mm:ss",5*qs],["hh:mm:ss",10*qs],["hh:mm:ss",15*qs],["hh:mm:ss",30*qs],["hh:mm\nmm-dd",js],["hh:mm\nmm-dd",5*js],["hh:mm\nmm-dd",10*js],["hh:mm\nmm-dd",15*js],["hh:mm\nmm-dd",30*js],["hh:mm\nmm-dd",ks],["hh:mm\nmm-dd",2*ks],["hh:mm\nmm-dd",6*ks],["hh:mm\nmm-dd",12*ks],["mm-dd\nyyyy",$s],["mm-dd\nyyyy",2*$s],["mm-dd\nyyyy",3*$s],["mm-dd\nyyyy",4*$s],["mm-dd\nyyyy",5*$s],["mm-dd\nyyyy",6*$s],["week",7*$s],["mm-dd\nyyyy",10*$s],["week",14*$s],["week",21*$s],["month",31*$s],["week",42*$s],["month",62*$s],["week",70*$s],["quarter",95*$s],["month",31*$s*4],["month",31*$s*5],["half-year",380*$s/2],["month",31*$s*8],["month",31*$s*10],["year",380*$s]];qs.create=function(t){return new qs({useutc:t.ecmodel.get("useutc")})};var et=zu.prototype,nt=fs.prototype,it=na,rt=qo,ot=math.floor,at=math.ceil,st=math.pow,lt=math.log,ut=zu.extend({type:"log",base:10,$constructor:function(){zu.apply(this,arguments),this._originalscale=new fs},getticks:function(){var t=this._originalscale,e=this._extent,n=t.getextent();return p(nt.getticks.call(this),function(i){var r=qo(st(this.base,i));return r=i===e[0]&&t.__fixmin?uh(r,n[0]):r,r=i===e[1]&&t.__fixmax?uh(r,n[1]):r},this)},getlabel:nt.getlabel,scale:function(t){return t=et.scale.call(this,t),st(this.base,t)},setextent:function(t,e){var n=this.base;t=lt(t)/lt(n),e=lt(e)/lt(n),nt.setextent.call(this,t,e)},getextent:function(){var t=this.base,e=et.getextent.call(this);e[0]=st(t,e[0]),e[1]=st(t,e[1]);var n=this._originalscale,i=n.getextent();return n.__fixmin&&(e[0]=uh(e[0],i[0])),n.__fixmax&&(e[1]=uh(e[1],i[1])),e},unionextent:function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=lt(t[0])/lt(e),t[1]=lt(t[1])/lt(e),et.unionextent.call(this,t)},unionextentfromdata:function(t,e){this.unionextent(t.getapproximateextent(e))},niceticks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(1/0===n||0>=n)){var i=la(n),r=t/n*i;for(.5>=r&&(i*=10);!isnan(i)&&math.abs(i)<1&&math.abs(i)>0;)i*=10;var o=[qo(at(e[0]/i)*i),qo(ot(e[1]/i)*i)];this._interval=i,this._niceextent=o}},niceextent:function(t){nt.niceextent.call(this,t);var e=this._originalscale;e.__fixmin=t.fixmin,e.__fixmax=t.fixmax}});f(["contain","normalize"],function(t){ut.prototype[t]=function(e){return e=lt(e)/lt(this.base),et[t].call(this,e)}}),ut.create=function(){return new ut};var ht={getmin:function(t){var e=this.option,n=t||null==e.rangestart?e.min:e.rangestart;return this.axis&&null!=n&&"datamin"!==n&&"function"!=typeof n&&!c(n)&&(n=this.axis.scale.parse(n)),n},getmax:function(t){var e=this.option,n=t||null==e.rangeend?e.max:e.rangeend;return this.axis&&null!=n&&"datamax"!==n&&"function"!=typeof n&&!c(n)&&(n=this.axis.scale.parse(n)),n},getneedcrosszero:function(){var t=this.option;return null!=t.rangestart||null!=t.rangeend?!1:!t.scale},getcoordsysmodel:f,setrange:function(t,e){this.option.rangestart=t,this.option.rangeend=e},resetrange:function(){this.option.rangestart=this.option.rangeend=null}},ct=qr({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveto(n,i-o),t.lineto(n+r,i+o),t.lineto(n-r,i+o),t.closepath()}}),dt=qr({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveto(n,i-o),t.lineto(n+r,i),t.lineto(n,i+o),t.lineto(n-r,i),t.closepath()}}),ft=qr({type:"pin",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=math.asin(s/a),h=math.cos(u)*a,c=math.sin(u),d=math.cos(u),f=.6*a,p=.7*a;t.moveto(n-h,l+s),t.arc(n,l,a,math.pi-u,2*math.pi+u),t.beziercurveto(n+h-c*f,l+s+d*f,n,i-p,n,i),t.beziercurveto(n,i-p,n-h+c*f,l+s+d*f,n-h,l+s),t.closepath()}}),pt=qr({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveto(r,o),t.lineto(r+a,o+n),t.lineto(r,o+n/4*3),t.lineto(r-a,o+n),t.lineto(r,o),t.closepath()}}),gt={line:mb,rect:bb,roundrect:bb,square:bb,circle:hb,diamond:dt,pin:ft,arrow:pt,triangle:ct},vt={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundrect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=math.min(n,i)/4},square:function(t,e,n,i,r){var o=math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},mt={};f(gt,function(t,e){mt[e]=new t});var yt=qr({type:"symbol",shape:{symboltype:"",x:0,y:0,width:0,height:0},beforebrush:function(){var t=this.style,e=this.shape;"pin"===e.symboltype&&"inside"===t.textposition&&(t.textposition=["50%","40%"],t.textalign="center",t.textverticalalign="middle")},buildpath:function(t,e,n){var i=e.symboltype,r=mt[i];"none"!==e.symboltype&&(r||(i="rect",r=mt[i]),vt[i](e.x,e.y,e.width,e.height,r.shape),r.buildpath(t,r.shape,n))}}),xt={isdimensionstacked:vu,enabledatastack:nu,getstackeddimension:fu},_t=(object.freeze||object)({createlist:mh,getlayoutrect:ia,datastack:xt,createscale:sh,mixinaxismodelcommonmethods:th,completedimensions:ru,createdimensions:zs,createsymbol:wh}),bt=1e-8;ah.prototype={constructor:ah,properties:null,getboundingrect:function(){var t=this._rect;if(t)return t;for(var e=number.max_value,n=[e,e],i=[-e,-e],r=[],o=[],a=this.geometries,s=0;si;i++)if("polygon"===n[i].type){var o=n[i].exterior,a=n[i].interiors;if(ch(o,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(ch(a[s]))continue t;return!0}}return!1},transformto:function(t,e,n,i){var r=this.getboundingrect(),o=r.width/r.height;n?i||(i=n/o):n=o*i;for(var a=new xn(t,e,n,i),s=r.calculatetransform(a),l=this.geometries,u=0;u0}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"multipolygon"===n.type&&f(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new ah(e.name,r,e.cp);return o.properties=e,o})},mt=ui(),st=[0,1],tt=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onband=!1};tt.prototype={constructor:tt,contain:function(t){var e=this._extent,n=math.min(e[0],e[1]),i=math.max(e[0],e[1]);return t>=n&&i>=t},containdata:function(t){return this.contain(this.datatocoord(t))},getextent:function(){return this._extent.slice()},getpixelprecision:function(t){return ia(t||this.scale.getextent(),this._extent)},setextent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},datatocoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onband&&"ordinal"===i.type&&(n=n.slice(),xh(n,i.count())),$o(t,st,n,e)},coordtodata:function(t,e){var n=this._extent,i=this.scale;this.onband&&"ordinal"===i.type&&(n=n.slice(),xh(n,i.count()));var r=$o(t,n,st,e);return this.scale.scale(r)},pointtodata:function(){},gettickscoords:function(t){t=t||{};var e=t.tickmodel||this.gettickmodel(),n=lh(this,e),i=n.ticks,r=p(i,function(t){return{coord:this.datatocoord(t),tickvalue:t}},this),o=e.get("alignwithlabel");return yh(this,r,n.tickcategoryinterval,o,t.clamp),r},getviewlabels:function(){return ph(this).labels},getlabelmodel:function(){return this.model.getmodel("axislabel")},gettickmodel:function(){return this.model.getmodel("axistick")},getbandwidth:function(){var t=this._extent,e=this.scale.getextent(),n=e[1]-e[0]+(this.onband?1:0);0===n&&(n=1);var i=math.abs(t[1]-t[0]);return math.abs(i)/n},ishorizontal:null,getrotate:null,calculatecategoryinterval:function(){return hh(this)}};var it=wt,ct={};f(["map","each","filter","indexof","inherits","reduce","filter","bind","curry","isarray","isstring","isobject","isfunction","extend","defaults","clone","merge"],function(t){ct[t]=ty[t]});var at={};f(["extendshape","extendpath","makepath","makeimage","mergepath","resizepath","createicon","sethoverstyle","setlabelstyle","settextstyle","settext","getfont","updateprops","initprops","gettransform","clippointsbyrect","cliprectbyrect","group","image","text","circle","sector","ring","polygon","polyline","rect","line","beziercurve","arc","incrementaldisplayable","compoundpath","lineargradient","radialgradient","boundingrect"],function(t){at[t]=fb[t]});var dt=function(t){this._axes={},this._dimlist=[],this.name=t||""};dt.prototype={constructor:dt,type:"cartesian",getaxis:function(t){return this._axes[t]},getaxes:function(){return p(this._dimlist,uh,this)},getaxesbyscale:function(t){return t=t.tolowercase(),v(this.getaxes(),function(e){return e.scale.type===t})},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 n=this._dimlist,i=t instanceof array?[]:{},r=0;re[1]&&e.reverse(),e},getotheraxis:function(){this.grid.getotheraxis()},pointtodata:function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},tolocalcoord:null,toglobalcoord:null},h(kt,tt);var pt={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)"]}}},lt={};lt.categoryaxis=r({boundarygap:!0,deduplication:null,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},pt),lt.valueaxis=r({boundarygap:[0,0],splitnumber:5},pt),lt.timeaxis=s({scale:!0,min:"datamin",max:"datamax"},lt.valueaxis),lt.logaxis=s({scale:!0,logbase:10},lt.valueaxis);var ot=["value","category","time","log"],zt=function(t,e,n,i){f(ot,function(a){e.extend({type:t+"axis."+a,mergedefaultandtheme:function(e,i){var o=this.layoutmode,s=o?ka(e):{},l=i.gettheme();r(e,l.get(a+"axis")),r(e,this.getdefaultoption()),e.type=n(t,e),o&&da(e,s,o)},optionupdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalmeta=xu.createbyaxismodel(this))},getcategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalmeta.categories:void 0},getordinalmeta:function(){return this.__ordinalmeta},defaultoption:o([{},lt[a+"axis"],i],!0)})}),cw.registersubtypedefaulter(t+"axis",x(n,t))},rt=cw.extend({type:"cartesian2daxis",axis:null,init:function(){rt.superapply(this,"init",arguments),this.resetrange()},mergeoption:function(){rt.superapply(this,"mergeoption",arguments),this.resetrange()},restoredata:function(){rt.superapply(this,"restoredata",arguments),this.resetrange()},getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"grid",index:this.option.gridindex,id:this.option.gridid})[0]}});r(rt.prototype,ht);var et={offset:0};zt("x",rt,jh,et),zt("y",rt,jh,et),cw.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 bt=$h.prototype;bt.type="grid",bt.axispointerenabled=!0,bt.getrect=function(){return this._rect},bt.update=function(t,e){var n=this._axesmap;this._updatescale(t,this.model),f(n.x,function(t){dh(t.scale,t.model)}),f(n.y,function(t){dh(t.scale,t.model)});var i={};f(n.x,function(t){jh(n,"y",t,i)}),f(n.y,function(t){jh(n,"x",t,i)}),this.resize(this.model,e)},bt.resize=function(t,e,n){function i(){f(o,function(t){var e=t.ishorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setextent(n[i],n[1-i]),tc(t,e?r.x:r.y)})}var r=ia(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()});this._rect=r;var o=this._axeslist;i(),!n&&t.get("containlabel")&&(f(o,function(t){if(!t.model.get("axislabel.inside")){var e=mh(t);if(e){var n=t.ishorizontal()?"height":"width",i=t.model.get("axislabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},bt.getaxis=function(t,e){var n=this._axesmap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasownproperty(i))return n[i];return n[e]}},bt.getaxes=function(){return this._axeslist.slice()},bt.getcartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsmap[n]}m(t)&&(e=t.yaxisindex,t=t.xaxisindex);for(var i=0,r=this._coordslist;it&&(t=e),t}});var ft=n_([["fill","color"],["stroke","bordercolor"],["linewidth","borderwidth"],["stroke","barbordercolor"],["linewidth","barborderwidth"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),ht={getbaritemstyle:function(t){var e=ft(this,t);if(this.getborderlinedash){var n=this.getborderlinedash();n&&(e.linedash=n)}return e}},gt=["itemstyle","barborderwidth"];a(zo.prototype,ht),du({type:"bar",render:function(t,e,n){this._updatedrawmode(t);var i=t.get("coordinatesystem");return("cartesian2d"===i||"polar"===i)&&(this._islargedraw?this._renderlarge(t,e,n):this._rendernormal(t,e,n)),this.group},incrementalpreparerender:function(t){this._clear(),this._updatedrawmode(t)},incrementalrender:function(t,e){this._incrementalrenderlarge(t,e)},_updatedrawmode:function(t){var e=t.pipelinecontext.large;(null==this._islargedraw||e^this._islargedraw)&&(this._islargedraw=e,this._clear())},_rendernormal:function(t){var e,n=this.group,i=t.getdata(),r=this._data,o=t.coordinatesystem,a=o.getbaseaxis();"cartesian2d"===o.type?e=a.ishorizontal():"polar"===o.type&&(e="angle"===a.dim);var s=t.isanimationenabled()?t:null;i.diff(r).add(function(r){if(i.hasvalue(r)){var a=i.getitemmodel(r),l=zt[o.type](i,r,a),u=wt[o.type](i,r,a,l,e,s);i.setitemgraphicel(r,u),n.add(u),lc(u,i,r,a,l,t,e,"polar"===o.type)}}).update(function(a,l){var u=r.getitemgraphicel(l);if(!i.hasvalue(a))return void n.remove(u);var h=i.getitemmodel(a),c=zt[o.type](i,a,h);u?ro(u,{shape:c},s,a):u=wt[o.type](i,a,h,c,e,s,!0),i.setitemgraphicel(a,u),n.add(u),lc(u,i,a,h,c,t,e,"polar"===o.type)}).remove(function(t){var e=r.getitemgraphicel(t);"cartesian2d"===o.type?e&&ac(t,s,e):e&&sc(t,s,e)}).execute(),this._data=i},_renderlarge:function(t){this._clear(),hc(t,this.group)},_incrementalrenderlarge:function(t,e){hc(e,this.group,!0)},dispose:f,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,n=this._data;t&&t.get("animation")&&n&&!this._islargedraw?n.eachitemgraphicel(function(e){"sector"===e.type?sc(e.dataindex,t,e):ac(e.dataindex,t,e)}):e.removeall(),this._data=null}});var wt={cartesian2d:function(t,e,n,i,r,o,s){var l=new bb({shape:a({},i)});if(o){var u=l.shape,h=r?"height":"width",c={};u[h]=0,c[h]=i[h],fb[s?"updateprops":"initprops"](l,{shape:c},o,e)}return l},polar:function(t,e,n,i,r,o,a){var l=i.startangle0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e){var n=t.getitemlayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startangle:n.startangle,endangle:n.endangle}}},xt=vr.extend({type:"largebar",shape:{points:[]},buildpath:function(t,e){for(var n=e.points,i=this.__startpoint,r=this.__valueidx,o=0;ou[1]?-1:1,c=["start"===r?u[0]-h*l:"end"===r?u[1]+h*l:(u[0]+u[1])/2,yc(r)?t.labeloffset+o*l:0],d=e.get("namerotate");null!=d&&(d=d*yt/180);var f;yc(r)?i=jt(t.rotation,null!=d?d:t.rotation,o):(i=fc(t,r,d||0,u),f=t.axisnameavailablewidth,null!=f&&(f=math.abs(f/math.sin(i.rotation)),!isfinite(f)&&(f=null)));var p=s.getfont(),g=e.get("nametruncate",!0)||{},v=g.ellipsis,m=a(t.nametruncatemaxwidth,g.maxwidth,f),y=null!=v&&null!=m?iw(n,m,p,v,{minchar:2,placeholder:g.placeholder}):n,x=e.get("tooltip",!0),_=e.maintype,b={componenttype:_,name:n,$vars:["name"]};b[_+"index"]=e.componentindex;var w=new ub({anid:"name",__fulltext:n,__truncatedtext:y,position:c,rotation:i.rotation,silent:pc(e),z2:1,tooltip:x&&x.show?a({content:n,formatter:function(){return n},formatterparams:b},x):null});to(w.style,s,{text:y,textfont:p,textfill:s.gettextcolor()||e.get("axisline.linestyle.color"),textalign:i.textalign,textverticalalign:i.textverticalalign}),e.get("triggerevent")&&(w.eventdata=dc(e),w.eventdata.targettype="axisname",w.eventdata.name=n),this._dumbgroup.add(w),w.updatetransform(),this.group.add(w),w.decomposetransform()}}},jt=ut.innertextlayout=function(t,e,n){var i,r,o=oa(e-t);return aa(o)?(r=n>0?"top":"bottom",i="center"):aa(o-yt)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&yt>o?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textalign:i,textverticalalign:r}},kt=f,$t=x,jt=hu({type:"axis",_axispointer:null,axispointerclass:null,render:function(t,e,n,i){this.axispointerclass&&cc(t),jt.superapply(this,"render",arguments),lc(this,t,e,n,i,!0)},updateaxispointer:function(t,e,n,i){lc(this,t,e,n,i,!1)},remove:function(t,e){var n=this._axispointer;n&&n.remove(e),jt.superapply(this,"remove",arguments)},dispose:function(t,e){oc(this,e),jt.superapply(this,"dispose",arguments)}}),qt=[];jt.registeraxispointerclass=function(t,e){qt[t]=e},jt.getaxispointerclass=function(t){return t&&qt[t]};var ti=["axisline","axisticklabel","axisname"],ei=["splitarea","splitline"],ni=jt.extend({type:"cartesianaxis",axispointerclass:"cartesianaxispointer",render:function(t,e,n,i){this.group.removeall();var r=this._axisgroup;if(this._axisgroup=new ky,this.group.add(this._axisgroup),t.get("show")){var o=t.getcoordsysmodel(),a=zc(o,t),s=new ut(t,a);f(ti,s.add,s),this._axisgroup.add(s.getgroup()),f(ei,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),fo(r,this._axisgroup,t),ni.supercall(this,"render",t,e,n,i)}},remove:function(){this._splitareacolors=null},_splitline:function(t,e){var n=t.axis;if(!n.scale.isblank()){var i=t.getmodel("splitline"),r=i.getmodel("linestyle"),o=r.get("color");o=_(o)?o:[o];for(var a=e.coordinatesystem.getrect(),l=n.ishorizontal(),u=0,h=n.gettickscoords({tickmodel:i}),c=[],d=[],f=r.getlinestyle(),p=0;p0&&kc(n[r-1]);r--);for(;r>i&&kc(n[i]);i++);}for(;r>i;)i+=$c(t,n,i,r,r,1,o.min,o.max,e.smooth,e.smoothmonotone,e.connectnulls)+1}}),xi=vr.extend({type:"ec-polygon",shape:{points:[],stackedonpoints:[],smooth:0,stackedonsmooth:0,smoothconstraint:!0,smoothmonotone:null,connectnulls:!1},brush:db(vr.prototype.brush),buildpath:function(t,e){var n=e.points,i=e.stackedonpoints,r=0,o=n.length,a=e.smoothmonotone,s=td(n,e.smoothconstraint),l=td(i,e.smoothconstraint);if(e.connectnulls){for(;o>0&&kc(n[o-1]);o--);for(;o>r&&kc(n[r]);r++);}for(;o>r;){var u=$c(t,n,r,o,o,1,s.min,s.max,e.smooth,a,e.connectnulls);$c(t,i,r+u-1,u,o,-1,l.min,l.max,e.stackedonsmooth,a,e.connectnulls),r+=u+1,t.closepath()}}});ws.extend({type:"line",init:function(){var t=new ky,e=new gc;this.group.add(e.group),this._symboldraw=e,this._linegroup=t},render:function(t,e,n){var i=t.coordinatesystem,r=this.group,o=t.getdata(),a=t.getmodel("linestyle"),l=t.getmodel("areastyle"),u=o.maparray(o.getitemlayout),h="polar"===i.type,c=this._coordsys,d=this._symboldraw,f=this._polyline,p=this._polygon,g=this._linegroup,v=t.get("animation"),m=!l.isempty(),y=l.get("origin"),x=yc(i,o,y),_=rd(i,o,x),b=t.get("showsymbol"),w=b&&!h&&hd(t,o,i),m=this._data;m&&m.eachitemgraphicel(function(t,e){t.__temp&&(r.remove(t),m.setitemgraphicel(e,null))}),b||d.remove(),r.add(g);var s=!h&&t.get("step");f&&c.type===i.type&&s===this._step?(m&&!p?p=this._newpolygon(u,_,i,v):p&&!m&&(g.remove(p),p=this._polygon=null),g.setclippath(sd(i,!1,!1,t)),b&&d.updatedata(o,{isignore:w,clipshape:sd(i,!1,!0,t)}),o.eachitemgraphicel(function(t){t.stopanimation(!0)}),ed(this._stackedonpoints,_)&&ed(this._points,u)||(v?this._updateanimation(o,_,i,n,s,y):(s&&(u=ld(u,i,s),_=ld(_,i,s)),f.setshape({points:u}),p&&p.setshape({points:u,stackedonpoints:_})))):(b&&d.updatedata(o,{isignore:w,clipshape:sd(i,!1,!0,t)}),s&&(u=ld(u,i,s),_=ld(_,i,s)),f=this._newpolyline(u,i,v),m&&(p=this._newpolygon(u,_,i,v)),g.setclippath(sd(i,!0,!1,t)));var t=ud(o,i)||o.getvisual("color");f.usestyle(s(a.getlinestyle(),{fill:"none",stroke:t,linejoin:"bevel"}));var i=t.get("smooth");if(i=nd(t.get("smooth")),f.setshape({smooth:i,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")}),p){var c=o.getcalculationinfo("stackedonseries"),a=0;p.usestyle(s(l.getareastyle(),{fill:t,opacity:.7,linejoin:"bevel"})),c&&(a=nd(c.get("smooth"))),p.setshape({smooth:i,stackedonsmooth:a,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")})}this._data=o,this._coordsys=i,this._stackedonpoints=_,this._points=u,this._step=s,this._valueorigin=y},dispose:function(){},highlight:function(t,e,n,i){var r=t.getdata(),o=yi(r,i);if(!(o instanceof array)&&null!=o&&o>=0){var a=r.getitemgraphicel(o);if(!a){var s=r.getitemlayout(o);if(!s)return;a=new rc(r,o),a.position=s,a.setz(t.get("zlevel"),t.get("z")),a.ignore=isnan(s[0])||isnan(s[1]),a.__temp=!0,r.setitemgraphicel(o,a),a.stopsymbolanimation(!0),this.group.add(a)}a.highlight()}else ws.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getdata(),o=yi(r,i);if(null!=o&&o>=0){var a=r.getitemgraphicel(o);a&&(a.__temp?(r.setitemgraphicel(o,null),this.group.remove(a)):a.downplay())}else ws.prototype.downplay.call(this,t,e,n,i)},_newpolyline:function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new yi({shape:{points:t},silent:!0,z2:10}),this._linegroup.add(e),this._polyline=e,e},_newpolygon:function(t,e){var n=this._polygon;return n&&this._linegroup.remove(n),n=new xi({shape:{points:t,stackedonpoints:e},silent:!0}),this._linegroup.add(n),this._polygon=n,n},_updateanimation:function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostmodel,u=hi(this._data,t,this._stackedonpoints,e,this._coordsys,n,this._valueorigin,o),h=u.current,c=u.stackedoncurrent,d=u.next,f=u.stackedonnext;r&&(h=ld(u.current,n,r),c=ld(u.stackedoncurrent,n,r),d=ld(u.next,n,r),f=ld(u.stackedonnext,n,r)),a.shape.__points=u.current,a.shape.points=h,ro(a,{shape:{points:d}},l),s&&(s.setshape({points:h,stackedonpoints:c}),ro(s,{shape:{points:d,stackedonpoints:f}},l));for(var p=[],g=u.status,v=0;ve&&(e=t[n]);return isfinite(e)?e:0/0},min:function(t){for(var e=1/0,n=0;n1){var u;"string"==typeof n?u=wi[n]:"function"==typeof n&&(u=n),u&&t.setdata(e.downsample(e.mapdimension(o.dim),1/l,u,mi))}}}}};au(_i("line","circle","line")),ou(bi("line")),tu(jm.processor.statistic,si("line"));var ti=function(t,e,n){e=_(e)&&{coorddimensions:e}||a({},e);var i=t.getsource(),r=zs(i,e),o=new ps(r,t);return o.initdata(i,n),o},ii={updateselectedmap:function(t){this._targetlist=_(t)?t.slice():[],this._selecttargetmap=g(t||[],function(t,e){return t.set(e.name,e),t},n())},select:function(t,e){var n=null!=e?this._targetlist[e]:this._selecttargetmap.get(t),i=this.get("selectedmode");"single"===i&&this._selecttargetmap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unselect:function(t,e){var n=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);n&&(n.selected=!1)},toggleselected:function(t,e){var n=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);return null!=n?(this[n.selected?"unselect":"select"](t,e),n.selected):void 0},isselected:function(t,e){var n=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);return n&&n.selected}},ci=cu({type:"series.pie",init:function(t){ci.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()},this.updateselectedmap(this._createselectablelist()),this._defaultlabelline(t)},mergeoption:function(t){ci.supercall(this,"mergeoption",t),this.updateselectedmap(this._createselectablelist())},getinitialdata:function(){return ti(this,["value"])},_createselectablelist:function(){for(var t=this.getrawdata(),e=t.mapdimension("value"),n=[],i=0,r=t.count();r>i;i++)n.push({name:t.getname(i),value:t.get(e,i),selected:ks(t,i,"selected")});return n},getdataparams:function(t){var e=this.getdata(),n=ci.supercall(this,"getdataparams",t),i=[];return e.each(e.mapdimension("value"),function(t){i.push(t)}),n.percent=ra(i,t,e.hostmodel.get("percentprecision")),n.$vars.push("percent"),n},_defaultlabelline:function(t){ni(t,"labelline",["show"]);var e=t.labelline,n=t.emphasis.labelline;e.show=e.show&&t.label.show,n.show=n.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"}});c(ci,ii);var ai=pd.prototype;ai.updatedata=function(t,e,n){function i(){o.stopanimation(!0),o.animateto({shape:{r:h.r+l.get("hoveroffset")}},300,"elasticout")}function r(){o.stopanimation(!0),o.animateto({shape:{r:h.r}},300,"elasticout")}var o=this.childat(0),l=t.hostmodel,u=t.getitemmodel(e),h=t.getitemlayout(e),c=a({},h);if(c.label=null,n){o.setshape(c);var d=l.getshallow("animationtype");"scale"===d?(o.shape.r=h.r0,eo(o,{shape:{r:h.r}},l,e)):(o.shape.endangle=h.startangle,ro(o,{shape:{endangle:h.endangle}},l,e))}else ro(o,{shape:c},l,e);var f=t.getitemvisual(e,"color");o.usestyle(s({linejoin:"bevel",fill:f},u.getmodel("itemstyle").getitemstyle())),o.hoverstyle=u.getmodel("emphasis.itemstyle").getitemstyle();var p=u.getshallow("cursor");p&&o.attr("cursor",p),fd(this,t.getitemlayout(e),l.isselected(null,e),l.get("selectedoffset"),l.get("animation")),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),u.get("hoveranimation")&&l.isanimationenabled()&&o.on("mouseover",i).on("mouseout",r).on("emphasis",i).on("normal",r),this._updatelabel(t,e),wo(this)},ai._updatelabel=function(t,e){var n=this.childat(1),i=this.childat(2),r=t.hostmodel,o=t.getitemmodel(e),a=t.getitemlayout(e),s=a.label,l=t.getitemvisual(e,"color");ro(n,{shape:{points:s.linepoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},r,e),ro(i,{style:{x:s.x,y:s.y}},r,e),i.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getmodel("label"),h=o.getmodel("emphasis.label"),c=o.getmodel("labelline"),d=o.getmodel("emphasis.labelline"),l=t.getitemvisual(e,"color");so(i.style,i.hoverstyle={},u,h,{labelfetcher:t.hostmodel,labeldataindex:e,defaulttext:t.getname(e),autocolor:l,useinsidestyle:!!s.inside},{textalign:s.textalign,textverticalalign:s.verticalalign,opacity:t.getitemvisual(e,"opacity")}),i.ignore=i.normalignore=!u.get("show"),i.hoverignore=!h.get("show"),n.ignore=n.normalignore=!c.get("show"),n.hoverignore=!d.get("show"),n.setstyle({stroke:l,opacity:t.getitemvisual(e,"opacity")}),n.setstyle(c.getmodel("linestyle").getlinestyle()),n.hoverstyle=d.getmodel("linestyle").getlinestyle();var f=c.get("smooth");f&&f===!0&&(f=.4),n.setshape({smooth:f})},h(pd,ky);var di=(ws.extend({type:"pie",init:function(){var t=new ky;this._sectorgroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var r=t.getdata(),o=this._data,a=this.group,s=e.get("animation"),l=!o,u=t.get("animationtype"),h=x(dd,this.uid,t,s,n),c=t.get("selectedmode");if(r.diff(o).add(function(t){var e=new pd(r,t);l&&"scale"!==u&&e.eachchild(function(t){t.stopanimation(!0)}),c&&e.on("click",h),r.setitemgraphicel(t,e),a.add(e)}).update(function(t,e){var n=o.getitemgraphicel(e);n.updatedata(r,t),n.off("click"),c&&n.on("click",h),a.add(n),r.setitemgraphicel(t,n)}).remove(function(t){var e=o.getitemgraphicel(t);a.remove(e)}).execute(),s&&l&&r.count()>0&&"scale"!==u){var d=r.getitemlayout(0),f=math.max(n.getwidth(),n.getheight())/2,p=y(a.removeclippath,a);a.setclippath(this._createclippath(d.cx,d.cy,f,d.startangle,d.clockwise,p,t))}else a.removeclippath();this._data=r}},dispose:function(){},_createclippath:function(t,e,n,i,r,o,a){var s=new fb({shape:{cx:t,cy:e,r0:0,r:n,startangle:i,endangle:i,clockwise:r}});return eo(s,{shape:{endangle:i+(r?1:-1)*math.pi*2}},a,o),s},containpoint:function(t,e){var n=e.getdata(),i=n.getitemlayout(0);if(i){var r=t[0]-i.cx,o=t[1]-i.cy,a=math.sqrt(r*r+o*o);return a<=i.r&&a>=i.r0}}}),function(t,e){f(e,function(e){e.update="updateview",nu(e,function(n,i){var r={};return i.eachcomponent({maintype:"series",subtype:t,query:n},function(t){t[e.method]&&t[e.method](n.name,n.dataindex);var i=t.getdata();i.each(function(e){var n=i.getname(e);r[n]=t.isselected(n)||!1})}),{name:n.name,selected:r}})})}),ki=function(t){return{gettargetseries:function(e){var n={},i=n();return e.eachseriesbytype(t,function(t){t.__palettescope=n,i.set(t.uid,t)}),i},reset:function(t){var e=t.getrawdata(),n={},i=t.getdata();i.each(function(t){var e=i.getrawindex(t);n[e]=t}),e.each(function(r){var o=n[r],a=null!=o&&i.getitemvisual(o,"color",!0);if(a)e.setitemvisual(r,"color",a);else{var s=e.getitemmodel(r),l=s.get("itemstyle.color")||t.getcolorfrompalette(e.getname(r)||r+"",t.__palettescope,e.count());e.setitemvisual(r,"color",l),null!=o&&i.setitemvisual(o,"color",l)}})}}},pi=function(t,e,n,i){var r,o,a=t.getdata(),s=[],l=!1;a.each(function(n){var i,u,h,c,d=a.getitemlayout(n),f=a.getitemmodel(n),p=f.getmodel("label"),g=p.get("position")||f.get("emphasis.label.position"),v=f.getmodel("labelline"),m=v.get("length"),y=v.get("length2"),x=(d.startangle+d.endangle)/2,_=math.cos(x),b=math.sin(x);r=d.cx,o=d.cy;var w="inside"===g||"inner"===g;if("center"===g)i=d.cx,u=d.cy,c="center";else{var m=(w?(d.r+d.r0)/2*_:d.r*_)+r,s=(w?(d.r+d.r0)/2*b:d.r*b)+o;if(i=m+3*_,u=s+3*b,!w){var t=m+_*(m+e-d.r),i=s+b*(m+e-d.r),c=t+(0>_?-1:1)*y,a=i;i=c+(0>_?-5:5),u=a,h=[[m,s],[t,i],[c,a]]}c=w?"center":_>0?"left":"right"}var d=p.getfont(),k=p.get("rotate")?0>_?-x+math.pi:-x:0,p=t.getformattedlabel(n,"normal")||a.getname(n),l=nn(p,d,c,"top");l=!!k,d.label={x:i,y:u,position:g,height:l.height,len:m,len2:y,linepoints:h,textalign:c,verticalalign:"middle",rotation:k,inside:w},w||s.push(d.label)}),!l&&t.get("avoidlabeloverlap")&&vd(s,r,o,e,n,i)},li=2*math.pi,oi=math.pi/180,zi=function(t,e,n){e.eachseriesbytype(t,function(t){var e=t.getdata(),i=e.mapdimension("value"),r=t.get("center"),o=t.get("radius");_(o)||(o=[0,o]),_(r)||(r=[r,r]);var a=n.getwidth(),s=n.getheight(),l=math.min(a,s),u=jo(r[0],a),h=jo(r[1],s),c=jo(o[0],l/2),d=jo(o[1],l/2),f=-t.get("startangle")*oi,p=t.get("minangle")*oi,g=0;e.each(i,function(t){!isnan(t)&&g++});var v=e.getsum(i),m=math.pi/(v||g)*2,y=t.get("clockwise"),x=t.get("rosetype"),b=t.get("stillshowzerosum"),w=e.getdataextent(i);w[0]=0;var m=li,s=0,t=f,i=y?1:-1;if(e.each(i,function(t,n){var i;if(isnan(t))return void e.setitemlayout(n,{angle:0/0,startangle:0/0,endangle:0/0,clockwise:y,cx:u,cy:h,r0:c,r:x?0/0:d});i="area"!==x?0===v&&b?m:t*m:li/g,p>i?(i=p,m-=p):s+=t;var r=t+i*i;e.setitemlayout(n,{angle:i,startangle:t,endangle:r,clockwise:y,cx:u,cy:h,r0:c,r:x?$o(t,w,[c,d]):d}),t=r}),li>m&&g)if(.001>=m){var c=li/g;e.each(i,function(t,n){if(!isnan(t)){var i=e.getitemlayout(n);i.angle=c,i.startangle=f+i*n*c,i.endangle=f+i*(n+1)*c}})}else m=m/s,t=f,e.each(i,function(t,n){if(!isnan(t)){var i=e.getitemlayout(n),r=i.angle===p?p:t*m;i.startangle=t,i.endangle=t+i*r,t+=i*r}});pi(t,d,a,s)})},ri=function(t){return{seriestype:t,reset:function(t,e){var n=e.findcomponents({maintype:"legend"});if(n&&n.length){var i=t.getdata();i.filterself(function(t){for(var e=i.getname(t),r=0;r0?yi:ui)}function r(t,e){return e.get(t>0?zi:xi)}var o=t.getdata(),a=t.pipelinecontext.large;return o.setvisual({legendsymbol:"roundrect",colorp:i(1,t),colorn:i(-1,t),bordercolorp:r(1,t),bordercolorn:r(-1,t)}),e.isseriesfiltered(t)?void 0:!a&&{progress:n}}},ji="undefined"!=typeof float32array?float32array:array,ki={seriestype:"candlestick",plan:em(),reset:function(t){function e(t,e){function n(t,e){var n=[];return n[a]=e,n[s]=t,isnan(e)||isnan(t)?[0/0,0/0]:i.datatopoint(n)}function r(t,e,n){var i=e.slice(),r=e.slice();i[a]=so(i[a]+o/2,1,!1),r[a]=so(r[a]-o/2,1,!0),n?t.push(i,r):t.push(r,i)}function l(t,e,i){var r=n(t,i),l=n(e,i);return r[a]-=o/2,l[a]-=o/2,{x:r[0],y:r[1],width:s?o:l[0]-r[0],height:s?l[1]-r[1]:o}}function h(t){return t[a]=so(t[a],1),t}for(var g;null!=(g=t.next());){var v=e.get(u,g),m=e.get(c,g),y=e.get(d,g),x=e.get(f,g),_=e.get(p,g),b=math.min(m,y),w=math.max(m,y),m=n(b,v),s=n(w,v),t=n(x,v),i=n(_,v),c=[];r(c,s,0),r(c,m,1),c.push(h(i),h(s),h(t),h(m)),e.setitemlayout(g,{sign:md(e,g,m,y,d),initbaseline:m>y?s[s]:m[s],ends:c,brushrect:l(x,_,v)})}}function n(t,e){for(var n,r,o=new ji(5*t.count),l=0,h=[],g=[];null!=(r=t.next());){var v=e.get(u,r),m=e.get(c,r),y=e.get(d,r),x=e.get(f,r),_=e.get(p,r);isnan(v)||isnan(x)||isnan(_)?(o[l++]=0/0,l+=4):(o[l++]=md(e,r,m,y,d),h[a]=v,h[s]=x,n=i.datatopoint(h,null,g),o[l++]=n?n[0]:0/0,o[l++]=n?n[1]:0/0,h[s]=_,n=i.datatopoint(h,null,g),o[l++]=n?n[1]:0/0)}e.setlayout("largepoints",o)}var i=t.coordinatesystem,r=t.getdata(),o=sd(t,r),a=0,s=1,l=["x","y"],u=r.mapdimension(l[a]),h=r.mapdimension(l[s],!0),c=h[0],d=h[1],f=h[2],p=h[3];return r.setlayout({candlewidth:o,issimplebox:1.3>=o}),null==u||h.length<4?void 0:{progress:t.pipelinecontext.large?n:e}}};ql(wi),au(qi),ou(ki),dd.prototype={constructor:dd,pointtodata:function(t,e){return this.polar.pointtodata(t,e)["radius"===this.dim?0:1]},datatoradius:tt.prototype.datatocoord,radiustodata:tt.prototype.coordtodata},h(dd,tt);var $i=ui();kd.prototype={constructor:kd,pointtodata:function(t,e){return this.polar.pointtodata(t,e)["radius"===this.dim?0:1]},datatoangle:tt.prototype.datatocoord,angletodata:tt.prototype.coordtodata,calculatecategoryinterval:function(){var t=this,e=t.getlabelmodel(),n=t.scale,i=n.getextent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.datatocoord(o+1)-t.datatocoord(o),s=math.abs(a),l=nn(o,e.getfont(),"center","top"),u=math.max(l.height,7),h=u/s;isnan(h)&&(h=1/0);var c=math.max(0,math.floor(h)),d=$i(t.model),f=d.lastautointerval,p=d.lasttickcount;return null!=f&&null!=p&&math.abs(f-c)<=1&&math.abs(p-r)<=1&&f>c?c=f:(d.lasttickcount=r,d.lastautointerval=c),c}},h(kd,tt);var ji=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusaxis=new dd,this._angleaxis=new kd,this._radiusaxis.polar=this._angleaxis.polar=this};ji.prototype={type:"polar",axispointerenabled:!0,constructor:ji,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=[],n=this._angleaxis,i=this._radiusaxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),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 n=this.pointtocoord(t);return[this._radiusaxis.radiustodata(n[0],e),this._angleaxis.angletodata(n[1],e)]},pointtocoord:function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getangleaxis(),r=i.getextent(),o=math.min(r[0],r[1]),a=math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=math.atan2(-n,e)/math.pi*180,u=o>l?1:-1;o>l||l>a;)l+=360*u;return[s,l]},coordtopoint:function(t){var e=t[0],n=t[1]/180*math.pi,i=math.cos(n)*e+this.cx,r=-math.sin(n)*e+this.cy;return[i,r]}};var qi=cw.extend({type:"polaraxis",axis:null,getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"polar",index:this.option.polarindex,id:this.option.polarid})[0]}});r(qi.prototype,ht);var tc={angle:{startangle:90,clockwise:!0,splitnumber:12,axislabel:{rotate:!1}},radius:{splitnumber:5}};zt("angle",qi,pd,tc.angle),zt("radius",qi,pd,tc.radius),uu({type:"polar",dependencies:["polaraxis","angleaxis"],coordinatesystem:null,findaxismodel:function(t){var e,n=this.ecmodel;return n.eachcomponent(t,function(t){t.getcoordsysmodel()===this&&(e=t)},this),e},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var ec={dimensions:ji.prototype.dimensions,create:function(t,e){var n=[];return t.eachcomponent("polar",function(t,i){var r=new ji(i);r.update=od;var o=r.getradiusaxis(),a=r.getangleaxis(),s=t.findaxismodel("radiusaxis"),l=t.findaxismodel("angleaxis");zd(o,s),zd(a,l),ld(r,t,e),n.push(r),t.coordinatesystem=r,r.model=t}),t.eachseries(function(e){if("polar"===e.get("coordinatesystem")){var n=t.querycomponents({maintype:"polar",index:e.get("polarindex"),id:e.get("polarid")})[0];e.coordinatesystem=n.coordinatesystem}}),n}};is.register("polar",ec);var nc=["axisline","axislabel","axistick","splitline","splitarea"];jt.extend({type:"angleaxis",axispointerclass:"polaraxispointer",render:function(t){if(this.group.removeall(),t.get("show")){var e=t.axis,n=e.polar,r=n.getradiusaxis().getextent(),o=e.gettickscoords(),a=p(e.getviewlabels(),function(t){var t=i(t);return t.coord=e.datatocoord(t.tickvalue),t});bd(a),bd(o),f(nc,function(i){!t.get(i+".show")||e.scale.isblank()&&"axisline"!==i||this["_"+i](t,n,o,r,a)},this)}},_axisline:function(t,e,n,i){var r=t.getmodel("axisline.linestyle"),o=new hb({shape:{cx:e.cx,cy:e.cy,r:i[ed(e)]},style:r.getlinestyle(),z2:1,silent:!0});o.style.fill=null,this.group.add(o)},_axistick:function(t,e,n,i){var r=t.getmodel("axistick"),o=(r.get("inside")?-1:1)*r.get("length"),a=i[ed(e)],l=p(n,function(t){return new mb({shape:rd(e,[a,a+o],t.coord)})});this.group.add(bb(l,{style:s(r.getmodel("linestyle").getlinestyle(),{stroke:t.get("axisline.linestyle.color")})}))},_axislabel:function(t,e,n,i,r){var o=t.getcategories(!0),a=t.getmodel("axislabel"),s=a.get("margin");f(r,function(n){var r=a,l=n.tickvalue,u=i[ed(e)],h=e.coordtopoint([u+s,n.coord]),c=e.cx,d=e.cy,f=math.abs(h[0]-c)/u<.3?"center":h[0]>c?"left":"right",p=math.abs(h[1]-d)/u<.3?"middle":h[1]>d?"top":"bottom";o&&o[l]&&o[l].textstyle&&(r=new zo(o[l].textstyle,a,a.ecmodel));var g=new ub({silent:!0});this.group.add(g),to(g.style,r,{x:h[0],y:h[1],textfill:r.gettextcolor()||t.get("axisline.linestyle.color"),text:n.formattedlabel,textalign:f,textverticalalign:p})},this)},_splitline:function(t,e,n,i){var r=t.getmodel("splitline"),o=r.getmodel("linestyle"),a=o.get("color"),l=0;a=a instanceof array?a:[a];for(var u=[],h=0;ha||_(a))return{point:[]};var s=o.getitemgraphicel(a),l=n.coordinatesystem;if(n.gettooltipposition)i=n.gettooltipposition(a)||[];else if(l&&l.datatopoint)i=l.datatopoint(o.getvalues(p(l.dimensions,function(t){return o.mapdimension(t)}),a,!0))||[];else if(s){var u=s.getboundingrect().clone();u.applytransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},ac=f,sc=x,lc=ui(),uc=function(t,e,n){var i=t.currtrigger,r=[t.x,t.y],o=t,a=t.dispatchaction||y(n.dispatchaction,n),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){qd(r)&&(r=oc({seriesindex:o.seriesindex,dataindex:o.dataindex},e).point);var l=qd(r),u=o.axesinfo,h=s.axesinfo,c="leave"===i||qd(r),d={},f={},p={list:[],map:{}},g={showpointer:sc(hd,f),showtooltip:sc(gd,p)};ac(s.coordsysmap,function(t,e){var n=l||t.containpoint(r);ac(s.coordsysaxesinfo[e],function(t){var e=t.axis,i=yd(u,t);if(!c&&n&&(!u||i)){var o=i&&i.value;null!=o||l||(o=e.pointtodata(r)),null!=o&&vd(t,o,g,!1,d)}})});var v={};return ac(h,function(t,e){var n=t.linkgroup;n&&!f[e]&&ac(n.axesinfo,function(e,i){var r=f[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,ud(e),ud(t)))),v[t.key]=o}})}),ac(v,function(t,e){vd(h[e],t,g,!0,d)}),wd(f,h,d),zd(p,r,t,a),xd(h,a,n),d}},hc=(uu({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}}}),ui()),cc=f,dc=hu({type:"axispointer",render:function(t,e,n){var i=e.getcomponent("tooltip"),r=t.get("triggeron")||i&&i.get("triggeron")||"mousemove|click";jd("axispointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexof(t)>=0)&&n({type:"updateaxispointer",currtrigger:t,x:e&&e.offsetx,y:e&&e.offsety})})},remove:function(t,e){ef(e.getzr(),"axispointer"),dc.superapply(this._model,"remove",arguments)},dispose:function(t,e){ef("axispointer",e),dc.superapply(this._model,"dispose",arguments)}}),fc=ui(),pc=i,gc=y;nf.prototype={_group:null,_lastgraphickey:null,_handle:null,_dragging:!1,_lastvalue:null,_laststatus:null,_payloadinfo:null,animationthreshold:15,render:function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axismodel=t,this._axispointermodel=e,this._api=n,i||this._lastvalue!==r||this._laststatus!==o){this._lastvalue=r,this._laststatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeeloption(l,r,t,e,n);var u=l.graphickey;u!==this._lastgraphickey&&this.clear(n),this._lastgraphickey=u;var h=this._moveanimation=this.determineanimation(t,e);if(a){var c=x(rf,e,h);this.updatepointerel(a,l,c,e),this.updatelabelel(a,l,c,e)}else a=this._group=new ky,this.createpointerel(a,l,t,e),this.createlabelel(a,l,t,e),n.getzr().add(a);lf(a,e,!0),this._renderhandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineanimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationthreshold;if(r&&i.getbandwidth()>a)return!0;if(o){var s=ac(t).seriesdatacount,l=i.getextent();return math.abs(l[0]-l[1])/s>a}return!1}return n===!0},makeeloption:function(){},createpointerel:function(t,e){var n=e.pointer;if(n){var i=fc(t).pointerel=new fb[n.type](pc(e.pointer));t.add(i)}},createlabelel:function(t,e,n,i){if(e.label){var r=fc(t).labelel=new bb(pc(e.label));t.add(r),af(r,i)}},updatepointerel:function(t,e,n){var i=fc(t).pointerel;i&&(i.setstyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updatelabelel:function(t,e,n,i){var r=fc(t).labelel;r&&(r.setstyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),af(r,i))},_renderhandle:function(t){if(!this._dragging&&this.updatehandletransform){var e=this._axispointermodel,n=this._api.getzr(),i=this._handle,r=e.getmodel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return i&&n.remove(i),void(this._handle=null);var a;this._handle||(a=!0,i=this._handle=wo(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){cy(t.event)},onmousedown:gc(this._onhandledragmove,this,0,0),drift:gc(this._onhandledragmove,this),ondragend:gc(this._onhandledragend,this)}),n.add(i)),lf(i,e,!1);var s=["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"];i.setstyle(r.getitemstyle(null,s));var l=r.get("size");_(l)||(l=[l,l]),i.attr("scale",[l[0]/2,l[1]/2]),js(this,"_dodispatchaxispointer",r.get("throttle")||0,"fixrate"),this._movehandletovalue(t,a)}},_movehandletovalue:function(t,e){rf(this._axispointermodel,!e&&this._moveanimation,this._handle,sf(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},_onhandledragmove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updatehandletransform(sf(n),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=i,n.stopanimation(),n.attr(sf(i)),fc(n).lastprop=null,this._dodispatchaxispointer()}},_dodispatchaxispointer:function(){var t=this._handle;if(t){var e=this._payloadinfo,n=this._axismodel;this._api.dispatchaction({type:"updateaxispointer",x:e.cursorpoint[0],y:e.cursorpoint[1],tooltipoption:e.tooltipoption,axesinfo:[{axisdim:n.axis.dim,axisindex:n.componentindex}]})}},_onhandledragend:function(){this._dragging=!1;var t=this._handle;if(t){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(),n=this._group,i=this._handle;e&&n&&(this._lastgraphickey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadinfo=null)},doclear:function(){},buildlabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}},nf.prototype.constructor=nf,er(nf);var vc=nf.extend({makeeloption:function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=yf(a,o).getotheraxis(o).getglobalextent(),u=o.toglobalcoord(o.datatocoord(e,!0));if(s&&"none"!==s){var h=uf(i),c=mc[s](o,u,l,h);c.style=h,t.graphickey=c.type,t.pointer=c}var d=zc(a.model,n);pf(e,t,d,n,i,r)},gethandletransform:function(t,e,n){var i=zc(e.axis.grid.model,e,{labelinside:!1});return i.labelmargin=n.get("handle.margin"),{position:ff(e.axis,t,i),rotation:i.rotation+(i.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,n){var i=n.axis,r=i.grid,o=i.getglobalextent(!0),a=yf(r,i).getotheraxis(i).getglobalextent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=math.min(o[1],l[s]),l[s]=math.max(o[0],l[s]);var u=(a[1]+a[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalalign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorpoint:h,tooltipoption:c[s]}}}),mc={line:function(t,e,n,i){var r=gf([e,n[0]],[e,n[1]],xf(t));return oo({shape:r,style:i}),{type:"line",shape:r}},shadow:function(t,e,n){var i=math.max(1,t.getbandwidth()),r=n[1]-n[0];return{type:"rect",shape:vf([e-i/2,n[0]],[i,r],xf(t))}}};jt.registeraxispointerclass("cartesianaxispointer",vc),ql(function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!_(e)&&(t.axispointer.link=[e])}}),tu(jm.processor.statistic,function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=bc(t,e)}),nu({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},uc);var yc=nf.extend({makeeloption:function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationthreshold=math.pi/18);var a,s=o.polar,l=s.getotheraxis(o),u=l.getextent();a=o["datato"+wa(o.dim)](e);var h=i.get("type");if(h&&"none"!==h){var c=uf(i),d=xc[h](o,s,a,u,c);d.style=c,t.graphickey=d.type,t.pointer=d}var f=i.get("label.margin"),p=_f(e,n,i,s,f);hf(t,n,i,r,p)}}),xc={line:function(t,e,n,i){return"angle"===t.dim?{type:"line",shape:gf(e.coordtopoint([i[0],n]),e.coordtopoint([i[1],n]))}:{type:"circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=math.max(1,t.getbandwidth()),o=math.pi/180;return"angle"===t.dim?{type:"sector",shape:mf(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(-n+r/2)*o)}:{type:"sector",shape:mf(e.cx,e.cy,n-r/2,n+r/2,0,2*math.pi)}}};jt.registeraxispointerclass("polaraxispointer",yc),ou(x(cd,"bar")),hu({type:"polar"});var _c=oe;c(bf,by),wf.prototype={constructor:wf,type:"view",dimensions:["x","y"],setboundingrect:function(t,e,n,i){return this._rect=new xn(t,e,n,i),this._rect},getboundingrect:function(){return this._rect},setviewrect:function(t,e,n,i){this.transformto(t,e,n,i),this._viewrect=new xn(t,e,n,i)},transformto:function(t,e,n,i){var r=this.getboundingrect(),o=this._rawtransformable;o.transform=r.calculatetransform(new xn(t,e,n,i)),o.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(),e=t.x+t.width/2,n=t.y+t.height/2;return[e,n]},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,n=this.getdefaultcenter(),i=this.getcenter(),r=this.getzoom();i=oe([],i,t),n=oe([],n,t),e.origin=i,e.position=[n[0]-i[0],n[1]-i[1]],e.scale=[r,r],this._updatetransform()},_updatetransform:function(){var t=this._roamtransformable,e=this._rawtransformable;e.parent=t,t.updatetransform(),e.updatetransform(),ce(this.transform||(this.transform=[]),e.transform||te()),this._rawtransform=e.getlocaltransform(),this.invtransform=this.invtransform||[],le(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,n){var i=e?this._rawtransform:this.transform;return n=n||[],i?_c(n,t,i):g(n,t)},pointtodata:function(t){var e=this.invtransform;return e?_c([],t,e):[t[0],t[1]]},converttopixel:x(mf,"datatopoint"),convertfrompixel:x(mf,"pointtodata"),containpoint:function(t){return this.getviewrectafterroam().contain(t[0],t[1])}},c(wf,by);for(var bc=[126,25],wc=[[[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]]],mc=0;mc=0)&&(c=t);var d=new ub({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});so(d.style,d.hoverstyle={},_,b,{labelfetcher:c,labeldataindex:a,defaulttext:e.name,useinsidestyle:!1},{textalign:"center",textverticalalign:"middle"}),n.add(d)}if(a)a.setitemgraphicel(r,n);else{var s=t.getregionmodel(e.name);i.eventdata={componenttype:"geo",componentindex:t.componentindex,geoindex:t.componentindex,name:e.name,region:s&&s.option||{}}}var k=n.__regions||(n.__regions=[]);k.push(e),wo(n,x,{hoversilentontouch:!!t.get("selectedmode")}),l.add(n)}),this._updatecontroller(t,e,n),jf(this,t,l,n,i),kf(t,l)},remove:function(){this._regionsgroup.removeall(),this._backgroundgroup.removeall(),this._controller.dispose(),this._mapname&&bc.removegraphic(this._mapname,this.uid),this._mapname=null,this._controllerhost={}},_updatebackground:function(t){var e=t.map;this._mapname!==e&&f(bc.makegraphic(e,this.uid),function(t){this._backgroundgroup.add(t)},this),this._mapname=e},_updatecontroller:function(t,e,n){function i(){var e={type:"georoam",componenttype:l};return e[l+"id"]=t.id,e}var r=t.coordinatesystem,o=this._controller,s=this._controllerhost;s.zoomlimit=t.get("scalelimit"),s.zoom=r.getzoom(),o.enable(t.get("roam")||!1);var l=t.maintype;o.off("pan").on("pan",function(t){this._mousedownflag=!1,xf(s,t.dx,t.dy),n.dispatchaction(a(i(),{dx:t.dx,dy:t.dy}))},this),o.off("zoom").on("zoom",function(t){if(this._mousedownflag=!1,yf(s,t.scale,t.originx,t.originy),n.dispatchaction(a(i(),{zoom:t.scale,originx:t.originx,originy:t.originy})),this._updategroup){var e=this.group.scale;this._regionsgroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),o.setpointerchecker(function(e,i,o){return r.getviewrectafterroam().contain(i,o)&&!uf(e,n,t)})}},hu({type:"geo",init:function(t,e){var n=new $f(e,!0);this._mapdraw=n,this.group.add(n.group)},render:function(t,e,n,i){if(!i||"geotoggleselect"!==i.type||i.from!==this.uid){var r=this._mapdraw;t.get("show")?r.draw(t,e,n,this,i):this._mapdraw.group.removeall(),this.group.silent=t.get("silent")}},dispose:function(){this._mapdraw&&this._mapdraw.remove()}}),nu({type:"georoam",event:"georoam",update:"updatetransform"},function(t,e){var n=t.componenttype||"series";e.eachcomponent({maintype:n,query:t},function(e){var i=e.coordinatesystem;if("geo"===i.type){var r=jf(i,t,e.get("scalelimit"));e.setcenter&&e.setcenter(r.center),e.setzoom&&e.setzoom(r.zoom),"series"===n&&f(e.seriesgroup,function(t){t.setcenter(r.center),t.setzoom(r.zoom)})}})}),qf("toggleselected",{type:"geotoggleselect",event:"geoselectchanged"}),qf("select",{type:"geoselect",event:"geoselected"}),qf("unselect",{type:"geounselect",event:"geounselected"});var gc=function(t,e,n,i,r){tt.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom",this.orient=null};gc.prototype={constructor:gc,model:null,ishorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointtodata:function(t,e){return this.coordinatesystem.pointtodata(t,e)[0]},toglobalcoord:null,tolocalcoord:null},h(gc,tt),tp.prototype={type:"singleaxis",axispointerenabled:!0,constructor:tp,_init:function(t){var e=this.dimension,n=new gc(e,fh(t),[0,0],t.get("type"),t.get("position")),i="category"===n.type;n.onband=i&&t.get("boundarygap"),n.inverse=t.get("inverse"),n.orient=t.get("orient"),t.axis=n,n.model=t,n.coordinatesystem=this,this._axis=n},update:function(t){t.eachseries(function(t){if(t.coordinatesystem===this){var e=t.getdata();f(e.mapdimension(this.dimension,!0),function(t){this._axis.scale.unionextentfromdata(e,t)},this),dh(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=ia({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,n=e.ishorizontal(),i=n?[0,t.width]:[0,t.height],r=e.reverse?1:0;e.setextent(i[r],i[1-r]),this._updateaxistransform(e,n?t.x:t.y)},_updateaxistransform:function(t,e){var n=t.getextent(),i=n[0]+n[1],r=t.ishorizontal();t.toglobalcoord=r?function(t){return t+e}:function(t){return i-t+e},t.tolocalcoord=r?function(t){return t-e}:function(t){return i-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(),n=this.getaxis(),i=n.orient;return"horizontal"===i?n.contain(n.tolocalcoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.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(),n=this.getrect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof array&&(t=t[0]),i[r]=e.toglobalcoord(e.datatocoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i}},is.register("single",{create:ep,dimensions:tp.prototype.dimensions});var wc=["axisline","axisticklabel","axisname"],zc="splitline",xc=jt.extend({type:"singleaxis",axispointerclass:"singleaxispointer",render:function(t,e,n,i){var r=this.group;r.removeall();var o=np(t),a=new ut(t,o);f(wc,a.add,a),r.add(a.getgroup()),t.get(zc+".show")&&this["_"+zc](t),xc.supercall(this,"render",t,e,n,i)},_splitline:function(t){var e=t.axis;if(!e.scale.isblank()){var n=t.getmodel("splitline"),i=n.getmodel("linestyle"),r=i.get("width"),o=i.get("color");o=o instanceof array?o:[o];for(var a=t.coordinatesystem.getrect(),s=e.ishorizontal(),l=[],u=0,h=e.gettickscoords({tickmodel:n}),c=[],d=[],f=0;fn?"0"+n:n;var i=t.getdate();i=10>i?"0"+i:i;var r=t.getday();return r=math.abs((r+7-this.getfirstdayofweek())%7),{y:e,m:n,d:i,day:r,time:t.gettime(),formateddate:e+"-"+n+"-"+i,date:t}},getnextnday:function(t,e){return e=e||0,0===e?this.getdateinfo(t):(t=new date(this.getdateinfo(t).time),t.setdate(t.getdate()+e),this.getdateinfo(t))},update:function(t,e){function n(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 i=this._rangeinfo.weeks||1,r=["width","height"],o=this._model.get("cellsize").slice(),a=this._model.getboxlayoutparams(),s="horizontal"===this._orient?[i,7]:[7,i];f([0,1],function(t){n(o,t)&&(a[r[t]]=o[t]*s[t])});var l={width:e.getwidth(),height:e.getheight()},u=this._rect=ia(a,l);f([0,1],function(t){n(o,t)||(o[t]=u[r[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},datatopoint:function(t,e){_(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getdateinfo(t),i=this._rangeinfo,r=n.formateddate;if(e&&!(n.time>=i.start.time&&n.timeo.end.time&&t.reverse(),t},_getrangeinfo:function(t){t=[this.getdateinfo(t[0]),this.getdateinfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var n=math.floor(t[1].time/jc)-math.floor(t[0].time/jc)+1,i=new date(t[0].time),r=i.getdate(),o=t[1].date.getdate();if(i.setdate(r+n-1),i.getdate()!==o)for(var a=i.gettime()-t[1].time>0?1:-1;i.getdate()!==o&&(i.gettime()-t[1].time)*a>0;)n-=a,i.setdate(r+n-1);var s=math.floor((n+t[0].day+6)/7),l=e?-s+1:s-1;return e&&t.reverse(),{range:[t[0].formateddate,t[1].formateddate],start:t[0],end:t[1],allday:n,weeks:s,nthweek:l,fweek:t[0].day,lweek:t[1].day}},_getdatebyweeksandday:function(t,e,n){var i=this._getrangeinfo(n);if(t>i.weeks||0===t&&ei.lweek)return!1;var r=7*(t-1)-i.fweek+e,o=new date(i.start.time);return o.setdate(i.start.d+r),this.getdateinfo(o)}},ap.dimensions=ap.prototype.dimensions,ap.getdimensionsinfo=ap.prototype.getdimensionsinfo,ap.create=function(t,e){var n=[]; return t.eachcomponent("calendar",function(i){var r=new ap(i,t,e);n.push(r),i.coordinatesystem=r}),t.eachseries(function(t){"calendar"===t.get("coordinatesystem")&&(t.coordinatesystem=n[t.get("calendarindex")||0])}),n},is.register("calendar",ap);var qc=cw.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){var e=ka(t);qc.superapply(this,"init",arguments),lp(t,e)},mergeoption:function(t){qc.superapply(this,"mergeoption",arguments),lp(this.option,t)}}),ta={en:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},ea={en:["s","m","t","w","t","f","s"],cn:["日","一","二","三","四","五","六"]};hu({type:"calendar",_tlpoints:null,_blpoints:null,_firstdayofmonth:null,_firstdaypoints:null,render:function(t){var e=this.group;e.removeall();var n=t.coordinatesystem,i=n.getrangeinfo(),r=n.getorient();this._renderdayrect(t,i,e),this._renderlines(t,i,r,e),this._renderyeartext(t,i,r,e),this._rendermonthtext(t,r,e),this._renderweektext(t,i,r,e)},_renderdayrect:function(t,e,n){for(var i=t.coordinatesystem,r=t.getmodel("itemstyle").getitemstyle(),o=i.getcellwidth(),a=i.getcellheight(),s=e.start.time;s<=e.end.time;s=i.getnextnday(s,1).time){var l=i.datatorect([s],!1).tl,u=new bb({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},_renderlines:function(t,e,n,i){function r(e){o._firstdayofmonth.push(a.getdateinfo(e)),o._firstdaypoints.push(a.datatorect([e],!1).tl);var r=o._getlinepointsofoneweek(t,e,n);o._tlpoints.push(r[0]),o._blpoints.push(r[r.length-1]),l&&o._drawsplitline(r,s,i)}var o=this,a=t.coordinatesystem,s=t.getmodel("splitline.linestyle").getlinestyle(),l=t.get("splitline.show"),u=s.linewidth;this._tlpoints=[],this._blpoints=[],this._firstdayofmonth=[],this._firstdaypoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){r(h.formateddate),0===c&&(h=a.getdateinfo(e.start.y+"-"+e.start.m));var d=h.date;d.setmonth(d.getmonth()+1),h=a.getdateinfo(d)}r(a.getnextnday(e.end.time,1).formateddate),l&&this._drawsplitline(o._getedgespoints(o._tlpoints,u,n),s,i),l&&this._drawsplitline(o._getedgespoints(o._blpoints,u,n),s,i)},_getedgespoints:function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},_drawsplitline:function(t,e,n){var i=new yb({z2:20,shape:{points:t},style:e});n.add(i)},_getlinepointsofoneweek:function(t,e,n){var i=t.coordinatesystem;e=i.getdateinfo(e);for(var r=[],o=0;7>o;o++){var a=i.getnextnday(e.time,o),s=i.datatorect([a.time],!1);r[2*a.day]=s.tl,r[2*a.day+1]=s["horizontal"===n?"bl":"tr"]}return r},_formatterlabel:function(t,e){return"string"==typeof t&&t?ya(t,e):"function"==typeof t?t(e):e.namemap},_yeartextpositioncontrol:function(t,e,n,i,r){e=e.slice();var o=["center","bottom"];"bottom"===i?(e[1]+=r,o=["center","top"]):"left"===i?e[0]-=r:"right"===i?(e[0]+=r,o=["center","top"]):e[1]-=r;var a=0;return("left"===i||"right"===i)&&(a=math.pi/2),{rotation:a,position:e,style:{textalign:o[0],textverticalalign:o[1]}}},_renderyeartext:function(t,e,n,i){var r=t.getmodel("yearlabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=r.get("formatter"),p={start:e.start.y,end:e.end.y,namemap:d},g=this._formatterlabel(f,p),v=new ub({z2:30});to(v.style,r,{text:g}),v.attr(this._yeartextpositioncontrol(v,c[a],n,a,o)),i.add(v)}},_monthtextpositioncontrol:function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,textalign:o,textverticalalign:a}},_rendermonthtext:function(t,e,n){var i=t.getmodel("monthlabel");if(i.get("show")){var r=i.get("namemap"),o=i.get("margin"),s=i.get("position"),l=i.get("align"),u=[this._tlpoints,this._blpoints];w(r)&&(r=ta[r.touppercase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;ff;f++){var p=o.getnextnday(c,f),g=o.datatorect([p.time],!1).center,v=f;v=math.abs((f+h)%7);var m=new ub({z2:30});a(to(m.style,r,{text:l[v]}),this._weektextpositioncontrol(g,n,s,u,d)),i.add(m)}}}}),uu({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"}}}),hu({type:"title",render:function(t,e,n){if(this.group.removeall(),t.get("show")){var i=this.group,r=t.getmodel("textstyle"),o=t.getmodel("subtextstyle"),a=t.get("textalign"),s=t.get("textbaseline"),l=new ub({style:to({},r,{text:t.get("text"),textfill:r.gettextcolor()},{disablebox:!0}),z2:10}),u=l.getboundingrect(),h=t.get("subtext"),c=new ub({style:to({},o,{text:h,textfill:o.gettextcolor(),y:u.height+t.get("itemgap"),textverticalalign:"top"},{disablebox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerevent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventdata=c.eventdata=p?{componenttype:"title",componentindex:t.componentindex}:null,i.add(l),h&&i.add(c);var g=i.getboundingrect(),v=t.getboxlayoutparams();v.width=g.width,v.height=g.height;var m=ia(v,{width:n.getwidth(),height:n.getheight()},t.get("padding"));a||(a=t.get("left")||t.get("right"),"middle"===a&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.attr("position",[m.x,m.y]);var y={textalign:a,textverticalalign:s};l.setstyle(y),c.setstyle(y),g=i.getboundingrect();var x=m.margin,_=t.getitemstyle(["color","opacity"]);_.fill=t.get("backgroundcolor");var b=new bb({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderradius")},style:_,silent:!0});ao(b),i.add(b)}}});var na=uu({type:"legend.plain",dependencies:["series"],layoutmode:{type:"box",ignoresize:!0},init:function(t,e,n){this.mergedefaultandtheme(t,n),t.selected=t.selected||{}},mergeoption:function(t){na.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,n=0;n=0},defaultoption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderradius:0,borderwidth:0,padding:5,itemgap:10,itemwidth:25,itemheight:14,inactivecolor:"#ccc",textstyle:{color:"#333"},selectedmode:!0,tooltip:{show:!1}}});nu("legendtoggleselect","legendselectchanged",x(up,"toggleselected")),nu("legendselect","legendselected",x(up,"select")),nu("legendunselect","legendunselected",x(up,"unselect"));var ia=x,ra=f,oa=ky,aa=hu({type:"legend.plain",newlinedisabled:!1,init:function(){this.group.add(this._contentgroup=new oa),this._backgroundel,this._isfirstrender=!0},getcontentgroup:function(){return this._contentgroup},render:function(t,e,n){var i=this._isfirstrender;if(this._isfirstrender=!1,this.resetinner(),t.get("show",!0)){var r=t.get("align");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderinner(r,t,e,n);var o=t.getboxlayoutparams(),a={width:n.getwidth(),height:n.getheight()},l=t.get("padding"),u=ia(o,a,l),h=this.layoutinner(t,r,u,i),c=ia(s({width:h.width,height:h.height},o),a,l);this.group.attr("position",[c.x-h.x,c.y-h.y]),this.group.add(this._backgroundel=cp(h,t))}},resetinner:function(){this.getcontentgroup().removeall(),this._backgroundel&&this.group.remove(this._backgroundel)},renderinner:function(t,e,n,i){var r=this.getcontentgroup(),o=n(),a=e.get("selectedmode"),s=[];n.eachrawseries(function(t){!t.get("legendhoverlink")&&s.push(t.id)}),ra(e.getdata(),function(l,u){var h=l.get("name");if(!this.newlinedisabled&&(""===h||"\n"===h))return void r.add(new oa({newline:!0}));var c=n.getseriesbyname(h)[0];if(!o.get(h))if(c){var d=c.getdata(),f=d.getvisual("color");"function"==typeof f&&(f=f(c.getdataparams(0)));var p=d.getvisual("legendsymbol")||"roundrect",g=d.getvisual("symbol"),v=this._createitem(h,u,l,e,p,g,t,f,a);v.on("click",ia(dp,h,i)).on("mouseover",ia(fp,c.name,null,i,s)).on("mouseout",ia(pp,c.name,null,i,s)),o.set(h,!0)}else n.eachrawseries(function(n){if(!o.get(h)&&n.legenddataprovider){var r=n.legenddataprovider(),c=r.indexofname(h);if(0>c)return;var d=r.getitemvisual(c,"color"),f="roundrect",p=this._createitem(h,u,l,e,f,null,t,d,a);p.on("click",ia(dp,h,i)).on("mouseover",ia(fp,null,h,i,s)).on("mouseout",ia(pp,null,h,i,s)),o.set(h,!0)}},this)},this)},_createitem:function(t,e,n,i,r,o,s,l,u){var h=i.get("itemwidth"),c=i.get("itemheight"),d=i.get("inactivecolor"),f=i.get("symbolkeepaspect"),p=i.isselected(t),g=new oa,v=n.getmodel("textstyle"),m=n.get("icon"),y=n.getmodel("tooltip"),x=y.parentmodel;if(r=m||r,g.add(wh(r,0,0,h,c,p?l:d,null==f?!0:f)),!m&&o&&(o!==r||"none"===o)){var _=.8*c;"none"===o&&(o="circle"),g.add(wh(o,(h-_)/2,(c-_)/2,_,_,p?l:d,null==f?!0:f))}var b="left"===s?h+5:-5,w=s,m=i.get("formatter"),s=t;"string"==typeof m&&m?s=m.replace("{name}",null!=t?t:""):"function"==typeof m&&(s=m(t)),g.add(new ub({style:to({},v,{text:s,x:b,y:c/2,textfill:p?v.gettextcolor():d,textalign:w,textverticalalign:"middle"})}));var t=new bb({shape:g.getboundingrect(),invisible:!0,tooltip:y.get("show")?a({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterparams:{componenttype:"legend",legendindex:i.componentindex,name:t,$vars:["name"]}},y.option):null});return g.add(t),g.eachchild(function(t){t.silent=!0}),t.silent=!u,this.getcontentgroup().add(g),wo(g),g.__legenddataindex=e,g},layoutinner:function(t,e,n){var i=this.getcontentgroup();lw(t.get("orient"),i,t.get("itemgap"),n.width,n.height);var r=i.getboundingrect();return i.attr("position",[-r.x,-r.y]),this.group.getboundingrect()},remove:function(){this.getcontentgroup().removeall(),this._isfirstrender=!0}}),sa=function(t){var e=t.findcomponents({maintype:"legend"});e&&e.length&&t.filterseries(function(t){for(var n=0;nn[l],p=[-c.x,-c.y];i||(p[s]=r.position[s]);var g=[0,0],v=[-d.x,-d.y],m=d(t.get("pagebuttongap",!0),t.get("itemgap",!0));if(f){var y=t.get("pagebuttonposition",!0);"end"===y?v[s]+=n[l]-d[l]:g[s]+=d[l]+m}v[1-s]+=c[u]/2-d[u]/2,r.attr("position",p),o.attr("position",g),a.attr("position",v);var x=this.group.getboundingrect(),x={x:0,y:0};if(x[l]=f?n[l]:c[l],x[u]=math.max(c[u],d[u]),x[h]=math.min(0,d[h]+v[1-s]),o.__rectsize=n[l],f){var _={x:0,y:0};_[l]=math.max(n[l]-d[l]-m,0),_[u]=x[u],o.setclippath(new bb({shape:_})),o.__rectsize=_[l]}else a.eachchild(function(t){t.attr({invisible:!0,silent:!0})});var b=this._getpageinfo(t);return null!=b.pageindex&&ro(r,{position:b.contentposition},f?t:!1),this._updatepageinfoview(t,b),x},_pagego:function(t,e,n){var i=this._getpageinfo(e)[t];null!=i&&n.dispatchaction({type:"legendscroll",scrolldataindex:i,legendid:e.id})},_updatepageinfoview:function(t,e){var n=this._controllergroup;f(["pageprev","pagenext"],function(i){var r=null!=e[i+"dataindex"],o=n.childofname(i);o&&(o.setstyle("fill",r?t.get("pageiconcolor",!0):t.get("pageiconinactivecolor",!0)),o.cursor=r?"pointer":"default")});var i=n.childofname("pagetext"),r=t.get("pageformatter"),o=e.pageindex,a=null!=o?o+1:0,s=e.pagecount;i&&r&&i.setstyle("text",w(r)?r.replace("{current}",a).replace("{total}",s):r({current:a,total:s}))},_getpageinfo:function(t){function e(t){if(t){var e=t.getboundingrect(),n=e[l]+t.position[a];return{s:n,e:n+e[s],i:t.__legenddataindex}}}function n(t,e){return t.e>=e&&t.s<=e+o}var i=t.get("scrolldataindex",!0),r=this.getcontentgroup(),o=this._containergroup.__rectsize,a=t.getorient().index,s=ha[a],l=ca[a],u=this._findtargetitemindex(i),h=r.children(),c=h[u],d=h.length,f=d?1:0,p={contentposition:r.position.slice(),pagecount:f,pageindex:f-1,pageprevdataindex:null,pagenextdataindex:null};if(!c)return p;var g=e(c);p.contentposition[a]=-g.s;for(var v=u+1,m=g,y=g,x=null;d>=v;++v)x=e(h[v]),(!x&&y.e>m.s+o||x&&!n(x,m.s))&&(m=y.i>m.i?y:x,m&&(null==p.pagenextdataindex&&(p.pagenextdataindex=m.i),++p.pagecount)),y=x;for(var v=u-1,m=g,y=g,x=null;v>=-1;--v)x=e(h[v]),x&&n(y,x.s)||!(m.i=0;){var l=r.indexof(a),u=r.substr(s+o.length,l-s-o.length);i["marker"+u]=u.indexof("sub")>-1?{textwidth:4,textheight:4,textborderradius:2,textbackgroundcolor:e[u],textoffset:[3,0]}:{textwidth:10,textheight:10,textborderradius:5,textbackgroundcolor:e[u]},r=r.substr(l+1),s=r.indexof("{marker")}this.el=new ub({style:{rich:i,text:t,textlineheight:20,textbackgroundcolor:n.get("backgroundcolor"),textborderradius:n.get("borderradius"),textfill:n.get("textstyle.color"),textpadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(cleartimeout(h._hidetimeout),h._show=!0),h._incontent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hidelater(h._hidedelay),h._incontent=!1})},setenterable:function(t){this._enterable=t},getsize:function(){var t=this.el.getboundingrect();return[t.width,t.height]},moveto:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),this._show=!1},hidelater:function(t){!this._show||this._incontent&&this._enterable||(t?(this._hidedelay=t,this._show=!1,this._hidetimeout=settimeout(y(this.hide,this),t)):this.hide())},isshow:function(){return this._show},getoutersize:function(){return this.getsize()}};var ma=y,ya=f,xa=jo,_a=new bb({shape:{x:-1,y:-1,width:2,height:2}});hu({type:"tooltip",init:function(t,e){if(!fm.node){var n=t.getcomponent("tooltip"),i=n.get("rendermode");this._rendermode=ji(i);var r;"html"===this._rendermode?(r=new xp(e.getdom(),e),this._newline="
"):(r=new _p(e),this._newline="\n"),this._tooltipcontent=r}},render:function(t,e,n){if(!fm.node){this.group.removeall(),this._tooltipmodel=t,this._ecmodel=e,this._api=n,this._lastdatabycoordsys=null,this._alwaysshowcontent=t.get("alwaysshowcontent");var i=this._tooltipcontent;i.update(),i.setenterable(t.get("enterable")),this._initgloballistener(),this._keepshow()}},_initgloballistener:function(){var t=this._tooltipmodel,e=t.get("triggeron");jd("itemtooltip",this._api,ma(function(t,n,i){"none"!==e&&(e.indexof(t)>=0?this._tryshow(n,i):"leave"===t&&this._hide(i))},this))},_keepshow:function(){var t=this._tooltipmodel,e=this._ecmodel,n=this._api;if(null!=this._lastx&&null!=this._lasty&&"none"!==t.get("triggeron")){var i=this;cleartimeout(this._refreshupdatetimeout),this._refreshupdatetimeout=settimeout(function(){i.manuallyshowtip(t,e,n,{x:i._lastx,y:i._lasty})})}},manuallyshowtip:function(t,e,n,i){if(i.from!==this.uid&&!fm.node){var r=wp(i,n);this._ticket="";var o=i.databycoordsys;if(i.tooltip&&null!=i.x&&null!=i.y){var a=_a;a.position=[i.x,i.y],a.update(),a.tooltip=i.tooltip,this._tryshow({offsetx:i.x,offsety:i.y,target:a},r)}else if(o)this._tryshow({offsetx:i.x,offsety:i.y,position:i.position,event:{},databycoordsys:i.databycoordsys,tooltipoption:i.tooltipoption},r);else if(null!=i.seriesindex){if(this._manuallyaxisshowtip(t,e,n,i))return;var s=oc(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryshow({offsetx:l,offsety:u,position:i.position,target:s.el,event:{}},r)}else null!=i.x&&null!=i.y&&(n.dispatchaction({type:"updateaxispointer",x:i.x,y:i.y}),this._tryshow({offsetx:i.x,offsety:i.y,position:i.position,target:n.getzr().findhover(i.x,i.y).target,event:{}},r))}},manuallyhidetip:function(t,e,n,i){var r=this._tooltipcontent;!this._alwaysshowcontent&&this._tooltipmodel&&r.hidelater(this._tooltipmodel.get("hidedelay")),this._lastx=this._lasty=null,i.from!==this.uid&&this._hide(wp(i,n))},_manuallyaxisshowtip:function(t,e,n,i){var r=i.seriesindex,o=i.dataindex,a=e.getcomponent("axispointer").coordsysaxesinfo;if(null!=r&&null!=o&&null!=a){var s=e.getseriesbyindex(r);if(s){var l=s.getdata(),t=bp([l.getitemmodel(o),s,(s.coordinatesystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchaction({type:"updateaxispointer",seriesindex:r,dataindex:o,position:i.position}),!0}}},_tryshow:function(t,e){var n=t.target,i=this._tooltipmodel;if(i){this._lastx=t.offsetx,this._lasty=t.offsety;var r=t.databycoordsys;r&&r.length?this._showaxistooltip(r,t):n&&null!=n.dataindex?(this._lastdatabycoordsys=null,this._showseriesitemtooltip(t,n,e)):n&&n.tooltip?(this._lastdatabycoordsys=null,this._showcomponentitemtooltip(t,n,e)):(this._lastdatabycoordsys=null,this._hide(e))}},_showormove:function(t,e){var n=t.get("showdelay");e=y(e,this),cleartimeout(this._showtimout),n>0?this._showtimout=settimeout(e,n):e()},_showaxistooltip:function(t,e){var n=this._ecmodel,i=this._tooltipmodel,o=[e.offsetx,e.offsety],a=[],s=[],l=bp([e.tooltipoption,i]),u=this._rendermode,h=this._newline,c={};ya(t,function(t){ya(t.databyaxis,function(t){var e=n.getcomponent(t.axisdim+"axis",t.axisindex),i=t.value,o=[];if(e&&null!=i){var l=df(i,e.axis,n,t.seriesdataindices,t.valuelabelopt);f(t.seriesdataindices,function(a){var h=n.getseriesbyindex(a.seriesindex),d=a.dataindexinside,f=h&&h.getdataparams(d);if(f.axisdim=t.axisdim,f.axisindex=t.axisindex,f.axistype=t.axistype,f.axisid=t.axisid,f.axisvalue=vh(e.axis,i),f.axisvaluelabel=l,f){s.push(f);var p,g=h.formattooltip(d,!0,null,u);if(m(g)){p=g.html;var v=g.markers;r(c,v)}else p=g;o.push(p)}});var d=l;a.push("html"!==u?o.join(h):(d?va(d)+h:"")+o.join(h))}})},this),a.reverse(),a=a.join(this._newline+this._newline);var d=e.position;this._showormove(l,function(){this._updatecontentnotchangedonaxis(t)?this._updateposition(l,d,o[0],o[1],this._tooltipcontent,s):this._showtooltipcontent(l,a,s,math.random(),o[0],o[1],d,void 0,c)})},_showseriesitemtooltip:function(t,e,n){var i=this._ecmodel,r=e.seriesindex,o=i.getseriesbyindex(r),a=e.datamodel||o,s=e.dataindex,l=e.datatype,u=a.getdata(),h=bp([u.getitemmodel(s),a,o&&(o.coordinatesystem||{}).model,this._tooltipmodel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=a.getdataparams(s,l),g=a.formattooltip(s,!1,l,this._rendermode);m(g)?(d=g.html,f=g.markers):(d=g,f=null);var v="item_"+a.name+"_"+s;this._showormove(h,function(){this._showtooltipcontent(h,d,p,v,t.offsetx,t.offsety,t.position,t.target,f)}),n({type:"showtip",dataindexinside:s,dataindex:u.getrawindex(s),seriesindex:r,from:this.uid})}},_showcomponentitemtooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var o=new zo(i,this._tooltipmodel,this._ecmodel),a=o.get("content"),s=math.random();this._showormove(o,function(){this._showtooltipcontent(o,a,o.get("formatterparams")||{},s,t.offsetx,t.offsety,t.position,e)}),n({type:"showtip",from:this.uid})},_showtooltipcontent:function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showcontent")&&t.get("show")){var u=this._tooltipcontent,h=t.get("formatter");a=a||t.get("position");var c=e;if(h&&"string"==typeof h)c=ma(h,n,!0);else if("function"==typeof h){var d=ma(function(e,i){e===this._ticket&&(u.setcontent(i,l,t),this._updateposition(t,a,r,o,u,n,s))},this);this._ticket=i,c=h(n,i,d)}u.setcontent(c,l,t),u.show(t),this._updateposition(t,a,r,o,u,n,s)}},_updateposition:function(t,e,n,i,r,o,a){var s=this._api.getwidth(),l=this._api.getheight();e=e||t.get("position");var u=r.getsize(),h=t.get("align"),c=t.get("verticalalign"),d=a&&a.getboundingrect().clone();if(a&&d.applytransform(a.transform),"function"==typeof e&&(e=e([n,i],o,r.el,d,{viewsize:[s,l],contentsize:u.slice()})),_(e))n=xa(e[0],s),i=xa(e[1],l);else if(m(e)){e.width=u[0],e.height=u[1];var f=ia(e,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if("string"==typeof e&&a){var p=tp(e,d,u);n=p[0],i=p[1]}else{var p=mp(n,i,r,s,l,h?null:20,c?null:20);n=p[0],i=p[1]}if(h&&(n-=ip(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=ip(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=sp(n,i,r,s,l);n=p[0],i=p[1]}r.moveto(n,i)},_updatecontentnotchangedonaxis:function(t){var e=this._lastdatabycoordsys,n=!!e&&e.length===t.length;return n&&ya(e,function(e,i){var r=e.databyaxis||{},o=t[i]||{},a=o.databyaxis||[];n&=r.length===a.length,n&&ya(r,function(t,e){var i=a[e]||{},r=t.seriesdataindices||[],o=i.seriesdataindices||[];n&=t.value===i.value&&t.axistype===i.axistype&&t.axisid===i.axisid&&r.length===o.length,n&&ya(r,function(t,e){var i=o[e];n&=t.seriesindex===i.seriesindex&&t.dataindex===i.dataindex})})}),this._lastdatabycoordsys=t,!!n},_hide:function(t){this._lastdatabycoordsys=null,t({type:"hidetip",from:this.uid})},dispose:function(t,e){fm.node||(this._tooltipcontent.hide(),ef("itemtooltip",e))}}),nu({type:"showtip",event:"showtip",update:"tooltip:manuallyshowtip"},function(){}),nu({type:"hidetip",event:"hidetip",update:"tooltip:manuallyhidetip"},function(){});var ba=pa,wa=va,ma=uu({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){this.mergedefaultandtheme(t,n),this.mergeoption(t,n,i.createdbyself,!0)},isanimationenabled:function(){if(fm.node)return!1;var t=this.__hostseries;return this.getshallow("animation")&&t&&t.isanimationenabled()},mergeoption:function(t,e,n,i){var r=this.constructor,o=this.maintype+"model";n||e.eachseries(function(t){var n=t.get(this.maintype,!0),s=t[o];return n&&n.data?(s?s.mergeoption(n,e,!0):(i&&cp(n),f(n.data,function(t){t instanceof array?(cp(t[0]),cp(t[1])):cp(t)}),s=new r(n,this,e),a(s,{maintype:this.maintype,seriesindex:t.seriesindex,name:t.name,createdbyself:!0}),s.__hostseries=t),void(t[o]=s)):void(t[o]=null)},this)},formattooltip:function(t){var e=this.getdata(),n=this.getrawvalue(t),i=_(n)?p(n,ba).join(", "):ba(n),r=e.getname(t),o=wa(this.name);return(null!=n||r)&&(o+="
"),r&&(o+=wa(r),null!=n&&(o+=" : ")),null!=n&&(o+=wa(i)),o},getdata:function(){return this._data},setdata:function(t){this._data=t}});c(ma,qw),ma.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 sa=u,ta=x,ia={min:ta(kp,"min"),max:ta(kp,"max"),average:ta(kp,"average")},ca=hu({type:"marker",init:function(){this.markergroupmap=n()},render:function(t,e,n){var i=this.markergroupmap;i.each(function(t){t.__keep=!1});var r=this.type+"model";e.eachseries(function(t){var i=t[r];i&&this.renderseries(t,i,e,n)},this),i.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderseries:function(){}});ca.extend({type:"markpoint",updatetransform:function(t,e,n){e.eachseries(function(t){var e=t.markpointmodel;e&&(bp(e.getdata(),t,n),this.markergroupmap.get(t.id).updatelayout(e))},this)},renderseries:function(t,e,n,i){var r=t.coordinatesystem,o=t.id,a=t.getdata(),s=this.markergroupmap,l=s.get(o)||s.set(o,new gc),u=np(r,t,e);e.setdata(u),bp(e.getdata(),t,i),u.each(function(t){var n=u.getitemmodel(t),i=n.getshallow("symbolsize");"function"==typeof i&&(i=i(e.getrawvalue(t),e.getdataparams(t))),u.setitemvisual(t,{symbolsize:i,color:n.get("itemstyle.color")||a.getvisual("color"),symbol:n.getshallow("symbol")})}),l.updatedata(u),this.group.add(l.group),u.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),ql(function(t){t.markpoint=t.markpoint||{}}),ma.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 aa=function(t,e,n,i){var r=pp(t,i[0]),a=pp(t,i[1]),s=a,l=r.coord,u=a.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},r,a]);return h.coord=[r.coord,a.coord],h.x0=r.x,h.y0=r.y,h.x1=a.x,h.y1=a.y,h},da=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];ca.extend({type:"markarea",updatetransform:function(t,e,n){e.eachseries(function(t){var e=t.markareamodel; if(e){var i=e.getdata();i.each(function(e){var r=p(da,function(r){return gp(i,e,r,t,n)});i.setitemlayout(e,r);var o=i.getitemgraphicel(e);o.setshape("points",r)})}},this)},renderseries:function(t,e,n,i){var r=t.coordinatesystem,o=t.id,a=t.getdata(),l=this.markergroupmap,u=l.get(o)||l.set(o,{group:new ky});this.group.add(u.group),u.__keep=!0;var h=wp(r,t,e);e.setdata(h),h.each(function(e){h.setitemlayout(e,p(da,function(n){return gp(h,e,n,t,i)})),h.setitemvisual(e,{color:a.getvisual("color")})}),h.diff(u.__data).add(function(t){var e=new mb({shape:{points:h.getitemlayout(t)}});h.setitemgraphicel(t,e),u.group.add(e)}).update(function(t,n){var i=u.__data.getitemgraphicel(n);ro(i,{shape:{points:h.getitemlayout(t)}},e,t),u.group.add(i),h.setitemgraphicel(t,i)}).remove(function(t){var e=u.__data.getitemgraphicel(t);u.group.remove(e)}).execute(),h.eachitemgraphicel(function(t,n){var i=h.getitemmodel(n),r=i.getmodel("label"),o=i.getmodel("emphasis.label"),a=h.getitemvisual(n,"color");t.usestyle(s(i.getmodel("itemstyle").getitemstyle(),{fill:tn(a,.4),stroke:a})),t.hoverstyle=i.getmodel("emphasis.itemstyle").getitemstyle(),so(t.style,t.hoverstyle,r,o,{labelfetcher:e,labeldataindex:n,defaulttext:h.getname(n)||"",isrecttext:!0,autocolor:a}),wo(t,{}),t.datamodel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),ql(function(t){t.markarea=t.markarea||{}});var ka=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&zp(t)})};cw.registersubtypedefaulter("timeline",function(){return"slider"}),nu({type:"timelinechange",event:"timelinechanged",update:"prepareandupdate"},function(t,e){var n=e.getcomponent("timeline");return n&&null!=t.currentindex&&(n.setcurrentindex(t.currentindex),!n.get("loop",!0)&&n.isindexmax()&&n.setplaystate(!1)),e.resetoption("timeline"),s({currentindex:n.option.currentindex},t)}),nu({type:"timelineplaychange",event:"timelineplaychanged",update:"update"},function(t,e){var n=e.getcomponent("timeline");n&&null!=t.playstate&&n.setplaystate(t.playstate)});var pa=cw.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,n){this._data,this._names,this.mergedefaultandtheme(t,n),this._initdata()},mergeoption:function(){pa.superapply(this,"mergeoption",arguments),this._initdata()},setcurrentindex:function(t){null==t&&(t=this.option.currentindex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentindex=t},getcurrentindex:function(){return this.option.currentindex},isindexmax:function(){return this.getcurrentindex()>=this._data.count()-1},setplaystate:function(t){this.option.autoplay=!!t},getplaystate:function(){return!!this.option.autoplay},_initdata:function(){var t=this.option,e=t.data||[],n=t.axistype,r=this._names=[];if("category"===n){var o=[];f(e,function(t,e){var n,a=vi(t);m(t)?(n=i(t),n.value=e):n=e,o.push(n),w(a)||null!=a&&!isnan(a)||(a=""),r.push(a+"")}),e=o}var a={category:"ordinal",time:"time"}[n]||"number",s=this._data=new ps([{name:"value",type:a}],this);s.initdata(e,r)},getdata:function(){return this._data},getcategories:function(){return"category"===this.get("axistype")?this._names.slice():void 0}}),la=pa.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:[]}});c(la,qw);var oa=qw.extend({type:"timeline"}),za=function(t,e,n,i){tt.call(this,t,e,n),this.type=i||"value",this.model=null};za.prototype={constructor:za,getlabelmodel:function(){return this.model.getmodel("label")},ishorizontal:function(){return"horizontal"===this.model.get("orient")}},h(za,tt);var ra=y,ea=f,ba=math.pi;oa.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewrect,this._timer,this._currentpointer,this._maingroup,this._labelgroup},render:function(t,e,n){if(this.model=t,this.api=n,this.ecmodel=e,this.group.removeall(),t.get("show",!0)){var i=this._layout(t,n),r=this._creategroup("maingroup"),o=this._creategroup("labelgroup"),a=this._axis=this._createaxis(i,t);t.formattooltip=function(t){return va(a.scale.getlabel(t))},ea(["axisline","axistick","control","currentpointer"],function(e){this["_render"+e](i,r,a,t)},this),this._renderaxislabel(i,o,a,t),this._position(i,t)}this._doplaystop()},remove:function(){this._cleartimer(),this.group.removeall()},dispose:function(){this._cleartimer()},_layout:function(t,e){var n=t.get("label.position"),i=t.get("orient"),r=up(t,e);null==n||"auto"===n?n="horizontal"===i?r.y+r.height/2=0||"+"===n?"left":"right"},a={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:ba/2},l="vertical"===i?r.height:r.width,u=t.getmodel("controlstyle"),h=u.get("show",!0),c=h?u.get("itemsize"):0,d=h?u.get("itemgap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*ba/180;var g,v,m,y,x=u.get("position",!0),_=h&&u.get("showplaybtn",!0),b=h&&u.get("showprevbtn",!0),w=h&&u.get("shownextbtn",!0),m=0,s=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],m+=f),b&&(v=[m,0],m+=f),w&&(m=[s-c,0],s-=f)):(_&&(g=[s-c,0],s-=f),b&&(v=[0,0],m+=f),w&&(m=[s-c,0],s-=f)),y=[m,s],t.get("inverse")&&y.reverse(),{viewrect:r,mainlength:l,orient:i,rotation:s[i],labelrotation:p,labelposopt:n,labelalign:t.get("label.align")||o[i],labelbaseline:t.get("label.verticalalign")||t.get("label.baseline")||a[i],playposition:g,prevbtnposition:v,nextbtnposition:m,axisextent:y,controlsize:c,controlgap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function i(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}var r=this._maingroup,o=this._labelgroup,a=t.viewrect;if("vertical"===t.orient){var s=te(),l=a.x,u=a.y+a.height;de(s,s,[-l,-u]),ke(s,s,-ba/2),de(s,s,[l,u]),a=a.clone(),a.applytransform(s)}var h=n(a),c=n(r.getboundingrect()),d=n(o.getboundingrect()),f=r.position,p=o.position;p[0]=f[0]=h[0][0];var g=t.labelposopt;if(isnan(g)){var v="+"===g?0:1;i(f,c,h,1,v),i(p,d,h,1,1-v)}else{var v=g>=0?0:1;i(f,c,h,1,v),p[1]=f[1]+g}r.attr("position",f),o.attr("position",p),r.rotation=o.rotation=t.rotation,e(r),e(o)},_createaxis:function(t,e){var n=e.getdata(),i=e.get("axistype"),r=fh(e,i);r.getticks=function(){return n.maparray(["value"],function(t){return t})};var o=n.getdataextent("value");r.setextent(o[0],o[1]),r.niceticks();var a=new za("value",r,t.axisextent,i);return a.model=e,a},_creategroup:function(t){var e=this["_"+t]=new ky;return this.group.add(e),e},_renderaxisline:function(t,e,n,i){var r=n.getextent();i.get("linestyle.show")&&e.add(new mb({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:a({linecap:"round"},i.getmodel("linestyle").getlinestyle()),silent:!0,z2:1}))},_renderaxistick:function(t,e,n,i){var r=i.getdata(),o=n.scale.getticks();ea(o,function(t){var o=n.datatocoord(t),a=r.getitemmodel(t),s=a.getmodel("itemstyle"),l=a.getmodel("emphasis.itemstyle"),u={position:[o,0],onclick:ra(this._changetimeline,this,t)},h=jp(a,s,e,u);wo(h,l.getitemstyle()),a.get("tooltip")?(h.dataindex=t,h.datamodel=i):h.dataindex=h.datamodel=null},this)},_renderaxislabel:function(t,e,n,i){var r=n.getlabelmodel();if(r.get("show")){var o=i.getdata(),a=n.getviewlabels();ea(a,function(i){var r=i.tickvalue,a=o.getitemmodel(r),s=a.getmodel("label"),l=a.getmodel("emphasis.label"),u=n.datatocoord(i.tickvalue),h=new ub({position:[u,0],rotation:t.labelrotation-t.rotation,onclick:ra(this._changetimeline,this,r),silent:!1});to(h.style,s,{text:i.formattedlabel,textalign:t.labelalign,textverticalalign:t.labelbaseline}),e.add(h),wo(h,to({},l))},this)}},_rendercontrol:function(t,e,n,i){function r(t,n,r,h){if(t){var c={position:t,origin:[o/2,0],rotation:h?-a:0,recthover:!0,style:s,onclick:r},d=qp(i,n,u,c);e.add(d),wo(d,l)}}var o=t.controlsize,a=t.rotation,s=i.getmodel("controlstyle").getitemstyle(),l=i.getmodel("emphasis.controlstyle").getitemstyle(),u=[0,-o/2,o,o],h=i.getplaystate(),c=i.get("inverse",!0);r(t.nextbtnposition,"controlstyle.nexticon",ra(this._changetimeline,this,c?"-":"+")),r(t.prevbtnposition,"controlstyle.previcon",ra(this._changetimeline,this,c?"+":"-")),r(t.playposition,"controlstyle."+(h?"stopicon":"playicon"),ra(this._handleplayclick,this,!h),!0)},_rendercurrentpointer:function(t,e,n,i){var r=i.getdata(),o=i.getcurrentindex(),a=r.getitemmodel(o).getmodel("checkpointstyle"),s=this,l={oncreate:function(t){t.draggable=!0,t.drift=ra(s._handlepointerdrag,s),t.ondragend=ra(s._handlepointerdragend,s),kp(t,o,n,i,!0)},onupdate:function(t){kp(t,o,n,i)}};this._currentpointer=jp(a,a,this._maingroup,{},this._currentpointer,l)},_handleplayclick:function(t){this._cleartimer(),this.api.dispatchaction({type:"timelineplaychange",playstate:t,from:this.uid})},_handlepointerdrag:function(t,e,n){this._cleartimer(),this._pointerchangetimeline([n.offsetx,n.offsety])},_handlepointerdragend:function(t){this._pointerchangetimeline([t.offsetx,t.offsety],!0)},_pointerchangetimeline:function(t,e){var n=this._toaxiscoord(t)[0],i=this._axis,r=ta(i.getextent().slice());n>r[1]&&(n=r[1]),ns&&(i=s,e=o)}),e},_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})}}),ql(ka),cw.registersubtypedefaulter("datazoom",function(){return"slider"});var na=["x","y","z","radius","angle","single"],va=["cartesian2d","polar","singleaxis"],fa=jp(na,["axisindex","axis","index","id"]),ha=f,ga=ta,wa=function(t,e,n,i){this._dimname=t,this._axisindex=e,this._valuewindow,this._percentwindow,this._dataextent,this._minmaxspan,this.ecmodel=i,this._datazoommodel=n};wa.prototype={constructor:wa,hostedby:function(t){return this._datazoommodel===t},getdatavaluewindow:function(){return this._valuewindow.slice()},getdatapercentwindow:function(){return this._percentwindow.slice()},gettargetseriesmodels:function(){var t=[],e=this.ecmodel;return e.eachseries(function(n){if($p(n.get("coordinatesystem"))){var i=this._dimname,r=e.querycomponents({maintype:i+"axis",index:n.get(i+"axisindex"),id:n.get(i+"axisid")})[0];this._axisindex===(r&&r.componentindex)&&t.push(n)}},this),t},getaxismodel:function(){return this.ecmodel.getcomponent(this._dimname+"axis",this._axisindex)},getotheraxismodel:function(){var t,e,n=this._dimname,i=this.ecmodel,r=this.getaxismodel(),o="x"===n||"y"===n;o?(e="gridindex",t="x"===n?"y":"x"):(e="polarindex",t="angle"===n?"radius":"angle");var a;return i.eachcomponent(t+"axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(a=t)}),a},getminmaxspan:function(){return i(this._minmaxspan)},calculatedatawindow:function(t){var e=this._dataextent,n=this.getaxismodel(),i=n.axis.scale,r=this._datazoommodel.getrangepropmode(),o=[0,100],a=[t.start,t.end],s=[];return ha(["startvalue","endvalue"],function(e){s.push(null!=t[e]?i.parse(t[e]):null)}),ha([0,1],function(t){var n=s[t],l=a[t];"percent"===r[t]?(null==l&&(l=o[t]),n=i.parse($o(l,o,e,!0))):l=$o(n,e,o,!0),s[t]=n,a[t]=l}),{valuewindow:ga(s),percentwindow:ga(a)}},reset:function(t){if(t===this._datazoommodel){var e=this.gettargetseriesmodels();this._dataextent=tg(this,this._dimname,e);var n=this.calculatedatawindow(t.option);this._valuewindow=n.valuewindow,this._percentwindow=n.percentwindow,ig(this),ng(this)}},restore:function(t){t===this._datazoommodel&&(this._valuewindow=this._percentwindow=null,ng(this,!0))},filterdata:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._datazoommodel){var n=this._dimname,i=this.gettargetseriesmodels(),r=t.get("filtermode"),o=this._valuewindow;"none"!==r&&ha(i,function(t){var i=t.getdata(),a=i.mapdimension(n,!0);a.length&&("weakfilter"===r?i.filterself(function(t){for(var e,n,r,s=0;so[1];if(u&&!h&&!c)return!0;u&&(r=!0),h&&(e=!0),c&&(n=!0)}return r&&e&&n}):ha(a,function(n){if("empty"===r)t.setdata(i.map(n,function(t){return e(t)?t:0/0}));else{var a={};a[n]=o,i.selectrange(a)}}),ha(a,function(t){i.setapproximateextent(o,t)}))})}}};var za=f,xa=fa,ya=uu({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,n){this._dataintervalbyaxis={},this._datainfo={},this._axisproxies={},this.textstylemodel,this._autothrottle=!0,this._rangepropmode=["percent","percent"];var i=rg(t);this.mergedefaultandtheme(t,n),this.doinit(i)},mergeoption:function(t){var e=rg(t);r(this.option,t,!0),this.doinit(e)},doinit:function(t){var e=this.option;fm.canvassupported||(e.realtime=!1),this._setdefaultthrottle(t),og(this,t),za([["start","startvalue"],["end","endvalue"]],function(t,n){"value"===this._rangepropmode[n]&&(e[t[0]]=null)},this),this.textstylemodel=this.getmodel("textstyle"),this._resettarget(),this._giveaxisproxies()},_giveaxisproxies:function(){var t=this._axisproxies;this.eachtargetaxis(function(e,n,i,r){var o=this.dependentmodels[e.axis][n],a=o.__dzaxisproxy||(o.__dzaxisproxy=new wa(e.name,n,this,r));t[e.name+"_"+n]=a},this)},_resettarget:function(){var t=this.option,e=this._judgeautomode();xa(function(e){var n=e.axisindex;t[n]=bi(t[n])},this),"axisindex"===e?this._autosetaxisindex():"orient"===e&&this._autosetorient()},_judgeautomode:function(){var t=this.option,e=!1;xa(function(n){null!=t[n.axisindex]&&(e=!0)},this);var n=t.orient;return null==n&&e?"orient":e?void 0:(null==n&&(t.orient="horizontal"),"axisindex")},_autosetaxisindex:function(){var t=!0,e=this.get("orient",!0),n=this.option,i=this.dependentmodels;if(t){var r="vertical"===e?"y":"x";i[r+"axis"].length?(n[r+"axisindex"]=[0],t=!1):za(i.singleaxis,function(i){t&&i.get("orient",!0)===e&&(n.singleaxisindex=[i.componentindex],t=!1)})}t&&xa(function(e){if(t){var i=[],r=this.dependentmodels[e.axis];if(r.length&&!i.length)for(var o=0,a=r.length;a>o;o++)"category"===r[o].get("type")&&i.push(o);n[e.axisindex]=i,i.length&&(t=!1)}},this),t&&this.ecmodel.eachseries(function(t){this._isserieshasallaxestypeof(t,"value")&&xa(function(e){var i=n[e.axisindex],r=t.get(e.axisindex),o=t.get(e.axisid),a=t.ecmodel.querycomponents({maintype:e.axis,index:r,id:o})[0];r=a.componentindex,u(i,r)<0&&i.push(r)})},this)},_autosetorient:function(){var t;this.eachtargetaxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isserieshasallaxestypeof:function(t,e){var n=!0;return xa(function(i){var r=t.get(i.axisindex),o=this.dependentmodels[i.axis][r];o&&o.get("type")===e||(n=!1)},this),n},_setdefaultthrottle:function(t){if(t.hasownproperty("throttle")&&(this._autothrottle=!1),this._autothrottle){var e=this.ecmodel.option;this.option.throttle=e.animation&&e.animationdurationupdate>0?100:20}},getfirsttargetaxismodel:function(){var t;return xa(function(e){if(null==t){var n=this.get(e.axisindex);n.length&&(t=this.dependentmodels[e.axis][n[0]])}},this),t},eachtargetaxis:function(t,e){var n=this.ecmodel;xa(function(i){za(this.get(i.axisindex),function(r){t.call(e,i,r,this,n)},this)},this)},getaxisproxy:function(t,e){return this._axisproxies[t+"_"+e]},getaxismodel:function(t,e){var n=this.getaxisproxy(t,e);return n&&n.getaxismodel()},setrawrange:function(t,e){var n=this.option;za([["start","startvalue"],["end","endvalue"]],function(e){(null!=t[e[0]]||null!=t[e[1]])&&(n[e[0]]=t[e[0]],n[e[1]]=t[e[1]])},this),!e&&og(this,t)},getpercentrange:function(){var t=this.findrepresentativeaxisproxy();return t?t.getdatapercentwindow():void 0},getvaluerange:function(t,e){if(null!=t||null!=e)return this.getaxisproxy(t,e).getdatavaluewindow();var n=this.findrepresentativeaxisproxy();return n?n.getdatavaluewindow():void 0},findrepresentativeaxisproxy:function(t){if(t)return t.__dzaxisproxy;var e=this._axisproxies;for(var n in e)if(e.hasownproperty(n)&&e[n].hostedby(this))return e[n];for(var n in e)if(e.hasownproperty(n)&&!e[n].hostedby(this))return e[n]},getrangepropmode:function(){return this._rangepropmode.slice()}}),ua=qw.extend({type:"datazoom",render:function(t,e,n){this.datazoommodel=t,this.ecmodel=e,this.api=n},gettargetcoordinfo:function(){function t(t,e,n,i){for(var r,o=0;oo&&(e[1-i]=e[i]+h.sign*o),e}),ja=bb,ka=$o,$a=ta,ja=y,qa=f,td=7,ed=1,nd=30,id="horizontal",rd="vertical",od=5,ad=["line","bar","candlestick","scatter"],sd=ua.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,n,i){return sd.superapply(this,"render",arguments),js(this,"_dispatchzoomaction",this.datazoommodel.get("throttle"),"fixrate"),this._orient=t.get("orient"),this.datazoommodel.get("show")===!1?void this.group.removeall():(i&&"datazoom"===i.type&&i.from===this.uid||this._buildview(),void this._updateview())},remove:function(){sd.superapply(this,"remove",arguments),ks(this,"_dispatchzoomaction")},dispose:function(){sd.superapply(this,"dispose",arguments),ks(this,"_dispatchzoomaction")},_buildview:function(){var t=this.group;t.removeall(),this._resetlocation(),this._resetinterval();var e=this._displayables.bargroup=new ky;this._renderbackground(),this._renderhandle(),this._renderdatashadow(),t.add(e),this._positiongroup()},_resetlocation:function(){var t=this.datazoommodel,e=this.api,n=this._findcoordrect(),i={width:e.getwidth(),height:e.getheight()},r=this._orient===id?{right:i.width-n.x-n.width,top:i.height-nd-td,width:n.width,height:nd}:{right:td,top:n.y,width:nd,height:n.height},o=ka(t.option);f(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=ia(o,i,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],this._orient===rd&&this._size.reverse()},_positiongroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.datazoommodel.getfirsttargetaxismodel(),r=i&&i.get("inverse"),o=this._displayables.bargroup,a=(this._datashadowinfo||{}).otheraxisinverse;o.attr(n!==id||r?n===id&&r?{scale:a?[-1,1]:[-1,-1]}:n!==rd||r?{scale:a?[-1,-1]:[-1,1],rotation:math.pi/2}:{scale:a?[1,-1]:[1,1],rotation:math.pi/2}:{scale:a?[1,1]:[1,-1]});var s=t.getboundingrect([o]);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,n=this._displayables.bargroup;n.add(new ja({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundcolor")},z2:-40})),n.add(new ja({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:y(this._onclickpanelclick,this)}))},_renderdatashadow:function(){var t=this._datashadowinfo=this._preparedatashadowinfo();if(t){var e=this._size,n=t.series,i=n.getrawdata(),r=n.getshadowdim?n.getshadowdim():t.otherdim;if(null!=r){var o=i.getdataextent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var l,u=[0,e[1]],h=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=h[1]/(i.count()-1),p=0,g=math.round(i.count()/e[0]);i.each([r],function(t,e){if(g>0&&e%g)return void(p+=f);var n=null==t||isnan(t)||""===t,i=n?0:ka(t,o,u,!0);n&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!n&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,i]),d.push([p,i]),p+=f,l=n});var v=this.datazoommodel;this._displayables.bargroup.add(new mb({shape:{points:c},style:s({fill:v.get("databackgroundcolor")},v.getmodel("databackground.areastyle").getareastyle()),silent:!0,z2:-20})),this._displayables.bargroup.add(new yb({shape:{points:d},style:v.getmodel("databackground.linestyle").getlinestyle(),silent:!0,z2:-19}))}}},_preparedatashadowinfo:function(){var t=this.datazoommodel,e=t.get("showdatashadow");if(e!==!1){var n,i=this.ecmodel;return t.eachtargetaxis(function(r,o){var a=t.getaxisproxy(r.name,o).gettargetseriesmodels();f(a,function(t){if(!(n||e!==!0&&u(ad,t.get("type"))<0)){var a,s=i.getcomponent(r.axis,o).axis,l=lg(r.name),h=t.coordinatesystem;null!=l&&h.getotheraxis&&(a=h.getotheraxis(s).inverse),l=t.getdata().mapdimension(l),n={thisaxis:s,series:t,thisdim:r.name,otherdim:l,otheraxisinverse:a}}},this)},this),n}},_renderhandle:function(){var t=this._displayables,e=t.handles=[],n=t.handlelabels=[],i=this._displayables.bargroup,r=this._size,o=this.datazoommodel;i.add(t.filler=new ja({draggable:!0,cursor:ug(this._orient),drift:ja(this._ondragmove,this,"all"),onmousemove:function(t){cy(t.event)},ondragstart:ja(this._showdatainfo,this,!0),ondragend:ja(this._ondragend,this),onmouseover:ja(this._showdatainfo,this,!0),onmouseout:ja(this._showdatainfo,this,!1),style:{fill:o.get("fillercolor"),textposition:"inside"}})),i.add(new ja(ao({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("databackgroundcolor")||o.get("bordercolor"),linewidth:ed,fill:"rgba(0,0,0,0)"}}))),qa([0,1],function(t){var r=wo(o.get("handleicon"),{cursor:ug(this._orient),draggable:!0,drift:ja(this._ondragmove,this,t),onmousemove:function(t){cy(t.event)},ondragend:ja(this._ondragend,this),onmouseover:ja(this._showdatainfo,this,!0),onmouseout:ja(this._showdatainfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=r.getboundingrect();this._handleheight=jo(o.get("handlesize"),this._size[1]),this._handlewidth=a.width/a.height*this._handleheight,r.setstyle(o.getmodel("handlestyle").getitemstyle());var s=o.get("handlecolor");null!=s&&(r.style.fill=s),i.add(e[t]=r);var l=o.textstylemodel;this.group.add(n[t]=new ub({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textverticalalign:"middle",textalign:"center",textfill:l.gettextcolor(),textfont:l.getfont()},z2:10}))},this)},_resetinterval:function(){var t=this._range=this.datazoommodel.getpercentrange(),e=this._getviewextent();this._handleends=[ka(t[0],[0,100],e,!0),ka(t[1],[0,100],e,!0)]},_updateinterval:function(t,e){var n=this.datazoommodel,i=this._handleends,r=this._getviewextent(),o=n.findrepresentativeaxisproxy().getminmaxspan(),a=[0,100];qa(e,i,r,n.get("zoomlock")?"all":t,null!=o.minspan?ka(o.minspan,a,r,!0):null,null!=o.maxspan?ka(o.maxspan,a,r,!0):null);var s=this._range,l=this._range=$a([ka(i[0],r,a,!0),ka(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateview:function(t){var e=this._displayables,n=this._handleends,i=$a(n.slice()),r=this._size;qa([0,1],function(t){var i=e.handles[t],o=this._handleheight;i.attr({scale:[o/2,o/2],position:[n[t],r[1]/2-o/2]})},this),e.filler.setshape({x:i[0],y:0,width:i[1]-i[0],height:r[1]}),this._updatedatainfo(t)},_updatedatainfo:function(t){function e(t){var e=bo(i.handles[t].parent,this.group),n=vo(0===t?"right":"left",e),s=this._handlewidth/2+od,l=no([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setstyle({x:l[0],y:l[1],textverticalalign:o===id?"middle":n,textalign:o===id?n:"center",text:a[t]})}var n=this.datazoommodel,i=this._displayables,r=i.handlelabels,o=this._orient,a=["",""];if(n.get("showdetail")){var s=n.findrepresentativeaxisproxy();if(s){var l=s.getaxismodel().axis,u=this._range,h=t?s.calculatedatawindow({start:u[0],end:u[1]}).valuewindow:s.getdatavaluewindow();a=[this._formatlabel(h[0],l),this._formatlabel(h[1],l)]}}var c=$a(this._handleends.slice());e.call(this,0),e.call(this,1)},_formatlabel:function(t,e){var n=this.datazoommodel,i=n.get("labelformatter"),r=n.get("labelprecision");(null==r||"auto"===r)&&(r=e.getpixelprecision());var o=null==t||isnan(t)?"":"category"===e.type||"time"===e.type?e.scale.getlabel(math.round(t)):t.tofixed(math.min(r,20));return b(i)?i(t,o):w(i)?i.replace("{value}",o):o},_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,n){this._dragging=!0;var i=this._displayables.bargroup.getlocaltransform(),r=no([e,n],i,!0),o=this._updateinterval(t,r[0]),a=this.datazoommodel.get("realtime");this._updateview(!a),o&&a&&this._dispatchzoomaction()},_ondragend:function(){this._dragging=!1,this._showdatainfo(!1);var t=this.datazoommodel.get("realtime");!t&&this._dispatchzoomaction()},_onclickpanelclick:function(t){var e=this._size,n=this._displayables.bargroup.transformcoordtolocal(t.offsetx,t.offsety);if(!(n[0]<0||n[0]>e[0]||n[1]<0||n[1]>e[1])){var i=this._handleends,r=(i[0]+i[1])/2,o=this._updateinterval("all",n[0]-r);this._updateview(),o&&this._dispatchzoomaction()}},_dispatchzoomaction:function(){var t=this._range;this.api.dispatchaction({type:"datazoom",from:this.uid,datazoomid:this.datazoommodel.id,start:t[0],end:t[1]})},_findcoordrect:function(){var t;if(qa(this.gettargetcoordinfo(),function(e){if(!t&&e.length){var n=e[0].model.coordinatesystem;t=n.getrect&&n.getrect()}}),!t){var e=this.api.getwidth(),n=this.api.getheight();t={x:.2*e,y:.2*n,width:.6*e,height:.6*n}}return t}});ya.extend({type:"datazoom.inside",defaultoption:{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}});var ld="\x00_ec_datazoom_roams",ud=y,hd=ua.extend({type:"datazoom.inside",init:function(){this._range},render:function(t,e,n){hd.superapply(this,"render",arguments),this._range=t.getpercentrange(),f(this.gettargetcoordinfo(),function(e,i){var r=p(e,function(t){return dg(t.model)});f(e,function(e){var o=e.model,a={};f(["pan","zoom","scrollmove"],function(t){a[t]=ud(cd[t],this,e,i)},this),hg(n,{coordid:dg(o),allcoordids:r,containspoint:function(t,e,n){return o.coordinatesystem.containpoint([e,n])},datazoomid:t.id,datazoommodel:t,getrange:a})},this)},this)},dispose:function(){cg(this.api,this.datazoommodel.id),hd.superapply(this,"dispose",arguments),this._range=null}}),cd={zoom:function(t,e,n,i){var r=this._range,o=r.slice(),a=t.axismodels[0];if(a){var s=dd[e](null,[i.originx,i.originy],a,n,t),l=(s.signal>0?s.pixelstart+s.pixellength-s.pixel:s.pixel-s.pixelstart)/s.pixellength*(o[1]-o[0])+o[0],u=math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.datazoommodel.findrepresentativeaxisproxy().getminmaxspan();return qa(0,o,[0,100],0,h.minspan,h.maxspan),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:yg(function(t,e,n,i,r,o){var a=dd[i]([o.oldx,o.oldy],[o.newx,o.newy],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixellength}),scrollmove:yg(function(t,e,n,i,r,o){var a=dd[i]([0,0],[o.scrolldelta,o.scrolldelta],e,r,n);return a.signal*(t[1]-t[0])*o.scrolldelta})},dd={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinatesystem.getrect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixellength=s.width,a.pixelstart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixellength=s.height,a.pixelstart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinatesystem,l=s.getradiusaxis().getextent(),u=s.getangleaxis().getextent();return t=t?s.pointtocoord(t):[0,0],e=s.pointtocoord(e),"radiusaxis"===n.maintype?(a.pixel=e[0]-t[0],a.pixellength=l[1]-l[0],a.pixelstart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixellength=u[1]-u[0],a.pixelstart=u[0],a.signal=o.inverse?-1:1),a},singleaxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinatesystem.getrect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixellength=a.width,s.pixelstart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixellength=a.height,s.pixelstart=a.y,s.signal=o.inverse?-1:1),s}};tu({gettargetseries:function(t){var e=n();return t.eachcomponent("datazoom",function(t){t.eachtargetaxis(function(t,n,i){var r=i.getaxisproxy(t.name,n); f(r.gettargetseriesmodels(),function(t){e.set(t.uid,t)})})}),e},modifyoutputend:!0,overallreset:function(t,e){t.eachcomponent("datazoom",function(t){t.eachtargetaxis(function(t,n,i){i.getaxisproxy(t.name,n).reset(i,e)}),t.eachtargetaxis(function(t,n,i){i.getaxisproxy(t.name,n).filterdata(i,e)})}),t.eachcomponent("datazoom",function(t){var e=t.findrepresentativeaxisproxy(),n=e.getdatapercentwindow(),i=e.getdatavaluewindow();t.setrawrange({start:n[0],end:n[1],startvalue:i[0],endvalue:i[1]},!0)})}}),nu("datazoom",function(t,e){var n=qp(y(e.eachcomponent,e,"datazoom"),fa,function(t,e){return t.get(e.axisindex)}),i=[];e.eachcomponent({maintype:"datazoom",query:t},function(t){i.push.apply(i,n(t).nodes)}),f(i,function(e){e.setrawrange({start:t.start,end:t.end,startvalue:t.startvalue,endvalue:t.endvalue})})});var fd=["rect","polygon","keep","clear"],pd=function(t,e){var n=t&&t.brush;if(_(n)||(n=n?[n]:[]),n.length){var i=[];f(n,function(t){var e=t.hasownproperty("toolbox")?t.toolbox:[];e instanceof array&&(i=i.concat(e))});var r=t&&t.toolbox;_(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),xg(s),e&&!s.length&&s.push.apply(s,fd)}},gd=f,vd=m,md=-1,yd=function(t){var e=t.mappingmethod,n=t.type,r=this.option=i(t);this.type=n,this.mappingmethod=e,this._normalizedata=_d[e];var o=xd[n];this.applyvisual=o.applyvisual,this.getcolormapper=o.getcolormapper,this._domap=o._domap[e],"piecewise"===e?(wg(r),_g(r)):"category"===e?r.categories?bg(r):wg(r,!0):(o("linear"!==e||r.dataextent),wg(r))};yd.prototype={constructor:yd,mapvaluetovisual:function(t){var e=this._normalizedata(t);return this._domap(e,t)},getnormalizer:function(){return y(this._normalizedata,this)}};var xd=yd.visualhandlers={color:{applyvisual:tg("color"),getcolormapper:function(){var t=this.option;return y("category"===t.mappingmethod?function(t,e){return!e&&(t=this._normalizedata(t)),ig.call(this,t)}:function(e,n,i){var r=!!i;return!n&&(e=this._normalizedata(e)),i=$e(e,t.parsedvisual,i),r?i:en(i,"rgba")},this)},_domap:{linear:function(t){return en($e(t,this.option.parsedvisual),"rgba")},category:ig,piecewise:function(t,e){var n=dg.call(this,e);return null==n&&(n=en($e(t,this.option.parsedvisual),"rgba")),n},fixed:cg}},colorhue:mg(function(t,e){return qe(t,e)}),colorsaturation:mg(function(t,e){return qe(t,null,e)}),colorlightness:mg(function(t,e){return qe(t,null,null,e)}),coloralpha:mg(function(t,e){return tn(t,e)}),opacity:{applyvisual:tg("opacity"),_domap:ag([0,1])},liftz:{applyvisual:tg("liftz"),_domap:{linear:cg,category:cg,piecewise:cg,fixed:cg}},symbol:{applyvisual:function(t,e,n){var i=this.mapvaluetovisual(t);if(w(i))n("symbol",i);else if(vd(i))for(var r in i)i.hasownproperty(r)&&n(r,i[r])},_domap:{linear:sg,category:ig,piecewise:function(t,e){var n=dg.call(this,e);return null==n&&(n=sg.call(this,t)),n},fixed:cg}},symbolsize:{applyvisual:tg("symbolsize"),_domap:ag([0,1])}},_d={linear:function(t){return $o(t,this.option.dataextent,[0,1],!0)},piecewise:function(t){var e=this.option.piecelist,n=yd.findpieceindex(t,e,!0);return null!=n?$o(n,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categorymap[t]:t;return null==e?md:e},fixed:f};yd.listvisualtypes=function(){var t=[];return f(xd,function(e,n){t.push(n)}),t},yd.addvisualhandler=function(t,e){xd[t]=e},yd.isvalidtype=function(t){return xd.hasownproperty(t)},yd.eachvisual=function(t,e,n){m(t)?f(t,e,n):e.call(n,t)},yd.mapvisual=function(t,e,n){var i,r=_(t)?[]:m(t)?{}:(i=!0,null);return yd.eachvisual(t,function(t,o){var a=e.call(n,t,o);i?r=a:r[o]=a}),r},yd.retrievevisuals=function(t){var e,n={};return t&&gd(xd,function(i,r){t.hasownproperty(r)&&(n[r]=t[r],e=!0)}),e?n:null},yd.preparevisualtypes=function(t){if(vd(t)){var e=[];gd(t,function(t,n){e.push(n)}),t=e}else{if(!_(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexof("color")?1:-1}),t},yd.dependson=function(t,e){return"color"===e?!(!t||0!==t.indexof(e)):t===e},yd.findpieceindex=function(t,e,n){function i(e,n){var i=math.abs(e-t);o>i&&(o=i,r=n)}for(var r,o=1/0,a=0,s=e.length;s>a;a++){var l=e[a].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return a;n&&i(l,a)}}for(var a=0,s=e.length;s>a;a++){var u=e[a],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(pg(c[1],t,h[1]))return a}else if(1/0===h[1]){if(pg(c[0],h[0],t))return a}else if(pg(c[0],h[0],t)&&pg(c[1],t,h[1]))return a;n&&i(h[0],a),n&&i(h[1],a)}}return n?1/0===t?e.length-1:t===-1/0?0:r:void 0};var bd=f,wd={linex:bg(0),liney:bg(1),rect:{point:function(t,e,n){return t&&n.boundingrect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingrect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingrect.contain(t[0],t[1])&&ch(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return ch(i,r,o)||ch(i,r+a,o)||ch(i,r,o+s)||ch(i,r+a,o+s)||xn.create(t).contain(l[0],l[1])||vg(r,o,r+a,o,i)||vg(r,o,r,o+s,i)||vg(r+a,o,r+a,o+s,i)||vg(r,o+s,r+a,o+s,i)?!0:void 0}}},md=f,sd=u,td=x,id=["datatopoint","pointtodata"],cd=["grid","xaxis","yaxis","geo","graph","polar","radiusaxis","angleaxis","bmap"],ad=ug.prototype;ad.setoutputranges=function(t,e){this.matchoutputranges(t,e,function(t,e,n){if((t.coordranges||(t.coordranges=[])).push(e),!t.coordrange){t.coordrange=e;var i=ld[t.brushtype](0,n,e);t.__rangeoffset={offset:od[t.brushtype](i.values,t.range,[1,1]),xyminmax:i.xyminmax}}})},ad.matchoutputranges=function(t,e,n){md(t,function(t){var i=this.findtargetinfo(t,e);i&&i!==!0&&f(i.coordsyses,function(i){var r=ld[t.brushtype](1,i,t.range);n(t,r.values,i,e)})},this)},ad.setinputranges=function(t,e){md(t,function(t){var n=this.findtargetinfo(t,e);if(t.range=t.range||[],n&&n!==!0){t.panelid=n.panelid;var i=ld[t.brushtype](0,n.coordsys,t.coordrange),r=t.__rangeoffset;t.range=r?od[t.brushtype](i.values,r.offset,jg(i.xyminmax,r.xyminmax)):i.values}},this)},ad.makepanelopts=function(t,e){return p(this._targetinfolist,function(n){var i=n.getpanelrect();return{panelid:n.panelid,defaultbrushtype:e&&e(n),clippath:wg(i),istargetbycursor:xg(i,t,n.coordsysmodel),getlinearbrushotherextent:zg(i)}})},ad.controlseries=function(t,e,n){var i=this.findtargetinfo(t,n);return i===!0||i&&sd(i.coordsyses,e.coordinatesystem)>=0},ad.findtargetinfo=function(t,e){for(var n=this._targetinfolist,i=jg(e,t),r=0;r=0||sd(i,t.getaxis("y").model)>=0)&&o.push(t)}),e.push({panelid:"grid--"+t.id,gridmodel:t,coordsysmodel:t,coordsys:o[0],coordsyses:o,getpanelrect:pd.grid,xaxisdeclared:a[t.id],yaxisdeclared:s[t.id]})}))},geo:function(t,e){md(t.geomodels,function(t){var n=t.coordinatesystem;e.push({panelid:"geo--"+t.id,geomodel:t,coordsysmodel:t,coordsys:n,coordsyses:[n],getpanelrect:pd.geo})})}},kd=[function(t,e){var n=t.xaxismodel,i=t.yaxismodel,r=t.gridmodel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridmodel},function(t,e){var n=t.geomodel;return n&&n===e.geomodel}],pd={grid:function(){return this.coordsys.grid.getrect().clone()},geo:function(){var t=this.coordsys,e=t.getboundingrect().clone();return e.applytransform(bo(t)),e}},ld={linex:td(kg,0),liney:td(kg,1),rect:function(t,e,n){var i=e[id[t]]([n[0][0],n[1][0]]),r=e[id[t]]([n[0][1],n[1][1]]),o=[qg([i[0],r[0]]),qg([i[1],r[1]])];return{values:o,xyminmax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]],r=p(n,function(n){var r=e[id[t]](n);return i[0][0]=math.min(i[0][0],r[0]),i[1][0]=math.min(i[1][0],r[1]),i[0][1]=math.max(i[0][1],r[0]),i[1][1]=math.max(i[1][1],r[1]),r});return{values:r,xyminmax:i}}},od={linex:td($g,0),liney:td($g,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return p(t,function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]})}},zd=["inbrush","outofbrush"],rd="__ecbrushselect",ed="__ecinbrushselectevent",bd=jm.visual.brush;ou(bd,function(t,e,n){t.eachcomponent({maintype:"brush"},function(e){n&&"takeglobalcursor"===n.type&&e.setbrushoption("brush"===n.key?n.brushoption:{brushtype:!1});var i=e.brushtargetmanager=new ug(e.option,t);i.setinputranges(e.areas,t)})}),au(bd,function(t,e,n){var r,o,a=[];t.eachcomponent({maintype:"brush"},function(e,n){function l(t){return"all"===v||m[t]}function u(t){return!!t.length}function h(t,e){var n=t.coordinatesystem;b|=n.hasaxisbrushed(),l(e)&&n.eachactivestate(t.getdata(),function(t,e){"active"===t&&(y[e]=1)})}function c(n,i,r){var o=iv(n);if(o&&!rv(e,i)&&(f(w,function(i){o[i.brushtype]&&e.brushtargetmanager.controlseries(i,n,t)&&r.push(i),b|=u(r)}),l(i)&&u(r))){var a=n.getdata();a.each(function(t){nv(o,r,a,t)&&(y[t]=1)})}}var d={brushid:e.id,brushindex:n,brushname:e.name,areas:i(e.areas),selected:[]};a.push(d);var g=e.option,v=g.brushlink,m=[],y=[],x=[],b=0;n||(r=g.throttletype,o=g.throttledelay);var w=p(e.areas,function(t){return ov(s({boundingrect:nd[t.brushtype](t)},t))}),m=og(e.option,zd,function(t){t.mappingmethod="fixed"});_(v)&&f(v,function(t){m[t]=1}),t.eachseries(function(t,e){var n=x[e]=[];"parallel"===t.subtype?h(t,e,n):c(t,e,n)}),t.eachseries(function(t,e){var n={seriesid:t.id,seriesindex:e,seriesname:t.name,dataindex:[]};d.selected.push(n);var i=iv(t),r=x[e],o=t.getdata(),a=l(e)?function(t){return y[t]?(n.dataindex.push(o.getrawindex(t)),"inbrush"):"outofbrush"}:function(t){return nv(i,r,o,t)?(n.dataindex.push(o.getrawindex(t)),"inbrush"):"outofbrush"};(l(e)?b:u(r))&&rg(zd,m,o,a)})}),tv(e,r,o,a,n)});var nd={linex:f,liney:f,rect:function(t){return av(t.range)},polygon:function(t){for(var e,n=t.range,i=0,r=n.length;r>i;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=n[i];o[0]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&av(e)}},vd=["#ddd"],fd=(uu({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 n=this.option;!e&&zg(n,t,["inbrush","outofbrush"]);var i=n.inbrush=n.inbrush||{};n.outofbrush=n.outofbrush||{color:vd},i.hasownproperty("liftz")||(i.liftz=5)},setareas:function(t){t&&(this.areas=p(t,function(t){return sv(this.option,t)},this))},setbrushoption:function(t){this.brushoption=sv(this.option,t),this.brushtype=this.brushoption.brushtype}}),x),hd=f,gd=p,wd=math.min,zd=math.max,xd=math.pow,yd=1e4,ud=6,qd=6,jd="globalpan",kd={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},$d={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},jd={brushstyle:{linewidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushmode:"single",removeonclick:!1},qd=0;lv.prototype={constructor:lv,enablebrush:function(t){return this._brushtype&&hv(this),t.brushtype&&uv(this,t),this},setpanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelid]=i(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){hd(this._covers,t,e)},updatecovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushtype}function n(t,n){return e(t.__brushoption,n)}function o(e,n){var i=t[e];if(null!=n&&l[n]===c)u[e]=l[n];else{var r=u[e]=null!=n?(l[n].__brushoption=i,l[n]):dv(h,cv(h,i));gv(h,r)}}function a(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return r(i(jd),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingcover;return new mu(l,t,n,e).add(o).update(o).remove(a).execute(),this},unmount:function(){return this.enablebrush(!1),xv(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(lv,ly);var tk={mousedown:function(t){if(this._dragging)hv.call(this,t);else if(!t.target||!t.target.draggable){bv(t);var e=this.group.transformcoordtolocal(t.offsetx,t.offsety);this._creatingcover=null;var n=this._creatingpanel=mv(this,t,e);n&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformcoordtolocal(t.offsetx,t.offsety);if(ev(this,t,e),this._dragging){bv(t);var n=vv(this,t,e,!1);n&&_v(this,n)}},mouseup:hv},ek={linex:gv(0),liney:gv(1),rect:{createcover:function(t,e){return mv(fd(pv,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getcreatingrange:function(t){var e=wv(t);return av(e[1][0],e[1][1],e[0][0],e[0][1])},updatecovershape:function(t,e,n,i){sv(t,e,n,i)},updatecommon:tv,contain:nv},polygon:{createcover:function(t,e){var n=new ky;return n.add(new yb({name:"main",style:cv(e),silent:!0})),n},getcreatingrange:function(t){return t},endcreating:function(t,e){e.remove(e.childat(0)),e.add(new mb({name:"main",draggable:!0,drift:fd(lv,t,e),ondragend:fd(_v,t,{isend:!0})}))},updatecovershape:function(t,e,n){e.childat(0).setshape({points:zv(t,e,n)})},updatecommon:tv,contain:nv}};hu({type:"brush",init:function(t,e){this.ecmodel=t,this.api=e,this.model,(this._brushcontroller=new lv(e.getzr())).on("brush",y(this._onbrush,this)).mount()},render:function(t){return this.model=t,wv.apply(this,arguments)},updatetransform:wv,updateview:wv,dispose:function(){this._brushcontroller.dispose()},_onbrush:function(t,e){var n=this.model.id;this.model.brushtargetmanager.setoutputranges(t,this.ecmodel),(!e.isend||e.removeonclick)&&this.api.dispatchaction({type:"brush",brushid:n,areas:i(t),$from:n})}}),nu({type:"brush",event:"brush"},function(t,e){e.eachcomponent({maintype:"brush",query:t},function(e){e.setareas(t.areas)})}),nu({type:"brushselect",event:"brushselected",update:"none"},function(){});var nk={},ik=hm.toolbox.brush;yv.defaultoption={show:!0,type:["rect","polygon","linex","liney","keep","clear"],icon:{rect:"m7.3,34.7 m0.4,10v-0.2h9.8 m89.6,10v-0.2h-9.8 m0.4,60v10.2h9.8 m89.6,60v10.2h-9.8 m12.3,22.4v10.5h13.1 m33.6,10.5h7.8 m49.1,10.5h7.8 m77.5,22.4v10.5h-13 m12.3,31.1v8.2 m77.7,31.1v8.2 m12.3,47.6v11.9h13.1 m33.6,59.5h7.6 m49.1,59.5 h7.7 m77.5,47.6v11.9h-13",polygon:"m55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1s53.5,34.9,55.2,34.9z m50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 c47.3,52.4,48.7,51,50.4,51z m55.6,37.1l1.5-7.8 m60.1,13.5l1.6-8.7l-7.8,4 m59,19l-1,5.3 m24,16.1l6.4,4.9l6.4-3.3 m48.5,11.6 l-5.9,3.1 m19.1,12.8l9.7,5.1l1.1,7.7 m13.4,29.8l1,7.3l6.6,1.6 m11.6,18.4l1,6.1 m32.8,41.9 m26.6,40.4 m27.3,40.2l6.1,1.6 m49.9,52.1l-5.6-7.6l-4.9-1.2",linex:"m15.2,30 m19.7,15.6v1.9h29 m34.8,1.9h40.4 m55.3,15.6v1.9h45.9 m19.7,44.4v58.1h29 m34.8,58.1h40.4 m55.3,44.4 v58.1h45.9 m12.5,20.3l-9.4,9.6l9.6,9.8 m3.1,29.9h16.5 m62.5,20.3l9.4,9.6l62.3,39.7 m71.9,29.9h55.4",liney:"m38.8,7.7 m52.7,12h13.2v9 m65.9,26.6v32 m52.7,46.3h13.2v-9 m24.9,12h11.8v9 m11.8,26.6v32 m24.9,46.3h11.8v-9 m48.2,5.1l-9.3-9l-9.4,9.2 m38.9-3.9v12 m48.2,53.3l-9.3,9l-9.4-9.2 m38.9,62.3v46.4",keep:"m4,10.5v1h10.3 m20.7,1h6.1 m33,1h6.1 m55.4,10.5v1h45.2 m4,17.3v6.6 m55.6,17.3v6.6 m4,30.5v40h10.3 m20.7,40 h6.1 m33,40h6.1 m55.4,30.5v40h45.2 m21,18.9h62.9v48.6h21v18.9z",clear:"m22,14.7l30.9,31 m52.9,14.7l22,45.7 m4.7,16.8v4.2h13.1 m26,4.2h7.8 m41.6,4.2h7.8 m70.3,16.8v4.2h57.2 m4.7,25.9v8.6 m70.3,25.9v8.6 m4.7,43.2v12.6h13.1 m26,55.8h7.8 m41.6,55.8h7.8 m70.3,43.2v12.6h57.2"},title:i(ik.title)};var rk=yv.prototype;rk.render=rk.updateview=function(t,e){var n,i,r;e.eachcomponent({maintype:"brush"},function(t){n=t.brushtype,i=t.brushoption.brushmode||"single",r|=t.areas.length}),this._brushtype=n,this._brushmode=i,f(t.get("type",!0),function(e){t.seticonstatus(e,("keep"===e?"multiple"===i:"clear"===e?r:e===n)?"emphasis":"normal")})},rk.geticons=function(){var t=this.model,e=t.get("icon",!0),n={};return f(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},rk.onclick=function(t,e,n){var i=this._brushtype,r=this._brushmode;"clear"===n?(e.dispatchaction({type:"axisareaselect",intervals:[]}),e.dispatchaction({type:"brush",command:"clear",areas:[]})):e.dispatchaction({type:"takeglobalcursor",key:"brush",brushoption:{brushtype:"keep"===n?i:i===n?!1:n,brushmode:"keep"===n?"multiple"===r?"single":"multiple":r}})},zv("brush",yv),ql(pd);var ok=f,ak=function(t){var e=t&&t.visualmap;_(e)||(e=e?[e]:[]),ok(e,function(t){if(t){uv(t,"splitlist")&&!uv(t,"pieces")&&(t.pieces=t.splitlist,delete t.splitlist);var e=t.pieces;e&&_(e)&&ok(e,function(t){m(t)&&(uv(t,"start")&&!uv(t,"min")&&(t.min=t.start),uv(t,"end")&&!uv(t,"max")&&(t.max=t.end))})}})};cw.registersubtypedefaulter("visualmap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitnumber>0)&&!t.calculable?"piecewise":"continuous"});var sk=jm.visual.component;au(sk,{createonallseries:!0,reset:function(t,e){var n=[];return e.eachcomponent("visualmap",function(e){var i=t.pipelinecontext;!e.istargetseries(t)||i&&i.large||n.push(eg(e.statelist,e.targetvisuals,y(e.getvaluestate,e),e.getdatadimension(t.getdata())))}),n}}),au(sk,{createonallseries:!0,reset:function(t,e){var n=t.getdata(),i=[];e.eachcomponent("visualmap",function(e){if(e.istargetseries(t)){var r=e.getvisualmeta(y(qv,null,t,e))||{stops:[],outercolors:[]},o=e.getdatadimension(n),a=n.getdimensioninfo(o);null!=a&&(r.dimension=a.index,i.push(r))}}),t.getdata().setvisual("visualmeta",i)}});var lk={get:function(t,e,n){var r=i((uk[t]||{})[e]);return n&&_(r)?r[r.length-1]:r}},uk={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]}},hk=yd.mapvisual,ck=yd.eachvisual,dk=_,fk=f,pk=ta,gk=$o,vk=f,mk=uu({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,n){this._dataextent,this.targetvisuals={},this.controllervisuals={},this.textstylemodel,this.itemsize,this.mergedefaultandtheme(t,n)},optionupdated:function(t,e){var n=this.option;fm.canvassupported||(n.realtime=!1),!e&&zg(n,t,this.replacableoptionkeys),this.textstylemodel=this.getmodel("textstyle"),this.resetitemsize(),this.completevisualoption()},resetvisual:function(t){var e=this.statelist;t=y(t,this),this.controllervisuals=og(this.option.controller,e,t),this.targetvisuals=og(this.option.target,e,t)},gettargetseriesindices:function(){var t=this.option.seriesindex,e=[];return null==t||"all"===t?this.ecmodel.eachseries(function(t,n){e.push(n)}):e=bi(t),e},eachtargetseries:function(t,e){f(this.gettargetseriesindices(),function(n){t.call(e,this.ecmodel.getseriesbyindex(n))},this)},istargetseries:function(t){var e=!1;return this.eachtargetseries(function(n){n===t&&(e=!0)}),e},formatvaluetext:function(t,e,n){function i(t){return t===l[0]?"min":t===l[1]?"max":(+t).tofixed(math.min(s,20))}var r,o,a=this.option,s=a.precision,l=this.databound,u=a.formatter;return n=n||["<",">"],_(t)&&(t=t.slice(),r=!0),o=e?t:r?[i(t[0]),i(t[1])]:i(t),w(u)?u.replace("{value}",r?o[0]:o).replace("{value2}",r?o[1]:o):b(u)?r?u(t[0],t[1]):u(t):r?t[0]===l[0]?n[0]+" "+o[1]:t[1]===l[1]?n[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetextent:function(){var t=this.option,e=pk([t.min,t.max]);this._dataextent=e},getdatadimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getdimension(e);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var o=i[r],a=t.getdimensioninfo(o);if(!a.iscalculationcoord)return o}}},getextent:function(){return this._dataextent.slice()},completevisualoption:function(){function t(t){dk(a.color)&&!t.inrange&&(t.inrange={color:a.color.slice().reverse()}),t.inrange=t.inrange||{color:o.get("gradientcolor")},fk(this.statelist,function(e){var n=t[e];if(w(n)){var i=lk.get(n,"active",h);i?(t[e]={},t[e][n]=i):delete t[e]}},this)}function e(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},fk(i,function(t,e){if(yd.isvalidtype(e)){var n=lk.get(e,"inactive",h);null!=n&&(r[e]=n,"color"!==e||r.hasownproperty("opacity")||r.hasownproperty("coloralpha")||(r.opacity=[0,0]))}}))}function n(t){var e=(t.inrange||{}).symbol||(t.outofrange||{}).symbol,n=(t.inrange||{}).symbolsize||(t.outofrange||{}).symbolsize,r=this.get("inactivecolor");fk(this.statelist,function(o){var a=this.itemsize,s=t[o];s||(s=t[o]={color:h?r:[r]}),null==s.symbol&&(s.symbol=e&&i(e)||(h?"roundrect":["roundrect"])),null==s.symbolsize&&(s.symbolsize=n&&i(n)||(h?a[0]:[a[0],a[0]])),s.symbol=hk(s.symbol,function(t){return"none"===t||"square"===t?"roundrect":t});var l=s.symbolsize;if(null!=l){var u=-1/0;ck(l,function(t){t>u&&(u=t)}),s.symbolsize=hk(l,function(t){return gk(t,[0,u],[0,a[0]],!0)})}},this)}var o=this.ecmodel,a=this.option,s={inrange:a.inrange,outofrange:a.outofrange},l=a.target||(a.target={}),u=a.controller||(a.controller={});r(l,s),r(u,s);var h=this.iscategory();t.call(this,l),t.call(this,u),e.call(this,l,"inrange","outofrange"),n.call(this,u)},resetitemsize:function(){this.itemsize=[parsefloat(this.get("itemwidth")),parsefloat(this.get("itemheight"))]},iscategory:function(){return!!this.option.categories},setselected:vk,getvaluestate:vk,getvisualmeta:vk}),yk=[20,140],xk=mk.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(){xk.superapply(this,"optionupdated",arguments),this.resetextent(),this.resetvisual(function(t){t.mappingmethod="linear",t.dataextent=this.getextent()}),this._resetrange()},resetitemsize:function(){xk.superapply(this,"resetitemsize",arguments);var t=this.itemsize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isnan(t[0]))&&(t[0]=yk[0]),(null==t[1]||isnan(t[1]))&&(t[1]=yk[1])},_resetrange:function(){var t=this.getextent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):_(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(){mk.prototype.completevisualoption.apply(this,arguments),f(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=ta((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(n){var i=[],r=n.getdata();r.each(this.getdatadimension(r),function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)},this),e.push({seriesid:n.id,dataindex:i})},this),e},getvisualmeta:function(t){function e(e,n){r.push({value:e,color:t(e,n)})}for(var n=jv(this,"outofrange",this.getextent()),i=jv(this,"inrange",this.option.range.slice()),r=[],o=0,a=0,s=i.length,l=n.length;l>a&&(!i.length||n[a]<=i[0]);a++)n[a]o;o++,u=0)u&&r.length&&e(i[o],"outofrange"),e(i[o],"inrange");for(var u=1;l>a;a++)(!i.length||i[i.length-1]o;o++){var a=t[0]+r*o;if(a>t[1])break;i.push({color:this.getcontrollervisual(a,"color",e),offset:o/n})}return i.push({color:this.getcontrollervisual(t[1],"color",e),offset:1}),i},_createbarpoints:function(t,e){var n=this.visualmapmodel.itemsize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createbargroup:function(t){var e=this._orient,n=this.visualmapmodel.get("inverse");return new ky("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-math.pi/2}:"vertical"!==e||n?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:math.pi/2})},_updatehandle:function(t,e){if(this._usehandle){var n=this._shapes,i=this.visualmapmodel,r=n.handlethumbs,o=n.handlelabels;wk([0,1],function(a){var s=r[a];s.setstyle("fill",e.handlescolor[a]),s.position[1]=t[a];var l=no(n.handlelabelpoints[a],bo(s,this.group));o[a].setstyle({x:l[0],y:l[1],text:i.formatvaluetext(this._datainterval[a]),textverticalalign:"middle",textalign:this._applytransform("horizontal"===this._orient?0===a?"bottom":"top":"left",n.bargroup)})},this)}},_showindicator:function(t,e,n,i){var r=this.visualmapmodel,o=r.getextent(),a=r.itemsize,s=[0,a[1]],l=bk(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setshape("points",tm(!!n,i,l,a[1]));var c={convertopacitytoalpha:!0},d=this.getcontrollervisual(t,"color",c); h.setstyle("fill",d);var f=no(u.indicatorlabelpoint,bo(h,this.group)),p=u.indicatorlabel;p.attr("invisible",!1);var g=this._applytransform("left",u.bargroup),v=this._orient;p.setstyle({text:(n?n:"")+r.formatvaluetext(e),textverticalalign:"horizontal"===v?g:"middle",textalign:"horizontal"===v?"center":g,x:f[0],y:f[1]})}},_enablehoverlinktoseries:function(){var t=this;this._shapes.bargroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var n=t.visualmapmodel.itemsize,i=t._applytransform([e.offsetx,e.offsety],t._shapes.bargroup,!0,!0);i[1]=mk(sk(0,i[1]),n[1]),t._dohoverlinktoseries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearhoverlinktoseries()})},_enablehoverlinkfromseries:function(){var t=this.api.getzr();this.visualmapmodel.option.hoverlink?(t.on("mouseover",this._hoverlinkfromseriesmouseover,this),t.on("mouseout",this._hideindicator,this)):this._clearhoverlinkfromseries()},_dohoverlinktoseries:function(t,e){var n=this.visualmapmodel,i=n.itemsize;if(n.option.hoverlink){var r=[0,i[1]],o=n.getextent();t=mk(sk(r[0],t),r[1]);var a=em(n,o,r),s=[t-a,t+a],l=bk(t,r,o,!0),u=[bk(s[0],r,o,!0),bk(s[1],r,o,!0)];s[0]r[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showindicator(l,u[1],"< ",a):1/0===u[1]?this._showindicator(l,u[0],"> ",a):this._showindicator(l,l,"≈ ",a));var h=this._hoverlinkdataindices,c=[];(e||nm(n))&&(c=this._hoverlinkdataindices=n.findtargetdataindices(u));var d=xi(h,c);this._dispatchhighdown("downplay",$v(d[0])),this._dispatchhighdown("highlight",$v(d[1]))}},_hoverlinkfromseriesmouseover:function(t){var e=t.target,n=this.visualmapmodel;if(e&&null!=e.dataindex){var i=this.ecmodel.getseriesbyindex(e.seriesindex);if(n.istargetseries(i)){var r=i.getdata(e.datatype),o=r.get(n.getdatadimension(r),e.dataindex,!0);isnan(o)||this._showindicator(o,o)}}},_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",$v(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,n,i){var r=bo(e,i?null:this.group);return fb[_(t)?"applytransform":"transformdirection"](t,r,n)},_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()}}),ak={type:"selectdatarange",event:"datarangeselected",update:"update"};nu(ak,function(t,e){e.eachcomponent({maintype:"visualmap",query:t},function(e){e.setselected(t.selected)})}),ql(ak);{var dk=mk.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){dk.superapply(this,"optionupdated",arguments),this._piecelist=[],this.resetextent();var n=this._mode=this._determinemode();kk[this._mode].call(this),this._resetselected(t,e);var r=this.option.categories;this.resetvisual(function(t,e){"categories"===n?(t.mappingmethod="category",t.categories=i(r)):(t.dataextent=this.getextent(),t.mappingmethod="piecewise",t.piecelist=p(this._piecelist,function(t){var t=i(t);return"inrange"!==e&&(t.visual=null),t}))})},completevisualoption:function(){function t(t,e,n){return t&&t[e]&&(m(t[e])?t[e].hasownproperty(n):t[e]===n)}var e=this.option,n={},i=yd.listvisualtypes(),r=this.iscategory();f(e.pieces,function(t){f(i,function(e){t.hasownproperty(e)&&(n[e]=1)})}),f(n,function(n,i){var o=0;f(this.statelist,function(n){o|=t(e,n,i)||t(e.target,n,i)},this),!o&&f(this.statelist,function(t){(e[t]||(e[t]={}))[i]=lk.get(i,"inrange"===t?"active":"inactive",r)})},this),mk.prototype.completevisualoption.apply(this,arguments)},_resetselected:function(t,e){var n=this.option,i=this._piecelist,r=(e?n:t).selected||{};if(n.selected=r,f(i,function(t){var e=this.getselectedmapkey(t);r.hasownproperty(e)||(r[e]=!0)},this),"single"===n.selectedmode){var o=!1;f(i,function(t){var e=this.getselectedmapkey(t);r[e]&&(o?r[e]=!1:o=!0)},this)}},getselectedmapkey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getpiecelist:function(){return this._piecelist},_determinemode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitnumber"},setselected:function(t){this.option.selected=i(t)},getvaluestate:function(t){var e=yd.findpieceindex(t,this._piecelist);return null!=e&&this.option.selected[this.getselectedmapkey(this._piecelist[e])]?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(n){var i=[],r=n.getdata();r.each(this.getdatadimension(r),function(e,n){var r=yd.findpieceindex(e,this._piecelist);r===t&&i.push(n)},this),e.push({seriesid:n.id,dataindex:i})},this),e},getrepresentvalue:function(t){var e;if(this.iscategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&1/0===n[1]?0:(n[0]+n[1])/2}return e},getvisualmeta:function(t){function e(e,o){var a=r.getrepresentvalue({interval:e});o||(o=r.getvaluestate(a));var s=t(a,o);e[0]===-1/0?i[0]=s:1/0===e[1]?i[1]=s:n.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.iscategory()){var n=[],i=[],r=this,o=this._piecelist.slice();if(o.length){var a=o[0].interval[0];a!==-1/0&&o.unshift({interval:[-1/0,a]}),a=o[o.length-1].interval[1],1/0!==a&&o.push({interval:[a,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,function(t){var n=t.interval;n&&(n[0]>s&&e([s,n[0]],"outofrange"),e(n.slice()),s=n[1])},this),{stops:n,outercolors:i}}}}),kk={splitnumber:function(){var t=this.option,e=this._piecelist,n=math.min(t.precision,20),i=this.getextent(),r=t.splitnumber;r=math.max(parseint(r,10),1),t.splitnumber=r;for(var o=(i[1]-i[0])/r;+o.tofixed(n)!==o&&5>n;)n++;t.precision=n,o=+o.tofixed(n);var a=0;t.minopen&&e.push({index:a++,interval:[-1/0,i[0]],close:[0,0]});for(var s=i[0],l=a+r;l>a;s+=o){var u=a===r-1?i[1]:s+o;e.push({index:a++,interval:[s,u],close:[1,1]})}t.maxopen&&e.push({index:a++,interval:[i[1],1/0],close:[0,0]}),da(e),f(e,function(t){t.text=this.formatvaluetext(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._piecelist.push({text:this.formatvaluetext(t,!0),value:t})},this),rm(t,this._piecelist)},pieces:function(){var t=this.option,e=this._piecelist;f(t.pieces,function(t,n){m(t)||(t={value:t});var i={text:"",index:n};if(null!=t.label&&(i.text=t.label),t.hasownproperty("value")){var r=i.value=t.value;i.interval=[r,r],i.close=[1,1]}else{for(var o=i.interval=[],a=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==o[h];d++)o[h]=t[c[d]],a[h]=s[d],u[h]=2===d;null==o[h]&&(o[h]=l[h])}u[0]&&1/0===o[1]&&(a[0]=0),u[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(i.value=o[0])}i.visual=yd.retrievevisuals(t),e.push(i)},this),rm(t,e),da(e),f(e,function(t){var e=t.close,n=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatvaluetext(null!=t.value?t.value:t.interval,!1,n)},this)}};_k.extend({type:"visualmap.piecewise",dorender:function(){function t(t){var r=t.piece,u=new ky;u.onclick=y(this._onitemclick,this,r),this._enablehoverlink(u,t.indexinmodelpiecelist);var h=n.getrepresentvalue(r);if(this._createitemsymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualmapmodel.getvaluestate(h);u.add(new ub({style:{x:"right"===s?-i:l[0]+i,y:l[1]/2,text:r.text,textverticalalign:"middle",textalign:s,textfont:o,textfill:a,opacity:"outofrange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeall();var n=this.visualmapmodel,i=n.get("textgap"),r=n.textstylemodel,o=r.getfont(),a=r.gettextcolor(),s=this._getitemalign(),l=n.itemsize,u=this._getviewdata(),h=u.endstext,c=a(n.get("showlabel",!0),!h);h&&this._renderendstext(e,h[0],l,c,s),f(u.viewpiecelist,t,this),h&&this._renderendstext(e,h[1],l,c,s),lw(n.get("orient"),e,n.get("itemgap")),this.renderbackground(e),this.positiongroup(e)},_enablehoverlink:function(t,e){function n(t){var n=this.visualmapmodel;n.option.hoverlink&&this.api.dispatchaction({type:t,batch:$v(n.findtargetdataindices(e))})}t.on("mouseover",y(n,this,"highlight")).on("mouseout",y(n,this,"downplay"))},_getitemalign:function(){var t=this.visualmapmodel,e=t.option;if("vertical"===e.orient)return kv(t,this.api,t.itemsize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderendstext:function(t,e,n,i,r){if(e){var o=new ky,a=this.visualmapmodel.textstylemodel;o.add(new ub({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,textverticalalign:"middle",textalign:i?r:"center",text:e,textfont:a.getfont(),textfill:a.gettextcolor()}})),t.add(o)}},_getviewdata:function(){var t=this.visualmapmodel,e=p(t.getpiecelist(),function(t,e){return{piece:t,indexinmodelpiecelist:e}}),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewpiecelist:e,endstext:n}},_createitemsymbol:function(t,e,n){t.add(wh(this.getcontrollervisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getcontrollervisual(e,"color")))},_onitemclick:function(t){var e=this.visualmapmodel,n=e.option,r=i(n.selected),o=e.getselectedmapkey(t);"single"===n.selectedmode?(r[o]=!0,f(r,function(t,e){r[e]=e===o})):r[o]=!r[o],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:r})}})}ql(ak);var pk=uu({type:"toolbox",layoutmode:{type:"box",ignoresize:!0},optionupdated:function(){pk.superapply(this,"optionupdated",arguments),f(this.option.feature,function(t,e){var n=xv(e);n&&r(t,n.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"}}}});hu({type:"toolbox",render:function(t,e,n,i){function r(r,a){var s,c=h[r],d=h[a],f=l[c],p=new zo(f,t,t.ecmodel);if(c&&!d){if(om(c))s={model:p,onclick:p.option.onclick,featurename:c};else{var g=xv(c);if(!g)return;s=new g(p,e,n)}u[c]=s}else{if(s=u[d],!s)return;s.model=p,s.ecmodel=e,s.api=n}return!c&&d?void(s.dispose&&s.dispose(e,n)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,n)):(o(p,s,c),p.seticonstatus=function(t,e){var n=this.option,i=this.iconpaths;n.iconstatus=n.iconstatus||{},n.iconstatus[t]=e,i[t]&&i[t].trigger(e)},void(s.render&&s.render(p,e,n,i)))}function o(i,r,o){var l=i.getmodel("iconstyle"),u=i.getmodel("emphasis.iconstyle"),h=r.geticons?r.geticons():i.get("icon"),c=i.get("title")||{};if("string"==typeof h){var d=h,p=c;h={},c={},h[o]=d,c[o]=p}var g=i.iconpaths={};f(h,function(o,h){var d=wo(o,{},{x:-s/2,y:-s/2,width:s,height:s});d.setstyle(l.getitemstyle()),d.hoverstyle=u.getitemstyle(),wo(d),t.get("showtitle")&&(d.__title=c[h],d.on("mouseover",function(){var t=u.getitemstyle();d.setstyle({text:c[h],textposition:t.textposition||"bottom",textfill:t.fill||t.stroke||"#000",textalign:t.textalign||"center"})}).on("mouseout",function(){d.setstyle({textfill:null})})),d.trigger(i.get("iconstatus."+h)||"normal"),a.add(d),d.on("click",y(r.onclick,r,e,n,h)),g[h]=d})}var a=this.group;if(a.removeall(),t.get("show")){var s=+t.get("itemsize"),l=t.get("feature")||{},u=this._features||(this._features={}),h=[];f(l,function(t,e){h.push(e)}),new mu(this._featurenames||[],h).add(r).update(r).remove(x(r,null)).execute(),this._featurenames=h,hp(a,t,n),a.add(cp(a.getboundingrect(),t)),a.eachchild(function(t){var e=t.__title,i=t.hoverstyle;if(i&&e){var r=nn(e,qn(i)),o=t.position[0]+a.position[0],l=t.position[1]+a.position[1]+s,u=!1;l+r.height>n.getheight()&&(i.textposition="top",u=!0);var h=u?-5-r.height:s+8;o+r.width/2>n.getwidth()?(i.textposition=["100%",h],i.textalign="right"):o-r.width/2<0&&(i.textposition=[0,h],i.textalign="left")}})}},updateview:function(t,e,n,i){f(this._features,function(t){t.updateview&&t.updateview(t.model,e,n,i)})},remove:function(t,e){f(this._features,function(n){n.remove&&n.remove(t,e)}),this.group.removeall()},dispose:function(t,e){f(this._features,function(n){n.dispose&&n.dispose(t,e)})}});var lk=hm.toolbox.saveasimage;am.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:lk.title,type:"png",name:"",excludecomponents:["toolbox"],pixelratio:1,lang:lk.lang.slice()},am.prototype.unusable=!fm.canvassupported;var ok=am.prototype;ok.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r=document.createelement("a"),o=n.get("type",!0)||"png";r.download=i+"."+o,r.target="_blank";var a=e.getconnecteddataurl({type:o,backgroundcolor:n.get("backgroundcolor",!0)||t.get("backgroundcolor")||"#fff",excludecomponents:n.get("excludecomponents"),pixelratio:n.get("pixelratio")});if(r.href=a,"function"!=typeof mouseevent||fm.browser.ie||fm.browser.edge)if(window.navigator.mssaveoropenblob){for(var s=atob(a.split(",")[1]),l=s.length,u=new uint8array(l);l--;)u[l]=s.charcodeat(l);var h=new blob([u]);window.navigator.mssaveoropenblob(h,i+"."+o)}else{var c=n.get("lang"),d='',f=window.open();f.document.write(d)}else{var p=new mouseevent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchevent(p)}},zv("saveasimage",am);var zk=hm.toolbox.magictype;sm.defaultoption={show:!0,type:[],icon:{line:"m4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9m4.1,58h51.4",bar:"m6.7,22.9h10v48h-10v22.9zm24.9,13h10v35h-10v13zm43.2,2h10v46h-10v2zm3.1,58h53.7",stack:"m8.2,38.4l-8.4,4.1l30.6,15.3l60,42.5l-8.1-4.1l-21.5,11l8.2,38.4z m51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9l8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2l51.9,30z m51.9,21.7l-8.1,4.2l35.7,30l-5.3,2.8l24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2l8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1l51.9,21.7zm30.4,2.2l-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1l30.4,2.2z",tiled:"m2.3,2.2h22.8v25h2.3v2.2z m35,2.2h22.8v25h35v2.2zm2.3,35h22.8v22.8h2.3v35z m35,35h22.8v22.8h35v35z"},title:i(zk.title),option:{},seriesindex:{}};var rk=sm.prototype;rk.geticons=function(){var t=this.model,e=t.get("icon"),n={};return f(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var ek={line:function(t,e,n,i){return"bar"===t?r({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markpoint:n.get("markpoint"),markline:n.get("markline")},i.get("option.line")||{},!0):void 0},bar:function(t,e,n,i){return"line"===t?r({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markpoint:n.get("markpoint"),markline:n.get("markline")},i.get("option.bar")||{},!0):void 0},stack:function(t,e,n,i){return"line"===t||"bar"===t?r({id:e,stack:"__ec_magictype_stack__"},i.get("option.stack")||{},!0):void 0},tiled:function(t,e,n,i){return"line"===t||"bar"===t?r({id:e,stack:""},i.get("option.tiled")||{},!0):void 0}},bk=[["line","bar"],["stack","tiled"]];rk.onclick=function(t,e,n){var i=this.model,r=i.get("seriesindex."+n);if(ek[n]){var o={series:[]},a=function(e){var r=e.subtype,a=e.id,l=ek[n](r,a,e,i);l&&(s(l,e.option),o.series.push(l));var u=e.coordinatesystem;if(u&&"cartesian2d"===u.type&&("line"===n||"bar"===n)){var h=u.getaxesbyscale("ordinal")[0];if(h){var c=h.dim,d=c+"axis",f=t.querycomponents({maintype:d,index:e.get(name+"index"),id:e.get(name+"id")})[0],p=f.componentindex;o[d]=o[d]||[];for(var g=0;p>=g;g++)o[d][p]=o[d][p]||{};o[d][p].boundarygap="bar"===n}}};f(bk,function(t){u(t,n)>=0&&f(t,function(t){i.seticonstatus(t,"normal")})}),i.seticonstatus(n,"emphasis"),t.eachcomponent({maintype:"series",query:null==r?null:{seriesindex:r}},a),e.dispatchaction({type:"changemagictype",currenttype:n,newoption:o})}},nu({type:"changemagictype",event:"magictypechanged",update:"prepareandupdate"},function(t,e){e.mergeoption(t.newoption)}),zv("magictype",sm);var nk=hm.toolbox.dataview,vk=new array(60).join("-"),fk=" ",hk=new regexp("["+fk+"]+","g");mm.defaultoption={show:!0,readonly:!1,optiontocontent:null,contenttooption:null,icon:"m17.5,17.3h33 m17.5,17.3h33 m45.4,29.5h-28 m11.5,2v56h51v14.8l38.4,2h11.5z m38.4,2.2v12.7h51 m45.4,41.7h-28",title:i(nk.title),lang:i(nk.lang),backgroundcolor:"#fff",textcolor:"#000",textareacolor:"#fff",textareabordercolor:"#333",buttoncolor:"#c23531",buttontextcolor:"#fff"},mm.prototype.onclick=function(t,e){function n(){i.removechild(o),x._dom=null}var i=e.getdom(),r=this.model;this._dom&&i.removechild(this._dom);var o=document.createelement("div");o.style.csstext="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundcolor=r.get("backgroundcolor")||"#fff";var a=document.createelement("h4"),s=r.get("lang")||[];a.innerhtml=s[0]||r.get("title"),a.style.csstext="margin: 10px 20px;",a.style.color=r.get("textcolor");var l=document.createelement("div"),u=document.createelement("textarea");l.style.csstext="display:block;width:100%;overflow:auto;";var h=r.get("optiontocontent"),c=r.get("contenttooption"),d=cm(t);if("function"==typeof h){var f=h(e.getoption());"string"==typeof f?l.innerhtml=f:i(f)&&l.appendchild(f)}else l.appendchild(u),u.readonly=r.get("readonly"),u.style.csstext="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=r.get("textcolor"),u.style.bordercolor=r.get("textareabordercolor"),u.style.backgroundcolor=r.get("textareacolor"),u.value=d.value;var p=d.meta,g=document.createelement("div");g.style.csstext="position:absolute;bottom:0;left:0;right:0;";var v="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createelement("div"),y=document.createelement("div");v+=";background-color:"+r.get("buttoncolor"),v+=";color:"+r.get("buttontextcolor");var x=this;ve(m,"click",n),ve(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getoption()):vm(u.value,p)}catch(i){throw n(),new error("data view format error "+i)}t&&e.dispatchaction({type:"changedataview",newoption:t}),n()}),m.innerhtml=s[1],y.innerhtml=s[2],y.style.csstext=v,m.style.csstext=v,!r.get("readonly")&&g.appendchild(y),g.appendchild(m),ve(u,"keydown",function(t){if(9===(t.keycode||t.which)){var e=this.value,n=this.selectionstart,i=this.selectionend;this.value=e.substring(0,n)+fk+e.substring(i),this.selectionstart=this.selectionend=n+1,cy(t)}}),o.appendchild(a),o.appendchild(l),o.appendchild(g),l.style.height=i.clientheight-80+"px",i.appendchild(o),this._dom=o},mm.prototype.remove=function(t,e){this._dom&&e.getdom().removechild(this._dom)},mm.prototype.dispose=function(t,e){this.remove(t,e)},zv("dataview",mm),nu({type:"changedataview",event:"dataviewchanged",update:"prepareandupdate"},function(t,e){var n=[];f(t.newoption.series,function(t){var i=e.getseriesbyname(t.name)[0];if(i){var r=i.get("data");n.push({name:t.name,data:ym(t.data,r)})}else n.push(a({type:"scatter"},t))}),e.mergeoption(s({series:n},t.newoption))});var gk=f,wk="\x00_ec_hist_store";ya.extend({type:"datazoom.select"}),ua.extend({type:"datazoom.select"});var zk=hm.toolbox.datazoom,xk=f,yk="\x00_ec_\x00toolbox-datazoom_";sm.defaultoption={show:!0,icon:{zoom:"m0,13.5h26.9 m13.5,26.9v0 m32.1,13.5h58v58h13.5 v32.1",back:"m22,1.4l9.9,13.5l12.3,12.3 m10.3,13.5h54.9v44.6 h10.3v-26"},title:i(zk.title)};var uk=sm.prototype;uk.render=function(t,e,n,i){this.model=t,this.ecmodel=e,this.api=n,cm(t,e,this,i,n),im(t,e)},uk.onclick=function(t,e,n){qk[n].call(this)},uk.remove=function(){this._brushcontroller.unmount()},uk.dispose=function(){this._brushcontroller.dispose()};var qk={zoom:function(){var t=!this._iszoomactive;this.api.dispatchaction({type:"takeglobalcursor",key:"datazoomselect",datazoomselectactive:t})},back:function(){this._dispatchzoomaction(_m(this.ecmodel))}};uk._onbrush=function(t,e){function n(t,e,n){var a=e.getaxis(t),s=a.model,l=i(t,s,o),u=l.findrepresentativeaxisproxy(s).getminmaxspan();(null!=u.minvaluespan||null!=u.maxvaluespan)&&(n=qa(0,n.slice(),a.scale.getextent(),0,u.minvaluespan,u.maxvaluespan)),l&&(r[l.id]={datazoomid:l.id,startvalue:n[0],endvalue:n[1]})}function i(t,e,n){var i;return n.eachcomponent({maintype:"datazoom",subtype:"select"},function(n){var r=n.getaxismodel(t,e.componentindex);r&&(i=n)}),i}if(e.isend&&t.length){var r={},o=this.ecmodel;this._brushcontroller.updatecovers([]);var a=new ug(tm(this.model.option),o,{include:["grid"]});a.matchoutputranges(t,o,function(t,e,i){if("cartesian2d"===i.type){var r=t.brushtype;"rect"===r?(n("x",i,e[0]),n("y",i,e[1])):n({linex:"x",liney:"y"}[r],i,e)}}),xm(o,r),this._dispatchzoomaction(r)}},uk._dispatchzoomaction=function(t){var e=[];xk(t,function(t){e.push(i(t))}),e.length&&this.api.dispatchaction({type:"datazoom",from:this.uid,batch:e})},zv("datazoom",sm),ql(function(t){function e(t,e){if(e){var r=t+"index",o=e[r];null==o||"all"===o||_(o)||(o=o===!1||"none"===o?[]:[o]),n(t,function(e,n){if(null==o||"all"===o||-1!==u(o,n)){var a={type:"select",$fromtoolbox:!0,id:yk+t+n};a[r]=n,i.push(a)}})}}function n(e,n){var i=t[e];_(i)||(i=i?[i]:[]),xk(i,n)}if(t){var i=t.datazoom||(t.datazoom=[]);_(i)||(t.datazoom=i=[i]);var r=t.toolbox;if(r&&(_(r)&&(r=r[0]),r&&r.feature)){var o=r.feature.datazoom;e("xaxis",o),e("yaxis",o)}}});var jk=hm.toolbox.restore;am.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:jk.title};var kk=am.prototype;kk.onclick=function(t,e){bm(t),e.dispatchaction({type:"restore",from:this.uid})},zv("restore",am),nu({type:"restore",event:"restore",update:"prepareandupdate"},function(t,e){e.resetoption("recreate")}),ql(function(t){var e=t.graphic;_(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var $k=uu({type:"graphic",defaultoption:{elements:[],parentid:null},_eloptionstoupdate:null,mergeoption:function(){var t=this.option.elements;this.option.elements=null,$k.superapply(this,"mergeoption",arguments),this.option.elements=t},optionupdated:function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o);var a=hi(r,o);gi(a);var s=this._eloptionstoupdate=[];f(a,function(t,e){var n=t.option;n&&(s.push(n),om(t,n),zm(r,e,n),rm(r[e],n))},this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},_flatten:function(t,e,n){f(t,function(t){if(t){n&&(t.parentoption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}},this)},useeloptionstoupdate:function(){var t=this._eloptionstoupdate;return this._eloptionstoupdate=null,t}});hu({type:"graphic",init:function(){this._elmap=n(),this._lastgraphicmodel},render:function(t,e,n){t!==this._lastgraphicmodel&&this._clear(),this._lastgraphicmodel=t,this._updateelements(t),this._relocate(t,n)},_updateelements:function(t){var e=t.useeloptionstoupdate();if(e){var n=this._elmap,i=this.group;f(e,function(e){var r=e.$action,o=e.id,a=n.get(o),s=e.parentid,l=null!=s?n.get(s):i,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textverticalalign=u.textbaseline=null),!u.hasownproperty("textfill")&&u.fill&&(u.textfill=u.fill),!u.hasownproperty("textstroke")&&u.stroke&&(u.textstroke=u.stroke));var h=pm(e);r&&"merge"!==r?"replace"===r?(km(a,n),dm(o,l,h,n)):"remove"===r&&km(a,n):a?a.attr(h):dm(o,l,h,n);var c=n.get(o);c&&(c.__ecgraphicwidth=e.width,c.__ecgraphicheight=e.height,em(c,t,e))})}},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,r=this._elmap,o=n.length-1;o>=0;o--){var a=n[o],s=r.get(a.id);if(s){var l=s.parent,u=l===i?{width:e.getwidth(),height:e.getheight()}:{width:l.__ecgraphicwidth||0,height:l.__ecgraphicheight||0};ca(s,a,u,null,{hv:a.hv,boundingmode:a.bounding})}}},_clear:function(){var t=this._elmap;t.each(function(e){km(e,t)}),this._elmap=n()},dispose:function(){this._clear()}}),t.version=gm,t.dependencies=wm,t.priority=jm,t.init=yl,t.connect=ul,t.disconnect=ql,t.disconnect=ys,t.dispose=jl,t.getinstancebydom=kl,t.getinstancebyid=$l,t.registertheme=jl,t.registerpreprocessor=ql,t.registerprocessor=tu,t.registerpostupdate=eu,t.registeraction=nu,t.registercoordinatesystem=iu,t.getcoordinatesystemdimensions=ru,t.registerlayout=ou,t.registervisual=au,t.registerloading=lu,t.extendcomponentmodel=uu,t.extendcomponentview=hu,t.extendseriesmodel=cu,t.extendchartview=du,t.setcanvascreator=fu,t.registermap=pu,t.getmap=gu,t.datatool=xs,t.zrender=yx,t.number=$b,t.format=rw,t.throttle=qs,t.helper=_t,t.matrix=yy,t.vector=ay,t.color=by,t.parsegeojson=wt,t.parsegeojson=it,t.util=ct,t.graphic=at,t.list=ps,t.model=zo,t.axis=tt,t.env=fm});