!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={},i={},n=t.match(/firefox\/([\d.]+)/),o=t.match(/msie\s([\d.]+)/)||t.match(/trident\/.+?rv:(([\d.]+))/),r=t.match(/edge\/([\d.]+)/),a=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),o&&(i.ie=!0,i.version=o[1]),r&&(i.edge=!0,i.version=r[1]),a&&(i.wechat=!0),{browser:i,os:e,node:!1,canvassupported:!!document.createelement("canvas").getcontext,svgsupported:"undefined"!=typeof svgrect,toucheventssupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointereventssupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11)}}function i(t,e){tf[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=xf.call(t);if("[object array]"===i){e=[];for(var o=0,r=t.length;r>o;o++)e[o]=n(t[o])}else if(yf[i]){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(var o=0,r=t.length;r>o;o++)e[o]=n(t[o])}}else if(!mf[i]&&!z(t)&&!i(t)){e={};for(var s in t)t.hasownproperty(s)&&(e[s]=n(t[s]))}return e}function o(t,e,i){if(!s(e)||!s(t))return i?n(e):t;for(var r in e)if(e.hasownproperty(r)){var a=t[r],s=e[r];!s(s)||!s(a)||_(s)||_(a)||i(s)||i(a)||m(s)||m(a)||z(s)||z(a)?!i&&r in t||(t[r]=n(e[r],!0)):o(a,s,i)}return t}function r(t,e){for(var i=t[0],n=1,r=t.length;r>n;n++)i=o(i,t[n],e);return i}function a(t,e){for(var i in e)e.hasownproperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasownproperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return cf||(cf=af().getcontext("2d")),cf}function h(t,e){if(t){if(t.indexof)return t.indexof(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var o in n)t.prototype[o]=n[o];t.prototype.constructor=t,t.superclass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.foreach&&t.foreach===wf)t.foreach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;o>n;n++)e.call(i,t[n],n,t);else for(var r in t)t.hasownproperty(r)&&e.call(i,t[r],r,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===mf)return t.map(e,i);for(var n=[],o=0,r=t.length;r>o;o++)n.push(e.call(i,t[o],o,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===if)return t.reduce(e,i,n);for(var o=0,r=t.length;r>o;o++)i=e.call(n,i,t[o],o,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===bf)return t.filter(e,i);for(var n=[],o=0,r=t.length;r>o;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function m(t,e,i){if(t&&e)for(var n=0,o=t.length;o>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=sf.call(arguments,2);return function(){return t.apply(e,i.concat(sf.call(arguments)))}}function x(t){var e=sf.call(arguments,1);return function(){return t.apply(this,e.concat(sf.call(arguments)))}}function _(t){return"[object array]"===xf.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object string]"===xf.call(t)}function s(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function m(t){return!!mf[xf.call(t)]}function i(t){return"object"==typeof t&&"number"==typeof t.nodetype&&"object"==typeof t.ownerdocument}function t(t){return t!==t}function a(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function c(t,e){return null!=t?t:e}function d(t,e,i){return null!=t?t:null!=e?e:i}function l(){return function.call.apply(sf,arguments)}function p(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 k(t,e){if(!t)throw new error(e)}function o(t){t[df]=!0}function z(t){return t[df]}function r(t){t&&f(t,function(t,e){this.set(e,t)},this)}function e(t){return new r(t)}function b(){}function v(t,e){var i=new of(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function n(t,e){return t[0]=e[0],t[1]=e[1],t}function f(t){var e=new of(2);return e[0]=t[0],e[1]=t[1],e}function g(t,e,i){return t[0]=e,t[1]=i,t}function h(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function w(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function z(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function u(t){return math.sqrt(x(t))}function x(t){return t[0]*t[0]+t[1]*t[1]}function q(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function y(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function j(t,e){return t[0]*e[0]+t[1]*e[1]}function $(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function k(t,e){var i=u(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function j(t,e){return math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function q(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function te(t,e){return t[0]=-e[0],t[1]=-e[1],t}function ee(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function ie(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function ne(t,e,i){return t[0]=math.min(e[0],i[0]),t[1]=math.min(e[1],i[1]),t}function oe(t,e,i){return t[0]=math.max(e[0],i[0]),t[1]=math.max(e[1],i[1]),t}function re(){this.on("mousedown",this._dragstart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragend,this),this.on("globalout",this._dragend,this)}function ae(t,e){return{target:t,toptarget:e&&e.toptarget}}function se(t,e,i){return{type:t,event:i,target:e.target,toptarget:e.toptarget,cancelbubble:!1,offsetx:i.zrx,offsety:i.zry,gestureevent:i.gestureevent,pinchx:i.pinchx,pinchy:i.pinchy,pinchscale:i.pinchscale,wheeldelta:i.zrdelta,zrbytouch:i.zrbytouch,which:i.which}}function le(){}function he(t,e,i){if(t[t.recthover?"rectcontain":"contain"](e,i)){for(var n,o=t;o;){if(o.clippath&&!o.clippath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return n?gf:!0}return!1}function ue(){var t=new zf(6);return ce(t),t}function ce(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function de(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 fe(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],r=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=r,t[3]=a,t[4]=s,t[5]=l,t}function pe(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function ge(t,e,i){var n=e[0],o=e[2],r=e[4],a=e[1],s=e[3],l=e[5],h=math.sin(i),u=math.cos(i);return t[0]=n*u+a*h,t[1]=-n*h+a*u,t[2]=o*u+s*h,t[3]=-o*h+u*s,t[4]=u*r+h*l,t[5]=u*l-h*r,t}function ve(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function me(t,e){var i=e[0],n=e[2],o=e[4],r=e[1],a=e[3],s=e[5],l=i*a-r*n;return l?(l=1/l,t[0]=a*l,t[1]=-r*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*o)*l,t[5]=(r*o-i*s)*l,t):null}function ye(t){return t>qf||-qf>t}function xe(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 _e(t){return t=math.round(t),0>t?0:t>255?255:t}function we(t){return t=math.round(t),0>t?0:t>360?360:t}function be(t){return 0>t?0:t>1?1:t}function se(t){return _e(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100*255:parseint(t,10))}function me(t){return be(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100:parsefloat(t))}function ie(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function te(t,e,i){return t+(e-t)*i}function ae(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function ce(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function de(t,e){rp&&ce(rp,e),rp=op.put(t,rp||e.slice())}function le(t,e){if(t){e=e||[];var i=op.get(t);if(i)return ce(e,i);t+="";var n=t.replace(/ /g,"").tolowercase();if(n in np)return ce(e,np[n]),de(t,e),e;if("#"!==n.charat(0)){var o=n.indexof("("),r=n.indexof(")");if(-1!==o&&r+1===n.length){var a=n.substr(0,o),s=n.substr(o+1,r-(o+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void ae(e,0,0,0,1);l=me(s.pop());case"rgb":return 3!==s.length?void ae(e,0,0,0,1):(ae(e,se(s[0]),se(s[1]),se(s[2]),l),de(t,e),e);case"hsla":return 4!==s.length?void ae(e,0,0,0,1):(s[3]=me(s[3]),pe(s,e),de(t,e),e);case"hsl":return 3!==s.length?void ae(e,0,0,0,1):(pe(s,e),de(t,e),e);default:return}}ae(e,0,0,0,1)}else{if(4===n.length){var h=parseint(n.substr(1),16);return h>=0&&4095>=h?(ae(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),de(t,e),e):void ae(e,0,0,0,1)}if(7===n.length){var h=parseint(n.substr(1),16);return h>=0&&16777215>=h?(ae(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),de(t,e),e):void ae(e,0,0,0,1)}}}}function pe(t,e){var i=(parsefloat(t[0])%360+360)%360/360,n=me(t[1]),o=me(t[2]),r=.5>=o?o*(n+1):o+n-o*n,a=2*o-r;return e=e||[],ae(e,_e(255*ie(a,r,i+1/3)),_e(255*ie(a,r,i)),_e(255*ie(a,r,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ke(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,r=t[2]/255,a=math.min(n,o,r),s=math.max(n,o,r),l=s-a,h=(s+a)/2;if(0===l)e=0,i=0;else{i=.5>h?l/(s+a):l/(2-s-a);var u=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-r)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+u-d:r===s&&(e=2/3+c-u),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}function oe(t,e){var i=le(t);if(i){for(var n=0;3>n;n++)i[n]=0>e?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return ne(i,4===i.length?"rgba":"rgb")}}function ze(t){var e=le(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1):void 0}function re(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),o=math.floor(n),r=math.ceil(n),a=e[o],s=e[r],l=n-o;return i[0]=_e(te(a[0],s[0],l)),i[1]=_e(te(a[1],s[1],l)),i[2]=_e(te(a[2],s[2],l)),i[3]=be(te(a[3],s[3],l)),i}}function ee(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),o=math.floor(n),r=math.ceil(n),a=le(e[o]),s=le(e[r]),l=n-o,h=ne([_e(te(a[0],s[0],l)),_e(te(a[1],s[1],l)),_e(te(a[2],s[2],l)),be(te(a[3],s[3],l))],"rgba");return i?{color:h,leftindex:o,rightindex:r,value:n}:h}}function be(t,e,i,n){return t=le(t),t?(t=ke(t),null!=e&&(t[0]=we(e)),null!=i&&(t[1]=me(i)),null!=n&&(t[2]=me(n)),ne(pe(t),"rgba")):void 0}function ve(t,e){return t=le(t),t&&null!=e?(t[3]=be(e),ne(t,"rgba")):void 0}function ne(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(i+=","+t[3]),e+"("+i+")"}}function fe(t,e){return t[e]}function ge(t,e,i){t[e]=i}function he(t,e,i){return(e-t)*i+t}function we(t,e,i){return i>.5?e:t}function ze(t,e,i,n,o){var r=t.length;if(1==o)for(var a=0;r>a;a++)n[a]=he(t[a],e[a],i);else for(var s=r&&t[0].length,a=0;r>a;a++)for(var l=0;s>l;l++)n[a][l]=he(t[a][l],e[a][l],i)}function ue(t,e,i){var n=t.length,o=e.length;if(n!==o){var r=n>o;if(r)t.length=o;else for(var a=n;o>a;a++)t.push(1===i?e[a]:hp.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 xe(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var o=0;n>o;o++)if(t[o]!==e[o])return!1}else for(var r=t[0].length,o=0;n>o;o++)for(var a=0;r>a;a++)if(t[o][a]!==e[o][a])return!1;return!0}function qe(t,e,i,n,o,r,a,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=ye(t[u],e[u],i[u],n[u],o,r,a);else for(var c=t[0].length,u=0;h>u;u++)for(var d=0;c>d;d++)s[u][d]=ye(t[u][d],e[u][d],i[u][d],n[u][d],o,r,a)}function ye(t,e,i,n,o,r,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*r+s*o+e}function je(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(hp.call(t[n]));return i}return hp.call(t)}return t}function $e(t){return t[0]=math.floor(t[0]),t[1]=math.floor(t[1]),t[2]=math.floor(t[2]),"rgba("+t.join(",")+")"}function ke(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function je(t,e,i,n,o,r){var a=t._getter,s=t._setter,l="spline"===e,h=n.length;if(h){var u,c=n[0].value,f=d(c),p=!1,g=!1,v=f?ke(n):0;n.sort(function(t,e){return t.time-e.time}),u=n[h-1].time;for(var m=[],y=[],x=n[0].value,_=!0,w=0;h>w;w++){m.push(n[w].time/u);var b=n[w].value;if(f&&xe(b,x,v)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var s=le(b);s?(b=s,p=!0):g=!0}y.push(b)}if(r||!_){for(var m=y[h-1],w=0;h-1>w;w++)f?ue(y[w],m,v):!isnan(y[w])||isnan(m)||g||p||(y[w]=m);f&&ue(a(t._target,o),m,v);var i,t,a,c,d,l,p=0,k=0;if(p)var o=[0,0,0,0];var z=function(t,e){var i;if(0>e)i=0;else if(k>e){for(i=math.min(p+1,h-1),i=i;i>=0&&!(m[i]<=e);i--);i=math.min(i,h-2)}else{for(i=p;h>i&&!(m[i]>e);i++);i=math.min(i-1,h-2)}p=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(t=(e-m[i])/n,l)if(c=y[i],a=y[0===i?i:i-1],d=y[i>h-2?h-1:i+1],l=y[i>h-3?h-1:i+2],f)qe(a,c,d,l,t,t*t,t*t*t,a(t,o),v);else{var r;if(p)r=qe(a,c,d,l,t,t*t,t*t*t,o,1),r=$e(o);else{if(g)return we(c,d,t);r=ye(a,c,d,l,t,t*t,t*t*t)}s(t,o,r)}else if(f)ze(y[i],y[i+1],t,a(t,o),v);else{var r;if(p)ze(y[i],y[i+1],t,o,1),r=$e(o);else{if(g)return we(y[i],y[i+1],t);r=he(y[i],y[i+1],t)}s(t,o,r)}},r=new xe({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:z,ondestroy:i});return e&&"spline"!==e&&(r.easing=e),r}}}function qe(t,e,i,n){0>i&&(t+=i,i=-i),0>n&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function ti(t){for(var e=0;t>=bp;)e|=1&t,t>>=1;return t+e}function ei(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;i>o&&n(t[o],t[o-1])<0;)o++;ii(t,e,o)}else for(;i>o&&n(t[o],t[o-1])>=0;)o++;return o-e}function ii(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function ni(t,e,i,n,o){for(n===e&&n++;i>n;n++){for(var r,a=t[n],s=e,l=n;l>s;)r=s+l>>>1,o(a,t[r])<0?l=r:s=r+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function oi(t,e,i,n,o,r){var a=0,s=0,l=1;if(r(t,e[i+o])>0){for(s=n-o;s>l&&r(t,e[i+o+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;s>l&&r(t,e[i+o-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=o-l,l=o-h}for(a++;l>a;){var u=a+(l-a>>>1);r(t,e[i+u])>0?a=u+1:l=u}return l}function ri(t,e,i,n,o,r){var a=0,s=0,l=1;if(r(t,e[i+o])<0){for(s=o+1;s>l&&r(t,e[i+o-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=o-l,l=o-h}else{for(s=n-o;s>l&&r(t,e[i+o+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;l>a;){var u=a+(l-a>>>1);r(t,e[i+u])<0?l=u:a=u+1}return l}function ai(t,e){function i(t,e){l[c]=t,h[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&h[t-1]<=h[t]+h[t+1]||t>=2&&h[t-2]<=h[t]+h[t-1])h[t-1]h[t+1])break;r(t)}}function o(){for(;c>1;){var t=c-2;t>0&&h[t-1]=o?a(n,o,r,u):s(n,o,r,u)))}function a(i,n,o,r){var a=0;for(a=0;n>a;a++)d[a]=t[i+a];var s=0,l=o,h=i;if(t[h++]=t[l++],0!==--r){if(1===n){for(a=0;r>a;a++)t[h+a]=t[l+a];return void(t[h+r]=d[s])}for(var c,f,p,g=u;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[h++]=t[l++],f++,c=0,0===--r){p=!0;break}}else if(t[h++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=ri(t[l],d,s,n,0,e),0!==c){for(a=0;c>a;a++)t[h+a]=d[s+a];if(h+=c,s+=c,n-=c,1>=n){p=!0;break}}if(t[h++]=t[l++],0===--r){p=!0;break}if(f=oi(d[s],t,l,r,0,e),0!==f){for(a=0;f>a;a++)t[h+a]=t[l+a];if(h+=f,l+=f,r-=f,0===r){p=!0;break}}if(t[h++]=d[s++],1===--n){p=!0;break}g--}while(c>=sp||f>=sp);if(p)break;0>g&&(g=0),g+=2}if(u=g,1>u&&(u=1),1===n){for(a=0;r>a;a++)t[h+a]=t[l+a];t[h+r]=d[s]}else{if(0===n)throw new error;for(a=0;n>a;a++)t[h+a]=d[s+a]}}else for(a=0;n>a;a++)t[h+a]=d[s+a]}function s(i,n,o,r){var a=0;for(a=0;r>a;a++)d[a]=t[o+a];var s=i+n-1,l=r-1,h=o+r-1,c=0,f=0;if(t[h--]=t[s--],0!==--n){if(1===r){for(h-=n,s-=n,f=h+1,c=s+1,a=n-1;a>=0;a--)t[f+a]=t[c+a];return void(t[h]=d[l])}for(var p=u;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[h--]=t[s--],g++,v=0,0===--n){m=!0;break}}else if(t[h--]=d[l--],v++,g=0,1===--r){m=!0;break}while(p>(g|v));if(m)break;do{if(g=n-ri(d[l],t,i,n,n-1,e),0!==g){for(h-=g,s-=g,n-=g,f=h+1,c=s+1,a=g-1;a>=0;a--)t[f+a]=t[c+a];if(0===n){m=!0;break}}if(t[h--]=d[l--],1===--r){m=!0;break}if(v=r-oi(t[s],d,0,r,r-1,e),0!==v){for(h-=v,l-=v,r-=v,f=h+1,c=l+1,a=0;v>a;a++)t[f+a]=d[c+a];if(1>=r){m=!0;break}}if(t[h--]=t[s--],0===--n){m=!0;break}p--}while(g>=sp||v>=sp);if(m)break;0>p&&(p=0),p+=2}if(u=p,1>u&&(u=1),1===r){for(h-=n,s-=n,f=h+1,c=s+1,a=n-1;a>=0;a--)t[f+a]=t[c+a];t[h]=d[l]}else{if(0===r)throw new error;for(c=h-(r-1),a=0;r>a;a++)t[c+a]=d[a]}}else for(c=h-(r-1),a=0;r>a;a++)t[c+a]=d[a]}var l,h,u=sp,c=0,d=[];l=[],h=[],this.mergeruns=n,this.forcemergeruns=o,this.pushrun=i}function si(t,e,i,n){i||(i=0),n||(n=t.length);var o=n-i;if(!(2>o)){var r=0;if(bp>o)return r=ei(t,i,n,e),void ni(t,i,n,i+r,e);var a=new ai(t,e),s=ti(o);do{if(r=ei(t,i,n,e),s>r){var l=o;l>s&&(l=s),ni(t,i,i+l,i+r,e),r=l}a.pushrun(i,r),a.mergeruns(),o-=r,i+=r}while(0!==o);a.forcemergeruns()}}function li(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function hi(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,r=null==e.y?0:e.y,a=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,o=o*i.width+i.x,r=r*i.height+i.y,a=a*i.height+i.y);var s=t.createlineargradient(n,r,o,a);return s}function ui(t,e,i){var n=i.width,o=i.height,r=math.min(n,o),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*n+i.x,s=s*o+i.y,l*=r);var h=t.createradialgradient(a,s,0,a,s,l);return h}function ci(){return!1}function di(t,e,i){var n=af(),o=e.getwidth(),r=e.getheight(),a=n.style;return a.position="absolute",a.left=0,a.top=0,a.width=o+"px",a.height=r+"px",n.width=o*i,n.height=r*i,n.setattribute("data-zr-dom-id",t),n}function fi(t){if("string"==typeof t){var e=op.get(t);return e&&e.image}return t}function pi(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!i)return e;var r=op.get(t),a={hostel:i,cb:n,cbpayload:o};return r?(e=r.image,!vi(e)&&r.pending.push(a)):(!e&&(e=new image),e.onload=gi,op.put(t,e.__cachedimgobj={image:e,pending:[a]}),e.src=e.__zrimagesrc=t),e}return t}return e}function gi(){var t=this.__cachedimgobj;this.onload=this.__cachedimgobj=null;for(var e=0;er;r++)o=math.max(di(n[r],e).width,o);return rp>ep&&(rp=0,zp={}),rp++,zp[i]=o,o}function yi(t,e,i,n,o,r,a){return r?_i(t,e,i,n,o,r,a):xi(t,e,i,n,o,a)}function xi(t,e,i,n,o,r){var a=li(t,e,o,r),s=mi(t,e);o&&(s+=o[1]+o[3]);var l=a.outerheight,h=wi(0,s,i),u=bi(0,l,n),c=new qe(h,u,s,l);return c.lineheight=a.lineheight,c}function _i(t,e,i,n,o,r,a){var s=pi(t,{rich:r,truncate:a,font:e,textalign:i,textpadding:o}),l=s.outerwidth,h=s.outerheight,u=wi(0,l,i),c=bi(0,h,n);return new qe(u,c,l,h)}function wi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function bi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function si(t,e,i){var n=e.x,o=e.y,r=e.height,a=e.width,s=r/2,l="left",h="top";switch(t){case"left":n-=i,o+=s,l="right",h="middle";break;case"right":n+=i+a,o+=s,h="middle";break;case"top":n+=a/2,o-=i,l="center",h="bottom";break;case"bottom":n+=a/2,o+=r+i,l="center";break;case"inside":n+=a/2,o+=s,l="center",h="middle";break;case"insideleft":n+=i,o+=s,h="middle";break;case"insideright":n+=a-i,o+=s,l="right",h="middle";break;case"insidetop":n+=a/2,o+=i,l="center";break;case"insidebottom":n+=a/2,o+=r-i,l="center",h="bottom";break;case"insidetopleft":n+=i,o+=i;break;case"insidetopright":n+=a-i,o+=i,l="right";break;case"insidebottomleft":n+=i,o+=r-i,h="bottom";break;case"insidebottomright":n+=a-i,o+=r-i,l="right",h="bottom"}return{x:n,y:o,textalign:l,textverticalalign:h}}function mi(t,e,i,n,o){if(!e)return"";var r=(t+"").split("\n");o=ii(e,i,n,o);for(var a=0,s=r.length;s>a;a++)r[a]=ti(r[a],o);return r.join("\n")}function ii(t,e,i,n){n=a({},n),n.font=e;var i=c(i,"...");n.maxiterations=c(n.maxiterations,2);var o=n.minchar=c(n.minchar,0);n.cncharwidth=mi("国",e);var r=n.asccharwidth=mi("a",e);n.placeholder=c(n.placeholder,"");for(var s=t=math.max(0,t-1),l=0;o>l&&s>=r;l++)s-=r;var h=mi(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsiswidth=h,n.contentwidth=s,n.containerwidth=t,n}function ti(t,e){var i=e.containerwidth,n=e.font,o=e.contentwidth;if(!i)return"";var r=mi(t,n);if(i>=r)return t;for(var a=0;;a++){if(o>=r||a>=e.maxiterations){t+=e.ellipsis;break}var s=0===a?ai(t,o,e.asccharwidth,e.cncharwidth):r>0?math.floor(t.length*o/r):0;t=t.substr(0,s),r=mi(t,n)}return""===t&&(t=e.placeholder),t}function ai(t,e,i,n){for(var o=0,r=0,a=t.length;a>r&&e>o;r++){var s=t.charcodeat(r);o+=s>=0&&127>=s?i:n}return r}function ci(t){return mi("国",t)}function di(t,e){return np.measuretext(t,e)}function li(t,e,i,n){null!=t&&(t+="");var o=ci(e),r=t?t.split("\n"):[],a=r.length*o,s=a;if(i&&(s+=i[0]+i[2]),t&&n){var l=n.outerheight,h=n.outerwidth;if(null!=l&&s>l)t="",r=[];else if(null!=h)for(var u=ii(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minchar:n.minchar,placeholder:n.placeholder}),c=0,d=r.length;d>c;c++)r[c]=ti(r[c],u)}return{lines:r,height:a,outerheight:s,lineheight:o}}function pi(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=bp.lastindex=0;null!=(n=bp.exec(t));){var r=n.index;r>o&&ki(i,t.substring(o,r)),ki(i,n[2],n[1]),o=bp.lastindex}of)return{lines:[],width:0,height:0};x.textwidth=mi(x.text,b);var m=_.textwidth,i=null==m||"auto"===m;if("string"==typeof m&&"%"===m.charat(m.length-1))x.percentwidth=m,h.push(x),m=0;else{if(i){m=x.textwidth;var t=_.textbackgroundcolor,a=t&&t.image;a&&(a=fi(a),vi(a)&&(m=math.max(m,a.width*s/a.height)))}var l=w?w[1]+w[3]:0;m+=l;var p=null!=d?d-m:null;null!=p&&m>p&&(!i||l>p?(x.text="",x.textwidth=m=0):(x.text=mi(x.text,p-l,b,c.ellipsis,{minchar:c.minchar}),x.textwidth=mi(x.text,b),m=x.textwidth+l))}m+=x.width=m,_&&(v=math.max(v,x.lineheight))}g.width=m,g.lineheight=v,s+=v,l=math.max(l,m)}i.outerwidth=i.width=c(e.textwidth,l),i.outerheight=i.height=c(e.textheight,s),u&&(i.outerwidth+=u[1]+u[3],i.outerheight+=u[0]+u[2]);for(var p=0;pl&&(a+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=o=r=u:u instanceof array?1===u.length?i=n=o=r=u[0]:2===u.length?(i=o=u[0],n=r=u[1]):3===u.length?(i=u[0],n=r=u[1],o=u[2]):(i=u[0],n=u[1],o=u[2],r=u[3]):i=n=o=r=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),o+r>l&&(c=o+r,o*=l/c,r*=l/c),n+o>h&&(c=n+o,n*=h/c,o*=h/c),i+r>h&&(c=i+r,i*=h/c,r*=h/c),t.moveto(a+i,s),t.lineto(a+l-n,s),0!==n&&t.quadraticcurveto(a+l,s,a+l,s+n),t.lineto(a+l,s+h-o),0!==o&&t.quadraticcurveto(a+l,s+h,a+l-o,s+h),t.lineto(a+r,s+h),0!==r&&t.quadraticcurveto(a,s+h,a,s+h-r),t.lineto(a,s+i),0!==i&&t.quadraticcurveto(a,s,a+i,s)}function ri(t){return ei(t),f(t.rich,ei),t}function ei(t){if(t){t.font=oi(t);var e=t.textalign;"middle"===e&&(e="center"),t.textalign=null==e||fp[e]?e:"left";var i=t.textverticalalign||t.textbaseline;"center"===i&&(i="middle"),t.textverticalalign=null==i||gp[i]?i:"top";var n=t.textpadding;n&&(t.textpadding=p(t.textpadding))}}function bi(t,e,i,n,o){n.rich?ni(t,e,i,n,o):vi(t,e,i,n,o)}function vi(t,e,i,n,o){var r=qi(e,"font",n.font||vp),a=n.textpadding,s=t.__textcotentblock;(!s||t.__dirty)&&(s=t.__textcotentblock=li(i,r,a,n.truncate));var l=s.outerheight,h=s.lines,u=s.lineheight,c=xi(l,n,o),d=c.basex,f=c.basey,p=c.textalign,g=c.textverticalalign;gi(e,n,o,d,f);var v=bi(f,l,g),m=d,y=v,x=wi(n);if(x||a){var _=mi(i,r),w=_;a&&(w+=a[1]+a[3]);var b=wi(d,w,p);x&&zi(t,e,n,b,v,w,l),a&&(m=ki(d,p,a),y+=a[0])}qi(e,"textalign",p||"left"),qi(e,"textbaseline","middle"),qi(e,"shadowblur",n.textshadowblur||0),qi(e,"shadowcolor",n.textshadowcolor||"transparent"),qi(e,"shadowoffsetx",n.textshadowoffsetx||0),qi(e,"shadowoffsety",n.textshadowoffsety||0),y+=u/2;var s=n.textstrokewidth,m=yi(n.textstroke,s),i=ji(n.textfill);m&&(qi(e,"linewidth",s),qi(e,"strokestyle",m)),i&&qi(e,"fillstyle",i);for(var t=0;tt&&(_=b[t],!_.textalign||"left"===_.textalign);)hi(t,e,_,n,m,m,a,"left"),i-=_.width,a+=_.width,t++;for(;d>=0&&(_=b[d],"right"===_.textalign);)hi(t,e,_,n,m,m,c,"right"),i-=_.width,c-=_.width,d--;for(a+=(r-(a-v)-(y-c)-i)/2;d>=t;)_=b[t],hi(t,e,_,n,m,m,a+_.width/2,"center"),a+=_.width,t++;m+=m}}function gi(t,e,i,n,o){if(i&&e.textrotation){var r=e.textorigin;"center"===r?(n=i.width/2+i.x,o=i.height/2+i.y):r&&(n=r[0]+i.x,o=r[1]+i.y),t.translate(n,o),t.rotate(-e.textrotation),t.translate(-n,-o)}}function hi(t,e,i,n,o,r,a,s){var l=n.rich[i.stylename]||{},h=i.textverticalalign,u=r+o/2;"top"===h?u=r+i.height/2:"bottom"===h&&(u=r+o-i.height/2),!i.islineholder&&wi(l)&&zi(t,e,l,"right"===s?a-i.width:"center"===s?a-i.width/2:a,u-i.height/2,i.width,i.height);var c=i.textpadding;c&&(a=ki(a,s,c),u-=i.height/2-c[2]-i.textheight/2),qi(e,"shadowblur",d(l.textshadowblur,n.textshadowblur,0)),qi(e,"shadowcolor",l.textshadowcolor||n.textshadowcolor||"transparent"),qi(e,"shadowoffsetx",d(l.textshadowoffsetx,n.textshadowoffsetx,0)),qi(e,"shadowoffsety",d(l.textshadowoffsety,n.textshadowoffsety,0)),qi(e,"textalign",s),qi(e,"textbaseline","middle"),qi(e,"font",i.font||vp);var d=yi(l.textstroke||n.textstroke,p),f=ji(l.textfill||n.textfill),p=c(l.textstrokewidth,n.textstrokewidth);d&&(qi(e,"linewidth",p),qi(e,"strokestyle",d),e.stroketext(i.text,a,u)),f&&(qi(e,"fillstyle",f),e.filltext(i.text,a,u))}function wi(t){return t.textbackgroundcolor||t.textborderwidth&&t.textbordercolor}function zi(t,e,i,n,o,r,a){var s=i.textbackgroundcolor,l=i.textborderwidth,h=i.textbordercolor,u=b(s);if(qi(e,"shadowblur",i.textboxshadowblur||0),qi(e,"shadowcolor",i.textboxshadowcolor||"transparent"),qi(e,"shadowoffsetx",i.textboxshadowoffsetx||0),qi(e,"shadowoffsety",i.textboxshadowoffsety||0),u||l&&h){e.beginpath();var c=i.textborderradius;c?zi(e,{x:n,y:o,width:r,height:a,r:c}):e.rect(n,o,r,a),e.closepath()}if(u)qi(e,"fillstyle",s),e.fill();else if(s(s)){var d=s.image;d=pi(d,null,t,ui,s),d&&vi(d)&&e.drawimage(d,n,o,r,a)}l&&h&&(qi(e,"linewidth",l),qi(e,"strokestyle",h),e.stroke())}function ui(t,e){e.image=t}function xi(t,e,i){var n=e.x||0,o=e.y||0,r=e.textalign,a=e.textverticalalign;if(i){var s=e.textposition;if(s instanceof array)n=i.x+$i(s[0],i.width),o=i.y+$i(s[1],i.height);else{var l=si(s,i,e.textdistance);n=l.x,o=l.y,r=r||l.textalign,a=a||l.textverticalalign}var h=e.textoffset;h&&(n+=h[0],o+=h[1])}return{basex:n,basey:o,textalign:r,textverticalalign:a}}function qi(t,e,i){return t[e]=i,t[e]}function yi(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorstops?"#000":t}function ji(t){return null==t||"none"===t?null:t.image||t.colorstops?"#000":t}function $i(t,e){return"string"==typeof t?t.lastindexof("%")>=0?parsefloat(t)/100*e:parsefloat(t):t}function ki(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function ji(t,e){return null!=t&&(t||e.textbackgroundcolor||e.textborderwidth&&e.textbordercolor||e.textpadding)}function qi(t){t=t||{},mp.call(this,t);for(var e in t)t.hasownproperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new tp(t.style,this),this._rect=null,this.__clippaths=[]}function tn(t){qi.call(this,t)}function en(t){return parseint(t,10)}function nn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function on(t){t.__unusedcount++}function rn(t){1==t.__unusedcount&&t.clear()}function an(t,e,i){return up.copy(t.getboundingrect()),t.transform&&up.applytransform(t.transform),xp.width=e,xp.height=i,!up.intersect(xp)}function sn(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0;if(o){var r="touchend"!=n?e.targettouches[0]:e.changedtouches[0];r&&cn(t,r,e,i)}else cn(t,e,e,i),e.zrdelta=e.wheeldelta?e.wheeldelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&jp.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function pn(t,e,i){yp?t.addeventlistener(e,i):t.attachevent("on"+e,i)}function gn(t,e,i){yp?t.removeeventlistener(e,i):t.detachevent("on"+e,i)}function vn(t){return t.which>1}function mn(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return math.sqrt(e*e+i*i)}function yn(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function xn(t){return"mousewheel"===t&&vf.browser.firefox?"dommousescroll":t}function _n(t,e,i){var n=t._gesturemgr;"start"===i&&n.clear();var o=n.recognize(e,t.handler.findhover(e.zrx,e.zry,null).target,t.dom);if("end"===i&&n.clear(),o){var r=o.type;e.gestureevent=r,t.handler.dispatchtoelement({target:o.target},r,o.event)}}function wn(t){t._touching=!0,cleartimeout(t._touchtimer),t._touchtimer=settimeout(function(){t._touching=!1},700)}function bn(t){var e=t.pointertype;return"pen"===e||"touch"===e}function sn(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(ig,function(e){t._handlers[e]=y(rg[e],t)}),f(og,function(e){t._handlers[e]=y(rg[e],t)}),f(eg,function(i){t._handlers[i]=e(rg[i],t)})}function mn(t){function e(e,i){f(e,function(e){pn(t,xn(e),i._handlers[e])},i)}ff.call(this),this.dom=t,this._touching=!1,this._touchtimer,this._gesturemgr=new jp,this._handlers={},sn(this),vf.pointereventssupported?e(og,this):(vf.toucheventssupported&&e(ig,this),e(eg,this)) }function in(t,e){var i=new cg(pf(),t,e);return hg[i.id]=i,i}function tn(t){if(t)t.dispose();else{for(var e in hg)hg.hasownproperty(e)&&hg[e].dispose();hg={}}return this}function an(t){return hg[t]}function cn(t,e){lg[t]=e}function dn(t){delete hg[t]}function ln(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function pn(t,e,i,n){var o=e[1]-e[0],r=i[1]-i[0];if(0===o)return 0===r?i[0]:(i[0]+i[1])/2;if(n)if(o>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*r+i[0]}function kn(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?ln(t).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?0/0:+t}function on(t,e,i){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),i?t:+t}function zn(t){return t.sort(function(t,e){return t-e}),t}function rn(t){if(t=+t,isnan(t))return 0;for(var e=1,i=0;math.round(t*e)/e!==t;)e*=10,i++;return i}function en(t){var e=t.tostring(),i=e.indexof("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var o=e.indexof(".");return 0>o?0:e.length-1-o}function bn(t,e){var i=math.log,n=math.ln10,o=math.floor(i(t[1]-t[0])/n),r=math.round(i(math.abs(e[1]-e[0]))/n),a=math.min(math.max(-o+r,0),20);return isfinite(a)?a:20}function vn(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isnan(e)?0:e)},0);if(0===n)return 0;for(var o=math.pow(10,i),r=p(t,function(t){return(isnan(t)?0:t)/n*o*100}),a=100*o,s=p(r,function(t){return math.floor(t)}),l=g(s,function(t,e){return t+e},0),h=p(r,function(t,e){return t-s[e]});a>l;){for(var u=number.negative_infinity,c=null,d=0,f=h.length;f>d;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/o}function nn(t){var e=2*math.pi;return(t%e+e)%e}function fn(t){return t>-fg&&fg>t}function gn(t){if(t instanceof date)return t;if("string"==typeof t){var e=gg.exec(t);if(!e)return new date(0/0);if(e[8]){var i=+e[4]||0;return"z"!==e[8].touppercase()&&(i-=e[8].slice(0,3)),new date(date.utc(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new date(null==t?0/0:math.round(t))}function hn(t){return math.pow(10,wn(t))}function wn(t){return math.floor(math.log(t)/math.ln10)}function zn(t,e){var i,n=wn(t),o=math.pow(10,n),r=t/o;return i=e?1.5>r?1:2.5>r?2:4>r?3:7>r?5:10:1>r?1:2>r?2:3>r?3:5>r?5:10,t=i*o,n>=-20?+t.tofixed(0>n?-n:0):t}function un(t){function e(t,i,n){return t.interval[n]s;s++)r[s]<=i&&(r[s]=i,a[s]=s?1:1-n),i=r[s],n=a[s];r[0]===r[1]&&a[0]*a[1]!==1?t.splice(o,1):o++}return t}function xn(t){return t-parsefloat(t)>=0}function qn(t){return isnan(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function yn(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 jn(t){return string(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function $n(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],r=0;rl;l++)for(var h=0;h':""}function qn(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="mm-dd\nyyyy");var n=gn(e),o=i?"utc":"",r=n["get"+o+"fullyear"](),a=n["get"+o+"month"]()+1,s=n["get"+o+"date"](),l=n["get"+o+"hours"](),h=n["get"+o+"minutes"](),u=n["get"+o+"seconds"]();return t=t.replace("mm",_g(a)).replace("m",a).replace("yyyy",r).replace("yy",r%100).replace("dd",_g(s)).replace("d",s).replace("hh",_g(l)).replace("h",l).replace("mm",_g(h)).replace("m",h).replace("ss",_g(u)).replace("s",u)}function to(t){return t?t.charat(0).touppercase()+t.substr(1):t}function eo(t,e,i){return t[tg+e]=i}function io(t,e){return t[tg+e]}function no(t,e){return t.hasownproperty(tg+e)}function oo(t){var e={main:"",sub:""};return t&&(t=t.split(mg),e.main=t[0]||"",e.sub=t[1]||""),e}function ro(t){k(/^[a-za-z0-9_]+([.][a-za-z0-9_]+)?$/.test(t),'componenttype "'+t+'" illegal')}function ao(t){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(i.prototype,t),i.extend=this.extend,i.supercall=so,i.superapply=lo,u(i,this),i.superclass=e,i}}function so(t,e){var i=l(arguments,2);return this.superclass.prototype[e].apply(t,i)}function lo(t,e,i){return this.superclass.prototype[e].apply(t,i)}function ho(t,e){function i(t){var e=n[t.main];return e&&e[ig]||(e=n[t.main]={},e[ig]=!0),e}e=e||{};var n={};if(t.registerclass=function(t,e){if(e)if(ro(e),e=oo(e),e.sub){if(e.sub!==ig){var o=i(e);o[e.sub]=t}}else n[e.main]=t;return t},t.getclass=function(t,e,i){var o=n[t];if(o&&o[ig]&&(o=e?o[e]:null),i&&!o)throw new error(e?"component "+t+"."+(e||"")+" not exists. load it first.":t+".type should be specified.");return o},t.getclassesbymaintype=function(t){t=oo(t);var e=[],i=n[t.main];return i&&i[ig]?f(i,function(t,i){i!==ig&&e.push(t)}):e.push(i),e},t.hasclass=function(t){return t=oo(t),!!n[t.main]},t.getallclassmaintypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hassubtypes=function(t){t=oo(t);var e=n[t.main];return e&&e[ig]},t.parseclasstype=oo,e.registerwhenextend){var o=t.extend;o&&(t.extend=function(e){var i=o.call(this,e);return t.registerclass(i,e.type)})}return t}function uo(t){return t>-zg&&zg>t}function co(t){return t>zg||-zg>t}function fo(t,e,i,n,o){var r=1-o;return r*r*(r*t+3*o*e)+o*o*(o*n+3*r*i)}function po(t,e,i,n,o){var r=1-o;return 3*(((e-t)*r+2*(i-e)*o)*r+(n-i)*o*o)}function go(t,e,i,n,o,r){var a=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-o,u=s*s-3*a*l,c=s*l-9*a*h,d=l*l-3*s*h,f=0;if(uo(u)&&uo(c))if(uo(s))r[0]=0;else{var p=-l/s;p>=0&&1>=p&&(r[f++]=p)}else{var g=c*c-4*u*d;if(uo(g)){var v=c/u,p=-s/a+v,m=-v/2;p>=0&&1>=p&&(r[f++]=p),m>=0&&1>=m&&(r[f++]=m)}else if(g>0){var y=og(g),x=u*s+1.5*a*(-c+y),_=u*s+1.5*a*(-c-y);x=0>x?-kg(-x,bg):kg(x,bg),_=0>_?-kg(-_,bg):kg(_,bg);var p=(-s-(x+_))/(3*a);p>=0&&1>=p&&(r[f++]=p)}else{var w=(2*u*s-3*a*c)/(2*og(u*u*u)),b=math.acos(w)/3,s=og(u),m=math.cos(b),p=(-s-2*s*m)/(3*a),m=(-s+s*(m+eg*math.sin(b)))/(3*a),i=(-s+s*(m-eg*math.sin(b)))/(3*a);p>=0&&1>=p&&(r[f++]=p),m>=0&&1>=m&&(r[f++]=m),i>=0&&1>=i&&(r[f++]=i)}}return f}function vo(t,e,i,n,o){var r=6*i-12*e+6*t,a=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(uo(a)){if(co(r)){var h=-s/r;h>=0&&1>=h&&(o[l++]=h)}}else{var u=r*r-4*a*s;if(uo(u))o[0]=-r/(2*a);else if(u>0){var c=og(u),h=(-r+c)/(2*a),d=(-r-c)/(2*a);h>=0&&1>=h&&(o[l++]=h),d>=0&&1>=d&&(o[l++]=d)}}return l}function mo(t,e,i,n,o,r){var a=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,h=(s-a)*o+a,u=(l-s)*o+s,c=(u-h)*o+h;r[0]=t,r[1]=a,r[2]=h,r[3]=c,r[4]=c,r[5]=u,r[6]=l,r[7]=n}function yo(t,e,i,n,o,r,a,s,l,h,u){var c,d,f,p,g,v=.005,m=1/0;vg[0]=l,vg[1]=h;for(var y=0;1>y;y+=.05)ng[0]=fo(t,i,o,a,y),ng[1]=fo(e,n,r,s,y),p=bf(vg,ng),m>p&&(c=y,m=p);m=1/0;for(var x=0;32>x&&!(rg>v);x++)d=c-v,f=c+v,ng[0]=fo(t,i,o,a,d),ng[1]=fo(e,n,r,s,d),p=bf(ng,vg),d>=0&&m>p?(c=d,m=p):(fg[0]=fo(t,i,o,a,f),fg[1]=fo(e,n,r,s,f),g=bf(fg,vg),1>=f&&m>g?(c=f,m=g):v*=.5);return u&&(u[0]=fo(t,i,o,a,c),u[1]=fo(e,n,r,s,c)),og(m)}function xo(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function _o(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function wo(t,e,i,n,o){var r=t-2*e+i,a=2*(e-t),s=t-n,l=0;if(uo(r)){if(co(a)){var h=-s/a;h>=0&&1>=h&&(o[l++]=h)}}else{var u=a*a-4*r*s;if(uo(u)){var h=-a/(2*r);h>=0&&1>=h&&(o[l++]=h)}else if(u>0){var c=og(u),h=(-a+c)/(2*r),d=(-a-c)/(2*r);h>=0&&1>=h&&(o[l++]=h),d>=0&&1>=d&&(o[l++]=d)}}return l}function bo(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function so(t,e,i,n,o){var r=(e-t)*n+t,a=(i-e)*n+e,s=(a-r)*n+r;o[0]=t,o[1]=r,o[2]=s,o[3]=s,o[4]=a,o[5]=i}function mo(t,e,i,n,o,r,a,s,l){var h,u=.005,c=1/0;vg[0]=a,vg[1]=s;for(var d=0;1>d;d+=.05){ng[0]=xo(t,i,o,d),ng[1]=xo(e,n,r,d);var f=bf(vg,ng);c>f&&(h=d,c=f)}c=1/0;for(var p=0;32>p&&!(rg>u);p++){var g=h-u,v=h+u;ng[0]=xo(t,i,o,g),ng[1]=xo(e,n,r,g);var f=bf(ng,vg);if(g>=0&&c>f)h=g,c=f;else{fg[0]=xo(t,i,o,v),fg[1]=xo(e,n,r,v);var m=bf(fg,vg);1>=v&&c>m?(h=v,c=m):u*=.5}}return l&&(l[0]=xo(t,i,o,h),l[1]=xo(e,n,r,h)),og(c)}function io(t,e,i){if(0!==t.length){var n,o=t[0],r=o[0],a=o[0],s=o[1],l=o[1];for(n=1;nu;u++){var p=d(t,i,o,a,jg[u]);l[0]=gg(p,l[0]),h[0]=hg(p,h[0])}for(f=c(e,n,r,s,$g),u=0;f>u;u++){var g=d(e,n,r,s,$g[u]);l[1]=gg(g,l[1]),h[1]=hg(g,h[1])}l[0]=gg(t,l[0]),h[0]=hg(t,h[0]),l[0]=gg(a,l[0]),h[0]=hg(a,h[0]),l[1]=gg(e,l[1]),h[1]=hg(e,h[1]),l[1]=gg(s,l[1]),h[1]=hg(s,h[1])}function co(t,e,i,n,o,r,a,s){var l=bo,h=xo,u=hg(gg(l(t,i,o),1),0),c=hg(gg(l(e,n,r),1),0),d=h(t,i,o,u),f=h(e,n,r,c);a[0]=gg(t,o,d),a[1]=gg(e,r,f),s[0]=hg(t,o,d),s[1]=hg(e,r,f)}function do(t,e,i,n,o,r,a,s,l){var h=ne,u=oe,c=math.abs(o-r);if(1e-4>c%ug&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(xg[0]=zg(o)*i+t,xg[1]=wg(o)*n+e,qg[0]=zg(r)*i+t,qg[1]=wg(r)*n+e,h(s,xg,qg),u(l,xg,qg),o%=ug,0>o&&(o+=ug),r%=ug,0>r&&(r+=ug),o>r&&!a?r+=ug:r>o&&a&&(o+=ug),a){var d=r;r=o,o=d}for(var f=0;r>f;f+=math.pi/2)f>o&&(yg[0]=zg(f)*i+t,yg[1]=wg(f)*n+e,h(s,yg,s),u(l,yg,l))}function lo(t,e,i,n,o,r,a){if(0===o)return!1;var s=o,l=0,h=t;if(a>e+s&&a>n+s||e-s>a&&n-s>a||r>t+s&&r>i+s||t-s>r&&i-s>r)return!1;if(t===i)return math.abs(r-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*r-a+h,c=u*u/(l*l+1);return s/2*s/2>=c}function po(t,e,i,n,o,r,a,s,l,h,u){if(0===l)return!1;var c=l;if(u>e+c&&u>n+c&&u>r+c&&u>s+c||e-c>u&&n-c>u&&r-c>u&&s-c>u||h>t+c&&h>i+c&&h>o+c&&h>a+c||t-c>h&&i-c>h&&o-c>h&&a-c>h)return!1;var d=yo(t,e,i,n,o,r,a,s,h,u,null);return c/2>=d}function ko(t,e,i,n,o,r,a,s,l){if(0===a)return!1;var h=a;if(l>e+h&&l>n+h&&l>r+h||e-h>l&&n-h>l&&r-h>l||s>t+h&&s>i+h&&s>o+h||t-h>s&&i-h>s&&o-h>s)return!1;var u=mo(t,e,i,n,o,r,s,l,null);return h/2>=u}function oo(t){return t%=uv,0>t&&(t+=uv),t}function zo(t,e,i,n,o,r,a,s,l){if(0===a)return!1;var h=a;s-=t,l-=e;var u=math.sqrt(s*s+l*l);if(u-h>i||i>u+h)return!1;if(math.abs(n-o)%cv<1e-4)return!0;if(r){var c=n;n=oo(o),o=oo(c)}else n=oo(n),o=oo(o);n>o&&(o+=cv);var d=math.atan2(l,s);return 0>d&&(d+=cv),d>=n&&o>=d||d+cv>=n&&o>=d+cv}function ro(t,e,i,n,o,r){if(r>e&&r>n||e>r&&n>r)return 0;if(n===e)return 0;var a=e>n?1:-1,s=(r-e)/(n-e);(1===s||0===s)&&(a=e>n?.5:-.5);var l=s*(i-t)+t;return l>o?a:0}function eo(t,e){return math.abs(t-e)e&&h>n&&h>r&&h>s||e>h&&n>h&&r>h&&s>h)return 0;var u=go(e,n,r,s,h,gv);if(0===u)return 0;for(var c,d,f=0,p=-1,g=0;u>g;g++){var v=gv[g],m=0===v||1===v?.5:1,y=fo(t,i,o,a,v);l>y||(0>p&&(p=vo(e,n,r,s,vv),vv[1]1&&bo(),c=fo(e,n,r,s,vv[0]),p>1&&(d=fo(e,n,r,s,vv[1]))),f+=2==p?vc?m:-m:vd?m:-m:d>s?m:-m:vc?m:-m:c>s?m:-m)}return f}function no(t,e,i,n,o,r,a,s){if(s>e&&s>n&&s>r||e>s&&n>s&&r>s)return 0;var l=wo(e,n,r,s,gv);if(0===l)return 0;var h=bo(e,n,r);if(h>=0&&1>=h){for(var u=0,c=xo(e,n,r,h),d=0;l>d;d++){var f=0===gv[d]||1===gv[d]?.5:1,p=xo(t,i,o,gv[d]);a>p||(u+=gv[d]c?f:-f:c>r?f:-f)}return u}var f=0===gv[0]||1===gv[0]?.5:1,p=xo(t,i,o,gv[0]);return a>p?0:e>r?f:-f}function fo(t,e,i,n,o,r,a,s){if(s-=e,s>i||-i>s)return 0;var l=math.sqrt(i*i-s*s);gv[0]=-l,gv[1]=l;var h=math.abs(n-o);if(1e-4>h)return 0;if(1e-4>h%fv){n=0,o=fv;var u=r?1:-1;return a>=gv[0]+t&&a<=gv[1]+t?u:0}if(r){var l=n;n=oo(o),o=oo(l)}else n=oo(n),o=oo(o);n>o&&(o+=fv);for(var c=0,d=0;2>d;d++){var f=gv[d];if(f+t>a){var p=math.atan2(s,f),u=r?1:-1;0>p&&(p=fv+p),(p>=n&&o>=p||p+fv>=n&&o>=p+fv)&&(p>math.pi/2&&p<1.5*math.pi&&(u=-u),c+=u)}}return c}function go(t,e,i,n,o){for(var r=0,a=0,s=0,l=0,h=0,u=0;u1&&(i||(r+=ro(a,s,l,h,n,o))),1==u&&(a=t[u],s=t[u+1],l=a,h=s),c){case dv.m:l=t[u++],h=t[u++],a=l,s=h;break;case dv.l:if(i){if(lo(a,s,t[u],t[u+1],e,n,o))return!0}else r+=ro(a,s,t[u],t[u+1],n,o)||0;a=t[u++],s=t[u++];break;case dv.c:if(i){if(po(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else r+=vo(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],n,o)||0;a=t[u++],s=t[u++];break;case dv.q:if(i){if(ko(a,s,t[u++],t[u++],t[u],t[u+1],e,n,o))return!0}else r+=no(a,s,t[u++],t[u++],t[u],t[u+1],n,o)||0;a=t[u++],s=t[u++];break;case dv.a:var d=t[u++],f=t[u++],p=t[u++],g=t[u++],v=t[u++],m=t[u++],y=(t[u++],1-t[u++]),x=math.cos(v)*p+d,_=math.sin(v)*g+f;u>1?r+=ro(a,s,x,_,n,o):(l=x,h=_);var w=(n-d)*g/p+d;if(i){if(zo(d,f,g,v,v+m,y,e,w,o))return!0}else r+=fo(d,f,g,v,v+m,y,w,o);a=math.cos(v+m)*p+d,s=math.sin(v+m)*g+f;break;case dv.r:l=a=t[u++],h=s=t[u++];var b=t[u++],s=t[u++],x=l+b,_=h+s;if(i){if(lo(l,h,x,h,e,n,o)||lo(x,h,x,_,e,n,o)||lo(x,_,l,_,e,n,o)||lo(l,_,l,h,e,n,o))return!0}else r+=ro(x,h,x,_,n,o),r+=ro(l,_,l,h,n,o);break;case dv.z:if(i){if(lo(a,s,l,h,e,n,o))return!0}else r+=ro(a,s,l,h,n,o);a=l,s=h}}return i||eo(s,h)||(r+=ro(a,s,l,h,n,o)||0),0!==r}function ho(t,e,i){return go(t,0,!1,e,i)}function wo(t,e,i,n){return go(t,e,!0,i,n)}function zo(t){qi.call(this,t),this.path=null}function uo(t,e,i,n,o,r,a,s,l,h,u){var c=l*(dv/180),d=cv(c)*(t-i)/2+av(c)*(e-n)/2,f=-1*av(c)*(t-i)/2+cv(c)*(e-n)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=tv(p),s*=tv(p));var g=(o===r?-1:1)*tv((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+i)/2+cv(c)*v-av(c)*m,x=(e+n)/2+av(c)*v+cv(c)*m,_=kv([1,0],[(d-v)/a,(f-m)/s]),w=[(d-v)/a,(f-m)/s],b=[(-1*d-v)/a,(-1*f-m)/s],s=kv(w,b);pv(w,b)<=-1&&(s=dv),pv(w,b)>=1&&(s=0),0===r&&s>0&&(s-=2*dv),1===r&&0>s&&(s+=2*dv),u.adddata(h,y,x,a,s,_,s,c,r)}function xo(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===f[0]&&f.shift();for(var p=0;po;o++){var r=t[o];r.path||r.createpathproxy(),r.__dirtypath&&r.buildpath(r.path,r.shape,!0),i.push(r.path)}var a=new zo(e);return a.createpathproxy(),a.buildpath=function(t){t.appendpath(i);var e=t.getcontext();e&&t.rebuildpath(e)},a}function ko(t,e,i,n,o,r,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*r+s*o+e}function jo(t,e,i){var n=e.points,o=e.smooth;if(n&&n.length>=2){if(o&&"spline"!==o){var r=fv(n,o,i,e.smoothconstraint);t.moveto(n[0][0],n[0][1]);for(var a=n.length,s=0;(i?a:a-1)>s;s++){var l=r[2*s],h=r[2*s+1],u=n[(s+1)%a];t.beziercurveto(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===o&&(n=nv(n,i)),t.moveto(n[0][0],n[0][1]);for(var s=1,c=n.length;c>s;s++)t.lineto(n[s][0],n[s][1])}i&&t.closepath()}}function qo(t,e,i){var n=t.cpx2,o=t.cpy2;return null===n||null===o?[(i?po:fo)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?po:fo)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?_o:xo)(t.x1,t.cpx1,t.x2,e),(i?_o:xo)(t.y1,t.cpy1,t.y2,e)]}function tr(t){return zo.extend(t)}function er(t,e){return jo(t,e)}function ir(t,e,i,n){var o=yo(t,e),r=o.getboundingrect();return i&&("center"===n&&(i=or(i,r)),rr(o,i)),o}function nr(t,e,i){var n=new tn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var o={width:t.width,height:t.height};n.setstyle(or(e,o))}}});return n}function or(t,e){var i,n=e.width/e.height,o=t.height*n;o<=t.width?i=t.height:(o=t.width,i=o/n);var r=t.x+t.width/2,a=t.y+t.height/2;return{x:r-o/2,y:a-i/2,width:o,height:i}}function rr(t,e){if(t.applytransform){var i=t.getboundingrect(),n=i.calculatetransform(e);t.applytransform(n)}}function ar(t){var e=t.shape,i=t.style.linewidth;return jv(2*e.x1)===jv(2*e.x2)&&(e.x1=e.x2=lr(e.x1,i,!0)),jv(2*e.y1)===jv(2*e.y2)&&(e.y1=e.y2=lr(e.y1,i,!0)),t}function sr(t){var e=t.shape,i=t.style.linewidth,n=e.x,o=e.y,r=e.width,a=e.height;return e.x=lr(e.x,i,!0),e.y=lr(e.y,i,!0),e.width=math.max(lr(n+r,i,!1)-e.x,0===r?0:1),e.height=math.max(lr(o+a,i,!1)-e.y,0===a?0:1),t}function lr(t,e,i){var n=jv(2*t);return(n+jv(e))%2===0?n/2:(n+(i?1:-1))/2}function hr(t){return null!=t&&"none"!=t}function ur(t){return"string"==typeof t?oe(t,-.1):t}function cr(t){if(t.__hoverstldirty){var e=t.style.stroke,i=t.style.fill,n=t.__hoverstl;n.fill=n.fill||(hr(i)?ur(i):null),n.stroke=n.stroke||(hr(e)?ur(e):null);var o={};for(var r in n)null!=n[r]&&(o[r]=t.style[r]);t.__normalstl=o,t.__hoverstldirty=!1}}function dr(t){if(!t.__ishover){if(cr(t),t.usehoverlayer)t.__zr&&t.__zr.addhover(t,t.__hoverstl);else{var e=t.style,i=e.insiderollbackopt;i&&lr(e),e.extendfrom(t.__hoverstl),i&&(dr(e,e.insideoriginaltextposition,i),null==e.textfill&&(e.textfill=i.autocolor)),t.dirty(!1),t.z2+=1}t.__ishover=!0}}function fr(t){if(t.__ishover){var e=t.__normalstl;t.usehoverlayer?t.__zr&&t.__zr.removehover(t):(e&&t.setstyle(e),t.z2-=1),t.__ishover=!1}}function pr(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&dr(t)}):dr(t)}function gr(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&fr(t)}):fr(t)}function vr(t,e){t.__hoverstl=t.hoverstyle||e||{},t.__hoverstldirty=!0,t.__ishover&&cr(t)}function mr(t){this.__hoversilentontouch&&t.zrbytouch||!this.__isemphasis&&pr(this)}function yr(t){this.__hoversilentontouch&&t.zrbytouch||!this.__isemphasis&&gr(this)}function xr(){this.__isemphasis=!0,pr(this)}function _r(){this.__isemphasis=!1,gr(this)}function wr(t,e,i){t.__hoversilentontouch=i&&i.hoversilentontouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&vr(t,e)}):vr(t,e),t.on("mouseover",mr).on("mouseout",yr),t.on("emphasis",xr).on("normal",_r)}function br(t,e,i,n,o,r,a){o=o||em;var s=o.labelfetcher,l=o.labeldataindex,h=o.labeldimindex,u=i.getshallow("show"),c=n.getshallow("show"),d=u||c?c(s?s.getformattedlabel(l,"normal",null,h):null,o.defaulttext):null,f=u?d:null,p=c?c(s?s.getformattedlabel(l,"emphasis",null,h):null,d):null;(null!=f||null!=p)&&(sr(t,i,r,o),sr(e,n,a,o,!0)),t.text=f,e.text=p}function sr(t,e,i,n,o){return ir(t,e,n,o),i&&a(t,i),t.host&&t.host.dirty&&t.host.dirty(!1),t}function mr(t,e,i){var n,o={isrecttext:!0};i===!1?n=!0:o.autocolor=i,ir(t,e,o,n),t.host&&t.host.dirty&&t.host.dirty(!1)}function ir(t,e,i,n){if(i=i||em,i.isrecttext){var o=e.getshallow("position")||(n?null:"inside");"outside"===o&&(o="top"),t.textposition=o,t.textoffset=e.getshallow("offset");var r=e.getshallow("rotate");null!=r&&(r*=math.pi/180),t.textrotation=r,t.textdistance=c(e.getshallow("distance"),n?null:5)}var a,s=e.ecmodel,l=s&&s.option.textstyle,h=tr(e);if(h){a={};for(var u in h)if(h.hasownproperty(u)){var c=e.getmodel(["rich",u]);ar(a[u]={},c,l,i,n)}}return t.rich=a,ar(t,e,l,i,n,!0),i.forcerich&&!i.textstyle&&(i.textstyle={}),t}function tr(t){for(var e;t&&t!==t.ecmodel;){var i=(t.option||em).rich;if(i){e=e||{};for(var n in i)i.hasownproperty(n)&&(e[n]=1)}t=t.parentmodel}return e}function ar(t,e,i,n,o,r){if(i=!o&&i||em,t.textfill=cr(e.getshallow("color"),n)||i.color,t.textstroke=cr(e.getshallow("textbordercolor"),n)||i.textbordercolor,t.textstrokewidth=c(e.getshallow("textborderwidth"),i.textborderwidth),!o){if(r){var a=t.textposition;t.insiderollback=dr(t,a,n),t.insideoriginaltextposition=a,t.insiderollbackopt=n}null==t.textfill&&(t.textfill=n.autocolor)}t.fontstyle=e.getshallow("fontstyle")||i.fontstyle,t.fontweight=e.getshallow("fontweight")||i.fontweight,t.fontsize=e.getshallow("fontsize")||i.fontsize,t.fontfamily=e.getshallow("fontfamily")||i.fontfamily,t.textalign=e.getshallow("align"),t.textverticalalign=e.getshallow("verticalalign")||e.getshallow("baseline"),t.textlineheight=e.getshallow("lineheight"),t.textwidth=e.getshallow("width"),t.textheight=e.getshallow("height"),t.texttag=e.getshallow("tag"),r&&n.disablebox||(t.textbackgroundcolor=cr(e.getshallow("backgroundcolor"),n),t.textpadding=e.getshallow("padding"),t.textbordercolor=cr(e.getshallow("bordercolor"),n),t.textborderwidth=e.getshallow("borderwidth"),t.textborderradius=e.getshallow("borderradius"),t.textboxshadowcolor=e.getshallow("shadowcolor"),t.textboxshadowblur=e.getshallow("shadowblur"),t.textboxshadowoffsetx=e.getshallow("shadowoffsetx"),t.textboxshadowoffsety=e.getshallow("shadowoffsety")),t.textshadowcolor=e.getshallow("textshadowcolor")||i.textshadowcolor,t.textshadowblur=e.getshallow("textshadowblur")||i.textshadowblur,t.textshadowoffsetx=e.getshallow("textshadowoffsetx")||i.textshadowoffsetx,t.textshadowoffsety=e.getshallow("textshadowoffsety")||i.textshadowoffsety}function cr(t,e){return"auto"!==t?t:e&&e.autocolor?e.autocolor:null}function dr(t,e,i){var n,o=i.useinsidestyle;return null==t.textfill&&o!==!1&&(o===!0||i.isrecttext&&e&&"string"==typeof e&&e.indexof("inside")>=0)&&(n={textfill:null,textstroke:t.textstroke,textstrokewidth:t.textstrokewidth},t.textfill="#fff",null==t.textstroke&&(t.textstroke=i.autocolor,null==t.textstrokewidth&&(t.textstrokewidth=2))),n}function lr(t){var e=t.insiderollback;e&&(t.textfill=e.textfill,t.textstroke=e.textstroke,t.textstrokewidth=e.textstrokewidth)}function pr(t,e){var i=e||e.getmodel("textstyle");return[t.fontstyle||i&&i.getshallow("fontstyle")||"",t.fontweight||i&&i.getshallow("fontweight")||"",(t.fontsize||i&&i.getshallow("fontsize")||12)+"px",t.fontfamily||i&&i.getshallow("fontfamily")||"sans-serif"].join(" ")}function kr(t,e,i,n,o,r){"function"==typeof o&&(r=o,o=null);var a=n&&n.isanimationenabled();if(a){var s=t?"update":"",l=n.getshallow("animationduration"+s),h=n.getshallow("animationeasing"+s),u=n.getshallow("animationdelay"+s);"function"==typeof u&&(u=u(o,n.getanimationdelayparams?n.getanimationdelayparams(e,o):null)),"function"==typeof l&&(l=l(o)),l>0?e.animateto(i,l,u||0,h,r,!!r):(e.stopanimation(),e.attr(i),r&&r())}else e.stopanimation(),e.attr(i),r&&r()}function or(t,e,i,n,o){kr(!0,t,e,i,n,o)}function zr(t,e,i,n,o){kr(!1,t,e,i,n,o)}function rr(t,e){for(var i=ce([]);t&&t!==e;)fe(i,t.getlocaltransform(),i),t=t.parent;return i}function er(t,e,i){return e&&!d(e)&&(e=yf.getlocaltransform(e)),i&&(e=me([],e)),ie([],t,e)}function br(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:math.abs(2*e[4]/e[2]),r=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return r=er(r,e,i),math.abs(r[0])>math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function vr(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isgroup&&t.anid&&(e[t.anid]=t)}),e}function o(t){var e={position:f(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=n(t);e.traverse(function(t){if(!t.isgroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),or(t,n,i,t.dataindex)}}})}}function nr(t,e){return p(t,function(t){var i=t[0];i=qv(i,e.x),i=tm(i,e.x+e.width);var n=t[1];return n=qv(n,e.y),n=tm(n,e.y+e.height),[i,n]})}function fr(t,e){var i=qv(t.x,e.x),n=tm(t.x+t.width,e.x+e.width),o=qv(t.y,e.y),r=tm(t.y+t.height,e.y+e.height);return n>=i&&r>=o?{x:i,y:o,width:n-i,height:r-o}:void 0}function gr(t,e,i){e=a({recthover:!0},e);var n=e.style={strokenoscale:!0};return i=i||{x:-1,y:-1,width:2,height:2},t?0===t.indexof("image://")?(n.image=t.slice(8),s(n,i),new tn(e)):ir(t.replace("path://",""),e,i,"center"):void 0}function hr(t,e,i){this.parentmodel=e,this.ecmodel=i,this.option=t}function wr(t,e,i){for(var n=0;no;o++){var a=e[o];!i.hasownproperty(a)&&n.hasownproperty(a)&&(i[a]=n[a])}}function qr(t){return t&&(null==t.value?t:t.value)}function yr(t){return um(t)&&!(t instanceof array)}function jr(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+gn(t)),null==t||""===t?0/0:+t)}function $r(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return hm(e,function(t,n){if(um(t)){for(var o=0;o=i.length&&i.push({option:t})}}),i}function kr(t){var e=e();hm(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),hm(t,function(t){var i=t.option;k(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyinfo&&(t.keyinfo={})}),hm(t,function(t){var i=t.exist,n=t.option,o=t.keyinfo;if(um(n)){if(o.name=null!=n.name?n.name+"":i?i.name:"\x00-",i)o.id=i.id;else if(null!=n.id)o.id=n.id+"";else{var r=0;do o.id="\x00"+o.name+"\x00"+r++;while(e.get(o.id))}e.set(o.id,t)}})}function jr(t){return um(t)&&t.id&&0===(t.id+"").indexof("\x00_ec_\x00")}function qr(t,e){function i(t,e,i){for(var n=0,o=t.length;o>n;n++)for(var r=t[n].seriesid,a=ur(t[n].dataindex),s=i&&i[r],l=0,h=a.length;h>l;l++){var u=a[l];s&&s[u]?s[u]=null:(e[r]||(e[r]={}))[u]=1}}function n(t,e){var i=[];for(var o in t)if(t.hasownproperty(o)&&null!=t[o])if(e)i.push(+o);else{var r=n(t[o],!0);r.length&&i.push({seriesid:o,dataindex:r})}return i}var o={},r={};return i(t||[],o),i(e||[],r,o),[n(o),n(r)]}function ta(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 ea(t,e,i){if(b(e)){var n={};n[e+"index"]=0,e=n}var o=i&&i.defaultmaintype;!o||ra(e,o+"index")||ra(e,o+"id")||ra(e,o+"name")||(e[o+"index"]=0);var r={};return hm(e,function(n,o){var n=e[o];if("dataindex"===o||"dataindexinside"===o)return void(r[o]=n);var a=o.match(/^(\w+)(index|id|name)$/)||[],s=a[1],l=(a[2]||"").tolowercase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includemaintypes&&h(i.includemaintypes,s)<0)){var u={maintype:s};("index"!==l||"all"!==n)&&(u[l]=n);var c=t.querycomponents(u);r[s+"models"]=c,r[s+"model"]=c[0]}}),r}function ia(t,e){var i=t.dimensions;e=t.getdimension(e);for(var n=0;n=0&&i.push(t)}),i}t.topologicaltravel=function(t,e,n,o){function r(t){l[t].entrycount--,0===l[t].entrycount&&h.push(t)}function a(t){u[t]=!0,r(t)}if(t.length){var s=i(e),l=s.graph,h=s.noentrylist,u={};for(f(t,function(t){u[t]=!0});h.length;){var c=h.pop(),d=l[c],p=!!u[c];p&&(n.call(o,c,d.originaldeps.slice()),delete u[c]),f(d.successor,p?a:r)}f(u,function(){throw new error("circle dependency may exists")})}}}function ha(t,e,i,n,o){var r=0,a=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachchild(function(l,h){var u,c,d=l.position,f=l.getboundingrect(),p=e.childat(h+1),g=p&&p.getboundingrect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);u=r+v,u>n||l.newline?(r=0,u=v,a+=s+i,s=f.height):s=math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=a+m,c>o||l.newline?(r+=s+i,a=0,c=m,s=f.width):s=math.max(s,f.width)}l.newline||(d[0]=r,d[1]=a,"horizontal"===t?r=u+i:a=c+i)})}function ua(t,e,i){i=mg(i||0);var n=e.width,o=e.height,r=kn(t.left,n),a=kn(t.top,o),s=kn(t.right,n),l=kn(t.bottom,o),h=kn(t.width,n),u=kn(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isnan(h)&&(h=n-s-d-r),isnan(u)&&(u=o-l-c-a),null!=f&&(isnan(h)&&isnan(u)&&(f>n/o?h=.8*n:u=.8*o),isnan(h)&&(h=f*u),isnan(u)&&(u=h/f)),isnan(r)&&(r=n-s-h-d),isnan(a)&&(a=o-l-u-c),t.left||t.right){case"center":r=n/2-h/2-i[3];break;case"right":r=n-h-d}switch(t.top||t.bottom){case"middle":case"center":a=o/2-u/2-i[0];break;case"bottom":a=o-u-c}r=r||0,a=a||0,isnan(h)&&(h=n-d-r-(s||0)),isnan(u)&&(u=o-c-a-(l||0));var p=new qe(r+i[3],a+i[0],h,u);return p.margin=i,p}function ca(t,e,i,n,o){var r=!o||!o.hv||o.hv[0],a=!o||!o.hv||o.hv[1],l=o&&o.boundingmode||"all";if(r||a){var h;if("raw"===l)h="group"===t.type?new qe(0,0,+e.width||0,+e.height||0):t.getboundingrect(); else if(h=t.getboundingrect(),t.needlocaltransform()){var u=t.getlocaltransform();h=h.clone(),h.applytransform(u)}e=ua(s({width:h.width,height:h.height},e),i,n);var c=t.position,d=r?e.x-h.x:0,f=a?e.y-h.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function da(t,e,i){function n(i,n){var a={},l=0,h={},u=0,c=2;if(vm(i,function(e){h[e]=t[e]}),vm(i,function(t){o(e,t)&&(a[t]=h[t]=e[t]),r(a,t)&&l++,r(h,t)&&u++}),s[n])return r(e,i[1])?h[i[2]]=null:r(e,i[2])&&(h[i[1]]=null),h;if(u!==c&&l){if(l>=c)return a;for(var d=0;d=e:"max"===i?e>=t:t===e}function ca(t,e){return t.join(",")===e.join(",")}function da(t,e){e=e||{},em(e,function(e,i){if(null!=e){var n=t[i];if(bm.hasclass(i)){e=ur(e),n=ur(n);var o=$r(n,e);t[i]=vm(o,function(t){return t.option&&t.exist?nm(t.exist,t.option,!0):t.exist||t.option})}else t[i]=nm(n,e,!0)}})}function la(t){var e=t&&t.itemstyle;if(e)for(var i=0,n=wm.length;n>i;i++){var r=wm[i],a=e.normal,s=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?o(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),s&&s[r]&&(t[r]=t[r]||{},t[r].emphasis?o(t[r].emphasis,s[r]):t[r].emphasis=s[r],s[r]=null)}}function pa(t,e){var i=hm(t)&&t[e],n=hm(i)&&i.textstyle;if(n)for(var o=0,r=cm.length;r>o;o++){var e=cm[o];n.hasownproperty(e)&&(i[e]=n[e])}}function ka(t){hm(t)&&(pa(t,"normal"),pa(t,"emphasis"))}function oa(t){if(hm(t)){la(t),ka(t.label),ka(t.upperlabel),ka(t.edgelabel);var e=t.markpoint;la(e),ka(e&&e.label);var i=t.markline;la(t.markline),ka(i&&i.label);var n=t.markarea;ka(n&&n.label),pa(t,"axislabel"),pa(t,"title"),pa(t,"detail");var o=t.data;if(o)for(var r=0;r=0?n():c=settimeout(n,-r),h=o};return d.clear=function(){c&&(cleartimeout(c),c=null)},d.debouncenextcall=function(t){l=t},d}function wa(t,e,i,n){var o=t[e];if(o){var r=o[qm]||o,a=o[ey],s=o[ty];if(s!==i||a!==n){if(null==i||!n)return t[e]=r;o=t[e]=ha(r,i,"debounce"===n),o[qm]=r,o[ey]=n,o[ty]=i}return o}}function za(t,e){var i=t[e];i&&i[qm]&&(t[e]=i[qm])}function ua(t){return function(e,i,n){e=e&&e.tolowercase(),ff.prototype[t].call(this,e,i,n)}}function xa(){ff.call(this)}function qa(t,e,i){function o(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=ly[e]),this.id,this.group,this._dom=t;var r="canvas",a=this._zr=in(t,{renderer:i.renderer||r,devicepixelratio:i.devicepixelratio,width:i.width,height:i.height});this._throttledzrflush=ha(y(a.flush,a),17);var e=n(e);e&&ym(e,!0),this._theme=e,this._chartsviews=[],this._chartsmap={},this._componentsviews=[],this._componentsmap={},this._coordsysmgr=new sa,this._api=hs(this),ff.call(this),this._messagecenter=new xa,this._initevents(),this.resize=y(this.resize,this),this._pendingactions=[],si(dy,o),si(ty,o),a.animation.on("frame",this._onframe,this),o(this)}function ya(t,e,i){var n,o=this._model,r=this._coordsysmgr.getcoordinatesystems();e=ea(o,e);for(var a=0;ae.get("hoverlayerthreshold")&&!vf.node&&i.traverse(function(t){t.isgroup||(t.usehoverlayer=!0)})}function ss(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),o=i>t.get("progressivethreshold")&&n&&!vf.node;o&&e.group.traverse(function(t){t.isgroup||(t.progressive=o?math.floor(i++/n):-1,o&&t.stopanimation(!0))});var r=t.get("blendmode")||null;e.group.traverse(function(t){t.isgroup||t.setstyle("blend",r)})}function ls(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function hs(t){var e=t._coordsysmgr;return a(new ba(t),{getcoordinatesystems:y(e.getcoordinatesystems,e),getcomponentbyelement:function(e){for(;e;){var i=e.__eccomponentinfo;if(null!=i)return t._model.getcomponent(i.maintype,i.index);e=e.parent}}})}function us(t){function e(t,e){for(var i=0;i=0?new l.constructor(r[s].length):r[s]}return n}function gs(t,e,i){function o(t,e,i){ky[e]?t.otherdims[e]=i:(t.coorddim=e,t.coorddimindex=i,h.set(e,!0))}function r(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}e=e||[],i=i||{},t=(t||[]).slice();var a=(i.dimsdef||[]).slice(),s=e(i.encodedef),l=e(),h=e(),u=[],c=i.dimcount;if(null==c){var d=hs(e[0]);c=math.max(_(d)&&d.length||1,t.length,a.length),yy(t,function(t){var e=t.dimsdef;e&&(c=math.max(c,e.length))})}for(var f=0;c>f;f++){var p=jy(a[f])?{name:a[f]}:a[f]||{},g=p.name,v=u[f]={otherdims:{}};null!=g&&null==l.get(g)&&(v.name=v.tooltipname=g,l.set(g,f)),null!=p.type&&(v.type=p.type)}s.each(function(t,e){t=s.set(e,ur(t).slice()),yy(t,function(i,n){jy(i)&&(i=l.get(i)),null!=i&&c>i&&(t[n]=i,o(u[i],e,n))})});var m=0;yy(t,function(t){var e,t,i,r;jy(t)?(e=t,t={}):(e=t.name,t=n(t),i=t.dimsdef,r=t.otherdims,t.name=t.coorddim=t.coorddimindex=t.dimsdef=t.otherdims=null);var a=ur(s.get(e));if(!a.length)for(var l=0;l<(i&&i.length||1);l++){for(;mx;x++){var v=u[x]=u[x]||{},w=v.coorddim;null==w&&(v.coorddim=r(y,h,i.extrafromzero),v.coorddimindex=0,v.isextracoord=!0),null==v.name&&(v.name=r(v.coorddim,l)),null==v.type&&jy(e,x)&&(v.type="ordinal")}return u}function hs(t){return _(t)?t:s(t)?t.value:t}function ws(t){for(var e=0;e=0&&zs(t)?function(t,e,i,n){return yr(t)&&(c.hasitemoption=!0),n===u?i:jr(qr(t),l[n])}:function(t,e,i,n){var o=qr(t),r=jr(o&&o[n],l[n]);yr(t)&&(c.hasitemoption=!0);var a=s&&s.categoryaxesmodels;return a&&a[e]&&"string"==typeof r&&(f[e]=f[e]||a[e].getcategories(),r=h(f[e],r),0>r&&!isnan(r)&&(r=+r)),r};return c.hasitemoption=!1,c.initdata(t,d,p),c}function xs(t){return"category"!==t&&"time"!==t}function qs(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function ys(t,e){var i,n=[],o=t&&t.dimensions[t.categoryindex];if(o&&(i=t.categoryaxesmodels[o.name]),i){var r=i.getcategories();if(r){var a=e.length;if(_(e[0])&&e[0].length>1){n=[];for(var s=0;a>s;s++)n[s]=r[e[s][t.categoryindex||0]]}else n=r.slice(0)}}return n}function js(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function $s(t,e,i,n){var o={},r=t[1]-t[0],a=o.interval=zn(r/e,!0);null!=i&&i>a&&(a=o.interval=i),null!=n&&a>n&&(a=o.interval=n);var s=o.intervalprecision=ks(a),l=o.nicetickextent=[ix(math.ceil(t[0]/a)*a,s),ix(math.floor(t[1]/a)*a,s)];return qs(l,t),o}function ks(t){return en(t)+2}function js(t,e,i){t[e]=math.max(math.min(t[e],i[1]),i[0])}function qs(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),js(t,0,e),js(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function tl(t,e,i,n){var o=[];if(!t)return o;var r=1e4;e[0]r)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function el(t,e){return yx(t,mx(e))}function il(t,e){var i,n,o,r=t.type,a=e.getmin(),s=e.getmax(),l=null!=a,h=null!=s,u=t.getextent();return"ordinal"===r?i=(e.get("data")||[]).length:(n=e.get("boundarygap"),_(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=kn(n[0],1),n[1]=kn(n[1],1),o=u[1]-u[0]||math.abs(u[0])),null==a&&(a="ordinal"===r?i?0:0/0:u[0]-n[0]*o),null==s&&(s="ordinal"===r?i?i-1:0/0:u[1]+n[1]*o),"datamin"===a?a=u[0]:"function"==typeof a&&(a=a({min:u[0],max:u[1]})),"datamax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==a||!isfinite(a))&&(a=0/0),(null==s||!isfinite(s))&&(s=0/0),t.setblank(t(a)||t(s)),e.getneedcrosszero()&&(a>0&&s>0&&!l&&(a=0),0>a&&0>s&&!h&&(s=0)),[a,s]}function nl(t,e){var i=il(t,e),n=null!=e.getmin(),o=null!=e.getmax(),r=e.get("splitnumber");"log"===t.type&&(t.base=e.get("logbase"));var a=t.type;t.setextent(i[0],i[1]),t.niceextent({splitnumber:r,fixmin:n,fixmax:o,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 ol(t,e){if(e=e||t.get("type"))switch(e){case"category":return new ex(t.getcategories(),[1/0,-1/0]);case"value":return new ox;default:return(js.getclass(e)||ox).create(t)}}function rl(t){var e=t.scale.getextent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function al(t,e,i,n,o){var r,a=0,s=0,l=(n-o)/180*math.pi,h=1;e.length>40&&(h=math.floor(e.length/40));for(var u=0;u1?h:(a+1)*h-1}function sl(t,e){var i=t.scale,n=i.gettickslabels(),o=i.getticks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),p(n,e)):"function"==typeof e?p(o,function(i,n){return e(ll(t,i),n)},this):n}function ll(t,e){return"category"===t.type?t.scale.getlabel(e):e}function hl(t){return s(t)&&null!=t.value?t.value:t+""}function ul(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symboltype?i.stroke=t:this.__isemptybrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function cl(t,e,i,n,o,r,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://")?nr(t.slice(8),new qe(e,i,n,o),a?"center":"cover"):0===t.indexof("path://")?ir(t.slice(7),{},new qe(e,i,n,o),a?"center":"cover"):new kx({shape:{symboltype:t,x:e,y:i,width:n,height:o}}),l.__isemptybrush=s,l.setcolor=ul,l.setcolor(r),l}function dl(t){var e=t.get("data");return us(e,t,t.ecmodel)}function fl(t,e){var i=e;e instanceof hr||(i=new hr(e),c(i,mx));var n=ol(i);return n.setextent(t[0],t[1]),nl(n,i),n}function pl(t){c(t,mx)}function gl(t,e){var i=t[1]-t[0],n=e,o=i/n/2;t[0]+=o,t[1]-=o}function vl(t,e){return math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=o,l+=r,o=s,r=l,n.push([s/i,l/i])}return n}function wl(t){return t.get("stack")||fx+t.seriesindex}function bl(t){return t.dim+t.index}function sl(t,e){var i=[],n=t.axis,o="axis0";if("category"===n.type){for(var r=n.getbandwidth(),a=0;ae&&(e=math.min(e,s),t.width&&(e=math.min(e,t.width)),s-=e,t.width=e,l--)}),h=(s-r)/(l+(l-1)*a),h=math.max(h,0);var u,c=0;f(n,function(t){t.width||(t.width=h),u=t,c+=t.width*(1+a)}),u&&(c-=u.width*a);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+a)})}),i}function tl(t,e){var i=ml(v(e.getseriesbytype(t),function(t){return!e.isseriesfiltered(t)&&t.coordinatesystem&&"cartesian2d"===t.coordinatesystem.type})),n={},o={};e.eachseriesbytype(t,function(t){if("cartesian2d"===t.coordinatesystem.type){var e=t.getdata(),r=t.coordinatesystem,a=r.getbaseaxis(),s=wl(t),l=i[bl(a)][s],h=l.offset,u=l.width,c=r.getotheraxis(a),d=t.get("barminheight")||0,f=a.onzero?c.toglobalcoord(c.datatocoord(0)):c.getglobalextent()[0],p=[t.coorddimtodatadim("x")[0],t.coorddimtodatadim("y")[0]],g=e.maparray(p,function(t,e){return r.datatopoint([t,e])},!0);n[s]=n[s]||[],o[s]=o[s]||[],e.setlayout({offset:h,size:u}),e.each(t.coorddimtodatadim(c.dim)[0],function(t,i){if(!isnan(t)){n[s][i]||(n[s][i]={p:f,n:f},o[s][i]={p:f,n:f});var r,a,l,p,v=t>=0?"p":"n",m=g[i],y=n[s][i][v],x=o[s][i][v];c.ishorizontal()?(r=y,a=m[1]+h,l=m[0]-x,p=u,o[s][i][v]+=l,math.abs(l)l?-1:1)*d),n[s][i][v]+=l):(r=m[0]+h,a=y,l=u,p=m[1]-x,o[s][i][v]+=p,math.abs(p)=p?-1:1)*d),n[s][i][v]+=p),e.setitemlayout(i,{x:r,y:a,width:l,height:p})}},!0)}},this)}function al(t){return this._axes[t]}function cl(t){gx.call(this,t)}function dl(t,e){return e.type||(e.data?"category":"value")}function ll(t,e){return t.getcoordsysmodel()===e}function pl(t,e){var i=e*math.pi/180,n=t.plain(),o=n.width,r=n.height,a=o*math.cos(i)+r*math.sin(i),s=o*math.sin(i)+r*math.cos(i),l=new qe(n.x,n.y,a,s);return l}function kl(t){var e,i=t.model,n=i.getformattedlabels(),o=i.getmodel("axislabel"),r=1,a=n.length;a>40&&(r=math.ceil(a/40));for(var s=0;a>s;s+=r)if(!t.islabelignored(s)){var l=o.gettextrect(n[s]),h=pl(l,o.get("rotate")||0);e?e.union(h):e=h}return e}function ol(t,e,i){this._coordsmap={},this._coordslist=[],this._axesmap={},this._axeslist=[],this._initcartesian(t,e,i),this.model=t}function zl(t,e,i){var n=t[e];if(i.onzero){var o=i.onzeroaxisindex;if(null!=o){var r=n[o];return void(r&&rl(r)&&(i.onzero=!1))}for(var a in n)if(n.hasownproperty(a)){var r=n[a];if(r&&!rl(r)){o=+a;break}}null==o&&(i.onzero=!1),i.onzeroaxisindex=o}}function rl(t){return"category"===t.type||"time"===t.type||!$x(t)}function el(t,e){var i=t.getextent(),n=i[0]+i[1];t.toglobalcoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.tolocalcoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function bl(t){return p(qx,function(e){var i=t.getreferringcomponents(e)[0];return i})}function vl(t){return"cartesian2d"===t.get("coordinatesystem")}function nl(t,e,i,n,o,r){var a=i.getmodel("label.normal"),s=i.getmodel("label.emphasis");br(t,e,a,s,{labelfetcher:o,labeldataindex:r,defaulttext:o.getrawvalue(r),isrecttext:!0,autocolor:n}),fl(t),fl(e)}function fl(t,e){"outside"===t.textposition&&(t.textposition=e)}function gl(t,e,i){i.style.text=null,or(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function hl(t,e,i){i.style.text=null,or(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function wl(t,e,i,n,o,r,a,l){var h=e.getitemvisual(i,"color"),u=e.getitemvisual(i,"opacity"),c=n.getmodel("itemstyle.normal"),d=n.getmodel("itemstyle.emphasis").getbaritemstyle();l||t.setshape("r",c.get("barborderradius")||0),t.usestyle(s({fill:h,opacity:u},c.getbaritemstyle()));var f=n.getshallow("cursor");f&&t.attr("cursor",f);var p=a?o.height>0?"bottom":"top":o.width>0?"left":"right";l||nl(t.style,d,n,h,r,i,p),wr(t,d)}function zl(t,e){var i=t.get(n_)||0;return math.min(i,math.abs(e.width),math.abs(e.height))}function ul(t){var e={componenttype:t.maintype};return e[t.maintype+"index"]=t.componentindex,e}function xl(t,e,i,n){var o,r,a=nn(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return fn(a-a_/2)?(r=l?"bottom":"top",o="center"):fn(a-1.5*a_)?(r=l?"top":"bottom",o="center"):(r="middle",o=1.5*a_>a&&a>a_/2?l?"left":"right":l?"right":"left"),{rotation:a,textalign:o,textverticalalign:r}}function ql(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerevent")||e&&e.show)}function yl(t,e,i){var n=t.get("axislabel.showminlabel"),o=t.get("axislabel.showmaxlabel");e=e||[],i=i||[];var r=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];n===!1?(jl(r),jl(h)):$l(r,a)&&(n?(jl(a),jl(u)):(jl(r),jl(h))),o===!1?(jl(s),jl(c)):$l(l,s)&&(o?(jl(l),jl(d)):(jl(s),jl(c)))}function jl(t){t&&(t.ignore=!0)}function $l(t,e){var i=t&&t.getboundingrect().clone(),n=e&&e.getboundingrect().clone();if(i&&n){var o=ce([]);return ge(o,o,-t.rotation),i.applytransform(fe([],o,t.getlocaltransform())),n.applytransform(fe([],o,e.getlocaltransform())),i.intersect(n)}}function kl(t){return"middle"===t||"center"===t}function jl(t,e,i){var n=e.axis;if(e.get("axistick.show")&&!n.scale.isblank()){for(var o=e.getmodel("axistick"),r=o.getmodel("linestyle"),a=o.get("length"),l=c_(o,i.labelinterval),h=n.gettickscoords(o.get("alignwithlabel")),u=n.scale.getticks(),c=e.get("axislabel.showminlabel"),d=e.get("axislabel.showmaxlabel"),f=[],p=[],g=t._transform,v=[],m=h.length,y=0;m>y;y++)if(!u_(n,y,l,m,c,d)){var x=h[y];f[0]=x,f[1]=0,p[0]=x,p[1]=i.tickdirection*a,g&&(ie(f,f,g),ie(p,p,g));var _=new zv(ar({anid:"tick_"+u[y],shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]},style:s(r.getlinestyle(),{stroke:e.get("axisline.linestyle.color")}),z2:2,silent:!0}));t.group.add(_),v.push(_)}return v}}function ql(t,e,i){var n=e.axis,o=a(i.axislabelshow,e.get("axislabel.show"));if(o&&!n.scale.isblank()){var r=e.getmodel("axislabel"),a=r.get("margin"),s=n.scale.getticks(),l=e.getformattedlabels(),h=(a(i.labelrotate,r.get("rotate"))||0)*a_/180,u=h_(i.rotation,h,i.labeldirection),c=e.get("data"),d=[],p=ql(e),g=e.get("triggerevent"),v=e.get("axislabel.showminlabel"),m=e.get("axislabel.showmaxlabel");return f(s,function(o,h){if(!u_(n,h,i.labelinterval,s.length,v,m)){var f=r;c&&c[o]&&c[o].textstyle&&(f=new hr(c[o].textstyle,r,e.ecmodel));var y=f.gettextcolor()||e.get("axisline.linestyle.color"),x=n.datatocoord(o),_=[x,i.labeloffset+i.labeldirection*a],w=n.scale.getlabel(o),b=new ov({anid:"label_"+o,position:_,rotation:u.rotation,silent:p,z2:10});sr(b.style,f,{text:l[h],textalign:f.getshallow("align",!0)||u.textalign,textverticalalign:f.getshallow("verticalalign",!0)||f.getshallow("baseline",!0)||u.textverticalalign,textfill:"function"==typeof y?y("category"===n.type?w:"value"===n.type?o+"":o,h):y}),g&&(b.eventdata=ul(e),b.eventdata.targettype="axislabel",b.eventdata.value=w),t._dumbgroup.add(b),b.updatetransform(),d.push(b),t.group.add(b),b.decomposetransform()}}),d}}function th(t,e){var i={axesinfo:{},seriesinvolved:!1,coordsysaxesinfo:{},coordsysmap:{}};return eh(i,t,e),i.seriesinvolved&&nh(i,t),i}function eh(t,e,i){var n=e.getcomponent("tooltip"),o=e.getcomponent("axispointer"),r=o.get("link",!0)||[],a=[];d_(i.getcoordinatesystems(),function(i){function s(n,s,l){var u=l.model.getmodel("axispointer",o),d=u.get("show");if(d&&("auto"!==d||n||hh(u))){null==s&&(s=u.get("triggertooltip")),u=n?ih(l,c,o,e,n,s):u;var f=u.get("snap"),p=uh(l.model),g=s||f||"category"===l.type,v=t.axesinfo[p]={key:p,axis:l,coordsys:i,axispointermodel:u,triggertooltip:s,involveseries:g,snap:f,usehandle:hh(u),seriesmodels:[]};h[p]=v,t.seriesinvolved|=g;var m=oh(r,l);if(null!=m){var y=a[m]||(a[m]={axesinfo:{}});y.axesinfo[p]=v,y.mapper=r[m].mapper,v.linkgroup=y}}}if(i.axispointerenabled){var l=uh(i.model),h=t.coordsysaxesinfo[l]={};t.coordsysmap[l]=i;var u=i.model,c=u.getmodel("tooltip",n);if(d_(i.getaxes(),f_(s,!1,null)),i.gettooltipaxes&&n&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axispointer.type"),p=i.gettooltipaxes(c.get("axispointer.axis"));(d||f)&&d_(p.baseaxes,f_(s,f?"cross":!0,d)),f&&d_(p.otheraxes,f_(s,"cross",!1))}}})}function ih(t,e,i,o,r,a){var l=e.getmodel("axispointer"),h={};d_(["type","snap","linestyle","shadowstyle","label","animation","animationdurationupdate","animationeasingupdate","z"],function(t){h[t]=n(l.get(t))}),h.snap="category"!==t.type&&!!a,"cross"===l.get("type")&&(h.type="line");var u=h.label||(h.label={});if(null==u.show&&(u.show=!1),"cross"===r&&(u.show=!0,!a)){var c=h.linestyle=l.get("crossstyle");c&&s(u,c.textstyle)}return t.model.getmodel("axispointer",new hr(h,i,o))}function nh(t,e){e.eachseries(function(e){var i=e.coordinatesystem,n=e.get("tooltip.trigger",!0),o=e.get("tooltip.show",!0);i&&"none"!==n&&n!==!1&&"item"!==n&&o!==!1&&e.get("axispointer.show",!0)!==!1&&d_(t.coordsysaxesinfo[uh(i.model)],function(t){var n=t.axis;i.getaxis(n.dim)===n&&(t.seriesmodels.push(e),null==t.seriesdatacount&&(t.seriesdatacount=0),t.seriesdatacount+=e.getdata().count())})},this)}function oh(t,e){for(var i=e.model,n=e.dim,o=0;o=0||t===e}function ah(t){var e=sh(t);if(e){var i=e.axispointermodel,n=e.axis.scale,o=i.option,r=i.get("status"),a=i.get("value");null!=a&&(a=n.parse(a));var s=hh(i);null==r&&(o.status=s?"show":"hide");var l=n.getextent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a=0?1:-1}function bh(t,e,i){for(var n,o=t.getbaseaxis(),r=t.getotheraxis(o),a=o.onzero?0:r.scale.getextent()[0],s=r.dim,l="x"===s||"radius"===s?1:0,h=e.stackedon,u=e.get(s,i);h&&wh(h.get(s,i))===wh(u);){n=h;break}var c=[];return c[l]=e.get(o.dim,i),c[1-l]=n?n.get(s,i,!0):a,t.datatopoint(c)}function sh(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function mh(t){return isnan(t[0])||isnan(t[1])}function ih(t,e,i,n,o,r,a,s,l,h,u){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=o||0>d)break;if(mh(p)){if(u){d+=r;continue}break}if(d===i)t[r>0?"moveto":"lineto"](p[0],p[1]),p_(o_,p);else if(l>0){var g=d+r,v=e[g];if(u)for(;v&&mh(e[g]);)g+=r,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||mh(v))p_(z_,p);else{mh(v)&&!u&&(v=p),z(k_,v,y);var x,_;if("x"===h||"y"===h){var w="x"===h?0:1;x=math.abs(p[w]-y[w]),_=math.abs(p[w]-v[w])}else x=ef(p,y),_=ef(p,v);m=_/(_+x),l_(z_,p,k_,-l*(1-m))}c_(o_,o_,s),d_(o_,o_,a),c_(z_,z_,s),d_(z_,z_,a),t.beziercurveto(o_[0],o_[1],z_[0],z_[1],p[0],p[1]),l_(o_,p,k_,l*m)}else t.lineto(p[0],p[1]);c=d,d+=r}return f}function th(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;on[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1])}return{min:e?i:n,max:e?n:i}}function ah(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function lh(t){return t>=0?1:-1}function ph(t,e){var i=t.getbaseaxis(),n=t.getotheraxis(i),o=0;if(!i.onzero){var r=n.scale.getextent();r[0]>0?o=r[0]:r[1]<0&&(o=r[1])}var a=n.dim,s="x"===a||"radius"===a?1:0;return e.maparray([a],function(n,r){for(var l,h=e.stackedon;h&&lh(h.get(a,r))===lh(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,r),u[1-s]=l?l.get(a,r,!0):o,t.datatopoint(u)},!0)}function kh(t,e,i){var n=dh(t.getaxis("x")),o=dh(t.getaxis("y")),r=t.getbaseaxis().ishorizontal(),a=math.min(n[0],n[1]),s=math.min(o[0],o[1]),l=math.max(n[0],n[1])-a,h=math.max(o[0],o[1])-s,u=i.get("linestyle.normal.width")||2,c=i.get("clipoverflow")?u/2:math.max(l,h);r?(s-=c,h+=2*c):(a-=c,l+=2*c);var d=new wv({shape:{x:a,y:s,width:l,height:h}});return e&&(d.shape[r?"width":"height"]=0,zr(d,{shape:{width:l,height:h}},i)),d}function oh(t,e,i){var n=t.getangleaxis(),o=t.getradiusaxis(),r=o.getextent(),a=n.getextent(),s=math.pi/180,l=new bv({shape:{cx:t.cx,cy:t.cy,r0:r[0],r:r[1],startangle:-a[0]*s,endangle:-a[1]*s,clockwise:n.inverse}});return e&&(l.shape.endangle=-a[0]*s,zr(l,{shape:{endangle:-a[1]*s}},i)),l}function zh(t,e,i){return"polar"===t.type?oh(t,e,i):kh(t,e,i)}function rh(t,e,i){for(var n=e.getbaseaxis(),o="x"===n.dim||"radius"===n.dim?0:1,r=[],a=0;a=0;o--)if(i[o].dimension<2){n=i[o];break}if(n&&"cartesian2d"===e.type){var r=n.dimension,a=t.dimensions[r],s=e.getaxis(a),l=p(n.stops,function(t){return{coord:s.toglobalcoord(s.datatocoord(t.value)),color:t.color}}),h=l.length,u=n.outercolors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=10,d=l[0].coord-c,g=l[h-1].coord+c,v=g-d;if(.001>v)return"transparent";f(l,function(t){t.offset=(t.coord-d)/v}),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var m=new $v(0,0,0,0,l,!0);return m[a]=d,m[a+"2"]=g,m}}}function bh(t,e,i,n){var o=e.getdata(),r=this.dataindex,a=o.getname(r),s=e.get("selectedoffset");n.dispatchaction({type:"pietoggleselect",from:t,name:a,seriesid:e.id}),o.each(function(t){vh(o.getitemgraphicel(t),o.getitemlayout(t),e.isselected(o.getname(t)),s,i)})}function vh(t,e,i,n,o){var r=(e.startangle+e.endangle)/2,a=math.cos(r),s=math.sin(r),l=i?n:0,h=[a*l,s*l];o?t.animate().when(200,{position:h}).start("bounceout"):t.attr("position",h)}function nh(t,e){function i(){r.ignore=r.hoverignore,a.ignore=a.hoverignore}function n(){r.ignore=r.normalignore,a.ignore=a.normalignore}wp.call(this);var o=new bv({z2:2}),r=new hv,a=new ov;this.add(o),this.add(r),this.add(a),this.updatedata(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function fh(t,e,i,n,o,r,a){function s(e,i,n){for(var o=e;i>o;o++)if(t[o].y+=n,o>e&&i>o+1&&t[o+1].y>t[o].y+t[o].height)return void l(o,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,o,r){for(var a=r>0?e?number.max_value:0:e?number.max_value:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=o+u>h?math.sqrt((o+u+c)*(o+u+c)-h*h):math.abs(t[s].x-i);e&&d>=a&&(d=a-10),!e&&a>=d&&(d=a+10),t[s].x=i+d*r,a=d}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)u=t[g].y-c,0>u&&s(g,d,-u,o),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>=i?p.push(t[g]):f.push(t[g]);h(f,!1,e,i,n,o),h(p,!0,e,i,n,o)}function gh(t,e,i,n,o,r){for(var a=[],s=[],l=0;l1?(p.width=l,p.height=l/d):(p.height=l,p.width=l*d),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else r=t.getboxlayoutparams(),r.aspect=d,p=ua(r,{width:h,height:u});this.setviewrect(p.x,p.y,p.width,p.height),this.setcenter(t.get("center")),this.setzoom(t.get("zoom"))}function eu(t,e){f(e.get("geocoord"),function(e,i){t.addgeocoord(i,e)})}function iu(t,e){return!!nu(t)[e]}function nu(t){return t[kw]||(t[kw]={})}function ou(t){this.pointerchecker,this._zr=t,this._opt={};var e=y,i=e(ru,this),o=e(au,this),r=e(su,this),a=e(lu,this),l=e(hu,this);ff.call(this),this.setpointerchecker=function(t){this.pointerchecker=t},this.enable=function(e,h){this.disable(),this._opt=s(n(h)||{},{zoomonmousewheel:!0,moveonmousemove:!0,preventdefaultmousemove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",o),t.on("mouseup",r)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",a),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",o),t.off("mouseup",r),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 ru(t){if(!(vn(t)||t.target&&t.target.draggable)){var e=t.offsetx,i=t.offsety;this.pointerchecker&&this.pointerchecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function au(t){if(!vn(t)&&cu(this,"moveonmousemove",t)&&this._dragging&&"pinch"!==t.gestureevent&&!iu(this._zr,"globalpan")){var e=t.offsetx,i=t.offsety,n=this._x,o=this._y,r=e-n,a=i-o;this._x=e,this._y=i,this._opt.preventdefaultmousemove&&$p(t.event),this.trigger("pan",r,a,n,o,e,i)}}function su(t){vn(t)||(this._dragging=!1)}function lu(t){if(cu(this,"zoomonmousewheel",t)&&0!==t.wheeldelta){var e=t.wheeldelta>0?1.1:1/1.1;uu.call(this,t,e,t.offsetx,t.offsety)}}function hu(t){if(!iu(this._zr,"globalpan")){var e=t.pinchscale>1?1.1:1/1.1;uu.call(this,t,e,t.pinchx,t.pinchy)}}function uu(t,e,i,n){this.pointerchecker&&this.pointerchecker(t,i,n)&&($p(t.event),this.trigger("zoom",e,i,n))}function cu(t,e,i){var n=t._opt[e];return n&&(!b(n)||i.event[n+"key"])}function du(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function fu(t,e,i,n){var o=t.target,r=t.zoomlimit,a=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,r){var h=r.min||0,u=r.max||1/0;l=math.max(math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,a[0]-=(i-a[0])*(c-1),a[1]-=(n-a[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function pu(t,e,i){var n=e.getcomponentbyelement(t.toptarget),o=n&&n.coordinatesystem;return n&&n!==i&&!ow[n.maintype]&&o&&o.model!==i}function gu(t){var e=t.getitemstyle(),i=t.get("areacolor");return null!=i&&(e.fill=i),e}function vu(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedmode")&&(i.on("mousedown",function(){t._mousedownflag=!0}),i.on("click",function(r){if(t._mousedownflag){t._mousedownflag=!1;for(var a=r.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:o.uid}})};s[e.maintype+"id"]=e.id,n.dispatchaction(s),mu(e,i)}}}))}function mu(t,e){e.eachchild(function(e){f(e.__regions,function(i){e.trigger(t.isselected(i.name)?"emphasis":"normal")})})}function yu(t,e){var i=new wp;this._controller=new ou(t.getzr()),this._controllerhost={target:e?i:null},this.group=i,this._updategroup=e,this._mousedownflag}function xu(t,e,i){var n=t.getzoom(),o=t.getcenter(),r=e.zoom,a=t.datatopoint(o);if(null!=e.dx&&null!=e.dy){a[0]-=e.dx,a[1]-=e.dy;var o=t.pointtodata(a);t.setcenter(o)}if(null!=r){if(i){var s=i.min||0,l=i.max||1/0;r=math.max(math.min(n*r,l),s)/n}t.scale[0]*=r,t.scale[1]*=r;var h=t.position,u=(e.originx-h[0])*(r-1),c=(e.originy-h[1])*(r-1);h[0]-=u,h[1]-=c,t.updatetransform();var o=t.pointtodata(a);t.setcenter(o),t.setzoom(r*n)}return{center:t.getcenter(),zoom:t.getzoom()}}function _u(t,e){var i={},n=["value"];return f(t,function(t){t.each(n,function(e,n){var o="ec-"+t.getname(n);i[o]=i[o]||[],isnan(e)||i[o].push(e)})}),t[0].map(n,function(n,o){for(var r="ec-"+t[0].getname(o),a=0,s=1/0,l=-1/0,h=i[r].length,u=0;h>u;u++)s=math.min(s,i[r][u]),l=math.max(l,i[r][u]),a+=i[r][u];var c;return c="min"===e?s:"max"===e?l:"average"===e?a/h:a,0===h?0/0:c})}function wu(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=p(e,function(t){var e=[t[0].coord,t[1].coord],i={coords:e};return t[0].name&&(i.fromname=t[0].name),t[1].name&&(i.toname=t[1].name),r([i,t[0],t[1]])}))}function bu(t){return isnan(+t.cpx1)||isnan(+t.cpy1)}function su(t){return"_"+t+"type"}function mu(t,e,i){var n=e.getitemvisual(i,"color"),o=e.getitemvisual(i,t),r=e.getitemvisual(i,t+"size");if(o&&"none"!==o){_(r)||(r=[r,r]);var a=cl(o,-r[0]/2,-r[1]/2,r[0],r[1],n);return a.name=t,a}}function iu(t){var e=new gw({name:"line"});return tu(e.shape,t),e}function tu(t,e){var i=e[0],n=e[1],o=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,o?(t.cpx1=o[0],t.cpy1=o[1]):(t.cpx1=0/0,t.cpy1=0/0)}function au(){var t=this,e=t.childofname("fromsymbol"),i=t.childofname("tosymbol"),n=t.childofname("label");if(e||i||!n.ignore){for(var o=1,r=this.parent;r;)r.scale&&(o/=r.scale[0]),r=r.parent;var a=t.childofname("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointat(0),h=a.pointat(s),u=z([],h,l);if(k(u,u),e){e.attr("position",l);var c=a.tangentat(0);e.attr("rotation",math.pi/2-math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])}if(i){i.attr("position",h);var c=a.tangentat(1);i.attr("rotation",-math.pi/2-math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",h);var d,f,p,g=5*o;if("end"===n.__position)d=[u[0]*g+h[0],u[1]*g+h[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",p=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var v=s/2,c=a.tangentat(v),m=[c[1],-c[0]],y=a.pointat(v);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]),d=[y[0]+m[0]*g,y[1]+m[1]*g],f="center",p="bottom";var x=-math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",p=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textverticalalign:n.__verticalalign||p,textalign:n.__textalign||f},position:d,scale:[o,o]})}}}}function cu(t,e,i){wp.call(this),this._createline(t,e,i)}function du(t){return isnan(t[0])||isnan(t[1])}function lu(t){return!du(t[0])&&!du(t[1])}function pu(t){this._ctor=t||cu,this.group=new wp}function ku(t,e,i){wp.call(this),this.add(this.createline(t,e,i)),this._updateeffectsymbol(t,e)}function ou(t,e,i){wp.call(this),this._createpolyline(t,e,i)}function zu(t,e,i){ku.call(this,t,e,i),this._lastframe=0,this._lastframepercent=0}function ru(){this.group=new wp,this._lineel=new yw}function eu(t){return t instanceof array||(t=[t,t]),t}function bu(t,e){e.update="updateview",ws(e,function(e,i){var n={};return i.eachcomponent({maintype:"geo",query:e},function(i){i[t](e.name);var o=i.coordinatesystem;f(o.regions,function(t){n[t.name]=i.isselected(t.name)||!1})}),{selected:n,name:e.name}})}function vu(t,e,i){var n,o={},r="toggleselected"===t;return i.eachcomponent("legend",function(i){r&&null!=n?i[n?"select":"unselect"](e.name):(i[t](e.name),n=i.isselected(e.name));var a=i.getdata();f(a,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isselected(e);o[e]=o.hasownproperty(e)?o[e]&&n:n}})}),{name:e.name,selected:o}}function nu(t,e){var i=mg(e.get("padding")),n=e.getitemstyle(["color","opacity"]);n.fill=e.get("backgroundcolor");var t=new wv({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderradius")},style:n,silent:!0,z2:-1});return t}function fu(t,e){e.dispatchaction({type:"legendtoggleselect",name:t})}function gu(t,e,i){var n=i.getzr().storage.getdisplaylist()[0];n&&n.usehoverlayer||t.get("legendhoverlink")&&i.dispatchaction({type:"highlight",seriesname:t.name,name:e})}function hu(t,e,i){var n=i.getzr().storage.getdisplaylist()[0];n&&n.usehoverlayer||t.get("legendhoverlink")&&i.dispatchaction({type:"downplay",seriesname:t.name,name:e})}function wu(t,e,i){var n=t.getorient(),o=[1,1];o[n.index]=0,da(e,i,{type:"box",ignoresize:o})}function zu(t,e,i,n,o){var r=t.axis;if(!r.scale.isblank()&&r.containdata(e)){if(!t.involveseries)return void i.showpointer(t,e);var s=uu(e,t),l=s.payloadbatch,h=s.snaptovalue;l[0]&&null==o.seriesindex&&a(o,l[0]),!n&&t.snap&&r.containdata(h)&&null!=h&&(e=h),i.showpointer(t,e,l,o),i.showtooltip(t,s,h)}}function uu(t,e){var i=e.axis,n=i.dim,o=t,r=[],a=number.max_value,s=-1;return cb(e.seriesmodels,function(e){var l,h,u=e.coorddimtodatadim(n);if(e.getaxistooltipdata){var c=e.getaxistooltipdata(u,t,i);h=c.dataindices,l=c.nestestvalue}else{if(h=e.getdata().indicesofnearest(u[0],t,!1,"category"===i.type?.5:null),!h.length)return;l=e.getdata().get(u[0],h[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,o=l,r.length=0),cb(h,function(t){r.push({seriesindex:e.seriesindex,dataindexinside:t,dataindex:e.getdata().getrawindex(t)})}))}}),{payloadbatch:r,snaptovalue:o}}function xu(t,e,i,n){t[e.key]={value:i,payloadbatch:n}}function qu(t,e,i,n){var o=i.payloadbatch,r=e.axis,a=r.model,s=e.axispointermodel;if(e.triggertooltip&&o.length){var l=e.coordsys.model,h=uh(l),u=t.map[h];u||(u=t.map[h]={coordsysid:l.id,coordsysindex:l.componentindex,coordsystype:l.type,coordsysmaintype:l.maintype,databyaxis:[]},t.list.push(u)),u.databyaxis.push({axisdim:r.dim,axisindex:a.componentindex,axistype:a.type,axisid:a.id,value:n,valuelabelopt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesdataindices:o.slice()})}}function yu(t,e,i){var n=i.axesinfo=[];cb(e,function(e,i){var o=e.axispointermodel.option,r=t[i];r?(!e.usehandle&&(o.status="show"),o.value=r.value,o.seriesdataindices=(r.payloadbatch||[]).slice()):!e.usehandle&&(o.status="hide"),"show"===o.status&&n.push({axisdim:e.axis.dim,axisindex:e.axis.model.componentindex,value:o.value})})}function ju(t,e,i,n){if(qu(e)||!t.list.length)return void n({type:"hidetip"});var o=((t.list[0].databyaxis[0]||{}).seriesdataindices||[])[0]||{};n({type:"showtip",escapeconnect:!0,x:e[0],y:e[1],tooltipoption:i.tooltipoption,position:i.position,dataindexinside:o.dataindexinside,dataindex:o.dataindex,seriesindex:o.seriesindex,databycoordsys:t.list})}function $u(t,e,i){var n=i.getzr(),o="axispointerlasthighlights",r=fb(n)[o]||{},a=fb(n)[o]={};cb(t,function(t){var e=t.axispointermodel.option;"show"===e.status&&cb(e.seriesdataindices,function(t){var e=t.seriesindex+" | "+t.dataindex;a[e]=t})});var s=[],l=[];f(r,function(t,e){!a[e]&&l.push(t)}),f(a,function(t,e){!r[e]&&s.push(t)}),l.length&&i.dispatchaction({type:"downplay",escapeconnect:!0,batch:l}),s.length&&i.dispatchaction({type:"highlight",escapeconnect:!0,batch:s})}function ku(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisdim&&e.axis.model.componentindex===n.axisindex)return n}}function ju(t){var e=t.axis.model,i={},n=i.axisdim=t.axis.dim;return i.axisindex=i[n+"axisindex"]=e.componentindex,i.axisname=i[n+"axisname"]=e.name,i.axisid=i[n+"axisid"]=e.id,i}function qu(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function tc(t,e,i){if(!vf.node){var n=e.getzr();gb(n).records||(gb(n).records={}),ec(n,e);var o=gb(n).records[t]||(gb(n).records[t]={});o.handler=i}}function ec(t,e){function i(i,n){t.on(i,function(i){var o=rc(e);vb(gb(t).records,function(t){t&&n(t,i,o.dispatchaction)}),ic(o.pendings,e)})}gb(t).initialized||(gb(t).initialized=!0,i("click",x(oc,"click")),i("mousemove",x(oc,"mousemove")),i("globalout",nc))}function ic(t,e){var i,n=t.showtip.length,o=t.hidetip.length;n?i=t.showtip[n-1]:o&&(i=t.hidetip[o-1]),i&&(i.dispatchaction=null,e.dispatchaction(i))}function nc(t,e,i){t.handler("leave",null,i)}function oc(t,e,i,n){e.handler(t,i,n)}function rc(t){var e={showtip:[],hidetip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchaction=i,t.dispatchaction(n))};return{dispatchaction:i,pendings:e}}function ac(t,e){if(!vf.node){var i=e.getzr(),n=(gb(i).records||{})[t];n&&(gb(i).records[t]=null)}}function sc(){}function lc(t,e,i,n){hc(yb(i).lastprop,n)||(yb(i).lastprop=n,e?or(i,n,t):(i.stopanimation(),i.attr(n)))}function hc(t,e){if(s(t)&&s(e)){var i=!0;return f(e,function(e,n){i=i&&hc(t[n],e)}),!!i}return t===e}function uc(t,e){t[e.get("label.show")?"show":"hide"]()}function cc(t){return{position:t.position.slice(),rotation:t.rotation||0}}function dc(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function fc(t){var e,i=t.get("type"),n=t.getmodel(i+"style");return"line"===i?(e=n.getlinestyle(),e.fill=null):"shadow"===i&&(e=n.getareastyle(),e.stroke=null),e}function pc(t,e,i,n,o){var r=i.get("value"),a=vc(r,e.axis,e.ecmodel,i.get("seriesdataindices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getmodel("label"),l=mg(s.get("padding")||0),h=s.getfont(),u=yi(a,h),c=o.position,d=u.width+l[1]+l[3],f=u.height+l[0]+l[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=o.verticalalign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),gc(c,d,f,n);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:h,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 gc(t,e,i,n){var o=n.getwidth(),r=n.getheight();t[0]=math.min(t[0]+e,o)-e,t[1]=math.min(t[1]+i,r)-i,t[0]=math.max(t[0],0),t[1]=math.max(t[1],0)}function vc(t,e,i,n,o){var r=e.scale.getlabel(t,{precision:o.precision}),a=o.formatter;if(a){var s={value:ll(e,t),seriesdata:[]};f(n,function(t){var e=i.getseriesbyindex(t.seriesindex),n=t.dataindexinside,o=e&&e.getdataparams(n);o&&s.seriesdata.push(o)}),b(a)?r=a.replace("{value}",r):w(a)&&(r=a(s))}return r}function mc(t,e,i){var n=ue();return ge(n,n,i.rotation),pe(n,n,i.position),er([t.datatocoord(e),(i.labeloffset||0)+(i.labeldirection||1)*(i.labelmargin||0)],n)}function yc(t,e,i,n,o,r){var a=s_.innertextlayout(i.rotation,0,i.labeldirection);i.labelmargin=o.get("label.margin"),pc(e,n,o,r,{position:mc(n.axis,t,i),align:a.textalign,verticalalign:a.textverticalalign})}function xc(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function _c(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function wc(t,e){var i={};return i[e.dim+"axisindex"]=e.index,t.getcartesian(i)}function bc(t){return"x"===t.dim?0:1}function sc(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(ib,function(t){return t+"transition:"+i}).join(";")}function mc(t){var e=[],i=t.get("fontsize"),n=t.gettextcolor();return n&&e.push("color:"+n),e.push("font:"+t.getfont()),i&&e.push("line-height:"+math.round(3*i/2)+"px"),sb(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function ic(t){var e=[],i=t.get("transitionduration"),n=t.get("backgroundcolor"),o=t.getmodel("textstyle"),r=t.get("padding");return i&&e.push(sc(i)),n&&(vf.canvassupported?e.push("background-color:"+n):(e.push("background-color:#"+ze(n)),e.push("filter:alpha(opacity=70)"))),sb(["width","color","radius"],function(i){var n="border-"+i,o=mb(n),r=t.get(o);null!=r&&e.push(n+":"+r+("color"===i?"":"px"))}),e.push(mc(o)),null!=r&&e.push("padding:"+mg(r).join("px ")+"px"),e.join(";")+";"}function tc(t,e){var i=document.createelement("div"),n=this._zr=e.getzr();this.el=i,this._x=e.getwidth()/2,this._y=e.getheight()/2,t.appendchild(i),this._container=t,this._show=!1,this._hidetimeout;var o=this;i.onmouseenter=function(){o._enterable&&(cleartimeout(o._hidetimeout),o._show=!0),o._incontent=!0},i.onmousemove=function(e){if(e=e||window.event,!o._enterable){var i=n.handler;fn(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hidelater(o._hidedelay),o._incontent=!1}}function ac(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(i instanceof hr&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new hr(i,e,e.ecmodel))}return e}function cc(t,e){return t.dispatchaction||y(e.dispatchaction,e)}function dc(t,e,i,n,o,r,a){var s=pc(i),l=s.width,h=s.height;return null!=r&&(t+l+r>n?t-=l+r:t+=r),null!=a&&(e+h+a>o?e-=h+a:e+=a),[t,e]}function lc(t,e,i,n,o){var r=pc(i),a=r.width,s=r.height;return t=math.min(t+a,n)-a,e=math.min(e+s,o)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}function pc(t){var e=t.clientwidth,i=t.clientheight;if(document.defaultview&&document.defaultview.getcomputedstyle){var n=document.defaultview.getcomputedstyle(t);n&&(e+=parseint(n.paddingleft,10)+parseint(n.paddingright,10)+parseint(n.borderleftwidth,10)+parseint(n.borderrightwidth,10),i+=parseint(n.paddingtop,10)+parseint(n.paddingbottom,10)+parseint(n.bordertopwidth,10)+parseint(n.borderbottomwidth,10))}return{width:e,height:i}}function kc(t,e,i){var n=i[0],o=i[1],r=5,a=0,s=0,l=e.width,h=e.height;switch(t){case"inside":a=e.x+l/2-n/2,s=e.y+h/2-o/2;break;case"top":a=e.x+l/2-n/2,s=e.y-o-r;break;case"bottom":a=e.x+l/2-n/2,s=e.y+h+r;break;case"left":a=e.x-n-r,s=e.y+h/2-o/2;break;case"right":a=e.x+l+r,s=e.y+h/2-o/2}return[a,s]}function oc(t){return"center"===t||"middle"===t}function zc(t){xr(t.label,["show"])}function rc(t){return!(isnan(parsefloat(t.x))&&isnan(parsefloat(t.y)))}function ec(t){return!isnan(parsefloat(t.x))&&!isnan(parsefloat(t.y))}function bc(t,e,i){var n=-1;do n=math.max(rn(t.get(e,i)),n),t=t.stackedon;while(t);return n}function vc(t,e,i,n,o,r){var a=[],s=wc(e,n,t),l=e.indicesofnearest(n,s,!0)[0];a[o]=e.get(i,l,!0),a[r]=e.get(n,l,!0);var h=bc(e,n,l);return h=math.min(h,20),h>=0&&(a[r]=+a[r].tofixed(h)),a}function nc(t,e){var i=t.getdata(),o=t.coordinatesystem;if(e&&!ec(e)&&!_(e.coord)&&o){var r=o.dimensions,a=fc(e,i,o,t);if(e=n(e),e.type&&eb[e.type]&&a.baseaxis&&a.valueaxis){var s=zb(r,a.baseaxis.dim),l=zb(r,a.valueaxis.dim);e.coord=eb[e.type](i,a.basedatadim,a.valuedatadim,s,l),e.value=e.coord[l]}else{for(var h=[null!=e.xaxis?e.xaxis:e.radiusaxis,null!=e.yaxis?e.yaxis:e.angleaxis],u=0;2>u;u++)if(eb[h[u]]){var c=t.coorddimtodatadim(r[u])[0];h[u]=wc(i,c,h[u])}e.coord=h}}return e}function fc(t,e,i,n){var o={};return null!=t.valueindex||null!=t.valuedim?(o.valuedatadim=null!=t.valueindex?e.getdimension(t.valueindex):t.valuedim,o.valueaxis=i.getaxis(n.datadimtocoorddim(o.valuedatadim)),o.baseaxis=i.getotheraxis(o.valueaxis),o.basedatadim=n.coorddimtodatadim(o.baseaxis.dim)[0]):(o.baseaxis=n.getbaseaxis(),o.valueaxis=i.getotheraxis(o.baseaxis),o.basedatadim=n.coorddimtodatadim(o.baseaxis.dim)[0],o.valuedatadim=n.coorddimtodatadim(o.valueaxis.dim)[0]),o}function gc(t,e){return t&&t.containdata&&e.coord&&!rc(e)?t.containdata(e.coord):!0}function hc(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value}function wc(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,function(t){isnan(t)||(n+=t,o++)},!0),n/o}return t.getdataextent(e,!0)["max"===i?1:0]}function zc(t,e,i){var n=e.coordinatesystem;t.each(function(o){var r,a=t.getitemmodel(o),s=kn(a.get("x"),i.getwidth()),l=kn(a.get("y"),i.getheight());if(isnan(s)||isnan(l)){if(e.getmarkerposition)r=e.getmarkerposition(t.getvalues(t.dimensions,o));else if(n){var h=t.get(n.dimensions[0],o),u=t.get(n.dimensions[1],o);r=n.datatopoint([h,u])}}else r=[s,l];isnan(s)||(r[0]=s),isnan(l)||(r[1]=l),t.setitemlayout(o,r)})}function uc(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.coorddimtodatadim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var o=new uy(n,i),r=p(i.get("data"),x(nc,e));return t&&(r=v(r,x(gc,t))),o.initdata(r,null,t?hc:function(t){return t.value}),o}function xc(t){return!isnan(t)&&!isfinite(t)}function qc(t,e,i,n){var o=1-t,r=n.dimensions[t];return xc(e[o])&&xc(i[o])&&e[t]===i[t]&&n.getaxis(r).containdata(e[t])}function yc(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(qc(1,i,n,t)||qc(0,i,n,t)))return!0}return gc(t,e[0])&&gc(t,e[1])}function jc(t,e,i,n,o){var r,a=n.coordinatesystem,s=t.getitemmodel(e),l=kn(s.get("x"),o.getwidth()),h=kn(s.get("y"),o.getheight());if(isnan(l)||isnan(h)){if(n.getmarkerposition)r=n.getmarkerposition(t.getvalues(t.dimensions,e));else{var u=a.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);r=a.datatopoint([c,d])}if("cartesian2d"===a.type){var f=a.getaxis("x"),p=a.getaxis("y"),u=a.dimensions;xc(t.get(u[0],e))?r[0]=f.toglobalcoord(f.getextent()[i?0:1]):xc(t.get(u[1],e))&&(r[1]=p.toglobalcoord(p.getextent()[i?0:1]))}isnan(l)||(r[0]=l),isnan(h)||(r[1]=h)}else r=[l,h];t.setitemlayout(e,r)}function $c(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.coorddimtodatadim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var o=new uy(n,i),r=new uy(n,i),a=new uy([],i),s=p(i.get("data"),x(vb,e,t,i));t&&(s=v(s,x(yc,t)));var l=t?hc:function(t){return t.value};return o.initdata(p(s,function(t){return t[0]}),null,l),r.initdata(p(s,function(t){return t[1]}),null,l),a.initdata(p(s,function(t){return t[2]})),a.hasitemoption=!0,{from:o,to:r,line:a}}function kc(t){return!isnan(t)&&!isfinite(t)}function jc(t,e,i){var n=1-t;return kc(e[n])&&kc(i[n])}function qc(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(jc(1,i,n,t)||jc(0,i,n,t))?!0:gc(t,{coord:i,x:e.x0,y:e.y0})||gc(t,{coord:n,x:e.x1,y:e.y1})}function td(t,e,i,n,o){var r,a=n.coordinatesystem,s=t.getitemmodel(e),l=kn(s.get(i[0]),o.getwidth()),h=kn(s.get(i[1]),o.getheight());if(isnan(l)||isnan(h)){if(n.getmarkerposition)r=n.getmarkerposition(t.getvalues(i,e));else{var u=t.get(i[0],e),c=t.get(i[1],e);r=a.datatopoint([u,c],!0)}if("cartesian2d"===a.type){var d=a.getaxis("x"),f=a.getaxis("y"),u=t.get(i[0],e),c=t.get(i[1],e);kc(u)?r[0]=d.toglobalcoord(d.getextent()["x0"===i[0]?0:1]):kc(c)&&(r[1]=f.toglobalcoord(f.getextent()["y0"===i[1]?0:1]))}isnan(l)||(r[0]=l),isnan(h)||(r[1]=h)}else r=[l,h];return r}function ed(t,e,i){var n,o,r=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.coorddimtodatadim(t)[0])||{};return i.name=t,i}),o=new uy(p(r,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],o=new uy(n,i));var a=p(i.get("data"),x(nb,e,t,i));t&&(a=v(a,x(qc,t)));var s=t?function(t,e,i,n){return t.coord[math.floor(n/2)][n%2]}:function(t){return t.value};return o.initdata(a,null,s),o.hasitemoption=!0,o}function id(t){return h(hb,t)>=0}function nd(t,e){t=t.slice();var i=p(t,to);e=(e||[]).slice();var n=p(e,to);return function(o,r){f(t,function(t,a){for(var s={name:t,capital:i[a]},l=0;l=0}function o(t,n){var o=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function r(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0 })})}return function(i){function a(t){!n(t,s)&&o(t,s)&&(r(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;r(i,s);var l;do l=!1,t(a);while(l);return s}}function rd(t,e,i){var n=[1/0,-1/0];return zb(i,function(t){var i=t.getdata();i&&zb(t.coorddimtodatadim(e),function(t){var e=i.getdataextent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var a=i.getmax(!0);return null!=a&&"datamax"!==a&&"function"!=typeof a?e[1]=a:o&&(e[1]=r>0?r-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function sd(t,e){var i=t.getaxismodel(),n=t._percentwindow,o=t._valuewindow;if(n){var r=bn(o,[0,500]);r=math.min(r,20);var a=e||0===n[0]&&100===n[1];i.setrange(a?null:+o[0].tofixed(r),a?null:+o[1].tofixed(r))}}function ld(t){var e=t._minmaxspan={},i=t._datazoommodel;zb(["min","max"],function(n){e[n+"span"]=i.get(n+"span");var o=i.get(n+"valuespan");if(null!=o&&(e[n+"valuespan"]=o,o=t.getaxismodel().axis.scale.parse(o),null!=o)){var r=t._dataextent;e[n+"span"]=pn(r[0]+o,r,[0,100],!0)}})}function hd(t){var e={};return qb(["start","end","startvalue","endvalue","throttle"],function(i){t.hasownproperty(i)&&(e[i]=t[i])}),e}function ud(t,e){var i=t._rangepropmode,n=t.get("rangemode");qb([["start","startvalue"],["end","endvalue"]],function(t,o){var r=null!=e[t[0]],a=null!=e[t[1]];r&&!a?i[o]="percent":!r&&a?i[o]="value":n?i[o]=n[o]:r&&(i[o]="percent")})}function cd(t,e){var i=t[e]-t[1-e];return{span:math.abs(i),sign:i>0?-1:0>i?1:e?-1:1}}function dd(t,e){return math.min(e[1],math.max(e[0],t))}function fd(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function pd(t){return"vertical"===t?"ns-resize":"ew-resize"}function gd(t,e){var i=xd(t),n=e.datazoomid,o=e.coordid;f(i,function(t){var i=t.datazoominfos;i[n]&&h(e.allcoordids,o)<0&&(delete i[n],t.count--)}),wd(i);var r=i[o];r||(r=i[o]={coordid:o,datazoominfos:{},count:0},r.controller=_d(t,r),r.dispatchaction=x(id,t)),!r.datazoominfos[n]&&r.count++,r.datazoominfos[n]=e;var a=td(r.datazoominfos);r.controller.enable(a.controltype,a.opt),r.controller.setpointerchecker(e.containspoint),wa(r,"dispatchaction",e.throttlerate,"fixrate")}function vd(t,e){var i=xd(t);f(i,function(t){t.controller.dispose();var i=t.datazoominfos;i[e]&&(delete i[e],t.count--)}),wd(i)}function md(t,e){if(t&&"datazoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;n>i;i++)if(t.batch[i].datazoomid===e)return!1;return!0}function yd(t){return t.type+"\x00_"+t.id}function xd(t){var e=t.getzr();return e[ds]||(e[ds]={})}function _d(t,e){var i=new ou(t.getzr());return i.on("pan",cs(bd,e)),i.on("zoom",cs(sd,e)),i}function wd(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function bd(t,e,i,n,o,r,a){md(t,function(s){return s.pangetrange(t.controller,e,i,n,o,r,a)})}function sd(t,e,i,n){md(t,function(o){return o.zoomgetrange(t.controller,e,i,n)})}function md(t,e){var i=[];f(t.datazoominfos,function(t){var n=e(t);!t.disabled&&n&&i.push({datazoomid:t.datazoomid,start:n[0],end:n[1]})}),t.dispatchaction(i)}function id(t,e){t.dispatchaction({type:"datazoom",batch:e})}function td(t){var e,i={},n={"true":2,move:1,"false":0,undefined:-1};return f(t,function(t){var o=t.disabled?!1:t.zoomlock?"move":!0;n[o]>n[e]&&(e=o),a(i,t.roamcontrolleropt)}),{controltype:e,opt:i}}function ad(t,e,i){i.getaxisproxy(t.name,e).reset(i)}function cd(t,e,i){i.getaxisproxy(t.name,e).filterdata(i)}function dd(t,e){return t&&t.hasownproperty&&t.hasownproperty(e)}function ld(t){var e=t.piecelist;t.hasspecialvisual=!1,f(e,function(e,i){e.originindex=i,null!=e.visual&&(t.hasspecialvisual=!0)})}function pd(t){var e=t.categories,i=t.visual,n=t.categorymap={};if(ys(e,function(t,e){n[t]=e}),!_(i)){var o=[];s(i)?ys(i,function(t,e){var i=n[e];o[null!=i?i:_s]=t}):o[_s]=i,i=fd(t,o)}for(var r=e.length-1;r>=0;r--)null==i[r]&&(delete n[e[r]],e.pop())}function kd(t,e){var i=t.visual,n=[];s(i)?ys(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasownproperty(t.type)||(n[1]=n[0]),fd(t,n)}function od(t){return{applyvisual:function(e,i,n){e=this.mapvaluetovisual(e),n("color",t(i("color"),e))},_domap:vd([0,1])}}function zd(t){var e=this.option.visual;return e[math.round(pn(t,[0,1],[0,e.length-1],!0))]||{}}function rd(t){return function(e,i,n){n(t,this.mapvaluetovisual(e))}}function ed(t){var e=this.option.visual;return e[this.option.loop&&t!==_s?t%e.length:t]}function bd(){return this.option.visual[0]}function vd(t){return{linear:function(e){return pn(e,t,this.option.visual,!0)},category:ed,piecewise:function(e,i){var n=nd.call(this,i);return null==n&&(n=pn(e,t,this.option.visual,!0)),n},fixed:bd}}function nd(t){var e=this.option,i=e.piecelist;if(e.hasspecialvisual){var n=ws.findpieceindex(t,i),o=i[n];if(o&&o.visual)return o.visual[this.type]}}function fd(t,e){return t.visual=e,"color"===t.type&&(t.parsedvisual=p(e,function(t){return le(t)})),e}function gd(t,e,i){return t?i>=e:i>e}function hd(t){if(t)for(var e in t)if(t.hasownproperty(e))return!0}function wd(t,e,i){function o(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var r={};return ms(e,function(e){var a=r[e]=o();ms(t[e],function(t,o){if(ws.isvalidtype(o)){var r={type:o,visual:t};i&&i(r,e),a[o]=new ws(r),"opacity"===o&&(r=n(r),r.type="coloralpha",a.__hidden.__alphaforopacity=new ws(r))}})}),r}function zd(t,e,i){var o;f(i,function(t){e.hasownproperty(t)&&hd(e[t])&&(o=!0)}),o&&f(i,function(i){e.hasownproperty(i)&&hd(e[i])?t[i]=n(e[i]):delete t[i]})}function ud(t,e,i,n,o,r){function a(t){return i.getitemvisual(u,t)}function s(t,e){i.setitemvisual(u,t,e)}function l(t,l){u=null==r?t:l;var c=i.getrawdataitem(u);if(!c||c.visualmap!==!1)for(var d=n.call(o,t),f=e[d],p=h[d],g=0,v=p.length;v>g;g++){var m=p[g];f[m]&&f[m].applyvisual(t,a,s)}}var h={};f(t,function(t){var i=ws.preparevisualtypes(e[t]);h[t]=i});var u;null==r?i.each(l,!0):i.each([r],l,!0)}function xd(t){t.eachtargetseries(function(e){var i=e.getdata();ud(t.statelist,t.targetvisuals,i,t.getvaluestate,t,t.getdatadimension(i))})}function qd(t){t.eachseries(function(e){var i=e.getdata(),n=[];t.eachcomponent("visualmap",function(t){if(t.istargetseries(e)){var o=t.getvisualmeta(y(yd,null,e,t))||{stops:[],outercolors:[]};o.dimension=t.getdatadimension(i),n.push(o)}}),e.getdata().setvisual("visualmeta",n)})}function yd(t,e,i,n){function o(t){return l[t]}function r(t,e){l[t]=e}for(var a=e.targetvisuals[n],s=ws.preparevisualtypes(a),l={color:t.getdata().getvisual("color")},h=0,u=s.length;u>h;h++){var c=s[h],d=a["opacity"===c?"__alphaforopacity":c];d&&d.applyvisual(i,o,r)}return l.color}function jd(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,o=(i[1]-i[0])/n,r=i[0],a=[],s=0;n>=s&&rc;c++)u[s[1-a][c]]=h[c],u[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][a],f=ua(u,r,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*r[d[1]]?0:1]}function kd(t){return f(t||[],function(){null!=t.dataindex&&(t.dataindexinside=t.dataindex,t.dataindex=null)}),t}function jd(t,e,i,n){return new gv({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){$p(t.event)},ondragend:n})}function qd(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function tf(t,e,i,n){return t?[[0,-gs(e,hs(i,0))],[zs,0],[0,gs(e,hs(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function ef(t,e,i){var n=ws/2,o=t.get("hoverlinkdatasize");return o&&(n=ns(o,e,i,!0)/2),n}function nf(t){var e=t.get("hoverlinkonhandle");return!!(null==e?t.get("realtime"):e)}function of(t){return"vertical"===t?"ns-resize":"ew-resize"}function rf(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function af(t,e,i,n){var o=i.type,r=nm[o.charat(0).touppercase()+o.slice(1)],a=new r(i);e.add(a),n.set(t,a),a.__ecgraphicid=t}function sf(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){sf(t,e)}),e.removekey(t.__ecgraphicid),i.remove(t))}function lf(t){return t=a({},t),f(["id","parentid","$action","hv","bounding"].concat(mm),function(e){delete t[e]}),t}function hf(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function uf(t,e){var i=t.exist;if(e.id=t.keyinfo.id,!e.type&&i&&(e.type=i.type),null==e.parentid){var n=e.parentoption;n?e.parentid=n.id:i&&(e.parentid=i.parentid)}e.parentoption=null}function cf(t,e,i){var n=a({},i),r=t[e],s=i.$action||"merge";"merge"===s?r?(o(r,n,!0),da(r,n,{ignoresize:!0}),pa(i,r)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&r&&(t[e]=null)}function df(t,e){t&&(t.hv=e.hv=[hf(e,["left","right"]),hf(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}var ff=2311,pf=function(){return ff++},gf={};gf="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvassupported:!0,svgsupported:!0}:e(navigator.useragent);var vf=gf,mf={"[object function]":1,"[object regexp]":1,"[object date]":1,"[object error]":1,"[object canvasgradient]":1,"[object canvaspattern]":1,"[object image]":1,"[object canvas]":1},yf={"[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},xf=object.prototype.tostring,_f=array.prototype,wf=_f.foreach,bf=_f.filter,sf=_f.slice,mf=_f.map,if=_f.reduce,tf={},af=function(){return tf.createcanvas()};tf.createcanvas=function(){return document.createelement("canvas")};var cf,df="__ec_primitive__",lf="_ec_",pf=4;r.prototype={constructor:r,get:function(t){return this[lf+t]},set:function(t,e){return this[lf+t]=e,e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this)this.hasownproperty(i)&&t(this[i],i.slice(pf))},removekey:function(t){delete this[lf+t]}};var kf=(object.freeze||object)({$override:i,clone:n,merge:o,mergeall:r,extend:a,defaults:s,createcanvas:af,getcontext:l,indexof:h,inherits:u,mixin:c,isarraylike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:x,isarray:_,isfunction:w,isstring:b,isobject:s,isbuiltinobject:m,isdom:i,eqnan:t,retrieve:a,retrieve2:c,retrieve3:d,slice:l,normalizecssarray:p,assert:k,setasprimitive:o,isprimitive:z,createhashmap:e,noop:b}),of="undefined"==typeof float32array?array:float32array,zf=u,rf=x,ef=j,bf=q,vf=(object.freeze||object)({create:v,copy:n,clone:f,set:g,add:h,scaleandadd:w,sub:z,len:u,length:zf,lensquare:x,lengthsquare:rf,mul:q,div:y,dot:j,scale:$,normalize:k,distance:j,dist:ef,distancesquare:q,distsquare:bf,negate:te,lerp:ee,applytransform:ie,min:ne,max:oe});re.prototype={constructor:re,_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(ae(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingtarget;if(e){var i=t.offsetx,n=t.offsety,o=i-this._x,r=n-this._y;this._x=i,this._y=n,e.drift(o,r,t),this.dispatchtoelement(ae(e,t),"drag",t.event);var a=this.findhover(i,n,e).target,s=this._droptarget;this._droptarget=a,e!==a&&(s&&a!==s&&this.dispatchtoelement(ae(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchtoelement(ae(a,t),"dragenter",t.event))}},_dragend:function(t){var e=this._draggingtarget;e&&(e.dragging=!1),this.dispatchtoelement(ae(e,t),"dragend",t.event),this._droptarget&&this.dispatchtoelement(ae(this._droptarget,t),"drop",t.event),this._draggingtarget=null,this._droptarget=null}};var nf=array.prototype.slice,ff=function(){this._$handlers={}};ff.prototype={constructor:ff,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var o=0;oo;o++)i[t][o].h!=e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=nf.call(e,1));for(var n=this._$handlers[t],o=n.length,r=0;o>r;){switch(i){case 1:n[r].h.call(n[r].ctx);break;case 2:n[r].h.call(n[r].ctx,e[1]);break;case 3:n[r].h.call(n[r].ctx,e[1],e[2]);break;default:n[r].h.apply(n[r].ctx,e)}n[r].one?(n.splice(r,1),o--):r++}}return this},triggerwithcontext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=nf.call(e,1,e.length-1));for(var n=e[e.length-1],o=this._$handlers[t],r=o.length,a=0;r>a;){switch(i){case 1:o[a].h.call(n);break;case 2:o[a].h.call(n,e[1]);break;case 3:o[a].h.call(n,e[1],e[2]);break;default:o[a].h.apply(n,e)}o[a].one?(o.splice(a,1),r--):a++}}return this}};var gf="silent";le.prototype.dispose=function(){};var hf=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],wf=function(t,e,i,n){ff.call(this),this.storage=t,this.painter=e,this.painterroot=n,i=i||new le,this.proxy=i,i.handler=this,this._hovered={},this._lasttouchmoment,this._lastx,this._lasty,re.call(this),f(hf,function(t){i.on&&i.on(t,this[t],this)},this)};wf.prototype={constructor:wf,mousemove:function(t){var e=t.zrx,i=t.zry,n=this._hovered,o=n.target;o&&!o.__zr&&(n=this.findhover(n.x,n.y),o=n.target);var r=this._hovered=this.findhover(e,i),a=r.target,s=this.proxy;s.setcursor&&s.setcursor(a?a.cursor:"default"),o&&a!==o&&this.dispatchtoelement(n,"mouseout",t),this.dispatchtoelement(r,"mousemove",t),a&&a!==o&&this.dispatchtoelement(r,"mouseover",t)},mouseout:function(t){this.dispatchtoelement(this._hovered,"mouseout",t);var e,i=t.toelement||t.relatedtarget;do i=i&&i.parentnode;while(i&&9!=i.nodetype&&!(e=i===this.painterroot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setcursorstyle:function(t){var e=this.proxy;e.setcursor&&e.setcursor(t)},dispatchtoelement:function(t,e,i){t=t||{};var n=t.target;if(!n||!n.silent){for(var o="on"+e,r=se(e,t,i);n&&(n[o]&&(r.cancelbubble=n[o].call(n,r)),n.trigger(e,r),n=n.parent,!r.cancelbubble););r.cancelbubble||(this.trigger(e,r),this.painter&&this.painter.eachotherlayer(function(t){"function"==typeof t[o]&&t[o].call(t,r),t.trigger&&t.trigger(e,r)}))}},findhover:function(t,e,i){for(var n=this.storage.getdisplaylist(),o={x:t,y:e},r=n.length-1;r>=0;r--){var a;if(n[r]!==i&&!n[r].ignore&&(a=he(n[r],t,e))&&(!o.toptarget&&(o.toptarget=n[r]),a!==gf)){o.target=n[r];break}}return o}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){wf.prototype[t]=function(e){var i=this.findhover(e.zrx,e.zry),n=i.target;if("mousedown"===t)this._downel=n,this._downpoint=[e.zrx,e.zry],this._upel=n;else if("mosueup"===t)this._upel=n;else if("click"===t){if(this._downel!==this._upel||!this._downpoint||ef(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(i,t,e)}}),c(wf,ff),c(wf,re);var zf="undefined"==typeof float32array?array:float32array,uf=(object.freeze||object)({create:ue,identity:ce,copy:de,mul:fe,translate:pe,rotate:ge,scale:ve,invert:me}),xf=ce,qf=5e-5,yf=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},jf=yf.prototype;jf.transform=null,jf.needlocaltransform=function(){return ye(this.rotation)||ye(this.position[0])||ye(this.position[1])||ye(this.scale[0]-1)||ye(this.scale[1]-1)},jf.updatetransform=function(){var t=this.parent,e=t&&t.transform,i=this.needlocaltransform(),n=this.transform;return i||e?(n=n||ue(),i?this.getlocaltransform(n):xf(n),e&&(i?fe(n,t.transform,n):de(n,t.transform)),this.transform=n,this.invtransform=this.invtransform||ue(),void me(this.invtransform,n)):void(n&&xf(n))},jf.getlocaltransform=function(t){return yf.getlocaltransform(this,t)},jf.settransform=function(t){var e=this.transform,i=t.dpr||1;e?t.settransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.settransform(i,0,0,i,0,0)},jf.restoretransform=function(t){var e=t.dpr||1;t.settransform(e,0,0,e,0,0)};var $f=[];jf.decomposetransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(fe($f,t.invtransform,e),e=$f);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],o=this.position,r=this.scale;ye(i-1)&&(i=math.sqrt(i)),ye(n-1)&&(n=math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),o[0]=e[4],o[1]=e[5],r[0]=i,r[1]=n,this.rotation=math.atan2(-e[1]/n,e[0]/i)}},jf.getglobalscale=function(){var t=this.transform;if(!t)return[1,1];var e=math.sqrt(t[0]*t[0]+t[1]*t[1]),i=math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},jf.transformcoordtolocal=function(t,e){var i=[t,e],n=this.invtransform;return n&&ie(i,i,n),i},jf.transformcoordtoglobal=function(t,e){var i=[t,e],n=this.transform;return n&&ie(i,i,n),i},yf.getlocaltransform=function(t,e){e=e||[],xf(e);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,r=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ve(e,e,n),o&&ge(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=r[0],e[5]+=r[1],e};var kf={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,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*math.asin(1/i)/(2*math.pi),-(i*math.pow(2,10*(t-=1))*math.sin(2*(t-e)*math.pi/n)))},elasticout:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*math.asin(1/i)/(2*math.pi),i*math.pow(2,-10*t)*math.sin(2*(t-e)*math.pi/n)+1)},elasticinout:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*math.asin(1/i)/(2*math.pi),(t*=2)<1?-.5*i*math.pow(2,10*(t-=1))*math.sin(2*(t-e)*math.pi/n):i*math.pow(2,-10*(t-=1))*math.sin(2*(t-e)*math.pi/n)*.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-kf.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*kf.bouncein(2*t):.5*kf.bounceout(2*t-1)+.5}};xe.prototype={constructor:xe,step:function(t,e){if(this._initialized||(this._starttime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedtime+=e);var i=(t-this._starttime-this._pausedtime)/this._life;if(!(0>i)){i=math.min(i,1);var n=this.easing,o="string"==typeof n?kf[n]:n,r="function"==typeof o?o(i):i;return this.fire("frame",r),1==i?this.loop?(this.restart(t),"restart"):(this._needsremove=!0,"destroy"):null}},restart:function(t){var e=(t-this._starttime-this._pausedtime)%this._life;this._starttime=t-e+this.gap,this._pausedtime=0,this._needsremove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var jf=function(){this.head=null,this.tail=null,this._len=0},qf=jf.prototype;qf.insert=function(t){var e=new tp(t);return this.insertentry(e),e},qf.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++},qf.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},qf.len=function(){return this._len},qf.clear=function(){this.head=this.tail=null,this._len=0};var tp=function(t){this.value=t,this.next,this.prev},ep=function(t){this._list=new jf,this._map={},this._maxsize=t||10,this._lastremovedentry=null},ip=ep.prototype;ip.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var r=i.len(),a=this._lastremovedentry;if(r>=this._maxsize&&r>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastremovedentry=s}a?a.value=e:a=new tp(e),a.key=t,i.insertentry(a),n[t]=a}return o},ip.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertentry(e)),e.value):void 0},ip.clear=function(){this._list.clear(),this._map={}};var np={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]},op=new ep(20),rp=null,ap=re,sp=ee,lp=(object.freeze||object)({parse:le,lift:oe,tohex:ze,fastlerp:re,fastmaptocolor:ap,lerp:ee,maptocolor:sp,modifyhsl:be,modifyalpha:ve,stringify:ne}),hp=array.prototype.slice,up=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||fe,this._setter=n||ge,this._clipcount=0,this._delay=0,this._donelist=[],this._onframelist=[],this._cliplist=[]};up.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasownproperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:je(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframelist.push(t),this},pause:function(){for(var t=0;ti;i++)t[i].call(this)},start:function(t,e){var i,n=this,o=0,r=function(){o--,o||n._donecallback()};for(var a in this._tracks)if(this._tracks.hasownproperty(a)){var s=je(this,t,r,this._tracks[a],a,e);s&&(this._cliplist.push(s),o++,this.animation&&this.animation.addclip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i1&&(pp=function(){for(var t in arguments)console.log(arguments[t])});var gp=pp,vp=function(){this.animators=[]};vp.prototype={constructor:vp,animate:function(t,e){var i,n=!1,o=this,r=this.__zr;if(t){var a=t.split("."),s=o;n="shape"===a[0];for(var l=0,u=a.length;u>l;l++)s&&(s=s[a[l]]);s&&(i=s)}else i=o;if(!i)return void gp('property "'+t+'" is not existed in element '+o.id);var c=o.animators,d=new up(i,e);return d.during(function(){o.dirty(n)}).done(function(){c.splice(h(c,d),1)}),c.push(d),r&&r.animation.addanimator(d),d},stopanimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateto:function(t,e,i,n,o,r){function a(){l--,l||o&&o()}b(i)?(o=n,n=i,i=0):w(n)?(o=n,n="linear",i=0):w(i)?(o=i,i=0):w(e)?(o=e,e=500):e||(e=500),this.stopanimation(),this._animatetoshallow("",this,t,e,i);var s=this.animators.slice(),l=s.length;l||o&&o();for(var h=0;h0&&this.animate(t,!1).when(null==n?500:n,r).delay(o||0),this}};var mp=function(t){yf.call(this,t),ff.call(this,t),vp.call(this,t),this.id=t.id||pf()};mp.prototype={type:"element",name:"",__zr:null,ignore:!1,clippath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposetransform(),this.dirty(!1)},beforeupdate:function(){},afterupdate:function(){},update:function(){this.updatetransform()},traverse:function(){},attrkv:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrkv(t,e);else if(s(t))for(var i in t)t.hasownproperty(i)&&this.attrkv(i,t[i]);return this.dirty(!1),this},setclippath:function(t){var e=this.__zr;e&&t.addselftozr(e),this.clippath&&this.clippath!==t&&this.removeclippath(),this.clippath=t,t.__zr=e,t.__cliptarget=this,this.dirty(!1)},removeclippath:function(){var t=this.clippath;t&&(t.__zr&&t.removeselffromzr(t.__zr),t.__zr=null,t.__cliptarget=null,this.clippath=null,this.dirty(!1))},addselftozr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;in||i>s||l>r||o>h)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new qe(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}}},qe.create=function(t){return new qe(t.x,t.y,t.width,t.height)};var wp=function(t){t=t||{},mp.call(this,t);for(var e in t)t.hasownproperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};wp.prototype={constructor:wp,isgroup:!0,type:"group",silent:!1,children:function(){return this._children.slice() },childat:function(t){return this._children[t]},childofname:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doadd(t))}return this},_doadd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addtostorage(t),t instanceof wp&&t.addchildrentostorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=h(n,t);return 0>o?this:(n.splice(o,1),t.parent=null,i&&(i.delfromstorage(t),t instanceof wp&&t.delchildrenfromstorage(i)),e&&e.refresh(),this)},removeall:function(){var t,e,i=this._children,n=this.__storage;for(e=0;en;n++)this._updateandadddisplayable(e[n],null,t);i.length=this._displaylistlen,vf.canvassupported&&si(i,li)},_updateandadddisplayable:function(t,e,i){if(!t.ignore||i){t.beforeupdate(),t.__dirty&&t.update(),t.afterupdate();var n=t.clippath;if(n){e=e?e.slice():[];for(var o=n,r=t;o;)o.parent=r,o.updatetransform(),e.push(o),r=o,o=o.clippath}if(t.isgroup){for(var a=t._children,s=0;se;e++)this.delroot(t[e]);else{var o=h(this._roots,t);o>=0&&(this.delfromstorage(t),this._roots.splice(o,1),t instanceof wp&&t.delchildrenfromstorage(this))}},addtostorage:function(t){return t.__storage=this,t.dirty(!1),this},delfromstorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderlist=this._roots=null},displayablesortfunc:li};var ip=[["shadowblur",0],["shadowoffsetx",0],["shadowoffsety",0],["shadowcolor","#000"],["linecap","butt"],["linejoin","miter"],["miterlimit",10]],tp=function(t,e){this.extendfrom(t,!1),this.host=e};tp.prototype={constructor:tp,host:null,fill:"#000",stroke:null,opacity:1,linedash:null,linedashoffset:0,shadowblur:0,shadowoffsetx:0,shadowoffsety:0,linewidth:1,strokenoscale:!1,text:null,font:null,textfont:null,fontstyle:null,fontweight:null,fontsize:null,fontfamily:null,texttag:null,textfill:"#000",textstroke:null,textwidth:null,textheight:null,textstrokewidth:0,textlineheight:null,textposition:"inside",textrect:null,textoffset:null,textalign:null,textverticalalign:null,textdistance:5,textshadowcolor:"transparent",textshadowblur:0,textshadowoffsetx:0,textshadowoffsety:0,textboxshadowcolor:"transparent",textboxshadowblur:0,textboxshadowoffsetx:0,textboxshadowoffsety:0,transformtext:!1,textrotation:0,textorigin:null,textbackgroundcolor:null,textbordercolor:null,textborderwidth:0,textborderradius:0,textpadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,o=i&&i.style,r=!o,a=0;a0},extendfrom:function(t,e){if(t)for(var i in t)!t.hasownproperty(i)||e!==!0&&(e===!1?this.hasownproperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendfrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendfrom(this,!0),t},getgradient:function(t,e,i){for(var n="radial"===e.type?ui:hi,o=n(t,e,i),r=e.colorstops,a=0;a=0&&i.splice(n,1),t.__hovermir=null},clearhover:function(){for(var t=this._hoverelements,e=0;eo;){var r=t[o],a=r.__from;a&&a.__zr?(o++,a.invisible||(r.transform=a.transform,r.invtransform=a.invtransform,r.__clippaths=a.__clippaths,this._dopaintel(r,i,!0,n))):(t.splice(o,1),a.__hovermir=null,e--)}i.ctx.restore()}},_startprogessive:function(){function t(){i===e._progressivetoken&&e.storage&&(e._dopaintlist(e.storage.getdisplaylist()),e._furtherprogressive?(e._progress++,kp(t)):e._progressivetoken=-1)}var e=this;if(e._furtherprogressive){var i=e._progressivetoken=+new date;e._progress++,kp(t)}},_clearprogressive:function(){this._progressivetoken=-1,this._progress=0,f(this._progressivelayers,function(t){t.__dirty&&t.clear()})},_paintlist:function(t,e){null==e&&(e=!1),this._updatelayerstatus(t),this._clearprogressive(),this.eachbuiltinlayer(on),this._dopaintlist(t,e),this.eachbuiltinlayer(rn)},_dopaintlist:function(t,e){function i(t){var e=r.dpr||1;r.save(),r.globalalpha=1,r.shadowblur=0,n.__dirty=!0,r.settransform(1,0,0,1,0,0),r.drawimage(t.dom,0,0,u*e,c*e),r.restore()}for(var n,o,r,a,s,l,h=0,u=this._width,c=this._height,d=this._progress,p=0,g=t.length;g>p;p++){var v=t[p],m=this._singlecanvas?0:v.zlevel,y=v.__frame;if(0>y&&s&&(i(s),s=null),o!==m&&(r&&r.restore(),a={},o=m,n=this.getlayer(o),n.__builtin__||gp("zlevel "+o+" has been used by unkown layer "+n.id),r=n.ctx,r.save(),n.__unusedcount=0,(n.__dirty||e)&&n.clear()),n.__dirty||e){if(y>=0){if(!s){if(s=this._progressivelayers[math.min(h++,zp-1)],s.ctx.save(),s.renderscope={},s&&s.__progress>s.__maxprogress){p=s.__nextidxnotprog-1;continue}l=s.__progress,s.__dirty||(d=l),s.__progress=d+1}y===d&&this._dopaintel(v,s,!0,s.renderscope)}else this._dopaintel(v,n,e,a);v.__dirty=!1}}s&&i(s),r&&r.restore(),this._furtherprogressive=!1,f(this._progressivelayers,function(t){t.__maxprogress>=t.__progress&&(this._furtherprogressive=!0)},this)},_dopaintel:function(t,e,i,n){var o=e.ctx,r=t.transform;if(!(!e.__dirty&&!i||t.invisible||0===t.style.opacity||r&&!r[0]&&!r[3]||t.culling&&an(t,this._width,this._height))){var a=t.__clippaths;(n.prevcliplayer!==e||sn(a,n.prevelclippaths))&&(n.prevelclippaths&&(n.prevcliplayer.ctx.restore(),n.prevcliplayer=n.prevelclippaths=null,n.prevel=null),a&&(o.save(),ln(a,o),n.prevcliplayer=e,n.prevelclippaths=a)),t.beforebrush&&t.beforebrush(o),t.brush(o,n.prevel||null),n.prevel=t,t.afterbrush&&t.afterbrush(o)}},getlayer:function(t){if(this._singlecanvas)return this._layers[0];var e=this._layers[t];return e||(e=new pp("zr_"+t,this,this.dpr),e.__builtin__=!0,this._layerconfig[t]&&o(e,this._layerconfig[t],!0),this.insertlayer(t,e),e.initcontext()),e},insertlayer:function(t,e){var i=this._layers,n=this._zlevellist,o=n.length,r=null,a=-1,s=this._domroot;if(i[t])return void gp("zlevel "+t+" has been used already");if(!nn(e))return void gp("layer of zlevel "+t+" is not valid");if(o>0&&t>n[0]){for(a=0;o-1>a&&!(n[a]t);a++);r=i[n[a]]}if(n.splice(a+1,0,t),i[t]=e,!e.virtual)if(r){var l=r.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 i,n,o=this._zlevellist;for(n=0;nh;h++){var c=t[h],d=this._singlecanvas?0:c.zlevel,p=e[d],g=c.progressive;if(p&&(p.elcount++,p.__dirty=p.__dirty||c.__dirty),g>=0){a!==g&&(a=g,l++);var v=c.__frame=l-1;if(!r){var m=math.min(s,zp-1);r=i[m],r||(r=i[m]=new pp("progressive",this,this.dpr),r.initcontext()),r.__maxprogress=0}r.__dirty=r.__dirty||c.__dirty,r.elcount++,r.__maxprogress=math.max(r.__maxprogress,v),r.__maxprogress>=r.__progress&&(p.__dirty=!0)}else c.__frame=-1,r&&(r.__nextidxnotprog=h,s++,r=null)}r&&(s++,r.__nextidxnotprog=h),this.eachbuiltinlayer(function(t,e){n[e]!==t.elcount&&(t.__dirty=!0)}),i.length=math.min(s,zp),f(i,function(t,e){o[e]!==t.elcount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachbuiltinlayer(this._clearlayer),this},_clearlayer:function(t){t.clear()},configlayer:function(t,e){if(e){var i=this._layerconfig;i[t]?o(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&o(n,i[t],!0)}},dellayer:function(t){var e=this._layers,i=this._zlevellist,n=e[t];n&&(n.dom.parentnode.removechild(n.dom),delete e[t],i.splice(h(i,t),1))},resize:function(t,e){var i=this._domroot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getsize(0),e=this._getsize(1),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var o in this._layers)this._layers.hasownproperty(o)&&this._layers[o].resize(t,e);f(this._progressivelayers,function(i){i.resize(t,e)}),this.refresh(!0)}return this._width=t,this._height=e,this},clearlayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerhtml="",this.root=this.storage=this._domroot=this._layers=null},getrenderedcanvas:function(t){function e(t,e){var n=a._zlevellist;null==t&&(t=-1/0);for(var o,r=0;rt&&e>s){o=l;break}}o&&o.rendertocanvas&&(i.ctx.save(),o.rendertocanvas(i.ctx),i.ctx.restore())}if(t=t||{},this._singlecanvas)return this._layers[0].dom;var i=new pp("image",this,t.pixelratio||this.dpr);i.initcontext(),i.clearcolor=t.backgroundcolor,i.clear();for(var n,o=this.storage.getdisplaylist(!0),r={},a=this,s=0;s=0&&this._clips.splice(e,1)},removeanimator:function(t){for(var e=t.getclips(),i=0;ia;a++){var s=i[a],l=s.step(t,e);l&&(o.push(l),r.push(s))}for(var a=0;n>a;)i[a]._needsremove?(i[a]=i[n-1],i.pop(),n--):a++;n=o.length;for(var a=0;n>a;a++)r[a].fire(o[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startloop:function(){function t(){e._running&&(kp(t),!e._paused&&e._update())}var e=this;this._running=!0,kp(t)},start:function(){this._time=(new date).gettime(),this._pausedtime=0,this._startloop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pausestart=(new date).gettime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedtime+=(new date).gettime()-this._pausestart,this._paused=!1)},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new up(t,e.loop,e.getter,e.setter);return this.addanimator(i),i}},c(kp,ff);var jp=function(){this._track=[]};jp.prototype={constructor:jp,recognize:function(t,e,i){return this._dotrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_dotrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},r=0,a=n.length;a>r;r++){var s=n[r],l=cn(i,s,{});o.points.push([l.zrx,l.zry]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in qp)if(qp.hasownproperty(e)){var i=qp[e](this._track,t);if(i)return i}}};var qp={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&o.length>1&&n&&n.length>1){var r=mn(n)/mn(o);!isfinite(r)&&(r=1),e.pinchscale=r;var a=yn(n);return e.pinchx=a[0],e.pinchy=a[1],{type:"pinch",target:t[0].target,event:e}}}}},tg=300,eg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ig=["touchstart","touchend","touchmove"],ng={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},og=p(eg,function(t){var e=t.replace("mouse","pointer");return ng[e]?e:t}),rg={mousemove:function(t){t=fn(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=fn(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=fn(this.dom,t),t.zrbytouch=!0,this._lasttouchmoment=new date,_n(this,t,"start"),rg.mousemove.call(this,t),rg.mousedown.call(this,t),wn(this)},touchmove:function(t){t=fn(this.dom,t),t.zrbytouch=!0,_n(this,t,"change"),rg.mousemove.call(this,t),wn(this)},touchend:function(t){t=fn(this.dom,t),t.zrbytouch=!0,_n(this,t,"end"),rg.mouseup.call(this,t),+new date-this._lasttouchmomentt?"0"+t:t},wg=mi,bg=yi,sg=(object.freeze||object)({addcommas:qn,tocamelcase:yn,normalizecssarray:mg,encodehtml:jn,formattpl:$n,formattplsimple:kn,gettooltipmarker:jn,formattime:qn,capitalfirst:to,truncatetext:wg,gettextrect:bg}),mg=".",ig="___ec__component__container___",tg="\x00ec_\x00",ag=function(t){for(var e=0;e=0||n&&h(n,a)<0)){var s=e.getshallow(a);null!=s&&(o[t[r][0]]=s)}}return o}},cg=ag([["linewidth","width"],["stroke","color"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),dg={getlinestyle:function(t){var e=cg(this,t),i=this.getlinedash(e.linewidth);return i&&(e.linedash=i),e},getlinedash:function(t){null==t&&(t=1);var e=this.get("type"),i=math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},lg=ag([["fill","color"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["opacity"],["shadowcolor"]]),pg={getareastyle:function(t,e){return lg(this,t,e)}},kg=math.pow,og=math.sqrt,zg=1e-8,rg=1e-4,eg=og(3),bg=1/3,vg=v(),ng=v(),fg=v(),gg=math.min,hg=math.max,wg=math.sin,zg=math.cos,ug=2*math.pi,xg=v(),qg=v(),yg=v(),jg=[],$g=[],kg={m:1,l:2,c:3,q:4,a:5,z:6,r:7},jg=[],qg=[],tv=[],ev=[],iv=math.min,nv=math.max,ov=math.cos,rv=math.sin,av=math.sqrt,sv=math.abs,lv="undefined"!=typeof float32array,hv=function(t){this._savedata=!t,this._savedata&&(this.data=[]),this._ctx=null};hv.prototype={constructor:hv,_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=sv(1/fp/t)||0,this._uy=sv(1/fp/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(kg.m,t,e),this._ctx&&this._ctx.moveto(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineto:function(t,e){var i=sv(t-this._xi)>this._ux||sv(e-this._yi)>this._uy||this._len<5;return this.adddata(kg.l,t,e),this._ctx&&i&&(this._needsdash()?this._dashedlineto(t,e):this._ctx.lineto(t,e)),i&&(this._xi=t,this._yi=e),this},beziercurveto:function(t,e,i,n,o,r){return this.adddata(kg.c,t,e,i,n,o,r),this._ctx&&(this._needsdash()?this._dashedbezierto(t,e,i,n,o,r):this._ctx.beziercurveto(t,e,i,n,o,r)),this._xi=o,this._yi=r,this},quadraticcurveto:function(t,e,i,n){return this.adddata(kg.q,t,e,i,n),this._ctx&&(this._needsdash()?this._dashedquadraticto(t,e,i,n):this._ctx.quadraticcurveto(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,r){return this.adddata(kg.a,t,e,i,i,n,o-n,0,r?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,r),this._xi=ov(o)*i+t,this._yi=rv(o)*i+t,this},arcto:function(t,e,i,n,o){return this._ctx&&this._ctx.arcto(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.adddata(kg.r,t,e,i,n),this},closepath:function(){this.adddata(kg.z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsdash()&&this._dashedlineto(e,i),t.closepath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.tostatic()},stroke:function(t){t&&t.stroke(),this.tostatic()},setlinedash:function(t){if(t instanceof array){this._linedash=t,this._dashidx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendpath:function(t){t instanceof array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;e>o;o++)i+=t[o].len();lv&&this.data instanceof float32array&&(this.data=new float32array(n+i));for(var o=0;e>o;o++)for(var r=t[o].data,a=0;ae.length&&(this._expanddata(),e=this.data);for(var i=0;ir&&(r=o+r),r%=o,f-=r*u,p-=r*c;u>0&&t>=f||0>u&&f>=t||0==u&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashidx,i=a[n],f+=u*i,p+=c*i,this._dashidx=(n+1)%g,u>0&&l>f||0>u&&f>l||c>0&&h>p||0>c&&p>h||s[n%2?"moveto":"lineto"](u>=0?iv(f,t):nv(f,t),c>=0?iv(p,e):nv(p,e));u=f-t,c=p-e,this._dashoffset=-av(u*u+c*c)},_dashedbezierto:function(t,e,i,n,o,r){var a,s,l,h,u,c=this._dashsum,d=this._dashoffset,f=this._linedash,p=this._ctx,g=this._xi,v=this._yi,m=fo,y=0,x=this._dashidx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,a=0;1>a;a+=.1)s=m(g,t,i,o,a+.1)-m(g,t,i,o,a),l=m(v,e,n,r,a+.1)-m(v,e,n,r,a),y+=av(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(a=(w-d)/y;1>=a;)h=m(g,t,i,o,a),u=m(v,e,n,r,a),x%2?p.moveto(h,u):p.lineto(h,u),a+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineto(o,r),s=o-h,l=r-u,this._dashoffset=-av(s*s+l*l)},_dashedquadraticto:function(t,e,i,n){var o=i,r=n; i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedbezierto(t,e,i,n,o,r)},tostatic:function(){var t=this.data;t instanceof array&&(t.length=this._len,lv&&(this.data=new float32array(t)))},getboundingrect:function(){jg[0]=jg[1]=tv[0]=tv[1]=number.max_value,qg[0]=qg[1]=ev[0]=ev[1]=-number.max_value;for(var t=this.data,e=0,i=0,n=0,o=0,r=0;rc;){var d=s[c++];switch(1==c&&(n=s[c],o=s[c+1],e=n,i=o),d){case kg.m:e=n=s[c++],i=o=s[c++],t.moveto(n,o);break;case kg.l:r=s[c++],a=s[c++],(sv(r-n)>l||sv(a-o)>h||c===u-1)&&(t.lineto(r,a),n=r,o=a);break;case kg.c:t.beziercurveto(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case kg.q:t.quadraticcurveto(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case kg.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++],w=g>v?g:v,b=g>v?1:g/v,s=g>v?v/g:1,m=math.abs(g-v)>.001,i=m+y;m?(t.translate(f,p),t.rotate(x),t.scale(b,s),t.arc(0,0,w,m,i,1-_),t.scale(1/b,1/s),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,m,i,1-_),1==c&&(e=ov(m)*g+f,i=rv(m)*v+p),n=ov(i)*g+f,o=rv(i)*v+p;break;case kg.r:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case kg.z:t.closepath(),n=e,o=i}}}},hv.cmd=kg;var uv=2*math.pi,cv=2*math.pi,dv=hv.cmd,fv=2*math.pi,pv=1e-4,gv=[-1,-1,-1],vv=[-1,-1],mv=lp.prototype.getcanvaspattern,yv=math.abs,xv=new hv(!0);zo.prototype={constructor:zo,type:"path",__dirtypath:!0,strokecontainthreshold:5,brush:function(t,e){var i=this.style,n=this.path||xv,o=i.hasstroke(),r=i.hasfill(),a=i.fill,s=i.stroke,l=r&&!!a.colorstops,h=o&&!!s.colorstops,u=r&&!!a.image,c=o&&!!s.image;if(i.bind(t,this,e),this.settransform(t),this.__dirty){var d;l&&(d=d||this.getboundingrect(),this._fillgradient=i.getgradient(t,a,d)),h&&(d=d||this.getboundingrect(),this._strokegradient=i.getgradient(t,s,d))}l?t.fillstyle=this._fillgradient:u&&(t.fillstyle=mv.call(a,t)),h?t.strokestyle=this._strokegradient:c&&(t.strokestyle=mv.call(s,t));var f=i.linedash,p=i.linedashoffset,g=!!t.setlinedash,v=this.getglobalscale();n.setscale(v[0],v[1]),this.__dirtypath||f&&!g&&o?(n.beginpath(t),f&&!g&&(n.setlinedash(f),n.setlinedashoffset(p)),this.buildpath(n,this.shape,!1),this.path&&(this.__dirtypath=!1)):(t.beginpath(),this.path.rebuildpath(t)),r&&n.fill(t),f&&g&&(t.setlinedash(f),t.linedashoffset=p),o&&n.stroke(t),f&&g&&t.setlinedash([]),this.restoretransform(t),null!=i.text&&this.drawrecttext(t,this.getboundingrect())},buildpath:function(){},createpathproxy:function(){this.path=new hv},getboundingrect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new hv),this.__dirtypath&&(n.beginpath(),this.buildpath(n,this.shape,!1)),t=n.getboundingrect()}if(this._rect=t,e.hasstroke()){var o=this._rectwithstroke||(this._rectwithstroke=t.clone());if(this.__dirty||i){o.copy(t);var r=e.linewidth,a=e.strokenoscale?this.getlinescale():1;e.hasfill()||(r=math.max(r,this.strokecontainthreshold||4)),a>1e-10&&(o.width+=r/a,o.height+=r/a,o.x-=r/a/2,o.y-=r/a/2)}return o}return t},contain:function(t,e){var i=this.transformcoordtolocal(t,e),n=this.getboundingrect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var r=this.path.data;if(o.hasstroke()){var a=o.linewidth,s=o.strokenoscale?this.getlinescale():1;if(s>1e-10&&(o.hasfill()||(a=math.max(a,this.strokecontainthreshold)),wo(r,a/s,t,e)))return!0}if(o.hasfill())return ho(r,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtypath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__cliptarget&&this.__cliptarget.dirty()},animateshape:function(t){return this.animate("shape",t)},attrkv:function(t,e){"shape"===t?(this.setshape(e),this.__dirtypath=!0,this._rect=null):qi.prototype.attrkv.call(this,t,e)},setshape:function(t,e){var i=this.shape;if(i){if(s(t))for(var n in t)t.hasownproperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getlinescale:function(){var t=this.transform;return t&&yv(t[0]-1)>1e-10&&yv(t[3]-1)>1e-10?math.sqrt(yv(t[0]*t[3]-t[2]*t[1])):1}},zo.extend=function(t){var e=function(e){zo.call(this,e),t.style&&this.style.extendfrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasownproperty(o)&&i.hasownproperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};u(e,zo);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(zo,qi);var _v=hv.cmd,wv=[[],[],[]],bv=math.sqrt,sv=math.atan2,mv=function(t,e){var i,n,o,r,a,s,l=t.data,h=_v.m,u=_v.c,c=_v.l,d=_v.r,f=_v.a,p=_v.q;for(o=0,r=0;oa;a++){var s=wv[a];s[0]=l[o++],s[1]=l[o++],ie(s,s,e),l[r++]=s[0],l[r++]=s[1]}}},iv=["m","m","l","l","v","v","h","h","z","z","c","c","q","q","t","t","s","s","a","a"],tv=math.sqrt,av=math.sin,cv=math.cos,dv=math.pi,lv=function(t){return math.sqrt(t[0]*t[0]+t[1]*t[1])},pv=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(lv(t)*lv(e))},kv=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clippaths,n=this.style;if(i)for(var o=0;or;r++)o+=j(t[r-1],t[r]);var a=o/2;a=i>a?i:a;for(var r=0;a>r;r++){var s,l,h,u=r/(a-1)*(e?i:i-1),c=math.floor(u),d=u-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],h=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([ko(s[0],f[0],l[0],h[0],d,p,g),ko(s[1],f[1],l[1],h[1],d,p,g)])}return n},fv=function(t,e,i,n){var o,r,a,s,l=[],h=[],u=[],c=[];if(n){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)ne(a,a,t[d]),oe(s,s,t[d]);ne(a,a,n[0]),oe(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)o=t[d?d-1:f-1],r=t[(d+1)%f];else{if(0===d||d===f-1){l.push(f(t[d]));continue}o=t[d-1],r=t[d+1]}z(h,r,o),$(h,h,e);var g=j(p,o),v=j(p,r),m=g+v;0!==m&&(g/=m,v/=m),$(u,h,-g),$(c,h,v);var y=h([],p,u),x=h([],p,c);n&&(oe(y,y,a),ne(y,y,s),oe(x,x,a),ne(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},gv=zo.extend({type:"polygon",shape:{points:null,smooth:!1,smoothconstraint:null},buildpath:function(t,e){jo(t,e,!0)}}),hv=zo.extend({type:"polyline",shape:{points:null,smooth:!1,smoothconstraint:null},style:{stroke:"#000",fill:null},buildpath:function(t,e){jo(t,e,!1)}}),wv=zo.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.x,n=e.y,o=e.width,r=e.height;e.r?zi(t,e):t.rect(i,n,o,r),t.closepath()}}),zv=zo.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildpath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,r=e.y2,a=e.percent;0!==a&&(t.moveto(i,n),1>a&&(o=i*(1-a)+o*a,r=n*(1-a)+r*a),t.lineto(o,r))},pointat:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),uv=[],xv=zo.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildpath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,r=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveto(i,n),null==l||null==h?(1>u&&(so(i,a,o,u,uv),a=uv[1],o=uv[2],so(n,s,r,u,uv),s=uv[1],r=uv[2]),t.quadraticcurveto(a,s,o,r)):(1>u&&(mo(i,a,l,o,u,uv),a=uv[1],l=uv[2],o=uv[3],mo(n,s,h,r,u,uv),s=uv[1],h=uv[2],r=uv[3]),t.beziercurveto(a,s,l,h,o,r)))},pointat:function(t){return qo(this.shape,t,!1)},tangentat:function(t){var e=qo(this.shape,t,!0);return k(e,e)}}),qv=zo.extend({type:"arc",shape:{cx:0,cy:0,r:0,startangle:0,endangle:2*math.pi,clockwise:!0},style:{stroke:"#000",fill:null},buildpath:function(t,e){var i=e.cx,n=e.cy,o=math.max(e.r,0),r=e.startangle,a=e.endangle,s=e.clockwise,l=math.cos(r),h=math.sin(r);t.moveto(l*o+i,h*o+n),t.arc(i,n,o,r,a,!s)}}),yv=zo.extend({type:"compound",shape:{paths:null},_updatepathdirty:function(){for(var t=this.__dirtypath,e=this.shape.paths,i=0;i=0;r--)n=o(n,t[r],!0);eo(this,"__defaultoption",n)}return io(this,"__defaultoption")},getreferringcomponents:function(t){return this.ecmodel.querycomponents({maintype:t,index:this.get(t+"index",!0),id:this.get(t+"id",!0)})}});ho(bm,{registerwhenextend:!0}),sa(bm),la(bm,ga),c(bm,_m);var sm="";"undefined"!=typeof navigator&&(sm=navigator.platform||"");var mm={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textstyle:{fontfamily:sm.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},im={clearcolorpalette:function(){eo(this,"coloridx",0),eo(this,"colornamemap",{})},getcolorfrompalette:function(t,e){e=e||this;var i=io(e,"coloridx")||0,n=io(e,"colornamemap")||eo(e,"colornamemap",{});if(n.hasownproperty(t))return n[t];var o=this.get("color",!0)||[];if(o.length){var r=o[i];return t&&(n[t]=r),eo(e,"coloridx",(i+1)%o.length),r}}},tm=f,am=v,cm=p,dm=_,lm=h,pm=s,km="\x00_ec_inner",om=hr.extend({constructor:om,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new hr(i),this._optionmanager=n},setoption:function(t,e){k(!(km in t),"please use chart.getoption()"),this._optionmanager.setoption(t,e),this.resetoption(null)},resetoption:function(t){var e=!1,i=this._optionmanager;if(!t||"recreate"===t){var n=i.mountoption("recreate"===t);this.option&&"recreate"!==t?(this.restoredata(),this.mergeoption(n)):ma.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoredata(),!t||"recreate"===t||"timeline"===t){var o=i.gettimelineoption(this);o&&(this.mergeoption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var r=i.getmediaoption(this,this._api);r.length&&tm(r,function(t){this.mergeoption(t,e=!0)},this)}return e},mergeoption:function(t){function e(e,n){var o=ur(t[e]),s=$r(r.get(e),o);kr(s),tm(s,function(t){var i=t.option;pm(i)&&(t.keyinfo.maintype=e,t.keyinfo.subtype=xa(e,i,t.exist))});var l=ya(r,n);i[e]=[],r.set(e,[]),tm(s,function(t,n){var o=t.exist,s=t.option;if(k(pm(s)||o,"empty component definition"),s){var h=bm.getclass(e,t.keyinfo.subtype,!0);if(o&&o instanceof h)o.name=t.keyinfo.name,o.mergeoption(s,this),o.optionupdated(s,!1);else{var u=a({dependentmodels:l,componentindex:n},t.keyinfo);o=new h(s,this,this,u),a(o,u),o.init(s,this,this,u),o.optionupdated(null,!0)}}else o.mergeoption({},this),o.optionupdated({},!1);r.get(e)[n]=o,i[e][n]=o.option},this),"series"===e&&(this._seriesindices=_a(r.get("series")))}var i=this.option,r=this._componentsmap,s=[];tm(t,function(t,e){null!=t&&(bm.hasclass(e)?s.push(e):i[e]=null==i[e]?n(t):o(i[e],t,!0))}),bm.topologicaltravel(s,bm.getallclassmaintypes(),e,this),this._seriesindices=this._seriesindices||[]},getoption:function(){var t=n(this.option);return tm(t,function(e,i){if(bm.hasclass(i)){for(var e=ur(e),n=e.length-1;n>=0;n--)jr(e[n])&&e.splice(n,1);t[i]=e}}),delete t[km],t},gettheme:function(){return this._theme},getcomponent:function(t,e){var i=this._componentsmap.get(t);return i?i[e||0]:void 0},querycomponents:function(t){var e=t.maintype;if(!e)return[];var i=t.index,n=t.id,o=t.name,r=this._componentsmap.get(e);if(!r||!r.length)return[];var a;if(null!=i)dm(i)||(i=[i]),a=am(cm(i,function(t){return r[t]}),function(t){return!!t});else if(null!=n){var s=dm(n);a=am(r,function(t){return s&&lm(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var l=dm(o);a=am(r,function(t){return l&&lm(o,t.name)>=0||!l&&t.name===o})}else a=r.slice();return wa(a,t)},findcomponents:function(t){function e(t){var e=o+"index",i=o+"id",n=o+"name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{maintype:o,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?am(e,t.filter):e}var n=t.query,o=t.maintype,r=e(n),a=r?this.querycomponents(r):this._componentsmap.get(o);return i(wa(a,t))},eachcomponent:function(t,e,i){var n=this._componentsmap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){tm(t,function(t,o){e.call(i,n,t,o)})});else if(b(t))tm(n.get(t),e,i);else if(pm(t)){var o=this.findcomponents(t);tm(o,e,i)}},getseriesbyname:function(t){var e=this._componentsmap.get("series");return am(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 am(e,function(e){return e.subtype===t})},getseries:function(){return this._componentsmap.get("series").slice()},eachseries:function(t,e){tm(this._seriesindices,function(i){var n=this._componentsmap.get("series")[i];t.call(e,n,i)},this)},eachrawseries:function(t,e){tm(this._componentsmap.get("series"),t,e)},eachseriesbytype:function(t,e,i){tm(this._seriesindices,function(n){var o=this._componentsmap.get("series")[n];o.subtype===t&&e.call(i,o,n)},this)},eachrawseriesbytype:function(t,e,i){return tm(this.getseriesbytype(t),e,i)},isseriesfiltered:function(t){return h(this._seriesindices,t.componentindex)<0},getcurrentseriesindices:function(){return(this._seriesindices||[]).slice()},filterseries:function(t,e){var i=am(this._componentsmap.get("series"),t,e);this._seriesindices=_a(i)},restoredata:function(){var t=this._componentsmap;this._seriesindices=_a(t.get("series"));var e=[];t.each(function(t,i){e.push(i)}),bm.topologicaltravel(e,bm.getallclassmaintypes(),function(e){tm(t.get(e),function(t){t.restoredata()})})}});c(om,im);var zm=["getdom","getzr","getwidth","getheight","getdevicepixelratio","dispatchaction","isdisposed","on","off","getdataurl","getconnecteddataurl","getmodel","getoption","getviewofcomponentmodel","getviewofseriesmodel"],rm={};sa.prototype={constructor:sa,create:function(t,e){var i=[];f(rm,function(n){var o=n.create(t,e);i=i.concat(o||[])}),this._coordinatesystems=i},update:function(t,e){f(this._coordinatesystems,function(i){i.update&&i.update(t,e)})},getcoordinatesystems:function(){return this._coordinatesystems.slice()}},sa.register=function(t,e){rm[t]=e},sa.get=function(t){return rm[t]};var em=f,bm=n,vm=p,nm=o,fm=/^(min|max)?(.+)$/;ma.prototype={constructor:ma,setoption:function(t,e){t=bm(t,!0);var i=this._optionbackup,n=ia.call(this,t,e,!i);this._newbaseoption=n.baseoption,i?(da(i.baseoption,n.baseoption),n.timelineoptions.length&&(i.timelineoptions=n.timelineoptions),n.medialist.length&&(i.medialist=n.medialist),n.mediadefault&&(i.mediadefault=n.mediadefault)):this._optionbackup=n},mountoption:function(t){var e=this._optionbackup;return this._timelineoptions=vm(e.timelineoptions,bm),this._medialist=vm(e.medialist,bm),this._mediadefault=bm(e.mediadefault),this._currentmediaindices=[],bm(t?e.baseoption:this._newbaseoption)},gettimelineoption:function(t){var e,i=this._timelineoptions;if(i.length){var n=t.getcomponent("timeline");n&&(e=bm(i[n.getcurrentindex()],!0))}return e},getmediaoption:function(){var t=this._api.getwidth(),e=this._api.getheight(),i=this._medialist,n=this._mediadefault,o=[],r=[];if(!i.length&&!n)return r;for(var a=0,s=i.length;s>a;a++)ta(i[a].query,t,e)&&o.push(a);return!o.length&&n&&(o=[-1]),o.length&&!ca(o,this._currentmediaindices)&&(r=vm(o,function(t){return bm(-1===t?n.option:i[t].option)})),this._currentmediaindices=o,r}};var gm=f,hm=s,wm=["areastyle","linestyle","nodestyle","linkstyle","chordstyle","label","labelline"],zm=function(t,e){gm(za(t.series),function(t){hm(t)&&oa(t)});var i=["xaxis","yaxis","radiusaxis","angleaxis","singleaxis","parallelaxis","radar"];e&&i.push("valueaxis","categoryaxis","logaxis","timeaxis"),gm(i,function(e){gm(za(t[e]),function(t){t&&(pa(t,"axislabel"),pa(t.axispointer,"label"))})}),gm(za(t.parallel),function(t){var e=t&&t.parallelaxisdefault;pa(e,"axislabel"),pa(e&&e.axispointer,"label")}),gm(za(t.calendar),function(t){pa(t,"daylabel"),pa(t,"monthlabel"),pa(t,"yearlabel")}),gm(za(t.radar),function(t){pa(t,"name")}),gm(za(t.geo),function(t){hm(t)&&(ka(t.label),gm(za(t.regions),function(t){ka(t.label)}))}),ka(ra(t.timeline).label),pa(ra(t.axispointer),"label"),pa(ra(t.tooltip).axispointer,"label")},um=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],xm=["grid","geo","parallel","legend","toolbox","title","visualmap","datazoom","timeline"],qm=["bar","boxplot","candlestick","chord","effectscatter","funnel","gauge","lines","graph","heatmap","line","map","parallel","pie","radar","sankey","scatter","treemap"],ym=function(t,e){zm(t,e),t.series=ur(t.series),f(t.series,function(t){if(s(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockwise&&(t.clockwise=t.clockwise),"gauge"===e){var i=ea(t,"pointer.color");null!=i&&ba(t,"itemstyle.normal.color",i)}for(var n=0;n":"")+a.join(r?"
":", ")}var n=io(this,"data"),o=this.getrawvalue(t),r=_(o)?i(o):jn(qn(o)),a=n.getname(t),s=n.getitemvisual(t,"color");s(s)&&s.colorstops&&(s=(s.colorstops[0]||{}).color),s=s||"transparent";var l=jn(s),h=this.name;return"\x00-"===h&&(h=""),h=h?jn(h)+(e?": ":"
"):"",e?l+h+r:h+l+(a?jn(a)+": "+r:r)},isanimationenabled:function(){if(vf.node)return!1;var t=this.getshallow("animation");return t&&this.getdata().count()>this.getshallow("animationthreshold")&&(t=!1),t},restoredata:function(){eo(this,"data",io(this,"databeforeprocessed").cloneshallow())},getcolorfrompalette:function(t,e){var i=this.ecmodel,n=im.getcolorfrompalette.call(this,t,e);return n||(n=i.getcolorfrompalette(t,e)),n},getaxistooltipdata:null,gettooltipposition:null});c(jm,dm),c(jm,im);var $m=function(){this.group=new wp,this.uid=aa("viewcomponent")};$m.prototype={constructor:$m,init:function(){},render:function(){},dispose:function(){}};var km=$m.prototype;km.updateview=km.updatelayout=km.updatevisual=function(){},ao($m),ho($m,{registerwhenextend:!0}),na.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){ga(t.getdata(),n,"emphasis")},downplay:function(t,e,i,n){ga(t.getdata(),n,"normal")},remove:function(){this.group.removeall()},dispose:function(){}};var jm=na.prototype;jm.updateview=jm.updatelayout=jm.updatevisual=function(t,e,i,n){this.render(t,e,i,n)},ao(na,["dispose"]),ho(na,{registerwhenextend:!0});var qm="\x00__throttleoriginmethod",ty="\x00__throttlerate",ey="\x00__throttletype",iy=function(t){function e(e){var i=(e.visualcoloraccesspath||"itemstyle.normal.color").split("."),n=e.getdata(),o=e.get(i)||e.getcolorfrompalette(e.get("name"));n.setvisual("color",o),t.isseriesfiltered(e)||("function"!=typeof o||o instanceof jv||n.each(function(t){n.setitemvisual(t,"color",o(e.getdataparams(t)))}),n.each(function(t){var e=n.getitemmodel(t),o=e.get(i,!0);null!=o&&n.setitemvisual(t,"color",o)}))}t.eachrawseries(e)},ny=math.pi,oy=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textcolor:"#000",maskcolor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new wv({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4}),n=new qv({shape:{startangle:-ny/2,endangle:-ny/2+.1,r:10},style:{stroke:e.color,linecap:"round",linewidth:5},zlevel:e.zlevel,z:10001}),o=new wv({style:{fill:"none",text:e.text,textposition:"right",textdistance:10,textfill:e.textcolor},zlevel:e.zlevel,z:10001});n.animateshape(!0).when(1e3,{endangle:3*ny/2}).start("circularinout"),n.animateshape(!0).when(1e3,{startangle:3*ny/2}).delay(300).start("circularinout");var r=new wp;return r.add(n),r.add(o),r.add(i),r.resize=function(){var e=t.getwidth()/2,r=t.getheight()/2;n.setshape({cx:e,cy:r});var a=n.shape.r;o.setshape({x:e-a,y:r-a,width:2*a,height:2*a}),i.setshape({x:0,y:0,width:t.getwidth(),height:t.getheight()})},r.resize(),r},ry=f,ay=bm.parseclasstype,sy="3.8.4",ly={zrender:"3.7.3"},hy=1e3,uy=5e3,cy=1e3,dy=2e3,fy=3e3,py=4e3,gy=5e3,vy={processor:{filter:hy,statistic:uy},visual:{layout:cy,global:dy,chart:fy,component:py,brush:gy}},my="__flaginmainprocess",yy="__hasgradientorpatternbg",xy="__optionupdated",_y=/^[a-za-z0-9_]+$/;xa.prototype.on=ua("on"),xa.prototype.off=ua("off"),xa.prototype.one=ua("one"),c(xa,ff);var wy=qa.prototype;wy._onframe=function(){if(this[xy]){var t=this[xy].silent;this[my]=!0,by.prepareandupdate.call(this),this[my]=!1,this[xy]=!1,ka.call(this,t),ja.call(this,t)}},wy.getdom=function(){return this._dom},wy.getzr=function(){return this._zr},wy.setoption=function(t,e,i){var n;if(s(e)&&(i=e.lazyupdate,n=e.silent,e=e.notmerge),this[my]=!0,!this._model||e){var o=new ma(this._api),r=this._theme,a=this._model=new om(null,null,r,o);a.init(null,null,r,o)}this._model.setoption(t,ay),i?(this[xy]={silent:n},this[my]=!1):(by.prepareandupdate.call(this),this._zr.flush(),this[xy]=!1,this[my]=!1,ka.call(this,n),ja.call(this,n))},wy.settheme=function(){console.log("echarts#settheme() is deprecated in echarts 3.0")},wy.getmodel=function(){return this._model},wy.getoption=function(){return this._model&&this._model.getoption()},wy.getwidth=function(){return this._zr.getwidth()},wy.getheight=function(){return this._zr.getheight()},wy.getdevicepixelratio=function(){return this._zr.painter.dpr||window.devicepixelratio||1 },wy.getrenderedcanvas=function(t){if(vf.canvassupported){t=t||{},t.pixelratio=t.pixelratio||1,t.backgroundcolor=t.backgroundcolor||this._model.get("backgroundcolor");var e=this._zr,i=e.storage.getdisplaylist();return f(i,function(t){t.stopanimation(!0)}),e.painter.getrenderedcanvas(t)}},wy.getsvgdataurl=function(){if(vf.svgsupported){var t=this._zr,e=t.storage.getdisplaylist();return f(e,function(t){t.stopanimation(!0)}),t.painter.pathtosvg()}},wy.getdataurl=function(t){t=t||{};var e=t.excludecomponents,i=this._model,n=[],o=this;ry(e,function(t){i.eachcomponent({maintype:t},function(t){var e=o._componentsmap[t.__viewid];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var r="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.getrenderedcanvas(t).todataurl("image/"+(t&&t.type||"png"));return ry(n,function(t){t.group.ignore=!1}),r},wy.getconnecteddataurl=function(t){if(vf.canvassupported){var e=this.group,i=math.min,o=math.max,r=1/0;if(oy[e]){var a=r,s=r,l=-r,h=-r,u=[],c=t&&t.pixelratio||1;f(ky,function(r){if(r.group===e){var c=r.getrenderedcanvas(n(t)),d=r.getdom().getboundingclientrect();a=i(d.left,a),s=i(d.top,s),l=o(d.right,l),h=o(d.bottom,h),u.push({dom:c,left:d.left,top:d.top})}}),a*=c,s*=c,l*=c,h*=c;var d=l-a,p=h-s,g=af();g.width=d,g.height=p;var v=in(g);return ry(u,function(t){var e=new tn({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)}},wy.converttopixel=x(ya,"converttopixel"),wy.convertfrompixel=x(ya,"convertfrompixel"),wy.containpixel=function(t,e){var i,n=this._model;return t=ea(n,t),f(t,function(t,n){n.indexof("models")>=0&&f(t,function(t){var o=t.coordinatesystem;if(o&&o.containpoint)i|=!!o.containpoint(e);else if("seriesmodels"===n){var r=this._chartsmap[t.__viewid];r&&r.containpoint&&(i|=r.containpoint(e,t))}},this)},this),!!i},wy.getvisual=function(t,e){var i=this._model;t=ea(i,t,{defaultmaintype:"series"});var n=t.seriesmodel,o=n.getdata(),r=t.hasownproperty("dataindexinside")?t.dataindexinside:t.hasownproperty("dataindex")?o.indexofrawindex(t.dataindex):null;return null!=r?o.getitemvisual(r,e):o.getvisual(e)},wy.getviewofcomponentmodel=function(t){return this._componentsmap[t.__viewid]},wy.getviewofseriesmodel=function(t){return this._chartsmap[t.__viewid]};var by={update:function(t){var e=this._model,i=this._api,n=this._coordsysmgr,o=this._zr;if(e){e.restoredata(),n.create(this._model,this._api),es.call(this,e,i),is.call(this,e),n.update(e,i),os.call(this,e,t),rs.call(this,e,t);var r=e.get("backgroundcolor")||"transparent",a=o.painter;if(a.issinglecanvas&&a.issinglecanvas())o.configlayer(0,{clearcolor:r});else{if(!vf.canvassupported){var s=le(r);r=ne(s,"rgb"),0===s[3]&&(r="transparent")}r.colorstops||r.image?(o.configlayer(0,{clearcolor:r}),this[yy]=!0,this._dom.style.background="transparent"):(this[yy]&&o.configlayer(0,{clearcolor:null}),this[yy]=!1,this._dom.style.background=r)}ry(cy,function(t){t(e,i)})}},updateview:function(t){var e=this._model;e&&(e.eachseries(function(t){t.getdata().clearallvisual()}),os.call(this,e,t),qa.call(this,"updateview",e,t))},updatevisual:function(t){var e=this._model;e&&(e.eachseries(function(t){t.getdata().clearallvisual()}),os.call(this,e,t,!0),qa.call(this,"updatevisual",e,t))},updatelayout:function(t){var e=this._model;e&&(ns.call(this,e,t),qa.call(this,"updatelayout",e,t))},prepareandupdate:function(t){var e=this._model;ts.call(this,"component",e),ts.call(this,"chart",e),by.update.call(this,t)}};wy.resize=function(t){this[my]=!0,this._zr.resize(t);var e=this._model&&this._model.resetoption("media"),i=e?"prepareandupdate":"update";by[i].call(this),this._loadingfx&&this._loadingfx.resize(),this[my]=!1;var n=t&&t.silent;ka.call(this,n),ja.call(this,n)},wy.showloading=function(t,e){if(s(t)&&(e=t,t=""),t=t||"default",this.hideloading(),py[t]){var i=py[t](this._api,e),n=this._zr;this._loadingfx=i,n.add(i)}},wy.hideloading=function(){this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null},wy.makeactionfromevent=function(t){var e=a({},t);return e.type=iy[t.type],e},wy.dispatchaction=function(t,e){if(s(e)||(e={silent:!!e}),my[t.type]&&this._model){if(this[my])return void this._pendingactions.push(t);$a.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&vf.browser.wechat&&this._throttledzrflush(),ka.call(this,e.silent),ja.call(this,e.silent)}},wy.on=ua("on"),wy.off=ua("off"),wy.one=ua("one");var sy=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];wy._initevents=function(){ry(sy,function(t){this._zr.on(t,function(e){var i,n=this.getmodel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataindex){var r=o.datamodel||n.getseriesbyindex(o.seriesindex);i=r&&r.getdataparams(o.dataindex,o.datatype)||{}}else o&&o.eventdata&&(i=a({},o.eventdata));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),ry(iy,function(t,e){this._messagecenter.on(e,function(t){this.trigger(e,t)},this)},this)},wy.isdisposed=function(){return this._disposed},wy.clear=function(){this.setoption({series:[]},!0)},wy.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;ry(this._componentsviews,function(i){i.dispose(e,t)}),ry(this._chartsviews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete ky[this.id]}},c(qa,ff);var my={},iy={},ty=[],ay=[],cy=[],dy=[],ly={},py={},ky={},oy={},zy=new date-0,ry=new date-0,ey="_echarts_instance_",by={},vy=fs;is(dy,iy),ys(ym),ts("default",oy),ws({type:"highlight",event:"highlight",update:"highlight"},b),ws({type:"downplay",event:"downplay",update:"downplay"},b);var ny={};rs.prototype={constructor:rs,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,i=this._new,n={},o={},r=[],a=[];for(es(e,n,r,"_oldkeygetter",this),es(i,o,a,"_newkeygetter",this),t=0;tu;u++)this._add&&this._add(l[u]);else this._add&&this._add(l)}}}};var fy=s,gy="undefined",hy=typeof window===gy?global:window,wy={"float":typeof hy.float64array===gy?array:hy.float64array,"int":typeof hy.int32array===gy?array:hy.int32array,ordinal:array,number:array,time:array},zy=["stackedon","hasitemoption","_namelist","_idlist","_rawdata"];vs.prototype.pure=!1,vs.prototype.count=function(){return this._array.length},vs.prototype.getitem=function(t){return this._array[t]};var uy=function(t,e){t=t||["x","y"];for(var i={},n=[],o=0;od;d++){for(var v=t.getitem(d),m=0;md;d++){var v=t.getitem(d);!e[d]&&v&&(null!=v.name?e[d]=v.name:null!=o&&(e[d]=r[s[o]][d]));var w=e[d]||"",b=v&&v.id;!b&&w&&(c[w]=c[w]||0,b=w,c[w]>0&&(b+="__ec__"+c[w]),c[w]++),b&&(u[d]=b)}this._namelist=e,this._idlist=u},xy.count=function(){return this.indices.length},xy.get=function(t,e,i){var n=this._storage,o=this.indices[e];if(null==o||!n[t])return 0/0;var r=n[t][o];if(i){var a=this._dimensioninfos[t];if(a&&a.stackable)for(var s=this.stackedon;s;){var l=s.get(t,e);(r>=0&&l>0||0>=r&&0>l)&&(r+=l),s=s.stackedon}}return r},xy.getvalues=function(t,e,i){var n=[];_(t)||(i=e,e=t,t=this.dimensions);for(var o=0,r=t.length;r>o;o++)n.push(this.get(t[o],e,i));return n},xy.hasvalue=function(t){for(var e=this.dimensions,i=this._dimensioninfos,n=0,o=e.length;o>n;n++)if("ordinal"!==i[e[n]].type&&isnan(this.get(e[n],t)))return!1;return!0},xy.getdataextent=function(t,e,i){t=this.getdimension(t);var n=this._storage[t],o=this.getdimensioninfo(t);e=o&&o.stackable&&e;var r,a=(this._extent||(this._extent={}))[t+!!e];if(a)return a;if(n){for(var s=1/0,l=-1/0,h=0,u=this.count();u>h;h++)r=this.get(t,h,e),(!i||i(r,t,h))&&(s>r&&(s=r),r>l&&(l=r));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},xy.getsum=function(t,e){var i=this._storage[t],n=0;if(i)for(var o=0,r=this.count();r>o;o++){var a=this.get(t,o,e);isnan(a)||(n+=a)}return n},xy.indexof=function(t,e){var i=this._storage,n=i[t],o=this.indices;if(n)for(var r=0,a=o.length;a>r;r++){var s=o[r];if(n[s]===e)return r}return-1},xy.indexofname=function(t){for(var e=this.indices,i=this._namelist,n=0,o=e.length;o>n;n++){var r=e[n];if(i[r]===t)return n}return-1},xy.indexofrawindex=function(t){var e=this.indices,i=e[t];if(null!=i&&i===t)return t;for(var n=0,o=e.length-1;o>=n;){var r=(n+o)/2|0;if(e[r]t))return r;o=r-1}}return-1},xy.indicesofnearest=function(t,e,i,n){var o=this._storage,r=o[t],a=[];if(!r)return a;null==n&&(n=1/0);for(var s=number.max_value,l=-1,h=0,u=this.count();u>h;h++){var c=e-this.get(t,h,i),d=math.abs(c);n>=c&&s>=d&&((s>d||c>=0&&0>l)&&(s=d,l=c,a.length=0),a.push(h))}return a},xy.getrawindex=function(t){var e=this.indices[t];return null==e?-1:e},xy.getrawdataitem=function(t){return this._rawdata.getitem(this.getrawindex(t))},xy.getname=function(t){return this._namelist[this.indices[t]]||""},xy.getid=function(t){return this._idlist[this.indices[t]]||this.getrawindex(t)+""},xy.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),t=p(ns(t),this.getdimension,this);var o=[],r=t.length,a=this.indices;n=n||this;for(var s=0;sl;l++)o[l]=this.get(t[l],s,i);o[l]=s,e.apply(n,o)}},xy.filterself=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),t=p(ns(t),this.getdimension,this);var o=[],r=[],a=t.length,s=this.indices;n=n||this;for(var l=0;lu;u++)r[u]=this.get(t[u],l,i);r[u]=l,h=e.apply(n,r)}else h=e.call(n,l);h&&o.push(s[l])}return this.indices=o,this._extent={},this},xy.maparray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i,n),o},xy.map=function(t,e,i,n){t=p(ns(t),this.getdimension,this);var o=fs(this,t),r=o.indices=this.indices,a=o._storage,s=[];return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(s[0]=n,n=s);for(var o=0;op;p+=c){c>f-p&&(c=f-p,h.length=c);for(var g=0;c>g;g++){var v=s[p+g];h[g]=d[v],u[g]=v}var m=i(h),v=u[n(h,m)||0];d[v]=m,l.push(v)}return o},xy.getitemmodel=function(t){var e=this.hostmodel;return t=this.indices[t],new hr(this._rawdata.getitem(t),e,e&&e.ecmodel)},xy.diff=function(t){var e,i=this._idlist,n=t&&t._idlist,o="e\x00\x00";return new rs(t?t.indices:[],this.indices,function(t){return null!=(e=n[t])?e:o+t},function(t){return null!=(e=i[t])?e:o+t})},xy.getvisual=function(t){var e=this._visual;return e&&e[t]},xy.setvisual=function(t,e){if(fy(t))for(var i in t)t.hasownproperty(i)&&this.setvisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},xy.setlayout=function(t,e){if(fy(t))for(var i in t)t.hasownproperty(i)&&this.setlayout(i,t[i]);else this._layout[t]=e},xy.getlayout=function(t){return this._layout[t]},xy.getitemlayout=function(t){return this._itemlayouts[t]},xy.setitemlayout=function(t,e,i){this._itemlayouts[t]=i?a(this._itemlayouts[t]||{},e):e},xy.clearitemlayouts=function(){this._itemlayouts.length=0},xy.getitemvisual=function(t,e,i){var n=this._itemvisuals[t],o=n&&n[e];return null!=o||i?o:this.getvisual(e)},xy.setitemvisual=function(t,e,i){var n=this._itemvisuals[t]||{};if(this._itemvisuals[t]=n,fy(e))for(var o in e)e.hasownproperty(o)&&(n[o]=e[o]);else n[e]=i},xy.clearallvisual=function(){this._visual={},this._itemvisuals=[]};var qy=function(t){t.seriesindex=this.seriesindex,t.dataindex=this.dataindex,t.datatype=this.datatype};xy.setitemgraphicel=function(t,e){var i=this.hostmodel;e&&(e.dataindex=t,e.datatype=this.datatype,e.seriesindex=i&&i.seriesindex,"group"===e.type&&e.traverse(qy,e)),this._graphicels[t]=e},xy.getitemgraphicel=function(t){return this._graphicels[t]},xy.eachitemgraphicel=function(t,e){f(this._graphicels,function(i,n){i&&t&&t.call(e,i,n)})},xy.cloneshallow=function(){var t=p(this.dimensions,this.getdimensioninfo,this),e=new uy(t,this.hostmodel);return e._storage=this._storage,bs(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=a({},this._extent)),e},xy.wrapmethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedmethods=this.__wrappedmethods||[],this.__wrappedmethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(l(arguments)))})},xy.transferable_methods=["cloneshallow","downsample","map"],xy.changable_methods=["filterself"];var yy=f,jy=b,$y=s,ky={tooltip:1,label:1,itemname:1},jy=gs.guessordinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var o=hs(t[i]);if(!_(o))return!1;var o=o[e];if(null!=o&&isfinite(o)&&""!==o)return!1;if(jy(o)&&"-"!==o)return!0}return!1},qy={cartesian2d:function(t,e,i,n){var o=p(["xaxis","yaxis"],function(t){return i.querycomponents({maintype:t,index:e.get(t+"index"),id:e.get(t+"id")})[0]}),r=o[0],a=o[1],s=r.get("type"),l=a.get("type"),h=[{name:"x",type:qs(s),stackable:xs(s)},{name:"y",type:qs(l),stackable:xs(l)}],u="category"===s,c="category"===l;h=gs(h,t,n);var d={};return u&&(d.x=r),c&&(d.y=a),{dimensions:h,categoryindex:u?0:c?1:-1,categoryaxesmodels:d}},singleaxis:function(t,e,i,n){var o=i.querycomponents({maintype:"singleaxis",index:e.get("singleaxisindex"),id:e.get("singleaxisid")})[0],r=o.get("type"),a="category"===r,s=[{name:"single",type:qs(r),stackable:xs(r)}];s=gs(s,t,n);var l={};return a&&(l.single=o),{dimensions:s,categoryindex:a?0:-1,categoryaxesmodels:l}},polar:function(t,e,i,n){var o=i.querycomponents({maintype:"polar",index:e.get("polarindex"),id:e.get("polarid")})[0],r=o.findaxismodel("angleaxis"),a=o.findaxismodel("radiusaxis"),s=a.get("type"),l=r.get("type"),h=[{name:"radius",type:qs(s),stackable:xs(s)},{name:"angle",type:qs(l),stackable:xs(l)}],u="category"===l,c="category"===s;h=gs(h,t,n);var d={};return c&&(d.radius=a),u&&(d.angle=r),{dimensions:h,categoryindex:u?1:c?0:-1,categoryaxesmodels:d}},geo:function(t,e,i,n){return{dimensions:gs([{name:"lng"},{name:"lat"}],t,n)}}};js.prototype.parse=function(t){return t},js.prototype.getsetting=function(t){return this._setting[t]},js.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},js.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},js.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},js.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},js.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getdataextent(e,!0))},js.prototype.getextent=function(){return this._extent.slice()},js.prototype.setextent=function(t,e){var i=this._extent;isnan(t)||(i[0]=t),isnan(e)||(i[1]=e)},js.prototype.gettickslabels=function(){for(var t=[],e=this.getticks(),i=0;ie[1]&&(e[1]=t[1]),ox.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=ks(t)},getticks:function(){return tl(this._interval,this._extent,this._niceextent,this._intervalprecision)},gettickslabels:function(){for(var t=[],e=this.getticks(),i=0;io&&(o=-o,n.reverse());var r=$s(n,t,e,i);this._intervalprecision=r.intervalprecision,this._interval=r.interval,this._niceextent=r.nicetickextent}},niceextent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixmax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isfinite(n)||(e[0]=0,e[1]=1),this.niceticks(t.splitnumber,t.mininterval,t.maxinterval);var o=this._interval;t.fixmin||(e[0]=nx(math.floor(e[0]/o)*o)),t.fixmax||(e[1]=nx(math.ceil(e[1]/o)*o))}});ox.create=function(){return new ox};var rx=ox.prototype,ax=math.ceil,sx=math.floor,lx=1e3,hx=60*lx,ux=60*hx,cx=24*ux,dx=function(t,e,i,n){for(;n>i;){var o=i+n>>>1;t[o][1]r&&(r=e),null!=i&&r>i&&(r=i);var a=px.length,s=dx(px,r,0,a),l=px[math.min(s,a-1)],h=l[1];if("year"===l[0]){var u=o/h,c=zn(u/t,!0);h*=c}var d=this.getsetting("useutc")?0:60*new date(+n[0]||+n[1]).gettimezoneoffset()*1e3,f=[math.round(ax((n[0]-d)/h)*h+d),math.round(sx((n[1]-d)/h)*h+d)];qs(f,n),this._steplvl=l,this._interval=h,this._niceextent=f},parse:function(t){return+gn(t)}});f(["contain","normalize"],function(t){fx.prototype[t]=function(e){return rx[t].call(this,this.parse(e))}});var px=[["hh:mm:ss",lx],["hh:mm:ss",5*lx],["hh:mm:ss",10*lx],["hh:mm:ss",15*lx],["hh:mm:ss",30*lx],["hh:mm\nmm-dd",hx],["hh:mm\nmm-dd",5*hx],["hh:mm\nmm-dd",10*hx],["hh:mm\nmm-dd",15*hx],["hh:mm\nmm-dd",30*hx],["hh:mm\nmm-dd",ux],["hh:mm\nmm-dd",2*ux],["hh:mm\nmm-dd",6*ux],["hh:mm\nmm-dd",12*ux],["mm-dd\nyyyy",cx],["mm-dd\nyyyy",2*cx],["mm-dd\nyyyy",3*cx],["mm-dd\nyyyy",4*cx],["mm-dd\nyyyy",5*cx],["mm-dd\nyyyy",6*cx],["week",7*cx],["mm-dd\nyyyy",10*cx],["week",14*cx],["week",21*cx],["month",31*cx],["week",42*cx],["month",62*cx],["week",42*cx],["quarter",380*cx/4],["month",31*cx*4],["month",31*cx*5],["half-year",380*cx/2],["month",31*cx*8],["month",31*cx*10],["year",380*cx]];fx.create=function(t){return new fx({useutc:t.ecmodel.get("useutc")})};var gx=js.prototype,vx=ox.prototype,mx=en,yx=on,xx=math.floor,_x=math.ceil,wx=math.pow,bx=math.log,sx=js.extend({type:"log",base:10,$constructor:function(){js.apply(this,arguments),this._originalscale=new ox},getticks:function(){var t=this._originalscale,e=this._extent,i=t.getextent();return p(vx.getticks.call(this),function(n){var o=on(wx(this.base,n));return o=n===e[0]&&t.__fixmin?el(o,i[0]):o,o=n===e[1]&&t.__fixmax?el(o,i[1]):o},this)},getlabel:vx.getlabel,scale:function(t){return t=gx.scale.call(this,t),wx(this.base,t)},setextent:function(t,e){var i=this.base;t=bx(t)/bx(i),e=bx(e)/bx(i),vx.setextent.call(this,t,e)},getextent:function(){var t=this.base,e=gx.getextent.call(this);e[0]=wx(t,e[0]),e[1]=wx(t,e[1]);var i=this._originalscale,n=i.getextent();return i.__fixmin&&(e[0]=el(e[0],n[0])),i.__fixmax&&(e[1]=el(e[1],n[1])),e},unionextent:function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=bx(t[0])/bx(e),t[1]=bx(t[1])/bx(e),gx.unionextent.call(this,t)},unionextentfromdata:function(t,e){this.unionextent(t.getdataextent(e,!0,function(t){return t>0}))},niceticks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=hn(i),o=t/i*n;for(.5>=o&&(n*=10);!isnan(n)&&math.abs(n)<1&&math.abs(n)>0;)n*=10;var r=[on(_x(e[0]/n)*n),on(xx(e[1]/n)*n)];this._interval=n,this._niceextent=r}},niceextent:function(t){vx.niceextent.call(this,t);var e=this._originalscale;e.__fixmin=t.fixmin,e.__fixmax=t.fixmax}});f(["contain","normalize"],function(t){sx.prototype[t]=function(e){return e=bx(e)/bx(this.base),gx[t].call(this,e)}}),sx.create=function(){return new sx};var mx={getformattedlabels:function(){return sl(this.axis,this.get("axislabel.formatter"))},getcategories:function(){return"category"===this.get("type")&&p(this.get("data"),hl)},getmin:function(t){var e=this.option,i=t||null==e.rangestart?e.min:e.rangestart;return this.axis&&null!=i&&"datamin"!==i&&"function"!=typeof i&&!t(i)&&(i=this.axis.scale.parse(i)),i},getmax:function(t){var e=this.option,i=t||null==e.rangeend?e.max:e.rangeend;return this.axis&&null!=i&&"datamax"!==i&&"function"!=typeof i&&!t(i)&&(i=this.axis.scale.parse(i)),i},getneedcrosszero:function(){var t=this.option;return null!=t.rangestart||null!=t.rangeend?!1:!t.scale},getcoordsysmodel:b,setrange:function(t,e){this.option.rangestart=t,this.option.rangeend=e},resetrange:function(){this.option.rangestart=this.option.rangeend=null}},ix=tr({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,r=e.height/2;t.moveto(i,n-r),t.lineto(i+o,n+r),t.lineto(i-o,n+r),t.closepath()}}),tx=tr({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,r=e.height/2;t.moveto(i,n-r),t.lineto(i+o,n),t.lineto(i,n+r),t.lineto(i-o,n),t.closepath()}}),ax=tr({type:"pin",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,r=math.max(o,e.height),a=o/2,s=a*a/(r-a),l=n-r+a+s,h=math.asin(s/a),u=math.cos(h)*a,c=math.sin(h),d=math.cos(h),f=.6*a,p=.7*a;t.moveto(i-u,l+s),t.arc(i,l,a,math.pi-h,2*math.pi+h),t.beziercurveto(i+u-c*f,l+s+d*f,i,n-p,i,n),t.beziercurveto(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closepath()}}),cx=tr({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.height,n=e.width,o=e.x,r=e.y,a=n/3*2;t.moveto(o,r),t.lineto(o+a,r+i),t.lineto(o,r+i/4*3),t.lineto(o-a,r+i),t.lineto(o,r),t.closepath()}}),dx={line:zv,rect:wv,roundrect:wv,square:wv,circle:zv,diamond:tx,pin:ax,arrow:cx,triangle:ix},lx={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundrect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=math.min(i,n)/4},square:function(t,e,i,n,o){var r=math.min(i,n);o.x=t,o.y=e,o.width=r,o.height=r},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},px={};f(dx,function(t,e){px[e]=new t});var kx=tr({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,i){var n=e.symboltype,o=px[n];"none"!==e.symboltype&&(o||(n="rect",o=px[n]),lx[n](e.x,e.y,e.width,e.height,o.shape),o.buildpath(t,o.shape,i))}}),ox=(object.freeze||object)({createlist:dl,createscale:fl,mixinaxismodelcommonmethods:pl,completedimensions:gs,createsymbol:cl}),zx=pn,rx=[0,1],ex=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onband=!1,this._labelinterval};ex.prototype={constructor:ex,contain:function(t){var e=this._extent,i=math.min(e[0],e[1]),n=math.max(e[0],e[1]);return t>=i&&n>=t},containdata:function(t){return this.contain(this.datatocoord(t))},getextent:function(){return this._extent.slice()},getpixelprecision:function(t){return bn(t||this.scale.getextent(),this._extent)},setextent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},datatocoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onband&&"ordinal"===n.type&&(i=i.slice(),gl(i,n.count())),zx(t,rx,i,e)},coordtodata:function(t,e){var i=this._extent,n=this.scale;this.onband&&"ordinal"===n.type&&(i=i.slice(),gl(i,n.count()));var o=zx(t,i,rx,e);return this.scale.scale(o)},pointtodata:function(){},gettickscoords:function(t){if(this.onband&&!t){for(var e=this.getbands(),i=[],n=0;na;a++)e.push([r*a/i+n,r*(a+1)/i+n]);return e},getbandwidth:function(){var t=this._extent,e=this.scale.getextent(),i=e[1]-e[0]+(this.onband?1:0);0===i&&(i=1);var n=math.abs(t[1]-t[0]);return math.abs(n)/i},ishorizontal:null,getrotate:null,getlabelinterval:function(){var t=this._labelinterval;if(!t){var e=this.model,i=e.getmodel("axislabel");t=i.get("interval"),"category"!==this.type||null!=t&&"auto"!==t||(t=al(p(this.scale.getticks(),this.datatocoord,this),e.getformattedlabels(),i.getfont(),this.getrotate?this.getrotate():this.ishorizontal&&!this.ishorizontal()?90:0,i.get("rotate"))),this._labelinterval=t}return t}};var bx=1e-8;yl.prototype={constructor:yl,properties:null,getboundingrect:function(){var t=this._rect;if(t)return t;for(var e=number.max_value,i=[e,e],n=[-e,-e],o=[],r=[],a=this.geometries,s=0;sn;n++)if("polygon"===i[n].type){var r=i[n].exterior,a=i[n].interiors;if(ml(r,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(ml(a[s]))continue t;return!0}}return!1},transformto:function(t,e,i,n){var o=this.getboundingrect(),r=o.width/o.height;i?n||(n=i/r):i=r*n;for(var a=new qe(t,e,i,n),s=o.calculatetransform(a),l=this.geometries,h=0;h0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"multipolygon"===i.type&&f(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var r=new yl(e.name,o,e.cp);return r.properties=e,r})},nx={};f(["map","each","filter","indexof","inherits","reduce","filter","bind","curry","isarray","isstring","isobject","isfunction","extend","defaults","clone","merge"],function(t){nx[t]=kf[t]});var fx="__ec_stack_";tl.getlayoutonaxis=sl;var gx=function(t){this._axes={},this._dimlist=[],this.name=t||""};gx.prototype={constructor:gx,type:"cartesian",getaxis:function(t){return this._axes[t]},getaxes:function(){return p(this._dimlist,al,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 i=this._dimlist,n=t instanceof array?[]:{},o=0;oe[1]&&e.reverse(),e},getotheraxis:function(){this.grid.getotheraxis()},islabelignored:function(t){if("category"===this.type){var e=this.getlabelinterval();return"function"==typeof e&&!e(t,this.scale.getlabel(t))||t%(e+1)}},pointtodata:function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},tolocalcoord:null,toglobalcoord:null},u(hx,ex);var wx={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)"]}}},zx={}; zx.categoryaxis=o({boundarygap:!0,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},wx),zx.valueaxis=o({boundarygap:[0,0],splitnumber:5},wx),zx.timeaxis=s({scale:!0,min:"datamin",max:"datamax"},zx.valueaxis),zx.logaxis=s({scale:!0,logbase:10},zx.valueaxis);var ux=["value","category","time","log"],xx=function(t,e,i,n){f(ux,function(a){e.extend({type:t+"axis."+a,mergedefaultandtheme:function(e,n){var r=this.layoutmode,s=r?fa(e):{},l=n.gettheme();o(e,l.get(a+"axis")),o(e,this.getdefaultoption()),e.type=i(t,e),r&&da(e,s,r)},defaultoption:r([{},zx[a+"axis"],n],!0)})}),bm.registersubtypedefaulter(t+"axis",x(i,t))},qx=bm.extend({type:"cartesian2daxis",axis:null,init:function(){qx.superapply(this,"init",arguments),this.resetrange()},mergeoption:function(){qx.superapply(this,"mergeoption",arguments),this.resetrange()},restoredata:function(){qx.superapply(this,"restoredata",arguments),this.resetrange()},getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"grid",index:this.option.gridindex,id:this.option.gridid})[0]}});o(qx.prototype,mx);var yx={offset:0};xx("x",qx,dl,yx),xx("y",qx,dl,yx),bm.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 jx=f,$x=rl,kx=nl,jx=ol.prototype;jx.type="grid",jx.axispointerenabled=!0,jx.getrect=function(){return this._rect},jx.update=function(t,e){var i=this._axesmap;this._updatescale(t,this.model),jx(i.x,function(t){kx(t.scale,t.model)}),jx(i.y,function(t){kx(t.scale,t.model)}),jx(i.x,function(t){zl(i,"y",t)}),jx(i.y,function(t){zl(i,"x",t)}),this.resize(this.model,e)},jx.resize=function(t,e,i){function n(){jx(r,function(t){var e=t.ishorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setextent(i[n],i[1-n]),el(t,e?o.x:o.y)})}var o=ua(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()});this._rect=o;var r=this._axeslist;n(),!i&&t.get("containlabel")&&(jx(r,function(t){if(!t.model.get("axislabel.inside")){var e=kl(t);if(e){var i=t.ishorizontal()?"height":"width",n=t.model.get("axislabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},jx.getaxis=function(t,e){var i=this._axesmap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasownproperty(n))return i[n];return i[e]}},jx.getaxes=function(){return this._axeslist.slice()},jx.getcartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsmap[i]}s(t)&&(e=t.yaxisindex,t=t.xaxisindex);for(var n=0,o=this._coordslist;n0?1:-1,a=n.height>0?1:-1;return{x:n.x+r*o/2,y:n.y+a*o/2,width:n.width-r*o,height:n.height-a*o}},polar:function(t,e){var i=t.getitemlayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startangle:i.startangle,endangle:i.endangle}}},a_=math.pi,s_=function(t,e){this.opt=e,this.axismodel=t,s(e,{labeloffset:0,namedirection:1,tickdirection:1,labeldirection:1,silent:!0}),this.group=new wp;var i=new wp({position:e.position.slice(),rotation:e.rotation});i.updatetransform(),this._transform=i.transform,this._dumbgroup=i};s_.prototype={constructor:s_,hasbuilder:function(t){return!!l_[t]},add:function(t){l_[t].call(this)},getgroup:function(){return this.group}};var l_={axisline:function(){var t=this.opt,e=this.axismodel;if(e.get("axisline.show")){var i=this.axismodel.axis.getextent(),n=this._transform,o=[i[0],0],r=[i[1],0];n&&(ie(o,o,n),ie(r,r,n));var s=a({linecap:"round"},e.getmodel("axisline.linestyle").getlinestyle());this.group.add(new zv(ar({anid:"line",shape:{x1:o[0],y1:o[1],x2:r[0],y2:r[1]},style:s,strokecontainthreshold:t.strokecontainthreshold||5,silent:!0,z2:1})));var l=e.get("axisline.symbol"),h=e.get("axisline.symbolsize");if(null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof h||"number"==typeof h)&&(h=[h,h]);var u=h[0],c=h[1];f([[t.rotation+math.pi/2,o],[t.rotation-math.pi/2,r]],function(t,e){if("none"!==l[e]&&null!=l[e]){var i=cl(l[e],-u/2,-c/2,u,c,s.stroke,!0);i.attr({rotation:t[0],position:t[1],silent:!0}),this.group.add(i)}},this)}}},axisticklabel:function(){var t=this.axismodel,e=this.opt,i=jl(this,t,e),n=ql(this,t,e);yl(t,n,i)},axisname:function(){var t=this.opt,e=this.axismodel,i=a(t.axisname,e.get("name"));if(i){var n,o=e.get("namelocation"),r=t.namedirection,s=e.getmodel("nametextstyle"),l=e.get("namegap")||0,h=this.axismodel.axis.getextent(),u=h[0]>h[1]?-1:1,c=["start"===o?h[0]-u*l:"end"===o?h[1]+u*l:(h[0]+h[1])/2,kl(o)?t.labeloffset+r*l:0],d=e.get("namerotate");null!=d&&(d=d*a_/180);var f;kl(o)?n=h_(t.rotation,null!=d?d:t.rotation,r):(n=xl(t,o,d||0,h),f=t.axisnameavailablewidth,null!=f&&(f=math.abs(f/math.sin(n.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?wg(i,m,p,v,{minchar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.maintype,w={componenttype:_,name:i,$vars:["name"]};w[_+"index"]=e.componentindex;var b=new ov({anid:"name",__fulltext:i,__truncatedtext:y,position:c,rotation:n.rotation,silent:ql(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterparams:w},x):null});sr(b.style,s,{text:y,textfont:p,textfill:s.gettextcolor()||e.get("axisline.linestyle.color"),textalign:n.textalign,textverticalalign:n.textverticalalign}),e.get("triggerevent")&&(b.eventdata=ul(e),b.eventdata.targettype="axisname",b.eventdata.name=i),this._dumbgroup.add(b),b.updatetransform(),this.group.add(b),b.decomposetransform()}}},h_=s_.innertextlayout=function(t,e,i){var n,o,r=nn(e-t);return fn(r)?(o=i>0?"top":"bottom",n="center"):fn(r-a_)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=r>0&&a_>r?i>0?"right":"left":i>0?"left":"right"),{rotation:r,textalign:n,textverticalalign:o}},u_=s_.ifignoreontick=function(t,e,i,n,o,r){if(0===e&&o||e===n-1&&r)return!1;var a,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?(a=s.getticks()[e],!i(a,s.getlabel(a))):e%(i+1))},c_=s_.getinterval=function(t,e){var i=t.get("interval");return(null==i||"auto"==i)&&(i=e),i},d_=f,f_=x,p_=cs({type:"axis",_axispointer:null,axispointerclass:null,render:function(t,e,i,n){this.axispointerclass&&ah(t),p_.superapply(this,"render",arguments),ch(this,t,e,i,n,!0)},updateaxispointer:function(t,e,i,n){ch(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axispointer;i&&i.remove(e),p_.superapply(this,"remove",arguments)},dispose:function(t,e){dh(this,e),p_.superapply(this,"dispose",arguments)}}),g_=[];p_.registeraxispointerclass=function(t,e){g_[t]=e},p_.getaxispointerclass=function(t){return t&&g_[t]};var v_=s_.ifignoreontick,m_=s_.getinterval,y_=["axisline","axisticklabel","axisname"],x_=["splitarea","splitline"],__=p_.extend({type:"cartesianaxis",axispointerclass:"cartesianaxispointer",render:function(t,e,i,n){this.group.removeall();var o=this._axisgroup;if(this._axisgroup=new wp,this.group.add(this._axisgroup),t.get("show")){var r=t.getcoordsysmodel(),a=fh(r,t),s=new s_(t,a);f(y_,s.add,s),this._axisgroup.add(s.getgroup()),f(x_,function(e){t.get(e+".show")&&this["_"+e](t,r,a.labelinterval)},this),vr(o,this._axisgroup,t),__.supercall(this,"render",t,e,i,n)}},_splitline:function(t,e,i){var n=t.axis;if(!n.scale.isblank()){var o=t.getmodel("splitline"),r=o.getmodel("linestyle"),a=r.get("color"),l=m_(o,i);a=_(a)?a:[a];for(var h=e.coordinatesystem.getrect(),u=n.ishorizontal(),c=0,d=n.gettickscoords(),f=n.scale.getticks(),p=t.get("axislabel.showminlabel"),g=t.get("axislabel.showmaxlabel"),v=[],m=[],y=r.getlinestyle(),x=0;x0&&mh(i[o-1]);o--);for(;o>n&&mh(i[n]);n++);}for(;o>n;)n+=ih(t,i,n,o,o,1,r.min,r.max,e.smooth,e.smoothmonotone,e.connectnulls)+1}}),e_=zo.extend({type:"ec-polygon",shape:{points:[],stackedonpoints:[],smooth:0,stackedonsmooth:0,smoothconstraint:!0,smoothmonotone:null,connectnulls:!1},brush:ev(zo.prototype.brush),buildpath:function(t,e){var i=e.points,n=e.stackedonpoints,o=0,r=i.length,a=e.smoothmonotone,s=th(i,e.smoothconstraint),l=th(n,e.smoothconstraint);if(e.connectnulls){for(;r>0&&mh(i[r-1]);r--);for(;r>o&&mh(i[o]);o++);}for(;r>o;){var h=ih(t,i,o,r,r,1,s.min,s.max,e.smooth,a,e.connectnulls);ih(t,n,o+h-1,h,r,-1,l.min,l.max,e.stackedonsmooth,a,e.connectnulls),o+=h+1,t.closepath()}}});na.extend({type:"line",init:function(){var t=new wp,e=new xh;this.group.add(e.group),this._symboldraw=e,this._linegroup=t},render:function(t,e,i){var n=t.coordinatesystem,o=this.group,r=t.getdata(),a=t.getmodel("linestyle.normal"),l=t.getmodel("areastyle.normal"),h=r.maparray(r.getitemlayout,!0),u="polar"===n.type,c=this._coordsys,d=this._symboldraw,f=this._polyline,p=this._polygon,g=this._linegroup,v=t.get("animation"),m=!l.isempty(),y=ph(n,r),x=t.get("showsymbol"),_=x&&!u&&!t.get("showallsymbol")&&this._getsymbolignorefunc(r,n),w=this._data;w&&w.eachitemgraphicel(function(t,e){t.__temp&&(o.remove(t),w.setitemgraphicel(e,null))}),x||d.remove(),o.add(g);var b=!u&&t.get("step");f&&c.type===n.type&&b===this._step?(m&&!p?p=this._newpolygon(h,y,n,v):p&&!m&&(g.remove(p),p=this._polygon=null),g.setclippath(zh(n,!1,t)),x&&d.updatedata(r,_),r.eachitemgraphicel(function(t){t.stopanimation(!0)}),ah(this._stackedonpoints,y)&&ah(this._points,h)||(v?this._updateanimation(r,y,n,i,b):(b&&(h=rh(h,n,b),y=rh(y,n,b)),f.setshape({points:h}),p&&p.setshape({points:h,stackedonpoints:y})))):(x&&d.updatedata(r,_),b&&(h=rh(h,n,b),y=rh(y,n,b)),f=this._newpolyline(h,n,v),m&&(p=this._newpolygon(h,y,n,v)),g.setclippath(zh(n,!0,t)));var s=eh(r,n)||r.getvisual("color");f.usestyle(s(a.getlinestyle(),{fill:"none",stroke:s,linejoin:"bevel"}));var m=t.get("smooth");if(m=ch(t.get("smooth")),f.setshape({smooth:m,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")}),p){var i=r.stackedon,t=0;if(p.usestyle(s(l.getareastyle(),{fill:s,opacity:.7,linejoin:"bevel"})),i){var a=i.hostmodel;t=ch(a.get("smooth"))}p.setshape({smooth:m,stackedonsmooth:t,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")})}this._data=r,this._coordsys=n,this._stackedonpoints=y,this._points=h,this._step=b},dispose:function(){},highlight:function(t,e,i,n){var o=t.getdata(),r=ta(o,n);if(!(r instanceof array)&&null!=r&&r>=0){var a=o.getitemgraphicel(r);if(!a){var s=o.getitemlayout(r);if(!s)return;a=new mh(o,r),a.position=s,a.setz(t.get("zlevel"),t.get("z")),a.ignore=isnan(s[0])||isnan(s[1]),a.__temp=!0,o.setitemgraphicel(r,a),a.stopsymbolanimation(!0),this.group.add(a)}a.highlight()}else na.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getdata(),r=ta(o,n);if(null!=r&&r>=0){var a=o.getitemgraphicel(r);a&&(a.__temp?(o.setitemgraphicel(r,null),this.group.remove(a)):a.downplay())}else na.prototype.downplay.call(this,t,e,i,n)},_newpolyline:function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new r_({shape:{points:t},silent:!0,z2:10}),this._linegroup.add(e),this._polyline=e,e},_newpolygon:function(t,e){var i=this._polygon;return i&&this._linegroup.remove(i),i=new e_({shape:{points:t,stackedonpoints:e},silent:!0}),this._linegroup.add(i),this._polygon=i,i},_getsymbolignorefunc:function(t,e){var i=e.getaxesbyscale("ordinal")[0];return i&&i.islabelignored?y(i.islabelignored,i):void 0},_updateanimation:function(t,e,i,n,o){var r=this._polyline,a=this._polygon,s=t.hostmodel,l=a_(this._data,t,this._stackedonpoints,e,this._coordsys,i),h=l.current,u=l.stackedoncurrent,c=l.next,d=l.stackedonnext;o&&(h=rh(l.current,i,o),u=rh(l.stackedoncurrent,i,o),c=rh(l.next,i,o),d=rh(l.stackedonnext,i,o)),r.shape.__points=l.current,r.shape.points=h,or(r,{shape:{points:c}},s),a&&(a.setshape({points:h,stackedonpoints:u}),or(a,{shape:{points:c,stackedonpoints:d}},s));for(var f=[],p=l.status,g=0;ge&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var h;"string"==typeof i?h=n_[i]:"function"==typeof i&&(h=i),h&&(e=e.downsample(r.dim,1/l,h,f_),t.setdata(e))}}},this)};is(x(b_,"line","circle","line")),ms(x(v_,"line")),xs(vy.processor.statistic,x(g_,"line"));var h_={updateselectedmap:function(t){this._targetlist=t.slice(),this._selecttargetmap=g(t||[],function(t,e){return t.set(e.name,e),t},e())},select:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t),n=this.get("selectedmode");"single"===n&&this._selecttargetmap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unselect:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);i&&(i.selected=!1)},toggleselected:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);return null!=i?(this[i.selected?"unselect":"select"](t,e),i.selected):void 0},isselected:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);return i&&i.selected}},w_=ds({type:"series.pie",init:function(t){w_.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()},this.updateselectedmap(t.data),this._defaultlabelline(t)},mergeoption:function(t){w_.supercall(this,"mergeoption",t),this.updateselectedmap(this.option.data)},getinitialdata:function(t){var e=gs(["value"],t.data),i=new uy(e,this);return i.initdata(t.data),i},getdataparams:function(t){var e=this.getdata(),i=w_.supercall(this,"getdataparams",t),n=[];return e.each("value",function(t){n.push(t)}),i.percent=vn(n,t,e.hostmodel.get("percentprecision")),i.$vars.push("percent"),i},_defaultlabelline:function(t){xr(t.labelline,["show"]);var e=t.labelline.normal,i=t.labelline.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultoption:{zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,selectedoffset:10,hoveroffset:10,avoidlabeloverlap:!0,percentprecision:2,stillshowzerosum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelline:{normal:{show:!0,length:15,length2:15,smooth:!1,linestyle:{width:1,type:"solid"}}},itemstyle:{normal:{borderwidth:1},emphasis:{}},animationtype:"expansion",animationeasing:"cubicout",data:[]}});c(w_,h_);var z_=nh.prototype;z_.updatedata=function(t,e,i){function n(){r.stopanimation(!0),r.animateto({shape:{r:u.r+l.get("hoveroffset")}},300,"elasticout")}function o(){r.stopanimation(!0),r.animateto({shape:{r:u.r}},300,"elasticout")}var r=this.childat(0),l=t.hostmodel,h=t.getitemmodel(e),u=t.getitemlayout(e),c=a({},u);if(c.label=null,i){r.setshape(c);var d=l.getshallow("animationtype");"scale"===d?(r.shape.r=u.r0,zr(r,{shape:{r:u.r}},l,e)):(r.shape.endangle=u.startangle,or(r,{shape:{endangle:u.endangle}},l,e))}else or(r,{shape:c},l,e);var f=h.getmodel("itemstyle"),p=t.getitemvisual(e,"color");r.usestyle(s({linejoin:"bevel",fill:p},f.getmodel("normal").getitemstyle())),r.hoverstyle=f.getmodel("emphasis").getitemstyle();var g=h.getshallow("cursor");g&&r.attr("cursor",g),vh(this,t.getitemlayout(e),h.get("selected"),l.get("selectedoffset"),l.get("animation")),r.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoveranimation")&&l.isanimationenabled()&&r.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o),this._updatelabel(t,e),wr(this)},z_._updatelabel=function(t,e){var i=this.childat(1),n=this.childat(2),o=t.hostmodel,r=t.getitemmodel(e),a=t.getitemlayout(e),s=a.label,l=t.getitemvisual(e,"color");or(i,{shape:{points:s.linepoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},o,e),or(n,{style:{x:s.x,y:s.y}},o,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=r.getmodel("label.normal"),u=r.getmodel("label.emphasis"),c=r.getmodel("labelline.normal"),d=r.getmodel("labelline.emphasis"),l=t.getitemvisual(e,"color");br(n.style,n.hoverstyle={},h,u,{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")}),n.ignore=n.normalignore=!h.get("show"),n.hoverignore=!u.get("show"),i.ignore=i.normalignore=!c.get("show"),i.hoverignore=!d.get("show"),i.setstyle({stroke:l,opacity:t.getitemvisual(e,"opacity")}),i.setstyle(c.getmodel("linestyle").getlinestyle()),i.hoverstyle=d.getmodel("linestyle").getlinestyle();var f=c.get("smooth");f&&f===!0&&(f=.4),i.setshape({smooth:f})},u(nh,wp);var u_=(na.extend({type:"pie",init:function(){var t=new wp;this._sectorgroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getdata(),r=this._data,a=this.group,s=e.get("animation"),l=!r,h=t.get("animationtype"),u=x(bh,this.uid,t,s,i),c=t.get("selectedmode");if(o.diff(r).add(function(t){var e=new nh(o,t);l&&"scale"!==h&&e.eachchild(function(t){t.stopanimation(!0)}),c&&e.on("click",u),o.setitemgraphicel(t,e),a.add(e)}).update(function(t,e){var i=r.getitemgraphicel(e);i.updatedata(o,t),i.off("click"),c&&i.on("click",u),a.add(i),o.setitemgraphicel(t,i)}).remove(function(t){var e=r.getitemgraphicel(t);a.remove(e)}).execute(),s&&l&&o.count()>0&&"scale"!==h){var d=o.getitemlayout(0),f=math.max(i.getwidth(),i.getheight())/2,p=y(a.removeclippath,a); a.setclippath(this._createclippath(d.cx,d.cy,f,d.startangle,d.clockwise,p,t))}this._data=o}},dispose:function(){},_createclippath:function(t,e,i,n,o,r,a){var s=new bv({shape:{cx:t,cy:e,r0:0,r:i,startangle:n,endangle:n,clockwise:o}});return zr(s,{shape:{endangle:n+(o?1:-1)*math.pi*2}},a,r),s},containpoint:function(t,e){var i=e.getdata(),n=i.getitemlayout(0);if(n){var o=t[0]-n.cx,r=t[1]-n.cy,a=math.sqrt(o*o+r*r);return a<=n.r&&a>=n.r0}}}),function(t,e){f(e,function(e){e.update="updateview",ws(e,function(i,n){var o={};return n.eachcomponent({maintype:"series",subtype:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataindex);var n=t.getdata();n.each(function(e){var i=n.getname(e);o[i]=t.isselected(i)||!1})}),{name:i.name,selected:o}})})}),x_=function(t,e){var i={};e.eachrawseriesbytype(t,function(t){var n=t.getrawdata(),o={};if(!e.isseriesfiltered(t)){var r=t.getdata();r.each(function(t){var e=r.getrawindex(t);o[e]=t}),n.each(function(e){var a=o[e],s=null!=a&&r.getitemvisual(a,"color",!0);if(s)n.setitemvisual(e,"color",s);else{var l=n.getitemmodel(e),h=l.get("itemstyle.normal.color")||t.getcolorfrompalette(n.getname(e),i);n.setitemvisual(e,"color",h),null!=a&&r.setitemvisual(a,"color",h)}})}})},q_=function(t,e,i,n){var o,r,a=t.getdata(),s=[],l=!1;a.each(function(i){var n,h,u,c,d=a.getitemlayout(i),f=a.getitemmodel(i),p=f.getmodel("label.normal"),g=p.get("position")||f.get("label.emphasis.position"),v=f.getmodel("labelline.normal"),m=v.get("length"),y=v.get("length2"),x=(d.startangle+d.endangle)/2,_=math.cos(x),w=math.sin(x);o=d.cx,r=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,h=d.cy,c="center";else{var s=(b?(d.r+d.r0)/2*_:d.r*_)+o,m=(b?(d.r+d.r0)/2*w:d.r*w)+r;if(n=s+3*_,h=m+3*w,!b){var i=s+_*(m+e-d.r),t=m+w*(m+e-d.r),a=i+(0>_?-1:1)*y,c=t;n=a+(0>_?-5:5),h=c,u=[[s,m],[i,t],[a,c]]}c=b?"center":_>0?"left":"right"}var d=p.getfont(),l=p.get("rotate")?0>_?-x+math.pi:-x:0,p=t.getformattedlabel(i,"normal")||a.getname(i),k=yi(p,d,c,"top");l=!!l,d.label={x:n,y:h,position:g,height:k.height,len:m,len2:y,linepoints:u,textalign:c,verticalalign:"middle",rotation:l,inside:b},b||s.push(d.label)}),!l&&t.get("avoidlabeloverlap")&&gh(s,o,r,e,i,n)},y_=2*math.pi,j_=math.pi/180,$_=function(t,e,i){e.eachseriesbytype(t,function(t){var e=t.get("center"),n=t.get("radius");_(n)||(n=[0,n]),_(e)||(e=[e,e]);var o=i.getwidth(),r=i.getheight(),a=math.min(o,r),s=kn(e[0],o),l=kn(e[1],r),h=kn(n[0],a/2),u=kn(n[1],a/2),c=t.getdata(),d=-t.get("startangle")*j_,f=t.get("minangle")*j_,p=0;c.each("value",function(t){!isnan(t)&&p++});var g=c.getsum("value"),v=math.pi/(g||p)*2,m=t.get("clockwise"),y=t.get("rosetype"),x=t.get("stillshowzerosum"),w=c.getdataextent("value");w[0]=0;var b=y_,s=0,m=d,i=m?1:-1;if(c.each("value",function(t,e){var i;if(isnan(t))return void c.setitemlayout(e,{angle:0/0,startangle:0/0,endangle:0/0,clockwise:m,cx:s,cy:l,r0:h,r:y?0/0:u});i="area"!==y?0===g&&x?v:t*v:y_/p,f>i?(i=f,b-=f):s+=t;var n=m+i*i;c.setitemlayout(e,{angle:i,startangle:m,endangle:n,clockwise:m,cx:s,cy:l,r0:h,r:y?pn(t,w,[h,u]):u}),m=n},!0),y_>b&&p)if(.001>=b){var t=y_/p;c.each("value",function(t,e){if(!isnan(t)){var i=c.getitemlayout(e);i.angle=t,i.startangle=d+i*e*t,i.endangle=d+i*(e+1)*t}})}else v=b/s,m=d,c.each("value",function(t,e){if(!isnan(t)){var i=c.getitemlayout(e),n=i.angle===f?f:t*v;i.startangle=m,i.endangle=m+i*n,m+=i*n}});q_(t,u,o,r)})},k_=function(t,e){var i=e.findcomponents({maintype:"legend"});i&&i.length&&e.eachseriesbytype(t,function(t){var e=t.getdata();e.filterself(function(t){for(var n=e.getname(t),o=0;o=0;r--){var a=n[r],s=o[r],l=a[0]-s[0]/2,h=a[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return r}return-1}}),q_=hh.prototype;q_.updatedata=function(t){this.group.removeall();var e=this._symbolel,i=t.hostmodel;e.setshape({points:t.maparray(t.getitemlayout),sizes:t.maparray(function(e){var i=t.getitemvisual(e,"symbolsize");return i instanceof array||(i=[i,i]),i})}),e.symbolproxy=cl(t.getvisual("symbol"),0,0,0,0),e.setcolor=e.symbolproxy.setcolor,e.usestyle(i.getmodel("itemstyle.normal").getitemstyle(["color"]));var n=t.getvisual("color");n&&e.setcolor(n),e.seriesindex=i.seriesindex,e.on("mousemove",function(t){e.dataindex=null;var i=e.finddataindex(t.offsetx,t.offsety);i>=0&&(e.dataindex=i)}),this.group.add(e)},q_.updatelayout=function(t){var e=t.getdata();this._symbolel.setshape({points:e.maparray(e.getitemlayout)})},q_.remove=function(){this.group.removeall()},ls({type:"scatter",init:function(){this._normalsymboldraw=new xh,this._largesymboldraw=new hh},render:function(t){var e=t.getdata(),i=this._largesymboldraw,n=this._normalsymboldraw,o=this.group,r=t.get("large")&&e.count()>t.get("largethreshold")?i:n;this._symboldraw=r,r.updatedata(e),o.add(r.group),o.remove(r===i?n.group:i.group)},updatelayout:function(t){this._symboldraw.updatelayout(t)},remove:function(t,e){this._symboldraw&&this._symboldraw.remove(e,!0)},dispose:function(){}}),is(x(b_,"scatter","circle",null)),ms(x(v_,"scatter"));var tw=zo.extend({type:"whiskerinbox",shape:{},buildpath:function(t,e){for(var i in e)if(e.hasownproperty(i)&&0===i.indexof("ends")){var n=e[i];t.moveto(n[0][0],n[0][1]),t.lineto(n[1][0],n[1][1])}}}),ew=wh.prototype;ew._createcontent=function(t,e,i){var n=t.getitemlayout(e),o="horizontal"===n.chartlayout?1:0,r=0;this.add(new gv({shape:{points:i?zh(n.bodyends,o,n):n.bodyends},style:{strokenoscale:!0},z2:100})),this.bodyindex=r++;var a=p(n.whiskerends,function(t){return i?zh(t,o,n):t});this.add(new tw({shape:uh(a),style:{strokenoscale:!0},z2:100})),this.whiskerindex=r++},ew.updatedata=function(t,e,i){var n=this._seriesmodel=t.hostmodel,o=t.getitemlayout(e),r=nm[i?"initprops":"updateprops"];r(this.childat(this.bodyindex),{shape:{points:o.bodyends}},n,e),r(this.childat(this.whiskerindex),{shape:uh(o.whiskerends)},n,e),this.styleupdater.call(null,this,t,e)},u(wh,wp);var iw=xh.prototype;iw.updatedata=function(t){var e=this.group,i=this._data,n=this.styleupdater;t.diff(i).add(function(i){if(t.hasvalue(i)){var o=new wh(t,i,n,!0);t.setitemgraphicel(i,o),e.add(o)}}).update(function(o,r){var a=i.getitemgraphicel(r);return t.hasvalue(o)?(a?a.updatedata(t,o):a=new wh(t,o,n),e.add(a),void t.setitemgraphicel(o,a)):void e.remove(a)}).remove(function(t){var n=i.getitemgraphicel(t);n&&e.remove(n)}).execute(),this._data=t},iw.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachitemgraphicel(function(e){e&&t.remove(e)})};var nw={_baseaxisdim:null,getinitialdata:function(t,e){var i,n,o=e.getcomponent("xaxis",this.get("xaxisindex")),r=e.getcomponent("yaxis",this.get("yaxisindex")),a=o.get("type"),s=r.get("type");"category"===a?(t.layout="horizontal",i=o.getcategories(),n=!0):"category"===s?(t.layout="vertical",i=r.getcategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseaxisdim=l[h],c=l[1-h],d=t.data;n&&f(d,function(t,e){t.value&&_(t.value)?t.value.unshift(e):_(t)&&t.unshift(e)});var p=this.defaultvaluedimensions,g=[{name:u,otherdims:{tooltip:!1},dimsdef:["base"]},{name:c,dimsdef:p.slice()}];g=gs(g,d,{encodedef:this.get("encode"),dimsdef:this.get("dimensions"),dimcount:p.length+1});var v=new uy(g,this);return v.initdata(d,i?i.slice():null),v},getbaseaxis:function(){var t=this._baseaxisdim;return this.ecmodel.getcomponent(t+"axis",this.get(t+"axisindex")).axis}},ow={init:function(){var t=this._whiskerboxdraw=new xh(this.getstyleupdater());this.group.add(t.group)},render:function(t){this._whiskerboxdraw.updatedata(t.getdata())},remove:function(){this._whiskerboxdraw.remove()}},rw=jm.extend({type:"series.candlestick",dependencies:["xaxis","yaxis","grid"],defaultvaluedimensions:["open","close","lowest","highest"],dimensions:null,defaultoption:{zlevel:0,z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,hoveranimation:!0,layout:null,itemstyle:{normal:{color:"#c23531",color0:"#314656",borderwidth:1,bordercolor:"#c23531",bordercolor0:"#314656"},emphasis:{borderwidth:2}},barmaxwidth:null,barminwidth:null,barwidth:null,animationupdate:!1,animationeasing:"linear",animationduration:300},getshadowdim:function(){return"open"},brushselector:function(t,e,i){var n=e.getitemlayout(t);return i.rect(n.brushrect)}});c(rw,nw,!0);var aw=na.extend({type:"candlestick",getstyleupdater:function(){return qh},dispose:b});c(aw,ow,!0);var sw=["itemstyle","normal"],lw=["itemstyle","emphasis"],hw=function(t){t&&_(t.series)&&f(t.series,function(t){s(t)&&"k"===t.type&&(t.type="candlestick")})},uw=["itemstyle","normal","bordercolor"],cw=["itemstyle","normal","bordercolor0"],dw=["itemstyle","normal","color"],fw=["itemstyle","normal","color0"],pw=function(t){t.eachrawseriesbytype("candlestick",function(e){var i=e.getdata();i.setvisual({legendsymbol:"roundrect"}),t.isseriesfiltered(e)||i.each(function(t){var e=i.getitemmodel(t),n=i.getitemlayout(t).sign;i.setitemvisual(t,{color:e.get(n>0?dw:fw),bordercolor:e.get(n>0?uw:cw)})})})},gw=c,vw=function(t){t.eachseriesbytype("candlestick",function(t){var e,i=t.coordinatesystem,n=t.getdata(),o=yh(t,n),r=t.get("layout"),a="horizontal"===r?0:1,s=1-a,l=["x","y"],h=[];if(f(n.dimensions,function(t){var i=n.getdimensioninfo(t),o=i.coorddim;o===l[s]?h.push(t):o===l[a]&&(e=t)}),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),function(){function t(t){var e=[];return e[a]=f,e[s]=t,isnan(f)||isnan(t)?[0/0,0/0]:i.datatopoint(e)}function e(t,e){var i=t.slice(),n=t.slice();i[a]=lr(i[a]+o/2,1,!1),n[a]=lr(n[a]-o/2,1,!0),e?t.push(i,n):t.push(n,i)}function l(){var e=t(math.min(g,v,m,y)),i=t(math.max(g,v,m,y));return e[a]-=o/2,i[a]-=o/2,{x:e[0],y:e[1],width:s?o:i[0]-e[0],height:s?i[1]-e[1]:o}}function c(t){return t[a]=lr(t[a],1),t}var d=arguments,f=d[0],p=d[h.length+1],g=d[1],v=d[2],m=d[3],y=d[4],x=math.min(g,v),_=math.max(g,v),w=t(x),b=t(_),s=t(m),m=t(y),i=[[c(m),c(b)],[c(s),c(w)]],t=[];e(b,0),e(w,1);var a;a=g>v?-1:v>g?1:u>0?n.getitemmodel(u-1).get()[2]<=v?1:-1:1,n.setitemlayout(p,{chartlayout:r,sign:a,initbaseline:g>v?b[s]:w[s],bodyends:t,whiskerends:i,brushrect:l()}),++u},!0)}})};ys(hw),is(pw),ms(vw);var mw=ie;c(jh,yf),$h.prototype={constructor:$h,type:"view",dimensions:["x","y"],setboundingrect:function(t,e,i,n){return this._rect=new qe(t,e,i,n),this._rect},getboundingrect:function(){return this._rect},setviewrect:function(t,e,i,n){this.transformto(t,e,i,n),this._viewrect=new qe(t,e,i,n)},transformto:function(t,e,i,n){var o=this.getboundingrect(),r=this._viewtransform;r.transform=o.calculatetransform(new qe(t,e,i,n)),r.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,i=t.y+t.height/2;return[e,i]},getcenter:function(){return this._center||this.getdefaultcenter()},getzoom:function(){return this._zoom||1},getroamtransform:function(){return this._roamtransform},_updatecenterandzoom:function(){var t=this._viewtransform.getlocaltransform(),e=this._roamtransform,i=this.getdefaultcenter(),n=this.getcenter(),o=this.getzoom();n=ie([],n,t),i=ie([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updatetransform()},_updatetransform:function(){var t=this._roamtransform,e=this._viewtransform;e.parent=t,t.updatetransform(),e.updatetransform(),e.transform&&de(this.transform||(this.transform=[]),e.transform),this.transform?(this.invtransform=this.invtransform||[],me(this.invtransform,this.transform)):this.invtransform=null,this.decomposetransform()},getviewrect:function(){return this._viewrect},getviewrectafterroam:function(){var t=this.getboundingrect().clone();return t.applytransform(this.transform),t},datatopoint:function(t){var e=this.transform;return e?mw([],t,e):[t[0],t[1]]},pointtodata:function(t){var e=this.invtransform;return e?mw([],t,e):[t[0],t[1]]},converttopixel:x(kh,"datatopoint"),convertfrompixel:x(kh,"pointtodata"),containpoint:function(t){return this.getviewrectafterroam().contain(t[0],t[1])}},c($h,yf);for(var yw=[126,25],xw=[[[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]]],_w=0;_we;++e)"台湾"===t.regions[e].name&&t.regions[e].geometries.push({type:"polygon",exterior:aw[0]})},dw=[bw,mw,tw,cw];jh.prototype={constructor:jh,type:"geo",dimensions:["lng","lat"],containcoord:function(t){for(var e=this.regions,i=0;i"+jn(n+" : "+i)},gettooltipposition:function(t){if(null!=t){var e=this.getdata().getname(t),i=this.coordinatesystem,n=i.getregion(e);return n&&i.datatopoint(n.center)}},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},defaultoption:{zlevel:0,z:2,coordinatesystem:"geo",map:"",left:"center",top:"center",aspectscale:.75,showlegendsymbol:!0,datarangehoverlink:!0,boundingcoords:null,center:null,zoom:1,scalelimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemstyle:{normal:{borderwidth:.5,bordercolor:"#444",areacolor:"#eee"},emphasis:{areacolor:"rgba(255,215,0,0.8)"}}}});c(pw,h_);var kw="\x00_ec_interaction_mutex";ws({type:"takeglobalcursor",event:"globalcursortaken",update:"update"},function(){}),c(ou,ff);var ow={axispointer:1,tooltip:1,brush:1};yu.prototype={constructor:yu,draw:function(t,e,i,n,o){var r="geo"===t.maintype,a=t.getdata&&t.getdata();r&&e.eachcomponent({maintype:"series",subtype:"map"},function(e){a||e.gethostgeomodel()!==t||(a=e.getdata())});var s=t.coordinatesystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childat(0)||o?l.attr(u):or(l,u,t),l.removeall();var c=["itemstyle","normal"],d=["itemstyle","emphasis"],p=["label","normal"],g=["label","emphasis"],v=e();f(s.regions,function(e){var i=v.get(e.name)||v.set(e.name,new wp),n=new yv({shape:{paths:[]}});i.add(n);var o,s=t.getregionmodel(e.name)||t,u=s.getmodel(c),m=s.getmodel(d),y=gu(u,h),x=gu(m,h),_=s.getmodel(p),w=s.getmodel(g);if(a){o=a.indexofname(e.name);var b=a.getitemvisual(o,"color",!0);b&&(y.fill=b)}f(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new gv({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new gv({shape:{points:t.interiors[e]}}))}}),n.setstyle(y),n.style.strokenoscale=!0,n.culling=!0;var s=_.get("show"),m=w.get("show"),i=a&&isnan(a.get("value",o)),t=a&&a.getitemlayout(o);if(r||i&&(s||m)||t&&t.showlabel){var a,c=r?e.name:o;(!a||o>=0)&&(a=t);var d=new ov({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});br(d.style,d.hoverstyle={},_,w,{labelfetcher:a,labeldataindex:c,defaulttext:e.name,useinsidestyle:!1},{textalign:"center",textverticalalign:"middle"}),i.add(d)}if(a)a.setitemgraphicel(o,i);else{var s=t.getregionmodel(e.name);n.eventdata={componenttype:"geo",geoindex:t.componentindex,name:e.name,region:s&&s.option||{}}}var l=i.__regions||(i.__regions=[]);l.push(e),wr(i,x,{hoversilentontouch:!!t.get("selectedmode")}),l.add(i)}),this._updatecontroller(t,e,i),vu(this,t,l,i,n),mu(t,l)},remove:function(){this.group.removeall(),this._controller.dispose(),this._controllerhost={}},_updatecontroller:function(t,e,i){function n(){var e={type:"georoam",componenttype:l};return e[l+"id"]=t.id,e}var o=t.coordinatesystem,r=this._controller,s=this._controllerhost;s.zoomlimit=t.get("scalelimit"),s.zoom=o.getzoom(),r.enable(t.get("roam")||!1);var l=t.maintype;r.off("pan").on("pan",function(t,e){this._mousedownflag=!1,du(s,t,e),i.dispatchaction(a(n(),{dx:t,dy:e}))},this),r.off("zoom").on("zoom",function(t,e,o){if(this._mousedownflag=!1,fu(s,t,e,o),i.dispatchaction(a(n(),{zoom:t,originx:e,originy:o})),this._updategroup){var r=this.group,l=r.scale;r.traverse(function(t){"text"===t.type&&t.attr("scale",[1/l[0],1/l[1]])})}},this),r.setpointerchecker(function(e,n,r){return o.getviewrectafterroam().contain(n,r)&&!pu(e,i,t)})}},ls({type:"map",render:function(t,e,i,n){if(!n||"maptoggleselect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeall(),!t.gethostgeomodel()){if(n&&"georoam"===n.type&&"series"===n.componenttype&&n.seriesid===t.id){var r=this._mapdraw;r&&o.add(r.group)}else if(t.needsdrawmap){var r=this._mapdraw||new yu(i,!0);o.add(r.group),r.draw(t,e,i,this,n),this._mapdraw=r}else this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null;t.get("showlegendsymbol")&&e.getcomponent("legend")&&this._rendersymbols(t,e,i)}}},remove:function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null,this.group.removeall()},dispose:function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null},_rendersymbols:function(t){var e=t.originaldata,i=this.group;e.each("value",function(n,o){if(!isnan(n)){var r=e.getitemlayout(o);if(r&&r.point){var a=r.point,s=r.offset,l=new zv({style:{fill:t.getdata().getvisual("color")},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainseries.getdata(),u=e.getname(o),c=h.indexofname(u),d=e.getitemmodel(o),f=d.getmodel("label.normal"),p=d.getmodel("label.emphasis"),g=h.getitemgraphicel(c),v=c(t.getformattedlabel(o,"normal"),u),m=c(t.getformattedlabel(o,"emphasis"),v),y=function(){var t=sr({},p,{text:p.get("show")?m:null},{isrecttext:!0,useinsidestyle:!1},!0);l.style.extendfrom(t),l.__maporiginalz2=l.z2,l.z2+=1},x=function(){sr(l.style,f,{text:f.get("show")?v:null,textposition:f.getshallow("position")||"bottom"},{isrecttext:!0,useinsidestyle:!1}),null!=l.__maporiginalz2&&(l.z2=l.__maporiginalz2,l.__maporiginalz2=null)};g.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}i.add(l)}}})}}),ws({type:"georoam",event:"georoam",update:"updatelayout"},function(t,e){var i=t.componenttype||"series";e.eachcomponent({maintype:i,query:t},function(e){var n=e.coordinatesystem;if("geo"===n.type){var o=xu(n,t,e.get("scalelimit"));e.setcenter&&e.setcenter(o.center),e.setzoom&&e.setzoom(o.zoom),"series"===i&&f(e.seriesgroup,function(t){t.setcenter(o.center),t.setzoom(o.zoom)})}})});var zw=function(t){var e={};t.eachseriesbytype("map",function(i){var n=i.getmaptype();if(!i.gethostgeomodel()&&!e[n]){var o={};f(i.seriesgroup,function(e){var i=e.coordinatesystem,n=e.originaldata;e.get("showlegendsymbol")&&t.getcomponent("legend")&&n.each("value",function(t,e){var r=n.getname(e),a=i.getregion(r);if(a&&!isnan(t)){var s=o[r]||0,l=i.datatopoint(a.center);o[r]=s+1,n.setitemlayout(e,{point:l,offset:s})}})});var r=i.getdata();r.each(function(t){var e=r.getname(t),i=r.getitemlayout(t)||{};i.showlabel=!o[e],r.setitemlayout(t,i)}),e[n]=!0}})},rw=function(t){t.eachseriesbytype("map",function(t){var e=t.get("color"),i=t.getmodel("itemstyle.normal"),n=i.get("areacolor"),o=i.get("color")||e[t.seriesindex%e.length];t.getdata().setvisual({areacolor:n,color:o})})},ew=function(t){var e={};t.eachseriesbytype("map",function(t){var i=t.gethostgeomodel(),n=i?"o"+i.id:"i"+t.getmaptype();(e[n]=e[n]||[]).push(t)}),f(e,function(t){for(var e=_u(p(t,function(t){return t.getdata()}),t[0].get("mapvaluecalculation")),i=0;i "))},defaultoption:{coordinatesystem:"geo",zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,xaxisindex:0,yaxisindex:0,symbol:["none","none"],symbolsize:[10,10],geoindex:0,effect:{show:!1,period:4,constantspeed:0,symbol:"circle",symbolsize:3,loop:!0,traillength:.2},large:!1,largethreshold:2e3,polyline:!1,label:{normal:{show:!1,position:"end"}},linestyle:{normal:{opacity:.5}}}}),nw=zv.prototype,fw=xv.prototype,gw=tr({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildpath:function(t,e){(bu(e)?nw:fw).buildpath(t,e)},pointat:function(t){return bu(this.shape)?nw.pointat.call(this,t):fw.pointat.call(this,t)},tangentat:function(t){var e=this.shape,i=bu(e)?[e.x2-e.x1,e.y2-e.y1]:fw.tangentat.call(this,t);return k(i,i)}}),hw=["fromsymbol","tosymbol"],ww=cu.prototype;ww.beforeupdate=au,ww._createline=function(t,e,i){var n=t.hostmodel,o=t.getitemlayout(e),r=iu(o);r.shape.percent=0,zr(r,{shape:{percent:1}},n,e),this.add(r);var a=new ov({name:"label"});this.add(a),f(hw,function(i){var n=mu(i,t,e);this.add(n),this[su(i)]=t.getitemvisual(e,i)},this),this._updatecommonstl(t,e,i)},ww.updatedata=function(t,e,i){var n=t.hostmodel,o=this.childofname("line"),r=t.getitemlayout(e),a={shape:{}};tu(a.shape,r),or(o,a,n,e),f(hw,function(i){var n=t.getitemvisual(e,i),o=su(i);if(this[o]!==n){this.remove(this.childofname(i));var r=mu(i,t,e);this.add(r)}this[o]=n},this),this._updatecommonstl(t,e,i)},ww._updatecommonstl=function(t,e,i){var n=t.hostmodel,o=this.childofname("line"),r=i&&i.linestyle,a=i&&i.hoverlinestyle,l=i&&i.labelmodel,h=i&&i.hoverlabelmodel;if(!i||t.hasitemoption){var u=t.getitemmodel(e);r=u.getmodel("linestyle.normal").getlinestyle(),a=u.getmodel("linestyle.emphasis").getlinestyle(),l=u.getmodel("label.normal"),h=u.getmodel("label.emphasis")}var c=t.getitemvisual(e,"color"),d=d(t.getitemvisual(e,"opacity"),r.opacity,1);o.usestyle(s({strokenoscale:!0,fill:"none",stroke:c,opacity:d},r)),o.hoverstyle=a,f(hw,function(t){var e=this.childofname(t);e&&(e.setcolor(c),e.setstyle({opacity:d}))},this);var p,g,v,m,y=l.getshallow("show"),x=h.getshallow("show"),_=this.childofname("label");if(y||x){var w=n.getrawvalue(e);g=null==w?g=t.getname(e):isfinite(w)?on(w):w,p=c||"#000",v=c(n.getformattedlabel(e,"normal",t.datatype),g),m=c(n.getformattedlabel(e,"emphasis",t.datatype),v)}if(y){var b=sr(_.style,l,{text:v},{autocolor:p});_.__textalign=b.textalign,_.__verticalalign=b.textverticalalign,_.__position=l.get("position")||"middle"}else _.setstyle("text",null);_.hoverstyle=x?{text:m,textfill:h.gettextcolor(!0),fontstyle:h.getshallow("fontstyle"),fontweight:h.getshallow("fontweight"),fontsize:h.getshallow("fontsize"),fontfamily:h.getshallow("fontfamily")}:{text:null},_.ignore=!y&&!x,wr(this)},ww.highlight=function(){this.trigger("emphasis")},ww.downplay=function(){this.trigger("normal")},ww.updatelayout=function(t,e){this.setlinepoints(t.getitemlayout(e))},ww.setlinepoints=function(t){var e=this.childofname("line");tu(e.shape,t),e.dirty()},u(cu,wp);var zw=pu.prototype;zw.updatedata=function(t){var e=this._linedata,i=this.group,n=this._ctor,o=t.hostmodel,r={linestyle:o.getmodel("linestyle.normal").getlinestyle(),hoverlinestyle:o.getmodel("linestyle.emphasis").getlinestyle(),labelmodel:o.getmodel("label.normal"),hoverlabelmodel:o.getmodel("label.emphasis")};t.diff(e).add(function(e){if(lu(t.getitemlayout(e))){var o=new n(t,e,r);t.setitemgraphicel(e,o),i.add(o)}}).update(function(o,a){var s=e.getitemgraphicel(a);return lu(t.getitemlayout(o))?(s?s.updatedata(t,o,r):s=new n(t,o,r),t.setitemgraphicel(o,s),void i.add(s)):void i.remove(s)}).remove(function(t){i.remove(e.getitemgraphicel(t))}).execute(),this._linedata=t},zw.updatelayout=function(){var t=this._linedata;t.eachitemgraphicel(function(e,i){e.updatelayout(t,i)},this)},zw.remove=function(){this.group.removeall()};var uw=ku.prototype;uw.createline=function(t,e,i){return new cu(t,e,i)},uw._updateeffectsymbol=function(t,e){var i=t.getitemmodel(e),n=i.getmodel("effect"),o=n.get("symbolsize"),r=n.get("symbol");_(o)||(o=[o,o]);var a=n.get("color")||t.getitemvisual(e,"color"),s=this.childat(1);this._symboltype!==r&&(this.remove(s),s=cl(r,-.5,-.5,1,1,a),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setstyle("shadowcolor",a),s.setstyle(n.getitemstyle(["color"])),s.attr("scale",o),s.setcolor(a),s.attr("scale",o),this._symboltype=r,this._updateeffectanimation(t,n,e))},uw._updateeffectanimation=function(t,e,i){var n=this.childat(1);if(n){var o=this,r=t.getitemlayout(i),a=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantspeed"),h=a(e.get("delay"),function(e){return e/t.count()*a/3}),u="function"==typeof h;if(n.ignore=!0,this.updateanimationpoints(n,r),l>0&&(a=this.getlinelength(n)/l*1e3),a!==this._period||s!==this._loop){n.stopanimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-a*n.__t),n.__t=0;var d=n.animate("",s).when(a,{__t:1}).delay(c).during(function(){o.updatesymbolposition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=a,this._loop=s}},uw.getlinelength=function(t){return ef(t.__p1,t.__cp1)+ef(t.__cp1,t.__p2)},uw.updateanimationpoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},uw.updatedata=function(t,e,i){this.childat(0).updatedata(t,e,i),this._updateeffectsymbol(t,e)},uw.updatesymbolposition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,r=t.position,a=xo,s=_o;r[0]=a(e[0],n[0],i[0],o),r[1]=a(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),h=s(e[1],n[1],i[1],o);t.rotation=-math.atan2(h,l)-math.pi/2,t.ignore=!1 },uw.updatelayout=function(t,e){this.childat(0).updatelayout(t,e);var i=t.getitemmodel(e).getmodel("effect");this._updateeffectanimation(t,i,e)},u(ku,wp);var xw=ou.prototype;xw._createpolyline=function(t,e,i){var n=t.getitemlayout(e),o=new hv({shape:{points:n}});this.add(o),this._updatecommonstl(t,e,i)},xw.updatedata=function(t,e,i){var n=t.hostmodel,o=this.childat(0),r={shape:{points:t.getitemlayout(e)}};or(o,r,n,e),this._updatecommonstl(t,e,i)},xw._updatecommonstl=function(t,e,i){var n=this.childat(0),o=t.getitemmodel(e),r=t.getitemvisual(e,"color"),a=i&&i.linestyle,l=i&&i.hoverlinestyle;(!i||t.hasitemoption)&&(a=o.getmodel("linestyle.normal").getlinestyle(),l=o.getmodel("linestyle.emphasis").getlinestyle()),n.usestyle(s({strokenoscale:!0,fill:"none",stroke:r},a)),n.hoverstyle=l,wr(this)},xw.updatelayout=function(t,e){var i=this.childat(0);i.setshape("points",t.getitemlayout(e))},u(ou,wp);var qw=zu.prototype;qw.createline=function(t,e,i){return new ou(t,e,i)},qw.updateanimationpoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=math.min(r,o-2)}else{for(var r=a;o>r&&!(n[r]>e);r++);r=math.min(r-1,o-2)}ee(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var l=i[r+1][0]-i[r][0],h=i[r+1][1]-i[r][1];t.rotation=-math.atan2(h,l)-math.pi/2,this._lastframe=r,this._lastframepercent=e,t.ignore=!1}},u(zu,ku);var yw=tr({shape:{polyline:!1,segs:[]},buildpath:function(t,e){for(var i=e.segs,n=e.polyline,o=0;o2?t.quadraticcurveto(r[2][0],r[2][1],r[1][0],r[1][1]):t.lineto(r[1][0],r[1][1])}},finddataindex:function(t,e){for(var i=this.shape,n=i.segs,o=i.polyline,r=math.max(this.style.linewidth,1),a=0;a2){if(ko(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],r,t,e))return a}else if(lo(s[0][0],s[0][1],s[1][0],s[1][1],r,t,e))return a}return-1}}),jw=ru.prototype;jw.updatedata=function(t){this.group.removeall();var e=this._lineel,i=t.hostmodel;e.setshape({segs:t.maparray(t.getitemlayout),polyline:i.get("polyline")}),e.usestyle(i.getmodel("linestyle.normal").getlinestyle());var n=t.getvisual("color");n&&e.setstyle("stroke",n),e.setstyle("fill"),e.seriesindex=i.seriesindex,e.on("mousemove",function(t){e.dataindex=null;var i=e.finddataindex(t.offsetx,t.offsety);i>0&&(e.dataindex=i)}),this.group.add(e)},jw.updatelayout=function(t){var e=t.getdata();this._lineel.setshape({segs:e.maparray(e.getitemlayout)})},jw.remove=function(){this.group.removeall()},ls({type:"lines",init:function(){},render:function(t,e,i){var n=t.getdata(),o=this._linedraw,r=t.get("effect.show"),a=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largethreshold");(r!==this._haseffet||a!==this._ispolyline||s!==this._islarge)&&(o&&o.remove(),o=this._linedraw=s?new ru:new pu(a?r?zu:ou:r?ku:cu),this._haseffet=r,this._ispolyline=a,this._islarge=s);var l=t.get("zlevel"),h=t.get("effect.traillength"),u=i.getzr(),c="svg"===u.painter.gettype();c||u.painter.getlayer(l).clear(!0),null==this._lastzlevel||c||u.configlayer(this._lastzlevel,{motionblur:!1}),r&&h&&(c||u.configlayer(l,{motionblur:!0,lastframealpha:math.max(math.min(h/10+.9,1),0)})),this.group.add(o.group),o.updatedata(n),this._lastzlevel=l},updatelayout:function(t,e,i){this._linedraw.updatelayout(t);var n=i.getzr(),o="svg"===n.painter.gettype();o||n.painter.getlayer(this._lastzlevel).clear(!0)},remove:function(t,e){this._linedraw&&this._linedraw.remove(e,!0);var i=e.getzr(),n="svg"===i.painter.gettype();n||i.painter.getlayer(this._lastzlevel).clear(!0)},dispose:function(){}});var $w=function(t){t.eachseriesbytype("lines",function(t){var e=t.coordinatesystem,i=t.getdata();i.each(function(n){var o=i.getitemmodel(n),r=o.option instanceof array?o.option:o.get("coords"),a=[];if(t.get("polyline"))for(var s=0;s=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}}});ws("legendtoggleselect","legendselectchanged",x(vu,"toggleselected")),ws("legendselect","legendselected",x(vu,"select")),ws("legendunselect","legendunselected",x(vu,"unselect"));var tb=x,eb=f,ib=wp,nb=cs({type:"legend.plain",newlinedisabled:!1,init:function(){this.group.add(this._contentgroup=new ib),this._backgroundel},getcontentgroup:function(){return this._contentgroup},render:function(t,e,i){if(this.resetinner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderinner(n,t,e,i);var o=t.getboxlayoutparams(),r={width:i.getwidth(),height:i.getheight()},a=t.get("padding"),l=ua(o,r,a),h=this.layoutinner(t,n,l),u=ua(s({width:h.width,height:h.height},o),r,a);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundel=nu(h,t))}},resetinner:function(){this.getcontentgroup().removeall(),this._backgroundel&&this.group.remove(this._backgroundel)},renderinner:function(t,e,i,n){var o=this.getcontentgroup(),r=e(),a=e.get("selectedmode");eb(e.getdata(),function(s,l){var h=s.get("name");if(!this.newlinedisabled&&(""===h||"\n"===h))return void o.add(new ib({newline:!0}));var u=i.getseriesbyname(h)[0];if(!r.get(h))if(u){var c=u.getdata(),d=c.getvisual("color");"function"==typeof d&&(d=d(u.getdataparams(0)));var f=c.getvisual("legendsymbol")||"roundrect",p=c.getvisual("symbol"),g=this._createitem(h,l,s,e,f,p,t,d,a);g.on("click",tb(fu,h,n)).on("mouseover",tb(gu,u,null,n)).on("mouseout",tb(hu,u,null,n)),r.set(h,!0)}else i.eachrawseries(function(i){if(!r.get(h)&&i.legenddataprovider){var o=i.legenddataprovider(),u=o.indexofname(h);if(0>u)return;var c=o.getitemvisual(u,"color"),d="roundrect",f=this._createitem(h,l,s,e,d,null,t,c,a);f.on("click",tb(fu,h,n)).on("mouseover",tb(gu,i,h,n)).on("mouseout",tb(hu,i,h,n)),r.set(h,!0)}},this)},this)},_createitem:function(t,e,i,n,o,r,s,l,h){var u=n.get("itemwidth"),c=n.get("itemheight"),d=n.get("inactivecolor"),f=n.isselected(t),p=new ib,g=i.getmodel("textstyle"),v=i.get("icon"),m=i.getmodel("tooltip"),y=m.parentmodel;if(o=v||o,p.add(cl(o,0,0,u,c,f?l:d,!0)),!v&&r&&(r!==o||"none"==r)){var x=.8*c;"none"===r&&(r="circle"),p.add(cl(r,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,w=s,b=n.get("formatter"),s=t;"string"==typeof b&&b?s=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(s=b(t)),p.add(new ov({style:sr({},g,{text:s,x:_,y:c/2,textfill:f?g.gettextcolor():d,textalign:w,textverticalalign:"middle"})}));var m=new wv({shape:p.getboundingrect(),invisible:!0,tooltip:m.get("show")?a({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterparams:{componenttype:"legend",legendindex:n.componentindex,name:t,$vars:["name"]}},m.option):null});return p.add(m),p.eachchild(function(t){t.silent=!0}),m.silent=!h,this.getcontentgroup().add(p),wr(p),p.__legenddataindex=e,p},layoutinner:function(t,e,i){var n=this.getcontentgroup();xm(t.get("orient"),n,t.get("itemgap"),i.width,i.height);var o=n.getboundingrect();return n.attr("position",[-o.x,-o.y]),this.group.getboundingrect()}}),ob=function(t){var e=t.findcomponents({maintype:"legend"});e&&e.length&&t.filterseries(function(t){for(var i=0;ii[s],f=[-u.x,-u.y];f[a]=n.position[a];var p=[0,0],g=[-c.x,-c.y],v=c(t.get("pagebuttongap",!0),t.get("itemgap",!0));if(d){var m=t.get("pagebuttonposition",!0);"end"===m?g[a]+=i[s]-c[s]:p[a]+=c[s]+v}g[1-a]+=u[l]/2-c[l]/2,n.attr("position",f),o.attr("position",p),r.attr("position",g);var y=this.group.getboundingrect(),y={x:0,y:0};if(y[s]=d?i[s]:u[s],y[l]=math.max(u[l],c[l]),y[h]=math.min(0,c[h]+g[1-a]),o.__rectsize=i[s],d){var x={x:0,y:0};x[s]=math.max(i[s]-c[s]-v,0),x[l]=y[l],o.setclippath(new wv({shape:x})),o.__rectsize=x[s]}else r.eachchild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getpageinfo(t);return null!=_.pageindex&&or(n,{position:_.contentposition},d?t:!1),this._updatepageinfoview(t,_),y},_pagego:function(t,e,i){var n=this._getpageinfo(e)[t];null!=n&&i.dispatchaction({type:"legendscroll",scrolldataindex:n,legendid:e.id})},_updatepageinfoview:function(t,e){var i=this._controllergroup;f(["pageprev","pagenext"],function(n){var o=null!=e[n+"dataindex"],r=i.childofname(n);r&&(r.setstyle("fill",o?t.get("pageiconcolor",!0):t.get("pageiconinactivecolor",!0)),r.cursor=o?"pointer":"default")});var n=i.childofname("pagetext"),o=t.get("pageformatter"),r=e.pageindex,a=null!=r?r+1:0,s=e.pagecount;n&&o&&n.setstyle("text",b(o)?o.replace("{current}",a).replace("{total}",s):o({current:a,total:s}))},_getpageinfo:function(t){function e(t){var e=t.getboundingrect().clone();return e[f]+=t.position[u],e}var i,n,o,r,a=t.get("scrolldataindex",!0),s=this.getcontentgroup(),l=s.getboundingrect(),h=this._containergroup.__rectsize,u=t.getorient().index,c=sb[u],d=sb[1-u],f=lb[u],p=s.position.slice();this._showcontroller?s.eachchild(function(t){t.__legenddataindex===a&&(r=t)}):r=s.childat(0);var g=h?math.ceil(l[c]/h):0;if(r){var v=r.getboundingrect(),m=r.position[u]+v[f];p[u]=-m-l[f],i=math.floor(g*(m+v[f]+h/2)/l[c]),i=l[c]&&g?math.max(0,math.min(g-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-p[u]-l[f];var x,_=s.children();if(s.eachchild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),o=t.__legenddataindex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(o=null)}),null!=x){var w=_[x],b=e(w);if(y[f]=b[f]+b[c]-y[c],0>=x&&b[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legenddataindex}}}return{contentposition:p,pageindex:i,pagecount:g,pageprevdataindex:n,pagenextdataindex:o}}});ws("legendscroll","legendscroll",function(t,e){var i=t.scrolldataindex;null!=i&&e.eachcomponent({maintype:"legend",subtype:"scroll",query:t},function(t){t.setscrolldataindex(i)})});var ub=function(t,e){var i,n=[],o=t.seriesindex;if(null==o||!(i=e.getseriesbyindex(o)))return{point:[]};var r=i.getdata(),a=ta(r,t);if(null==a||_(a))return{point:[]};var s=r.getitemgraphicel(a),l=i.coordinatesystem;if(i.gettooltipposition)n=i.gettooltipposition(a)||[];else if(l&&l.datatopoint)n=l.datatopoint(r.getvalues(p(l.dimensions,function(t){return i.coorddimtodatadim(t)[0]}),a,!0))||[];else if(s){var h=s.getboundingrect().clone();h.applytransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}},cb=f,db=x,fb=fm(),pb=function(t,e,i){var n=t.currtrigger,o=[t.x,t.y],r=t,a=t.dispatchaction||y(i.dispatchaction,i),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){qu(o)&&(o=ub({seriesindex:r.seriesindex,dataindex:r.dataindex},e).point);var l=qu(o),h=r.axesinfo,u=s.axesinfo,c="leave"===n||qu(o),d={},f={},p={list:[],map:{}},g={showpointer:db(xu,f),showtooltip:db(qu,p)};cb(s.coordsysmap,function(t,e){var i=l||t.containpoint(o);cb(s.coordsysaxesinfo[e],function(t){var e=t.axis,n=ku(h,t);if(!c&&i&&(!h||n)){var r=n&&n.value;null!=r||l||(r=e.pointtodata(o)),null!=r&&zu(t,r,g,!1,d)}})});var v={};return cb(u,function(t,e){var i=t.linkgroup;i&&!f[e]&&cb(i.axesinfo,function(e,n){var o=f[n];if(e!==t&&o){var r=o.value;i.mapper&&(r=t.axis.scale.parse(i.mapper(r,ju(e),ju(t)))),v[t.key]=r}})}),cb(v,function(t,e){zu(u[e],t,g,!0,d)}),yu(f,u,d),ju(p,o,t,a),$u(u,a,i),d}},gb=(as({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}}}),fm()),vb=f,mb=cs({type:"axispointer",render:function(t,e,i){var n=e.getcomponent("tooltip"),o=t.get("triggeron")||n&&n.get("triggeron")||"mousemove|click";tc("axispointer",i,function(t,e,i){"none"!==o&&("leave"===t||o.indexof(t)>=0)&&i({type:"updateaxispointer",currtrigger:t,x:e&&e.offsetx,y:e&&e.offsety})})},remove:function(t,e){ac(e.getzr(),"axispointer"),mb.superapply(this._model,"remove",arguments)},dispose:function(t,e){ac("axispointer",e),mb.superapply(this._model,"dispose",arguments)}}),yb=fm(),xb=n,_b=y;sc.prototype={_group:null,_lastgraphickey:null,_handle:null,_dragging:!1,_lastvalue:null,_laststatus:null,_payloadinfo:null,animationthreshold:15,render:function(t,e,i,n){var o=e.get("value"),r=e.get("status");if(this._axismodel=t,this._axispointermodel=e,this._api=i,n||this._lastvalue!==o||this._laststatus!==r){this._lastvalue=o,this._laststatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeeloption(l,o,t,e,i);var h=l.graphickey;h!==this._lastgraphickey&&this.clear(i),this._lastgraphickey=h;var u=this._moveanimation=this.determineanimation(t,e);if(a){var c=x(lc,e,u);this.updatepointerel(a,l,c,e),this.updatelabelel(a,l,c,e)}else a=this._group=new wp,this.createpointerel(a,l,t,e),this.createlabelel(a,l,t,e),i.getzr().add(a);dc(a,e,!0),this._renderhandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineanimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,r=e.get("snap");if(!r&&!o)return!1;if("auto"===i||null==i){var a=this.animationthreshold;if(o&&n.getbandwidth()>a)return!0;if(r){var s=sh(t).seriesdatacount,l=n.getextent();return math.abs(l[0]-l[1])/s>a}return!1}return i===!0},makeeloption:function(){},createpointerel:function(t,e){var i=e.pointer;if(i){var n=yb(t).pointerel=new nm[i.type](xb(e.pointer));t.add(n)}},createlabelel:function(t,e,i,n){if(e.label){var o=yb(t).labelel=new wv(xb(e.label));t.add(o),uc(o,n)}},updatepointerel:function(t,e,i){var n=yb(t).pointerel;n&&(n.setstyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updatelabelel:function(t,e,i,n){var o=yb(t).labelel;o&&(o.setstyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),uc(o,n))},_renderhandle:function(t){if(!this._dragging&&this.updatehandletransform){var e=this._axispointermodel,i=this._api.getzr(),n=this._handle,o=e.getmodel("handle"),r=e.get("status");if(!o.get("show")||!r||"hide"===r)return n&&i.remove(n),void(this._handle=null);var a;this._handle||(a=!0,n=this._handle=gr(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){$p(t.event)},onmousedown:_b(this._onhandledragmove,this,0,0),drift:_b(this._onhandledragmove,this),ondragend:_b(this._onhandledragend,this)}),i.add(n)),dc(n,e,!1);var s=["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"];n.setstyle(o.getitemstyle(null,s));var l=o.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),wa(this,"_dodispatchaxispointer",o.get("throttle")||0,"fixrate"),this._movehandletovalue(t,a)}},_movehandletovalue:function(t,e){lc(this._axispointermodel,!e&&this._moveanimation,this._handle,cc(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},_onhandledragmove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updatehandletransform(cc(i),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=n,i.stopanimation(),i.attr(cc(n)),yb(i).lastprop=null,this._dodispatchaxispointer()}},_dodispatchaxispointer:function(){var t=this._handle;if(t){var e=this._payloadinfo,i=this._axismodel;this._api.dispatchaction({type:"updateaxispointer",x:e.cursorpoint[0],y:e.cursorpoint[1],tooltipoption:e.tooltipoption,axesinfo:[{axisdim:i.axis.dim,axisindex:i.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(),i=this._group,n=this._handle;e&&i&&(this._lastgraphickey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadinfo=null)},doclear:function(){},buildlabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},sc.prototype.constructor=sc,ao(sc);var wb=sc.extend({makeeloption:function(t,e,i,n,o){var r=i.axis,a=r.grid,s=n.get("type"),l=wc(a,r).getotheraxis(r).getglobalextent(),h=r.toglobalcoord(r.datatocoord(e,!0));if(s&&"none"!==s){var u=fc(n),c=bb[s](r,h,l,u);c.style=u,t.graphickey=c.type,t.pointer=c}var d=fh(a.model,i);yc(e,t,d,i,n,o)},gethandletransform:function(t,e,i){var n=fh(e.axis.grid.model,e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:mc(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i){var n=i.axis,o=n.grid,r=n.getglobalextent(!0),a=wc(o,n).getotheraxis(n).getglobalextent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=math.min(r[1],l[s]),l[s]=math.max(r[0],l[s]);var h=(a[1]+a[0])/2,u=[h,h];u[s]=l[s];var c=[{verticalalign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorpoint:u,tooltipoption:c[s]}}}),bb={line:function(t,e,i,n){var o=xc([e,i[0]],[e,i[1]],bc(t));return ar({shape:o,style:n}),{type:"line",shape:o}},shadow:function(t,e,i){var n=t.getbandwidth(),o=i[1]-i[0];return{type:"rect",shape:_c([e-n/2,i[0]],[n,o],bc(t))}}};p_.registeraxispointerclass("cartesianaxispointer",wb),ys(function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!_(e)&&(t.axispointer.link=[e])}}),xs(vy.processor.statistic,function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=th(t,e)}),ws({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},pb),as({type:"tooltip",dependencies:["axispointer"],defaultoption:{zlevel:0,z:8,show:!0,showcontent:!0,trigger:"item",triggeron:"mousemove|click",alwaysshowcontent:!1,displaymode:"single",confine:!1,showdelay:0,hidedelay:100,transitionduration:.4,enterable:!1,backgroundcolor:"rgba(50,50,50,0.7)",bordercolor:"#333",borderradius:4,borderwidth:0,padding:5,extracsstext:"",axispointer:{type:"line",axis:"auto",animation:"auto",animationdurationupdate:200,animationeasingupdate:"exponentialout",crossstyle:{color:"#999",width:1,type:"dashed",textstyle:{}}},textstyle:{color:"#fff",fontsize:14}}});var sb=f,mb=yn,ib=["","-webkit-","-moz-","-o-"],tb="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";tc.prototype={constructor:tc,_enterable:!0,update:function(){var t=this._container,e=t.currentstyle||document.defaultview.getcomputedstyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){cleartimeout(this._hidetimeout);var e=this.el;e.style.csstext=tb+ic(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extracsstext")||""),e.style.display=e.innerhtml?"block":"none",this._show=!0},setcontent:function(t){this.el.innerhtml=null==t?"":t},setenterable:function(t){this._enterable=t},getsize:function(){var t=this.el;return[t.clientwidth,t.clientheight]},moveto:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getviewportrootoffset())&&(t+=i.offsetleft,e+=i.offsettop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hidelater:function(t){!this._show||this._incontent&&this._enterable||(t?(this._hidedelay=t,this._show=!1,this._hidetimeout=settimeout(y(this.hide,this),t)):this.hide())},isshow:function(){return this._show}};var ab=y,cb=f,db=kn,lb=new wv({shape:{x:-1,y:-1,width:2,height:2}});cs({type:"tooltip",init:function(t,e){if(!vf.node){var i=new tc(e.getdom(),e);this._tooltipcontent=i}},render:function(t,e,i){if(!vf.node){this.group.removeall(),this._tooltipmodel=t,this._ecmodel=e,this._api=i,this._lastdatabycoordsys=null,this._alwaysshowcontent=t.get("alwaysshowcontent");var n=this._tooltipcontent;n.update(),n.setenterable(t.get("enterable")),this._initgloballistener(),this._keepshow()}},_initgloballistener:function(){var t=this._tooltipmodel,e=t.get("triggeron");tc("itemtooltip",this._api,ab(function(t,i,n){"none"!==e&&(e.indexof(t)>=0?this._tryshow(i,n):"leave"===t&&this._hide(n))},this))},_keepshow:function(){var t=this._tooltipmodel,e=this._ecmodel,i=this._api;if(null!=this._lastx&&null!=this._lasty&&"none"!==t.get("triggeron")){var n=this;cleartimeout(this._refreshupdatetimeout),this._refreshupdatetimeout=settimeout(function(){n.manuallyshowtip(t,e,i,{x:n._lastx,y:n._lasty})})}},manuallyshowtip:function(t,e,i,n){if(n.from!==this.uid&&!vf.node){var o=cc(n,i);this._ticket="";var r=n.databycoordsys;if(n.tooltip&&null!=n.x&&null!=n.y){var a=lb;a.position=[n.x,n.y],a.update(),a.tooltip=n.tooltip,this._tryshow({offsetx:n.x,offsety:n.y,target:a},o)}else if(r)this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,event:{},databycoordsys:n.databycoordsys,tooltipoption:n.tooltipoption},o);else if(null!=n.seriesindex){if(this._manuallyaxisshowtip(t,e,i,n))return;var s=ub(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryshow({offsetx:l,offsety:h,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchaction({type:"updateaxispointer",x:n.x,y:n.y}),this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,target:i.getzr().findhover(n.x,n.y).target,event:{}},o))}},manuallyhidetip:function(t,e,i,n){var o=this._tooltipcontent;this._alwaysshowcontent||o.hidelater(this._tooltipmodel.get("hidedelay")),this._lastx=this._lasty=null,n.from!==this.uid&&this._hide(cc(n,i))},_manuallyaxisshowtip:function(t,e,i,n){var o=n.seriesindex,r=n.dataindex,a=e.getcomponent("axispointer").coordsysaxesinfo;if(null!=o&&null!=r&&null!=a){var s=e.getseriesbyindex(o);if(s){var l=s.getdata(),t=ac([l.getitemmodel(r),s,(s.coordinatesystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchaction({type:"updateaxispointer",seriesindex:o,dataindex:r,position:n.position}),!0}}},_tryshow:function(t,e){var i=t.target,n=this._tooltipmodel;if(n){this._lastx=t.offsetx,this._lasty=t.offsety;var o=t.databycoordsys;o&&o.length?this._showaxistooltip(o,t):i&&null!=i.dataindex?(this._lastdatabycoordsys=null,this._showseriesitemtooltip(t,i,e)):i&&i.tooltip?(this._lastdatabycoordsys=null,this._showcomponentitemtooltip(t,i,e)):(this._lastdatabycoordsys=null,this._hide(e))}},_showormove:function(t,e){var i=t.get("showdelay");e=y(e,this),cleartimeout(this._showtimout),i>0?this._showtimout=settimeout(e,i):e()},_showaxistooltip:function(t,e){var i=this._ecmodel,n=this._tooltipmodel,o=[e.offsetx,e.offsety],r=[],a=[],s=ac([e.tooltipoption,n]);cb(t,function(t){cb(t.databyaxis,function(t){var e=i.getcomponent(t.axisdim+"axis",t.axisindex),n=t.value,o=[];if(e&&null!=n){var s=vc(n,e.axis,i,t.seriesdataindices,t.valuelabelopt);f(t.seriesdataindices,function(r){var l=i.getseriesbyindex(r.seriesindex),h=r.dataindexinside,u=l&&l.getdataparams(h);u.axisdim=t.axisdim,u.axisindex=t.axisindex,u.axistype=t.axistype,u.axisid=t.axisid,u.axisvalue=ll(e.axis,n),u.axisvaluelabel=s,u&&(a.push(u),o.push(l.formattooltip(h,!0)))});var l=s;r.push((l?jn(l)+"
":"")+o.join("
"))}})},this),r.reverse(),r=r.join("

");var l=e.position;this._showormove(s,function(){this._updatecontentnotchangedonaxis(t)?this._updateposition(s,l,o[0],o[1],this._tooltipcontent,a):this._showtooltipcontent(s,r,a,math.random(),o[0],o[1],l) })},_showseriesitemtooltip:function(t,e,i){var n=this._ecmodel,o=e.seriesindex,r=n.getseriesbyindex(o),a=e.datamodel||r,s=e.dataindex,l=e.datatype,h=a.getdata(),u=ac([h.getitemmodel(s),a,r&&(r.coordinatesystem||{}).model,this._tooltipmodel]),c=u.get("trigger");if(null==c||"item"===c){var d=a.getdataparams(s,l),f=a.formattooltip(s,!1,l),p="item_"+a.name+"_"+s;this._showormove(u,function(){this._showtooltipcontent(u,f,d,p,t.offsetx,t.offsety,t.position,t.target)}),i({type:"showtip",dataindexinside:s,dataindex:h.getrawindex(s),seriesindex:o,from:this.uid})}},_showcomponentitemtooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var r=new hr(n,this._tooltipmodel,this._ecmodel),a=r.get("content"),s=math.random();this._showormove(r,function(){this._showtooltipcontent(r,a,r.get("formatterparams")||{},s,t.offsetx,t.offsety,t.position,e)}),i({type:"showtip",from:this.uid})},_showtooltipcontent:function(t,e,i,n,o,r,a,s){if(this._ticket="",t.get("showcontent")&&t.get("show")){var l=this._tooltipcontent,h=t.get("formatter");a=a||t.get("position");var u=e;if(h&&"string"==typeof h)u=$n(h,i,!0);else if("function"==typeof h){var c=ab(function(e,n){e===this._ticket&&(l.setcontent(n),this._updateposition(t,a,o,r,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setcontent(u),l.show(t),this._updateposition(t,a,o,r,l,i,s)}},_updateposition:function(t,e,i,n,o,r,a){var s=this._api.getwidth(),l=this._api.getheight();e=e||t.get("position");var h=o.getsize(),u=t.get("align"),c=t.get("verticalalign"),d=a&&a.getboundingrect().clone();if(a&&d.applytransform(a.transform),"function"==typeof e&&(e=e([i,n],r,o.el,d,{viewsize:[s,l],contentsize:h.slice()})),_(e))i=db(e[0],s),n=db(e[1],l);else if(s(e)){e.width=h[0],e.height=h[1];var f=ua(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else if("string"==typeof e&&a){var p=kc(e,d,h);i=p[0],n=p[1]}else{var p=dc(i,n,o.el,s,l,u?null:20,c?null:20);i=p[0],n=p[1]}if(u&&(i-=oc(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=oc(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var p=lc(i,n,o.el,s,l);i=p[0],n=p[1]}o.moveto(i,n)},_updatecontentnotchangedonaxis:function(t){var e=this._lastdatabycoordsys,i=!!e&&e.length===t.length;return i&&cb(e,function(e,n){var o=e.databyaxis||{},r=t[n]||{},a=r.databyaxis||[];i&=o.length===a.length,i&&cb(o,function(t,e){var n=a[e]||{},o=t.seriesdataindices||[],r=n.seriesdataindices||[];i&=t.value===n.value&&t.axistype===n.axistype&&t.axisid===n.axisid&&o.length===r.length,i&&cb(o,function(t,e){var n=r[e];i&=t.seriesindex===n.seriesindex&&t.dataindex===n.dataindex})})}),this._lastdatabycoordsys=t,!!i},_hide:function(t){this._lastdatabycoordsys=null,t({type:"hidetip",from:this.uid})},dispose:function(t,e){vf.node||(this._tooltipcontent.hide(),ac("itemtooltip",e))}}),ws({type:"showtip",event:"showtip",update:"tooltip:manuallyshowtip"},function(){}),ws({type:"hidetip",event:"hidetip",update:"tooltip:manuallyhidetip"},function(){});var pb=qn,kb=jn,ob=as({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergedefaultandtheme(t,i),this.mergeoption(t,i,n.createdbyself,!0)},isanimationenabled:function(){if(vf.node)return!1;var t=this.__hostseries;return this.getshallow("animation")&&t&&t.isanimationenabled()},mergeoption:function(t,e,i,n){var o=this.constructor,r=this.maintype+"model";i||e.eachseries(function(t){var i=t.get(this.maintype),s=t[r];return i&&i.data?(s?s.mergeoption(i,e,!0):(n&&zc(i),f(i.data,function(t){t instanceof array?(zc(t[0]),zc(t[1])):zc(t)}),s=new o(i,this,e),a(s,{maintype:this.maintype,seriesindex:t.seriesindex,name:t.name,createdbyself:!0}),s.__hostseries=t),void(t[r]=s)):void(t[r]=null)},this)},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=_(i)?p(i,pb).join(", "):pb(i),o=e.getname(t),r=kb(this.name);return(null!=i||o)&&(r+="
"),o&&(r+=kb(o),null!=i&&(r+=" : ")),null!=i&&(r+=kb(n)),r},getdata:function(){return this._data},setdata:function(t){this._data=t}});c(ob,dm),ob.extend({type:"markpoint",defaultoption:{zlevel:0,z:5,symbol:"pin",symbolsize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemstyle:{normal:{borderwidth:2}}}});var zb=h,rb=x,eb={min:rb(vc,"min"),max:rb(vc,"max"),average:rb(vc,"average")},bb=cs({type:"marker",init:function(){this.markergroupmap=e()},render:function(t,e,i){var n=this.markergroupmap;n.each(function(t){t.__keep=!1});var o=this.type+"model";e.eachseries(function(t){var n=t[o];n&&this.renderseries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderseries:function(){}});bb.extend({type:"markpoint",updatelayout:function(t,e,i){e.eachseries(function(t){var e=t.markpointmodel;e&&(zc(e.getdata(),t,i),this.markergroupmap.get(t.id).updatelayout(e))},this)},renderseries:function(t,e,i,n){var o=t.coordinatesystem,r=t.id,a=t.getdata(),s=this.markergroupmap,l=s.get(r)||s.set(r,new xh),h=uc(o,t,e);e.setdata(h),zc(e.getdata(),t,n),h.each(function(t){var i=h.getitemmodel(t),n=i.getshallow("symbolsize");"function"==typeof n&&(n=n(e.getrawvalue(t),e.getdataparams(t))),h.setitemvisual(t,{symbolsize:n,color:i.get("itemstyle.normal.color")||a.getvisual("color"),symbol:i.getshallow("symbol")})}),l.updatedata(h),this.group.add(l.group),h.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),ys(function(t){t.markpoint=t.markpoint||{}}),ob.extend({type:"markline",defaultoption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolsize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},linestyle:{normal:{type:"dashed"},emphasis:{width:3}},animationeasing:"linear"}});var vb=function(t,e,i,r){var s=t.getdata(),l=r.type;if(!_(r)&&("min"===l||"max"===l||"average"===l||null!=r.xaxis||null!=r.yaxis)){var h,u,c;if(null!=r.yaxis||null!=r.xaxis)u=null!=r.yaxis?"y":"x",h=e.getaxis(u),c=a(r.yaxis,r.xaxis);else{var d=fc(r,s,e,t);u=d.valuedatadim,h=d.valueaxis,c=wc(s,u,l)}var f="x"===u?0:1,p=1-f,g=n(r),v={};g.type=null,g.coord=[],v.coord=[],g.coord[p]=-1/0,v.coord[p]=1/0;var m=i.get("precision");m>=0&&"number"==typeof c&&(c=+c.tofixed(math.min(m,20))),g.coord[f]=v.coord[f]=c,r=[g,v,{type:l,valueindex:r.valueindex,value:c}]}return r=[nc(t,r[0]),nc(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",o(r[2],r[0]),o(r[2],r[1]),r};bb.extend({type:"markline",updatelayout:function(t,e,i){e.eachseries(function(t){var e=t.marklinemodel;if(e){var n=e.getdata(),o=e.__from,r=e.__to;o.each(function(e){jc(o,e,!0,t,i),jc(r,e,!1,t,i)}),n.each(function(t){n.setitemlayout(t,[o.getitemlayout(t),r.getitemlayout(t)])}),this.markergroupmap.get(t.id).updatelayout()}},this)},renderseries:function(t,e,i,n){function o(e,i,o){var r=e.getitemmodel(i);jc(e,i,o,t,n),e.setitemvisual(i,{symbolsize:r.get("symbolsize")||g[o?0:1],symbol:r.get("symbol",!0)||p[o?0:1],color:r.get("itemstyle.normal.color")||s.getvisual("color")})}var r=t.coordinatesystem,a=t.id,s=t.getdata(),l=this.markergroupmap,h=l.get(a)||l.set(a,new pu);this.group.add(h.group);var u=$c(r,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setdata(f);var p=e.get("symbol"),g=e.get("symbolsize");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),u.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getitemmodel(t).get("linestyle.normal.color");f.setitemvisual(t,{color:e||c.getitemvisual(t,"color")}),f.setitemlayout(t,[c.getitemlayout(t),d.getitemlayout(t)]),f.setitemvisual(t,{fromsymbolsize:c.getitemvisual(t,"symbolsize"),fromsymbol:c.getitemvisual(t,"symbol"),tosymbolsize:d.getitemvisual(t,"symbolsize"),tosymbol:d.getitemvisual(t,"symbol")})}),h.updatedata(f),u.line.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),ys(function(t){t.markline=t.markline||{}}),ob.extend({type:"markarea",defaultoption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemstyle:{normal:{borderwidth:0}}}});var nb=function(t,e,i,n){var o=nc(t,n[0]),a=nc(t,n[1]),s=a,l=o.coord,h=a.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=r([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u},fb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];bb.extend({type:"markarea",updatelayout:function(t,e,i){e.eachseries(function(t){var e=t.markareamodel;if(e){var n=e.getdata();n.each(function(e){var o=p(fb,function(o){return td(n,e,o,t,i)});n.setitemlayout(e,o);var r=n.getitemgraphicel(e);r.setshape("points",o)})}},this)},renderseries:function(t,e,i,n){var o=t.coordinatesystem,r=t.name,a=t.getdata(),l=this.markergroupmap,h=l.get(r)||l.set(r,{group:new wp});this.group.add(h.group),h.__keep=!0;var u=ed(o,t,e);e.setdata(u),u.each(function(e){u.setitemlayout(e,p(fb,function(i){return td(u,e,i,t,n)})),u.setitemvisual(e,{color:a.getvisual("color")})}),u.diff(h.__data).add(function(t){var e=new gv({shape:{points:u.getitemlayout(t)}});u.setitemgraphicel(t,e),h.group.add(e)}).update(function(t,i){var n=h.__data.getitemgraphicel(i);or(n,{shape:{points:u.getitemlayout(t)}},e,t),h.group.add(n),u.setitemgraphicel(t,n)}).remove(function(t){var e=h.__data.getitemgraphicel(t);h.group.remove(e)}).execute(),u.eachitemgraphicel(function(t,i){var n=u.getitemmodel(i),o=n.getmodel("label.normal"),r=n.getmodel("label.emphasis"),a=u.getitemvisual(i,"color");t.usestyle(s(n.getmodel("itemstyle.normal").getitemstyle(),{fill:ve(a,.4),stroke:a})),t.hoverstyle=n.getmodel("itemstyle.emphasis").getitemstyle(),br(t.style,t.hoverstyle,o,r,{labelfetcher:e,labeldataindex:i,defaulttext:u.getname(i)||"",isrecttext:!0,autocolor:a}),wr(t,{}),t.datamodel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),ys(function(t){t.markarea=t.markarea||{}}),bm.registersubtypedefaulter("datazoom",function(){return"slider"});var gb=["x","y","z","radius","angle","single"],hb=["cartesian2d","polar","singleaxis"],wb=nd(gb,["axisindex","axis","index","id"]),zb=f,ub=zn,xb=function(t,e,i,n){this._dimname=t,this._axisindex=e,this._valuewindow,this._percentwindow,this._dataextent,this._minmaxspan,this.ecmodel=n,this._datazoommodel=i};xb.prototype={constructor:xb,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(i){if(id(i.get("coordinatesystem"))){var n=this._dimname,o=e.querycomponents({maintype:n+"axis",index:i.get(n+"axisindex"),id:i.get(n+"axisid")})[0];this._axisindex===(o&&o.componentindex)&&t.push(i)}},this),t},getaxismodel:function(){return this.ecmodel.getcomponent(this._dimname+"axis",this._axisindex)},getotheraxismodel:function(){var t,e,i=this._dimname,n=this.ecmodel,o=this.getaxismodel(),r="x"===i||"y"===i;r?(e="gridindex",t="x"===i?"y":"x"):(e="polarindex",t="angle"===i?"radius":"angle");var a;return n.eachcomponent(t+"axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(a=t)}),a},getminmaxspan:function(){return n(this._minmaxspan)},calculatedatawindow:function(t){var e=this._dataextent,i=this.getaxismodel(),n=i.axis.scale,o=this._datazoommodel.getrangepropmode(),r=[0,100],a=[t.start,t.end],s=[];return zb(["startvalue","endvalue"],function(e){s.push(null!=t[e]?n.parse(t[e]):null)}),zb([0,1],function(t){var i=s[t],l=a[t];"percent"===o[t]?(null==l&&(l=r[t]),i=n.parse(pn(l,r,e,!0))):l=pn(i,e,r,!0),s[t]=i,a[t]=l}),{valuewindow:ub(s),percentwindow:ub(a)}},reset:function(t){if(t===this._datazoommodel){this._dataextent=rd(this,this._dimname,this.gettargetseriesmodels());var e=this.calculatedatawindow(t.option);this._valuewindow=e.valuewindow,this._percentwindow=e.percentwindow,ld(this),sd(this)}},restore:function(t){t===this._datazoommodel&&(this._valuewindow=this._percentwindow=null,sd(this,!0))},filterdata:function(t){function e(t){return t>=r[0]&&t<=r[1]}if(t===this._datazoommodel){var i=this._dimname,n=this.gettargetseriesmodels(),o=t.get("filtermode"),r=this._valuewindow;if("none"!==o){var a=this.getotheraxismodel();t.get("$fromtoolbox")&&a&&"category"===a.get("type")&&(o="empty"),zb(n,function(t){var n=t.getdata(),a=t.coorddimtodatadim(i);"weakfilter"===o?n&&n.filterself(function(t){for(var e,i,o,s=0;sr[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(e=!0),c&&(i=!0)}return o&&e&&i}):n&&zb(a,function(i){"empty"===o?t.setdata(n.map(i,function(t){return e(t)?t:0/0})):n.filterself(i,e)})})}}}};var qb=f,yb=wb,jb=as({type:"datazoom",dependencies:["xaxis","yaxis","zaxis","radiusaxis","angleaxis","singleaxis","series"],defaultoption:{zlevel:0,z:4,orient:null,xaxisindex:null,yaxisindex:null,filtermode:"filter",throttle:null,start:0,end:100,startvalue:null,endvalue:null,minspan:null,maxspan:null,minvaluespan:null,maxvaluespan:null,rangemode:null},init:function(t,e,i){this._dataintervalbyaxis={},this._datainfo={},this._axisproxies={},this.textstylemodel,this._autothrottle=!0,this._rangepropmode=["percent","percent"];var n=hd(t);this.mergedefaultandtheme(t,i),this.doinit(n)},mergeoption:function(t){var e=hd(t);o(this.option,t,!0),this.doinit(e)},doinit:function(t){var e=this.option;vf.canvassupported||(e.realtime=!1),this._setdefaultthrottle(t),ud(this,t),qb([["start","startvalue"],["end","endvalue"]],function(t,i){"value"===this._rangepropmode[i]&&(e[t[0]]=null)},this),this.textstylemodel=this.getmodel("textstyle"),this._resettarget(),this._giveaxisproxies()},_giveaxisproxies:function(){var t=this._axisproxies;this.eachtargetaxis(function(e,i,n,o){var r=this.dependentmodels[e.axis][i],a=r.__dzaxisproxy||(r.__dzaxisproxy=new xb(e.name,i,this,o));t[e.name+"_"+i]=a},this)},_resettarget:function(){var t=this.option,e=this._judgeautomode();yb(function(e){var i=e.axisindex;t[i]=ur(t[i])},this),"axisindex"===e?this._autosetaxisindex():"orient"===e&&this._autosetorient()},_judgeautomode:function(){var t=this.option,e=!1;yb(function(i){null!=t[i.axisindex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisindex")},_autosetaxisindex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentmodels;if(t){var o="vertical"===e?"y":"x";n[o+"axis"].length?(i[o+"axisindex"]=[0],t=!1):qb(n.singleaxis,function(n){t&&n.get("orient",!0)===e&&(i.singleaxisindex=[n.componentindex],t=!1)})}t&&yb(function(e){if(t){var n=[],o=this.dependentmodels[e.axis];if(o.length&&!n.length)for(var r=0,a=o.length;a>r;r++)"category"===o[r].get("type")&&n.push(r);i[e.axisindex]=n,n.length&&(t=!1)}},this),t&&this.ecmodel.eachseries(function(t){this._isserieshasallaxestypeof(t,"value")&&yb(function(e){var n=i[e.axisindex],o=t.get(e.axisindex),r=t.get(e.axisid),a=t.ecmodel.querycomponents({maintype:e.axis,index:o,id:r})[0];o=a.componentindex,h(n,o)<0&&n.push(o)})},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 i=!0;return yb(function(n){var o=t.get(n.axisindex),r=this.dependentmodels[n.axis][o];r&&r.get("type")===e||(i=!1)},this),i},_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 yb(function(e){if(null==t){var i=this.get(e.axisindex);i.length&&(t=this.dependentmodels[e.axis][i[0]])}},this),t},eachtargetaxis:function(t,e){var i=this.ecmodel;yb(function(n){qb(this.get(n.axisindex),function(o){t.call(e,n,o,this,i)},this)},this)},getaxisproxy:function(t,e){return this._axisproxies[t+"_"+e]},getaxismodel:function(t,e){var i=this.getaxisproxy(t,e);return i&&i.getaxismodel()},setrawrange:function(t,e){var i=this.option;qb([["start","startvalue"],["end","endvalue"]],function(e){(null!=t[e[0]]||null!=t[e[1]])&&(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&ud(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 i=this.findrepresentativeaxisproxy();return i?i.getdatavaluewindow():void 0},findrepresentativeaxisproxy:function(t){if(t)return t.__dzaxisproxy;var e=this._axisproxies;for(var i in e)if(e.hasownproperty(i)&&e[i].hostedby(this))return e[i];for(var i in e)if(e.hasownproperty(i)&&!e[i].hostedby(this))return e[i]},getrangepropmode:function(){return this._rangepropmode.slice()}}),$b=$m.extend({type:"datazoom",render:function(t,e,i){this.datazoommodel=t,this.ecmodel=e,this.api=i},gettargetcoordinfo:function(){function t(t,e,i,n){for(var o,r=0;rr&&(e[1-n]=e[n]+u.sign*r),e}),jb=wv,qb=pn,ts=zn,es=y,is=f,ns=7,os=1,rs=30,as="horizontal",ss="vertical",ls=5,hs=["line","bar","candlestick","scatter"],us=$b.extend({type:"datazoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleends,this._size,this._handlewidth,this._handleheight,this._location,this._dragging,this._datashadowinfo,this.api=e},render:function(t,e,i,n){return us.superapply(this,"render",arguments),wa(this,"_dispatchzoomaction",this.datazoommodel.get("throttle"),"fixrate"),this._orient=t.get("orient"),this.datazoommodel.get("show")===!1?void this.group.removeall():(n&&"datazoom"===n.type&&n.from===this.uid||this._buildview(),void this._updateview())},remove:function(){us.superapply(this,"remove",arguments),za(this,"_dispatchzoomaction")},dispose:function(){us.superapply(this,"dispose",arguments),za(this,"_dispatchzoomaction")},_buildview:function(){var t=this.group;t.removeall(),this._resetlocation(),this._resetinterval();var e=this._displayables.bargroup=new wp;this._renderbackground(),this._renderhandle(),this._renderdatashadow(),t.add(e),this._positiongroup()},_resetlocation:function(){var t=this.datazoommodel,e=this.api,i=this._findcoordrect(),n={width:e.getwidth(),height:e.getheight()},o=this._orient===as?{right:n.width-i.x-i.width,top:n.height-rs-ns,width:i.width,height:rs}:{right:ns,top:i.y,width:rs,height:i.height},r=fa(t.option);f(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])});var a=ua(r,n,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],this._orient===ss&&this._size.reverse()},_positiongroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.datazoommodel.getfirsttargetaxismodel(),o=n&&n.get("inverse"),r=this._displayables.bargroup,a=(this._datashadowinfo||{}).otheraxisinverse;r.attr(i!==as||o?i===as&&o?{scale:a?[-1,1]:[-1,-1]}:i!==ss||o?{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([r]);t.attr("position",[e.x-s.x,e.y-s.y])},_getviewextent:function(){return[0,this._size[0]]},_renderbackground:function(){var t=this.datazoommodel,e=this._size,i=this._displayables.bargroup;i.add(new jb({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundcolor")},z2:-40})),i.add(new jb({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,i=t.series,n=i.getrawdata(),o=i.getshadowdim?i.getshadowdim():t.otherdim;if(null!=o){var r=n.getdataextent(o),a=.3*(r[1]-r[0]);r=[r[0]-a,r[1]+a];var l,h=[0,e[1]],u=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=u[1]/(n.count()-1),p=0,g=math.round(n.count()/e[0]);n.each([o],function(t,e){if(g>0&&e%g)return void(p+=f);var i=null==t||isnan(t)||""===t,n=i?0:qb(t,r,h,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i});var v=this.datazoommodel;this._displayables.bargroup.add(new gv({shape:{points:c},style:s({fill:v.get("databackgroundcolor")},v.getmodel("databackground.areastyle").getareastyle()),silent:!0,z2:-20})),this._displayables.bargroup.add(new hv({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 i,n=this.ecmodel;return t.eachtargetaxis(function(o,r){var a=t.getaxisproxy(o.name,r).gettargetseriesmodels();f(a,function(t){if(!(i||e!==!0&&h(hs,t.get("type"))<0)){var a,s=n.getcomponent(o.axis,r).axis,l=fd(o.name),u=t.coordinatesystem;null!=l&&u.getotheraxis&&(a=u.getotheraxis(s).inverse),i={thisaxis:s,series:t,thisdim:o.name,otherdim:l,otheraxisinverse:a}}},this)},this),i}},_renderhandle:function(){var t=this._displayables,e=t.handles=[],i=t.handlelabels=[],n=this._displayables.bargroup,o=this._size,r=this.datazoommodel;n.add(t.filler=new jb({draggable:!0,cursor:pd(this._orient),drift:es(this._ondragmove,this,"all"),onmousemove:function(t){$p(t.event)},ondragstart:es(this._showdatainfo,this,!0),ondragend:es(this._ondragend,this),onmouseover:es(this._showdatainfo,this,!0),onmouseout:es(this._showdatainfo,this,!1),style:{fill:r.get("fillercolor"),textposition:"inside"}})),n.add(new jb(sr({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:r.get("databackgroundcolor")||r.get("bordercolor"),linewidth:os,fill:"rgba(0,0,0,0)"}}))),is([0,1],function(t){var o=gr(r.get("handleicon"),{cursor:pd(this._orient),draggable:!0,drift:es(this._ondragmove,this,t),onmousemove:function(t){$p(t.event)},ondragend:es(this._ondragend,this),onmouseover:es(this._showdatainfo,this,!0),onmouseout:es(this._showdatainfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=o.getboundingrect();this._handleheight=kn(r.get("handlesize"),this._size[1]),this._handlewidth=a.width/a.height*this._handleheight,o.setstyle(r.getmodel("handlestyle").getitemstyle());var s=r.get("handlecolor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=r.textstylemodel;this.group.add(i[t]=new ov({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=[qb(t[0],[0,100],e,!0),qb(t[1],[0,100],e,!0)]},_updateinterval:function(t,e){var i=this.datazoommodel,n=this._handleends,o=this._getviewextent(),r=i.findrepresentativeaxisproxy().getminmaxspan(),a=[0,100];kb(e,n,o,i.get("zoomlock")?"all":t,null!=r.minspan?qb(r.minspan,a,o,!0):null,null!=r.maxspan?qb(r.maxspan,a,o,!0):null),this._range=ts([qb(n[0],o,a,!0),qb(n[1],o,a,!0)])},_updateview:function(t){var e=this._displayables,i=this._handleends,n=ts(i.slice()),o=this._size;is([0,1],function(t){var n=e.handles[t],r=this._handleheight;n.attr({scale:[r/2,r/2],position:[i[t],o[1]/2-r/2]})},this),e.filler.setshape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updatedatainfo(t)},_updatedatainfo:function(t){function e(t){var e=rr(n.handles[t].parent,this.group),i=br(0===t?"right":"left",e),s=this._handlewidth/2+ls,l=er([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setstyle({x:l[0],y:l[1],textverticalalign:r===as?"middle":i,textalign:r===as?i:"center",text:a[t]})}var i=this.datazoommodel,n=this._displayables,o=n.handlelabels,r=this._orient,a=["",""];if(i.get("showdetail")){var s=i.findrepresentativeaxisproxy();if(s){var l=s.getaxismodel().axis,h=this._range,u=t?s.calculatedatawindow({start:h[0],end:h[1]}).valuewindow:s.getdatavaluewindow();a=[this._formatlabel(u[0],l),this._formatlabel(u[1],l)]}}var c=ts(this._handleends.slice());e.call(this,0),e.call(this,1)},_formatlabel:function(t,e){var i=this.datazoommodel,n=i.get("labelformatter"),o=i.get("labelprecision");(null==o||"auto"===o)&&(o=e.getpixelprecision());var r=null==t||isnan(t)?"":"category"===e.type||"time"===e.type?e.scale.getlabel(math.round(t)):t.tofixed(math.min(o,20));return w(n)?n(t,r):b(n)?n.replace("{value}",r):r},_showdatainfo:function(t){t=this._dragging||t;var e=this._displayables.handlelabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_ondragmove:function(t,e,i){this._dragging=!0;var n=this._displayables.bargroup.getlocaltransform(),o=er([e,i],n,!0);this._updateinterval(t,o[0]);var r=this.datazoommodel.get("realtime");this._updateview(!r),r&&r&&this._dispatchzoomaction()},_ondragend:function(){this._dragging=!1,this._showdatainfo(!1),this._dispatchzoomaction()},_onclickpanelclick:function(t){var e=this._size,i=this._displayables.bargroup.transformcoordtolocal(t.offsetx,t.offsety);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleends,o=(n[0]+n[1])/2;this._updateinterval("all",i[0]-o),this._updateview(),this._dispatchzoomaction()}},_dispatchzoomaction:function(){var t=this._range;this.api.dispatchaction({type:"datazoom",from:this.uid,datazoomid:this.datazoommodel.id,start:t[0],end:t[1]})},_findcoordrect:function(){var t;if(is(this.gettargetcoordinfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinatesystem;t=i.getrect&&i.getrect()}}),!t){var e=this.api.getwidth(),i=this.api.getheight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});jb.extend({type:"datazoom.inside",defaultoption:{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,preventdefaultmousemove:!0}});var cs=x,ds="\x00_ec_datazoom_roams",fs=y,ps=$b.extend({type:"datazoom.inside",init:function(){this._range},render:function(t,e,i,n){ps.superapply(this,"render",arguments),md(n,t.id)&&(this._range=t.getpercentrange()),f(this.gettargetcoordinfo(),function(e,n){var o=p(e,function(t){return yd(t.model)});f(e,function(e){var r=e.model,a=t.option;gd(i,{coordid:yd(r),allcoordids:o,containspoint:function(t,e,i){return r.coordinatesystem.containpoint([e,i])},datazoomid:t.id,throttlerate:t.get("throttle",!0),pangetrange:fs(this._onpan,this,e,n),zoomgetrange:fs(this._onzoom,this,e,n),zoomlock:a.zoomlock,disabled:a.disabled,roamcontrolleropt:{zoomonmousewheel:a.zoomonmousewheel,moveonmousemove:a.moveonmousemove,preventdefaultmousemove:a.preventdefaultmousemove}})},this)},this)},dispose:function(){vd(this.api,this.datazoommodel.id),ps.superapply(this,"dispose",arguments),this._range=null},_onpan:function(t,e,i,n,o,r,a,s,l){var h=this._range.slice(),u=t.axismodels[0];if(u){var c=gs[e]([r,a],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixellength;return kb(d,h,[0,100],"all"),this._range=h}},_onzoom:function(t,e,i,n,o,r){var a=this._range.slice(),s=t.axismodels[0];if(s){var l=gs[e](null,[o,r],s,i,t),h=(l.signal>0?l.pixelstart+l.pixellength-l.pixel:l.pixel-l.pixelstart)/l.pixellength*(a[1]-a[0])+a[0];n=math.max(1/n,0),a[0]=(a[0]-h)*n+h,a[1]=(a[1]-h)*n+h;var u=this.datazoommodel.findrepresentativeaxisproxy().getminmaxspan();return kb(0,a,[0,100],0,u.minspan,u.maxspan),this._range=a}}}),gs={grid:function(t,e,i,n,o){var r=i.axis,a={},s=o.model.coordinatesystem.getrect();return t=t||[0,0],"x"===r.dim?(a.pixel=e[0]-t[0],a.pixellength=s.width,a.pixelstart=s.x,a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixellength=s.height,a.pixelstart=s.y,a.signal=r.inverse?-1:1),a},polar:function(t,e,i,n,o){var r=i.axis,a={},s=o.model.coordinatesystem,l=s.getradiusaxis().getextent(),h=s.getangleaxis().getextent();return t=t?s.pointtocoord(t):[0,0],e=s.pointtocoord(e),"radiusaxis"===i.maintype?(a.pixel=e[0]-t[0],a.pixellength=l[1]-l[0],a.pixelstart=l[0],a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixellength=h[1]-h[0],a.pixelstart=h[0],a.signal=r.inverse?-1:1),a},singleaxis:function(t,e,i,n,o){var r=i.axis,a=o.model.coordinatesystem.getrect(),s={};return t=t||[0,0],"horizontal"===r.orient?(s.pixel=e[0]-t[0],s.pixellength=a.width,s.pixelstart=a.x,s.signal=r.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixellength=a.height,s.pixelstart=a.y,s.signal=r.inverse?-1:1),s}};xs(function(t){t.eachcomponent("datazoom",function(t){t.eachtargetaxis(ad),t.eachtargetaxis(cd)}),t.eachcomponent("datazoom",function(t){var e=t.findrepresentativeaxisproxy(),i=e.getdatapercentwindow(),n=e.getdatavaluewindow();t.setrawrange({start:i[0],end:i[1],startvalue:n[0],endvalue:n[1]},!0)})}),ws("datazoom",function(t,e){var i=od(y(e.eachcomponent,e,"datazoom"),wb,function(t,e){return t.get(e.axisindex)}),n=[];e.eachcomponent({maintype:"datazoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setrawrange({start:t.start,end:t.end,startvalue:t.startvalue,endvalue:t.endvalue})})});var vs=f,ms=function(t){var e=t&&t.visualmap;_(e)||(e=e?[e]:[]),vs(e,function(t){if(t){dd(t,"splitlist")&&!dd(t,"pieces")&&(t.pieces=t.splitlist,delete t.splitlist);var e=t.pieces;e&&_(e)&&vs(e,function(t){s(t)&&(dd(t,"start")&&!dd(t,"min")&&(t.min=t.start),dd(t,"end")&&!dd(t,"max")&&(t.max=t.end))})}})};bm.registersubtypedefaulter("visualmap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitnumber>0)&&!t.calculable?"piecewise":"continuous"});var ys=f,xs=s,_s=-1,ws=function(t){var e=t.mappingmethod,i=t.type,o=this.option=n(t);this.type=i,this.mappingmethod=e,this._normalizedata=ss[e];var r=bs[i];this.applyvisual=r.applyvisual,this.getcolormapper=r.getcolormapper,this._domap=r._domap[e],"piecewise"===e?(kd(o),ld(o)):"category"===e?o.categories?pd(o):kd(o,!0):(k("linear"!==e||o.dataextent),kd(o))};ws.prototype={constructor:ws,mapvaluetovisual:function(t){var e=this._normalizedata(t);return this._domap(e,t)},getnormalizer:function(){return y(this._normalizedata,this)}};var bs=ws.visualhandlers={color:{applyvisual:rd("color"),getcolormapper:function(){var t=this.option;return y("category"===t.mappingmethod?function(t,e){return!e&&(t=this._normalizedata(t)),ed.call(this,t)}:function(e,i,n){var o=!!n;return!i&&(e=this._normalizedata(e)),n=re(e,t.parsedvisual,n),o?n:ne(n,"rgba")},this)},_domap:{linear:function(t){return ne(re(t,this.option.parsedvisual),"rgba")},category:ed,piecewise:function(t,e){var i=nd.call(this,e);return null==i&&(i=ne(re(t,this.option.parsedvisual),"rgba")),i},fixed:bd}},colorhue:od(function(t,e){return be(t,e)}),colorsaturation:od(function(t,e){return be(t,null,e)}),colorlightness:od(function(t,e){return be(t,null,null,e)}),coloralpha:od(function(t,e){return ve(t,e)}),opacity:{applyvisual:rd("opacity"),_domap:vd([0,1])},symbol:{applyvisual:function(t,e,i){var n=this.mapvaluetovisual(t);if(b(n))i("symbol",n);else if(xs(n))for(var o in n)n.hasownproperty(o)&&i(o,n[o])},_domap:{linear:zd,category:ed,piecewise:function(t,e){var i=nd.call(this,e);return null==i&&(i=zd.call(this,t)),i},fixed:bd}},symbolsize:{applyvisual:rd("symbolsize"),_domap:vd([0,1])}},ss={linear:function(t){return pn(t,this.option.dataextent,[0,1],!0)},piecewise:function(t){var e=this.option.piecelist,i=ws.findpieceindex(t,e,!0); return null!=i?pn(i,[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?_s:e},fixed:b};ws.listvisualtypes=function(){var t=[];return f(bs,function(e,i){t.push(i)}),t},ws.addvisualhandler=function(t,e){bs[t]=e},ws.isvalidtype=function(t){return bs.hasownproperty(t)},ws.eachvisual=function(t,e,i){s(t)?f(t,e,i):e.call(i,t)},ws.mapvisual=function(t,e,i){var n,o=_(t)?[]:s(t)?{}:(n=!0,null);return ws.eachvisual(t,function(t,r){var a=e.call(i,t,r);n?o=a:o[r]=a}),o},ws.retrievevisuals=function(t){var e,i={};return t&&ys(bs,function(n,o){t.hasownproperty(o)&&(i[o]=t[o],e=!0)}),e?i:null},ws.preparevisualtypes=function(t){if(xs(t)){var e=[];ys(t,function(t,i){e.push(i)}),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},ws.dependson=function(t,e){return"color"===e?!(!t||0!==t.indexof(e)):t===e},ws.findpieceindex=function(t,e,i){function n(e,i){var n=math.abs(e-t);r>n&&(r=n,o=i)}for(var o,r=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;i&&n(l,a)}}for(var a=0,s=e.length;s>a;a++){var h=e[a],u=h.interval,c=h.close;if(u){if(u[0]===-1/0){if(gd(c[1],t,u[1]))return a}else if(1/0===u[1]){if(gd(c[0],u[0],t))return a}else if(gd(c[0],u[0],t)&&gd(c[1],t,u[1]))return a;i&&n(u[0],a),i&&n(u[1],a)}}return i?1/0===t?e.length-1:t===-1/0?0:o:void 0};var ms=f;is(vy.visual.component,function(t){t.eachcomponent("visualmap",function(e){xd(e,t)}),qd(t)});var is={get:function(t,e,i){var o=n((ts[t]||{})[e]);return i&&_(o)?o[o.length-1]:o}},ts={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]}},as=ws.mapvisual,cs=ws.eachvisual,ds=_,ls=f,ps=zn,ks=pn,os=b,zs=["#f6efa6","#d88273","#bf444c"],rs=as({type:"visualmap",dependencies:["series"],statelist:["inrange","outofrange"],replacableoptionkeys:["inrange","outofrange","target","controller","color"],databound:[-1/0,1/0],layoutmode:{type:"box",ignoresize:!0},defaultoption:{show:!0,zlevel:0,z:4,seriesindex:"all",min:0,max:200,dimension:null,inrange:null,outofrange:null,left:0,right:null,top:null,bottom:0,itemwidth:null,itemheight:null,inverse:!1,orient:"vertical",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",contentcolor:"#5793f3",inactivecolor:"#aaa",borderwidth:0,padding:5,textgap:10,precision:0,color:null,formatter:null,text:null,textstyle:{color:"#333"}},init:function(t,e,i){this._dataextent,this.targetvisuals={},this.controllervisuals={},this.textstylemodel,this.itemsize,this.mergedefaultandtheme(t,i)},optionupdated:function(t,e){var i=this.option;vf.canvassupported||(i.realtime=!1),!e&&zd(i,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=wd(this.option.controller,e,t),this.targetvisuals=wd(this.option.target,e,t)},gettargetseriesindices:function(){var t=this.option.seriesindex,e=[];return null==t||"all"===t?this.ecmodel.eachseries(function(t,i){e.push(i)}):e=ur(t),e},eachtargetseries:function(t,e){f(this.gettargetseriesindices(),function(i){t.call(e,this.ecmodel.getseriesbyindex(i))},this)},istargetseries:function(t){var e=!1;return this.eachtargetseries(function(i){i===t&&(e=!0)}),e},formatvaluetext:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).tofixed(math.min(s,20))}var o,r,a=this.option,s=a.precision,l=this.databound,h=a.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),o=!0),r=e?t:o?[n(t[0]),n(t[1])]:n(t),b(h)?h.replace("{value}",o?r[0]:r).replace("{value2}",o?r[1]:r):w(h)?o?h(t[0],t[1]):h(t):o?t[0]===l[0]?i[0]+" "+r[1]:t[1]===l[1]?i[1]+" "+r[0]:r[0]+" - "+r[1]:r},resetextent:function(){var t=this.option,e=ps([t.min,t.max]);this._dataextent=e},getdatadimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getextent:function(){return this._dataextent.slice()},completevisualoption:function(){function t(t){ds(r.color)&&!t.inrange&&(t.inrange={color:r.color.slice().reverse()}),t.inrange=t.inrange||{color:zs},ls(this.statelist,function(e){var i=t[e];if(b(i)){var n=is.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},ls(n,function(t,e){if(ws.isvalidtype(e)){var i=is.get(e,"inactive",h);null!=i&&(o[e]=i,"color"!==e||o.hasownproperty("opacity")||o.hasownproperty("coloralpha")||(o.opacity=[0,0]))}}))}function i(t){var e=(t.inrange||{}).symbol||(t.outofrange||{}).symbol,i=(t.inrange||{}).symbolsize||(t.outofrange||{}).symbolsize,o=this.get("inactivecolor");ls(this.statelist,function(r){var a=this.itemsize,s=t[r];s||(s=t[r]={color:h?o:[o]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundrect":["roundrect"])),null==s.symbolsize&&(s.symbolsize=i&&n(i)||(h?a[0]:[a[0],a[0]])),s.symbol=as(s.symbol,function(t){return"none"===t||"square"===t?"roundrect":t});var l=s.symbolsize;if(null!=l){var u=-1/0;cs(l,function(t){t>u&&(u=t)}),s.symbolsize=as(l,function(t){return ks(t,[0,u],[0,a[0]],!0)})}},this)}var r=this.option,a={inrange:r.inrange,outofrange:r.outofrange},s=r.target||(r.target={}),l=r.controller||(r.controller={});o(s,a),o(l,a);var h=this.iscategory();t.call(this,s),t.call(this,l),e.call(this,s,"inrange","outofrange"),i.call(this,l)},resetitemsize:function(){this.itemsize=[parsefloat(this.get("itemwidth")),parsefloat(this.get("itemheight"))]},iscategory:function(){return!!this.option.categories},setselected:os,getvaluestate:os,getvisualmeta:os}),es=[20,140],bs=rs.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(){bs.superapply(this,"optionupdated",arguments),this.resetextent(),this.resetvisual(function(t){t.mappingmethod="linear",t.dataextent=this.getextent()}),this._resetrange()},resetitemsize:function(){bs.superapply(this,"resetitemsize",arguments);var t=this.itemsize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isnan(t[0]))&&(t[0]=es[0]),(null==t[1]||isnan(t[1]))&&(t[1]=es[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(){rs.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=zn((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(i){var n=[],o=i.getdata();o.each(this.getdatadimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},!0,this),e.push({seriesid:i.id,dataindex:n})},this),e},getvisualmeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=jd(this,"outofrange",this.getextent()),n=jd(this,"inrange",this.option.range.slice()),o=[],r=0,a=0,s=n.length,l=i.length;l>a&&(!n.length||i[a]<=n[0]);a++)i[a]r;r++,h=0)h&&o.length&&e(n[r],"outofrange"),e(n[r],"inrange");for(var h=1;l>a;a++)(!n.length||n[n.length-1]r;r++){var a=t[0]+o*r;if(a>t[1])break;n.push({color:this.getcontrollervisual(a,"color",e),offset:r/i})}return n.push({color:this.getcontrollervisual(t[1],"color",e),offset:1}),n},_createbarpoints:function(t,e){var i=this.visualmapmodel.itemsize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createbargroup:function(t){var e=this._orient,i=this.visualmapmodel.get("inverse");return new wp("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-math.pi/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:math.pi/2})},_updatehandle:function(t,e){if(this._usehandle){var i=this._shapes,n=this.visualmapmodel,o=i.handlethumbs,r=i.handlelabels;fs([0,1],function(a){var s=o[a];s.setstyle("fill",e.handlescolor[a]),s.position[1]=t[a];var l=er(i.handlelabelpoints[a],rr(s,this.group));r[a].setstyle({x:l[0],y:l[1],text:n.formatvaluetext(this._datainterval[a]),textverticalalign:"middle",textalign:this._applytransform("horizontal"===this._orient?0===a?"bottom":"top":"left",i.bargroup)})},this)}},_showindicator:function(t,e,i,n){var o=this.visualmapmodel,r=o.getextent(),a=o.itemsize,s=[0,a[1]],l=ns(t,r,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setshape("points",tf(!!i,n,l,a[1]));var c={convertopacitytoalpha:!0},d=this.getcontrollervisual(t,"color",c);u.setstyle("fill",d);var f=er(h.indicatorlabelpoint,rr(u,this.group)),p=h.indicatorlabel;p.attr("invisible",!1);var g=this._applytransform("left",h.bargroup),v=this._orient;p.setstyle({text:(i?i:"")+o.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 i=t.visualmapmodel.itemsize,n=t._applytransform([e.offsetx,e.offsety],t._shapes.bargroup,!0,!0);n[1]=gs(hs(0,n[1]),i[1]),t._dohoverlinktoseries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearhoverlinktoseries()})},_enablehoverlinkfromseries:function(){var t=this.api.getzr();this.visualmapmodel.option.hoverlink?(t.on("mouseover",this._hoverlinkfromseriesmouseover,this),t.on("mouseout",this._hideindicator,this)):this._clearhoverlinkfromseries()},_dohoverlinktoseries:function(t,e){var i=this.visualmapmodel,n=i.itemsize;if(i.option.hoverlink){var o=[0,n[1]],r=i.getextent();t=gs(hs(o[0],t),o[1]);var a=ef(i,r,o),s=[t-a,t+a],l=ns(t,o,r,!0),h=[ns(s[0],o,r,!0),ns(s[1],o,r,!0)];s[0]o[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showindicator(l,h[1],"< ",a):1/0===h[1]?this._showindicator(l,h[0],"> ",a):this._showindicator(l,l,"≈ ",a));var u=this._hoverlinkdataindices,c=[];(e||nf(i))&&(c=this._hoverlinkdataindices=i.findtargetdataindices(h));var d=qr(u,c);this._dispatchhighdown("downplay",kd(d[0])),this._dispatchhighdown("highlight",kd(d[1]))}},_hoverlinkfromseriesmouseover:function(t){var e=t.target,i=this.visualmapmodel;if(e&&null!=e.dataindex){var n=this.ecmodel.getseriesbyindex(e.seriesindex);if(i.istargetseries(n)){var o=n.getdata(e.datatype),r=o.getdimension(i.getdatadimension(o)),a=o.get(r,e.dataindex,!0);isnan(a)||this._showindicator(a,a)}}},_hideindicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorlabel&&t.indicatorlabel.attr("invisible",!0)},_clearhoverlinktoseries:function(){this._hideindicator();var t=this._hoverlinkdataindices;this._dispatchhighdown("downplay",kd(t)),t.length=0},_clearhoverlinkfromseries:function(){this._hideindicator();var t=this.api.getzr();t.off("mouseover",this._hoverlinkfromseriesmouseover),t.off("mouseout",this._hideindicator)},_applytransform:function(t,e,i,n){var o=rr(e,n?null:this.group);return nm[_(t)?"applytransform":"transformdirection"](t,o,i)},_dispatchhighdown:function(t,e){e&&e.length&&this.api.dispatchaction({type:t,batch:e})},dispose:function(){this._clearhoverlinkfromseries(),this._clearhoverlinktoseries()},remove:function(){this._clearhoverlinkfromseries(),this._clearhoverlinktoseries()}}),xs={type:"selectdatarange",event:"datarangeselected",update:"update"};ws(xs,function(t,e){e.eachcomponent({maintype:"visualmap",query:t},function(e){e.setselected(t.selected)})}),ys(ms);{var qs=rs.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){qs.superapply(this,"optionupdated",arguments),this._piecelist=[],this.resetextent();var i=this._mode=this._determinemode();ys[this._mode].call(this),this._resetselected(t,e);var o=this.option.categories;this.resetvisual(function(t,e){"categories"===i?(t.mappingmethod="category",t.categories=n(o)):(t.dataextent=this.getextent(),t.mappingmethod="piecewise",t.piecelist=p(this._piecelist,function(t){var t=n(t);return"inrange"!==e&&(t.visual=null),t}))})},completevisualoption:function(){function t(t,e,i){return t&&t[e]&&(s(t[e])?t[e].hasownproperty(i):t[e]===i)}var e=this.option,i={},n=ws.listvisualtypes(),o=this.iscategory();f(e.pieces,function(t){f(n,function(e){t.hasownproperty(e)&&(i[e]=1)})}),f(i,function(i,n){var r=0;f(this.statelist,function(i){r|=t(e,i,n)||t(e.target,i,n)},this),!r&&f(this.statelist,function(t){(e[t]||(e[t]={}))[n]=is.get(n,"inrange"===t?"active":"inactive",o)})},this),rs.prototype.completevisualoption.apply(this,arguments)},_resetselected:function(t,e){var i=this.option,n=this._piecelist,o=(e?i:t).selected||{};if(i.selected=o,f(n,function(t){var e=this.getselectedmapkey(t);o.hasownproperty(e)||(o[e]=!0)},this),"single"===i.selectedmode){var r=!1;f(n,function(t){var e=this.getselectedmapkey(t);o[e]&&(r?o[e]=!1:r=!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=n(t)},getvaluestate:function(t){var e=ws.findpieceindex(t,this._piecelist);return null!=e&&this.option.selected[this.getselectedmapkey(this._piecelist[e])]?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(i){var n=[],o=i.getdata();o.each(this.getdatadimension(o),function(e,i){var o=ws.findpieceindex(e,this._piecelist);o===t&&n.push(i)},!0,this),e.push({seriesid:i.id,dataindex:n})},this),e},getrepresentvalue:function(t){var e;if(this.iscategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getvisualmeta:function(t){function e(e,r){var a=o.getrepresentvalue({interval:e});r||(r=o.getvaluestate(a));var s=t(a,r);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.iscategory()){var i=[],n=[],o=this,r=this._piecelist.slice();if(r.length){var a=r[0].interval[0];a!==-1/0&&r.unshift({interval:[-1/0,a]}),a=r[r.length-1].interval[1],1/0!==a&&r.push({interval:[a,1/0]})}else r.push({interval:[-1/0,1/0]});var s=-1/0;return f(r,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outofrange"),e(i.slice()),s=i[1])},this),{stops:i,outercolors:n}}}}),ys={splitnumber:function(){var t=this.option,e=this._piecelist,i=math.min(t.precision,20),n=this.getextent(),o=t.splitnumber;o=math.max(parseint(o,10),1),t.splitnumber=o;for(var r=(n[1]-n[0])/o;+r.tofixed(i)!==r&&5>i;)i++;t.precision=i,r=+r.tofixed(i);var a=0;t.minopen&&e.push({index:a++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=a+o;l>a;s+=r){var h=a===o-1?n[1]:s+r;e.push({index:a++,interval:[s,h],close:[1,1]})}t.maxopen&&e.push({index:a++,interval:[n[1],1/0],close:[0,0]}),un(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),rf(t,this._piecelist)},pieces:function(){var t=this.option,e=this._piecelist;f(t.pieces,function(t,i){s(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasownproperty("value")){var o=n.value=t.value;n.interval=[o,o],n.close=[1,1]}else{for(var r=n.interval=[],a=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],h=[],u=0;2>u;u++){for(var c=[["gte","gt","min"],["lte","lt","max"]][u],d=0;3>d&&null==r[u];d++)r[u]=t[c[d]],a[u]=s[d],h[u]=2===d;null==r[u]&&(r[u]=l[u])}h[0]&&1/0===r[1]&&(a[0]=0),h[1]&&r[0]===-1/0&&(a[1]=0),r[0]===r[1]&&a[0]&&a[1]&&(n.value=r[0])}n.visual=ws.retrievevisuals(t),e.push(n)},this),rf(t,e),un(e),f(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatvaluetext(null!=t.value?t.value:t.interval,!1,i)},this)}};vs.extend({type:"visualmap.piecewise",dorender:function(){function t(t){var o=t.piece,h=new wp;h.onclick=y(this._onitemclick,this,o),this._enablehoverlink(h,t.indexinmodelpiecelist);var u=i.getrepresentvalue(o);if(this._createitemsymbol(h,u,[0,0,l[0],l[1]]),c){var d=this.visualmapmodel.getvaluestate(u);h.add(new ov({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:o.text,textverticalalign:"middle",textalign:s,textfont:r,textfill:a,opacity:"outofrange"===d?.5:1}}))}e.add(h)}var e=this.group;e.removeall();var i=this.visualmapmodel,n=i.get("textgap"),o=i.textstylemodel,r=o.getfont(),a=o.gettextcolor(),s=this._getitemalign(),l=i.itemsize,h=this._getviewdata(),u=h.endstext,c=a(i.get("showlabel",!0),!u);u&&this._renderendstext(e,u[0],l,c,s),f(h.viewpiecelist,t,this),u&&this._renderendstext(e,u[1],l,c,s),xm(i.get("orient"),e,i.get("itemgap")),this.renderbackground(e),this.positiongroup(e)},_enablehoverlink:function(t,e){function i(t){var i=this.visualmapmodel;i.option.hoverlink&&this.api.dispatchaction({type:t,batch:kd(i.findtargetdataindices(e))})}t.on("mouseover",y(i,this,"highlight")).on("mouseout",y(i,this,"downplay"))},_getitemalign:function(){var t=this.visualmapmodel,e=t.option;if("vertical"===e.orient)return $d(t,this.api,t.itemsize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderendstext:function(t,e,i,n,o){if(e){var r=new wp,a=this.visualmapmodel.textstylemodel;r.add(new ov({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textverticalalign:"middle",textalign:n?o:"center",text:e,textfont:a.getfont(),textfill:a.gettextcolor()}})),t.add(r)}},_getviewdata:function(){var t=this.visualmapmodel,e=p(t.getpiecelist(),function(t,e){return{piece:t,indexinmodelpiecelist:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewpiecelist:e,endstext:i}},_createitemsymbol:function(t,e,i){t.add(cl(this.getcontrollervisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getcontrollervisual(e,"color")))},_onitemclick:function(t){var e=this.visualmapmodel,i=e.option,o=n(i.selected),r=e.getselectedmapkey(t);"single"===i.selectedmode?(o[r]=!0,f(o,function(t,e){o[e]=e===r})):o[r]=!o[r],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:o})}})}ys(ms),ys(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 js=as({type:"graphic",defaultoption:{elements:[],parentid:null},_eloptionstoupdate:null,mergeoption:function(){var t=this.option.elements;this.option.elements=null,js.superapply(this,"mergeoption",arguments),this.option.elements=t},optionupdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,r=[];this._flatten(n,r);var a=$r(o,r);kr(a);var s=this._eloptionstoupdate=[];f(a,function(t,e){var i=t.option;i&&(s.push(i),uf(t,i),cf(o,e,i),df(o[e],i))},this);for(var l=o.length-1;l>=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){f(t,function(t){if(t){i&&(t.parentoption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useeloptionstoupdate:function(){var t=this._eloptionstoupdate;return this._eloptionstoupdate=null,t}});cs({type:"graphic",init:function(){this._elmap=e(),this._lastgraphicmodel},render:function(t,e,i){t!==this._lastgraphicmodel&&this._clear(),this._lastgraphicmodel=t,this._updateelements(t,i),this._relocate(t,i)},_updateelements:function(t){var e=t.useeloptionstoupdate();if(e){var i=this._elmap,n=this.group;f(e,function(t){var e=t.$action,o=t.id,r=i.get(o),a=t.parentid,s=null!=a?i.get(a):n;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textverticalalign=l.textbaseline=null),!l.hasownproperty("textfill")&&l.fill&&(l.textfill=l.fill),!l.hasownproperty("textstroke")&&l.stroke&&(l.textstroke=l.stroke)}var h=lf(t);e&&"merge"!==e?"replace"===e?(sf(r,i),af(o,s,h,i)):"remove"===e&&sf(r,i):r?r.attr(h):af(o,s,h,i);var u=i.get(o);u&&(u.__ecgraphicwidth=t.width,u.__ecgraphicheight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elmap,r=i.length-1;r>=0;r--){var a=i[r],s=o.get(a.id);if(s){var l=s.parent,h=l===n?{width:e.getwidth(),height:e.getheight()}:{width:l.__ecgraphicwidth||0,height:l.__ecgraphicheight||0};ca(s,a,h,null,{hv:a.hv,boundingmode:a.bounding})}}},_clear:function(){var t=this._elmap;t.each(function(e){sf(e,t)}),this._elmap=e()},dispose:function(){this._clear()}}),t.version=sy,t.dependencies=ly,t.priority=vy,t.init=cs,t.connect=ds,t.disconnect=fs,t.disconnect=vy,t.dispose=ps,t.getinstancebydom=gs,t.getinstancebyid=vs,t.registertheme=ms,t.registerpreprocessor=ys,t.registerprocessor=xs,t.registerpostupdate=_s,t.registeraction=ws,t.registercoordinatesystem=bs,t.getcoordinatesystemdimensions=ss,t.registerlayout=ms,t.registervisual=is,t.registerloading=ts,t.extendcomponentmodel=as,t.extendcomponentview=cs,t.extendseriesmodel=ds,t.extendchartview=ls,t.setcanvascreator=ps,t.registermap=ks,t.getmap=os,t.datatool=ny,t.zrender=dg,t.graphic=nm,t.number=vg,t.format=sg,t.throttle=ha,t.helper=ox,t.matrix=uf,t.vector=vf,t.color=lp,t.util=nx,t.list=uy,t.model=hr,t.axis=ex,t.env=vf,t.parsegeojson=vx});