!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.]+)/),a=t.match(/msie\s([\d.]+)/)||t.match(/trident\/.+?rv:(([\d.]+))/),o=t.match(/edge\/([\d.]+)/),r=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),a&&(i.ie=!0,i.version=a[1]),o&&(i.edge=!0,i.version=o[1]),r&&(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),domsupported:"undefined"!=typeof document}}function i(t,e){"createcanvas"===t&&(vs=null),zs[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=ls.call(t);if("[object array]"===i){if(!r(t)){e=[];for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}else if(cs[i]){if(!r(t)){var r=t.constructor;if(t.constructor.from)e=r.from(t);else{e=new r(t.length);for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}}else if(!ds[i]&&!r(t)&&!t(t)){e={};for(var s in t)t.hasownproperty(s)&&(e[s]=n(t[s]))}return e}function a(t,e,i){if(!s(e)||!s(t))return i?n(e):t;for(var o in e)if(e.hasownproperty(o)){var r=t[o],s=e[o];!s(s)||!s(r)||_(s)||_(r)||t(s)||t(r)||m(s)||m(r)||r(s)||r(r)?!i&&o in t||(t[o]=n(e[o],!0)):a(r,s,i)}return t}function o(t,e){for(var i=t[0],n=1,o=t.length;o>n;n++)i=a(i,t[n],e);return i}function r(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 vs||(vs=bs().getcontext("2d")),vs}function u(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 h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var a in n)n.hasownproperty(a)&&(t.prototype[a]=n[a]);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===ps)t.foreach(e,i);else if(t.length===+t.length)for(var n=0,a=t.length;a>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasownproperty(o)&&e.call(i,t[o],o,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===ns)return t.map(e,i);for(var n=[],a=0,o=t.length;o>a;a++)n.push(e.call(i,t[a],a,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===rs)return t.reduce(e,i,n);for(var a=0,o=t.length;o>a;a++)i=e.call(n,i,t[a],a,t);return i}}function m(t,e,i){if(t&&e){if(t.filter&&t.filter===os)return t.filter(e,i);for(var n=[],a=0,o=t.length;o>a;a++)e.call(i,t[a],a,t)&&n.push(t[a]);return n}}function v(t,e,i){if(t&&e)for(var n=0,a=t.length;a>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=es.call(arguments,2);return function(){return t.apply(e,i.concat(es.call(arguments)))}}function x(t){var e=es.call(arguments,1);return function(){return t.apply(this,e.concat(es.call(arguments)))}}function _(t){return"[object array]"===ls.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object string]"===ls.call(t)}function s(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function m(t){return!!ds[ls.call(t)]}function i(t){return!!cs[ls.call(t)]}function t(t){return"object"==typeof t&&"number"==typeof t.nodetype&&"object"==typeof t.ownerdocument}function a(t){return t!==t}function d(){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 l(t,e,i){return null!=t?t:null!=e?e:i}function k(){return function.call.apply(es,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 o(t,e){if(!t)throw new error(e)}function e(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\ufeff\xa0]+|[\s\ufeff\xa0]+$/g,"")}function n(t){t[gs]=!0}function r(t){return t[gs]}function z(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=_(t);this.data={};var n=this;t instanceof z?t.each(e):t&&f(t,e)}function b(t){return new z(t)}function v(t,e){for(var i=new t.constructor(t.length+e.length),n=0;nd;d++){var p=1<r;r++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((r+s)%2?-1:1)*de(i,7,0===r?1:0,1<o;o++){var r=document.createelement("div"),s=r.style,l=o%2,u=(o>>1)%2;s.csstext=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),t.appendchild(r),i.push(r)}return i}function ve(t,e,i){for(var n=i?"invtrans":"trans",a=e[n],o=e.srccoords,r=!0,s=[],l=[],u=0;4>u;u++){var h=t[u].getboundingclientrect(),c=2*u,d=h.left,f=h.top;s.push(d,f),r=r&&o&&d===o[c]&&f===o[c+1],l.push(t[u].offsetleft,t[u].offsettop)}return r&&a?a:(e.srccoords=s,e[n]=i?fe(l,s):fe(s,l))}function ye(t){return"canvas"===t.nodename.touppercase()}function xe(t,e,i,n){return i=i||{},n||!as.canvassupported?_e(t,e,i):as.browser.firefox&&null!=e.layerx&&e.layerx!==e.offsetx?(i.zrx=e.layerx,i.zry=e.layery):null!=e.offsetx?(i.zrx=e.offsetx,i.zry=e.offsety):_e(t,e,i),i}function _e(t,e,i){if(as.domsupported&&t.getboundingclientrect){var n=e.clientx,a=e.clienty;if(ye(t)){var o=t.getboundingclientrect();return i.zrx=n-o.left,void(i.zry=a-o.top)}if(ge(em,t,n,a))return i.zrx=em[0],void(i.zry=em[1])}i.zrx=i.zry=0}function we(t){return t||window.event}function be(t,e,i){if(e=we(e),null!=e.zrx)return e;var n=e.type,a=n&&n.indexof("touch")>=0;if(a){var o="touchend"!==n?e.targettouches[0]:e.changedtouches[0];o&&xe(t,o,e,i)}else xe(t,e,e,i),e.zrdelta=e.wheeldelta?e.wheeldelta/120:-(e.detail||0)/3;var r=e.button;return null==e.which&&void 0!==r&&tm.test(e.type)&&(e.which=1&r?1:2&r?3:4&r?2:0),e}function se(t,e,i,n){qs?t.addeventlistener(e,i,n):t.attachevent("on"+e,i)}function me(t,e,i,n){qs?t.removeeventlistener(e,i,n):t.detachevent("on"+e,i)}function ie(t){return 2===t.which||3===t.which}function te(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return math.sqrt(e*e+i*i)}function ae(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function de(t,e,i){return{type:t,event:i,target:e.target,toptarget:e.toptarget,cancelbubble:!1,offsetx:i.zrx,offsety:i.zry,gestureevent:i.gestureevent,pinchx:i.pinchx,pinchy:i.pinchy,pinchscale:i.pinchscale,wheeldelta:i.zrdelta,zrbytouch:i.zrbytouch,which:i.which,stop:ce}}function ce(){im(this.event)}function le(){}function ke(t,e,i){if(t[t.recthover?"rectcontain":"contain"](e,i)){for(var n,a=t;a;){if(a.clippath&&!a.clippath.contain(e,i))return!1;a.silent&&(n=!0),a=a.parent}return n?om:!0}return!1}function pe(t,e,i){var n=t.painter;return 0>e||e>n.getwidth()||0>i||i>n.getheight()}function oe(){var t=new lm(6);return ee(t),t}function ee(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ne(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 re(t,e,i){var n=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=a,t[2]=o,t[3]=r,t[4]=s,t[5]=l,t}function ze(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 be(t,e,i){var n=e[0],a=e[2],o=e[4],r=e[1],s=e[3],l=e[5],u=math.sin(i),h=math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=a*h+s*u,t[3]=-a*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function ve(t,e,i){var n=i[0],a=i[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t}function ge(t,e){var i=e[0],n=e[2],a=e[4],o=e[1],r=e[3],s=e[5],l=i*r-o*n;return l?(l=1/l,t[0]=r*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*a)*l,t[5]=(o*a-i*s)*l,t):null}function fe(t){var e=oe();return ne(e,t),e}function we(t){return t>cm||-cm>t}function he(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 ze(t){return t=math.round(t),0>t?0:t>255?255:t}function ue(t){return t=math.round(t),0>t?0:t>360?360:t}function xe(t){return 0>t?0:t>1?1:t}function ye(t){return ze(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100*255:parseint(t,10))}function je(t){return xe(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100:parsefloat(t))}function qe(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 ke(t,e,i){return t+(e-t)*i}function $e(t,e,i,n,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=a,t}function je(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function qe(t,e){im&&je(im,e),im=mm.put(t,im||e.slice())}function ti(t,e){if(t){e=e||[];var i=mm.get(t);if(i)return je(e,i);t+="";var n=t.replace(/ /g,"").tolowercase();if(n in sm)return je(e,sm[n]),qe(t,e),e;if("#"!==n.charat(0)){var a=n.indexof("("),o=n.indexof(")");if(-1!==a&&o+1===n.length){var r=n.substr(0,a),s=n.substr(a+1,o-(a+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void $e(e,0,0,0,1);l=je(s.pop());case"rgb":return 3!==s.length?void $e(e,0,0,0,1):($e(e,ye(s[0]),ye(s[1]),ye(s[2]),l),qe(t,e),e);case"hsla":return 4!==s.length?void $e(e,0,0,0,1):(s[3]=je(s[3]),ei(s,e),qe(t,e),e);case"hsl":return 3!==s.length?void $e(e,0,0,0,1):(ei(s,e),qe(t,e),e);default:return}}$e(e,0,0,0,1)}else{if(4===n.length){var u=parseint(n.substr(1),16);return u>=0&&4095>=u?($e(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),qe(t,e),e):void $e(e,0,0,0,1)}if(7===n.length){var u=parseint(n.substr(1),16);return u>=0&&16777215>=u?($e(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),qe(t,e),e):void $e(e,0,0,0,1)}}}}function ei(t,e){var i=(parsefloat(t[0])%360+360)%360/360,n=je(t[1]),a=je(t[2]),o=.5>=a?a*(n+1):a+n-a*n,r=2*a-o;return e=e||[],$e(e,ze(255*qe(r,o,i+1/3)),ze(255*qe(r,o,i)),ze(255*qe(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ii(t){if(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=math.min(n,a,o),s=math.max(n,a,o),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=.5>u?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:a===s?e=1/3+h-d:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function ni(t,e){var i=ti(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,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return ui(i,4===i.length?"rgba":"rgb")}}function ai(t){var e=ti(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1):void 0}function oi(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),a=math.floor(n),o=math.ceil(n),r=e[a],s=e[o],l=n-a;return i[0]=ze(ke(r[0],s[0],l)),i[1]=ze(ke(r[1],s[1],l)),i[2]=ze(ke(r[2],s[2],l)),i[3]=xe(ke(r[3],s[3],l)),i}}function ri(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),a=math.floor(n),o=math.ceil(n),r=ti(e[a]),s=ti(e[o]),l=n-a,u=ui([ze(ke(r[0],s[0],l)),ze(ke(r[1],s[1],l)),ze(ke(r[2],s[2],l)),xe(ke(r[3],s[3],l))],"rgba");return i?{color:u,leftindex:a,rightindex:o,value:n}:u}}function si(t,e,i,n){return t=ti(t),t?(t=ii(t),null!=e&&(t[0]=ue(e)),null!=i&&(t[1]=je(i)),null!=n&&(t[2]=je(n)),ui(ei(t),"rgba")):void 0}function li(t,e){return t=ti(t),t&&null!=e?(t[3]=xe(e),ui(t,"rgba")):void 0}function ui(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 hi(t,e){return t[e]}function ci(t,e,i){t[e]=i}function di(t,e,i){return(e-t)*i+t}function fi(t,e,i){return i>.5?e:t}function pi(t,e,i,n,a){var o=t.length;if(1===a)for(var r=0;o>r;r++)n[r]=di(t[r],e[r],i);else for(var s=o&&t[0].length,r=0;o>r;r++)for(var l=0;s>l;l++)n[r][l]=di(t[r][l],e[r][l],i)}function gi(t,e,i){var n=t.length,a=e.length;if(n!==a){var o=n>a;if(o)t.length=a;else for(var r=n;a>r;r++)t.push(1===i?e[r]:cm.call(e[r]))}for(var s=t[0]&&t[0].length,r=0;rl;l++)isnan(t[r][l])&&(t[r][l]=e[r][l])}function mi(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var a=0;n>a;a++)if(t[a]!==e[a])return!1}else for(var o=t[0].length,a=0;n>a;a++)for(var r=0;o>r;r++)if(t[a][r]!==e[a][r])return!1;return!0}function vi(t,e,i,n,a,o,r,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=yi(t[h],e[h],i[h],n[h],a,o,r);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=yi(t[h][d],e[h][d],i[h][d],n[h][d],a,o,r)}function yi(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function xi(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(cm.call(t[n]));return i}return cm.call(t)}return t}function _i(t){return t[0]=math.floor(t[0]),t[1]=math.floor(t[1]),t[2]=math.floor(t[2]),"rgba("+t.join(",")+")"}function wi(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function bi(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,f=d(c),p=!1,g=!1,m=f?wi(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var v=[],y=[],x=n[0].value,_=!0,w=0;u>w;w++){v.push(n[w].time/h);var b=n[w].value;if(f&&mi(b,x,m)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var s=ti(b);s?(b=s,p=!0):g=!0}y.push(b)}if(o||!_){for(var m=y[u-1],w=0;u-1>w;w++)f?gi(y[w],m,m):!isnan(y[w])||isnan(m)||g||p||(y[w]=m);f&&gi(r(t._target,a),m,m);var i,t,a,d,c,l,k=0,p=0;if(p)var o=[0,0,0,0];var e=function(t,e){var i;if(0>e)i=0;else if(p>e){for(i=math.min(k+1,u-1),i=i;i>=0&&!(v[i]<=e);i--);i=math.min(i,u-2)}else{for(i=k;u>i&&!(v[i]>e);i++);i=math.min(i-1,u-2)}k=i,p=e;var n=v[i+1]-v[i];if(0!==n)if(t=(e-v[i])/n,l)if(d=y[i],a=y[0===i?i:i-1],c=y[i>u-2?u-1:i+1],l=y[i>u-3?u-1:i+2],f)vi(a,d,c,l,t,t*t,t*t*t,r(t,a),m);else{var o;if(p)o=vi(a,d,c,l,t,t*t,t*t*t,o,1),o=_i(o);else{if(g)return fi(d,c,t);o=yi(a,d,c,l,t,t*t,t*t*t)}s(t,a,o)}else if(f)pi(y[i],y[i+1],t,r(t,a),m);else{var o;if(p)pi(y[i],y[i+1],t,o,1),o=_i(o);else{if(g)return fi(y[i],y[i+1],t);o=di(y[i],y[i+1],t)}s(t,a,o)}},n=new he({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:e,ondestroy:i});return e&&"spline"!==e&&(n.easing=e),n}}}function si(t,e,i,n,a,o,r,s){function l(){h--,h||o&&o()}b(n)?(o=a,a=n,n=0):w(a)?(o=a,a="linear",n=0):w(n)?(o=n,n=0):w(i)?(o=i,i=500):i||(i=500),t.stopanimation(),mi(t,"",t,e,i,n,s);var u=t.animators.slice(),h=u.length;h||o&&o();for(var c=0;c0&&t.animate(e,!1).when(null==a?500:a,s).delay(o||0)}function ii(t,e,i,n){if(e){var a={};a[e]={},a[e][i]=n,t.attr(a)}else t.attr(i,n)}function ti(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 ai(t){for(var e=0;t>=wm;)e|=1&t,t>>=1;return t+e}function di(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;ci(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function ci(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function li(t,e,i,n,a){for(n===e&&n++;i>n;n++){for(var o,r=t[n],s=e,l=n;l>s;)o=s+l>>>1,a(r,t[o])<0?l=o:s=o+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ki(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])>0){for(s=n-a;s>l&&o(t,e[i+a+l])>0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),r+=a,l+=a}else{for(s=a+1;s>l&&o(t,e[i+a-l])<=0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=r;r=a-l,l=a-u}for(r++;l>r;){var h=r+(l-r>>>1);o(t,e[i+h])>0?r=h+1:l=h}return l}function pi(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])<0){for(s=a+1;s>l&&o(t,e[i+a-l])<0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=r;r=a-l,l=a-u}else{for(s=n-a;s>l&&o(t,e[i+a+l])>=0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),r+=a,l+=a}for(r++;l>r;){var h=r+(l-r>>>1);o(t,e[i+h])<0?l=h:r=h+1}return l}function oi(t,e){function i(t,e){l[c]=t,u[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]u[t+1])break;o(t)}}function a(){for(;c>1;){var t=c-2;t>0&&u[t-1]=a?r(n,a,o,h):s(n,a,o,h)))}function r(i,n,a,o){var r=0;for(r=0;n>r;r++)d[r]=t[i+r];var s=0,l=a,u=i;if(t[u++]=t[l++],0!==--o){if(1===n){for(r=0;o>r;r++)t[u+r]=t[l+r];return void(t[u+o]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--o){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=pi(t[l],d,s,n,0,e),0!==c){for(r=0;c>r;r++)t[u+r]=d[s+r];if(u+=c,s+=c,n-=c,1>=n){p=!0;break}}if(t[u++]=t[l++],0===--o){p=!0;break}if(f=ki(d[s],t,l,o,0,e),0!==f){for(r=0;f>r;r++)t[u+r]=t[l+r];if(u+=f,l+=f,o-=f,0===o){p=!0;break}}if(t[u++]=d[s++],1===--n){p=!0;break}g--}while(c>=hm||f>=hm);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===n){for(r=0;o>r;r++)t[u+r]=t[l+r];t[u+o]=d[s]}else{if(0===n)throw new error;for(r=0;n>r;r++)t[u+r]=d[s+r]}}else for(r=0;n>r;r++)t[u+r]=d[s+r]}function s(i,n,a,o){var r=0;for(r=0;o>r;r++)d[r]=t[a+r];var s=i+n-1,l=o-1,u=a+o-1,c=0,f=0;if(t[u--]=t[s--],0!==--n){if(1===o){for(u-=n,s-=n,f=u+1,c=s+1,r=n-1;r>=0;r--)t[f+r]=t[c+r];return void(t[u]=d[l])}for(var p=h;;){var g=0,m=0,v=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,m=0,0===--n){v=!0;break}}else if(t[u--]=d[l--],m++,g=0,1===--o){v=!0;break}while(p>(g|m));if(v)break;do{if(g=n-pi(d[l],t,i,n,n-1,e),0!==g){for(u-=g,s-=g,n-=g,f=u+1,c=s+1,r=g-1;r>=0;r--)t[f+r]=t[c+r];if(0===n){v=!0;break}}if(t[u--]=d[l--],1===--o){v=!0;break}if(m=o-ki(t[s],d,0,o,o-1,e),0!==m){for(u-=m,l-=m,o-=m,f=u+1,c=l+1,r=0;m>r;r++)t[f+r]=d[c+r];if(1>=o){v=!0;break}}if(t[u--]=t[s--],0===--n){v=!0;break}p--}while(g>=hm||m>=hm);if(v)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===o){for(u-=n,s-=n,f=u+1,c=s+1,r=n-1;r>=0;r--)t[f+r]=t[c+r];t[u]=d[l]}else{if(0===o)throw new error;for(c=u-(o-1),r=0;o>r;r++)t[c+r]=d[r]}}else for(c=u-(o-1),r=0;o>r;r++)t[c+r]=d[r]}var l,u,h=hm,c=0,d=[];l=[],u=[],this.mergeruns=n,this.forcemergeruns=a,this.pushrun=i}function ei(t,e,i,n){i||(i=0),n||(n=t.length);var a=n-i;if(!(2>a)){var o=0;if(wm>a)return o=di(t,i,n,e),void li(t,i,n,i+o,e);var r=new oi(t,e),s=ai(a);do{if(o=di(t,i,n,e),s>o){var l=a;l>s&&(l=s),li(t,i,i+l,i+o,e),o=l}r.pushrun(i,o),r.mergeruns(),a-=o,i+=o}while(0!==a);r.forcemergeruns()}}function ni(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function ri(t,e,i){var n=null==e.x?0:e.x,a=null==e.x2?1:e.x2,o=null==e.y?0:e.y,r=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,a=a*i.width+i.x,o=o*i.height+i.y,r=r*i.height+i.y),n=isnan(n)?0:n,a=isnan(a)?1:a,o=isnan(o)?0:o,r=isnan(r)?0:r;var s=t.createlineargradient(n,o,a,r);return s}function zi(t,e,i){var n=i.width,a=i.height,o=math.min(n,a),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(r=r*n+i.x,s=s*a+i.y,l*=o);var u=t.createradialgradient(r,s,0,r,s,l);return u}function bi(){return!1}function vi(t,e,i){var n=bs(),a=e.getwidth(),o=e.getheight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=a+"px",r.height=o+"px",n.setattribute("data-zr-dom-id",t)),n.width=a*i,n.height=o*i,n}function gi(t){if("string"==typeof t){var e=ni.get(t);return e&&e.image}return t}function fi(t,e,i,n,a){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!i)return e;var o=ni.get(t),r={hostel:i,cb:n,cbpayload:a};return o?(e=o.image,!hi(e)&&o.pending.push(r)):(e=new image,e.onload=e.onerror=wi,ni.put(t,e.__cachedimgobj={image:e,pending:[r]}),e.src=e.__zrimagesrc=t),e}return t}return e}function wi(){var t=this.__cachedimgobj;this.onload=this.onerror=this.__cachedimgobj=null;for(var e=0;eo;o++)a=math.max(an(n[o],e).width,a);return oi>ri&&(oi=0,ai={}),oi++,ai[i]=a,a}function xi(t,e,i,n,a,o,r,s){return r?ji(t,e,i,n,a,o,r,s):yi(t,e,i,n,a,o,s)}function yi(t,e,i,n,a,o,r){var s=on(t,e,a,o,r),l=ui(t,e);a&&(l+=a[1]+a[3]);var u=s.outerheight,h=qi(0,l,i),c=ki(0,u,n),d=new ti(h,c,l,u);return d.lineheight=s.lineheight,d}function ji(t,e,i,n,a,o,r,s){var l=rn(t,{rich:r,truncate:s,font:e,textalign:i,textpadding:a,textlineheight:o}),u=l.outerwidth,h=l.outerheight,c=qi(0,u,i),d=ki(0,h,n);return new ti(c,d,u,h)}function qi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function ki(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function $i(t,e,i){var n=e.textposition,a=e.textdistance,o=i.x,r=i.y;a=a||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":o-=a,r+=u,h="right",c="middle";break;case"right":o+=a+l,r+=u,c="middle";break;case"top":o+=l/2,r-=a,h="center",c="bottom";break;case"bottom":o+=l/2,r+=s+a,h="center";break;case"inside":o+=l/2,r+=u,h="center",c="middle";break;case"insideleft":o+=a,r+=u,c="middle";break;case"insideright":o+=l-a,r+=u,h="right",c="middle";break;case"insidetop":o+=l/2,r+=a,h="center";break;case"insidebottom":o+=l/2,r+=s-a,h="center",c="bottom";break;case"insidetopleft":o+=a,r+=a;break;case"insidetopright":o+=l-a,r+=a,h="right";break;case"insidebottomleft":o+=a,r+=s-a,c="bottom";break;case"insidebottomright":o+=l-a,r+=s-a,h="right",c="bottom"}return t=t||{},t.x=o,t.y=r,t.textalign=h,t.textverticalalign=c,t}function ji(t,e,i,n,a){if(!e)return"";var o=(t+"").split("\n");a=qi(e,i,n,a);for(var r=0,s=o.length;s>r;r++)o[r]=tn(o[r],a);return o.join("\n")}function qi(t,e,i,n){n=r({},n),n.font=e;var i=c(i,"...");n.maxiterations=c(n.maxiterations,2);var a=n.minchar=c(n.minchar,0);n.cncharwidth=ui("国",e);var o=n.asccharwidth=ui("a",e);n.placeholder=c(n.placeholder,"");for(var s=t=math.max(0,t-1),l=0;a>l&&s>=o;l++)s-=o;var u=ui(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsiswidth=u,n.contentwidth=s,n.containerwidth=t,n}function tn(t,e){var i=e.containerwidth,n=e.font,a=e.contentwidth;if(!i)return"";var o=ui(t,n);if(i>=o)return t;for(var r=0;;r++){if(a>=o||r>=e.maxiterations){t+=e.ellipsis;break}var s=0===r?en(t,a,e.asccharwidth,e.cncharwidth):o>0?math.floor(t.length*a/o):0;t=t.substr(0,s),o=ui(t,n)}return""===t&&(t=e.placeholder),t}function en(t,e,i,n){for(var a=0,o=0,r=t.length;r>o&&e>a;o++){var s=t.charcodeat(o);a+=s>=0&&127>=s?i:n}return o}function nn(t){return ui("国",t)}function an(t,e){return ui.measuretext(t,e)}function on(t,e,i,n,a){null!=t&&(t+="");var o=c(n,nn(e)),r=t?t.split("\n"):[],s=r.length*o,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&a){u=!1;var h=a.outerheight,c=a.outerwidth;if(null!=h&&l>h)t="",r=[];else if(null!=c)for(var d=qi(c-(i?i[1]+i[3]:0),e,a.ellipsis,{minchar:a.minchar,placeholder:a.placeholder}),f=0,p=r.length;p>f;f++)r[f]=tn(r[f],d)}return{lines:r,height:s,outerheight:l,lineheight:o,cancachebytextstring:u}}function rn(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,a=si.lastindex=0;null!=(n=si.exec(t));){var o=n.index;o>a&&sn(i,t.substring(a,o)),sn(i,n[2],n[1]),a=si.lastindex}af)return{lines:[],width:0,height:0};x.textwidth=ui(x.text,b);var m=_.textwidth,i=null==m||"auto"===m;if("string"==typeof m&&"%"===m.charat(m.length-1))x.percentwidth=m,u.push(x),m=0;else{if(i){m=x.textwidth;var t=_.textbackgroundcolor,a=t&&t.image;a&&(a=gi(a),hi(a)&&(m=math.max(m,a.width*s/a.height)))}var d=w?w[1]+w[3]:0;m+=d;var k=null!=d?d-v:null;null!=k&&m>k&&(!i||d>k?(x.text="",x.textwidth=m=0):(x.text=ji(x.text,k-d,b,c.ellipsis,{minchar:c.minchar}),x.textwidth=ui(x.text,b),m=x.textwidth+d))}v+=x.width=m,_&&(m=math.max(m,x.lineheight))}g.width=v,g.lineheight=m,s+=m,l=math.max(l,v)}i.outerwidth=i.width=c(e.textwidth,l),i.outerheight=i.height=c(e.textheight,s),h&&(i.outerwidth+=h[1]+h[3],i.outerheight+=h[0]+h[2]);for(var p=0;pl&&(r+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?i=n=a=o=h:h instanceof array?1===h.length?i=n=a=o=h[0]:2===h.length?(i=a=h[0],n=o=h[1]):3===h.length?(i=h[0],n=o=h[1],a=h[2]):(i=h[0],n=h[1],a=h[2],o=h[3]):i=n=a=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),a+o>l&&(c=a+o,a*=l/c,o*=l/c),n+a>u&&(c=n+a,n*=u/c,a*=u/c),i+o>u&&(c=i+o,i*=u/c,o*=u/c),t.moveto(r+i,s),t.lineto(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-math.pi/2,0),t.lineto(r+l,s+u-a),0!==a&&t.arc(r+l-a,s+u-a,a,0,math.pi/2),t.lineto(r+o,s+u),0!==o&&t.arc(r+o,s+u-o,o,math.pi/2,math.pi),t.lineto(r,s+i),0!==i&&t.arc(r+i,s+i,i,math.pi,1.5*math.pi)}function hn(t){return cn(t),f(t.rich,cn),t}function cn(t){if(t){t.font=ln(t);var e=t.textalign;"middle"===e&&(e="center"),t.textalign=null==e||ci[e]?e:"left";var i=t.textverticalalign||t.textbaseline;"center"===i&&(i="middle"),t.textverticalalign=null==i||di[i]?i:"top";var n=t.textpadding;n&&(t.textpadding=p(t.textpadding))}}function dn(t,e,i,n,a,o){n.rich?pn(t,e,i,n,a,o):fn(t,e,i,n,a,o)}function fn(t,e,i,n,a,o){var r,s=yn(n),l=!1,u=e.__attrcachedby===ym.plain_text;o!==jm?(o&&(r=o.style,l=!s&&u&&r),e.__attrcachedby=s?ym.none:ym.plain_text):u&&(e.__attrcachedby=ym.none);var h=n.font||hi;l&&h===(r.font||hi)||(e.font=h);var c=t.__computedfont;t.__stylefont!==h&&(t.__stylefont=h,c=t.__computedfont=e.font);var d=n.textpadding,f=n.textlineheight,p=t.__textcotentblock;(!p||t.__dirtytext)&&(p=t.__textcotentblock=on(i,c,d,f,n.truncate));var g=p.outerheight,m=p.lines,v=p.lineheight,y=wn(gi,t,n,a),x=y.basex,_=y.basey,w=y.textalign||"left",b=y.textverticalalign;mn(e,n,a,x,_);var s=ki(_,g,b),m=x,i=s;if(s||d){var t=ui(i,c),a=t;d&&(a+=d[1]+d[3]);var d=qi(x,a,w);s&&xn(t,e,n,d,s,a,g),d&&(m=tn(x,w,d),i+=d[0])}e.textalign=w,e.textbaseline="middle",e.globalalpha=n.opacity||1;for(var c=0;ct&&(_=b[t],!_.textalign||"left"===_.textalign);)vn(t,e,_,n,m,v,a,"left"),i-=_.width,a+=_.width,t++;for(;c>=0&&(_=b[c],"right"===_.textalign);)vn(t,e,_,n,m,v,d,"right"),i-=_.width,d-=_.width,c--;for(a+=(o-(a-m)-(y-d)-i)/2;c>=t;)_=b[t],vn(t,e,_,n,m,v,a+_.width/2,"center"),a+=_.width,t++;v+=m}}function mn(t,e,i,n,a){if(i&&e.textrotation){var o=e.textorigin;"center"===o?(n=i.width/2+i.x,a=i.height/2+i.y):o&&(n=o[0]+i.x,a=o[1]+i.y),t.translate(n,a),t.rotate(-e.textrotation),t.translate(-n,-a)}}function vn(t,e,i,n,a,o,r,s){var l=n.rich[i.stylename]||{}; l.text=i.text;var u=i.textverticalalign,h=o+a/2;"top"===u?h=o+i.height/2:"bottom"===u&&(h=o+a-i.height/2),!i.islineholder&&yn(l)&&xn(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textpadding;c&&(r=tn(r,s,c),h-=i.height/2-c[2]-i.textheight/2),bn(e,"shadowblur",l(l.textshadowblur,n.textshadowblur,0)),bn(e,"shadowcolor",l.textshadowcolor||n.textshadowcolor||"transparent"),bn(e,"shadowoffsetx",l(l.textshadowoffsetx,n.textshadowoffsetx,0)),bn(e,"shadowoffsety",l(l.textshadowoffsety,n.textshadowoffsety,0)),bn(e,"textalign",s),bn(e,"textbaseline","middle"),bn(e,"font",i.font||hi);var d=sn(l.textstroke||n.textstroke,p),f=mn(l.textfill||n.textfill),p=c(l.textstrokewidth,n.textstrokewidth);d&&(bn(e,"linewidth",p),bn(e,"strokestyle",d),e.stroketext(i.text,r,h)),f&&(bn(e,"fillstyle",f),e.filltext(i.text,r,h))}function yn(t){return!!(t.textbackgroundcolor||t.textborderwidth&&t.textbordercolor)}function xn(t,e,i,n,a,o,r){var s=i.textbackgroundcolor,l=i.textborderwidth,u=i.textbordercolor,h=b(s);if(bn(e,"shadowblur",i.textboxshadowblur||0),bn(e,"shadowcolor",i.textboxshadowcolor||"transparent"),bn(e,"shadowoffsetx",i.textboxshadowoffsetx||0),bn(e,"shadowoffsety",i.textboxshadowoffsety||0),h||l&&u){e.beginpath();var c=i.textborderradius;c?un(e,{x:n,y:a,width:o,height:r,r:c}):e.rect(n,a,o,r),e.closepath()}if(h)if(bn(e,"fillstyle",s),null!=i.fillopacity){var d=e.globalalpha;e.globalalpha=i.fillopacity*i.opacity,e.fill(),e.globalalpha=d}else e.fill();else if(s(s)){var f=s.image;f=fi(f,null,t,_n,s),f&&hi(f)&&e.drawimage(f,n,a,o,r)}if(l&&u)if(bn(e,"linewidth",l),bn(e,"strokestyle",u),null!=i.strokeopacity){var d=e.globalalpha;e.globalalpha=i.strokeopacity*i.opacity,e.stroke(),e.globalalpha=d}else e.stroke()}function _n(t,e){e.image=t}function wn(t,e,i,n){var a=i.x||0,o=i.y||0,r=i.textalign,s=i.textverticalalign;if(n){var l=i.textposition;if(l instanceof array)a=n.x+in(l[0],n.width),o=n.y+in(l[1],n.height);else{var u=e&&e.calculatetextposition?e.calculatetextposition(pi,i,n):$i(pi,i,n);a=u.x,o=u.y,r=r||u.textalign,s=s||u.textverticalalign}var h=i.textoffset;h&&(a+=h[0],o+=h[1])}return t=t||{},t.basex=a,t.basey=o,t.textalign=r,t.textverticalalign=s,t}function bn(t,e,i){return t[e]=xm(t,e,i),t[e]}function sn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorstops?"#000":t}function mn(t){return null==t||"none"===t?null:t.image||t.colorstops?"#000":t}function in(t,e){return"string"==typeof t?t.lastindexof("%")>=0?parsefloat(t)/100*e:parsefloat(t):t}function tn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function an(t,e){return null!=t&&(t||e.textbackgroundcolor||e.textborderwidth&&e.textbordercolor||e.textpadding)}function dn(t){t=t||{},zm.call(this,t);for(var e in t)t.hasownproperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new km(t.style,this),this._rect=null,this.__clippaths=null}function cn(t){dn.call(this,t)}function ln(t){return parseint(t,10)}function kn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function pn(t,e,i){return bi.copy(t.getboundingrect()),t.transform&&bi.applytransform(t.transform),si.width=e,si.height=i,!bi.intersect(si)}function on(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;in;n++){var o=i[n];!t.emphasis[e].hasownproperty(o)&&t[e].hasownproperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function na(t){return!fi(t)||wi(t)||t instanceof date?t:t.value}function aa(t){return fi(t)&&!(t instanceof array)}function oa(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return gi(e,function(t,n){if(fi(t)){for(var a=0;a=i.length&&i.push({option:t})}}),i}function ra(t){var e=b();gi(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),gi(t,function(t){var i=t.option;o(!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={})}),gi(t,function(t,i){var n=t.exist,a=t.option,o=t.keyinfo;if(fi(a)){if(o.name=null!=a.name?a.name+"":n?n.name:hi+i,n)o.id=n.id;else if(null!=a.id)o.id=a.id+"";else{var r=0;do o.id="\x00"+o.name+"\x00"+r++;while(e.get(o.id))}e.set(o.id,t)}})}function sa(t){var e=t.name;return!(!e||!e.indexof(hi))}function la(t){return fi(t)&&t.id&&0===(t.id+"").indexof("\x00_ec_\x00")}function ua(t,e){function i(t,e,i){for(var n=0,a=t.length;a>n;n++)for(var o=t[n].seriesid,r=ea(t[n].dataindex),s=i&&i[o],l=0,u=r.length;u>l;l++){var h=r[l];s&&s[h]?s[h]=null:(e[o]||(e[o]={}))[h]=1}}function n(t,e){var i=[];for(var a in t)if(t.hasownproperty(a)&&null!=t[a])if(e)i.push(+a);else{var o=n(t[a],!0);o.length&&i.push({seriesid:a,dataindex:o})}return i}var a={},o={};return i(t||[],a),i(e||[],o,a),[n(a),n(o)]}function ha(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 ca(){var t="__\x00ec_inner_"+ui++ +"_"+math.random().tofixed(5);return function(e){return e[t]||(e[t]={})}}function da(t,e,i){if(b(e)){var n={};n[e+"index"]=0,e=n}var a=i&&i.defaultmaintype;!a||fa(e,a+"index")||fa(e,a+"id")||fa(e,a+"name")||(e[a+"index"]=0);var o={};return gi(e,function(n,a){var n=e[a];if("dataindex"===a||"dataindexinside"===a)return void(o[a]=n);var r=a.match(/^(\w+)(index|id|name)$/)||[],s=r[1],l=(r[2]||"").tolowercase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includemaintypes&&u(i.includemaintypes,s)<0)){var h={maintype:s};("index"!==l||"all"!==n)&&(h[l]=n);var c=t.querycomponents(h);o[s+"models"]=c,o[s+"model"]=c[0]}}),o}function fa(t,e){return t&&t.hasownproperty(e)}function pa(t,e,i){t.setattribute?t.setattribute(e,i):t[e]=i}function ga(t,e){return t.getattribute?t.getattribute(e):t[e]}function ma(t){return"auto"===t?as.domsupported?"html":"richtext":t||"html"}function va(t,e){var i=b(),n=[];return f(t,function(t){var a=e(t);(i.get(a)||(n.push(a),i.set(a,[]))).push(t)}),{keys:n,buckets:i}}function ya(t){var e={main:"",sub:""};return t&&(t=t.split(xi),e.main=t[0]||"",e.sub=t[1]||""),e}function xa(t){o(/^[a-za-z0-9_]+([.][a-za-z0-9_]+)?$/.test(t),'componenttype "'+t+'" illegal')}function _a(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 r(i.prototype,t),i.extend=this.extend,i.supercall=ba,i.superapply=sa,h(i,this),i.superclass=e,i}}function wa(t){var e=["__\x00is_clz",ji++,math.random().tofixed(3)].join("_");t.prototype[e]=!0,t.isinstance=function(t){return!(!t||!t[e])}}function ba(t,e){var i=k(arguments,2);return this.superclass.prototype[e].apply(t,i)}function sa(t,e,i){return this.superclass.prototype[e].apply(t,i)}function ma(t,e){function i(t){var e=n[t.main];return e&&e[yi]||(e=n[t.main]={},e[yi]=!0),e}e=e||{};var n={};if(t.registerclass=function(t,e){if(e)if(xa(e),e=ya(e),e.sub){if(e.sub!==yi){var a=i(e);a[e.sub]=t}}else n[e.main]=t;return t},t.getclass=function(t,e,i){var a=n[t];if(a&&a[yi]&&(a=e?a[e]:null),i&&!a)throw new error(e?"component "+t+"."+(e||"")+" not exists. load it first.":t+".type should be specified.");return a},t.getclassesbymaintype=function(t){t=ya(t);var e=[],i=n[t.main];return i&&i[yi]?f(i,function(t,i){i!==yi&&e.push(t)}):e.push(i),e},t.hasclass=function(t){return t=ya(t),!!n[t.main]},t.getallclassmaintypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hassubtypes=function(t){t=ya(t);var e=n[t.main];return e&&e[yi]},t.parseclasstype=ya,e.registerwhenextend){var a=t.extend;a&&(t.extend=function(e){var i=a.call(this,e);return t.registerclass(i,e.type)})}return t}function ia(t){return t>-it&&it>t}function ta(t){return t>it||-it>t}function aa(t,e,i,n,a){var o=1-a;return o*o*(o*t+3*a*e)+a*a*(a*n+3*o*i)}function da(t,e,i,n,a){var o=1-a;return 3*(((e-t)*o+2*(i-e)*a)*o+(n-i)*a*a)}function ca(t,e,i,n,a,o){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-a,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(ia(h)&&ia(c))if(ia(s))o[0]=0;else{var p=-l/s;p>=0&&1>=p&&(o[f++]=p)}else{var g=c*c-4*h*d;if(ia(g)){var m=c/h,p=-s/r+m,v=-m/2;p>=0&&1>=p&&(o[f++]=p),v>=0&&1>=v&&(o[f++]=v)}else if(g>0){var y=et(g),x=h*s+1.5*r*(-c+y),_=h*s+1.5*r*(-c-y);x=0>x?-tt(-x,ot):tt(x,ot),_=0>_?-tt(-_,ot):tt(_,ot);var p=(-s-(x+_))/(3*r);p>=0&&1>=p&&(o[f++]=p)}else{var w=(2*h*s-3*r*c)/(2*et(h*h*h)),b=math.acos(w)/3,s=et(h),m=math.cos(b),p=(-s-2*s*m)/(3*r),v=(-s+s*(m+at*math.sin(b)))/(3*r),i=(-s+s*(m-at*math.sin(b)))/(3*r);p>=0&&1>=p&&(o[f++]=p),v>=0&&1>=v&&(o[f++]=v),i>=0&&1>=i&&(o[f++]=i)}}return f}function la(t,e,i,n,a){var o=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(ia(r)){if(ta(o)){var u=-s/o;u>=0&&1>=u&&(a[l++]=u)}}else{var h=o*o-4*r*s;if(ia(h))a[0]=-o/(2*r);else if(h>0){var c=et(h),u=(-o+c)/(2*r),d=(-o-c)/(2*r);u>=0&&1>=u&&(a[l++]=u),d>=0&&1>=d&&(a[l++]=d)}}return l}function ka(t,e,i,n,a,o){var r=(e-t)*a+t,s=(i-e)*a+e,l=(n-i)*a+i,u=(s-r)*a+r,h=(l-s)*a+s,c=(h-u)*a+u;o[0]=t,o[1]=r,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=n}function pa(t,e,i,n,a,o,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;rt[0]=l,rt[1]=u;for(var y=0;1>y;y+=.05)st[0]=aa(t,i,a,r,y),st[1]=aa(e,n,o,s,y),p=xs(rt,st),v>p&&(c=y,v=p);v=1/0;for(var x=0;32>x&&!(nt>m);x++)d=c-m,f=c+m,st[0]=aa(t,i,a,r,d),st[1]=aa(e,n,o,s,d),p=xs(st,rt),d>=0&&v>p?(c=d,v=p):(lt[0]=aa(t,i,a,r,f),lt[1]=aa(e,n,o,s,f),g=xs(lt,rt),1>=f&&v>g?(c=f,v=g):m*=.5);return h&&(h[0]=aa(t,i,a,r,c),h[1]=aa(e,n,o,s,c)),et(v)}function oa(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}function ea(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function na(t,e,i,n,a){var o=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(ia(o)){if(ta(r)){var u=-s/r;u>=0&&1>=u&&(a[l++]=u)}}else{var h=r*r-4*o*s;if(ia(h)){var u=-r/(2*o);u>=0&&1>=u&&(a[l++]=u)}else if(h>0){var c=et(h),u=(-r+c)/(2*o),d=(-r-c)/(2*o);u>=0&&1>=u&&(a[l++]=u),d>=0&&1>=d&&(a[l++]=d)}}return l}function ra(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function za(t,e,i,n,a){var o=(e-t)*n+t,r=(i-e)*n+e,s=(r-o)*n+o;a[0]=t,a[1]=o,a[2]=s,a[3]=s,a[4]=r,a[5]=i}function ba(t,e,i,n,a,o,r,s,l){var u,h=.005,c=1/0;rt[0]=r,rt[1]=s;for(var d=0;1>d;d+=.05){st[0]=oa(t,i,a,d),st[1]=oa(e,n,o,d);var f=xs(rt,st);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(nt>h);p++){var g=u-h,m=u+h;st[0]=oa(t,i,a,g),st[1]=oa(e,n,o,g);var f=xs(st,rt);if(g>=0&&c>f)u=g,c=f;else{lt[0]=oa(t,i,a,m),lt[1]=oa(e,n,o,m);var v=xs(lt,rt);1>=m&&c>v?(u=m,c=v):h*=.5}}return l&&(l[0]=oa(t,i,a,u),l[1]=oa(e,n,o,u)),et(c)}function va(t,e,i){if(0!==t.length){var n,a=t[0],o=a[0],r=a[0],s=a[1],l=a[1];for(n=1;nh;h++){var p=d(t,i,a,r,vt[h]);l[0]=ut(p,l[0]),u[0]=ht(p,u[0])}for(f=c(e,n,o,s,yt),h=0;f>h;h++){var g=d(e,n,o,s,yt[h]);l[1]=ut(g,l[1]),u[1]=ht(g,u[1])}l[0]=ut(t,l[0]),u[0]=ht(t,u[0]),l[0]=ut(r,l[0]),u[0]=ht(r,u[0]),l[1]=ut(e,l[1]),u[1]=ht(e,u[1]),l[1]=ut(s,l[1]),u[1]=ht(s,u[1])}function wa(t,e,i,n,a,o,r,s){var l=ra,u=oa,h=ht(ut(l(t,i,a),1),0),c=ht(ut(l(e,n,o),1),0),d=u(t,i,a,h),f=u(e,n,o,c);r[0]=ut(t,a,d),r[1]=ut(e,o,f),s[0]=ht(t,a,d),s[1]=ht(e,o,f)}function ha(t,e,i,n,a,o,r,s,l){var u=re,h=se,c=math.abs(a-o);if(1e-4>c%ft&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(pt[0]=dt(a)*i+t,pt[1]=ct(a)*n+e,gt[0]=dt(o)*i+t,gt[1]=ct(o)*n+e,u(s,pt,gt),h(l,pt,gt),a%=ft,0>a&&(a+=ft),o%=ft,0>o&&(o+=ft),a>o&&!r?o+=ft:o>a&&r&&(a+=ft),r){var d=o;o=a,a=d}for(var f=0;o>f;f+=math.pi/2)f>a&&(mt[0]=dt(f)*i+t,mt[1]=ct(f)*n+e,u(s,mt,s),h(l,mt,l))}function za(t,e,i,n,a,o,r){if(0===a)return!1;var s=a,l=0,u=t;if(r>e+s&&r>n+s||e-s>r&&n-s>r||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return math.abs(o-t)<=s/2;l=(e-n)/(t-i),u=(t*n-i*e)/(t-i);var h=l*o-r+u,c=h*h/(l*l+1);return s/2*s/2>=c}function ua(t,e,i,n,a,o,r,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>n+c&&h>o+c&&h>s+c||e-c>h&&n-c>h&&o-c>h&&s-c>h||u>t+c&&u>i+c&&u>a+c&&u>r+c||t-c>u&&i-c>u&&a-c>u&&r-c>u)return!1;var d=pa(t,e,i,n,a,o,r,s,u,h,null);return c/2>=d}function xa(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var u=r;if(l>e+u&&l>n+u&&l>o+u||e-u>l&&n-u>l&&o-u>l||s>t+u&&s>i+u&&s>a+u||t-u>s&&i-u>s&&a-u>s)return!1;var h=ba(t,e,i,n,a,o,s,l,null);return u/2>=h}function ya(t){return t%=pt,0>t&&(t+=pt),t}function ja(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=math.sqrt(s*s+l*l);if(h-u>i||i>h+u)return!1;if(math.abs(n-a)%ot<1e-4)return!0;if(o){var c=n;n=ya(a),a=ya(c)}else n=ya(n),a=ya(a);n>a&&(a+=ot);var d=math.atan2(l,s);return 0>d&&(d+=ot),d>=n&&a>=d||d+ot>=n&&a>=d+ot}function qa(t,e,i,n,a,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var r=e>n?1:-1,s=(o-e)/(n-e);(1===s||0===s)&&(r=e>n?.5:-.5);var l=s*(i-t)+t;return l===a?1/0:l>a?r:0}function ka(t,e){return math.abs(t-e)e&&u>n&&u>o&&u>s||e>u&&n>u&&o>u&&s>u)return 0;var h=ca(e,n,o,s,u,zt);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var m=zt[g],v=0===m||1===m?.5:1,y=aa(t,i,a,r,m);l>y||(0>p&&(p=la(e,n,o,s,bt),bt[1]1&&$a(),c=aa(e,n,o,s,bt[0]),p>1&&(d=aa(e,n,o,s,bt[1]))),f+=2===p?mc?v:-v:md?v:-v:d>s?v:-v:mc?v:-v:c>s?v:-v)}return f}function qa(t,e,i,n,a,o,r,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=na(e,n,o,s,zt);if(0===l)return 0;var u=ra(e,n,o);if(u>=0&&1>=u){for(var h=0,c=oa(e,n,o,u),d=0;l>d;d++){var f=0===zt[d]||1===zt[d]?.5:1,p=oa(t,i,a,zt[d]);r>p||(h+=zt[d]c?f:-f:c>o?f:-f)}return h}var f=0===zt[0]||1===zt[0]?.5:1,p=oa(t,i,a,zt[0]);return r>p?0:e>o?f:-f}function to(t,e,i,n,a,o,r,s){if(s-=e,s>i||-i>s)return 0;var l=math.sqrt(i*i-s*s);zt[0]=-l,zt[1]=l;var u=math.abs(n-a);if(1e-4>u)return 0;if(1e-4>u%nt){n=0,a=nt;var h=o?1:-1;return r>=zt[0]+t&&r<=zt[1]+t?h:0}if(o){var l=n;n=ya(a),a=ya(l)}else n=ya(n),a=ya(a);n>a&&(a+=nt);for(var c=0,d=0;2>d;d++){var f=zt[d];if(f+t>r){var p=math.atan2(s,f),h=o?1:-1;0>p&&(p=nt+p),(p>=n&&a>=p||p+nt>=n&&a>=p+nt)&&(p>math.pi/2&&p<1.5*math.pi&&(h=-h),c+=h)}}return c}function eo(t,e,i,n,a){for(var o=0,r=0,s=0,l=0,u=0,h=0;h1&&(i||(o+=qa(r,s,l,u,n,a))),1===h&&(r=t[h],s=t[h+1],l=r,u=s),c){case et.m:l=t[h++],u=t[h++],r=l,s=u;break;case et.l:if(i){if(za(r,s,t[h],t[h+1],e,n,a))return!0}else o+=qa(r,s,t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case et.c:if(i){if(ua(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=ja(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case et.q:if(i){if(xa(r,s,t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=qa(r,s,t[h++],t[h++],t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case et.a:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=math.cos(m)*p+d,_=math.sin(m)*g+f;h>1?o+=qa(r,s,x,_,n,a):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(ja(d,f,g,m,m+v,y,e,w,a))return!0}else o+=to(d,f,g,m,m+v,y,w,a);r=math.cos(m+v)*p+d,s=math.sin(m+v)*g+f;break;case et.r:l=r=t[h++],u=s=t[h++];var b=t[h++],s=t[h++],x=l+b,_=u+s;if(i){if(za(l,u,x,u,e,n,a)||za(x,u,x,_,e,n,a)||za(x,_,l,_,e,n,a)||za(l,_,l,u,e,n,a))return!0}else o+=qa(x,u,x,_,n,a),o+=qa(l,_,l,u,n,a);break;case et.z:if(i){if(za(r,s,l,u,e,n,a))return!0}else o+=qa(r,s,l,u,n,a);r=l,s=u}}return i||ka(s,u)||(o+=qa(r,s,l,u,n,a)||0),0!==o}function io(t,e,i){return eo(t,0,!1,e,i)}function no(t,e,i,n){return eo(t,e,!0,i,n)}function ao(t){dn.call(this,t),this.path=null}function oo(t,e,i,n,a,o,r,s,l,u,h){var c=l*(kt/180),d=qt(c)*(t-i)/2+jt(c)*(e-n)/2,f=-1*jt(c)*(t-i)/2+qt(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=yt(p),s*=yt(p));var g=(a===o?-1:1)*yt((r*r*s*s-r*r*f*f-s*s*d*d)/(r*r*f*f+s*s*d*d))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+qt(c)*m-jt(c)*v,x=(e+n)/2+jt(c)*m+qt(c)*v,_=qt([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],s=qt(w,b);jt(w,b)<=-1&&(s=kt),jt(w,b)>=1&&(s=0),0===o&&s>0&&(s-=2*kt),1===o&&0>s&&(s+=2*kt),h.adddata(u,y,x,r,s,_,s,c,o)}function ro(t){if(!t)return new kt;for(var e,i=0,n=0,a=i,o=n,r=new kt,s=kt.cmd,l=t.match(ta),u=0;ug;g++)f[g]=parsefloat(f[g]);for(var m=0;p>m;){var v,y,x,_,w,b,s,m=i,i=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.l,r.adddata(h,i,n);break;case"l":i=f[m++],n=f[m++],h=s.l,r.adddata(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.m,r.adddata(h,i,n),a=i,o=n,d="l";break;case"m":i=f[m++],n=f[m++],h=s.m,r.adddata(h,i,n),a=i,o=n,d="l";break;case"h":i+=f[m++],h=s.l,r.adddata(h,i,n);break;case"h":i=f[m++],h=s.l,r.adddata(h,i,n);break;case"v":n+=f[m++],h=s.l,r.adddata(h,i,n);break;case"v":n=f[m++],h=s.l,r.adddata(h,i,n);break;case"c":h=s.c,r.adddata(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.c,r.adddata(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"s":v=i,y=n;var t=r.len(),a=r.data;e===s.c&&(v+=i-a[t-4],y+=n-a[t-3]),h=s.c,m=f[m++],i=f[m++],i=f[m++],n=f[m++],r.adddata(h,v,y,m,i,i,n);break;case"s":v=i,y=n;var t=r.len(),a=r.data;e===s.c&&(v+=i-a[t-4],y+=n-a[t-3]),h=s.c,m=i+f[m++],i=n+f[m++],i+=f[m++],n+=f[m++],r.adddata(h,v,y,m,i,i,n);break;case"q":m=f[m++],i=f[m++],i=f[m++],n=f[m++],h=s.q,r.adddata(h,m,i,i,n);break;case"q":m=f[m++]+i,i=f[m++]+n,i+=f[m++],n+=f[m++],h=s.q,r.adddata(h,m,i,i,n);break;case"t":v=i,y=n;var t=r.len(),a=r.data;e===s.q&&(v+=i-a[t-4],y+=n-a[t-3]),i=f[m++],n=f[m++],h=s.q,r.adddata(h,v,y,i,n);break;case"t":v=i,y=n;var t=r.len(),a=r.data;e===s.q&&(v+=i-a[t-4],y+=n-a[t-3]),i+=f[m++],n+=f[m++],h=s.q,r.adddata(h,v,y,i,n);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],s=f[m++],m=i,i=n,i=f[m++],n=f[m++],h=s.a,oo(m,i,i,n,b,s,x,_,w,h,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],s=f[m++],m=i,i=n,i+=f[m++],n+=f[m++],h=s.a,oo(m,i,i,n,b,s,x,_,w,h,r)}}("z"===d||"z"===d)&&(h=s.z,r.adddata(h),i=a,n=o),e=h}return r.tostatic(),r}function so(t,e){var i=ro(t);return e=e||{},e.buildpath=function(t){if(t.setdata){t.setdata(i.data);var e=t.getcontext();e&&t.rebuildpath(e)}else{var e=t;i.rebuildpath(e)}},e.applytransform=function(t){xt(i,t),this.dirty(!0)},e}function lo(t,e){return new ao(so(t,e))}function uo(t,e){return ao.extend(so(t,e))}function ho(t,e){for(var i=[],n=t.length,a=0;n>a;a++){var o=t[a];o.path||o.createpathproxy(),o.__dirtypath&&o.buildpath(o.path,o.shape,!0),i.push(o.path)}var r=new ao(e);return r.createpathproxy(),r.buildpath=function(t){t.appendpath(i);var e=t.getcontext();e&&t.rebuildpath(e)},r}function co(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function fo(t,e,i){var n=e.points,a=e.smooth;if(n&&n.length>=2){if(a&&"spline"!==a){var o=ua(n,a,i,e.smoothconstraint);t.moveto(n[0][0],n[0][1]);for(var r=n.length,s=0;(i?r:r-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=n[(s+1)%r];t.beziercurveto(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===a&&(n=la(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 po(t,e,i){if(e){var n=e.x1,a=e.x2,o=e.y1,r=e.y2;t.x1=n,t.x2=a,t.y1=o,t.y2=r;var s=i&&i.linewidth;s&&(da(2*n)===da(2*a)&&(t.x1=t.x2=mo(n,s,!0)),da(2*o)===da(2*r)&&(t.y1=t.y2=mo(o,s,!0)))}}function go(t,e,i){if(e){var n=e.x,a=e.y,o=e.width,r=e.height;t.x=n,t.y=a,t.width=o,t.height=r;var s=i&&i.linewidth;s&&(t.x=mo(n,s,!0),t.y=mo(a,s,!0),t.width=math.max(mo(n+o,s,!1)-t.x,0===o?0:1),t.height=math.max(mo(a+r,s,!1)-t.y,0===r?0:1))}}function mo(t,e,i){if(!e)return t;var n=da(2*t);return(n+da(e))%2===0?n/2:(n+(i?1:-1))/2}function vo(t,e,i){var n=t.cpx2,a=t.cpy2;return null===n||null===a?[(i?da:aa)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?da:aa)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ea:oa)(t.x1,t.cpx1,t.x2,e),(i?ea:oa)(t.y1,t.cpy1,t.y2,e)]}function yo(t){dn.call(this,t),this._displayables=[],this._temporarydisplayables=[],this._cursor=0,this.notclear=!0}function xo(t){return ao.extend(t)}function _o(t,e){return uo(t,e)}function wo(t,e){ea[t]=e}function bo(t){return ea.hasownproperty(t)?ea[t]:void 0}function so(t,e,i,n){var a=lo(t,e);return i&&("center"===n&&(i=io(i,a.getboundingrect())),to(a,i)),a}function mo(t,e,i){var n=new cn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var a={width:t.width,height:t.height};n.setstyle(io(e,a))}}});return n}function io(t,e){var i,n=e.width/e.height,a=t.height*n;a<=t.width?i=t.height:(a=t.width,i=a/n);var o=t.x+t.width/2,r=t.y+t.height/2;return{x:o-a/2,y:r-i/2,width:a,height:i}}function to(t,e){if(t.applytransform){var i=t.getboundingrect(),n=i.calculatetransform(e);t.applytransform(n)}}function ao(t){return po(t.shape,t.shape,t.style),t}function do(t){return go(t.shape,t.shape,t.style),t}function co(t){return null!=t&&"none"!==t}function lo(t){if("string"!=typeof t)return t;var e=za.get(t);return e||(e=ni(t,-.1),1e4>ba&&(za.set(t,e),ba++)),e}function ko(t){if(t.__hoverstldirty){t.__hoverstldirty=!1;var e=t.__hoverstl;if(!e)return void(t.__cachednormalstl=t.__cachednormalz2=null);var i=t.__cachednormalstl={};t.__cachednormalz2=t.z2;var n=t.style;for(var a in e)null!=e[a]&&(i[a]=n[a]);i.fill=n.fill,i.stroke=n.stroke}}function po(t){var e=t.__hoverstl;if(e&&!t.__highlighted){var i=t.__zr,n=t.usehoverlayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isgroup||!i&&t.usehoverlayer)){var a=t,o=t.style;n&&(a=i.addhover(t),o=a.style),er(o),n||ko(a),o.extendfrom(e),oo(o,e,"fill"),oo(o,e,"stroke"),tr(o),n||(t.dirty(!1),t.z2+=da)}}}function oo(t,e,i){!co(e[i])&&co(t[i])&&(t[i]=lo(t[i]))}function eo(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isgroup))if("layer"===e)t.__zr&&t.__zr.removehover(t);else{var i=t.style,n=t.__cachednormalstl;n&&(er(i),t.setstyle(n),tr(i));var a=t.__cachednormalz2;null!=a&&t.z2-a===da&&(t.z2=a)}}function no(t,e,i){var n,a=ka,o=ka;t.__highlighted&&(a=la,n=!0),e(t,i),t.__highlighted&&(o=la,n=!0),t.isgroup&&t.traverse(function(t){!t.isgroup&&e(t,i)}),n&&t.__highdownonupdate&&t.__highdownonupdate(a,o)}function ro(t,e){e=t.__hoverstl=e!==!1&&(t.hoverstyle||e||{}),t.__hoverstldirty=!0,t.__highlighted&&(t.__cachednormalstl=null,eo(t),po(t))}function zo(t){!fo(this,t)&&!this.__highbyouter&&no(this,po)}function bo(t){!fo(this,t)&&!this.__highbyouter&&no(this,eo)}function vo(t){this.__highbyouter|=1<<(t||0),no(this,po)}function go(t){!(this.__highbyouter&=~(1<<(t||0)))&&no(this,eo)}function fo(t,e){return t.__highdownsilentontouch&&e.zrbytouch}function wo(t,e){ho(t,!0),no(t,ro,e)}function ho(t,e){var i=e===!1;if(t.__highdownsilentontouch=t.highdownsilentontouch,t.__highdownonupdate=t.highdownonupdate,!i||t.__highdowndispatcher){var n=i?"off":"on";t[n]("mouseover",zo)[n]("mouseout",bo),t[n]("emphasis",vo)[n]("normal",go),t.__highbyouter=t.__highbyouter||0,t.__highdowndispatcher=!i}}function zo(t){return!(!t||!t.__highdowndispatcher)}function uo(t){var e=oa[t];return null==e&&32>=pa&&(e=oa[t]=pa++),e}function xo(t,e,i,n,a,o,r){a=a||aa;var s,l=a.labelfetcher,u=a.labeldataindex,h=a.labeldimindex,c=i.getshallow("show"),d=n.getshallow("show");(c||d)&&(l&&(s=l.getformattedlabel(u,"normal",null,h)),null==s&&(s=w(a.defaulttext)?a.defaulttext(u,a):a.defaulttext));var f=c?s:null,p=d?c(l?l.getformattedlabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(jo(t,i,o,a),jo(e,n,r,a,!0)),t.text=f,e.text=p}function yo(t,e,i){var n=t.style;e&&(er(n),t.setstyle(e),tr(n)),n=t.__hoverstl,i&&n&&(er(n),r(n,i),tr(n))}function jo(t,e,i,n,a){return ko(t,e,n,a),i&&r(t,i),t}function qo(t,e,i){var n,a={isrecttext:!0};i===!1?n=!0:a.autocolor=i,ko(t,e,a,n)}function ko(t,e,i,n){if(i=i||aa,i.isrecttext){var a;i.gettextposition?a=i.gettextposition(e,n):(a=e.getshallow("position")||(n?null:"inside"),"outside"===a&&(a="top")),t.textposition=a,t.textoffset=e.getshallow("offset");var o=e.getshallow("rotate");null!=o&&(o*=math.pi/180),t.textrotation=o,t.textdistance=c(e.getshallow("distance"),n?null:5)}var r,s=e.ecmodel,l=s&&s.option.textstyle,u=$o(e);if(u){r={};for(var h in u)if(u.hasownproperty(h)){var c=e.getmodel(["rich",h]);jo(r[h]={},c,l,i,n)}}return t.rich=r,jo(t,e,l,i,n,!0),i.forcerich&&!i.textstyle&&(i.textstyle={}),t}function $o(t){for(var e;t&&t!==t.ecmodel;){var i=(t.option||aa).rich;if(i){e=e||{};for(var n in i)i.hasownproperty(n)&&(e[n]=1)}t=t.parentmodel}return e}function jo(t,e,i,n,a,o){i=!a&&i||aa,t.textfill=qo(e.getshallow("color"),n)||i.color,t.textstroke=qo(e.getshallow("textbordercolor"),n)||i.textbordercolor,t.textstrokewidth=c(e.getshallow("textborderwidth"),i.textborderwidth),a||(o&&(t.insiderollbackopt=n,tr(t)),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"),o&&n.disablebox||(t.textbackgroundcolor=qo(e.getshallow("backgroundcolor"),n),t.textpadding=e.getshallow("padding"),t.textbordercolor=qo(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 qo(t,e){return"auto"!==t?t:e&&e.autocolor?e.autocolor:null}function tr(t){var e,i=t.textposition,n=t.insiderollbackopt;if(n&&null==t.textfill){var a=n.autocolor,o=n.isrecttext,r=n.useinsidestyle,s=r!==!1&&(r===!0||o&&i&&"string"==typeof i&&i.indexof("inside")>=0),l=!s&&null!=a;(s||l)&&(e={textfill:t.textfill,textstroke:t.textstroke,textstrokewidth:t.textstrokewidth}),s&&(t.textfill="#fff",null==t.textstroke&&(t.textstroke=a,null==t.textstrokewidth&&(t.textstrokewidth=2))),l&&(t.textfill=a)}t.insiderollback=e}function er(t){var e=t.insiderollback;e&&(t.textfill=e.textfill,t.textstroke=e.textstroke,t.textstrokewidth=e.textstrokewidth,t.insiderollback=null)}function ir(t,e){var i=e&&e.getmodel("textstyle");return e([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 nr(t,e,i,n,a,o){"function"==typeof a&&(o=a,a=null);var r=n&&n.isanimationenabled();if(r){var s=t?"update":"",l=n.getshallow("animationduration"+s),u=n.getshallow("animationeasing"+s),h=n.getshallow("animationdelay"+s);"function"==typeof h&&(h=h(a,n.getanimationdelayparams?n.getanimationdelayparams(e,a):null)),"function"==typeof l&&(l=l(a)),l>0?e.animateto(i,l,h||0,u,o,!!o):(e.stopanimation(),e.attr(i),o&&o())}else e.stopanimation(),e.attr(i),o&&o()}function ar(t,e,i,n,a){nr(!0,t,e,i,n,a)}function or(t,e,i,n,a){nr(!1,t,e,i,n,a)}function rr(t,e){for(var i=ee([]);t&&t!==e;)re(i,t.getlocaltransform(),i),t=t.parent;return i}function sr(t,e,i){return e&&!d(e)&&(e=dm.getlocaltransform(e)),i&&(e=ge([],e)),oe([],t,e)}function lr(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:math.abs(2*e[4]/e[0]),a=0===e[4]||0===e[5]||0===e[2]?1:math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-a:"bottom"===t?a:0];return o=sr(o,e,i),math.abs(o[0])>math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function ur(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isgroup&&t.anid&&(e[t.anid]=t)}),e}function a(t){var e={position:h(t.position),rotation:t.rotation};return t.shape&&(e.shape=r({},t.shape)),e}if(t&&e){var o=n(t);e.traverse(function(t){if(!t.isgroup&&t.anid){var e=o[t.anid];if(e){var n=a(t);t.attr(a(e)),ar(t,n,i,t.dataindex)}}})}}function hr(t,e){return p(t,function(t){var i=t[0];i=ia(i,e.x),i=ta(i,e.x+e.width);var n=t[1];return n=ia(n,e.y),n=ta(n,e.y+e.height),[i,n]})}function cr(t,e){var i=ia(t.x,e.x),n=ta(t.x+t.width,e.x+e.width),a=ia(t.y,e.y),o=ta(t.y+t.height,e.y+e.height);return n>=i&&o>=a?{x:i,y:a,width:n-i,height:o-a}:void 0}function dr(t,e,i){e=r({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 cn(e)):so(t.replace("path://",""),e,i,"center"):void 0}function fr(t,e,i,n,a){for(var o=0,r=a[a.length-1];og||g>1)return!1;var m=gr(f,p,h,c)/d;return 0>m||m>1?!1:!0}function gr(t,e,i,n){return t*n-i*e}function mr(t){return 1e-6>=t&&t>=-1e-6}function vr(t,e,i){this.parentmodel=e,this.ecmodel=i,this.option=t}function yr(t,e,i){for(var n=0;n=0&&i.push(t)}),i}t.topologicaltravel=function(t,e,n,a){function o(t){l[t].entrycount--,0===l[t].entrycount&&u.push(t)}function r(t){h[t]=!0,o(t)}if(t.length){var s=i(e),l=s.graph,u=s.noentrylist,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(n.call(a,c,d.originaldeps.slice()),delete h[c]),f(d.successor,p?r:o)}f(h,function(){throw new error("circle dependency may exists")})}}}function sr(t){return t.replace(/^\s+|\s+$/g,"")}function mr(t,e,i,n){var a=e[1]-e[0],o=i[1]-i[0];if(0===a)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(a>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])/a*o+i[0]}function ir(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?sr(t).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?0/0:+t}function tr(t,e,i){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),i?t:+t}function ar(t){return t.sort(function(t,e){return t-e}),t}function dr(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 cr(t){var e=t.tostring(),i=e.indexof("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var a=e.indexof(".");return 0>a?0:e.length-1-a}function lr(t,e){var i=math.log,n=math.ln10,a=math.floor(i(t[1]-t[0])/n),o=math.round(i(math.abs(e[1]-e[0]))/n),r=math.min(math.max(-a+o,0),20);return isfinite(r)?r:20}function kr(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 a=math.pow(10,i),o=p(t,function(t){return(isnan(t)?0:t)/n*a*100}),r=100*a,s=p(o,function(t){return math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(o,function(t,e){return t-s[e]});r>l;){for(var h=number.negative_infinity,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/a}function pr(t){var e=2*math.pi;return(t%e+e)%e}function or(t){return t>-ya&&ya>t}function er(t){if(t instanceof date)return t;if("string"==typeof t){var e=qa.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 nr(t){return math.pow(10,rr(t))}function rr(t){if(0===t)return 0;var e=math.floor(math.log(t)/math.ln10);return t/math.pow(10,e)>=10&&e++,e}function zr(t,e){var i,n=rr(t),a=math.pow(10,n),o=t/a;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=i*a,n>=-20?+t.tofixed(0>n?-n:0):t}function br(t,e){var i=(t.length-1)*e+1,n=math.floor(i),a=+t[n-1],o=i-n;return o?a+o*(t[n]-a):a}function vr(t){function e(t,i,n){return t.interval[n]s;s++)o[s]<=i&&(o[s]=i,r[s]=s?1:1-n),i=o[s],n=r[s];o[0]===o[1]&&r[0]*r[1]!==1?t.splice(a,1):a++}return t}function gr(t){return t-parsefloat(t)>=0}function fr(t){return isnan(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function wr(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 hr(t){return null==t?"":(t+"").replace(ja,function(t,e){return qa[e]})}function zr(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;os;s++)for(var l=0;l':'':{rendermode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function yr(t,e){return t+="","0000".substr(0,e-t.length)+t}function jr(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="mm-dd\nyyyy");var n=er(e),a=i?"utc":"",o=n["get"+a+"fullyear"](),r=n["get"+a+"month"]()+1,s=n["get"+a+"date"](),l=n["get"+a+"hours"](),u=n["get"+a+"minutes"](),h=n["get"+a+"seconds"](),c=n["get"+a+"milliseconds"]();return t=t.replace("mm",yr(r,2)).replace("m",r).replace("yyyy",o).replace("yy",o%100).replace("dd",yr(s,2)).replace("d",s).replace("hh",yr(l,2)).replace("h",l).replace("mm",yr(u,2)).replace("m",u).replace("ss",yr(h,2)).replace("s",h).replace("sss",yr(c,3))}function qr(t){return t?t.charat(0).touppercase()+t.substr(1):t}function kr(t){return xi(t.text,t.font,t.textalign,t.textverticalalign,t.textpadding,t.textlineheight,t.rich,t.truncate)}function $r(t,e,i,n,a,o,r,s){return xi(t,e,i,n,a,s,o,r)}function jr(t,e,i,n,a){var o=0,r=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;e.eachchild(function(l,u){var h,c,d=l.position,f=l.getboundingrect(),p=e.childat(u+1),g=p&&p.getboundingrect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);h=o+m,h>n||l.newline?(o=0,h=m,r+=s+i,s=f.height):s=math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);c=r+v,c>a||l.newline?(o+=s+i,r=0,c=v,s=f.width):s=math.max(s,f.width)}l.newline||(d[0]=o,d[1]=r,"horizontal"===t?o=h+i:r=c+i)})}function qr(t,e,i){var n=e.width,a=e.height,o=ir(t.x,n),r=ir(t.y,a),s=ir(t.x2,n),l=ir(t.y2,a);return(isnan(o)||isnan(parsefloat(t.x)))&&(o=0),(isnan(s)||isnan(parsefloat(t.x2)))&&(s=n),(isnan(r)||isnan(parsefloat(t.y)))&&(r=0),(isnan(l)||isnan(parsefloat(t.y2)))&&(l=a),i=$a(i||0),{width:math.max(s-o-i[1]-i[3],0),height:math.max(l-r-i[0]-i[2],0)}}function ts(t,e,i){i=$a(i||0);var n=e.width,a=e.height,o=ir(t.left,n),r=ir(t.top,a),s=ir(t.right,n),l=ir(t.bottom,a),u=ir(t.width,n),h=ir(t.height,a),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isnan(u)&&(u=n-s-d-o),isnan(h)&&(h=a-l-c-r),null!=f&&(isnan(u)&&isnan(h)&&(f>n/a?u=.8*n:h=.8*a),isnan(u)&&(u=f*h),isnan(h)&&(h=u/f)),isnan(o)&&(o=n-s-u-d),isnan(r)&&(r=a-l-h-c),t.left||t.right){case"center":o=n/2-u/2-i[3];break;case"right":o=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=a/2-h/2-i[0];break;case"bottom":r=a-h-c}o=o||0,r=r||0,isnan(u)&&(u=n-d-o-(s||0)),isnan(h)&&(h=a-c-r-(l||0));var p=new ti(o+i[3],r+i[0],u,h);return p.margin=i,p}function es(t,e,i,n,a){var o=!a||!a.hv||a.hv[0],r=!a||!a.hv||a.hv[1],l=a&&a.boundingmode||"all";if(o||r){var u;if("raw"===l)u="group"===t.type?new ti(0,0,+e.width||0,+e.height||0):t.getboundingrect();else if(u=t.getboundingrect(),t.needlocaltransform()){var h=t.getlocaltransform();u=u.clone(),u.applytransform(h)}e=ts(s({width:u.width,height:u.height},e),i,n);var c=t.position,d=o?e.x-u.x:0,f=r?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function is(t,e){return null!=t[rd[e][0]]||null!=t[rd[e][1]]&&null!=t[rd[e][2]]}function ns(t,e,i){function n(i,n){var r={},l=0,u={},h=0,c=2;if(ad(i,function(e){u[e]=t[e]}),ad(i,function(t){a(e,t)&&(r[t]=u[t]=e[t]),o(r,t)&&l++,o(u,t)&&h++}),s[n])return o(e,i[1])?u[i[2]]=null:o(e,i[2])&&(u[i[1]]=null),u;if(h!==c&&l){if(l>=c)return r;for(var d=0;dn;n++)if(t[n].length>e)return t[n];return t[i-1]}function ls(t){this.fromdataset=t.fromdataset,this.data=t.data||(t.sourceformat===yd?{}:[]),this.sourceformat=t.sourceformat||xd,this.serieslayoutby=t.serieslayoutby||wd,this.dimensionsdefine=t.dimensionsdefine,this.encodedefine=t.encodedefine&&b(t.encodedefine),this.startindex=t.startindex||0,this.dimensionsdetectcount=t.dimensionsdetectcount}function us(t){var e=t.option.source,i=xd;if(i(e))i=_d;else if(_(e)){0===e.length&&(i=md);for(var n=0,a=e.length;a>n;n++){var o=e[n];if(null!=o){if(_(o)){i=md;break}if(s(o)){i=vd;break}}}}else if(s(e)){for(var r in e)if(e.hasownproperty(r)&&d(e[r])){i=yd;break}}else if(null!=e)throw new error("invalid data");md(t).sourceformat=i}function hs(t){return md(t).source}function cs(t){md(t).datasetmap=b()}function ds(t){var e=t.option,i=e.data,n=i(i)?_d:gd,a=!1,o=e.serieslayoutby,r=e.sourceheader,s=e.dimensions,l=xs(t);if(l){var u=l.option;i=u.source,n=md(l).sourceformat,a=!0,o=o||u.serieslayoutby,null==r&&(r=u.sourceheader),s=s||u.dimensions}var h=fs(i,n,o,r,s);md(t).source=new ls({data:i,fromdataset:a,serieslayoutby:o,sourceformat:n,dimensionsdefine:h.dimensionsdefine,startindex:h.startindex,dimensionsdetectcount:h.dimensionsdetectcount,encodedefine:e.encode})}function fs(t,e,i,n,a){if(!t)return{dimensionsdefine:ps(a)};var o,r;if(e===md)"auto"===n||null==n?gs(function(t){null!=t&&"-"!==t&&(b(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,a||1!==r||(a=[],gs(function(t,e){a[e]=null!=t?t:""},i,t)),o=a?a.length:i===bd?t.length:t[0]?t[0].length:null;else if(e===vd)a||(a=ms(t));else if(e===yd)a||(a=[],f(t,function(t,e){a.push(e)}));else if(e===gd){var s=na(t[0]);o=_(s)&&s.length||1}return{startindex:r,dimensionsdefine:ps(a),dimensionsdetectcount:o}}function ps(t){if(t){var e=b();return p(t,function(t){if(t=r({},s(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayname&&(t.displayname=t.name);var i=e.get(t.name);return i?t.name+="-"+i.count++:e.set(t.name,{count:1}),t})}}function gs(t,e,i,n){if(null==n&&(n=1/0),e===bd)for(var a=0;aa;a++)t(i[a]?i[a][0]:null,a);else for(var o=i[0]||[],a=0;aa;a++)t(o[a],a)}function ms(t){for(var e,i=0;in;n++)t.push(e+n)}function a(t){var e=t.dimsdef;return e?e.length:1}var o={},r=xs(e);if(!r||!t)return o;var s,l,u=[],h=[],c=e.ecmodel,d=md(c).datasetmap,p=r.uid+"_"+i.serieslayoutby;t=t.slice(),f(t,function(e,i){!s(e)&&(t[i]={name:e}),"ordinal"===e.type&&null==s&&(s=i,l=a(t[i])),o[e.name]=[]});var g=d.get(p)||d.set(p,{categorywaydim:l,valuewaydim:0});return f(t,function(t,e){var i=t.name,r=a(t);if(null==s){var l=g.valuewaydim;n(o[i],l,r),n(h,l,r),g.valuewaydim+=r}else if(s===e)n(o[i],0,r),n(u,0,r);else{var l=g.categorywaydim;n(o[i],l,r),n(h,l,r),g.categorywaydim+=r}}),u.length&&(o.itemname=u),h.length&&(o.seriesname=h),o}function ys(t,e,i){var n={},a=xs(t);if(!a)return n;var o,r=e.sourceformat,s=e.dimensionsdefine;(r===vd||r===yd)&&f(s,function(t,e){"name"===(s(t)?t.name:t)&&(o=e)});var l=function(){function t(t){return null!=t.v&&null!=t.n}for(var n={},a={},l=[],u=0,h=math.min(5,i);h>u;u++){var c=ws(e.data,r,e.serieslayoutby,s,e.startindex,u);l.push(c);var d=c===sd.not;if(d&&null==n.v&&u!==o&&(n.v=u),(null==n.n||n.n===n.v||!d&&l[n.n]===sd.not)&&(n.n=u),t(n)&&l[n.n]!==sd.not)return n;d||(c===sd.might&&null==a.v&&u!==o&&(a.v=u),(null==a.n||a.n===a.v)&&(a.n=u))}return t(n)?n:t(a)?a:null}();if(l){n.value=l.v;var u=null!=o?o:l.n;n.itemname=[u],n.seriesname=[u]}return n}function xs(t){var e=t.option,i=e.data;return i?void 0:t.ecmodel.getcomponent("dataset",e.datasetindex||0)}function _s(t,e){return ws(t.data,t.sourceformat,t.serieslayoutby,t.dimensionsdefine,t.startindex,e)}function ws(t,e,i,n,a,o){function r(t){var e=b(t);return null!=t&&isfinite(t)&&""!==t?e?sd.might:sd.not:e&&"-"!==t?sd.must:void 0}var s,l=5;if(i(t))return sd.not;var u,h;if(n){var c=n[o];s(c)?(u=c.name,h=c.type):b(c)&&(u=c)}if(null!=h)return"ordinal"===h?sd.must:sd.not;if(e===md)if(i===bd){for(var d=t[o],f=0;f<(d||[]).length&&l>f;f++)if(null!=(s=r(d[a+f])))return s}else for(var f=0;ff;f++){var p=t[a+f];if(p&&null!=(s=r(p[o])))return s}else if(e===vd){if(!u)return sd.not;for(var f=0;ff;f++){var g=t[f];if(g&&null!=(s=r(g[u])))return s}}else if(e===yd){if(!u)return sd.not;var d=t[u];if(!d||i(d))return sd.not;for(var f=0;ff;f++)if(null!=(s=r(d[f])))return s}else if(e===gd)for(var f=0;ff;f++){var g=t[f],m=na(g);if(!_(m))return sd.not;if(null!=(s=r(m[o])))return s}return sd.not}function bs(t,e){if(e){var i=e.seiresindex,n=e.seriesid,a=e.seriesname;return null!=i&&t.componentindex!==i||null!=n&&t.id!==n||null!=a&&t.name!==a}}function ss(t,e){var i=t.color&&!t.colorlayer;f(e,function(e,o){"colorlayer"===o&&i||hd.hasclass(o)||("object"==typeof e?t[o]=t[o]?a(t[o],e,!1):n(e):null==t[o]&&(t[o]=e))})}function ms(t){t=t,this.option={},this.option[id]=1,this._componentsmap=b({series:[]}),this._seriesindices,this._seriesindicesmap,ss(t,this._theme.option),a(t,dd,!1),this.mergeoption(t)}function is(t,e){_(e)||(e=e?[e]:[]);var i={};return f(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function ts(t,e,i){var n=e.type?e.type:i?i.subtype:hd.determinesubtype(t,e);return n}function as(t,e){t._seriesindicesmap=b(t._seriesindices=p(e,function(t){return t.componentindex})||[])}function ds(t,e){return e.hasownproperty("subtype")?m(t,function(t){return t.subtype===e.subtype}):t}function cs(t){f(ad,function(e){this[e]=y(t[e],t)},this)}function ls(){this._coordinatesystems=[]}function ks(t){this._api=t,this._timelineoptions=[],this._medialist=[],this._mediadefault,this._currentmediaindices=[],this._optionbackup,this._newbaseoption}function ps(t,e,i){var n,a,o=[],r=[],s=t.timeline;if(t.baseoption&&(a=t.baseoption),(s||t.options)&&(a=a||{},o=(t.options||[]).slice()),t.media){a=a||{};var l=t.media;cd(l,function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))})}return a||(a=t),a.timeline||(a.timeline=s),cd([a].concat(o).concat(p(r,function(t){return t.option})),function(t){cd(e,function(e){e(t,i)})}),{baseoption:a,timelineoptions:o,mediadefault:n,medialist:r}}function os(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return f(t,function(t,e){var i=e.match(od);if(i&&i[1]&&i[2]){var o=i[1],r=i[2].tolowercase();es(n[r],t,o)||(a=!1)}}),a}function es(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function ns(t,e){return t.join(",")===e.join(",")}function rs(t,e){e=e||{},cd(e,function(e,i){if(null!=e){var n=t[i];if(hd.hasclass(i)){e=ea(e),n=ea(n);var a=oa(n,e);t[i]=kd(a,function(t){return t.option&&t.exist?pd(t.exist,t.option,!0):t.exist||t.option})}else t[i]=pd(n,e,!0)}})}function zs(t){var e=t&&t.itemstyle;if(e)for(var i=0,n=rd.length;n>i;i++){var o=rd[i],r=e.normal,s=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?a(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?a(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function bs(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,a=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,s(t[e],n)):t[e]=n),a&&(t.emphasis=t.emphasis||{},t.emphasis[e]=a)}}function vs(t){bs(t,"itemstyle"),bs(t,"linestyle"),bs(t,"areastyle"),bs(t,"label"),bs(t,"labelline"),bs(t,"upperlabel"),bs(t,"edgelabel")}function gs(t,e){var i=nd(t)&&t[e],n=nd(i)&&i.textstyle;if(n)for(var a=0,o=zi.length;o>a;a++){var e=zi[a];n.hasownproperty(e)&&(i[e]=n[e])}}function fs(t){t&&(vs(t),gs(t,"label"),t.emphasis&&gs(t.emphasis,"label"))}function ws(t){if(nd(t)){zs(t),vs(t),gs(t,"label"),gs(t,"upperlabel"),gs(t,"edgelabel"),t.emphasis&&(gs(t.emphasis,"label"),gs(t.emphasis,"upperlabel"),gs(t.emphasis,"edgelabel"));var e=t.markpoint;e&&(zs(e),fs(e));var i=t.markline;i&&(zs(i),fs(i));var n=t.markarea;n&&fs(n);var a=t.data;if("graph"===t.type){a=a||t.nodes;var o=t.links||t.edges;if(o&&!i(o))for(var r=0;r=0;p--){var g=t[p];if(s||(d=g.data.rawindexof(g.stackedbydimension,c)),d>=0){var m=g.data.getbyrawindex(g.stackresultdimension,d);if(h>=0&&m>0||0>=h&&0>m){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostmodel.setdata(l),e.data=l})}function qs(t,e){ls.isinstance(t)||(t=ls.seriesdatatosource(t)),this._source=t;var i=this._data=t.data,n=t.sourceformat;n===_d&&(this._offset=0,this._dimsize=e,this._data=i);var a=hd[n===md?n+"_"+t.serieslayoutby:n];r(this,a)}function ks(){return this._data.length}function $s(t){return this._data[t]}function js(t){for(var e=0;ee.outputdata.count()&&e.model.getrawdata().cloneshallow(e.outputdata)}function fl(t,e){f(t.changable_methods,function(i){t.wrapmethod(i,x(pl,e))})}function pl(t){var e=gl(t);e&&e.setoutputend(this.count())}function gl(t){var e=(t.ecmodel||{}).scheduler,i=e&&e.getpipeline(t.uid);if(i){var n=i.currenttask;if(n){var a=n.agentstubmap;a&&(n=a.get(t.uid))}return n}}function ml(){this.group=new fm,this.uid=_r("viewchart"),this.rendertask=al({plan:xl,reset:_l}),this.rendertask.context={view:this}}function vl(t,e,i){if(t&&(t.trigger(e,i),t.isgroup&&!zo(t)))for(var n=0,a=t.childcount();a>n;n++)vl(t.childat(n),e,i)}function yl(t,e,i){var n=ha(t,e),a=e&&null!=e.highlightkey?uo(e.highlightkey):null;null!=n?f(ea(n),function(e){vl(t.getitemgraphicel(e),i,a)}):t.eachitemgraphicel(function(t){vl(t,i,a)})}function xl(t){return ic(t.model)}function _l(t){var e=t.model,i=t.ecmodel,n=t.api,a=t.payload,o=e.pipelinecontext.progressiverender,r=t.view,s=a&&ec(a).updatemethod,l=o?"incrementalpreparerender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,a),ac[l]}function wl(t,e,i){function n(){h=(new date).gettime(),c=null,t.apply(r,s||[])}var a,o,r,s,l,u=0,h=0,c=null;e=e||0;var d=function(){a=(new date).gettime(),r=this,s=arguments;var t=l||e,d=l||i;l=null,o=a-(d?u:h)-t,cleartimeout(c),d?c=settimeout(n,t):o>=0?n():c=settimeout(n,-o),u=a};return d.clear=function(){c&&(cleartimeout(c),c=null)},d.debouncenextcall=function(t){l=t},d}function bl(t,e,i,n){var a=t[e];if(a){var o=a[oc]||a,r=a[sc],s=a[rc];if(s!==i||r!==n){if(null==i||!n)return t[e]=o;a=t[e]=wl(o,i,"debounce"===n),a[oc]=o,a[sc]=n,a[rc]=i}return a}}function sl(t,e){var i=t[e];i&&i[oc]&&(t[e]=i[oc])}function ml(t,e,i,n){this.ecinstance=t,this.api=e,this.unfinished;var i=this._dataprocessorhandlers=i.slice(),n=this._visualhandlers=n.slice();this._allhandlers=i.concat(n),this._stagetaskmap=b()}function il(t,e,i,n,a){function o(t,e){return t.setdirty&&(!t.dirtymap||t.dirtymap.get(e.__pipeline.id))}a=a||{};var r;f(e,function(e){if(!a.visualtype||a.visualtype===e.visualtype){var s=t._stagetaskmap.get(e.uid),l=s.seriestaskmap,u=s.overalltask;if(u){var h,c=u.agentstubmap;c.each(function(t){o(a,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),pc(u,n);var d=t.getperformargs(u,a.block);c.each(function(t){t.perform(d)}),r|=u.perform(d)}else l&&l.each(function(s){o(a,s)&&s.dirty();var l=t.getperformargs(s,a.block);l.skip=!e.performrawseries&&i.isseriesfiltered(s.context.model),pc(s,n),r|=s.perform(l)})}}),t.unfinished|=r}function tl(t,e,i,n,a){function o(i){var o=i.uid,s=r.get(o)||r.set(o,al({plan:pl,reset:ol,count:nl}));s.context={model:i,ecmodel:n,api:a,useclearvisual:e.isvisual&&!e.islayout,plan:e.plan,reset:e.reset,scheduler:t},rl(t,i,s)}var r=i.seriestaskmap||(i.seriestaskmap=b()),s=e.seriestype,l=e.gettargetseries;e.createonallseries?n.eachrawseries(o):s?n.eachrawseriesbytype(s,o):l&&l(n,a).each(o);var u=t._pipelinemap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removekey(e))})}function al(t,e,i,n,a){function o(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,al({reset:cl,ondirty:kl})),r.dirty()),n.context={model:e,overallprogress:h,modifyoutputend:c},n.agent=r,n.__block=h,rl(t,e,n)}var r=i.overalltask=i.overalltask||al({reset:dl});r.context={ecmodel:n,api:a,overallreset:e.overallreset,scheduler:t};var s=r.agentstubmap=r.agentstubmap||b(),l=e.seriestype,u=e.gettargetseries,h=!0,c=e.modifyoutputend;l?n.eachrawseriesbytype(l,o):u?u(n,a).each(o):(h=!1,f(n.getseries(),o));var d=t._pipelinemap;s.each(function(t,e){d.get(e)||(t.dispose(),r.dirty(),s.removekey(e))})}function dl(t){t.overallreset(t.ecmodel,t.api,t.payload)}function cl(t){return t.overallprogress&&ll}function ll(){this.agent.dirty(),this.getdownstream().dirty()}function kl(){this.agent&&this.agent.dirty()}function pl(t){return t.plan&&t.plan(t.model,t.ecmodel,t.api,t.payload)}function ol(t){t.useclearvisual&&t.data.clearallvisual();var e=t.resetdefines=ea(t.reset(t.model,t.ecmodel,t.api,t.payload));return e.length>1?p(e,function(t,e){return el(e)}):gc}function el(t){return function(e,i){var n=i.data,a=i.resetdefines[t];if(a&&a.dataeach)for(var o=e.start;o0?parseint(n,10)/100:n?parsefloat(n):0;var a=i.getattribute("stop-color")||"#000000";e.addcolorstop(n,a)}i=i.nextsibling}}function wl(t,e){t&&t.__inheritedstyle&&(e.__inheritedstyle||(e.__inheritedstyle={}),s(e.__inheritedstyle,t.__inheritedstyle))}function hl(t){for(var e=e(t).split(tc),i=[],n=0;n0;o-=2){var r=a[o],s=a[o-1];switch(n=n||oe(),s){case"translate":r=e(r).split(tc),ze(n,n,[parsefloat(r[0]),parsefloat(r[1]||0)]);break;case"scale":r=e(r).split(tc),ve(n,n,[parsefloat(r[0]),parsefloat(r[1]||r[0])]);break;case"rotate":r=e(r).split(tc),be(n,n,parsefloat(r[0]));break;case"skew":r=e(r).split(tc),console.warn("skew transform is not supported yet");break;case"matrix":var r=e(r).split(tc);n[0]=parsefloat(r[0]),n[1]=parsefloat(r[1]),n[2]=parsefloat(r[2]),n[3]=parsefloat(r[3]),n[4]=parsefloat(r[4]),n[5]=parsefloat(r[5])}}e.setlocaltransform(n)}}function yl(t){var e=t.getattribute("style"),i={};if(!e)return i;var n={};pc.lastindex=0;for(var a;null!=(a=pc.exec(e));)n[a[1]]=a[2];for(var o in cc)cc.hasownproperty(o)&&null!=n[o]&&(i[cc[o]]=n[o]);return i}function jl(t,e,i){var n=e/t.width,a=i/t.height,o=math.min(n,a),r=[o,o],s=[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+i/2];return{scale:r,position:s}}function ql(t,e){var i=new gl;return i.parse(t,e)}function kl(t,e){return function(i,n,a){(e||!this._disposed)&&(i=i&&i.tolowercase(),qs.prototype[t].call(this,i,n,a))}}function $l(){qs.call(this)}function jl(t,e,i){function a(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=pl[e]),this.id,this.group,this._dom=t;var o="canvas",r=this._zr=kn(t,{renderer:i.renderer||o,devicepixelratio:i.devicepixelratio,width:i.width,height:i.height});this._throttledzrflush=wl(y(r.flush,r),17);var e=n(e);e&&gd(e,!0),this._theme=e,this._chartsviews=[],this._chartsmap={},this._componentsviews=[],this._componentsmap={},this._coordsysmgr=new ls;var s=this._api=mu(this);ei(fl,a),ei(hl,a),this._scheduler=new ml(this,s,hl,fl),qs.call(this,this._eceventprocessor=new vu),this._messagecenter=new $l,this._initevents(),this.resize=y(this.resize,this),this._pendingactions=[],r.animation.on("frame",this._onframe,this),ru(r,this),n(this)}function ql(t,e,i){if(!this._disposed){var n,a=this._model,o=this._coordsysmgr.getcoordinatesystems();e=da(a,e);for(var r=0;re.get("hoverlayerthreshold")&&!as.node&&e.eachseries(function(e){if(!e.preventusinghoverlayer){var i=t._chartsmap[e.__viewid];i.__alive&&i.group.traverse(function(t){t.usehoverlayer=!0})}})}function pu(t,e){var i=t.get("blendmode")||null;e.group.traverse(function(t){t.isgroup||t.style.blend!==i&&t.setstyle("blend",i),t.eachpendingdisplayable&&t.eachpendingdisplayable(function(t){t.setstyle("blend",i)})})}function gu(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 mu(t){var e=t._coordsysmgr;return r(new cs(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 vu(){this.eventinfo}function yu(t){function e(t,e){for(var i=0;i65535?cl:kl}function ju(t){var e=t.constructor;return e===array?t.slice():new e(t)}function qu(t,e){f(pl.concat(e.__wrappedmethods||[]),function(i){e.hasownproperty(i)&&(t[i]=e[i])}),t.__wrappedmethods=e.__wrappedmethods,f(ol,function(i){t[i]=n(e[i])}),t._calculationinfo=r(e._calculationinfo)}function th(t,e,i,n,a){var o=dl[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.lengthc;c+=i)t[s].push(new o(math.min(a-c,i)))}function eh(t){var e=t._invertedindicesmap;f(e,function(i,n){var a=t._dimensioninfos[n],o=a.ordinalmeta;if(o){i=e[n]=new ll(o.categories.length);for(var r=0;r=0?this._indices[t]:-1}function oh(t,e){var i=t._idlist[e];return null==i&&(i=ih(t,t._iddimidx,e)),null==i&&(i=al+e),i}function rh(t){return _(t)||(t=[t]),t}function sh(t,e){var i=t.dimensions,n=new el(p(i,t.getdimensioninfo,t),t.hostmodel);qu(n,t);for(var a=n._storage={},o=t._storage,r=0;r=0?(a[s]=lh(o[s]),n._rawextent[s]=uh(),n._extent[s]=null):a[s]=o[s])}return n}function lh(t){for(var e=new array(t.length),i=0;id;d++){var p=o[d]=r({},s(o[d])?o[d]:{name:o[d]}),g=p.name,m=h[d]=new ku;null!=g&&null==l.get(g)&&(m.name=m.displayname=g,l.set(g,d)),null!=p.type&&(m.type=p.type),null!=p.displayname&&(m.displayname=p.displayname)}var v=i.encodedef;!v&&i.encodedefaulter&&(v=i.encodedefaulter(e,c)),v=b(v),v.each(function(t,e){if(t=ea(t).slice(),1===t.length&&!b(t[0])&&t[0]<0)return void v.set(e,!1);var i=v.set(e,[]);f(t,function(t,n){b(t)&&(t=l.get(t)),null!=t&&c>t&&(i[n]=t,a(h[t],e,n))})});var y=0;f(t,function(t){var e,t,i,o;if(b(t))e=t,t={};else{e=t.name;var r=t.ordinalmeta;t.ordinalmeta=null,t=n(t),t.ordinalmeta=r,i=t.dimsdef,o=t.otherdims,t.name=t.coorddim=t.coorddimindex=t.dimsdef=t.otherdims=null}var l=v.get(e);if(l!==!1){var l=ea(l);if(!l.length)for(var u=0;u<(i&&i.length||1);u++){for(;yi;i++){var m=h[i]=h[i]||new ku,t=m.coorddim;null==t&&(m.coorddim=dh(m,u,w),m.coorddimindex=0,(!x||0>=_)&&(m.isextracoord=!0),_--),null==m.name&&(m.name=dh(m.coorddim,l)),null!=m.type||_s(e,i,m.name)!==sd.must&&(!m.isextracoord||null==m.otherdims.itemname&&null==m.otherdims.seriesname)||(m.type="ordinal")}return h}function ch(t,e,i,n){var a=math.max(t.dimensionsdetectcount||1,e.length,i.length,n||0);return f(e,function(t){var e=t.dimsdef;e&&(a=math.max(a,e.length))}),a}function dh(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function fh(t){this.coordsysname=t,this.coordsysdims=[],this.axismap=b(),this.categoryaxismap=b(),this.firstcategorydimindex=null}function ph(t){var e=t.get("coordinatesystem"),i=new fh(e),n=bl[e];return n?(n(t,i,i.axismap,i.categoryaxismap),i):void 0}function gh(t){return"category"===t.get("type")}function mh(t,e,i){i=i||{};var n,a,o,r,s=i.byindex,l=i.stackedcoorddimension,u=!(!t||!t.get("stack"));if(f(e,function(t,i){b(t)&&(e[i]=t={name:t}),u&&!t.isextracoord&&(s||n||!t.ordinalmeta||(n=t),a||"ordinal"===t.type||"time"===t.type||l&&l!==t.coorddim||(a=t))}),!a||s||n||(s=!0),a){o="__\x00ecstackresult",r="__\x00ecstackedover",n&&(n.createinvertedindices=!0);var h=a.coorddim,c=a.type,d=0;f(e,function(t){t.coorddim===h&&d++}),e.push({name:o,coorddim:h,coorddimindex:d,type:c,isextracoord:!0,iscalculationcoord:!0}),d++,e.push({name:r,coorddim:r,coorddimindex:d,type:c,isextracoord:!0,iscalculationcoord:!0})}return{stackeddimension:a&&a.name,stackedbydimension:n&&n.name,isstackedbyindex:s,stackedoverdimension:r,stackresultdimension:o}}function vh(t,e){return!!e&&e===t.getcalculationinfo("stackeddimension")}function yh(t,e){return vh(t,e)?t.getcalculationinfo("stackresultdimension"):e}function xh(t,e,i){i=i||{},ls.isinstance(t)||(t=ls.seriesdatatosource(t));var n,a=e.get("coordinatesystem"),o=ls.get(a),r=ph(e);r&&(n=p(r.coordsysdims,function(t){var e={name:t},i=r.axismap.get(t);if(i){var n=i.get("type");e.type=ju(n)}return e})),n||(n=o&&(o.getdimensionsinfo?o.getdimensionsinfo():o.dimensions.slice())||["x","y"]);var s,l,u=zl(t,{coorddimensions:n,generatecoord:i.generatecoord,encodedefaulter:i.useencodedefaulter?x(vs,n,e):null});r&&f(u,function(t,e){var i=t.coorddim,n=r.categoryaxismap.get(i);n&&(null==s&&(s=e),t.ordinalmeta=n.getordinalmeta()),null!=t.otherdims.itemname&&(l=!0)}),l||null==s||(u[s].otherdims.itemname=0);var h=mh(e,u),c=new el(u,e);c.setcalculationinfo(h);var d=null!=s&&_h(t)?function(t,e,i,n){return n===s?i:this.defaultdimvaluegetter(t,e,i,n)}:null;return c.hasitemoption=!1,c.initdata(t,null,d),c}function _h(t){if(t.sourceformat===gd){var e=wh(t.data||[]);return null!=e&&!_(na(e))}}function wh(t){for(var e=0;er&&(r=a.interval=i),null!=n&&r>n&&(r=a.interval=n);var s=a.intervalprecision=ah(r),l=a.nicetickextent=[wl(math.ceil(t[0]/r)*r,s),wl(math.floor(t[1]/r)*r,s)];return ch(l,t),a}function ah(t){return cr(t)+2}function dh(t,e,i){t[e]=math.max(math.min(t[e],i[1]),i[0])}function ch(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),dh(t,0,e),dh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function lh(t){return t.get("stack")||ul+t.seriesindex}function kh(t){return t.dim+t.index}function ph(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var a=i.getbandwidth(),o=0;os;++s){var u=a.get(r,s);e[o]?e[o].push(u):e[o]=[u]}});var i=[];for(var n in e)if(e.hasownproperty(n)){var a=e[n];if(a){a.sort(function(t,e){return t-e});for(var o=null,r=1;r0&&(o=null===o?s:math.min(o,s))}i[n]=o}}return i}function nh(t){var e=eh(t),i=[];return f(t,function(t){var n,a=t.coordinatesystem,o=a.getbaseaxis(),r=o.getextent();if("category"===o.type)n=o.getbandwidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],u=math.abs(r[1]-r[0]),h=o.scale.getextent(),c=math.abs(h[1]-h[0]);n=l?u/c*l:u}else{var d=t.getdata();n=math.abs(r[1]-r[0])/d.count()}var f=ir(t.get("barwidth"),n),p=ir(t.get("barmaxwidth"),n),g=ir(t.get("barminwidth")||1,n),m=t.get("bargap"),v=t.get("barcategorygap");i.push({bandwidth:n,barwidth:f,barmaxwidth:p,barminwidth:g,bargap:m,barcategorygap:v,axiskey:kh(o),stackid:lh(t)})}),rh(i)}function rh(t){var e={};f(t,function(t){var i=t.axiskey,n=t.bandwidth,a=e[i]||{bandwidth:n,remainedwidth:n,autowidthcount:0,categorygap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[i]=a;var r=t.stackid;o[r]||a.autowidthcount++,o[r]=o[r]||{width:0,maxwidth:0};var s=t.barwidth;s&&!o[r].width&&(o[r].width=s,s=math.min(a.remainedwidth,s),a.remainedwidth-=s);var l=t.barmaxwidth;l&&(o[r].maxwidth=l);var u=t.barminwidth;u&&(o[r].minwidth=u);var h=t.bargap;null!=h&&(a.gap=h);var c=t.barcategorygap;null!=c&&(a.categorygap=c)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,a=t.bandwidth,o=ir(t.categorygap,a),r=ir(t.gap,1),s=t.remainedwidth,l=t.autowidthcount,u=(s-o)/(l+(l-1)*r);u=math.max(u,0),f(n,function(t){var e=t.maxwidth,i=t.minwidth;if(t.width){var n=t.width;e&&(n=math.min(n,e)),i&&(n=math.max(n,i)),t.width=n,s-=n+r*n,l--}else{var n=u;e&&n>e&&(n=math.min(e,s)),i&&i>n&&(n=i),n!==u&&(t.width=n,s-=n+r*n,l--)}}),u=(s-o)/(l+(l-1)*r),u=math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{bandwidth:a,offset:d,width:t.width},d+=t.width*(1+r)})}),i}function zh(t,e,i){if(t&&e){var n=t[kh(e)];return null!=n&&null!=i&&(n=n[lh(i)]),n}}function bh(t,e){var i=oh(t,e),n=nh(i),a={};f(i,function(t){var e=t.getdata(),i=t.coordinatesystem,o=i.getbaseaxis(),r=lh(t),s=n[kh(o)][r],l=s.offset,u=s.width,h=i.getotheraxis(o),c=t.get("barminheight")||0;a[r]=a[r]||[],e.setlayout({bandwidth:s.bandwidth,offset:l,size:u});for(var d=e.mapdimension(h.dim),f=e.mapdimension(o.dim),p=vh(e,d),g=h.ishorizontal(),m=fh(o,h,p),v=0,y=e.count();y>v;v++){var x=e.get(d,v),_=e.get(f,v),w=x>=0?"p":"n",b=m;p&&(a[r][_]||(a[r][_]={p:m,n:m}),b=a[r][_][w]);var s,m,i,t;if(g){var a=i.datatopoint([x,_]);s=b,m=a[1]+l,i=a[0]-m,t=u,math.abs(i)i?-1:1)*c),isnan(i)||p&&(a[r][_][w]+=i)}else{var a=i.datatopoint([_,x]);s=a[0]+l,m=b,i=u,t=a[1]-m,math.abs(t)=t?-1:1)*c),isnan(t)||p&&(a[r][_][w]+=t)}e.setitemlayout(v,{x:s,y:m,width:i,height:t})}},this)}function vh(t){return t.coordinatesystem&&"cartesian2d"===t.coordinatesystem.type}function gh(t){return t.pipelinecontext&&t.pipelinecontext.large}function fh(t,e){return e.toglobalcoord(e.datatocoord("log"===e.type?1:0))}function wh(t,e){return lk(t,sk(e))}function hh(t,e){var i,n,a,o=t.type,r=e.getmin(),s=e.getmax(),l=null!=r,u=null!=s,h=t.getextent();"ordinal"===o?i=e.getcategories().length:(n=e.get("boundarygap"),_(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=ir(n[0],1),n[1]=ir(n[1],1),a=h[1]-h[0]||math.abs(h[0])),null==r&&(r="ordinal"===o?i?0:0/0:h[0]-n[0]*a),null==s&&(s="ordinal"===o?i?i-1:0/0:h[1]+n[1]*a),"datamin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"datamax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==r||!isfinite(r))&&(r=0/0),(null==s||!isfinite(s))&&(s=0/0),t.setblank(a(r)||a(s)||"ordinal"===o&&!t.getordinalmeta().categories.length),e.getneedcrosszero()&&(r>0&&s>0&&!l&&(r=0),0>r&&0>s&&!u&&(s=0));var c=e.ecmodel;if(c&&"time"===o){var d,p=oh("bar",c);if(f(p,function(t){d|=t.getbaseaxis()===e.axis}),d){var g=nh(p),m=zh(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function zh(t,e,i,n){var a=i.axis.getextent(),o=a[1]-a[0],r=zh(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;f(r,function(t){s=math.min(t.offset,s)});var l=-1/0;f(r,function(t){l=math.max(t.offset+t.width,l)}),s=math.abs(s),l=math.abs(l);var u=s+l,h=e-t,c=1-(s+l)/o,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function uh(t,e){var i=hh(t,e),n=null!=e.getmin(),a=null!=e.getmax(),o=e.get("splitnumber");"log"===t.type&&(t.base=e.get("logbase"));var r=t.type;t.setextent(i[0],i[1]),t.niceextent({splitnumber:o,fixmin:n,fixmax:a,mininterval:"interval"===r||"time"===r?e.get("mininterval"):null,maxinterval:"interval"===r||"time"===r?e.get("maxinterval"):null});var s=e.get("interval");null!=s&&t.setinterval&&t.setinterval(s)}function xh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new fl(t.getordinalmeta?t.getordinalmeta():t.getcategories(),[1/0,-1/0]);case"value":return new zl;default:return(bh.getclass(e)||zl).create(t)}}function yh(t){var e=t.scale.getextent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function jh(t){var e=t.getlabelmodel().get("formatter"),i="category"===t.type?t.scale.getextent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getlabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,a){return null!=i&&(a=n-i),e(qh(t,n),a)}:function(e){return t.scale.getlabel(e)}}function qh(t,e){return"category"===t.type?t.scale.getlabel(e):e}function kh(t){var e=t.model,i=t.scale;if(e.get("axislabel.show")&&!i.isblank()){var n,a,o="category"===t.type,r=i.getextent();o?a=i.count():(n=i.getticks(),a=n.length);var s,l=t.getlabelmodel(),u=jh(t),h=1;a>40&&(h=math.ceil(a/40));for(var c=0;a>c;c+=h){var d=n?n[c]:r[0]+c,f=u(d),p=l.gettextrect(f),g=$h(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function $h(t,e){var i=e*math.pi/180,n=t.plain(),a=n.width,o=n.height,r=a*math.cos(i)+o*math.sin(i),s=a*math.sin(i)+o*math.cos(i),l=new ti(n.x,n.y,r,s);return l}function jh(t){var e=t.get("interval");return null==e?"auto":e}function qh(t){return"category"===t.type&&0===jh(t.getlabelmodel())}function tc(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 ec(t,e,i,n,a,o,r){var s=0===t.indexof("empty");s&&(t=t.substr(5,1).tolowercase()+t.substr(6));var l;return l=0===t.indexof("image://")?mo(t.slice(8),new ti(e,i,n,a),r?"center":"cover"):0===t.indexof("path://")?so(t.slice(7),{},new ti(e,i,n,a),r?"center":"cover"):new bk({shape:{symboltype:t,x:e,y:i,width:n,height:a}}),l.__isemptybrush=s,l.setcolor=tc,l.setcolor(o),l}function ic(t){return xh(t.getsource(),t)}function nc(t,e){var i=e;vr.isinstance(e)||(i=new vr(e),c(i,pk));var n=xh(i);return n.setextent(t[0],t[1]),uh(n,i),n}function ac(t){c(t,pk)}function oc(t,e){return math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=a,l+=o,a=s,o=l,n.push([s/i,l/i])}return n}function hc(t){return"category"===t.type?dc(t):gc(t)}function cc(t,e){return"category"===t.type?pc(t,e):{ticks:t.scale.getticks()}}function dc(t){var e=t.getlabelmodel(),i=fc(t,e);return!e.get("show")||t.scale.isblank()?{labels:[],labelcategoryinterval:i.labelcategoryinterval}:i}function fc(t,e){var i=mc(t,"labels"),n=jh(e),a=vc(i,n);if(a)return a;var o,r;return w(n)?o=sc(t,n):(r="auto"===n?xc(t):n,o=bc(t,r)),yc(i,n,{labels:o,labelcategoryinterval:r})}function pc(t,e){var i=mc(t,"ticks"),n=jh(e),a=vc(i,n);if(a)return a;var o,r;if((!e.get("show")||t.scale.isblank())&&(o=[]),w(n))o=sc(t,n,!0);else if("auto"===n){var s=fc(t,t.getlabelmodel());r=s.labelcategoryinterval,o=p(s.labels,function(t){return t.tickvalue})}else r=n,o=bc(t,r,!0);return yc(i,n,{ticks:o,tickcategoryinterval:r})}function gc(t){var e=t.scale.getticks(),i=jh(t);return{labels:p(e,function(e,n){return{formattedlabel:i(e,n),rawlabel:t.scale.getlabel(e),tickvalue:e}})}}function mc(t,e){return ak(t)[e]||(ak(t)[e]=[])}function vc(t,e){for(var i=0;i40&&(s=math.max(1,math.floor(r/40)));for(var l=o[0],u=t.datatocoord(l+1)-t.datatocoord(l),h=math.abs(u*math.cos(n)),c=math.abs(u*math.sin(n)),d=0,f=0;l<=o[1];l+=s){var p=0,g=0,m=xi(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=math.max(d,p,7),f=math.max(f,g,7)}var v=d/h,y=f/c;isnan(v)&&(v=1/0),isnan(y)&&(y=1/0);var x=math.max(0,math.floor(math.min(v,y))),_=ak(t.model),w=t.getextent(),b=_.lastautointerval,s=_.lasttickcount;return null!=b&&null!=s&&math.abs(b-x)<=1&&math.abs(s-r)<=1&&b>x&&_.axisextend0===w[0]&&_.axisextend1===w[1]?x=b:(_.lasttickcount=r,_.lastautointerval=x,_.axisextend0=w[0],_.axisextend1=w[1]),x}function wc(t){var e=t.getlabelmodel();return{axisrotate:t.getrotate?t.getrotate():t.ishorizontal&&!t.ishorizontal()?90:0,labelrotate:e.get("rotate")||0,font:e.getfont()}}function bc(t,e,i){function n(t){l.push(i?t:{formattedlabel:a(t),rawlabel:o.getlabel(t),tickvalue:t})}var a=jh(t),o=t.scale,r=o.getextent(),s=t.getlabelmodel(),l=[],u=math.max((e||0)+1,1),h=r[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=math.round(math.ceil(h/u)*u));var d=qh(t),f=s.get("showminlabel")||d,p=s.get("showmaxlabel")||d;f&&h!==r[0]&&n(r[0]);for(var g=h;g<=r[1];g+=u)n(g);return p&&g-u!==r[1]&&n(r[1]),l}function sc(t,e,i){var n=t.scale,a=jh(t),o=[];return f(n.getticks(),function(t){var r=n.getlabel(t);e(t,r)&&o.push(i?t:{formattedlabel:a(t),rawlabel:r,tickvalue:t})}),o}function mc(t,e){var i=t[1]-t[0],n=e,a=i/n/2;t[0]+=a,t[1]-=a}function ic(t,e,i,n){function a(t,e){return t=tr(t),e=tr(e),d?t>e:e>t}var o=e.length;if(t.onband&&!i&&o){var r,s,l=t.getextent();if(1===o)e[0].coord=l[0],r=e[1]={coord:l[0]};else{var u=e[o-1].tickvalue-e[0].tickvalue,h=(e[o-1].coord-e[0].coord)/u;f(e,function(t){t.coord-=h/2});var c=t.scale.getextent();s=1+c[1]-e[o-1].tickvalue,r={coord:e[o-1].coord+h*s},e.push(r)}var d=l[0]>l[1];a(e[0].coord,l[0])&&(n?e[0].coord=l[0]:e.shift()),n&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],r.coord)&&(n?r.coord=l[1]:e.pop()),n&&a(r.coord,l[1])&&e.push({coord:l[1]})}}function tc(t){return this._axes[t]}function ac(t){ok.call(this,t)}function dc(t,e){return e.type||(e.data?"category":"value")}function cc(t,e){return t.getcoordsysmodel()===e}function lc(t,e,i){this._coordsmap={},this._coordslist=[],this._axesmap={},this._axeslist=[],this._initcartesian(t,e,i),this.model=t}function kc(t,e,i,n){function a(t){return t.dim+"_"+t.index}i.getaxesonzeroof=function(){return o?[o]:[]};var o,r=t[e],s=i.model,l=s.get("axisline.onzero"),u=s.get("axisline.onzeroaxisindex");if(l){if(null!=u)pc(r[u])&&(o=r[u]);else for(var h in r)if(r.hasownproperty(h)&&pc(r[h])&&!n[a(r[h])]){o=r[h];break}o&&(n[a(o)]=!0)}}function pc(t){return t&&"category"!==t.type&&"time"!==t.type&&yh(t)}function oc(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 ec(t){return p(wk,function(e){var i=t.getreferringcomponents(e)[0];return i})}function nc(t){return"cartesian2d"===t.get("coordinatesystem")}function rc(t,e){var i=t.mapdimension("defaultedlabel",!0),n=i.length;if(1===n)return il(t,e,i[0]);if(n){for(var a=[],o=0;o0?"bottom":"top":a.width>0?"left":"right";l||zc(t.style,f,n,u,o,i,g),uc(a)&&(f.fill=f.stroke="none"),wo(t,f)}function yc(t,e){var i=t.get(yk)||0,n=isnan(e.width)?number.max_value:math.abs(e.width),a=isnan(e.height)?number.max_value:math.abs(e.height);return math.min(i,n,a)}function jc(t,e,i){var n=t.getdata(),a=[],o=n.getlayout("valueaxishorizontal")?1:0;a[1-o]=n.getlayout("valueaxisstart");var r=n.getlayout("largedataindices"),s=n.getlayout("barwidth"),l=t.getmodel("backgroundstyle"),u=t.get("showbackground",!0);if(u){var h=n.getlayout("largebackgroundpoints"),c=[];c[1-o]=n.getlayout("backgroundstart");var d=new tp({shape:{points:h},incremental:!!i,__startpoint:c,__basedimidx:o,__largedataindices:r,__barwidth:s,silent:!0,z2:0});$c(d,l,n),e.add(d)}var f=new tp({shape:{points:n.getlayout("largepoints")},incremental:!!i,__startpoint:a,__basedimidx:o,__largedataindices:r,__barwidth:s});e.add(f),kc(f,t,n),f.seriesindex=t.seriesindex,t.get("silent")||(f.on("mousedown",ep),f.on("mousemove",ep))}function qc(t,e,i){var n=t.__basedimidx,a=1-n,o=t.shape.points,r=t.__largedataindices,s=math.abs(t.__barwidth/2),l=t.__startpoint[a];jk[0]=e,jk[1]=i;for(var u=jk[n],h=jk[1-n],c=u-s,d=u+s,f=0,p=o.length/2;p>f;f++){var g=2*f,m=o[g+n],v=o[g+a];if(m>=c&&d>=m&&(v>=l?h>=l&&v>=h:h>=v&&l>=h))return r[f]}return-1}function kc(t,e,i){var n=i.getvisual("bordercolor")||i.getvisual("color"),a=e.getmodel("itemstyle").getitemstyle(["color","bordercolor"]);t.usestyle(a),t.style.fill=null,t.style.stroke=n,t.style.linewidth=i.getlayout("barwidth")}function $c(t,e,i){var n=e.get("bordercolor")||e.get("color"),a=e.getitemstyle(["color","bordercolor"]);t.usestyle(a),t.style.fill=null,t.style.stroke=n,t.style.linewidth=i.getlayout("barwidth")}function jc(t,e,i){var n,a="polar"===i.type;return n=a?i.getarea():i.grid.getrect(),a?{cx:n.cx,cy:n.cy,r0:t?n.r0:e.r0,r:t?n.r:e.r,startangle:t?e.startangle:0,endangle:t?e.endangle:2*math.pi}:{x:t?e.x:n.x,y:t?n.y:e.y,width:t?e.width:n.width,height:t?n.height:e.height}}function qc(t,e,i){var n="polar"===t.type?ra:pa;return new n({shape:jc(e,i,t),silent:!0,z2:0})}function td(t,e,i,n){var a,o,r=pr(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return or(r-ip/2)?(o=l?"bottom":"top",a="center"):or(r-1.5*ip)?(o=l?"top":"bottom",a="center"):(o="middle",a=1.5*ip>r&&r>ip/2?l?"left":"right":l?"right":"left"),{rotation:r,textalign:a,textverticalalign:o}}function ed(t,e,i){if(!qh(t.axis)){var n=t.get("axislabel.showminlabel"),a=t.get("axislabel.showmaxlabel");e=e||[],i=i||[];var o=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];n===!1?(id(o),id(u)):nd(o,r)&&(n?(id(r),id(h)):(id(o),id(u))),a===!1?(id(s),id(c)):nd(l,s)&&(a?(id(l),id(d)):(id(s),id(c)))}}function id(t){t&&(t.ignore=!0)}function nd(t,e){var i=t&&t.getboundingrect().clone(),n=e&&e.getboundingrect().clone();if(i&&n){var a=ee([]);return be(a,a,-t.rotation),i.applytransform(re([],a,t.getlocaltransform())),n.applytransform(re([],a,e.getlocaltransform())),i.intersect(n)}}function ad(t){return"middle"===t||"center"===t}function od(t,e,i,n,a){for(var o=[],r=[],s=[],l=0;l=0||t===e}function gd(t){var e=md(t);if(e){var i=e.axispointermodel,n=e.axis.scale,a=i.option,o=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=yd(i);null==o&&(a.status=s?"show":"hide");var l=n.getextent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r0?i=n[0]:n[1]<0&&(i=n[1]),i}function nd(t,e,i,n){var a=0/0;t.stacked&&(a=i.get(i.getcalculationinfo("stackedoverdimension"),n)),isnan(a)&&(a=t.valuestart);var o=t.basedataoffset,r=[];return r[o]=i.get(t.basedim,n),r[1-o]=a,e.datatopoint(r)}function rd(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 zd(t){return isnan(t[0])||isnan(t[1])}function bd(t,e,i,n,a,o,r,s,l,u){return"none"!==u&&u?vd.apply(this,arguments):gd.apply(this,arguments)}function vd(t,e,i,n,a,o,r,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=a||0>d)break;if(zd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveto":"lineto"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;tp(dp,g),dp[m]=g[m]+v,tp(cp,p),cp[m]=p[m]-v,t.beziercurveto(dp[0],dp[1],cp[0],cp[1],p[0],p[1])}else t.lineto(p[0],p[1]);c=d,d+=o}return f}function gd(t,e,i,n,a,o,r,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=a||0>d)break;if(zd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveto":"lineto"](p[0],p[1]),tp(dp,p);else if(l>0){var g=d+o,m=e[g];if(h)for(;m&&zd(e[g]);)g+=o,m=e[g];var v=.5,y=e[c],m=e[g];if(!m||zd(m))tp(cp,p);else{zd(m)&&!h&&(m=p),y(ap,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=math.abs(p[w]-y[w]),_=math.abs(p[w]-m[w])}else x=us(p,y),_=us(p,m);v=_/(_+x),ip(cp,p,ap,-l*(1-v))}sp(dp,dp,s),mp(dp,dp,r),sp(cp,cp,s),mp(cp,cp,r),t.beziercurveto(dp[0],dp[1],cp[0],cp[1],p[0],p[1]),ip(dp,p,ap,l*v)}else t.lineto(p[0],p[1]);c=d,d+=o}return f}function fd(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;an[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function wd(t,e){if(t.length===e.length){for(var i=0;ia;a++)n.push(nd(i,t,e,a));return n}function ud(t,e,i){for(var n=e.getbaseaxis(),a="x"===n.dim||"radius"===n.dim?0:1,o=[],r=0;r=0;o--){var r=i[o].dimension,s=t.dimensions[r],l=t.getdimensioninfo(s);if(n=l&&l.coorddim,"x"===n||"y"===n){a=i[o];break}}if(a){var u=e.getaxis(n),h=p(a.stops,function(t){return{coord:u.toglobalcoord(u.datatocoord(t.value)),color:t.color}}),c=h.length,d=a.outercolors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,m=h[0].coord-g,v=h[c-1].coord+g,y=v-m;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-m)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var x=new ba(0,0,0,0,h,!0);return x[n]=m,x[n+"2"]=v,x}}}function yd(t,e,i){var n=t.get("showallsymbol"),a="auto"===n;if(!n||a){var o=i.getaxesbyscale("ordinal")[0];if(o&&(!a||!jd(o,e))){var r=e.mapdimension(o.dim),s={};return f(o.getviewlabels(),function(t){s[t.tickvalue]=1}),function(t){return!s.hasownproperty(e.get(r,t))}}}}function jd(t,e){var i=t.getextent(),n=math.abs(i[1]-i[0])/t.scale.count();isnan(n)&&(n=0);for(var a=e.count(),o=math.max(1,math.round(a/5)),r=0;a>r;r+=o)if(1.5*id.getsymbolsize(e,r)[t.ishorizontal()?1:0]>n)return!1;return!0}function qd(t,e,i){if("cartesian2d"===t.type){var n=t.getbaseaxis().ishorizontal(),a=vc(t,e,i);if(!i.get("clip",!0)){var o=a.shape,r=math.max(o.width,o.height);n?(o.y-=r,o.height+=2*r):(o.x-=r,o.width+=2*r)}return a}return gc(t,e,i)}function kd(t,e){this.getallnames=function(){var t=e();return t.maparray(t.getname)},this.containname=function(t){var i=e();return i.indexofname(t)>=0},this.indexofname=function(e){var i=t();return i.indexofname(e)},this.getitemvisual=function(e,i){var n=t();return n.getitemvisual(e,i)}}function $d(t,e,i,n){var a=e.getdata(),o=this.dataindex,r=a.getname(o),s=e.get("selectedoffset");n.dispatchaction({type:"pietoggleselect",from:t,name:r,seriesid:e.id}),a.each(function(t){jd(a.getitemgraphicel(t),a.getitemlayout(t),e.isselected(a.getname(t)),s,i)})}function jd(t,e,i,n,a){var o=(e.startangle+e.endangle)/2,r=math.cos(o),s=math.sin(o),l=i?n:0,u=[r*l,s*l];a?t.animate().when(200,{position:u}).start("bounceout"):t.attr("position",u)}function qd(t,e){fm.call(this);var i=new ra({z2:2}),n=new ca,a=new ia;this.add(i),this.add(n),this.add(a),this.updatedata(t,e,!0)}function tf(t,e,i,n,a,o,r,s,l,u){function h(e,i,n){for(var a=e;i>a&&!(t[a].y+n>l+r);a++)if(t[a].y+=n,a>e&&i>a+1&&t[a+1].y>t[a].y+t[a].height)return void c(a,n/2);c(i-1,n/2)}function c(e,i){for(var n=e;n>=0&&!(t[n].y-i0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function d(t,e,i,n,a,o){for(var r=o>0?e?number.max_value:0:e?number.max_value:0,s=0,l=t.length;l>s;s++)if("none"===t[s].labelalignto){var u=math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=a+h>u?math.sqrt((a+h+c)*(a+h+c)-u*u):math.abs(t[s].x-i);e&&d>=r&&(d=r-10),!e&&r>=d&&(d=r+10),t[s].x=i+d*o,r=d}}t.sort(function(t,e){return t.y-e.y});for(var f,p=0,g=t.length,m=[],v=[],y=0;g>y;y++){if("outer"===t[y].position&&"labelline"===t[y].labelalignto){var x=t[y].x-u;t[y].linepoints[1][0]+=x,t[y].x=u}f=t[y].y-p,0>f&&h(y,g,-f,a),p=t[y].y+t[y].height}0>r-p&&c(g-1,p-r);for(var y=0;g>y;y++)t[y].y>=i?v.push(t[y]):m.push(t[y]);d(m,!1,e,i,n,a),d(v,!0,e,i,n,a)}function ef(t,e,i,n,a,o,r,s){for(var l=[],u=[],h=number.max_value,c=-number.max_value,d=0;d0?"p":"n",o=n.getvisual("bordercolor"+a)||n.getvisual("color"+a),r=i.getmodel(io).getitemstyle(ao);e.usestyle(r),e.style.fill=null,e.style.stroke=o}function gf(t,e,i,n,a){var o;return o=i>n?-1:n>i?1:e>0?t.get(a,e-1)<=n?1:-1:1}function mf(t,e){var i,n=t.getbaseaxis(),a="category"===n.type?n.getbandwidth():(i=n.getextent(),math.abs(i[1]-i[0])/e.count()),o=ir(c(t.get("barmaxwidth"),a),a),r=ir(c(t.get("barminwidth"),1),a),s=t.get("barwidth");return null!=s?ir(s,a):math.max(math.min(a/2,o),r)}function vf(t,e,i){ck.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function yf(t,e,i){this._model=t,this.dimensions=[],this._indicatoraxes=p(t.getindicatormodels(),function(t,e){var i="indicator_"+e,n=new vf(i,"log"===t.get("axistype")?new fk:new zl);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startangle}function xf(t,e){return s({show:e},t)}function _f(t){return _(t)||(t=[+t,+t]),t}function wf(t){return!isnan(t[0])&&!isnan(t[1])}function bf(t){return[t.cx,t.cy]}function sf(){var t=bs();this.canvas=t,this.blursize=30,this.pointsize=20,this.maxopacity=1,this.minopacity=0,this._gradientpixels={}}function mf(t,e,i){var n=t[1]-t[0];e=p(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}});var a=e.length,o=0;return function(t){for(var n=o;a>n;n++){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){o=n;break}}if(n===a)for(var n=o-1;n>=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){o=n;break}}return n>=0&&a>n&&i[n]}}function if(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function tf(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function af(t){var e=t.maindata,i=t.datas;i||(i={main:e},t.datasattr={main:"data"}),t.datas=t.maindata=null,of(e,i,t),wo(i,function(i){wo(e.transferable_methods,function(e){i.wrapmethod(e,x(df,t))})}),e.wrapmethod("cloneshallow",x(lf,t)),wo(e.changable_methods,function(i){e.wrapmethod(i,x(cf,t))}),o(i[e.datatype]===e)}function df(t,e){if(pf(this)){var i=r({},this[bo]);i[this.datatype]=e,of(e,i,t)}else ef(e,this.datatype,this[so],t);return e}function cf(t,e){return t.struct&&t.struct.update(this),e}function lf(t,e){return wo(e[bo],function(i,n){i!==e&&ef(i.cloneshallow(),n,e,t)}),e}function kf(t){var e=this[so];return null==t||null==e?e:e[bo][t]}function pf(t){return t[so]===t}function of(t,e,i){t[bo]={},wo(e,function(e,n){ef(e,n,t,i)})}function ef(t,e,i,n){i[bo][e]=t,t[so]=i,t.datatype=e,n.struct&&(t[n.structattr]=n.struct,n.struct[n.datasattr[e]]=t),t.getlinkeddata=kf}function nf(t,e,i){this.root,this.data,this._nodes=[],this.hostmodel=t,this.levelmodels=p(e||[],function(e){return new vr(e,t,t.ecmodel)}),this.leavesmodel=new vr(i||{},t,t.ecmodel)}function rf(t,e){var i=e.children;t.parentnode!==e&&(i.push(t),t.parentnode=e)}function zf(t){t.hiernode={defaultancestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isexpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var r=i[o];r.hiernode={defaultancestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(r)}}function bf(t,e){var i=t.isexpand?t.children:[],n=t.parentnode.children,a=t.hiernode.i?n[t.hiernode.i-1]:null;if(i.length){hf(t);var o=(i[0].hiernode.prelim+i[i.length-1].hiernode.prelim)/2;a?(t.hiernode.prelim=a.hiernode.prelim+e(t,a),t.hiernode.modifier=t.hiernode.prelim-o):t.hiernode.prelim=o}else a&&(t.hiernode.prelim=a.hiernode.prelim+e(t,a));t.parentnode.hiernode.defaultancestor=zf(t,a,t.parentnode.hiernode.defaultancestor||n[0],e)}function vf(t){var e=t.hiernode.prelim+t.parentnode.hiernode.modifier;t.setlayout({x:e},!0),t.hiernode.modifier+=t.parentnode.hiernode.modifier}function gf(t){return arguments.length?t:qf}function ff(t,e){var i={};return t-=math.pi/2,i.x=e*math.cos(t),i.y=e*math.sin(t),i}function wf(t,e){return ts(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function hf(t){for(var e=t.children,i=e.length,n=0,a=0;--i>=0;){var o=e[i];o.hiernode.prelim+=n,o.hiernode.modifier+=n,a+=o.hiernode.change,n+=o.hiernode.shift+a}}function zf(t,e,i,n){if(e){for(var a=t,o=t,r=o.parentnode.children[0],s=e,l=a.hiernode.modifier,u=o.hiernode.modifier,h=r.hiernode.modifier,c=s.hiernode.modifier;s=uf(s),o=xf(o),s&&o;){a=uf(a),r=xf(r),a.hiernode.ancestor=t;var d=s.hiernode.prelim+c-o.hiernode.prelim-u+n(s,o);d>0&&(jf(yf(s,t,i),t,d),u+=d,l+=d),c+=s.hiernode.modifier,u+=o.hiernode.modifier,l+=a.hiernode.modifier,h+=r.hiernode.modifier}s&&!uf(a)&&(a.hiernode.thread=s,a.hiernode.modifier+=c-l),o&&!xf(r)&&(r.hiernode.thread=o,r.hiernode.modifier+=u-h,i=t)}return i}function uf(t){var e=t.children;return e.length&&t.isexpand?e[e.length-1]:t.hiernode.thread}function xf(t){var e=t.children;return e.length&&t.isexpand?e[0]:t.hiernode.thread}function yf(t,e,i){return t.hiernode.ancestor.parentnode===e.parentnode?t.hiernode.ancestor:i}function jf(t,e,i){var n=i/(e.hiernode.i-t.hiernode.i);e.hiernode.change-=n,e.hiernode.shift+=i,e.hiernode.modifier+=i,e.hiernode.prelim+=i,t.hiernode.change+=n}function qf(t,e){return t.parentnode===e.parentnode?1:2}function kf(){dm.call(this)}function $f(t){this.name=t,this.zoomlimit,dm.call(this),this._roamtransformable=new kf,this._rawtransformable=new kf,this._center,this._zoom}function jf(t,e,i,n){var a=i.seriesmodel,o=a?a.coordinatesystem:null;return o===this?o[t](n):null}function qf(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()}function tp(t,e,i,n){var a=t.target,o=t.zoomlimit,r=a.position,s=a.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var u=o.min||0,h=o.max||1/0;l=math.max(math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()}function ep(t,e,i){var n=ap(t);n[e]=i}function ip(t,e,i){var n=ap(t),a=n[e];a===i&&(n[e]=null)}function np(t,e){return!!ap(t)[e]}function ap(t){return t[to]||(t[to]={})}function op(t){this.pointerchecker,this._zr=t,this._opt={};var e=y,i=e(rp,this),a=e(sp,this),o=e(lp,this),r=e(up,this),l=e(hp,this);qs.call(this),this.setpointerchecker=function(t){this.pointerchecker=t},this.enable=function(e,u){this.disable(),this._opt=s(n(u)||{},{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",a),t.on("mouseup",o)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",r),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",a),t.off("mouseup",o),t.off("mousewheel",r),t.off("pinch",l)},this.dispose=this.disable,this.isdragging=function(){return this._dragging},this.ispinching=function(){return this._pinching}}function rp(t){if(!(ie(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 sp(t){if(this._dragging&&fp("moveonmousemove",t,this._opt)&&"pinch"!==t.gestureevent&&!np(this._zr,"globalpan")){var e=t.offsetx,i=t.offsety,n=this._x,a=this._y,o=e-n,r=i-a;this._x=e,this._y=i,this._opt.preventdefaultmousemove&&im(t.event),dp(this,"pan","moveonmousemove",t,{dx:o,dy:r,oldx:n,oldy:a,newx:e,newy:i})}}function lp(t){ie(t)||(this._dragging=!1)}function up(t){var e=fp("zoomonmousewheel",t,this._opt),i=fp("moveonmousewheel",t,this._opt),n=t.wheeldelta,a=math.abs(n),o=t.offsetx,r=t.offsety;if(0!==n&&(e||i)){if(e){var s=a>3?1.4:a>1?1.2:1.1,l=n>0?s:1/s;cp(this,"zoom","zoomonmousewheel",t,{scale:l,originx:o,originy:r})}if(i){var u=math.abs(n),h=(n>0?1:-1)*(u>3?.4:u>1?.15:.05);cp(this,"scrollmove","moveonmousewheel",t,{scrolldelta:h,originx:o,originy:r})}}}function hp(t){if(!np(this._zr,"globalpan")){var e=t.pinchscale>1?1.1:1/1.1;cp(this,"zoom",null,t,{scale:e,originx:t.pinchx,originy:t.pinchy})}}function cp(t,e,i,n,a){t.pointerchecker&&t.pointerchecker(n,a.originx,a.originy)&&(im(n.event),dp(t,e,i,n,a))}function dp(t,e,i,n,a){a.isavailablebehavior=y(fp,null,i,n),t.trigger(e,a)}function fp(t,e,i){var n=i[t];return!t||n&&(!b(n)||e.event[n+"key"])}function pp(t,e,i){var n=e.getcomponentbyelement(t.toptarget),a=n&&n.coordinatesystem;return n&&n!==i&&!ao[n.maintype]&&a&&a.model!==i}function gp(t,e){var i=t.getitemlayout(e);return i&&!isnan(i.x)&&!isnan(i.y)&&"none"!==t.getitemvisual(e,"symbol")}function mp(t,e,i){return i.itemmodel=e,i.itemstyle=e.getmodel("itemstyle").getitemstyle(),i.hoveritemstyle=e.getmodel("emphasis.itemstyle").getitemstyle(),i.linestyle=e.getmodel("linestyle").getlinestyle(),i.labelmodel=e.getmodel("label"),i.hoverlabelmodel=e.getmodel("emphasis.label"),i.symbolinnercolor=t.isexpand===!1&&0!==t.children.length?i.itemstyle.fill:"#fff",i}function vp(t,e,i,n,a,o){var r=!i,s=t.tree.getnodebydataindex(e),l=s.getmodel(),o=mp(s,l,o),u=t.tree.root,h=s.parentnode===u?s:s.parentnode||s,c=t.getitemgraphicel(h.dataindex),d=h.getlayout(),f=c?{x:c.position[0],y:c.position[1],rawx:c.__radialoldrawx,rawy:c.__radialoldrawy}:d,p=s.getlayout();r?(i=new id(t,e,o),i.attr("position",[f.x,f.y])):i.updatedata(t,e,o),i.__radialoldrawx=i.__radialrawx,i.__radialoldrawy=i.__radialrawy,i.__radialrawx=p.rawx,i.__radialrawy=p.rawy,n.add(i),t.setitemgraphicel(e,i),ar(i,{position:[p.x,p.y]},a);var g=i.getsymbolpath();if("radial"===o.layout){var m,v,y=u.children[0],x=y.getlayout(),_=y.children.length;if(p.x===x.x&&s.isexpand===!0){var w={};w.x=(y.children[0].getlayout().x+y.children[_-1].getlayout().x)/2,w.y=(y.children[0].getlayout().y+y.children[_-1].getlayout().y)/2,m=math.atan2(w.y-x.y,w.x-x.x),0>m&&(m=2*math.pi+m),v=w.xm&&(m=2*math.pi+m),0===s.children.length||0!==s.children.length&&s.isexpand===!1?(v=p.xx.x,v||(m-=math.pi));var b=v?"left":"right",s=o.labelmodel.get("rotate"),m=s*(math.pi/180);g.setstyle({textposition:o.labelmodel.get("position")||b,textrotation:null==s?-m:m,textorigin:"center",verticalalign:"middle"})}yp(a,s,u,i,f,d,p,n,o)}function yp(t,e,i,n,a,o,r,l,u){var h=u.edgeshape,c=n.__edge;if("curve"===h)e.parentnode&&e.parentnode!==i&&(c||(c=n.__edge=new ya({shape:_p(u,a,a),style:s({opacity:0,strokenoscale:!0},u.linestyle)})),ar(c,{shape:_p(u,o,r),style:{opacity:1}},t));else if("polyline"===h&&"orthogonal"===u.layout&&e!==i&&e.children&&0!==e.children.length&&e.isexpand===!0){for(var d=e.children,f=[],p=0;p=0;o--)n.push(a[o])}}function mp(t,e){var i=wf(t,e);t.layoutinfo=i;var n=t.get("layout"),a=0,o=0,r=null;"radial"===n?(a=2*math.pi,o=math.min(i.height,i.width)/2,r=gf(function(t,e){return(t.parentnode===e.parentnode?1:2)/t.depth})):(a=i.width,o=i.height,r=gf());var s=t.getdata().tree.root,l=s.children[0];if(l){zf(s),bp(l,bf,r),s.hiernode.modifier=-l.hiernode.prelim,sp(l,vf);var u=l,h=l,c=l;sp(l,function(t){var e=t.getlayout().x;eh.getlayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getlayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=a/(h.getlayout().x+d+f),g=o/(c.depth-1||1),sp(l,function(t){m=(t.getlayout().x+f)*p,v=(t.depth-1)*g;var e=ff(m,v);t.setlayout({x:e.x,y:e.y,rawx:m,rawy:v},!0)});else{var y=t.getorient();"rl"===y||"lr"===y?(g=o/(h.getlayout().x+d+f),p=a/(c.depth-1||1),sp(l,function(t){v=(t.getlayout().x+f)*g,m="lr"===y?(t.depth-1)*p:a-(t.depth-1)*p,t.setlayout({x:m,y:v},!0)})):("tb"===y||"bt"===y)&&(p=a/(h.getlayout().x+d+f),g=o/(c.depth-1||1),sp(l,function(t){m=(t.getlayout().x+f)*p,v="tb"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setlayout({x:m,y:v},!0)}))}}}function ip(t,e,i){if(t&&u(e,t.type)>=0){var n=i.getdata().tree.root,a=t.targetnode;if("string"==typeof a&&(a=n.getnodebyid(a)),a&&n.contains(a))return{node:a};var o=t.targetnodeid;if(null!=o&&(a=n.getnodebyid(o)))return{node:a}}}function tp(t){for(var e=[];t;)t=t.parentnode,t&&e.push(t);return e.reverse()}function ap(t,e){var i=tp(t);return u(i,e)>=0}function dp(t,e){for(var i=[];t;){var n=t.dataindex;i.push({name:t.name,dataindex:n,value:e.getrawvalue(n)}),t=t.parentnode}return i.reverse(),i}function cp(t){var e=0;f(t.children,function(t){cp(t);var i=t.value;_(i)&&(i=i[0]),e+=i});var i=t.value;_(i)&&(i=i[0]),(null==i||isnan(i))&&(i=e),0>i&&(i=0),_(t.value)?t.value[0]=i:t.value=i}function lp(t,e){var i=e.get("color");if(i){t=t||[];var n;if(f(t,function(t){var e=new vr(t),i=e.get("color");(e.get("itemstyle.color")||i&&"none"!==i)&&(n=!0)}),!n){var a=t[0]||(t[0]={});a.color=i.slice()}return t}}function kp(t){this.group=new fm,t.add(this.group)}function pp(t,e,i,n,a,o){var r=[[a?t:t-po,e],[t+i,e],[t+i,e+n],[a?t:t-po,e+n]];return!o&&r.splice(2,0,[t+i+po,e+n/2]),!a&&r.push([t,e+n/2]),r}function op(t,e,i){t.eventdata={componenttype:"series",componentsubtype:"treemap",componentindex:e.componentindex,seriesindex:e.componentindex,seriesname:e.name,seriestype:"treemap",selftype:"breadcrumb",nodedata:{dataindex:i&&i.dataindex,name:i&&i.name},treepathinfo:i&&dp(i,e)}}function ep(){var t,e=[],i={};return{add:function(t,n,a,o,r){return b(o)&&(r=o,o=0),i[t.id]?!1:(i[t.id]=1,e.push({el:t,target:n,time:a,delay:o,easing:r}),!0)},done:function(e){return t=e,this},start:function(){function n(){a--,a||(e.length=0,i={},t&&t())}for(var a=e.length,o=0,r=e.length;r>o;o++){var s=e[o];s.el.animateto(s.target,s.time,s.delay,s.easing,n)}return this}}}function np(){return{nodegroup:[],background:[],content:[]}}function rp(t,e,i,a,o,s,l,u,h,c){function d(e,i,n){if(i.dataindex=l.dataindex,i.seriesindex=t.seriesindex,i.setshape({x:0,y:0,width:w,height:b}),m)p(i);else{i.invisible=!1;var a=l.getvisual("bordercolor",!0),o=p.get("bordercolor"),r=xo(k);r.fill=a;var s=uo(p);if(s.fill=o,n){var u=w-2*s;g(r,s,a,u,c,{x:s,y:0,width:u,height:c})}else r.text=s.text=null;i.setstyle(r),ro(i,s)}e.add(i)}function f(e,i){i.dataindex=l.dataindex,i.seriesindex=t.seriesindex;var n=math.max(w-2*s,0),a=math.max(b-2*s,0);if(i.culling=!0,i.setshape({x:s,y:s,width:n,height:a}),m)p(i);else{i.invisible=!1;var o=l.getvisual("color",!0),r=xo(k);r.fill=o;var s=uo(p);g(r,s,o,n,a),i.setstyle(r),ro(i,s)}e.add(i)}function p(t){!t.invisible&&s.push(t)}function g(e,i,a,o,r,s){var u=d(t.getformattedlabel(l.dataindex,"normal",null,null,s?"upperlabel":"label"),e.get("name"));if(!s&&x.isleafroot){var h=t.get("drilldownicon",!0);u=h?h+" "+u:u}var c=e.getmodel(s?go:bo),d=e.getmodel(s?fo:vo),f=c.getshallow("show");xo(e,i,c,d,{defaulttext:f?u:null,autocolor:a,isrecttext:!0}),s&&(e.textrect=n(s)),e.truncate=f&&c.get("ellipsis")?{outerwidth:o,outerheight:r,minchar:2}:null}function m(t,n,a,r){var s=null!=t&&i[t][t],l=o[t];return s?(i[t][t]=null,v(l,s,t)):m||(s=new n({z:zp(a,r)}),s.__tmdepth=a,s.__tmstoragename=t,y(l,s,t)),e[t][i]=s}function v(t,e,i){var n=t[i]={};n.old="nodegroup"===i?e.position.slice():r({},e.shape)}function y(t,e,i){var n=t[i]={},r=l.parentnode;if(r&&(!a||"drilldown"===a.direction)){var s=0,u=0,h=o.background[r.getrawindex()];!a&&h&&h.old&&(s=h.old.width,u=h.old.height),n.old="nodegroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}n.fadein="nodegroup"!==i}if(l){var x=l.getlayout(),_=t.getdata();if(_.setitemgraphicel(l.dataindex,null),x&&x.isinview){var w=x.width,b=x.height,s=x.borderwidth,m=x.invisible,i=l.getrawindex(),t=u&&u.getrawindex(),a=l.viewchildren,c=x.upperheight,l=a&&a.length,k=l.getmodel("itemstyle"),p=l.getmodel("emphasis.itemstyle"),o=m("nodegroup",eo);if(o){if(h.add(o),o.attr("position",[x.x||0,x.y||0]),o.__tmnodewidth=w,o.__tmnodeheight=b,x.isaboveviewroot)return o;var e=l.getmodel(),n=m("background",no,c,ho);if(n&&d(o,n,l&&x.upperheight),l)zo(o)&&ho(o,!1),n&&(ho(n,!0),_.setitemgraphicel(l.dataindex,n));else{var r=m("content",no,c,zo);r&&f(o,r),n&&zo(n)&&ho(n,!1),ho(o,!0),_.setitemgraphicel(l.dataindex,o)}return o}}}}function zp(t,e){var i=t*wo+e;return(i-1)/i}function bp(t){var e=t.piecelist;t.hasspecialvisual=!1,f(e,function(e,i){e.originindex=i,null!=e.visual&&(t.hasspecialvisual=!0)})}function vp(t){var e=t.categories,i=t.visual,n=t.categorymap={};if(ko(e,function(t,e){n[t]=e}),!_(i)){var a=[];s(i)?ko(i,function(t,e){var i=n[e];a[null!=i?i:jo]=t}):a[jo]=i,i=jp(t,a)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function gp(t,e){var i=t.visual,n=[];s(i)?ko(i,function(t){n.push(t)}):null!=i&&n.push(i);var a={color:1,symbol:1};e||1!==n.length||a.hasownproperty(t.type)||(n[1]=n[0]),jp(t,n) }function fp(t){return{applyvisual:function(e,i,n){e=this.mapvaluetovisual(e),n("color",t(i("color"),e))},_domap:xp([0,1])}}function wp(t){var e=this.option.visual;return e[math.round(mr(t,[0,1],[0,e.length-1],!0))]||{}}function hp(t){return function(e,i,n){n(t,this.mapvaluetovisual(e))}}function zp(t){var e=this.option.visual;return e[this.option.loop&&t!==jo?t%e.length:t]}function up(){return this.option.visual[0]}function xp(t){return{linear:function(e){return mr(e,t,this.option.visual,!0)},category:zp,piecewise:function(e,i){var n=yp.call(this,i);return null==n&&(n=mr(e,t,this.option.visual,!0)),n},fixed:up}}function yp(t){var e=this.option,i=e.piecelist;if(e.hasspecialvisual){var n=qo.findpieceindex(t,i),a=i[n];if(a&&a.visual)return a.visual[this.type]}}function jp(t,e){return t.visual=e,"color"===t.type&&(t.parsedvisual=p(e,function(t){return ti(t)})),e}function qp(t,e,i){return t?i>=e:i>e}function kp(t,e,i,n,a,o){var r=t.getmodel(),s=t.getlayout();if(s&&!s.invisible&&s.isinview){var l,u=t.getmodel(ne),h=i[t.depth],c=$p(u,e,h,n),d=u.get("bordercolor"),p=u.get("bordercolorsaturation");null!=p&&(l=jp(c,t),d=qp(p,l)),t.setvisual("bordercolor",d);var g=t.viewchildren;if(g&&g.length){var m=eg(t,r,s,u,c,g);f(g,function(t,e){if(t.depth>=a.length||t===a[t.depth]){var s=ng(r,c,t,e,m,o);kp(t,s,i,n,a,o)}})}else l=jp(c,t),t.setvisual("color",l)}}function $p(t,e,i,n){var a=r({},e);return f(["color","coloralpha","colorsaturation"],function(o){var r=t.get(o,!0);null==r&&i&&(r=i[o]),null==r&&(r=e[o]),null==r&&(r=n.get(o)),null!=r&&(a[o]=r)}),a}function jp(t){var e=tg(t,"color");if(e){var i=tg(t,"coloralpha"),n=tg(t,"colorsaturation");return n&&(e=si(e,null,null,n)),i&&(e=li(e,i)),e}}function qp(t,e){return null!=e?si(e,null,null,t):null}function tg(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function eg(t,e,i,n,a,o){if(o&&o.length){var r=ig(e,"color")||null!=a.color&&"none"!==a.color&&(ig(e,"coloralpha")||ig(e,"colorsaturation"));if(r){var s=e.get("visualmin"),l=e.get("visualmax"),u=i.dataextent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colormappingby"),c={type:r.name,dataextent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingmethod="linear":(c.mappingmethod="category",c.loop=!0);var d=new qo(c);return d.__drcolormappingby=h,d}}}function ig(t,e){var i=t.get(e);return ie(i)&&i.length?{name:e,range:i}:null}function ng(t,e,i,n,a,o){var s=r({},e);if(a){var l=a.type,u="color"===l&&a.__drcolormappingby,h="index"===u?n:"id"===u?o.mapidtoindex(i.getid()):i.getvalue(t.get("visualdimension"));s[l]=a.mapvaluetovisual(h)}return s}function ag(t,e,i,n){var a,o;if(!t.isremoved()){var r=t.getlayout();a=r.width,o=r.height;var s=t.getmodel(),l=s.get(ue),u=s.get(he)/2,h=pg(s),c=math.max(l,h),d=l-u,f=c-u,s=t.getmodel();t.setlayout({borderwidth:l,upperheight:c,upperlabelheight:h},!0),a=oe(a-2*d,0),o=oe(o-d-f,0);var p=a*o,g=og(t,s,p,e,i,n);if(g.length){var m={x:d,y:f,width:a,height:o},v=re(a,o),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;w>_;){var b=g[_];x.push(b),x.area+=b.getlayout().area;var s=ug(x,v,e.squareratio);y>=s?(_++,y=s):(x.area-=x.pop().getlayout().area,hg(x,v,m,u,!1),v=re(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&hg(x,v,m,u,!0),!i){var m=s.get("childrenvisiblemin");null!=m&&m>p&&(i=!0)}for(var _=0,w=g.length;w>_;_++)ag(g[_],e,i,n+1)}}}function og(t,e,i,n,a,o){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafdepth&&n.leafdepth<=o;if(a&&!l)return t.viewchildren=[];r=m(r,function(t){return!t.isremoved()}),sg(r,s);var u=lg(e,r,s);if(0===u.sum)return t.viewchildren=[];if(u.sum=rg(e,i,u.sum,s,r),0===u.sum)return t.viewchildren=[];for(var h=0,c=r.length;c>h;h++){var d=r[h].getvalue()/u.sum*i;r[h].setlayout({area:d})}return l&&(r.length&&t.setlayout({isleafroot:!0},!0),r.length=0),t.viewchildren=r,t.setlayout({dataextent:u.dataextent},!0),r}function rg(t,e,i,n,a){if(!n)return i;for(var o=t.get("visiblemin"),r=a.length,s=r,l=r-1;l>=0;l--){var u=a["asc"===n?r-l-1:l].getvalue();o>u/i*e&&(s=l,i-=u)}return"asc"===n?a.splice(0,r-s):a.splice(s,r-s),i}function sg(t,e){return e&&t.sort(function(t,i){var n="asc"===e?t.getvalue()-i.getvalue():i.getvalue()-t.getvalue();return 0===n?"asc"===e?t.dataindex-i.dataindex:i.dataindex-t.dataindex:n}),t}function lg(t,e,i){for(var n=0,a=0,o=e.length;o>a;a++)n+=e[a].getvalue();var r,s=t.get("visualdimension");if(e&&e.length)if("value"===s&&i)r=[e[e.length-1].getvalue(),e[0].getvalue()],"asc"===i&&r.reverse();else{var r=[1/0,-1/0];le(e,function(t){var e=t.getvalue(s);er[1]&&(r[1]=e)})}else r=[0/0,0/0];return{sum:n,dataextent:r}}function ug(t,e,i){for(var n,a=0,o=1/0,r=0,s=t.length;s>r;r++)n=t[r].getlayout().area,n&&(o>n&&(o=n),n>a&&(a=n));var l=t.area*t.area,u=e*e*i;return l?oe(u*a/l,l/(u*o)):1/0}function hg(t,e,i,n,a){var o=e===i.width?0:1,r=1-o,s=["x","y"],l=["width","height"],u=i[s[o]],h=e?t.area/e:0;(a||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;d>c;c++){var f=t[c],p={},g=h?f.getlayout().area/h:0,m=p[l[r]]=oe(h-2*n,0),v=i[s[o]]+i[l[o]]-u,y=c===d-1||g>v?v:g,x=p[l[o]]=oe(y-2*n,0);p[s[r]]=i[s[r]]+re(n,m/2),p[s[o]]=u+re(n,x/2),u+=y,f.setlayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function cg(t,e,i,n,a){var o=(e||{}).node,r=[n,a];if(!o||o===i)return r;for(var s,l=n*a,u=l*t.option.zoomtonoderatio;s=o.parentnode;){for(var h=0,c=s.children,d=0,f=c.length;f>d;d++)h+=c[d].getvalue();var p=o.getvalue();if(0===p)return r;u*=h/p;var g=s.getmodel(),m=g.get(ue),v=math.max(m,pg(g,m));u+=4*m*m+(3*m+v)*math.pow(u,.5),u>ja&&(u=ja),o=s}l>u&&(u=l);var y=math.pow(u/l,.5);return[n*y,a*y]}function dg(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var a=i.node,o=a.getlayout();if(!o)return n;for(var r=[o.width/2,o.height/2],s=a;s;){var l=s.getlayout();r[0]+=l.x,r[1]+=l.y,s=s.parentnode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}function fg(t,e,i,n,a){var o=t.getlayout(),r=i[a],s=r&&r===t;if(!(r&&!s||a===i.length&&t!==n)){t.setlayout({isinview:!0,invisible:!s&&!e.intersect(o),isaboveviewroot:s},!0);var l=new ti(e.x-o.x,e.y-o.y,e.width,e.height);le(t.viewchildren||[],function(t){fg(t,l,i,n,a+1)})}}function pg(t){return t.get(ce)?t.get(de):0}function gg(t){var e=0;f(t.children,function(t){gg(t);var i=t.value;_(i)&&(i=i[0]),e+=i});var i=t.value;_(i)&&(i=i[0]),(null==i||isnan(i))&&(i=e),0>i&&(i=0),_(t.value)?t.value[0]=i:t.value=i}function mg(t,e,i){function n(){r.ignore=r.hoverignore}function a(){r.ignore=r.normalignore}fm.call(this);var o=new ra({z2:ge});o.seriesindex=e.seriesindex;var r=new ia({z2:me,silent:t.getmodel("label").get("silent")});this.add(o),this.add(r),this.updatedata(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",a).on("mouseover",n).on("mouseout",a)}function vg(t,e,i){var n=t.getvisual("color"),a=t.getvisual("visualmeta");a&&0!==a.length||(n=null);var o=t.getmodel("itemstyle").get("color");if(o)return o;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return o=i.option.color[yg(t)%r]}function yg(t){for(var e=t;e.depth>1;)e=e.parentnode;var i=t.getancestors()[0];return u(i.children,e)}function xg(t,e,i){return i===pe.none?!1:i===pe.self?t===e:i===pe.ancestor?t===e||t.isancestorof(e):t===e||t.isdescendantof(e)}function _g(t,e,i){var n=e.getdata();n.setitemvisual(t.dataindex,"color",i)}function wg(t,e){var i=t.children||[];t.children=bg(i,e),i.length&&f(t.children,function(t){wg(t,e)})}function bg(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getvalue()-e.getvalue())*(i?1:-1);return 0===n?(t.dataindex-e.dataindex)*(i?-1:1):n})}function sg(t){for(var e,i=0;i1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else o=t.getboxlayoutparams(),o.aspect=c,f=ts(o,{width:u,height:h});this.setviewrect(f.x,f.y,f.width,f.height),this.setcenter(t.get("center")),this.setzoom(t.get("zoom"))}function rg(t,e){f(e.get("geocoord"),function(e,i){t.addgeocoord(i,e)})}function zg(t,e){var i={};return f(t,function(t){t.each(t.mapdimension("value"),function(e,n){var a="ec-"+t.getname(n);i[a]=i[a]||[],isnan(e)||i[a].push(e)})}),t[0].map(t[0].mapdimension("value"),function(n,a){for(var o="ec-"+t[0].getname(a),r=0,s=1/0,l=-1/0,u=i[o].length,h=0;u>h;h++)s=math.min(s,i[o][h]),l=math.max(l,i[o][h]),r+=i[o][h];var c;return c="min"===e?s:"max"===e?l:"average"===e?r/u:r,0===u?0/0:c})}function bg(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),o([i,t[0],t[1]])}))}function vg(t){return isnan(+t.cpx1)||isnan(+t.cpy1)}function gg(t){return"_"+t+"type"}function fg(t,e,i){var n=e.getitemvisual(i,"color"),a=e.getitemvisual(i,t),o=e.getitemvisual(i,t+"size");if(a&&"none"!==a){_(o)||(o=[o,o]);var r=ec(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function wg(t){var e=new tn({name:"line",subpixeloptimize:!0});return hg(e.shape,t),e}function hg(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=0/0,t.cpy1=0/0)}function zg(){var t=this,e=t.childofname("fromsymbol"),i=t.childofname("tosymbol"),n=t.childofname("label");if(e||i||!n.ignore){for(var a=1,o=this.parent;o;)o.scale&&(a/=o.scale[0]),o=o.parent;var r=t.childofname("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointat(0),u=r.pointat(s),h=y([],u,l);if(te(h,h),e){e.attr("position",l);var c=r.tangentat(0);e.attr("rotation",math.pi/2-math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",u);var c=r.tangentat(1);i.attr("rotation",-math.pi/2-math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g,m=n.__labeldistance,v=m[0]*a,y=m[1]*a,x=s/2,c=r.tangentat(x),_=[c[1],-c[0]],w=r.pointat(x);_[1]>0&&(_[0]=-_[0],_[1]=-_[1]);var b=c[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var s=-math.atan2(c[1],c[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":d=[-h[0]*v+l[0],-h[1]*y+l[1]],f=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insidestarttop":case"insidestart":case"insidestartbottom":d=[v*b+l[0],l[1]+m],f=c[0]<0?"right":"left",g=[-v*b,-m];break;case"insidemiddletop":case"insidemiddle":case"insidemiddlebottom":case"middle":d=[w[0],w[1]+m],f="center",g=[0,-m];break;case"insideendtop":case"insideend":case"insideendbottom":d=[-v*b+u[0],u[1]+m],f=c[0]>=0?"right":"left",g=[v*b,-m]}n.attr({style:{textverticalalign:n.__verticalalign||p,textalign:n.__textalign||f},position:d,scale:[a,a],origin:g})}}}}function ug(t,e,i){fm.call(this),this._createline(t,e,i)}function xg(t){this._ctor=t||ug,this.group=new fm}function yg(t,e,i,n){var a=e.getitemlayout(i);if($g(a)){var o=new t._ctor(e,i,n);e.setitemgraphicel(i,o),t.group.add(o)}}function jg(t,e,i,n,a,o){var r=e.getitemgraphicel(n);return $g(i.getitemlayout(a))?(r?r.updatedata(i,a,o):r=new t._ctor(i,a,o),i.setitemgraphicel(a,r),void t.group.add(r)):void t.group.remove(r)}function qg(t){var e=t.hostmodel;return{linestyle:e.getmodel("linestyle").getlinestyle(),hoverlinestyle:e.getmodel("emphasis.linestyle").getlinestyle(),labelmodel:e.getmodel("label"),hoverlabelmodel:e.getmodel("emphasis.label")}}function kg(t){return isnan(t[0])||isnan(t[1])}function $g(t){return!kg(t[0])&&!kg(t[1])}function jg(t,e,i){fm.call(this),this.add(this.createline(t,e,i)),this._updateeffectsymbol(t,e)}function qg(t,e,i){fm.call(this),this._createpolyline(t,e,i)}function tm(t,e,i){jg.call(this,t,e,i),this._lastframe=0,this._lastframepercent=0}function em(){this.group=new fm}function im(t){return t instanceof array||(t=[t,t]),t}function nm(t){return"_ec_"+t}function am(t,e){this.id=null==t?"":t,this.inedges=[],this.outedges=[],this.edges=[],this.hostgraph,this.dataindex=null==e?-1:e}function om(t,e,i){this.node1=t,this.node2=e,this.dataindex=null==i?-1:i}function rm(t){var e=t.coordinatesystem;if("view"!==e.type)return 1;var i=t.option.nodescaleratio,n=e.scale,a=n&&n[0]||1,o=e.getzoom(),r=(o-1)*i+1;return r/a}function sm(t){var e=t.getvisual("symbolsize");return e instanceof array&&(e=(e[0]+e[1])/2),+e}function lm(t,e,i){for(var n,a=t[0],o=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;.9>=h;h+=.1){vn[0]=_n(a[0],o[0],r[0],h),vn[1]=_n(a[1],o[1],r[1],h);var c=bn(wn(vn,e)-l);s>c&&(s=c,n=h)}for(var d=0;32>d;d++){var f=n+u;yn[0]=_n(a[0],o[0],r[0],n),yn[1]=_n(a[1],o[1],r[1],n),xn[0]=_n(a[0],o[0],r[0],f),xn[1]=_n(a[1],o[1],r[1],f);var c=wn(yn,e)-l;if(bn(c)<.01)break;var p=wn(xn,e)-l;u/=2,0>c?p>=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function um(t,e){var i=t.getvisual("opacity");return null!=i?i:t.getmodel().get(e)}function hm(t,e,i){var n=t.getgraphicel(),a=um(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){if(!t.isgroup){var e=t.linelabeloriginalopacity;(null==e||null!=i)&&(e=a),t.setstyle("opacity",e)}})}function cm(t,e){var i=um(t,e),n=t.getgraphicel();n.traverse(function(t){!t.isgroup&&t.setstyle("opacity",i)}),n.highlight&&n.highlight()}function dm(t){return t instanceof array||(t=[t,t]),t}function fm(t){var e=t.coordinatesystem;if(!e||"view"===e.type){var i=t.getgraph();i.eachnode(function(t){var e=t.getmodel();t.setlayout([+e.get("x"),+e.get("y")])}),pm(i)}}function pm(t){t.eachedge(function(t){var e=t.getmodel().get("linestyle.curveness")||0,i=h(t.node1.getlayout()),n=h(t.node2.getlayout()),a=[i,n];+e&&a.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setlayout(a)})}function gm(t,e){var i=t.coordinatesystem;if(!i||"view"===i.type){var n=i.getboundingrect(),a=t.getdata(),o=a.graph,r=n.width/2+n.x,s=n.height/2+n.y,l=math.min(n.width,n.height)/2,u=a.count();a.setlayout({cx:r,cy:s}),u&&(nn[e](t,i,o,a,l,r,s,u),o.eachedge(function(t){var e,i=t.getmodel().get("linestyle.curveness")||0,n=h(t.node1.getlayout()),a=h(t.node2.getlayout()),o=(n[0]+a[0])/2,l=(n[1]+a[1])/2;+i&&(i*=3,e=[r*i+o*(1-i),s*i+l*(1-i)]),t.setlayout([n,a,e])}))}}function mm(t,e,i){for(var n=i.rect,a=n.width,o=n.height,r=[n.x+a/2,n.y+o/2],s=null==i.gravity?.1:i.gravity,l=0;lo;o++){var p=t[o];p.fixed||(y(n,r,p.p),zn(p.p,p.p,n,s*c))}for(var o=0;a>o;o++)for(var u=t[o],g=o+1;a>g;g++){var h=t[g];y(n,h.p,u.p);var d=j(n);0===d&&(z(n,math.random()-.5,math.random()-.5),d=1);var m=(u.rep+h.rep)/d/d;!u.fixed&&zn(u.pp,u.pp,n,m),!h.fixed&&zn(h.pp,h.pp,n,-m)}for(var v=[],o=0;a>o;o++){var p=t[o];p.fixed||(y(v,p.p,p.pp),zn(p.p,p.p,v,c),w(p.pp,p.p))}c=.992*c,i&&i(t,e,.01>c)}}}function vm(t,e,i){var n=t.getboxlayoutparams();return n.aspect=i,ts(n,{width:e.getwidth(),height:e.getheight()})}function ym(t,e,i,n,a){var o=t.ends,r=new hn({shape:{points:a?_m(o,n,t):o}});return xm(t,r,e,i,a),r}function xm(t,e,i,n,a){var o=i.hostmodel,r=va[a?"initprops":"updateprops"];r(e,{shape:{points:t.ends}},o,n);var s=i.getitemmodel(n),l=s.getmodel(fn),u=i.getitemvisual(n,"color"),h=l.getitemstyle(["bordercolor"]);h.stroke=u,h.strokenoscale=!0,e.usestyle(h),e.z2=100;var c=s.getmodel(wn).getitemstyle();wo(e,c)}function _m(t,e,i){return p(t,function(t){return t=t.slice(),t[e]=i.initbaseline,t})}function wm(t){var e=[],i=[];return t.eachseriesbytype("boxplot",function(t){var n=t.getbaseaxis(),a=u(i,n);0>a&&(a=i.length,i[a]=n,e[a]={axis:n,seriesmodels:[]}),e[a].seriesmodels.push(t)}),e}function bm(t){var e,i,n=t.axis,a=t.seriesmodels,o=a.length,r=t.boxwidthlist=[],s=t.boxoffsetlist=[],l=[];if("category"===n.type)i=n.getbandwidth();else{var u=0;xn(a,function(t){u=math.max(u,t.getdata().count())}),e=n.getextent(),math.abs(e[1]-e[0])/u}xn(a,function(t){var e=t.get("boxwidth");_(e)||(e=[e,e]),l.push([ir(e[0],i)||0,ir(e[1],i)||0])});var h=.8*i-2,c=h/o*.3,d=(h-c*(o-1))/o,f=d/2-h/2;xn(a,function(t,e){s.push(f),f+=c+d,r.push(math.min(math.max(d,l[e][0]),l[e][1]))})}function sm(t,e,i){function n(t,i,n){var a=s.get(i,n),o=[];o[u]=t,o[h]=a;var l;return isnan(t)||isnan(a)?l=[0/0,0/0]:(l=r.datatopoint(o),l[u]+=e),l}function a(t,e,i){var n=e.slice(),a=e.slice();n[u]+=l,a[u]-=l,i?t.push(n,a):t.push(a,n)}function o(t,e){var i=e.slice(),n=e.slice();i[u]-=l,n[u]+=l,t.push(i,n)}var r=t.coordinatesystem,s=t.getdata(),l=i/2,u="horizontal"===t.get("layout")?0:1,h=1-u,c=["x","y"],d=s.mapdimension(c[u]),f=s.mapdimension(c[h],!0);if(!(null==d||f.length<5))for(var p=0;p0?-1:0>i?1:e?-1:1}}function am(t,e){return math.min(null!=e[1]?e[1]:1/0,math.max(null!=e[0]?e[0]:-1/0,t))}function dm(t,e,i){this._axesmap=b(),this._axeslayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function cm(t,e){return jn(qn(t,e[0]),e[1])}function lm(t,e){var i=e.layoutlength/(e.axiscount-1);return{position:i*t,axisnameavailablewidth:i,axislabelshow:!0}}function km(t,e){var i,n,a=e.layoutlength,o=e.axisexpandwidth,r=e.axiscount,s=e.axiscollapsewidth,l=e.wininnerindices,u=s,h=!1;return tpr}function km(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function $m(t,e,i,n){var a=new fm;return a.add(new pa({name:"main",style:ev(i),silent:!0,draggable:!0,cursor:"move",drift:sr(t,e,a,"nswe"),ondragend:sr(jm,e,{isend:!0})})),lr(n,function(i){a.add(new pa({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:sr(t,e,a,i),ondragend:sr(jm,e,{isend:!0})}))}),a}function jm(t,e,i,n){var a=n.brushstyle.linewidth||0,o=cr(a,gr),r=i[0][0],s=i[1][0],l=r-a/2,u=s-a/2,h=i[0][1],c=i[1][1],d=h-o+a/2,f=c-o+a/2,p=h-r,g=c-s,m=p+a,v=g+a;tv(t,e,"main",r,s,p,g),n.transformable&&(tv(t,e,"w",l,u,o,v),tv(t,e,"e",d,u,o,v),tv(t,e,"n",l,u,m,o),tv(t,e,"s",l,f,m,o),tv(t,e,"nw",l,u,o,o),tv(t,e,"ne",d,u,o,o),tv(t,e,"sw",l,f,o,o),tv(t,e,"se",d,f,o,o))}function qm(t,e){var i=e.__brushoption,n=i.transformable,a=e.childat(0);a.usestyle(ev(i)),a.attr({silent:!n,cursor:n?"move":"default"}),lr(["w","e","n","s","se","sw","ne","nw"],function(i){var a=e.childofname(i),o=av(t,i);a&&a.attr({silent:!n,invisible:!n,cursor:n?yr[o]+"-resize":null})})}function tv(t,e,i,n,a,o,r){var s=e.childofname(i);s&&s.setshape(uv(lv(t,e,[[n,a],[n+o,a+r]])))}function ev(t){return s({strokenoscale:!0},t.brushstyle)}function iv(t,e,i,n){var a=[hr(t,i),hr(e,n)],o=[cr(t,i),cr(e,n)];return[[a[0],o[0]],[a[1],o[1]]]}function nv(t){return rr(t.group)}function av(t,e){if(e.length>1){e=e.split("");var i=[av(t,e[0]),av(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var n={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=lr(n[e],nv(t));return a[i]}function ov(t,e,i,n,a,o,r){var s=n.__brushoption,l=t(s.range),u=sv(i,o,r);lr(a.split(""),function(t){var e=vr[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(iv(l[0][0],l[1][0],l[0][1],l[1][1])),hm(i,n),jm(i,{isend:!1})}function rv(t,e,i,n){var a=e.__brushoption.range,o=sv(t,i,n);lr(a,function(t){t[0]+=o[0],t[1]+=o[1]}),hm(t,e),jm(t,{isend:!1})}function sv(t,e,i){var n=t.group,a=n.transformcoordtolocal(e,i),o=n.transformcoordtolocal(0,0);return[a[0]-o[0],a[1]-o[1]]}function lv(t,e,i){var a=xm(t,e);return a&&a!==!0?a.clippath(i,t._transform):n(i)}function uv(t){var e=hr(t[0][0],t[1][0]),i=hr(t[0][1],t[1][1]),n=cr(t[0][0],t[1][0]),a=cr(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:a-i}}function hv(t,e,i){if(t._brushtype&&!mv(t,e)){var n=t._zr,a=t._covers,o=um(t,e,i);if(!t._dragging)for(var r=0;re||e>n.getwidth()||0>i||i>n.getheight()}function vv(t){return{createcover:function(e,i){return $m(sr(ov,function(e){var i=[e,[0,100]];return t&&i.reverse(),i},function(e){return e[t]}),e,i,[["w","e"],["n","s"]][t])},getcreatingrange:function(e){var i=km(e),n=hr(i[0][t],i[1][t]),a=cr(i[0][t],i[1][t]);return[n,a]},updatecovershape:function(e,i,n,a){var o,r=xm(e,i);if(r!==!0&&r.getlinearbrushotherextent)o=r.getlinearbrushotherextent(t,e._transform);else{var s=e._zr;o=[0,[s.getwidth(),s.getheight()][1-t]]}var l=[n,o];t&&l.reverse(),jm(e,i,l,a)},updatecommon:qm,contain:dv}}function yv(t){return t=wv(t),function(e){return hr(e,t)}}function xv(t,e){return t=wv(t),function(i){var n=null!=e?e:i,a=n?t.width:t.height,o=n?t.x:t.y;return[o,o+(a||0)]}}function _v(t,e,i){return t=wv(t),function(n,a){return t.contain(a[0],a[1])&&!pp(n,e,i)}}function wv(t){return ti.create(t)}function bv(t,e,i){return i&&"axisareaselect"===i.type&&e.findcomponents({maintype:"parallelaxis",query:i})[0]===t}function sv(t){var e=t.axis;return p(t.activeintervals,function(t){return{brushtype:"linex",panelid:"pl",range:[e.datatocoord(t[0],!0),e.datatocoord(t[1],!0)]}})}function mv(t,e){return e.getcomponent("parallel",t.get("parallelindex"))}function iv(t,e){var i=t._model;return i.get("axisexpandable")&&i.get("axisexpandtriggeron")===e}function tv(t,e){if(!t.encodedefine){var i=e.ecmodel.getcomponent("parallel",e.get("parallelindex"));if(i){var n=t.encodedefine=b();f(i.dimensions,function(t){var e=av(t);n.set(t,e)})}}}function av(t){return+t.replace("dim","")}function dv(t,e,i){var n=t.model,a=t.getrect(),o=new pa({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),r="horizontal"===n.get("layout")?"width":"height";return o.setshape(r,0),or(o,{shape:{width:a.width,height:a.height}},e,i),o}function cv(t,e,i,n){for(var a=[],o=0;or;r++)a[r]=r;return"function"==typeof e?a.sort(e):"none"!==e&&a.sort(function(t,e){return o?n[t]-n[e]:n[e]-n[t]}),a}function vv(t){t.each(function(e){var i,n,a,o,r=t.getitemmodel(e),s=r.getmodel("label"),l=s.get("position"),u=r.getmodel("labelline"),h=t.getitemlayout(e),c=h.points,d="inner"===l||"inside"===l||"center"===l||"insideleft"===l||"insideright"===l;if(d)"insideleft"===l?(n=(c[0][0]+c[3][0])/2+5,a=(c[0][1]+c[3][1])/2,i="left"):"insideright"===l?(n=(c[1][0]+c[2][0])/2-5,a=(c[1][1]+c[2][1])/2,i="right"):(n=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,a=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,i="center"),o=[[n,a],[n,a]];else{var f,p,g,m=u.get("length");"left"===l?(f=(c[3][0]+c[0][0])/2,p=(c[3][1]+c[0][1])/2,g=f-m,n=g-5,i="right"):"right"===l?(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left"):"righttop"===l?(f=c[1][0],p=c[1][1],g=f+m,n=g+5,i="top"):"rightbottom"===l?(f=c[2][0],p=c[2][1],g=f+m,n=g+5,i="bottom"):"lefttop"===l?(f=c[0][0],p=c[1][1],g=f-m,n=g-5,i="right"):"leftbottom"===l?(f=c[3][0],p=c[2][1],g=f-m,n=g-5,i="right"):(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left");var v=p;o=[[f,p],[g,v]],a=v}h.label={linepoints:o,x:n,y:a,verticalalign:"middle",textalign:i,inside:d}})}function gv(t,e){return t.getvisual("opacity")||t.getmodel().get(e)}function fv(t,e,i){var n=t.getgraphicel(),a=gv(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setstyle("opacity",a)})}function wv(t,e){var i=gv(t,e),n=t.getgraphicel();n.traverse(function(t){"group"!==t.type&&t.setstyle("opacity",i) }),n.highlight&&n.highlight()}function hv(t,e,i){var n=new pa({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return or(n,{shape:{width:t.width+20}},e,i),n}function zv(t,e){return ts(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function uv(t,e,i,n,a,o,r,s,l){yv(t,e,i,a,o,s,l),jv(t,e,o,a,n,r,s),uy(t,s)}function xv(t){f(t,function(t){var e=sy(t.outedges,ry),i=sy(t.inedges,ry),n=t.getvalue()||0,a=math.max(e,i,n);t.setlayout({value:a},!0)})}function yv(t,e,i,n,a,o,r){for(var s=[],l=[],u=[],h=[],c=0,d=0,f=0;f=0;y&&v.depth>p&&(p=v.depth),m.setlayout({depth:y?v.depth:c},!0),"vertical"===o?m.setlayout({dy:i},!0):m.setlayout({dx:i},!0);for(var x=0;xc-1?p:c-1;r&&"left"!==r&&qv(t,r,o,m);var d="vertical"===o?(a-i)/m:(n-i)/m;$v(t,d,o)}function jv(t){var e=t.hostgraph.data.getrawdataitem(t.dataindex);return null!=e.depth&&e.depth>=0}function qv(t,e,i,n){if("right"===e){for(var a=[],o=t,r=0;o.length;){for(var s=0;s0;o--)l*=.99,iy(s,l,r),ey(s,a,i,n,r),ly(s,l,r),ey(s,a,i,n,r)}function qv(t,e){var i=[],n="vertical"===e?"y":"x",a=va(t,function(t){return t.getlayout()[n]});return a.keys.sort(function(t,e){return t-e}),f(a.keys,function(t){i.push(a.buckets.get(t))}),i}function ty(t,e,i,n,a,o){var r=1/0;f(t,function(t){var e=t.length,s=0;f(t,function(t){s+=t.getlayout().value});var l="vertical"===o?(n-(e-1)*a)/s:(i-(e-1)*a)/s;r>l&&(r=l)}),f(t,function(t){f(t,function(t,e){var i=t.getlayout().value*r;"vertical"===o?(t.setlayout({x:e},!0),t.setlayout({dx:i},!0)):(t.setlayout({y:e},!0),t.setlayout({dy:i},!0))})}),f(e,function(t){var e=+t.getvalue()*r;t.setlayout({dy:e},!0)})}function ey(t,e,i,n,a){var o="vertical"===a?"x":"y";f(t,function(t){t.sort(function(t,e){return t.getlayout()[o]-e.getlayout()[o]});for(var r,s,l,u=0,h=t.length,c="vertical"===a?"dx":"dy",d=0;h>d;d++)s=t[d],l=u-s.getlayout()[o],l>0&&(r=s.getlayout()[o]+l,"vertical"===a?s.setlayout({x:r},!0):s.setlayout({y:r},!0)),u=s.getlayout()[o]+s.getlayout()[c]+e;var f="vertical"===a?n:i;if(l=u-e-f,l>0)for(r=s.getlayout()[o]-l,"vertical"===a?s.setlayout({x:r},!0):s.setlayout({y:r},!0),u=r,d=h-2;d>=0;--d)s=t[d],l=s.getlayout()[o]+s.getlayout()[c]+e-u,l>0&&(r=s.getlayout()[o]-l,"vertical"===a?s.setlayout({x:r},!0):s.setlayout({y:r},!0)),u=s.getlayout()[o]})}function iy(t,e,i){f(t.slice().reverse(),function(t){f(t,function(t){if(t.outedges.length){var n=sy(t.outedges,ny,i)/sy(t.outedges,ry,i);if("vertical"===i){var a=t.getlayout().x+(n-oy(t,i))*e;t.setlayout({x:a},!0)}else{var o=t.getlayout().y+(n-oy(t,i))*e;t.setlayout({y:o},!0)}}})})}function ny(t,e){return oy(t.node2,e)*t.getvalue()}function ay(t,e){return oy(t.node1,e)*t.getvalue()}function oy(t,e){return"vertical"===e?t.getlayout().x+t.getlayout().dx/2:t.getlayout().y+t.getlayout().dy/2}function ry(t){return t.getvalue()}function sy(t,e,i){for(var n=0,a=t.length,o=-1;++o=f&&((r>f||d>=0&&0>s)&&(r=f,s=d,a=l,o.length=0),$r(u,function(t){o.push({seriesindex:e.seriesindex,dataindexinside:t,dataindex:e.getdata().getrawindex(t)})}))}}),{payloadbatch:o,snaptovalue:a}}function my(t,e,i,n){t[e.key]={value:i,payloadbatch:n}}function vy(t,e,i,n){var a=i.payloadbatch,o=e.axis,r=o.model,s=e.axispointermodel;if(e.triggertooltip&&a.length){var l=e.coordsys.model,u=xd(l),h=t.map[u];h||(h=t.map[u]={coordsysid:l.id,coordsysindex:l.componentindex,coordsystype:l.type,coordsysmaintype:l.maintype,databyaxis:[]},t.list.push(h)),h.databyaxis.push({axisdim:o.dim,axisindex:r.componentindex,axistype:r.type,axisid:r.id,value:n,valuelabelopt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesdataindices:a.slice()})}}function yy(t,e,i){var n=i.axesinfo=[];$r(e,function(e,i){var a=e.axispointermodel.option,o=t[i];o?(!e.usehandle&&(a.status="show"),a.value=o.value,a.seriesdataindices=(o.payloadbatch||[]).slice()):!e.usehandle&&(a.status="hide"),"show"===a.status&&n.push({axisdim:e.axis.dim,axisindex:e.axis.model.componentindex,value:a.value})})}function xy(t,e,i,n){if(sy(e)||!t.list.length)return void n({type:"hidetip"});var a=((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:a.dataindexinside,dataindex:a.dataindex,seriesindex:a.seriesindex,databycoordsys:t.list})}function _y(t,e,i){var n=i.getzr(),a="axispointerlasthighlights",o=qr(n)[a]||{},r=qr(n)[a]={};$r(t,function(t){var e=t.axispointermodel.option;"show"===e.status&&$r(e.seriesdataindices,function(t){var e=t.seriesindex+" | "+t.dataindex;r[e]=t})});var s=[],l=[];f(o,function(t,e){!r[e]&&l.push(t)}),f(r,function(t,e){!o[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 wy(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 by(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 sy(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function my(t,e,i){if(!as.node){var n=e.getzr();ez(n).records||(ez(n).records={}),iy(n,e);var a=ez(n).records[t]||(ez(n).records[t]={});a.handler=i}}function iy(t,e){function i(i,n){t.on(i,function(i){var a=cy(e);iz(ez(t).records,function(t){t&&n(t,i,a.dispatchaction)}),ty(a.pendings,e)})}ez(t).initialized||(ez(t).initialized=!0,i("click",x(dy,"click")),i("mousemove",x(dy,"mousemove")),i("globalout",ay))}function ty(t,e){var i,n=t.showtip.length,a=t.hidetip.length;n?i=t.showtip[n-1]:a&&(i=t.hidetip[a-1]),i&&(i.dispatchaction=null,e.dispatchaction(i))}function ay(t,e,i){t.handler("leave",null,i)}function dy(t,e,i,n){e.handler(t,i,n)}function cy(t){var e={showtip:[],hidetip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchaction=i,t.dispatchaction(n))};return{dispatchaction:i,pendings:e}}function ly(t,e){if(!as.node){var i=e.getzr(),n=(ez(i).records||{})[t];n&&(ez(i).records[t]=null)}}function ky(){}function py(t,e,i,n){oy(az(i).lastprop,n)||(az(i).lastprop=n,e?ar(i,n,t):(i.stopanimation(),i.attr(n)))}function oy(t,e){if(s(t)&&s(e)){var i=!0;return f(e,function(e,n){i=i&&oy(t[n],e)}),!!i}return t===e}function ey(t,e){t[e.get("label.show")?"show":"hide"]()}function ny(t){return{position:t.position.slice(),rotation:t.rotation||0}}function ry(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)})}function zy(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 by(t,e,i,n,a){var o=i.get("value"),r=gy(o,e.axis,e.ecmodel,i.get("seriesdataindices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getmodel("label"),l=$a(s.get("padding")||0),u=s.getfont(),h=xi(r,u),c=a.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=a.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=a.verticalalign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),vy(c,d,f,n);var m=s.get("backgroundcolor");m&&"auto"!==m||(m=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:r,textfont:u,textfill:s.gettextcolor(),textposition:"inside",textpadding:l,fill:m,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 vy(t,e,i,n){var a=n.getwidth(),o=n.getheight();t[0]=math.min(t[0]+e,a)-e,t[1]=math.min(t[1]+i,o)-i,t[0]=math.max(t[0],0),t[1]=math.max(t[1],0)}function gy(t,e,i,n,a){t=e.scale.parse(t);var o=e.scale.getlabel(t,{precision:a.precision}),r=a.formatter;if(r){var s={value:qh(e,t),axisdimension:e.dim,axisindex:e.index,seriesdata:[]};f(n,function(t){var e=i.getseriesbyindex(t.seriesindex),n=t.dataindexinside,a=e&&e.getdataparams(n);a&&s.seriesdata.push(a)}),b(r)?o=r.replace("{value}",o):w(r)&&(o=r(s))}return o}function fy(t,e,i){var n=oe();return be(n,n,i.rotation),ze(n,n,i.position),sr([t.datatocoord(e),(i.labeloffset||0)+(i.labeldirection||1)*(i.labelmargin||0)],n)}function wy(t,e,i,n,a,o){var r=np.innertextlayout(i.rotation,0,i.labeldirection);i.labelmargin=a.get("label.margin"),by(e,n,a,o,{position:fy(n.axis,t,i),align:r.textalign,verticalalign:r.textverticalalign})}function hy(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function zy(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function uy(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startangle:a,endangle:o,clockwise:!0}}function xy(t,e){var i={};return i[e.dim+"axisindex"]=e.index,t.getcartesian(i)}function yy(t){return"x"===t.dim?0:1}function jy(t){return t.ishorizontal()?0:1}function qy(t,e){var i=t.getrect();return[i[uz[e]],i[uz[e]]+i[hz[e]]]}function ky(t,e,i){var n=new pa({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return or(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function $y(t,e,i){if(t.count())for(var n,a=e.coordinatesystem,o=e.getlayerseries(),r=t.mapdimension("single"),s=t.mapdimension("value"),l=p(o,function(e){return p(e.indices,function(e){var i=a.datatopoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=jy(l),h=u.y0,c=i/u.max,d=o.length,f=o[0].indices.length,g=0;f>g;++g){n=h[g]*c,t.setitemlayout(o[0].indices[g],{layerindex:0,x:l[0][g][0],y0:n,y:l[0][g][1]*c});for(var m=1;d>m;++m)n+=l[m-1][g][1]*c,t.setitemlayout(o[m].indices[g],{layerindex:m,x:l[m][g][0],y0:n,y:l[m][g][1]*c})}}function jy(t){for(var e,i=t.length,n=t[0].length,a=[],o=[],r=0,s={},l=0;n>l;++l){for(var u=0,e=0;i>u;++u)e+=t[u][l][1];e>r&&(r=e),a.push(e)}for(var h=0;n>h;++h)o[h]=(r-a[h])/2;r=0;for(var c=0;n>c;++c){var d=a[c]+o[c];d>r&&(r=d)}return s.y0=o,s.max=r,s}function qy(t,e,i,n){var a=t.getitemlayout(e),o=i.get("symbolrepeat"),r=i.get("symbolclip"),s=i.get("symbolposition")||"start",l=i.get("symbolrotate"),u=(l||0)*math.pi/180||0,h=i.get("symbolpatternsize")||2,c=i.isanimationenabled(),d={dataindex:e,layout:a,itemmodel:i,symboltype:t.getitemvisual(e,"symbol")||"circle",color:t.getitemvisual(e,"color"),symbolclip:r,symbolrepeat:o,symbolrepeatdirection:i.get("symbolrepeatdirection"),symbolpatternsize:h,rotation:u,animationmodel:c?i:null,hoveranimation:c&&i.get("hoveranimation"),z2:i.getshallow("z",!0)||0};tx(i,o,a,n,d),ix(t,e,a,o,r,d.boundinglength,d.pxsign,h,n,d),nx(i,d.symbolscale,u,n,d);var f=d.symbolsize,p=i.get("symboloffset");return _(p)&&(p=[ir(p[0],f[0]),ir(p[1],f[1])]),ax(i,f,a,o,r,p,s,d.valuelinewidth,d.boundinglength,d.repeatcutlength,n,d),d}function tx(t,e,i,n,a){var o,r=n.valuedim,s=t.get("symbolboundingdata"),l=n.coordsys.getotheraxis(n.coordsys.getbaseaxis()),u=l.toglobalcoord(l.datatocoord(0)),h=1-+(i[r.wh]<=0);if(_(s)){var c=[ex(l,s[0])-u,ex(l,s[1])-u];c[1]0?1:0>o?-1:0}function ex(t,e){return t.toglobalcoord(t.datatocoord(t.scale.parse(e)))}function ix(t,e,i,n,a,o,r,s,l,u){var h=l.valuedim,c=l.categorydim,d=math.abs(i[c.wh]),f=t.getitemvisual(e,"symbolsize");_(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=ir(f[c.index],d),f[h.index]=ir(f[h.index],n?d:math.abs(o)),u.symbolsize=f;var p=u.symbolscale=[f[0]/s,f[1]/s];p[h.index]*=(l.ishorizontal?-1:1)*r}function nx(t,e,i,n,a){var o=t.get(yz)||0;o&&(_z.attr({scale:e.slice(),rotation:i}),_z.updatetransform(),o/=_z.getlinescale(),o*=e[n.valuedim.index]),a.valuelinewidth=o}function ax(t,e,i,n,a,o,s,l,u,h,c,d){var f=c.categorydim,p=c.valuedim,g=d.pxsign,m=math.max(e[p.index]+l,0),v=m;if(n){var y=math.abs(u),x=d(t.get("symbolmargin"),"15%")+"",_=!1;x.lastindexof("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=ir(x,e[p.index]);var w=math.max(m+2*x,0),b=_?0:2*x,s=gr(n),m=s?n:bx((y+b)/w),i=y-m*m;x=i/2/(_?m:m-1),w=m+2*x,b=_?0:2*x,s||"fixed"===n||(m=h?bx((math.abs(h)+b)/w):0),v=m*w-b,d.repeattimes=m,d.symbolmargin=x}var t=g*(v/2),a=d.pathposition=[];a[f.index]=i[f.wh]/2,a[p.index]="start"===s?t:"end"===s?u-t:u/2,o&&(a[0]+=o[0],a[1]+=o[1]);var c=d.bundleposition=[];c[f.index]=i[f.xy],c[p.index]=i[p.xy];var l=d.barrectshape=r({},i);l[p.wh]=g*math.max(math.abs(i[p.wh]),math.abs(a[p.index]+t)),l[f.wh]=i[f.wh];var k=d.clipshape={};k[f.xy]=-i[f.xy],k[f.wh]=c.ecsize[f.wh],k[p.xy]=0,k[p.wh]=i[p.wh]}function ox(t){var e=t.symbolpatternsize,i=ec(t.symboltype,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setstyle({strokenoscale:!0}),i}function rx(t,e,i,n){function a(t){var e=h.slice(),n=i.pxsign,a=t;return("start"===i.symbolrepeatdirection?n>0:0>n)&&(a=d-1-t),e[c.index]=p*(a-d/2+.5)+h[c.index],{position:e,scale:i.symbolscale.slice(),rotation:i.rotation}}function o(){yx(t,function(t){t.trigger("emphasis")})}function r(){yx(t,function(t){t.trigger("normal")})}var s=t.__pictorialbundle,l=i.symbolsize,u=i.valuelinewidth,h=i.pathposition,c=e.valuedim,d=i.repeattimes||0,f=0,p=l[e.valuedim.index]+u+2*i.symbolmargin;for(yx(t,function(t){t.__pictorialanimationindex=f,t.__pictorialrepeattimes=d,d>f?xx(t,null,a(f),i,n):xx(t,null,{scale:[0,0]},i,n,function(){s.remove(t)}),fx(t,i),f++});d>f;f++){var g=ox(i);g.__pictorialanimationindex=f,g.__pictorialrepeattimes=d,s.add(g);var m=a(f);xx(g,{position:m.position,scale:[0,0]},{scale:m.scale,rotation:m.rotation},i,n),g.on("mouseover",o).on("mouseout",r),fx(g,i)}}function sx(t,e,i,n){function a(){this.trigger("emphasis")}function o(){this.trigger("normal")}var r=t.__pictorialbundle,s=t.__pictorialmainpath;s?xx(s,null,{position:i.pathposition.slice(),scale:i.symbolscale.slice(),rotation:i.rotation},i,n):(s=t.__pictorialmainpath=ox(i),r.add(s),xx(s,{position:i.pathposition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolscale.slice()},i,n),s.on("mouseover",a).on("mouseout",o)),fx(s,i)}function lx(t,e,i){var n=r({},e.barrectshape),a=t.__pictorialbarrect;a?xx(a,null,{shape:n},e,i):(a=t.__pictorialbarrect=new pa({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",linewidth:0}}),t.add(a))}function ux(t,e,i,n){if(i.symbolclip){var a=t.__pictorialclippath,o=r({},i.clipshape),s=e.valuedim,l=i.animationmodel,u=i.dataindex;if(a)ar(a,{shape:o},l,u);else{o[s.wh]=0,a=new pa({shape:o}),t.__pictorialbundle.setclippath(a),t.__pictorialclippath=a;var h={};h[s.wh]=i.clipshape[s.wh],va[n?"updateprops":"initprops"](a,{shape:h},l,u)}}}function hx(t,e){var i=t.getitemmodel(e);return i.getanimationdelayparams=cx,i.isanimationenabled=dx,i}function cx(t){return{index:t.__pictorialanimationindex,count:t.__pictorialrepeattimes}}function dx(){return this.parentmodel.isanimationenabled()&&!!this.getshallow("animation")}function fx(t,e){t.off("emphasis").off("normal");var i=e.symbolscale.slice();e.hoveranimation&&t.on("emphasis",function(){this.animateto({scale:[1.1*i[0],1.1*i[1]]},400,"elasticout")}).on("normal",function(){this.animateto({scale:i.slice()},400,"elasticout")})}function px(t,e,i,n){var a=new fm,o=new fm;return a.add(o),a.__pictorialbundle=o,o.attr("position",i.bundleposition.slice()),i.symbolrepeat?rx(a,e,i):sx(a,e,i),lx(a,i,n),ux(a,e,i,n),a.__pictorialshapestr=vx(t,i),a.__pictorialsymbolmeta=i,a}function gx(t,e,i){var n=i.animationmodel,a=i.dataindex,o=t.__pictorialbundle;ar(o,{position:i.bundleposition.slice()},n,a),i.symbolrepeat?rx(t,e,i,!0):sx(t,e,i,!0),lx(t,i,!0),ux(t,e,i,!0)}function mx(t,e,i,n){var a=n.__pictorialbarrect;a&&(a.style.text=null);var o=[];yx(n,function(t){o.push(t)}),n.__pictorialmainpath&&o.push(n.__pictorialmainpath),n.__pictorialclippath&&(i=null),f(o,function(t){ar(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setitemgraphicel(e,null)}function vx(t,e){return[t.getitemvisual(e.dataindex,"symbol")||"none",!!e.symbolrepeat,!!e.symbolclip].join(":")}function yx(t,e,i){f(t.__pictorialbundle.children(),function(n){n!==t.__pictorialbarrect&&e.call(i,n)})}function xx(t,e,i,n,a,o){e&&t.attr(e),n.symbolclip&&!a?i&&t.attr(i):i&&va[a?"updateprops":"initprops"](t,i,n.animationmodel,n.dataindex,o)}function _x(t,e,i){var n=i.color,a=i.dataindex,o=i.itemmodel,r=o.getmodel("itemstyle").getitemstyle(["color"]),l=o.getmodel("emphasis.itemstyle").getitemstyle(),u=o.getshallow("cursor");yx(t,function(t){t.setcolor(n),t.setstyle(s({fill:n,opacity:i.opacity},r)),wo(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valuedim.posdesc[+(i.boundinglength>0)],d=t.__pictorialbarrect;zc(d.style,h,o,n,e.seriesmodel,a,c),wo(d,h)}function bx(t){var e=math.round(t);return math.abs(t-e)<1e-4?e:math.ceil(t)}function sx(t,e){return e=e||[0,0],p(["x","y"],function(i,n){var a=this.getaxis(i),o=e[n],r=t[n]/2;return"category"===a.type?a.getbandwidth():math.abs(a.datatocoord(o-r)-a.datatocoord(o+r))},this)}function mx(t,e){return e=e||[0,0],p([0,1],function(i){var n=e[i],a=t[i]/2,o=[],r=[];return o[i]=n-a,r[i]=n+a,o[1-i]=r[1-i]=e[1-i],math.abs(this.datatopoint(o)[i]-this.datatopoint(r)[i])},this)}function ix(t,e){var i=this.getaxis(),n=e instanceof array?e[0]:e,a=(t instanceof array?t[0]:t)/2;return"category"===i.type?i.getbandwidth():math.abs(i.datatocoord(n-a)-i.datatocoord(n+a))}function tx(t,e){return p(["radius","angle"],function(i,n){var a=this["get"+i+"axis"](),o=e[n],r=t[n]/2,s="datato"+i,l="category"===a.type?a.getbandwidth():math.abs(a[s](o-r)-a[s](o+r));return"angle"===i&&(l=l*math.pi/180),l},this)}function ax(t){var e,i=t.type;if("path"===i){var n=t.shape,a=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,o=fx(n);e=so(o,null,a,n.layout||"center"),e.__custompathdata=o}else if("image"===i)e=new cn({}),e.__customimagepath=t.style.image;else if("text"===i)e=new ia({}),e.__customtext=t.style.text;else if("group"===i)e=new fm;else{if("compoundpath"===i)throw new error('"compoundpath" is not supported yet.');var r=bo(i);e=new r}return e.__customgraphictype=i,e.name=t.name,e}function dx(t,e,i,a,o,r,s){var l={},u=i.style||{};if(i.shape&&(l.shape=n(i.shape)),i.position&&(l.position=i.position.slice()),i.scale&&(l.scale=i.scale.slice()),i.origin&&(l.origin=i.origin.slice()),i.rotation&&(l.rotation=i.rotation),"image"===t.type&&i.style){var h=l.style={};f(["x","y","width","height"],function(e){cx(e,h,u,t.style,r)})}if("text"===t.type&&i.style){var h=l.style={};f(["x","y"],function(e){cx(e,h,u,t.style,r)}),!u.hasownproperty("textfill")&&u.fill&&(u.textfill=u.fill),!u.hasownproperty("textstroke")&&u.stroke&&(u.textstroke=u.stroke)}if("group"!==t.type&&(t.usestyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),or(t,{style:{opacity:c}},a,e)}r?t.attr(l):ar(t,l,a,e),i.hasownproperty("z2")&&t.attr("z2",i.z2||0),i.hasownproperty("silent")&&t.attr("silent",i.silent),i.hasownproperty("invisible")&&t.attr("invisible",i.invisible),i.hasownproperty("ignore")&&t.attr("ignore",i.ignore),i.hasownproperty("info")&&t.attr("info",i.info);var d=i.styleemphasis;ro(t,d),s&&ho(t,d!==!1)}function cx(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function lx(t,e,i,n){function a(t){null==t&&(t=m),s&&(v=e.getitemmodel(t),y=v.getmodel(cz),x=v.getmodel(lz),_=e.getitemvisual(t,"color"),s=!1)}function o(t,i){return null==i&&(i=m),e.get(e.getdimension(t||0),i)}function r(i,n){null==n&&(n=m),a(n);var o=v.getmodel(az).getitemstyle();null!=_&&(o.fill=_);var r=e.getitemvisual(n,"opacity");null!=r&&(o.opacity=r);var s=i?bx(i,y):y;return jo(o,s,null,{autocolor:_,isrecttext:!0}),o.text=s.getshallow("show")?c(t.getformattedlabel(n,"normal"),rc(e,n)):null,i&&vx(o,i),o}function l(i,n){null==n&&(n=m),a(n);var o=v.getmodel(dz).getitemstyle(),r=i?bx(i,x):x;return jo(o,r,null,{isrecttext:!0},!0),o.text=r.getshallow("show")?l(t.getformattedlabel(n,"emphasis"),t.getformattedlabel(n,"normal"),rc(e,n)):null,i&&vx(o,i),o}function u(t,i){return null==i&&(i=m),e.getitemvisual(i,t)}function h(t){if(p.getbaseaxis){var e=p.getbaseaxis();return ph(s({axis:e},t),n)}}function c(){return i.getcurrentseriesindices()}function d(t){return ir(t,i)}var f=t.get("renderitem"),p=t.coordinatesystem,g={};p&&(g=p.preparecustoms?p.preparecustoms():pz[p.type](p));var m,v,y,x,_,w=s({getwidth:n.getwidth,getheight:n.getheight,getzr:n.getzr,getdevicepixelratio:n.getdevicepixelratio,value:o,style:r,styleemphasis:l,visual:u,barlayout:h,currentseriesindices:c,font:d},g.api||{}),b={context:{},seriesid:t.id,seriesname:t.name,seriesindex:t.seriesindex,coordsys:g.coordsys,datainsidelength:e.count(),encode:kx(t.getdata())},s=!0;return function(t,i){return m=t,s=!0,f&&f(s({dataindexinside:t,dataindex:e.getrawindex(t),actiontype:i?i.type:null},b),w)}}function kx(t){var e={};return f(t.dimensions,function(i,n){var a=t.getdimensioninfo(i);if(!a.isextracoord){var o=a.coorddim,r=e[o]=e[o]||[];r[a.coorddimindex]=n}}),e}function px(t,e,i,n,a,o){return t=ox(t,e,i,n,a,o,!0),t&&o.setitemgraphicel(e,t),t}function ox(t,e,i,n,a,o,r){var s=!i;i=i||{};var l=i.type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customgraphictype||"path"===l&&wx(u)&&fx(u)!==t.__custompathdata||"image"===l&&hx(h,"image")&&h.image!==t.__customimagepath||"text"===l&&hx(u,"text")&&h.text!==t.__customtext)&&(a.remove(t),t=null),!s){var c=!t;return!t&&(t=ax(i)),dx(t,e,i,n,o,c,r),"group"===l&&ex(t,e,i,n,o),a.add(t),t}}function ex(t,e,i,n,a){var o=i.children,r=o?o.length:0,s=i.$mergechildren,l="byname"===s||i.diffchildrenbyname,u=s===!1;if(r||l||u){if(l)return void nx({oldchildren:t.children()||[],newchildren:o||[],dataindex:e,animatablemodel:n,group:t,data:a});u&&t.removeall();for(var h=0;r>h;h++)o[h]&&ox(t.childat(h),e,o[h],n,t,a)}}function nx(t){new zu(t.oldchildren,t.newchildren,rx,rx,t).add(zx).update(zx).remove(gx).execute()}function rx(t,e){var i=t&&t.name;return null!=i?i:kz+e}function zx(t,e){var i=this.context,n=null!=t?i.newchildren[t]:null,a=null!=e?i.oldchildren[e]:null;ox(a,i.dataindex,n,i.animatablemodel,i.group,i.data)}function bx(t,e){var i=new vr({},e);return f(tz,function(e,n){t.hasownproperty(e)&&(i.option[n]=t[e])}),i}function vx(t,e){for(var i in e)(e.hasownproperty(i)||!tz.hasownproperty(i))&&(t[i]=e[i])}function gx(t){var e=this.context,i=e.oldchildren[t];i&&e.group.remove(i)}function fx(t){return t&&(t.pathdata||t.d)}function wx(t){return t&&(t.hasownproperty("pathdata")||t.hasownproperty("d"))}function hx(t,e){return t&&t.hasownproperty(e)}function zx(t){return t.get("stack")||"__ec_stack_"+t.seriesindex}function ux(t,e){return e.dim+t.model.componentindex}function xx(t,e){var i={},n=yx(m(e.getseriesbytype(t),function(t){return!e.isseriesfiltered(t)&&t.coordinatesystem&&"polar"===t.coordinatesystem.type}));e.eachseriesbytype(t,function(t){if("polar"===t.coordinatesystem.type){var e=t.getdata(),a=t.coordinatesystem,o=a.getbaseaxis(),r=ux(a,o),s=zx(t),l=n[r][s],u=l.offset,h=l.width,c=a.getotheraxis(o),d=t.coordinatesystem.cx,f=t.coordinatesystem.cy,p=t.get("barminheight")||0,g=t.get("barminangle")||0;i[s]=i[s]||[];for(var m=e.mapdimension(c.dim),v=e.mapdimension(o.dim),y=vh(e,m),x="radius"!==o.dim||!t.get("roundcap",!0),_=c.getextent()[0],w=0,b=e.count();b>w;w++){var s=e.get(m,w),m=e.get(v,w),i=s>=0?"p":"n",t=_;y&&(i[s][m]||(i[s][m]={p:_,n:_}),t=i[s][m][i]);var a,d,c,l;if("radius"===c.dim){var k=c.datatoradius(s)-_,p=o.datatoangle(m);math.abs(k)k?-1:1)*p),a=t,d=t+k,c=p-u,l=c-h,y&&(i[s][m][i]=d)}else{var o=c.datatoangle(s,x)-_,e=o.datatoradius(m);math.abs(o)o?-1:1)*g),a=e+u,d=a+h,c=t,l=t+o,y&&(i[s][m][i]=l)}e.setitemlayout(w,{cx:d,cy:f,r0:a,r:d,startangle:-c*math.pi/180,endangle:-l*math.pi/180})}}},this)}function yx(t){var e={};f(t,function(t){var i=t.getdata(),n=t.coordinatesystem,a=n.getbaseaxis(),o=ux(n,a),r=a.getextent(),s="category"===a.type?a.getbandwidth():math.abs(r[1]-r[0])/i.count(),l=e[o]||{bandwidth:s,remainedwidth:s,autowidthcount:0,categorygap:"20%",gap:"30%",stacks:{}},u=l.stacks;e[o]=l;var h=zx(t);u[h]||l.autowidthcount++,u[h]=u[h]||{width:0,maxwidth:0};var c=ir(t.get("barwidth"),s),d=ir(t.get("barmaxwidth"),s),f=t.get("bargap"),p=t.get("barcategorygap");c&&!u[h].width&&(c=math.min(l.remainedwidth,c),u[h].width=c,l.remainedwidth-=c),d&&(u[h].maxwidth=d),null!=f&&(l.gap=f),null!=p&&(l.categorygap=p)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,a=t.bandwidth,o=ir(t.categorygap,a),r=ir(t.gap,1),s=t.remainedwidth,l=t.autowidthcount,u=(s-o)/(l+(l-1)*r);u=math.max(u,0),f(n,function(t){var e=t.maxwidth;e&&u>e&&(e=math.min(e,s),t.width&&(e=math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*r),u=math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+r)})}),i}function jx(t,e){ck.call(this,"radius",t,e),this.type="category"}function qx(t,e){e=e||[0,360],ck.call(this,"angle",t,e),this.type="category"}function kx(t,e){return e.type||(e.data?"category":"value")}function $x(t,e,i){var n=e.get("center"),a=i.getwidth(),o=i.getheight();t.cx=ir(n[0],a),t.cy=ir(n[1],o);var r=t.getradiusaxis(),s=math.min(a,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:_(l)||(l=[0,l]),l=[ir(l[0],s),ir(l[1],s)],r.inverse?r.setextent(l[1],l[0]):r.setextent(l[0],l[1])}function jx(t){var e=this,i=e.getangleaxis(),n=e.getradiusaxis();if(i.scale.setextent(1/0,-1/0),n.scale.setextent(1/0,-1/0),t.eachseries(function(t){if(t.coordinatesystem===e){var a=t.getdata();f(a.mapdimension("radius",!0),function(t){n.scale.unionextentfromdata(a,yh(a,t))}),f(a.mapdimension("angle",!0),function(t){i.scale.unionextentfromdata(a,yh(a,t))})}}),uh(i.scale,i.model),uh(n.scale,n.model),"category"===i.type&&!i.onband){var a=i.getextent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setextent(a[0],a[1])}}function qx(t,e){if(t.type=e.get("type"),t.scale=xh(e),t.onband=e.get("boundarygap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleaxis"===e.maintype){t.inverse^=e.get("clockwise");var i=e.get("startangle");t.setextent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function t_(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordtopoint([e[0],i]),a=t.coordtopoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function e_(t){var e=t.getradiusaxis();return e.inverse?0:1}function i_(t){var e=t[0],i=t[t.length-1];e&&i&&math.abs(math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function n_(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*math.pi,labeldirection:-1,tickdirection:-1,namedirection:1,labelrotate:e.getmodel("axislabel").get("rotate"),z2:1}}function a_(t,e,i,n,a){var o=e.axis,r=o.datatocoord(t),s=n.getangleaxis().getextent()[0];s=s/180*math.pi;var l,u,h,c=n.getradiusaxis().getextent();if("radius"===o.dim){var d=oe();be(d,d,s),ze(d,d,[n.cx,n.cy]),l=sr([r,-a],d);var f=e.getmodel("axislabel").get("rotate")||0,p=np.innertextlayout(s,f*math.pi/180,-1);u=p.textalign,h=p.textverticalalign}else{var g=c[1];l=n.coordtopoint([g+a,r]);var m=n.cx,v=n.cy;u=math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalalign:h}}function o_(t,e){e.update="updateview",cu(e,function(e,i){var n={};return i.eachcomponent({maintype:"geo",query:e},function(i){i[t](e.name);var a=i.coordinatesystem;f(a.regions,function(t){n[t.name]=i.isselected(t.name)||!1})}),{selected:n,name:e.name}})}function r_(t){this._model=t}function s_(t,e,i,n){var a=i.calendarmodel,o=i.seriesmodel,r=a?a.coordinatesystem:o?o.coordinatesystem:null;return r===this?r[t](n):null}function l_(t,e){var i=t.cellsize;_(i)?1===i.length&&(i[1]=i[0]):i=t.cellsize=[i,i];var n=p([0,1],function(t){return is(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});ns(t,e,{type:"box",ignoresize:n})}function u_(t,e,i){var n,a={},o="toggleselected"===t;return i.eachcomponent("legend",function(i){o&&null!=n?i[n?"select":"unselect"](e.name):"allselect"===t||"inverseselect"===t?i[t]():(i[t](e.name),n=i.isselected(e.name));var r=i.getdata();f(r,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isselected(e);a[e]=a.hasownproperty(e)?a[e]&&n:n}})}),"allselect"===t||"inverseselect"===t?{selected:a}:{name:e.name,selected:a}}function h_(t,e,i){var n=e.getboxlayoutparams(),a=e.get("padding"),o={width:i.getwidth(),height:i.getheight()},r=ts(n,o,a);sd(e.get("orient"),t,e.get("itemgap"),r.width,r.height),es(t,n,o,a) }function c_(t,e){var i=$a(e.get("padding")),n=e.getitemstyle(["color","opacity"]);n.fill=e.get("backgroundcolor");var t=new pa({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 d_(t,e,i,n,a,o){var r;return"line"!==e&&e.indexof("empty")<0?(r=i.getitemstyle(),t.style.stroke=n,o||(r.stroke=a)):r=i.getitemstyle(["borderwidth","bordercolor"]),t.setstyle(r)}function f_(t,e,i,n){g_(t,e,i,n),i.dispatchaction({type:"legendtoggleselect",name:null!=t?t:e}),p_(t,e,i,n)}function p_(t,e,i,n){var a=i.getzr().storage.getdisplaylist()[0];a&&a.usehoverlayer||i.dispatchaction({type:"highlight",seriesname:t,name:e,excludeseriesid:n})}function g_(t,e,i,n){var a=i.getzr().storage.getdisplaylist()[0];a&&a.usehoverlayer||i.dispatchaction({type:"downplay",seriesname:t,name:e,excludeseriesid:n})}function m_(t,e,i){var n=t.getorient(),a=[1,1];a[n.index]=0,ns(e,i,{type:"box",ignoresize:a})}function v_(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(ub,function(t){return t+"transition:"+i}).join(";")}function y_(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 x_(t){var e=[],i=t.get("transitionduration"),n=t.get("backgroundcolor"),a=t.getmodel("textstyle"),o=t.get("padding");return i&&e.push(v_(i)),n&&(as.canvassupported?e.push("background-color:"+n):(e.push("background-color:#"+ai(n)),e.push("filter:alpha(opacity=70)"))),sb(["width","color","radius"],function(i){var n="border-"+i,a=lb(n),o=t.get(a);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(y_(a)),null!=o&&e.push("padding:"+$a(o).join("px ")+"px"),e.join(";")+";"}function __(t,e,i,n,a){var o=e&&e.painter;if(i){var r=o&&o.getviewportroot();r&&pe(t,r,document.body,n,a)}else{t[0]=n,t[1]=a;var s=o&&o.getviewportrootoffset();s&&(t[0]+=s.offsetleft,t[1]+=s.offsettop)}}function w_(t,e,i){if(as.wxa)return null;var n=document.createelement("div");n.dombelongtozr=!0,this.el=n;var a=this._zr=e.getzr(),o=this._appendtobody=i&&i.appendtobody;this._stylecoord=[0,0],__(this._stylecoord,a,o,e.getwidth()/2,e.getheight()/2),o?document.body.appendchild(n):t.appendchild(n),this._container=t,this._show=!1,this._hidetimeout;var r=this;n.onmouseenter=function(){r._enterable&&(cleartimeout(r._hidetimeout),r._show=!0),r._incontent=!0},n.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=a.handler,i=a.painter.getviewportroot();be(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hidelater(r._hidedelay),r._incontent=!1}}function b_(t){this._zr=t.getzr(),this._show=!1,this._hidetimeout}function s_(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(vr.isinstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new vr(i,e,e.ecmodel))}return e}function m_(t,e){return t.dispatchaction||y(e.dispatchaction,e)}function i_(t,e,i,n,a,o,r){var s=i.getoutersize(),l=s.width,u=s.height;return null!=o&&(t+l+o>n?t-=l+o:t+=o),null!=r&&(e+u+r>a?e-=u+r:e+=r),[t,e]}function t_(t,e,i,n,a){var o=i.getoutersize(),r=o.width,s=o.height;return t=math.min(t+r,n)-r,e=math.min(e+s,a)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}function a_(t,e,i){var n=i[0],a=i[1],o=5,r=0,s=0,l=e.width,u=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+u/2-a/2;break;case"top":r=e.x+l/2-n/2,s=e.y-a-o;break;case"bottom":r=e.x+l/2-n/2,s=e.y+u+o;break;case"left":r=e.x-n-o,s=e.y+u/2-a/2;break;case"right":r=e.x+l+o,s=e.y+u/2-a/2}return[r,s]}function d_(t){return"center"===t||"middle"===t}function c_(t){ia(t,"label",["show"])}function l_(t){return!(isnan(parsefloat(t.x))&&isnan(parsefloat(t.y)))}function k_(t){return!isnan(parsefloat(t.x))&&!isnan(parsefloat(t.y))}function p_(t,e,i,n,a,o){var r=[],s=vh(e,n),l=s?e.getcalculationinfo("stackresultdimension"):n,u=b_(e,l,t),h=e.indicesofnearest(l,u)[0];r[a]=e.get(i,h),r[o]=e.get(l,h);var c=e.get(n,h),d=dr(e.get(n,h));return d=math.min(d,20),d>=0&&(r[o]=+r[o].tofixed(d)),[r,c]}function o_(t,e){var i=t.getdata(),a=t.coordinatesystem;if(e&&!k_(e)&&!_(e.coord)&&a){var o=a.dimensions,r=e_(e,i,a,t);if(e=n(e),e.type&&_b[e.type]&&r.baseaxis&&r.valueaxis){var s=yb(o,r.baseaxis.dim),l=yb(o,r.valueaxis.dim),u=_b[e.type](i,r.basedatadim,r.valuedatadim,s,l);e.coord=u[0],e.value=u[1]}else{for(var h=[null!=e.xaxis?e.xaxis:e.radiusaxis,null!=e.yaxis?e.yaxis:e.angleaxis],c=0;2>c;c++)_b[h[c]]&&(h[c]=b_(i,i.mapdimension(o[c]),h[c]));e.coord=h}}return e}function e_(t,e,i,n){var a={};return null!=t.valueindex||null!=t.valuedim?(a.valuedatadim=null!=t.valueindex?e.getdimension(t.valueindex):t.valuedim,a.valueaxis=i.getaxis(n_(n,a.valuedatadim)),a.baseaxis=i.getotheraxis(a.valueaxis),a.basedatadim=e.mapdimension(a.baseaxis.dim)):(a.baseaxis=n.getbaseaxis(),a.valueaxis=i.getotheraxis(a.baseaxis),a.basedatadim=e.mapdimension(a.baseaxis.dim),a.valuedatadim=e.mapdimension(a.valueaxis.dim)),a}function n_(t,e){var i=t.getdata(),n=i.dimensions;e=i.getdimension(e);for(var a=0;an?t.coord&&t.coord[n]:t.value}function b_(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,function(t){isnan(t)||(n+=t,a++)}),n/a}return"median"===i?t.getmedian(e):t.getdataextent(e,!0)["max"===i?1:0]}function v_(t,e,i){var n=e.coordinatesystem;t.each(function(a){var o,r=t.getitemmodel(a),s=ir(r.get("x"),i.getwidth()),l=ir(r.get("y"),i.getheight());if(isnan(s)||isnan(l)){if(e.getmarkerposition)o=e.getmarkerposition(t.getvalues(t.dimensions,a));else if(n){var u=t.get(n.dimensions[0],a),h=t.get(n.dimensions[1],a);o=n.datatopoint([u,h])}}else o=[s,l];isnan(s)||(o[0]=s),isnan(l)||(o[1]=l),t.setitemlayout(a,o)})}function g_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.getdata().mapdimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new el(n,i),o=p(i.get("data"),x(o_,e));return t&&(o=m(o,x(r_,t))),a.initdata(o,null,t?z_:function(t){return t.value}),a}function f_(t){return!isnan(t)&&!isfinite(t)}function w_(t,e,i,n){var a=1-t,o=n.dimensions[t];return f_(e[a])&&f_(i[a])&&e[t]===i[t]&&n.getaxis(o).containdata(e[t])}function h_(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(w_(1,i,n,t)||w_(0,i,n,t)))return!0}return r_(t,e[0])&&r_(t,e[1])}function z_(t,e,i,n,a){var o,r=n.coordinatesystem,s=t.getitemmodel(e),l=ir(s.get("x"),a.getwidth()),u=ir(s.get("y"),a.getheight());if(isnan(l)||isnan(u)){if(n.getmarkerposition)o=n.getmarkerposition(t.getvalues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=r.datatopoint([c,d])}if("cartesian2d"===r.type){var f=r.getaxis("x"),p=r.getaxis("y"),h=r.dimensions;f_(t.get(h[0],e))?o[0]=f.toglobalcoord(f.getextent()[i?0:1]):f_(t.get(h[1],e))&&(o[1]=p.toglobalcoord(p.getextent()[i?0:1]))}isnan(l)||(o[0]=l),isnan(u)||(o[1]=u)}else o=[l,u];t.setitemlayout(e,o)}function u_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getdata().getdimensioninfo(e.getdata().mapdimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new el(n,i),o=new el(n,i),r=new el([],i),l=p(i.get("data"),x(bb,e,t,i));t&&(l=m(l,x(h_,t)));var u=t?z_:function(t){return t.value};return a.initdata(p(l,function(t){return t[0]}),null,u),o.initdata(p(l,function(t){return t[1]}),null,u),r.initdata(p(l,function(t){return t[2]})),r.hasitemoption=!0,{from:a,to:o,line:r}}function x_(t){return!isnan(t)&&!isfinite(t)}function y_(t,e,i){var n=1-t;return x_(e[n])&&x_(i[n])}function j_(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(y_(1,i,n,t)||y_(0,i,n,t))?!0:r_(t,{coord:i,x:e.x0,y:e.y0})||r_(t,{coord:n,x:e.x1,y:e.y1})}function q_(t,e,i,n,a){var o,r=n.coordinatesystem,s=t.getitemmodel(e),l=ir(s.get(i[0]),a.getwidth()),u=ir(s.get(i[1]),a.getheight());if(isnan(l)||isnan(u)){if(n.getmarkerposition)o=n.getmarkerposition(t.getvalues(i,e));else{var h=t.get(i[0],e),c=t.get(i[1],e),d=[h,c];r.clampdata&&r.clampdata(d,d),o=r.datatopoint(d,!0)}if("cartesian2d"===r.type){var f=r.getaxis("x"),p=r.getaxis("y"),h=t.get(i[0],e),c=t.get(i[1],e);x_(h)?o[0]=f.toglobalcoord(f.getextent()["x0"===i[0]?0:1]):x_(c)&&(o[1]=p.toglobalcoord(p.getextent()["y0"===i[1]?0:1]))}isnan(l)||(o[0]=l),isnan(u)||(o[1]=u)}else o=[l,u];return o}function k_(t,e,i){var n,a,o=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getdata(),n=i.getdimensioninfo(i.mapdimension(t))||{};return s({name:t},n)}),a=new el(p(o,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],a=new el(n,i));var r=p(i.get("data"),x(sb,e,t,i));t&&(r=m(r,x(j_,t)));var l=t?function(t,e,i,n){return t.coord[math.floor(n/2)][n%2]}:function(t){return t.value};return a.initdata(r,null,l),a.hasitemoption=!0,a}function $_(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axistype=i[e],delete t.type),j_(t),q_(t,"controlposition")){var n=t.controlstyle||(t.controlstyle={});q_(n,"position")||(n.position=t.controlposition),"none"!==n.position||q_(n,"show")||(n.show=!1,delete n.position),delete t.controlposition}f(t.data||[],function(t){s(t)&&!_(t)&&(!q_(t,"value")&&q_(t,"name")&&(t.value=t.name),j_(t))})}function j_(t){var e=t.itemstyle||(t.itemstyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1};f(n,function(t,e){o[e]||q_(a,e)||(a[e]=t)}),i.label&&!q_(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function q_(t,e){return t.hasownproperty(e)}function tw(t,e){return ts(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()},t.get("padding"))}function ew(t,e,i,a){var o=so(t.get(e).replace(/^path:\/\//,""),n(a||{}),new ti(i[0],i[1],i[2],i[3]),"center");return o}function iw(t,e,i,n,o,r){var s=e.get("color");if(o)o.setcolor(s),i.add(o),r&&r.onupdate(o);else{var l=t.get("symbol");o=ec(l,-1,-1,2,2,s),o.setstyle("strokenoscale",!0),i.add(o),r&&r.oncreate(o)}var u=e.getitemstyle(["color","symbol","symbolsize"]);o.setstyle(u),n=a({recthover:!0,z2:100},n,!0);var h=t.get("symbolsize");h=h instanceof array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,n.scale=h;var c=t.get("symboloffset");if(c){var d=n.position=n.position||[0,0];d[0]+=ir(c[0],h[0]),d[1]+=ir(c[1],h[1])}var f=t.get("symbolrotate");return n.rotation=(f||0)*math.pi/180||0,o.attr(n),o.updatetransform(),o}function nw(t,e,i,n,a){if(!t.dragging){var o=n.getmodel("checkpointstyle"),r=i.datatocoord(n.getdata().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopanimation(!0),t.animateto({position:[r,0]},o.get("animationduration",!0),o.get("animationeasing",!0)))}}function aw(t){return u(eb,t)>=0}function ow(t,e){t=t.slice();var i=p(t,qr);e=(e||[]).slice();var n=p(e,qr);return function(a,o){f(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l=0}function a(t,n){var a=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(a=!0)})}),a}function o(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 r(t){!n(t,s)&&a(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(r);while(l);return s}}function sw(t,e,i){var n=[1/0,-1/0];return rb(i,function(t){var i=t.getdata();i&&rb(i.mapdimension(e,!0),function(t){var e=i.getapproximateextent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var r=i.getmax(!0);return null!=r&&"datamax"!==r&&"function"!=typeof r?e[1]=r:a&&(e[1]=o>0?o-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function uw(t,e){var i=t.getaxismodel(),n=t._percentwindow,a=t._valuewindow;if(n){var o=lr(a,[0,500]);o=math.min(o,20);var r=e||0===n[0]&&100===n[1];i.setrange(r?null:+a[0].tofixed(o),r?null:+a[1].tofixed(o))}}function hw(t){var e=t._minmaxspan={},i=t._datazoommodel,n=t._dataextent;rb(["min","max"],function(a){var o=i.get(a+"span"),r=i.get(a+"valuespan");null!=r&&(r=t.getaxismodel().axis.scale.parse(r)),null!=r?o=mr(n[0]+r,n,[0,100],!0):null!=o&&(r=mr(o,[0,100],n,!0)-n[0]),e[a+"span"]=o,e[a+"valuespan"]=r})}function cw(t){var e={};return vb(["start","end","startvalue","endvalue","throttle"],function(i){t.hasownproperty(i)&&(e[i]=t[i])}),e}function dw(t,e){var i=t._rangepropmode,n=t.get("rangemode");vb([["start","startvalue"],["end","endvalue"]],function(t,a){var o=null!=e[t[0]],r=null!=e[t[1]];o&&!r?i[a]="percent":!o&&r?i[a]="value":n?i[a]=n[a]:o&&(i[a]="percent")})}function fw(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function pw(t){return"vertical"===t?"ns-resize":"ew-resize"}function gw(t,e){var i=yw(t),n=e.datazoomid,a=e.coordid;f(i,function(t){var i=t.datazoominfos;i[n]&&u(e.allcoordids,a)<0&&(delete i[n],t.count--)}),_w(i);var o=i[a];o||(o=i[a]={coordid:a,datazoominfos:{},count:0},o.controller=xw(t,o),o.dispatchaction=x(ww,t)),!o.datazoominfos[n]&&o.count++,o.datazoominfos[n]=e;var r=bw(o.datazoominfos);o.controller.enable(r.controltype,r.opt),o.controller.setpointerchecker(e.containspoint),bl(o,"dispatchaction",e.datazoommodel.get("throttle",!0),"fixrate")}function mw(t,e){var i=yw(t);f(i,function(t){t.controller.dispose();var i=t.datazoominfos;i[e]&&(delete i[e],t.count--)}),_w(i)}function vw(t){return t.type+"\x00_"+t.id}function yw(t){var e=t.getzr();return e[iv]||(e[iv]={})}function xw(t,e){var i=new op(t.getzr());return f(["pan","zoom","scrollmove"],function(t){i.on(t,function(i){var n=[];f(e.datazoominfos,function(a){if(i.isavailablebehavior(a.datazoommodel.option)){var o=(a.getrange||{})[t],r=o&&o(e.controller,i);!a.datazoommodel.get("disabled",!0)&&r&&n.push({datazoomid:a.datazoomid,start:r[0],end:r[1]})}}),n.length&&e.dispatchaction(n)})}),i}function _w(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function ww(t,e){t.dispatchaction({type:"datazoom",batch:e})}function bw(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return f(t,function(t){var o=t.datazoommodel,r=o.get("disabled",!0)?!1:o.get("zoomlock",!0)?"move":!0;n[i+r]>n[i+e]&&(e=r),a&=o.get("preventdefaultmousemove",!0)}),{controltype:e,opt:{zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!0,preventdefaultmousemove:!!a}}}function sw(t){return function(e,i,n,a){var o=this._range,r=o.slice(),s=e.axismodels[0];if(s){var l=t(r,s,e,i,n,a);return kn(l,r,[0,100],"all"),this._range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}}function mw(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function iw(t){if(t)for(var e in t)if(t.hasownproperty(e))return!0}function tw(t,e,i){function a(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return uv(e,function(e){var r=o[e]=a();uv(t[e],function(t,a){if(qo.isvalidtype(a)){var o={type:a,visual:t};i&&i(o,e),r[a]=new qo(o),"opacity"===a&&(o=n(o),o.type="coloralpha",r.__hidden.__alphaforopacity=new qo(o))}})}),o}function aw(t,e,i){var a;f(i,function(t){e.hasownproperty(t)&&iw(e[t])&&(a=!0)}),a&&f(i,function(i){e.hasownproperty(i)&&iw(e[i])?t[i]=n(e[i]):delete t[i]})}function dw(t,e,i,n,a,o){function r(t){return i.getitemvisual(h,t)}function s(t,e){i.setitemvisual(h,t,e)}function l(t,l){h=null==o?t:l;var c=i.getrawdataitem(h);if(!c||c.visualmap!==!1)for(var d=n.call(a,t),f=e[d],p=u[d],g=0,m=p.length;m>g;g++){var v=p[g];f[v]&&f[v].applyvisual(t,r,s)}}var u={};f(t,function(t){var i=qo.preparevisualtypes(e[t]);u[t]=i});var h;null==o?i.each(l):i.each([o],l)}function cw(t,e,i,n){function a(t,a){function r(t){return a.getitemvisual(l,t)}function s(t,e){a.setitemvisual(l,t,e)}null!=n&&(n=a.getdimension(n));for(var l;null!=(l=t.next());){var u=a.getrawdataitem(l);if(!u||u.visualmap!==!1)for(var h=null!=n?a.get(n,l,!0):l,c=i(h),d=e[c],f=o[c],p=0,g=f.length;g>p;p++){var m=f[p];d[m]&&d[m].applyvisual(h,r,s)}}}var o={};return f(t,function(t){var i=qo.preparevisualtypes(e[t]);o[t]=i}),{progress:a}}function lw(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range,o=e[t];return kw(o,a)}},rect:function(n,a,o){if(n){var r=o.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]=0)&&t(o,n,a)})}function ow(t){return t[0]>t[1]&&t.reverse(),t}function ew(t,e){return da(t,e,{includemaintypes:gv})}function nw(t,e,i,n){var a=i.getaxis(["x","y"][t]),o=ow(p([0,1],function(t){return e?a.coordtodata(a.tolocalcoord(n[t])):a.toglobalcoord(a.datatocoord(n[t]))})),r=[];return r[t]=o,r[1-t]=[0/0,0/0],{values:o,xyminmax:r}}function rw(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function zw(t,e){var i=bw(t),n=bw(e),a=[i[0]/n[0],i[1]/n[1]];return isnan(a[0])&&(a[0]=1),isnan(a[1])&&(a[1]=1),a}function bw(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function vw(t){t.eachcomponent({maintype:"brush"},function(e){var i=e.brushtargetmanager=new pw(e.option,t);i.setinputranges(e.areas,t)})}function gw(t,e,i,n,a){if(a){var o=t.getzr();if(!o[mv]){o[sv]||(o[sv]=fw);var r=bl(o,sv,i,e);r(t,n)}}}function fw(t,e){if(!t.isdisposed()){var i=t.getzr();i[mv]=!0,t.dispatchaction({type:"brushselect",batch:e}),i[mv]=!1}}function ww(t,e,i,n){for(var a=0,o=e.length;o>a;a++){var r=e[a];if(t[r.brushtype](n,i,r.selectors,r))return!0}}function hw(t){var e=t.brushselector;if(b(e)){var i=[];return f(hv,function(t,n){i[n]=function(i,n,a,o){var r=n.getitemlayout(i);return t[e](r,a,o)}}),i}if(w(e)){var n={};return f(hv,function(t,i){n[i]=e}),n}return e}function zw(t,e){var i=t.option.seriesindex;return null!=i&&"all"!==i&&(_(i)?u(i,e)<0:e!==i)}function uw(t){var e=t.selectors={};return f(hv[t.brushtype],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function xw(t){return new ti(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function yw(t,e){return a({brushtype:t.brushtype,brushmode:t.brushmode,transformable:t.transformable,brushstyle:new vr(t.brushstyle).getitemstyle(),removeonclick:t.removeonclick,z:t.z},e,!0)}function jw(t,e,i,n){(!n||n.$from!==t.id)&&this._brushcontroller.setpanels(t.brushtargetmanager.makepanelopts(i)).enablebrush(t.brushoption).updatecovers(t.areas.slice())}function qw(t,e){dv[t]=e}function kw(t){return dv[t]}function $w(t,e,i){this.model=t,this.ecmodel=e,this.api=i,this._brushtype,this._brushmode}function jw(t,e){return t&&t.hasownproperty&&t.hasownproperty(e)}function qw(t,e,i,n){function a(t){return l[t]}function o(t,e){l[t]=e}for(var r=e.targetvisuals[n],s=qo.preparevisualtypes(r),l={color:t.getdata().getvisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=r["opacity"===c?"__alphaforopacity":c];d&&d.applyvisual(i,a,o)}return l.color}function tb(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,a=(i[1]-i[0])/n,o=i[0],r=[],s=0;n>=s&&oc;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=ts(h,o,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function ib(t,e){return f(t||[],function(t){null!=t.dataindex&&(t.dataindexinside=t.dataindex,t.dataindex=null),t.highlightkey="visualmap"+(e?e.componentindex:"")}),t}function nb(t,e,i,n){return new ha({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){im(t.event)},ondragend:n})}function ab(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function ob(t,e,i,n){return t?[[0,-qv(e,kv(i,0))],[jv,0],[0,qv(e,kv(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function rb(t,e,i){var n=$v/2,a=t.get("hoverlinkdatasize");return a&&(n=yv(a,e,i,!0)/2),n}function sb(t){var e=t.get("hoverlinkonhandle");return!!(null==e?t.get("realtime"):e)}function lb(t){return"vertical"===t?"ns-resize":"ew-resize"}function ub(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function hb(t){return 0===t.indexof("my")}function cb(t){this.model=t}function db(t){this.model=t}function fb(t){var e={},i=[],n=[];return t.eachrawseries(function(t){var a=t.coordinatesystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)i.push(t);else{var o=a.getbaseaxis();if("category"===o.type){var r=o.dim+"_"+o.index;e[r]||(e[r]={categoryaxis:o,valueaxis:a.getotheraxis(o),series:[]},n.push({axisdim:o.dim,axisindex:o.index})),e[r].series.push(t)}else i.push(t)}}),{seriesgroupbycategoryaxis:e,other:i,meta:n}}function pb(t){var e=[];return f(t,function(t){var i=t.categoryaxis,n=t.valueaxis,a=n.dim,o=[" "].concat(p(t.series,function(t){return t.name})),r=[i.model.getcategories()];f(t.series,function(t){r.push(t.getrawdata().maparray(a,function(t){return t}))});for(var s=[o.join(fg)],l=0;lr;r++)n[r]=arguments[r];i.push((o?o+fg:"")+n.join(fg))}),i.join("\n")}).join("\n\n"+dg+"\n\n")}function mb(t){var e=fb(t);return{value:m([pb(e.seriesgroupbycategoryaxis),gb(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+dg+"\n\n"),meta:e.meta}}function vb(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function yb(t){var e=t.slice(0,t.indexof("\n"));return e.indexof(fg)>=0?!0:void 0}function xb(t){for(var e=t.split(/\n+/g),i=vb(e.shift()).split(pg),n=[],a=p(i,function(t){return{name:t,data:[]}}),o=0;o=0;a--){var o=i[a];if(o[n])break}if(0>a){var r=t.querycomponents({maintype:"datazoom",subtype:"select",id:n})[0];if(r){var s=r.getpercentrange();i[0][n]={datazoomid:n,start:s[0],end:s[1]}}}}),i.push(e)}function ib(t){var e=db(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return gg(i,function(t,i){for(var a=e.length-1;a>=0;a--){var t=e[a][i];if(t){n[i]=t;break}}}),n}function tb(t){t[mg]=null}function ab(t){return db(t).length}function db(t){var e=t[mg];return e||(e=t[mg]=[{}]),e}function cb(t,e,i){(this._brushcontroller=new em(i.getzr())).on("brush",y(this._onbrush,this)).mount(),this._iszoomactive}function lb(t){var e={};return f(["xaxisindex","yaxisindex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(e[i]===!1||"none"===e[i])&&(e[i]=[])}),e}function kb(t,e){t.seticonstatus("back",ab(e)>1?"emphasis":"normal")}function pb(t,e,i,n,a){var o=i._iszoomactive;n&&"takeglobalcursor"===n.type&&(o="datazoomselect"===n.key?n.datazoomselectactive:!1),i._iszoomactive=o,t.seticonstatus("zoom",o?"emphasis":"normal");var r=new pw(lb(t.option),e,{include:["grid"]});i._brushcontroller.setpanels(r.makepanelopts(a,function(t){return t.xaxisdeclared&&!t.yaxisdeclared?"linex":!t.xaxisdeclared&&t.yaxisdeclared?"liney":"rect"})).enablebrush(o?{brushtype:"auto",brushstyle:{linewidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}function ob(t){this.model=t}function eb(t,e,i,n){var a=i.type,o=mg.hasownproperty(a)?mg[a]:bo(a),r=new o(i);e.add(r),n.set(t,r),r.__ecgraphicid=t}function nb(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){nb(t,e)}),e.removekey(t.__ecgraphicid),i.remove(t))}function rb(t){return t=r({},t),f(["id","parentid","$action","hv","bounding"].concat(od),function(e){delete t[e]}),t}function zb(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function bb(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 vb(t,e,i){var n=r({},i),o=t[e],s=i.$action||"merge";"merge"===s?o?(a(o,n,!0),ns(o,n,{ignoresize:!0}),os(i,o)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&o&&(t[e]=null)}function gb(t,e){t&&(t.hv=e.hv=[zb(e,["left","right"]),zb(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function fb(t,e){var i=t.eventdata;t.silent||t.ignore||i||(i=t.eventdata={componenttype:"graphic",componentindex:e.componentindex,name:t.name}),i&&(i.info=t.info)}function wb(t){return tg(t)}function hb(){if(!cg&&lg){cg=!0;var t=lg.stylesheets;t.length<31?lg.createstylesheet().addrule(".zrvml","behavior:url(#default#vml)"):t[0].addrule(".zrvml","behavior:url(#default#vml)")}}function zb(t){return parseint(t,10)}function ub(t,e){hb(),this.root=t,this.storage=e;var i=document.createelement("div"),n=document.createelement("div");i.style.csstext="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.csstext="position:absolute;left:0;top:0;",t.appendchild(i),this._vmlroot=n,this._vmlviewport=i,this.resize();var a=e.delfromstorage,o=e.addtostorage;e.delfromstorage=function(t){a.call(e,t),t&&t.onremove&&t.onremove(n)},e.addtostorage=function(t){t.onadd&&t.onadd(n),o.call(e,t)},this._firstpaint=!0}function xb(t){return function(){nm('in ie8.0 vml mode painter not support method "'+t+'"')}}function yb(t){return document.createelementns(_f,t)}function jb(t){return mf(1e4*t)/1e4}function qb(t){return lf>t&&t>-lf}function kb(t,e){var i=e?t.textfill:t.fill;return null!=i&&i!==sf}function $b(t,e){var i=e?t.textstroke:t.stroke;return null!=i&&i!==sf}function jb(t,e){e&&qb(t,"transform","matrix("+bf.call(e,",")+")")}function qb(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setattribute(e,i)}function ts(t,e,i){t.setattributens("http://www.w3.org/1999/xlink",e,i)}function es(t,e,i,n){if(kb(e,i)){var a=i?e.textfill:e.fill;a="transparent"===a?sf:a,qb(t,"fill",a),qb(t,"fill-opacity",null!=e.fillopacity?e.fillopacity*e.opacity:e.opacity)}else qb(t,"fill",sf);if($b(e,i)){var o=i?e.textstroke:e.stroke;o="transparent"===o?sf:o,qb(t,"stroke",o);var r=i?e.textstrokewidth:e.linewidth,s=!i&&e.strokenoscale?n.getlinescale():1;qb(t,"stroke-width",r/s),qb(t,"paint-order",i?"stroke":"fill"),qb(t,"stroke-opacity",null!=e.strokeopacity?e.strokeopacity:e.opacity);var l=e.linedash;l?(qb(t,"stroke-dasharray",e.linedash.join(",")),qb(t,"stroke-dashoffset",mf(e.linedashoffset||0))):qb(t,"stroke-dasharray",""),e.linecap&&qb(t,"stroke-linecap",e.linecap),e.linejoin&&qb(t,"stroke-linejoin",e.linejoin),e.miterlimit&&qb(t,"stroke-miterlimit",e.miterlimit)}else qb(t,"stroke",sf)}function is(t){for(var e=[],i=t.data,n=t.len(),a=0;n>a;){var o=i[a++],r="",s=0;switch(o){case wf.m:r="m",s=2;break;case wf.l:r="l",s=2;break;case wf.q:r="q",s=4;break;case wf.c:r="c",s=6;break;case wf.a:var l=i[a++],u=i[a++],h=i[a++],c=i[a++],d=i[a++],f=i[a++],p=i[a++],g=i[a++],m=math.abs(f),v=qb(m-df)||(g?f>=df:-f>=df),y=f>0?f%df:f%df+df,x=!1;x=v?!0:qb(m)?!1:y>=af==!!g;var _=jb(l+h*tf(d)),w=jb(u+c*if(d));v&&(f=g?df-1e-4:-df+1e-4,x=!0,9===a&&e.push("m",_,w));var b=jb(l+h*tf(d+f)),s=jb(u+c*if(d+f));e.push("a",jb(h),jb(c),mf(p*cf),+x,+g,b,s);break;case wf.z:r="z";break;case wf.r:var b=jb(i[a++]),s=jb(i[a++]),m=jb(i[a++]),i=jb(i[a++]);e.push("m",b,s,"l",b+m,s,"l",b+m,s+i,"l",b,s+i,"l",b,s)}r&&e.push(r);for(var t=0;s>t;t++)e.push(jb(i[a++]))}return e.join(" ")}function ns(t,e,i,n,a,o,r){ee(rf),e&&i&&ne(rf,i);var s=n.textrotation;if(a&&s){var l=n.textorigin;"center"===l?(o=a.width/2+a.x,r=a.height/2+a.y):l&&(o=l[0]+a.x,r=l[1]+a.y),rf[4]-=o,rf[5]-=r,be(rf,rf,s),rf[4]+=o,rf[5]+=r}jb(t,rf)}function as(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function os(t,e,i,n){qb(t,"dominant-baseline","middle"),qb(t,"text-anchor",zf[e]),qb(t,"x",i),qb(t,"y",n)}function rs(t){t&&t.__textsvgel&&(t.__textsvgel.parentnode&&t.__textsvgel.parentnode.removechild(t.__textsvgel),t.__textsvgel=null,t.__tspanlist=[],t.__text=null)}function ss(){}function ls(t,e){for(var i=0,n=e.length,a=0,o=0;n>i;i++){var r=e[i];if(r.removed){for(var s=[],l=o;la;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventprocessor;if(e){var n=arguments,a=n.length;a>3&&(n=js.call(n,1));for(var o=e.length,r=0;o>r;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),o--):r++}}}return i&&i.aftertrigger&&i.aftertrigger(t),this},triggerwithcontext:function(t){var e=this._$handlers[t],i=this._$eventprocessor;if(e){var n=arguments,a=n.length;a>4&&(n=js.call(n,1,n.length-1));for(var o=n[n.length-1],r=e.length,s=0;r>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(a){case 1:l.h.call(o);break;case 2:l.h.call(o,n[1]);break;case 3:l.h.call(o,n[1],n[2]);break;default:l.h.apply(o,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.aftertrigger&&i.aftertrigger(t),this}};var ks=math.log(2),$s="___zreventsaved",js=[],qs="undefined"!=typeof window&&!!window.addeventlistener,tm=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,em=[],im=qs?function(t){t.preventdefault(),t.stoppropagation(),t.cancelbubble=!0}:function(t){t.returnvalue=!1,t.cancelbubble=!0},nm=function(){this._track=[]};nm.prototype={constructor:nm,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 a={points:[],touches:[],target:e,event:t},o=0,r=n.length;r>o;o++){var s=n[o],l=xe(i,s,{});a.points.push([l.zrx,l.zry]),a.touches.push(s)}this._track.push(a)}},_recognize:function(t){for(var e in am)if(am.hasownproperty(e)){var i=am[e](this._track,t);if(i)return i}}};var am={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,a=(t[i-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var o=te(n)/te(a);!isfinite(o)&&(o=1),e.pinchscale=o;var r=ae(n);return e.pinchx=r[0],e.pinchy=r[1],{type:"pinch",target:t[0].target,event:e}}}}},om="silent";le.prototype.dispose=function(){};var rm=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],sm=function(t,e,i,n){qs.call(this),this.storage=t,this.painter=e,this.painterroot=n,i=i||new le,this.proxy=null,this._hovered={},this._lasttouchmoment,this._lastx,this._lasty,this._gesturemgr,le.call(this),this.sethandlerproxy(i)};sm.prototype={constructor:sm,sethandlerproxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(rm,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrx,i=t.zry,n=pe(this,e,i),a=this._hovered,o=a.target;o&&!o.__zr&&(a=this.findhover(a.x,a.y),o=a.target);var r=this._hovered=n?{x:e,y:i}:this.findhover(e,i),s=r.target,l=this.proxy;l.setcursor&&l.setcursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchtoelement(a,"mouseout",t),this.dispatchtoelement(r,"mousemove",t),s&&s!==o&&this.dispatchtoelement(r,"mouseover",t)},mouseout:function(t){var e=t.zreventcontrol,i=t.zristolocaldom;"only_globalout"!==e&&this.dispatchtoelement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(){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 a="on"+e,o=de(e,t,i);n&&(n[a]&&(o.cancelbubble=n[a].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelbubble););o.cancelbubble||(this.trigger(e,o),this.painter&&this.painter.eachotherlayer(function(t){"function"==typeof t[a]&&t[a].call(t,o),t.trigger&&t.trigger(e,o)}))}},findhover:function(t,e,i){for(var n=this.storage.getdisplaylist(),a={x:t,y:e},o=n.length-1;o>=0;o--){var r;if(n[o]!==i&&!n[o].ignore&&(r=ke(n[o],t,e))&&(!a.toptarget&&(a.toptarget=n[o]),r!==om)){a.target=n[o];break}}return a},processgesture:function(t,e){this._gesturemgr||(this._gesturemgr=new nm);var i=this._gesturemgr;"start"===e&&i.clear();var n=i.recognize(t,this.findhover(t.zrx,t.zry,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var a=n.type;t.gestureevent=a,this.dispatchtoelement({target:n.target},a,n.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){sm.prototype[t]=function(e){var i,n,a=e.zrx,o=e.zry,r=pe(this,a,o);if("mouseup"===t&&r||(i=this.findhover(a,o),n=i.target),"mousedown"===t)this._downel=n,this._downpoint=[e.zrx,e.zry],this._upel=n;else if("mouseup"===t)this._upel=n;else if("click"===t){if(this._downel!==this._upel||!this._downpoint||us(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(i,t,e)}}),c(sm,qs),c(sm,le);var lm="undefined"==typeof float32array?array:float32array,um=(object.freeze||object)({create:oe,identity:ee,copy:ne,mul:re,translate:ze,rotate:be,scale:ve,invert:ge,clone:fe}),hm=ee,cm=5e-5,dm=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},fm=dm.prototype;fm.transform=null,fm.needlocaltransform=function(){return we(this.rotation)||we(this.position[0])||we(this.position[1])||we(this.scale[0]-1)||we(this.scale[1]-1)};var pm=[];fm.updatetransform=function(){var t=this.parent,e=t&&t.transform,i=this.needlocaltransform(),n=this.transform;if(!i&&!e)return void(n&&hm(n));n=n||oe(),i?this.getlocaltransform(n):hm(n),e&&(i?re(n,t.transform,n):ne(n,t.transform)),this.transform=n;var a=this.globalscaleratio;if(null!=a&&1!==a){this.getglobalscale(pm);var o=pm[0]<0?-1:1,r=pm[1]<0?-1:1,s=((pm[0]-o)*a+o)/pm[0]||0,l=((pm[1]-r)*a+r)/pm[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invtransform=this.invtransform||oe(),ge(this.invtransform,n)},fm.getlocaltransform=function(t){return dm.getlocaltransform(this,t)},fm.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)},fm.restoretransform=function(t){var e=t.dpr||1;t.settransform(e,0,0,e,0,0)};var gm=[],mm=oe();fm.setlocaltransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,a=this.scale;we(e-1)&&(e=math.sqrt(e)),we(i-1)&&(i=math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],a[0]=e,a[1]=i,this.rotation=math.atan2(-t[1]/i,t[0]/e)}},fm.decomposetransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(re(gm,t.invtransform,e),e=gm);var i=this.origin;i&&(i[0]||i[1])&&(mm[4]=i[0],mm[5]=i[1],re(gm,e,mm),gm[4]-=i[0],gm[5]-=i[1],e=gm),this.setlocaltransform(e)}},fm.getglobalscale=function(t){var e=this.transform;return t=t||[],e?(t[0]=math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},fm.transformcoordtolocal=function(t,e){var i=[t,e],n=this.invtransform;return n&&oe(i,i,n),i},fm.transformcoordtoglobal=function(t,e){var i=[t,e],n=this.transform;return n&&oe(i,i,n),i},dm.getlocaltransform=function(t,e){e=e||[],hm(e);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ve(e,e,n),a&&be(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var vm={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-vm.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*vm.bouncein(2*t):.5*vm.bounceout(2*t-1)+.5}};he.prototype={constructor:he,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,a="string"==typeof n?vm[n]:n,o="function"==typeof a?a(i):i;return this.fire("frame",o),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 ym=function(){this.head=null,this.tail=null,this._len=0},xm=ym.prototype;xm.insert=function(t){var e=new _m(t);return this.insertentry(e),e},xm.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++},xm.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--},xm.len=function(){return this._len},xm.clear=function(){this.head=this.tail=null,this._len=0};var _m=function(t){this.value=t,this.next,this.prev},wm=function(t){this._list=new ym,this._map={},this._maxsize=t||10,this._lastremovedentry=null},bm=wm.prototype;bm.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var o=i.len(),r=this._lastremovedentry;if(o>=this._maxsize&&o>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastremovedentry=s}r?r.value=e:r=new _m(e),r.key=t,i.insertentry(r),n[t]=r}return a},bm.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},bm.clear=function(){this._list.clear(),this._map={}};var sm={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]},mm=new wm(20),im=null,tm=oi,am=ri,dm=(object.freeze||object)({parse:ti,lift:ni,tohex:ai,fastlerp:oi,fastmaptocolor:tm,lerp:ri,maptocolor:am,modifyhsl:si,modifyalpha:li,stringify:ui}),cm=array.prototype.slice,lm=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||hi,this._setter=n||ci,this._clipcount=0,this._delay=0,this._donelist=[],this._onframelist=[],this._cliplist=[]};lm.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasownproperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:xi(a)})}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,a=0,o=function(){a--,a||n._donecallback()};for(var r in this._tracks)if(this._tracks.hasownproperty(r)){var s=bi(this,t,o,this._tracks[r],r,e);s&&(this._cliplist.push(s),a++,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;il;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=a;if(!i)return void nm('property "'+t+'" is not existed in element '+a.id);var c=a.animators,d=new lm(i,e);return d.during(function(){a.dirty(n)}).done(function(){c.splice(u(c,d),1)}),c.push(d),o&&o.animation.addanimator(d),d},stopanimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateto:function(t,e,i,n,a,o){si(this,t,e,i,n,a,o)},animatefrom:function(t,e,i,n,a,o){si(this,t,e,i,n,a,o,!0)}};var zm=function(t){dm.call(this,t),qs.call(this,t),rm.call(this,t),this.id=t.id||is()};zm.prototype={type:"element",name:"",__zr:null,ignore:!1,clippath:null,isgroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposetransform(),this.dirty(!1)},beforeupdate:function(){},afterupdate:function(){},update:function(){this.updatetransform()},traverse:function(){},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>o||a>u)},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 ti(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}}},ti.create=function(t){return new ti(t.x,t.y,t.width,t.height)};var fm=function(t){t=t||{},zm.call(this,t);for(var e in t)t.hasownproperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};fm.prototype={constructor:fm,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 fm&&t.addchildrentostorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=u(n,t);return 0>a?this:(n.splice(a,1),t.parent=null,i&&(i.delfromstorage(t),t instanceof fm&&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,as.canvassupported&&ei(i,ni)},_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 a=n,o=t;a;)a.parent=o,a.updatetransform(),e.push(a),o=a,a=a.clippath}if(t.isgroup){for(var r=t._children,s=0;se;e++)this.delroot(t[e]);else{var a=u(this._roots,t);a>=0&&(this.delfromstorage(t),this._roots.splice(a,1),t instanceof fm&&t.delchildrenfromstorage(this))}},addtostorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delfromstorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderlist=this._roots=null},displayablesortfunc:ni};var um={shadowblur:1,shadowoffsetx:1,shadowoffsety:1,textshadowblur:1,textshadowoffsetx:1,textshadowoffsety:1,textboxshadowblur:1,textboxshadowoffsetx:1,textboxshadowoffsety:1},xm=function(t,e,i){return um.hasownproperty(e)?i*=t.dpr:i},ym={none:0,style_bind:1,plain_text:2},jm=9,qm=[["shadowblur",0],["shadowoffsetx",0],["shadowoffsety",0],["shadowcolor","#000"],["linecap","butt"],["linejoin","miter"],["miterlimit",10]],km=function(t){this.extendfrom(t,!1)};km.prototype={constructor:km,fill:"#000",stroke:null,opacity:1,fillopacity:null,strokeopacity:null,linedash:null,linedashoffset:0,shadowblur:0,shadowoffsetx:0,shadowoffsety:0,linewidth:1,strokenoscale:!1,text:null,font:null,textfont:null,fontstyle:null,fontweight:null,fontsize:null,fontfamily:null,texttag:null,textfill:"#000",textstroke:null,textwidth:null,textheight:null,textstrokewidth:0,textlineheight:null,textposition:"inside",textrect:null,textoffset:null,textalign:null,textverticalalign:null,textdistance:5,textshadowcolor:"transparent",textshadowblur:0,textshadowoffsetx:0,textshadowoffsety:0,textboxshadowcolor:"transparent",textboxshadowblur:0,textboxshadowoffsetx:0,textboxshadowoffsety:0,transformtext:!1,textrotation:0,textorigin:null,textbackgroundcolor:null,textbordercolor:null,textborderwidth:0,textborderradius:0,textpadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,a=i&&i.style,o=!a||t.__attrcachedby!==ym.style_bind;t.__attrcachedby=ym.style_bind;for(var r=0;r0},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?zi:ri,a=n(t,e,i),o=e.colorstops,r=0;r=0&&i.splice(n,1),t.__hovermir=null},clearhover:function(){for(var t=this._hoverelements,e=0;ea;){var o=t[a],r=o.__from;r&&r.__zr?(a++,r.invisible||(o.transform=r.transform,o.invtransform=r.invtransform,o.__clippaths=r.__clippaths,this._dopaintel(o,i,!0,n))):(t.splice(a,1),r.__hovermir=null,e--)}i.ctx.restore()}},gethoverlayer:function(){return this.getlayer(yi)},_paintlist:function(t,e,i){if(this._redrawid===i){e=e||!1,this._updatelayerstatus(t);var n=this._dopaintlist(t,e);if(this._needsmanuallycompositing&&this._compositemanually(),!n){var a=this;ii(function(){a._paintlist(t,e,i)})}}},_compositemanually:function(){var t=this.getlayer(xi).ctx,e=this._domroot.width,i=this._domroot.height;t.clearrect(0,0,e,i),this.eachbuiltinlayer(function(n){n.virtual&&t.drawimage(n.dom,0,0,e,i)})},_dopaintlist:function(t,e){for(var i=[],n=0;n15)break}}o.__drawindex=m,o.__drawindex0&&t>n[0]){for(r=0;a-1>r&&!(n[r]t);r++);o=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(o){var l=o.dom;l.nextsibling?s.insertbefore(e.dom,l.nextsibling):s.appendchild(e.dom)}else s.firstchild?s.insertbefore(e.dom,s.firstchild):s.appendchild(e.dom)},eachlayer:function(t,e){var i,n,a=this._zlevellist;for(n=0;n0?_i:0),this._needsmanuallycompositing),r.__builtin__||nm("zlevel "+s+" has been used by unkown layer "+r.id),r!==a&&(r.__used=!0,r.__startindex!==i&&(r.__dirty=!0),r.__startindex=i,r.__drawindex=r.incremental?-1:i,e(i),a=r),n.__dirty&&(r.__dirty=!0,r.incremental&&r.__drawindex<0&&(r.__drawindex=i))}e(i),this.eachbuiltinlayer(function(t){!t.__used&&t.getelementcount()>0&&(t.__dirty=!0,t.__startindex=t.__endindex=t.__drawindex=0),t.__dirty&&t.__drawindex<0&&(t.__drawindex=t.__startindex)})},clear:function(){return this.eachbuiltinlayer(this._clearlayer),this},_clearlayer:function(t){t.clear()},setbackgroundcolor:function(t){this._backgroundcolor=t},configlayer:function(t,e){if(e){var i=this._layerconfig;i[t]?a(i[t],e,!0):i[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeanimator:function(t){for(var e=t.getclips(),i=0;ir;r++){var s=i[r],l=s.step(t,e);l&&(a.push(l),o.push(s))}for(var r=0;n>r;)i[r]._needsremove?(i[r]=i[n-1],i.pop(),n--):r++;n=a.length;for(var r=0;n>r;r++)o[r].fire(a[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startloop:function(){function t(){e._running&&(ii(t),!e._paused&&e._update())}var e=this;this._running=!0,ii(t)},start:function(){this._time=(new date).gettime(),this._pausedtime=0,this._startloop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pausestart=(new date).gettime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedtime+=(new date).gettime()-this._pausestart,this._paused=!1)},clear:function(){this._clips=[]},isfinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var i=new lm(t,e.loop,e.getter,e.setter);return this.addanimator(i),i}},c(ii,qs);var ti=300,ai=as.domsupported,di=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=p(t,function(t){var e=t.replace("mouse","pointer");return i.hasownproperty(e)?e:t});return{mouse:t,touch:e,pointer:n}}(),ci={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},li=wn.prototype;li.stoppropagation=li.stopimmediatepropagation=li.preventdefault=g;var ki={mousedown:function(t){t=be(this.dom,t),this._maypointercapture=[t.zrx,t.zry],this.trigger("mousedown",t)},mousemove:function(t){t=be(this.dom,t);var e=this._maypointercapture;!e||t.zrx===e[0]&&t.zry===e[1]||yn(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=be(this.dom,t),yn(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=be(this.dom,t),this._pointercapturing&&(t.zreventcontrol="no_globalout");var e=t.toelement||t.relatedtarget;t.zristolocaldom=fn(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=be(this.dom,t),vn(t),this._lasttouchmoment=new date,this.handler.processgesture(t,"start"),ki.mousemove.call(this,t),ki.mousedown.call(this,t)},touchmove:function(t){t=be(this.dom,t),vn(t),this.handler.processgesture(t,"change"),ki.mousemove.call(this,t)},touchend:function(t){t=be(this.dom,t),vn(t),this.handler.processgesture(t,"end"),ki.mouseup.call(this,t),+new date-this._lasttouchmoment=0||n&&u(n,r)<0)){var s=e.getshallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},ki=qi([["linewidth","width"],["stroke","color"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),$i={getlinestyle:function(t){var e=ki(this,t);return e.linedash=this.getlinedash(e.linewidth),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?!1:"dashed"===e?[n,n]:[i,i]}},ji=qi([["fill","color"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["opacity"],["shadowcolor"]]),qi={getareastyle:function(t,e){return ji(this,t,e)}},tt=math.pow,et=math.sqrt,it=1e-8,nt=1e-4,at=et(3),ot=1/3,rt=f(),st=f(),lt=f(),ut=math.min,ht=math.max,ct=math.sin,dt=math.cos,ft=2*math.pi,pt=f(),gt=f(),mt=f(),vt=[],yt=[],xt={m:1,l:2,c:3,q:4,a:5,z:6,r:7},_t=[],wt=[],bt=[],st=[],mt=math.min,it=math.max,tt=math.cos,at=math.sin,dt=math.sqrt,ct=math.abs,lt="undefined"!=typeof float32array,kt=function(t){this._savedata=!t,this._savedata&&(this.data=[]),this._ctx=null};kt.prototype={constructor:kt,_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,i){i=i||0,this._ux=ct(i/om/t)||0,this._uy=ct(i/om/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(xt.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=ct(t-this._xi)>this._ux||ct(e-this._yi)>this._uy||this._len<5;return this.adddata(xt.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,a,o){return this.adddata(xt.c,t,e,i,n,a,o),this._ctx&&(this._needsdash()?this._dashedbezierto(t,e,i,n,a,o):this._ctx.beziercurveto(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticcurveto:function(t,e,i,n){return this.adddata(xt.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,a,o){return this.adddata(xt.a,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=tt(a)*i+t,this._yi=at(a)*i+e,this},arcto:function(t,e,i,n,a){return this._ctx&&this._ctx.arcto(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.adddata(xt.r,t,e,i,n),this},closepath:function(){this.adddata(xt.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,a=0;e>a;a++)i+=t[a].len();lt&&this.data instanceof float32array&&(this.data=new float32array(n+i));for(var a=0;e>a;a++)for(var o=t[a].data,r=0;re.length&&(this._expanddata(),e=this.data);for(var i=0;io&&(o=a+o),o%=a,f-=o*h,p-=o*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashidx,i=r[n],f+=h*i,p+=c*i,this._dashidx=(n+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[n%2?"moveto":"lineto"](h>=0?mt(f,t):it(f,t),c>=0?mt(p,e):it(p,e));h=f-t,c=p-e,this._dashoffset=-dt(h*h+c*c)},_dashedbezierto:function(t,e,i,n,a,o){var r,s,l,u,h,c=this._dashsum,d=this._dashoffset,f=this._linedash,p=this._ctx,g=this._xi,m=this._yi,v=aa,y=0,x=this._dashidx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,r=0;1>r;r+=.1)s=v(g,t,i,a,r+.1)-v(g,t,i,a,r),l=v(m,e,n,o,r+.1)-v(m,e,n,o,r),y+=dt(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(r=(w-d)/y;1>=r;)u=v(g,t,i,a,r),h=v(m,e,n,o,r),x%2?p.moveto(u,h):p.lineto(u,h),r+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineto(a,o),s=a-u,l=o-h,this._dashoffset=-dt(s*s+l*l)},_dashedquadraticto:function(t,e,i,n){var a=i,o=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,a,o)},tostatic:function(){var t=this.data;t instanceof array&&(t.length=this._len,lt&&(this.data=new float32array(t)))},getboundingrect:function(){_t[0]=_t[1]=bt[0]=bt[1]=number.max_value,wt[0]=wt[1]=st[0]=st[1]=-number.max_value;for(var t=this.data,e=0,i=0,n=0,a=0,o=0;oc;){var d=s[c++];switch(1===c&&(n=s[c],a=s[c+1],e=n,i=a),d){case xt.m:e=n=s[c++],i=a=s[c++],t.moveto(n,a);break;case xt.l:o=s[c++],r=s[c++],(ct(o-n)>l||ct(r-a)>u||c===h-1)&&(t.lineto(o,r),n=o,a=r);break;case xt.c:t.beziercurveto(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case xt.q:t.quadraticcurveto(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case xt.a:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,s=g>m?m/g:1,m=math.abs(g-m)>.001,i=v+y;m?(t.translate(f,p),t.rotate(x),t.scale(b,s),t.arc(0,0,w,v,i,1-_),t.scale(1/b,1/s),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,i,1-_),1===c&&(e=tt(v)*g+f,i=at(v)*m+p),n=tt(i)*g+f,a=at(i)*m+p;break;case xt.r:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case xt.z:t.closepath(),n=e,a=i}}}},kt.cmd=xt;var pt=2*math.pi,ot=2*math.pi,et=kt.cmd,nt=2*math.pi,rt=1e-4,zt=[-1,-1,-1],bt=[-1,-1],vt=ti.prototype.getcanvaspattern,gt=math.abs,ft=new kt(!0);ao.prototype={constructor:ao,type:"path",__dirtypath:!0,strokecontainthreshold:5,segmentignorethreshold:0,subpixeloptimize:!1,brush:function(t,e){var i=this.style,n=this.path||ft,a=i.hasstroke(),o=i.hasfill(),r=i.fill,s=i.stroke,l=o&&!!r.colorstops,u=a&&!!s.colorstops,h=o&&!!r.image,c=a&&!!s.image;if(i.bind(t,this,e),this.settransform(t),this.__dirty){var d;l&&(d=d||this.getboundingrect(),this._fillgradient=i.getgradient(t,r,d)),u&&(d=d||this.getboundingrect(),this._strokegradient=i.getgradient(t,s,d))}l?t.fillstyle=this._fillgradient:h&&(t.fillstyle=vt.call(r,t)),u?t.strokestyle=this._strokegradient:c&&(t.strokestyle=vt.call(s,t));var f=i.linedash,p=i.linedashoffset,g=!!t.setlinedash,m=this.getglobalscale();if(n.setscale(m[0],m[1],this.segmentignorethreshold),this.__dirtypath||f&&!g&&a?(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)),o)if(null!=i.fillopacity){var v=t.globalalpha;t.globalalpha=i.fillopacity*i.opacity,n.fill(t),t.globalalpha=v}else n.fill(t);if(f&&g&&(t.setlinedash(f),t.linedashoffset=p),a)if(null!=i.strokeopacity){var v=t.globalalpha;t.globalalpha=i.strokeopacity*i.opacity,n.stroke(t),t.globalalpha=v}else n.stroke(t);f&&g&&t.setlinedash([]),null!=i.text&&(this.restoretransform(t),this.drawrecttext(t,this.getboundingrect()))},buildpath:function(){},createpathproxy:function(){this.path=new kt},getboundingrect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new kt),this.__dirtypath&&(n.beginpath(),this.buildpath(n,this.shape,!1)),t=n.getboundingrect()}if(this._rect=t,e.hasstroke()){var a=this._rectwithstroke||(this._rectwithstroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.linewidth,r=e.strokenoscale?this.getlinescale():1;e.hasfill()||(o=math.max(o,this.strokecontainthreshold||4)),r>1e-10&&(a.width+=o/r,a.height+=o/r,a.x-=o/r/2,a.y-=o/r/2)}return a}return t},contain:function(t,e){var i=this.transformcoordtolocal(t,e),n=this.getboundingrect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(a.hasstroke()){var r=a.linewidth,s=a.strokenoscale?this.getlinescale():1;if(s>1e-10&&(a.hasfill()||(r=math.max(r,this.strokecontainthreshold)),no(o,r/s,t,e)))return!0}if(a.hasfill())return io(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtypath=t,this._rect=null),this.__dirty=this.__dirtytext=!0,this.__zr&&this.__zr.refresh(),this.__cliptarget&&this.__cliptarget.dirty()},animateshape:function(t){return this.animate("shape",t)},attrkv:function(t,e){"shape"===t?(this.setshape(e),this.__dirtypath=!0,this._rect=null):dn.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&>(t[0]-1)>1e-10&>(t[3]-1)>1e-10?math.sqrt(gt(t[0]*t[3]-t[2]*t[1])):1}},ao.extend=function(t){var e=function(e){ao.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 a in i)!n.hasownproperty(a)&&i.hasownproperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};h(e,ao);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(ao,dn);var wt=kt.cmd,ht=[[],[],[]],zt=math.sqrt,ut=math.atan2,xt=function(t,e){var i,n,a,o,r,s,l=t.data,u=wt.m,h=wt.c,c=wt.l,d=wt.r,f=wt.a,p=wt.q;for(a=0,o=0;ar;r++){var s=ht[r];s[0]=l[a++],s[1]=l[a++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},yt=math.sqrt,jt=math.sin,qt=math.cos,kt=math.pi,$t=function(t){return math.sqrt(t[0]*t[0]+t[1]*t[1])},jt=function(t,e){return(t[0]*e[0]+t[1]*e[1])/($t(t)*$t(e))},qt=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clippaths,n=this.style;if(i)for(var a=0;ao;o++)a+=ee(t[o-1],t[o]);var r=a/2;r=i>r?i:r;for(var o=0;r>o;o++){var s,l,u,h=o/(r-1)*(e?i:i-1),c=math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([co(s[0],f[0],l[0],u[0],d,p,g),co(s[1],f[1],l[1],u[1],d,p,g)])}return n},ua=function(t,e,i,n){var a,o,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)re(r,r,t[d]),se(s,s,t[d]);re(r,r,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)a=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(h(t[d]));continue}a=t[d-1],o=t[d+1]}y(u,o,a),q(u,u,e);var g=ee(p,a),m=ee(p,o),v=g+m;0!==v&&(g/=v,m/=v),q(h,u,-g),q(c,u,m);var y=u([],p,h),x=u([],p,c);n&&(se(y,y,r),re(y,y,s),se(x,x,r),re(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},ha=ao.extend({type:"polygon",shape:{points:null,smooth:!1,smoothconstraint:null},buildpath:function(t,e){fo(t,e,!0)}}),ca=ao.extend({type:"polyline",shape:{points:null,smooth:!1,smoothconstraint:null},style:{stroke:"#000",fill:null},buildpath:function(t,e){fo(t,e,!1)}}),da=math.round,fa={},pa=ao.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildpath:function(t,e){var i,n,a,o;this.subpixeloptimize?(go(fa,e,this.style),i=fa.x,n=fa.y,a=fa.width,o=fa.height,fa.r=e.r,e=fa):(i=e.x,n=e.y,a=e.width,o=e.height),e.r?un(t,e):t.rect(i,n,a,o),t.closepath()}}),ga={},ma=ao.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,n,a,o;this.subpixeloptimize?(po(ga,e,this.style),i=ga.x1,n=ga.y1,a=ga.x2,o=ga.y2):(i=e.x1,n=e.y1,a=e.x2,o=e.y2);var r=e.percent;0!==r&&(t.moveto(i,n),1>r&&(a=i*(1-r)+a*r,o=n*(1-r)+o*r),t.lineto(a,o))},pointat:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),va=[],ya=ao.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,a=e.x2,o=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveto(i,n),null==l||null==u?(1>h&&(za(i,r,a,h,va),r=va[1],a=va[2],za(n,s,o,h,va),s=va[1],o=va[2]),t.quadraticcurveto(r,s,a,o)):(1>h&&(ka(i,r,l,a,h,va),r=va[1],l=va[2],a=va[3],ka(n,s,u,o,h,va),s=va[1],u=va[2],o=va[3]),t.beziercurveto(r,s,l,u,a,o)))},pointat:function(t){return vo(this.shape,t,!1)},tangentat:function(t){var e=vo(this.shape,t,!0);return te(e,e)}}),xa=ao.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,a=math.max(e.r,0),o=e.startangle,r=e.endangle,s=e.clockwise,l=math.cos(o),u=math.sin(o);t.moveto(l*a+i,u*a+n),t.arc(i,n,a,o,r,!s)}}),_a=ao.extend({type:"compound",shape:{paths:null},_updatepathdirty:function(){for(var t=this.__dirtypath,e=this.shape.paths,i=0;i"'])/g,qa={"&":"&","<":"<",">":">",'"':""","'":"'"},td=["a","b","c","d","e","f","g"],ed=function(t,e){return"{"+t+(null==e?"":e)+"}"},id=ji,nd=(object.freeze||object)({addcommas:fr,tocamelcase:wr,normalizecssarray:$a,encodehtml:hr,formattpl:zr,formattplsimple:ur,gettooltipmarker:xr,formattime:jr,capitalfirst:qr,truncatetext:id,gettextboundingrect:kr,gettextrect:$r}),ad=f,od=["left","right","top","bottom","width","height"],rd=[["width","left","right"],["height","top","bottom"]],sd=jr,ld=(x(jr,"vertical"),x(jr,"horizontal"),{getboxlayoutparams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),ud=ca(),hd=vr.extend({type:"component",id:"",name:"",maintype:"",subtype:"",componentindex:0,defaultoption:null,ecmodel:null,dependentmodels:[],uid:null,layoutmode:null,$constructor:function(t,e,i,n){vr.call(this,t,e,i,n),this.uid=_r("ec_cpt_model")},init:function(t,e,i){this.mergedefaultandtheme(t,i)},mergedefaultandtheme:function(t,e){var i=this.layoutmode,n=i?as(t):{},o=e.gettheme();a(t,o.get(this.maintype)),a(t,this.getdefaultoption()),i&&ns(t,n,i)},mergeoption:function(t){a(this.option,t,!0);var e=this.layoutmode;e&&ns(this.option,t,e)},optionupdated:function(){},getdefaultoption:function(){var t=ud(this);if(!t.defaultoption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultoption;n&&e.push(n),i=i.superclass}for(var o={},r=e.length-1;r>=0;r--)o=a(o,e[r],!0);t.defaultoption=o}return t.defaultoption},getreferringcomponents:function(t){return this.ecmodel.querycomponents({maintype:t,index:this.get(t+"index",!0),id:this.get(t+"id",!0)})}});ma(hd,{registerwhenextend:!0}),wr(hd),br(hd,rs),c(hd,ld);var cd="";"undefined"!=typeof navigator&&(cd=navigator.platform||"");var dd={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientcolor:["#f6efa6","#d88273","#bf444c"],textstyle:{fontfamily:cd.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},fd=ca(),pd={clearcolorpalette:function(){fd(this).coloridx=0,fd(this).colornamemap={}},getcolorfrompalette:function(t,e,i){e=e||this;var n=fd(e),a=n.coloridx||0,o=n.colornamemap=n.colornamemap||{};if(o.hasownproperty(t))return o[t];var r=ea(this.get("color",!0)),s=this.get("colorlayer",!0),l=null!=i&&s?ss(s,i):r;if(l=l||r,l&&l.length){var u=l[a];return t&&(o[t]=u),n.coloridx=(a+1)%l.length,u}}},gd="original",md="arrayrows",vd="objectrows",yd="keyedcolumns",xd="unknown",_d="typedarray",wd="column",bd="row";ls.seriesdatatosource=function(t){return new ls({data:t,sourceformat:i(t)?_d:gd,fromdataset:!1})},wa(ls);var sd={must:1,might:2,not:3},md=ca(),id="\x00_ec_inner",td=vr.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new vr(i),this._optionmanager=n},setoption:function(t,e){o(!(id 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)):ms.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoredata(),!t||"recreate"===t||"timeline"===t){var a=i.gettimelineoption(this);a&&(this.mergeoption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getmediaoption(this,this._api);o.length&&f(o,function(t){this.mergeoption(t,e=!0)},this)}return e},mergeoption:function(t){function e(e,n){var a=ea(t[e]),s=oa(o.get(e),a);ra(s),f(s,function(t){var i=t.option;s(i)&&(t.keyinfo.maintype=e,t.keyinfo.subtype=ts(e,i,t.exist))});var l=is(o,n);i[e]=[],o.set(e,[]),f(s,function(t,n){var a=t.exist,s=t.option;if(o(s(s)||a,"empty component definition"),s){var u=hd.getclass(e,t.keyinfo.subtype,!0);if(a&&a.constructor===u)a.name=t.keyinfo.name,a.mergeoption(s,this),a.optionupdated(s,!1);else{var h=r({dependentmodels:l,componentindex:n},t.keyinfo);a=new u(s,this,this,h),r(a,h),a.init(s,this,this,h),a.optionupdated(null,!0)}}else a.mergeoption({},this),a.optionupdated({},!1);o.get(e)[n]=a,i[e][n]=a.option},this),"series"===e&&as(this,o.get("series"))}var i=this.option,o=this._componentsmap,s=[];cs(this),f(t,function(t,e){null!=t&&(hd.hasclass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):a(i[e],t,!0))}),hd.topologicaltravel(s,hd.getallclassmaintypes(),e,this),this._seriesindicesmap=b(this._seriesindices=this._seriesindices||[])},getoption:function(){var t=n(this.option);return f(t,function(e,i){if(hd.hasclass(i)){for(var e=ea(e),n=e.length-1;n>=0;n--)la(e[n])&&e.splice(n,1);t[i]=e}}),delete t[id],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,a=t.name,o=this._componentsmap.get(e);if(!o||!o.length)return[];var r;if(null!=i)_(i)||(i=[i]),r=m(p(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=_(n);r=m(o,function(t){return s&&u(n,t.id)>=0||!s&&t.id===n})}else if(null!=a){var l=_(a);r=m(o,function(t){return l&&u(a,t.name)>=0||!l&&t.name===a})}else r=o.slice();return ds(r,t)},findcomponents:function(t){function e(t){var e=a+"index",i=a+"id",n=a+"name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{maintype:a,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?m(e,t.filter):e}var n=t.query,a=t.maintype,o=e(n),r=o?this.querycomponents(o):this._componentsmap.get(a);return i(ds(r,t))},eachcomponent:function(t,e,i){var n=this._componentsmap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){f(t,function(t,a){e.call(i,n,t,a)})});else if(b(t))f(n.get(t),e,i);else if(s(t)){var a=this.findcomponents(t);f(a,e,i)}},getseriesbyname:function(t){var e=this._componentsmap.get("series");return m(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 m(e,function(e){return e.subtype===t})},getseries:function(){return this._componentsmap.get("series").slice()},getseriescount:function(){return this._componentsmap.get("series").length},eachseries:function(t,e){f(this._seriesindices,function(i){var n=this._componentsmap.get("series")[i];t.call(e,n,i)},this)},eachrawseries:function(t,e){f(this._componentsmap.get("series"),t,e)},eachseriesbytype:function(t,e,i){f(this._seriesindices,function(n){var a=this._componentsmap.get("series")[n];a.subtype===t&&e.call(i,a,n)},this)},eachrawseriesbytype:function(t,e,i){return f(this.getseriesbytype(t),e,i)},isseriesfiltered:function(t){return null==this._seriesindicesmap.get(t.componentindex)},getcurrentseriesindices:function(){return(this._seriesindices||[]).slice()},filterseries:function(t,e){var i=m(this._componentsmap.get("series"),t,e);as(this,i)},restoredata:function(t){var e=this._componentsmap;as(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),hd.topologicaltravel(i,hd.getallclassmaintypes(),function(i){f(e.get(i),function(e){("series"!==i||!bs(e,t))&&e.restoredata()})})}});c(td,pd);var ad=["getdom","getzr","getwidth","getheight","getdevicepixelratio","dispatchaction","isdisposed","on","off","getdataurl","getconnecteddataurl","getmodel","getoption","getviewofcomponentmodel","getviewofseriesmodel"],dd={};ls.prototype={constructor:ls,create:function(t,e){var i=[];f(dd,function(n){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinatesystems=i},update:function(t,e){f(this._coordinatesystems,function(i){i.update&&i.update(t,e)})},getcoordinatesystems:function(){return this._coordinatesystems.slice()}},ls.register=function(t,e){dd[t]=e},ls.get=function(t){return dd[t]};var cd=f,ld=n,kd=p,pd=a,od=/^(min|max)?(.+)$/;ks.prototype={constructor:ks,setoption:function(t,e){t&&f(ea(t.series),function(t){t&&t.data&&i(t.data)&&n(t.data)}),t=ld(t);var i=this._optionbackup,n=ps.call(this,t,e,!i);this._newbaseoption=n.baseoption,i?(rs(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=kd(e.timelineoptions,ld),this._medialist=kd(e.medialist,ld),this._mediadefault=ld(e.mediadefault),this._currentmediaindices=[],ld(t?e.baseoption:this._newbaseoption)},gettimelineoption:function(t){var e,i=this._timelineoptions;if(i.length){var n=t.getcomponent("timeline");n&&(e=ld(i[n.getcurrentindex()],!0))}return e},getmediaoption:function(){var t=this._api.getwidth(),e=this._api.getheight(),i=this._medialist,n=this._mediadefault,a=[],o=[];if(!i.length&&!n)return o;for(var r=0,s=i.length;s>r;r++)os(i[r].query,t,e)&&a.push(r);return!a.length&&n&&(a=[-1]),a.length&&!ns(a,this._currentmediaindices)&&(o=kd(a,function(t){return ld(-1===t?n.option:i[t].option)})),this._currentmediaindices=a,o}};var ed=f,nd=s,rd=["areastyle","linestyle","nodestyle","linkstyle","chordstyle","label","labelline"],zd=function(t,e){ed(hs(t.series),function(t){nd(t)&&ws(t)});var i=["xaxis","yaxis","radiusaxis","angleaxis","singleaxis","parallelaxis","radar"];e&&i.push("valueaxis","categoryaxis","logaxis","timeaxis"),ed(i,function(e){ed(hs(t[e]),function(t){t&&(gs(t,"axislabel"),gs(t.axispointer,"label"))})}),ed(hs(t.parallel),function(t){var e=t&&t.parallelaxisdefault;gs(e,"axislabel"),gs(e&&e.axispointer,"label")}),ed(hs(t.calendar),function(t){bs(t,"itemstyle"),gs(t,"daylabel"),gs(t,"monthlabel"),gs(t,"yearlabel")}),ed(hs(t.radar),function(t){gs(t,"name")}),ed(hs(t.geo),function(t){nd(t)&&(fs(t),ed(hs(t.regions),function(t){fs(t)}))}),ed(hs(t.timeline),function(t){fs(t),bs(t,"label"),bs(t,"itemstyle"),bs(t,"controlstyle",!0);var e=t.data;_(e)&&f(e,function(t){s(t)&&(bs(t,"label"),bs(t,"itemstyle"))})}),ed(hs(t.toolbox),function(t){bs(t,"iconstyle"),ed(t.feature,function(t){bs(t,"iconstyle")})}),gs(zs(t.axispointer),"label"),gs(zs(t.tooltip).axispointer,"label")},bd=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],vd=["grid","geo","parallel","legend","toolbox","title","visualmap","datazoom","timeline"],gd=function(t,e){zd(t,e),t.series=ea(t.series),f(t.series,function(t){if(s(t)){var e=t.type;if("line"===e)null!=t.clipoverflow&&(t.clip=t.clipoverflow);else if("pie"===e||"gauge"===e)null!=t.clockwise&&(t.clockwise=t.clockwise);else if("gauge"===e){var i=us(t,"pointer.color");null!=i&&xs(t,"itemstyle.color",i)}ys(t)}}),t.datarange&&(t.visualmap=t.datarange),f(vd,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){ys(t)}))})},fd=function(t){var e=b();t.eachseries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),a=t.getdata(),o={stackresultdimension:a.getcalculationinfo("stackresultdimension"),stackedoverdimension:a.getcalculationinfo("stackedoverdimension"),stackeddimension:a.getcalculationinfo("stackeddimension"),stackedbydimension:a.getcalculationinfo("stackedbydimension"),isstackedbyindex:a.getcalculationinfo("isstackedbyindex"),data:a,seriesmodel:t};if(!o.stackeddimension||!o.isstackedbyindex&&!o.stackedbydimension)return;n.length&&a.setcalculationinfo("stackedonseries",n[n.length-1].seriesmodel),n.push(o)}}),e.each(js)},wd=qs.prototype;wd.pure=!1,wd.persistent=!0,wd.getsource=function(){return this._source};var hd={arrayrows_column:{pure:!0,count:function(){return math.max(0,this._data.length-this._source.startindex)},getitem:function(t){return this._data[t+this._source.startindex]},appenddata:js},arrayrows_row:{pure:!0,count:function(){var t=this._data[0];return t?math.max(0,t.length-this._source.startindex):0},getitem:function(t){t+=this._source.startindex;for(var e=[],i=this._data,n=0;n=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputdata=i.context.outputdata}this.__pipeline&&(this.__pipeline.currenttask=this);var o;this._plan&&!n&&(o=this._plan(this.context));var r=e(this._modby),s=this._moddatacount||0,l=e(t&&t.modby),u=t&&t.moddatacount||0;(r!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=sl(this,n)),this._modby=l,this._moddatacount=u;var c=t&&t.step;if(this._dueend=i?i._outputdueend:this._count?this._count(this.context):1/0,this._progress){var d=this._dueindex,f=math.min(null!=c?this._dueindex+c:1/0,this._dueend);if(!n&&(h||f>d)){var p=this._progress;if(_(p))for(var g=0;gn?n++:null}function e(){var t=n%r*a+math.ceil(n/r),e=n>=i?null:o>t?t:n;return n++,e}var i,n,a,o,r,s={reset:function(l,u,h,c){n=l,i=u,a=h,o=c,r=math.ceil(o/a),s.next=a>1&&o>0?e:t}};return s}();jd.dirty=function(){this._dirty=!0,this._ondirty&&this._ondirty(this.context)},jd.unfinished=function(){return this._progress&&this._dueindex":"",m=p+s.join(p||", ");return{rendermode:n,content:m,style:u}}function o(t){return{rendermode:n,content:hr(fr(t)),style:u}}var r=this;n=n||"html";var s="html"===n?"
":"\n",l="richtext"===n,u={},h=0,c=this.getdata(),d=c.mapdimension("defaultedtooltip",!0),p=d.length,m=this.getrawvalue(t),v=_(m),y=c.getitemvisual(t,"color");s(y)&&y.colorstops&&(y=(y.colorstops[0]||{}).color),y=y||"transparent";var x=p>1||v&&!p?a(m):o(p?il(c,t,d[0]):v?m[0]:m),w=x.content,b=r.seriesindex+"at"+h,m=xr({color:y,type:"item",rendermode:n,markerid:b});u[b]=y,++h;var i=c.getname(t),t=this.name;sa(this)||(t=""),t=t?hr(t)+(e?": ":s):"";var a="string"==typeof m?m:m.content,d=e?a+t+w:t+a+(i?hr(i)+": "+w:w);return{html:d,markers:u}},isanimationenabled:function(){if(as.node)return!1;var t=this.getshallow("animation");return t&&this.getdata().count()>this.getshallow("animationthreshold")&&(t=!1),t},restoredata:function(){this.datatask.dirty()},getcolorfrompalette:function(t,e,i){var n=this.ecmodel,a=pd.getcolorfrompalette.call(this,t,e,i);return a||(a=n.getcolorfrompalette(t,e,i)),a},coorddimtodatadim:function(t){return this.getrawdata().mapdimension(t,!0)},getprogressive:function(){return this.get("progressive")},getprogressivethreshold:function(){return this.get("progressivethreshold")},getaxistooltipdata:null,gettooltipposition:null,pipetask:null,preventincremental:null,pipelinecontext:null});c($d,yd),c($d,pd);var jd=function(){this.group=new fm,this.uid=_r("viewcomponent")};jd.prototype={constructor:jd,init:function(){},render:function(){},dispose:function(){},filterforexposedevent:null};var qd=jd.prototype;qd.updateview=qd.updatelayout=qd.updatevisual=function(){},_a(jd),ma(jd,{registerwhenextend:!0});var tc=function(){var t=ca();return function(e){var i=t(e),n=e.pipelinecontext,a=i.large,o=i.progressiverender,r=i.large=n&&n.large,s=i.progressiverender=n&&n.progressiverender;return!!(a^r||o^s)&&"reset"}},ec=ca(),ic=tc();ml.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){yl(t.getdata(),n,"emphasis")},downplay:function(t,e,i,n){yl(t.getdata(),n,"normal")},remove:function(){this.group.removeall()},dispose:function(){},incrementalpreparerender:null,incrementalrender:null,updatetransform:null,filterforexposedevent:null};var nc=ml.prototype;nc.updateview=nc.updatelayout=nc.updatevisual=function(t,e,i,n){this.render(t,e,i,n)},_a(ml,["dispose"]),ma(ml,{registerwhenextend:!0}),ml.markupdatemethod=function(t,e){ec(t).updatemethod=e};var ac={incrementalpreparerender:{progress:function(t,e){e.view.incrementalrender(t,e.model,e.ecmodel,e.api,e.payload)}},render:{forcefirstprogress:!0,progress:function(t,e){e.view.render(e.model,e.ecmodel,e.api,e.payload)}}},oc="\x00__throttleoriginmethod",rc="\x00__throttlerate",sc="\x00__throttletype",lc={createonallseries:!0,performrawseries:!0,reset:function(t,e){var i=t.getdata(),n=(t.visualcoloraccesspath||"itemstyle.color").split("."),a=t.get(n),o=!w(a)||a instanceof wa?null:a;(!a||o)&&(a=t.getcolorfrompalette(t.name,null,e.getseriescount())),i.setvisual("color",a);var r=(t.visualbordercoloraccesspath||"itemstyle.bordercolor").split("."),s=t.get(r);if(i.setvisual("bordercolor",s),!e.isseriesfiltered(t)){o&&i.each(function(e){i.setitemvisual(e,"color",o(t.getdataparams(e))) });var l=function(t,e){var i=t.getitemmodel(e),a=i.get(n,!0),o=i.get(r,!0);null!=a&&t.setitemvisual(e,"color",a),null!=o&&t.setitemvisual(e,"bordercolor",o)};return{dataeach:i.hasitemoption?l:null}}}},uc={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",linex:"横向选择",liney:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataview:{title:"数据视图",lang:["数据视图","关闭","刷新"]},datazoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magictype:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveasimage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typenames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectscatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"k线图",k:"k线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialbar:"象形柱图",themeriver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withtitle:"这是一个关于“{title}”的图表。",withouttitle:"这是一个图表,"},series:{single:{prefix:"",withname:"图表类型是{seriestype},表示{seriesname}。",withoutname:"图表类型是{seriestype}。"},multiple:{prefix:"它由{seriescount}个图表系列组成。",withname:"第{seriesid}个系列是一个表示{seriesname}的{seriestype},",withoutname:"第{seriesid}个系列是一个{seriestype},",separator:{middle:";",end:"。"}}},data:{alldata:"其数据是——",partialdata:"其中,前{displaycnt}项是——",withname:"{name}的数据是{value}",withoutname:"{value}",separator:{middle:",",end:""}}}},hc=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return f(e,function(t,e){i=i.replace(new regexp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=r.get(t);if(null==e){for(var i=t.split("."),n=uc.aria,a=0;as)){var d=a();l=d?i(n("general.withtitle"),{title:d}):n("general.withouttitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriescount:s}),e.eachseries(function(t,e){if(c>e){var a,r=t.get("name"),l="series."+(s>1?"multiple":"single")+".";a=n(r?l+"withname":l+"withoutname"),a=i(a,{seriesid:t.seriesindex,seriesname:t.get("name"),seriestype:o(t.subtype)});var h=t.getdata();window.data=h,a+=h.count()>u?i(n("data.partialdata"),{displaycnt:u}):n("data.alldata");for(var d=[],f=0;ff){var g=h.getname(f),m=il(h,f);d.push(i(n(g?"data.withname":"data.withoutname"),{name:g,value:m}))}a+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(a)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setattribute("aria-label",l)}}},cc=math.pi,dc=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 pa({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4}),n=new xa({shape:{startangle:-cc/2,endangle:-cc/2+.1,r:10},style:{stroke:e.color,linecap:"round",linewidth:5},zlevel:e.zlevel,z:10001}),a=new pa({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*cc/2}).start("circularinout"),n.animateshape(!0).when(1e3,{startangle:3*cc/2}).delay(300).start("circularinout");var o=new fm;return o.add(n),o.add(a),o.add(i),o.resize=function(){var e=t.getwidth()/2,o=t.getheight()/2;n.setshape({cx:e,cy:o});var r=n.shape.r;a.setshape({x:e-r,y:o-r,width:2*r,height:2*r}),i.setshape({x:0,y:0,width:t.getwidth(),height:t.getheight()})},o.resize(),o},fc=ml.prototype;fc.restoredata=function(t,e){t.restoredata(e),this._stagetaskmap.each(function(t){var e=t.overalltask;e&&e.dirty()})},fc.getperformargs=function(t,e){if(t.__pipeline){var i=this._pipelinemap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveenabled&&(!n||n.progressiverender)&&t.__idxinpipeline>i.blockindex,o=a?i.step:null,r=n&&n.moddatacount,s=null!=r?math.ceil(r/o):null;return{step:o,modby:s,moddatacount:r}}},fc.getpipeline=function(t){return this._pipelinemap.get(t)},fc.updatestreammodes=function(t,e){var i=this._pipelinemap.get(t.uid),n=t.getdata(),a=n.count(),o=i.progressiveenabled&&e.incrementalpreparerender&&a>=i.threshold,r=t.get("large")&&a>=t.get("largethreshold"),s="mod"===t.get("progressivechunkmode")?a:null;t.pipelinecontext=i.context={progressiverender:o,moddatacount:s,large:r}},fc.restorepipelines=function(t){var e=this,i=e._pipelinemap=b();t.eachseries(function(t){var n=t.getprogressive(),a=t.uid;i.set(a,{id:a,head:null,tail:null,threshold:t.getprogressivethreshold(),progressiveenabled:n&&!(t.preventincremental&&t.preventincremental()),blockindex:-1,step:math.round(n||700),count:0}),rl(e,t,t.datatask)})},fc.preparestagetasks=function(){var t=this._stagetaskmap,e=this.ecinstance.getmodel(),i=this.api;f(this._allhandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,[]);n.reset&&tl(this,n,a,e,i),n.overallreset&&al(this,n,a,e,i)},this)},fc.prepareview=function(t,e,i,n){var a=t.rendertask,o=a.context;o.model=e,o.ecmodel=i,o.api=n,a.__block=!t.incrementalpreparerender,rl(this,e,a)},fc.performdataprocessortasks=function(t,e){il(this,this._dataprocessorhandlers,t,e,{block:!0})},fc.performvisualtasks=function(t,e,i){il(this,this._visualhandlers,t,e,i)},fc.performseriestasks=function(t){var e;t.eachseries(function(t){e|=t.datatask.perform()}),this.unfinished|=e},fc.plan=function(){this._pipelinemap.each(function(t){var e=t.tail;do{if(e.__block){t.blockindex=e.__idxinpipeline;break}e=e.getupstream()}while(e)})};var pc=fc.updatepayload=function(t,e){"remain"!==e&&(t.context.payload=e)},gc=el(0);ml.wrapstagehandler=function(t,e){return w(t)&&(t={overallreset:t,seriestype:zl(t)}),t.uid=_r("stagehandler"),e&&(t.visualtype=e),t};var mc,vc={},yc={};bl(vc,td),bl(yc,cs),vc.eachseriesbytype=vc.eachrawseriesbytype=function(t){mc=t},vc.eachcomponent=function(t){"series"===t.maintype&&t.subtype&&(mc=t.subtype)};var xc=["#37a2da","#32c5e9","#67e0e3","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e062ae","#e690d1","#e7bcf3","#9d96f5","#8378ea","#96bfff"],_c={color:xc,colorlayer:[["#37a2da","#ffd85c","#fd7b5f"],["#37a2da","#67e0e3","#ffdb5c","#ff9f7f","#e062ae","#9d96f5"],["#37a2da","#32c5e9","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e7bcf3","#8378ea","#96bfff"],xc]},wc="#eee",bc=function(){return{axisline:{linestyle:{color:wc}},axistick:{linestyle:{color:wc}},axislabel:{textstyle:{color:wc}},splitline:{linestyle:{type:"dashed",color:"#aaa"}},splitarea:{areastyle:{color:wc}}}},sc=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],mc={color:sc,backgroundcolor:"#333",tooltip:{axispointer:{linestyle:{color:wc},crossstyle:{color:wc},label:{color:"#000"}}},legend:{textstyle:{color:wc}},textstyle:{color:wc},title:{textstyle:{color:wc}},toolbox:{iconstyle:{normal:{bordercolor:wc}}},datazoom:{textstyle:{color:wc}},visualmap:{textstyle:{color:wc}},timeline:{linestyle:{color:wc},itemstyle:{normal:{color:sc[1]}},label:{normal:{textstyle:{color:wc}}},controlstyle:{normal:{color:wc,bordercolor:wc}}},timeaxis:bc(),logaxis:bc(),valueaxis:bc(),categoryaxis:bc(),line:{symbol:"circle"},graph:{color:sc},gauge:{title:{textstyle:{color:wc}}},candlestick:{itemstyle:{normal:{color:"#fd1050",color0:"#0cf49b",bordercolor:"#fd1050",bordercolor0:"#0cf49b"}}}};mc.categoryaxis.splitline.show=!1,hd.extend({type:"dataset",defaultoption:{serieslayoutby:wd,sourceheader:null,dimensions:null,source:null},optionupdated:function(){us(this)}}),jd.extend({type:"dataset"});var ic=ao.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildpath:function(t,e){var i=.5522848,n=e.cx,a=e.cy,o=e.rx,r=e.ry,s=o*i,l=r*i;t.moveto(n-o,a),t.beziercurveto(n-o,a-l,n-s,a-r,n,a-r),t.beziercurveto(n+s,a-r,n+o,a-l,n+o,a),t.beziercurveto(n+o,a+l,n+s,a+r,n,a+r),t.beziercurveto(n-s,a+r,n-o,a+l,n-o,a),t.closepath()}}),tc=/[\s,]+/;gl.prototype.parse=function(t,e){e=e||{};var i=vl(t);if(!i)throw new error("illegal svg");var n=new fm;this._root=n;var a=i.getattribute("viewbox")||"",o=parsefloat(i.getattribute("width")||e.width),r=parsefloat(i.getattribute("height")||e.height);isnan(o)&&(o=null),isnan(r)&&(r=null),zl(i,n,null,!0);for(var s=i.firstchild;s;)this._parsenode(s,n),s=s.nextsibling;var l,u;if(a){var h=e(a).split(tc);h.length>=4&&(l={x:parsefloat(h[0]||0),y:parsefloat(h[1]||0),width:parsefloat(h[2]),height:parsefloat(h[3])})}if(l&&null!=o&&null!=r&&(u=jl(l,o,r),!e.ignoreviewbox)){var c=n;n=new fm,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignorerootclip||null==o||null==r||n.setclippath(new pa({shape:{x:0,y:0,width:o,height:r}})),{root:n,width:o,height:r,viewboxrect:l,viewboxtransform:u}},gl.prototype._parsenode=function(t,e){var i=t.nodename.tolowercase();"defs"===i?this._isdefine=!0:"text"===i&&(this._istext=!0);var n;if(this._isdefine){var a=dc[i];if(a){var o=a.call(this,t),r=t.getattribute("id");r&&(this._defs[r]=o)}}else{var a=ac[i];a&&(n=a.call(this,t,e),e.add(n))}for(var s=t.firstchild;s;)1===s.nodetype&&this._parsenode(s,n),3===s.nodetype&&this._istext&&this._parsetext(s,n),s=s.nextsibling;"defs"===i?this._isdefine=!1:"text"===i&&(this._istext=!1)},gl.prototype._parsetext=function(t,e){if(1===t.nodetype){var i=t.getattribute("dx")||0,n=t.getattribute("dy")||0;this._textx+=parsefloat(i),this._texty+=parsefloat(n)}var a=new ia({style:{text:t.textcontent,transformtext:!0},position:[this._textx||0,this._texty||0]});wl(e,a),zl(t,a,this._defs);var o=a.style.fontsize;o&&9>o&&(a.style.fontsize=9,a.scale=a.scale||[1,1],a.scale[0]*=o/9,a.scale[1]*=o/9);var r=a.getboundingrect();return this._textx+=r.width,e.add(a),a};var ac={g:function(t,e){var i=new fm;return wl(e,i),zl(t,i,this._defs),i},rect:function(t,e){var i=new pa;return wl(e,i),zl(t,i,this._defs),i.setshape({x:parsefloat(t.getattribute("x")||0),y:parsefloat(t.getattribute("y")||0),width:parsefloat(t.getattribute("width")||0),height:parsefloat(t.getattribute("height")||0)}),i},circle:function(t,e){var i=new na;return wl(e,i),zl(t,i,this._defs),i.setshape({cx:parsefloat(t.getattribute("cx")||0),cy:parsefloat(t.getattribute("cy")||0),r:parsefloat(t.getattribute("r")||0)}),i},line:function(t,e){var i=new ma;return wl(e,i),zl(t,i,this._defs),i.setshape({x1:parsefloat(t.getattribute("x1")||0),y1:parsefloat(t.getattribute("y1")||0),x2:parsefloat(t.getattribute("x2")||0),y2:parsefloat(t.getattribute("y2")||0)}),i},ellipse:function(t,e){var i=new ic;return wl(e,i),zl(t,i,this._defs),i.setshape({cx:parsefloat(t.getattribute("cx")||0),cy:parsefloat(t.getattribute("cy")||0),rx:parsefloat(t.getattribute("rx")||0),ry:parsefloat(t.getattribute("ry")||0)}),i},polygon:function(t,e){var i=t.getattribute("points");i&&(i=hl(i));var n=new ha({shape:{points:i||[]}});return wl(e,n),zl(t,n,this._defs),n},polyline:function(t,e){var i=new ao;wl(e,i),zl(t,i,this._defs);var n=t.getattribute("points");n&&(n=hl(n));var a=new ca({shape:{points:n||[]}});return a},image:function(t,e){var i=new cn;return wl(e,i),zl(t,i,this._defs),i.setstyle({image:t.getattribute("xlink:href"),x:t.getattribute("x"),y:t.getattribute("y"),width:t.getattribute("width"),height:t.getattribute("height")}),i},text:function(t,e){var i=t.getattribute("x")||0,n=t.getattribute("y")||0,a=t.getattribute("dx")||0,o=t.getattribute("dy")||0;this._textx=parsefloat(i)+parsefloat(a),this._texty=parsefloat(n)+parsefloat(o);var r=new fm;return wl(e,r),zl(t,r,this._defs),r},tspan:function(t,e){var i=t.getattribute("x"),n=t.getattribute("y");null!=i&&(this._textx=parsefloat(i)),null!=n&&(this._texty=parsefloat(n));var a=t.getattribute("dx")||0,o=t.getattribute("dy")||0,r=new fm;return wl(e,r),zl(t,r,this._defs),this._textx+=a,this._texty+=o,r},path:function(t,e){var i=t.getattribute("d")||"",n=lo(i);return wl(e,n),zl(t,n,this._defs),n}},dc={lineargradient:function(t){var e=parseint(t.getattribute("x1")||0,10),i=parseint(t.getattribute("y1")||0,10),n=parseint(t.getattribute("x2")||10,10),a=parseint(t.getattribute("y2")||0,10),o=new ba(e,i,n,a);return fl(t,o),o},radialgradient:function(){}},cc={fill:"fill",stroke:"stroke","stroke-width":"linewidth",opacity:"opacity","fill-opacity":"fillopacity","stroke-opacity":"strokeopacity","stroke-dasharray":"linedash","stroke-dashoffset":"linedashoffset","stroke-linecap":"linecap","stroke-linejoin":"linejoin","stroke-miterlimit":"miterlimit","font-family":"fontfamily","font-size":"fontsize","font-style":"fontstyle","font-weight":"fontweight","text-align":"textalign","alignment-baseline":"textbaseline"},lc=/url\(\s*#(.*?)\)/,kc=/(translate|scale|rotate|skewx|skewy|matrix)\(([\-\s0-9\.e,]*)\)/g,pc=/([^\s:;]+)\s*:\s*([^:;]+)/g,oc=b(),ec={registermap:function(t,e,i){var n;return _(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialareas:e.specialareas}]:(e.geojson&&!e.features&&(i=e.specialareas,e=e.geojson),n=[{type:"geojson",source:e,specialareas:i}]),f(n,function(t){var e=t.type;"geojson"===e&&(e=t.type="geojson");var i=nc[e];i(t)}),oc.set(t,n)},retrievemap:function(t){return oc.get(t)}},nc={geojson:function(t){var e=t.source;t.geojson=b(e)?"undefined"!=typeof json&&json.parse?json.parse(e):new function("return ("+e+");")():e},svg:function(t){t.svgxml=vl(t.source)}},rc=o,zc=f,bc=w,vc=s,gc=hd.parseclasstype,fc="4.7.0",wc={zrender:"4.3.0"},hc=1,zc=1e3,uc=800,xc=900,yc=5e3,jc=1e3,qc=1100,kc=2e3,$c=3e3,jc=3500,qc=4e3,tl=5e3,el={processor:{filter:zc,series_filter:uc,statistic:yc},visual:{layout:jc,progressive_layout:qc,global:kc,chart:$c,post_chart_layout:jc,component:qc,brush:tl}},il="__flaginmainprocess",nl="__optionupdated",al=/^[a-za-z0-9_]+$/;$l.prototype.on=kl("on",!0),$l.prototype.off=kl("off",!0),$l.prototype.one=kl("one",!0),c($l,qs);var ol=jl.prototype;ol._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[nl]){var e=this[nl].silent;this[il]=!0,tu(this),rl.update.call(this),this[il]=!1,this[nl]=!1,au.call(this,e),ou.call(this,e)}else if(t.unfinished){var i=hc,n=this._model,a=this._api;t.unfinished=!1;do{var o=+new date;t.performseriestasks(n),t.performdataprocessortasks(n),iu(this,n),t.performvisualtasks(n),cu(this,this._model,a,"remain"),i-=+new date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},ol.getdom=function(){return this._dom},ol.getzr=function(){return this._zr},ol.setoption=function(t,e,i){if(!this._disposed){var n;if(vc(e)&&(i=e.lazyupdate,n=e.silent,e=e.notmerge),this[il]=!0,!this._model||e){var a=new ks(this._api),o=this._theme,r=this._model=new td;r.scheduler=this._scheduler,r.init(null,null,o,a)}this._model.setoption(t,cl),i?(this[nl]={silent:n},this[il]=!1):(tu(this),rl.update.call(this),this._zr.flush(),this[nl]=!1,this[il]=!1,au.call(this,n),ou.call(this,n))}},ol.settheme=function(){console.error("echarts#settheme() is deprecated in echarts 3.0")},ol.getmodel=function(){return this._model},ol.getoption=function(){return this._model&&this._model.getoption()},ol.getwidth=function(){return this._zr.getwidth()},ol.getheight=function(){return this._zr.getheight()},ol.getdevicepixelratio=function(){return this._zr.painter.dpr||window.devicepixelratio||1},ol.getrenderedcanvas=function(t){if(as.canvassupported){t=t||{},t.pixelratio=t.pixelratio||1,t.backgroundcolor=t.backgroundcolor||this._model.get("backgroundcolor");var e=this._zr;return e.painter.getrenderedcanvas(t)}},ol.getsvgdataurl=function(){if(as.svgsupported){var t=this._zr,e=t.storage.getdisplaylist();return f(e,function(t){t.stopanimation(!0)}),t.painter.pathtodataurl()}},ol.getdataurl=function(t){if(!this._disposed){t=t||{};var e=t.excludecomponents,i=this._model,n=[],a=this;zc(e,function(t){i.eachcomponent({maintype:t},function(t){var e=a._componentsmap[t.__viewid];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.getrenderedcanvas(t).todataurl("image/"+(t&&t.type||"png"));return zc(n,function(t){t.group.ignore=!1}),o}},ol.getconnecteddataurl=function(t){if(!this._disposed&&as.canvassupported){var e=this.group,i=math.min,a=math.max,o=1/0;if(vl[e]){var r=o,s=o,l=-o,u=-o,h=[],c=t&&t.pixelratio||1;f(ml,function(o){if(o.group===e){var c=o.getrenderedcanvas(n(t)),d=o.getdom().getboundingclientrect();r=i(d.left,r),s=i(d.top,s),l=a(d.right,l),u=a(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),r*=c,s*=c,l*=c,u*=c;var d=l-r,p=u-s,g=bs();g.width=d,g.height=p;var m=kn(g);return t.connectedbackgroundcolor&&m.add(new pa({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedbackgroundcolor}})),zc(h,function(t){var e=new cn({style:{x:t.left*c-r,y:t.top*c-s,image:t.dom}});m.add(e)}),m.refreshimmediately(),g.todataurl("image/"+(t&&t.type||"png"))}return this.getdataurl(t)}},ol.converttopixel=x(ql,"converttopixel"),ol.convertfrompixel=x(ql,"convertfrompixel"),ol.containpixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=da(n,t),f(t,function(t,n){n.indexof("models")>=0&&f(t,function(t){var a=t.coordinatesystem;if(a&&a.containpoint)i|=!!a.containpoint(e);else if("seriesmodels"===n){var o=this._chartsmap[t.__viewid];o&&o.containpoint&&(i|=o.containpoint(e,t))}},this)},this),!!i}},ol.getvisual=function(t,e){var i=this._model;t=da(i,t,{defaultmaintype:"series"});var n=t.seriesmodel,a=n.getdata(),o=t.hasownproperty("dataindexinside")?t.dataindexinside:t.hasownproperty("dataindex")?a.indexofrawindex(t.dataindex):null;return null!=o?a.getitemvisual(o,e):a.getvisual(e)},ol.getviewofcomponentmodel=function(t){return this._componentsmap[t.__viewid]},ol.getviewofseriesmodel=function(t){return this._chartsmap[t.__viewid]};var rl={prepareandupdate:function(t){tu(this),rl.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,a=this._coordsysmgr,o=this._scheduler;if(e){o.restoredata(e,t),o.performseriestasks(e),a.create(e,i),o.performdataprocessortasks(e,t),iu(this,e),a.update(e,i),lu(e),o.performvisualtasks(e,t),uu(this,e,i,t);var r=e.get("backgroundcolor")||"transparent";if(as.canvassupported)n.setbackgroundcolor(r);else{var s=ti(r);r=ui(s,"rgb"),0===s[3]&&(r="transparent")}du(e,i)}},updatetransform:function(t){var e=this._model,i=this,n=this._api;if(e){var a=[];e.eachcomponent(function(o,r){var s=i.getviewofcomponentmodel(r);if(s&&s.__alive)if(s.updatetransform){var l=s.updatetransform(r,e,n,t);l&&l.update&&a.push(s)}else a.push(s)});var o=b();e.eachseries(function(a){var r=i._chartsmap[a.__viewid];if(r.updatetransform){var s=r.updatetransform(a,e,n,t);s&&s.update&&o.set(a.uid,1)}else o.set(a.uid,1)}),lu(e),this._scheduler.performvisualtasks(e,t,{setdirty:!0,dirtymap:o}),cu(i,e,n,t,o),du(e,this._api)}},updateview:function(t){var e=this._model;e&&(ml.markupdatemethod(t,"updateview"),lu(e),this._scheduler.performvisualtasks(e,t,{setdirty:!0}),uu(this,this._model,this._api,t),du(e,this._api))},updatevisual:function(t){rl.update.call(this,t)},updatelayout:function(t){rl.update.call(this,t)}};ol.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingfx&&this._loadingfx.resize(),e){var i=e.resetoption("media"),n=t&&t.silent;this[il]=!0,i&&tu(this),rl.update.call(this),this[il]=!1,au.call(this,n),ou.call(this,n)}}},ol.showloading=function(t,e){if(!this._disposed&&(vc(t)&&(e=t,t=""),t=t||"default",this.hideloading(),gl[t])){var i=gl[t](this._api,e),n=this._zr;this._loadingfx=i,n.add(i)}},ol.hideloading=function(){this._disposed||(this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null)},ol.makeactionfromevent=function(t){var e=r({},t);return e.type=ul[t.type],e},ol.dispatchaction=function(t,e){if(!this._disposed&&(vc(e)||(e={silent:!!e}),ll[t.type]&&this._model)){if(this[il])return void this._pendingactions.push(t);nu.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&as.browser.wechat&&this._throttledzrflush(),au.call(this,e.silent),ou.call(this,e.silent)}},ol.appenddata=function(t){if(!this._disposed){var e=t.seriesindex,i=this.getmodel(),n=i.getseriesbyindex(e);n.appenddata(t),this._scheduler.unfinished=!0}},ol.on=kl("on",!1),ol.off=kl("off",!1),ol.one=kl("one",!1);var sl=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];ol._initevents=function(){zc(sl,function(t){var e=function(e){var i,n=this.getmodel(),a=e.target,o="globalout"===t;if(o)i={};else if(a&&null!=a.dataindex){var s=a.datamodel||n.getseriesbyindex(a.seriesindex);i=s&&s.getdataparams(a.dataindex,a.datatype,a)||{}}else a&&a.eventdata&&(i=r({},a.eventdata));if(i){var l=i.componenttype,u=i.componentindex;("markline"===l||"markpoint"===l||"markarea"===l)&&(l="series",u=i.seriesindex);var h=l&&null!=u&&n.getcomponent(l,u),c=h&&this["series"===h.maintype?"_chartsmap":"_componentsmap"][h.__viewid];i.event=e,i.type=t,this._eceventprocessor.eventinfo={targetel:a,packedevent:i,model:h,view:c},this.trigger(t,i)}};e.zreventfulcallatlast=!0,this._zr.on(t,e,this)},this),zc(ul,function(t,e){this._messagecenter.on(e,function(t){this.trigger(e,t)},this)},this)},ol.isdisposed=function(){return this._disposed},ol.clear=function(){this._disposed||this.setoption({series:[]},!0)},ol.dispose=function(){if(!this._disposed){this._disposed=!0,pa(this.getdom(),_l,"");var t=this._api,e=this._model;zc(this._componentsviews,function(i){i.dispose(e,t)}),zc(this._chartsviews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete ml[this.id]}},c(jl,qs),vu.prototype={constructor:vu,normalizequery:function(t){var e={},i={},n={};if(b(t)){var a=gc(t);e.maintype=a.main||null,e.subtype=a.sub||null}else{var o=["index","name","id"],r={name:1,dataindex:1,datatype:1};f(t,function(t,a){for(var s=!1,l=0;l0&&h===a.length-u.length){var c=a.slice(0,h);"data"!==c&&(e.maintype=c,e[u.tolowercase()]=t,s=!0)}}r.hasownproperty(a)&&(i[a]=t,s=!0),s||(n[a]=t)})}return{cptquery:e,dataquery:i,otherquery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventinfo;if(!n)return!0;var a=n.targetel,o=n.packedevent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptquery,u=e.dataquery;return i(l,r,"maintype")&&i(l,r,"subtype")&&i(l,r,"index","componentindex")&&i(l,r,"name")&&i(l,r,"id")&&i(u,o,"name")&&i(u,o,"dataindex")&&i(u,o,"datatype")&&(!s.filterforexposedevent||s.filterforexposedevent(t,e.otherquery,a,o))},aftertrigger:function(){this.eventinfo=null}};var ll={},ul={},hl=[],cl=[],dl=[],fl=[],pl={},gl={},ml={},vl={},yl=new date-0,xl=new date-0,_l="_echarts_instance_",wl=wu;ou(kc,lc),tu(gd),au(xc,fd),nu("default",dc),cu({type:"highlight",event:"highlight",update:"highlight"},g),cu({type:"downplay",event:"downplay",update:"downplay"},g),iu("light",_c),iu("dark",mc);var bl={};zu.prototype={constructor:zu,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={},a={},o=[],r=[];for(uu(e,n,o,"_oldkeygetter",this),uu(i,a,r,"_newkeygetter",this),t=0;th;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var sl=b(["tooltip","label","itemname","itemid","seriesname"]),ml=s,il="undefined",tl=-1,al="e\x00\x00",dl={"float":typeof float64array===il?array:float64array,"int":typeof int32array===il?array:int32array,ordinal:array,number:array,time:array},cl=typeof uint32array===il?array:uint32array,ll=typeof int32array===il?array:int32array,kl=typeof uint16array===il?array:uint16array,pl=["hasitemoption","_namelist","_idlist","_invertedindicesmap","_rawdata","_chunksize","_chunkcount","_dimvaluegetter","_count","_rawcount","_namedimidx","_iddimidx"],ol=["_extent","_approximateextent","_rawextent"],el=function(t,e){t=t||["x","y"];for(var i={},n=[],a={},o=0;oh;h++){var c=a[h];r[c]||(r[c]=uh()),n[c]||(n[c]=[]),th(n,this._dimensioninfos[c],i,u,l),this._chunkcount=n[c].length}for(var d=new array(o),f=s;l>f;f++){for(var p=f-s,g=math.floor(f/i),m=f%i,v=0;o>v;v++){var c=a[v],y=this._dimvaluegetterarrayrows(t[p]||d,c,p,v);n[c][g][m]=y;var x=r[c];yx[1]&&(x[1]=y)}e&&(this._namelist[f]=e[p])}this._rawcount=this._count=l,this._extent={},eh(this)},nl._initdatafromprovider=function(t,e){if(!(t>=e)){for(var i,n=this._chunksize,a=this._rawdata,o=this._storage,r=this.dimensions,s=r.length,l=this._dimensioninfos,u=this._namelist,h=this._idlist,c=this._rawextent,d=this._namerepeatcount={},f=this._chunkcount,p=0;s>p;p++){var g=r[p];c[g]||(c[g]=uh());var m=l[g];0===m.otherdims.itemname&&(i=this._namedimidx=p),0===m.otherdims.itemid&&(this._iddimidx=p),o[g]||(o[g]=[]),th(o,m,n,f,e),this._chunkcount=o[g].length}for(var v=new array(s),y=t;e>y;y++){v=a.getitem(y,v);for(var x=math.floor(y/n),_=y%n,w=0;s>w;w++){var g=r[w],b=o[g][x],s=this._dimvaluegetter(v,g,y,w);b[_]=s;var m=c[g];sm[1]&&(m[1]=s)}if(!a.pure){var i=u[y];if(v&&null==i)if(null!=v.name)u[y]=i=v.name;else if(null!=i){var t=r[i],a=o[t][x];if(a){i=a[_];var d=l[t].ordinalmeta;d&&d.categories.length&&(i=d.categories[i])}}var c=null==v?null:v.id;null==c&&null!=i&&(d[i]=d[i]||0,c=i,d[i]>0&&(c+="__ec__"+d[i]),d[i]++),null!=c&&(h[y]=c)}}!a.persistent&&a.clean&&a.clean(),this._rawcount=this._count=e,this._extent={},eh(this)}},nl.count=function(){return this._count},nl.getindices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===array){t=new i(n);for(var a=0;n>a;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else for(var i=$u(this),t=new i(this.count()),a=0;a=0&&e=0&&en;n++)i.push(this.get(t[n],e));return i},nl.hasvalue=function(t){for(var e=this._dimensionssummary.datadimsoncoord,i=0,n=e.length;n>i;i++)if(isnan(this.get(e[i],t)))return!1;return!0},nl.getdataextent=function(t){t=this.getdimension(t);var e=this._storage[t],i=uh();if(!e)return i;var n,a=this.count(),o=!this._indices;if(o)return this._rawextent[t].slice();if(n=this._extent[t])return n.slice();n=i;for(var r=n[0],s=n[1],l=0;a>l;l++){var u=this._getfast(t,this.getrawindex(l));r>u&&(r=u),u>s&&(s=u)}return n=[r,s],this._extent[t]=n,n},nl.getapproximateextent=function(t){return t=this.getdimension(t),this._approximateextent[t]||this.getdataextent(t)},nl.setapproximateextent=function(t,e){e=this.getdimension(e),this._approximateextent[e]=t.slice()},nl.getcalculationinfo=function(t){return this._calculationinfo[t]},nl.setcalculationinfo=function(t,e){ml(t)?r(this._calculationinfo,t):this._calculationinfo[t]=e},nl.getsum=function(t){var e=this._storage[t],i=0;if(e)for(var n=0,a=this.count();a>n;n++){var o=this.get(t,n);isnan(o)||(i+=o)}return i},nl.getmedian=function(t){var e=[];this.each(t,function(t){isnan(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},nl.rawindexof=function(t,e){var i=t&&this._invertedindicesmap[t],n=i[e];return null==n||isnan(n)?tl:n},nl.indexofname=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getname(e)===t)return e;return-1},nl.indexofrawindex=function(t){if(t>=this._rawcount||0>t)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i=n;){var o=(n+a)/2|0;if(e[o]t))return o;a=o-1}}return-1},nl.indicesofnearest=function(t,e,i){var n=this._storage,a=n[t],o=[];if(!a)return o;null==i&&(i=1/0);for(var r=1/0,s=-1,l=0,u=0,h=this.count();h>u;u++){var c=e-this.get(t,u),d=math.abs(c);i>=d&&((r>d||d===r&&c>=0&&0>s)&&(r=d,s=c,l=0),c===s&&(o[l++]=u))}return o.length=l,o},nl.getrawindex=nh,nl.getrawdataitem=function(t){if(this._rawdata.persistent)return this._rawdata.getitem(this.getrawindex(t));for(var e=[],i=0;ir;r++)s[r]=this.get(t[r],o);s[r]=o,e.apply(i,s)}}},nl.filterself=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(rh(t),this.getdimension,this);for(var a=this.count(),o=$u(this),r=new o(a),s=[],l=t.length,u=0,h=t[0],c=0;a>c;c++){var d,f=this.getrawindex(c);if(0===l)d=e.call(i,c);else if(1===l){var g=this._getfast(h,f);d=e.call(i,g,c)}else{for(var m=0;l>m;m++)s[m]=this._getfast(h,f);s[m]=c,d=e.apply(i,s)}d&&(r[u++]=f)}return a>u&&(this._indices=r),this._count=u,this._extent={},this.getrawindex=this._indices?ah:nh,this}},nl.selectrange=function(t){if(this._count){var e=[]; for(var i in t)t.hasownproperty(i)&&e.push(i);var n=e.length;if(n){var a=this.count(),o=$u(this),r=new o(a),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===n){for(var f=this._storage[e[0]],p=0;pv;v++){var y=g[v];(y>=u&&h>=y||isnan(y))&&(r[s++]=d),d++}c=!0}else if(2===n){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],w=t[e[1]][1],p=0;pv;v++){var y=g[v],s=b[v];(y>=u&&h>=y||isnan(y))&&(s>=_&&w>=s||isnan(s))&&(r[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var v=0;a>v;v++){var m=this.getrawindex(v),y=this._getfast(l,m);(y>=u&&h>=y||isnan(y))&&(r[s++]=m)}else for(var v=0;a>v;v++){for(var i=!0,m=this.getrawindex(v),p=0;n>p;p++){var t=e[p],y=this._getfast(i,m);(yt[t][1])&&(i=!1)}i&&(r[s++]=this.getrawindex(v))}return a>s&&(this._indices=r),this._count=s,this._extent={},this.getrawindex=this._indices?ah:nh,this}}},nl.maparray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var a=[];return this.each(t,function(){a.push(e&&e.apply(this,arguments))},i),a},nl.map=function(t,e,i,n){i=i||n||this,t=p(rh(t),this.getdimension,this);var a=sh(this,t);a._indices=this._indices,a.getrawindex=a._indices?ah:nh;for(var o=a._storage,r=[],s=this._chunksize,l=t.length,u=this.count(),h=[],c=a._rawextent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getrawindex(d),v=math.floor(m/s),y=m%s,x=0;xb[1]&&(b[1]=w)}}}return a},nl.downsample=function(t,e,i,n){for(var a=sh(this,[t]),o=a._storage,r=[],s=math.floor(1/e),l=o[t],u=this.count(),h=this._chunksize,c=a._rawextent[t],d=new($u(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;s>g;g++){var m=this.getrawindex(p+g),v=math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getrawindex(math.min(p+n(r,x)||0,u-1)),w=math.floor(_/h),b=_%h;l[w][b]=x,xc[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getrawindex=ah,a},nl.getitemmodel=function(t){var e=this.hostmodel;return new vr(this.getrawdataitem(t),e,e&&e.ecmodel)},nl.diff=function(t){var e=this;return new zu(t?t.getindices():[],this.getindices(),function(e){return oh(t,e)},function(t){return oh(e,t)})},nl.getvisual=function(t){var e=this._visual;return e&&e[t]},nl.setvisual=function(t,e){if(ml(t))for(var i in t)t.hasownproperty(i)&&this.setvisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},nl.setlayout=function(t,e){if(ml(t))for(var i in t)t.hasownproperty(i)&&this.setlayout(i,t[i]);else this._layout[t]=e},nl.getlayout=function(t){return this._layout[t]},nl.getitemlayout=function(t){return this._itemlayouts[t]},nl.setitemlayout=function(t,e,i){this._itemlayouts[t]=i?r(this._itemlayouts[t]||{},e):e},nl.clearitemlayouts=function(){this._itemlayouts.length=0},nl.getitemvisual=function(t,e,i){var n=this._itemvisuals[t],a=n&&n[e];return null!=a||i?a:this.getvisual(e)},nl.setitemvisual=function(t,e,i){var n=this._itemvisuals[t]||{},a=this.hasitemvisual;if(this._itemvisuals[t]=n,ml(e))for(var o in e)e.hasownproperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},nl.clearallvisual=function(){this._visual={},this._itemvisuals=[],this.hasitemvisual={}};var rl=function(t){t.seriesindex=this.seriesindex,t.dataindex=this.dataindex,t.datatype=this.datatype};nl.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(rl,e)),this._graphicels[t]=e},nl.getitemgraphicel=function(t){return this._graphicels[t]},nl.eachitemgraphicel=function(t,e){f(this._graphicels,function(i,n){i&&t&&t.call(e,i,n)})},nl.cloneshallow=function(t){if(!t){var e=p(this.dimensions,this.getdimensioninfo,this);t=new el(e,this.hostmodel)}if(t._storage=this._storage,qu(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getrawindex=t._indices?ah:nh,t},nl.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(k(arguments)))})},nl.transferable_methods=["cloneshallow","downsample","map"],nl.changable_methods=["filterself","selectrange"];var zl=function(t,e){return e=e||{},hh(e.coorddimensions||[],t,{dimsdef:e.dimensionsdefine||t.dimensionsdefine,encodedef:e.encodedefine||t.encodedefine,dimcount:e.dimensionscount,encodedefaulter:e.encodedefaulter,generatecoord:e.generatecoord,generatecoordcount:e.generatecoordcount})},bl={cartesian2d:function(t,e,i,n){var a=t.getreferringcomponents("xaxis")[0],o=t.getreferringcomponents("yaxis")[0];e.coordsysdims=["x","y"],i.set("x",a),i.set("y",o),gh(a)&&(n.set("x",a),e.firstcategorydimindex=0),gh(o)&&(n.set("y",o),null==e.firstcategorydimindex&(e.firstcategorydimindex=1))},singleaxis:function(t,e,i,n){var a=t.getreferringcomponents("singleaxis")[0];e.coordsysdims=["single"],i.set("single",a),gh(a)&&(n.set("single",a),e.firstcategorydimindex=0)},polar:function(t,e,i,n){var a=t.getreferringcomponents("polar")[0],o=a.findaxismodel("radiusaxis"),r=a.findaxismodel("angleaxis");e.coordsysdims=["radius","angle"],i.set("radius",o),i.set("angle",r),gh(o)&&(n.set("radius",o),e.firstcategorydimindex=0),gh(r)&&(n.set("angle",r),null==e.firstcategorydimindex&&(e.firstcategorydimindex=1))},geo:function(t,e){e.coordsysdims=["lng","lat"]},parallel:function(t,e,i,n){var a=t.ecmodel,o=a.getcomponent("parallel",t.get("parallelindex")),r=e.coordsysdims=o.dimensions.slice();f(o.parallelaxisindex,function(t,o){var s=a.getcomponent("parallelaxis",t),l=r[o];i.set(l,s),gh(s)&&null==e.firstcategorydimindex&&(n.set(l,s),e.firstcategorydimindex=o)})}};bh.prototype.parse=function(t){return t},bh.prototype.getsetting=function(t){return this._setting[t]},bh.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},bh.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},bh.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},bh.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},bh.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},bh.prototype.getextent=function(){return this._extent.slice()},bh.prototype.setextent=function(t,e){var i=this._extent;isnan(t)||(i[0]=t),isnan(e)||(i[1]=e)},bh.prototype.isblank=function(){return this._isblank},bh.prototype.setblank=function(t){this._isblank=t},bh.prototype.getlabel=null,_a(bh),ma(bh,{registerwhenextend:!0}),sh.createbyaxismodel=function(t){var e=t.option,i=e.data,n=i&&p(i,ih);return new sh({categories:n,needcollect:!n,deduplication:e.dedplication!==!1})};var vl=sh.prototype;vl.getordinal=function(t){return mh(this).get(t)},vl.parseandcollect=function(t){var e,i=this._needcollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=mh(this);return e=n.get(t),null==e&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=0/0),e};var gl=bh.prototype,fl=bh.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new sh({categories:t})),this._ordinalmeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalmeta.getordinal(t):math.round(t)},contain:function(t){return t=this.parse(t),gl.contain.call(this,t)&&null!=this._ordinalmeta.categories[t]},normalize:function(t){return gl.normalize.call(this,this.parse(t))},scale:function(t){return math.round(gl.scale.call(this,t))},getticks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getlabel:function(t){return this.isblank()?void 0:this._ordinalmeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionextentfromdata:function(t,e){this.unionextent(t.getapproximateextent(e))},getordinalmeta:function(){return this._ordinalmeta},niceticks:g,niceextent:g});fl.create=function(){return new fl};var wl=tr,hl=tr,zl=bh.extend({type:"interval",_interval:0,_intervalprecision:2,setextent:function(t,e){var i=this._extent;isnan(t)||(i[0]=parsefloat(t)),isnan(e)||(i[1]=parsefloat(e))},unionextent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),zl.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=ah(t)},getticks:function(t){var e=this._interval,i=this._extent,n=this._niceextent,a=this._intervalprecision,o=[];if(!e)return o;var r=1e4;i[0]r)return[];var l=o.length?o[o.length-1]:n[1];return i[1]>l&&o.push(t?hl(l+e,a):i[1]),o},getminorticks:function(t){for(var e=this.getticks(!0),i=[],n=this.getextent(),a=1;as;){var c=tr(r+(s+1)*h);c>n[0]&&ca&&(a=-a,n.reverse());var o=th(n,t,e,i);this._intervalprecision=o.intervalprecision,this._interval=o.interval,this._niceextent=o.nicetickextent}},niceextent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var 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 a=this._interval;t.fixmin||(e[0]=hl(math.floor(e[0]/a)*a)),t.fixmax||(e[1]=hl(math.ceil(e[1]/a)*a))}});zl.create=function(){return new zl};var ul="__ec_stack_",xl=.5,yl="undefined"!=typeof float32array?float32array:array,jl={seriestype:"bar",plan:tc(),reset:function(t){function e(t,e){for(var i,d=t.count,f=new yl(2*d),p=new yl(2*d),g=new yl(d),m=[],v=[],y=0,x=0;null!=(i=t.next());)v[h]=e.get(s,i),v[1-h]=e.get(l,i),m=n.datatopoint(v,null,m),p[y]=u?a.x+a.width:m[0],f[y++]=m[0],p[y]=u?m[1]:a.y+a.height,f[y++]=m[1],g[x++]=i;e.setlayout({largepoints:f,largedataindices:g,largebackgroundpoints:p,barwidth:c,valueaxisstart:fh(o,r,!1),backgroundstart:u?a.x:a.y,valueaxishorizontal:u})}if(vh(t)&&gh(t)){var i=t.getdata(),n=t.coordinatesystem,a=n.grid.getrect(),o=n.getbaseaxis(),r=n.getotheraxis(o),s=i.mapdimension(r.dim),l=i.mapdimension(o.dim),u=r.ishorizontal(),h=u?0:1,c=zh(nh([t]),o,t).width;return c>xl||(c=xl),{progress:e}}}},ql=zl.prototype,kl=math.ceil,$l=math.floor,jl=1e3,ql=60*jl,tk=60*ql,ek=24*tk,ik=function(t,e,i,n){for(;n>i;){var a=i+n>>>1;t[a][1]o&&(o=e),null!=i&&o>i&&(o=i);var r=ak.length,s=ik(ak,o,0,r),l=ak[math.min(s,r-1)],u=l[1];if("year"===l[0]){var h=a/u,c=zr(h/t,!0);u*=c}var d=this.getsetting("useutc")?0:60*new date(+n[0]||+n[1]).gettimezoneoffset()*1e3,f=[math.round(kl((n[0]-d)/u)*u+d),math.round($l((n[1]-d)/u)*u+d)];ch(f,n),this._steplvl=l,this._interval=u,this._niceextent=f},parse:function(t){return+er(t)}});f(["contain","normalize"],function(t){nk.prototype[t]=function(e){return ql[t].call(this,this.parse(e))}});var ak=[["hh:mm:ss",jl],["hh:mm:ss",5*jl],["hh:mm:ss",10*jl],["hh:mm:ss",15*jl],["hh:mm:ss",30*jl],["hh:mm\nmm-dd",ql],["hh:mm\nmm-dd",5*ql],["hh:mm\nmm-dd",10*ql],["hh:mm\nmm-dd",15*ql],["hh:mm\nmm-dd",30*ql],["hh:mm\nmm-dd",tk],["hh:mm\nmm-dd",2*tk],["hh:mm\nmm-dd",6*tk],["hh:mm\nmm-dd",12*tk],["mm-dd\nyyyy",ek],["mm-dd\nyyyy",2*ek],["mm-dd\nyyyy",3*ek],["mm-dd\nyyyy",4*ek],["mm-dd\nyyyy",5*ek],["mm-dd\nyyyy",6*ek],["week",7*ek],["mm-dd\nyyyy",10*ek],["week",14*ek],["week",21*ek],["month",31*ek],["week",42*ek],["month",62*ek],["week",70*ek],["quarter",95*ek],["month",31*ek*4],["month",31*ek*5],["half-year",380*ek/2],["month",31*ek*8],["month",31*ek*10],["year",380*ek]];nk.create=function(t){return new nk({useutc:t.ecmodel.get("useutc")})};var ok=bh.prototype,rk=zl.prototype,sk=cr,lk=tr,uk=math.floor,hk=math.ceil,ck=math.pow,dk=math.log,fk=bh.extend({type:"log",base:10,$constructor:function(){bh.apply(this,arguments),this._originalscale=new zl},getticks:function(t){var e=this._originalscale,i=this._extent,n=e.getextent();return p(rk.getticks.call(this,t),function(t){var a=tr(ck(this.base,t));return a=t===i[0]&&e.__fixmin?wh(a,n[0]):a,a=t===i[1]&&e.__fixmax?wh(a,n[1]):a},this)},getminorticks:rk.getminorticks,getlabel:rk.getlabel,scale:function(t){return t=ok.scale.call(this,t),ck(this.base,t)},setextent:function(t,e){var i=this.base;t=dk(t)/dk(i),e=dk(e)/dk(i),rk.setextent.call(this,t,e)},getextent:function(){var t=this.base,e=ok.getextent.call(this);e[0]=ck(t,e[0]),e[1]=ck(t,e[1]);var i=this._originalscale,n=i.getextent();return i.__fixmin&&(e[0]=wh(e[0],n[0])),i.__fixmax&&(e[1]=wh(e[1],n[1])),e},unionextent:function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=dk(t[0])/dk(e),t[1]=dk(t[1])/dk(e),ok.unionextent.call(this,t)},unionextentfromdata:function(t,e){this.unionextent(t.getapproximateextent(e))},niceticks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=nr(i),a=t/i*n;for(.5>=a&&(n*=10);!isnan(n)&&math.abs(n)<1&&math.abs(n)>0;)n*=10;var o=[tr(hk(e[0]/n)*n),tr(uk(e[1]/n)*n)];this._interval=n,this._niceextent=o}},niceextent:function(t){rk.niceextent.call(this,t);var e=this._originalscale;e.__fixmin=t.fixmin,e.__fixmax=t.fixmax}});f(["contain","normalize"],function(t){fk.prototype[t]=function(e){return e=dk(e)/dk(this.base),ok[t].call(this,e)}}),fk.create=function(){return new fk};var pk={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&&!a(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&&!a(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:g,setrange:function(t,e){this.option.rangestart=t,this.option.rangeend=e},resetrange:function(){this.option.rangestart=this.option.rangeend=null}},gk=xo({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveto(i,n-o),t.lineto(i+a,n+o),t.lineto(i-a,n+o),t.closepath()}}),mk=xo({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveto(i,n-o),t.lineto(i+a,n),t.lineto(i,n+o),t.lineto(i-a,n),t.closepath()}}),vk=xo({type:"pin",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,o=math.max(a,e.height),r=a/2,s=r*r/(o-r),l=n-o+r+s,u=math.asin(s/r),h=math.cos(u)*r,c=math.sin(u),d=math.cos(u),f=.6*r,p=.7*r;t.moveto(i-h,l+s),t.arc(i,l,r,math.pi-u,2*math.pi+u),t.beziercurveto(i+h-c*f,l+s+d*f,i,n-p,i,n),t.beziercurveto(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closepath()}}),yk=xo({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.height,n=e.width,a=e.x,o=e.y,r=n/3*2;t.moveto(a,o),t.lineto(a+r,o+i),t.lineto(a,o+i/4*3),t.lineto(a-r,o+i),t.lineto(a,o),t.closepath()}}),xk={line:ma,rect:pa,roundrect:pa,square:pa,circle:na,diamond:mk,pin:vk,arrow:yk,triangle:gk},_k={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundrect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=math.min(i,n)/4},square:function(t,e,i,n,a){var o=math.min(i,n);a.x=t,a.y=e,a.width=o,a.height=o},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},wk={};f(xk,function(t,e){wk[e]=new t});var bk=xo({type:"symbol",shape:{symboltype:"",x:0,y:0,width:0,height:0},calculatetextposition:function(t,e,i){var n=$i(t,e,i),a=this.shape;return a&&"pin"===a.symboltype&&"inside"===e.textposition&&(n.y=i.y+.4*i.height),n},buildpath:function(t,e,i){var n=e.symboltype;if("none"!==n){var a=wk[n];a||(n="rect",a=wk[n]),_k[n](e.x,e.y,e.width,e.height,a.shape),a.buildpath(t,a.shape,i)}}}),sk={isdimensionstacked:vh,enabledatastack:mh,getstackeddimension:yh},mk=(object.freeze||object)({createlist:ic,getlayoutrect:ts,datastack:sk,createscale:nc,mixinaxismodelcommonmethods:ac,completedimensions:hh,createdimensions:zl,createsymbol:ec}),ik=1e-8;sc.prototype={constructor:sc,properties:null,getboundingrect:function(){var t=this._rect;if(t)return t;for(var e=number.max_value,i=[e,e],n=[-e,-e],a=[],o=[],r=this.geometries,s=0;sn;n++)if("polygon"===i[n].type){var o=i[n].exterior,r=i[n].interiors;if(rc(o,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(rc(r[s]))continue t;return!0}}return!1},transformto:function(t,e,i,n){var a=this.getboundingrect(),o=a.width/a.height;i?n||(n=i/o):i=o*n;for(var r=new ti(t,e,i,n),s=a.calculatetransform(r),l=this.geometries,u=0;u0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,a=[];"polygon"===i.type&&a.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"multipolygon"===i.type&&f(n,function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new sc(e.name,a,e.cp);return o.properties=e,o})},ak=ca(),dk=[0,1],ck=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onband=!1};ck.prototype={constructor:ck,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.scale.contain(t)},getextent:function(){return this._extent.slice()},getpixelprecision:function(t){return lr(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(),mc(i,n.count())),mr(t,dk,i,e)},coordtodata:function(t,e){var i=this._extent,n=this.scale;this.onband&&"ordinal"===n.type&&(i=i.slice(),mc(i,n.count()));var a=mr(t,i,dk,e);return this.scale.scale(a)},pointtodata:function(){},gettickscoords:function(t){t=t||{};var e=t.tickmodel||this.gettickmodel(),i=cc(this,e),n=i.ticks,a=p(n,function(t){return{coord:this.datatocoord(t),tickvalue:t}},this),o=e.get("alignwithlabel");return ic(this,a,o,t.clamp),a},getminortickscoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getmodel("minortick"),e=t.get("splitnumber");e>0&&100>e||(e=5);var i=this.scale.getminorticks(e),n=p(i,function(t){return p(t,function(t){return{coord:this.datatocoord(t),tickvalue:t}},this)},this);return n},getviewlabels:function(){return hc(this).labels},getlabelmodel:function(){return this.model.getmodel("axislabel")},gettickmodel:function(){return this.model.getmodel("axistick")},getbandwidth:function(){var t=this._extent,e=this.scale.getextent(),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,calculatecategoryinterval:function(){return _c(this)}};var lk=tk,kk={};f(["map","each","filter","indexof","inherits","reduce","filter","bind","curry","isarray","isstring","isobject","isfunction","extend","defaults","clone","merge"],function(t){kk[t]=fs[t]});var pk={};f(["extendshape","extendpath","makepath","makeimage","mergepath","resizepath","createicon","sethoverstyle","setlabelstyle","settextstyle","settext","getfont","updateprops","initprops","gettransform","clippointsbyrect","cliprectbyrect","registershape","getshapeclass","group","image","text","circle","sector","ring","polygon","polyline","rect","line","beziercurve","arc","incrementaldisplayable","compoundpath","lineargradient","radialgradient","boundingrect"],function(t){pk[t]=va[t]});var ok=function(t){this._axes={},this._dimlist=[],this.name=t||""};ok.prototype={constructor:ok,type:"cartesian",getaxis:function(t){return this._axes[t]},getaxes:function(){return p(this._dimlist,tc,this)},getaxesbyscale:function(t){return t=t.tolowercase(),m(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?[]:{},a=0;ae[1]&&e.reverse(),e},getotheraxis:function(){this.grid.getotheraxis()},pointtodata:function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},tolocalcoord:null,toglobalcoord:null},h(ek,ck);var nk={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)"]}}},rk={};rk.categoryaxis=a({boundarygap:!0,deduplication:null,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},nk),rk.valueaxis=a({boundarygap:[0,0],splitnumber:5,minortick:{show:!1,splitnumber:5,length:3,linestyle:{}},minorsplitline:{show:!1,linestyle:{color:"#eee",width:1}}},nk),rk.timeaxis=s({scale:!0,min:"datamin",max:"datamax"},rk.valueaxis),rk.logaxis=s({scale:!0,logbase:10},rk.valueaxis);var zk=["value","category","time","log"],bk=function(t,e,i,n){f(zk,function(r){e.extend({type:t+"axis."+r,mergedefaultandtheme:function(e,n){var o=this.layoutmode,s=o?as(e):{},l=n.gettheme();a(e,l.get(r+"axis")),a(e,this.getdefaultoption()),e.type=i(t,e),o&&ns(e,s,o)},optionupdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalmeta=sh.createbyaxismodel(this))},getcategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalmeta.categories:void 0},getordinalmeta:function(){return this.__ordinalmeta},defaultoption:o([{},rk[r+"axis"],n],!0)})}),hd.registersubtypedefaulter(t+"axis",x(i,t))},vk=hd.extend({type:"cartesian2daxis",axis:null,init:function(){vk.superapply(this,"init",arguments),this.resetrange()},mergeoption:function(){vk.superapply(this,"mergeoption",arguments),this.resetrange()},restoredata:function(){vk.superapply(this,"restoredata",arguments),this.resetrange()},getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"grid",index:this.option.gridindex,id:this.option.gridid})[0]}});a(vk.prototype,pk);var gk={offset:0};bk("x",vk,dc,gk),bk("y",vk,dc,gk),hd.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 fk=lc.prototype;fk.type="grid",fk.axispointerenabled=!0,fk.getrect=function(){return this._rect},fk.update=function(t,e){var i=this._axesmap;this._updatescale(t,this.model),f(i.x,function(t){uh(t.scale,t.model)}),f(i.y,function(t){uh(t.scale,t.model)});var n={};f(i.x,function(t){kc(i,"y",t,n)}),f(i.y,function(t){kc(i,"x",t,n)}),this.resize(this.model,e)},fk.resize=function(t,e,i){function n(){f(o,function(t){var e=t.ishorizontal(),i=e?[0,a.width]:[0,a.height],n=t.inverse?1:0;t.setextent(i[n],i[1-n]),oc(t,e?a.x:a.y)})}var a=ts(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()});this._rect=a;var o=this._axeslist;n(),!i&&t.get("containlabel")&&(f(o,function(t){if(!t.model.get("axislabel.inside")){var e=kh(t);if(e){var i=t.ishorizontal()?"height":"width",n=t.model.get("axislabel.margin");a[i]-=e[i]+n,"top"===t.position?a.y+=e.height+n:"left"===t.position&&(a.x+=e.width+n)}}}),n())},fk.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]}},fk.getaxes=function(){return this._axeslist.slice()},fk.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,a=this._coordslist;nt&&(t=e),t},defaultoption:{clip:!0,roundcap:!1,showbackground:!1,backgroundstyle:{color:"rgba(180, 180, 180, 0.2)",bordercolor:null,borderwidth:0,bordertype:"solid",borderradius:0,shadowblur:0,shadowcolor:null,shadowoffsetx:0,shadowoffsety:0,opacity:1}}}); var zk=qi([["fill","color"],["stroke","bordercolor"],["linewidth","borderwidth"],["stroke","barbordercolor"],["linewidth","barborderwidth"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),uk={getbaritemstyle:function(t){var e=zk(this,t);if(this.getborderlinedash){var i=this.getborderlinedash();i&&(e.linedash=i)}return e}},xk=xo({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startangle:0,endangle:2*math.pi,clockwise:!0},buildpath:function(t,e){var i=e.cx,n=e.cy,a=math.max(e.r0||0,0),o=math.max(e.r,0),r=.5*(o-a),s=a+r,l=e.startangle,u=e.endangle,h=e.clockwise,c=math.cos(l),d=math.sin(l),f=math.cos(u),p=math.sin(u),g=h?u-l<2*math.pi:l-u<2*math.pi;g&&(t.moveto(c*a+i,d*a+n),t.arc(c*s+i,d*s+n,r,-math.pi+l,l,!h)),t.arc(i,n,o,l,u,!h),t.moveto(f*o+i,p*o+n),t.arc(f*s+i,p*s+n,r,u-2*math.pi,u-math.pi,!h),0!==a&&(t.arc(i,n,a,u,l,h),t.moveto(c*a+i,p*a+n)),t.closepath()}}),yk=["itemstyle","barborderwidth"],jk=[0,0];r(vr.prototype,uk),vu({type:"bar",render:function(t,e,i){this._updatedrawmode(t);var n=t.get("coordinatesystem");return("cartesian2d"===n||"polar"===n)&&(this._islargedraw?this._renderlarge(t,e,i):this._rendernormal(t,e,i)),this.group},incrementalpreparerender:function(t){this._clear(),this._updatedrawmode(t)},incrementalrender:function(t,e){this._incrementalrenderlarge(t,e)},_updatedrawmode:function(t){var e=t.pipelinecontext.large;(null==this._islargedraw||e^this._islargedraw)&&(this._islargedraw=e,this._clear())},_rendernormal:function(t){var e,i=this.group,n=t.getdata(),a=this._data,o=t.coordinatesystem,r=o.getbaseaxis();"cartesian2d"===o.type?e=r.ishorizontal():"polar"===o.type&&(e="angle"===r.dim);var s=t.isanimationenabled()?t:null,l=t.get("clip",!0),u=wc(o,n);i.removeclippath();var h=t.get("roundcap",!0),c=t.get("showbackground",!0),d=t.getmodel("backgroundstyle"),f=[],p=this._backgroundels||[];n.diff(a).add(function(a){var r=n.getitemmodel(a),p=qk[o.type](n,a,r);if(c){var g=qc(o,e,p);g.usestyle(d.getbaritemstyle()),f[a]=g}if(n.hasvalue(a)){if(l){var m=$k[o.type](u,p);if(m)return void i.remove(v)}var v=jk[o.type](a,p,e,s,!1,h);n.setitemgraphicel(a,v),i.add(v),xc(v,n,a,r,p,t,e,"polar"===o.type)}}).update(function(r,g){var m=n.getitemmodel(r),v=qk[o.type](n,r,m);if(c){var y=p[g];y.usestyle(d.getbaritemstyle()),f[r]=y;var x=jc(e,v,o);ar(y,{shape:x},s,r)}var _=a.getitemgraphicel(g);if(!n.hasvalue(r))return void i.remove(_);if(l){var w=$k[o.type](u,v);if(w)return void i.remove(_)}_?ar(_,{shape:v},s,r):_=jk[o.type](r,v,e,s,!0,h),n.setitemgraphicel(r,_),i.add(_),xc(_,n,r,m,v,t,e,"polar"===o.type)}).remove(function(t){var e=a.getitemgraphicel(t);"cartesian2d"===o.type?e&&hc(t,s,e):e&&zc(t,s,e)}).execute();var g=this._backgroundgroup||(this._backgroundgroup=new fm);g.removeall();for(var m=0;mi&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var a=qk(e.x,t.x),o=kk(e.x+e.width,t.x+t.width),r=qk(e.y,t.y),s=kk(e.y+e.height,t.y+t.height);e.x=a,e.y=r,e.width=o-a,e.height=s-r;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(){return!1}},jk={cartesian2d:function(t,e,i,n,a){var o=new pa({shape:r({},e),z2:1});if(o.name="item",n){var s=o.shape,l=i?"height":"width",u={};s[l]=0,u[l]=e[l],va[a?"updateprops":"initprops"](o,{shape:u},n,t)}return o},polar:function(t,e,i,n,a,o){var r=e.startangle0?1:-1,r=n.height>0?1:-1;return{x:n.x+o*a/2,y:n.y+r*a/2,width:n.width-o*a,height:n.height-r*a}},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}}},tp=ao.extend({type:"largebar",shape:{points:[]},buildpath:function(t,e){for(var i=e.points,n=this.__startpoint,a=this.__basedimidx,o=0;o=0?i:null},30,!1),ip=math.pi,np=function(t,e){this.opt=e,this.axismodel=t,s(e,{labeloffset:0,namedirection:1,tickdirection:1,labeldirection:1,silent:!0}),this.group=new fm;var i=new fm({position:e.position.slice(),rotation:e.rotation});i.updatetransform(),this._transform=i.transform,this._dumbgroup=i};np.prototype={constructor:np,hasbuilder:function(t){return!!ap[t]},add:function(t){ap[t].call(this)},getgroup:function(){return this.group}};var ap={axisline:function(){var t=this.opt,e=this.axismodel;if(e.get("axisline.show")){var i=this.axismodel.axis.getextent(),n=this._transform,a=[i[0],0],o=[i[1],0];n&&(oe(a,a,n),oe(o,o,n));var s=r({linecap:"round"},e.getmodel("axisline.linestyle").getlinestyle());this.group.add(new ma({anid:"line",subpixeloptimize:!0,shape:{x1:a[0],y1:a[1],x2:o[0],y2:o[1]},style:s,strokecontainthreshold:t.strokecontainthreshold||5,silent:!0,z2:1}));var l=e.get("axisline.symbol"),u=e.get("axisline.symbolsize"),h=e.get("axisline.symboloffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof u||"number"==typeof u)&&(u=[u,u]);var c=u[0],d=u[1];f([{rotate:t.rotation+math.pi/2,offset:h[0],r:0},{rotate:t.rotation-math.pi/2,offset:h[1],r:math.sqrt((a[0]-o[0])*(a[0]-o[0])+(a[1]-o[1])*(a[1]-o[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=ec(l[i],-c/2,-d/2,c,d,s.stroke,!0),o=e.r+e.offset,r=[a[0]+o*math.cos(t.rotation),a[1]-o*math.sin(t.rotation)];n.attr({rotation:e.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisticklabel:function(){var t=this.axismodel,e=this.opt,i=rd(this,t,e),n=ld(this,t,e);ed(t,n,i),sd(this,t,e)},axisname:function(){var t=this.opt,e=this.axismodel,i=d(t.axisname,e.get("name"));if(i){var n,a=e.get("namelocation"),o=t.namedirection,s=e.getmodel("nametextstyle"),l=e.get("namegap")||0,u=this.axismodel.axis.getextent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,ad(a)?t.labeloffset+o*l:0],d=e.get("namerotate");null!=d&&(d=d*ip/180);var f;ad(a)?n=rp(t.rotation,null!=d?d:t.rotation,o):(n=td(t,a,d||0,u),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)||{},m=g.ellipsis,v=d(t.nametruncatemaxwidth,g.maxwidth,f),y=null!=m&&null!=v?id(i,v,p,m,{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 ia({anid:"name",__fulltext:i,__truncatedtext:y,position:c,rotation:n.rotation,silent:sp(e),z2:1,tooltip:x&&x.show?r({content:i,formatter:function(){return i},formatterparams:w},x):null});jo(b.style,s,{text:y,textfont:p,textfill:s.gettextcolor()||e.get("axisline.linestyle.color"),textalign:s.get("align")||n.textalign,textverticalalign:s.get("verticalalign")||n.textverticalalign}),e.get("triggerevent")&&(b.eventdata=op(e),b.eventdata.targettype="axisname",b.eventdata.name=i),this._dumbgroup.add(b),b.updatetransform(),this.group.add(b),b.decomposetransform()}}},op=np.makeaxiseventdatabase=function(t){var e={componenttype:t.maintype,componentindex:t.componentindex};return e[t.maintype+"index"]=t.componentindex,e},rp=np.innertextlayout=function(t,e,i){var n,a,o=pr(e-t);return or(o)?(a=i>0?"top":"bottom",n="center"):or(o-ip)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=o>0&&ip>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textalign:n,textverticalalign:a}},sp=np.islabelsilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerevent")||e&&e.show)},lp=f,up=x,hp=zu({type:"axis",_axispointer:null,axispointerclass:null,render:function(t,e,i,n){this.axispointerclass&&gd(t),hp.superapply(this,"render",arguments),_d(this,t,e,i,n,!0)},updateaxispointer:function(t,e,i,n){_d(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axispointer;i&&i.remove(e),hp.superapply(this,"remove",arguments)},dispose:function(t,e){wd(this,e),hp.superapply(this,"dispose",arguments)}}),cp=[];hp.registeraxispointerclass=function(t,e){cp[t]=e},hp.getaxispointerclass=function(t){return t&&cp[t]};var dp=["axisline","axisticklabel","axisname"],fp=["splitarea","splitline","minorsplitline"],pp=hp.extend({type:"cartesianaxis",axispointerclass:"cartesianaxispointer",render:function(t,e,i,n){this.group.removeall();var a=this._axisgroup;if(this._axisgroup=new fm,this.group.add(this._axisgroup),t.get("show")){var o=t.getcoordsysmodel(),r=bd(o,t),s=new np(t,r);f(dp,s.add,s),this._axisgroup.add(s.getgroup()),f(fp,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),ur(a,this._axisgroup,t),pp.supercall(this,"render",t,e,i,n)}},remove:function(){md(this)},_splitline:function(t,e){var i=t.axis;if(!i.scale.isblank()){var n=t.getmodel("splitline"),a=n.getmodel("linestyle"),o=a.get("color");o=_(o)?o:[o];for(var r=e.coordinatesystem.getrect(),l=i.ishorizontal(),u=0,h=i.gettickscoords({tickmodel:n}),c=[],d=[],f=a.getlinestyle(),p=0;p0&&zd(i[a-1]);a--);for(;a>n&&zd(i[n]);n++);}for(;a>n;)n+=bd(t,i,n,a,a,1,o.min,o.max,e.smooth,e.smoothmonotone,e.connectnulls)+1}}),kp=ao.extend({type:"ec-polygon",shape:{points:[],stackedonpoints:[],smooth:0,stackedonsmooth:0,smoothconstraint:!0,smoothmonotone:null,connectnulls:!1},brush:oa(ao.prototype.brush),buildpath:function(t,e){var i=e.points,n=e.stackedonpoints,a=0,o=i.length,r=e.smoothmonotone,s=fd(i,e.smoothconstraint),l=fd(n,e.smoothconstraint);if(e.connectnulls){for(;o>0&&zd(i[o-1]);o--);for(;o>a&&zd(i[a]);a++);}for(;o>a;){var u=bd(t,i,a,o,o,1,s.min,s.max,e.smooth,r,e.connectnulls);bd(t,n,a+u-1,u,o,-1,l.min,l.max,e.stackedonsmooth,r,e.connectnulls),a+=u+1,t.closepath()}}});ml.extend({type:"line",init:function(){var t=new fm,e=new cd;this.group.add(e.group),this._symboldraw=e,this._linegroup=t},render:function(t,e,i){var n=t.coordinatesystem,a=this.group,o=t.getdata(),r=t.getmodel("linestyle"),l=t.getmodel("areastyle"),u=o.maparray(o.getitemlayout),h="polar"===n.type,c=this._coordsys,d=this._symboldraw,f=this._polyline,p=this._polygon,g=this._linegroup,m=t.get("animation"),v=!l.isempty(),y=l.get("origin"),x=od(n,o,y),_=zd(n,o,x),w=t.get("showsymbol"),b=w&&!h&&yd(t,o,n),s=this._data;s&&s.eachitemgraphicel(function(t,e){t.__temp&&(a.remove(t),s.setitemgraphicel(e,null))}),w||d.remove(),a.add(g);var m,i=!h&&t.get("step");n&&n.getarea&&t.get("clip",!0)&&(m=n.getarea(),null!=m.width?(m.x-=.1,m.y-=.1,m.width+=.2,m.height+=.2):m.r0&&(m.r0-=.5,m.r1+=.5)),this._clipshapeforsymbol=m,f&&c.type===n.type&&i===this._step?(v&&!p?p=this._newpolygon(u,_,n,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setclippath(qd(n,!1,t)),w&&d.updatedata(o,{isignore:b,clipshape:m}),o.eachitemgraphicel(function(t){t.stopanimation(!0)}),wd(this._stackedonpoints,_)&&wd(this._points,u)||(m?this._updateanimation(o,_,n,i,i,y):(i&&(u=ud(u,n,i),_=ud(_,n,i)),f.setshape({points:u}),p&&p.setshape({points:u,stackedonpoints:_})))):(w&&d.updatedata(o,{isignore:b,clipshape:m}),i&&(u=ud(u,n,i),_=ud(_,n,i)),f=this._newpolyline(u,n,m),v&&(p=this._newpolygon(u,_,n,m)),g.setclippath(qd(n,!0,t)));var t=xd(o,n)||o.getvisual("color");f.usestyle(s(r.getlinestyle(),{fill:"none",stroke:t,linejoin:"bevel"}));var a=t.get("smooth");if(a=hd(t.get("smooth")),f.setshape({smooth:a,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")}),p){var d=o.getcalculationinfo("stackedonseries"),c=0;p.usestyle(s(l.getareastyle(),{fill:t,opacity:.7,linejoin:"bevel"})),d&&(c=hd(d.get("smooth"))),p.setshape({smooth:a,stackedonsmooth:c,smoothmonotone:t.get("smoothmonotone"),connectnulls:t.get("connectnulls")})}this._data=o,this._coordsys=n,this._stackedonpoints=_,this._points=u,this._step=i,this._valueorigin=y},dispose:function(){},highlight:function(t,e,i,n){var a=t.getdata(),o=ha(a,n);if(!(o instanceof array)&&null!=o&&o>=0){var r=a.getitemgraphicel(o);if(!r){var s=a.getitemlayout(o);if(!s)return;if(this._clipshapeforsymbol&&!this._clipshapeforsymbol.contain(s[0],s[1]))return;r=new id(a,o),r.position=s,r.setz(t.get("zlevel"),t.get("z")),r.ignore=isnan(s[0])||isnan(s[1]),r.__temp=!0,a.setitemgraphicel(o,r),r.stopsymbolanimation(!0),this.group.add(r)}r.highlight()}else ml.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getdata(),o=ha(a,n);if(null!=o&&o>=0){var r=a.getitemgraphicel(o);r&&(r.__temp?(a.setitemgraphicel(o,null),this.group.remove(r)):r.downplay())}else ml.prototype.downplay.call(this,t,e,i,n)},_newpolyline:function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new lp({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 kp({shape:{points:t,stackedonpoints:e},silent:!0}),this._linegroup.add(i),this._polygon=i,i},_updateanimation:function(t,e,i,n,a,o){var r=this._polyline,s=this._polygon,l=t.hostmodel,u=bp(this._data,t,this._stackedonpoints,e,this._coordsys,i,this._valueorigin,o),h=u.current,c=u.stackedoncurrent,d=u.next,f=u.stackedonnext;a&&(h=ud(u.current,i,a),c=ud(u.stackedoncurrent,i,a),d=ud(u.next,i,a),f=ud(u.stackedonnext,i,a)),r.shape.__points=u.current,r.shape.points=h,ar(r,{shape:{points:d}},l),s&&(s.setshape({points:h,stackedonpoints:c}),ar(s,{shape:{points:d,stackedonpoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isfinite(e)?e:0/0},min:function(t){for(var e=1/0,i=0;i1){var u;"string"==typeof i?u=ep[i]:"function"==typeof i&&(u=i),u&&t.setdata(e.downsample(e.mapdimension(o.dim),1/l,u,np))}}}}};ou(pp("line","circle","line")),pu(op("line")),au(el.processor.statistic,rp("line"));var zp=function(t,e,i){e=_(e)&&{coorddimensions:e}||r({},e);var n=t.getsource(),a=zl(n,e),o=new el(a,t);return o.initdata(n,i),o},bp={updateselectedmap:function(t){this._targetlist=_(t)?t.slice():[],this._selecttargetmap=g(t||[],function(t,e){return t.set(e.name,e),t},b())},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}},vp=bu({type:"series.pie",init:function(t){vp.superapply(this,"init",arguments),this.legendvisualprovider=new kd(y(this.getdata,this),y(this.getrawdata,this)),this.updateselectedmap(this._createselectablelist()),this._defaultlabelline(t)},mergeoption:function(t){vp.supercall(this,"mergeoption",t),this.updateselectedmap(this._createselectablelist())},getinitialdata:function(){return zp(this,{coorddimensions:["value"],encodedefaulter:x(ys,this)})},_createselectablelist:function(){for(var t=this.getrawdata(),e=t.mapdimension("value"),i=[],n=0,a=t.count();a>n;n++)i.push({name:t.getname(n),value:t.get(e,n),selected:nl(t,n,"selected")});return i},getdataparams:function(t){var e=this.getdata(),i=vp.supercall(this,"getdataparams",t),n=[];return e.each(e.mapdimension("value"),function(t){n.push(t)}),i.percent=kr(n,t,e.hostmodel.get("percentprecision")),i.$vars.push("percent"),i},_defaultlabelline:function(t){ia(t,"labelline",["show"]);var e=t.labelline,i=t.emphasis.labelline;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultoption:{zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,minshowlabelangle:0,selectedoffset:10,hoveroffset:10,avoidlabeloverlap:!0,percentprecision:2,stillshowzerosum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignto:"none",margin:"25%",bleedmargin:10,distancetolabelline:5},labelline:{show:!0,length:15,length2:15,smooth:!1,linestyle:{width:1,type:"solid"}},itemstyle:{borderwidth:1},animationtype:"expansion",animationtypeupdate:"transition",animationeasing:"cubicout"}});c(vp,bp);var gp=qd.prototype;gp.updatedata=function(t,e,i){var n=this.childat(0),a=this.childat(1),o=this.childat(2),l=t.hostmodel,u=t.getitemmodel(e),h=t.getitemlayout(e),c=r({},h);c.label=null;var d=l.getshallow("animationtypeupdate");if(i){n.setshape(c);var f=l.getshallow("animationtype");"scale"===f?(n.shape.r=h.r0,or(n,{shape:{r:h.r}},l,e)):(n.shape.endangle=h.startangle,ar(n,{shape:{endangle:h.endangle}},l,e))}else"expansion"===d?n.setshape(c):ar(n,{shape:c},l,e);var p=t.getitemvisual(e,"color");n.usestyle(s({linejoin:"bevel",fill:p},u.getmodel("itemstyle").getitemstyle())),n.hoverstyle=u.getmodel("emphasis.itemstyle").getitemstyle();var g=u.getshallow("cursor");g&&n.attr("cursor",g),jd(this,t.getitemlayout(e),l.isselected(t.getname(e)),l.get("selectedoffset"),l.get("animation"));var m=!i&&"transition"===d;this._updatelabel(t,e,m),this.highdownonupdate=u.get("hoveranimation")&&l.isanimationenabled()?function(t,e){"emphasis"===e?(a.ignore=a.hoverignore,o.ignore=o.hoverignore,n.stopanimation(!0),n.animateto({shape:{r:h.r+l.get("hoveroffset")}},300,"elasticout")):(a.ignore=a.normalignore,o.ignore=o.normalignore,n.stopanimation(!0),n.animateto({shape:{r:h.r}},300,"elasticout"))}:null,wo(this)},gp._updatelabel=function(t,e,i){var n=this.childat(1),a=this.childat(2),o=t.hostmodel,r=t.getitemmodel(e),s=t.getitemlayout(e),l=s.label,u=t.getitemvisual(e,"color");if(!l||isnan(l.x)||isnan(l.y))return void(a.ignore=a.normalignore=a.hoverignore=n.ignore=n.normalignore=n.hoverignore=!0);var h={points:l.linepoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};i?(ar(n,{shape:h},o,e),ar(a,{style:c},o,e)):(n.attr({shape:h}),a.attr({style:c})),a.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=r.getmodel("label"),f=r.getmodel("emphasis.label"),p=r.getmodel("labelline"),g=r.getmodel("emphasis.labelline"),u=t.getitemvisual(e,"color");xo(a.style,a.hoverstyle={},d,f,{labelfetcher:t.hostmodel,labeldataindex:e,defaulttext:l.text,autocolor:u,useinsidestyle:!!l.inside},{textalign:l.textalign,textverticalalign:l.verticalalign,opacity:t.getitemvisual(e,"opacity")}),a.ignore=a.normalignore=!d.get("show"),a.hoverignore=!f.get("show"),n.ignore=n.normalignore=!p.get("show"),n.hoverignore=!g.get("show"),n.setstyle({stroke:u,opacity:t.getitemvisual(e,"opacity")}),n.setstyle(p.getmodel("linestyle").getlinestyle()),n.hoverstyle=g.getmodel("linestyle").getlinestyle();var m=p.get("smooth");m&&m===!0&&(m=.4),n.setshape({smooth:m})},h(qd,fm);var fp=(ml.extend({type:"pie",init:function(){var t=new fm;this._sectorgroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getdata(),o=this._data,r=this.group,s=e.get("animation"),l=!o,u=t.get("animationtype"),h=t.get("animationtypeupdate"),c=x($d,this.uid,t,s,i),d=t.get("selectedmode");if(a.diff(o).add(function(t){var e=new qd(a,t);l&&"scale"!==u&&e.eachchild(function(t){t.stopanimation(!0)}),d&&e.on("click",c),a.setitemgraphicel(t,e),r.add(e)}).update(function(t,e){var i=o.getitemgraphicel(e);l||"transition"===h||i.eachchild(function(t){t.stopanimation(!0)}),i.updatedata(a,t),i.off("click"),d&&i.on("click",c),r.add(i),a.setitemgraphicel(t,i)}).remove(function(t){var e=o.getitemgraphicel(t);r.remove(e)}).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=a.getitemlayout(0),p=1;isnan(f.startangle)&&p=n.r0}}}),function(t,e){f(e,function(e){e.update="updateview",cu(e,function(i,n){var a={};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);a[i]=t.isselected(i)||!1})}),{name:i.name,selected:a,seriesid:i.seriesid}})})}),wp=function(t){return{gettargetseries:function(e){var i={},n=b();return e.eachseriesbytype(t,function(t){t.__palettescope=i,n.set(t.uid,t)}),n},reset:function(t){var e=t.getrawdata(),i={},n=t.getdata();n.each(function(t){var e=n.getrawindex(t);i[e]=t}),e.each(function(a){var o,r=i[a],s=null!=r&&n.getitemvisual(r,"color",!0),l=null!=r&&n.getitemvisual(r,"bordercolor",!0);if(s&&l||(o=e.getitemmodel(a)),!s){var u=o.get("itemstyle.color")||t.getcolorfrompalette(e.getname(a)||a+"",t.__palettescope,e.count());null!=r&&n.setitemvisual(r,"color",u) }if(!l){var h=o.get("itemstyle.bordercolor");null!=r&&n.setitemvisual(r,"bordercolor",h)}})}}},hp=math.pi/180,zp=function(t,e,i,n,a,o){var r,s,l=t.getdata(),u=[],h=!1,c=(t.get("minshowlabelangle")||0)*hp;l.each(function(n){var o=l.getitemlayout(n),d=l.getitemmodel(n),f=d.getmodel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distancetolabelline"),m=f.get("alignto"),v=ir(f.get("margin"),i),y=f.get("bleedmargin"),x=f.getfont(),_=d.getmodel("labelline"),w=_.get("length");w=ir(w,i);var b=_.get("length2");if(b=ir(b,i),!(o.angled?-1:1)*b,b=r;s="edge"===m?0>d?a+v:a+i-v:z+(0>d?-g:g),m=b,i=[[o,e],[n,r],[z,b]]}t=p?"center":"edge"===m?d>0?"right":"left":d>0?"left":"right"}var v,g=f.get("rotate");v="number"==typeof g?g*(math.pi/180):g?0>d?-a+math.pi:-a:0,h=!!v,o.label={x:s,y:m,position:p,height:k.height,len:w,len2:b,linepoints:i,textalign:t,verticalalign:"middle",rotation:v,inside:p,labeldistance:g,labelalignto:m,labelmargin:v,bleedmargin:y,textrect:k,text:l,font:x},p||u.push(o.label)}}),!h&&t.get("avoidlabeloverlap")&&ef(u,r,s,e,i,n,a,o)},up=2*math.pi,xp=math.pi/180,yp=function(t,e,i){e.eachseriesbytype(t,function(t){var e=t.getdata(),n=e.mapdimension("value"),a=af(t,i),o=t.get("center"),r=t.get("radius");_(r)||(r=[0,r]),_(o)||(o=[o,o]);var s=ir(a.width,i.getwidth()),l=ir(a.height,i.getheight()),u=math.min(s,l),h=ir(o[0],s)+a.x,c=ir(o[1],l)+a.y,d=ir(r[0],u/2),f=ir(r[1],u/2),p=-t.get("startangle")*xp,g=t.get("minangle")*xp,m=0;e.each(n,function(t){!isnan(t)&&m++});var v=e.getsum(n),y=math.pi/(v||m)*2,x=t.get("clockwise"),w=t.get("rosetype"),b=t.get("stillshowzerosum"),s=e.getdataextent(n);s[0]=0;var m=up,i=0,t=p,a=x?1:-1;if(e.each(n,function(t,i){var n;if(isnan(t))return void e.setitemlayout(i,{angle:0/0,startangle:0/0,endangle:0/0,clockwise:x,cx:h,cy:c,r0:d,r:w?0/0:f,viewrect:a});n="area"!==w?0===v&&b?y:t*y:up/m,g>n?(n=g,m-=g):i+=t;var o=t+a*n;e.setitemlayout(i,{angle:n,startangle:t,endangle:o,clockwise:x,cx:h,cy:c,r0:d,r:w?mr(t,s,[d,f]):f,viewrect:a}),t=o}),up>m&&m)if(.001>=m){var d=up/m;e.each(n,function(t,i){if(!isnan(t)){var n=e.getitemlayout(i);n.angle=d,n.startangle=p+a*i*d,n.endangle=p+a*(i+1)*d}})}else y=m/i,t=p,e.each(n,function(t,i){if(!isnan(t)){var n=e.getitemlayout(i),a=n.angle===g?g:t*y;n.startangle=t,n.endangle=t+a*a,t+=a*a}});zp(t,f,a.width,a.height,a.x,a.y)})},jp=function(t){return{seriestype:t,reset:function(t,e){var i=e.findcomponents({maintype:"legend"});if(i&&i.length){var n=t.getdata();n.filterself(function(t){for(var e=n.getname(t),a=0;a=0;s--){var l=2*s,u=n[l]-o/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&u+o>=t&&h+r>=e)return s}return-1}}),$p=of.prototype;$p.ispersistent=function(){return!this._incremental},$p.updatedata=function(t,e){this.group.removeall();var i=new kp({recthover:!0,cursor:"default"});i.setshape({points:t.getlayout("symbolpoints")}),this._setcommon(i,t,!1,e),this.group.add(i),this._incremental=null},$p.updatelayout=function(t){if(!this._incremental){var e=t.getlayout("symbolpoints");this.group.eachchild(function(t){if(null!=t.startindex){var i=2*(t.endindex-t.startindex),n=4*t.startindex*2;e=new float32array(e.buffer,n,i)}t.setshape("points",e)})}},$p.incrementalprepareupdate=function(t){this.group.removeall(),this._clearincremental(),t.count()>2e6?(this._incremental||(this._incremental=new yo({silent:!0})),this.group.add(this._incremental)):this._incremental=null},$p.incrementalupdate=function(t,e,i){var n;this._incremental?(n=new kp,this._incremental.adddisplayable(n,!0)):(n=new kp({recthover:!0,cursor:"default",startindex:t.start,endindex:t.end}),n.incremental=!0,this.group.add(n)),n.setshape({points:e.getlayout("symbolpoints")}),this._setcommon(n,e,!!this._incremental,i)},$p._setcommon=function(t,e,i,n){var a=e.hostmodel;n=n||{};var o=e.getvisual("symbolsize");t.setshape("size",o instanceof array?o:[o,o]),t.softclipshape=n.clipshape||null,t.symbolproxy=ec(e.getvisual("symbol"),0,0,0,0),t.setcolor=t.symbolproxy.setcolor;var r=t.shape.size[0]=0&&(t.dataindex=i+(t.startindex||0))}))},$p.remove=function(){this._clearincremental(),this._incremental=null,this.group.removeall()},$p._clearincremental=function(){var t=this._incremental;t&&t.cleardisplaybles()},vu({type:"scatter",render:function(t){var e=t.getdata(),i=this._updatesymboldraw(e,t);i.updatedata(e,{clipshape:this._getclipshape(t)}),this._finished=!0},incrementalpreparerender:function(t){var e=t.getdata(),i=this._updatesymboldraw(e,t);i.incrementalprepareupdate(e),this._finished=!1},incrementalrender:function(t,e){this._symboldraw.incrementalupdate(t,e.getdata(),{clipshape:this._getclipshape(e)}),this._finished=t.end===e.getdata().count()},updatetransform:function(t){var e=t.getdata();if(this.group.dirty(),!this._finished||e.count()>1e4||!this._symboldraw.ispersistent())return{update:!0};var i=op().reset(t);i.progress&&i.progress({start:0,end:e.count()},e),this._symboldraw.updatelayout(e)},_getclipshape:function(t){var e=t.coordinatesystem,i=e&&e.getarea&&e.getarea();return t.get("clip",!0)?i:null},_updatesymboldraw:function(t,e){var i=this._symboldraw,n=e.pipelinecontext,a=n.large;return i&&a===this._islargedraw||(i&&i.remove(),i=this._symboldraw=a?new of:new cd,this._islargedraw=a,this.group.removeall()),this.group.add(i.group),i},remove:function(){this._symboldraw&&this._symboldraw.remove(!0),this._symboldraw=null},dispose:function(){}}),ou(pp("scatter","circle")),pu(op("scatter")),$d.extend({type:"series.effectscatter",dependencies:["grid","polar"],getinitialdata:function(){return xh(this.getsource(),this,{useencodedefaulter:!0})},brushselector:"point",defaultoption:{coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0,effecttype:"ripple",progressive:0,showeffecton:"render",rippleeffect:{period:4,scale:2.5,brushtype:"fill"},symbolsize:10}});var jp=3,qp=lf.prototype;qp.stopeffectanimation=function(){this.childat(1).removeall()},qp.starteffectanimation=function(t){for(var e=t.symboltype,i=t.color,n=this.childat(1),a=0;jp>a;a++){var o=ec(e,-1,-1,2,2,i);o.attr({style:{strokenoscale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-a/jp*t.period+t.effectoffset;o.animate("",!0).when(t.period,{scale:[t.ripplescale/2,t.ripplescale/2]}).delay(r).start(),o.animatestyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(o)}sf(n,t)},qp.updateeffectanimation=function(t){for(var e=this._effectcfg,i=this.childat(1),n=["symboltype","period","ripplescale"],a=0;a0?ho:co)}function a(t,e){return e.get(t>0?lo:uo)}var o=t.getdata();if(o.setvisual({legendsymbol:"roundrect",colorp:n(1,t),colorn:n(-1,t),bordercolorp:a(1,t),bordercolorn:a(-1,t)}),!e.isseriesfiltered(t)){var r=t.pipelinecontext.large;return!r&&{progress:i}}}},fo="undefined"!=typeof float32array?float32array:array,po={seriestype:"candlestick",plan:tc(),reset:function(t){function e(t,e){function i(t,e){var i=[];return i[r]=e,i[s]=t,isnan(e)||isnan(t)?[0/0,0/0]:n.datatopoint(i)}function a(t,e,i){var n=e.slice(),a=e.slice();n[r]=ra(n[r]+o/2,1,!1),a[r]=ra(a[r]-o/2,1,!0),i?t.push(n,a):t.push(a,n)}function l(t,e,n){var a=i(t,n),l=i(e,n);return a[r]-=o/2,l[r]-=o/2,{x:a[0],y:a[1],width:s?o:l[0]-a[0],height:s?l[1]-a[1]:o}}function h(t){return t[r]=ra(t[r],1),t}for(var g;null!=(g=t.next());){var m=e.get(u,g),v=e.get(c,g),y=e.get(d,g),x=e.get(f,g),_=e.get(p,g),w=math.min(v,y),b=math.max(v,y),s=i(w,m),m=i(b,m),i=i(x,m),t=i(_,m),a=[];a(a,m,0),a(a,s,1),a.push(h(t),h(m),h(i),h(s)),e.setitemlayout(g,{sign:gf(e,g,v,y,d),initbaseline:v>y?m[s]:s[s],ends:a,brushrect:l(x,_,m)})}}function i(t,e){for(var i,a,o=new fo(4*t.count),l=0,h=[],g=[];null!=(a=t.next());){var m=e.get(u,a),v=e.get(c,a),y=e.get(d,a),x=e.get(f,a),_=e.get(p,a);isnan(m)||isnan(x)||isnan(_)?(o[l++]=0/0,l+=3):(o[l++]=gf(e,a,v,y,d),h[r]=m,h[s]=x,i=n.datatopoint(h,null,g),o[l++]=i?i[0]:0/0,o[l++]=i?i[1]:0/0,h[s]=_,i=n.datatopoint(h,null,g),o[l++]=i?i[1]:0/0)}e.setlayout("largepoints",o)}var n=t.coordinatesystem,a=t.getdata(),o=mf(t,a),r=0,s=1,l=["x","y"],u=a.mapdimension(l[r]),h=a.mapdimension(l[s],!0),c=h[0],d=h[1],f=h[2],p=h[3];return a.setlayout({candlewidth:o,issimplebox:1.3>=o}),null==u||h.length<4?void 0:{progress:t.pipelinecontext.large?i:e}}};tu(so),ou(do),pu(po),h(vf,ck),yf.prototype.getindicatoraxes=function(){return this._indicatoraxes},yf.prototype.datatopoint=function(t,e){var i=this._indicatoraxes[e];return this.coordtopoint(i.datatocoord(t),e)},yf.prototype.coordtopoint=function(t,e){var i=this._indicatoraxes[e],n=i.angle,a=this.cx+t*math.cos(n),o=this.cy-t*math.sin(n);return[a,o]},yf.prototype.pointtodata=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=math.sqrt(e*e+i*i);e/=n,i/=n;for(var a,o=math.atan2(-i,e),r=1/0,s=-1,l=0;lh&&(a=u,s=l,r=h)}return[s,+(a&&a.coordtodata(n))]},yf.prototype.resize=function(t,e){var i=t.get("center"),n=e.getwidth(),a=e.getheight(),o=math.min(n,a)/2;this.cx=ir(i[0],n),this.cy=ir(i[1],a),this.startangle=t.get("startangle")*math.pi/180;var r=t.get("radius");("string"==typeof r||"number"==typeof r)&&(r=[0,r]),this.r0=ir(r[0],o),this.r=ir(r[1],o),f(this._indicatoraxes,function(t,e){t.setextent(this.r0,this.r);var i=this.startangle+e*math.pi*2/this._indicatoraxes.length;i=math.atan2(math.sin(i),math.cos(i)),t.angle=i},this)},yf.prototype.update=function(t){function e(t){var e=math.pow(10,math.floor(math.log(t)/math.ln10)),i=t/e;return 2===i?i=5:i*=2,i*e}var i=this._indicatoraxes,n=this._model;f(i,function(t){t.scale.setextent(1/0,-1/0)}),t.eachseriesbytype("radar",function(e){if("radar"===e.get("coordinatesystem")&&t.getcomponent("radar",e.get("radarindex"))===n){var a=e.getdata();f(i,function(t){t.scale.unionextentfromdata(a,a.mapdimension(t.dim))})}},this);var a=n.get("splitnumber");f(i,function(t){var i=hh(t.scale,t.model);uh(t.scale,t.model);var n=t.model,o=t.scale,r=n.getmin(),s=n.getmax(),l=o.getinterval();if(null!=r&&null!=s)o.setextent(+r,+s),o.setinterval((s-r)/a);else if(null!=r){var u;do u=r+l*a,o.setextent(+r,u),o.setinterval(l),l=e(l);while(ui[0]&&isfinite(h)&&isfinite(i[0]))}else{var c=o.getticks().length-1;c>a&&(l=e(l));var u=math.ceil(i[1]/l)*l,h=tr(u-l*a);o.setextent(h,u),o.setinterval(l)}})},yf.dimensions=[],yf.create=function(t,e){var i=[];return t.eachcomponent("radar",function(n){var a=new yf(n,t,e);i.push(a),n.coordinatesystem=a}),t.eachseriesbytype("radar",function(t){"radar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("radarindex")||0])}),i},ls.register("radar",yf);var go=rk.valueaxis,mo=(ru({type:"radar",optionupdated:function(){var t=this.get("boundarygap"),e=this.get("splitnumber"),i=this.get("scale"),o=this.get("axisline"),l=this.get("axistick"),u=this.get("axistype"),h=this.get("axislabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),g=this.get("namegap"),m=this.get("triggerevent"),v=p(this.get("indicator")||[],function(p){null!=p.max&&p.max>0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var v=c;if(null!=p.color&&(v=s({color:p.color},c)),p=a(n(p),{boundarygap:t,splitnumber:e,scale:i,axisline:o,axistick:l,axistype:u,axislabel:h,name:p.text,namelocation:"end",namegap:g,nametextstyle:v,triggerevent:m},!1),d||(p.name=""),"string"==typeof f){var y=p.name;p.name=f.replace("{value}",null!=y?y:"")}else"function"==typeof f&&(p.name=f(p.name,p));var x=r(new vr(p,null,this.ecmodel),pk);return x.maintype="radar",x.componentindex=this.componentindex,x},this);this.getindicatormodels=function(){return v}},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startangle:90,name:{show:!0},boundarygap:[0,0],splitnumber:5,namegap:15,scale:!1,shape:"polygon",axisline:a({linestyle:{color:"#bbb"}},go.axisline),axislabel:xf(go.axislabel,!1),axistick:xf(go.axistick,!1),axistype:"interval",splitline:xf(go.splitline,!0),splitarea:xf(go.splitarea,!0),indicator:[]}}),["axisline","axisticklabel","axisname"]);zu({type:"radar",render:function(t){var e=this.group;e.removeall(),this._buildaxes(t),this._buildsplitlineandarea(t)},_buildaxes:function(t){var e=t.coordinatesystem,i=e.getindicatoraxes(),n=p(i,function(t){var i=new np(t.model,{position:[e.cx,e.cy],rotation:t.angle,labeldirection:-1,tickdirection:-1,namedirection:1});return i});f(n,function(t){f(mo,t.add,t),this.group.add(t.getgroup())},this)},_buildsplitlineandarea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinatesystem,n=i.getindicatoraxes();if(n.length){var a=t.get("shape"),o=t.getmodel("splitline"),r=t.getmodel("splitarea"),l=o.getmodel("linestyle"),u=r.getmodel("areastyle"),h=o.get("show"),c=r.get("show"),d=l.get("color"),g=u.get("color");d=_(d)?d:[d],g=_(g)?g:[g];var m=[],v=[];if("circle"===a)for(var y=n[0].gettickscoords(),x=i.cx,w=i.cy,b=0;b=b;b++){for(var a=[],d=0;d"+p(n,function(i){var n=e.get(e.mapdimension(i.dim),t);return hr(i.name+" : "+n)}).join("
")},gettooltipposition:function(t){if(null!=t)for(var e=this.getdata(),i=this.coordinatesystem,n=e.getvalues(p(i.dimensions,function(t){return e.mapdimension(t)}),t,!0),a=0,o=n.length;o>a;a++)if(!isnan(n[a])){var r=i.getindicatoraxes();return i.coordtopoint(r[a].datatocoord(n[a]),a)}},defaultoption:{zlevel:0,z:2,coordinatesystem:"radar",legendhoverlink:!0,radarindex:0,linestyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptycircle",symbolsize:4}});vu({type:"radar",render:function(t){function e(t,e){var i=t.getitemvisual(e,"symbol")||"circle",n=t.getitemvisual(e,"color");if("none"!==i){var a=_f(t.getitemvisual(e,"symbolsize")),o=ec(i,-1,-1,2,2,n);return o.attr({style:{strokenoscale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function i(i,n,a,o,r,s){a.removeall();for(var l=0;lf;++f){var p=t[f],g=p[0],m=p[1],v=p[2],y=n(v);c.globalalpha=y,c.drawimage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var x=c.getimagedata(0,0,h.width,h.height),_=x.data,w=0,b=_.length,s=this.minopacity,m=this.maxopacity,i=m-s;b>w;){var y=_[w+3]/256,t=4*math.floor(y*(_o-1));if(y>0){var a=o(y)?s:l;y>0&&(y=y*i+s),_[w++]=a[t],_[w++]=a[t+1],_[w++]=a[t+2],_[w++]=a[t+3]*y*256}else w+=4}return c.putimagedata(x,0,0),h},_getbrush:function(){var t=this._brushcanvas||(this._brushcanvas=bs()),e=this.pointsize+this.blursize,i=2*e;t.width=i,t.height=i;var n=t.getcontext("2d");return n.clearrect(0,0,i,i),n.shadowoffsetx=i,n.shadowblur=this.blursize,n.shadowcolor="#000",n.beginpath(),n.arc(-e,e,this.pointsize,0,2*math.pi,!0),n.closepath(),n.fill(),t},_getgradient:function(t,e,i){for(var n=this._gradientpixels,a=n[i]||(n[i]=new uint8clampedarray(1024)),o=[0,0,0,0],r=0,s=0;256>s;s++)e[i](s/255,!0,o),a[r++]=o[0],a[r++]=o[1],a[r++]=o[2],a[r++]=o[3];return a}},vu({type:"heatmap",render:function(t,e,i){var n;e.eachcomponent("visualmap",function(e){e.eachtargetseries(function(i){i===t&&(n=e)})}),this.group.removeall(),this._incrementaldisplayable=null;var a=t.coordinatesystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderoncartesianandcalendar(t,i,0,t.getdata().count()):tf(a)&&this._renderongeo(a,t,n,i)},incrementalpreparerender:function(){this.group.removeall()},incrementalrender:function(t,e,i,n){var a=e.coordinatesystem;a&&this._renderoncartesianandcalendar(e,n,t.start,t.end,!0)},_renderoncartesianandcalendar:function(t,e,i,n,a){var o,s,l=t.coordinatesystem;if("cartesian2d"===l.type){var u=l.getaxis("x"),h=l.getaxis("y");o=u.getbandwidth(),s=h.getbandwidth()}for(var c=this.group,d=t.getdata(),f="itemstyle",p="emphasis.itemstyle",g="label",m="emphasis.label",v=t.getmodel(f).getitemstyle(["color"]),y=t.getmodel(p).getitemstyle(),x=t.getmodel(g),_=t.getmodel(m),w=l.type,b="cartesian2d"===w?[d.mapdimension("x"),d.mapdimension("y"),d.mapdimension("value")]:[d.mapdimension("time"),d.mapdimension("value")],s=i;n>s;s++){var m;if("cartesian2d"===w){if(isnan(d.get(b[2],s)))continue;var i=l.datatopoint([d.get(b[0],s),d.get(b[1],s)]);m=new pa({shape:{x:math.floor(i[0]-o/2),y:math.floor(i[1]-s/2),width:math.ceil(o),height:math.ceil(s)},style:{fill:d.getitemvisual(s,"color"),opacity:d.getitemvisual(s,"opacity")}})}else{if(isnan(d.get(b[1],s)))continue;m=new pa({z2:1,shape:l.datatorect([d.get(b[0],s)]).contentshape,style:{fill:d.getitemvisual(s,"color"),opacity:d.getitemvisual(s,"opacity")}})}var t=d.getitemmodel(s);d.hasitemoption&&(v=t.getmodel(f).getitemstyle(["color"]),y=t.getmodel(p).getitemstyle(),x=t.getmodel(g),_=t.getmodel(m));var a=t.getrawvalue(s),d="-";a&&null!=a[2]&&(d=a[2]),xo(v,y,x,_,{labelfetcher:t,labeldataindex:s,defaulttext:d,isrecttext:!0}),m.setstyle(v),wo(m,d.hasitemoption?y:r({},y)),m.incremental=a,a&&(m.usehoverlayer=!0),c.add(m),d.setitemgraphicel(s,m)}},_renderongeo:function(t,e,i,n){var a=i.targetvisuals.inrange,o=i.targetvisuals.outofrange,r=e.getdata(),s=this._hmlayer||this._hmlayer||new sf;s.blursize=e.get("blursize"),s.pointsize=e.get("pointsize"),s.minopacity=e.get("minopacity"),s.maxopacity=e.get("maxopacity");var l=t.getviewrect().clone(),u=t.getroamtransform();l.applytransform(u);var h=math.max(l.x,0),c=math.max(l.y,0),d=math.min(l.width+l.x,n.getwidth()),f=math.min(l.height+l.y,n.getheight()),p=d-h,g=f-c,m=[r.mapdimension("lng"),r.mapdimension("lat"),r.mapdimension("value")],v=r.maparray(m,function(e,i,n){var a=t.datatopoint([e,i]);return a[0]-=h,a[1]-=c,a.push(n),a}),y=i.getextent(),x="visualmap.continuous"===i.type?if(y,i.option.range):mf(y,i.getpiecelist(),i.option.selected);s.update(v,p,g,a.color.getnormalizer(),{inrange:a.color.getcolormapper(),outofrange:o.color.getcolormapper()},x);var _=new cn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var wo=f,bo="\x00__link_datas",so="\x00__link_maindata",mo=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentnode=null,this.dataindex=-1,this.children=[],this.viewchildren=[],this.hosttree=e};mo.prototype={constructor:mo,isremoved:function(){return this.dataindex<0},eachnode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},b(t)&&(t={order:t}); var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getnodebyid:function(t){if(this.getid()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].getnodebyid(t);if(a)return a}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].contains(t);if(a)return a}},getancestors:function(t){for(var e=[],i=t?this:this.parentnode;i;)e.push(i),i=i.parentnode;return e.reverse(),e},getvalue:function(t){var e=this.hosttree.data;return e.get(e.getdimension(t||"value"),this.dataindex)},setlayout:function(t,e){this.dataindex>=0&&this.hosttree.data.setitemlayout(this.dataindex,t,e)},getlayout:function(){return this.hosttree.data.getitemlayout(this.dataindex)},getmodel:function(t){if(!(this.dataindex<0)){var e,i=this.hosttree,n=i.data.getitemmodel(this.dataindex),a=this.getlevelmodel();return a||0!==this.children.length&&(0===this.children.length||this.isexpand!==!1)||(e=this.getleavesmodel()),n.getmodel(t,(a||e||i.hostmodel).getmodel(t))}},getlevelmodel:function(){return(this.hosttree.levelmodels||[])[this.depth]},getleavesmodel:function(){return this.hosttree.leavesmodel},setvisual:function(t,e){this.dataindex>=0&&this.hosttree.data.setitemvisual(this.dataindex,t,e)},getvisual:function(t,e){return this.hosttree.data.getitemvisual(this.dataindex,t,e)},getrawindex:function(){return this.hosttree.data.getrawindex(this.dataindex)},getid:function(){return this.hosttree.data.getid(this.dataindex)},isancestorof:function(t){for(var e=t.parentnode;e;){if(e===this)return!0;e=e.parentnode}return!1},isdescendantof:function(t){return t!==this&&t.isancestorof(this)}},nf.prototype={constructor:nf,type:"tree",eachnode:function(t,e,i){this.root.eachnode(t,e,i)},getnodebydataindex:function(t){var e=this.data.getrawindex(t);return this._nodes[e]},getnodebyname:function(t){return this.root.getnodebyname(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataindex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getrawindex(i)].dataindex=i},clearlayouts:function(){this.data.clearitemlayouts()}},nf.createtree=function(t,e,i,n){function a(t,e){var i=t.value;s=math.max(s,_(i)?i.length:1),r.push(t);var n=new mo(t.name,o);e?rf(n,e):o.root=n,o._nodes.push(n);var l=t.children;if(l)for(var u=0;ur&&(r=t.depth)});var s=t.expandandcollapse,l=s&&t.initialtreedepth>=0?t.initialtreedepth:r;return o.root.eachnode("preorder",function(t){var e=t.hosttree.data.getrawdataitem(t.dataindex);t.isexpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l}),o.data},getorient:function(){var t=this.get("orient");return"horizontal"===t?t="lr":"vertical"===t&&(t="tb"),t},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},formattooltip:function(t){for(var e=this.getdata().tree,i=e.root.children[0],n=e.getnodebydataindex(t),a=n.getvalue(),o=n.name;n&&n!==i;)o=n.parentnode.name+"."+o,n=n.parentnode;return hr(o+(isnan(a)||null==a?"":" : "+a))},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeshape:"curve",edgeforkposition:"50%",roam:!1,nodescaleratio:.4,center:null,zoom:1,orient:"lr",symbol:"emptycircle",symbolsize:7,expandandcollapse:!0,initialtreedepth:2,linestyle:{color:"#ccc",width:1.5,curveness:.5},itemstyle:{color:"lightsteelblue",bordercolor:"#c23531",borderwidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationeasing:"linear",animationduration:700,animationdurationupdate:1e3}});var io=oe;c(kf,dm),$f.prototype={constructor:$f,type:"view",dimensions:["x","y"],setboundingrect:function(t,e,i,n){return this._rect=new ti(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 ti(t,e,i,n)},transformto:function(t,e,i,n){var a=this.getboundingrect(),o=this._rawtransformable;o.transform=a.calculatetransform(new ti(t,e,i,n)),o.decomposetransform(),this._updatetransform()},setcenter:function(t){t&&(this._center=t,this._updatecenterandzoom())},setzoom:function(t){t=t||1;var e=this.zoomlimit;e&&(null!=e.max&&(t=math.min(e.max,t)),null!=e.min&&(t=math.max(e.min,t))),this._zoom=t,this._updatecenterandzoom()},getdefaultcenter:function(){var t=this.getboundingrect(),e=t.x+t.width/2,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._roamtransformable.getlocaltransform()},_updatecenterandzoom:function(){var t=this._rawtransformable.getlocaltransform(),e=this._roamtransformable,i=this.getdefaultcenter(),n=this.getcenter(),a=this.getzoom();n=oe([],n,t),i=oe([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[a,a],this._updatetransform()},_updatetransform:function(){var t=this._roamtransformable,e=this._rawtransformable;e.parent=t,t.updatetransform(),e.updatetransform(),ne(this.transform||(this.transform=[]),e.transform||oe()),this._rawtransform=e.getlocaltransform(),this.invtransform=this.invtransform||[],ge(this.invtransform,this.transform),this.decomposetransform()},gettransforminfo:function(){var t=this._roamtransformable.transform,e=this._rawtransformable;return{roamtransform:t?k(t):oe(),rawscale:k(e.scale),rawposition:k(e.position)}},getviewrect:function(){return this._viewrect},getviewrectafterroam:function(){var t=this.getboundingrect().clone();return t.applytransform(this.transform),t},datatopoint:function(t,e,i){var n=e?this._rawtransform:this.transform;return i=i||[],n?io(i,t,n):w(i,t)},pointtodata:function(t){var e=this.invtransform;return e?io([],t,e):[t[0],t[1]]},converttopixel:x(jf,"datatopoint"),convertfrompixel:x(jf,"pointtodata"),containpoint:function(t){return this.getviewrectafterroam().contain(t[0],t[1])}},c($f,dm);var to="\x00_ec_interaction_mutex";cu({type:"takeglobalcursor",event:"globalcursortaken",update:"update"},function(){}),c(op,qs);var ao={axispointer:1,tooltip:1,brush:1},do=xo({shape:{parentpoint:[],childpoints:[],orient:"",forkposition:""},style:{stroke:"#000",fill:null},buildpath:function(t,e){var i=e.childpoints,n=i.length,a=e.parentpoint,o=i[0],r=i[n-1];if(1===n)return t.moveto(a[0],a[1]),void t.lineto(o[0],o[1]);var s=e.orient,l="tb"===s||"bt"===s?0:1,u=1-l,h=ir(e.forkposition,1),c=[];c[l]=a[l],c[u]=a[u]+(r[u]-a[u])*h,t.moveto(a[0],a[1]),t.lineto(c[0],c[1]),t.moveto(o[0],o[1]),c[l]=o[l],t.lineto(c[0],c[1]),c[l]=r[l],t.lineto(c[0],c[1]),t.lineto(r[0],r[1]);for(var d=1;n-1>d;d++){var f=i[d];t.moveto(f[0],f[1]),c[l]=f[l],t.lineto(c[0],c[1])}}});vu({type:"tree",init:function(t,e){this._oldtree,this._maingroup=new fm,this._controller=new op(e.getzr()),this._controllerhost={target:this.group},this.group.add(this._maingroup)},render:function(t,e,i){var n=t.getdata(),a=t.layoutinfo,o=this._maingroup,r=t.get("layout");"radial"===r?o.attr("position",[a.x+a.width/2,a.y+a.height/2]):o.attr("position",[a.x,a.y]),this._updateviewcoordsys(t,a,r),this._updatecontroller(t,e,i);var s=this._data,l={expandandcollapse:t.get("expandandcollapse"),layout:r,edgeshape:t.get("edgeshape"),edgeforkposition:t.get("edgeforkposition"),orient:t.getorient(),curvature:t.get("linestyle.curveness"),symbolrotate:t.get("symbolrotate"),symboloffset:t.get("symboloffset"),hoveranimation:t.get("hoveranimation"),usenamelabel:!0,fadein:!0};n.diff(s).add(function(e){gp(n,e)&&vp(n,e,null,o,t,l)}).update(function(e,i){var a=s.getitemgraphicel(i);return gp(n,e)?void vp(n,e,a,o,t,l):void(a&&xp(s,i,a,o,t,l))}).remove(function(e){var i=s.getitemgraphicel(e);i&&xp(s,e,i,o,t,l)}).execute(),this._nodescaleratio=t.get("nodescaleratio"),this._updatenodeandlinkscale(t),l.expandandcollapse===!0&&n.eachitemgraphicel(function(e,n){e.off("click").on("click",function(){i.dispatchaction({type:"treeexpandandcollapse",seriesid:t.id,dataindex:n})})}),this._data=n},_updateviewcoordsys:function(t){var e=t.getdata(),i=[];e.each(function(t){var n=e.getitemlayout(t);!n||isnan(n.x)||isnan(n.y)||i.push([+n.x,+n.y])});var n=[],a=[];va(i,n,a);var o=this._min,r=this._max;a[0]-n[0]===0&&(n[0]=o?o[0]:n[0]-1,a[0]=r?r[0]:a[0]+1),a[1]-n[1]===0&&(n[1]=o?o[1]:n[1]-1,a[1]=r?r[1]:a[1]+1);var s=t.coordinatesystem=new $f;s.zoomlimit=t.get("scalelimit"),s.setboundingrect(n[0],n[1],a[0]-n[0],a[1]-n[1]),s.setcenter(t.get("center")),s.setzoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewcoordsys=s,this._min=n,this._max=a},_updatecontroller:function(t,e,i){var n=this._controller,a=this._controllerhost,o=this.group;n.setpointerchecker(function(e,n,a){var r=o.getboundingrect();return r.applytransform(o.transform),r.contain(n,a)&&!pp(e,i,t)}),n.enable(t.get("roam")),a.zoomlimit=t.get("scalelimit"),a.zoom=t.coordinatesystem.getzoom(),n.off("pan").off("zoom").on("pan",function(e){qf(a,e.dx,e.dy),i.dispatchaction({seriesid:t.id,type:"treeroam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){tp(a,e.scale,e.originx,e.originy),i.dispatchaction({seriesid:t.id,type:"treeroam",zoom:e.scale,originx:e.originx,originy:e.originy}),this._updatenodeandlinkscale(t)},this)},_updatenodeandlinkscale:function(t){var e=t.getdata(),i=this._getnodeglobalscale(t),n=[i,i];e.eachitemgraphicel(function(t){t.attr("scale",n)})},_getnodeglobalscale:function(t){var e=t.coordinatesystem;if("view"!==e.type)return 1;var i=this._nodescaleratio,n=e.scale,a=n&&n[0]||1,o=e.getzoom(),r=(o-1)*i+1;return r/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerhost={}},remove:function(){this._maingroup.removeall(),this._data=null}}),cu({type:"treeexpandandcollapse",event:"treeexpandandcollapse",update:"update"},function(t,e){e.eachcomponent({maintype:"series",subtype:"tree",query:t},function(e){var i=t.dataindex,n=e.getdata().tree,a=n.getnodebydataindex(i);a.isexpand=!a.isexpand})}),cu({type:"treeroam",event:"treeroam",update:"none"},function(t,e){e.eachcomponent({maintype:"series",subtype:"tree",query:t},function(e){var i=e.coordinatesystem,n=wp(i,t);e.setcenter&&e.setcenter(n.center),e.setzoom&&e.setzoom(n.zoom)})});var co=function(t,e){t.eachseriesbytype("tree",function(t){mp(t,e)})};ou(pp("tree","circle")),pu(co),$d.extend({type:"series.treemap",layoutmode:"box",dependencies:["grid","polar"],preventusinghoverlayer:!0,_viewroot:null,defaultoption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipwindow:"origin",squareratio:.5*(1+math.sqrt(5)),leafdepth:null,drilldownicon:"▶",zoomtonoderatio:.1024,roam:!0,nodeclick:"zoomtonode",animation:!0,animationdurationupdate:900,animationeasing:"quinticinout",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyitemwidth:25,itemstyle:{color:"rgba(0,0,0,0.7)",bordercolor:"rgba(255,255,255,0.7)",borderwidth:1,shadowcolor:"rgba(150,150,150,1)",shadowblur:3,shadowoffsetx:0,shadowoffsety:0,textstyle:{color:"#fff"}},emphasis:{textstyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperlabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalalign:"middle"},itemstyle:{color:null,coloralpha:null,colorsaturation:null,borderwidth:0,gapwidth:0,bordercolor:"#fff",bordercolorsaturation:null},emphasis:{upperlabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalalign:"middle"}},visualdimension:0,visualmin:null,visualmax:null,color:[],coloralpha:null,colorsaturation:null,colormappingby:"index",visiblemin:10,childrenvisiblemin:null,levels:[]},getinitialdata:function(t,e){var i={name:t.name,children:t.data};cp(i);var n=t.levels||[];n=t.levels=lp(n,e);var a={};return a.levels=n,nf.createtree(i,this,a).data},optionupdated:function(){this.resetviewroot()},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=fr(_(i)?i[0]:i),a=e.getname(t);return hr(a+": "+n)},getdataparams:function(t){var e=$d.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(t);return e.treepathinfo=dp(i,this),e},setlayoutinfo:function(t){this.layoutinfo=this.layoutinfo||{},r(this.layoutinfo,t)},mapidtoindex:function(t){var e=this._idindexmap;e||(e=this._idindexmap=b(),this._idindexmapcount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idindexmapcount++),i},getviewroot:function(){return this._viewroot},resetviewroot:function(t){t?this._viewroot=t:t=this._viewroot;var e=this.getrawdata().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewroot=e)}});var lo=8,ko=8,po=5;kp.prototype={constructor:kp,render:function(t,e,i,n){var a=t.getmodel("breadcrumb"),o=this.group;if(o.removeall(),a.get("show")&&i){var r=a.getmodel("itemstyle"),s=r.getmodel("textstyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getwidth(),height:e.getheight()},emptyitemwidth:a.get("emptyitemwidth"),totalwidth:0,renderlist:[]};this._prepare(i,l,s),this._rendercontent(t,l,r,s,n),es(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentnode){var a=n.getmodel().get("name"),o=i.gettextrect(a),r=math.max(o.width+2*lo,e.emptyitemwidth);e.totalwidth+=r+ko,e.renderlist.push({node:n,text:a,width:r})}},_rendercontent:function(t,e,i,n,a){for(var o=0,r=e.emptyitemwidth,l=t.get("breadcrumb.height"),u=qr(e.pos,e.box),h=e.totalwidth,c=e.renderlist,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-r,g=r,m=null);var v=new ha({shape:{points:pp(o,0,g,l,d===c.length-1,0===d)},style:s(i.getitemstyle(),{linejoin:"bevel",text:m,textfill:n.gettextcolor(),textfont:n.getfont()}),z:10,onclick:x(a,p)});this.group.add(v),op(v,t,p),o+=g+ko}},remove:function(){this.group.removeall()}};var oo=y,eo=fm,no=pa,ro=f,zo=3,bo=["label"],vo=["emphasis","label"],go=["upperlabel"],fo=["emphasis","upperlabel"],wo=10,ho=1,zo=2,uo=qi([["fill","color"],["stroke","strokecolor"],["linewidth","strokewidth"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),xo=function(t){var e=uo(t);return e.stroke=e.fill=e.linewidth=null,e};vu({type:"treemap",init:function(){this._containergroup,this._storage=np(),this._oldtree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var a=e.findcomponents({maintype:"series",subtype:"treemap",query:n});if(!(u(a,t)<0)){this.seriesmodel=t,this.api=i,this.ecmodel=e;var o=["treemapzoomtonode","treemaproottonode"],r=ip(n,o,t),s=n&&n.type,l=t.layoutinfo,h=!this._oldtree,c=this._storage,d="treemaproottonode"===s&&r&&c?{rootnodegroup:c.nodegroup[r.node.getrawindex()],direction:n.direction}:null,f=this._givecontainergroup(l),p=this._dorender(f,t,d);h||s&&"treemapzoomtonode"!==s&&"treemaproottonode"!==s?p.renderfinally():this._doanimation(f,p,t,d),this._resetcontroller(i),this._renderbreadcrumb(t,i,r)}},_givecontainergroup:function(t){var e=this._containergroup;return e||(e=this._containergroup=new eo,this._initevents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_dorender:function(t,e,i){function n(t,e,i,a,o){function r(t){return t.getid()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,h=d(l,u,i,o);h&&n(l&&l.viewchildren||[],u&&u.viewchildren||[],h,a,o+1)}a?(e=t,ro(t,function(t,e){!t.isremoved()&&s(e,e)})):new zu(e,t,r,r).add(s).update(s).remove(x(s,null)).execute()}function a(t){var e=np();return t&&ro(t,function(t,i){var n=e[i];ro(t,function(t){t&&(n.push(t),t.__tmwilldelete=1)})}),e}function o(){ro(f,function(t){ro(t,function(t){t.parent&&t.parent.remove(t)})}),ro(c,function(t){t.invisible=!0,t.dirty()})}var r=e.getdata().tree,s=this._oldtree,l=np(),u=np(),h=this._storage,c=[],d=x(rp,e,u,h,i,l,c);n(r.root?[r.root]:[],s&&s.root?[s.root]:[],t,r===s||!s,0);var f=a(h);return this._oldtree=r,this._storage=u,{lastsforanimation:l,willdeleteels:f,renderfinally:o}},_doanimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationdurationupdate"),o=i.get("animationeasing"),s=ep();ro(e.willdeleteels,function(t,e){ro(t,function(t){if(!t.invisible){var i,r=t.parent;if(n&&"drilldown"===n.direction)i=r===n.rootnodegroup?{shape:{x:0,y:0,width:r.__tmnodewidth,height:r.__tmnodeheight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,u=0;r.__tmwilldelete||(l=r.__tmnodewidth/2,u=r.__tmnodeheight/2),i="nodegroup"===e?{position:[l,u],style:{opacity:0}}:{shape:{x:l,y:u,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,a,o)}})}),ro(this._storage,function(t,i){ro(t,function(t,n){var l=e.lastsforanimation[i][n],u={};l&&("nodegroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=r({},t.shape),t.setshape(l.old)),l.fadein?(t.setstyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,a,o))})},this),this._state="animating",s.done(oo(function(){this._state="ready",e.renderfinally()},this)).start()}},_resetcontroller:function(t){var e=this._controller;e||(e=this._controller=new op(t.getzr()),e.enable(this.seriesmodel.get("roam")),e.on("pan",oo(this._onpan,this)),e.on("zoom",oo(this._onzoom,this)));var i=new ti(0,0,t.getwidth(),t.getheight());e.setpointerchecker(function(t,e,n){return i.contain(e,n)})},_clearcontroller:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onpan:function(t){if("animating"!==this._state&&(math.abs(t.dx)>zo||math.abs(t.dy)>zo)){var e=this.seriesmodel.getdata().tree.root;if(!e)return;var i=e.getlayout();if(!i)return;this.api.dispatchaction({type:"treemapmove",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onzoom:function(t){var e=t.originx,i=t.originy;if("animating"!==this._state){var n=this.seriesmodel.getdata().tree.root;if(!n)return;var a=n.getlayout();if(!a)return;var o=new ti(a.x,a.y,a.width,a.height),r=this.seriesmodel.layoutinfo;e-=r.x,i-=r.y;var s=oe();ze(s,s,[-e,-i]),ve(s,s,[t.scale,t.scale]),ze(s,s,[e,i]),o.applytransform(s),this.api.dispatchaction({type:"treemaprender",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initevents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesmodel.get("nodeclick",!0);if(e){var i=this.findtarget(t.offsetx,t.offsety);if(i){var n=i.node;if(n.getlayout().isleafroot)this._roottonode(i);else if("zoomtonode"===e)this._zoomtonode(i);else if("link"===e){var a=n.hosttree.data.getitemmodel(n.dataindex),o=a.get("link",!0),r=a.get("target",!0)||"blank";o&&window.open(o,r)}}}}},this)},_renderbreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(ap(t.getviewroot(),e)?this._roottonode({node:e}):this._zoomtonode({node:e}))}i||(i=null!=t.get("leafdepth",!0)?{node:t.getviewroot()}:this.findtarget(e.getwidth()/2,e.getheight()/2),i||(i={node:t.getdata().tree.root})),(this._breadcrumb||(this._breadcrumb=new kp(this.group))).render(t,e,i.node,oo(n,this))},remove:function(){this._clearcontroller(),this._containergroup&&this._containergroup.removeall(),this._storage=np(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearcontroller()},_zoomtonode:function(t){this.api.dispatchaction({type:"treemapzoomtonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},_roottonode:function(t){this.api.dispatchaction({type:"treemaproottonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},findtarget:function(t,e){var i,n=this.seriesmodel.getviewroot();return n.eachnode({attr:"viewchildren",order:"preorder"},function(n){var a=this._storage.background[n.getrawindex()];if(a){var o=a.transformcoordtolocal(t,e),r=a.shape;if(!(r.x<=o[0]&&o[0]<=r.x+r.width&&r.y<=o[1]&&o[1]<=r.y+r.height))return!1;i={node:n,offsetx:o[0],offsety:o[1]}}},this),i}});for(var yo=function(){},jo=["treemapzoomtonode","treemaprender","treemapmove"],qo=0;qon&&(o=n,a=i)}for(var a,o=1/0,r=0,s=e.length;s>r;r++){var l=e[r].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return r;i&&n(l,r)}}for(var r=0,s=e.length;s>r;r++){var u=e[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(qp(c[1],t,h[1]))return r}else if(1/0===h[1]){if(qp(c[0],h[0],t))return r}else if(qp(c[0],h[0],t)&&qp(c[1],t,h[1]))return r;i&&n(h[0],r),i&&n(h[1],r)}}return i?1/0===t?e.length-1:t===-1/0?0:a:void 0};var ie=_,ne="itemstyle",ae={seriestype:"treemap",reset:function(t){var e=t.getdata().tree,i=e.root,n=t.getmodel(ne);if(!i.isremoved()){var a=p(e.levelmodels,function(t){return t?t.get(ne):null});kp(i,{},a,n,t.getviewroot().getancestors(),t)}}},oe=math.max,re=math.min,se=d,le=f,ue=["itemstyle","borderwidth"],he=["itemstyle","gapwidth"],ce=["upperlabel","show"],de=["upperlabel","height"],fe={seriestype:"treemap",reset:function(t,e,i,n){var a=i.getwidth(),o=i.getheight(),s=t.option,l=ts(t.getboxlayoutparams(),{width:i.getwidth(),height:i.getheight()}),u=s.size||[],h=ir(se(l.width,u[0]),a),c=ir(se(l.height,u[1]),o),d=n&&n.type,f=["treemapzoomtonode","treemaproottonode"],p=ip(n,f,t),g="treemaprender"===d||"treemapmove"===d?n.rootrect:null,m=t.getviewroot(),v=tp(m);if("treemapmove"!==d){var y="treemapzoomtonode"===d?cg(t,p,m,h,c):g?[g.width,g.height]:[h,c],x=s.sort;x&&"asc"!==x&&"desc"!==x&&(x="desc");var _={squareratio:s.squareratio,sort:x,leafdepth:s.leafdepth};m.hosttree.clearlayouts();var w={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};m.setlayout(w),ag(m,_,!1,0);var w=m.getlayout();le(v,function(t,e){var i=(v[e+1]||m).getvalue();t.setlayout(r({dataextent:[i,i],borderwidth:0,upperheight:0},w))})}var b=t.getdata().tree.root;b.setlayout(dg(l,g,p),!0),t.setlayoutinfo(l),fg(b,new ti(-l.x,-l.y,a,o),v,m,0)}};ou(ae),pu(fe),$d.extend({type:"series.sunburst",_viewroot:null,getinitialdata:function(t){var e={name:t.name,children:t.data};gg(e);var i=t.levels||[],n={};return n.levels=i,nf.createtree(e,this,n).data},optionupdated:function(){this.resetviewroot()},getdataparams:function(t){var e=$d.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(t);return e.treepathinfo=dp(i,this),e},defaultoption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startangle:90,minangle:0,percentprecision:2,stillshowzerosum:!0,highlightpolicy:"descendant",nodeclick:"roottonode",renderlabelforzerodata:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemstyle:{borderwidth:1,bordercolor:"white",bordertype:"solid",shadowblur:0,shadowcolor:"rgba(0, 0, 0, 0.2)",shadowoffsetx:0,shadowoffsety:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationtype:"expansion",animationduration:1e3,animationdurationupdate:500,animationeasing:"cubicout",data:[],levels:[],sort:"desc"},getviewroot:function(){return this._viewroot},resetviewroot:function(t){t?this._viewroot=t:t=this._viewroot;var e=this.getrawdata().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewroot=e)}});var pe={none:"none",descendant:"descendant",ancestor:"ancestor",self:"self"},ge=2,me=4,ve=mg.prototype;ve.updatedata=function(t,e,i,n,o){this.node=e,e.piece=this,n=n||this._seriesmodel,o=o||this._ecmodel;var l=this.childat(0);l.dataindex=e.dataindex;var u=e.getmodel(),h=e.getlayout(),c=r({},h);c.label=null;var d=vg(e,n,o);_g(e,n,d);var f,p=u.getmodel("itemstyle").getitemstyle();if("normal"===i)f=p;else{var g=u.getmodel(i+".itemstyle").getitemstyle();f=a(g,p)}f=s({linejoin:"bevel",fill:f.fill||d},f),t?(l.setshape(c),l.shape.r=h.r0,ar(l,{shape:{r:h.r}},n,e.dataindex),l.usestyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(ar(l,{shape:c},n),l.usestyle(f)):ar(l,{shape:c,style:f},n),this._updatelabel(n,d,i);var m=u.getshallow("cursor");if(m&&l.attr("cursor",m),t){var v=n.getshallow("highlightpolicy");this._initevents(l,e,n,v)}this._seriesmodel=n||this._seriesmodel,this._ecmodel=o||this._ecmodel},ve.onemphasis=function(t){var e=this;this.node.hosttree.root.eachnode(function(i){i.piece&&(e.node===i?i.piece.updatedata(!1,i,"emphasis"):xg(i,e.node,t)?i.piece.childat(0).trigger("highlight"):t!==pe.none&&i.piece.childat(0).trigger("downplay"))})},ve.onnormal=function(){this.node.hosttree.root.eachnode(function(t){t.piece&&t.piece.updatedata(!1,t,"normal")})},ve.onhighlight=function(){this.updatedata(!1,this.node,"highlight")},ve.ondownplay=function(){this.updatedata(!1,this.node,"downplay")},ve._updatelabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?o.get(t):e}var a=this.node.getmodel(),o=a.getmodel("label"),r="normal"===i||"emphasis"===i?o:a.getmodel(i+".label"),s=a.getmodel("emphasis.label"),l=d(t.getformattedlabel(this.node.dataindex,i,null,null,"label"),this.node.name);n("show")===!1&&(l="");var u=this.node.getlayout(),h=r.get("minangle");null==h&&(h=o.get("minangle")),h=h/180*math.pi;var c=u.endangle-u.startangle;null!=h&&math.abs(c)math.pi/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>math.pi/2&&(x="right")):"right"===x&&(f=u.r-y,p>math.pi/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textalign:x,textverticalalign:n("verticalalign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),s=0;"radial"===b?(s=-p,s<-math.pi/2&&(s+=math.pi)):"tangential"===b?(s=math.pi/2-p,s>math.pi/2?s-=math.pi:s<-math.pi/2&&(s+=math.pi)):"number"==typeof b&&(s=b*math.pi/180),d.attr("rotation",s)},ve._initevents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,o=function(){a.onemphasis(n)},r=function(){a.onnormal()},s=function(){a.ondownplay()},l=function(){a.onhighlight()};i.isanimationenabled()&&t.on("mouseover",o).on("mouseout",r).on("emphasis",o).on("normal",r).on("downplay",s).on("highlight",l)},h(mg,fm);var ye="sunburstroottonode",xe=(ml.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function a(t,e){function i(t){return t.getid()}function n(i,n){var a=null==i?null:t[i],r=null==n?null:e[n];o(a,r)}(0!==t.length||0!==e.length)&&new zu(e,t,i,i).add(n).update(n).remove(x(n,null)).execute()}function o(i,n){if(f||!i||i.getvalue()||(i=null),i!==h&&n!==h)if(n&&n.piece)i?(n.piece.updatedata(!1,i,"normal",t,e),u.setitemgraphicel(i.dataindex,n.piece)):r(n);else if(i){var a=new mg(i,t,e);d.add(a),u.setitemgraphicel(i.dataindex,a)}}function r(t){t&&t.piece&&(d.remove(t.piece),t.piece=null)}function s(i,n){if(n.depth>0){l.virtualpiece?l.virtualpiece.updatedata(!1,i,"normal",t,e):(l.virtualpiece=new mg(i,t,e),d.add(l.virtualpiece)),n.piece._onclickevent&&n.piece.off("click",n.piece._onclickevent);var a=function(){l._roottonode(n.parentnode)};n.piece._onclickevent=a,l.virtualpiece.on("click",a)}else l.virtualpiece&&(d.remove(l.virtualpiece),l.virtualpiece=null)}var l=this;this.seriesmodel=t,this.api=i,this.ecmodel=e;var u=t.getdata(),h=u.tree.root,c=t.getviewroot(),d=this.group,f=t.get("renderlabelforzerodata"),p=[];c.eachnode(function(t){p.push(t)});var g=this._oldchildren||[];if(a(p,g),s(h,c),n&&n.highlight&&n.highlight.piece){var m=t.getshallow("highlightpolicy");n.highlight.piece.onemphasis(m)}else if(n&&n.unhighlight){var v=this.virtualpiece;!v&&h.children.length&&(v=h.children[0].piece),v&&v.onnormal()}this._initevents(),this._oldchildren=p},dispose:function(){},_initevents:function(){var t=this,e=function(e){var i=!1,n=t.seriesmodel.getviewroot();n.eachnode(function(n){if(!i&&n.piece&&n.piece.childat(0)===e.target){var a=n.getmodel().get("nodeclick");if("roottonode"===a)t._roottonode(n);else if("link"===a){var o=n.getmodel(),r=o.get("link");if(r){var s=o.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickevent&&this.group.off("click",this.group._onclickevent),this.group.on("click",e),this.group._onclickevent=e},_roottonode:function(t){t!==this.seriesmodel.getviewroot()&&this.api.dispatchaction({type:ye,from:this.uid,seriesid:this.seriesmodel.id,targetnode:t}) },containpoint:function(t,e){var i=e.getdata(),n=i.getitemlayout(0);if(n){var a=t[0]-n.cx,o=t[1]-n.cy,r=math.sqrt(a*a+o*o);return r<=n.r&&r>=n.r0}}}),"sunburstroottonode");cu({type:xe,update:"updateview"},function(t,e){function i(e){var i=ip(t,[xe],e);if(i){var n=e.getviewroot();n&&(t.direction=ap(n,i.node)?"rollup":"drilldown"),e.resetviewroot(i.node)}}e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},i)});var _e="sunbursthighlight";cu({type:_e,update:"updateview"},function(t,e){function i(e){var i=ip(t,[_e],e);i&&(t.highlight=i.node)}e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},i)});var we="sunburstunhighlight";cu({type:we,update:"updateview"},function(t,e){function i(){t.unhighlight=!0}e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},i)});var be=math.pi/180,se=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 a=i.getwidth(),o=i.getheight(),r=math.min(a,o),s=ir(e[0],a),l=ir(e[1],o),u=ir(n[0],r/2),h=ir(n[1],r/2),c=-t.get("startangle")*be,d=t.get("minangle")*be,p=t.getdata().tree.root,g=t.getviewroot(),m=g.depth,v=t.get("sort");null!=v&&wg(g,v);var y=0;f(g.children,function(t){!isnan(t.getvalue())&&y++});var x=g.getvalue(),w=math.pi/(x||y)*2,b=g.depth>0,s=g.height-(b?-1:1),m=(h-u)/(s||1),i=t.get("clockwise"),t=t.get("stillshowzerosum"),a=i?1:-1,d=function(t,e){if(t){var i=e;if(t!==p){var n=t.getvalue(),a=0===x&&t?w:n*w;d>a&&(a=d),i=e+a*a;var o=t.depth-m-(b?-1:1),h=u+m*o,c=u+m*(o+1),g=t.getmodel();null!=g.get("r0")&&(h=ir(g.get("r0"),r/2)),null!=g.get("r")&&(c=ir(g.get("r"),r/2)),t.setlayout({angle:a,startangle:e,endangle:i,clockwise:i,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;f(t.children,function(t){v+=d(t,e+v)})}return i-e}};if(b){var c=u,l=u+m,k=2*math.pi;p.setlayout({angle:k,startangle:c,endangle:c+k,clockwise:i,cx:s,cy:l,r0:c,r:l})}d(g,c)})};ou(x(wp,"sunburst")),pu(x(se,"sunburst")),au(x(jp,"sunburst"));for(var me=[126,25],ie=[[[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]]],te=0;teo;o++){var s=t.getname(o);i.set(s,!0),n.push({name:s,value:t.get(e,o),selected:nl(t,o,"selected")})}var l=ge.load(this.getmaptype(),this.option.namemap);return f(l.regions,function(t){var e=t.name;i.get(e)||(n.push({name:e}),a.push(e))}),this.updateselectedmap(n),t.appendvalues([],a),t},gethostgeomodel:function(){var t=this.option.geoindex;return null!=t?this.dependentmodels.geo[t]:null},getmaptype:function(){return(this.gethostgeomodel()||this).option.map},getrawvalue:function(t){var e=this.getdata();return e.get(e.mapdimension("value"),t)},getregionmodel:function(t){var e=this.getdata();return e.getitemmodel(e.indexofname(t))},formattooltip:function(t){for(var e=this.getdata(),i=fr(this.getrawvalue(t)),n=e.getname(t),a=this.seriesgroup,o=[],r=0;r"+hr(n+" : "+i)},gettooltipposition:function(t){if(null!=t){var e=this.getdata().getname(t),i=this.coordinatesystem,n=i.getregion(e);return n&&i.datatopoint(n.center)}},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},defaultoption:{zlevel:0,z:2,coordinatesystem:"geo",map:"",left:"center",top:"center",aspectscale:.75,showlegendsymbol:!0,datarangehoverlink:!0,boundingcoords:null,center:null,zoom:1,scalelimit:null,label:{show:!1,color:"#000"},itemstyle:{borderwidth:.5,bordercolor:"#444",areacolor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemstyle:{areacolor:"rgba(255,215,0,0.8)"}}}});c(fe,bp),lg.prototype={constructor:lg,draw:function(t,e,i,n){var a="geo"===t.maintype,o=t.getdata&&t.getdata();a&&e.eachcomponent({maintype:"series",subtype:"map"},function(e){o||e.gethostgeomodel()!==t||(o=e.getdata())});var r=t.coordinatesystem;this._updatebackground(r);var s=this._regionsgroup,l=this.group,u=r.gettransforminfo();l.transform=u.roamtransform,l.decomposetransform(),l.dirty();var h=u.rawscale,c=u.rawposition;s.removeall();var d=["itemstyle"],p=["emphasis","itemstyle"],g=["label"],m=["emphasis","label"],v=b();f(r.regions,function(e){var i=v.get(e.name)||v.set(e.name,new fm),n=new _a({segmentignorethreshold:1,shape:{paths:[]}});i.add(n);var r,u=t.getregionmodel(e.name)||t,y=u.getmodel(d),x=u.getmodel(p),_=ag(y),w=ag(x),b=u.getmodel(g),s=u.getmodel(m);if(o){r=o.indexofname(e.name);var m=o.getitemvisual(r,"color",!0);m&&(_.fill=m)}var i=function(t){return[t[0]*h[0]+c[0],t[1]*h[1]+c[1]]};f(e.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i=0)&&(l=t);var p=new ia({position:i(e.center.slice()),scale:[1/l.scale[0],1/l.scale[1]],z2:10,silent:!0});xo(p.style,p.hoverstyle={},b,s,{labelfetcher:l,labeldataindex:k,defaulttext:e.name,useinsidestyle:!1},{textalign:"center",textverticalalign:"middle"}),i.add(p)}if(o)o.setitemgraphicel(r,i);else{var u=t.getregionmodel(e.name);n.eventdata={componenttype:"geo",componentindex:t.componentindex,geoindex:t.componentindex,name:e.name,region:u&&u.option||{}}}var o=i.__regions||(i.__regions=[]);o.push(e),i.highdownsilentontouch=!!t.get("selectedmode"),wo(i,w),s.add(i)}),this._updatecontroller(t,e,i),dg(this,t,s,i,n),cg(t,s)},remove:function(){this._regionsgroup.removeall(),this._backgroundgroup.removeall(),this._controller.dispose(),this._mapname&&ge.removegraphic(this._mapname,this.uid),this._mapname=null,this._controllerhost={}},_updatebackground:function(t){var e=t.map;this._mapname!==e&&f(ge.makegraphic(e,this.uid),function(t){this._backgroundgroup.add(t)},this),this._mapname=e},_updatecontroller:function(t,e,i){function n(){var e={type:"georoam",componenttype:l};return e[l+"id"]=t.id,e}var a=t.coordinatesystem,o=this._controller,s=this._controllerhost;s.zoomlimit=t.get("scalelimit"),s.zoom=a.getzoom(),o.enable(t.get("roam")||!1);var l=t.maintype;o.off("pan").on("pan",function(t){this._mousedownflag=!1,qf(s,t.dx,t.dy),i.dispatchaction(r(n(),{dx:t.dx,dy:t.dy}))},this),o.off("zoom").on("zoom",function(t){if(this._mousedownflag=!1,tp(s,t.scale,t.originx,t.originy),i.dispatchaction(r(n(),{zoom:t.scale,originx:t.originx,originy:t.originy})),this._updategroup){var e=this.group.scale;this._regionsgroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),o.setpointerchecker(function(e,n,o){return a.getviewrectafterroam().contain(n,o)&&!pp(e,i,t)})}};var we="__seriesmaphighdown",he="__seriesmapcallkey";vu({type:"map",render:function(t,e,i,n){if(!n||"maptoggleselect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeall(),!t.gethostgeomodel()){if(n&&"georoam"===n.type&&"series"===n.componenttype&&n.seriesid===t.id){var o=this._mapdraw;o&&a.add(o.group)}else if(t.needsdrawmap){var o=this._mapdraw||new lg(i,!0);a.add(o.group),o.draw(t,e,i,this,n),this._mapdraw=o}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(e.mapdimension("value"),function(n,a){if(!isnan(n)){var o=e.getitemlayout(a);if(o&&o.point){var s=o.point,l=o.offset,u=new na({style:{fill:t.getdata().getvisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:da+1)});if(!l){var h=t.mainseries.getdata(),c=e.getname(a),d=h.indexofname(c),f=e.getitemmodel(a),p=f.getmodel("label"),g=f.getmodel("emphasis.label"),m=h.getitemgraphicel(d),v=c(t.getformattedlabel(d,"normal"),c),y=c(t.getformattedlabel(d,"emphasis"),v),_=m[we],w=math.random();if(!_){_=m[we]={};var b=x(kg,!0),s=x(kg,!1);m.on("mouseover",b).on("mouseout",s).on("emphasis",b).on("normal",s)}m[he]=w,r(_,{recordversion:w,circle:u,labelmodel:p,hoverlabelmodel:g,emphasistext:y,normaltext:v}),pg(_,!1)}i.add(u)}}})}}),cu({type:"georoam",event:"georoam",update:"updatetransform"},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 a=wp(n,t,e.get("scalelimit"));e.setcenter&&e.setcenter(a.center),e.setzoom&&e.setzoom(a.zoom),"series"===i&&f(e.seriesgroup,function(t){t.setcenter(a.center),t.setzoom(a.zoom)})}})}),og.prototype={constructor:og,type:"geo",dimensions:["lng","lat"],containcoord:function(t){for(var e=this.regions,i=0;ia;a++)e[a]=e[a]||[],e[a][0]=this._flatcoords[i+2*a],e[a][1]=this._flatcoords[i+2*a+1];return n}for(var o=this._getcoordsfromitemmodel(t),a=0;al;){s++;var u=t[l++];n[r++]=o+e,n[r++]=u;for(var h=0;u>h;h++){var c=t[l++],d=t[l++];a[o++]=c,a[o++]=d}}return{flatcoordsoffset:new uint32array(n.buffer,0,r),flatcoords:a,count:s}}return{flatcoordsoffset:null,flatcoords:null,count:t.length}},getinitialdata:function(t){var e=new el(["value"],this);return e.hasitemoption=!1,e.initdata(t.data,[],function(t,i,n,a){if(t instanceof array)return 0/0;e.hasitemoption=!0;var o=t.value;return null!=o?o instanceof array?o[a]:o:void 0}),e},formattooltip:function(t){var e=this.getdata(),i=e.getitemmodel(t),n=i.get("name");if(n)return n;var a=i.get("fromname"),o=i.get("toname"),r=[];return null!=a&&r.push(a),null!=o&&r.push(o),hr(r.join(" > "))},preventincremental:function(){return!!this.get("effect.show")},getprogressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getprogressivethreshold:function(){var t=this.option.progressivethreshold;return null==t?this.option.large?2e4:this.get("progressivethreshold"):t},defaultoption:{coordinatesystem:"geo",zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,xaxisindex:0,yaxisindex:0,symbol:["none","none"],symbolsize:[10,10],geoindex:0,effect:{show:!1,period:4,constantspeed:0,symbol:"circle",symbolsize:3,loop:!0,traillength:.2},large:!1,largethreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},linestyle:{opacity:.5}}}),je=ma.prototype,qe=ya.prototype,tn=xo({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildpath:function(t,e){this[vg(e)?"_buildpathline":"_buildpathcurve"](t,e)},_buildpathline:je.buildpath,_buildpathcurve:qe.buildpath,pointat:function(t){return this[vg(this.shape)?"_pointatline":"_pointatcurve"](t)},_pointatline:je.pointat,_pointatcurve:qe.pointat,tangentat:function(t){var e=this.shape,i=vg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentatcurve(t);return te(i,i)},_tangentatcurve:qe.tangentat}),en=["fromsymbol","tosymbol"],in=ug.prototype;in.beforeupdate=zg,in._createline=function(t,e,i){var n=t.hostmodel,a=t.getitemlayout(e),o=wg(a);o.shape.percent=0,or(o,{shape:{percent:1}},n,e),this.add(o);var r=new ia({name:"label",linelabeloriginalopacity:1});this.add(r),f(en,function(i){var n=fg(i,t,e);this.add(n),this[gg(i)]=t.getitemvisual(e,i)},this),this._updatecommonstl(t,e,i)},in.updatedata=function(t,e,i){var n=t.hostmodel,a=this.childofname("line"),o=t.getitemlayout(e),r={shape:{}};hg(r.shape,o),ar(a,r,n,e),f(en,function(i){var n=t.getitemvisual(e,i),a=gg(i);if(this[a]!==n){this.remove(this.childofname(i));var o=fg(i,t,e);this.add(o)}this[a]=n},this),this._updatecommonstl(t,e,i)},in._updatecommonstl=function(t,e,i){var n=t.hostmodel,a=this.childofname("line"),o=i&&i.linestyle,r=i&&i.hoverlinestyle,l=i&&i.labelmodel,u=i&&i.hoverlabelmodel;if(!i||t.hasitemoption){var h=t.getitemmodel(e);o=h.getmodel("linestyle").getlinestyle(),r=h.getmodel("emphasis.linestyle").getlinestyle(),l=h.getmodel("label"),u=h.getmodel("emphasis.label")}var c=t.getitemvisual(e,"color"),d=l(t.getitemvisual(e,"opacity"),o.opacity,1);a.usestyle(s({strokenoscale:!0,fill:"none",stroke:c,opacity:d},o)),a.hoverstyle=r,f(en,function(t){var e=this.childofname(t);e&&(e.setcolor(c),e.setstyle({opacity:d}))},this);var p,g,m=l.getshallow("show"),v=u.getshallow("show"),y=this.childofname("label");if((m||v)&&(p=c||"#000",g=n.getformattedlabel(e,"normal",t.datatype),null==g)){var x=n.getrawvalue(e);g=null==x?t.getname(e):isfinite(x)?tr(x):x}var w=m?g:null,b=v?c(n.getformattedlabel(e,"emphasis",t.datatype),g):null,s=y.style;if(null!=w||null!=b){jo(y.style,l,{text:w},{autocolor:p}),y.__textalign=s.textalign,y.__verticalalign=s.textverticalalign,y.__position=l.get("position")||"middle";var m=l.get("distance");_(m)||(m=[m,m]),y.__labeldistance=m}y.hoverstyle=null!=b?{text:b,textfill:u.gettextcolor(!0),fontstyle:u.getshallow("fontstyle"),fontweight:u.getshallow("fontweight"),fontsize:u.getshallow("fontsize"),fontfamily:u.getshallow("fontfamily")}:{text:null},y.ignore=!m&&!v,wo(this)},in.highlight=function(){this.trigger("emphasis")},in.downplay=function(){this.trigger("normal")},in.updatelayout=function(t,e){this.setlinepoints(t.getitemlayout(e))},in.setlinepoints=function(t){var e=this.childofname("line");hg(e.shape,t),e.dirty()},h(ug,fm);var nn=xg.prototype;nn.ispersistent=function(){return!0},nn.updatedata=function(t){var e=this,i=e.group,n=e._linedata;e._linedata=t,n||i.removeall();var a=qg(t);t.diff(n).add(function(i){yg(e,t,i,a)}).update(function(i,o){jg(e,n,t,o,i,a)}).remove(function(t){i.remove(n.getitemgraphicel(t))}).execute()},nn.updatelayout=function(){var t=this._linedata;t&&t.eachitemgraphicel(function(e,i){e.updatelayout(t,i)},this)},nn.incrementalprepareupdate=function(t){this._seriesscope=qg(t),this._linedata=null,this.group.removeall()},nn.incrementalupdate=function(t,e){function i(t){t.isgroup||(t.incremental=t.usehoverlayer=!0)}for(var n=t.start;n0&&(r=this.getlinelength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopanimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){a.updatesymbolposition(n)});s||d.done(function(){a.remove(n)}),d.start()}this._period=r,this._loop=s}},an.getlinelength=function(t){return us(t.__p1,t.__cp1)+us(t.__cp1,t.__p2)},an.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]},an.updatedata=function(t,e,i){this.childat(0).updatedata(t,e,i),this._updateeffectsymbol(t,e)},an.updatesymbolposition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,o=t.position,r=[o[0],o[1]],s=oa,l=ea;o[0]=s(e[0],n[0],i[0],a),o[1]=s(e[1],n[1],i[1],a);var u=l(e[0],n[0],i[0],a),h=l(e[1],n[1],i[1],a);if(t.rotation=-math.atan2(h,u)-math.pi/2,"line"===this._symboltype||"rect"===this._symboltype||"roundrect"===this._symboltype)if(void 0!==t.__lastt&&t.__lastt=0&&!(n[o]<=e);o--);o=math.min(o,a-2)}else{for(var o=r;a>o&&!(n[o]>e);o++);o=math.min(o-1,a-2)}ae(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o]));var l=i[o+1][0]-i[o][0],u=i[o+1][1]-i[o][1];t.rotation=-math.atan2(u,l)-math.pi/2,this._lastframe=o,this._lastframepercent=e,t.ignore=!1}},h(tm,jg);var sn=xo({shape:{polyline:!1,curveness:0,segs:[]},buildpath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a0){t.moveto(i[a++],i[a++]);for(var r=1;o>r;r++)t.lineto(i[a++],i[a++])}}else for(var a=0;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticcurveto(c,d,u,h)}else t.lineto(u,h)}},finddataindex:function(){var t=this.shape,e=t.segs,i=t.curveness;if(t.polyline)for(var n=0,a=0;a0)for(var r=e[a++],s=e[a++],l=1;o>l;l++){var u=e[a++],h=e[a++];if(za(r,s,u,h))return n}n++}else for(var n=0,a=0;a0){var c=(r+u)/2-(s-h)*i,d=(s+h)/2-(u-r)*i;if(xa(r,s,c,d,u,h))return n}else if(za(r,s,u,h))return n;n++}return-1}}),ln=em.prototype;ln.ispersistent=function(){return!this._incremental},ln.updatedata=function(t){this.group.removeall();var e=new sn({recthover:!0,cursor:"default"});e.setshape({segs:t.getlayout("linespoints")}),this._setcommon(e,t),this.group.add(e),this._incremental=null},ln.incrementalprepareupdate=function(t){this.group.removeall(),this._clearincremental(),t.count()>5e5?(this._incremental||(this._incremental=new yo({silent:!0})),this.group.add(this._incremental)):this._incremental=null},ln.incrementalupdate=function(t,e){var i=new sn;i.setshape({segs:e.getlayout("linespoints")}),this._setcommon(i,e,!!this._incremental),this._incremental?this._incremental.adddisplayable(i,!0):(i.recthover=!0,i.cursor="default",i.__startindex=t.start,this.group.add(i))},ln.remove=function(){this._clearincremental(),this._incremental=null,this.group.removeall()},ln._setcommon=function(t,e,i){var n=e.hostmodel;t.setshape({polyline:n.get("polyline"),curveness:n.get("linestyle.curveness")}),t.usestyle(n.getmodel("linestyle").getlinestyle()),t.style.strokenoscale=!0;var a=e.getvisual("color");a&&t.setstyle("stroke",a),t.setstyle("fill"),i||(t.seriesindex=n.seriesindex,t.on("mousemove",function(e){t.dataindex=null;var i=t.finddataindex(e.offsetx,e.offsety);i>0&&(t.dataindex=i+t.__startindex)}))},ln._clearincremental=function(){var t=this._incremental;t&&t.cleardisplaybles()};var un={seriestype:"lines",plan:tc(),reset:function(t){function e(e,o){var r=[];if(a){var s,l=e.end-e.start;if(n){for(var u=0,h=e.start;hp;p++)d=i.datatopoint(r[p],!1,d),s[c++]=d[0],s[c++]=d[1]}o.setlayout("linespoints",s)}else for(var h=e.start;hv;v++)m.push(i.datatopoint(r[v]));else{m[0]=i.datatopoint(r[0]),m[1]=i.datatopoint(r[1]);var y=g.get("linestyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}o.setitemlayout(h,m)}}var i=t.coordinatesystem,n=t.get("polyline"),a=t.pipelinecontext.large;return{progress:e}}};vu({type:"lines",init:function(){},render:function(t,e,i){var n=t.getdata(),a=this._updatelinedraw(n,t),o=t.get("zlevel"),r=t.get("effect.traillength"),s=i.getzr(),l="svg"===s.painter.gettype();l||s.painter.getlayer(o).clear(!0),null==this._lastzlevel||l||s.configlayer(this._lastzlevel,{motionblur:!1}),this._showeffect(t)&&r&&(l||s.configlayer(o,{motionblur:!0,lastframealpha:math.max(math.min(r/10+.9,1),0)})),a.updatedata(n);var u=t.get("clip",!0)&&fc(t.coordinatesystem,!1,t);u?this.group.setclippath(u):this.group.removeclippath(),this._lastzlevel=o,this._finished=!0},incrementalpreparerender:function(t,e,i){var n=t.getdata(),a=this._updatelinedraw(n,t);a.incrementalprepareupdate(n),this._clearlayer(i),this._finished=!1},incrementalrender:function(t,e){this._linedraw.incrementalupdate(t,e.getdata()),this._finished=t.end===e.getdata().count()},updatetransform:function(t,e,i){var n=t.getdata(),a=t.pipelinecontext;if(!this._finished||a.large||a.progressiverender)return{update:!0};var o=un.reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._linedraw.updatelayout(),this._clearlayer(i)},_updatelinedraw:function(t,e){var i=this._linedraw,n=this._showeffect(e),a=!!e.get("polyline"),o=e.pipelinecontext,r=o.large;return i&&n===this._haseffet&&a===this._ispolyline&&r===this._islargedraw||(i&&i.remove(),i=this._linedraw=r?new em:new xg(a?n?tm:qg:n?jg:ug),this._haseffet=n,this._ispolyline=a,this._islargedraw=r,this.group.removeall()),this.group.add(i.group),i},_showeffect:function(t){return!!t.get("effect.show")},_clearlayer:function(t){var e=t.getzr(),i="svg"===e.painter.gettype();i||null==this._lastzlevel||e.painter.getlayer(this._lastzlevel).clear(!0)},remove:function(t,e){this._linedraw&&this._linedraw.remove(),this._linedraw=null,this._clearlayer(e)},dispose:function(){}});var hn="linestyle.opacity".split("."),cn={seriestype:"lines",reset:function(t){function e(t,e){var i=t.getitemmodel(e),n=im(i.getshallow("symbol",!0)),a=im(i.getshallow("symbolsize",!0)),o=i.get(hn);n[0]&&t.setitemvisual(e,"fromsymbol",n[0]),n[1]&&t.setitemvisual(e,"tosymbol",n[1]),a[0]&&t.setitemvisual(e,"fromsymbolsize",a[0]),a[1]&&t.setitemvisual(e,"tosymbolsize",a[1]),t.setitemvisual(e,"opacity",o)}var i=im(t.get("symbol")),n=im(t.get("symbolsize")),a=t.getdata();return a.setvisual("fromsymbol",i&&i[0]),a.setvisual("tosymbol",i&&i[1]),a.setvisual("fromsymbolsize",n&&n[0]),a.setvisual("tosymbolsize",n&&n[1]),a.setvisual("opacity",t.get(hn)),{dataeach:a.hasitemoption?e:null} }};pu(un),ou(cn);var dn=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesmap={},this._edgesmap={},this.data,this.edgedata},fn=dn.prototype;fn.type="graph",fn.isdirected=function(){return this._directed},fn.addnode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesmap;if(!i[nm(t)]){var n=new am(t,e);return n.hostgraph=this,this.nodes.push(n),i[nm(t)]=n,n}},fn.getnodebyindex=function(t){var e=this.data.getrawindex(t);return this.nodes[e]},fn.getnodebyid=function(t){return this._nodesmap[nm(t)]},fn.addedge=function(t,e,i){var n=this._nodesmap,a=this._edgesmap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),am.isinstance(t)||(t=n[nm(t)]),am.isinstance(e)||(e=n[nm(e)]),t&&e){var o=t.id+"-"+e.id;if(!a[o]){var r=new om(t,e,i);return r.hostgraph=this,this._directed&&(t.outedges.push(r),e.inedges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),a[o]=r,r}}},fn.getedgebyindex=function(t){var e=this.edgedata.getrawindex(t);return this.edges[e]},fn.getedge=function(t,e){am.isinstance(t)&&(t=t.id),am.isinstance(e)&&(e=e.id);var i=this._edgesmap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},fn.eachnode=function(t,e){for(var i=this.nodes,n=i.length,a=0;n>a;a++)i[a].dataindex>=0&&t.call(e,i[a],a)},fn.eachedge=function(t,e){for(var i=this.edges,n=i.length,a=0;n>a;a++)i[a].dataindex>=0&&i[a].node1.dataindex>=0&&i[a].node2.dataindex>=0&&t.call(e,i[a],a)},fn.breadthfirsttraverse=function(t,e,i,n){if(am.isinstance(e)||(e=this._nodesmap[nm(e)]),e){for(var a="out"===i?"outedges":"in"===i?"inedges":"edges",o=0;oa;a++)i[a].dataindex=-1;for(var a=0,o=t.count();o>a;a++)i[t.getrawindex(a)].dataindex=a;e.filterself(function(t){var i=n[e.getrawindex(t)];return i.node1.dataindex>=0&&i.node2.dataindex>=0});for(var a=0,o=n.length;o>a;a++)n[a].dataindex=-1;for(var a=0,o=e.count();o>a;a++)n[e.getrawindex(a)].dataindex=a},fn.clone=function(){for(var t=new dn(this._directed),e=this.nodes,i=this.edges,n=0;n=0&&this[t][e].setitemvisual(this.dataindex,i,n)},getvisual:function(i,n){return this[t][e].getitemvisual(this.dataindex,i,n)},setlayout:function(i,n){this.dataindex>=0&&this[t][e].setitemlayout(this.dataindex,i,n)},getlayout:function(){return this[t][e].getitemlayout(this.dataindex)},getgraphicel:function(){return this[t][e].getitemgraphicel(this.dataindex)},getrawindex:function(){return this[t][e].getrawindex(this.dataindex)}}};c(am,pn("hostgraph","data")),c(om,pn("hostgraph","edgedata")),dn.node=am,dn.edge=om,wa(am),wa(om);var gn=function(t,e,i,n,a){for(var o=new dn(n),r=0;r "+f)),h++)}var p,g=i.get("coordinatesystem");if("cartesian2d"===g||"polar"===g)p=xh(t,i);else{var m=ls.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];u(v,"value")<0&&v.concat(["value"]);var y=zl(t,{coorddimensions:v});p=new el(y,i),p.initdata(t)}var x=new el(["value"],i);return x.initdata(l,s),a&&a(p,x),af({maindata:p,struct:o,structattr:"graph",datas:{node:p,edge:x},datasattr:{node:"data",edge:"edgedata"}}),o.update(),o},mn=bu({type:"series.graph",init:function(t){function e(){return i._categoriesdata}mn.superapply(this,"init",arguments);var i=this;this.legendvisualprovider=new kd(e,e),this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergeoption:function(t){mn.superapply(this,"mergeoption",arguments),this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergedefaultandtheme:function(t){mn.superapply(this,"mergedefaultandtheme",arguments),ia(t,["edgelabel"],["show"])},getinitialdata:function(t,e){function i(t,i){function n(t){return t=this.parsepath(t),t&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentmodel}t.wrapmethod("getitemmodel",function(t){var e=o._categoriesmodels,i=t.getshallow("category"),n=e[i];return n&&(n.parentmodel=t.parentmodel,t.parentmodel=n),t});var a=o.getmodel("edgelabel"),r=new vr({label:a.option},a.parentmodel,e),s=o.getmodel("emphasis.edgelabel"),l=new vr({emphasis:{label:s.option}},s.parentmodel,e);i.wrapmethod("getitemmodel",function(t){return t.customizegetparent(n),t})}var n=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;return a&&n?gn(a,n,this,!0,i).data:void 0},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},getcategoriesdata:function(){return this._categoriesdata},formattooltip:function(t,e,i){if("edge"===i){var n=this.getdata(),a=this.getdataparams(t,i),o=n.graph.getedgebyindex(t),r=n.getname(o.node1.dataindex),s=n.getname(o.node2.dataindex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=hr(l.join(" > ")),a.value&&(l+=" : "+hr(a.value)),l}return mn.superapply(this,"formattooltip",arguments)},_updatecategoriesdata:function(){var t=p(this.option.categories||[],function(t){return null!=t.value?t:r({value:0},t)}),e=new el(["value"],this);e.initdata(t),this._categoriesdata=e,this._categoriesmodels=e.maparray(function(t){return e.getitemmodel(t,!0)})},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},isanimationenabled:function(){return mn.supercall(this,"isanimationenabled")&&!("force"===this.get("layout")&&this.get("force.layoutanimation"))},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",legendhoverlink:!0,hoveranimation:!0,layout:null,focusnodeadjacency:!1,circular:{rotatelabel:!1},force:{initlayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgelength:30,layoutanimation:!0},left:"center",top:"center",symbol:"circle",symbolsize:10,edgesymbol:["none","none"],edgesymbolsize:10,edgelabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodescaleratio:.6,label:{show:!1,formatter:"{b}"},itemstyle:{},linestyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),vn=[],yn=[],xn=[],_n=oa,wn=xs,bn=math.abs,sn=function(t,e){var i=[],n=za,a=[[],[],[]],o=[[],[]],r=[];e/=2,t.eachedge(function(t){var s=t.getlayout(),l=t.getvisual("fromsymbol"),u=t.getvisual("tosymbol");s.__original||(s.__original=[h(s[0]),h(s[1])],s[2]&&s.__original.push(h(s[2])));var h=s.__original;if(null!=s[2]){if(w(a[0],h[0]),w(a[1],h[2]),w(a[2],h[1]),l&&"none"!==l){var c=sm(t.node1),d=lm(a,h[0],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],d,i),a[0][1]=i[3],a[1][1]=i[4]}if(u&&"none"!==u){var c=sm(t.node2),d=lm(a,h[1],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],d,i),a[1][1]=i[1],a[2][1]=i[2]}w(s[0],a[0]),w(s[1],a[2]),w(s[2],a[1])}else{if(w(o[0],h[0]),w(o[1],h[1]),y(r,o[1],o[0]),te(r,r),l&&"none"!==l){var c=sm(t.node1);x(o[0],o[0],r,c*e)}if(u&&"none"!==u){var c=sm(t.node2);x(o[1],o[1],r,-c*e)}w(s[0],o[0]),w(s[1],o[1])}})},mn="__focusnodeadjacency",in="__unfocusnodeadjacency",tn=["itemstyle","opacity"],an=["linestyle","opacity"];vu({type:"graph",init:function(t,e){var i=new cd,n=new xg,a=this.group;this._controller=new op(e.getzr()),this._controllerhost={target:a},a.add(i.group),a.add(n.group),this._symboldraw=i,this._linedraw=n,this._firstrender=!0},render:function(t,e,i){var n=this,a=t.coordinatesystem;this._model=t;var o=this._symboldraw,r=this._linedraw,s=this.group;if("view"===a.type){var l={position:a.position,scale:a.scale};this._firstrender?s.attr(l):ar(s,l,t)}sn(t.getgraph(),rm(t));var u=t.getdata();o.updatedata(u);var h=t.getedgedata();r.updatedata(h),this._updatenodeandlinkscale(),this._updatecontroller(t,e,i),cleartimeout(this._layouttimeout);var c=t.forcelayout,d=t.get("force.layoutanimation");c&&this._startforcelayoutiteration(c,d),u.eachitemgraphicel(function(e,a){var o=u.getitemmodel(a);e.off("drag").off("dragend");var r=o.get("draggable");r&&e.on("drag",function(){c&&(c.warmup(),!this._layouting&&this._startforcelayoutiteration(c,d),c.setfixed(a),u.setitemlayout(a,e.position))},this).on("dragend",function(){c&&c.setunfixed(a)},this),e.setdraggable(r&&c),e[mn]&&e.off("mouseover",e[mn]),e[in]&&e.off("mouseout",e[in]),o.get("focusnodeadjacency")&&(e.on("mouseover",e[mn]=function(){n._cleartimer(),i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,dataindex:e.dataindex})}),e.on("mouseout",e[in]=function(){n._dispatchunfocus(i)}))},this),u.graph.eachedge(function(e){var a=e.getgraphicel();a[mn]&&a.off("mouseover",a[mn]),a[in]&&a.off("mouseout",a[in]),e.getmodel().get("focusnodeadjacency")&&(a.on("mouseover",a[mn]=function(){n._cleartimer(),i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,edgedataindex:e.dataindex})}),a.on("mouseout",a[in]=function(){n._dispatchunfocus(i)}))});var f="circular"===t.get("layout")&&t.get("circular.rotatelabel"),p=u.getlayout("cx"),g=u.getlayout("cy");u.eachitemgraphicel(function(t,e){var i=u.getitemmodel(e),n=i.get("label.rotate")||0,a=t.getsymbolpath();if(f){var o=u.getitemlayout(e),r=math.atan2(o[1]-g,o[0]-p);0>r&&(r=2*math.pi+r);var s=o[0]e&&(e=0),e*=u;var i=math.asin(e/2/a);isnan(i)&&(i=on/2),en[t.dataindex]=i,l+=2*i});var h=(2*on-l)/s/2,c=0;i.eachnode(function(t){var e=h+en[t.dataindex];c+=e,t.setlayout([a*math.cos(c)+o,a*math.sin(c)+r]),c+=e})}},rn=function(t){t.eachseriesbytype("graph",function(t){"circular"===t.get("layout")&&gm(t,"symbolsize")})},zn=x,bn=function(t){t.eachseriesbytype("graph",function(t){var e=t.coordinatesystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedpoints||{},n=t.getgraph(),a=n.data,o=n.edgedata,r=t.getmodel("force"),s=r.get("initlayout");t.preservedpoints?a.each(function(t){var e=a.getid(t);a.setitemlayout(t,i[e]||[0/0,0/0])}):s&&"none"!==s?"circular"===s&&gm(t,"value"):fm(t);var l=a.getdataextent("value"),u=o.getdataextent("value"),h=r.get("repulsion"),c=r.get("edgelength");_(h)||(h=[h,h]),_(c)||(c=[c,c]),c=[c[1],c[0]];var d=a.maparray("value",function(t,e){var i=a.getitemlayout(e),n=mr(t,l,h);return isnan(n)&&(n=(h[0]+h[1])/2),{w:n,rep:n,fixed:a.getitemmodel(e).get("fixed"),p:!i||isnan(i[0])||isnan(i[1])?null:i}}),f=o.maparray("value",function(t,e){var i=n.getedgebyindex(e),a=mr(t,u,c);isnan(a)&&(a=(c[0]+c[1])/2);var o=i.getmodel();return{n1:d[i.node1.dataindex],n2:d[i.node2.dataindex],d:a,curveness:o.get("linestyle.curveness")||0,ignoreforcelayout:o.get("ignoreforcelayout")}}),e=t.coordinatesystem,p=e.getboundingrect(),g=mm(d,f,{rect:p,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(t){for(var e=0,o=d.length;o>e;e++)d[e].fixed&&w(d[e].p,n.getnodebyindex(e).getlayout());m(function(e,o,r){for(var s=0,l=e.length;l>s;s++)e[s].fixed||n.getnodebyindex(s).setlayout(e[s].p),i[a.getid(s)]=e[s].p;for(var s=0,l=o.length;l>s;s++){var u=o[s],h=n.getedgebyindex(s),c=u.n1.p,d=u.n2.p,f=h.getlayout();f=f?f.slice():[],f[0]=f[0]||[],f[1]=f[1]||[],w(f[0],c),w(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setlayout(f)}t&&t(r)})},t.forcelayout=g,t.preservedpoints=i,g.step()}else t.forcelayout=null})},vn=function(t,e){var i=[];return t.eachseriesbytype("graph",function(t){var n=t.get("coordinatesystem");if(!n||"view"===n){var a=t.getdata(),o=a.maparray(function(t){var e=a.getitemmodel(t);return[+e.get("x"),+e.get("y")]}),r=[],s=[];va(o,r,s),s[0]-r[0]===0&&(s[0]+=1,r[0]-=1),s[1]-r[1]===0&&(s[1]+=1,r[1]-=1);var l=(s[0]-r[0])/(s[1]-r[1]),u=vm(t,e,l);isnan(l)&&(r=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var h=s[0]-r[0],c=s[1]-r[1],d=u.width,f=u.height,p=t.coordinatesystem=new $f;p.zoomlimit=t.get("scalelimit"),p.setboundingrect(r[0],r[1],h,c),p.setviewrect(u.x,u.y,d,f),p.setcenter(t.get("center")),p.setzoom(t.get("zoom")),i.push(p)}}),i};au(cn),ou(pp("graph","circle",null)),ou(ln),ou(kn),pu(pn),pu(el.visual.post_chart_layout,rn),pu(bn),lu("graphview",{create:vn});var gn=$d.extend({type:"series.boxplot",dependencies:["xaxis","yaxis","grid"],defaultvaluedimensions:[{name:"min",defaulttooltip:!0},{name:"q1",defaulttooltip:!0},{name:"median",defaulttooltip:!0},{name:"q3",defaulttooltip:!0},{name:"max",defaulttooltip:!0}],dimensions:null,defaultoption:{zlevel:0,z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,hoveranimation:!0,layout:null,boxwidth:[7,50],itemstyle:{color:"#fff",borderwidth:1},emphasis:{itemstyle:{borderwidth:2,shadowblur:5,shadowoffsetx:2,shadowoffsety:2,shadowcolor:"rgba(0,0,0,0.4)"}},animationeasing:"elasticout",animationduration:800}});c(gn,to,!0);var fn=["itemstyle"],wn=["emphasis","itemstyle"],hn=(ml.extend({type:"boxplot",render:function(t){var e=t.getdata(),i=this.group,n=this._data;this._data||i.removeall();var a="horizontal"===t.get("layout")?1:0;e.diff(n).add(function(t){if(e.hasvalue(t)){var n=e.getitemlayout(t),o=ym(n,e,t,a,!0);e.setitemgraphicel(t,o),i.add(o)}}).update(function(t,o){var r=n.getitemgraphicel(o);if(!e.hasvalue(t))return void i.remove(r);var s=e.getitemlayout(t);r?xm(s,r,e,t):r=ym(s,e,t,a),i.add(r),e.setitemgraphicel(t,r)}).remove(function(t){var e=n.getitemgraphicel(t);e&&i.remove(e)}).execute(),this._data=e},remove:function(){var t=this.group,e=this._data;this._data=null,e&&e.eachitemgraphicel(function(e){e&&t.remove(e)})},dispose:g}),ao.extend({type:"boxplotboxpath",shape:{},buildpath:function(t,e){var i=e.points,n=0;for(t.moveto(i[n][0],i[n][1]),n++;4>n;n++)t.lineto(i[n][0],i[n][1]);for(t.closepath();no&&(e[1-n]=e[n]+c.sign*o),e},$n=f,jn=math.min,qn=math.max,tr=math.floor,er=math.ceil,ir=tr,nr=math.pi;dm.prototype={type:"parallel",constructor:dm,_init:function(t,e){var i=t.dimensions,n=t.parallelaxisindex;$n(i,function(t,i){var a=n[i],o=e.getcomponent("parallelaxis",a),r=this._axesmap.set(t,new qn(t,xh(o),[0,0],o.get("type"),a)),s="category"===r.type;r.onband=s&&o.get("boundarygap"),r.inverse=o.get("inverse"),o.axis=r,r.model=o,r.coordinatesystem=o.coordinatesystem=this},this)},update:function(t){this._updateaxesfromseries(this._model,t)},containpoint:function(t){var e=this._makelayoutinfo(),i=e.axisbase,n=e.layoutbase,a=e.pixeldimindex,o=t[1-a],r=t[a];return o>=i&&o<=i+e.axislength&&r>=n&&r<=n+e.layoutlength},getmodel:function(){return this._model},_updateaxesfromseries:function(t,e){e.eachseries(function(i){if(t.contains(i,e)){var n=i.getdata();$n(this.dimensions,function(t){var e=this._axesmap.get(t);e.scale.unionextentfromdata(n,n.mapdimension(t)),uh(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ts(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()}),this._layoutaxes()},getrect:function(){return this._rect},_makelayoutinfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],a=["width","height"],o=e.get("layout"),r="horizontal"===o?0:1,s=i[a[r]],l=[0,s],u=this.dimensions.length,h=cm(e.get("axisexpandwidth"),l),c=cm(e.get("axisexpandcount")||0,[0,u]),d=e.get("axisexpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisexpandwindow");if(f)t=cm(f[1]-f[0],l),f[1]=f[0]+t;else{t=cm(h*(c-1),l);var p=e.get("axisexpandcenter")||tr(u/2);f=[h*p-t/2],f[1]=f[0]+t}var g=(s-t)/(u-c);3>g&&(g=0);var m=[tr(ir(f[0]/h,1))+1,er(ir(f[1]/h,1))-1],v=g/h*f[0];return{layout:o,pixeldimindex:r,layoutbase:i[n[r]],layoutlength:s,axisbase:i[n[1-r]],axislength:i[a[1-r]],axisexpandable:d,axisexpandwidth:h,axiscollapsewidth:g,axisexpandwindow:f,axiscount:u,wininnerindices:m,axisexpandwindow0pos:v}},_layoutaxes:function(){var t=this._rect,e=this._axesmap,i=this.dimensions,n=this._makelayoutinfo(),a=n.layout;e.each(function(t){var e=[0,n.axislength],i=t.inverse?1:0;t.setextent(e[i],e[1-i])}),$n(i,function(e,i){var o=(n.axisexpandable?km:lm)(i,n),r={horizontal:{x:o.position,y:n.axislength},vertical:{x:0,y:o.position}},s={horizontal:nr/2,vertical:0},l=[r[a].x+t.x,r[a].y+t.y],u=s[a],h=oe();be(h,h,u),ze(h,h,l),this._axeslayout[e]={position:l,rotation:u,transform:h,axisnameavailablewidth:o.axisnameavailablewidth,axislabelshow:o.axislabelshow,nametruncatemaxwidth:o.nametruncatemaxwidth,tickdirection:1,labeldirection:1}},this)},getaxis:function(t){return this._axesmap.get(t)},datatopoint:function(t,e){return this.axiscoordtopoint(this._axesmap.get(e).datatocoord(t),e)},eachactivestate:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var a=this._axesmap,o=this.dimensions,r=[],s=[];f(o,function(e){r.push(t.mapdimension(e)),s.push(a.get(e).model)});for(var l=this.hasaxisbrushed(),u=i;n>u;u++){var h;if(l){h="active";for(var c=t.getvalues(r,u),d=0,p=o.length;p>d;d++){var g=s[d].getactivestate(c[d]);if("inactive"===g){h="inactive";break}}}else h="normal";e(h,u)}},hasaxisbrushed:function(){for(var t=this.dimensions,e=this._axesmap,i=!1,n=0,a=t.length;a>n;n++)"normal"!==e.get(t[n]).model.getactivestate()&&(i=!0);return i},axiscoordtopoint:function(t,e){var i=this._axeslayout[e];return sr([t,0],i.transform)},getaxislayout:function(t){return n(this._axeslayout[t])},getslidedaxisexpandwindow:function(t){var e=this._makelayoutinfo(),i=e.pixeldimindex,n=e.axisexpandwindow.slice(),a=n[1]-n[0],o=[0,e.axisexpandwidth*(e.axiscount-1)];if(!this.containpoint(t))return{behavior:"none",axisexpandwindow:n};var r,s=t[i]-e.layoutbase-e.axisexpandwindow0pos,l="slide",u=e.axiscollapsewidth,h=this._model.get("axisexpandslidetriggerarea"),c=null!=h[0];if(u)c&&u&&sa*(1-h[0])?(l="jump",r=s-a*(1-h[2])):(r=s-a*h[1])>=0&&(r=s-a*(1-h[1]))<=0&&(r=0),r*=e.axisexpandwidth/u,r?kn(r,n,o,"all"):l="none";else{var a=n[1]-n[0],d=o[1]*s/a;n=[qn(0,d-a/2)],n[1]=jn(o[1],n[0]+a),n[0]=n[1]-a}return{axisexpandwindow:n,behavior:l}}},ls.register("parallel",{create:pm});var ar=hd.extend({type:"baseparallelaxis",axis:null,activeintervals:[],getareaselectstyle:function(){return qi([["fill","color"],["linewidth","borderwidth"],["stroke","bordercolor"],["width","width"],["opacity","opacity"]])(this.getmodel("areaselectstyle"))},setactiveintervals:function(t){var e=this.activeintervals=n(t);if(e)for(var i=e.length-1;i>=0;i--)ar(e[i])},getactivestate:function(t){var e=this.activeintervals;if(!e.length)return"normal";if(null==t||isnan(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,a=e.length;a>n;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),or={type:"value",dim:null,areaselectstyle:{width:20,borderwidth:1,bordercolor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};a(ar.prototype,pk),bk("parallel",ar,om,or),hd.extend({type:"parallel",dependencies:["parallelaxis"],coordinatesystem:null,dimensions:null,parallelaxisindex:null,layoutmode:"box",defaultoption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisexpandable:!1,axisexpandcenter:null,axisexpandcount:0,axisexpandwidth:50,axisexpandrate:17,axisexpanddebounce:50,axisexpandslidetriggerarea:[-.15,.05,.4],axisexpandtriggeron:"click",parallelaxisdefault:null},init:function(){hd.prototype.init.apply(this,arguments),this.mergeoption({})},mergeoption:function(t){var e=this.option;t&&a(e,t,!0),this._initdimensions()},contains:function(t,e){var i=t.get("parallelindex");return null!=i&&e.getcomponent("parallel",i)===this},setaxisexpand:function(t){f(["axisexpandable","axisexpandcenter","axisexpandcount","axisexpandwidth","axisexpandwindow"],function(e){t.hasownproperty(e)&&(this.option[e]=t[e])},this)},_initdimensions:function(){var t=this.dimensions=[],e=this.parallelaxisindex=[],i=m(this.dependentmodels.parallelaxis,function(t){return(t.get("parallelindex")||0)===this.componentindex},this);f(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentindex)})}});var rr={type:"axisareaselect",event:"axisareaselected"};cu(rr,function(t,e){e.eachcomponent({maintype:"parallelaxis",query:t},function(e){e.axis.model.setactiveintervals(t.intervals)})}),cu("parallelaxisexpand",function(t,e){e.eachcomponent({maintype:"parallel",query:t},function(e){e.setaxisexpand(t)})});var sr=x,lr=f,ur=p,hr=math.min,cr=math.max,dr=math.pow,fr=1e4,pr=6,gr=6,mr="globalpan",vr={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},yr={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},xr={brushstyle:{linewidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushmode:"single",removeonclick:!1},_r=0;em.prototype={constructor:em,enablebrush:function(t){return this._brushtype&&rm(this),t.brushtype&&nm(this,t),this},setpanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelid]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableglobalpan=t.enableglobalpan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getlocaltransform(),this},eachcover:function(t,e){lr(this._covers,t,e)},updatecovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushtype}function i(t,i){return e(t.__brushoption,i)}function o(e,i){var n=t[e];if(null!=i&&l[i]===c)u[e]=l[i];else{var a=u[e]=null!=i?(l[i].__brushoption=n,l[i]):gm(h,vm(h,n));hm(h,a)}}function r(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return a(n(xr),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingcover;return new zu(l,t,i,e).add(o).update(o).remove(r).execute(),this},unmount:function(){return this.enablebrush(!1),ym(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(em,qs);var wr={mousedown:function(t){if(this._dragging)gv(this,t);else if(!t.target||!t.target.draggable){cv(t);var e=this.group.transformcoordtolocal(t.offsetx,t.offsety);this._creatingcover=null;var i=this._creatingpanel=um(this,t,e);i&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetx,i=t.offsety,n=this.group.transformcoordtolocal(e,i);if(hv(this,t,n),this._dragging){cv(t);var a=fv(this,t,n,!1);a&&jm(this,a)}},mouseup:function(t){gv(this,t)}},br={linex:vv(0),liney:vv(1),rect:{createcover:function(t,e){return $m(sr(ov,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getcreatingrange:function(t){var e=km(t);return iv(e[1][0],e[1][1],e[0][0],e[0][1])},updatecovershape:function(t,e,i,n){jm(t,e,i,n)},updatecommon:qm,contain:dv},polygon:{createcover:function(t,e){var i=new fm;return i.add(new ca({name:"main",style:ev(e),silent:!0})),i},getcreatingrange:function(t){return t},endcreating:function(t,e){e.remove(e.childat(0)),e.add(new ha({name:"main",draggable:!0,drift:sr(rv,t,e),ondragend:sr(jm,t,{isend:!0})}))},updatecovershape:function(t,e,i){e.childat(0).setshape({points:lv(t,e,i)})},updatecommon:qm,contain:dv}},sr=["axisline","axisticklabel","axisname"],mr=zu({type:"parallelaxis",init:function(t,e){mr.superapply(this,"init",arguments),(this._brushcontroller=new em(e.getzr())).on("brush",y(this._onbrush,this))},render:function(t,e,i,n){if(!bv(t,e,n)){this.axismodel=t,this.api=i,this.group.removeall();var a=this._axisgroup;if(this._axisgroup=new fm,this.group.add(this._axisgroup),t.get("show")){var o=mv(t,e),s=o.coordinatesystem,l=t.getareaselectstyle(),u=l.width,h=t.axis.dim,c=s.getaxislayout(h),d=r({strokecontainthreshold:u},c),p=new np(t,d);f(sr,p.add,p),this._axisgroup.add(p.getgroup()),this._refreshbrushcontroller(d,l,t,o,u,i);var g=n&&n.animation===!1?null:t;ur(a,this._axisgroup,g)}}},_refreshbrushcontroller:function(t,e,i,n,a,o){var r=i.axis.getextent(),s=r[1]-r[0],l=math.min(30,.1*math.abs(s)),u=ti.create({x:r[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushcontroller.mount({enableglobalpan:!0,rotation:t.rotation,position:t.position}).setpanels([{panelid:"pl",clippath:yv(u),istargetbycursor:_v(u,o,n),getlinearbrushotherextent:xv(u,0)}]).enablebrush({brushtype:"linex",brushstyle:e,removeonclick:!0}).updatecovers(sv(i))},_onbrush:function(t,e){var i=this.axismodel,n=i.axis,a=p(t,function(t){return[n.coordtodata(t.range[0],!0),n.coordtodata(t.range[1],!0)]});(!i.option.realtime===e.isend||e.removeonclick)&&this.api.dispatchaction({type:"axisareaselect",parallelaxisid:i.id,intervals:a})},dispose:function(){this._brushcontroller.dispose()}}),ir=5;zu({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(tr,function(t,e){i.getzr().on(e,this._handlers[e]=y(t,this))},this)),bl(this,"_throttleddispatchexpand",t.get("axisexpandrate"),"fixrate") },dispose:function(t,e){f(this._handlers,function(t,i){e.getzr().off(i,t)}),this._handlers=null},_throttleddispatchexpand:function(t){this._dispatchexpand(t)},_dispatchexpand:function(t){t&&this._api.dispatchaction(r({type:"parallelaxisexpand"},t))}});var tr={mousedown:function(t){iv(this,"click")&&(this._mousedownpoint=[t.offsetx,t.offsety])},mouseup:function(t){var e=this._mousedownpoint;if(iv(this,"click")&&e){var i=[t.offsetx,t.offsety],n=math.pow(e[0]-i[0],2)+math.pow(e[1]-i[1],2);if(n>ir)return;var a=this._model.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]);"none"!==a.behavior&&this._dispatchexpand({axisexpandwindow:a.axisexpandwindow})}this._mousedownpoint=null},mousemove:function(t){if(!this._mousedownpoint&&iv(this,"mousemove")){var e=this._model,i=e.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]),n=i.behavior;"jump"===n&&this._throttleddispatchexpand.debouncenextcall(e.get("axisexpanddebounce")),this._throttleddispatchexpand("none"===n?null:{axisexpandwindow:i.axisexpandwindow,animation:"jump"===n?null:!1})}}};tu(jn),$d.extend({type:"series.parallel",dependencies:["parallel"],visualcoloraccesspath:"linestyle.color",getinitialdata:function(){var t=this.getsource();return tv(t,this),xh(t,this)},getrawindicesbyactivestate:function(t){var e=this.coordinatesystem,i=this.getdata(),n=[];return e.eachactivestate(i,function(e,a){t===e&&n.push(i.getrawindex(a))}),n},defaultoption:{zlevel:0,z:2,coordinatesystem:"parallel",parallelindex:0,label:{show:!1},inactiveopacity:.05,activeopacity:1,linestyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationeasing:"linear"}});var ar=.3,dr=(ml.extend({type:"parallel",init:function(){this._datagroup=new fm,this.group.add(this._datagroup),this._data,this._initialized},render:function(t,e,i,n){function a(t){var e=lv(l,s,t,c,h);pv(e,l,t,d)}function o(e,i){var a=u.getitemgraphicel(i),o=cv(l,e,c,h);l.setitemgraphicel(e,a);var r=n&&n.animation===!1?null:t;ar(a,{shape:{points:o}},r,e),pv(a,l,e,d)}function r(t){var e=u.getitemgraphicel(t);s.remove(e)}var s=this._datagroup,l=t.getdata(),u=this._data,h=t.coordinatesystem,c=h.dimensions,d=kv(t);if(l.diff(u).add(a).update(o).remove(r).execute(),!this._initialized){this._initialized=!0;var f=dv(h,t,function(){settimeout(function(){s.removeclippath()})});s.setclippath(f)}this._data=l},incrementalpreparerender:function(){this._initialized=!0,this._data=null,this._datagroup.removeall()},incrementalrender:function(t,e){for(var i=e.getdata(),n=e.coordinatesystem,a=n.dimensions,o=kv(e),r=t.start;r=a/3?1:2),l=e.y-n(r)*o*(o>=a/3?1:2);r=e.angle-math.pi/2,t.moveto(s,l),t.lineto(e.x+i(r)*o,e.y+n(r)*o),t.lineto(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineto(e.x-i(r)*o,e.y-n(r)*o),t.lineto(s,l)}})),kr=2*math.pi,pr=(ml.extend({type:"gauge",render:function(t,e,i){this.group.removeall();var n=t.get("axisline.linestyle.color"),a=ev(t,i);this._rendermain(t,e,i,n,a)},dispose:function(){},_rendermain:function(t,e,i,n,a){for(var o=this.group,r=t.getmodel("axisline"),s=r.getmodel("linestyle"),l=t.get("clockwise"),u=-t.get("startangle")/180*math.pi,h=-t.get("endangle")/180*math.pi,c=(h-u)%kr,d=u,f=s.get("width"),p=r.get("show"),g=0;p&&g=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=i;i++){var t=math.cos(_),a=math.sin(_);if(f.get("show")){var d=new ma({shape:{x1:t*h+l,y1:a*h+u,x2:t*(h-y)+l,y2:a*(h-y)+u},style:s,silent:!0});"auto"===s.stroke&&d.setstyle({stroke:n(i/m)}),s.add(d)}if(g.get("show")){var c=nv(tr(i/m*(d-c)+c),g.get("formatter")),l=g.get("distance"),k=n(i/m);s.add(new ia({style:jo({},g,{text:c,x:t*(h-y-l)+l,y:a*(h-y-l)+u,textverticalalign:-.4>a?"top":a>.4?"bottom":"middle",textalign:-.4>t?"left":t>.4?"right":"center"},{autocolor:k}),silent:!0}))}if(p.get("show")&&i!==m){for(var p=0;v>=p;p++){var t=math.cos(_),a=math.sin(_),o=new ma({shape:{x1:t*h+l,y1:a*h+u,x2:t*(h-x)+l,y2:a*(h-x)+u},silent:!0,style:m});"auto"===m.stroke&&o.setstyle({stroke:n((i+p/v)/m)}),s.add(o),_+=b}_-=b}else _+=w}},_renderpointer:function(t,e,i,n,a,o,r){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachitemgraphicel(function(t){s.remove(t)}));var u=[+t.get("min"),+t.get("max")],h=[o,r],c=t.getdata(),d=c.mapdimension("value");c.diff(l).add(function(e){var i=new lr({shape:{angle:o}});or(i,{shape:{angle:mr(c.get(d,e),u,h,!0)}},t),s.add(i),c.setitemgraphicel(e,i)}).update(function(e,i){var n=l.getitemgraphicel(i);ar(n,{shape:{angle:mr(c.get(d,e),u,h,!0)}},t),s.add(n),c.setitemgraphicel(e,n)}).remove(function(t){var e=l.getitemgraphicel(t);s.remove(e)}).execute(),c.eachitemgraphicel(function(t,e){var i=c.getitemmodel(e),o=i.getmodel("pointer");t.setshape({x:a.cx,y:a.cy,width:ir(o.get("width"),a.r),r:ir(o.get("length"),a.r)}),t.usestyle(i.getmodel("itemstyle").getitemstyle()),"auto"===t.style.fill&&t.setstyle("fill",n(mr(c.get(d,e),u,[0,1],!0))),wo(t,i.getmodel("emphasis.itemstyle").getitemstyle())}),this._data=c},_rendertitle:function(t,e,i,n,a){var o=t.getdata(),r=o.mapdimension("value"),s=t.getmodel("title");if(s.get("show")){var l=s.get("offsetcenter"),u=a.cx+ir(l[0],a.r),h=a.cy+ir(l[1],a.r),c=+t.get("min"),d=+t.get("max"),f=t.getdata().get(r,0),p=n(mr(f,[c,d],[0,1],!0));this.group.add(new ia({silent:!0,style:jo({},s,{x:u,y:h,text:o.getname(0),textalign:"center",textverticalalign:"middle"},{autocolor:p,forcerich:!0})}))}},_renderdetail:function(t,e,i,n,a){var o=t.getmodel("detail"),r=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetcenter"),u=a.cx+ir(l[0],a.r),h=a.cy+ir(l[1],a.r),c=ir(o.get("width"),a.r),d=ir(o.get("height"),a.r),f=t.getdata(),p=f.get(f.mapdimension("value"),0),g=n(mr(p,[r,s],[0,1],!0));this.group.add(new ia({silent:!0,style:jo({},o,{x:u,y:h,text:nv(p,o.get("formatter")),textwidth:isnan(c)?null:c,textheight:isnan(d)?null:d,textalign:"center",textverticalalign:"middle"},{autocolor:g,forcerich:!0})}))}}}),bu({type:"series.funnel",init:function(t){pr.superapply(this,"init",arguments),this.legendvisualprovider=new kd(y(this.getdata,this),y(this.getrawdata,this)),this._defaultlabelline(t)},getinitialdata:function(){return zp(this,{coorddimensions:["value"],encodedefaulter:x(ys,this)})},_defaultlabelline:function(t){ia(t,"labelline",["show"]);var e=t.labelline,i=t.emphasis.labelline;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getdataparams:function(t){var e=this.getdata(),i=pr.supercall(this,"getdataparams",t),n=e.mapdimension("value"),a=e.getsum(n);return i.percent=a?+(e.get(n,t)/a*100).tofixed(2):0,i.$vars.push("percent"),i},defaultoption:{zlevel:0,z:2,legendhoverlink:!0,left:80,top:60,right:80,bottom:60,minsize:"0%",maxsize:"100%",sort:"descending",gap:0,funnelalign:"center",label:{show:!0,position:"outer"},labelline:{show:!0,length:20,linestyle:{width:1,type:"solid"}},itemstyle:{bordercolor:"#fff",borderwidth:1},emphasis:{label:{show:!0}}}})),or=rv.prototype,er=["itemstyle","opacity"];or.updatedata=function(t,e,i){var n=this.childat(0),a=t.hostmodel,o=t.getitemmodel(e),r=t.getitemlayout(e),l=t.getitemmodel(e).get(er);l=null==l?1:l,n.usestyle({}),i?(n.setshape({points:r.points}),n.setstyle({opacity:0}),or(n,{style:{opacity:l}},a,e)):ar(n,{style:{opacity:l},shape:{points:r.points}},a,e);var u=o.getmodel("itemstyle"),h=t.getitemvisual(e,"color");n.setstyle(s({linejoin:"round",fill:h},u.getitemstyle(["opacity"]))),n.hoverstyle=u.getmodel("emphasis").getitemstyle(),this._updatelabel(t,e),wo(this)},or._updatelabel=function(t,e){var i=this.childat(1),n=this.childat(2),a=t.hostmodel,o=t.getitemmodel(e),r=t.getitemlayout(e),s=r.label,l=t.getitemvisual(e,"color");ar(i,{shape:{points:s.linepoints||s.linepoints}},a,e),ar(n,{style:{x:s.x,y:s.y}},a,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getmodel("label"),h=o.getmodel("emphasis.label"),c=o.getmodel("labelline"),d=o.getmodel("emphasis.labelline"),l=t.getitemvisual(e,"color");xo(n.style,n.hoverstyle={},u,h,{labelfetcher:t.hostmodel,labeldataindex:e,defaulttext:t.getname(e),autocolor:l,useinsidestyle:!!s.inside},{textalign:s.textalign,textverticalalign:s.verticalalign}),n.ignore=n.normalignore=!u.get("show"),n.hoverignore=!h.get("show"),i.ignore=i.normalignore=!c.get("show"),i.hoverignore=!d.get("show"),i.setstyle({stroke:l}),i.setstyle(c.getmodel("linestyle").getlinestyle()),i.hoverstyle=d.getmodel("linestyle").getlinestyle()},h(rv,fm);var nr=(ml.extend({type:"funnel",render:function(t){var e=t.getdata(),i=this._data,n=this.group;e.diff(i).add(function(t){var i=new rv(e,t);e.setitemgraphicel(t,i),n.add(i)}).update(function(t,a){var o=i.getitemgraphicel(a);o.updatedata(e,t),n.add(o),e.setitemgraphicel(t,o)}).remove(function(t){var e=i.getitemgraphicel(t);n.remove(e)}).execute(),this._data=e},remove:function(){this.group.removeall(),this._data=null},dispose:function(){}}),function(t,e){t.eachseriesbytype("funnel",function(t){var i=t.getdata(),n=i.mapdimension("value"),a=t.get("sort"),o=zv(t,e),r=bv(i,a),s=[ir(t.get("minsize"),o.width),ir(t.get("maxsize"),o.width)],l=i.getdataextent(n),u=t.get("min"),h=t.get("max");null==u&&(u=math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelalign"),d=t.get("gap"),f=(o.height-d*(i.count()-1))/i.count(),p=o.y,g=function(t,e){var a,r=i.get(n,t)||0,l=mr(r,[u,h],s,!0);switch(c){case"left":a=o.x;break;case"center":a=o.x+(o.width-l)/2;break;case"right":a=o.x+o.width-l}return[[a,e],[a+l,e]]};"ascending"===a&&(f=-f,d=-d,p+=o.height,r=r.reverse());for(var m=0;m=0&&(r[o[s].depth]=new vr(o[s],this,e));if(a&&n){var l=gn(a,n,this,!0,i);return l.data}},setnodeposition:function(t,e){var i=this.option.data[t];i.localx=e[0],i.localy=e[1]},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},formattooltip:function(t,e,i){if("edge"===i){var n=this.getdataparams(t,i),a=n.data,o=a.source+" -- "+a.target;return n.value&&(o+=" : "+n.value),hr(o)}if("node"===i){var r=this.getgraph().getnodebyindex(t),s=r.getlayout().value,l=this.getdataparams(t,i).data.name;if(s)var o=l+" : "+s;return hr(o)}return rr.supercall(this,"formattooltip",t,e)},optionupdated:function(){var t=this.option;t.focusnodeadjacency===!0&&(t.focusnodeadjacency="alledges")},getdataparams:function(t,e){var i=rr.supercall(this,"getdataparams",t,e);if(null==i.value&&"node"===e){var n=this.getgraph().getnodebyindex(t),a=n.getlayout().value;i.value=a}return i},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodewidth:20,nodegap:8,draggable:!0,focusnodeadjacency:!1,layoutiterations:32,label:{show:!0,position:"right",color:"#000",fontsize:12},levels:[],nodealign:"justify",itemstyle:{borderwidth:1,bordercolor:"#333"},linestyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},linestyle:{opacity:.5}},animationeasing:"linear",animationduration:1e3}}),zr=["itemstyle","opacity"],br=["emphasis","itemstyle","opacity"],vr=["linestyle","opacity"],gr=["emphasis","linestyle","opacity"],fr=xo({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildpath:function(t,e){var i=e.extent;t.moveto(e.x1,e.y1),t.beziercurveto(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineto(e.x2+i,e.y2),t.beziercurveto(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineto(e.x2,e.y2+i),t.beziercurveto(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closepath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});vu({type:"sankey",_model:null,_focusadjacencydisabled:!1,render:function(t,e,i){var n=this,a=t.getgraph(),o=this.group,r=t.layoutinfo,s=r.width,l=r.height,u=t.getdata(),h=t.getdata("edge"),c=t.get("orient");this._model=t,o.removeall(),o.attr("position",[r.x,r.y]),a.eachedge(function(e){var i=new fr;i.dataindex=e.dataindex,i.seriesindex=t.seriesindex,i.datatype="edge";var n,a,r,u,d,f,p,g,m=e.getmodel("linestyle"),v=m.get("curveness"),y=e.node1.getlayout(),x=e.node1.getmodel(),_=x.get("localx"),w=x.get("localy"),b=e.node2.getlayout(),s=e.node2.getmodel(),m=s.get("localx"),i=s.get("localy"),t=e.getlayout();switch(i.shape.extent=math.max(1,t.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+t.sy,a=(null!=w?w*l:y.y)+y.dy,r=(null!=m?m*s:b.x)+t.ty,u=null!=i?i*l:b.y,d=n,f=a*(1-v)+u*v,p=r,g=a*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,a=(null!=w?w*l:y.y)+t.sy,r=null!=m?m*s:b.x,u=(null!=i?i*l:b.y)+t.ty,d=n*(1-v)+r*v,f=a,p=n*v+r*(1-v),g=u),i.setshape({x1:n,y1:a,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setstyle(m.getitemstyle()),i.style.fill){case"source":i.style.fill=e.node1.getvisual("color");break;case"target":i.style.fill=e.node2.getvisual("color")}wo(i,e.getmodel("emphasis.linestyle").getitemstyle()),o.add(i),h.setitemgraphicel(e.dataindex,i)}),a.eachnode(function(e){var i=e.getlayout(),n=e.getmodel(),a=n.get("localx"),r=n.get("localy"),h=n.getmodel("label"),c=n.getmodel("emphasis.label"),d=new pa({shape:{x:null!=a?a*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getmodel("itemstyle").getitemstyle()}),f=e.getmodel("emphasis.itemstyle").getitemstyle();xo(d.style,f,h,c,{labelfetcher:t,labeldataindex:e.dataindex,defaulttext:e.id,isrecttext:!0}),d.setstyle("fill",e.getvisual("color")),wo(d,f),o.add(d),u.setitemgraphicel(e.dataindex,d),d.datatype="node"}),u.eachitemgraphicel(function(e,a){var o=u.getitemmodel(a);o.get("draggable")&&(e.drift=function(e,o){n._focusadjacencydisabled=!0,this.shape.x+=e,this.shape.y+=o,this.dirty(),i.dispatchaction({type:"dragnode",seriesid:t.id,dataindex:u.getrawindex(a),localx:this.shape.x/s,localy:this.shape.y/l})},e.ondragend=function(){n._focusadjacencydisabled=!1},e.draggable=!0,e.cursor="move"),e.highlight=function(){this.trigger("emphasis")},e.downplay=function(){this.trigger("normal")},e.focusnodeadjhandler&&e.off("mouseover",e.focusnodeadjhandler),e.unfocusnodeadjhandler&&e.off("mouseout",e.unfocusnodeadjhandler),o.get("focusnodeadjacency")&&(e.on("mouseover",e.focusnodeadjhandler=function(){n._focusadjacencydisabled||(n._cleartimer(),i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,dataindex:e.dataindex}))}),e.on("mouseout",e.unfocusnodeadjhandler=function(){n._focusadjacencydisabled||n._dispatchunfocus(i)}))}),h.eachitemgraphicel(function(e,a){var o=h.getitemmodel(a);e.focusnodeadjhandler&&e.off("mouseover",e.focusnodeadjhandler),e.unfocusnodeadjhandler&&e.off("mouseout",e.unfocusnodeadjhandler),o.get("focusnodeadjacency")&&(e.on("mouseover",e.focusnodeadjhandler=function(){n._focusadjacencydisabled||(n._cleartimer(),i.dispatchaction({type:"focusnodeadjacency",seriesid:t.id,edgedataindex:e.dataindex}))}),e.on("mouseout",e.unfocusnodeadjhandler=function(){n._focusadjacencydisabled||n._dispatchunfocus(i)}))}),!this._data&&t.get("animation")&&o.setclippath(hv(o.getboundingrect(),t,function(){o.removeclippath()})),this._data=t.getdata()},dispose:function(){this._cleartimer()},_dispatchunfocus:function(t){var e=this;this._cleartimer(),this._unfocusdelaytimer=settimeout(function(){e._unfocusdelaytimer=null,t.dispatchaction({type:"unfocusnodeadjacency",seriesid:e._model.id})},500)},_cleartimer:function(){this._unfocusdelaytimer&&(cleartimeout(this._unfocusdelaytimer),this._unfocusdelaytimer=null)},focusnodeadjacency:function(t,e,i,n){var a=t.getdata(),o=a.graph,r=n.dataindex,s=a.getitemmodel(r),l=n.edgedataindex;if(null!=r||null!=l){var u=o.getnodebyindex(r),h=o.getedgebyindex(l);if(o.eachnode(function(t){fv(t,zr,.1)}),o.eachedge(function(t){fv(t,vr,.1)}),u){wv(u,br);var c=s.get("focusnodeadjacency");"outedges"===c?f(u.outedges,function(t){t.dataindex<0||(wv(t,gr),wv(t.node2,br))}):"inedges"===c?f(u.inedges,function(t){t.dataindex<0||(wv(t,gr),wv(t.node1,br))}):"alledges"===c&&f(u.edges,function(t){t.dataindex<0||(wv(t,gr),t.node1!==u&&wv(t.node1,br),t.node2!==u&&wv(t.node2,br))})}h&&(wv(h,gr),wv(h.node1,br),wv(h.node2,br))}},unfocusnodeadjacency:function(t){var e=t.getgraph();e.eachnode(function(t){fv(t,zr)}),e.eachedge(function(t){fv(t,vr)})}}),cu({type:"dragnode",event:"dragnode",update:"update"},function(t,e){e.eachcomponent({maintype:"series",subtype:"sankey",query:t},function(e){e.setnodeposition(t.dataindex,[t.localx,t.localy])})});var wr=function(t,e){t.eachseriesbytype("sankey",function(t){var i=t.get("nodewidth"),n=t.get("nodegap"),a=zv(t,e);t.layoutinfo=a;var o=a.width,r=a.height,s=t.getgraph(),l=s.nodes,u=s.edges;xv(l);var h=m(l,function(t){return 0===t.getlayout().value}),c=0!==h.length?0:t.get("layoutiterations"),d=t.get("orient"),f=t.get("nodealign");uv(l,u,i,n,o,r,c,d,f)})},hr=function(t){t.eachseriesbytype("sankey",function(t){var e=t.getgraph(),i=e.nodes;if(i.length){var n=1/0,a=-1/0;f(i,function(t){var e=t.getlayout().value;n>e&&(n=e),e>a&&(a=e)}),f(i,function(e){var i=new qo({type:"color",mappingmethod:"linear",dataextent:[n,a],visual:t.get("color")}),o=i.mapvaluetovisual(e.getlayout().value),r=e.getmodel().get("itemstyle.color");null!=r?e.setvisual("color",r):e.setvisual("color",o)})}})};pu(wr),ou(hr);var zr=function(t,e,i,n,a){ck.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};zr.prototype={constructor:zr,model:null,ishorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointtodata:function(t,e){return this.coordinatesystem.pointtodata(t,e)[0]},toglobalcoord:null,tolocalcoord:null},h(zr,ck),hy.prototype={type:"singleaxis",axispointerenabled:!0,constructor:hy,_init:function(t){var e=this.dimension,i=new zr(e,xh(t),[0,0],t.get("type"),t.get("position")),n="category"===i.type;i.onband=n&&t.get("boundarygap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinatesystem=this,this._axis=i},update:function(t){t.eachseries(function(t){if(t.coordinatesystem===this){var e=t.getdata();f(e.mapdimension(this.dimension,!0),function(t){this._axis.scale.unionextentfromdata(e,t)},this),uh(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=ts({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getwidth(),height:e.getheight()}),this._adjustaxis()},getrect:function(){return this._rect},_adjustaxis:function(){var t=this._rect,e=this._axis,i=e.ishorizontal(),n=i?[0,t.width]:[0,t.height],a=e.reverse?1:0;e.setextent(n[a],n[1-a]),this._updateaxistransform(e,i?t.x:t.y)},_updateaxistransform:function(t,e){var i=t.getextent(),n=i[0]+i[1],a=t.ishorizontal();t.toglobalcoord=a?function(t){return t+e}:function(t){return n-t+e},t.tolocalcoord=a?function(t){return t-e}:function(t){return n-t+e}},getaxis:function(){return this._axis},getbaseaxis:function(){return this._axis},getaxes:function(){return[this._axis]},gettooltipaxes:function(){return{baseaxes:[this.getaxis()]}},containpoint:function(t){var e=this.getrect(),i=this.getaxis(),n=i.orient;return"horizontal"===n?i.contain(i.tolocalcoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.tolocalcoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointtodata:function(t){var e=this.getaxis();return[e.coordtodata(e.tolocalcoord(t["horizontal"===e.orient?0:1]))]},datatopoint:function(t){var e=this.getaxis(),i=this.getrect(),n=[],a="horizontal"===e.orient?0:1;return t instanceof array&&(t=t[0]),n[a]=e.toglobalcoord(e.datatocoord(+t)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}},ls.register("single",{create:cy,dimensions:hy.prototype.dimensions});var ur=["axisline","axisticklabel","axisname"],xr=["splitarea","splitline"],yr=hp.extend({type:"singleaxis",axispointerclass:"singleaxispointer",render:function(t,e,i,n){var a=this.group;a.removeall();var o=this._axisgroup;this._axisgroup=new fm;var r=dy(t),s=new np(t,r);f(ur,s.add,s),a.add(this._axisgroup),a.add(s.getgroup()),f(xr,function(e){t.get(e+".show")&&this["_"+e](t)},this),ur(o,this._axisgroup,t),yr.supercall(this,"render",t,e,i,n)},remove:function(){md(this)},_splitline:function(t){var e=t.axis;if(!e.scale.isblank()){var i=t.getmodel("splitline"),n=i.getmodel("linestyle"),a=n.get("width"),o=n.get("color");o=o instanceof array?o:[o];for(var r=t.coordinatesystem.getrect(),s=e.ishorizontal(),l=[],u=0,h=e.gettickscoords({tickmodel:i}),c=[],d=[],f=0;fr||_(r))return{point:[]};var s=o.getitemgraphicel(r),l=i.coordinatesystem;if(i.gettooltipposition)n=i.gettooltipposition(r)||[];else if(l&&l.datatopoint)n=l.datatopoint(o.getvalues(p(l.dimensions,function(t){return o.mapdimension(t)}),r,!0))||[];else if(s){var u=s.getboundingrect().clone();u.applytransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},$r=f,jr=x,qr=ca(),tz=function(t,e,i){var n=t.currtrigger,a=[t.x,t.y],o=t,r=t.dispatchaction||y(i.dispatchaction,i),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){sy(a)&&(a=kr({seriesindex:o.seriesindex,dataindex:o.dataindex},e).point);var l=sy(a),u=o.axesinfo,h=s.axesinfo,c="leave"===n||sy(a),d={},f={},p={list:[],map:{}},g={showpointer:jr(my,f),showtooltip:jr(vy,p)};$r(s.coordsysmap,function(t,e){var i=l||t.containpoint(a);$r(s.coordsysaxesinfo[e],function(t){var e=t.axis,n=wy(u,t);if(!c&&i&&(!u||n)){var o=n&&n.value;null!=o||l||(o=e.pointtodata(a)),null!=o&&py(t,o,g,!1,d)}})});var m={};return $r(h,function(t,e){var i=t.linkgroup;i&&!f[e]&&$r(i.axesinfo,function(e,n){var a=f[n];if(e!==t&&a){var o=a.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,by(e),by(t)))),m[t.key]=o}})}),$r(m,function(t,e){py(h[e],t,g,!0,d)}),yy(f,h,d),xy(p,a,t,r),_y(h,r,i),d}},ez=(ru({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}}}),ca()),iz=f,nz=zu({type:"axispointer",render:function(t,e,i){var n=e.getcomponent("tooltip"),a=t.get("triggeron")||n&&n.get("triggeron")||"mousemove|click";my("axispointer",i,function(t,e,i){"none"!==a&&("leave"===t||a.indexof(t)>=0)&&i({type:"updateaxispointer",currtrigger:t,x:e&&e.offsetx,y:e&&e.offsety})})},remove:function(t,e){ly(e.getzr(),"axispointer"),nz.superapply(this._model,"remove",arguments)},dispose:function(t,e){ly("axispointer",e),nz.superapply(this._model,"dispose",arguments)}}),az=ca(),oz=n,rz=y;ky.prototype={_group:null,_lastgraphickey:null,_handle:null,_dragging:!1,_lastvalue:null,_laststatus:null,_payloadinfo:null,animationthreshold:15,render:function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axismodel=t,this._axispointermodel=e,this._api=i,n||this._lastvalue!==a||this._laststatus!==o){this._lastvalue=a,this._laststatus=o;var r=this._group,s=this._handle;if(!o||"hide"===o)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeeloption(l,a,t,e,i);var u=l.graphickey;u!==this._lastgraphickey&&this.clear(i),this._lastgraphickey=u;var h=this._moveanimation=this.determineanimation(t,e);if(r){var c=x(py,e,h);this.updatepointerel(r,l,c,e),this.updatelabelel(r,l,c,e)}else r=this._group=new fm,this.createpointerel(r,l,t,e),this.createlabelel(r,l,t,e),i.getzr().add(r);ry(r,e,!0),this._renderhandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineanimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,o=e.get("snap");if(!o&&!a)return!1;if("auto"===i||null==i){var r=this.animationthreshold;if(a&&n.getbandwidth()>r)return!0;if(o){var s=md(t).seriesdatacount,l=n.getextent();return math.abs(l[0]-l[1])/s>r}return!1}return i===!0},makeeloption:function(){},createpointerel:function(t,e){var i=e.pointer;if(i){var n=az(t).pointerel=new va[i.type](oz(e.pointer));t.add(n)}},createlabelel:function(t,e,i,n){if(e.label){var a=az(t).labelel=new pa(oz(e.label));t.add(a),ey(a,n)}},updatepointerel:function(t,e,i){var n=az(t).pointerel;n&&e.pointer&&(n.setstyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updatelabelel:function(t,e,i,n){var a=az(t).labelel;a&&(a.setstyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),ey(a,n))},_renderhandle:function(t){if(!this._dragging&&this.updatehandletransform){var e=this._axispointermodel,i=this._api.getzr(),n=this._handle,a=e.getmodel("handle"),o=e.get("status");if(!a.get("show")||!o||"hide"===o)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=dr(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){im(t.event)},onmousedown:rz(this._onhandledragmove,this,0,0),drift:rz(this._onhandledragmove,this),ondragend:rz(this._onhandledragend,this)}),i.add(n)),ry(n,e,!1);var s=["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"];n.setstyle(a.getitemstyle(null,s));var l=a.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),bl(this,"_dodispatchaxispointer",a.get("throttle")||0,"fixrate"),this._movehandletovalue(t,r)}},_movehandletovalue:function(t,e){py(this._axispointermodel,!e&&this._moveanimation,this._handle,ny(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},_onhandledragmove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updatehandletransform(ny(i),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=n,i.stopanimation(),i.attr(ny(n)),az(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]}}},ky.prototype.constructor=ky,_a(ky);var sz=ky.extend({makeeloption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=xy(r,o).getotheraxis(o).getglobalextent(),u=o.toglobalcoord(o.datatocoord(e,!0));if(s&&"none"!==s){var h=zy(n),c=lz[s](o,u,l);c.style=h,t.graphickey=c.type,t.pointer=c}var d=bd(r.model,i);wy(e,t,d,i,n,a)},gethandletransform:function(t,e,i){var n=bd(e.axis.grid.model,e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:fy(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i){var n=i.axis,a=n.grid,o=n.getglobalextent(!0),r=xy(a,n).getotheraxis(n).getglobalextent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=math.min(o[1],l[s]),l[s]=math.max(o[0],l[s]); var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalalign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorpoint:h,tooltipoption:c[s]}}}),lz={line:function(t,e,i){var n=hy([e,i[0]],[e,i[1]],yy(t));return{type:"line",subpixeloptimize:!0,shape:n}},shadow:function(t,e,i){var n=math.max(1,t.getbandwidth()),a=i[1]-i[0];return{type:"rect",shape:zy([e-n/2,i[0]],[n,a],yy(t))}}};hp.registeraxispointerclass("cartesianaxispointer",sz),tu(function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!_(e)&&(t.axispointer.link=[e])}}),au(el.processor.statistic,function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=ud(t,e)}),cu({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},tz);var uz=["x","y"],hz=["width","height"],cz=ky.extend({makeeloption:function(t,e,i,n,a){var o=i.axis,r=o.coordinatesystem,s=qy(r,1-jy(o)),l=r.datatopoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=zy(n),c=dz[u](o,l,s);c.style=h,t.graphickey=c.type,t.pointer=c}var d=dy(i);wy(e,t,d,i,n,a)},gethandletransform:function(t,e,i){var n=dy(e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:fy(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i){var n=i.axis,a=n.coordinatesystem,o=jy(n),r=qy(a,o),s=t.position;s[o]+=e[o],s[o]=math.min(r[1],s[o]),s[o]=math.max(r[0],s[o]);var l=qy(a,1-o),u=(l[1]+l[0])/2,h=[u,u];return h[o]=s[o],{position:s,rotation:t.rotation,cursorpoint:h,tooltipoption:{verticalalign:"middle"}}}}),dz={line:function(t,e,i){var n=hy([e,i[0]],[e,i[1]],jy(t));return{type:"line",subpixeloptimize:!0,shape:n}},shadow:function(t,e,i){var n=t.getbandwidth(),a=i[1]-i[0];return{type:"rect",shape:zy([e-n/2,i[0]],[n,a],jy(t))}}};hp.registeraxispointerclass("singleaxispointer",cz),zu({type:"single"});var fz=2,pz=$d.extend({type:"series.themeriver",dependencies:["singleaxis"],namemap:null,init:function(){pz.superapply(this,"init",arguments),this.legendvisualprovider=new kd(y(this.getdata,this),y(this.getrawdata,this))},fixdata:function(t){var e=t.length,i=va(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,datalist:t})});for(var a=n.length,o=-1,r=-1,s=0;a>s;++s){var l=n[s].datalist.length;l>o&&(o=l,r=s)}for(var u=0;a>u;++u)if(u!==r)for(var h=n[u].name,c=0;o>c;++c){for(var d=n[r].datalist[c][0],f=n[u].datalist.length,p=-1,g=0;f>g;++g){var m=n[u].datalist[g][0];if(m===d){p=g;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getinitialdata:function(t,e){for(var i=e.querycomponents({maintype:"singleaxis",index:this.get("singleaxisindex"),id:this.get("singleaxisid")})[0],n=i.get("type"),a=m(t.data,function(t){return void 0!==t[2]}),o=this.fixdata(a||[]),r=[],s=this.namemap=b(),l=0,u=0;un;++n)i[n]=n;var a=t.mapdimension("single"),o=va(i,function(e){return t.get("name",e)}),r=[];return o.buckets.each(function(e,i){e.sort(function(e,i){return t.get(a,e)-t.get(a,i)}),r.push({name:i,indices:e})}),r},getaxistooltipdata:function(t,e){_(t)||(t=t?[t]:[]);for(var i,n=this.getdata(),a=this.getlayerseries(),o=[],r=a.length,s=0;r>s;++s){for(var l=number.max_value,u=-1,h=a[s].indices.length,c=0;h>c;++c){var d=n.get(t[0],a[s].indices[c]),f=math.abs(d-e);l>=f&&(i=d,l=f,u=a[s].indices[c])}o.push(u)}return{dataindices:o,nestestvalue:i}},formattooltip:function(t){var e=this.getdata(),i=e.getname(t),n=e.get(e.mapdimension("value"),t);return(isnan(n)||null==n)&&(n="-"),hr(i+" : "+n)},defaultoption:{zlevel:0,z:2,coordinatesystem:"singleaxis",boundarygap:["10%","10%"],singleaxisindex:0,animationeasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontsize:11},emphasis:{label:{show:!0}}}});vu({type:"themeriver",init:function(){this._layers=[]},render:function(t){function e(t){return t.name}function i(e,i,s){var l=this._layers;if("remove"===e)return void a.remove(l[i]);for(var u,h=[],d=[],f=o[i].indices,p=0;pn[1]&&n.reverse(),{coordsys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:y(function(n){var a=e.datatoradius(n[0]),o=i.datatoangle(n[1]),r=t.coordtopoint([a,o]);return r.push(a,o*math.pi/180),r}),size:y(tx,t)}}},iz=function(t){var e=t.getrect(),i=t.getrangeinfo();return{coordsys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellwidth:t.getcellwidth(),cellheight:t.getcellheight(),rangeinfo:{start:i.start,end:i.end,weeks:i.weeks,daycount:i.allday}},api:{coord:function(e,i){return t.datatopoint(e,i)}}}},tz=ca,az=["itemstyle"],dz=["emphasis","itemstyle"],cz=["label"],lz=["emphasis","label"],kz="e\x00\x00",pz={cartesian2d:wz,geo:bz,singleaxis:sz,polar:mz,calendar:iz};$d.extend({type:"series.custom",dependencies:["grid","polar","geo","singleaxis","calendar"],defaultoption:{coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0,usetransform:!0,clip:!1},getinitialdata:function(){return xh(this.getsource(),this)},getdataparams:function(t,e,i){var n=$d.prototype.getdataparams.apply(this,arguments);return i&&(n.info=i.info),n}}),ml.extend({type:"custom",_data:null,render:function(t,e,i,n){var a=this._data,o=t.getdata(),r=this.group,s=lx(t,o,e,i);o.diff(a).add(function(e){px(null,e,s(e,n),t,r,o)}).update(function(e,i){var l=a.getitemgraphicel(i);px(l,e,s(e,n),t,r,o)}).remove(function(t){var e=a.getitemgraphicel(t);e&&r.remove(e)}).execute();var l=t.get("clip",!0)?fc(t.coordinatesystem,!1,t):null;l?r.setclippath(l):r.removeclippath(),this._data=o},incrementalpreparerender:function(){this.group.removeall(),this._data=null},incrementalrender:function(t,e,i,n,a){function o(t){t.isgroup||(t.incremental=!0,t.usehoverlayer=!0)}for(var r=e.getdata(),s=lx(e,r,i,n),l=t.start;lc?c=f:(d.lasttickcount=a,d.lastautointerval=c),c}},h(qx,ck);var ez=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusaxis=new jx,this._angleaxis=new qx,this._radiusaxis.polar=this._angleaxis.polar=this};ez.prototype={type:"polar",axispointerenabled:!0,constructor:ez,dimensions:["radius","angle"],model:null,containpoint:function(t){var e=this.pointtocoord(t);return this._radiusaxis.contain(e[0])&&this._angleaxis.contain(e[1])},containdata:function(t){return this._radiusaxis.containdata(t[0])&&this._angleaxis.containdata(t[1])},getaxis:function(t){return this["_"+t+"axis"]},getaxes:function(){return[this._radiusaxis,this._angleaxis]},getaxesbyscale:function(t){var e=[],i=this._angleaxis,n=this._radiusaxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getangleaxis:function(){return this._angleaxis},getradiusaxis:function(){return this._radiusaxis},getotheraxis:function(t){var e=this._angleaxis;return t===e?this._radiusaxis:e},getbaseaxis:function(){return this.getaxesbyscale("ordinal")[0]||this.getaxesbyscale("time")[0]||this.getangleaxis()},gettooltipaxes:function(t){var e=null!=t&&"auto"!==t?this.getaxis(t):this.getbaseaxis();return{baseaxes:[e],otheraxes:[this.getotheraxis(e)]}},datatopoint:function(t,e){return this.coordtopoint([this._radiusaxis.datatoradius(t[0],e),this._angleaxis.datatoangle(t[1],e)])},pointtodata:function(t,e){var i=this.pointtocoord(t);return[this._radiusaxis.radiustodata(i[0],e),this._angleaxis.angletodata(i[1],e)]},pointtocoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getangleaxis(),a=n.getextent(),o=math.min(a[0],a[1]),r=math.max(a[0],a[1]);n.inverse?o=r-360:r=o+360;var s=math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=math.atan2(-i,e)/math.pi*180,u=o>l?1:-1;o>l||l>r;)l+=360*u;return[s,l]},coordtopoint:function(t){var e=t[0],i=t[1]/180*math.pi,n=math.cos(i)*e+this.cx,a=-math.sin(i)*e+this.cy;return[n,a]},getarea:function(){var t=this.getangleaxis(),e=this.getradiusaxis(),i=e.getextent().slice();i[0]>i[1]&&i.reverse();var n=t.getextent(),a=math.pi/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startangle:-n[0]*a,endangle:-n[1]*a,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,a=i*i+n*n,o=this.r,r=this.r0;return o*o>=a&&a>=r*r}}}};var nz=hd.extend({type:"polaraxis",axis:null,getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"polar",index:this.option.polarindex,id:this.option.polarid})[0]}});a(nz.prototype,pk);var rz={angle:{startangle:90,clockwise:!0,splitnumber:12,axislabel:{rotate:!1}},radius:{splitnumber:5}};bk("angle",nz,kx,rz.angle),bk("radius",nz,kx,rz.radius),ru({type:"polar",dependencies:["polaraxis","angleaxis"],coordinatesystem:null,findaxismodel:function(t){var e,i=this.ecmodel;return i.eachcomponent(t,function(t){t.getcoordsysmodel()===this&&(e=t)},this),e},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var zz={dimensions:ez.prototype.dimensions,create:function(t,e){var i=[];return t.eachcomponent("polar",function(t,n){var a=new ez(n);a.update=jx;var o=a.getradiusaxis(),r=a.getangleaxis(),s=t.findaxismodel("radiusaxis"),l=t.findaxismodel("angleaxis");qx(o,s),qx(r,l),$x(a,t,e),i.push(a),t.coordinatesystem=a,a.model=t}),t.eachseries(function(e){if("polar"===e.get("coordinatesystem")){var i=t.querycomponents({maintype:"polar",index:e.get("polarindex"),id:e.get("polarid")})[0];e.coordinatesystem=i.coordinatesystem}}),i}};ls.register("polar",zz);var bz=["axisline","axislabel","axistick","minortick","splitline","minorsplitline","splitarea"];hp.extend({type:"angleaxis",axispointerclass:"polaraxispointer",render:function(t){if(this.group.removeall(),t.get("show")){var e=t.axis,i=e.polar,a=i.getradiusaxis().getextent(),o=e.gettickscoords(),r=e.getminortickscoords(),s=p(e.getviewlabels(),function(t){var t=n(t);return t.coord=e.datatocoord(t.tickvalue),t});i_(s),i_(o),f(bz,function(n){!t.get(n+".show")||e.scale.isblank()&&"axisline"!==n||this["_"+n](t,i,o,r,a,s)},this)}},_axisline:function(t,e,i,n,a){var o,r=t.getmodel("axisline.linestyle"),s=e_(e),l=s?0:1;o=0===a[l]?new na({shape:{cx:e.cx,cy:e.cy,r:a[s]},style:r.getlinestyle(),z2:1,silent:!0}):new sa({shape:{cx:e.cx,cy:e.cy,r:a[s],r0:a[l]},style:r.getlinestyle(),z2:1,silent:!0}),o.style.fill=null,this.group.add(o)},_axistick:function(t,e,i,n,a){var o=t.getmodel("axistick"),r=(o.get("inside")?-1:1)*o.get("length"),l=a[e_(e)],u=p(i,function(t){return new ma({shape:t_(e,[l,l+r],t.coord)})});this.group.add(na(u,{style:s(o.getmodel("linestyle").getlinestyle(),{stroke:t.get("axisline.linestyle.color")})}))},_minortick:function(t,e,i,n,a){if(n.length){for(var o=t.getmodel("axistick"),r=t.getmodel("minortick"),l=(o.get("inside")?-1:1)*r.get("length"),u=a[e_(e)],h=[],c=0;cd?"left":"right",g=math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";r&&r[o]&&r[o].textstyle&&(n=new vr(r[o].textstyle,s,s.ecmodel));var m=new ia({silent:np.islabelsilent(t)});this.group.add(m),jo(m.style,n,{x:c[0],y:c[1],textfill:n.gettextcolor()||t.get("axisline.linestyle.color"),text:i.formattedlabel,textalign:p,textverticalalign:g}),u&&(m.eventdata=np.makeaxiseventdatabase(t),m.eventdata.targettype="axislabel",m.eventdata.value=i.rawlabel)},this)},_splitline:function(t,e,i,n,a){var o=t.getmodel("splitline"),r=o.getmodel("linestyle"),l=r.get("color"),u=0;l=l instanceof array?l:[l];for(var h=[],c=0;ci?"0"+i:i;var n=t.getdate();n=10>n?"0"+n:n;var a=t.getday();return a=math.abs((a+7-this.getfirstdayofweek())%7),{y:e,m:i,d:n,day:a,time:t.gettime(),formateddate:e+"-"+i+"-"+n,date:t}},getnextnday:function(t,e){return e=e||0,0===e?this.getdateinfo(t):(t=new date(this.getdateinfo(t).time),t.setdate(t.getdate()+e),this.getdateinfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstdayofweek=+this._model.getmodel("daylabel").get("firstday"),this._orient=this._model.get("orient"),this._linewidth=this._model.getmodel("itemstyle").getitemstyle().linewidth||0,this._rangeinfo=this._getrangeinfo(this._initrangeoption());var n=this._rangeinfo.weeks||1,a=["width","height"],o=this._model.get("cellsize").slice(),r=this._model.getboxlayoutparams(),s="horizontal"===this._orient?[n,7]:[7,n];f([0,1],function(t){i(o,t)&&(r[a[t]]=o[t]*s[t])});var l={width:e.getwidth(),height:e.getheight()},u=this._rect=ts(r,l);f([0,1],function(t){i(o,t)||(o[t]=u[a[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},datatopoint:function(t,e){_(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getdateinfo(t),n=this._rangeinfo,a=i.formateddate;if(e&&!(i.time>=n.start.time&&i.timeo.end.time&&t.reverse(),t},_getrangeinfo:function(t){t=[this.getdateinfo(t[0]),this.getdateinfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=math.floor(t[1].time/zz)-math.floor(t[0].time/zz)+1,n=new date(t[0].time),a=n.getdate(),o=t[1].date.getdate();if(n.setdate(a+i-1),n.getdate()!==o)for(var r=n.gettime()-t[1].time>0?1:-1;n.getdate()!==o&&(n.gettime()-t[1].time)*r>0;)i-=r,n.setdate(a+i-1);var s=math.floor((i+t[0].day+6)/7),l=e?-s+1:s-1;return e&&t.reverse(),{range:[t[0].formateddate,t[1].formateddate],start:t[0],end:t[1],allday:i,weeks:s,nthweek:l,fweek:t[0].day,lweek:t[1].day}},_getdatebyweeksandday:function(t,e,i){var n=this._getrangeinfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new date(n.start.time);return o.setdate(n.start.d+a),this.getdateinfo(o)}},r_.dimensions=r_.prototype.dimensions,r_.getdimensionsinfo=r_.prototype.getdimensionsinfo,r_.create=function(t,e){var i=[];return t.eachcomponent("calendar",function(n){var a=new r_(n,t,e);i.push(a),n.coordinatesystem=a}),t.eachseries(function(t){"calendar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("calendarindex")||0])}),i},ls.register("calendar",r_);var uz=hd.extend({type:"calendar",coordinatesystem:null,defaultoption:{zlevel:0,z:2,left:80,top:60,cellsize:20,orient:"horizontal",splitline:{show:!0,linestyle:{color:"#000",width:1,type:"solid"}},itemstyle:{color:"#fff",borderwidth:1,bordercolor:"#ccc"},daylabel:{show:!0,firstday:0,position:"start",margin:"50%",namemap:"en",color:"#000"},monthlabel:{show:!0,position:"start",margin:5,align:"center",namemap:"en",formatter:null,color:"#000"},yearlabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontfamily:"sans-serif",fontweight:"bolder",fontsize:20}},init:function(t){var e=as(t);uz.superapply(this,"init",arguments),l_(t,e)},mergeoption:function(t){uz.superapply(this,"mergeoption",arguments),l_(this.option,t)}}),xz={en:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},yz={en:["s","m","t","w","t","f","s"],cn:["日","一","二","三","四","五","六"]};zu({type:"calendar",_tlpoints:null,_blpoints:null,_firstdayofmonth:null,_firstdaypoints:null,render:function(t){var e=this.group;e.removeall();var i=t.coordinatesystem,n=i.getrangeinfo(),a=i.getorient();this._renderdayrect(t,n,e),this._renderlines(t,n,a,e),this._renderyeartext(t,n,a,e),this._rendermonthtext(t,a,e),this._renderweektext(t,n,a,e)},_renderdayrect:function(t,e,i){for(var n=t.coordinatesystem,a=t.getmodel("itemstyle").getitemstyle(),o=n.getcellwidth(),r=n.getcellheight(),s=e.start.time;s<=e.end.time;s=n.getnextnday(s,1).time){var l=n.datatorect([s],!1).tl,u=new pa({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(u)}},_renderlines:function(t,e,i,n){function a(e){o._firstdayofmonth.push(r.getdateinfo(e)),o._firstdaypoints.push(r.datatorect([e],!1).tl);var a=o._getlinepointsofoneweek(t,e,i);o._tlpoints.push(a[0]),o._blpoints.push(a[a.length-1]),l&&o._drawsplitline(a,s,n)}var o=this,r=t.coordinatesystem,s=t.getmodel("splitline.linestyle").getlinestyle(),l=t.get("splitline.show"),u=s.linewidth;this._tlpoints=[],this._blpoints=[],this._firstdayofmonth=[],this._firstdaypoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){a(h.formateddate),0===c&&(h=r.getdateinfo(e.start.y+"-"+e.start.m));var d=h.date;d.setmonth(d.getmonth()+1),h=r.getdateinfo(d)}a(r.getnextnday(e.end.time,1).formateddate),l&&this._drawsplitline(o._getedgespoints(o._tlpoints,u,i),s,n),l&&this._drawsplitline(o._getedgespoints(o._blpoints,u,i),s,n)},_getedgespoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawsplitline:function(t,e,i){var n=new ca({z2:20,shape:{points:t},style:e});i.add(n)},_getlinepointsofoneweek:function(t,e,i){var n=t.coordinatesystem;e=n.getdateinfo(e);for(var a=[],o=0;7>o;o++){var r=n.getnextnday(e.time,o),s=n.datatorect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterlabel:function(t,e){return"string"==typeof t&&t?ur(t,e):"function"==typeof t?t(e):e.namemap},_yeartextpositioncontrol:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return("left"===n||"right"===n)&&(r=math.pi/2),{rotation:r,position:e,style:{textalign:o[0],textverticalalign:o[1]}}},_renderyeartext:function(t,e,i,n){var a=t.getmodel("yearlabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,namemap:d},g=this._formatterlabel(f,p),m=new ia({z2:30});jo(m.style,a,{text:g}),m.attr(this._yeartextpositioncontrol(m,c[r],i,r,o)),n.add(m)}},_monthtextpositioncontrol:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textalign:o,textverticalalign:r}},_rendermonthtext:function(t,e,i){var n=t.getmodel("monthlabel");if(n.get("show")){var a=n.get("namemap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];b(a)&&(a=xz[a.touppercase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;ff;f++){var p=o.getnextnday(c,f),g=o.datatorect([p.time],!1).center,m=f;m=math.abs((f+h)%7);var v=new ia({z2:30});r(jo(v.style,a,{text:l[m]}),this._weektextpositioncontrol(g,i,s,u,d)),n.add(v)}}}}),ru({type:"title",layoutmode:{type:"box",ignoresize:!0},defaultoption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderwidth:0,padding:5,itemgap:10,textstyle:{fontsize:18,fontweight:"bolder",color:"#333"},subtextstyle:{color:"#aaa"}}}),zu({type:"title",render:function(t,e,i){if(this.group.removeall(),t.get("show")){var n=this.group,a=t.getmodel("textstyle"),o=t.getmodel("subtextstyle"),r=t.get("textalign"),s=c(t.get("textbaseline"),t.get("textverticalalign")),l=new ia({style:jo({},a,{text:t.get("text"),textfill:a.gettextcolor()},{disablebox:!0}),z2:10}),u=l.getboundingrect(),h=t.get("subtext"),c=new ia({style:jo({},o,{text:h,textfill:o.gettextcolor(),y:u.height+t.get("itemgap"),textverticalalign:"top"},{disablebox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerevent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventdata=c.eventdata=p?{componenttype:"title",componentindex:t.componentindex}:null,n.add(l),h&&n.add(c);var g=n.getboundingrect(),m=t.getboxlayoutparams();m.width=g.width,m.height=g.height;var v=ts(m,{width:i.getwidth(),height:i.getheight()},t.get("padding"));r||(r=t.get("left")||t.get("right"),"middle"===r&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textalign:r,textverticalalign:s};l.setstyle(y),c.setstyle(y),g=n.getboundingrect();var x=v.margin,_=t.getitemstyle(["color","opacity"]);_.fill=t.get("backgroundcolor");var w=new pa({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderradius")},style:_,subpixeloptimize:!0,silent:!0});n.add(w)}}});var jz=uc.legend.selector,qz={all:{type:"all",title:n(jz.all)},inverse:{type:"inverse",title:n(jz.inverse)}},kz=ru({type:"legend.plain",dependencies:["series"],layoutmode:{type:"box",ignoresize:!0},init:function(t,e,i){this.mergedefaultandtheme(t,i),t.selected=t.selected||{},this._updateselector(t)},mergeoption:function(t){kz.supercall(this,"mergeoption",t),this._updateselector(t)},_updateselector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),_(e)&&f(e,function(t,i){b(t)&&(t={type:t}),e[i]=a(t,qz[t.type])})},optionupdated:function(){this._updatedata(this.ecmodel);var t=this._data;if(t[0]&&"single"===this.get("selectedmode")){for(var e=!1,i=0;i=0},getorient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},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",inactivebordercolor:"#ccc",itemstyle:{borderwidth:0},textstyle:{color:"#333"},selectedmode:!0,selector:!1,selectorlabel:{show:!0,borderradius:10,padding:[3,5,3,5],fontsize:12,fontfamily:" sans-serif",color:"#666",borderwidth:1,bordercolor:"#666"},emphasis:{selectorlabel:{show:!0,color:"#eee",backgroundcolor:"#666"}},selectorposition:"auto",selectoritemgap:7,selectorbuttongap:10,tooltip:{show:!1}}});cu("legendtoggleselect","legendselectchanged",x(u_,"toggleselected")),cu("legendallselect","legendselectall",x(u_,"allselect")),cu("legendinverseselect","legendinverseselect",x(u_,"inverseselect")),cu("legendselect","legendselected",x(u_,"select")),cu("legendunselect","legendunselected",x(u_,"unselect"));var $z=x,jz=f,qz=fm,tb=zu({type:"legend.plain",newlinedisabled:!1,init:function(){this.group.add(this._contentgroup=new qz),this._backgroundel,this.group.add(this._selectorgroup=new qz),this._isfirstrender=!0},getcontentgroup:function(){return this._contentgroup},getselectorgroup:function(){return this._selectorgroup},render:function(t,e,i){var n=this._isfirstrender;if(this._isfirstrender=!1,this.resetinner(),t.get("show",!0)){var a=t.get("align"),o=t.get("orient");a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===o?"right":"left");var r=t.get("selector",!0),l=t.get("selectorposition",!0);!r||l&&"auto"!==l||(l="horizontal"===o?"end":"start"),this.renderinner(a,t,e,i,r,o,l);var u=t.getboxlayoutparams(),h={width:i.getwidth(),height:i.getheight()},c=t.get("padding"),d=ts(u,h,c),f=this.layoutinner(t,a,d,n,r,l),p=ts(s({width:f.width,height:f.height},u),h,c);this.group.attr("position",[p.x-f.x,p.y-f.y]),this.group.add(this._backgroundel=c_(f,t))}},resetinner:function(){this.getcontentgroup().removeall(),this._backgroundel&&this.group.remove(this._backgroundel),this.getselectorgroup().removeall()},renderinner:function(t,e,i,n,a,o,r){var s=this.getcontentgroup(),l=b(),u=e.get("selectedmode"),h=[];i.eachrawseries(function(t){!t.get("legendhoverlink")&&h.push(t.id)}),jz(e.getdata(),function(a,o){var r=a.get("name");if(!this.newlinedisabled&&(""===r||"\n"===r))return void s.add(new qz({newline:!0}));var c=i.getseriesbyname(r)[0];if(!l.get(r))if(c){var d=c.getdata(),f=d.getvisual("color"),p=d.getvisual("bordercolor");"function"==typeof f&&(f=f(c.getdataparams(0))),"function"==typeof p&&(p=p(c.getdataparams(0)));var g=d.getvisual("legendsymbol")||"roundrect",m=d.getvisual("symbol"),v=this._createitem(r,o,a,e,g,m,t,f,p,u);v.on("click",$z(f_,r,null,n,h)).on("mouseover",$z(p_,c.name,null,n,h)).on("mouseout",$z(g_,c.name,null,n,h)),l.set(r,!0)}else i.eachrawseries(function(i){if(!l.get(r)&&i.legendvisualprovider){var s=i.legendvisualprovider;if(!s.containname(r))return;var c=s.indexofname(r),d=s.getitemvisual(c,"color"),f=s.getitemvisual(c,"bordercolor"),p="roundrect",g=this._createitem(r,o,a,e,p,null,t,d,f,u);g.on("click",$z(f_,null,r,n,h)).on("mouseover",$z(p_,null,r,n,h)).on("mouseout",$z(g_,null,r,n,h)),l.set(r,!0)}},this)},this),a&&this._createselector(a,e,n,o,r)},_createselector:function(t,e,i){function n(t){var n=t.type,o=new ia({style:{x:0,y:0,align:"center",verticalalign:"middle"},onclick:function(){i.dispatchaction({type:"all"===n?"legendallselect":"legendinverseselect"})}});a.add(o);var r=e.getmodel("selectorlabel"),s=e.getmodel("emphasis.selectorlabel");xo(o.style,o.hoverstyle={},r,s,{defaulttext:t.title,isrecttext:!1}),wo(o)}var a=this.getselectorgroup();jz(t,function(t){n(t)})},_createitem:function(t,e,i,n,a,o,s,l,u,h){var c=n.get("itemwidth"),d=n.get("itemheight"),f=n.get("inactivecolor"),p=n.get("inactivebordercolor"),g=n.get("symbolkeepaspect"),m=n.getmodel("itemstyle"),v=n.isselected(t),y=new qz,x=i.getmodel("textstyle"),_=i.get("icon"),w=i.getmodel("tooltip"),b=w.parentmodel;a=_||a;var s=ec(a,0,0,c,d,v?l:f,null==g?!0:g);if(y.add(d_(s,a,m,u,p,v)),!_&&o&&(o!==a||"none"===o)){var m=.8*d;"none"===o&&(o="circle");var i=ec(o,(c-m)/2,(d-m)/2,m,m,v?l:f,null==g?!0:g);y.add(d_(i,o,m,u,p,v))}var t="left"===s?c+5:-5,a=s,d=n.get("formatter"),c=t;"string"==typeof d&&d?c=d.replace("{name}",null!=t?t:""):"function"==typeof d&&(c=d(t)),y.add(new ia({style:jo({},x,{text:c,x:t,y:d/2,textfill:v?x.gettextcolor():f,textalign:a,textverticalalign:"middle"})}));var l=new pa({shape:y.getboundingrect(),invisible:!0,tooltip:w.get("show")?r({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterparams:{componenttype:"legend",legendindex:n.componentindex,name:t,$vars:["name"]}},w.option):null});return y.add(l),y.eachchild(function(t){t.silent=!0}),l.silent=!h,this.getcontentgroup().add(y),wo(y),y.__legenddataindex=e,y},layoutinner:function(t,e,i,n,a,o){var r=this.getcontentgroup(),s=this.getselectorgroup();sd(t.get("orient"),r,t.get("itemgap"),i.width,i.height);var l=r.getboundingrect(),u=[-l.x,-l.y];if(a){sd("horizontal",s,t.get("selectoritemgap",!0));var h=s.getboundingrect(),c=[-h.x,-h.y],d=t.get("selectorbuttongap",!0),f=t.getorient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===o?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=math.max(l[g],h[g]),v[m]=math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getboundingrect()},remove:function(){this.getcontentgroup().removeall(),this._isfirstrender=!0}}),eb=function(t){var e=t.findcomponents({maintype:"legend"});e&&e.length&&t.filterseries(function(t){for(var i=0;ii[a],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=c(t.get("pagebuttongap",!0),t.get("itemgap",!0));if(d){var v=t.get("pagebuttonposition",!0);"end"===v?g[n]+=i[a]-c[a]:p[n]+=c[a]+m}g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[a]=d?i[a]:h[a],y[o]=math.max(h[o],c[o]),y[r]=math.min(0,c[r]+g[1-n]),l.__rectsize=i[a],d){var x={x:0,y:0};x[a]=math.max(i[a]-c[a]-m,0),x[o]=y[o],l.setclippath(new pa({shape:x})),l.__rectsize=x[a]}else u.eachchild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getpageinfo(t);return null!=_.pageindex&&ar(s,{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 a=null!=e[n+"dataindex"],o=i.childofname(n);o&&(o.setstyle("fill",a?t.get("pageiconcolor",!0):t.get("pageiconinactivecolor",!0)),o.cursor=a?"pointer":"default")});var n=i.childofname("pagetext"),a=t.get("pageformatter"),o=e.pageindex,r=null!=o?o+1:0,s=e.pagecount;n&&a&&n.setstyle("text",b(a)?a.replace("{current}",r).replace("{total}",s):a({current:r,total:s}))},_getpageinfo:function(t){function e(t){if(t){var e=t.getboundingrect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legenddataindex}}}function i(t,e){return t.e>=e&&t.s<=e+o}var n=t.get("scrolldataindex",!0),a=this.getcontentgroup(),o=this._containergroup.__rectsize,r=t.getorient().index,s=ab[r],l=ob[r],u=this._findtargetitemindex(n),h=a.children(),c=h[u],d=h.length,f=d?1:0,p={contentposition:a.position.slice(),pagecount:f,pageindex:f-1,pageprevdataindex:null,pagenextdataindex:null};if(!c)return p;var g=e(c);p.contentposition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;d>=m;++m)x=e(h[m]),(!x&&y.e>v.s+o||x&&!i(x,v.s))&&(v=y.i>v.i?y:x,v&&(null==p.pagenextdataindex&&(p.pagenextdataindex=v.i),++p.pagecount)),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)x=e(h[m]),x&&i(y,x.s)||!(v.i=0;){var l=a.indexof(r),u=a.substr(s+o.length,l-s-o.length);n["marker"+u]=u.indexof("sub")>-1?{textwidth:4,textheight:4,textborderradius:2,textbackgroundcolor:e[u],textoffset:[3,0]}:{textwidth:10,textheight:10,textborderradius:5,textbackgroundcolor:e[u]},a=a.substr(l+1),s=a.indexof("{marker")}this.el=new ia({style:{rich:n,text:t,textlineheight:20,textbackgroundcolor:i.get("backgroundcolor"),textborderradius:i.get("borderradius"),textfill:i.get("textstyle.color"),textpadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(cleartimeout(h._hidetimeout),h._show=!0),h._incontent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hidelater(h._hidedelay),h._incontent=!1})},setenterable:function(t){this._enterable=t},getsize:function(){var t=this.el.getboundingrect();return[t.width,t.height]},moveto:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hidelater:function(t){!this._show||this._incontent&&this._enterable||(t?(this._hidedelay=t,this._show=!1,this._hidetimeout=settimeout(y(this.hide,this),t)):this.hide())},isshow:function(){return this._show},getoutersize:function(){var t=this.getsize();return{width:t[0],height:t[1]}}};var cb=y,db=f,fb=ir,pb=new pa({shape:{x:-1,y:-1,width:2,height:2}});zu({type:"tooltip",init:function(t,e){if(!as.node){var i=t.getcomponent("tooltip"),n=i.get("rendermode");this._rendermode=ma(n);var a;"html"===this._rendermode?(a=new w_(e.getdom(),e,{appendtobody:i.get("appendtobody",!0)}),this._newline="
"):(a=new b_(e),this._newline="\n"),this._tooltipcontent=a}},render:function(t,e,i){if(!as.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");my("itemtooltip",this._api,cb(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(){!i.isdisposed()&&n.manuallyshowtip(t,e,i,{x:n._lastx,y:n._lasty})})}},manuallyshowtip:function(t,e,i,n){if(n.from!==this.uid&&!as.node){var a=m_(n,i);this._ticket="";var o=n.databycoordsys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=pb;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryshow({offsetx:n.x,offsety:n.y,target:r},a)}else if(o)this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,databycoordsys:n.databycoordsys,tooltipoption:n.tooltipoption},a);else if(null!=n.seriesindex){if(this._manuallyaxisshowtip(t,e,i,n))return;var s=kr(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryshow({offsetx:l,offsety:u,position:n.position,target:s.el},a)}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},a))}},manuallyhidetip:function(t,e,i,n){var a=this._tooltipcontent;!this._alwaysshowcontent&&this._tooltipmodel&&a.hidelater(this._tooltipmodel.get("hidedelay")),this._lastx=this._lasty=null,n.from!==this.uid&&this._hide(m_(n,i))},_manuallyaxisshowtip:function(t,e,i,n){var a=n.seriesindex,o=n.dataindex,r=e.getcomponent("axispointer").coordsysaxesinfo;if(null!=a&&null!=o&&null!=r){var s=e.getseriesbyindex(a);if(s){var l=s.getdata(),t=s_([l.getitemmodel(o),s,(s.coordinatesystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchaction({type:"updateaxispointer",seriesindex:a,dataindex:o,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 a=t.databycoordsys;a&&a.length?this._showaxistooltip(a,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=[],s=[],l=s_([e.tooltipoption,n]),u=this._rendermode,h=this._newline,c={};db(t,function(t){db(t.databyaxis,function(t){var e=i.getcomponent(t.axisdim+"axis",t.axisindex),n=t.value,o=[];if(e&&null!=n){var l=gy(n,e.axis,i,t.seriesdataindices,t.valuelabelopt);f(t.seriesdataindices,function(r){var h=i.getseriesbyindex(r.seriesindex),d=r.dataindexinside,f=h&&h.getdataparams(d);if(f.axisdim=t.axisdim,f.axisindex=t.axisindex,f.axistype=t.axistype,f.axisid=t.axisid,f.axisvalue=qh(e.axis,n),f.axisvaluelabel=l,f){s.push(f);var p,g=h.formattooltip(d,!0,null,u);if(s(g)){p=g.html;var m=g.markers;a(c,m)}else p=g;o.push(p)}});var d=l;r.push("html"!==u?o.join(h):(d?hr(d)+h:"")+o.join(h))}})},this),r.reverse(),r=r.join(this._newline+this._newline);var d=e.position;this._showormove(l,function(){this._updatecontentnotchangedonaxis(t)?this._updateposition(l,d,o[0],o[1],this._tooltipcontent,s):this._showtooltipcontent(l,r,s,math.random(),o[0],o[1],d,void 0,c)})},_showseriesitemtooltip:function(t,e,i){var n=this._ecmodel,a=e.seriesindex,o=n.getseriesbyindex(a),r=e.datamodel||o,s=e.dataindex,l=e.datatype,u=r.getdata(),h=s_([u.getitemmodel(s),r,o&&(o.coordinatesystem||{}).model,this._tooltipmodel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getdataparams(s,l),g=r.formattooltip(s,!1,l,this._rendermode);s(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showormove(h,function(){this._showtooltipcontent(h,d,p,m,t.offsetx,t.offsety,t.position,t.target,f)}),i({type:"showtip",dataindexinside:s,dataindex:u.getrawindex(s),seriesindex:a,from:this.uid})}},_showcomponentitemtooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var a=n;n={content:a,formatter:a}}var o=new vr(n,this._tooltipmodel,this._ecmodel),r=o.get("content"),s=math.random();this._showormove(o,function(){this._showtooltipcontent(o,r,o.get("formatterparams")||{},s,t.offsetx,t.offsety,t.position,e)}),i({type:"showtip",from:this.uid})},_showtooltipcontent:function(t,e,i,n,a,o,r,s,l){if(this._ticket="",t.get("showcontent")&&t.get("show")){var u=this._tooltipcontent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=zr(h,i,!0);else if("function"==typeof h){var d=cb(function(e,n){e===this._ticket&&(u.setcontent(n,l,t),this._updateposition(t,r,a,o,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setcontent(c,l,t),u.show(t),this._updateposition(t,r,a,o,u,i,s)}},_updateposition:function(t,e,i,n,a,o,r){var s=this._api.getwidth(),l=this._api.getheight();e=e||t.get("position");var u=a.getsize(),h=t.get("align"),c=t.get("verticalalign"),d=r&&r.getboundingrect().clone();if(r&&d.applytransform(r.transform),"function"==typeof e&&(e=e([i,n],o,a.el,d,{viewsize:[s,l],contentsize:u.slice()})),_(e))i=fb(e[0],s),n=fb(e[1],l);else if(s(e)){e.width=u[0],e.height=u[1];var f=ts(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&r){var p=a_(e,d,u);i=p[0],n=p[1]}else{var p=i_(i,n,a,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=d_(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=d_(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=t_(i,n,a,s,l);i=p[0],n=p[1]}a.moveto(i,n)},_updatecontentnotchangedonaxis:function(t){var e=this._lastdatabycoordsys,i=!!e&&e.length===t.length;return i&&db(e,function(e,n){var a=e.databyaxis||{},o=t[n]||{},r=o.databyaxis||[];i&=a.length===r.length,i&&db(a,function(t,e){var n=r[e]||{},a=t.seriesdataindices||[],o=n.seriesdataindices||[];i&=t.value===n.value&&t.axistype===n.axistype&&t.axisid===n.axisid&&a.length===o.length,i&&db(a,function(t,e){var n=o[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){as.node||(this._tooltipcontent.dispose(),ly("itemtooltip",e))}}),cu({type:"showtip",event:"showtip",update:"tooltip:manuallyshowtip"},function(){}),cu({type:"hidetip",event:"hidetip",update:"tooltip:manuallyhidetip"},function(){});var gb=fr,mb=hr,vb=ru({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergedefaultandtheme(t,i),this._mergeoption(t,i,!1,!0)},isanimationenabled:function(){if(as.node)return!1;var t=this.__hostseries;return this.getshallow("animation")&&t&&t.isanimationenabled()},mergeoption:function(t,e){this._mergeoption(t,e,!1,!1)},_mergeoption:function(t,e,i,n){var a=this.constructor,o=this.maintype+"model";i||e.eachseries(function(t){var i=t.get(this.maintype,!0),s=t[o];return i&&i.data?(s?s._mergeoption(i,e,!0):(n&&c_(i),f(i.data,function(t){t instanceof array?(c_(t[0]),c_(t[1])):c_(t)}),s=new a(i,this,e),r(s,{maintype:this.maintype,seriesindex:t.seriesindex,name:t.name,createdbyself:!0}),s.__hostseries=t),void(t[o]=s)):void(t[o]=null)},this)},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=_(i)?p(i,gb).join(", "):gb(i),a=e.getname(t),o=mb(this.name);return(null!=i||a)&&(o+="
"),a&&(o+=mb(a),null!=i&&(o+=" : ")),null!=i&&(o+=mb(n)),o},getdata:function(){return this._data},setdata:function(t){this._data=t}});c(vb,yd),vb.extend({type:"markpoint",defaultoption:{zlevel:0,z:5,symbol:"pin",symbolsize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemstyle:{borderwidth:2},emphasis:{label:{show:!0}}}});var yb=u,xb=x,_b={min:xb(p_,"min"),max:xb(p_,"max"),average:xb(p_,"average")},wb=zu({type:"marker",init:function(){this.markergroupmap=b()},render:function(t,e,i){var n=this.markergroupmap;n.each(function(t){t.__keep=!1});var a=this.type+"model";e.eachseries(function(t){var n=t[a];n&&this.renderseries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderseries:function(){}});wb.extend({type:"markpoint",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.markpointmodel;e&&(v_(e.getdata(),t,i),this.markergroupmap.get(t.id).updatelayout(e))},this)},renderseries:function(t,e,i,n){var a=t.coordinatesystem,o=t.id,r=t.getdata(),s=this.markergroupmap,l=s.get(o)||s.set(o,new cd),u=g_(a,t,e);e.setdata(u),v_(e.getdata(),t,n),u.each(function(t){var i=u.getitemmodel(t),n=i.getshallow("symbol"),a=i.getshallow("symbolsize"),o=w(n),s=w(a);if(o||s){var l=e.getrawvalue(t),h=e.getdataparams(t);o&&(n=n(l,h)),s&&(a=a(l,h))}u.setitemvisual(t,{symbol:n,symbolsize:a,color:i.get("itemstyle.color")||r.getvisual("color")})}),l.updatedata(u),this.group.add(l.group),u.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),tu(function(t){t.markpoint=t.markpoint||{}}),vb.extend({type:"markline",defaultoption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolsize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},linestyle:{type:"dashed"},emphasis:{label:{show:!0},linestyle:{width:3}},animationeasing:"linear"}});var bb=function(t,e,i,o){var s=t.getdata(),l=o.type;if(!_(o)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=o.xaxis||null!=o.yaxis)){var u,h;if(null!=o.yaxis||null!=o.xaxis)u=e.getaxis(null!=o.yaxis?"y":"x"),h=d(o.yaxis,o.xaxis);else{var c=e_(o,s,e,t);u=c.valueaxis;var d=yh(s,c.valuedatadim);h=b_(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(o),m={};g.type=null,g.coord=[],m.coord=[],g.coord[p]=-1/0,m.coord[p]=1/0;var v=i.get("precision");v>=0&&"number"==typeof h&&(h=+h.tofixed(math.min(v,20))),g.coord[f]=m.coord[f]=h,o=[g,m,{type:l,valueindex:o.valueindex,value:h}]}return o=[o_(t,o[0]),o_(t,o[1]),r({},o[2])],o[2].type=o[2].type||"",a(o[2],o[0]),a(o[2],o[1]),o};wb.extend({type:"markline",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.marklinemodel;if(e){var n=e.getdata(),a=e.__from,o=e.__to;a.each(function(e){z_(a,e,!0,t,i),z_(o,e,!1,t,i)}),n.each(function(t){n.setitemlayout(t,[a.getitemlayout(t),o.getitemlayout(t)])}),this.markergroupmap.get(t.id).updatelayout()}},this)},renderseries:function(t,e,i,n){function a(e,i,a){var o=e.getitemmodel(i);z_(e,i,a,t,n),e.setitemvisual(i,{symbolsize:o.get("symbolsize")||g[a?0:1],symbol:o.get("symbol",!0)||p[a?0:1],color:o.get("itemstyle.color")||s.getvisual("color")})}var o=t.coordinatesystem,r=t.id,s=t.getdata(),l=this.markergroupmap,u=l.get(r)||l.set(r,new xg);this.group.add(u.group);var h=u_(o,t,e),c=h.from,d=h.to,f=h.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]),h.from.each(function(t){a(c,t,!0),a(d,t,!1)}),f.each(function(t){var e=f.getitemmodel(t).get("linestyle.color");f.setitemvisual(t,{color:e||c.getitemvisual(t,"color")}),f.setitemlayout(t,[c.getitemlayout(t),d.getitemlayout(t)]),f.setitemvisual(t,{fromsymbolsize:c.getitemvisual(t,"symbolsize"),fromsymbol:c.getitemvisual(t,"symbol"),tosymbolsize:d.getitemvisual(t,"symbolsize"),tosymbol:d.getitemvisual(t,"symbol")})}),u.updatedata(f),h.line.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),tu(function(t){t.markline=t.markline||{}}),vb.extend({type:"markarea",defaultoption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemstyle:{borderwidth:0},emphasis:{label:{show:!0,position:"top"}}}});var sb=function(t,e,i,n){var a=o_(t,n[0]),r=o_(t,n[1]),s=d,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h },mb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];wb.extend({type:"markarea",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.markareamodel;if(e){var n=e.getdata();n.each(function(e){var a=p(mb,function(a){return q_(n,e,a,t,i)});n.setitemlayout(e,a);var o=n.getitemgraphicel(e);o.setshape("points",a)})}},this)},renderseries:function(t,e,i,n){var a=t.coordinatesystem,o=t.id,r=t.getdata(),l=this.markergroupmap,u=l.get(o)||l.set(o,{group:new fm});this.group.add(u.group),u.__keep=!0;var h=k_(a,t,e);e.setdata(h),h.each(function(e){h.setitemlayout(e,p(mb,function(i){return q_(h,e,i,t,n)})),h.setitemvisual(e,{color:r.getvisual("color")})}),h.diff(u.__data).add(function(t){var e=new ha({shape:{points:h.getitemlayout(t)}});h.setitemgraphicel(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getitemgraphicel(i);ar(n,{shape:{points:h.getitemlayout(t)}},e,t),u.group.add(n),h.setitemgraphicel(t,n)}).remove(function(t){var e=u.__data.getitemgraphicel(t);u.group.remove(e)}).execute(),h.eachitemgraphicel(function(t,i){var n=h.getitemmodel(i),a=n.getmodel("label"),o=n.getmodel("emphasis.label"),r=h.getitemvisual(i,"color");t.usestyle(s(n.getmodel("itemstyle").getitemstyle(),{fill:li(r,.4),stroke:r})),t.hoverstyle=n.getmodel("emphasis.itemstyle").getitemstyle(),xo(t.style,t.hoverstyle,a,o,{labelfetcher:e,labeldataindex:i,defaulttext:h.getname(i)||"",isrecttext:!0,autocolor:r}),wo(t,{}),t.datamodel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),tu(function(t){t.markarea=t.markarea||{}});var ib=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&$_(t)})};hd.registersubtypedefaulter("timeline",function(){return"slider"}),cu({type:"timelinechange",event:"timelinechanged",update:"prepareandupdate"},function(t,e){var i=e.getcomponent("timeline");return i&&null!=t.currentindex&&(i.setcurrentindex(t.currentindex),!i.get("loop",!0)&&i.isindexmax()&&i.setplaystate(!1)),e.resetoption("timeline"),s({currentindex:i.option.currentindex},t)}),cu({type:"timelineplaychange",event:"timelineplaychanged",update:"update"},function(t,e){var i=e.getcomponent("timeline");i&&null!=t.playstate&&i.setplaystate(t.playstate)});var tb=hd.extend({type:"timeline",layoutmode:"box",defaultoption:{zlevel:0,z:4,show:!0,axistype:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlposition:"left",autoplay:!1,rewind:!1,loop:!0,playinterval:2e3,currentindex:0,itemstyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergedefaultandtheme(t,i),this._initdata()},mergeoption:function(){tb.superapply(this,"mergeoption",arguments),this._initdata()},setcurrentindex:function(t){null==t&&(t=this.option.currentindex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentindex=t},getcurrentindex:function(){return this.option.currentindex},isindexmax:function(){return this.getcurrentindex()>=this._data.count()-1},setplaystate:function(t){this.option.autoplay=!!t},getplaystate:function(){return!!this.option.autoplay},_initdata:function(){var t=this.option,e=t.data||[],i=t.axistype,a=this._names=[];if("category"===i){var o=[];f(e,function(t,e){var i,r=na(t);s(t)?(i=n(t),i.value=e):i=e,o.push(i),b(r)||null!=r&&!isnan(r)||(r=""),a.push(r+"")}),e=o}var r={category:"ordinal",time:"time"}[i]||"number",s=this._data=new el([{name:"value",type:r}],this);s.initdata(e,a)},getdata:function(){return this._data},getcategories:function(){return"category"===this.get("axistype")?this._names.slice():void 0}}),ab=tb.extend({type:"timeline.slider",defaultoption:{backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderwidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptycircle",symbolsize:10,linestyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemstyle:{color:"#304654",borderwidth:1},checkpointstyle:{symbol:"circle",symbolsize:13,color:"#c23531",borderwidth:5,bordercolor:"rgba(194,53,49, 0.5)",animation:!0,animationduration:300,animationeasing:"quinticinout"},controlstyle:{show:!0,showplaybtn:!0,showprevbtn:!0,shownextbtn:!0,itemsize:22,itemgap:12,position:"left",playicon:"path://m31.6,53c17.5,53,6,41.5,6,27.4s17.5,1.8,31.6,1.8c45.7,1.8,57.2,13.3,57.2,27.4s45.7,53,31.6,53z m31.6,3.3 c18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1c44.9,51.5,55.7,40.7,55.7,27.4c55.7,14.1,44.9,3.3,31.6,3.3z m24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2v21.3z",stopicon:"path://m30.9,53.2c16.8,53.2,5.3,41.7,5.3,27.6s16.8,2,30.9,2c45,2,56.4,13.5,56.4,27.6s45,53.2,30.9,53.2z m30.9,3.5c17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1c44.2,51.7,55,40.9,55,27.6c54.9,14.4,44.1,3.5,30.9,3.5z m36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h36c0.5,0,0.9,0.4,0.9,1v35.8z m27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h27c0.5,0,0.9,0.4,0.9,1l27.8,35.8l27.8,35.8z",nexticon:"path://m18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7l18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1l19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8c18.4,51.2,18.5,51,18.6,50.8z",previcon:"path://m43,52.8l20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7l42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3l18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1l41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8c43.2,53.2,43.1,53,43,52.8z",color:"#304654",bordercolor:"#304654",borderwidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemstyle:{color:"#c23531"},controlstyle:{color:"#c23531",bordercolor:"#c23531",borderwidth:2}},data:[]}});c(ab,yd);var db=jd.extend({type:"timeline"}),cb=function(t,e,i,n){ck.call(this,t,e,i),this.type=n||"value",this.model=null};cb.prototype={constructor:cb,getlabelmodel:function(){return this.model.getmodel("label")},ishorizontal:function(){return"horizontal"===this.model.get("orient")}},h(cb,ck);var lb=y,kb=f,pb=math.pi;db.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewrect,this._timer,this._currentpointer,this._maingroup,this._labelgroup},render:function(t,e,i){if(this.model=t,this.api=i,this.ecmodel=e,this.group.removeall(),t.get("show",!0)){var n=this._layout(t,i),a=this._creategroup("maingroup"),o=this._creategroup("labelgroup"),r=this._axis=this._createaxis(n,t);t.formattooltip=function(t){return hr(r.scale.getlabel(t))},kb(["axisline","axistick","control","currentpointer"],function(e){this["_render"+e](n,a,r,t)},this),this._renderaxislabel(n,o,r,t),this._position(n,t)}this._doplaystop()},remove:function(){this._cleartimer(),this.group.removeall()},dispose:function(){this._cleartimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=tw(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:pb/2},l="vertical"===n?a.height:a.width,u=t.getmodel("controlstyle"),h=u.get("show",!0),c=h?u.get("itemsize"):0,d=h?u.get("itemgap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*pb/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showplaybtn",!0),w=h&&u.get("showprevbtn",!0),b=h&&u.get("shownextbtn",!0),s=0,m=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],s+=f),w&&(m=[s,0],s+=f),b&&(v=[m-c,0],m-=f)):(_&&(g=[m-c,0],m-=f),w&&(m=[0,0],s+=f),b&&(v=[m-c,0],m-=f)),y=[s,m],t.get("inverse")&&y.reverse(),{viewrect:a,mainlength:l,orient:n,rotation:s[n],labelrotation:p,labelposopt:i,labelalign:t.get("label.align")||o[n],labelbaseline:t.get("label.verticalalign")||t.get("label.baseline")||r[n],playposition:g,prevbtnposition:m,nextbtnposition:v,axisextent:y,controlsize:c,controlgap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}var a=this._maingroup,o=this._labelgroup,r=t.viewrect;if("vertical"===t.orient){var s=oe(),l=r.x,u=r.y+r.height;ze(s,s,[-l,-u]),be(s,s,-pb/2),ze(s,s,[l,u]),r=r.clone(),r.applytransform(s)}var h=i(r),c=i(a.getboundingrect()),d=i(o.getboundingrect()),f=a.position,p=o.position;p[0]=f[0]=h[0][0];var g=t.labelposopt;if(isnan(g)){var m="+"===g?0:1;n(f,c,h,1,m),n(p,d,h,1,1-m)}else{var m=g>=0?0:1;n(f,c,h,1,m),p[1]=f[1]+g}a.attr("position",f),o.attr("position",p),a.rotation=o.rotation=t.rotation,e(a),e(o)},_createaxis:function(t,e){var i=e.getdata(),n=e.get("axistype"),a=xh(e,n);a.getticks=function(){return i.maparray(["value"],function(t){return t})};var o=i.getdataextent("value");a.setextent(o[0],o[1]),a.niceticks();var r=new cb("value",a,t.axisextent,n);return r.model=e,r},_creategroup:function(t){var e=this["_"+t]=new fm;return this.group.add(e),e},_renderaxisline:function(t,e,i,n){var a=i.getextent();n.get("linestyle.show")&&e.add(new ma({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r({linecap:"round"},n.getmodel("linestyle").getlinestyle()),silent:!0,z2:1}))},_renderaxistick:function(t,e,i,n){var a=n.getdata(),o=i.scale.getticks();kb(o,function(t){var o=i.datatocoord(t),r=a.getitemmodel(t),s=r.getmodel("itemstyle"),l=r.getmodel("emphasis.itemstyle"),u={position:[o,0],onclick:lb(this._changetimeline,this,t)},h=iw(r,s,e,u);wo(h,l.getitemstyle()),r.get("tooltip")?(h.dataindex=t,h.datamodel=n):h.dataindex=h.datamodel=null},this)},_renderaxislabel:function(t,e,i,n){var a=i.getlabelmodel();if(a.get("show")){var o=n.getdata(),r=i.getviewlabels();kb(r,function(n){var a=n.tickvalue,r=o.getitemmodel(a),s=r.getmodel("label"),l=r.getmodel("emphasis.label"),u=i.datatocoord(n.tickvalue),h=new ia({position:[u,0],rotation:t.labelrotation-t.rotation,onclick:lb(this._changetimeline,this,a),silent:!1});jo(h.style,s,{text:n.formattedlabel,textalign:t.labelalign,textverticalalign:t.labelbaseline}),e.add(h),wo(h,jo({},l))},this)}},_rendercontrol:function(t,e,i,n){function a(t,i,a,h){if(t){var c={position:t,origin:[o/2,0],rotation:h?-r:0,recthover:!0,style:s,onclick:a},d=ew(n,i,u,c);e.add(d),wo(d,l)}}var o=t.controlsize,r=t.rotation,s=n.getmodel("controlstyle").getitemstyle(),l=n.getmodel("emphasis.controlstyle").getitemstyle(),u=[0,-o/2,o,o],h=n.getplaystate(),c=n.get("inverse",!0);a(t.nextbtnposition,"controlstyle.nexticon",lb(this._changetimeline,this,c?"-":"+")),a(t.prevbtnposition,"controlstyle.previcon",lb(this._changetimeline,this,c?"+":"-")),a(t.playposition,"controlstyle."+(h?"stopicon":"playicon"),lb(this._handleplayclick,this,!h),!0)},_rendercurrentpointer:function(t,e,i,n){var a=n.getdata(),o=n.getcurrentindex(),r=a.getitemmodel(o).getmodel("checkpointstyle"),s=this,l={oncreate:function(t){t.draggable=!0,t.drift=lb(s._handlepointerdrag,s),t.ondragend=lb(s._handlepointerdragend,s),nw(t,o,i,n,!0)},onupdate:function(t){nw(t,o,i,n)}};this._currentpointer=iw(r,r,this._maingroup,{},this._currentpointer,l)},_handleplayclick:function(t){this._cleartimer(),this.api.dispatchaction({type:"timelineplaychange",playstate:t,from:this.uid})},_handlepointerdrag:function(t,e,i){this._cleartimer(),this._pointerchangetimeline([i.offsetx,i.offsety])},_handlepointerdragend:function(t){this._pointerchangetimeline([t.offsetx,t.offsety],!0)},_pointerchangetimeline:function(t,e){var i=this._toaxiscoord(t)[0],n=this._axis,a=ar(n.getextent().slice());i>a[1]&&(i=a[1]),is&&(n=s,e=o)}),e},_cleartimer:function(){this._timer&&(cleartimeout(this._timer),this._timer=null)},_changetimeline:function(t){var e=this.model.getcurrentindex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchaction({type:"timelinechange",currentindex:t,from:this.uid})}}),tu(ib),hd.registersubtypedefaulter("datazoom",function(){return"slider"});var ob=["x","y","z","radius","angle","single"],eb=["cartesian2d","polar","singleaxis"],nb=ow(ob,["axisindex","axis","index","id"]),rb=f,zb=ar,bb=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};bb.prototype={constructor:bb,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(aw(i.get("coordinatesystem"))){var n=this._dimname,a=e.querycomponents({maintype:n+"axis",index:i.get(n+"axisindex"),id:i.get(n+"axisid")})[0];this._axisindex===(a&&a.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,a=this.getaxismodel(),o="x"===i||"y"===i;o?(e="gridindex",t="x"===i?"y":"x"):(e="polarindex",t="angle"===i?"radius":"angle");var r;return n.eachcomponent(t+"axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(r=t)}),r},getminmaxspan:function(){return n(this._minmaxspan)},calculatedatawindow:function(t){function e(t,e,i,n,a){var r=a?"span":"valuespan";kn(0,t,i,"all",h["min"+r],h["max"+r]);for(var s=0;2>s;s++)e[s]=mr(t[s],i,n,!0),a&&(e[s]=o.parse(e[s]))}var i,n=this._dataextent,a=this.getaxismodel(),o=a.axis.scale,r=this._datazoommodel.getrangepropmode(),s=[0,100],l=[],u=[];rb(["start","end"],function(e,a){var h=t[e],c=t[e+"value"];"percent"===r[a]?(null==h&&(h=s[a]),c=o.parse(mr(h,s,n))):(i=!0,c=null==c?n[a]:o.parse(c),h=mr(c,n,s)),u[a]=c,l[a]=h}),zb(u),zb(l);var h=this._minmaxspan;return i?e(u,l,n,s,!1):e(l,u,s,n,!0),{valuewindow:u,percentwindow:l}},reset:function(t){if(t===this._datazoommodel){var e=this.gettargetseriesmodels();this._dataextent=sw(this,this._dimname,e),hw(this);var i=this.calculatedatawindow(t.settledoption);this._valuewindow=i.valuewindow,this._percentwindow=i.percentwindow,uw(this)}},restore:function(t){t===this._datazoommodel&&(this._valuewindow=this._percentwindow=null,uw(this,!0))},filterdata:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._datazoommodel){var i=this._dimname,n=this.gettargetseriesmodels(),a=t.get("filtermode"),o=this._valuewindow;"none"!==a&&rb(n,function(t){var n=t.getdata(),r=n.mapdimension(i,!0);r.length&&("weakfilter"===a?n.filterself(function(t){for(var e,i,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(e=!0),c&&(i=!0)}return a&&e&&i}):rb(r,function(i){if("empty"===a)t.setdata(n=n.map(i,function(t){return e(t)?t:0/0}));else{var r={};r[i]=o,n.selectrange(r)}}),rb(r,function(t){n.setapproximateextent(o,t)}))})}}};var vb=f,gb=nb,fb=ru({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=cw(t);this.settledoption=n,this.mergedefaultandtheme(t,i),this.doinit(n)},mergeoption:function(t){var e=cw(t);a(this.option,t,!0),a(this.settledoption,e,!0),this.doinit(e)},doinit:function(t){var e=this.option;as.canvassupported||(e.realtime=!1),this._setdefaultthrottle(t),dw(this,t);var i=this.settledoption;vb([["start","startvalue"],["end","endvalue"]],function(t,n){"value"===this._rangepropmode[n]&&(e[t[0]]=i[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,a){var o=this.dependentmodels[e.axis][i],r=o.__dzaxisproxy||(o.__dzaxisproxy=new bb(e.name,i,this,a));t[e.name+"_"+i]=r},this)},_resettarget:function(){var t=this.option,e=this._judgeautomode();gb(function(e){var i=e.axisindex;t[i]=ea(t[i])},this),"axisindex"===e?this._autosetaxisindex():"orient"===e&&this._autosetorient()},_judgeautomode:function(){var t=this.option,e=!1;gb(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 a="vertical"===e?"y":"x";n[a+"axis"].length?(i[a+"axisindex"]=[0],t=!1):vb(n.singleaxis,function(n){t&&n.get("orient",!0)===e&&(i.singleaxisindex=[n.componentindex],t=!1)})}t&&gb(function(e){if(t){var n=[],a=this.dependentmodels[e.axis];if(a.length&&!n.length)for(var o=0,r=a.length;r>o;o++)"category"===a[o].get("type")&&n.push(o);i[e.axisindex]=n,n.length&&(t=!1)}},this),t&&this.ecmodel.eachseries(function(t){this._isserieshasallaxestypeof(t,"value")&&gb(function(e){var n=i[e.axisindex],a=t.get(e.axisindex),o=t.get(e.axisid),r=t.ecmodel.querycomponents({maintype:e.axis,index:a,id:o})[0];a=r.componentindex,u(n,a)<0&&n.push(a)})},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 gb(function(n){var a=t.get(n.axisindex),o=this.dependentmodels[n.axis][a];o&&o.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 gb(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;gb(function(n){vb(this.get(n.axisindex),function(a){t.call(e,n,a,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){var e=this.option,i=this.settledoption;vb([["start","startvalue"],["end","endvalue"]],function(n){(null!=t[n[0]]||null!=t[n[1]])&&(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])},this),dw(this,t)},setcalculatedrange:function(t){var e=this.option;vb(["start","startvalue","end","endvalue"],function(i){e[i]=t[i]})},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()}}),wb=jd.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 a,o=0;o0&&e%g)return void(p+=f);var i=null==t||isnan(t)||""===t,n=i?0:zb(t,o,u,!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 m=this.datazoommodel;this._displayables.bargroup.add(new ha({shape:{points:c},style:s({fill:m.get("databackgroundcolor")},m.getmodel("databackground.areastyle").getareastyle()),silent:!0,z2:-20})),this._displayables.bargroup.add(new ca({shape:{points:d},style:m.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(a,o){var r=t.getaxisproxy(a.name,o).gettargetseriesmodels();f(r,function(t){if(!(i||e!==!0&&u(tv,t.get("type"))<0)){var r,s=n.getcomponent(a.axis,o).axis,l=fw(a.name),h=t.coordinatesystem;null!=l&&h.getotheraxis&&(r=h.getotheraxis(s).inverse),l=t.getdata().mapdimension(l),i={thisaxis:s,series:t,thisdim:a.name,otherdim:l,otheraxisinverse:r}}},this)},this),i}},_renderhandle:function(){var t=this._displayables,e=t.handles=[],i=t.handlelabels=[],n=this._displayables.bargroup,a=this._size,o=this.datazoommodel;n.add(t.filler=new hb({draggable:!0,cursor:pw(this._orient),drift:xb(this._ondragmove,this,"all"),ondragstart:xb(this._showdatainfo,this,!0),ondragend:xb(this._ondragend,this),onmouseover:xb(this._showdatainfo,this,!0),onmouseout:xb(this._showdatainfo,this,!1),style:{fill:o.get("fillercolor"),textposition:"inside"}})),n.add(new hb({silent:!0,subpixeloptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:o.get("databackgroundcolor")||o.get("bordercolor"),linewidth:qb,fill:"rgba(0,0,0,0)"}})),yb([0,1],function(t){var a=dr(o.get("handleicon"),{cursor:pw(this._orient),draggable:!0,drift:xb(this._ondragmove,this,t),ondragend:xb(this._ondragend,this),onmouseover:xb(this._showdatainfo,this,!0),onmouseout:xb(this._showdatainfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=a.getboundingrect();this._handleheight=ir(o.get("handlesize"),this._size[1]),this._handlewidth=r.width/r.height*this._handleheight,a.setstyle(o.getmodel("handlestyle").getitemstyle());var s=o.get("handlecolor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=o.textstylemodel;this.group.add(i[t]=new ia({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=[zb(t[0],[0,100],e,!0),zb(t[1],[0,100],e,!0)]},_updateinterval:function(t,e){var i=this.datazoommodel,n=this._handleends,a=this._getviewextent(),o=i.findrepresentativeaxisproxy().getminmaxspan(),r=[0,100];kn(e,n,a,i.get("zoomlock")?"all":t,null!=o.minspan?zb(o.minspan,r,a,!0):null,null!=o.maxspan?zb(o.maxspan,r,a,!0):null);var s=this._range,l=this._range=ub([zb(n[0],a,r,!0),zb(n[1],a,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateview:function(t){var e=this._displayables,i=this._handleends,n=ub(i.slice()),a=this._size;yb([0,1],function(t){var n=e.handles[t],o=this._handleheight;n.attr({scale:[o/2,o/2],position:[i[t],a[1]/2-o/2]})},this),e.filler.setshape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updatedatainfo(t)},_updatedatainfo:function(t){function e(t){var e=rr(n.handles[t].parent,this.group),i=lr(0===t?"right":"left",e),s=this._handlewidth/2+qb,l=sr([c[t]+(0===t?-s:s),this._size[1]/2],e);a[t].setstyle({x:l[0],y:l[1],textverticalalign:o===$b?"middle":i,textalign:o===$b?i:"center",text:r[t]})}var i=this.datazoommodel,n=this._displayables,a=n.handlelabels,o=this._orient,r=["",""];if(i.get("showdetail")){var s=i.findrepresentativeaxisproxy();if(s){var l=s.getaxismodel().axis,u=this._range,h=t?s.calculatedatawindow({start:u[0],end:u[1]}).valuewindow:s.getdatavaluewindow();r=[this._formatlabel(h[0],l),this._formatlabel(h[1],l)]}}var c=ub(this._handleends.slice());e.call(this,0),e.call(this,1)},_formatlabel:function(t,e){var i=this.datazoommodel,n=i.get("labelformatter"),a=i.get("labelprecision");(null==a||"auto"===a)&&(a=e.getpixelprecision());var o=null==t||isnan(t)?"":"category"===e.type||"time"===e.type?e.scale.getlabel(math.round(t)):t.tofixed(math.min(a,20));return w(n)?n(t,o):b(n)?n.replace("{value}",o):o},_showdatainfo:function(t){t=this._dragging||t;var e=this._displayables.handlelabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_ondragmove:function(t,e,i,n){this._dragging=!0,im(n.event);var a=this._displayables.bargroup.getlocaltransform(),o=sr([e,i],a,!0),r=this._updateinterval(t,o[0]),s=this.datazoommodel.get("realtime");this._updateview(!s),r&&s&&this._dispatchzoomaction()},_ondragend:function(){this._dragging=!1,this._showdatainfo(!1);var t=this.datazoommodel.get("realtime");!t&&this._dispatchzoomaction()},_onclickpanelclick:function(t){var e=this._size,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,a=(n[0]+n[1])/2,o=this._updateinterval("all",i[0]-a);this._updateview(),o&&this._dispatchzoomaction()}},_dispatchzoomaction:function(){var t=this._range;this.api.dispatchaction({type:"datazoom",from:this.uid,datazoomid:this.datazoommodel.id,start:t[0],end:t[1]})},_findcoordrect:function(){var t;if(yb(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}});au({gettargetseries:function(t){var e=b();return t.eachcomponent("datazoom",function(t){t.eachtargetaxis(function(t,i,n){var a=n.getaxisproxy(t.name,i);f(a.gettargetseriesmodels(),function(t){e.set(t.uid,t)})})}),e},modifyoutputend:!0,overallreset:function(t,e){t.eachcomponent("datazoom",function(t){t.eachtargetaxis(function(t,i,n){n.getaxisproxy(t.name,i).reset(n,e)}),t.eachtargetaxis(function(t,i,n){n.getaxisproxy(t.name,i).filterdata(n,e)})}),t.eachcomponent("datazoom",function(t){var e=t.findrepresentativeaxisproxy(),i=e.getdatapercentwindow(),n=e.getdatavaluewindow();t.setcalculatedrange({start:i[0],end:i[1],startvalue:n[0],endvalue:n[1]})})}}),cu("datazoom",function(t,e){var i=rw(y(e.eachcomponent,e,"datazoom"),nb,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})})}),fb.extend({type:"datazoom.inside",defaultoption:{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,moveonmousewheel:!1,preventdefaultmousemove:!0}});var iv="\x00_ec_datazoom_roams",nv=y,av=wb.extend({type:"datazoom.inside",init:function(){this._range},render:function(t,e,i){av.superapply(this,"render",arguments),this._range=t.getpercentrange(),f(this.gettargetcoordinfo(),function(e,n){var a=p(e,function(t){return vw(t.model)});f(e,function(e){var o=e.model,r={};f(["pan","zoom","scrollmove"],function(t){r[t]=nv(ov[t],this,e,n)},this),gw(i,{coordid:vw(o),allcoordids:a,containspoint:function(t,e,i){return o.coordinatesystem.containpoint([e,i])},datazoomid:t.id,datazoommodel:t,getrange:r})},this)},this)},dispose:function(){mw(this.api,this.datazoommodel.id),av.superapply(this,"dispose",arguments),this._range=null}}),ov={zoom:function(t,e,i,n){var a=this._range,o=a.slice(),r=t.axismodels[0];if(r){var s=rv[e](null,[n.originx,n.originy],r,i,t),l=(s.signal>0?s.pixelstart+s.pixellength-s.pixel:s.pixel-s.pixelstart)/s.pixellength*(o[1]-o[0])+o[0],u=math.max(1/n.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.datazoommodel.findrepresentativeaxisproxy().getminmaxspan();return kn(0,o,[0,100],0,h.minspan,h.maxspan),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}},pan:sw(function(t,e,i,n,a,o){var r=rv[n]([o.oldx,o.oldy],[o.newx,o.newy],e,a,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixellength}),scrollmove:sw(function(t,e,i,n,a,o){var r=rv[n]([0,0],[o.scrolldelta,o.scrolldelta],e,a,i);return r.signal*(t[1]-t[0])*o.scrolldelta})},rv={grid:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinatesystem.getrect(); return t=t||[0,0],"x"===o.dim?(r.pixel=e[0]-t[0],r.pixellength=s.width,r.pixelstart=s.x,r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixellength=s.height,r.pixelstart=s.y,r.signal=o.inverse?-1:1),r},polar:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinatesystem,l=s.getradiusaxis().getextent(),u=s.getangleaxis().getextent();return t=t?s.pointtocoord(t):[0,0],e=s.pointtocoord(e),"radiusaxis"===i.maintype?(r.pixel=e[0]-t[0],r.pixellength=l[1]-l[0],r.pixelstart=l[0],r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixellength=u[1]-u[0],r.pixelstart=u[0],r.signal=o.inverse?-1:1),r},singleaxis:function(t,e,i,n,a){var o=i.axis,r=a.model.coordinatesystem.getrect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixellength=r.width,s.pixelstart=r.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixellength=r.height,s.pixelstart=r.y,s.signal=o.inverse?-1:1),s}},sv=["rect","polygon","keep","clear"],lv=function(t,e){var i=t&&t.brush;if(_(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasownproperty("toolbox")?t.toolbox:[];e instanceof array&&(n=n.concat(e))});var a=t&&t.toolbox;_(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o=a.feature||(a.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),mw(s),e&&!s.length&&s.push.apply(s,sv)}},uv=f,hv={linex:lw(0),liney:lw(1),rect:{point:function(t,e,i){return t&&i.boundingrect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingrect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingrect.contain(t[0],t[1])&&rc(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var a=t.x,o=t.y,r=t.width,s=t.height,l=n[0];return rc(n,a,o)||rc(n,a+r,o)||rc(n,a,o+s)||rc(n,a+r,o+s)||ti.create(t).contain(l[0],l[1])||fr(a,o,a+r,o,n)||fr(a,o,a,o+s,n)||fr(a+r,o,a+r,o+s,n)||fr(a,o+s,a+r,o+s,n)?!0:void 0}}},cv=f,dv=u,fv=x,pv=["datatopoint","pointtodata"],gv=["grid","xaxis","yaxis","geo","graph","polar","radiusaxis","angleaxis","bmap"],mv=pw.prototype;mv.setoutputranges=function(t,e){this.matchoutputranges(t,e,function(t,e,i){if((t.coordranges||(t.coordranges=[])).push(e),!t.coordrange){t.coordrange=e;var n=_v[t.brushtype](0,i,e);t.__rangeoffset={offset:wv[t.brushtype](n.values,t.range,[1,1]),xyminmax:n.xyminmax}}})},mv.matchoutputranges=function(t,e,i){cv(t,function(t){var n=this.findtargetinfo(t,e);n&&n!==!0&&f(n.coordsyses,function(n){var a=_v[t.brushtype](1,n,t.range);i(t,a.values,n,e)})},this)},mv.setinputranges=function(t,e){cv(t,function(t){var i=this.findtargetinfo(t,e);if(t.range=t.range||[],i&&i!==!0){t.panelid=i.panelid;var n=_v[t.brushtype](0,i.coordsys,t.coordrange),a=t.__rangeoffset;t.range=a?wv[t.brushtype](n.values,a.offset,zw(n.xyminmax,a.xyminmax)):n.values}},this)},mv.makepanelopts=function(t,e){return p(this._targetinfolist,function(i){var n=i.getpanelrect();return{panelid:i.panelid,defaultbrushtype:e&&e(i),clippath:yv(n),istargetbycursor:_v(n,t,i.coordsysmodel),getlinearbrushotherextent:xv(n)}})},mv.controlseries=function(t,e,i){var n=this.findtargetinfo(t,i);return n===!0||n&&dv(n.coordsyses,e.coordinatesystem)>=0},mv.findtargetinfo=function(t,e){for(var i=this._targetinfolist,n=ew(e,t),a=0;a=0||dv(n,t.getaxis("y").model)>=0)&&o.push(t)}),e.push({panelid:"grid--"+t.id,gridmodel:t,coordsysmodel:t,coordsys:o[0],coordsyses:o,getpanelrect:xv.grid,xaxisdeclared:r[t.id],yaxisdeclared:s[t.id]})}))},geo:function(t,e){cv(t.geomodels,function(t){var i=t.coordinatesystem;e.push({panelid:"geo--"+t.id,geomodel:t,coordsysmodel:t,coordsys:i,coordsyses:[i],getpanelrect:xv.geo})})}},yv=[function(t,e){var i=t.xaxismodel,n=t.yaxismodel,a=t.gridmodel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridmodel},function(t,e){var i=t.geomodel;return i&&i===e.geomodel}],xv={grid:function(){return this.coordsys.grid.getrect().clone()},geo:function(){var t=this.coordsys,e=t.getboundingrect().clone();return e.applytransform(rr(t)),e}},_v={linex:fv(nw,0),liney:fv(nw,1),rect:function(t,e,i){var n=e[pv[t]]([i[0][0],i[1][0]]),a=e[pv[t]]([i[0][1],i[1][1]]),o=[ow([n[0],a[0]]),ow([n[1],a[1]])];return{values:o,xyminmax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=p(i,function(i){var a=e[pv[t]](i);return n[0][0]=math.min(n[0][0],a[0]),n[1][0]=math.min(n[1][0],a[1]),n[0][1]=math.max(n[0][1],a[0]),n[1][1]=math.max(n[1][1],a[1]),a});return{values:a,xyminmax:n}}},wv={linex:fv(rw,0),liney:fv(rw,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return p(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},bv=["inbrush","outofbrush"],sv="__ecbrushselect",mv="__ecinbrushselectevent",iv=el.visual.brush;pu(iv,function(t,e,i){t.eachcomponent({maintype:"brush"},function(t){i&&"takeglobalcursor"===i.type&&t.setbrushoption("brush"===i.key?i.brushoption:{brushtype:!1})}),vw(t)}),ou(iv,function(t,e,i){var a,o,r=[];t.eachcomponent({maintype:"brush"},function(e,i){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinatesystem;w|=i.hasaxisbrushed(),l(e)&&i.eachactivestate(t.getdata(),function(t,e){"active"===t&&(y[e]=1)})}function c(i,n,a){var o=hw(i);if(o&&!zw(e,n)&&(f(b,function(n){o[n.brushtype]&&e.brushtargetmanager.controlseries(n,i,t)&&a.push(n),w|=u(a)}),l(n)&&u(a))){var r=i.getdata();r.each(function(t){ww(o,a,r,t)&&(y[t]=1)})}}var d={brushid:e.id,brushindex:i,brushname:e.name,areas:n(e.areas),selected:[]};r.push(d);var g=e.option,m=g.brushlink,v=[],y=[],x=[],w=0;i||(a=g.throttletype,o=g.throttledelay);var b=p(e.areas,function(t){return uw(s({boundingrect:tv[t.brushtype](t)},t))}),s=tw(e.option,bv,function(t){t.mappingmethod="fixed"});_(m)&&f(m,function(t){v[t]=1}),t.eachseries(function(t,e){var i=x[e]=[];"parallel"===t.subtype?h(t,e,i):c(t,e,i)}),t.eachseries(function(t,e){var i={seriesid:t.id,seriesindex:e,seriesname:t.name,dataindex:[]};d.selected.push(i);var n=hw(t),a=x[e],o=t.getdata(),r=l(e)?function(t){return y[t]?(i.dataindex.push(o.getrawindex(t)),"inbrush"):"outofbrush"}:function(t){return ww(n,a,o,t)?(i.dataindex.push(o.getrawindex(t)),"inbrush"):"outofbrush"};(l(e)?w:u(a))&&dw(bv,s,o,r)})}),gw(e,a,o,r,i)});{var tv={linex:g,liney:g,rect:function(t){return xw(t.range)},polygon:function(t){for(var e,i=t.range,n=0,a=i.length;a>n;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=i[n];o[0]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&xw(e)}},av=["#ddd"];ru({type:"brush",dependencies:["geo","grid","xaxis","yaxis","parallel","series"],defaultoption:{toolbox:null,brushlink:null,seriesindex:"all",geoindex:null,xaxisindex:null,yaxisindex:null,brushtype:"rect",brushmode:"single",transformable:!0,brushstyle:{borderwidth:1,color:"rgba(120,140,180,0.3)",bordercolor:"rgba(120,140,180,0.8)"},throttletype:"fixrate",throttledelay:0,removeonclick:!0,z:1e4},areas:[],brushtype:null,brushoption:{},coordinfolist:[],optionupdated:function(t,e){var i=this.option;!e&&aw(i,t,["inbrush","outofbrush"]);var n=i.inbrush=i.inbrush||{};i.outofbrush=i.outofbrush||{color:av},n.hasownproperty("liftz")||(n.liftz=5)},setareas:function(t){t&&(this.areas=p(t,function(t){return yw(this.option,t)},this))},setbrushoption:function(t){this.brushoption=yw(this.option,t),this.brushtype=this.brushoption.brushtype}})}zu({type:"brush",init:function(t,e){this.ecmodel=t,this.api=e,this.model,(this._brushcontroller=new em(e.getzr())).on("brush",y(this._onbrush,this)).mount()},render:function(t){return this.model=t,jw.apply(this,arguments)},updatetransform:function(t,e){return vw(e),jw.apply(this,arguments)},updateview:jw,dispose:function(){this._brushcontroller.dispose()},_onbrush:function(t,e){var i=this.model.id;this.model.brushtargetmanager.setoutputranges(t,this.ecmodel),(!e.isend||e.removeonclick)&&this.api.dispatchaction({type:"brush",brushid:i,areas:n(t),$from:i}),e.isend&&this.api.dispatchaction({type:"brushend",brushid:i,areas:n(t),$from:i})}}),cu({type:"brush",event:"brush"},function(t,e){e.eachcomponent({maintype:"brush",query:t},function(e){e.setareas(t.areas)})}),cu({type:"brushselect",event:"brushselected",update:"none"},function(){}),cu({type:"brushend",event:"brushend",update:"none"},function(){});var dv={},cv=uc.toolbox.brush;$w.defaultoption={show:!0,type:["rect","polygon","linex","liney","keep","clear"],icon:{rect:"m7.3,34.7 m0.4,10v-0.2h9.8 m89.6,10v-0.2h-9.8 m0.4,60v10.2h9.8 m89.6,60v10.2h-9.8 m12.3,22.4v10.5h13.1 m33.6,10.5h7.8 m49.1,10.5h7.8 m77.5,22.4v10.5h-13 m12.3,31.1v8.2 m77.7,31.1v8.2 m12.3,47.6v11.9h13.1 m33.6,59.5h7.6 m49.1,59.5 h7.7 m77.5,47.6v11.9h-13",polygon:"m55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1s53.5,34.9,55.2,34.9z m50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 c47.3,52.4,48.7,51,50.4,51z m55.6,37.1l1.5-7.8 m60.1,13.5l1.6-8.7l-7.8,4 m59,19l-1,5.3 m24,16.1l6.4,4.9l6.4-3.3 m48.5,11.6 l-5.9,3.1 m19.1,12.8l9.7,5.1l1.1,7.7 m13.4,29.8l1,7.3l6.6,1.6 m11.6,18.4l1,6.1 m32.8,41.9 m26.6,40.4 m27.3,40.2l6.1,1.6 m49.9,52.1l-5.6-7.6l-4.9-1.2",linex:"m15.2,30 m19.7,15.6v1.9h29 m34.8,1.9h40.4 m55.3,15.6v1.9h45.9 m19.7,44.4v58.1h29 m34.8,58.1h40.4 m55.3,44.4 v58.1h45.9 m12.5,20.3l-9.4,9.6l9.6,9.8 m3.1,29.9h16.5 m62.5,20.3l9.4,9.6l62.3,39.7 m71.9,29.9h55.4",liney:"m38.8,7.7 m52.7,12h13.2v9 m65.9,26.6v32 m52.7,46.3h13.2v-9 m24.9,12h11.8v9 m11.8,26.6v32 m24.9,46.3h11.8v-9 m48.2,5.1l-9.3-9l-9.4,9.2 m38.9-3.9v12 m48.2,53.3l-9.3,9l-9.4-9.2 m38.9,62.3v46.4",keep:"m4,10.5v1h10.3 m20.7,1h6.1 m33,1h6.1 m55.4,10.5v1h45.2 m4,17.3v6.6 m55.6,17.3v6.6 m4,30.5v40h10.3 m20.7,40 h6.1 m33,40h6.1 m55.4,30.5v40h45.2 m21,18.9h62.9v48.6h21v18.9z",clear:"m22,14.7l30.9,31 m52.9,14.7l22,45.7 m4.7,16.8v4.2h13.1 m26,4.2h7.8 m41.6,4.2h7.8 m70.3,16.8v4.2h57.2 m4.7,25.9v8.6 m70.3,25.9v8.6 m4.7,43.2v12.6h13.1 m26,55.8h7.8 m41.6,55.8h7.8 m70.3,43.2v12.6h57.2"},title:n(cv.title)};var lv=$w.prototype;lv.render=lv.updateview=function(t,e){var i,n,a;e.eachcomponent({maintype:"brush"},function(t){i=t.brushtype,n=t.brushoption.brushmode||"single",a|=t.areas.length}),this._brushtype=i,this._brushmode=n,f(t.get("type",!0),function(e){t.seticonstatus(e,("keep"===e?"multiple"===n:"clear"===e?a:e===i)?"emphasis":"normal")})},lv.geticons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},lv.onclick=function(t,e,i){var n=this._brushtype,a=this._brushmode;"clear"===i?(e.dispatchaction({type:"axisareaselect",intervals:[]}),e.dispatchaction({type:"brush",command:"clear",areas:[]})):e.dispatchaction({type:"takeglobalcursor",key:"brush",brushoption:{brushtype:"keep"===i?n:n===i?!1:i,brushmode:"keep"===i?"multiple"===a?"single":"multiple":a}})},qw("brush",$w),tu(lv);var kv=f,pv=function(t){var e=t&&t.visualmap;_(e)||(e=e?[e]:[]),kv(e,function(t){if(t){jw(t,"splitlist")&&!jw(t,"pieces")&&(t.pieces=t.splitlist,delete t.splitlist);var e=t.pieces;e&&_(e)&&kv(e,function(t){s(t)&&(jw(t,"start")&&!jw(t,"min")&&(t.min=t.start),jw(t,"end")&&!jw(t,"max")&&(t.max=t.end))})}})};hd.registersubtypedefaulter("visualmap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitnumber>0)&&!t.calculable?"piecewise":"continuous"});var ov=el.visual.component;ou(ov,{createonallseries:!0,reset:function(t,e){var i=[];return e.eachcomponent("visualmap",function(e){var n=t.pipelinecontext;!e.istargetseries(t)||n&&n.large||i.push(cw(e.statelist,e.targetvisuals,y(e.getvaluestate,e),e.getdatadimension(t.getdata())))}),i}}),ou(ov,{createonallseries:!0,reset:function(t,e){var i=t.getdata(),n=[];e.eachcomponent("visualmap",function(e){if(e.istargetseries(t)){var a=e.getvisualmeta(y(qw,null,t,e))||{stops:[],outercolors:[]},o=e.getdatadimension(i),r=i.getdimensioninfo(o);null!=r&&(a.dimension=r.index,n.push(a))}}),t.getdata().setvisual("visualmeta",n)}});var ev={get:function(t,e,i){var a=n((nv[t]||{})[e]);return i&&_(a)?a[a.length-1]:a}},nv={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]}},rv=qo.mapvisual,zv=qo.eachvisual,bv=_,vv=f,gv=ar,fv=mr,wv=g,hv=ru({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;as.canvassupported||(i.realtime=!1),!e&&aw(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=tw(this.option.controller,e,t),this.targetvisuals=tw(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=ea(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 a,o,r=this.option,s=r.precision,l=this.databound,u=r.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),a=!0),o=e?t:a?[n(t[0]),n(t[1])]:n(t),b(u)?u.replace("{value}",a?o[0]:o).replace("{value2}",a?o[1]:o):w(u)?a?u(t[0],t[1]):u(t):a?t[0]===l[0]?i[0]+" "+o[1]:t[1]===l[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetextent:function(){var t=this.option,e=gv([t.min,t.max]);this._dataextent=e},getdatadimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getdimension(e);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var o=n[a],r=t.getdimensioninfo(o);if(!r.iscalculationcoord)return o}}},getextent:function(){return this._dataextent.slice()},completevisualoption:function(){function t(t){bv(r.color)&&!t.inrange&&(t.inrange={color:r.color.slice().reverse()}),t.inrange=t.inrange||{color:o.get("gradientcolor")},vv(this.statelist,function(e){var i=t[e];if(b(i)){var n=ev.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},vv(n,function(t,e){if(qo.isvalidtype(e)){var i=ev.get(e,"inactive",h);null!=i&&(a[e]=i,"color"!==e||a.hasownproperty("opacity")||a.hasownproperty("coloralpha")||(a.opacity=[0,0]))}}))}function i(t){var e=(t.inrange||{}).symbol||(t.outofrange||{}).symbol,i=(t.inrange||{}).symbolsize||(t.outofrange||{}).symbolsize,a=this.get("inactivecolor");vv(this.statelist,function(o){var r=this.itemsize,s=t[o];s||(s=t[o]={color:h?a:[a]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundrect":["roundrect"])),null==s.symbolsize&&(s.symbolsize=i&&n(i)||(h?r[0]:[r[0],r[0]])),s.symbol=rv(s.symbol,function(t){return"none"===t||"square"===t?"roundrect":t});var l=s.symbolsize;if(null!=l){var u=-1/0;zv(l,function(t){t>u&&(u=t)}),s.symbolsize=rv(l,function(t){return fv(t,[0,u],[0,r[0]],!0)})}},this)}var o=this.ecmodel,r=this.option,s={inrange:r.inrange,outofrange:r.outofrange},l=r.target||(r.target={}),u=r.controller||(r.controller={});a(l,s),a(u,s);var h=this.iscategory();t.call(this,l),t.call(this,u),e.call(this,l,"inrange","outofrange"),i.call(this,u)},resetitemsize:function(){this.itemsize=[parsefloat(this.get("itemwidth")),parsefloat(this.get("itemheight"))]},iscategory:function(){return!!this.option.categories},setselected:wv,getvaluestate:wv,getvisualmeta:wv}),zv=[20,140],uv=hv.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(){uv.superapply(this,"optionupdated",arguments),this.resetextent(),this.resetvisual(function(t){t.mappingmethod="linear",t.dataextent=this.getextent()}),this._resetrange()},resetitemsize:function(){uv.superapply(this,"resetitemsize",arguments);var t=this.itemsize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isnan(t[0]))&&(t[0]=zv[0]),(null==t[1]||isnan(t[1]))&&(t[1]=zv[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(){hv.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=ar((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=[],a=i.getdata();a.each(this.getdatadimension(a),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesid:i.id,dataindex:n})},this),e},getvisualmeta:function(t){function e(e,i){a.push({value:e,color:t(e,i)})}for(var i=tb(this,"outofrange",this.getextent()),n=tb(this,"inrange",this.option.range.slice()),a=[],o=0,r=0,s=n.length,l=i.length;l>r&&(!n.length||i[r]<=n[0]);r++)i[r]o;o++,u=0)u&&a.length&&e(n[o],"outofrange"),e(n[o],"inrange");for(var u=1;l>r;r++)(!n.length||n[n.length-1]o;o++){var r=t[0]+a*o;if(r>t[1])break;n.push({color:this.getcontrollervisual(r,"color",e),offset:o/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 fm("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,a=i.handlethumbs,o=i.handlelabels;jv([0,1],function(r){var s=a[r];s.setstyle("fill",e.handlescolor[r]),s.position[1]=t[r];var l=sr(i.handlelabelpoints[r],rr(s,this.group));o[r].setstyle({x:l[0],y:l[1],text:n.formatvaluetext(this._datainterval[r]),textverticalalign:"middle",textalign:this._applytransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.bargroup)})},this)}},_showindicator:function(t,e,i,n){var a=this.visualmapmodel,o=a.getextent(),r=a.itemsize,s=[0,r[1]],l=yv(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setshape("points",ob(!!i,n,l,r[1]));var c={convertopacitytoalpha:!0},d=this.getcontrollervisual(t,"color",c);h.setstyle("fill",d);var f=sr(u.indicatorlabelpoint,rr(h,this.group)),p=u.indicatorlabel;p.attr("invisible",!1);var g=this._applytransform("left",u.bargroup),m=this._orient;p.setstyle({text:(i?i:"")+a.formatvaluetext(e),textverticalalign:"horizontal"===m?g:"middle",textalign:"horizontal"===m?"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]=qv(kv(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 a=[0,n[1]],o=i.getextent();t=qv(kv(a[0],t),a[1]);var r=rb(i,o,a),s=[t-r,t+r],l=yv(t,a,o,!0),u=[yv(s[0],a,o,!0),yv(s[1],a,o,!0)];s[0]a[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showindicator(l,u[1],"< ",r):1/0===u[1]?this._showindicator(l,u[0],"> ",r):this._showindicator(l,l,"≈ ",r));var h=this._hoverlinkdataindices,c=[];(e||sb(i))&&(c=this._hoverlinkdataindices=i.findtargetdataindices(u));var d=ua(h,c);this._dispatchhighdown("downplay",ib(d[0],i)),this._dispatchhighdown("highlight",ib(d[1],i))}},_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 a=n.getdata(e.datatype),o=a.get(i.getdatadimension(a),e.dataindex,!0);isnan(o)||this._showindicator(o,o)}}},_hideindicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorlabel&&t.indicatorlabel.attr("invisible",!0)},_clearhoverlinktoseries:function(){this._hideindicator();var t=this._hoverlinkdataindices;this._dispatchhighdown("downplay",ib(t,this.visualmapmodel)),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 a=rr(e,n?null:this.group);return va[_(t)?"applytransform":"transformdirection"](t,a,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()}}),tg={type:"selectdatarange",event:"datarangeselected",update:"update"};cu(tg,function(t,e){e.eachcomponent({maintype:"visualmap",query:t},function(e){e.setselected(t.selected)})}),tu(pv);{var eg=hv.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){eg.superapply(this,"optionupdated",arguments),this._piecelist=[],this.resetextent();var i=this._mode=this._determinemode();ig[this._mode].call(this),this._resetselected(t,e);var a=this.option.categories;this.resetvisual(function(t,e){"categories"===i?(t.mappingmethod="category",t.categories=n(a)):(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=qo.listvisualtypes(),a=this.iscategory();f(e.pieces,function(t){f(n,function(e){t.hasownproperty(e)&&(i[e]=1)})}),f(i,function(i,n){var o=0;f(this.statelist,function(i){o|=t(e,i,n)||t(e.target,i,n)},this),!o&&f(this.statelist,function(t){(e[t]||(e[t]={}))[n]=ev.get(n,"inrange"===t?"active":"inactive",a)})},this),hv.prototype.completevisualoption.apply(this,arguments)},_resetselected:function(t,e){var i=this.option,n=this._piecelist,a=(e?i:t).selected||{};if(i.selected=a,f(n,function(t){var e=this.getselectedmapkey(t);a.hasownproperty(e)||(a[e]=!0)},this),"single"===i.selectedmode){var o=!1;f(n,function(t){var e=this.getselectedmapkey(t);a[e]&&(o?a[e]=!1:o=!0)},this)}},getselectedmapkey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getpiecelist:function(){return this._piecelist},_determinemode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitnumber"},setselected:function(t){this.option.selected=n(t)},getvaluestate:function(t){var e=qo.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=[],a=i.getdata();a.each(this.getdatadimension(a),function(e,i){var a=qo.findpieceindex(e,this._piecelist);a===t&&n.push(i)},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,o){var r=a.getrepresentvalue({interval:e});o||(o=a.getvaluestate(r));var s=t(r,o);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=[],a=this,o=this._piecelist.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),r=o[o.length-1].interval[1],1/0!==r&&o.push({interval:[r,1/0]}) }else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,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}}}}),ig={splitnumber:function(){var t=this.option,e=this._piecelist,i=math.min(t.precision,20),n=this.getextent(),a=t.splitnumber;a=math.max(parseint(a,10),1),t.splitnumber=a;for(var o=(n[1]-n[0])/a;+o.tofixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.tofixed(i);var r=0;t.minopen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+a;l>r;s+=o){var u=r===a-1?n[1]:s+o;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxopen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),vr(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),ub(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 a=n.value=t.value;n.interval=[a,a],n.close=[1,1]}else{for(var o=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==o[h];d++)o[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==o[h]&&(o[h]=l[h])}u[0]&&1/0===o[1]&&(r[0]=0),u[1]&&o[0]===-1/0&&(r[1]=0),o[0]===o[1]&&r[0]&&r[1]&&(n.value=o[0])}n.visual=qo.retrievevisuals(t),e.push(n)},this),ub(t,e),vr(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)}};xv.extend({type:"visualmap.piecewise",dorender:function(){function t(t){var a=t.piece,u=new fm;u.onclick=y(this._onitemclick,this,a),this._enablehoverlink(u,t.indexinmodelpiecelist);var h=i.getrepresentvalue(a);if(this._createitemsymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualmapmodel.getvaluestate(h);u.add(new ia({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:a.text,textverticalalign:"middle",textalign:s,textfont:o,textfill:r,opacity:"outofrange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeall();var i=this.visualmapmodel,n=i.get("textgap"),a=i.textstylemodel,o=a.getfont(),r=a.gettextcolor(),s=this._getitemalign(),l=i.itemsize,u=this._getviewdata(),h=u.endstext,c=d(i.get("showlabel",!0),!h);h&&this._renderendstext(e,h[0],l,c,s),f(u.viewpiecelist,t,this),h&&this._renderendstext(e,h[1],l,c,s),sd(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:ib(i.findtargetdataindices(e),i)})}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 eb(t,this.api,t.itemsize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderendstext:function(t,e,i,n,a){if(e){var o=new fm,r=this.visualmapmodel.textstylemodel;o.add(new ia({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textverticalalign:"middle",textalign:n?a:"center",text:e,textfont:r.getfont(),textfill:r.gettextcolor()}})),t.add(o)}},_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"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewpiecelist:e,endstext:i}},_createitemsymbol:function(t,e,i){t.add(ec(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,a=n(i.selected),o=e.getselectedmapkey(t);"single"===i.selectedmode?(a[o]=!0,f(a,function(t,e){a[e]=e===o})):a[o]=!a[o],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:a})}})}tu(pv);var ng=ru({type:"toolbox",layoutmode:{type:"box",ignoresize:!0},optionupdated:function(){ng.superapply(this,"optionupdated",arguments),f(this.option.feature,function(t,e){var i=kw(e);i&&a(t,i.defaultoption)})},defaultoption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundcolor:"transparent",bordercolor:"#ccc",borderradius:0,borderwidth:0,padding:5,itemsize:15,itemgap:8,showtitle:!0,iconstyle:{bordercolor:"#666",color:"none"},emphasis:{iconstyle:{bordercolor:"#3e98c5"}},tooltip:{show:!1}}});zu({type:"toolbox",render:function(t,e,i,n){function a(a,r){var s,l=c[a],d=c[r],f=u[l],p=new vr(f,t,t.ecmodel);if(n&&null!=n.newtitle&&(f.title=n.newtitle),l&&!d){if(hb(l))s={model:p,onclick:p.option.onclick,featurename:l};else{var g=kw(l);if(!g)return;s=new g(p,e,i)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecmodel=e,s.api=i}return!l&&d?void(s.dispose&&s.dispose(e,i)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,i)):(o(p,s,l),p.seticonstatus=function(t,e){var i=this.option,n=this.iconpaths;i.iconstatus=i.iconstatus||{},i.iconstatus[t]=e,n[t]&&n[t].trigger(e)},void(s.render&&s.render(p,e,i,n)))}function o(n,a,o){var u=n.getmodel("iconstyle"),h=n.getmodel("emphasis.iconstyle"),c=a.geticons?a.geticons():n.get("icon"),d=n.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[o]=p,d[o]=g}var m=n.iconpaths={};f(c,function(o,c){var f=dr(o,{},{x:-l/2,y:-l/2,width:l,height:l});f.setstyle(u.getitemstyle()),f.hoverstyle=h.getitemstyle(),f.setstyle({text:d[c],textalign:h.get("textalign"),textborderradius:h.get("textborderradius"),textpadding:h.get("textpadding"),textfill:null});var p=t.getmodel("tooltip");p&&p.get("show")&&f.attr("tooltip",r({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterparams:{componenttype:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),wo(f),t.get("showtitle")&&(f.__title=d[c],f.on("mouseover",function(){var e=h.getitemstyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setstyle({textfill:h.get("textfill")||e.fill||e.stroke||"#000",textbackgroundcolor:h.get("textbackgroundcolor"),textposition:h.get("textposition")||i})}).on("mouseout",function(){f.setstyle({textfill:null,textbackgroundcolor:null})})),f.trigger(n.get("iconstatus."+c)||"normal"),s.add(f),f.on("click",y(a.onclick,a,e,i,c)),m[c]=f})}var s=this.group;if(s.removeall(),t.get("show")){var l=+t.get("itemsize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new zu(this._featurenames||[],c).add(a).update(a).remove(x(a,null)).execute(),this._featurenames=c,h_(s,t,i),s.add(c_(s.getboundingrect(),t)),s.eachchild(function(t){var e=t.__title,n=t.hoverstyle;if(n&&e){var a=xi(e,ln(n)),o=t.position[0]+s.position[0],r=t.position[1]+s.position[1]+l,u=!1;r+a.height>i.getheight()&&(n.textposition="top",u=!0);var h=u?-5-a.height:l+8;o+a.width/2>i.getwidth()?(n.textposition=["100%",h],n.textalign="right"):o-a.width/2<0&&(n.textposition=[0,h],n.textalign="left")}})}},updateview:function(t,e,i,n){f(this._features,function(t){t.updateview&&t.updateview(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeall()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var ag=uc.toolbox.saveasimage;cb.defaultoption={show:!0,icon:"m4.7,22.9l29.3,45.5l54.7,23.4m4.6,43.6l4.6,58l53.8,58l53.8,43.6m29.2,45.1l29.2,0",title:ag.title,type:"png",connectedbackgroundcolor:"#fff",name:"",excludecomponents:["toolbox"],pixelratio:1,lang:ag.lang.slice()},cb.prototype.unusable=!as.canvassupported;var og=cb.prototype;og.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=i.get("type",!0)||"png",o=e.getconnecteddataurl({type:a,backgroundcolor:i.get("backgroundcolor",!0)||t.get("backgroundcolor")||"#fff",connectedbackgroundcolor:i.get("connectedbackgroundcolor"),excludecomponents:i.get("excludecomponents"),pixelratio:i.get("pixelratio")});if("function"!=typeof mouseevent||as.browser.ie||as.browser.edge)if(window.navigator.mssaveoropenblob){for(var r=atob(o.split(",")[1]),s=r.length,l=new uint8array(s);s--;)l[s]=r.charcodeat(s);var u=new blob([l]);window.navigator.mssaveoropenblob(u,n+"."+a)}else{var h=i.get("lang"),c='',d=window.open();d.document.write(c)}else{var f=document.createelement("a");f.download=n+"."+a,f.target="_blank",f.href=o;var p=new mouseevent("click",{view:window,bubbles:!0,cancelable:!1});f.dispatchevent(p)}},qw("saveasimage",cb);var rg=uc.toolbox.magictype,sg="__ec_magictype_stack__";db.defaultoption={show:!0,type:[],icon:{line:"m4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9m4.1,58h51.4",bar:"m6.7,22.9h10v48h-10v22.9zm24.9,13h10v35h-10v13zm43.2,2h10v46h-10v2zm3.1,58h53.7",stack:"m8.2,38.4l-8.4,4.1l30.6,15.3l60,42.5l-8.1-4.1l-21.5,11l8.2,38.4z m51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9l8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2l51.9,30z m51.9,21.7l-8.1,4.2l35.7,30l-5.3,2.8l24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2l8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1l51.9,21.7zm30.4,2.2l-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1l30.4,2.2z"},title:n(rg.title),option:{},seriesindex:{}};var lg=db.prototype;lg.geticons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var ug={line:function(t,e,i,n){return"bar"===t?a({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?a({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){var o=i.get("stack")===sg;return"line"===t||"bar"===t?(n.seticonstatus("stack",o?"normal":"emphasis"),a({id:e,stack:o?"":sg},n.get("option.stack")||{},!0)):void 0}},hg=[["line","bar"],["stack"]];lg.onclick=function(t,e,i){var o=this.model,r=o.get("seriesindex."+i);if(ug[i]){var l={series:[]},h=function(e){var n=e.subtype,a=e.id,r=ug[i](n,a,e,o);r&&(s(r,e.option),l.series.push(r));var u=e.coordinatesystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getaxesbyscale("ordinal")[0];if(h){var c=h.dim,d=c+"axis",f=t.querycomponents({maintype:d,index:e.get(name+"index"),id:e.get(name+"id")})[0],p=f.componentindex;l[d]=l[d]||[];for(var g=0;p>=g;g++)l[d][p]=l[d][p]||{};l[d][p].boundarygap="bar"===i}}};f(hg,function(t){u(t,i)>=0&&f(t,function(t){o.seticonstatus(t,"normal")})}),o.seticonstatus(i,"emphasis"),t.eachcomponent({maintype:"series",query:null==r?null:{seriesindex:r}},h);var c;if("stack"===i){var d=l.series&&l.series[0]&&l.series[0].stack===sg;c=d?a({stack:rg.title.tiled},rg.title):n(rg.title)}e.dispatchaction({type:"changemagictype",currenttype:i,newoption:l,newtitle:c})}},cu({type:"changemagictype",event:"magictypechanged",update:"prepareandupdate"},function(t,e){e.mergeoption(t.newoption)}),qw("magictype",db);var cg=uc.toolbox.dataview,dg=new array(60).join("-"),fg=" ",pg=new regexp("["+fg+"]+","g");bb.defaultoption={show:!0,readonly:!1,optiontocontent:null,contenttooption:null,icon:"m17.5,17.3h33 m17.5,17.3h33 m45.4,29.5h-28 m11.5,2v56h51v14.8l38.4,2h11.5z m38.4,2.2v12.7h51 m45.4,41.7h-28",title:n(cg.title),lang:n(cg.lang),backgroundcolor:"#fff",textcolor:"#000",textareacolor:"#fff",textareabordercolor:"#333",buttoncolor:"#c23531",buttontextcolor:"#fff"},bb.prototype.onclick=function(t,e){function i(){n.removechild(o),x._dom=null}var n=e.getdom(),a=this.model;this._dom&&n.removechild(this._dom);var o=document.createelement("div");o.style.csstext="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundcolor=a.get("backgroundcolor")||"#fff";var r=document.createelement("h4"),s=a.get("lang")||[];r.innerhtml=s[0]||a.get("title"),r.style.csstext="margin: 10px 20px;",r.style.color=a.get("textcolor");var l=document.createelement("div"),u=document.createelement("textarea");l.style.csstext="display:block;width:100%;overflow:auto;";var h=a.get("optiontocontent"),c=a.get("contenttooption"),d=mb(t);if("function"==typeof h){var f=h(e.getoption());"string"==typeof f?l.innerhtml=f:t(f)&&l.appendchild(f)}else l.appendchild(u),u.readonly=a.get("readonly"),u.style.csstext="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=a.get("textcolor"),u.style.bordercolor=a.get("textareabordercolor"),u.style.backgroundcolor=a.get("textareacolor"),u.value=d.value;var p=d.meta,g=document.createelement("div");g.style.csstext="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createelement("div"),y=document.createelement("div");m+=";background-color:"+a.get("buttoncolor"),m+=";color:"+a.get("buttontextcolor");var x=this;se(v,"click",i),se(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getoption()):wb(u.value,p)}catch(n){throw i(),new error("data view format error "+n)}t&&e.dispatchaction({type:"changedataview",newoption:t}),i()}),v.innerhtml=s[1],y.innerhtml=s[2],y.style.csstext=m,v.style.csstext=m,!a.get("readonly")&&g.appendchild(y),g.appendchild(v),o.appendchild(r),o.appendchild(l),o.appendchild(g),l.style.height=n.clientheight-80+"px",n.appendchild(o),this._dom=o},bb.prototype.remove=function(t,e){this._dom&&e.getdom().removechild(this._dom)},bb.prototype.dispose=function(t,e){this.remove(t,e)},qw("dataview",bb),cu({type:"changedataview",event:"dataviewchanged",update:"prepareandupdate"},function(t,e){var i=[];f(t.newoption.series,function(t){var n=e.getseriesbyname(t.name)[0];if(n){var a=n.get("data");i.push({name:t.name,data:sb(t.data,a)})}else i.push(r({type:"scatter"},t))}),e.mergeoption(s({series:i},t.newoption))});var gg=f,mg="\x00_ec_hist_store";fb.extend({type:"datazoom.select"}),wb.extend({type:"datazoom.select"});var vg=uc.toolbox.datazoom,yg=f,xg="\x00_ec_\x00toolbox-datazoom_";cb.defaultoption={show:!0,filtermode:"filter",icon:{zoom:"m0,13.5h26.9 m13.5,26.9v0 m32.1,13.5h58v58h13.5 v32.1",back:"m22,1.4l9.9,13.5l12.3,12.3 m10.3,13.5h54.9v44.6 h10.3v-26"},title:n(vg.title)};var _g=cb.prototype;_g.render=function(t,e,i,n){this.model=t,this.ecmodel=e,this.api=i,pb(t,e,this,n,i),kb(t,e)},_g.onclick=function(t,e,i){wg[i].call(this)},_g.remove=function(){this._brushcontroller.unmount()},_g.dispose=function(){this._brushcontroller.dispose()};var wg={zoom:function(){var t=!this._iszoomactive;this.api.dispatchaction({type:"takeglobalcursor",key:"datazoomselect",datazoomselectactive:t})},back:function(){this._dispatchzoomaction(ib(this.ecmodel))}};_g._onbrush=function(t,e){function i(t,e,i){var r=e.getaxis(t),s=r.model,l=n(t,s,o),u=l.findrepresentativeaxisproxy(s).getminmaxspan();(null!=u.minvaluespan||null!=u.maxvaluespan)&&(i=kn(0,i.slice(),r.scale.getextent(),0,u.minvaluespan,u.maxvaluespan)),l&&(a[l.id]={datazoomid:l.id,startvalue:i[0],endvalue:i[1]})}function n(t,e,i){var n;return i.eachcomponent({maintype:"datazoom",subtype:"select"},function(i){var a=i.getaxismodel(t,e.componentindex);a&&(n=i)}),n}if(e.isend&&t.length){var a={},o=this.ecmodel;this._brushcontroller.updatecovers([]);var r=new pw(lb(this.model.option),o,{include:["grid"]});r.matchoutputranges(t,o,function(t,e,n){if("cartesian2d"===n.type){var a=t.brushtype;"rect"===a?(i("x",n,e[0]),i("y",n,e[1])):i({linex:"x",liney:"y"}[a],n,e)}}),mb(o,a),this._dispatchzoomaction(a)}},_g._dispatchzoomaction=function(t){var e=[];yg(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchaction({type:"datazoom",from:this.uid,batch:e})},qw("datazoom",cb),tu(function(t){function e(t,e){if(e){var a=t+"index",o=e[a];null==o||"all"===o||_(o)||(o=o===!1||"none"===o?[]:[o]),i(t,function(i,r){if(null==o||"all"===o||-1!==u(o,r)){var s={type:"select",$fromtoolbox:!0,filtermode:e.filtermode||"filter",id:xg+t+r};s[a]=r,n.push(s)}})}}function i(e,i){var n=t[e];_(n)||(n=n?[n]:[]),yg(n,i)}if(t){var n=t.datazoom||(t.datazoom=[]);_(n)||(t.datazoom=n=[n]);var a=t.toolbox;if(a&&(_(a)&&(a=a[0]),a&&a.feature)){var o=a.feature.datazoom;e("xaxis",o),e("yaxis",o)}}});var bg=uc.toolbox.restore;ob.defaultoption={show:!0,icon:"m3.8,33.4 m47,18.9h9.8v8.7 m56.3,20.1 c52.1,9,40.5,0.6,26.8,2.1c12.6,3.7,1.6,16.2,2.1,30.6 m13,41.1h3.1v10.2 m3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:bg.title};var sg=ob.prototype;sg.onclick=function(t,e){tb(t),e.dispatchaction({type:"restore",from:this.uid})},qw("restore",ob),cu({type:"restore",event:"restore",update:"prepareandupdate"},function(t,e){e.resetoption("recreate")});var mg={path:null,compoundpath:null,group:fm,image:cn,text:ia};tu(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 ig=ru({type:"graphic",defaultoption:{elements:[],parentid:null},_eloptionstoupdate:null,mergeoption:function(){var t=this.option.elements;this.option.elements=null,ig.superapply(this,"mergeoption",arguments),this.option.elements=t},optionupdated:function(t,e){var i=this.option,n=(e?i:t).elements,a=i.elements=e?[]:i.elements,o=[];this._flatten(n,o);var r=oa(a,o);ra(r);var s=this._eloptionstoupdate=[];f(r,function(t,e){var i=t.option;i&&(s.push(i),bb(t,i),vb(a,e,i),gb(a[e],i))},this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[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}});zu({type:"graphic",init:function(){this._elmap=b(),this._lastgraphicmodel},render:function(t,e,i){t!==this._lastgraphicmodel&&this._clear(),this._lastgraphicmodel=t,this._updateelements(t),this._relocate(t,i)},_updateelements:function(t){var e=t.useeloptionstoupdate();if(e){var i=this._elmap,n=this.group;f(e,function(e){var a=e.$action,o=e.id,r=i.get(o),s=e.parentid,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textverticalalign=u.textbaseline=null),!u.hasownproperty("textfill")&&u.fill&&(u.textfill=u.fill),!u.hasownproperty("textstroke")&&u.stroke&&(u.textstroke=u.stroke));var h=rb(e);a&&"merge"!==a?"replace"===a?(nb(r,i),eb(o,l,h,i)):"remove"===a&&nb(r,i):r?r.attr(h):eb(o,l,h,i);var c=i.get(o);c&&(c.__ecgraphicwidthoption=e.width,c.__ecgraphicheightoption=e.height,fb(c,t,e))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elmap,o=e.getwidth(),r=e.getheight(),s=0;s=0;s--){var l=i[s],u=a.get(l.id);if(u){var h=u.parent,d=h===n?{width:o,height:r}:{width:h.__ecgraphicwidth,height:h.__ecgraphicheight};es(u,l,d,null,{hv:l.hv,boundingmode:l.bounding})}}},_clear:function(){var t=this._elmap;t.each(function(e){nb(e,t)}),this._elmap=b()},dispose:function(){this._clear()}});var tg,ag="urn:schemas-microsoft-com:vml",dg="undefined"==typeof window?null:window,cg=!1,lg=dg&&dg.document;if(lg&&!as.canvassupported)try{!lg.namespaces.zrvml&&lg.namespaces.add("zrvml",ag),tg=function(t){return lg.createelement("')}}catch(kg){tg=function(t){return lg.createelement("<"+t+' xmlns="'+ag+'" class="zrvml">')}}var pg=kt.cmd,og=math.round,eg=math.sqrt,ng=math.abs,rg=math.cos,zg=math.sin,bg=math.max;if(!as.canvassupported){var vg=",",gg="progid:dximagetransform.microsoft",fg=21600,wg=fg/2,hg=1e5,zg=1e3,ug=function(t){t.style.csstext="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=fg+","+fg,t.coordorigin="0,0"},xg=function(t){return string(t).replace(/&/g,"&").replace(/"/g,""")},yg=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},jg=function(t,e){e&&t&&e.parentnode!==t&&t.appendchild(e)},qg=function(t,e){e&&t&&e.parentnode===t&&t.removechild(e)},kg=function(t,e,i){return(parsefloat(t)||0)*hg+(parsefloat(e)||0)*zg+i},$g=in,jg=function(t,e,i){var n=ti(e);i=+i,isnan(i)&&(i=1),n&&(t.color=yg(n[0],n[1],n[2]),t.opacity=i*n[3])},qg=function(t){var e=ti(t);return[yg(e[0],e[1],e[2]),e[3]]},tf=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof wa){var a,o=0,r=[0,0],s=0,l=1,u=i.getboundingrect(),h=u.width,c=u.height;if("linear"===n.type){a="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(oe(f,f,d),oe(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];o=180*math.atan2(g,m)/math.pi,0>o&&(o+=360),1e-6>o&&(o=0)}else{a="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&oe(f,f,d),y/=v[0]*fg,x/=v[1]*fg;var _=bg(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorstops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,s=[],m=[],i=0;b>i;i++){var t=w[i],a=qg(t.color);m.push(t.offset*l+s+" "+a[0]),(0===i||i===b-1)&&s.push(a)}if(b>=2){var d=s[0][0],c=s[1][0],l=s[0][1]*e.opacity,k=s[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=o,t.color=d,t.color2=c,t.colors=m.join(","),t.opacity=k,t.opacity2=l}"radial"===a&&(t.focusposition=r.join(","))}else jg(t,n,e.opacity)},ef=function(t,e){e.linedash&&(t.dashstyle=e.linedash.join(" ")),null==e.stroke||e.stroke instanceof wa||jg(t,e.stroke,e.opacity)},if=function(t,e,i,n){var a="fill"===e,o=t.getelementsbytagname(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.linewidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof wa&&qg(t,o),o||(o=wb(e)),a?tf(o,i,n):ef(o,i),jg(t,o)):(t[a?"filled":"stroked"]="false",qg(t,o))},nf=[[],[],[]],af=function(t,e){var i,n,a,o,r,s,l=pg.m,u=pg.c,h=pg.l,c=pg.a,d=pg.q,f=[],p=t.data,g=t.len();for(o=0;g>o;){switch(a=p[o++],n="",i=0,a){case l:n=" m ",i=1,r=p[o++],s=p[o++],nf[0][0]=r,nf[0][1]=s;break;case h:n=" l ",i=1,r=p[o++],s=p[o++],nf[0][0]=r,nf[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=p[o++],x=p[o++],_=p[o++],w=p[o++];a===d?(m=_,v=w,_=(_+2*y)/3,w=(w+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[o++],v=p[o++]),nf[0][0]=y,nf[0][1]=x,nf[1][0]=_,nf[1][1]=w,nf[2][0]=m,nf[2][1]=v,r=m,s=v;break;case c:var b=0,s=0,m=1,i=1,t=0;e&&(b=e[4],s=e[5],m=eg(e[0]*e[0]+e[1]*e[1]),i=eg(e[2]*e[2]+e[3]*e[3]),t=math.atan2(-e[1]/i,e[0]/m));var a=p[o++],d=p[o++],c=p[o++],l=p[o++],k=p[o++]+t,p=p[o++]+k+t;o++;var o=p[o++],e=a+rg(k)*c,n=d+zg(k)*l,y=a+rg(p)*c,x=d+zg(p)*l,r=o?" wa ":" at ";math.abs(e-y)<1e-4&&(math.abs(p-k)>.01?o&&(e+=270/fg):math.abs(n-d)<1e-4?o&&a>e||!o&&e>a?x-=270/fg:x+=270/fg:o&&d>n||!o&&n>d?y+=270/fg:y-=270/fg),f.push(r,og(((a-c)*m+b)*fg-wg),vg,og(((d-l)*i+s)*fg-wg),vg,og(((a+c)*m+b)*fg-wg),vg,og(((d+l)*i+s)*fg-wg),vg,og((e*m+b)*fg-wg),vg,og((n*i+s)*fg-wg),vg,og((y*m+b)*fg-wg),vg,og((x*i+s)*fg-wg)),r=y,s=x;break;case pg.r:var z=nf[0],b=nf[1];z[0]=p[o++],z[1]=p[o++],b[0]=z[0]+p[o++],b[1]=z[1]+p[o++],e&&(oe(z,z,e),oe(b,b,e)),z[0]=og(z[0]*fg-wg),b[0]=og(b[0]*fg-wg),z[1]=og(z[1]*fg-wg),b[1]=og(b[1]*fg-wg),f.push(" m ",z[0],vg,z[1]," l ",b[0],vg,z[1]," l ",b[0],vg,b[1]," l ",z[0],vg,b[1]);break;case pg.z:f.push(" x ")}if(i>0){f.push(n);for(var v=0;i>v;v++){var g=nf[v];e&&oe(g,g,e),f.push(og(g[0]*fg-wg),vg,og(g[1]*fg-wg),i-1>v?vg:"")}}}return f.join("")};ao.prototype.brushvml=function(t){var e=this.style,i=this._vmlel;i||(i=wb("shape"),ug(i),this._vmlel=i),if(i,"fill",e,this),if(i,"stroke",e,this);var n=this.transform,a=null!=n,o=i.getelementsbytagname("stroke")[0];if(o){var r=e.linewidth;if(a&&!e.strokenoscale){var s=n[0]*n[3]-n[1]*n[2];r*=eg(ng(s))}o.weight=r+"px"}var l=this.path||(this.path=new kt);this.__dirtypath&&(l.beginpath(),l.subpixeloptimize=!1,this.buildpath(l,this.shape),l.tostatic(),this.__dirtypath=!1),i.path=af(l,this.transform),i.style.zindex=kg(this.zlevel,this.z,this.z2),jg(t,i),null!=e.text?this.drawrecttext(t,this.getboundingrect()):this.removerecttext(t)},ao.prototype.onremove=function(t){qg(t,this._vmlel),this.removerecttext(t)},ao.prototype.onadd=function(t){jg(t,this._vmlel),this.appendrecttext(t)};var of=function(t){return"object"==typeof t&&t.tagname&&"img"===t.tagname.touppercase()};cn.prototype.brushvml=function(t){var e,i,n=this.style,a=n.image;if(of(a)){var o=a.src;if(o===this._imagesrc)e=this._imagewidth,i=this._imageheight;else{var r=a.runtimestyle,s=r.width,l=r.height;r.width="auto",r.height="auto",e=a.width,i=a.height,r.width=s,r.height=l,this._imagesrc=o,this._imagewidth=e,this._imageheight=i}a=o}else a===this._imagesrc&&(e=this._imagewidth,i=this._imageheight);if(a){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.swidth,p=n.sheight,g=n.sx||0,m=n.sy||0,v=f&&p,y=this._vmlel;y||(y=lg.createelement("div"),ug(y),this._vmlel=y);var x,_=y.style,w=!1,b=1,s=1;if(this.transform&&(x=this.transform,b=eg(x[0]*x[0]+x[1]*x[1]),s=eg(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var m=[u,h],i=[u+c,h],t=[u,h+d],a=[u+c,h+d];oe(m,m,x),oe(i,i,x),oe(t,t,x),oe(a,a,x);var d=bg(m[0],i[0],t[0],a[0]),c=bg(m[1],i[1],t[1],a[1]),l=[];l.push("m11=",x[0]/b,vg,"m12=",x[2]/s,vg,"m21=",x[1]/b,vg,"m22=",x[3]/s,vg,"dx=",og(u*b+x[4]),vg,"dy=",og(h*s+x[5])),_.padding="0 "+og(d)+"px "+og(c)+"px 0",_.filter=gg+".matrix("+l.join("")+", sizingmethod=clip)"}else x&&(u=u*b+x[4],h=h*s+x[5]),_.filter="",_.left=og(u)+"px",_.top=og(h)+"px";var k=this._imageel,p=this._cropel;k||(k=lg.createelement("div"),this._imageel=k);var o=k.style;if(v){if(e&&i)o.width=og(b*e*c/f)+"px",o.height=og(s*i*d/p)+"px";else{var e=new image,n=this;e.onload=function(){e.onload=null,e=e.width,i=e.height,o.width=og(b*e*c/f)+"px",o.height=og(s*i*d/p)+"px",n._imagewidth=e,n._imageheight=i,n._imagesrc=a},e.src=a}p||(p=lg.createelement("div"),p.style.overflow="hidden",this._cropel=p);var r=p.style;r.width=og((c+g*c/f)*b),r.height=og((d+m*d/p)*s),r.filter=gg+".matrix(dx="+-g*c/f*b+",dy="+-m*d/p*s+")",p.parentnode||y.appendchild(p),k.parentnode!==p&&p.appendchild(k)}else o.width=og(b*c)+"px",o.height=og(s*d)+"px",y.appendchild(k),p&&p.parentnode&&(y.removechild(p),this._cropel=null);var z="",b=n.opacity;1>b&&(z+=".alpha(opacity="+og(100*b)+") "),z+=gg+".alphaimageloader(src="+a+", sizingmethod=scale)",o.filter=z,y.style.zindex=kg(this.zlevel,this.z,this.z2),jg(t,y),null!=n.text&&this.drawrecttext(t,this.getboundingrect())}},cn.prototype.onremove=function(t){qg(t,this._vmlel),this._vmlel=null,this._cropel=null,this._imageel=null,this.removerecttext(t)},cn.prototype.onadd=function(t){jg(t,this._vmlel),this.appendrecttext(t)};var rf,sf="normal",lf={},uf=0,hf=100,cf=document.createelement("div"),df=function(t){var e=lf[t];if(!e){uf>hf&&(uf=0,lf={});var i,n=cf.style;try{n.font=t,i=n.fontfamily.split(",")[0]}catch(a){}e={style:n.fontstyle||sf,variant:n.fontvariant||sf,weight:n.fontweight||sf,size:0|parsefloat(n.fontsize||12),family:i||"microsoft yahei"},lf[t]=e,uf++}return e};zi("measuretext",function(t,e){var i=lg;rf||(rf=i.createelement("div"),rf.style.csstext="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",lg.body.appendchild(rf));try{rf.style.font=e}catch(n){}return rf.innerhtml="",rf.appendchild(i.createtextnode(t)),{width:rf.offsetwidth}});for(var ff=new ti,pf=function(t,e,i,n){var a=this.style;this.__dirty&&hn(a,!0);var o=a.text;if(null!=o&&(o+=""),o){if(a.rich){var r=rn(o,a);o=[];for(var s=0;si;++i)os(s[i],v,_,w+i*p)}else{t.__text=o,t.__cancachebytextstring=b;for(var t=d.lines,a=t.length,i=0;a>i;i++){var d=s[i],c=t[i];d?d.__zrtext!==c&&(d.innerhtml="",d.appendchild(document.createtextnode(c))):(d=s[i]=yb("tspan"),r.appendchild(d),d.appendchild(document.createtextnode(c))),os(d,v,_,w+i*p)}if(m>a){for(;m>i;i++)r.removechild(s[i]);s.length=a}}}};of.drawrecttext=bf,of.brush=function(t){var e=t.style;null!=e.text?bf(t,!1):rs(t)},ss.prototype={diff:function(t,e,i){function n(){for(var i=-1*s;s>=i;i+=2){var n,l=u[i-1],h=u[i+1],c=(h?h.newpos:0)-i;l&&(u[i-1]=void 0);var d=l&&l.newpos+1=0&&r>c;if(d||f){if(!d||f&&l.newpos=o&&c+1>=r)return ls(a,n.components,e,t);u[i]=n}else u[i]=void 0}s++}i||(i=function(t,e){return t===e}),this.equals=i;var a=this;t=t.slice(),e=e.slice();var o=e.length,r=t.length,s=1,l=o+r,u=[{newpos:-1,components:[]}],h=this.extractcommon(u[0],e,t,0);if(u[0].newpos+1>=o&&h+1>=r){for(var c=[],d=0;d=s;){var f=n();if(f)return f}},pushcomponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractcommon:function(t,e,i,n){for(var a=e.length,o=i.length,r=t.newpos,s=r-n,l=0;a>r+1&&o>s+1&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newpos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var vf=new ss,gf=function(t,e,i){return vf.diff(t,e,i)},ff="0",wf="1";hs.prototype.createelement=yb,hs.prototype.getdefs=function(t){var e=this._svgroot,i=this._svgroot.getelementsbytagname("defs");return 0===i.length?t?(i=e.insertbefore(this.createelement("defs"),e.firstchild),i.contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},hs.prototype.update=function(t,e){if(t){var i=this.getdefs(!1);if(t[this._domname]&&i.contains(t[this._domname]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domname]=n)}}},hs.prototype.adddom=function(t){var e=this.getdefs(!0);e.appendchild(t)},hs.prototype.removedom=function(t){var e=this.getdefs(!1);e&&t[this._domname]&&(e.removechild(t[this._domname]),t[this._domname]=null)},hs.prototype.getdoms=function(){var t=this.getdefs(!1);if(!t)return[];var e=[];return f(this._tagnames,function(i){var n=t.getelementsbytagname(i);e=e.concat([].slice.call(n))}),e},hs.prototype.markallunused=function(){var t=this.getdoms(),e=this;f(t,function(t){t[e._marklabel]=ff})},hs.prototype.markused=function(t){t&&(t[this._marklabel]=wf)},hs.prototype.removeunused=function(){var t=this.getdefs(!1);if(t){var e=this.getdoms(),i=this;f(e,function(e){e[i._marklabel]!==wf&&t.removechild(e)})}},hs.prototype.getsvgproxy=function(t){return t instanceof ao?kf:t instanceof cn?pf:t instanceof ia?of:kf},hs.prototype.gettextsvgelement=function(t){return t.__textsvgel},hs.prototype.getsvgelement=function(t){return t.__svgel},h(cs,hs),cs.prototype.addwithoutupdate=function(t,e){if(e&&e.style){var i=this;f(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var a,o=e.style[n],r=i.getdefs(!0);o._dom?(a=o._dom,r.contains(o._dom)||i.adddom(a)):a=i.add(o),i.markused(e);var s=a.getattribute("id");t.setattribute(n,"url(#"+s+")")}})}},cs.prototype.add=function(t){var e;if("linear"===t.type)e=this.createelement("lineargradient");else{if("radial"!==t.type)return nm("illegal gradient type."),null;e=this.createelement("radialgradient")}return t.id=t.id||this.nextid++,e.setattribute("id","zr"+this._zrid+"-gradient-"+t.id),this.updatedom(t,e),this.adddom(e),e},cs.prototype.update=function(t){var e=this;hs.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagname;"linear"===i&&"lineargradient"===n||"radial"===i&&"radialgradient"===n?e.updatedom(t,t._dom):(e.removedom(t),e.add(t))})},cs.prototype.updatedom=function(t,e){if("linear"===t.type)e.setattribute("x1",t.x),e.setattribute("y1",t.y),e.setattribute("x2",t.x2),e.setattribute("y2",t.y2);else{if("radial"!==t.type)return void nm("illegal gradient type.");e.setattribute("cx",t.x),e.setattribute("cy",t.y),e.setattribute("r",t.r)}t.global?e.setattribute("gradientunits","userspaceonuse"):e.setattribute("gradientunits","objectboundingbox"),e.innerhtml="";for(var i=t.colorstops,n=0,a=i.length;a>n;++n){var o=this.createelement("stop");o.setattribute("offset",100*i[n].offset+"%");var r=i[n].color;if(r.indexof(!1)){var s=ti(r)[3],l=ai(r);o.setattribute("stop-color","#"+l),o.setattribute("stop-opacity",s)}else o.setattribute("stop-color",i[n].color);e.appendchild(o)}t._dom=e},cs.prototype.markused=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&hs.prototype.markused.call(this,e._dom),e=t.style.stroke,e&&e._dom&&hs.prototype.markused.call(this,e._dom)}},h(ds,hs),ds.prototype.update=function(t){var e=this.getsvgelement(t);e&&this.updatedom(e,t.__clippaths,!1);var i=this.gettextsvgelement(t);i&&this.updatedom(i,t.__clippaths,!0),this.markused(t)},ds.prototype.updatedom=function(t,e,i){if(e&&e.length>0){var n,a,o=this.getdefs(!0),r=e[0],s=i?"_textdom":"_dom";r[s]?(a=r[s].getattribute("id"),n=r[s],o.contains(n)||o.appendchild(n)):(a="zr"+this._zrid+"-clip-"+this.nextid,++this.nextid,n=this.createelement("clippath"),n.setattribute("id",a),o.appendchild(n),r[s]=n);var l=this.getsvgproxy(r);if(r.transform&&r.parent.invtransform&&!i){var u=array.prototype.slice.call(r.transform);re(r.transform,r.parent.invtransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getsvgelement(r);n.innerhtml="",n.appendchild(h.clonenode()),t.setattribute("clip-path","url(#"+a+")"),e.length>1&&this.updatedom(n,e.slice(1),i)}else t&&t.setattribute("clip-path","none")},ds.prototype.markused=function(t){var e=this;t.__clippaths&&f(t.__clippaths,function(t){t._dom&&hs.prototype.markused.call(e,t._dom),t._textdom&&hs.prototype.markused.call(e,t._textdom)})},h(fs,hs),fs.prototype.addwithoutupdate=function(t,e){if(e&&ps(e.style)){var i;if(e._shadowdom){i=e._shadowdom;var n=this.getdefs(!0);n.contains(e._shadowdom)||this.adddom(i)}else i=this.add(e);this.markused(e);var a=i.getattribute("id");t.style.filter="url(#"+a+")"}},fs.prototype.add=function(t){var e=this.createelement("filter");return t._shadowdomid=t._shadowdomid||this.nextid++,e.setattribute("id","zr"+this._zrid+"-shadow-"+t._shadowdomid),this.updatedom(t,e),this.adddom(e),e},fs.prototype.update=function(t,e){var i=e.style;if(ps(i)){var n=this;hs.prototype.update.call(this,e,function(){n.updatedom(e,e._shadowdom)})}else this.remove(t,e)},fs.prototype.remove=function(t,e){null!=e._shadowdomid&&(this.removedom(t),t.style.filter="")},fs.prototype.updatedom=function(t,e){var i=e.getelementsbytagname("fedropshadow");i=0===i.length?this.createelement("fedropshadow"):i[0];var n,a,o,r,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowblur||s.shadowoffsetx||s.shadowoffsety)n=s.shadowoffsetx||0,a=s.shadowoffsety||0,o=s.shadowblur,r=s.shadowcolor;else{if(!s.textshadowblur)return void this.removedom(e,s);n=s.textshadowoffsetx||0,a=s.textshadowoffsety||0,o=s.textshadowblur,r=s.textshadowcolor}i.setattribute("dx",n/l),i.setattribute("dy",a/u),i.setattribute("flood-color",r);var h=o/2/l,c=o/2/u,d=h+" "+c;i.setattribute("stddeviation",d),e.setattribute("x","-100%"),e.setattribute("y","-100%"),e.setattribute("width",math.ceil(o/2*200)+"%"),e.setattribute("height",math.ceil(o/2*200)+"%"),e.appendchild(i),t._shadowdom=e},fs.prototype.markused=function(t){t._shadowdom&&hs.prototype.markused.call(this,t._shadowdom)};var hf=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=r({},i||{});var a=yb("svg");a.setattribute("xmlns","http://www.w3.org/2000/svg"),a.setattribute("version","1.1"),a.setattribute("baseprofile","full"),a.style.csstext="user-select:none;position:absolute;left:0;top:0;",this.gradientmanager=new cs(n,a),this.clippathmanager=new ds(n,a),this.shadowmanager=new fs(n,a);var o=document.createelement("div");o.style.csstext="overflow:hidden;position:relative",this._svgroot=a,this._viewport=o,t.appendchild(o),o.appendchild(a),this.resize(i.width,i.height),this._visiblelist=[]};hf.prototype={constructor:hf,gettype:function(){return"svg"},getviewportroot:function(){return this._viewport},getviewportrootoffset:function(){var t=this.getviewportroot();return t?{offsetleft:t.offsetleft||0,offsettop:t.offsettop||0}:void 0},refresh:function(){var t=this.storage.getdisplaylist(!0);this._paintlist(t)},setbackgroundcolor:function(t){this._viewport.style.background=t},_paintlist:function(t){this.gradientmanager.markallunused(),this.clippathmanager.markallunused(),this.shadowmanager.markallunused();var e,i=this._svgroot,n=this._visiblelist,a=t.length,o=[];for(e=0;a>e;e++){var r=t[e],s=ms(r),l=bs(r)||ws(r);r.invisible||(r.__dirty&&(s&&s.brush(r),this.clippathmanager.update(r),r.style&&(this.gradientmanager.update(r.style.fill),this.gradientmanager.update(r.style.stroke),this.shadowmanager.update(l,r)),r.__dirty=!1),o.push(r))}var u,h=gf(n,o);for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getsize(0),e=this._getsize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var a=i.style;a.width=t+"px",a.height=e+"px";var o=this._svgroot;o.setattribute("width",t),o.setattribute("height",e)}},getwidth:function(){return this._width},getheight:function(){return this._height},_getsize:function(t){var e=this._opts,i=["width","height"][t],n=["clientwidth","clientheight"][t],a=["paddingleft","paddingtop"][t],o=["paddingright","paddingbottom"][t];if(null!=e[i]&&"auto"!==e[i])return parsefloat(e[i]);var r=this.root,s=document.defaultview.getcomputedstyle(r);return(r[n]||gs(s[i])||gs(r.style[i]))-(gs(s[a])||0)-(gs(s[o])||0)|0},dispose:function(){this.root.innerhtml="",this._svgroot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removechild(this._viewport)},pathtodataurl:function(){this.refresh();var t=this._svgroot.outerhtml;return"data:image/svg+xml;charset=utf-8,"+t}},f(["getlayer","insertlayer","eachlayer","eachbuiltinlayer","eachotherlayer","getlayers","modlayer","dellayer","clearlayer","todataurl","pathtoimage"],function(t){hf.prototype[t]=ss(t)}),qn("svg",hf),t.version=fc,t.dependencies=wc,t.priority=el,t.init=xu,t.connect=_u,t.disconnect=wu,t.disconnect=wl,t.dispose=bu,t.getinstancebydom=su,t.getinstancebyid=mu,t.registertheme=iu,t.registerpreprocessor=tu,t.registerprocessor=au,t.registerpostupdate=du,t.registeraction=cu,t.registercoordinatesystem=lu,t.getcoordinatesystemdimensions=ku,t.registerlayout=pu,t.registervisual=ou,t.registerloading=nu,t.extendcomponentmodel=ru,t.extendcomponentview=zu,t.extendseriesmodel=bu,t.extendchartview=vu,t.setcanvascreator=gu,t.registermap=fu,t.getmap=wu,t.datatool=bl,t.zrender=vi,t.number=ka,t.format=nd,t.throttle=wl,t.helper=mk,t.matrix=um,t.vector=ys,t.color=dm,t.parsegeojson=tk,t.parsegeojson=lk,t.util=kk,t.graphic=pk,t.list=el,t.model=vr,t.axis=ck,t.env=as});